cpl/cpl_path.cpp
int CPLIsFilenameRelative( const char *pszFilename )

{
    if( (strlen(pszFilename) > 2
         && (strncmp(pszFilename+1,":\\",2) == 0
             || strncmp(pszFilename+1,":/",2) == 0))
        || pszFilename[0] == '\\'
        || pszFilename[0] == '/' )
        return FALSE;
    else
        return TRUE;
}
/**
 * Is filename relative or absolute?
 *
 * The test is filesystem convention agnostic.  That is it will test for
 * Unix style and windows style path conventions regardless of the actual
 * system in use.  
 *
 * @param pszFilename the filename with path to test.
 *
 * @return TRUE if the filename is relative or FALSE if it is absolute. 
 */


@param pszFilename the filename with path to test.

@return TRUE if the filename is relative or FALSE if it is absolute.
@param pszFilename the filename with path to test . @return TRUE if the filename is relative or FALSE if it is absolute .
int CPLIsFilenameRelative( const char *pszFilename )
{
    if( (strlen(pszFilename) > 2
         && (strncmp(pszFilename+1,":\\",2) == 0
             || strncmp(pszFilename+1,":/",2) == 0))
        || pszFilename[0] == '\\'
        || pszFilename[0] == '/' )
        return FALSE;
    else
        return TRUE;
}
int CPLIsFilenameRelative ( const char * pszFilename ) { if ( ( strlen ( pszFilename ) > 2 && ( strncmp ( pszFilename + 1 , " \\ " , 2 ) == 0 || strncmp ( pszFilename + 1 , " " , 2 ) == 0 ) ) || pszFilename [ 0 ] == ' \\ ' || pszFilename [ 0 ] == ' ' ) return FALSE ; else return TRUE ; }
Is filename relative or absolute?
Is filename relative or absolute?