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 ctGVARH
- #define ctGVARH
-
- #ifdef VINES
- #ifdef RUNTCBTABLE
- #include "tasker.h"
- #endif
- #endif
-
- #ifdef MTDEBUG
- EXTERN int bomb;
- #endif
- #ifdef MTRCVR
- EXTERN int ebomb;
- #endif
- #include "ctrkey.h"
-
- /* #ifndef ctCLIENT */
- #include "ctstrc.h"
- #ifdef TRANPROC
- #include "cttran.h"
- #endif
- /* #endif */
-
- typedef struct {
- #ifdef RTREE
- RKEY s1usrkey;
- RDAT s1usrdat;
- #endif
- COUNT s1ct_dtmap;
- COUNT s1ct_rvmap;
- #ifdef ctCONDIDX
- COUNT s1ct_rlkey;
- #endif
- COUNT s1ct_nlkey;
- TEXT s1ct_nlchr;
- TEXT s1ct_vfin;
- } CTIS1;
- typedef CTIS1 ctMEM * pCTIS1;
-
- typedef struct {
- COUNT s2ct_sgpos;
- COUNT s2ct_sglen;
- COUNT s2ct_sgmod;
- } CTIS2;
- typedef CTIS2 ctMEM * pCTIS2;
- typedef CTIS2 ctMEM * ctMEM * ppCTIS2;
-
- typedef struct reblst {
- struct reblst ctMEM * nxtreb;
- LONG trnreb;
- COUNT numreb;
- COUNT flgreb;
- TEXT namreb[MAX_NAME];
- TEXT tmpreb[MAX_NAME];
- } REBLST;
- typedef REBLST ctMEM * pREBLST;
- typedef REBLST ctMEM * ctMEM * ppREBLST;
-
- /* Global Variables */
-
- #ifdef ctNOGLOBALS
-
- #ifdef ctLOCLIB
- #define CTBOUNDvar
- #define UNBOUNDvar
- EXTERN pCOUNT (*ctlfseggetp)();
- EXTERN VOID (*ctlfsegputp)();
- EXTERN COUNT (*ctgetseginfop)();
- #endif
-
- #ifdef CTBOUND
- #ifndef CTBOUNDvar
- #define CTBOUNDvar
- #endif
- #else /* CTBOUND */
- #ifndef UNBOUNDvar
- #define UNBOUNDvar
- #endif
- #endif /* CTBOUND */
-
- typedef struct ctgvars
- {
- #ifdef ctLOCLIB
- pCEPFNC ctcepfnc;
- #endif
- struct ctgvars ctMEM
- *pinstance; /* instance link */
- pVOID psysvar; /* pointer to system-wide variables */
- LONG sctnusers; /* number of users */
- LONG sctdivs;
- LONG sctops; /* set operation state bit mask */
- VRLEN sctxvlen; /* vlen combined op max buffer length */
- VRLEN ssql_len;
- NINT scthshift; /* huge shift */
- NINT sctmaxparm;
- COUNT suerr_cod; /* user error cod */
- COUNT ssysiocod; /* system error cod */
- COUNT sisam_err;
- COUNT sisam_fil;
- COUNT ssql_status1;
- COUNT ssql_status2;
- COUNT sct_mxfil; /* maximum files specified in intree. */
- COUNT sctusrprf; /* user profile word */
- #ifdef ISAM_VARS
- #ifdef RTREE
- COUNT ssrtknm,ssrtdat,stmpdat;
- #endif
- #endif
- TEXT instname[IDZ]; /* name of this instance block */
- UTEXT sct_uflvr;
- UTEXT sct_ualgn;
- UTEXT sct_upntr; /* client pointer size */
-
- #ifdef CTBOUNDvar
- LSTANC sctlist[NUMCTLIST];
-
- pFarCmdPtr scommCmds[MAXCOMMP];
- #ifdef ctNOCOMMGLOBALS
- pVOID commGbls[MAXCOMMP];
- #endif
- CTFILE sctfmru;
- pCTFILE sct_mru;
- ppCTFILE sctfcbhdr;
- ppctICON sctconanc;
- pTREBUF sct_btree; /* ptr to beg of b-tree buffers */
- pDATBUF sct_dbufr; /* ptr to beg of data file buffers */
- pCTFILE sct_key; /* ptr to beg of ct_key file structures */
- pCTFILE sct_dat; /* ptr to beg of data file structures */
- pCTFILE sct_vat; /* ptr to beg of var data file struc */
- pLOKS sct_locks[LOKHBINS];
- pLOKS sct_ltail[LOKHBINS];
- LONG sct_spc;
- LONG sct_dbrqs; /* data buffer requests */
- LONG sct_dbhit; /* data buffer hits */
- LONG sct_ibrqs; /* index buffer requests */
- LONG sct_ibhit; /* index buffer hits */
- LONG sct_rdops; /* number of read operations */
- LONG sct_rdbyt; /* bytes read */
- LONG sct_wrops; /* number of write operations */
- LONG sct_wrbyt; /* bytes written */
- LONG sct_abnod; /* abort list node count */
- LONG sct_cmnod; /* pending node tran count */
- LONG sct_cmdat; /* pending data tran count */
- #ifdef DBG749x
- UINT sctlstfrq;
- #endif
- UINT sct_tmpseq; /* temporary file sequence number */
- UINT sct_lhbins;
- UINT sctconbins; /* context bins */
- NINT sct_dq; /* shrink task logical Q handle */
- NINT sct_cq; /* checkpoint task logical Q handle */
- NINT sctfnz; /* superfile member max name size */
- NINT sctmiroff; /* if YES, turn off all mirroring */
- COUNT sctconid; /* last assigned context id */
- #ifdef TRANPROC
- pREBLST sctrebhed;
- pREBLST sctcmphed;
- pREBLST sctmirhed;
- pREBLST sctiblhed;
- ppSHADLST sct_ubit;
- pTEXT sctmrklst;
- pTEXT sct_usrsp;
- pSHADLST sct_usrsl;
- pTEXT sctlgbf; /* transaction log buffer ptr */
- ppSHADLST sctlstshd; /* linked list tail for pre-image list */
- ppSHADLST sctlstsav; /* last save point pointer */
- pCTFILE sctLnum;
- pCTFILE sctUnum;
- pCTFILE sctSnum;
- CTFILE sctLfil; /* log file header */
- CTFILE sctUfil; /* log file header */
- CTFILE sctSfil[2]; /* start file headers */
- LONG sctusrsum;
- LONG sctusrtot;
- LONG sctdmptim; /* dynamic dump beginn time */
- LONG sctdlgnum; /* beginning log during dump */
- LONG sctelgnum; /* ending log during dump */
- LONG sctdlgpos; /* position in ctdlgnum */
- LONG sctelgpos; /* position in ctelgnum */
- LONG sctcpcnt; /* check point count */
- LONG sctcpchk; /* check point count less delta */
- LONG sct_lstlog; /* previous checkpoint log# */
- LONG sct_lstpos; /* previous checkpoint log position */
- LONG sct_usrtr[MXU2];/* active transaction # for user or zero */
- LONG sct_usrtl[MXU2];/* log file sequence number for BEGTRAN */
- VRLEN sct_lbfsiz; /* log buffer size */
- VRLEN sct_usrsz;
- UINT sct_shbins;
- UINT sct_shbyts;
- NINT sctfstr;
- NINT sct_chktrd;
- NINT sct_chkflg; /* checkpoint in progress flag */
- NINT sct_logkep; /* archive log count */
- NINT sctskpfil; /* skip missing files during recovery */
- NINT sctskpmir; /* skip missing mirrors during recovery */
- COUNT sct_usrty[MXU2];/* SHADOW / LOGFIL transaction type */
- COUNT sctshdlfil; /* shadow swap file # */
- COUNT sct_lgn; /* current file# in log */
- COUNT sctsflg; /* ct_strip flag */
- COUNT sctbflg; /* BAKMOD flag */
- COUNT sctdflg; /* dynamic dump flag */
- COUNT sct_actrns; /* # active transactions */
- COUNT sct_lerflg; /* ctwrtlog error flag */
- COUNT sct_usrsi;
- COUNT sct_usrsv;
- COUNT sct_rstflg; /* TRANRST() flag */
- TEXT sct_chkpt[MXU2];/* check point flag */
- #endif /* TRANPROC */
- VRLEN sct_bfsiz; /* data buffer size */
- COUNT sctrdmp_flg; /* signals dynamic dump recovery */
- COUNT sctmdmp_flg; /* signals dyn dump recovery had mirrors*/
- COUNT sctrflg; /* automatic recovery flag */
- COUNT sctrbflg; /* rebuild flag */
- COUNT sctfnstrat; /* file name conversion startegy */
- COUNT scttflg; /* stop server in progress */
- COUNT sct_mxu1; /* max users plus origin */
- COUNT sct_cmnown; /* common onwer number (semaphores) */
- COUNT sct_hshft; /* hash shift parameter */
- COUNT sct_hbins; /* hash bins for buffers */
- COUNT sct_dshft; /* datbuf hash shift parm */
- COUNT sct_dbins; /* datbuf hash bins */
- BHL sct_bavl[2]; /* buffer avl list anchors */
- ppBHL sct_bhla[NUMANCHOR];/* buffer hash list anchors */
- pTEXT sctsdname; /* server directory name */
- pTEXT sctsvname; /* server name */
- pTEXT sctsqname; /* server SQL name */
- #ifdef VINESLOG
- TEXT sctlgname[MAX_NAME];
- /* server status log name */
- #endif
-
- pTEXT sctscommp[MAXCOMMP];
- /* server comm protocol */
- pTEXT sct_del; /* constant 0xff array */
- UINT sct_delsiz; /* size of 0xff array */
- UINT scts_list_m; /* list memory block size */
- UINT scts_sort_m; /* sort memory buffer size */
- UINT scts_bufr_m; /* bufr memory block size */
- TEXT sctifl_ext[2][EXZ];
- /* default IFIL extensions */
-
- COUNT sct_mxbuf; /* maximum buffers specified in intree */
- COUNT sct_dxbuf; /* maximum data file buffers */
- COUNT sct_ndsec; /* # of sectors per node specified in intree */
- COUNT sct_maxvfil; /* virtual file limit */
- COUNT sct_numvfil; /* number of virtual files open */
- COUNT sct_avlfil; /* available file control block counter */
- COUNT sct_ver; /* defines configuration options */
- TEXT sctsupsep;
-
- COUNT scts_maxlok; /* maximum locks */
-
- #ifdef ctOldALCBAT
- COUNT sbatmax;
- COUNT sbatnum;
- pBATHDR ssavbat;
- #else
- pSAVBAT sbatnum;
- ppSAVBAT
- ssavbat;
- #endif
- BATHDR batch;
- LONG sct_npath[MAXLEV]; /* array to trace path down B-tree. Assumes */
- /* maximum of MAXLEV - 1 levels in B-tree. */
- COUNT sct_nelem[MAXLEV];
- COUNT sct_tight[MAXLEV];
- COUNT sct_melem[MAXLEV];
-
- TEXT sct_dupkey[MAXLEN+1];/* for searches of duplicate keys */
- TEXT sspkey[MAXLEN+1]; /* temporary storage for key values during */
- /* node updates */
-
- COUNT sct_elm; /* position within B-Tree node */
- COUNT sct_tky; /* result of comparison between target */
- /* value and index entry. */
- /* ct_tky < 0 => target < index entry */
- /* = 0 => target = index entry */
- /* > 0 => target > index entry */
- COUNT sct_tkp; /* previous value of ct_tky */
- COUNT sct_sfxctp; /* previous value of suffix count */
- LONG sct_lnode; /* last node found during walk down tree */
- LONG sct_fnode; /* node found during search/retrieval */
- LONG sct_nwnod; /* pointer to new node */
- LONG sct_gsrl; /* next serial number for data file */
- COUNT sct_trdflg; /* thread operation flag */
- COUNT sbtlev; /* b-tree level counter. used as index of */
- /* ct_npath */
- TEXT sct_buf[CTBUFSIZ]; /* temporary io buffer */
-
- /*
- ** ISAM global variables from ctisam.h
- */
-
- #ifdef ISAM_VARS
- COUNT sctskymap[MAXFIL][MAX_DAT_KEY];
- CTIS1 sctis1[MAXFIL];
- CTIS2 sctis2[MAXFIL][MAX_KEY_SEG];
-
- TEXT sct_fndval[MAXLEN];
-
- COUNT sct_nwrcfg;
- COUNT sct_vfsg;
-
- COUNT sct_ismlk;
-
- #ifdef ctOldALCSET
- pSAVSET sct_savset;
-
- COUNT sseqlen; /* significant length of key */
- COUNT sseqkey; /* current keyno */
- COUNT sseqnum; /* current set number */
- COUNT smaxqset;
- #else
- ppSAVSET
- sct_savset; /* pointer to hash anchors */
- pSAVSET sseqnum; /* current set pointer */
- COUNT sseqlen; /* significant length of key */
- COUNT sseqkey; /* current keyno */
- #endif
- TEXT sseqbuf[MAXLEN]; /* holds matching "partial" key */
- #ifdef MUSTFRCE
- TEXT sseqold[MAXLEN];
- #endif
- #endif
-
- TEXT sl_lastkey[MAXLEN];
- LONG sl_begnod;
- LONG sl_curnod;
- LONG sl_prvnod;
- LONG sl_numnod;
- LONG sl_ct_nnods[MAXLEV];
- COUNT sl_elem;
- COUNT sl_started;
- pTREBUF sl_savbp;
- VRLEN sl_hdradj;
-
- COUNT stranactv;
- COUNT stransavp;
- UCOUNT slstsiz[NUMCTLIST];
- #ifdef DBG749x
- UINT slstchk[NUMCTLIST];
- #endif
- VRLEN slstcnt[NUMCTLIST];
- #endif /* CTBOUNDvar */
- #ifdef UNBOUNDvar
- pTEXT sctusrbuf;
- #ifdef ctCLIENT
- pLQMSG sctlqmsg;
- pLOCLFILE shlocl;
- pLOCLAUX shauxl;
- #else
- pVOID ctlqfake;
- pVOID hloclfake;
- pVOID hauxlfake;
- #endif
- VRLEN sctusrlen;
- VRLEN sctusrpos;
- VRLEN sctsrvlen;
- UTEXT sctsflvr[8];
- TEXT sctnodnam[IDZ];
- NINT sct_lq; /* logon logical Q handle */
- NINT sctautotfrm;
- NINT sctmaxdatkey;
- NINT sctisam_flg;
- NINT sct_autopos_clr;
- COUNT sctsrvver;
- #endif /* UNBOUNDvar */
-
- } CTGVAR, ctMEM * pCTGVAR;
- EXTERN pCTGVAR ctWNGV;
-
- #define ctumxfil ct_mxfil
- #define cthghfil ct_mxfil
- #ifdef CTBOUND
- #define ctrebhed ctWNGV->sctrebhed
- #define ctcmphed ctWNGV->sctcmphed
- #define ctmirhed ctWNGV->sctmirhed
- #define ctiblhed ctWNGV->sctiblhed
- #define lstsiz ctWNGV->slstsiz
- #ifdef DBG749x
- #define lstchk ctWNGV->slstchk
- #endif
- #define lstcnt ctWNGV->slstcnt
- #define ctlist ctWNGV->sctlist
-
- #define commCmds ctWNGV->scommCmds
- #ifdef ctNOCOMMGLOBALS
- #define commGbls ctWNGV->commGbls
- #endif
- #define ctfmru ctWNGV->sctfmru
- #define ct_mru ctWNGV->sct_mru
- #define ctfcbhdr ctWNGV->sctfcbhdr
- #define ctconanc ctWNGV->sctconanc
- #define ctconid ctWNGV->sctconid
- #define ctconbins ctWNGV->sctconbins
- #define ct_btree ctWNGV->sct_btree
- #define ct_dbufr ctWNGV->sct_dbufr
- #define ct_key ctWNGV->sct_key
- #define ct_dat ctWNGV->sct_dat
- #define ct_vat ctWNGV->sct_vat
- #ifdef DBG749x
- #define ctlstfrq ctWNGV->sctlstfrq
- #endif
- #define ct_tmpseq ctWNGV->sct_tmpseq
- #define ct_lhbins ctWNGV->sct_lhbins
- #define ct_locks ctWNGV->sct_locks
- #define ct_ltail ctWNGV->sct_ltail
- #define ct_spc ctWNGV->sct_spc
- #define ct_dbrqs ctWNGV->sct_dbrqs
- #define ct_dbhit ctWNGV->sct_dbhit
- #define ct_ibrqs ctWNGV->sct_ibrqs
- #define ct_ibhit ctWNGV->sct_ibhit
- #define ct_rdops ctWNGV->sct_rdops
- #define ct_rdbyt ctWNGV->sct_rdbyt
- #define ct_wrops ctWNGV->sct_wrops
- #define ct_wrbyt ctWNGV->sct_wrbyt
- #define ct_abnod ctWNGV->sct_abnod
- #define ct_cmnod ctWNGV->sct_cmnod
- #define ct_cmdat ctWNGV->sct_cmdat
- #define ct_dq ctWNGV->sct_dq
- #define ct_cq ctWNGV->sct_cq
- #define ctfnz ctWNGV->sctfnz
- #ifndef BOUND
- #define ct_lq ctWNGV->sct_lq
- #endif
- #define ctmiroff ctWNGV->sctmiroff
- #ifdef TRANPROC
- #define ct_ubit(owner) ctWNGV->sct_ubit
- #define ctmrklst ctWNGV->sctmrklst
- #define ct_usrsp ctWNGV->sct_usrsp
- #define ct_usrsl ctWNGV->sct_usrsl
- #define ct_usrsz ctWNGV->sct_usrsz
- #define ctusrsum ctWNGV->sctusrsum
- #define ctusrtot ctWNGV->sctusrtot
- #define ct_usrsi ctWNGV->sct_usrsi
- #define ct_usrsv ctWNGV->sct_usrsv
- #define ct_rstflg ctWNGV->sct_rstflg
- #define ct_shbins ctWNGV->sct_shbins
- #define ct_shbyts ctWNGV->sct_shbyts
- #define ctfstr ctWNGV->sctfstr
- #define ct_chktrd ctWNGV->sct_chktrd
- #define ctlgbf ctWNGV->sctlgbf
- #define ctlstshd ctWNGV->sctlstshd
- #define ctlstsav ctWNGV->sctlstsav
- #define ctLnum ctWNGV->sctLnum
- #define ctUnum ctWNGV->sctUnum
- #define ctSnum ctWNGV->sctSnum
- #define ctLfil ctWNGV->sctLfil
- #define ctUfil ctWNGV->sctUfil
- #define ctSfil ctWNGV->sctSfil
- #define ctdmptim ctWNGV->sctdmptim
- #define ctdlgnum ctWNGV->sctdlgnum
- #define ctelgnum ctWNGV->sctelgnum
- #define ctdlgpos ctWNGV->sctdlgpos
- #define ctelgpos ctWNGV->sctelgpos
- #define ctcpcnt ctWNGV->sctcpcnt
- #define ctcpchk ctWNGV->sctcpchk
- #define ct_lstlog ctWNGV->sct_lstlog
- #define ct_lstpos ctWNGV->sct_lstpos
- #define ct_usrtr ctWNGV->sct_usrtr
- #define ct_usrtl ctWNGV->sct_usrtl
- #define ct_lbfsiz ctWNGV->sct_lbfsiz
- #define ct_chkflg ctWNGV->sct_chkflg
- #define ct_logkep ctWNGV->sct_logkep
- #define ctskpfil ctWNGV->sctskpfil
- #define ctskpmir ctWNGV->sctskpmir
- #define ct_usrty ctWNGV->sct_usrty
- #define ctshdlfil ctWNGV->sctshdlfil
- #define ct_lgn ctWNGV->sct_lgn
- #define ctsflg ctWNGV->sctsflg
- #define ctbflg ctWNGV->sctbflg
- #define ctdflg ctWNGV->sctdflg
- #define ct_actrns ctWNGV->sct_actrns
- #define ct_lerflg ctWNGV->sct_lerflg
- #define ct_chkpt ctWNGV->sct_chkpt
- #endif
- #define ct_bfsiz ctWNGV->sct_bfsiz
- #define ctrdmp_flg ctWNGV->sctrdmp_flg
- #define ctmdmp_flg ctWNGV->sctmdmp_flg
- #define ctrflg ctWNGV->sctrflg
- #define ctrbflg ctWNGV->sctrbflg
- #define ctfnstrat ctWNGV->sctfnstrat
- #define cttflg ctWNGV->scttflg
- #define ct_mxu1 ctWNGV->sct_mxu1
- #define ct_cmnown ctWNGV->sct_cmnown
- #define ct_hshft ctWNGV->sct_hshft
- #define ct_hbins ctWNGV->sct_hbins
- #define ct_dshft ctWNGV->sct_dshft
- #define ct_dbins ctWNGV->sct_dbins
- #define ct_bavl ctWNGV->sct_bavl
- #define ct_bhla ctWNGV->sct_bhla
- #define ctsdname ctWNGV->sctsdname
- #define ctsvname ctWNGV->sctsvname
- #define ctsqname ctWNGV->sctsqname
- #ifdef VINESLOG
- #define ctlgname ctWNGV->sctlgname
- #endif
- #define ctscommp ctWNGV->sctscommp
- #define cts_list_m ctWNGV->scts_list_m
- #define cts_sort_m ctWNGV->scts_sort_m
- #define cts_bufr_m ctWNGV->scts_bufr_m
- #define ctifl_ext ctWNGV->sctifl_ext
-
- #define ct_mxbuf ctWNGV->sct_mxbuf
- #define ct_dxbuf ctWNGV->sct_dxbuf
- #define ct_ndsec ctWNGV->sct_ndsec
- #define ct_maxvfil ctWNGV->sct_maxvfil
- #define ct_numvfil ctWNGV->sct_numvfil
- #define ct_avlfil ctWNGV->sct_avlfil
- #define ct_ver ctWNGV->sct_ver
- #define ct_del ctWNGV->sct_del
- #define ct_delsiz ctWNGV->sct_delsiz
- #define ctsupsep ctWNGV->sctsupsep
- #define cts_maxlok ctWNGV->scts_maxlok
- #define ct_savbat ctWNGV->ssavbat
- #define ctbatnum ctWNGV->sbatnum
- #define ctbatmax ctWNGV->sbatmax
- #define ctbatch ctWNGV->batch
- #define ct_npath ctWNGV->sct_npath
-
- #define ct_nelem ctWNGV->sct_nelem
- #define ct_tight ctWNGV->sct_tight
- #define ct_melem ctWNGV->sct_melem
-
- #define ct_dupkey ctWNGV->sct_dupkey
- #define spkey ctWNGV->sspkey
-
- #define ct_elm ctWNGV->sct_elm
- #define ct_tky ctWNGV->sct_tky
-
- #define ct_tkp ctWNGV->sct_tkp
- #define ct_sfxctp ctWNGV->sct_sfxctp
- #define ct_lnode ctWNGV->sct_lnode
- #define ct_fnode ctWNGV->sct_fnode
- #define ct_nwnod ctWNGV->sct_nwnod
- #define ct_gsrl ctWNGV->sct_gsrl
- #define ct_trdflg ctWNGV->sct_trdflg
- #define btlev ctWNGV->sbtlev
-
- #define ct_buf ctWNGV->sct_buf
-
- #ifdef ISAM_VARS
- #define ctskymap ctWNGV->sctskymap
- #define ctis1 ctWNGV->sctis1
- #define ctis2 ctWNGV->sctis2
-
- #define ct_fndval ctWNGV->sct_fndval
- #define ct_nwrcfg ctWNGV->sct_nwrcfg
- #define ct_vfsg ctWNGV->sct_vfsg
- #define ct_ismlk ctWNGV->sct_ismlk
- #define ct_savset ctWNGV->sct_savset
-
- #define seqbuf ctWNGV->sseqbuf
- #ifdef MUSTFRCE
- #define seqold ctWNGV->sseqold
- #endif
- #define seqlen ctWNGV->sseqlen
- #define seqkey ctWNGV->sseqkey
- #define seqnum ctWNGV->sseqnum
- #ifdef ctOldALCSET
- #define maxqset ctWNGV->smaxqset
- #endif /* ctOldALCSET */
- #endif
- #else /* CTBOUND */
- #define ctusrbuf ctWNGV->sctusrbuf
- #define ctlqmsg ctWNGV->sctlqmsg
- #define hlocl ctWNGV->shlocl
- #define hauxl ctWNGV->shauxl
- #define ctusrlen ctWNGV->sctusrlen
- #define ctusrpos ctWNGV->sctusrpos
- #define ctsrvlen ctWNGV->sctsrvlen
- #define ctsflvr ctWNGV->sctsflvr
- #define ctnodnam ctWNGV->sctnodnam
- #define ct_lq ctWNGV->sct_lq
- #define ctautotfrm ctWNGV->sctautotfrm
- #define ctmaxdatkey ctWNGV->sctmaxdatkey
- #define ctisam_flg ctWNGV->sctisam_flg
- #define ct_autopos_clr ctWNGV->sct_autopos_clr
- #define ctsrvver ctWNGV->sctsrvver
- #endif /* CTBOUND */
-
- #define ctnusers ctWNGV->sctnusers
- #define ctdivs ctWNGV->sctdivs
- #define ctops ctWNGV->sctops
- #define ctxvlen ctWNGV->sctxvlen
- #define sql_len ctWNGV->ssql_len
- #define cthshift ctWNGV->scthshift
- #define ctmaxparm ctWNGV->sctmaxparm
- #define uerr_cod ctWNGV->suerr_cod
- #define sysiocod ctWNGV->ssysiocod
- #define isam_err ctWNGV->sisam_err
- #define isam_fil ctWNGV->sisam_fil
- #define sql_status1 ctWNGV->ssql_status1
- #define sql_status2 ctWNGV->ssql_status2
- #define ct_mxfil ctWNGV->sct_mxfil
- #define ctusrprf ctWNGV->sctusrprf
- #ifdef ISAM_VARS
- #ifdef RTREE
- #define srtknm ctWNGV->ssrtknm
- #define srtdat ctWNGV->ssrtdat
- #define tmpdat ctWNGV->stmpdat
- #endif
- #endif
- #define ct_uflvr ctWNGV->sct_uflvr
- #define ct_ualgn ctWNGV->sct_ualgn
- #define ct_upntr ctWNGV->sct_upntr
-
- #ifdef PROTOTYPE
- ctCONV pCTGVAR ctDECL GetCtreeGV( void );
- ctCONV void ctDECL SetCtreeGV( pCTGVAR );
- ctCONV pCTGVAR ctDECL InitCtreeGV( void );
- ctCONV int ctDECL ViewCtreeError( unsigned int );
- #else
- ctCONV pCTGVAR ctDECL GetCtreeGV();
- ctCONV void ctDECL SetCtreeGV();
- ctCONV pCTGVAR ctDECL InitCtreeGV();
- ctCONV int ctDECL ViewCtreeError();
- #endif
-
-
- #else /* ctNOGLOBALS */
-
- #ifdef ctCLIENT
- EXTERN pTEXT ctusrbuf;
- EXTERN pLQMSG ctlqmsg;
- EXTERN pLOCLFILE hlocl;
- EXTERN pLOCLAUX hauxl;
- EXTERN VRLEN ctusrlen;
- EXTERN VRLEN ctusrpos;
- EXTERN VRLEN ctsrvlen;
- EXTERN UTEXT ctsflvr[8];
- EXTERN TEXT ctnodnam[IDZ];
- EXTERN NINT ct_lq;
- EXTERN NINT ctautotfrm;
- EXTERN NINT ctmaxparm;
- EXTERN NINT ctmaxdatkey;
- EXTERN NINT ctisam_flg;
- EXTERN NINT ct_autopos_clr;
- EXTERN COUNT ctsrvver;
-
- EXTERN LONG ctnusers; /* number of users */
- EXTERN LONG ctdivs;
- EXTERN LONG ctops; /* set operation state bit mask */
- EXTERN VRLEN ctxvlen; /* vlen combined op max buffer length */
- EXTERN VRLEN sql_len;
- EXTERN NINT cthshift; /* huge shift */
- EXTERN COUNT uerr_cod; /* user error cod */
- EXTERN COUNT sysiocod; /* system error cod */
- EXTERN COUNT isam_err;
- EXTERN COUNT isam_fil;
- EXTERN COUNT sql_status1;
- EXTERN COUNT sql_status2;
- EXTERN COUNT ct_mxfil; /* maximum files specified in intree. */
- EXTERN COUNT ctusrprf; /* user profile word */
- #ifdef RTREE
- EXTERN COUNT srtknm,srtdat,tmpdat;
- #endif
- EXTERN UTEXT ct_uflvr;
- EXTERN UTEXT ct_ualgn;
- EXTERN UTEXT ct_upntr;
-
- #else /* ctCLIENT */
-
- EXTERN LSTANC ctlist[NUMCTLIST];
-
- #ifdef MULTITRD
- EXTERN pFarCmdPtr commCmds[MAXCOMMP];
- #ifdef ctNOCOMMGLOBALS
- EXTERN pVOID commGbls[MAXCOMMP];
- #endif
- EXTERN ppCOUNT ct_wf;
- EXTERN pCOUNT ct_vf;
- EXTERN LONG nodedtime;
- EXTERN NINT ctmaxdatkey;
- EXTERN NINT ctmaxkeyseg;
- EXTERN NINT ctdnodeRunning;
- EXTERN NINT ctqchkpRunning;
- EXTERN NINT ct_mq[ctMAX_MONITOR];
- EXTERN NINT ct_smon[ctMAX_MONITOR];
- EXTERN UINT ct_trdmon[ctMAX_MONITOR];
- EXTERN COUNT ctadmfiles;
- #endif /* MULTITRD */
- EXTERN CTFILE ctfmru;
- EXTERN pCTFILE ct_mru;
- EXTERN ppCTFILE ctfcbhdr;
- EXTERN pTREBUF ct_btree; /* ptr to beg of b-tree buffers */
- EXTERN pDATBUF ct_dbufr; /* ptr to beg of data file buffers */
- EXTERN pCTFILE ct_key; /* ptr to beg of ct_key file structures */
- EXTERN pCTFILE ct_dat; /* ptr to beg of data file structures */
- EXTERN pCTFILE ct_vat; /* ptr to beg of var data file struc */
- EXTERN pLONG sctusrsum; /* mem usage sum */
- EXTERN pLONG sctusrtot; /* mem usage limit */
- EXTERN LONG ctmemtot; /* space aggregate limit */
- EXTERN LONG ctmemsum; /* current aggregate sum */
- EXTERN LONG ctmemusr; /* system default user limit */
- EXTERN LONG ctmemhgh; /* system memory highwater mark */
- EXTERN LONG ctmemup; /* MEMORY_MONITOR limit */
- EXTERN LONG ctmemdn; /* MEMORY_MONITOR limit */
- EXTERN LONG ctmemch; /* MEMORY_MONITOR delta */
- EXTERN VRLEN ct_qblock; /* SQL record buffer block size */
- EXTERN VRLEN ct_gstmem; /* guest memory limit */
- EXTERN LONG ct_timout; /* inactive tran timeout */
- EXTERN LONG ct_usrmrl; /* user memory attribute bits */
- extern ULONG ctghat[2];
- extern LONG ctdivs;
- EXTERN LONG ct_dbrqs; /* data buffer requests */
- EXTERN LONG ct_dbhit; /* data buffer hits */
- EXTERN LONG ct_ibrqs; /* index buffer requests */
- EXTERN LONG ct_ibhit; /* index buffer hits */
- EXTERN LONG ct_rdops; /* number of read operations */
- EXTERN LONG ct_rdbyt; /* bytes read */
- EXTERN LONG ct_wrops; /* number of write operations */
- EXTERN LONG ct_wrbyt; /* bytes written */
- EXTERN LONG ct_abnod; /* abort list node count */
- EXTERN LONG ct_cmnod; /* pending node tran count */
- EXTERN LONG ct_cmdat; /* pending data tran count */
- EXTERN LONG ctquemon; /* node queue monitor threshhold */
- EXTERN LONG ctnusers; /* number of users */
- #ifdef DBG749x
- EXTERN UINT ctlstfrq;
- #endif
- EXTERN UINT ct_tmpseq; /* temporary file sequence number */
- EXTERN NINT ctmiroff; /* if YES, turn off all mirroring */
- EXTERN NINT ctdedmon; /* deadloack monitor flag */
- EXTERN NINT ctfncmon; /* function request monitor */
- EXTERN NINT ctchkmon; /* checkpoint monitor flag */
- EXTERN NINT ct_fhlimit; /* override file handle limits/default */
- EXTERN NINT cthshift; /* huge shift */
- EXTERN NINT ct_dq; /* shrink task logical Q handle */
- EXTERN NINT ct_cq; /* checkpoint task logical Q handle */
- EXTERN NINT ctfnz; /* superfile member max name size */
- #ifndef CTBOUND
- EXTERN NINT ct_lq; /* logon logical Q handle */
- EXTERN pTEXT ct_tmppth; /* temporary file default server path */
- #endif
- #ifdef TRANPROC
- EXTERN pREBLST ctrebhed; /* index rebuild list */
- EXTERN pREBLST ctcmphed; /* compress rebuild list */
- EXTERN pREBLST ctmirhed; /* mirror sync list */
- EXTERN pREBLST ctiblhed; /* data (IFIL) rebuild list */
- EXTERN UINT ct_shbins; /* shadow hash bins */
- EXTERN UINT ct_shbyts; /* shadow hash bytes */
- EXTERN NINT ctfstr; /* oldest start file # */
- EXTERN NINT ct_chktrd; /* thread id of checkpoint thread */
- #endif
- EXTERN UINT ct_lhbins; /* lock hash bins */
- EXTERN UINT ctconbins; /* context bins */
- #ifdef MULTITRD
- EXTERN NINT ct_commp; /* # of comm protocols in use */
- #endif
- EXTERN VRLEN ct_bfsiz; /* data buffer size */
- EXTERN COUNT ctrdmp_flg; /* signals dynamic dump recovery */
- EXTERN COUNT ctmdmp_flg; /* signals dyn dump recovery had mirrors*/
- EXTERN COUNT ctrflg; /* automatic recovery flag */
- EXTERN COUNT ctfnstrat; /* file name conversion startegy */
- EXTERN COUNT cttflg; /* stop server in progress */
- EXTERN COUNT ct_mxu1; /* max users plus origin */
- EXTERN COUNT ct_cmnown; /* common onwer number (semaphores) */
- EXTERN COUNT ct_hshft; /* hash shift parameter */
- EXTERN COUNT ct_hbins; /* hash bins for buffers */
- EXTERN COUNT ct_dshft; /* datbuf hash shift parm */
- EXTERN COUNT ct_dbins; /* datbuf hash bins */
- EXTERN BHL ct_bavl[2]; /* buffer avl list anchors */
- EXTERN ppBHL ct_bhla[NUMANCHOR];
- /* buffer hash list anchors */
- EXTERN pTEXT ctsdname; /* server directory name */
- EXTERN pTEXT ctsvname; /* server name */
- EXTERN pTEXT ctsqname; /* server SQL name */
- #ifdef VINESLOG
- EXTERN TEXT ctlgname[MAX_NAME];
- /* server status log name */
- #endif
-
- EXTERN pTEXT ctscommp[MAXCOMMP];
- /* server comm protocol */
- EXTERN pTEXT ct_del; /* constant 0xff array */
- EXTERN UINT ct_delsiz; /* size of 0xff array */
- EXTERN NINT ct_sqlsupr; /* sql superfile flag */
- EXTERN UINT cts_list_m; /* list memory block size */
- EXTERN UINT cts_sort_m; /* sort memory buffer size */
- EXTERN UINT cts_bufr_m; /* bufr memory block size */
- EXTERN TEXT ctifl_ext[2][EXZ];
- /* default IFIL extensions */
- #ifdef MULTITRD
- EXTERN UTEXT ct_sflvr; /* system flavor */
- EXTERN UTEXT ct_salgn; /* system alignment */
- EXTERN UTEXT ct_spntr; /* system pointer size */
- #endif
-
- EXTERN COUNT ct_mxfil; /* maximum files specified in intree. */
- EXTERN COUNT ct_mxbuf; /* maximum buffers specified in intree */
- EXTERN COUNT ct_dxbuf; /* maximum data file buffers */
- EXTERN COUNT ct_ndsec; /* # of sectors per node specified in intree */
- #ifndef ctGINIT
- extern COUNT ct_maxvfil; /* maximum virtual files opened */
- #endif
- EXTERN COUNT ct_numvfil; /* number of virtual files open */
- EXTERN COUNT ct_avlfil; /* available file control block counter */
- EXTERN COUNT ct_ver; /* defines configuration options */
- EXTERN TEXT ctsupsep;
- #ifdef MULTITRD
- EXTERN SEMA ct_gvsema; /* ctgv semaphore */
- EXTERN SEMA ct_ismema; /* ctismem semaphore */
- EXTERN SEMA ct_srvsema;
- EXTERN SEMA ct_gnsema; /* get node (getnod) semaphore */
- EXTERN SEMA ct_ocsema; /* open / create semaphore */
- EXTERN SEMA ct_vtsema; /* vtclose semaphore */
- EXTERN SEMA ct_llsema; /* lock list semaphore */
- EXTERN SEMA ct_facsema; /* file lru access count */
- EXTERN SEMA ct_nmvsema; /* ct_numvfil sema */
- EXTERN SEMA ct_avlsema; /* available file counter */
- EXTERN SEMA ct_logsema; /* log position/buffer semaphore */
- EXTERN SEMA ct_lflsema; /* log file i/o semaphore */
- EXTERN SEMA ct_lfwsema; /* wait for collective log flush */
- EXTERN SEMA ct_utrsema; /* ct_usrtr[] semaphore */
- EXTERN SEMA ct_memsema; /* memory allocation semaphore */
- EXTERN SEMA ct_chksema; /* checkpoint semaphore */
- EXTERN SEMA ct_abtsema; /* node abort list semaphore */
- EXTERN SEMA ct_comsema; /* buffer commit list semaphore */
- EXTERN SEMA ct_uhnsema; /* user handle semaphore */
- EXTERN COUNT ct_numusr; /* active users */
- #endif
-
- #ifndef TRANPROC
- EXTERN COUNT cts_maxlok; /* maximum locks */
- #endif
-
- #ifdef GNSERVER
- EXTERN pDEDLOK ctdedlok; /* pointer to deadlock detection array */
- #endif
-
- #ifdef MULTITRD
-
- typedef struct {
- #ifdef ctCREATE_SEMA
- SEMA sresema; /* reuseable semaphore for temp CTFILE */
- #endif
- BATHDR batch;
- #ifdef ctOldALCBAT
- COUNT sbatmax;
- COUNT sbatnum;
- pBATHDR ssavbat;
- #else
- pSAVBAT sbatnum;
- ppSAVBAT ssavbat;
- #endif
-
- LONG sctops; /* set operation state bit mask */
- VRLEN sctxvlen; /* vlen combined op max buffer length */
- LONG sresrv1; /* spare members */
- LONG sresrv2;
- LONG sresrv3;
-
- #ifndef CTBOUND
- LONG sresrv4; /* spare members */
- LONG sresrv5;
- LONG sabnlog; /* begtran log for abandoned tran */
- LONG sctops_clr; /* operation state clear mask */
- LONG sautopos; /* auto current ISAM position */
- LONG sautolen; /* auto variable length size */
- LONG slogtime; /* logon time */
- LONG strntime; /* last begin tran time */
- LONG srqstime; /* last request time */
- NINT snbrfile; /* number of files in use */
- NINT sactflag; /* active / inactive flag */
- LONG srqsfunc; /* last rquest function # */
- pVOID suserlqp; /* user's request block */
- LONG susrrsvd[6]; /* spare members */
- TEXT snodname[32]; /* node name */
- #endif
-
- LONG sfncret; /* special function ret values: only MULTITRD */
- LONG sct_npath[MAXLEV];/* array to trace path down B-tree. Assumes */
- /* maximum of MAXLEV - 1 levels in B-tree. */
- LONG sct_lnode; /* last node found during walk down tree */
- LONG sct_fnode; /* node found during search/retrieval */
- LONG sct_nwnod; /* pointer to new node */
- LONG sct_gsrl; /* next serial number for data file */
- COUNT sct_trdflg; /* thread operation flag */
- COUNT sctconid;
- TEXT sct_userid[IDZ]; /* unique user id */
- TEXT spare[PWZ]; /* unused ???? */
- UGRUP sct_userg[MAX_UGRUP];
- /* group list header */
- pFUSR sct_fup; /* FUSR pointer for current file */
- ppctICON sctconanc; /* hash bins for context */
- #ifdef TRANPROC
- ppSHADLST sct_ubit; /* hash bins for srchshd */
- pTEXT sctmrklst; /* temp storage for exc marks during split */
- pTEXT sct_usrsp; /* pointer to shadow swap buffer */
- pSHADLST sct_usrsl; /* current shadow list element */
- VRLEN sct_usrsz; /* swap buffer size */
- LONG sct_usrtm; /* activity time stamp (seconds) */
- LONG gvresv2;
- COUNT sct_usrsv; /* tran savepoint info */
- COUNT sct_usrsi; /* index update flag */
- COUNT sct_rstflg; /* TRANRST() flag */
- #endif
- NINT sctrbflg; /* rebuild flag */
- ppLOKS sct_locks; /* user lock table head */
- ppLOKS sct_ltail; /* user lock table tail */
- COUNT sctusrprf; /* user profile word */
- COUNT sctumxfil; /* max files for user */
- COUNT scthghfil; /* highest file number limit */
- COUNT sct_nelem[MAXLEV];
- COUNT sct_tight[MAXLEV];
- COUNT sct_melem[MAXLEV];
- COUNT sct_tkp; /* previous value of ct_tky */
- COUNT sct_sfxctp; /* previous value of suffix count */
- COUNT sbtlev; /* b-tree level counter. used as index of */
- /* ct_npath */
- COUNT sct_elm; /* position within B-Tree node */
- COUNT sct_tky; /* result of comparison between target */
- /* value and index entry. */
- /* ct_tky < 0 => target < index entry */
- /* = 0 => target = index entry */
- /* > 0 => target > index entry */
-
- TEXT sct_dupkey[MAXLEN+1];/* for searches of duplicate keys */
- TEXT sspkey[MAXLEN+1]; /* temporary storage for key values during */
- /* node updates */
-
- TEXT sct_buf[CTBUFSIZ]; /* temporary io buffer */
- UTEXT sct_uflvr; /* user flavor */
- UTEXT sct_ualgn; /* user alignment */
- UTEXT sct_upntr; /* user pointer size */
-
- TEXT sl_lastkey[MAXLEN];
- LONG sl_begnod;
- LONG sl_curnod;
- LONG sl_prvnod;
- LONG sl_numnod;
- LONG sl_ct_nnods[MAXLEV];
- COUNT sl_elem;
- COUNT sl_started;
- pTREBUF sl_savbp;
- VRLEN sl_hdradj;
-
- pTEXT sb_ct_rbuf;
- pctRECPT sb_ct_pbuf;
- COUNT sb_rerr_cod;
- COUNT sb_rerr_fil;
- COUNT sb_ct_fp;
- COUNT sb_ct_redom;
- VRLEN sb_ct_bsz;
- LONG sb_ct_spc;
-
- pTEXT sql_tbuf;
- pTEXT sql_spos;
- LONG sql_olen;
- LONG sql_rlen;
- pVOID sql_db;
- } CTGV;
- typedef CTGV ctMEM * pCTGV;
-
- typedef struct {
- pCTIS1 s1;
- ppCTIS2 s2;
- ppCOUNT sct_kymap;
- #ifdef ctOldALCSET
- pSAVSET sct_savset;
-
- COUNT sseqlen; /* significant length of key */
- COUNT sseqkey; /* current keyno */
- COUNT sseqnum; /* current set number */
- COUNT smaxqset;
- #else
- ppSAVSET
- sct_savset; /* pointer to hash anchors */
- pSAVSET sseqnum; /* current set pointer */
- COUNT sseqlen; /* significant length of key */
- COUNT sseqkey; /* current keyno */
- #endif
- COUNT sct_nwrcfg;
- COUNT sct_vfsg;
- COUNT sct_ismlk;
- #ifdef RTREE
- COUNT ssrtknm;
- COUNT ssrtdat;
- COUNT stmpdat;
- #endif
-
- TEXT sseqbuf[MAXLEN]; /* holds matching "partial" key */
- TEXT sseqold[MAXLEN]; /* holds previous "partial" key */
- TEXT sct_fndval[MAXLEN];
- } CTIS;
- typedef CTIS ctMEM * pCTIS;
- typedef CTIS ctMEM * ctMEM * ppCTIS;
-
- #ifndef CTBOUND
- EXTERN pTEXT sctusrbuf[MXU2]; /* user commbuffer */
- EXTERN VRLEN sctusrlen[MXU2]; /* commbuffer length */
- EXTERN VRLEN sctusrpos[MXU2]; /* position in buffer */
- #endif
- EXTERN COUNT suerr_cod[MXU2];
- EXTERN COUNT ssysiocod[MXU2];
- EXTERN COUNT sisam_err[MXU2];
- EXTERN COUNT sisam_fil[MXU2];
- EXTERN VRLEN ssql_len[MXU2];
- EXTERN COUNT ssql_status1[MXU2];
- EXTERN COUNT ssql_status2[MXU2];
- #ifdef VINES
- #ifdef RUNTCBTABLE
- EXTERN NINT ctusrmapId;
- EXTERN taskid ctusrhmap[MXU2];
- #else
- EXTERN COUNT ctusrhmap[MXU2];
- #endif
- #else
- EXTERN COUNT ctusrhmap[MXU2];
- #endif
-
- EXTERN pCTGV ctgv[MXU2];
- EXTERN TEXT ctua[MXU2];
- EXTERN TEXT ctma[MXU2];
- #ifdef ctNoThdParms
- EXTERN NLONG ctrcparm[MXU2];
- #endif
- #ifdef CTBOUND
- EXTERN TEXT ctst[MXU2];
- #endif
-
- EXTERN ppCTIS ctis;
-
- EXTERN ppFUSR ct_fusr;
- EXTERN pBLKLST ct_blk;
-
- #define ct_ubit(owner) ctgv[owner]->sct_ubit
- #define ctconanc lctgv->sctconanc
- #define ctconid lctgv->sctconid
- #define ct_rstflg lctgv->sct_rstflg
- #ifndef CTBOUND
- #define ctusrbuf sctusrbuf[sOWNR]
- #define ctusrlen sctusrlen[sOWNR]
- #define ctusrpos sctusrpos[sOWNR]
- #define abnlog lctgv->sabnlog
- #define ctops_clr lctgv->sctops_clr
- #endif
- #define resema lctgv->sresema
- #define ctbatch lctgv->batch
- #define ctbatnum lctgv->sbatnum
- #define ctbatmax lctgv->sbatmax
- #define ct_savbat lctgv->ssavbat
- #define ct_locks lctgv->sct_locks
- #define ct_ltail lctgv->sct_ltail
- #define ctusrprf lctgv->sctusrprf
- #define ctumxfil lctgv->sctumxfil
- #define cthghfil lctgv->scthghfil
- #define ctops lctgv->sctops
- #define ctxvlen lctgv->sctxvlen
- #define autopos lctgv->sautopos
- #define autolen lctgv->sautolen
- #define logtime lctgv->slogtime
- #define trntime lctgv->strntime
- #define rqstime lctgv->srqstime
- #define rqsfunc lctgv->srqsfunc
- #define userlqp lctgv->suserlqp
- #define nodname lctgv->snodname
- #define nbrfile lctgv->snbrfile
- #define actflag lctgv->sactflag
- #define cominfo lctgv->scominfo
- #define fncret lctgv->sfncret
- #define ct_npath lctgv->sct_npath
- #define ct_nelem lctgv->sct_nelem
- #define ct_tight lctgv->sct_tight
- #define ct_melem lctgv->sct_melem
- #ifdef TRANPROC
- #define ctmrklst lctgv->sctmrklst
- #define ctusrsum sctusrsum[sOWNR]
- #define ctusrtot sctusrtot[sOWNR]
- #define ct_usrsi lctgv->sct_usrsi
- #define ct_usrsv lctgv->sct_usrsv
- #define ct_usrsp lctgv->sct_usrsp
- #define ct_usrsl lctgv->sct_usrsl
- #define ct_usrsz lctgv->sct_usrsz
- #define ct_usrtm lctgv->sct_usrtm
- #endif
- #define ctrbflg lctgv->sctrbflg
- #define ct_trdflg lctgv->sct_trdflg
- #define ct_userid lctgv->sct_userid
- #define ct_sqlpwd lctgv->sct_sqlpwd
- #define ct_userg lctgv->sct_userg
- #define ct_fup lctgv->sct_fup
- #define ct_dupkey lctgv->sct_dupkey
- #define spkey lctgv->sspkey
- #define ct_elm lctgv->sct_elm
- #define ct_tky lctgv->sct_tky
- #define ct_tkp lctgv->sct_tkp
- #define ct_sfxctp lctgv->sct_sfxctp
- #define ct_lnode lctgv->sct_lnode
- #define ct_fnode lctgv->sct_fnode
- #define ct_nwnod lctgv->sct_nwnod
- #define btlev lctgv->sbtlev
- #define uerr_cod suerr_cod[sOWNR]
- #define sysiocod ssysiocod[sOWNR]
- #define isam_err sisam_err[sOWNR]
- #define isam_fil sisam_fil[sOWNR]
- #define sql_len ssql_len[sOWNR]
- #define sql_status1 ssql_status1[sOWNR]
- #define sql_status2 ssql_status2[sOWNR]
- #define ct_uflvr lctgv->sct_uflvr
- #define ct_ualgn lctgv->sct_ualgn
- #define ct_upntr lctgv->sct_upntr
- #define ct_buf lctgv->sct_buf
- #define ct_gsrl lctgv->sct_gsrl
- #define ct_rbuf lctgv->sb_ct_rbuf
- #define ct_pbuf lctgv->sb_ct_pbuf
- #define rerr_cod lctgv->sb_rerr_cod
- #define rerr_fil lctgv->sb_rerr_fil
- #define ct_fp lctgv->sb_ct_fp
- #define ct_redom lctgv->sb_ct_redom
- #define ct_bsz lctgv->sb_ct_bsz
- #define ct_spc lctgv->sb_ct_spc
-
- #else /* MULTITRD */
-
- EXTERN BATHDR ctbatch;
- EXTERN LONG ct_spc;
- EXTERN LONG ct_npath[MAXLEV];/* array to trace path down B-tree. Assumes */
- /* maximum of MAXLEV - 1 levels in B-tree. */
- #ifdef ctOldALCBAT
- EXTERN COUNT ctbatnum;
- EXTERN COUNT ctbatmax;
- EXTERN pBATHDR ct_savbat;
- #else
- EXTERN pSAVBAT ctbatnum;
- EXTERN ppSAVBAT
- ct_savbat;
- #endif
- EXTERN COUNT ct_nelem[MAXLEV];
- EXTERN COUNT ct_tight[MAXLEV];
- EXTERN COUNT ct_melem[MAXLEV];
- EXTERN COUNT ctconid;
- EXTERN ppctICON
- ctconanc; /* hash bins for context */
- #ifdef TRANPROC
- #define ct_ubit(owner) sct_ubit
- EXTERN ppSHADLST sct_ubit; /* hash bins for srchshd */
- EXTERN pTEXT ctmrklst;
- EXTERN pTEXT ct_usrsp;
- EXTERN pSHADLST ct_usrsl;
- EXTERN VRLEN ct_usrsz;
- EXTERN LONG ctusrsum;
- EXTERN LONG ctusrtot;
- EXTERN COUNT ct_usrsi;
- EXTERN COUNT ct_usrsv;
- EXTERN COUNT ct_rstflg; /* TRANRST() flag */
- #endif
- EXTERN NINT ctrbflg;
- EXTERN ppLOKS ct_locks;
- EXTERN ppLOKS ct_ltail;
- EXTERN LONG ctops; /* set operation state bit mask */
- EXTERN VRLEN ctxvlen; /* vlen combined op max buffer length */
-
- EXTERN TEXT ct_dupkey[MAXLEN+1];/* for searches of duplicate keys */
- EXTERN TEXT spkey[MAXLEN+1]; /* temporary storage for key values during */
- /* node updates */
-
- EXTERN COUNT ctusrprf; /* user profile word */
- EXTERN COUNT ct_elm; /* position within B-Tree node */
- EXTERN COUNT ct_tky; /* result of comparison between target */
- /* value and index entry. */
- /* ct_tky < 0 => target < index entry */
- /* = 0 => target = index entry */
- /* > 0 => target > index entry */
- EXTERN COUNT ct_tkp; /* previous value of ct_tky */
- EXTERN COUNT ct_sfxctp; /* previous value of suffix count */
- EXTERN LONG ct_lnode; /* last node found during walk down tree */
- EXTERN LONG ct_fnode; /* node found during search/retrieval */
- EXTERN LONG ct_nwnod; /* pointer to new node */
- EXTERN LONG ct_gsrl; /* next serial number for data file */
- EXTERN COUNT ct_trdflg; /* thread operation flag */
- EXTERN COUNT btlev; /* b-tree level counter. used as index of */
- /* ct_npath */
- EXTERN COUNT uerr_cod; /* user error cod */
- EXTERN COUNT sysiocod; /* system error cod */
- EXTERN COUNT isam_err;
- EXTERN COUNT isam_fil;
- EXTERN VRLEN sql_len;
- EXTERN COUNT sql_status1;
- EXTERN COUNT sql_status2;
- EXTERN UTEXT ct_uflvr;
- EXTERN UTEXT ct_ualgn;
- EXTERN UTEXT ct_upntr;
- EXTERN TEXT ct_buf[CTBUFSIZ]; /* temporary io buffer */
-
- #define ctumxfil ct_mxfil
- #define cthghfil ct_mxfil
-
- #endif
-
- EXTERN UINT ctlog9477;
-
- #endif /* ctCLIENT */
- #endif /* ctNOGLOBALS */
-
- #endif /* ctGVARH */
-
- /* end of ctgvar.h */
-