VirtualBox

Changeset 28915 in vbox for trunk/src/VBox/Runtime/include


Ignore:
Timestamp:
Apr 29, 2010 6:12:35 PM (15 years ago)
Author:
vboxsync
Message:

iprt: More path conversion avoidance.

Location:
trunk/src/VBox/Runtime/include/internal
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/include/internal/dir.h

    r28800 r28915  
    7878    /** Pointer to the converted filename.
    7979     * This can be NULL. */
    80     char               *pszName;
     80    char const         *pszName;
    8181    /** The length of the converted filename. */
    8282    size_t              cchName;
     
    131131 *                      wildcard expression.
    132132 */
    133 int rtOpenDirNative(PRTDIR pDir, char *pszPathBuf);
     133int rtDirNativeOpen(PRTDIR pDir, char *pszPathBuf);
    134134
    135135#endif
  • trunk/src/VBox/Runtime/include/internal/path.h

    r28903 r28915  
    6060 *                          Can be the same as pszPath.
    6161 * @param   pszPath         The path to convert.
     62 * @param   pszBasePath     What pszPath is relative to.  NULL if current
     63 *                          directory.
    6264 *
    6365 * @remark  This function is not available on hosts using something else than
    6466 *          byte seqences as names (eg win32).
    6567 */
    66 int rtPathToNative(char **ppszNativePath, const char *pszPath);
    67 
    68 /**
    69  * Converts a path from IPRT to native representation.
    70  *
    71  * This may involve querying filesystems what codeset they speak and so forth.
    72  *
    73  * @returns IPRT status code.
    74  * @param   ppszNativePath  Where to store the pointer to the native path.
    75  *                          Free by calling rtPathFreeHost().  NULL on failure.
    76  *                          Can be the same as pszPath.
    77  * @param   pszPath         The path to convert.
    78  * @param   pszBasePath     What pszPath is relative to. If NULL the function
    79  *                          behaves like rtPathToNative().
    80  *
    81  * @remark  This function is not available on hosts using something else than
    82  *          byte seqences as names (eg win32).
    83  */
    84 int rtPathToNativeEx(char **ppszNativePath, const char *pszPath, const char *pszBasePath);
     68int rtPathToNative(char const **ppszNativePath, const char *pszPath, const char *pszBasePath);
    8569
    8670/**
     
    9478 *          byte seqences as names (eg win32).
    9579 */
    96 void rtPathFreeNative(char *pszNativePath, const char *pszPath);
     80void rtPathFreeNative(char const *pszNativePath, const char *pszPath);
    9781
    9882/**
     
    10387 *                          Free by calling RTStrFree(). NULL on failure.
    10488 * @param   pszNativePath   The native path to convert.
     89 * @param   pszBasePath     What pszNativePath is relative to - in IPRT
     90 *                          representation.  NULL if current directory.
    10591 *
    10692 * @remark  This function is not available on hosts using something else than
    10793 *          byte seqences as names (eg win32).
    10894 */
    109 int rtPathFromNative(char **ppszPath, const char *pszNativePath);
     95int rtPathFromNative(const char **ppszPath, const char *pszNativePath, const char *pszBasePath);
    11096
    11197/**
    112  * Converts a path from the native to the IPRT representation.
     98 * Frees a path returned by rtPathFromNative or rtPathFromNativeEx.
    11399 *
    114  * @returns IPRT status code.
    115  * @param   ppszPath        Where to store the pointer to the IPRT path.
    116  *                          Free by calling RTStrFree(). NULL on failure.
    117  * @param   pszNativePath   The native path to convert.
    118  * @param   pszBasePath     What pszHostPath is relative to - in IPRT
    119  *                          representation.  If NULL the function behaves like
    120  *                          rtPathFromNative().
     100 * @param   pszPath         The returned path.
     101 * @param   pszNativePath   The original path.
     102 */
     103void rtPathFreeIprt(const char *pszPath, const char *pszNativePath);
     104
     105/**
     106 * Convert a path from the native representation to the IPRT one, using the
     107 * specified path buffer.
    121108 *
    122  * @remark  This function is not  available on hosts using something else than
    123  *          byte seqences as names (eg win32).
     109 * @returns VINF_SUCCESS, VERR_BUFFER_OVERFLOW, and recoding errors.
     110 *
     111 * @param   pszPath         The output buffer.
     112 * @param   cbPath          The size of the output buffer.
     113 * @param   pszNativePath   The path to convert.
     114 * @param   pszBasePath     What pszNativePath is relative to - in IPRT
     115 *                          representation.  NULL if current directory.
    124116 */
    125 int rtPathFromNativeEx(char **ppszPath, const char *pszNativePath, const char *pszBasePath);
     117int rtPathFromNativeCopy(char *pszPath, size_t cbPath, const char *pszNativePath, const char *pszBasePath);
    126118
    127119
Note: See TracChangeset for help on using the changeset viewer.

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