fix compile bug on win32

This commit is contained in:
biglyderv 2025-03-25 01:29:28 -04:00
parent 35005081b6
commit f4be64fe19
Signed by: biglyderv
GPG key ID: 0E2EB0B4CD7397B5

View file

@ -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;
}