home *** CD-ROM | disk | FTP | other *** search
- /*
- * System Independent Application Interface
- *
- * This program is the CONFIDENTIAL and PROPRIETARY property
- * of FairCom(R) Corporation. Any unauthorized use, reproduction or
- * transfer of this program is strictly prohibited.
- *
- * Copyright (c) 1987, 1988, 1989 FairCom Corporation
- * (Subject to limited distribution and
- * restricted disclosure only.)
- * *** ALL RIGHTS RESERVED ***
- *
- * 4006 West Broadway
- * Columbia, MO 65203
- *
- *
- * c-tree(R) Version 4.3
- * Release C
- * February 7, 1989 17:30
- *
- */
-
- #include "ctstdr.h"
- #include "ctoptn.h"
- #include "ctstrc.h"
- #include "cterrc.h"
- #include "ctcomm.h"
-
- #define DEFASIZ 1024
- #define MAXASIZ 1024
-
- LOCAL TEXT *apxmsg;
- LOCAL COUNT stpcnt;
- MESSAGE cts_msg;
- TEXT *ct_apxdat = NULL;
- COUNT cts_usrid,uerr_cod,ct_mxfil,ct_ver,*altseq;
- UCOUNT cts_mxaln,cts_apxsiz;
- COUNT cts_keyops;
- KEYOPS *cts_kops;
- COUNT *cts_mops;
- COUNT cts_ctry,cts_csuc,cts_cdat,cts_cseq;
- UCOUNT cts_clen;
- TEXT *cts_cptr;
- CTFILE *ct_key,*ct_dat,*ct_vat;
- TREEBUFF *ct_btree;
- TEXT *ct_origin,ct_buf[CTBUFSIZ];
- LONG ct_gsrl;
-
- TEXT *mballc();
- COUNT ctlogin(),ctsrvr();
-
- VOID getsrlnum(msgp)
- MESSAGE *msgp;
- {
- cpybuf(&ct_gsrl,&msgp->mfiln,sizeof(ct_gsrl));
- }
-
- CTFILE *tstfnm(filno)
- COUNT filno;
- {
- FAST CTFILE *retval,*ctnum;
- COUNT nomemb;
-
- COUNT uerr();
- VOID terr();
-
- uerr_cod = NO_ERROR;
- if (ct_mxfil == 0) {
- uerr(FINT_ERR);
- return(NULL);
- } else if (filno < 0 || ct_mxfil <= filno) { /* filno out of range */
- uerr(FNUM_ERR);
- return(NULL);
- } else
- retval = ct_key + filno;
-
- switch (retval->chnacs) {
- case 'n':
- uerr_cod = FACS_ERR;
- return(NULL);
- case 'y':
- return(retval);
-
- default:
- printf("\nAPX fatal error 222\n");
- exit(0);
- }
- }
-
- COUNT ctapxe(filno,func,pntr,ptr1)
- COUNT filno,func;
- POINTER pntr;
- TEXT *ptr1;
- {
- FAST CTFILE *ctnum;
-
- COUNT uerr();
-
- if (ct_apxdat == NULL)
- return(uerr_cod = ALOG_ERR);
-
- cts_msg.musrn = cts_usrid;
- cts_msg.mfiln = filno;
- cts_msg.mpntr = pntr;
-
- if (cts_ctry) {
- cts_msg.mretc = cts_ctry;
- cts_msg.mseqn = cts_cdat;
- } else if (cts_msg.mretc != VAR1st && func != TST_MSGSIZ)
- cts_msg.mretc = 0;
- cts_ctry = 0;
-
- switch (cts_msg.mfunc = func) {
-
- case FN_ADDKEY:
- case FN_DELBLD:
- case FN_DELCHK:
-
- case FN_EQLKEY:
- case FN_FRSKEY:
- case FN_GTEKEY:
- case FN_GTKEY:
- case FN_LSTKEY:
- case FN_LTEKEY:
- case FN_LTKEY:
- case FN_NXTKEY:
- case FN_PRVKEY:
- case FN_FRCKEY:
- if ((ctnum = tstfnm(filno)) == NULL) {
- cts_msg.mpntr = DRNZERO;
- cts_msg.merrn = uerr_cod;
- break;
- }
-
- if (ptr1)
- cpybuf(ct_apxdat,ptr1,cts_msg.mdlen = ctnum->length);
- else
- cts_msg.mdlen = 0;
- ctsrvr(&apxmsg,&ct_apxdat,&cts_msg);
- break;
-
- case FN_OPNFIL:
- case FN_CREDAT:
- case FN_CREIDX:
- case FN_CREMEM:
- if (ctlogin(&apxmsg,&ct_apxdat,filno,cts_apxsiz,ptr1,&cts_msg))
- break;
- cpybuf(ct_apxdat,ptr1,cts_msg.mdlen = sizeof(FILEPARM));
- ctsrvr(&apxmsg,&ct_apxdat,&cts_msg);
- break;
-
- case FN_DATENT:
- case FN_SERIALNUM:
- case FN_GTVLEN:
- case FN_IDXENT:
- case FN_NEWREC:
- case FN_NEWVREC:
- case FN_RETREC:
- case FN_RETVREC:
- case FN_CLSFIL:
- case FN_DELFIL:
- case FN_LOKREC:
- case FN_DLOCK:
- case FN_RLOCK:
- case FN_UDLOCK:
- case FN_FLUSHDOS:
- case FN_TSTREC:
- case CNT_HDROUT:
- case TST_MSGSIZ:
- case TST_STPUSR:
- case TST_TRAN:
- case TST_SPCLOG:
- cts_msg.mdlen = 0;
- ctsrvr(&apxmsg,&ct_apxdat,&cts_msg);
- break;
-
- #ifdef CTS_ISAM
- case FN_MLTULK:
- case FN_MLTKEY:
- ctsrvr(&apxmsg,&ct_apxdat,&cts_msg);
- break;
-
- case FN_MLTWRT:
- #endif
- case CNT_RECIN:
- cpybuf(ct_apxdat,ptr1,cts_msg.mdlen);
- ctsrvr(&apxmsg,&ct_apxdat,&cts_msg);
- break;
-
- case CNT_RECOUT:
- cts_msg.mdlen = 0;
- if (ctsrvr(&apxmsg,&ct_apxdat,&cts_msg) == NO_ERROR)
- cpybuf(ptr1,ct_apxdat,cts_msg.mdlen);
- break;
-
- default:
- printf("\n\nIllegal Function #%d\n\n",func);
- exit(0);
-
- }
-
- if (cts_msg.mretc == CMBREDAT) {
- if (cts_msg.merrn == 0) {
- cts_csuc = YES;
- if (!cts_cseq && cts_cptr != NULL) {
- if (func != FN_EQLKEY)
- cpybuf(cts_cptr,ct_apxdat + ctnum->length,cts_clen);
- else
- cpybuf(cts_cptr,ct_apxdat,cts_clen);
- }
- } else
- cts_csuc = NO;
- cts_msg.mretc = 0;
- } else if (cts_msg.mretc == CMBREDCN) {
- cts_csuc = NO;
- cts_msg.mretc = 0;
- } else
- cts_csuc = NO;
-
- return(uerr(cts_msg.merrn));
- }
-
- #ifdef CTS_ISAM
- VOID intlmsg()
- {
- cts_msg.mvlen = cts_msg.mdlen = 0;
- }
-
- VOID sndlmsg()
- {
- if (cts_msg.mvlen != 0) {
- ctapxe(cts_msg.mfiln,FN_MLTULK,cts_msg.mpntr,NULL);
- cts_msg.mvlen = cts_msg.mdlen = 0;
- }
- }
-
- VOID addlmsg(recbyt,datno)
- POINTER recbyt;
- COUNT datno;
- {
- FAST TEXT *tp;
-
- if (cts_msg.mvlen++ == 0) {
- cts_msg.mfiln = datno;
- cts_msg.mpntr = recbyt;
- } else {
- tp = ct_apxdat + cts_msg.mdlen;
- cpybuf(tp,&recbyt,sizeof(POINTER));
- cpybuf(tp + sizeof(POINTER),&datno,sizeof(COUNT));
- cts_msg.mdlen += (sizeof(POINTER) + sizeof(COUNT));
- if (cts_msg.mdlen >
- (cts_mxaln - sizeof(POINTER) - sizeof(COUNT)))
- sndlmsg();
- }
- }
- #endif
-
- COUNT recred(filno,recbyt,recptr,rlen,seqn)
- COUNT filno;
- POINTER recbyt;
- PFAST TEXT *recptr;
- VRLEN rlen;
- COUNT seqn;
- {
- cts_msg.mseqn = seqn; /* when seqn == 0 length determined at server */
- cts_msg.mvlen = rlen;
- if (ctapxe(filno,CNT_RECOUT,recbyt,recptr))
- return(uerr_cod);
- while (cts_msg.mvlen > cts_msg.mdlen) {
- recbyt += cts_msg.mdlen;
- recptr += cts_msg.mdlen;
- cts_msg.mvlen -= cts_msg.mdlen;
- cts_msg.mseqn++;
- if (ctapxe(filno,CNT_RECOUT,recbyt,recptr))
- return(uerr_cod);
- }
- return(NO_ERROR);
- }
-
- COUNT recwrt(filno,recbyt,recptr,rlen)
- COUNT filno;
- POINTER recbyt;
- PFAST TEXT *recptr;
- VRLEN rlen;
- {
- FAST COUNT i;
-
- cts_msg.mvlen = rlen;
- /* # of msg to write */
- cts_msg.mseqn = (rlen + cts_mxaln - 1) / cts_mxaln;
- while (cts_msg.mseqn-- > 0) {
- if (rlen > cts_mxaln) {
- cts_msg.mdlen = cts_mxaln;
- rlen -= cts_mxaln;
- } else
- cts_msg.mdlen = rlen;
- if (ctapxe(filno,CNT_RECIN,recbyt,recptr))
- return(cts_msg.merrn);
- /* turn off variable length 1st segment signal */
- cts_msg.mretc = 0;
- recptr += cts_mxaln;
- recbyt += cts_mxaln;
- }
- return(NO_ERROR);
- }
-
- /* --------------------------------------------------------------------
- LOCK data record
- */
-
- COUNT DLOCK(recbyt,dnum) /* recbyt == 0 => header record */
- POINTER recbyt;
- PFAST DATFILE *dnum;
- {
- return(ctapxe(dnum->filnum,FN_DLOCK,recbyt,NULL));
- }
-
- COUNT RLOCK(recbyt,dnum)
- POINTER recbyt;
- PFAST DATFILE *dnum;
- {
- return(ctapxe(dnum->filnum,FN_RLOCK,recbyt,NULL));
- }
-
- /* --------------------------------------------------------------------
- UNLOCK data record
- */
-
- COUNT UDLOCK(recbyt,dnum)
- POINTER recbyt;
- PFAST DATFILE *dnum;
- {
- return(ctapxe(dnum->filnum,FN_UDLOCK,recbyt,NULL));
- }
-
- VOID flushdos(datno)
- COUNT datno;
- {
- ctapxe(datno,FN_FLUSHDOS,0L,NULL);
- }
-
- /* ------------------------------------------------------------ */
-
- COUNT ctio(op_code,ctnum,recbyt,bufadr,iosize)
- COUNT op_code; /* CTREAD or CTWRITE */
- CTFILE *ctnum;
- LONG recbyt;
- TEXT *bufadr;
- unsigned int iosize;
- {
- COUNT uerr();
-
- if (!iosize)
- iosize = ctnum->reclen;
- if (op_code == CTREAD) {
- if (recred(ctnum->filnum,recbyt,bufadr,iosize,1))
- return(uerr(READ_ERR));
- } else {
- cts_msg.mretc = 0; /* => not the 1st seg of var len record */
- if (recwrt(ctnum->filnum,recbyt,bufadr,iosize))
- return(uerr(WRITE_ERR));
- }
- return(NO_ERROR);
- }
-
- POINTER ctapxv(filno,func,pntr,ptr1, ptr2)
- COUNT filno,func;
- POINTER pntr;
- TEXT *ptr1,*ptr2;
- {
- ctapxe(filno,func,pntr,ptr1);
- if (ptr2 != NULL && cts_msg.mpntr)
- cpybuf(ptr2,ct_apxdat,(ct_key + filno)->length);
- return(cts_msg.mpntr);
- }
-
- COUNT tstrec( dnum,recbyt)
- PFAST CTFILE *dnum;
- POINTER recbyt;
- {
- POINTER temp;
-
- COUNT uerr();
-
- if (!recbyt)
- return(uerr(ZREC_ERR));
- if (recbyt > dnum->numrec) {
- if ((temp = ctapxv(dnum->filnum,FN_TSTREC,recbyt,NULL,NULL)) ==
- DRNZERO)
- return(uerr_cod);
- else
- dnum->numrec = temp;
- }
- return(NO_ERROR);
- }
-
- COUNT vtclose()
- {
- return(YES);
- }
-
- #ifdef UNIFRMAT
- #ifdef LONGVARD
-
- VOID revwrd(tp,wrdcnt)
- PFAST TEXT *tp;
- PFAST COUNT wrdcnt;
- { /* assumes that revbyt already called */
- TEXT ch1,ch2;
-
- while (wrdcnt-- > 0) {
- ch1 = *tp++;
- ch2 = *tp++;
- *(tp - 2) = *tp;
- *tp++ = ch1;
- *(tp - 2) = *tp;
- *tp++ = ch2;
- }
- }
- #endif
- #endif
-
-
- COUNT INTREE(bufs,fils,sect)
- COUNT bufs,fils,sect;
- {
- FAST COUNT i;
- TREEBUFF *buf;
- CTFILE *ctnum;
- COUNT valsiz;
- TEXT *buforg,*valoff;
-
- COUNT uerr();
-
- /*
- * be sure that one and only one of each mutually
- * exclusive choice has been selected and compose
- * version byte for header records.
- */
-
-
- #ifndef LOW_HIGH
- #ifdef UNIFRMAT
- ct_ver = (LH_VER | CT_V4E);
- #else
- ct_ver = (HL_VER | CT_V4E);
- #endif
- #ifndef HIGH_LOW
- terr(200);
- #endif
- #else
- ct_ver = (LH_VER | CT_V4E);
- #ifdef HIGH_LOW
- terr(201);
- #endif
- #endif
-
- uerr_cod = stpcnt = 0;
-
- /* if application does not set cts_apxsiz, then default size */
- if (!cts_apxsiz)
- cts_apxsiz = DEFASIZ;
- else if (cts_apxsiz > MAXASIZ)
- cts_apxsiz = MAXASIZ;
- if ((cts_apxsiz - sizeof(MESSAGE)) < MAXLEN)
- cts_apxsiz = MAXLEN + sizeof(MESSAGE);
- if ((cts_apxsiz - sizeof(MESSAGE)) < sizeof(FILEPARM))
- cts_apxsiz = sizeof(FILEPARM) + sizeof(MESSAGE);
- if (cts_apxsiz > MAXASIZ)
- return(uerr(AMSG_ERR));
-
- if (bufs < 3 || sect < 1 || fils < 0)
- return(uerr(SPRM_ERR));
- if (ct_key != NULL)
- return(uerr(IINT_ERR));
-
- if ((ct_key = (CTFILE *) mballc(fils,sizeof(CTFILE))) == NULL)
- return(uerr(SPAC_ERR));
- ct_dat = ct_vat = ct_key;
- ct_mxfil = fils;
-
- for (i = 0,ctnum = ct_key; i++ < ct_mxfil; ctnum++)
- ctnum->chnacs = 'n';
-
- if (ctlogin(&apxmsg,&ct_apxdat,-1,cts_apxsiz,NULL,&cts_msg)) {
- mbfree(ct_key);
- ct_key = ct_dat = ct_vat = NULL;
- return(uerr_cod);
- } else
- return(NO_ERROR);
- }
-
- COUNT STPUSR()
- {
- COUNT ridmids();
-
- if (stpcnt++ > 0)
- return(NO_ERROR);
-
- if (cts_keyops > 1) {
- mbfree(cts_kops);
- mbfree(cts_mops);
- }
-
- ctapxe(0,TST_STPUSR,0L,NULL);
- return(ridmids());
- }
-
- COUNT TRANSACTION(mode)
- COUNT mode;
- {
- return(ctapxe(mode,TST_TRAN,0L,NULL));
- }
-
- COUNT cpyfpm(filnam,pfpm)
- PFAST TEXT *filnam;
- FILEPARM *pfpm;
- {
- if (filnam == NULL)
- return(uerr_cod = AFNM_ERR);
- else if (strlen(filnam) > MAX_NAME)
- return(uerr_cod = AFLN_ERR);
- else
- return(fulnam(pfpm->fpnam,filnam,MAX_NAME));
- }
-
- COUNT OPNFIL(filno,filnam,filmod)
- COUNT filno;
- TEXT *filnam;
- COUNT filmod;
- {
- FAST CTFILE *ctnum;
- FAST TEXT *tp;
- COUNT i;
- FILEPARM fpm;
-
- ctnum = ct_key + filno;
- if (filno < 0 || ct_mxfil <= filno)
- return(uerr_cod = FNUM_ERR);
- else if (ctnum->chnacs != 'n')
- return(uerr_cod = FUSE_ERR);
-
- if (cpyfpm(filnam,&fpm))
- return(uerr_cod);
- fpm.fpmod = filmod;
- if (ctapxe(filno,FN_OPNFIL,0L,&fpm))
- return(uerr_cod);
- cpybuf(ctnum,tp = ct_apxdat,HDRSIZ);
- strcpy(ctnum->flname,filnam);
- ctnum->filnum = filno;
- ctnum->chnacs = 'y';
- if (ctnum->clstyp != IDX_CLOSE)
- return(uerr_cod = NO_ERROR);
-
- for (i = 1; i <= ctnum->nmem; i++) {
- if ((cts_msg.mdlen -= HDRSIZ) < HDRSIZ) {
- cts_msg.mseqn = i;
- if (ctapxe(filno,CNT_HDROUT,0L,NULL))
- return(uerr_cod);
- tp = ct_apxdat;
- } else
- tp += HDRSIZ;
- cpybuf(ctnum + i,tp,HDRSIZ);
- (ctnum + i)->filnum = filno + i;
- (ctnum + i)->chnacs = 'y';
- }
- return(uerr_cod = NO_ERROR);
- }
-
- COUNT CLSFIL(filno,filmod)
- COUNT filno,filmod;
- {
- FAST CTFILE *ctnum;
- COUNT i;
-
- cts_msg.mseqn = filmod;
- if (ctapxe(filno,FN_CLSFIL,0L,NULL) == NO_ERROR)
- for (i = 0, ctnum = ct_key + filno; i <= ctnum->nmem; i++)
- (ctnum + i)->chnacs = 'n';
- return(uerr_cod);
- }
-
- COUNT DELFIL(filno)
- COUNT filno;
- {
- FAST CTFILE *ctnum;
- COUNT i;
-
- if (ctapxe(filno,FN_DELFIL,0L,NULL) == NO_ERROR)
- for (i = 0, ctnum = ct_key + filno; i <= ctnum->nmem; i++)
- (ctnum + i)->chnacs = 'n';
- return(uerr_cod);
- }
-
- COUNT WRTREC(datno,recbyt,recptr)
- COUNT datno;
- POINTER recbyt;
- TEXT *recptr;
- {
- FAST CTFILE *ctnum;
-
- if ((ctnum = tstfnm(datno)) == NULL || tstrec(ctnum,recbyt))
- return(uerr_cod);
- else {
- cts_msg.mretc = 0;
- return(recwrt(datno,recbyt,recptr,ctnum->reclen));
- }
- }
-
- COUNT REDREC(datno,recbyt,recptr)
- COUNT datno;
- POINTER recbyt;
- TEXT *recptr;
- {
- FAST CTFILE *ctnum;
-
- if ((ctnum = tstfnm(datno)) == NULL || tstrec(ctnum,recbyt))
- return(uerr_cod);
- return(recred(datno,recbyt,recptr,0,0));
- }
-
- #ifdef VARLDATA
- COUNT RETVREC(datno,recbyt)
- COUNT datno;
- POINTER recbyt;
- {
- return(ctapxe(datno,FN_RETVREC,recbyt,NULL));
- }
- #endif
-
- POINTER EQLKEY(keyno,target)
- COUNT keyno;
- TEXT *target;
- {
- return(ctapxv(keyno,FN_EQLKEY,0L,target,NULL));
- }
-
- POINTER NXTKEY(keyno,idxval)
- COUNT keyno;
- TEXT *idxval;
- {
- return(ctapxv(keyno,FN_NXTKEY,0L,NULL,idxval));
- }
-
- POINTER PRVKEY(keyno,idxval)
- COUNT keyno;
- TEXT *idxval;
- {
- return(ctapxv(keyno,FN_PRVKEY,0L,NULL,idxval));
- }
-
- POINTER FRSKEY(keyno,idxval)
- COUNT keyno;
- TEXT *idxval;
- {
- return(ctapxv(keyno,FN_FRSKEY,0L,NULL,idxval));
- }
-
- POINTER LSTKEY(keyno,idxval)
- COUNT keyno;
- TEXT *idxval;
- {
- return(ctapxv(keyno,FN_LSTKEY,0L,NULL,idxval));
- }
-
- POINTER FRCKEY(keyno,idxval,fractal)
- COUNT keyno;
- TEXT *idxval;
- COUNT fractal;
- {
- cts_msg.mseqn = fractal;
- return(ctapxv(keyno,FN_FRCKEY,0L,NULL,idxval));
- }
-
- POINTER GTEKEY(keyno,target, idxval)
- COUNT keyno;
- TEXT *target,*idxval;
- {
- return(ctapxv(keyno,FN_GTEKEY,0L,target,idxval));
- }
-
- POINTER GTKEY(keyno,target, idxval)
- COUNT keyno;
- TEXT *target,*idxval;
- {
- return(ctapxv(keyno,FN_GTKEY,0L,target,idxval));
- }
-
- POINTER LTEKEY(keyno,target, idxval)
- COUNT keyno;
- TEXT *target,*idxval;
- {
- return(ctapxv(keyno,FN_LTEKEY,0L,target,idxval));
- }
-
- POINTER LTKEY(keyno,target, idxval)
- COUNT keyno;
- TEXT *target,*idxval;
- {
- return(ctapxv(keyno,FN_LTKEY,0L,target,idxval));
- }
-
- #ifdef CTS_ISAM
- VOID setsrlpos(datno,recptr)
- COUNT datno;
- TEXT *recptr;
- {
- if ((ct_key + datno)->srlpos) {
- #ifndef NATURAL_SERIAL
- #ifdef LOW_HIGH
- revobj(&ct_gsrl,sizeof(ct_gsrl));
- #endif
- #endif
- cpybuf(recptr + (ct_key + datno)->srlpos - 1,
- &ct_gsrl,sizeof(ct_gsrl));
- }
- }
-
- COUNT MLTKEY(nops)
- COUNT nops;
- {
- FAST KEYOPS *k;
- FAST TEXT *tp;
-
- tp = ct_apxdat;
- cts_msg.mseqn = nops;
- cts_msg.mdlen = nops * sizeof(KEYOPS);
- k = cts_kops;
- while (nops-- > 0) {
- cpybuf(tp,k++,sizeof(KEYOPS));
- tp += sizeof(KEYOPS);
- }
- ctapxe(0,FN_MLTKEY,0L,NULL);
- if (uerr_cod == ARQS_ERR || uerr_cod == ARSP_ERR)
- return(-2);
- return(cts_msg.mseqn);
- }
-
- COUNT MLTWRT(datno,ppntr,recptr,rlen,sp)
- COUNT datno;
- POINTER *ppntr;
- TEXT *recptr;
- UCOUNT rlen,sp;
- {
- POINTER NEWREC();
-
- if (rlen > cts_mxaln) {
- if ((*ppntr = NEWREC(datno)) == DRNZERO)
- return(1);
- setsrlpos(datno,recptr);
- if (WRTREC(datno,*ppntr,recptr))
- return(2);
- return(0);
- } else {
- cts_msg.mdlen = rlen;
- cts_msg.mvlen = sp;
- ctapxe(datno,FN_MLTWRT,0L,recptr);
- if (uerr_cod == ARQS_ERR || uerr_cod == ARSP_ERR)
- return(-2);
- getsrlnum(&cts_msg);
- setsrlpos(datno,recptr);
- *ppntr = cts_msg.mpntr;
- return(cts_msg.mseqn);
- }
- }
- #endif
-
- COUNT ADDKEY(keyno,target,recbyt,typadd)
- COUNT keyno;
- TEXT *target;
- POINTER recbyt;
- COUNT typadd;
- {
- cts_msg.mseqn = typadd;
- return(ctapxe(keyno,FN_ADDKEY,recbyt,target));
- }
-
- POINTER DATENT(datno)
- COUNT datno;
- {
- return(ctapxv(datno,FN_DATENT,0L,NULL,NULL));
- }
-
- POINTER SERIALNUM(datno)
- COUNT datno;
- {
- return(ctapxv(datno,FN_SERIALNUM,0L,NULL,NULL));
- }
-
- POINTER DELBLD(keyno,target)
- COUNT keyno;
- TEXT *target;
- {
- return(ctapxv(keyno,FN_DELBLD,0L,target,NULL));
- }
-
- COUNT DELCHK(keyno,target,recbyt)
- COUNT keyno;
- TEXT *target;
- POINTER recbyt;
- {
- return(ctapxe(keyno,FN_DELCHK,recbyt,target));
- }
-
- POINTER IDXENT(keyno)
- COUNT keyno;
- {
- return(ctapxv(keyno,FN_IDXENT,0L,NULL,NULL));
- }
-
- COUNT LOKREC(datno,lokmod,recbyt)
- COUNT datno,lokmod;
- POINTER recbyt;
- {
- cts_msg.mseqn = lokmod;
- return(ctapxe(datno,FN_LOKREC,recbyt,NULL));
- }
-
- POINTER NEWREC(datno)
- COUNT datno;
- {
- POINTER retval;
-
- if ((retval = ctapxv(datno,FN_NEWREC,0L,NULL,NULL)) != DRNZERO)
- getsrlnum(&cts_msg);
- return(retval);
- }
-
- COUNT RETREC(datno,recbyt)
- COUNT datno;
- POINTER recbyt;
- {
- return(ctapxe(datno,FN_RETREC,recbyt,NULL));
- }
-
- /* end of ctappx.c */
-