msdos.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  directory
struct  InfoSector_t
struct  label_blk_t
struct  fat32_t
struct  oldboot_t
struct  bootsector
struct  OldDos_t

Defines

#define MAX_SECTOR   8192
#define MDIR_SIZE   32
#define MAX_CLUSTER   8192
#define MAX_PATH   128
#define MAX_DIR_SECS   64
#define MSECTOR_SIZE   msector_size
#define NEW   1
#define OLD   0
#define _WORD(x)   ((unsigned char)(x)[0] + (((unsigned char)(x)[1]) << 8))
#define _DWORD(x)   (_WORD(x) + (_WORD((x)+2) << 16))
#define DELMARK   ((char) 0xe5)
#define EXTCASE   0x10
#define BASECASE   0x8
#define MAX32   0xffffffff
#define MAX_SIZE   0x7fffffff
#define FILE_SIZE(dir)   (_DWORD((dir)->size))
#define START(dir)   (_WORD((dir)->start))
#define STARTHI(dir)   (_WORD((dir)->startHi))
#define DOS_YEAR(dir)   (((dir)->date[1] >> 1) + 1980)
#define DOS_MONTH(dir)   (((((dir)->date[1]&0x1) << 3) + ((dir)->date[0] >> 5)))
#define DOS_DAY(dir)   ((dir)->date[0] & 0x1f)
#define DOS_HOUR(dir)   ((dir)->time[1] >> 3)
#define DOS_MINUTE(dir)   (((((dir)->time[1]&0x7) << 3) + ((dir)->time[0] >> 5)))
#define DOS_SEC(dir)   (((dir)->time[0] & 0x1f) * 2)
#define INFOSECT_SIGNATURE1   0x41615252
#define INFOSECT_SIGNATURE2   0x61417272
#define CHAR(x)   (boot->x[0])
#define WORD(x)   (_WORD(boot->x))
#define DWORD(x)   (_DWORD(boot->x))
#define OFFSET(x)   (((char *) (boot->x)) - ((char *)(boot->jump)))
#define FAT12   4085
#define FAT16   65525
#define ATTR_ARCHIVE   0x20
#define ATTR_DIR   0x10
#define ATTR_LABEL   0x8
#define ATTR_SYSTEM   0x4
#define ATTR_HIDDEN   0x2
#define ATTR_READONLY   0x1
#define HAS_BIT(entry, x)   ((entry)->dir.attr & (x))
#define IS_ARCHIVE(entry)   (HAS_BIT((entry),ATTR_ARCHIVE))
#define IS_DIR(entry)   (HAS_BIT((entry),ATTR_DIR))
#define IS_LABEL(entry)   (HAS_BIT((entry),ATTR_LABEL))
#define IS_SYSTEM(entry)   (HAS_BIT((entry),ATTR_SYSTEM))
#define IS_HIDDEN(entry)   (HAS_BIT((entry),ATTR_HIDDEN))
#define IS_READONLY(entry)   (HAS_BIT((entry),ATTR_READONLY))
#define MAX_SECT_PER_CLUSTER   64
#define FAT_SIZE(bits, sec_siz, clusters)   ((((clusters)+2) * ((bits)/4) - 1) / 2 / (sec_siz) + 1)
#define NEEDED_FAT_SIZE(x)
#define DISK_SIZE(bits, sec_siz, clusters, n, cluster_size)
#define TOTAL_DISK_SIZE(bits, sec_siz, clusters, n, cluster_size)   (DISK_SIZE(bits, sec_siz, clusters, n, cluster_size) + 2)
#define MT_READ   1
#define MT_WRITE   2

Typedefs

typedef fat32_t fat32

Functions

 UNUSED (static inline void set_dword(unsigned char *data, unsigned long value))
 UNUSED (static inline void set_word(unsigned char *data, unsigned short value))
int init (char drive, int mode)

Variables

OldDos_t old_dos []
const char * mversion
const char * mdate
char * Version
char * Date


Define Documentation

#define _DWORD x   )     (_WORD(x) + (_WORD((x)+2) << 16))
 

Definition at line 19 of file msdos.h.

Referenced by displayInfosector(), fat32_decode(), fat_32_read(), fs_init(), and minfo().

#define _WORD x   )     ((unsigned char)(x)[0] + (((unsigned char)(x)[1]) << 8))
 

Definition at line 18 of file msdos.h.

Referenced by fat16_decode(), mlabel(), and SimpleFileOpen().

#define ATTR_ARCHIVE   0x20
 

Definition at line 186 of file msdos.h.

Referenced by dos_write(), and letterToCode().

#define ATTR_DIR   0x10
 

Definition at line 187 of file msdos.h.

Referenced by checkNameForMatch(), createDirCallback(), get_file_data(), makeit(), and OpenRoot().

#define ATTR_HIDDEN   0x2
 

Definition at line 190 of file msdos.h.

