fix
This commit is contained in:
parent
c5018659d7
commit
565a61dd9b
12
utils.h
12
utils.h
@ -31,13 +31,17 @@ void fflush_stdin(){
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
char * welcome_message(FILE * fp){ //cross compatible
|
char * welcome_message(void * ptr){ //cross compatible
|
||||||
if(!fp){//if fp is NULL
|
|
||||||
|
if(!ptr){//if fp is NULL
|
||||||
return "><Welcome to the Student Union POS system><\n";
|
return "><Welcome to the Student Union POS system><\n";
|
||||||
}
|
}
|
||||||
fprintf(fp,"><Welcome to the Student Union POS system><\n");//welcome messgae
|
if(feof(ptr)){// if ptr a string or file
|
||||||
|
sprintf(ptr,"><Welcome to the Student Union POS system><\n");//welcome message
|
||||||
|
}else{
|
||||||
|
fprintf(ptr,"><Welcome to the Student Union POS system><\n");//welcome message
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int choices_selecter(char * Items[],int items,char * welcome_messages){
|
int choices_selecter(char * Items[],int items,char * welcome_messages){
|
||||||
int choice = 0;
|
int choice = 0;
|
||||||
do{
|
do{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user