wilde@146: #ifndef PORTPATH_H wilde@146: #define PORTPATH_H wilde@146: wilde@146: /** wilde@146: * @file portpath.h wilde@146: * @brief Platform independent functions for file and path handling. wilde@146: * @details portpath contains functions to handle file and path names wilde@146: * in a platform independent way. The code unsing this functions wilde@146: * should be protable between GNU/Linux and Windows32 systems. wilde@146: */ wilde@146: wilde@146: /** wilde@146: * @brief portable version of dirname wilde@146: * @details return the directory component of the given path. wilde@146: * The argument path may be altered by the function. wilde@146: * @param[inout] path the pathname wilde@146: * @returns a pointer to the string containing the directory component wilde@146: */ wilde@146: char *port_dirname(char *path); wilde@146: wilde@146: wilde@146: /** wilde@146: * @brief portable version of dirname wilde@146: * @details return the directory component of the given path. wilde@146: * The argument path may be altered by the function. wilde@146: * @param[inout] path the pathname wilde@146: * @returns a pointer to the string containing the directory component wilde@146: */ wilde@146: char *port_dirname(char *path); wilde@146: wilde@146: /** wilde@146: * @brief portable version of realpath wilde@146: * @details return the expanded absolute pathname for the given path. wilde@146: * The buffer for the resolved path is allocated by this function and wilde@146: * should be freed by the caller. wilde@146: * @param[in] path the original pathname wilde@146: * @returns a pointer to the resolved path or NULL on error wilde@146: */ wilde@146: char *port_realpath(char *path); wilde@146: wilde@146: #endif