1: /*
2: * msdos common header file
3: */
4:
5: #define MSECTOR_SIZE 512 /* MSDOS sector size in bytes */
6: #define MDIR_SIZE 32 /* MSDOS directory size in bytes */
7: #define MAX_CLUSTER 8192 /* largest cluster size */
8: #define MAX_PATH 128 /* largest MSDOS path length */
9: #define MAX_DIR_SECS 64 /* largest directory (in sectors) */
10:
11: #define NEW 1
12: #define OLD 0
13:
14: struct directory {
15: unsigned char name[8]; /* file name */
16: unsigned char ext[3]; /* file extension */
17: unsigned char attr; /* attribute byte */
18: unsigned char reserved[10]; /* ?? */
19: unsigned char time[2]; /* time stamp */
20: unsigned char date[2]; /* date stamp */
21: unsigned char start[2]; /* starting cluster number */
22: unsigned char size[4]; /* size of the file */
23: };
24:
25: struct device {
26: char drive; /* the drive letter */
27: char *name; /* full path to device */
28: long offset; /* skip this many bytes */
29: int fat_bits; /* FAT encoding scheme */
30: int mode; /* any special open() flags */
31: int (*gioctl) (); /* gioctl() function if needed */
32: int tracks; /* tracks */
33: int heads; /* heads */
34: int sectors; /* sectors */
35: };
36:
37: struct bootsector {
38: unsigned char jump[3]; /* Jump to boot code */
39: unsigned char banner[8]; /* OEM name & version */
40: unsigned char secsiz[2]; /* Bytes per sector hopefully 512 */
41: unsigned char clsiz; /* Cluster size in sectors */
42: unsigned char nrsvsect[2]; /* Number of reserved (boot) sectors */
43: unsigned char nfat; /* Number of FAT tables hopefully 2 */
44: unsigned char dirents[2]; /* Number of directory slots */
45: unsigned char psect[2]; /* Total sectors on disk */
46: unsigned char descr; /* Media descriptor=first byte of FAT */
47: unsigned char fatlen[2]; /* Sectors in FAT */
48: unsigned char nsect[2]; /* Sectors/track */
49: unsigned char nheads[2]; /* Heads */
50: unsigned char nhs[4]; /* number of hidden sectors */
51: unsigned char bigsect[4]; /* big total sectors */
52: unsigned char junk[476]; /* who cares? */
53: };
54:
55: /* typedef void SIG_TYPE; */
56: typedef int SIG_TYPE;
57:
58: #ifdef BSD
59: #define strchr index
60: #define strrchr rindex
61: #endif /* BSD */
Defined struct's
device
defined in line
25; used 20 times
Defined typedef's
Defined macros
MSECTOR_SIZE
defined in line
5; used 66 times
- in /usr/src/local/mtools/buf_read.c line
32,
45,
54-55(2),
69-71(3)
- in /usr/src/local/mtools/buf_write.c line
30,
43,
60-61(2),
76-78(3),
99,
105
- in /usr/src/local/mtools/dir_make.c line
48,
63-69(3)
- in /usr/src/local/mtools/dir_read.c line
74,
81-82(2),
110-115(2)
- in /usr/src/local/mtools/dir_write.c line
46-47(2)
- in /usr/src/local/mtools/fat_read.c line
37,
63,
83
- in /usr/src/local/mtools/fat_write.c line
33,
55,
80
- in /usr/src/local/mtools/file_read.c line
26
- in /usr/src/local/mtools/file_write.c line
81
- in /usr/src/local/mtools/init.c line
92-93(3),
182,
193-199(3),
219,
321(2)
- in /usr/src/local/mtools/mdir.c line
79,
197
- in /usr/src/local/mtools/mformat.c line
33,
121(2),
190,
215-232(8),
239-242(3)
- in /usr/src/local/mtools/mmd.c line
175
- in /usr/src/local/mtools/mrd.c line
143-147(2)
- in /usr/src/local/mtools/mwrite.c line
351
NEW
defined in line
11; used 1 times
OLD
defined in line
12; used 4 times
Usage of this include