Changeset 27968 in vbox for trunk/src/VBox/Runtime/common/misc
- Timestamp:
- Apr 2, 2010 8:36:35 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/misc/getoptargv.cpp
r27386 r27968 390 390 { 391 391 AssertReturn(!(fFlags & ~RTGETOPTARGV_CNV_QUOTE_MASK), VERR_INVALID_PARAMETER); 392 AssertReturn((fFlags & RTGETOPTARGV_CNV_QUOTE_MASK) == RTGETOPTARGV_CNV_QUOTE_MS_CRT, VERR_NOT_IMPLEMENTED);393 392 394 393 #define PUT_CH(ch) \ … … 462 461 PUT_CH('"'); 463 462 } 464 else /* bourne shell */ 465 { 466 AssertFailed(/*later*/); 463 else 464 { 465 /* 466 * Bourne Shell quoting. Quote the whole thing in single quotes 467 * and use double quotes for any single quote chars. 468 */ 469 PUT_CH('\''); 470 char ch; 471 while ((ch = *pszArg++)) 472 { 473 if (ch == '\'') 474 { 475 PUT_SZ("'\"'\"'"); 476 } 477 else 478 { 479 PUT_CH(ch); 480 } 481 } 482 PUT_CH('\''); 467 483 } 468 484 }
Note:
See TracChangeset
for help on using the changeset viewer.