- Timestamp:
- Oct 26, 2010 9:24:32 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/path.h
r33439 r33450 481 481 482 482 /** 483 * Same as RTPathJoin, except that the output buffer is allocated. 484 * 485 * @returns Buffer containing the joined up path, call RTStrFree to free. NULL 486 * on allocation failure. 487 * @param pszPathSrc The base path to copy into @a pszPathDst before 488 * appending @a pszAppend. 489 * @param pszAppend The partial path to append to pszPathSrc. This can 490 * be NULL, in which case nothing is done. 491 * 492 */ 493 RTDECL(char *) RTPathJoinA(const char *pszPathSrc, const char *pszAppend); 494 495 /** 483 496 * Callback for RTPathTraverseList that's called for each element. 484 497 * -
trunk/src/VBox/Runtime/Makefile.kmk
r33426 r33450 297 297 common/path/RTPathHavePath.cpp \ 298 298 common/path/RTPathJoin.cpp \ 299 common/path/RTPathJoinA.cpp \ 299 300 common/path/RTPathParse.cpp \ 300 301 common/path/RTPathRealDup.cpp \ … … 939 940 common/path/RTPathHavePath.cpp \ 940 941 common/path/RTPathJoin.cpp \ 942 common/path/RTPathJoinA.cpp \ 941 943 common/path/RTPathParse.cpp \ 942 944 common/path/RTPathRealDup.cpp \ -
trunk/src/VBox/Runtime/common/path/RTPathJoin.cpp
r28800 r33450 1 1 /* $Id$ */ 2 2 /** @file 3 * IPRT - RTPathJoin 3 * IPRT - RTPathJoin. 4 4 */ 5 5 … … 43 43 AssertPtr(pszPathDst); 44 44 AssertPtr(pszPathSrc); 45 AssertPtr(pszAppend); 45 46 46 47 /* -
trunk/src/VBox/Runtime/testcase/tstRTPath.cpp
r28800 r33450 367 367 368 368 /* 369 * RTPathJoinA - reuse the append tests. 370 */ 371 RTTestSub(hTest, "RTPathJoinA"); 372 for (unsigned i = 0; i < RT_ELEMENTS(s_apszAppendTests); i += 3) 373 { 374 const char *pszInput = s_apszAppendTests[i]; 375 const char *pszAppend = s_apszAppendTests[i + 1]; 376 const char *pszExpect = s_apszAppendTests[i + 2]; 377 378 char *pszPathDst; 379 RTTESTI_CHECK(pszPathDst = RTPathJoinA(pszInput, pszAppend)); 380 if (!pszPathDst) 381 continue; 382 if (strcmp(pszPathDst, pszExpect)) 383 { 384 RTTestIFailed("Unexpected result\n" 385 " input: '%s'\n" 386 " append: '%s'\n" 387 " output: '%s'\n" 388 "expected: '%s'", 389 pszInput, pszAppend, pszPathDst, pszExpect); 390 } 391 RTStrFree(pszPathDst); 392 } 393 394 /* 369 395 * RTPathStripTrailingSlash 370 396 */
Note:
See TracChangeset
for help on using the changeset viewer.