home *** CD-ROM | disk | FTP | other *** search
- /*
- * This program is the CONFIDENTIAL and PROPRIETARY property
- * of FairCom(R) Corporation. Any unauthorized use, reproduction or
- * transfer of this computer program is strictly prohibited.
- *
- * Copyright (c) 1984 - 1994 FairCom Corporation.
- * This is an unpublished work, and is subject to limited distribution and
- * restricted disclosure only. ALL RIGHTS RESERVED.
- *
- * RESTRICTED RIGHTS LEGEND
- * Use, duplication, or disclosure by the Government is subject to
- * restrictions set forth in subparagraph (c)(1)(ii) of the Rights in
- * Technical Data and Computer Software clause at DFARS 252.227-7013.
- * FairCom Corporation, 4006 West Broadway, Columbia, MO 65203.
- *
- * c-tree PLUS(tm) Version 6.4
- * Release B
- * October 19, 1994
- */
-
- #ifndef ctOPT2H
- #define ctOPT2H
-
- #ifdef VINES
- /* added for the definintion of size_t */
- #include <sys/types.h>
- #endif
-
- /* *** Capacity Constants *** */
-
- #define BFRSIZ 2048 /* default data file buffer size */
- #define DATABUFS 100 /* default # of data buffers */
- #define MAXLEN 255 /* maximum key length */
- #define MAX_NAME 255 /* maximum file name length */
- #define RESNAME_LEN 64 /* resource logical name limit */
- #ifndef MAXVFIL
- #define MAXVFIL 500 /* maximum virtual files open at same time */
- #endif
-
- /* *** Variable Length Key & Field Constants *** */
-
- #define PADDING ' ' /* trailing key padding */
- #define FIELD_DELIM '\0' /* var length field delimiter */
-
- /* *** SUPERFILE NAME DELIMITER *** */
- #define CTSUPSEP '!'
-
- /* *** MIRROR NAME DELIMITER *** */
- #define ctMIRROR_SEPchr '|'
- #define ctMIRROR_SEPstr "|"
-
- /*
- * The following capacity constants are used only by the ISAM routines and
- * the REBUILD routines.
- */
-
- #ifdef ctMAXFIL
- #define MAXFIL ctMAXFIL
- #else
- /* maximum number of files (non-server) - may be overrided in ctoptn.h */
- #define MAXFIL 50
- #endif
- #ifdef MULTITRD
- #define MAX_DAT_KEY ctmaxdatkey
- #define ctMAX_DAT_KEY 32
- #else
- #define MAX_DAT_KEY 32 /* maximum number of indices per data */
- /* file */
- #endif
-
- /* ************* ************* ************* ************ ************* */
- #define ctHLflavor 1
- #define ctLHflavor 2
-
- #define ctBYTEORDER 0
- #define ctALIGNMENT 1
- #define ctPNTRSIZE 2
-
- #ifdef ctMIRROR
- #ifdef ctMIRRORsave
- #define ctsave mbsave
- #endif
- #else
- #define ctopen mbopen
- #define ctsave mbsave
- #endif
-
- #ifdef MULTITRD
-
- #ifndef CTBOUND
- #define ctSRVR
- #endif
-
- #ifndef ctSEMBLK
- #define ctblkrqs ctsemrqs
- #define ctblkclr ctsemclr
- #define ctblkwat ctsemwat
- #endif
-
- #endif
-
- #ifndef CTBOUND
- #ifndef ctSRVR
-
- #define ctCLIENT
- #ifndef ctLOCFH
- #define ctLOCFH
- #endif
-
- #endif
- #endif
-
- #ifdef ctSRVR
-
- #define MAX_KEY_SEG ctmaxkeyseg
- #ifndef ctMAX_KEY_SEG
- #define ctMAX_KEY_SEG 12
- #endif
-
- #else /* ctSRVR */
-
- #ifdef ctMAX_KEY_SEG
- #define MAX_KEY_SEG ctMAX_KEY_SEG
- #else
- #define MAX_KEY_SEG 12 /* maximum number of segments per key */
- #endif
-
- #endif /* ctSRVR */
-
- /* ******************************************************************** */
- /* ************************ S T O P **************************** */
- /* *** D O N O T C H A N G E T H E F O L L O W I N G *** */
- /* *** W I T H O U T C H E C K I N G W I T H F A I R C O M *** */
- /* ******************************************************************** */
-
- #ifdef ctMIRROR
- #ifdef FPUTFGET
- *** Mirrored files are not supported under FPUTFGET ***
- #endif
- #endif
-
- #ifdef MSWINDOWS
- #ifndef WINNT
- #ifndef MULTITRD
- #ifndef ctNOGLOBALS
- #define ctNOGLOBALS
- #endif
- #endif
- #endif
- #endif
-
- #ifdef ctLOCLIB
- #ifndef ctNOGLOBALS
- #define ctNOGLOBALS
- #endif
- #ifndef ctCONV
- #define ctCONV
- #endif
- #endif
-
- #ifndef ctMEMCHRtxt
- #define ctMEMCHRtxt pVOID
- #endif
-
- #ifndef SIZEOF
- #define SIZEOF(X) ((UINT)sizeof(X))
- #endif
-
- #ifndef ctSIZET
- #define ctSIZET size_t
- #endif
-
- #ifndef ctALLOC
- #define ct_alloc(n,s) calloc(((ctSIZET) (n)),((ctSIZET)(s)))
- #define ctafree(p) free(p)
- #endif
-
- #ifndef ctVDECL
- #define ctVDECL ctDECL
- #endif
-
- #ifdef ctCONV
- #define PARM2 ,((COUNT) 0)
- #define PARM3 ,((pVOID)NULL)
- #define PARM4 ,((pLONG)NULL)
- #define PARM5 ,((pVOID)NULL)
- #define PARM6 ,((pVRLEN)NULL)
- #define PARM7 ,((COUNT)0)
- #else
- #define ctreeCONV
- #define ctCONV
- #endif
-
- #define ctMAXUSERS 200
- #define ADMUSERS 4
- #define MAXCOMMP 10
- #define MXU2 (ctMAXUSERS + ADMUSERS + MAXCOMMP + 1)
- #ifndef MAXAPPS
- #define MAXAPPS (ctMAXUSERS + 1)
- #endif
-
- #define ITIMretry 10
-
- #define TRD_SQL 0x0001
- #define TRD_COMMP 0x0002
- #define TRD_SBLD 0x0004
- #define TRD_ISAM 0x0008
- #define TRD_DUMP 0x0010
- #define TRD_ADMIN 0x0020
- #define TRD_SMON 0x0040
- /* 0x0080 and 0x0100 and 0x0200 reserved for 3 additional monitors */
- #define TRD_LOGON 0x0400
-
- #define USE_DEFAULT (-2L)
- #define SUSE_DEFAULT (-2)
- #define UDLK_TRN (-3)
-
- #define CLN_CHKACT 1
- #define CLN_CHKABT 2
- #define CLN_GETNOD (4 | CLN_CHKACT | CLN_CHKABT)
- #define CLN_GETRCV 8
- #define CLN_CLOSE (16 | CLN_CHKACT)
- #define CLN_STRIP (32 | CLN_CHKABT)
- #define CLN_ABTNOD (64 | CLN_CHKACT | CLN_CHKABT)
- #define CLN_SPLNOD (128 | CLN_CHKACT | CLN_CHKABT)
- #define CLN_RTRY (-1)
- #define CLN_SKIP 0
- #define CLN_COMMIT 1
- #define CLN_UNDO 2
-
- /* compatability definitions */
- #define ctCompat5000 ((LONG) 0x01)
- #define ctCompatLogon ((LONG) 0x02)
-
- #define C254 (C255 - 1)
-
- #define LOGTYPE 0
- #define STRFILE 2
- #define QNAMES 4
- #define IDXLOG 6
- #define DATLOG 8
-
- #define MRKSIZE 4
- #define RESIDSIZE (2 * SIZEOF(LONG))
- #define RESHDRSIZ (SIZEOF(UCOUNT) + 2 * SIZEOF(VRLEN) + 3 * SIZEOF(LONG))
- #define FRESHDRINC RESHDRSIZ
- #define VRESHDRINC (3 * SIZEOF(LONG))
-
- #define CONVERT_NUL 0
- #define CONVERT_IN 1
- #define CONVERT_OUT 2
-
- #define LOGON 0
- #define LOGOFF 1
- #define STOPSRVR 2
- #define STARTSRVR 3
-
- #define COMMIT_DELAY 10L /* milliseconds */
- #define CHECK_DELAY 50L
- #ifndef ctMILLISECOND
- #define ctMILLISECOND(t) (t)
- #endif
-
- #define WAIT -1L /* inifinite */
- #define WAITnodebug -2L
- #define NOWAIT 0L
- #define SHORTWAIT 1L /* smallest tick */
- #define NOT_OP_RCV -3
- #define NOT_OP_FID -4
-
- #define SHRINKQ 0
- #define CHKPNTQ 1
- #define ctQUEUE 2
- #define MONITORQ0 3
- #define ctMAX_MONITOR 2
-
- #ifndef ctSTACKSIZE
- #define ctSTACKSIZE 16384
- #endif
- #define QCHUNK_SIZE 10000L
- #define ctAbsMem 4
- #define ctGidMem 2
-
- #define SETBIT 0
- #define TSTBIT 1
- #define SHDHBINS 128
- #define LOKHBINS 16
- #define ctCONBINS 6
- #define ctMEMSIG 0x4385
-
- #define SEQNXT 1
- #define SEQPRV 2
-
- #define EXS 0 /* exists */
- #define SPC 1 /* pending */
- #define UND 2 /* undoing pending */
- #define RVS 3 /* part of SPC pair */
- /* -------------------------------------------------------------*/
- #define SPC_DIF 4 /* pending for dif tran */
- #define UND_DIF 5 /* undoing pending for dif tran */
-
- #define FN_MASK 0x00ff
- #define FN_MASK_ISAM 0x0100
- #define FN_MASK_LONG 0x0200
- #define FN_MASK_VRLEN 0x0400
- #define FN_MASK_OUTPUT 0x0800
- #define FN_MASK_LOGON 0x1000
- #define FN_MASK_NFCHK 0x2000
- #define FN_MASK_OUTRET 0x4000
-
- #define FN_BASE_LONG 150
- #define FN_BASE_VRLEN 180
- #define FN_BASE_TEXT 188
-
- /* control structure list types for ctgetlst() & ctputlst() */
- #define PI_UNIT 16
-
- #define SHDTYP 0
- #define RS2TYP 1 /* available for use */
- #define PI1TYP 2
- #define PI2TYP 3
- #define PI4TYP 4
- #define PI8TYP 5
- #define PIwTYP 6
- #define PIxTYP 7
- #define PIyTYP 8
- #define PIzTYP 9
- #define BATTYP 10
- #define ILKTYP 11
- #define RS1TYP 12 /* available for use */
-
- #define SEMTYP 13 /* These types do not require semaphore control */
- #define COMTYP 13
- #define ABTTYP 14
- #define IXCTYP 15
- #define DTCTYP 16
- #define CTCTYP 17
- #define LOKTYP 18
- #define RS3TYP 19 /* available for use */
- #define IXBTYP 20
- #define DTBTYP 21
- #define NUMCTLIST 22
- #ifdef MULTITRD
- #define CTSORTBUF 16000
- #define CTLISTBLK 16384 /* list alloc block size */
- #define CTLISTBUF 64000 /* buffer alloc block size */
- #define CTDELSIZ ((UINT) 32768) /* ct_del[] size */
- #else
- #define CTSORTBUF 16000
- #define CTLISTBLK 2048 /* list alloc block size */
- #define CTDELSIZ ((UINT) 2048) /* ct_del[] size (must be >= 512) */
- #endif
-
- #define COMMONOWN ct_cmnown
-
-
- /* ************ ctNOGLOBALS REQUIRES CTS_ISAM ************* */
- #ifdef ctNOGLOBALS
- #ifndef CTS_ISAM
- #define CTS_ISAM
- #endif
- #ifndef ISAM_VARS
- #define ISAM_VARS
- #endif
- #endif
-
- /* ********* DISABLE FEATURES DEPENDENT ON CTS_ISAM ******** */
- #ifndef CTS_ISAM
-
- #ifdef RTREE
- #undef RTREE
- #define NO_RTREE
- #endif
-
- #ifdef CTBATCH
- #undef CTBATCH
- #define NO_CTBATCH
- #endif
-
- #ifdef PARMFILE
- #undef PARMFILE
- #define NO_PARMFILE
- #endif
-
- #endif /* ~CTS_ISAM */
-
- /* *********** FPUTONLY NO LONGER SUPPORTED *********** */
- #ifdef FPUTONLY
- This configuartion option is no longer supported. Use NOTFORCE and
- a file mode including WRITETHRU to force updates (on a file by file basis)
- to disk. DO NOT USE WRITETHRU WITH A FILE SUPPORTING TRANSACTION LOGGING.
- #endif
-
- /* *********** NO_BOUND IMPLIES NOTFORCE *********** */
- #ifndef CTBOUND
- #ifdef FPUTFGET
- #undef FPUTFGET
- #define NOTFORCE
- #endif
- #endif
-
- /* *********** CTSUPER & RESOURCE IMPLY VARLDATA *********** */
- #ifdef CTSUPER
- #ifndef VARLDATA
- #define VARLDATA
- #endif
- #endif
- #ifdef RESOURCE
- #ifndef VARLDATA
- #define VARLDATA
- #endif
- #endif
-
- /* *********** FPUTFGET CANNOT SUPPORT TRANPROC *********** */
- #ifdef FPUTFGET
- #ifdef TRANPROC
- #undef TRANPROC
- #endif
- #endif
-
- /* *********** DEFINE MLTORTRN IF MULTITRD OR TRANPROC *********** */
- #undef MLTORTRN
- #ifdef MULTITRD
- #define MLTORTRN
- #endif
- #ifdef TRANPROC
- #ifndef MLTORTRN
- #define MLTORTRN
- #endif
- #endif
-
- /* *********** CTSERVER & MULTITRD ARE MUTUALLY EXCLUSIVE ********* */
- #ifdef CTSERVER
- #ifdef MULTITRD
- *** CTSERVER & MULTITRD are mutually exclusive ***
- #endif
- #endif
-
- /* *********** GNSERVER indicates either CTSERVER or MULTITRD ****** */
- #ifdef GNSERVER
- #undef GNSERVER
- #endif
- #ifdef CTSERVER
- #define GNSERVER
- #endif
- #ifdef MULTITRD
- #define GNSERVER
- #endif
-
- /* *********** FPUTFGET CANNOT BE USED WITH THE SERVER ********* */
- #ifdef GNSERVER
- #ifdef FPUTFGET
- #undef FPUTFGET
- #define NOTFORCE
- #endif
- #endif
-
- /* *********** MUSTFRCE indicates multi-user requirements ********* */
- #ifdef MUSTFRCE
- #undef MUSTFRCE
- #endif
- #ifdef FPUTFGET
- #define MUSTFRCE
- #endif
- #ifdef GNSERVER
- #define MUSTFRCE
- #endif
-
- /* *********** DOSFLUSH APPLIES ONLY TO FPUTFGET ********* */
- #ifdef NOTFORCE
- #ifdef DOSFLUSH
- #undef DOSFLUSH
- #define NO_FLUSH
- #endif
- #endif
-
- /* *********** CTASYNCR APPLIES ONLY TO MULTITRD ********** */
- #ifdef CTASYNCR
- #ifndef MULTITRD
- #undef CTASYNCR
- #endif
- #endif
-
- /* ************* UNIFRMAT APPLIES ONLY TO HIGH_LOW ************* */
- #ifdef LOW_HIGH
- #ifdef UNIFRMAT
- #undef UNIFRMAT
- #define NO_UNIFM
- #endif
- #endif
-
- /* ************* UNIFRMAT DOES NOT SUPPORT TRANPROC ************* */
- #ifdef UNIFRMAT
- #ifdef TRANPROC
- ???? cannot compile a UNIFRMAT/TRANPROC c-tree LIBRARY ????
- #endif
- #endif
-
- /* ************* ************* ************* ************ ************* */
-
- #define PERMFLAG (VLENGTH | PREIMG | LOGFIL | WRITETHRU | CHECKLOCK | SUPERFILE | CHECKREAD)
-
- #define NUMCHANEL 2 /* # io channels per file when DUPCHANEL on */
- #define MRKSIZ 4 /* exceptional element marks per byte */
-
- #define MAXLEV 11 /* maximum height of B-Tree + 1 */
- #define VARI_LEN (SIZEOF(VRLEN) + 2 * SIZEOF(LONG))
- #define STATUS 18
-
- #define HDRSIZ 128
- /* permanent header information */
- #define DHDRSIZ HDRSIZ
-
- #define PDZ 2 /* padding size */
- #define EXZ 8 /* Maximum IFIL name extension size */
- #define PWZ 10 /* Maximum password length (including terminator) */
- #define IDZ 32 /* Maximum ID name length (including terminator) */
- #define DSZ 64 /* group/user description information */
- #define FNZ 256 /* parm block maximum name size */
-
- #ifdef VINES
- #define STZ 64 /* streettalk length */
- #endif
-
- #ifdef FPUTFGET
- #define PRDRPEAT 10 /* # of times to retry predsr node */
- #else
- #define PRDRPEAT 0
- #endif
-
- #define MAXMEMB 31 /* maximum additional index members */
-
- typedef struct ugrup {
- TEXT groupid[IDZ]; /* ASCIIZ group id */
- } UGRUP;
- #ifdef ctSP
- typedef UGRUP far * pUGRUP;
- #else
- typedef UGRUP ctMEM * pUGRUP;
- #endif
- #define MAX_UGRUP 128 /* maximum number of user groups */
-
- #ifndef CTBOUND
- #define MAXVABS 3 /* input segments */
- #define OUTSEG (MAXVABS + 1) /* output segment */
- #define BEGMSG_OFFSET (OUTSEG * SIZEOF(VRLEN))
- #define INPUT_OFFSET (BEGMSG_OFFSET + SIZEOF(reqPARMB))
- #define OUTPUT_OFFSET (BEGMSG_OFFSET + SIZEOF(rspPARMB))
- #ifdef ctSP
- #define MsgLen(mp,i) *(((VRLEN far *) mp) + i - 1)
- #else
- #define MsgLen(mp,i) *(((VRLEN *) mp) + i - 1)
- #endif
- #endif
-
- /* ******************************************************************** */
- /* *** SYMBOLIC CONSTANTS *** */
- /* ******************************************************************** */
-
- #define DRNZERO (ctRECPT) 0
- #define NODEZERO (LONG ) 0
-
- #define MIRRORD 0x0001 /* xflmod */
- #define ADMOPEN 0x1000 /* flmode */
-
- #define FRCEADJ 16
- #define THRUADJ 32
- #define CTREAD 0
- #define CTWRITE 1
- #define CTWASYN 2
- #define CTNONE 3
- #define CTXTND 4
- #define CTCLRBF 5
- #define CTREADP 8
- #define CTFRED (CTREAD | FRCEADJ)
- #define CTFWRT (CTWRITE | FRCEADJ)
- #define CTURED (CTREAD | THRUADJ)
- #define CTUWRT (CTWRITE | THRUADJ)
-
- #ifdef ctSQL
- #define SSO 1 /* SS (strict serializer) logical Open lock */
- #define SSCI 2 /* SS commit intent lock */
- #define SSC 3 /* SS commit lock */
- #define NSCI 4 /* NS (nonstrict serializer) commit intent lock */
- #define NSC 5 /* NS commit lock */
- #endif
- #define RDL 6 /* read lock */
- /* #define WRL 7 ** write lock held to reader commits */
- /* #define CIL 8 ** pending WRL to WXL promotion */
- #define WXL 9 /* exclusive write lock */
- #define WXH 10 /* exclusive write lock (no aggregate check) */
-
- #define RES_SRVR 256
-
- #define LEAF 1
- #define NOLEAF 0
-
- #define ALPHAKEY '\0'
-
- /*
- ** obsolete key types: no longer supported.
- **
- INTKEY
- SFLOATKEY
- DFLOATKEY
- **
- */
-
- #define COL_PREFIX '\4' /* leading character compression */
- #define COL_SUFFIX '\10' /* 8 decimal: padding compression */
- #define COL_BOTH '\14' /* 12 decimal: both of the above */
- #define ALT_SEQ '\20' /* 16 decimal: alternative col sequence */
- #define MSK_ALT ~ALT_SEQ
-
- #define DUPKEY '\1'
- #define NODUPKEY '\0'
-
- #define REGULAR '\1'
- #define DUPLEAF '\0'
- #define DUPNONL '\3'
-
- #define DAT_CLOSE 0
- #define IDX_CLOSE 1
- #define VAT_CLOSE 2
-
- #define NON_SUPER 0
- #define HST_SUPER 1
- #define MBR_SUPER 2
- #define IDX_SUPER 6
- #define SUPADD 16
- #define MODMODE 32
- #define CHGADD 64
-
- #define SECSIZ 128 /* logical sector size. DO NOT CHANGE. */
- #define CTBUFSIZ (MAX_NAME + 1) /* ct_buf[] size */
- #define UPDATED C255 /* C255 defined in ctcmpl.h */
- #define DELFLG C255
- #define RESFLG C254
- #define COMPACT '\143' /* file compaction flag: must rebuild indices */
- #define CTBADOPN '\122' /* file corrupt on open */
- #define CTBADLOP '\114' /* leaf level loop: must rebuild indices */
- #define CMPMSK 0x00ff
-
- #define MAXAGE 0xffff /* max age of lru counter before roll-over */
- #define MAXSRLPOS 0xffff /* no serial segment flag */
-
- #define LH_VER 0x0001 /* LOW_HIGH option */
- #define HL_VER 0x0002 /* HIGH_LOW " */
-
- #define ADD_LOCK 0 /* cts_lok() flag: adding a lock */
- #define RED_LOCK 1 /* check if red locked */
- #define MST_LOCK 2 /* check if wrt locked */
-
- /* *********** DEFINE LOCKING REQUIREMENTS & TESTS *********** */
- #define LOCK_TEST MST_LOCK
-
- #define SHDSRCH 64 /* no preimg search */
- #define TRANMSK (~SHDSRCH)
-
- #define LHDRCOMP 1
- #define SH_HDRCP (LHDRCOMP | SHDSRCH)
- #define LADDKEY 2
- #define SH_ADDKY (LADDKEY | SHDSRCH)
- #define LADDSI (LADDKEY + 1)
- #define LDELKEY 4
- #define SH_DELKY (LDELKEY | SHDSRCH)
- #define LDELSI (LDELKEY + 1)
- #define SH_INVLD 6
- #define BEGTRAN 7
- #define SH_BEGTRAN (BEGTRAN | SHDSRCH)
- #define ENDTRAN 8
- #define ABRTRAN 9
- #define SH_NLINK 10
- #define NEWLINK SH_NLINK
- #define SH_VLINK 11
- #define SH_IMAGE 12
- #define NEWIMAGE SH_IMAGE
- #define OLDFILL 13
- #define OLDIMAGE 14
- #define DIFIMAGE 15
- #define RDYTRAN 16
- #define LHDRSHST 17
- #define LOGEXTFIL 18
- #define SH_EXTFIL (LOGEXTFIL | SHDSRCH)
- #define NODEXTFIL 19
- #define SH_QNODE 20
- #define LHDRWORD 21
- #define SH_HDRWORD (LHDRWORD | SHDSRCH)
- #define UNDTRAN 22
- #define BEG2FASE 23
- #define ACK2FASE 24
- #define SH_RSTFIL 25
- #define LOGRSTFIL SH_RSTFIL
-
- #define CHKPNT 26
- #define OPNTRAN 27
- #define CRETRAN 28
- #define DELTRAN 29
- #define CLSTRAN 30
- #define LLOGIN 31
- #define LLOGOFF 32
- #define UPDTRAN 33
- #define ENDLOG 34
- #define LPRMIDX 35
-
- #define RESTRAN 36
- #define SH_WRITE 37
- #define SH_REUSE (38 | SHDSRCH)
- #define SH_RSTRUS 39
- #define ABNTRAN 40
- #define LPABYTE 41
- /* reserve 42 through 50 for tran types that get their own trannum */
- #define getTRANNUM 50
- #define CMPTRAN 51
- /* reserve 52 through 63 for tran types that use current trannum */
-
- #define FILEOFFS 12
- #define COMITRAN 1L
- #define FIRSTRAN 2L
-
- #define NOCTCLUP 1
- #define BUFRLOCK 2
- #define GNS 3
-
- #define TRN_AFLAG 1
- #define TRN_ANODE 1
- #define TRN_ADATA 3
- #define TRN_AABRT 5
-
- #define TRN_DNODE 2
- #define TRN_DDATA 4
- #define TRN_DABRT 6
-
-
- #define DL_SRCH 0
- #define DL_ADDR 1
- #define DL_DLTR 2
- #define DL_RVRS 3
- #define DL_TADR 4
- #define DL_TDLT 5
-
- #define CURKEY 0
- #define TMPKEY 1
-
- #define AVLIST 0 /* bhl[0] bavl[0] */
- #define DALIST 1 /* datbhl[0] bavl[1] */
- #define INLIST 2 /* bhl[1] bhla[0] */
- #define DULIST 3 /* datbhl[1] bhla[1] */
- #define NUMANCHOR 2
- #ifdef MULTITRD
- #define PNLIST 4 /* bhl[2] bhla[2] */
- #define DPLIST 5 /* datbhl[2] bhla[3] */
- #undef NUMANCHOR
- #define NUMANCHOR 4
- #endif
-
- /*
- **
- ** The following modules all use the FCS file extent: ctopt2.h, ctscrt.h,
- ** ctclb2.c, ctclb3.c, ctdump.c, ctldmp.c, ctrdmp.c, ctsadm.c ctsrvr.c.
- **
- */
- #define FAIRCOMS "FAIRCOMS"
-
- #define ADMIN "ADMIN"
- #define GUEST "GUEST"
- #ifdef MLTORTRN
- #define FAIRSQLS "SQL.FCS"
- #endif
-
- #define CT_V60 0 /* Version 6 Release Flag */
- #define NEWIFIL
-
- /* File Format Indicators */
- #define CT_V6 0x0080 /* c-tree version 6.0 */
-
- #define DEF_MASK_IFIL2 0x0001L /* extended IFIL structures */
- #define DEF_MASK_SPCMGT 0x0002L /* unambig superfile space mgmt */
- #define DEF_MASK_PSCL24 0x0004L /* complete Pascal string def */
-
- #ifdef ctPASCALst
- #ifndef ctNotPASCAL24
- #define ctPASCAL24
- #endif
- #endif
-
- #ifndef FPUTFGET
- #define gtroot(knum) (knum->root)
- #endif
- #ifdef GNSERVER
- #define cthkey(knum) (knum->hmem)
- #else
- #define cthkey(knum) (knum->kmem ? ctkey(knum->filnum - knum->kmem) : knum)
- #endif
-
- #define ctDATEXT ".dat"
- #define ctIDXEXT ".idx"
- #define UGFNAME "FAIRCOM.FCS"
- #define UGFMODE (SHARED | TRNLOG | SUPERFILE | ADMOPEN)
-
- #ifndef ctSQL
- #define ctNONSQL
- #else
- #define NOEXITREPLACEMENT
- #endif
- #include "ctssql.h"
-
- typedef struct align_test {
- LONG m1;
- char m2;
- LONG m3;
- } ALIGN_TEST;
- typedef struct align_bcd {
- double m1;
- char m2;
- SQL_DEC m3;
- } ALIGN_BCD;
- typedef struct align_tim {
- double m1;
- char m2;
- SQL_D_TIME m3;
- } ALIGN_TIM;
-
- #ifndef ALIGNMENT_COMP
- #define ALIGNMENT_COMP (SegOff(ALIGN_TEST,m3) - SegOff(ALIGN_TEST,m2))
- #endif
- #define ALIGNMENT_BCD (SegOff(ALIGN_BCD ,m3) - SegOff(ALIGN_BCD ,m2))
- #define ALIGNMENT_TIM (SegOff(ALIGN_TIM ,m3) - SegOff(ALIGN_TIM ,m2))
-
- #ifdef REVBIN
- #undef REVBIN
- #endif
- #ifdef LOW_HIGH
- #define REVBIN
- #endif
- #ifdef HIGH_LOW
- #ifdef UNIFRMAT
- #define REVBIN
- #endif
- #endif
-
- #define NAMILEN 12
- #define NAMINDX 0
- #define LOGINDX 1
-
- #define CO_BASE 1
- #define CO_CREATE 2
- #define CO_MEMBER 3
- #define CO_REGULAR 4
-
- #define ctSQL_FILES 8
- #define ctTRN_FILES 3
- #define ctRT_FILES 3
-
- #ifndef PARM2
- #define ctreeVARLST
- #define PARM2
- #define PARM3
- #define PARM4
- #define PARM5
- #define PARM6
- #define PARM7
- #endif
-
- #ifdef ctLOCLIB
- #ifdef PROTOTYPE
- #ifdef ctreeVARLST
- typedef ctCONV COUNT (ctVDECL *pCEPFNC)();
- #else
- typedef ctCONV COUNT (ctVDECL *pCEPFNC)(COUNT ,COUNT ,pVOID ,pLONG ,
- pVOID ,pVRLEN ,COUNT );
- #endif
- #else /* PROTOTYPE */
- typedef ctCONV COUNT (ctVDECL *pCEPFNC)();
- #endif /* PROTOTYPE */
- #endif /* ctLOCLIB */
-
- #ifdef ctNOGLOBALS
- #define ctREG_DEF_ID "ctREG_DEF_ID"
- #endif
-
- #define ctSRVRSIDE 1
- #define ctCLNTSIDE 2
- #ifdef ctSEMCOM
- #define LCLNT 3
- #define LSRVR 4
- #else
- #define LCLNT lclnt
- #define LSRVR lsrvr
- #define ctcomrqs(l,sem,wait,by) ctblkrqs(&l->sem,wait,-2)
- #define ctcomwat(l,sem,wait,by) ctblkwat(&l->sem,wait,-1)
- #define ctcomclr(l,sem,by) ctblkclr(&l->sem,-1)
- #endif
-
- #endif /* ctOPT2H */
-
- /* end of ctopt2.h */
-