]> git.sur5r.net Git - cc65/blob - libsrc/cbm/dir.h
Fix ftell() on Apple II to return the correct value.
[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 #include <dirent.h>
14
15
16
17 /*****************************************************************************/
18 /*                                   Data                                    */
19 /*****************************************************************************/
20
21
22
23 struct DIR {
24     int         fd;             /* File descriptor for directory */
25     unsigned    off;            /* Current byte offset in directory */
26     char        name[16+1];     /* Name passed to opendir */
27 };
28
29
30
31 /*****************************************************************************/
32 /*                                   Code                                    */
33 /*****************************************************************************/
34
35
36
37 unsigned char __fastcall__ _dirread (DIR* dir, void* buf, unsigned char count);
38 /* Read characters from the directory into the supplied buffer. Makes sure,
39 ** errno is set in case of a short read. Return true if the read was
40 ** successful and false otherwise.
41 */
42
43 unsigned char __fastcall__ _dirread1 (DIR* dir, void* buf);
44 /* Read one byte from the directory into the supplied buffer. Makes sure,
45 ** errno is set in case of a short read. Return true if the read was
46 ** successful and false otherwise.
47 */
48
49
50
51 /* End of dir.h */
52 #endif
53
54
55