File: dirent.h

package info (click to toggle)
cvs 1.10.7-1.99.slink.y2k.1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 8,892 kB
  • ctags: 5,463
  • sloc: ansic: 68,307; sh: 17,664; makefile: 1,640; perl: 902; yacc: 826; csh: 181; lisp: 7
file content (50 lines) | stat: -rw-r--r-- 1,465 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
 *              Author:     Bob Withers
 *              Copyright (c) 1993, All Rights Reserved
 *
 *                              NOTICE
 *
 * Permission to use, copy, modify, and distribute this software and
 * its documentation for any purpose and without fee is hereby granted
 * provided that the above copyright notice appears in all copies and
 * that both the copyright notice and this permission notice appear in
 * supporting documentation.
 *
 * The author makes no representations about the suitability of this
 * software for any purpose.  This software is provided ``as is''
 * without express or implied warranty.
 */

#ifndef DIRENT_H
#define DIRENT_H

/*  Unix style directory(3C) support for OS/2 V2.x                      */

struct dirent
{
    long            d_ino;      /* not used in this implementation      */
    long            d_off;      /* not used in this implementation      */
    unsigned short  d_namlen;
    char            d_name[1];
};


struct S_Dir
{
    char           *dirname;
    int             max_ent;
    int             tot_ent;
    int             cur_ent;
    struct dirent **entp;
};
typedef struct S_Dir            DIR;


DIR *               opendir(char *filename);
struct dirent *     readdir(DIR *dirp);
long                telldir(DIR *dirp);
void                seekdir(DIR *dirp, long loc);
void                rewinddir(DIR *dirp);
void                closedir(DIR *dirp);

#endif      /* DIRENT_H */