#ifndef STD_LIB_H #define STD_LIB_H #include #include #include #include #include #include #include #include #endif void welcome_message(){ printf("><\n");//welcome messgae } int choices_selecter(char * Items[],int items,char * welcome_messages ){ int choice = 0; do{ system("cls"); if (welcome_messages !=NULL){ printf("%s",welcome_messages); } printf("Select An Option:\n"); int i; for (i=0; i"); fflush(stdin); scanf("%d",&choice); if(choice < 1 || choice > items+1){ printf("Invalid choice...press any key to retry....\n"); fflush(stdin); getchar(); } }while(choice < 1 || choice > items+1); return choice; } //check if strcasestr is define in current environment //if not, define it #ifndef HAVE_STRCASESTR char *strcasestr(const char *s, const char *find) { char c, sc; size_t len; if ((c = *find++) != 0) { c = tolower((unsigned char)c); len = strlen(find); do { do { if ((sc = *s++) == 0) return (NULL); } while ((char)tolower((unsigned char)sc) != c); } while (strncasecmp(s, find, len) != 0); s--; } return ((char *)s); } #endif