Convert sindex() and rsindex() to use const char * arguments

Also simply sindex() considerably using standard strspn() / strcspn() functions.
This commit is contained in:
Kevin Easton
2017-11-17 12:21:12 +11:00
parent fea88185f8
commit e8ce5fb973
3 changed files with 34 additions and 40 deletions

View File

@@ -145,8 +145,8 @@ extern Function_ptr *global;
#define remove_trailing_spaces (*(char * (*)(char *))global[REMOVE_TRAILING_SPACES])
#define expand_twiddle (*(char * (*)(char *))global[EXPAND_TWIDDLE])
#define check_nickname (*(char * (*)(char *))global[CHECK_NICKNAME])
#define sindex (*(char * (*)(char *, char *))global[SINDEX])
#define rsindex (*(char * (*)(char *, char *, char *, int))global[RSINDEX])
#define sindex (*(char * (*)(const char *, const char *))global[SINDEX])
#define rsindex (*(char * (*)(const char *, const char *, const char *, int))global[RSINDEX])
#define is_number (*(int (*)(const char *))global[ISNUMBER])
#define rfgets (*(char * (*)(char *, int , FILE *))global[RFGETS])
#define path_search (*(char * (*)(char *, char *))global[PATH_SEARCH])