X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=sys_win.c;h=d571dd2a4ba9173659d2f818ec8728140c561326;hb=861475e4f10eb1f592a5c64aff3b57eab4d11edb;hp=5431221a12d0848455ab2614b45fd8a100577993;hpb=0129aa345c3724a4211a306a2acae35a2f5bcc6c;p=xonotic%2Fdarkplaces.git diff --git a/sys_win.c b/sys_win.c index 5431221a..d571dd2a 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; @@ -302,11 +302,11 @@ char *Sys_GetClipboardData (void) if ((hClipboardData = GetClipboardData (CF_TEXT)) != 0) { - if ((cliptext = GlobalLock (hClipboardData)) != 0) + if ((cliptext = (char *)GlobalLock (hClipboardData)) != 0) { size_t allocsize; allocsize = GlobalSize (hClipboardData) + 1; - data = Z_Malloc (allocsize); + data = (char *)Z_Malloc (allocsize); strlcpy (data, cliptext, allocsize); GlobalUnlock (hClipboardData); } @@ -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 +