VirtualBox

Changeset 49039 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Oct 10, 2013 6:27:32 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
89816
Message:

IPRT: Filename extension versus suffix cleanup, long overdue.

Location:
trunk/include/iprt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/mangling.h

    r48850 r49039  
    653653# define RTLdrRelocate                                  RT_MANGLER(RTLdrRelocate)
    654654# define RTLdrRvaToSegOffset                            RT_MANGLER(RTLdrRvaToSegOffset)
     655# define RTLdrQueryProp                                 RT_MANGLER(RTLdrQueryProp)
    655656# define RTLdrSegOffsetToRva                            RT_MANGLER(RTLdrSegOffsetToRva)
    656657# define RTLdrSize                                      RT_MANGLER(RTLdrSize)
     
    976977# define RTPathExists                                   RT_MANGLER(RTPathExists)
    977978# define RTPathExistsEx                                 RT_MANGLER(RTPathExistsEx)
    978 # define RTPathExt                                      RT_MANGLER(RTPathExt)
     979# define RTPathSuffix                                   RT_MANGLER(RTPathSuffix)
    979980# define RTPathFilename                                 RT_MANGLER(RTPathFilename)
    980981# define RTPathFilenameEx                               RT_MANGLER(RTPathFilenameEx)
    981982# define RTPathGetCurrent                               RT_MANGLER(RTPathGetCurrent)
    982983# define RTPathGetMode                                  RT_MANGLER(RTPathGetMode)
    983 # define RTPathHasExt                                   RT_MANGLER(RTPathHasExt)
     984# define RTPathHasSuffix                                RT_MANGLER(RTPathHasSuffix)
    984985# define RTPathHasPath                                  RT_MANGLER(RTPathHasPath)
    985986# define RTPathIsSame                                   RT_MANGLER(RTPathIsSame)
     
    10091010# define RTPathStartsWith                               RT_MANGLER(RTPathStartsWith)
    10101011# define RTPathStartsWithRoot                           RT_MANGLER(RTPathStartsWithRoot)
    1011 # define RTPathStripExt                                 RT_MANGLER(RTPathStripExt)
     1012# define RTPathStripSuffix                              RT_MANGLER(RTPathStripSuffix)
    10121013# define RTPathStripFilename                            RT_MANGLER(RTPathStripFilename)
    10131014# define RTPathStripTrailingSlash                       RT_MANGLER(RTPathStripTrailingSlash)
  • trunk/include/iprt/path.h

    r46162 r49039  
    316316
    317317/**
    318  * Strips the extension from a path.
    319  *
    320  * @param   pszPath     Path which extension should be stripped.
    321  */
    322 RTDECL(void) RTPathStripExt(char *pszPath);
     318 * Strips the last suffix from a path.
     319 *
     320 * @param   pszPath     Path which suffix should be stripped.
     321 */
     322RTDECL(void) RTPathStripSuffix(char *pszPath);
    323323
    324324/**
     
    397397
    398398/**
    399  * Finds the extension part of in a path.
    400  *
    401  * @returns Pointer to extension within pszPath.
    402  * @returns NULL if no extension.
    403  * @param   pszPath     Path to find extension in.
    404  */
    405 RTDECL(char *) RTPathExt(const char *pszPath);
    406 
    407 /**
    408  * Checks if a path has an extension.
    409  *
    410  * @returns true if extension present.
    411  * @returns false if no extension.
     399 * Finds the suffix part of in a path (last dot and onwards).
     400 *
     401 * @returns Pointer to suffix within pszPath.
     402 * @returns NULL if no suffix
     403 * @param   pszPath     Path to find suffix in.
     404 *
     405 * @remarks IPRT terminology: A suffix includes the dot, the extension starts
     406 *          after the dot. For instance suffix '.txt' and extension 'txt'.
     407 */
     408RTDECL(char *) RTPathSuffix(const char *pszPath);
     409
     410/**
     411 * Checks if a path has an extension / suffix.
     412 *
     413 * @returns true if extension / suffix present.
     414 * @returns false if no extension / suffix.
    412415 * @param   pszPath     Path to check.
    413416 */
    414 RTDECL(bool) RTPathHasExt(const char *pszPath);
    415 /** Misspelled, don't use.  */
    416 #define RTPathHaveExt   RTPathHasExt
     417RTDECL(bool) RTPathHasSuffix(const char *pszPath);
     418/** Same thing, different name.  */
     419#define RTPathHasExt RTPathHasSuffix
    417420
    418421/**
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette