This commit is contained in:
2025-11-25 09:03:13 +07:00
parent 900f59059e
commit deb82891bb
6 changed files with 252 additions and 68 deletions
+26 -12
View File
@@ -1,17 +1,23 @@
#include "head.h"
int main(int argc, char *argv[]){
int buff[BUFFMAX];
int x[XMAX];
for (int i = 0;i<XMAX;i++)x[i]++;
setlocale(LC_ALL, "");
if (argc < 3) {
int buff[BUFFMAX];
int inbuff;
int x[XMAX];
for (int i = 0;i<XMAX;i++)x[i]=0;
if (
argc < 2/* ||(
str(argv[3],"-1")
)*/
) {
printf("Not enough arguments. (-help)\n");
return 1;
}
if(argv[2]=="-help"||argv[2]=="-h"){kk
if(str(argv[1],"-help")||str(argv[1],"-h")){
printf("\nHelpMenu");
printf("\n\tprog [arg1] [arg2] [arg3]");
printf("\n\t[arg1] - Block of func");
@@ -20,24 +26,32 @@ int main(int argc, char *argv[]){
return 0;
}
switch(argv[2]){
int swt=0;
if(str(argv[1],"1"))swt=1;
if(str(argv[1],"2"))swt=2;
if(str(argv[1],"3"))swt=3;
switch(swt){
case 1:
while(buffinput!=-1)
while(buffinput(x,&inbuff,buff)!=-1)
func1(argv,x,inbuff,buff);
x[28]=1;
func1(argv,x,inbuff,buff);
break;
case 2:
while(buffinput!=-1)
while(buffinput(x,&inbuff,buff)!=-1)
func2(argv,x,inbuff,buff);
x[28]=1;
func2(argv,x,inbuff,buff);
break;
case 3:
while(buffinput!=-1)
while(buffinput(x,&inbuff,buff)!=-1)
func3(argv,x,inbuff,buff);
x[28]=1;
func3(argv,x,inbuff,buff);
break;
}
count(x);}
count(x);
return 0;
}