Changeset 83a754136e96b512efa13fd5a6d4dbc4464b8d70
- 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
| rd3fe7f2 |
r83a7541 |
|
| 372 | 372 | /** |
|---|
| 373 | 373 | * 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 |
|---|
| 374 | 379 | */ |
|---|
| 375 | 380 | int utf8_mkdir( const char *dirname ) |
|---|
| … | … | |
| 427 | 432 | } |
|---|
| 428 | 433 | |
|---|
| 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. |
|---|
| 430 | 440 | DIR *utf8_opendir( const char *dirname ) |
|---|
| 431 | 441 | { |
|---|
| … | … | |
| 453 | 463 | } |
|---|
| 454 | 464 | |
|---|
| 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 | */ |
|---|
| 456 | 473 | char *utf8_readdir( DIR *dir ) |
|---|
| 457 | 474 | { |
|---|
| … | … | |
| 515 | 532 | tab[num++] = entry; |
|---|
| 516 | 533 | } |
|---|
| 517 | | closedir( dir ); |
|---|
| | 534 | vlc_closedir_wrapper( dir ); |
|---|
| 518 | 535 | |
|---|
| 519 | 536 | if( compar != NULL ) |
|---|