air

CODE

/* FILE: AIR.H */ /* Handy constants */ #define YES 1 #define NO 0 /* Type definitions */ typedef char BOOLE ; typedef unsigned short TIMEBT[3] ; /* compressed time */ typedef char TIMECT[24] ; /* yyyy-mmm-dd hh:mm:ss.sss */ /****NOT a C string*****/ /* ADB data structure definition */ typedef short ADB ; typedef struct adb_cntrl_block { FILE *file_id ; unsigned char *set_name ; BOOLE output ; } ADB_CNTRL_BLOCK ; typedef struct adb_fixed_point_number { unsigned short fraction_part ; short integer_part ; } ADB_FIXED_POINT_NUMBER ; typedef struct dir_entry { short tag_number ; unsigned short data_offset ; unsigned short byte_count ; unsigned char num_of_elements ; unsigned char element_size ; } DIR_ENTRY ; typedef struct ins_block { unsigned char bcd_pairs[3] ; unsigned char label ; } INS_BLOCK ; typedef struct time_block { short low_milliseconds ; short high_milliseconds ; unsigned short date_in_compressed_form ; } TIME_BLOCK ; #define ADB_CB_SIZE sizeof(ADB_CNTRL_BLOCK) #define ADB_DISK_BLOCK_SIZE 512 #define ADB_MAX_SIZE 10*ADB_DISK_BLOCK_SIZE/sizeof(ADB) #define ENTRY_SIZE sizeof(DIR_ENTRY) #define HIGH_NIBBLE 0360 #define INS_SIGN_MASK 014 #define LOW_NIBBLE 017 #define MARKER_SIZE 8 #define MAX_ADB_OFFSET 10*ADB_DISK_BLOCK_SIZE-1 #define MAX_NUM_OF_ELEMENTS 254 #define MAX_SIZE_OF_ELEMENT 254 #define NIBBLE_SIZE 4 #define OVERFLOW 255 #define TIME_SIZE 6 /* Pre-defined tag numbers #define EXTEND_DIR_TAG -32768 #define LAST_TAG -1 #define NULL_TAG 0 #define TIME_TAG 1 /* end of ADB structure */