home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / rcs / sources / dirent.h < prev    next >
C/C++ Source or Header  |  1992-03-06  |  1KB  |  43 lines

  1. /*
  2.  *  dirent.h - POSIX directory access routines for MS-DOS and OS/2
  3.  *
  4.  *  Author: Frank Whaley (few@well.sf.ca.us)
  5.  *
  6.  *  Copyright Frank Whaley 1992.  All rights reserved.
  7.  *
  8.  *  Permission to use, copy, modify, distribute, and sell this software
  9.  *  and its documentation for any purpose is hereby granted without fee,
  10.  *  provided that the above copyright notice appears in all copies of the
  11.  *  source code.  The name of the author may not be used to endorse or
  12.  *  promote products derived from this software without specific prior
  13.  *  written permission.
  14.  *
  15.  *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  16.  *  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  17.  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  18.  *
  19.  *  Read the "CAVEATS" section in dirent.c.
  20.  */
  21.  
  22. #ifndef __DIRENT_H
  23. #define __DIRENT_H
  24.  
  25. #ifdef __OS2__
  26. #define d_MAXNAMLEN 255
  27. #else
  28. #define d_MAXNAMLEN 12
  29. #endif
  30.  
  31. typedef struct __DIRENT DIR;
  32.  
  33. struct dirent {
  34.     char d_name[d_MAXNAMLEN + 1];
  35. };
  36.  
  37. DIR *opendir(char const *__name);
  38. struct dirent *readdir(DIR *__dir);
  39. void rewinddir(DIR *__dir);
  40. int closedir(DIR *__dir);
  41.  
  42. #endif /*__DIRENT_H*/
  43.