Changeset 83a754136e96b512efa13fd5a6d4dbc4464b8d70

Show
Ignore:
Timestamp:
12/11/06 17:25:29 (2 years ago)
Author:
Derk-Jan Hartman <hartman@videolan.org>
git-committer:
Derk-Jan Hartman <hartman@videolan.org> 1165854329 +0000
git-parent:

[d59f9b354c873e267857dc53dd737cf08dc9eacb]

git-author:
Derk-Jan Hartman <hartman@videolan.org> 1165854329 +0000
Message:

* Fix utf8_scandir (wasn't using vlc_closedir_wrapper)
* Add some doxygen comments to some of these functions that warn about vlc_closedir_wrapper and LocaleFree?

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/text/unicode.c

    rd3fe7f2 r83a7541  
    372372/** 
    373373 * utf8_mkdir: Calls mkdir() after conversion of file name to OS locale 
     374 * 
     375 * @param dirname a UTF-8 string with the name of the directory that you 
     376 *        want to create. 
     377 * @return A 0 return value indicates success. A -1 return value indicates an 
     378 *        error, and an error code is stored in errno 
    374379 */ 
    375380int utf8_mkdir( const char *dirname ) 
     
    427432} 
    428433 
    429  
     434/** 
     435 * utf8_opendir: wrapper that converts dirname to the locale in use by the OS 
     436 * 
     437 * @param dirname UTF-8 representation of the directory name 
     438 * 
     439 * @return a pointer to the DIR struct. Use vlc_closedir_wrapper() once you are done. 
    430440DIR *utf8_opendir( const char *dirname ) 
    431441{ 
     
    453463} 
    454464 
    455  
     465/** 
     466 * utf8_readdir: a readdir wrapper that returns the name of the next entry 
     467 *     in the directory as a UTF-8 string. 
     468 * 
     469 * @param dir The directory that is being read 
     470 * 
     471 * @return a UTF-8 string of the directory entry. Use LocaleFree() to free this memory 
     472 */ 
    456473char *utf8_readdir( DIR *dir ) 
    457474{ 
     
    515532            tab[num++] = entry; 
    516533        } 
    517         closedir( dir ); 
     534        vlc_closedir_wrapper( dir ); 
    518535 
    519536        if( compar != NULL )