Referenced by letterToCode().

#define ATTR_LABEL   0x8
 

Definition at line 188 of file msdos.h.

Referenced by checkNameForMatch().

#define ATTR_READONLY   0x1
 

Definition at line 191 of file msdos.h.

Referenced by del_entry(), and letterToCode().

#define ATTR_SYSTEM   0x4
 

Definition at line 189 of file msdos.h.

Referenced by del_entry(), and letterToCode().

#define BASECASE   0x8
 

Definition at line 40 of file msdos.h.

Referenced by dos_name(), list_file(), unix_name(), and write_slots().

#define CHAR x   )     (boot->x[0])
 

Definition at line 165 of file msdos.h.

Referenced by add_history(), argify(), bk_word(), c_complete(), c_possible(), ceol(), columns(), delete_string(), do_case(), do_forward(), do_hist(), do_macro(), editinput(), find_word(), h_search(), hist_add(), insert_char(), insert_string(), last_argument(), move_to_char(), readline(), redisplay(), reposition(), save_yank(), search_hist(), transpose(), and TTYget().

#define DELMARK   ((char) 0xe5)
 

Definition at line 21 of file msdos.h.

Referenced by clear_vses(), del_entry(), del_file(), dir_write(), get_slots(), mlabel(), renameit(), and vfat_lookup_loop_common().

#define DISK_SIZE bits,
sec_siz,
clusters,
n,
cluster_size   ) 
 

Value:

((n) * FAT_SIZE(bits, sec_siz, clusters) + \
         (clusters) * (cluster_size))

Definition at line 216 of file msdos.h.

Referenced by comp_fat_bits().

#define DOS_DAY dir   )     ((dir)->date[0] & 0x1f)
 

Definition at line 76 of file msdos.h.

Referenced by conv_stamp(), and print_date().

#define DOS_HOUR dir   )     ((dir)->time[1] >> 3)
 

Definition at line 85 of file msdos.h.

Referenced by conv_stamp(), and print_time().

#define DOS_MINUTE dir   )     (((((dir)->time[1]&0x7) << 3) + ((dir)->time[0] >> 5)))
 

Definition at line 86 of file msdos.h.

Referenced by conv_stamp(), and print_time().

#define DOS_MONTH dir   )     (((((dir)->date[1]&0x1) << 3) + ((dir)->date[0] >> 5)))
 

Definition at line 75 of file msdos.h.

Referenced by conv_stamp(), and print_date().

#define DOS_SEC dir   )     (((dir)->time[0] & 0x1f) * 2)
 

Definition at line 87 of file msdos.h.

Referenced by conv_stamp().

#define DOS_YEAR dir   )     (((dir)->date[1] >> 1) + 1980)
 

Definition at line 74 of file msdos.h.

Referenced by conv_stamp(), and print_date().

#define DWORD x   )     (_DWORD(boot->x))
 

Definition at line 167 of file msdos.h.

Referenced by calc_fs_parameters_32(), fat_32_read(), file_geom(), fs_init(), GetMsecSincePerfCounter(), init_geometry_boot(), main(), minfo(), win32_open_file_func(), win32_read_file_func(), win32_seek_file_func(), win32_tell_file_func(), and win32_write_file_func().

#define EXTCASE   0x10
 

Definition at line 39 of file msdos.h.

Referenced by dos_name(), list_file(), unix_name(), and write_slots().

#define FAT12   4085
 

Definition at line 183 of file msdos.h.

Referenced by calc_cluster_size(), calc_fat_bits2(), calc_fat_size(), comp_fat_bits(), old_fat_read(), and xdf_calc_fat_size().

#define FAT16   65525
 

Definition at line 184 of file msdos.h.

Referenced by calc_cluster_size(), and comp_fat_bits().

#define FAT_SIZE bits,
sec_siz,
clusters   )     ((((clusters)+2) * ((bits)/4) - 1) / 2 / (sec_siz) + 1)
 

Definition at line 209 of file msdos.h.

Referenced by calc_cluster_size().

#define FILE_SIZE dir   )     (_DWORD((dir)->size))
 

Definition at line 45 of file msdos.h.

Referenced by list_file(), and OpenFileByDirentry().

#define HAS_BIT entry,
x   )     ((entry)->dir.attr & (x))
 

Definition at line 193 of file msdos.h.

#define INFOSECT_SIGNATURE1   0x41615252
 

Definition at line 100 of file msdos.h.

Referenced by fat_32_read().

#define INFOSECT_SIGNATURE2   0x61417272
 

Definition at line 101 of file msdos.h.

Referenced by fat_32_read().

#define IS_ARCHIVE entry   )     (HAS_BIT((entry),ATTR_ARCHIVE))
 

Definition at line 195 of file msdos.h.

Referenced by concise_view_attrib(), replay_attrib(), and view_attrib().

