X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=sys_win.c;h=ee6ef061c219b4204a388f0cd41c62f32c44a2d0;hb=539a69f74e6a5ca03a203b41b95e8321db983cdf;hp=5431221a12d0848455ab2614b45fd8a100577993;hpb=0129aa345c3724a4211a306a2acae35a2f5bcc6c;p=xonotic%2Fdarkplaces.git diff --git a/sys_win.c b/sys_win.c index 5431221a..ee6ef061 100644 --- a/sys_win.c +++ b/sys_win.c @@ -269,7 +269,7 @@ char *Sys_ConsoleInput (void) break; default: - if (ch >= ' ') + if (ch >= (int) (unsigned char) ' ') { WriteFile(houtput, &ch, 1, &dummy, NULL); text[len] = ch; @@ -423,7 +423,7 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin // FIXME: this tokenizer is rather redundent, call a more general one while (*lpCmdLine && (com_argc < MAX_NUM_ARGVS)) { - while (*lpCmdLine && *lpCmdLine <= ' ') + while (*lpCmdLine && ISWHITESPACE(*lpCmdLine)) lpCmdLine++; if (!*lpCmdLine) @@ -443,7 +443,7 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin // unquoted word argv[com_argc] = lpCmdLine; com_argc++; - while (*lpCmdLine && *lpCmdLine > ' ') + while (*lpCmdLine && !ISWHITESPACE(*lpCmdLine)) lpCmdLine++; } @@ -460,6 +460,8 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin return true; } +#if 0 +// unused, this file is only used when building windows client and vid_wgl provides WinMain() instead int main (int argc, const char* argv[]) { MEMORYSTATUS lpBuffer; @@ -479,3 +481,5 @@ int main (int argc, const char* argv[]) return true; } +#endif +