# 2.11BSD#431 - /usr/src/local/mtools/msdos.h

##### Macros

    MAX_CLUSTER       X
    MAX_DIR_SECS      X
    MAX_PATH          X
    MDIR_SIZE         X
    MSECTOR_SIZE      X
    NEW               X
    OLD               X
    strchr            X
    strrchr           X

##### struct's

    bootsector        X
    device            X
    directory         X

##### typedef's

    SIG_TYPE          X

       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

bootsector defined in line 37; used 10 times

- in /usr/src/local/mtools/init.c line 28(2), 38(2), 312-316(4)
- in /usr/src/local/mtools/mformat.c line 27(2)

device defined in line 25; used 20 times

- in /usr/src/local/mtools/devices.c line 8(2), 14(2), 26(2), 40(2), 47(2), 60(2)
- in /usr/src/local/mtools/init.c line 27(2), 39(2)
- in /usr/src/local/mtools/mformat.c line 26(2), 34(2)

directory defined in line 14; used 44 times

- in /usr/src/local/mtools/dir_read.c line 15(2), 21(2)
- in /usr/src/local/mtools/dir_write.c line 18(2), 139(2), 148(2)
- in /usr/src/local/mtools/is_dir.c line 17(2)
- in /usr/src/local/mtools/mattrib.c line 36(2)
- in /usr/src/local/mtools/mdel.c line 35(2)
- in /usr/src/local/mtools/mdir.c line 37(2)
- in /usr/src/local/mtools/mformat.c line 35(2)
- in /usr/src/local/mtools/mlabel.c line 33(2)
- in /usr/src/local/mtools/mmd.c line 38(2), 169(2)
- in /usr/src/local/mtools/mrd.c line 35(2)
- in /usr/src/local/mtools/mread.c line 51(2)
- in /usr/src/local/mtools/mren.c line 33(2)
- in /usr/src/local/mtools/mtype.c line 35(2)
- in /usr/src/local/mtools/mwrite.c line 30(2), 47(2), 241(2), 251(2)
- in /usr/src/local/mtools/subdir.c line 57(2)

#### Defined typedef's

SIG_TYPE defined in line 56; used 12 times

- in /usr/src/local/mtools/mdel.c line 37-39(3)
- in /usr/src/local/mtools/mmd.c line 41-43(3)
- in /usr/src/local/mtools/mrd.c line 37-39(3)
- in /usr/src/local/mtools/mwrite.c line 49-51(3)

#### Defined macros

MAX_CLUSTER defined in line 7; used 8 times

- in /usr/src/local/mtools/dir_make.c line 23
- in /usr/src/local/mtools/file_read.c line 22(2)
- in /usr/src/local/mtools/file_write.c line 77
- in /usr/src/local/mtools/init.c line 193-194(2)
- in /usr/src/local/mtools/mmd.c line 168
- in /usr/src/local/mtools/mrd.c line 137

MAX_DIR_SECS defined in line 9; used 5 times

- in /usr/src/local/mtools/dir_make.c line 7
- in /usr/src/local/mtools/dir_read.c line 4, 54
- in /usr/src/local/mtools/dir_write.c line 7
- in /usr/src/local/mtools/mformat.c line 17

MAX_PATH defined in line 8; used 11 times

- in /usr/src/local/mtools/dir_write.c line 66
- in /usr/src/local/mtools/init.c line 249
- in /usr/src/local/mtools/mcd.c line 28
- in /usr/src/local/mtools/mdir.c line 33
- in /usr/src/local/mtools/mread.c line 48
- in /usr/src/local/mtools/mwrite.c line 44
- in /usr/src/local/mtools/parse.c line 16, 49-51(2)
- in /usr/src/local/mtools/subdir.c line 17-18(2)

MDIR_SIZE defined in line 6; used 12 times

- in /usr/src/local/mtools/dir_read.c line 23-24(2)
- in /usr/src/local/mtools/dir_write.c line 23-24(2)
- in /usr/src/local/mtools/init.c line 182
- in /usr/src/local/mtools/mformat.c line 237
- in /usr/src/local/mtools/mmd.c line 179-184(5)
- in /usr/src/local/mtools/mrd.c line 147

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

- in /usr/src/local/mtools/init.c line 232

OLD defined in line 12; used 4 times

- in /usr/src/local/mtools/dir_read.c line 107
- in /usr/src/local/mtools/subdir.c line 27, 88, 104

strchr defined in line 59; used 3 times

- in /usr/src/local/mtools/dir_read.c line 132, 138-143(2)

strrchr defined in line 60; used 9 times

- in /usr/src/local/mtools/dir_write.c line 66, 77-79(2)
- in /usr/src/local/mtools/parse.c line 16, 25-27(2), 49, 74-78(2)

#### Usage of this include

msdos.h used 27 times

- in /usr/src/local/mtools/buf_read.c line 7
- in /usr/src/local/mtools/buf_write.c line 7
- in /usr/src/local/mtools/devices.c line 6
- in /usr/src/local/mtools/dir_make.c line 3
- in /usr/src/local/mtools/dir_read.c line 2
- in /usr/src/local/mtools/dir_write.c line 4
- in /usr/src/local/mtools/fat_free.c line 2
- in /usr/src/local/mtools/fat_read.c line 2
- in /usr/src/local/mtools/fat_write.c line 2
- in /usr/src/local/mtools/file_read.c line 2
- in /usr/src/local/mtools/file_write.c line 2
- in /usr/src/local/mtools/init.c line 11
- in /usr/src/local/mtools/is_dir.c line 7
- in /usr/src/local/mtools/mattrib.c line 12
- in /usr/src/local/mtools/mcd.c line 12
- in /usr/src/local/mtools/mdel.c line 13
- in /usr/src/local/mtools/mdir.c line 12
- in /usr/src/local/mtools/mformat.c line 13
- in /usr/src/local/mtools/mlabel.c line 13
- in /usr/src/local/mtools/mmd.c line 13
- in /usr/src/local/mtools/mrd.c line 13
- in /usr/src/local/mtools/mread.c line 22
- in /usr/src/local/mtools/mren.c line 12
- in /usr/src/local/mtools/mtype.c line 12
- in /usr/src/local/mtools/mwrite.c line 15
- in /usr/src/local/mtools/parse.c line 3
- in /usr/src/local/mtools/subdir.c line 2

Last modified: 1992-06-24 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 545 |