Курсовая работа: Програма емуляції роботи командного процесора операційної системи
printf("Usage: split source dest1 dest2\n"
"\tsource Name of source file\n"
"\tdest1, dest2 Names of files to split in\n");
}
void editexec(unsigned argc,char **argv){
if(argc!=2){
printf("Invalid artgument count\n");
return;
}
if(_creat(argv[1],FA_NORMAL)==-1){
printf("Error creating file\n");
}
}
void edithelp(void){
printf("Usage: edit <filename>\nCreate file\n");
}
CLIST clist[]={{"",NULL,NULL}, {"exit",NULL,NULL}, {"help",Help,NULL},
{"split",splitexec,splithelp}, {"ar",arexec,arhelp},
{"edit",editexec,edithelp}, {"join",joinexec,joinhelp}};
void main(void){
char cmdline[100];
cmdnum=6;
while(1){
printf("***KOM*** > ");
gets(cmdline);
if(!strlen(cmdline)) continue;
args[0]=strtok(cmdline," ");
argc=1;
while(args[argc]=strtok(NULL," ")) argc++;