mirror of
https://github.com/n05la3/cmdtypist
synced 2024-11-07 15:20:28 +00:00
fixed failing issues with lesson select function
This commit is contained in:
parent
1f5b3df7d7
commit
69431b0fbe
20
cmdtypist.c
20
cmdtypist.c
@ -21,5 +21,23 @@ void select_lesson(int argc_cmd)
|
||||
while(ch=getchar()!='\n');//disposing off wrong input string.
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "%s\n", "Invalid number of arguments, consult \"cmdtypist --help\" for more");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
/*
|
||||
if(argc_cmd==3)
|
||||
if(strncmp(argv[2],"select",6)!=0||lesson_choice<1||lesson_choice>20)
|
||||
{
|
||||
fprintf(stderr, "%s\n", "Command not found\n");
|
||||
if(strncmp(argv[2],"se",2))
|
||||
fprintf(stderr, "%s\n", "Did you mean \"select\"");
|
||||
else if(lesson_choice<1||lesson_choice>20)
|
||||
fprintf(stderr, "%s %d\n", "No lesson entry for ",lesson_choice);
|
||||
//else if(ch!=1)
|
||||
printf("%s", "Lesson number cannot contain symbols or alpha letters.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}*/
|
||||
printf("\n");
|
||||
}
|
Loading…
Reference in New Issue
Block a user