]> git.sur5r.net Git - cc65/blob - libsrc/cbm/dir.h
c7c9ae21beaae16b90d26451463b722b6faf05e6
[cc65] / libsrc / cbm / dir.h
1 /*
2  * Internal include file, do not use directly.
3  * Written by Ullrich von Bassewitz. Based on code by Groepaz.
4  */
5
6
7
8 #ifndef _DIR_H
9 #define _DIR_H
10
11
12
13 /*****************************************************************************/
14 /*                                   Data                                    */
15 /*****************************************************************************/
16
17
18
19 struct DIR {
20     int         fd;             /* File descriptor for directory */
21     unsigned    off;            /* Current byte offset in directory */
22     char        name[16+1];     /* Name passed to opendir */
23 };
24
25
26
27 /*****************************************************************************/
28 /*                                   Code                                    */
29 /*****************************************************************************/
30
31
32
33 unsigned char __fastcall__ _dirread (DIR* dir, void* buf, unsigned char count);
34 /* Read characters from the directory into the supplied buffer. Makes sure,
35  * errno is set in case of a short read. Return true if the read was
36  * successful and false otherwise.
37  */
38
39 unsigned char __fastcall__ _dirread1 (DIR* dir, void* buf);
40 /* Read one byte from the directory into the supplied buffer. Makes sure,
41  * errno is set in case of a short read. Return true if the read was
42  * successful and false otherwise.
43  */
44
45
46
47 /* End of dir.h */
48 #endif
49
50
51