diff --git a/libs/video/targets/old_keys.c b/libs/video/targets/old_keys.c index 8cc1cbbf4..9d872726e 100644 --- a/libs/video/targets/old_keys.c +++ b/libs/video/targets/old_keys.c @@ -49,6 +49,7 @@ #include #include "QF/hash.h" +#include "QF/qtypes.h" #include "QF/sys.h" #include "old_keys.h" @@ -246,7 +247,7 @@ OK_TranslateKeyName (const char *name) const char *s = name; char *d = uname; - while ((*d++ = toupper (*s))) + while ((*d++ = toupper ((byte) *s))) s++; ok = Hash_Find (old_key_table, uname); if (!ok) { diff --git a/qw/source/cl_slist.c b/qw/source/cl_slist.c index 3e95f8684..569b711ce 100644 --- a/qw/source/cl_slist.c +++ b/qw/source/cl_slist.c @@ -384,9 +384,11 @@ SL_SortEntry (server_entry_t *start) i = 0; while ((start->desc[i] != '\0') && (q->desc[i] != '\0') && - (toupper (start->desc[i]) == toupper (q->desc[i]))) + (toupper ((byte) start->desc[i]) + == toupper ((byte) q->desc[i]))) i++; - if (toupper (start->desc[i]) > toupper (q->desc[i])) { + if (toupper ((byte) start->desc[i]) + > toupper ((byte) q->desc[i])) { SL_Swap (start, q); q = start; } diff --git a/qw/source/crudefile.c b/qw/source/crudefile.c index f9c1dc427..58426ad4d 100644 --- a/qw/source/crudefile.c +++ b/qw/source/crudefile.c @@ -227,7 +227,7 @@ CF_Open (const char *path, const char *mode) j = fullpath->str + strlen (fullpath->str) - strlen (path); for (i = 0; path[i]; i++, j++) // strcpy, but force lowercase - *j = tolower (path[i]); + *j = tolower ((byte) path[i]); *j = '\0'; if (CF_AlreadyOpen (fullpath->str, mode[0])) { diff --git a/qw/source/sv_ccmds.c b/qw/source/sv_ccmds.c index baf2f5c66..e52032da8 100644 --- a/qw/source/sv_ccmds.c +++ b/qw/source/sv_ccmds.c @@ -66,8 +66,8 @@ cvar_t *sv_leetnickmatch; static qboolean match_char (char a, char b) { - a = tolower (sys_char_map[(byte)a]); - b = tolower (sys_char_map[(byte)b]); + a = tolower ((byte) sys_char_map[(byte) a]); + b = tolower ((byte) sys_char_map[(byte) b]); if (a == b || (sv_leetnickmatch->int_val && ( (a == '1' && b == 'i') || (a == 'i' && b == '1') diff --git a/qw/source/sv_pr_cpqw.c b/qw/source/sv_pr_cpqw.c index 96d7b11c3..78710b4a0 100644 --- a/qw/source/sv_pr_cpqw.c +++ b/qw/source/sv_pr_cpqw.c @@ -256,7 +256,7 @@ KK_qwchar (char c) { c &= 0x7f; if (c >= ' ') - return tolower (c); + return tolower ((byte) c); if (c >= 0x12 && c <= 0x1b) return c - 0x12 + '0'; switch (c) {