diff --git a/src/command.c b/src/command.c index 5a90cd9..4320d63 100644 --- a/src/command.c +++ b/src/command.c @@ -23,8 +23,16 @@ int sort_comp(const void *a, const void *b) { return strcmp(*(char **)a, *(char **)b); } +#if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || \ + (defined(__APPLE__) && defined(__MACH__))) + int inv_handler(const void *key, unsigned long size, unsigned long val, - void *usr) { + void *usr) +#else +int inv_handler(const void *key, unsigned long long size, + unsigned long long val, void *usr) +#endif +{ if (val == 0) return 0; char *key2 = (char *)key; @@ -68,7 +76,8 @@ int get_command(char *command, char *command_re, char **sort_tmp) { int cl = strlen(command); - if (cl < 2) return 0; + if (cl < 2) + return 0; command[cl - 1] = '\0'; @@ -81,9 +90,9 @@ int get_command(char *command, char *command_re, char **sort_tmp) { for (int i = 1; i < MAX_COMBO_LENGTH; i++) { combos = i; sort_tmp[i] = strstr(sort_tmp[i - 1], ";"); - if (sort_tmp[i] == 0 || sort_tmp[i] == sort_tmp[i-1]) + if (sort_tmp[i] == 0 || sort_tmp[i] == sort_tmp[i - 1]) break; - if (strlen(sort_tmp[i]) < 2) { + if (strlen(sort_tmp[i]) < 2) { sort_tmp[i][0] = '\0'; break; }