tldm-universe/Ardent/UV/gcidir/include/hdroffsets.h

162 lines
9.0 KiB
C
Raw Normal View History

2024-09-09 21:51:08 +00:00
#ifndef h_hdroffsets
#define h_hdroffsets
/******************************************************************************
*
* Declarations for UniVerse hashed file header
*
* Module %M% Version %I% Date %H%
*
* (c) Copyright 1998 Ardent Software Inc. - All Rights Reserved
* This is unpublished proprietary source code of Ardent Software Inc.
* The copyright notice above does not evidence any actual or intented
* publication of such source code.
*
*******************************************************************************
*
* Maintenence log - insert most recent change descriptions at top
*
* Date.... GTAR# WHO Description.........................................
* 04/23/99 24742 GMH Add FH_MAXVAL
* 04/22/99 24480 GMH Reshuffle uvschema, indexpath, resizepath
* 04/12/99 24742 GMH Fix header
* 04/09/99 24480 GMH Move UVreadonly and reshuffle Bakcnt
* 03/23/99 24480 GMH Reshuffle NEW32/NEW64 header to 8byte boundaries
* 03/20/99 24729 GMH Increase FH_T30CURRLOAD to 8 bytes
* 02/26/99 24480 GMH Add FH_STATSALL for stats
* 10/14/98 23801 SAP Change copyrights.
* 10/08/98 22647 GMH Fix mkdbstamp location
* 09/29/98 23672 GMH Add final return
* 09/08/98 22647 GMH Initial
*
*****************************************************************************/
/* The following defines the global FH_OFFSETS table, which defines
** the offset location of uniVerse file header elements. Because the
** structure of the file header has changed as of 0xACEF010c (rev 9.5)
** the table is comprised of seven (7) pieces of information:
**
** dispatch type (numeric or character) column 1
** Pre Rev9.5 (OLD style header) Size & Offset columns 2 & 3
** Rev9.5 32bit (NEW style header) Size & Offset columns 4 & 5
** Rev9.5 64bit (NEW style header) Size & Offset....columns 6 & 7
**
** The contents of this table are utilized directly by the two functions
** 'filehdr_get_item' and 'filehdr_set_item'. See the comments of usage
** that accompanies each function. For ease of use, a number of MACROS
** have been defined.
**
** A -1 indicates that the particular entry is not valid or in use.
** A row not in use will have the number -1 in all 7 cells.
** When the NEW64 field is set to -1, indicating to use the information
** in the NEW32 field.
**
*/
#define NVAL 1 /* return is int */
#define OVAL 2 /* return in DBDADDR (may be 32- or 64- bit result) */
#define CVAL 3 /* return is character string */
#define FHTYPE 0 /* numeric or character dispatch code position */
#define FH_MAXVAL 94 /* max value in FH_OFFSETS table */
/* Column Headings for table
** dsptch oldsz oldoff newsz newoff newsz64 newoff64 description **
** ====== ===== ====== ===== ====== ======= ======== =========== */
PRI_RO int FH_OFFSETS[][7] = {
{ NVAL, 4, 0, 4, 0, -1, -1 },/*FH_REVISION 00 */
{ NVAL, 4, 4, 4, 12, 8, 8 },/*FH_MODULUS 01 */
{ NVAL, 4, 8, 4, 16, -1, -1 },/*FH_SEPARATION 02 */
{ NVAL, 4, 12, 4, 4, -1, -1 },/*FH_FILETYPE 03 */
{ NVAL, 4, 20, 4, 20, -1, -1 },/*FH_INDEXFLAGS 04 */
{ NVAL, 4, 16, 4, 28, 8, 24 },/*FH_FREECHAIN 05 */
{ NVAL, 36, 92, 56, 32, -1, -1 },/*FH_T30INFOALL 06 */
{ NVAL, 4, 92, 4, 72, -1, -1 },/*FH_T30TYPE 07 */
{ NVAL, 4, 96, 4, 76, -1, -1 },/*FH_T30SPLIT 08 */
{ NVAL, 4, 100, 4, 80, -1, -1 },/*FH_T30MERGE 09 */
{ NVAL, 4, 104, 4, 36, 8, 32 },/*FH_T30CURMOD 10 */
{ NVAL, 4, 108, 4, 44, 8, 40 },/*FH_T30BASEMOD 11 */
{ NVAL, 4, 112, 4, 52, 8, 48 },/*FH_T30LARGEREC 12 */
{ NVAL, 4, 116, 4, 68, 8, 64 },/*FH_T30CURRLOAD 13*/
{ NVAL, 4, 120, 4, 84, -1, -1 },/*FH_T30SELECTCNT 14 */
{ NVAL, 4, 124, 4, 60, 8, 56 },/*FH_T30NEXTSPLIT 15 */
{ NVAL, 4, 512, 4, 92, 8, 88 },/*FH_SICADATA 16 */
{ NVAL, 4, 520, 4, 100, 8, 96 },/*FH_PARTBLOCK 17 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 18 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 19 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 20 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 21 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 22 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 23 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 24 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 25 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 26 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 27 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 28 */
{ NVAL, 72, 128, 72, 128, -1, -1 },/*FH_STATALL 29 */
{ NVAL, 4, 128, 4, 128, -1, -1 },/*FH_STAT01 30 */
{ NVAL, 4, 132, 4, 132, -1, -1 },/*FH_STAT02 31 */
{ NVAL, 4, 136, 4, 136, -1, -1 },/*FH_STAT03 32 */
{ NVAL, 4, 140, 4, 140, -1, -1 },/*FH_STAT04 33 */
{ NVAL, 4, 144, 4, 144, -1, -1 },/*FH_STAT05 34 */
{ NVAL, 4, 148, 4, 148, -1, -1 },/*FH_STAT06 35 */
{ NVAL, 4, 152, 4, 152, -1, -1 },/*FH_STAT07 36 */
{ NVAL, 4, 156, 4, 156, -1, -1 },/*FH_STAT08 37 */
{ NVAL, 4, 160, 4, 160, -1, -1 },/*FH_STAT09 38 */
{ NVAL, 4, 164, 4, 164, -1, -1 },/*FH_STAT10 39 */
{ NVAL, 4, 168, 4, 168, -1, -1 },/*FH_STAT11 40 */
{ NVAL, 4, 172, 4, 172, -1, -1 },/*FH_STAT12 41 */
{ NVAL, 4, 176, 4, 176, -1, -1 },/*FH_STAT13 42 */
{ NVAL, 4, 180, 4, 180, -1, -1 },/*FH_STAT14 43 */
{ NVAL, 4, 184, 4, 184, -1, -1 },/*FH_STAT15 44 */
{ NVAL, 4, 188, 4, 188, -1, -1 },/*FH_STAT16 45 */
{ NVAL, 4, 192, 4, 192, -1, -1 },/*FH_STAT17 46 */
{ NVAL, 4, 196, 4, 196, -1, -1 },/*FH_STAT18 47 */
{ NVAL, 4, 200, 4, 200, -1, -1 },/*FH_NLSSORTCUM 48 */
{ CVAL, 32, 204, 32, 204, -1, -1 },/*FH_NLSSORTMAP 49 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 50 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 51 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 52 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 53 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 54 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 55 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 56 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 57 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 58 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 59 */
{ NVAL, 4, 276, 4, 276, -1, -1 },/*FH_TLFILNUM 60 */
{ NVAL, 4, 280, 4, 280, -1, -1 },/*FH_pTLFILNUM 61 */
{ NVAL, 4, 284, 4, 284, -1, -1 },/*FH_TLFLAGS 62 */
{ NVAL, 4, 288, 4, 288, -1, -1 },/*FH_CHKPOINT 63 */
{ CVAL, 8, 292, 8, 292, -1, -1 },/*FH_TXWARMLSN 64 */
{ NVAL, 4, 300, 4, 300, -1, -1 },/*FH_NLSMAPCSUM 65 */
{ CVAL, 32, 304, 32, 304, -1, -1 },/*FH_NLSMAPNAME 66 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 67 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 68 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 69 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 70 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 71 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 72 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 73 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 74 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 75 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 76 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 77 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 78 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 79 */
{ NVAL, 4, 364, 4, 364, -1, -1 },/*FH_CLEARTIME 80 */
{ NVAL, 4, 368, 4, 368, -1, -1 },/*FH_BAKTIME 81 */
{ NVAL, 4, 376, 4, 372, -1, -1 },/*FH_BAKFLGS 82 */
{ NVAL, 4, 372, 4, 380, 8, 376 },/*FH_BAKCNT 83 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 84 */
{ CVAL, 128, 384, 256, 576, -1, -1 },/*FH_INDEXPATH 85 */
{ -1, -1, -1, -1, -1, -1, -1 },/*unused 86 */
{ NVAL, 4, 516, 4, 516, -1, -1 },/*FH_MKDBSTAMP 87 */
{ NVAL, 4, 380, 4, 520, -1, -1 },/*FH_UV_READONLY 88 */
{ CVAL, 20, 524, 64, 832, -1, -1 },/*FH_UVSCHEMA 89 */
{ NVAL, 4, 544, 4, 544, -1, -1 },/*FH_IDXCOLCNT 90 */
{ NVAL, 4, 548, 4, 548, -1, -1 },/*FH_IDXCOLMAP 91 */
{ NVAL, 4, 552, 4, 552, -1, -1 },/*FH_UDRFLAGS 92 */
{ NVAL, 4, 556, 4, 556, -1, -1 },/*FH_UDRUNIQUE 93 */
{ CVAL, 64, 24, 128, 896, -1, -1 } /*FH_RESIZEPATH 94 */
};
#endif