From 4ff5924eb17cde3474d3c87fb4d707feb96f9c2c Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Tue, 17 Dec 2002 18:32:02 +0000 Subject: [PATCH] changed upcase and lowercase code. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@582 --- include/support.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/include/support.h b/include/support.h index 8857469a..8e260588 100644 --- a/include/support.h +++ b/include/support.h @@ -45,15 +45,13 @@ bool ScanCMDHex(char * cmd,char * check,Bits * result); char * StripWord(char * cmd); INLINE char * upcase(char * str) { - char * oldstr=str; - while (*str) *str++=toupper(*str); - return oldstr; + for (char* idx = str; *idx ; idx++) *idx = toupper(*idx); + return str; } INLINE char * lowcase(char * str) { - char * oldstr=str; - while (*str) *str++=tolower(*str); - return oldstr; + for(char* idx = str; *idx ; idx++) *idx = tolower(*idx); + return str; }