vmsdefs.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. /*
  2. Copyright (c) 1990-2000 Info-ZIP. All rights reserved.
  3. See the accompanying file LICENSE, version 2000-Apr-09 or later
  4. (the contents of which are also included in zip.h) for terms of use.
  5. If, for some reason, all these files are missing, the Info-ZIP license
  6. also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html
  7. */
  8. /*---------------------------------------------------------------------------
  9. vmsdefs.h
  10. Contents of three header files from Joe
  11. Meadows' FILE program. Used by vmsmunch
  12. 06-Apr-1994 Jamie Hanrahan jeh@cmkrnl.com
  13. Moved "contents of three header files" from
  14. VMSmunch.h to VMSdefs.h .
  15. 16-Sep-1995 Christian Spieler
  16. Added #pragma (no)member_alignment directives
  17. to achieve compatibility with DEC C and Alpha AXP
  18. 05-Oct-1995 Christian Spieler
  19. Revised fatdef, fchdef, fjndef to achieve closer
  20. compatibility with DEC's system include header files
  21. supplied with C version 4.0 and newer.
  22. 10-Oct-1995 Christian Spieler
  23. Use lowercase filenames for vms specific sources
  24. (VMSmunch.? -> vmsmunch.?, VMSdefs.h -> vmsdefs.h)
  25. 15-Dec-1995 Christian Spieler
  26. Removed the last "tabs" from the source.
  27. 24-Jun-1997 Onno van der Linden / Chr. Spieler
  28. Modifications to support the VMS port of GNU C 2.x.
  29. 27-Jul-1999 Chr. Spieler
  30. Added Info-ZIP copyright note for identification.
  31. ---------------------------------------------------------------------------*/
  32. #ifndef __vmsdefs_h
  33. #define __vmsdefs_h 1
  34. #if defined(__DECC) || defined(__DECCXX)
  35. #pragma __nostandard
  36. #endif /* __DECC || __DECCXX */
  37. #if defined(__DECC) || defined(__DECCXX)
  38. #pragma __member_alignment __save
  39. #pragma __nomember_alignment
  40. #endif /* __DECC || __DECCXX */
  41. #if !(defined(__VAXC) || defined(VAXC)) || defined(__GNUC__)
  42. #define __struct struct
  43. #define __union union
  44. #else
  45. #define __struct variant_struct
  46. #define __union variant_union
  47. #endif /* !(__VAXC || VAXC) || __GNUC__ */
  48. #ifdef __cplusplus
  49. extern "C" {
  50. #endif
  51. /*---------------------------------------------------------------------------
  52. fatdef.h
  53. ---------------------------------------------------------------------------*/
  54. /* This header file was created by Joe Meadows, and is not copyrighted
  55. in any way. No guarantee is made as to the accuracy of the contents
  56. of this header file. This header file was last modified on Sep. 22th,
  57. 1987. (Modified to include this statement) */
  58. #define FAT$K_LENGTH 32
  59. #define FAT$C_LENGTH 32
  60. #define FAT$S_FATDEF 32
  61. struct fatdef {
  62. __union {
  63. unsigned char fat$b_rtype; /* record type */
  64. __struct {
  65. unsigned fat$v_rtype : 4; /* record type subfield */
  66. unsigned fat$v_fileorg : 4; /* file organization */
  67. } fat$r_rtype_bits;
  68. } fat$r_rtype_overlay;
  69. # define FAT$S_RTYPE 4
  70. # define FAT$V_RTYPE 0
  71. # define FAT$C_UNDEFINED 0
  72. # define FAT$C_FIXED 1
  73. # define FAT$C_VARIABLE 2
  74. # define FAT$C_VFC 3
  75. # define FAT$C_STREAM 4
  76. # define FAT$C_STREAMLF 5
  77. # define FAT$C_STREAMCR 6
  78. # define FAT$S_FILEORG 4
  79. # define FAT$V_FILEORG 4
  80. # define FAT$C_SEQUENTIAL 0
  81. # define FAT$C_RELATIVE 1
  82. # define FAT$C_INDEXED 2
  83. # define FAT$C_DIRECT 3
  84. __union {
  85. unsigned char fat$b_rattrib; /* record attributes */
  86. __struct {
  87. unsigned fat$v_fortrancc : 1;
  88. unsigned fat$v_impliedcc : 1;
  89. unsigned fat$v_printcc : 1;
  90. unsigned fat$v_nospan : 1;
  91. unsigned fat$v_msbrcw : 1;
  92. } fat$r_rattrib_bits;
  93. } fat$r_rattrib_overlay;
  94. # define FAT$V_FORTRANCC 0
  95. # define FAT$M_FORTRANCC 1
  96. # define FAT$V_IMPLIEDCC 1
  97. # define FAT$M_IMPLIEDCC 2
  98. # define FAT$V_PRINTCC 2
  99. # define FAT$M_PRINTCC 4
  100. # define FAT$V_NOSPAN 3
  101. # define FAT$M_NOSPAN 8
  102. # define FAT$V_MSBRCW 4
  103. # define FAT$M_MSBRCW 16
  104. unsigned short int fat$w_rsize; /* record size in bytes */
  105. __union
  106. {
  107. unsigned long int fat$l_hiblk; /* highest allocated VBN */
  108. __struct
  109. {
  110. unsigned short int fat$w_hiblkh; /* high order word */
  111. unsigned short int fat$w_hiblkl; /* low order word */
  112. } fat$r_hiblk_fields;
  113. } fat$r_hiblk_overlay;
  114. __union
  115. {
  116. unsigned long int fat$l_efblk; /* end of file VBN */
  117. __struct
  118. {
  119. unsigned short int fat$w_efblkh; /* high order word */
  120. unsigned short int fat$w_efblkl; /* low order word */
  121. } fat$r_efblk_fields;
  122. } fat$r_efblk_overlay;
  123. unsigned short int fat$w_ffbyte; /* first free byte in EFBLK */
  124. unsigned char fat$b_bktsize; /* bucket size in blocks */
  125. unsigned char fat$b_vfcsize; /* # of control bytes in VFC record */
  126. unsigned short int fat$w_maxrec; /* maximum record size in bytes */
  127. unsigned short int fat$w_defext; /* default extend quantity */
  128. unsigned short int fat$w_gbc; /* global buffer count */
  129. char fat$fill[8];
  130. unsigned short int fat$w_versions;
  131. };
  132. #if !(defined(__VAXC) || defined(VAXC)) || defined(__GNUC__)
  133. #define fat$b_rtype fat$r_rtype_overlay.fat$b_rtype
  134. #define fat$v_rtype fat$r_rtype_overlay.fat$r_rtype_bits.fat$v_rtype
  135. #define fat$v_fileorg fat$r_rtype_overlay.fat$r_rtype_bits.fat$v_fileorg
  136. #define fat$b_rattrib fat$r_rattrib_overlay.fat$b_rattrib
  137. #define fat$v_fortrancc fat$r_rattrib_overlay.fat$r_rattrib_bits.fat$v_fortrancc
  138. #define fat$v_impliedcc fat$r_rattrib_overlay.fat$r_rattrib_bits.fat$v_impliedcc
  139. #define fat$v_printcc fat$r_rattrib_overlay.fat$r_rattrib_bits.fat$v_printcc
  140. #define fat$v_nospan fat$r_rattrib_overlay.fat$r_rattrib_bits.fat$v_nospan
  141. #define fat$v_msbrcw fat$r_rattrib_overlay.fat$r_rattrib_bits.fat$v_msbrcw
  142. #define fat$l_hiblk fat$r_hiblk_overlay.fat$l_hiblk
  143. #define fat$w_hiblkh fat$r_hiblk_overlay.fat$r_hiblk_fields.fat$w_hiblkh
  144. #define fat$w_hiblkl fat$r_hiblk_overlay.fat$r_hiblk_fields.fat$w_hiblkl
  145. #define fat$l_efblk fat$r_efblk_overlay.fat$l_efblk
  146. #define fat$w_efblkh fat$r_efblk_overlay.fat$r_efblk_fields.fat$w_efblkh
  147. #define fat$w_efblkl fat$r_efblk_overlay.fat$r_efblk_fields.fat$w_efblkl
  148. #endif /* !(__VAXC || VAXC) || __GNUC__ */
  149. #define __FATDEF_LOADED 1 /* prevent inclusion of DECC's fatdef.h */
  150. /*---------------------------------------------------------------------------
  151. fchdef.h
  152. ---------------------------------------------------------------------------*/
  153. /* This header file was created by Joe Meadows, and is not copyrighted
  154. in any way. No guarantee is made as to the accuracy of the contents
  155. of this header file. This header file was last modified on Sep. 22th,
  156. 1987. (Modified to include this statement) */
  157. #define FCH$V_BADACL 0x00B
  158. #define FCH$M_BADACL (1 << FCH$V_BADACL)
  159. #define FCH$V_BADBLOCK 0x00E
  160. #define FCH$M_BADBLOCK (1 << FCH$V_BADBLOCK)
  161. #define FCH$V_CONTIG 0x007
  162. #define FCH$M_CONTIG (1 << FCH$V_CONTIG)
  163. #define FCH$V_CONTIGB 0x005
  164. #define FCH$M_CONTIGB (1 << FCH$V_CONTIGB)
  165. #define FCH$V_DIRECTORY 0x00D
  166. #define FCH$M_DIRECTORY (1 << FCH$V_DIRECTORY)
  167. #define FCH$V_ERASE 0x011
  168. #define FCH$M_ERASE (1 << FCH$V_ERASE)
  169. #define FCH$V_LOCKED 0x006
  170. #define FCH$M_LOCKED (1 << FCH$V_LOCKED)
  171. #define FCH$V_MARKDEL 0x00F
  172. #define FCH$M_MARKDEL (1 << FCH$V_MARKDEL)
  173. #define FCH$V_NOBACKUP 0x001
  174. #define FCH$M_NOBACKUP (1 << FCH$V_NOBACKUP)
  175. #define FCH$V_NOCHARGE 0x010
  176. #define FCH$M_NOCHARGE (1 << FCH$V_NOCHARGE)
  177. #define FCH$V_READCHECK 0x003
  178. #define FCH$M_READCHECK (1 << FCH$V_READCHECK)
  179. #define FCH$V_SPOOL 0x00C
  180. #define FCH$M_SPOOL (1 << FCH$V_SPOOL)
  181. #define FCH$V_WRITCHECK 0x004
  182. #define FCH$M_WRITCHECK (1 << FCH$V_WRITCHECK)
  183. #define FCH$V_WRITEBACK 0x002
  184. #define FCH$M_WRITEBACK (1 << FCH$V_WRITEBACK)
  185. struct fchdef {
  186. __union {
  187. int fch$$_fill_1;
  188. __struct {
  189. unsigned fch$$_fill_31 : 8;
  190. unsigned fch$v_vcc_state : 3; /* VCC state bits */
  191. unsigned fch$$_fill_32 : 7;
  192. unsigned fch$$_alm_state : 2;
  193. unsigned fch$v_associated : 1; /* ISO 9660 Associated file */
  194. unsigned fch$v_existence : 1; /* ISO 9660 Existence file */
  195. unsigned fch$v_fill_6 : 2;
  196. } fch$r_fill_1_chunks;
  197. __struct {
  198. unsigned fch$v_wascontig : 1;
  199. unsigned fch$v_nobackup : 1 ;
  200. unsigned fch$v_writeback : 1;
  201. unsigned fch$v_readcheck : 1;
  202. unsigned fch$v_writcheck : 1;
  203. unsigned fch$v_contigb : 1;
  204. unsigned fch$v_locked : 1;
  205. unsigned fch$v_contig : 1;
  206. unsigned fch$$_fill_3 : 3;
  207. unsigned fch$v_badacl : 1;
  208. unsigned fch$v_spool : 1;
  209. unsigned fch$v_directory : 1;
  210. unsigned fch$v_badblock : 1;
  211. unsigned fch$v_markdel : 1;
  212. unsigned fch$v_nocharge : 1;
  213. unsigned fch$v_erase : 1;
  214. unsigned fch$$_fill_4 : 1;
  215. unsigned fch$v_shelved : 1;
  216. unsigned fch$v_scratch : 1;
  217. unsigned fch$v_nomove : 1;
  218. unsigned fch$v_noshelvable : 1;
  219. } fch$r_fill_1_bits;
  220. } fch$r_fch_union;
  221. };
  222. #if !(defined(__VAXC) || defined(VAXC)) || defined(__GNUC__)
  223. #define fch$v_vcc_state fch$r_fch_union.fch$r_fill_1_chunks.fch$v_vcc_state
  224. #define fch$v_associated fch$r_fch_union.fch$r_fill_1_chunks.fch$v_associated
  225. #define fch$v_existence fch$r_fch_union.fch$r_fill_1_chunks.fch$v_existence
  226. #define fch$v_wascontig fch$r_fch_union.fch$r_fill_1_bits.fch$v_wascontig
  227. #define fch$v_nobackup fch$r_fch_union.fch$r_fill_1_bits.fch$v_nobackup
  228. #define fch$v_writeback fch$r_fch_union.fch$r_fill_1_bits.fch$v_writeback
  229. #define fch$v_readcheck fch$r_fch_union.fch$r_fill_1_bits.fch$v_readcheck
  230. #define fch$v_writcheck fch$r_fch_union.fch$r_fill_1_bits.fch$v_writcheck
  231. #define fch$v_contigb fch$r_fch_union.fch$r_fill_1_bits.fch$v_contigb
  232. #define fch$v_locked fch$r_fch_union.fch$r_fill_1_bits.fch$v_locked
  233. #define fch$v_contig fch$r_fch_union.fch$r_fill_1_bits.fch$v_contig
  234. #define fch$v_badacl fch$r_fch_union.fch$r_fill_1_bits.fch$v_badacl
  235. #define fch$v_spool fch$r_fch_union.fch$r_fill_1_bits.fch$v_spool
  236. #define fch$v_directory fch$r_fch_union.fch$r_fill_1_bits.fch$v_directory
  237. #define fch$v_badblock fch$r_fch_union.fch$r_fill_1_bits.fch$v_badblock
  238. #define fch$v_markdel fch$r_fch_union.fch$r_fill_1_bits.fch$v_markdel
  239. #define fch$v_nocharge fch$r_fch_union.fch$r_fill_1_bits.fch$v_nocharge
  240. #define fch$v_erase fch$r_fch_union.fch$r_fill_1_bits.fch$v_erase
  241. #define fch$v_shelved fch$r_fch_union.fch$r_fill_1_bits.fch$v_shelved
  242. #define fch$v_scratch fch$r_fch_union.fch$r_fill_1_bits.fch$v_scratch
  243. #define fch$v_nomove fch$r_fch_union.fch$r_fill_1_bits.fch$v_nomove
  244. #define fch$v_noshelvable fch$r_fch_union.fch$r_fill_1_bits.fch$v_noshelvable
  245. #endif /* !(__VAXC || VAXC) || __GNUC__ */
  246. #define __FCHDEF_LOADED 1 /* prevent inclusion of DECC's fchdef.h */
  247. /*---------------------------------------------------------------------------
  248. fjndef.h
  249. ---------------------------------------------------------------------------*/
  250. /* This header file was created by Joe Meadows, and is not copyrighted
  251. in any way. No guarantee is made as to the accuracy of the contents
  252. of this header file. This header file was last modified on Sep. 22th,
  253. 1987. (Modified to include this statement) */
  254. #define FJN$M_ONLY_RU 1
  255. #define FJN$M_RUJNL 2
  256. #define FJN$M_BIJNL 4
  257. #define FJN$M_AIJNL 8
  258. #define FJN$M_ATJNL 16
  259. #define FJN$M_NEVER_RU 32
  260. #define FJN$M_JOURNAL_FILE 64
  261. #define FJN$S_FJNDEF 1
  262. struct fjndef {
  263. unsigned fjn$v_only_ru : 1;
  264. unsigned fjn$v_rujnl : 1;
  265. unsigned fjn$v_bijnl : 1;
  266. unsigned fjn$v_aijnl : 1;
  267. unsigned fjn$v_atjnl : 1;
  268. unsigned fjn$v_never_ru : 1;
  269. unsigned fjn$v_journal_file : 1;
  270. unsigned fjn$v_fill_7 : 1;
  271. } ;
  272. #define __FJNDEF_LOADED 1 /* prevent inclusion of DECC's fjndef.h */
  273. /*---------------------------------------------------------------------------*/
  274. #ifdef __cplusplus
  275. }
  276. #endif
  277. #if defined(__DECC) || defined(__DECCXX)
  278. #pragma __member_alignment __restore
  279. #endif /* __DECC || __DECCXX */
  280. #if defined(__DECC) || defined(__DECCXX)
  281. #pragma __standard
  282. #endif /* __DECC || __DECCXX */
  283. #endif /* !__vmsdefs_h */