00001 #ifndef keydef_h 00002 #define keydef_h 00003 00004 #define KEY_M_DUPKEYS 0x1 00005 #define KEY_M_CHGKEYS 0x2 00006 #define KEY_M_NULKEYS 0x4 00007 #define KEY_M_IDX_COMPR 0x8 00008 #define KEY_M_INITIDX 0x10 00009 #define KEY_M_KEY_COMPR 0x40 00010 #define KEY_M_REC_COMPR 0x80 00011 #define KEY_C_MAX_DAT 10 00012 00013 #define KEY_C_MAX_PRIMARY 6 00014 00015 #define KEY_C_MAX_INDEX 6 00016 00017 #define KEY_C_STRING 0 00018 #define KEY_C_SGNWORD 1 00019 #define KEY_C_UNSGNWORD 2 00020 #define KEY_C_SGNLONG 3 00021 #define KEY_C_UNSGNLONG 4 00022 #define KEY_C_PACKED 5 00023 #define KEY_C_SGNQUAD 6 00024 #define KEY_C_UNSGNQUAD 7 00025 #define KEY_C_COLLATED 8 00026 #define KEY_C_MAX_ASCEND 8 00027 #define KEY_C_DSTRING 32 00028 #define KEY_C_DSGNWORD 33 00029 #define KEY_C_DUNSGNWORD 34 00030 #define KEY_C_DSGNLONG 35 00031 #define KEY_C_DUNSGNLONG 36 00032 #define KEY_C_DPACKED 37 00033 #define KEY_C_DSGNQUAD 38 00034 #define KEY_C_DUNSGNQUAD 39 00035 #define KEY_C_DCOLLATED 40 00036 #define KEY_C_MAX_DATA 40 00037 #define KEY_K_BLN 96 00038 #define KEY_C_BLN 96 00039 #define KEY_C_SPARE 6 00040 #define KEY_S_KEYDEF 96 00041 00042 // like Indexed File Prologue Block 1 in rmsint2.doc? 00043 00044 struct _prologue_key { 00045 unsigned int key_l_idxfl; 00046 unsigned short key_w_noff; 00047 unsigned char key_b_ianum; 00048 unsigned char key_b_lanum; 00049 unsigned char key_b_danum; 00050 unsigned char key_b_rootlev; 00051 unsigned char key_b_idxbktsz; 00052 unsigned char key_b_datbktsz; 00053 unsigned int key_l_rootvbn; 00054 union { 00055 unsigned char key_b_flags; 00056 #if 0 00057 // gcc bitfield problems 00058 struct { 00059 unsigned key_v_dupkeys : 1; 00060 unsigned key_v_chgkeys : 1; 00061 unsigned key_v_nulkeys : 1; 00062 unsigned key_v_idx_compr : 1; 00063 unsigned key_v_initidx : 1; 00064 unsigned key_$_fill_1 : 1; 00065 unsigned key_v_key_compr : 1; 00066 unsigned key_v_fill_8_ : 1; 00067 }; 00068 struct { 00069 unsigned key_$_fill_2 : 1; 00070 unsigned key_$_fill_3 : 2; 00071 unsigned key_$_fill_4 : 1; 00072 unsigned key_$_fill_5 : 1; 00073 unsigned key_$_fill_6 : 1; 00074 unsigned key_$_fill_7 : 1; 00075 unsigned key_v_rec_compr : 1; 00076 }; 00077 #endif 00078 }; 00079 unsigned char key_b_datatype; 00080 unsigned char key_b_segments; 00081 unsigned char key_b_nullchar; 00082 unsigned char key_b_keysz; 00083 unsigned char key_b_keyref; 00084 unsigned short key_w_minrecsz; 00085 unsigned short key_w_idxfill; 00086 unsigned short key_w_datfill; 00087 union { 00088 unsigned short key_w_position; 00089 unsigned short key_w_position0; 00090 }; 00091 unsigned short key_w_position1; 00092 unsigned short key_w_position2; 00093 unsigned short key_w_position3; 00094 unsigned short key_w_position4; 00095 unsigned short key_w_position5; 00096 unsigned short key_w_position6; 00097 unsigned short key_w_position7; 00098 union { 00099 unsigned char key_b_size; 00100 unsigned char key_b_size0; 00101 }; 00102 unsigned char key_b_size1; 00103 unsigned char key_b_size2; 00104 unsigned char key_b_size3; 00105 unsigned char key_b_size4; 00106 unsigned char key_b_size5; 00107 unsigned char key_b_size6; 00108 unsigned char key_b_size7; 00109 char key_t_keynam [32]; 00110 unsigned int key_l_ldvbn; 00111 union { 00112 unsigned char key_b_type; 00113 unsigned char key_b_type0; 00114 }; 00115 unsigned char key_b_type1; 00116 unsigned char key_b_type2; 00117 unsigned char key_b_type3; 00118 unsigned char key_b_type4; 00119 unsigned char key_b_type5; 00120 unsigned char key_b_type6; 00121 unsigned char key_b_type7; 00122 }; 00123 00124 #endif 00125 00126