home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / zip22.zip / vms / vmsdefs.h < prev    next >
C/C++ Source or Header  |  1997-06-24  |  12KB  |  310 lines

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