]> git.sur5r.net Git - cc65/blob - libsrc/cbm/dir.h
Moved most of the file type detection from cbm_dir.c into a new function
[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__ _dirskip (unsigned char count, struct DIR* dir);
34 /* Skip bytes from the directory and make sure, errno is set if this isn't
35  * possible. Return true if anything is ok and false otherwise. For
36  * simplicity we assume that read will never return less than count if there
37  * is no error and end-of-file is not reached.
38  * Note: count must not be more than 254.
39  */
40
41
42
43 /* End of dir.h */
44 #endif
45
46
47