Changeset 78048 in vbox for trunk/include/iprt
- Timestamp:
- Apr 9, 2019 1:21:09 AM (6 years ago)
- Location:
- trunk/include/iprt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/mangling.h
r77983 r78048 1597 1597 # define RTPathAbsDup RT_MANGLER(RTPathAbsDup) 1598 1598 # define RTPathAbsEx RT_MANGLER(RTPathAbsEx) 1599 # define RTPathAbsExEx RT_MANGLER(RTPathAbsExEx) 1599 1600 # define RTPathAbsExDup RT_MANGLER(RTPathAbsExDup) 1600 1601 # define RTPathAppDocs RT_MANGLER(RTPathAppDocs) -
trunk/include/iprt/path.h
r76589 r78048 50 50 */ 51 51 #if !defined(IPRT_INCLUDED_param_h) || defined(DOXYGEN_RUNNING) 52 # define RTPATH_MAX (4096 + 4) /* (PATH_MAX + 1) on linux w/ some alignment */52 # define RTPATH_MAX (4096 + 4) /* (PATH_MAX + 1) on linux w/ some alignment */ 53 53 #endif 54 55 /** 56 * The absolute max host path length we are willing to support. 57 * @note Not really suitable for stack buffers. 58 */ 59 #define RTPATH_BIG_MAX (_64K) 54 60 55 61 /** @def RTPATH_TAG … … 61 67 */ 62 68 #ifndef RTPATH_TAG 63 # define RTPATH_TAG (__FILE__)69 # define RTPATH_TAG (__FILE__) 64 70 #endif 65 71 … … 305 311 * @param pszPath The path to resolve. 306 312 * @param pszAbsPath Where to store the absolute path. 307 * @param c chAbsPathSize of the buffer.313 * @param cbAbsPath Size of the buffer. 308 314 * 309 315 * @note Current implementation is buggy and will remove trailing slashes 310 316 * that would normally specify a directory. Don't depend on this. 311 317 */ 312 RTDECL(int) RTPathAbs(const char *pszPath, char *pszAbsPath, size_t c chAbsPath);318 RTDECL(int) RTPathAbs(const char *pszPath, char *pszAbsPath, size_t cbAbsPath); 313 319 314 320 /** … … 335 341 * @param pszPath The path to resolve. 336 342 * @param pszAbsPath Where to store the absolute path. 337 * @param c chAbsPathSize of the buffer.343 * @param cbAbsPath Size of the buffer. 338 344 * 339 345 * @note Current implementation is buggy and will remove trailing slashes 340 346 * that would normally specify a directory. Don't depend on this. 341 347 */ 342 RTDECL(int) RTPathAbsEx(const char *pszBase, const char *pszPath, char *pszAbsPath, size_t cchAbsPath); 348 RTDECL(int) RTPathAbsEx(const char *pszBase, const char *pszPath, char *pszAbsPath, size_t cbAbsPath); 349 350 /** 351 * Get the absolute path (no symlinks, no . or .. components), assuming the 352 * given base path as the current directory. 353 * 354 * The resulting path doesn't have to exist. 355 * 356 * @returns iprt status code. 357 * @param pszBase The base path to act like a current directory. 358 * When NULL, the actual cwd is used (i.e. the call 359 * is equivalent to RTPathAbs(pszPath, ...). 360 * @param pszPath The path to resolve. 361 * @param fFlags One of the RTPATH_STR_F_STYLE_XXX flags combined 362 * with any of the RTPATHABS_F_XXX ones. Most 363 * users will pass RTPATH_STR_F_STYLE_HOST (0). 364 * @param pszAbsPath Where to store the absolute path. 365 * @param pcbAbsPath Hold the size of the buffer when called. The return 366 * value is the string length on success, and the 367 * required (or slightly more in some case) buffer 368 * size, including terminator, on VERR_BUFFER_OVERFLOW 369 * failures. 370 */ 371 RTDECL(int) RTPathAbsExEx(const char *pszBase, const char *pszPath, uint32_t fFlags, char *pszAbsPath, size_t *pcbAbsPath); 372 373 /** @name RTPATHABS_F_XXX - Flags for RTPathAbsEx. 374 * @note The RTPATH_F_STR_XXX style flags also applies. 375 * @{ */ 376 /** Treat specified base directory as a root that cannot be ascended beyond. */ 377 #define RTPATHABS_F_STOP_AT_BASE RT_BIT_32(16) 378 /** Treat CWD as a root that cannot be ascended beyond. */ 379 #define RTPATHABS_F_STOP_AT_CWD RT_BIT_32(17) 380 /** @} */ 343 381 344 382 /** … … 619 657 * RTPATH_PROP_RELATIVE will always be set together with this. */ 620 658 #define RTPATH_PROP_DOTDOT_REFS UINT16_C(0x1000) 659 /** Special UNC root. 660 * The share name is not sacred when this is set. */ 661 #define RTPATH_PROP_SPECIAL_UNC UINT16_C(0x2000) 621 662 622 663 … … 714 755 * 715 756 * @returns IPRT status code. 716 * @retval VERR_BUFFER_OVERFLOW if @a cbDstPath is less than or equal to717 * RTPATHPARSED::cchPath.757 * @retval VERR_BUFFER_OVERFLOW if the destination buffer is too small. 758 * The necessary length is @a pParsed->cchPath + 1 (updated). 718 759 * 719 760 * @param pszSrcPath The source path. 720 * @param pParsed The parser output for @a pszSrcPath. 761 * @param pParsed The parser output for @a pszSrcPath. Caller may 762 * eliminate elements by setting their length to 763 * zero. The cchPath member is updated. 721 764 * @param fFlags Combination of RTPATH_STR_F_STYLE_XXX. 722 765 * Most users will pass 0.
Note:
See TracChangeset
for help on using the changeset viewer.