#define IS_DIR entry   )     (HAS_BIT((entry),ATTR_DIR))
 

Definition at line 196 of file msdos.h.

Referenced by _dos_loop(), _internalFileOpen(), checkNameForMatch(), concise_view_attrib(), del_file(), get_slots(), handle_leaf(), list_dir(), list_file(), OpenFileByDirentry(), recurse_dir(), renameit(), and replay_attrib().

#define IS_HIDDEN entry   )     (HAS_BIT((entry),ATTR_HIDDEN))
 

Definition at line 199 of file msdos.h.

Referenced by concise_view_attrib(), replay_attrib(), and view_attrib().

#define IS_LABEL entry   )     (HAS_BIT((entry),ATTR_LABEL))
 

Definition at line 197 of file msdos.h.

#define IS_READONLY entry   )     (HAS_BIT((entry),ATTR_READONLY))
 

Definition at line 200 of file msdos.h.

Referenced by concise_view_attrib(), and view_attrib().

#define IS_SYSTEM entry   )     (HAS_BIT((entry),ATTR_SYSTEM))
 

Definition at line 198 of file msdos.h.

Referenced by concise_view_attrib(), replay_attrib(), and view_attrib().

#define MAX32   0xffffffff
 

Definition at line 42 of file msdos.h.

Referenced by displayInfosector(), fat_32_read(), fat_read(), fatAllocate(), fatAppend(), fatDeallocate(), fatEncode(), get_next_free_cluster(), getfree(), getfreeMinClusters(), minfo(), and old_fat_read().

#define MAX_CLUSTER   8192
 

Definition at line 10 of file msdos.h.

#define MAX_DIR_SECS   64
 

Definition at line 12 of file msdos.h.

#define MAX_PATH   128
 

Definition at line 11 of file msdos.h.

Referenced by copy(), copydir(), fix_mcwd(), maketarget(), process(), and stat_all().

#define MAX_SECT_PER_CLUSTER   64
 

Definition at line 203 of file msdos.h.

Referenced by calc_fat_bits2().

#define MAX_SECTOR   8192
 

Definition at line 8 of file msdos.h.

Referenced by fs_init(), and mformat().

#define MAX_SIZE   0x7fffffff
 

Definition at line 43 of file msdos.h.

#define MDIR_SIZE   32
 

Definition at line 9 of file msdos.h.

Referenced by bufferize(), dir_grow(), dir_read(), fs_init(), and low_level_dir_write().

#define MSECTOR_SIZE   msector_size
 

Definition at line 13 of file msdos.h.

#define MT_READ   1
 

Definition at line 233 of file msdos.h.

Referenced by normal_map(), and read_file().

#define MT_WRITE   2
 

Definition at line 234 of file msdos.h.

Referenced by normal_map(), and write_file().

#define NEEDED_FAT_SIZE x   ) 
 

Value:

FAT_SIZE((x)->fat_bits, (x)->sector_size, \
                                    (x)->num_clus)

Definition at line 212 of file msdos.h.

Referenced by calc_fat_size(), check_fat(), and xdf_calc_fat_size().

#define NEW   1
 

Definition at line 15 of file msdos.h.

#define OFFSET x   )     (((char *) (boot->x)) - ((char *)(boot->jump)))
 

Definition at line 168 of file msdos.h.

#define OLD   0
 

Definition at line 16 of file msdos.h.

Referenced by main(), and parsetime().

#define START dir   )     (_WORD((dir)->start))
 

Definition at line 46 of file msdos.h.

#define STARTHI dir   )     (_WORD((dir)->startHi))
 

Definition at line 47 of file msdos.h.

Referenced by fatFreeWithDir(), and getStart().

#define TOTAL_DISK_SIZE bits,
sec_siz,
clusters,
n,
cluster_size   )     (DISK_SIZE(bits, sec_siz, clusters, n, cluster_size) + 2)
 

Definition at line 220 of file msdos.h.

#define WORD x   )     (_WORD(boot->x))
 

Definition at line 166 of file msdos.h.


Typedef Documentation

typedef struct fat32_t fat32
 


Function Documentation

int init char  drive,
int  mode
 

UNUSED static inline void   set_word(unsigned char *data, unsigned short value)  ) 
 

Definition at line 60 of file msdos.h.

UNUSED static inline void   set_dword(unsigned char *data, unsigned long value)  ) 
 

Definition at line 50 of file msdos.h.


Variable Documentation

char* Date
 

const char* mdate
 

Definition at line 2 of file patchlevel.c.

Referenced by main(), mbadblocks(), mcd(), and usage().

const char* mversion
 

Definition at line 1 of file patchlevel.c.

Referenced by main(), mbadblocks(), mcd(), and usage().

struct OldDos_t old_dos[]
 

char* Version
 

Definition at line 134 of file dhrystone.c.


Generated on Fri Apr 14 23:04:22 2006 for minix by  doxygen 1.4.6