00001 #ifndef fcbdef_h 00002 #define fcbdef_h 00003 00004 #define FCB_M_FILE_ATTRIBUTES 0xF 00005 #define FCB_M_FILE_CONTENTS 0xF0 00006 #define FCB_M_FLUSH_ON_CLOSE 0xF00 00007 #define FCB_M_CACHING_OPTIONS_MBZ 0xFFFFF000 00008 #define FCB_C_DEFAULT 0 00009 #define FCB_C_WRITETHROUGH 1 00010 #define FCB_C_WRITEBEHIND 2 00011 #define FCB_C_NOCACHING 3 00012 #define FCB_C_FLUSH 1 00013 #define FCB_C_NOFLUSH 2 00014 #define FCB_M_VCC_STATE 0x7 00015 #define FCB_K_LENGTH 320 00016 #define FCB_C_LENGTH 320 00017 #define FCB_S_FCBDEF 320 00018 00019 struct _fcb { 00020 struct _fcb *fcb_l_fcbfl; 00021 struct _fcb *fcb_l_fcbbl; 00022 unsigned short int fcb_w_size; 00023 unsigned char fcb_b_type; 00024 unsigned char fcb_b_acclkmode; 00025 void *fcb_l_exfcb; 00026 struct _wcb *fcb_l_wlfl; 00027 struct _wcb *fcb_l_wlbl; 00028 unsigned int fcb_l_refcnt; 00029 unsigned int fcb_l_acnt; 00030 unsigned int fcb_l_wcnt; 00031 unsigned int fcb_l_lcnt; 00032 unsigned int fcb_l_tcnt; 00033 union { 00034 unsigned int fcb_l_status; 00035 struct { 00036 unsigned fcb_v_dir : 1; 00037 unsigned fcb_v_markdel : 1; 00038 unsigned fcb_v_badblk : 1; 00039 unsigned fcb_v_excl : 1; 00040 unsigned fcb_v_spool : 1; 00041 unsigned fcb_v_rmslock : 1; 00042 unsigned fcb_v_erase : 1; 00043 unsigned fcb_v_badacl : 1; 00044 unsigned fcb_v_stale : 1; 00045 unsigned fcb_v_delaytrnc : 1; 00046 unsigned fcb_v_limbo : 1; 00047 unsigned fcb_v_isdir : 1; 00048 unsigned fcb_v_nomove : 1; 00049 unsigned fcb_v_shelved : 1; 00050 unsigned fcb_v_noshelvable : 1; 00051 unsigned fcb_v_preshelved : 1; 00052 }; 00053 }; 00054 union { 00055 unsigned short int fcb_w_fid [3]; 00056 struct { 00057 unsigned short int fcb_w_fid_num; 00058 unsigned short int fcb_w_fid_seq; 00059 union { 00060 unsigned short int fcb_w_fid_rvn; 00061 struct { 00062 unsigned char fcb_b_fid_rvn; 00063 unsigned char fcb_b_fid_nmx; 00064 } fcb_fid_3; 00065 } fcb_fid_2; 00066 } fcb_fid_1_1; 00067 struct { // this is supposedly for 9660. can be used anyway 00068 unsigned short int fcb_w_fid_dirnum; 00069 unsigned int fcb_l_fid_recnum; 00070 } fcb_fid_1_2; 00071 } fcb_fid_0; 00072 unsigned short int fcb_w_segn; 00073 unsigned int fcb_l_stvbn; 00074 unsigned int fcb_l_stlbn; 00075 unsigned int fcb_l_hdlbn; 00076 unsigned int fcb_l_filesize; 00077 unsigned int fcb_l_efblk; 00078 unsigned int fcb_l_versions; 00079 unsigned int fcb_l_dirseq; 00080 unsigned int fcb_l_dirindx; 00081 unsigned int fcb_l_acclkid; 00082 unsigned int fcb_l_lockbasis; 00083 union { 00084 unsigned int fcb_l_truncvbn; 00085 unsigned int fcb_l_numextents; 00086 }; 00087 unsigned int fcb_l_cachelkid; 00088 unsigned int fcb_l_highwater; 00089 unsigned int fcb_l_newhighwater; 00090 unsigned int fcb_l_hwm_update; 00091 unsigned int fcb_l_hwm_erase; 00092 unsigned int fcb_l_hwm_partial; 00093 unsigned int fcb_l_revision; 00094 union { 00095 struct { 00096 void *fcb_l_hwm_waitfl; 00097 void *fcb_l_hwm_waitbl; 00098 }; 00099 struct { 00100 void *fcb_l_limbofl; 00101 void *fcb_l_limbobl; 00102 }; 00103 }; 00104 struct { 00105 union { 00106 unsigned int fcb_l_fileowner; 00107 struct { 00108 unsigned short int fcb_w_uicmember; 00109 unsigned short int fcb_w_uicgroup; 00110 }; 00111 }; 00112 unsigned int fcb_l_fill_5; 00113 unsigned int fcb_l_fill_3; 00114 unsigned int fcb_l_fill_6; 00115 unsigned long long fcb_q_acmode; 00116 union { 00117 unsigned int fcb_l_sys_prot; 00118 struct { 00119 unsigned short int fcb_w_fileprot; 00120 unsigned short int fcb_w_fill_4; 00121 }; 00122 }; 00123 unsigned int fcb_l_own_prot; 00124 unsigned int fcb_l_grp_prot; 00125 unsigned int fcb_l_wor_prot; 00126 void *fcb_l_aclfl; 00127 void *fcb_l_aclbl; 00128 struct { 00129 char fcb_b_fill_1 [20]; 00130 }; 00131 struct { 00132 char fcb_b_fill_2 [20]; 00133 }; 00134 unsigned short int fcb_w_name_length; 00135 short int fcb_w_fill_7; 00136 void *fcb_l_name_pointer; 00137 struct _ocb *fcb_l_ocb; 00138 struct _orb *fcb_l_template_orb; 00139 unsigned int fcb_l_object_specific; 00140 struct _orb *fcb_l_original_orb; 00141 unsigned short int fcb_w_updseq; 00142 unsigned short int fcb_w_fill_8; 00143 unsigned int fcb_l_reserve1; 00144 unsigned int fcb_l_reserve2; 00145 }; 00146 char fcb_b_fill_9 [4]; 00147 union { 00148 char fcb_b_fill_10 [40]; 00149 struct { 00150 char fcb_b_fill_11 [24]; 00151 unsigned long long fcb_q_cfb; 00152 union { 00153 unsigned int fcb_l_caching_options; 00154 struct { 00155 unsigned fcb_v_file_attributes : 4; 00156 unsigned fcb_v_file_contents : 4; 00157 unsigned fcb_v_flush_on_close : 4; 00158 unsigned fcb_v_caching_options_mbz : 20; 00159 }; 00160 }; 00161 union { 00162 unsigned int fcb_l_status2; 00163 struct { 00164 unsigned fcb_v_vcc_state : 3; 00165 unsigned fcb_v_fill_4_ : 5; 00166 }; 00167 }; 00168 }; 00169 }; 00170 struct _orb *fcb_l_orb; 00171 void *fcb_l_cfcb; 00172 struct _fcb *fcb_l_primfcb; 00173 unsigned int fcb_l_dirlckid; 00174 }; 00175 00176 #define fcb_w_fid fcb_fid_0.fcb$w_fid 00177 #define fcb_w_fid_num fcb_fid_0.fcb_fid_1_1.fcb$w_fid_num 00178 #define fcb_w_fid_seq fcb_fid_0.fcb_fid_1_1.fcb$w_fid_seq 00179 #define fcb_w_fid_rvn fcb_fid_0.fcb_fid_1_1.fcb_fid_2.fcb$w_fid_rvn 00180 #define fcb_b_fid_rvn fcb_fid_0.fcb_fid_1_1.fcb_fid_2.fcb_fid_3.fcb$b_fid_rvn 00181 #define fcb_b_fid_nmx fcb_fid_0.fcb_fid_1_1.fcb_fid_2.fcb_fid_3.fcb$b_fid_nmx 00182 #define fcb_w_fid_dirnum fcb_fid_0.fcb_fid_1_2.fcb$w_fid_dirnum 00183 #define fcb_l_fid_recnum fcb_fid_0.fcb_fid_1_2.fcb$l_fid_recnum 00184 00185 #endif 00186