00001 #ifndef fatdef_h 00002 #define fatdef_h 00003 00004 /* Access.h v1.3 Definitions for file access routines */ 00005 00006 /* 00007 This is part of ODS2 written by Paul Nankervis, 00008 email address: Paulnank@au1.ibm.com 00009 00010 ODS2 is distributed freely for all members of the 00011 VMS community to use. However all derived works 00012 must maintain comments in their source to acknowledge 00013 the contibution of the original author. 00014 00015 Originally part of access.h 00016 */ 00017 00018 #define NO_DOLLAR 00019 00020 #define FAT_C_UNDEFINED 0 00021 #define FAT_C_FIXED 1 00022 #define FAT_C_VARIABLE 2 00023 #define FAT_C_VFC 3 00024 #define FAT_C_STREAM 4 00025 #define FAT_C_STREAMLF 5 00026 #define FAT_C_STREAMCR 6 00027 #define FAT_C_SEQUENTIAL 0 00028 #define FAT_C_RELATIVE 1 00029 #define FAT_C_INDEXED 2 00030 #define FAT_C_DIRECT 3 00031 #define FAT_C_SPECIAL 4 00032 #define FAT_M_FORTRANCC 0x1 00033 #define FAT_M_IMPLIEDCC 0x2 00034 #define FAT_M_PRINTCC 0x4 00035 #define FAT_M_NOSPAN 0x8 00036 #define FAT_M_MSBRCW 0x10 00037 #define FAT_C_FIFO 1 00038 #define FAT_C_CHAR_SPECIAL 2 00039 #define FAT_C_BLOCK_SPECIAL 3 00040 #define FAT_C_SYMLINK 4 00041 #define FAT_K_LENGTH 32 00042 #define FAT_C_LENGTH 32 00043 #define FAT_S_FATDEF 32 00044 00045 /* handling funny byte order */ 00046 /* socalled 00047 Inverted format field. The high- and low-order 16 bits are transposed for compatibility with PDP-11 software. 00048 */ 00049 00050 static inline unsigned long pdp_invert(unsigned long l) { 00051 unsigned short * s=&l; 00052 return (s[0]<<16) + s[1]; 00053 } 00054 00055 struct _fatdef { 00056 vmsbyte fat_b_rtype; 00057 vmsbyte fat_b_rattrib; 00058 vmsword fat_w_rsize; 00059 vmsswap fat_l_hiblk; /* funny byte order */ 00060 vmsswap fat_l_efblk; /* funny byte order */ 00061 vmsword fat_w_ffbyte; 00062 vmsbyte fat_b_bktsize; 00063 vmsbyte fat_b_vfcsize; 00064 vmsword fat_w_maxrec; 00065 vmsword fat_w_defext; 00066 vmsword fat_w_gbc; 00067 vmsbyte fat__UU0[8]; 00068 vmsword fat_w_versions; 00069 }; 00070 00071 #endif 00072