(U+6215): Apply new conventions for glyph granularity.
[chise/xemacs-chise.git.1] / src / ndir.h
1 /* This file is part of XEmacs.
2
3 XEmacs is free software; you can redistribute it and/or modify it
4 under the terms of the GNU General Public License as published by the
5 Free Software Foundation; either version 2, or (at your option) any
6 later version.
7
8 XEmacs is distributed in the hope that it will be useful, but WITHOUT
9 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
11 for more details.
12
13 You should have received a copy of the GNU General Public License
14 along with XEmacs; see the file COPYING.  If not, write to
15 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16 Boston, MA 02111-1307, USA.  */
17
18 /* Synched up with: FSF 19.30. */
19
20 /*
21         <dir.h> -- definitions for 4.2BSD-compatible directory access
22
23         last edit:      09-Jul-1983     D A Gwyn
24 */
25
26 #ifndef INCLUDED_ndir_h_
27 #define INCLUDED_ndir_h_
28
29 #define DIRBLKSIZ       512             /* size of directory block */
30 #ifdef WIN32_NATIVE
31 #define MAXNAMLEN       255
32 #else  /* not WIN32_NATIVE */
33 #define MAXNAMLEN       15              /* maximum filename length */
34 #endif /* not WIN32_NATIVE */
35         /* NOTE:  MAXNAMLEN must be one less than a multiple of 4 */
36
37 struct direct                           /* data from readdir() */
38 {
39   long                  d_ino;          /* inode number of entry */
40   unsigned short        d_reclen;       /* length of this record */
41   unsigned short        d_namlen;       /* length of string in d_name */
42   char                  d_name[MAXNAMLEN+1];    /* name of file */
43 };
44
45 typedef struct
46 {
47   int   dd_fd;                  /* file descriptor */
48   int   dd_loc;                 /* offset in block */
49   int   dd_size;                /* amount of valid data */
50   char  dd_buf[DIRBLKSIZ];      /* directory block */
51 }       DIR;                    /* stream data from opendir() */
52
53 DIR *opendir (const char *filename);
54 int closedir (DIR *dirp);
55 struct direct *readdir (DIR *dirp);
56 struct direct *readdirver (DIR *dirp);
57 long telldir (DIR *dirp);
58 void seekdir (DIR *dirp, long loc);
59
60 #define rewinddir( dirp )       seekdir( dirp, 0L )
61
62 #endif /* INCLUDED_ndir_h_ */