w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

dirent.h
Go to the documentation of this file.
1 /*
2  * dirent.h: definitions for SVR3 directory access routines
3  */
4 
5 #ifndef _DIRENT_H
6 # define _DIRENT_H
7 
8 # include <sys/types.h>
9 # include <limits.h>
10 # include <sys/dirent.h>
11 # include <sys/proto.h>
12 # include <sys/null.h>
13 
14 /* Need size_t definition */
15 
16 # if !defined(_SIZE_T_DEFINED) && !defined(__size_t) && !defined(_SIZE_T) && !defined(_SIZE_T_DEFINED_)
17 
18 typedef unsigned int size_t;
19 
20 # define _SIZE_T_DEFINED
21 # define _SIZE_T_DEFINED_
22 # define _SIZE_T
23 # define __size_t
24 # endif
25 
26 # ifndef _BOOL_T_DEFINED
27 typedef unsigned char bool;
28 # define _BOOL_T_DEFINED
29 # endif
30 
31 # define DIRBUF 8192 /* buffer size for fs-indep. dirs */
32  /* must in general be larger than the */
33  /* filesystem buffer size */
34 
35 # if defined (MSDOS) || defined (__OS2__) || defined (__TURBOC__) || defined (WIN32) || defined (__EMX__)
36 
37 /* MSDOS versions and OS2 ?.x version */
38 
39 struct _dircontents {
40  char *_d_entry;
41  struct _dircontents *_d_next;
42 };
43 
44 typedef struct _dirdesc {
45  int dd_id; /* uniquely identify each open directory */
46  long dd_loc; /* where we are in directory entry is this */
47  struct _dircontents *dd_contents; /* pointer to contents of dir */
48  struct _dircontents *dd_cp; /* pointer to current position */
49 } DIR;
50 
51 # else
52 
53 /* UNIX versions */
54 
55 typedef struct
56 {
57  int dd_fd; /* file descriptor */
58  int dd_loc; /* offset in block */
59  int dd_size; /* amount of valid data */
60  char *dd_buf; /* -> directory block */
61 } DIR; /* stream data from opendir() */
62 
63 # endif
64 
65 /* Functions */
66 
67 extern DIR _FAR_ * _FAR_ _CDECL opendir _PROTO ((const char _FAR_ *));
68 extern struct dirent _FAR_ * _FAR_ _CDECL readdir _PROTO ((DIR _FAR_ *));
69 extern void _FAR_ _CDECL rewinddir _PROTO ((DIR _FAR_ *));
70 
71 # if !defined (MSDOS) && !defined (__OS2__) && !defined (WIN32)
72 extern int _FAR_ _CDECL getdents _PROTO ((int, char _FAR_ *,
73  unsigned int));
74 # endif
75 
76 extern int _FAR_ _CDECL closedir _PROTO ((DIR _FAR_ *));
77 extern void _FAR_ _CDECL seekdir _PROTO ((DIR _FAR_ *, off_t));
79 
80 extern int _FAR_ _CDECL chdir _PROTO ((const char _FAR_ *));
81 extern char _FAR_ * _FAR_ _CDECL getcwd _PROTO ((char _FAR_ *, size_t));
82 
83 # ifdef __TURBOC__
84 extern int _FAR_ _CDECL mkdir _PROTO ((const char _FAR_ *));
85 # elif defined (__32BIT__) && defined (__EMX__)
86 extern int _FAR_ _CDECL mkdir _PROTO ((const char _FAR_ *, long));
87 # else
88 extern int _FAR_ _CDECL mkdir _PROTO ((const char _FAR_ *, mode_t));
89 # endif
90 
91 extern int _FAR_ _CDECL rmdir _PROTO ((const char _FAR_ *));
92 extern int _FAR_ _CDECL scandir _PROTO ((char _FAR_ *,
93  struct dirent ***,
94  int (_FAR_ _CDECL *)(const void _FAR_ *, const void _FAR_ *),
95  int (_FAR_ _CDECL *)(const void _FAR_ *, const void _FAR_ *)));
96 
97 # if defined (MSDOS) || defined (__OS2__) || defined (WIN32)
98 extern int _FAR_ _CDECL _chdrive _PROTO ((int));
99 extern int _FAR_ _CDECL _getdrive _PROTO ((void));
100 extern char _FAR_ * _FAR_ _CDECL _getdcwd _PROTO ((int, char _FAR_ *, int));
101 # endif
102 
103 # if defined (OS2) || defined (__OS2__) || defined (WIN32) || defined (__EMX__)
104 extern bool IsHPFSFileSystem _PROTO ((char _FAR_ *));
105 # endif
106 #endif
#define _CDECL
Definition: DIRENT.H:11
#define _FAR_
Definition: DIRENT.H:12
#define bool
Definition: autosp.c:101
KPSEDLL int closedir(DIR *__dir)
Definition: dirent.c:123
KPSEDLL struct dirent * readdir(DIR *__dir)
Definition: dirent.c:138
KPSEDLL DIR * opendir(char *__dirname)
Definition: dirent.c:60
int scandir()
char * getcwd()
void rewinddir()
int mkdir()
int rmdir()
int chdir()
void seekdir()
int getdents()
off_t telldir()
ushort mode_t
Definition: types.h:80
long off_t
Definition: types.h:34
struct dir_struct DIR
#define size_t
Definition: glob.c:257
#define _getdrive()
Definition: mktexlib.h:47
#define _PROTO(p)
Definition: proto.h:54
#define IsHPFSFileSystem(a)
Definition: sh.h:1127
Definition: dirent.h:44
Definition: dirent.h:34