Changeset ff02bf907b6272b898612724634371bc95b8a5f1

Show
Ignore:
Timestamp:
05/24/08 09:52:00 (3 months ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1211615520 +0300
git-parent:

[96cc9c261db1c616efa2fbc0aea21bc70b1e46fc]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1211615520 +0300
Message:

seekdir, telldir: unused, remove

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • include/vlc_common.h

    r96cc9c2 rff02bf9  
    761761 VLC_EXPORT( int, vlc_wclosedir, ( void * ) ); 
    762762 VLC_INTERNAL( void, vlc_rewinddir, ( void * ) ); 
    763  VLC_INTERNAL( void, vlc_seekdir, ( void *, long ) ); 
    764  VLC_INTERNAL( long, vlc_telldir, ( void * ) ); 
    765763#   define opendir Use_utf8_opendir_or_vlc_wopendir_instead! 
    766764#   define readdir Use_utf8_readdir_or_vlc_wreaddir_instead! 
     
    770768#   define _wclosedir vlc_wclosedir 
    771769#   define rewinddir vlc_rewinddir 
    772 #   define seekdir vlc_seekdir 
    773 #   define telldir vlc_telldir 
    774770#endif 
    775771 
  • include/vlc_fixups.h

    r5f2dd73 rff02bf9  
    146146#   define closedir vlc_closedir 
    147147#   define rewinddir vlc_rewindir 
    148 #   define seekdir vlc_seekdir 
    149 #   define telldir vlc_telldir 
    150148VLC_EXPORT( void *, vlc_opendir, ( const char * ) ); 
    151149VLC_EXPORT( void *, vlc_readdir, ( void * ) ); 
    152150VLC_EXPORT( int, vlc_closedir, ( void * ) ); 
    153151VLC_INTERNAL( void, vlc_rewinddir, ( void * ) ); 
    154 VLC_INTERNAL( void, vlc_seekdir, ( void *, long ) ); 
    155 VLC_INTERNAL( long, vlc_telldir, ( void * ) ); 
    156152#endif 
    157153 
  • src/extras/dirent.c

    r6ee1e19 rff02bf9  
    343343  dirp->dd_stat = 0; 
    344344} 
    345  
    346 /* 
    347  * telldir 
    348  * 
    349  * Returns the "position" in the "directory stream" which can be used with 
    350  * seekdir to go back to an old entry. We simply return the value in stat. 
    351  */ 
    352 long 
    353 vlc_telldir (DIR * dirp) 
    354 { 
    355   errno = 0; 
    356  
    357   if (!dirp) 
    358     { 
    359       errno = EFAULT; 
    360       return -1; 
    361     } 
    362   return dirp->dd_stat; 
    363 } 
    364  
    365 /* 
    366  * seekdir 
    367  * 
    368  * Seek to an entry previously returned by telldir. We rewind the directory 
    369  * and call readdir repeatedly until either dd_stat is the position number 
    370  * or -1 (off the end). This is not perfect, in that the directory may 
    371  * have changed while we weren't looking. But that is probably the case with 
    372  * any such system. 
    373  */ 
    374 void 
    375 vlc_seekdir (DIR * dirp, long lPos) 
    376 { 
    377   errno = 0; 
    378  
    379   if (!dirp) 
    380     { 
    381       errno = EFAULT; 
    382       return; 
    383     } 
    384  
    385   if (lPos < -1) 
    386     { 
    387       /* Seeking to an invalid position. */ 
    388       errno = EINVAL; 
    389       return; 
    390     } 
    391   else if (lPos == -1) 
    392     { 
    393       /* Seek past end. */ 
    394       if (dirp->dd_handle != INVALID_HANDLE_VALUE) 
    395         { 
    396           FindClose ((HANDLE)dirp->dd_handle); 
    397         } 
    398       dirp->dd_handle = INVALID_HANDLE_VALUE; 
    399       dirp->dd_stat = -1; 
    400     } 
    401   else 
    402     { 
    403       /* Rewind and read forward to the appropriate index. */ 
    404       vlc_rewinddir (dirp); 
    405  
    406       while ((dirp->dd_stat < lPos) && vlc_readdir (dirp)) 
    407         ; 
    408     } 
    409 } 
  • src/extras/libc.c

    rab67a53 rff02bf9  
    6767#   undef _wclosedir 
    6868#   undef rewinddir 
    69 #   undef seekdir 
    70 #   undef telldir 
    7169#   define WIN32_LEAN_AND_MEAN 
    7270#   include <windows.h> 
     
    523521        _wrewinddir( p_dir->p_real_dir ); 
    524522} 
    525  
    526 void vlc_seekdir( void *_p_dir, long loc) 
    527 { 
    528     vlc_DIR *p_dir = (vlc_DIR *)_p_dir; 
    529  
    530     if ( p_dir->p_real_dir != NULL ) 
    531         _wseekdir( p_dir->p_real_dir, loc ); 
    532 } 
    533  
    534 long vlc_telldir( void *_p_dir ) 
    535 { 
    536     vlc_DIR *p_dir = (vlc_DIR *)_p_dir; 
    537  
    538     if ( p_dir->p_real_dir != NULL ) 
    539         return _wtelldir( p_dir->p_real_dir ); 
    540     return 0; 
    541 } 
    542523#endif 
    543524