Changeset 5971 in vbox for trunk/src/VBox/Runtime
- Timestamp:
- Dec 5, 2007 7:25:00 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/log/log.cpp
r5508 r5971 39 39 #include <iprt/stdarg.h> 40 40 #include <iprt/string.h> 41 #include <iprt/ctype.h> 41 42 #ifdef IN_RING3 42 # include <iprt/ctype.h>43 43 # include <iprt/alloca.h> 44 44 # include <stdio.h> 45 #else 46 # define isspace(ch) ( (ch) == ' ' || (ch) == '\t' ) 47 #endif 48 49 50 51 /******************************************************************************* 52 * Defined Constants And Macros * 53 *******************************************************************************/ 54 /** Ascii to lower macro. */ 55 #define CHLOWER(ch) (((unsigned char)(ch) < (unsigned char)'A') || ((unsigned char)(ch) > (unsigned char)'Z') ? (ch) : (ch) + ('a' - 'A')) 45 #endif 56 46 57 47 … … 274 264 { 275 265 /* skip blanks. */ 276 while ( isspace(*pszVar) || *pszVar == '\n' || *pszVar == '\r')266 while (RT_C_IS_SPACE(*pszVar)) 277 267 pszVar++; 278 268 if (!*pszVar) … … 317 307 318 308 /* check for value. */ 319 while ( isspace(*pszVar) || *pszVar == '\n' || *pszVar == '\r')309 while (RT_C_IS_SPACE(*pszVar)) 320 310 pszVar++; 321 311 if (*pszVar == '=' || *pszVar == ':') … … 366 356 367 357 /* skip blanks and delimiters. */ 368 while ( isspace(*pszVar) || *pszVar == '\n' || *pszVar == '\r'|| *pszVar == ';')358 while (RT_C_IS_SPACE(*pszVar) || *pszVar == ';') 369 359 pszVar++; 370 360 } /* while more environment variable value left */ … … 888 878 for (;;) 889 879 { 890 if ( CHLOWER(*pszGrp) != CHLOWER(*pachMask))880 if (RT_C_TO_LOWER(*pszGrp) != RT_C_TO_LOWER(*pachMask)) 891 881 { 892 882 /* … … 907 897 908 898 /* do extremely minimal matching (fixme) */ 909 pszGrp = strchr(pszGrp, *pachMask); 910 if (!pszGrp) 899 const char *pszTmp = strchr(pszGrp, RT_C_TO_LOWER(*pachMask)); 900 if (!pszTmp) 901 pszTmp = strchr(pszGrp, RT_C_TO_UPPER(*pachMask)); 902 if (!pszTmp) 911 903 return false; 904 pszGrp = pszTmp; 912 905 continue; 913 906 } … … 1104 1097 const char *psz1 = aFlags[i].pszFlag; 1105 1098 const char *psz2 = psz; 1106 while (*psz1 == CHLOWER(*psz2))1099 while (*psz1 == RT_C_TO_LOWER(*psz2)) 1107 1100 { 1108 1101 psz1++; … … 1170 1163 { 1171 1164 /* skip blanks. */ 1172 while ( isspace(*pszVar) || *pszVar == '\n' || *pszVar == '\r')1165 while (RT_C_IS_SPACE(*pszVar)) 1173 1166 pszVar++; 1174 1167 if (!*pszVar) … … 1254 1247 1255 1248 /* skip blanks and delimiters. */ 1256 while ( isspace(*pszVar) || *pszVar == '\n' || *pszVar == '\r'|| *pszVar == ';')1249 while (RT_C_IS_SPACE(*pszVar) || *pszVar == ';') 1257 1250 pszVar++; 1258 1251 } /* while more environment variable value left */
Note:
See TracChangeset
for help on using the changeset viewer.