home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / streamva.zip / dirent.h < prev   
Text File  |  2002-07-15  |  2KB  |  78 lines

  1. #if (defined(__IBMC__) || defined(__IBMCPP__))
  2. #pragma info( none )
  3. #ifndef __CHKHDR__
  4.    #pragma info( none )
  5. #endif
  6. #pragma info( restore )
  7. #endif
  8.  
  9. #ifndef __dirent_h
  10.    #define __dirent_h
  11.  
  12.    #ifdef __cplusplus
  13.       extern "C" {
  14.    #endif
  15.  
  16.    #ifndef  _LNK_CONV
  17.       #ifdef _M_I386
  18.          #define _LNK_CONV   _Optlink
  19.       #else
  20.          #define _LNK_CONV
  21.       #endif
  22.    #endif
  23.  
  24.    #ifndef _IMPORT
  25.       #ifdef __IMPORTLIB__
  26.          #define _IMPORT _Import
  27.       #else
  28.          #define _IMPORT
  29.       #endif
  30.    #endif
  31.  
  32.    /********************************************************************/
  33.    /*  <dirent.h> header file                                          */
  34.    /*                                                                  */
  35.    /*                                                                  */
  36.    /********************************************************************/
  37.  
  38.     /* dirent structure returned by readdir().
  39.      */
  40.     struct dirent
  41.     {
  42.         char    d_name[256];
  43.     };
  44.  
  45.     /* DIR type returned by opendir().  The members of this structure
  46.      * must not be accessed by application programs.
  47.      */
  48.     typedef struct
  49.     {
  50.         unsigned long _d_hdir;              /* directory handle */
  51.         char         *_d_dirname;           /* directory name */
  52.         unsigned      _d_magic;             /* magic cookie for verifying handle */
  53.         unsigned      _d_nfiles;            /* no. of files remaining in buf */
  54.         char         *_d_bufp;              /* next entry in buffer */
  55.         char          _d_buf[512];          /* buffer for found filenames */
  56.     } DIR;
  57.  
  58.     /* Prototypes.
  59.      */
  60.     DIR           * _IMPORT _LNK_CONV opendir  (const char *);
  61.     struct dirent * _IMPORT _LNK_CONV readdir  (DIR *);
  62.     int             _IMPORT _LNK_CONV closedir (DIR *);
  63.     void            _IMPORT _LNK_CONV rewinddir(DIR *);
  64.  
  65.    #ifdef __cplusplus
  66.       }
  67.    #endif
  68.  
  69. #endif
  70.  
  71. #if (defined(__IBMC__) || defined(__IBMCPP__))
  72. #pragma info( none )
  73. #ifndef __CHKHDR__
  74.    #pragma info( restore )
  75. #endif
  76. #pragma info( restore )
  77. #endif
  78.