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