Changeset 37665 in vbox for trunk/src/VBox/Runtime/common/misc
- Timestamp:
- Jun 28, 2011 12:32:13 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/misc/getopt.cpp
r34542 r37665 5 5 6 6 /* 7 * Copyright (C) 2007-201 0Oracle Corporation7 * Copyright (C) 2007-2011 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 217 217 */ 218 218 size_t cchLong = strlen(pOpt->pszLong); 219 if (!strncmp(pszOption, pOpt->pszLong, cchLong)) 219 if ( !strncmp(pszOption, pOpt->pszLong, cchLong) 220 || ( pOpt->fFlags & RTGETOPT_FLAG_ICASE 221 && !RTStrNICmp(pszOption, pOpt->pszLong, cchLong))) 220 222 { 221 223 if (pOpt->fFlags & RTGETOPT_FLAG_INDEX) … … 235 237 */ 236 238 size_t cchLong = strlen(pOpt->pszLong); 237 if (!strncmp(pszOption, pOpt->pszLong, cchLong)) 239 if ( !strncmp(pszOption, pOpt->pszLong, cchLong) 240 || ( pOpt->fFlags & RTGETOPT_FLAG_ICASE 241 && !RTStrNICmp(pszOption, pOpt->pszLong, cchLong))) 238 242 { 239 243 while (RT_C_IS_DIGIT(pszOption[cchLong])) … … 243 247 } 244 248 } 245 else if (!strcmp(pszOption, pOpt->pszLong)) 249 else if ( !strcmp(pszOption, pOpt->pszLong) 250 || ( pOpt->fFlags & RTGETOPT_FLAG_ICASE 251 && !RTStrICmp(pszOption, pOpt->pszLong))) 246 252 return pOpt; 247 253 } … … 251 257 if (!(fFlags & RTGETOPTINIT_FLAGS_NO_STD_OPTS)) 252 258 for (uint32_t i = 0; i < RT_ELEMENTS(g_aStdOptions); i++) 253 if (!strcmp(pszOption, g_aStdOptions[i].pszLong)) 259 if ( !strcmp(pszOption, g_aStdOptions[i].pszLong) 260 || ( pOpt->fFlags & RTGETOPT_FLAG_ICASE 261 && !RTStrICmp(pszOption, g_aStdOptions[i].pszLong))) 254 262 return &g_aStdOptions[i]; 255 263
Note:
See TracChangeset
for help on using the changeset viewer.