Changeset 27347 in vbox for trunk/include/iprt
- Timestamp:
- Mar 14, 2010 6:36:16 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/getopt.h
r26694 r27347 402 402 RTDECL(void) RTGetOptArgvFree(char **paArgv); 403 403 404 /** 405 * Turns an argv array into a command line string. 406 * 407 * This is useful for calling CreateProcess on Windows, but can also be used for 408 * displaying an argv array. 409 * 410 * This function aims at following the bourn shell string quoting rules. 411 * 412 * @returns IPRT status code. 413 * 414 * @param ppszCmdLine Where to return the command line string. This must 415 * be freed by calling RTStrFree. 416 * @param papszArgs The argument vector to convert. 417 * @param fFlags A combination of the RTGETOPTARGV_CNV_XXX flags. 418 */ 419 RTDECL(int) RTGetOptArgvToString(char **ppszCmdLine, const char * const *papszArgv, uint32_t fFlags); 420 421 /** @name RTGetOptArgvToString and RTGetOptArgvToUtf16String flags 422 * @{ */ 423 /** Quote strings according to the Microsoft CRT rules. */ 424 #define RTGETOPTARGV_CNV_QUOTE_MS_CRT UINT32_C(0) 425 /** Quote strings according to the Unix Bourne Shell. */ 426 #define RTGETOPTARGV_CNV_QUOTE_BOURNE_SH UINT32_C(1) 427 /** Mask for the quoting style. */ 428 #define RTGETOPTARGV_CNV_QUOTE_MASK UINT32_C(1) 404 429 /** @} */ 405 430 431 /** 432 * Convenience wrapper around RTGetOpArgvToString and RTStrToUtf16. 433 * 434 * @returns IPRT status code. 435 * 436 * @param ppwszCmdLine Where to return the command line string. This must 437 * be freed by calling RTUtf16Free. 438 * @param papszArgs The argument vector to convert. 439 * @param fFlags A combination of the RTGETOPTARGV_CNV_XXX flags. 440 */ 441 RTDECL(int) RTGetOptArgvToUtf16String(PRTUTF16 *ppwszCmdLine, const char * const *papszArgv, uint32_t fFlags); 442 443 444 /** @} */ 445 406 446 RT_C_DECLS_END 407 447
Note:
See TracChangeset
for help on using the changeset viewer.