From 144bca4af7e36a6a95a1c91f5f30a4a273a76516 Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Thu, 28 Jun 2018 18:59:15 +0100 Subject: [PATCH] libDtSearch: Remove optional support for ancient DOS far pointer --- cde/lib/DtSearch/raima/alloc.c | 56 ++++----- cde/lib/DtSearch/raima/cmtype.c | 10 +- cde/lib/DtSearch/raima/connect.c | 66 +++++----- cde/lib/DtSearch/raima/cotype.c | 10 +- cde/lib/DtSearch/raima/crget.c | 2 +- cde/lib/DtSearch/raima/crread.c | 10 +- cde/lib/DtSearch/raima/crset.c | 2 +- cde/lib/DtSearch/raima/crtype.c | 4 +- cde/lib/DtSearch/raima/crwrite.c | 10 +- cde/lib/DtSearch/raima/csmget.c | 6 +- cde/lib/DtSearch/raima/csmread.c | 16 +-- cde/lib/DtSearch/raima/csmset.c | 12 +- cde/lib/DtSearch/raima/csmwrite.c | 18 +-- cde/lib/DtSearch/raima/csoget.c | 6 +- cde/lib/DtSearch/raima/csoread.c | 16 +-- cde/lib/DtSearch/raima/csoset.c | 10 +- cde/lib/DtSearch/raima/csowrite.c | 20 +-- cde/lib/DtSearch/raima/ctscm.c | 10 +- cde/lib/DtSearch/raima/ctsco.c | 10 +- cde/lib/DtSearch/raima/ctscr.c | 4 +- cde/lib/DtSearch/raima/dbacode.c | 6 +- cde/lib/DtSearch/raima/dbdpath.c | 2 +- cde/lib/DtSearch/raima/dbfpath.c | 2 +- cde/lib/DtSearch/raima/dblfcns.c | 200 +++++++++++++++--------------- cde/lib/DtSearch/raima/dblog.c | 2 +- cde/lib/DtSearch/raima/dbtaf.c | 2 +- cde/lib/DtSearch/raima/dbtype.h | 66 +++++----- cde/lib/DtSearch/raima/dbuserid.c | 4 +- cde/lib/DtSearch/raima/dbxtrn.h | 8 +- cde/lib/DtSearch/raima/delete.c | 12 +- cde/lib/DtSearch/raima/destroy.c | 4 +- cde/lib/DtSearch/raima/dio.c | 142 ++++++++++----------- cde/lib/DtSearch/raima/discon.c | 36 +++--- cde/lib/DtSearch/raima/disdel.c | 6 +- cde/lib/DtSearch/raima/dproto.h | 124 +++++++++--------- cde/lib/DtSearch/raima/fillnew.c | 20 +-- cde/lib/DtSearch/raima/findco.c | 6 +- cde/lib/DtSearch/raima/findfm.c | 8 +- cde/lib/DtSearch/raima/findlm.c | 8 +- cde/lib/DtSearch/raima/findnm.c | 10 +- cde/lib/DtSearch/raima/findpm.c | 10 +- cde/lib/DtSearch/raima/gtscm.c | 6 +- cde/lib/DtSearch/raima/gtsco.c | 6 +- cde/lib/DtSearch/raima/gtscr.c | 2 +- cde/lib/DtSearch/raima/gtscs.c | 6 +- cde/lib/DtSearch/raima/initial.c | 18 +-- cde/lib/DtSearch/raima/inittab.c | 52 ++++---- cde/lib/DtSearch/raima/inittab.h | 2 +- cde/lib/DtSearch/raima/ismember.c | 6 +- cde/lib/DtSearch/raima/isowner.c | 6 +- cde/lib/DtSearch/raima/keydel.c | 12 +- cde/lib/DtSearch/raima/keyexist.c | 10 +- cde/lib/DtSearch/raima/keyfcns.c | 196 ++++++++++++++--------------- cde/lib/DtSearch/raima/keyfind.c | 28 ++--- cde/lib/DtSearch/raima/keyfrst.c | 6 +- cde/lib/DtSearch/raima/keylast.c | 6 +- cde/lib/DtSearch/raima/keynext.c | 6 +- cde/lib/DtSearch/raima/keyprev.c | 6 +- cde/lib/DtSearch/raima/keystore.c | 12 +- cde/lib/DtSearch/raima/libfcns.c | 44 +++---- cde/lib/DtSearch/raima/ll.h | 16 +-- cde/lib/DtSearch/raima/makenew.c | 38 +++--- cde/lib/DtSearch/raima/mapchar.c | 4 +- cde/lib/DtSearch/raima/members.c | 10 +- cde/lib/DtSearch/raima/ncb.h | 4 +- cde/lib/DtSearch/raima/opens.c | 2 +- cde/lib/DtSearch/raima/pathfcns.c | 44 +++---- cde/lib/DtSearch/raima/proto.h | 110 ++++++++-------- cde/lib/DtSearch/raima/recfcns.c | 96 +++++++------- cde/lib/DtSearch/raima/recfrst.c | 8 +- cde/lib/DtSearch/raima/reclast.c | 8 +- cde/lib/DtSearch/raima/recnext.c | 8 +- cde/lib/DtSearch/raima/recprev.c | 8 +- cde/lib/DtSearch/raima/recread.c | 6 +- cde/lib/DtSearch/raima/recset.c | 4 +- cde/lib/DtSearch/raima/recstat.c | 4 +- cde/lib/DtSearch/raima/recwrite.c | 16 +-- cde/lib/DtSearch/raima/renfile.c | 14 +-- cde/lib/DtSearch/raima/rwcurr.c | 6 +- cde/lib/DtSearch/raima/setmm.c | 6 +- cde/lib/DtSearch/raima/setmo.c | 10 +- cde/lib/DtSearch/raima/setmr.c | 6 +- cde/lib/DtSearch/raima/setom.c | 4 +- cde/lib/DtSearch/raima/setoo.c | 8 +- cde/lib/DtSearch/raima/setor.c | 4 +- cde/lib/DtSearch/raima/setrm.c | 4 +- cde/lib/DtSearch/raima/setro.c | 4 +- cde/lib/DtSearch/raima/startup.c | 2 +- cde/lib/DtSearch/raima/stscm.c | 4 +- cde/lib/DtSearch/raima/stsco.c | 4 +- cde/lib/DtSearch/raima/stscs.c | 4 +- cde/lib/DtSearch/raima/task.h | 112 ++++++++--------- cde/lib/DtSearch/raima/utscm.c | 10 +- cde/lib/DtSearch/raima/utsco.c | 10 +- cde/lib/DtSearch/raima/utscr.c | 4 +- cde/lib/DtSearch/raima/utscs.c | 10 +- cde/lib/DtSearch/raima/vista.h | 22 ++-- 97 files changed, 1018 insertions(+), 1022 deletions(-) diff --git a/cde/lib/DtSearch/raima/alloc.c b/cde/lib/DtSearch/raima/alloc.c index 6b44a2da..fb683521 100644 --- a/cde/lib/DtSearch/raima/alloc.c +++ b/cde/lib/DtSearch/raima/alloc.c @@ -90,7 +90,7 @@ /* Allocate and clear i*s bytes of memory */ -char FAR * d_calloc(i, s) +char * d_calloc(i, s) unsigned i, s; { return (I_CALLOC(cp, i, s)); @@ -99,7 +99,7 @@ unsigned i, s; /* Allocate b bytes of memory */ -char FAR * d_alloc(b) +char * d_alloc(b) unsigned b; { return (I_MALLOC(cp, b)); @@ -108,7 +108,7 @@ unsigned b; /* Free memory */ void d_free(p) -CHAR_P FAR *p; +CHAR_P *p; { if ((p != NULL) && (p->ptr != NULL)) { I_FREE(p); @@ -117,12 +117,12 @@ CHAR_P FAR *p; } -static int NewInit(P1(LL_P FAR *)); +static int NewInit(P1(LL_P *)); /* Resets pointer to current element and checks for an empty list */ BOOLEAN ll_access(ll) -llist FAR *ll; +llist *ll; { ll->curr = NULL; return( ll->head.ptr != NULL && ll->tail.ptr != NULL ); @@ -131,8 +131,8 @@ llist FAR *ll; /* Appends item to list */ int ll_append(ll, data) -llist FAR *ll; -CHAR_P FAR *data; +llist *ll; +CHAR_P *data; { LL_P item; LL_P hold; @@ -143,18 +143,18 @@ CHAR_P FAR *data; if ( ll->head.ptr == NULL ) { /* Empty list */ ll->head = ll->tail = item; - ll->curr = (LL_P FAR *)&ll->head; + ll->curr = (LL_P *)&ll->head; CurrLock(ll); } else { CurrUnlock(ll); - ll->curr = (LL_P FAR *)&ll->tail; + ll->curr = (LL_P *)&ll->tail; CurrLock(ll); hold = item; MEM_LOCK(&item); ll->curr->ptr->next = item; CurrUnlock(ll); - ll->curr = (LL_P FAR *)&ll->tail; + ll->curr = (LL_P *)&ll->tail; *ll->curr = hold; CurrLock(ll); } @@ -164,33 +164,33 @@ CHAR_P FAR *data; /* Finds the first element of a list and returns its data */ -CHAR_P FAR *ll_first(ll) -llist FAR *ll; +CHAR_P *ll_first(ll) +llist *ll; { if ( ll->head.ptr == NULL ) { return( NULL ); } CurrUnlock(ll); - ll->curr = (LL_P FAR *)&ll->head; + ll->curr = (LL_P *)&ll->head; CurrLock(ll); - return( (CHAR_P FAR *)&ll->curr->ptr->data ); + return( (CHAR_P *)&ll->curr->ptr->data ); } /* Frees a list */ void ll_free(ll) -llist FAR *ll; +llist *ll; { - LL_P FAR *curr, next, free; + LL_P *curr, next, free; - curr = (LL_P FAR *)&ll->head; + curr = (LL_P *)&ll->head; while ( TRUE ) { MEM_LOCK(curr); if ( curr->ptr == NULL ) break; bytecpy(&next, &curr->ptr->next, sizeof(LL_P)); if ( curr != NULL ) - d_free((CHAR_P FAR *)curr); + d_free((CHAR_P *)curr); bytecpy(&free, &next, sizeof(LL_P)); curr = &free; } @@ -200,10 +200,10 @@ llist FAR *ll; /* Finds the next element and returns its data */ -CHAR_P FAR *ll_next(ll) -llist FAR *ll; +CHAR_P *ll_next(ll) +llist *ll; { - LL_P FAR *next; + LL_P *next; if ( ll->curr == NULL ) { return( ll_first(ll) ); @@ -215,14 +215,14 @@ llist FAR *ll; CurrUnlock(ll); ll->curr = next; CurrLock(ll); - return( (CHAR_P FAR *)&ll->curr->ptr->data ); + return( (CHAR_P *)&ll->curr->ptr->data ); } /* Prepends (stacks) item */ int ll_prepend(ll, data) -llist FAR *ll; -CHAR_P FAR *data; +llist *ll; +CHAR_P *data; { LL_P item; @@ -232,7 +232,7 @@ CHAR_P FAR *data; if ( ll->head.ptr == NULL ) { /* Empty list */ ll->head = ll->tail = item; - ll->curr = (LL_P FAR *)&ll->head; + ll->curr = (LL_P *)&ll->head; CurrLock(ll); } else { @@ -240,7 +240,7 @@ CHAR_P FAR *data; MEM_LOCK(&item); item.ptr->next = ll->head; MEM_UNLOCK(&item); - ll->curr = (LL_P FAR *)&ll->head; + ll->curr = (LL_P *)&ll->head; *ll->curr = item; CurrLock(ll); } @@ -251,9 +251,9 @@ CHAR_P FAR *data; /* Allocates and initializes a new list element */ static int NewInit(new) -LL_P FAR *new; +LL_P *new; { - new->ptr = (ll_elem FAR *)ALLOC(new, sizeof(ll_elem), "new"); + new->ptr = (ll_elem *)ALLOC(new, sizeof(ll_elem), "new"); if ( new->ptr == NULL ) return( dberr(S_NOMEMORY) ); byteset(new->ptr, '\0', sizeof(ll_elem)); diff --git a/cde/lib/DtSearch/raima/cmtype.c b/cde/lib/DtSearch/raima/cmtype.c index 6cb9d3fc..78d46d81 100644 --- a/cde/lib/DtSearch/raima/cmtype.c +++ b/cde/lib/DtSearch/raima/cmtype.c @@ -54,20 +54,20 @@ int d_cmtype(set, cmtype TASK_PARM DBN_PARM) int set; -int FAR *cmtype; +int *cmtype; TASK_DECL DBN_DECL { - char FAR *mrec; + char *mrec; INT crt; - SET_ENTRY FAR *set_ptr; + SET_ENTRY *set_ptr; #ifndef SINGLE_USER int dbopen_sv; #endif DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); - if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) + if (nset_check(set, &set, (SET_ENTRY **)&set_ptr) != S_OKAY) RETURN( db_status ); if ( ! curr_mem[set] ) @@ -80,7 +80,7 @@ DBN_DECL #endif /* Read current member */ - dio_read(curr_mem[set], (char FAR * FAR *)&mrec, NOPGHOLD); + dio_read(curr_mem[set], (char **)&mrec, NOPGHOLD); #ifndef SINGLE_USER dbopen = dbopen_sv; #endif diff --git a/cde/lib/DtSearch/raima/connect.c b/cde/lib/DtSearch/raima/connect.c index 97162452..27d8a08c 100644 --- a/cde/lib/DtSearch/raima/connect.c +++ b/cde/lib/DtSearch/raima/connect.c @@ -50,8 +50,8 @@ #include "dbtype.h" /* Internal function Prototypes */ -static int sortcmp(P1(SET_ENTRY FAR *) Pi(char FAR *) - Pi(char FAR *)); +static int sortcmp(P1(SET_ENTRY *) Pi(char *) + Pi(char *)); /* set pointer structure definition */ typedef struct { @@ -83,10 +83,10 @@ DBN_DECL /* Database number */ SET_PTR cosp; /* current owner's set pointer */ MEM_PTR cmmp; /* current member's member pointer */ MEM_PTR nmmp; /* next member's member pointer */ - char FAR *crec; /* ptr to current record contents in cache */ - char FAR *orec; /* ptr to current owner record contents in cache */ - char FAR *mrec; /* ptr to current member record contents in cache */ - char FAR *nrec; /* ptr to next member record contents in cache */ + char *crec; /* ptr to current record contents in cache */ + char *orec; /* ptr to current owner record contents in cache */ + char *mrec; /* ptr to current member record contents in cache */ + char *nrec; /* ptr to next member record contents in cache */ DB_ADDR mdba; /* db address of current member record */ DB_ADDR ndba; /* db address of next member record */ INT ordering; /* set order control variable */ @@ -94,13 +94,13 @@ DBN_DECL /* Database number */ #ifndef NO_TIMESTAMP FILE_NO file; #endif - SET_ENTRY FAR *set_ptr; - DB_ADDR FAR *co_ptr; - DB_ADDR FAR *cm_ptr; + SET_ENTRY *set_ptr; + DB_ADDR *co_ptr; + DB_ADDR *cm_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); - if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) + if (nset_check(set, &set, (SET_ENTRY **)&set_ptr) != S_OKAY) RETURN( db_status ); /* make sure we have a current record */ @@ -114,16 +114,16 @@ DBN_DECL /* Database number */ crec = orec = mrec = nrec = NULL; /* read current record */ - if ( dio_read( curr_rec, (char FAR * FAR *)&crec, PGHOLD ) != S_OKAY ) + if ( dio_read( curr_rec, (char **)&crec, PGHOLD ) != S_OKAY ) RETURN( db_status ); /* read owner record */ - if ( (stat = dio_read(*co_ptr, (char FAR * FAR *)&orec, PGHOLD)) != S_OKAY ) { + if ( (stat = dio_read(*co_ptr, (char **)&orec, PGHOLD)) != S_OKAY ) { dio_release( curr_rec ); RETURN( stat ); } /* get copy of current record's member ptr for set */ - if ( (stat = r_gmem(set, crec, (char FAR *)&crmp)) != S_OKAY ) + if ( (stat = r_gmem(set, crec, (char *)&crmp)) != S_OKAY ) goto quit; /* ensure record not already connected to set */ @@ -132,7 +132,7 @@ DBN_DECL /* Database number */ goto quit; } /* get set pointer from owner */ - if ( r_gset(set, orec, (char FAR *)&cosp) != S_OKAY ) { + if ( r_gset(set, orec, (char *)&cosp) != S_OKAY ) { stat = db_status == S_INVOWN ? dberr(S_SYSERR) : db_status; goto quit; } @@ -162,8 +162,8 @@ DBN_DECL /* Database number */ for (mdba = cosp.first; TRUE; mdba = cmmp.next) { /* read member record and get member pointer from member record */ - if (((stat = dio_read(mdba, (char FAR * FAR *)&mrec, NOPGHOLD)) != S_OKAY) || - ((stat = r_gmem(set, mrec, (char FAR *)&cmmp)) != S_OKAY)) + if (((stat = dio_read(mdba, (char * *)&mrec, NOPGHOLD)) != S_OKAY) || + ((stat = r_gmem(set, mrec, (char *)&cmmp)) != S_OKAY)) goto quit; /* compare sort fields of current record with member record */ @@ -190,8 +190,8 @@ DBN_DECL /* Database number */ member pointer */ mdba = cosp.first; - if (((stat = dio_read(mdba, (char FAR * FAR *)&mrec, PGHOLD)) != S_OKAY) || - ((stat = r_gmem(set, mrec, (char FAR *)&cmmp)) != S_OKAY)) + if (((stat = dio_read(mdba, (char * *)&mrec, PGHOLD)) != S_OKAY) || + ((stat = r_gmem(set, mrec, (char *)&cmmp)) != S_OKAY)) goto quit; /* set current member's previous, and current owner's first, to @@ -210,8 +210,8 @@ DBN_DECL /* Database number */ /* read current member record and get member pointer from current member */ - if (((stat = dio_read(mdba, (char FAR * FAR *)&mrec, PGHOLD)) != S_OKAY) || - ((stat = r_gmem(set, mrec, (char FAR *)&cmmp)) != S_OKAY)) + if (((stat = dio_read(mdba, (char * *)&mrec, PGHOLD)) != S_OKAY) || + ((stat = r_gmem(set, mrec, (char *)&cmmp)) != S_OKAY)) goto quit; /* set current record's next to current member's next */ @@ -231,8 +231,8 @@ DBN_DECL /* Database number */ } /* read next member record and member pointer from next member */ ndba = crmp.next; - if (((stat = dio_read(ndba, (char FAR * FAR *)&nrec, PGHOLD)) != S_OKAY) || - ((stat = r_gmem(set, nrec, (char FAR *)&nmmp)) != S_OKAY)) + if (((stat = dio_read(ndba, (char * *)&nrec, PGHOLD)) != S_OKAY) || + ((stat = r_gmem(set, nrec, (char *)&nmmp)) != S_OKAY)) goto quit; /* set previous pointer in next member to current record */ @@ -262,7 +262,7 @@ inserted: /* put member pointer back into member record and mark member record as modified */ - if (((stat = r_pmem(set, mrec, (char FAR *)&cmmp)) != S_OKAY) || + if (((stat = r_pmem(set, mrec, (char *)&cmmp)) != S_OKAY) || ((stat = dio_write(mdba, NULL, PGFREE)) != S_OKAY)) goto quit; } @@ -270,16 +270,16 @@ inserted: /* put member pointer back into next record and mark next record as modified */ - if (((stat = r_pmem(set, nrec, (char FAR *)&nmmp)) != S_OKAY) || + if (((stat = r_pmem(set, nrec, (char *)&nmmp)) != S_OKAY) || ((stat = dio_write(ndba, NULL, PGFREE)) != S_OKAY)) goto quit; } /* put set pointer back into owner record and mark owner record as modified; put member pointer back into current record mark current record as modified */ - if (((stat = r_pset(set, orec, (char FAR *)&cosp)) != S_OKAY) || + if (((stat = r_pset(set, orec, (char *)&cosp)) != S_OKAY) || ((stat = dio_write(*co_ptr, NULL, PGFREE)) != S_OKAY) || - ((stat = r_pmem(set, crec, (char FAR *)&crmp)) != S_OKAY) || + ((stat = r_pmem(set, crec, (char *)&crmp)) != S_OKAY) || ((stat = dio_write(curr_rec, NULL, PGFREE)) != S_OKAY)) goto quit; @@ -307,18 +307,18 @@ quit: /* Compare two sort fields */ static int sortcmp(set_ptr, mem1, mem2) -SET_ENTRY FAR *set_ptr; /* set table entry */ -char FAR *mem1; /* member record 1 */ -char FAR *mem2; /* member record 2 */ +SET_ENTRY *set_ptr; /* set table entry */ +char *mem1; /* member record 1 */ +char *mem2; /* member record 2 */ { INT rn1, rn2; /* record numbers for mem1 & mem2 */ - MEMBER_ENTRY FAR *mt1, FAR *mt2; - MEMBER_ENTRY FAR *mt; + MEMBER_ENTRY *mt1, *mt2; + MEMBER_ENTRY *mt; int mem, memtot; int cmp; /* fldcmp result */ int maxflds; - SORT_ENTRY FAR *srt1_ptr, FAR *srt2_ptr; - FIELD_ENTRY FAR *fld_ptr; + SORT_ENTRY *srt1_ptr, *srt2_ptr; + FIELD_ENTRY *fld_ptr; /* extract record numbers from record header */ bytecpy(&rn1, mem1, sizeof(INT)); diff --git a/cde/lib/DtSearch/raima/cotype.c b/cde/lib/DtSearch/raima/cotype.c index 1dad100e..0da5d96c 100644 --- a/cde/lib/DtSearch/raima/cotype.c +++ b/cde/lib/DtSearch/raima/cotype.c @@ -53,20 +53,20 @@ int d_cotype(set, cotype TASK_PARM DBN_PARM) int set; -int FAR *cotype; +int *cotype; TASK_DECL DBN_DECL { - char FAR *orec; + char *orec; INT crt; #ifndef SINGLE_USER int dbopen_sv; #endif - SET_ENTRY FAR *set_ptr; + SET_ENTRY *set_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); - if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) + if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) RETURN( db_status ); if ( ! curr_own[set] ) @@ -79,7 +79,7 @@ DBN_DECL #endif /* Read current owner */ - dio_read(curr_own[set], (char FAR * FAR *)&orec, NOPGHOLD); + dio_read(curr_own[set], (char * *)&orec, NOPGHOLD); #ifndef SINGLE_USER dbopen = dbopen_sv; #endif diff --git a/cde/lib/DtSearch/raima/crget.c b/cde/lib/DtSearch/raima/crget.c index 978d3b7f..11b4f1aa 100644 --- a/cde/lib/DtSearch/raima/crget.c +++ b/cde/lib/DtSearch/raima/crget.c @@ -51,7 +51,7 @@ */ int d_crget(dba TASK_PARM DBN_PARM) -DB_ADDR FAR *dba; /* db address of record to become current */ +DB_ADDR *dba; /* db address of record to become current */ TASK_DECL DBN_DECL { diff --git a/cde/lib/DtSearch/raima/crread.c b/cde/lib/DtSearch/raima/crread.c index b4522166..a0350d01 100644 --- a/cde/lib/DtSearch/raima/crread.c +++ b/cde/lib/DtSearch/raima/crread.c @@ -53,7 +53,7 @@ int d_crread(field, data TASK_PARM DBN_PARM) long field; /* Field constant */ -char FAR *data; /* Data area to contain field contents */ +char *data; /* Data area to contain field contents */ TASK_DECL DBN_DECL /* database number */ { @@ -61,12 +61,12 @@ DBN_DECL /* database number */ #ifndef SINGLE_USER int dbopen_sv; #endif - RECORD_ENTRY FAR *rec_ptr; - FIELD_ENTRY FAR *fld_ptr; + RECORD_ENTRY *rec_ptr; + FIELD_ENTRY *fld_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO)); - if (nfld_check(field, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY) + if (nfld_check(field, &rec, &fld, (RECORD_ENTRY * *)&rec_ptr, (FIELD_ENTRY * *)&fld_ptr) != S_OKAY) RETURN( db_status ); /* Make sure we have a current record */ @@ -80,7 +80,7 @@ DBN_DECL /* database number */ #endif /* Read current record */ - dio_read( curr_rec, (char FAR * FAR *)&crloc , NOPGHOLD); + dio_read( curr_rec, (char * *)&crloc , NOPGHOLD); #ifndef SINGLE_USER dbopen = dbopen_sv; #endif diff --git a/cde/lib/DtSearch/raima/crset.c b/cde/lib/DtSearch/raima/crset.c index 90ceff9e..2df1fd6f 100644 --- a/cde/lib/DtSearch/raima/crset.c +++ b/cde/lib/DtSearch/raima/crset.c @@ -51,7 +51,7 @@ */ int d_crset(dba TASK_PARM DBN_PARM) -DB_ADDR FAR *dba; /* db address of record to become current */ +DB_ADDR *dba; /* db address of record to become current */ TASK_DECL DBN_DECL { diff --git a/cde/lib/DtSearch/raima/crtype.c b/cde/lib/DtSearch/raima/crtype.c index 1f1f9b36..20e605d9 100644 --- a/cde/lib/DtSearch/raima/crtype.c +++ b/cde/lib/DtSearch/raima/crtype.c @@ -51,7 +51,7 @@ */ int d_crtype(crtype TASK_PARM DBN_PARM) -int FAR *crtype; +int *crtype; TASK_DECL DBN_DECL { @@ -74,7 +74,7 @@ DBN_DECL #endif /* Read current record */ - dio_read(curr_rec, (char FAR * FAR *)&crloc, NOPGHOLD); + dio_read(curr_rec, (char * *)&crloc, NOPGHOLD); #ifndef SINGLE_USER dbopen = dbopen_sv; #endif diff --git a/cde/lib/DtSearch/raima/crwrite.c b/cde/lib/DtSearch/raima/crwrite.c index ad7aa0dd..7b5fd3f3 100644 --- a/cde/lib/DtSearch/raima/crwrite.c +++ b/cde/lib/DtSearch/raima/crwrite.c @@ -53,7 +53,7 @@ int d_crwrite(field, data TASK_PARM DBN_PARM) long field; /* field constant */ -char FAR *data; /* data area to contain field contents */ +char *data; /* data area to contain field contents */ TASK_DECL DBN_DECL /* database number */ { @@ -61,12 +61,12 @@ DBN_DECL /* database number */ ULONG timestamp; #endif int stat, fld, rec; - RECORD_ENTRY FAR *rec_ptr; - FIELD_ENTRY FAR *fld_ptr; + RECORD_ENTRY *rec_ptr; + FIELD_ENTRY *fld_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); - if (nfld_check(field, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY) + if (nfld_check(field, &rec, &fld, (RECORD_ENTRY * *)&rec_ptr, (FIELD_ENTRY * *)&fld_ptr) != S_OKAY) RETURN( db_status ); /* compound keys cannot be updated directly */ @@ -82,7 +82,7 @@ DBN_DECL /* database number */ RETURN( dberr(S_NOCR) ); /* Read current record */ - if ( dio_read( curr_rec, (char FAR * FAR *)&crloc , PGHOLD) != S_OKAY ) + if ( dio_read( curr_rec, (char * *)&crloc , PGHOLD) != S_OKAY ) RETURN( db_status ); /* check out the field */ diff --git a/cde/lib/DtSearch/raima/csmget.c b/cde/lib/DtSearch/raima/csmget.c index 9d2f99a2..009a2426 100644 --- a/cde/lib/DtSearch/raima/csmget.c +++ b/cde/lib/DtSearch/raima/csmget.c @@ -52,15 +52,15 @@ int d_csmget(set, dba TASK_PARM DBN_PARM) int set; /* Set table entry */ -DB_ADDR FAR *dba; /* db address of record to become current */ +DB_ADDR *dba; /* db address of record to become current */ TASK_DECL DBN_DECL /* database number */ { - SET_ENTRY FAR *set_ptr; + SET_ENTRY *set_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_NOIO)); - if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) + if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) RETURN( db_status ); if ( ! (*dba = curr_mem[set]) ) diff --git a/cde/lib/DtSearch/raima/csmread.c b/cde/lib/DtSearch/raima/csmread.c index d0858d55..b1416569 100644 --- a/cde/lib/DtSearch/raima/csmread.c +++ b/cde/lib/DtSearch/raima/csmread.c @@ -54,7 +54,7 @@ int d_csmread(set, field, data TASK_PARM DBN_PARM) int set; /* Set constant */ long field; /* Field constant */ -char FAR *data; /* Data area to contain field contents */ +char *data; /* Data area to contain field contents */ TASK_DECL DBN_DECL /* database number */ { @@ -62,15 +62,15 @@ DBN_DECL /* database number */ #ifndef SINGLE_USER int dbopen_sv; #endif - char FAR *recp; - SET_ENTRY FAR *set_ptr; - RECORD_ENTRY FAR *rec_ptr; - FIELD_ENTRY FAR *fld_ptr; + char *recp; + SET_ENTRY *set_ptr; + RECORD_ENTRY *rec_ptr; + FIELD_ENTRY *fld_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); - if ((nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) || - (nfld_check(field, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY)) + if ((nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) || + (nfld_check(field, &rec, &fld, (RECORD_ENTRY * *)&rec_ptr, (FIELD_ENTRY * *)&fld_ptr) != S_OKAY)) RETURN( db_status ); /* Make sure we have a current member */ @@ -84,7 +84,7 @@ DBN_DECL /* database number */ #endif /* Read current member */ - dio_read( curr_mem[set], (char FAR * FAR *)&recp , NOPGHOLD); + dio_read( curr_mem[set], (char * *)&recp , NOPGHOLD); #ifndef SINGLE_USER dbopen = dbopen_sv; #endif diff --git a/cde/lib/DtSearch/raima/csmset.c b/cde/lib/DtSearch/raima/csmset.c index bd008d70..2fd0f545 100644 --- a/cde/lib/DtSearch/raima/csmset.c +++ b/cde/lib/DtSearch/raima/csmset.c @@ -52,19 +52,19 @@ int d_csmset(set, dba TASK_PARM DBN_PARM) int set; /* Set table entry */ -DB_ADDR FAR *dba; /* db address of record to become current */ +DB_ADDR *dba; /* db address of record to become current */ TASK_DECL DBN_DECL /* database number */ { INT type; - char FAR *ptr; - SET_ENTRY FAR *set_ptr; - MEMBER_ENTRY FAR *mem_ptr; + char *ptr; + SET_ENTRY *set_ptr; + MEMBER_ENTRY *mem_ptr; int mem, memtot; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); - if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) + if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) RETURN( db_status ); if ( dba == NULL ) { @@ -72,7 +72,7 @@ DBN_DECL /* database number */ } else if ( check_dba(*dba) == S_OKAY ) { /* get the record type */ - if ( dio_read( *dba, (char FAR * FAR *)&ptr, NOPGHOLD ) ) RETURN( db_status ); + if ( dio_read( *dba, (char * *)&ptr, NOPGHOLD ) ) RETURN( db_status ); bytecpy( &type, ptr, sizeof(INT) ); type &= ~RLBMASK; #ifndef ONE_DB diff --git a/cde/lib/DtSearch/raima/csmwrite.c b/cde/lib/DtSearch/raima/csmwrite.c index 8340f067..cf529f01 100644 --- a/cde/lib/DtSearch/raima/csmwrite.c +++ b/cde/lib/DtSearch/raima/csmwrite.c @@ -54,7 +54,7 @@ int d_csmwrite(set, field, data TASK_PARM DBN_PARM) int set; /* Set constant */ long field; /* Field constant */ -CONST char FAR *data; /* Data area to contain field contents */ +CONST char *data; /* Data area to contain field contents */ TASK_DECL DBN_DECL /* database number */ { @@ -62,16 +62,16 @@ DBN_DECL /* database number */ ULONG timestamp; #endif int stat, fld, rec; - char FAR *recp; - SET_ENTRY FAR *set_ptr; - RECORD_ENTRY FAR *rec_ptr; - FIELD_ENTRY FAR *fld_ptr; - DB_ADDR FAR *cm_ptr; + char *recp; + SET_ENTRY *set_ptr; + RECORD_ENTRY *rec_ptr; + FIELD_ENTRY *fld_ptr; + DB_ADDR *cm_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); - if ((nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) || - (nfld_check(field, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY)) + if ((nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) || + (nfld_check(field, &rec, &fld, (RECORD_ENTRY * *)&rec_ptr, (FIELD_ENTRY * *)&fld_ptr) != S_OKAY)) RETURN( db_status ); /* compound keys cannot be updated directly */ @@ -87,7 +87,7 @@ DBN_DECL /* database number */ RETURN( dberr(S_NOCM) ); /* Read current member */ - if ( dio_read( *cm_ptr, (char FAR * FAR *)&recp , PGHOLD) != S_OKAY ) + if ( dio_read( *cm_ptr, (char * *)&recp , PGHOLD) != S_OKAY ) RETURN( db_status ); /* check out the field */ diff --git a/cde/lib/DtSearch/raima/csoget.c b/cde/lib/DtSearch/raima/csoget.c index 060c9491..d3bf7d19 100644 --- a/cde/lib/DtSearch/raima/csoget.c +++ b/cde/lib/DtSearch/raima/csoget.c @@ -53,15 +53,15 @@ int d_csoget(set, dba TASK_PARM DBN_PARM) int set; /* Set table entry */ -DB_ADDR FAR *dba; /* db address of record to become current */ +DB_ADDR *dba; /* db address of record to become current */ TASK_DECL DBN_DECL /* database number */ { - SET_ENTRY FAR *set_ptr; + SET_ENTRY *set_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_NOIO)); - if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) + if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) RETURN( db_status ); if ( ! (*dba = curr_own[set]) ) diff --git a/cde/lib/DtSearch/raima/csoread.c b/cde/lib/DtSearch/raima/csoread.c index 6a3445d8..55bc85e3 100644 --- a/cde/lib/DtSearch/raima/csoread.c +++ b/cde/lib/DtSearch/raima/csoread.c @@ -54,7 +54,7 @@ int d_csoread(set, field, data TASK_PARM DBN_PARM) int set; /* Set constant */ long field; /* Field constant */ -char FAR *data; /* Data area to contain field contents */ +char *data; /* Data area to contain field contents */ TASK_DECL DBN_DECL /* database number */ { @@ -62,15 +62,15 @@ DBN_DECL /* database number */ #ifndef SINGLE_USER int dbopen_sv; #endif - char FAR *recp; - SET_ENTRY FAR *set_ptr; - RECORD_ENTRY FAR *rec_ptr; - FIELD_ENTRY FAR *fld_ptr; + char *recp; + SET_ENTRY *set_ptr; + RECORD_ENTRY *rec_ptr; + FIELD_ENTRY *fld_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); - if ((nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) || - (nfld_check(field, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY)) + if ((nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) || + (nfld_check(field, &rec, &fld, (RECORD_ENTRY * *)&rec_ptr, (FIELD_ENTRY * *)&fld_ptr) != S_OKAY)) RETURN( db_status ); /* Make sure we have a current owner */ @@ -84,7 +84,7 @@ DBN_DECL /* database number */ #endif /* Read current owner */ - dio_read( curr_own[set], (char FAR * FAR *)&recp , NOPGHOLD); + dio_read( curr_own[set], (char * *)&recp , NOPGHOLD); #ifndef SINGLE_USER dbopen = dbopen_sv; #endif diff --git a/cde/lib/DtSearch/raima/csoset.c b/cde/lib/DtSearch/raima/csoset.c index 63d15a40..6deab969 100644 --- a/cde/lib/DtSearch/raima/csoset.c +++ b/cde/lib/DtSearch/raima/csoset.c @@ -53,17 +53,17 @@ int d_csoset(set, dba TASK_PARM DBN_PARM) int set; /* Set table entry */ -DB_ADDR FAR *dba; /* db address of record to become current */ +DB_ADDR *dba; /* db address of record to become current */ TASK_DECL DBN_DECL /* database number */ { INT type; - char FAR *ptr; - SET_ENTRY FAR *set_ptr; + char *ptr; + SET_ENTRY *set_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); - if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) + if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) RETURN( db_status ); if ( dba == NULL ) { @@ -71,7 +71,7 @@ DBN_DECL /* database number */ } else if ( check_dba(*dba) == S_OKAY ) { /* get the record type */ - if ( dio_read( *dba, (char FAR * FAR *)&ptr , NOPGHOLD) ) RETURN( db_status ); + if ( dio_read( *dba, (char * *)&ptr , NOPGHOLD) ) RETURN( db_status ); bytecpy( &type, ptr, sizeof(INT) ); type &= ~RLBMASK; #ifndef ONE_DB diff --git a/cde/lib/DtSearch/raima/csowrite.c b/cde/lib/DtSearch/raima/csowrite.c index 1e4eba14..d210515c 100644 --- a/cde/lib/DtSearch/raima/csowrite.c +++ b/cde/lib/DtSearch/raima/csowrite.c @@ -54,7 +54,7 @@ int d_csowrite(set, field, data TASK_PARM DBN_PARM) int set; /* Set constant */ long field; /* Field constant */ -CONST char FAR *data; /* Data area to contain field contents */ +CONST char *data; /* Data area to contain field contents */ TASK_DECL DBN_DECL /* database number */ { @@ -62,16 +62,16 @@ DBN_DECL /* database number */ ULONG timestamp; #endif int stat, fld, rec; - char FAR *recp; - SET_ENTRY FAR *set_ptr; - RECORD_ENTRY FAR *rec_ptr; - FIELD_ENTRY FAR *fld_ptr; - DB_ADDR FAR *co_ptr; + char *recp; + SET_ENTRY *set_ptr; + RECORD_ENTRY *rec_ptr; + FIELD_ENTRY *fld_ptr; + DB_ADDR *co_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); - if ((nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) || - (nfld_check(field, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY)) + if ((nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) || + (nfld_check(field, &rec, &fld, (RECORD_ENTRY * *)&rec_ptr, (FIELD_ENTRY * *)&fld_ptr) != S_OKAY)) RETURN( db_status ); /* compound keys cannot be updated directly */ @@ -87,7 +87,7 @@ DBN_DECL /* database number */ RETURN( dberr(S_NOCO) ); /* Read current owner */ - if ( dio_read( *co_ptr, (char FAR * FAR *)&recp , PGHOLD) != S_OKAY ) + if ( dio_read( *co_ptr, (char * *)&recp , PGHOLD) != S_OKAY ) RETURN( db_status ); /* check out the field */ @@ -105,7 +105,7 @@ DBN_DECL /* database number */ bytecpy( recp + RECUPTIME, ×tamp, sizeof(LONG)); } #endif - dio_write(*co_ptr, (char FAR *)NULL, PGFREE); + dio_write(*co_ptr, (char *)NULL, PGFREE); #ifndef NO_TIMESTAMP if (( db_status == S_OKAY ) && ( rec_ptr->rt_flags & TIMESTAMPED )) co_time[set] = timestamp; diff --git a/cde/lib/DtSearch/raima/ctscm.c b/cde/lib/DtSearch/raima/ctscm.c index 505cef0c..27363965 100644 --- a/cde/lib/DtSearch/raima/ctscm.c +++ b/cde/lib/DtSearch/raima/ctscm.c @@ -53,17 +53,17 @@ */ d_ctscm(set, timestamp TASK_PARM DBN_PARM) int set; -ULONG FAR *timestamp; +ULONG *timestamp; TASK_DECL DBN_DECL { INT rec; - char FAR *rptr; - SET_ENTRY FAR *set_ptr; + char *rptr; + SET_ENTRY *set_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); - if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) + if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) RETURN( db_status ); /* make sure we have a current member */ @@ -71,7 +71,7 @@ DBN_DECL RETURN( dberr(S_NOCM) ); /* read current member */ - if ( dio_read( curr_mem[set], (char FAR * FAR *)&rptr , NOPGHOLD) != S_OKAY ) + if ( dio_read( curr_mem[set], (char * *)&rptr , NOPGHOLD) != S_OKAY ) RETURN( db_status ); /* get record id */ diff --git a/cde/lib/DtSearch/raima/ctsco.c b/cde/lib/DtSearch/raima/ctsco.c index c8f1cefc..53d7c799 100644 --- a/cde/lib/DtSearch/raima/ctsco.c +++ b/cde/lib/DtSearch/raima/ctsco.c @@ -53,17 +53,17 @@ */ d_ctsco(set, timestamp TASK_PARM DBN_PARM) int set; -ULONG FAR *timestamp; +ULONG *timestamp; TASK_DECL DBN_DECL { INT rec; - char FAR *rptr; - SET_ENTRY FAR *set_ptr; + char *rptr; + SET_ENTRY *set_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); - if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) + if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) RETURN( db_status ); /* make sure we have a current owner */ @@ -71,7 +71,7 @@ DBN_DECL RETURN( dberr(S_NOCO) ); /* read current owner */ - if ( dio_read( curr_own[set], (char FAR * FAR *)&rptr , NOPGHOLD) != S_OKAY ) + if ( dio_read( curr_own[set], (char * *)&rptr , NOPGHOLD) != S_OKAY ) RETURN( db_status ); /* get record id */ diff --git a/cde/lib/DtSearch/raima/ctscr.c b/cde/lib/DtSearch/raima/ctscr.c index b4bc205a..b5003327 100644 --- a/cde/lib/DtSearch/raima/ctscr.c +++ b/cde/lib/DtSearch/raima/ctscr.c @@ -52,7 +52,7 @@ /* Get creation timestamp of current record */ d_ctscr(timestamp TASK_PARM) -ULONG FAR *timestamp; +ULONG *timestamp; TASK_DECL { INT rec; @@ -64,7 +64,7 @@ TASK_DECL RETURN( dberr(S_NOCR) ); /* read current record */ - if ( dio_read( curr_rec, (char FAR * FAR *)&crloc , NOPGHOLD) != S_OKAY ) + if ( dio_read( curr_rec, (char * *)&crloc , NOPGHOLD) != S_OKAY ) RETURN( db_status ); /* get record id */ diff --git a/cde/lib/DtSearch/raima/dbacode.c b/cde/lib/DtSearch/raima/dbacode.c index 73215a33..09d821e3 100644 --- a/cde/lib/DtSearch/raima/dbacode.c +++ b/cde/lib/DtSearch/raima/dbacode.c @@ -46,8 +46,8 @@ int d_decode_dba(dba, file, slot) DB_ADDR dba; /* database address */ -int FAR *file; /* returned file number */ -long FAR *slot; /* returned slot number */ +int *file; /* returned file number */ +long *slot; /* returned slot number */ { *file = (int)(FILEMASK & (dba >> FILESHIFT)); *slot = ADDRMASK & dba; @@ -62,7 +62,7 @@ int d_encode_dba(file, slot, dba) int file; /* returned file number */ long slot; /* returned slot number */ -DB_ADDR FAR *dba; /* database address */ +DB_ADDR *dba; /* database address */ { *dba = ((FILEMASK & file) << FILESHIFT) | slot; return ( db_status = S_OKAY ); diff --git a/cde/lib/DtSearch/raima/dbdpath.c b/cde/lib/DtSearch/raima/dbdpath.c index 07e50af9..2e7f339e 100644 --- a/cde/lib/DtSearch/raima/dbdpath.c +++ b/cde/lib/DtSearch/raima/dbdpath.c @@ -51,7 +51,7 @@ */ int d_dbdpath(path TASK_PARM) -CONST char FAR *path; +CONST char *path; TASK_DECL { DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_NONE)); diff --git a/cde/lib/DtSearch/raima/dbfpath.c b/cde/lib/DtSearch/raima/dbfpath.c index 71858598..6f4f4806 100644 --- a/cde/lib/DtSearch/raima/dbfpath.c +++ b/cde/lib/DtSearch/raima/dbfpath.c @@ -51,7 +51,7 @@ */ int d_dbfpath(path TASK_PARM) -CONST char FAR *path; +CONST char *path; TASK_DECL { DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_NONE)); diff --git a/cde/lib/DtSearch/raima/dblfcns.c b/cde/lib/DtSearch/raima/dblfcns.c index 83eaf320..cdb3357d 100644 --- a/cde/lib/DtSearch/raima/dblfcns.c +++ b/cde/lib/DtSearch/raima/dblfcns.c @@ -175,7 +175,7 @@ static LR_LOCK lock_reply; /* This used to be in db_global */ #endif #ifdef MULTI_TASK -DB_TASK Currtask = {POINTER_ASSIGN((TASK FAR *)&db_global), POINTER_ASSIGN((char FAR *)NULL)}; +DB_TASK Currtask = {POINTER_ASSIGN((TASK *)&db_global), POINTER_ASSIGN((char *)NULL)}; #endif extern CHAR_P Dbpgbuff; /* allocated by dio_init used by o_update */ @@ -212,15 +212,15 @@ extern char taf_files[TAFLIMIT][FILENMLEN]; /* Internal function prototypes */ #ifndef SINGLE_USER -static void pr_lock_descr(P1(struct lock_descr FAR *) Pi(int) - Pi(CONST char FAR *)); -static int process_lock(P1(struct lock_descr FAR *) Pi(char)); -static int keep_locks(P1(struct lock_descr FAR *)); -static int free_files(P1(struct lock_descr FAR *)); +static void pr_lock_descr(P1(struct lock_descr *) Pi(int) + Pi(CONST char *)); +static int process_lock(P1(struct lock_descr *) Pi(char)); +static int keep_locks(P1(struct lock_descr *)); +static int free_files(P1(struct lock_descr *)); #endif static int bld_lock_tables(P0); static int initses(P0); -static int lock_files(P1(int) Pi(LOCK_REQUEST FAR *)); +static int lock_files(P1(int) Pi(LOCK_REQUEST *)); static int send_lock(P0); static int send_free(P0); static void reset_locks(P0); @@ -264,7 +264,7 @@ TASK_DECL if ( dbopen == 1 ) { sto.fcn = L_SETTIME; sto.secs = secs; - if ( nw_send(lsn, (MESSAGE FAR *)&sto, sizeof(LM_SETTIME)) ) + if ( nw_send(lsn, (MESSAGE *)&sto, sizeof(LM_SETTIME)) ) RETURN( neterr() ); db_timeout = secs; } @@ -278,8 +278,8 @@ TASK_DECL */ int d_open(dbnames, opentype TASK_PARM) -CONST char FAR *dbnames; -CONST char FAR *opentype; +CONST char *dbnames; +CONST char *opentype; TASK_DECL { DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_ALL)); @@ -420,7 +420,7 @@ TASK_DECL /* Initialize a task structure */ int taskinit(tsk) -TASK FAR *tsk; +TASK *tsk; { byteset(tsk, '\0', sizeof(TASK)); #ifndef ONE_DB @@ -445,13 +445,13 @@ TASK FAR *tsk; */ int initdbt(dbnames ) -CONST char FAR *dbnames; +CONST char *dbnames; { int dbt_lc; /* loop control */ char dbfile [DtSrFILENMLEN]; - char FAR *ptr; + char *ptr; #ifndef ONE_DB - CONST char FAR *cp; + CONST char *cp; int i; #endif @@ -568,7 +568,7 @@ static recovery_check() if ( db_lockmgr ) { /* tell lock manager that we're done */ trend_pkt.fcn = L_RECDONE; - if ( nw_send(lsn, (MESSAGE FAR *)&trend_pkt, sizeof(LM_TREND)) ) + if ( nw_send(lsn, (MESSAGE *)&trend_pkt, sizeof(LM_TREND)) ) neterr(); } #endif @@ -591,9 +591,9 @@ static int initses() int send_size, recv_size, recvd_sz; struct stat stbuf; LM_FILEID *fi_ptr; - FILE_ENTRY FAR *file_ptr; - FILE_NO FAR *fref_ptr; - INT FAR *rcv_fref_ptr; + FILE_ENTRY *file_ptr; + FILE_NO *fref_ptr; + INT *rcv_fref_ptr; if ( (net_status=nw_addnm(dbuserid, (int *)NULL) ) != N_OKAY ) if ( net_status == N_DUPNAME ) { @@ -622,9 +622,9 @@ static int initses() #else /* GENERAL */ send_size = sizeof(LM_DBOPEN) + (size_ft-1)*sizeof(LM_FILEID); #endif /* GENERAL */ - send_pkt = (LM_DBOPEN FAR *)ALLOC(&Send_pkt, send_size, "send_pkt"); + send_pkt = (LM_DBOPEN *)ALLOC(&Send_pkt, send_size, "send_pkt"); recv_size = sizeof(LR_DBOPEN) + (size_ft-1)*sizeof(INT); - recv_pkt = (LR_DBOPEN FAR *)ALLOC(&Recv_pkt, recv_size, "recv_pkt"); + recv_pkt = (LR_DBOPEN *)ALLOC(&Recv_pkt, recv_size, "recv_pkt"); if (send_pkt == NULL || recv_pkt == NULL) { nw_hangup(lsn); return(dberr(S_NOMEMORY)); @@ -652,19 +652,19 @@ static int initses() #endif } send_open: - if (nw_send(lsn, (MESSAGE FAR *)send_pkt, send_size) || - nw_rcvmsg(lsn, (MESSAGE FAR *)recv_pkt, recv_size, &recvd_sz)) { + if (nw_send(lsn, (MESSAGE *)send_pkt, send_size) || + nw_rcvmsg(lsn, (MESSAGE *)recv_pkt, recv_size, &recvd_sz)) { nw_hangup(lsn); return(neterr()); } if ( recv_pkt->status == L_RECOVER ) { /* perform auto-recovery */ - d_recover( (CONST char FAR *)recv_pkt->logfile CURRTASK_PARM ); + d_recover( (CONST char *)recv_pkt->logfile CURRTASK_PARM ); /* tell lock mgr we're done */ trend_pkt.fcn = L_RECDONE; - if ( nw_send(lsn, (MESSAGE FAR *)&trend_pkt, sizeof(LM_TREND)) ) { + if ( nw_send(lsn, (MESSAGE *)&trend_pkt, sizeof(LM_TREND)) ) { nw_hangup(lsn); return(neterr()); } @@ -727,13 +727,13 @@ static int bld_lock_tables() int mem, memtot; FILE_NO i; FILE_NO fl_cnt; - struct lock_descr FAR *ld_ptr; - RECORD_ENTRY FAR *rec_ptr; - FIELD_ENTRY FAR *fld_ptr; - SET_ENTRY FAR *set_ptr; - MEMBER_ENTRY FAR *mem_ptr; - int FAR *fu_ptr; - FILE_NO FAR *fl_ptr; + struct lock_descr *ld_ptr; + RECORD_ENTRY *rec_ptr; + FIELD_ENTRY *fld_ptr; + SET_ENTRY *set_ptr; + MEMBER_ENTRY *mem_ptr; + int *fu_ptr; + FILE_NO *fl_ptr; unsigned new_size; unsigned old_size; int old_keyl_cnt; @@ -799,7 +799,7 @@ static int bld_lock_tables() ld_ptr->fl_cnt = fl_cnt; ld_ptr->fl_list.ptr = /* Macro references must be on one line for some compilers */ - (FILE_NO FAR *)ALLOC(&ld_ptr->fl_list, fl_cnt*sizeof(FILE_NO), db_avname); + (FILE_NO *)ALLOC(&ld_ptr->fl_list, fl_cnt*sizeof(FILE_NO), db_avname); if ( ld_ptr->fl_list.ptr == NULL ) return( dberr(S_NOMEMORY) ); fl_ptr = ld_ptr->fl_list.ptr; for (i = 0, fu_ptr = file_used; i < size_ft; ++i, ++fu_ptr) { @@ -836,7 +836,7 @@ static int bld_lock_tables() ld_ptr->fl_cnt = fl_cnt; ld_ptr->fl_list.ptr = /* Macro references must be on one line for some compilers */ - (FILE_NO FAR *)ALLOC(&ld_ptr->fl_list, fl_cnt*sizeof(FILE_NO), db_avname); + (FILE_NO *)ALLOC(&ld_ptr->fl_list, fl_cnt*sizeof(FILE_NO), db_avname); if ( ld_ptr->fl_list.ptr == NULL ) return( dberr(S_NOMEMORY) ); fl_ptr = ld_ptr->fl_list.ptr; for (i = 0, fu_ptr = file_used; i < size_ft; ++i, ++fu_ptr) { @@ -873,7 +873,7 @@ static int bld_lock_tables() ld_ptr->fl_prev = 'f'; /*[367] init to free */ ld_ptr->fl_kept = FALSE; ld_ptr->fl_cnt = 1; - ld_ptr->fl_list.ptr = (FILE_NO FAR *)ALLOC(&ld_ptr->fl_list, ld_ptr->fl_cnt*sizeof(FILE_NO), "fl_list"); + ld_ptr->fl_list.ptr = (FILE_NO *)ALLOC(&ld_ptr->fl_list, ld_ptr->fl_cnt*sizeof(FILE_NO), "fl_list"); if ( ld_ptr->fl_list.ptr == NULL ) return( dberr(S_NOMEMORY) ); *(ld_ptr->fl_list.ptr) = fld_ptr->fd_keyfile; FL_LIST_DEACCESS(ld_ptr); @@ -883,8 +883,8 @@ static int bld_lock_tables() } lp_size = sizeof(LM_LOCK) + (size_ft-1)*sizeof(LM_LOCKREQ); fp_size = sizeof(LM_FREE) + (size_ft-1)*sizeof(INT); - lock_pkt = (LM_LOCK FAR *)ALLOC(&db_global.Lock_pkt, lp_size, "lock_pkt"); - free_pkt = (LM_FREE FAR *)ALLOC(&db_global.Free_pkt, fp_size, "free_pkt"); + lock_pkt = (LM_LOCK *)ALLOC(&db_global.Lock_pkt, lp_size, "lock_pkt"); + free_pkt = (LM_FREE *)ALLOC(&db_global.Free_pkt, fp_size, "free_pkt"); if ( !lock_pkt || !free_pkt ) return( dberr(S_NOMEMORY) ); lock_pkt->fcn = L_LOCK; free_pkt->fcn = L_FREE; @@ -1008,12 +1008,12 @@ termses() LM_DBCLOSE_P Send_pkt; int ft_lc; /* loop control */ int send_size; - FILE_NO FAR *fref_ptr; - INT FAR *snd_fref_ptr; + FILE_NO *fref_ptr; + INT *snd_fref_ptr; if ( session_active ) { send_size = sizeof(LM_DBCLOSE) + (size_ft-1)*sizeof(INT); - send_pkt = (LM_DBCLOSE FAR *)ALLOC(&Send_pkt, send_size, "send_pkt"); + send_pkt = (LM_DBCLOSE *)ALLOC(&Send_pkt, send_size, "send_pkt"); if ( send_pkt == NULL ) return( dberr(S_NOMEMORY) ); send_pkt->fcn = L_DBCLOSE; send_pkt->nfiles = size_ft; @@ -1021,7 +1021,7 @@ termses() snd_fref_ptr = send_pkt->frefs; --ft_lc >= 0; ++fref_ptr, ++snd_fref_ptr) *snd_fref_ptr = *fref_ptr; - if ( nw_send(lsn, (MESSAGE FAR *)send_pkt, send_size) ) + if ( nw_send(lsn, (MESSAGE *)send_pkt, send_size) ) return( neterr() ); nw_hangup(lsn); @@ -1044,7 +1044,7 @@ void termfree() { #ifndef SINGLE_USER int i; - struct lock_descr FAR *ld_ptr; + struct lock_descr *ld_ptr; #endif /* free all allocated memory */ @@ -1161,7 +1161,7 @@ void termfree() */ d_reclock(rec, lock_type TASK_PARM DBN_PARM) int rec; -char FAR *lock_type; +char *lock_type; TASK_DECL DBN_DECL { @@ -1186,7 +1186,7 @@ DBN_DECL */ d_setlock(set, lock_type TASK_PARM DBN_PARM) int set; -char FAR *lock_type; +char *lock_type; TASK_DECL DBN_DECL { @@ -1210,7 +1210,7 @@ DBN_DECL */ d_keylock(key, lock_type TASK_PARM DBN_PARM) long key; /* field number of key */ -char FAR *lock_type; +char *lock_type; TASK_DECL DBN_DECL { @@ -1219,12 +1219,12 @@ DBN_DECL #else int fld, rec; LOCK_REQUEST lr; - RECORD_ENTRY FAR *rec_ptr; - FIELD_ENTRY FAR *fld_ptr; + RECORD_ENTRY *rec_ptr; + FIELD_ENTRY *fld_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(LOCK_IO)); - if (nfld_check(key, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY) + if (nfld_check(key, &rec, &fld, (RECORD_ENTRY * *)&rec_ptr, (FIELD_ENTRY * *)&fld_ptr) != S_OKAY) RETURN( db_status ); if (fld_ptr->fd_key == NOKEY) @@ -1247,7 +1247,7 @@ DBN_DECL */ d_reclstat(rec, lstat TASK_PARM DBN_PARM) int rec; -char FAR *lstat; +char *lstat; TASK_DECL DBN_DECL { @@ -1255,11 +1255,11 @@ DBN_DECL *lstat = 'f'; return( db_status = S_OKAY ); #else - RECORD_ENTRY FAR *rec_ptr; + RECORD_ENTRY *rec_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(LOCK_NOIO)); - if (nrec_check(rec, &rec, (RECORD_ENTRY FAR * FAR *)&rec_ptr) != S_OKAY) + if (nrec_check(rec, &rec, (RECORD_ENTRY * *)&rec_ptr) != S_OKAY) RETURN( db_status ); if ( dbopen >= 2 ) @@ -1280,7 +1280,7 @@ DBN_DECL */ d_setlstat(set, lstat TASK_PARM DBN_PARM) int set; -char FAR *lstat; +char *lstat; TASK_DECL DBN_DECL { @@ -1288,11 +1288,11 @@ DBN_DECL *lstat = 'f'; return (db_status = S_OKAY); #else - SET_ENTRY FAR *set_ptr; + SET_ENTRY *set_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(LOCK_NOIO)); - if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) + if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) RETURN( db_status ); if ( dbopen >= 2 ) @@ -1310,7 +1310,7 @@ DBN_DECL */ d_keylstat(key, lstat TASK_PARM DBN_PARM) long key; -char FAR *lstat; +char *lstat; TASK_DECL DBN_DECL { @@ -1319,12 +1319,12 @@ DBN_DECL return (db_status = S_OKAY); #else int fld, rec; - RECORD_ENTRY FAR *rec_ptr; - FIELD_ENTRY FAR *fld_ptr; + RECORD_ENTRY *rec_ptr; + FIELD_ENTRY *fld_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(LOCK_NOIO)); - if (nfld_check(key, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY) + if (nfld_check(key, &rec, &fld, (RECORD_ENTRY * *)&rec_ptr, (FIELD_ENTRY * *)&fld_ptr) != S_OKAY) RETURN( db_status ); if (fld_ptr->fd_key == NOKEY) @@ -1348,7 +1348,7 @@ DBN_DECL */ d_lock(count, lrpkt TASK_PARM DBN_PARM) int count; -LOCK_REQUEST FAR *lrpkt; +LOCK_REQUEST *lrpkt; TASK_DECL DBN_DECL { @@ -1357,8 +1357,8 @@ DBN_DECL #else int item; int i; - LOCK_REQUEST FAR *lrpkt_ptr; - struct lock_descr FAR *ld_ptr; + LOCK_REQUEST *lrpkt_ptr; + struct lock_descr *ld_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(LOCK_IO)); @@ -1422,14 +1422,14 @@ DBN_DECL /* Process set/record lock */ static process_lock(ld_ptr, type ) -struct lock_descr FAR *ld_ptr; +struct lock_descr *ld_ptr; char type; { int fl_lc; /* loop control */ int fno; int i; - LM_LOCKREQ FAR *lockreq_ptr; - FILE_NO FAR *fl_ptr, fref; + LM_LOCKREQ *lockreq_ptr; + FILE_NO *fl_ptr, fref; db_status = S_OKAY; ld_ptr->fl_prev = ld_ptr->fl_type; @@ -1501,17 +1501,17 @@ char type; */ static lock_files(count, lrpkt ) int count; -LOCK_REQUEST FAR *lrpkt; +LOCK_REQUEST *lrpkt; { #ifndef SINGLE_USER int fl_lc; /* loop control */ - struct lock_descr FAR *ld_ptr; + struct lock_descr *ld_ptr; FILE_NO fno; int item; int l; - LOCK_REQUEST FAR *lrpkt_ptr; - int FAR *appl_ptr, FAR *excl_ptr; - FILE_NO FAR *fl_ptr; + LOCK_REQUEST *lrpkt_ptr; + int *appl_ptr, *excl_ptr; + FILE_NO *fl_ptr; lock_reply.status = L_OKAY; if ( lock_pkt->nfiles == 0 ) goto skip_send; @@ -1602,10 +1602,10 @@ req_locks: #ifdef MONITOR printf("nw_send(lsn,lock_pkt->fcn=%ld,size=%d\n",lock_pkt->fcn,send_size); #endif - if ( nw_send(lsn, (MESSAGE FAR *)lock_pkt, send_size) ) + if ( nw_send(lsn, (MESSAGE *)lock_pkt, send_size) ) return( neterr() ); - if ( nw_rcvmsg(lsn, (MESSAGE FAR *)&lock_reply, sizeof(LR_LOCK), &recv_size) ) + if ( nw_rcvmsg(lsn, (MESSAGE *)&lock_reply, sizeof(LR_LOCK), &recv_size) ) return( neterr() ); #ifdef MONITOR printf("nw_rcvmsg(lock_reply.fcn=%ld,lock_reply.status=%d\n", @@ -1622,7 +1622,7 @@ req_locks: /* tell lock mgr we're done */ trend_pkt.fcn = L_RECDONE; - if (nw_send(lsn, (MESSAGE FAR *)&trend_pkt, sizeof(LM_TREND))) + if (nw_send(lsn, (MESSAGE *)&trend_pkt, sizeof(LM_TREND))) return( neterr() ); /* re-issue lock request */ @@ -1652,13 +1652,13 @@ DBN_DECL return (db_status = S_OKAY); #else int fld, rec; - RECORD_ENTRY FAR *rec_ptr; - FIELD_ENTRY FAR *fld_ptr; - struct lock_descr FAR *ld_ptr; + RECORD_ENTRY *rec_ptr; + FIELD_ENTRY *fld_ptr; + struct lock_descr *ld_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(LOCK_IO)); - if (nfld_check(key, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY) + if (nfld_check(key, &rec, &fld, (RECORD_ENTRY * *)&rec_ptr, (FIELD_ENTRY * *)&fld_ptr) != S_OKAY) RETURN( db_status ); if ( fld_ptr->fd_key == NOKEY ) @@ -1687,10 +1687,10 @@ DBN_DECL /* Setup table to keep locks after transaction end */ static keep_locks( ld_ptr ) -struct lock_descr FAR *ld_ptr; /* Lock descriptor */ +struct lock_descr *ld_ptr; /* Lock descriptor */ { int fl_lc; /* loop control */ - FILE_NO FAR *fl_ptr; + FILE_NO *fl_ptr; /* Mark lock as kept */ ld_ptr->fl_kept = TRUE; @@ -1715,12 +1715,12 @@ DBN_DECL #ifdef SINGLE_USER return (db_status = S_OKAY); #else - RECORD_ENTRY FAR *rec_ptr; - struct lock_descr FAR *ld_ptr; + RECORD_ENTRY *rec_ptr; + struct lock_descr *ld_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(LOCK_IO)); - if (nrec_check(rec, &rec, (RECORD_ENTRY FAR * FAR *)&rec_ptr) != S_OKAY) + if (nrec_check(rec, &rec, (RECORD_ENTRY * *)&rec_ptr) != S_OKAY) RETURN( db_status ); if ( dbopen >= 2 ) /* exclusive access needs no locks */ @@ -1753,12 +1753,12 @@ DBN_DECL #ifdef SINGLE_USER return (db_status = S_OKAY); #else - SET_ENTRY FAR *set_ptr; - struct lock_descr FAR *ld_ptr; + SET_ENTRY *set_ptr; + struct lock_descr *ld_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(LOCK_IO)); - if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) + if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) RETURN( db_status ); if ( dbopen >= 2 ) /* exclusive access needs no locks */ @@ -1786,14 +1786,14 @@ DBN_DECL /* Free read-locked files associated with record or set */ static int free_files(ld_ptr) -struct lock_descr FAR *ld_ptr; +struct lock_descr *ld_ptr; { int fl_lc; /* loop control */ FILE_NO fno; - LM_LOCKREQ FAR *lockreq_ptr; - int FAR *appl_ptr; + LM_LOCKREQ *lockreq_ptr; + int *appl_ptr; FILE_NO fref; - FILE_NO FAR *fl_ptr; + FILE_NO *fl_ptr; /* fill free packet */ lock_pkt->nfiles = free_pkt->nfiles = 0; @@ -1854,8 +1854,8 @@ TASK_DECL return (db_status = S_OKAY); #else int i; - FILE_NO FAR *fref_ptr; - int FAR *appl_ptr; + FILE_NO *fref_ptr; + int *appl_ptr; DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_IO)); @@ -1900,7 +1900,7 @@ static void reset_locks() { int beg, end; int i; - struct lock_descr FAR *ld_ptr; + struct lock_descr *ld_ptr; /* reset record lock descriptors */ beg = 0; @@ -1952,7 +1952,7 @@ static int send_free() if ( send_size > fp_size ) return ( dberr(S_SYSERR) ); - if ( nw_send(lsn, (MESSAGE FAR *)free_pkt, send_size) ) + if ( nw_send(lsn, (MESSAGE *)free_pkt, send_size) ) return( neterr() ); } #endif @@ -2127,7 +2127,7 @@ TASK_DECL /* Begin transaction */ d_trbegin(tid TASK_PARM) -CONST char FAR *tid; +CONST char *tid; TASK_DECL { DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_IO)); @@ -2163,9 +2163,9 @@ TASK_DECL int ft_lc; /* loop control */ LM_TRCOMMIT trcom_pkt; LM_TREND trend_pkt; - LM_LOCKREQ FAR *lockreq_ptr; - FILE_NO FAR *fref_ptr; - int FAR *appl_ptr, FAR *keptl_ptr, FAR *excl_ptr; + LM_LOCKREQ *lockreq_ptr; + FILE_NO *fref_ptr; + int *appl_ptr, *keptl_ptr, *excl_ptr; #endif DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_IO)); @@ -2189,7 +2189,7 @@ TASK_DECL #ifndef SINGLE_USER trcom_pkt.fcn = L_TRCOMMIT; strcpy(trcom_pkt.logfile, dblog); - if ( nw_send(lsn, (MESSAGE FAR *)&trcom_pkt, sizeof(LM_TRCOMMIT)) ) + if ( nw_send(lsn, (MESSAGE *)&trcom_pkt, sizeof(LM_TRCOMMIT)) ) RETURN( neterr() ); #endif trcommit = TRUE; @@ -2215,7 +2215,7 @@ TASK_DECL } #ifndef SINGLE_USER trend_pkt.fcn = L_TREND; - if ( nw_send(lsn, (MESSAGE FAR *)&trend_pkt, sizeof(LM_TREND)) ) + if ( nw_send(lsn, (MESSAGE *)&trend_pkt, sizeof(LM_TREND)) ) RETURN( neterr() ); #endif trcommit = FALSE; @@ -2284,8 +2284,8 @@ TASK_DECL RETURN (db_status = S_OKAY); #else int i; - int FAR *keptl_ptr; - struct lock_descr FAR *ld_ptr; + int *keptl_ptr; + struct lock_descr *ld_ptr; DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_IO)); @@ -2339,7 +2339,7 @@ neterr() #endif int alloc_table(Table, new_size, old_size ) -CHAR_P FAR *Table; +CHAR_P *Table; #define table Table->ptr unsigned new_size; unsigned old_size; diff --git a/cde/lib/DtSearch/raima/dblog.c b/cde/lib/DtSearch/raima/dblog.c index 2716dc44..7a8fbda4 100644 --- a/cde/lib/DtSearch/raima/dblog.c +++ b/cde/lib/DtSearch/raima/dblog.c @@ -50,7 +50,7 @@ /* Set database log file name/path */ d_dblog(log TASK_PARM) -CONST char FAR *log; +CONST char *log; TASK_DECL { DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_NONE)); diff --git a/cde/lib/DtSearch/raima/dbtaf.c b/cde/lib/DtSearch/raima/dbtaf.c index aeb1564f..f4bc7683 100644 --- a/cde/lib/DtSearch/raima/dbtaf.c +++ b/cde/lib/DtSearch/raima/dbtaf.c @@ -53,7 +53,7 @@ static char VISTATAF[] = "vista.taf"; /* Set database transaction activity file name/path */ d_dbtaf(taf TASK_PARM) -CONST char FAR *taf; +CONST char *taf; TASK_DECL { char dbtaf[FILENMLEN]; diff --git a/cde/lib/DtSearch/raima/dbtype.h b/cde/lib/DtSearch/raima/dbtype.h index 2ce2d5bf..9116477b 100644 --- a/cde/lib/DtSearch/raima/dbtype.h +++ b/cde/lib/DtSearch/raima/dbtype.h @@ -385,7 +385,7 @@ typedef struct RN_ENTRY_S { #define TASK_PARM_DBN task , #define TASK_ONLY task #define TASK_DECL DB_TASK task; -#define TASK_PTR_DECL DB_TASK FAR *task; +#define TASK_PTR_DECL DB_TASK *task; #define TASK_DBN_ONLY task DBN_PARM #else #define TASK_PARM /**/ @@ -433,42 +433,42 @@ typedef struct OBJNAMES_S { #define DB_WRITE write #define DB_READ read -typedef struct {FILE_NO FAR *ptr; LOCK_DESC} FILE_NO_P; -typedef struct {int FAR *ptr; LOCK_DESC} INT_P; -typedef struct {struct NODE_PATH_S FAR *ptr; LOCK_DESC} NODE_PATH_P; +typedef struct {FILE_NO *ptr; LOCK_DESC} FILE_NO_P; +typedef struct {int *ptr; LOCK_DESC} INT_P; +typedef struct {struct NODE_PATH_S *ptr; LOCK_DESC} NODE_PATH_P; #ifndef SINGLE_USER -typedef struct {struct lock_descr FAR *ptr; LOCK_DESC} LOCK_DESCR_P; -typedef struct {struct LM_LOCK_S FAR *ptr; LOCK_DESC} LM_LOCK_P; -typedef struct {struct LM_FREE_S FAR *ptr; LOCK_DESC} LM_FREE_P; -typedef struct {struct LM_DBOPEN_S FAR *ptr; LOCK_DESC} LM_DBOPEN_P; -typedef struct {struct LM_DBCLOSE_S FAR *ptr; LOCK_DESC} LM_DBCLOSE_P; -typedef struct {struct LR_DBOPEN_S FAR *ptr; LOCK_DESC} LR_DBOPEN_P; +typedef struct {struct lock_descr *ptr; LOCK_DESC} LOCK_DESCR_P; +typedef struct {struct LM_LOCK_S *ptr; LOCK_DESC} LM_LOCK_P; +typedef struct {struct LM_FREE_S *ptr; LOCK_DESC} LM_FREE_P; +typedef struct {struct LM_DBOPEN_S *ptr; LOCK_DESC} LM_DBOPEN_P; +typedef struct {struct LM_DBCLOSE_S *ptr; LOCK_DESC} LM_DBCLOSE_P; +typedef struct {struct LR_DBOPEN_S *ptr; LOCK_DESC} LR_DBOPEN_P; #endif -typedef struct {struct KEY_INFO_S FAR *ptr; LOCK_DESC} KEY_INFO_P; -typedef struct {struct ren_entry FAR *ptr; LOCK_DESC} REN_ENTRY_P; -typedef struct {struct RN_ENTRY_S FAR *ptr; LOCK_DESC} RN_ENTRY_P; -typedef struct {struct LOOKUP_ENTRY_S FAR *ptr; LOCK_DESC} LOOKUP_ENTRY_P; -typedef struct {struct page_entry FAR *ptr; LOCK_DESC} PAGE_ENTRY_P; -typedef struct {struct DB_ENTRY_S FAR *ptr; LOCK_DESC} DB_ENTRY_P; -typedef struct {struct FILE_ENTRY_S FAR *ptr; LOCK_DESC} FILE_ENTRY_P; -typedef struct {struct RECORD_ENTRY_S FAR *ptr; LOCK_DESC} RECORD_ENTRY_P; -typedef struct {struct SET_ENTRY_S FAR *ptr; LOCK_DESC} SET_ENTRY_P; -typedef struct {struct MEMBER_ENTRY_S FAR *ptr; LOCK_DESC} MEMBER_ENTRY_P; -typedef struct {struct SORT_ENTRY_S FAR *ptr; LOCK_DESC} SORT_ENTRY_P; -typedef struct {struct FIELD_ENTRY_S FAR *ptr; LOCK_DESC} FIELD_ENTRY_P; -typedef struct {struct KEY_ENTRY_S FAR *ptr; LOCK_DESC} KEY_ENTRY_P; -typedef struct {struct PGZERO_S FAR *ptr; LOCK_DESC} PGZERO_P; -typedef struct {struct RI_ENTRY_S FAR *ptr; LOCK_DESC} RI_ENTRY_P; -typedef struct {ULONG FAR *ptr; LOCK_DESC} ULONG_P; -typedef struct {LONG FAR *ptr; LOCK_DESC} LONG_P; +typedef struct {struct KEY_INFO_S *ptr; LOCK_DESC} KEY_INFO_P; +typedef struct {struct ren_entry *ptr; LOCK_DESC} REN_ENTRY_P; +typedef struct {struct RN_ENTRY_S *ptr; LOCK_DESC} RN_ENTRY_P; +typedef struct {struct LOOKUP_ENTRY_S *ptr; LOCK_DESC} LOOKUP_ENTRY_P; +typedef struct {struct page_entry *ptr; LOCK_DESC} PAGE_ENTRY_P; +typedef struct {struct DB_ENTRY_S *ptr; LOCK_DESC} DB_ENTRY_P; +typedef struct {struct FILE_ENTRY_S *ptr; LOCK_DESC} FILE_ENTRY_P; +typedef struct {struct RECORD_ENTRY_S *ptr; LOCK_DESC} RECORD_ENTRY_P; +typedef struct {struct SET_ENTRY_S *ptr; LOCK_DESC} SET_ENTRY_P; +typedef struct {struct MEMBER_ENTRY_S *ptr; LOCK_DESC} MEMBER_ENTRY_P; +typedef struct {struct SORT_ENTRY_S *ptr; LOCK_DESC} SORT_ENTRY_P; +typedef struct {struct FIELD_ENTRY_S *ptr; LOCK_DESC} FIELD_ENTRY_P; +typedef struct {struct KEY_ENTRY_S *ptr; LOCK_DESC} KEY_ENTRY_P; +typedef struct {struct PGZERO_S *ptr; LOCK_DESC} PGZERO_P; +typedef struct {struct RI_ENTRY_S *ptr; LOCK_DESC} RI_ENTRY_P; +typedef struct {ULONG *ptr; LOCK_DESC} ULONG_P; +typedef struct {LONG *ptr; LOCK_DESC} LONG_P; #ifndef NO_COUNTRY -typedef struct {struct CNTRY_TBL_S FAR *ptr; LOCK_DESC} CNTRY_TBL_P; +typedef struct {struct CNTRY_TBL_S *ptr; LOCK_DESC} CNTRY_TBL_P; #endif struct sk { INT sk_fld; CHAR_P sk_val; } __SK__; -typedef struct { struct sk FAR *ptr; LOCK_DESC } SK_P; +typedef struct { struct sk *ptr; LOCK_DESC } SK_P; /* node key search path stack entry: one per level per key field */ typedef struct NODE_PATH_S { @@ -578,9 +578,9 @@ typedef struct MESSAGE_S { #define RETURN(x) return( x ) #define ALLOC(l, b, v) d_alloc(b) #define CALLOC(l, i, s, v) d_calloc(i, s) -#define MEM_LOCK(cp) d_memlock((CHAR_P FAR *)(cp)) -#define MEM_UNLOCK(cp) d_memunlock((CHAR_P FAR *)(cp)) -#define FREE(cp) d_free((CHAR_P FAR *)(cp)) +#define MEM_LOCK(cp) d_memlock((CHAR_P *)(cp)) +#define MEM_UNLOCK(cp) d_memunlock((CHAR_P *)(cp)) +#define FREE(cp) d_free((CHAR_P *)(cp)) /* Lock sets are defined in dblfcns.c */ #define LOCK_NONE -1 @@ -607,7 +607,7 @@ typedef struct MESSAGE_S { typedef struct LOOKUP_ENTRY_S { #ifdef MULTI_TASK - TASK FAR *task; /* task pointer */ + TASK *task; /* task pointer */ #endif FILE_NO file; /* file table entry number (0..size_ft-1) */ F_ADDR pageno; /* database page number */ diff --git a/cde/lib/DtSearch/raima/dbuserid.c b/cde/lib/DtSearch/raima/dbuserid.c index 6ee207bb..d3b5704d 100644 --- a/cde/lib/DtSearch/raima/dbuserid.c +++ b/cde/lib/DtSearch/raima/dbuserid.c @@ -53,10 +53,10 @@ */ int d_dbuserid(id TASK_PARM) -CONST char FAR *id; +CONST char *id; TASK_DECL { - CONST char FAR *chk_id; + CONST char *chk_id; DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_NONE)); diff --git a/cde/lib/DtSearch/raima/dbxtrn.h b/cde/lib/DtSearch/raima/dbxtrn.h index abc39bf4..561166d7 100644 --- a/cde/lib/DtSearch/raima/dbxtrn.h +++ b/cde/lib/DtSearch/raima/dbxtrn.h @@ -73,7 +73,7 @@ extern INT old_no_of_dbs; #define old_no_of_dbs 0 #endif -extern char FAR *crloc; /* location in page buffer of current record */ +extern char *crloc; /* location in page buffer of current record */ typedef struct TASK_S { /* The following global variables came from dblfcns.c */ @@ -94,7 +94,7 @@ typedef struct TASK_S { INT_P Excl_locks; /* excl_locks = NULL */ INT_P Kept_locks; /* kept_locks = NULL */ #endif - CONST char FAR *Trans_id; /* trans_id = NULL */ + CONST char *Trans_id; /* trans_id = NULL */ char Dblog[FILENMLEN]; /* dblog = "" */ #ifndef SINGLE_USER LOCK_DESCR_P Rec_locks; /* rec_locks = NULL */ @@ -134,7 +134,7 @@ typedef struct TASK_S { INT Page_size; #ifndef ONE_DB int Curr_db; - DB_ENTRY FAR *Curr_db_table; + DB_ENTRY *Curr_db_table; #endif DB_ADDR Curr_rec; /* current record address */ DB_ADDR_P Curr_own; /* current set owners array */ @@ -152,7 +152,7 @@ typedef struct TASK_S { BOOLEAN Setdb_on; INT No_of_dbs; RN_ENTRY_P Rn_table; - RN_ENTRY FAR *Curr_rn_table; + RN_ENTRY *Curr_rn_table; #else DB_ADDR rn_dba; /* last computed dba by recfrst/recset/recnext */ INT rn_type; /* last record type supplied to recfrst/recset */ diff --git a/cde/lib/DtSearch/raima/delete.c b/cde/lib/DtSearch/raima/delete.c index 643cc2ff..cec1651f 100644 --- a/cde/lib/DtSearch/raima/delete.c +++ b/cde/lib/DtSearch/raima/delete.c @@ -59,12 +59,12 @@ DBN_DECL { int st_lc, mt_lc; /* loop control */ INT i, rt; - char FAR *ptr; - SET_ENTRY FAR *set_ptr; - MEMBER_ENTRY FAR *mem_ptr; - DB_ADDR FAR *co_ptr, FAR *cm_ptr; + char *ptr; + SET_ENTRY *set_ptr; + MEMBER_ENTRY *mem_ptr; + DB_ADDR *co_ptr, *cm_ptr; #ifndef NO_TIMESTAMP - ULONG FAR *cots_ptr, FAR *cmts_ptr, FAR *sts_ptr; + ULONG *cots_ptr, *cmts_ptr, *sts_ptr; #endif DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); @@ -74,7 +74,7 @@ DBN_DECL if ( ! curr_rec ) RETURN( dberr( S_NOCR ) ); /* get the record type of the current record */ - if ( dio_read( curr_rec, (char FAR * FAR *)&ptr , NOPGHOLD) != S_OKAY ) + if ( dio_read( curr_rec, (char * *)&ptr , NOPGHOLD) != S_OKAY ) RETURN( db_status ); bytecpy( &rt, ptr, sizeof(INT) ); if (rt < 0) diff --git a/cde/lib/DtSearch/raima/destroy.c b/cde/lib/DtSearch/raima/destroy.c index e518fd03..a70c769a 100644 --- a/cde/lib/DtSearch/raima/destroy.c +++ b/cde/lib/DtSearch/raima/destroy.c @@ -56,11 +56,11 @@ */ int d_destroy(dbname TASK_PARM) -CONST char FAR *dbname; +CONST char *dbname; TASK_DECL { int ft_lc; /* loop control */ - FILE_ENTRY FAR *file_ptr; + FILE_ENTRY *file_ptr; #ifndef NO_TRANS int ovfl_save; #endif diff --git a/cde/lib/DtSearch/raima/dio.c b/cde/lib/DtSearch/raima/dio.c index 840fe38c..b43d73b2 100644 --- a/cde/lib/DtSearch/raima/dio.c +++ b/cde/lib/DtSearch/raima/dio.c @@ -185,7 +185,7 @@ PAGE_ENTRY_P Dbpg_table = POINTER_INIT(); /* database page table */ static struct { #ifdef MULTI_TASK - TASK FAR *task; + TASK *task; #endif FILE_NO file; F_ADDR pageno; @@ -209,15 +209,15 @@ static int dbpg_lru_slot; /* least recently accessed db page */ static int no_modheld; /* number of modified or held db pages */ static FILE_NO working_file; /* current key file being processed */ -static void cache_init(P1(int) Pi(LOOKUP_ENTRY FAR *) - Pi(PAGE_ENTRY FAR *) Pi(int)); +static void cache_init(P1(int) Pi(LOOKUP_ENTRY *) + Pi(PAGE_ENTRY *) Pi(int)); static int dio_pzinit(P0); static int clear_cache(P1(FILE_NO) Pi(FILE_NO)); static int dio_pzflush(P0); #ifdef NO_TRANS -static int dio_in(P1(PAGE_ENTRY FAR *) Pi(LOOKUP_ENTRY FAR *)); +static int dio_in(P1(PAGE_ENTRY *) Pi(LOOKUP_ENTRY *)); #else -static int dio_in(P1(PAGE_ENTRY FAR *) Pi(LOOKUP_ENTRY FAR *) +static int dio_in(P1(PAGE_ENTRY *) Pi(LOOKUP_ENTRY *) Pi(BOOLEAN)); #endif @@ -273,8 +273,8 @@ int dio_open( fno ) FILE_NO fno; { - FILE_ENTRY FAR *file_ptr, FAR *lru_file_ptr; - int FAR *uf_ptr; + FILE_ENTRY *file_ptr, *lru_file_ptr; + int *uf_ptr; file_ptr = &file_table[fno]; if ( file_ptr->ft_status == CLOSED ) { @@ -321,7 +321,7 @@ int dio_close( fno ) FILE_NO fno; { - FILE_ENTRY FAR *file_ptr; + FILE_ENTRY *file_ptr; file_ptr = &file_table[fno]; if ( file_ptr->ft_status == OPEN ) { @@ -381,14 +381,14 @@ dio_init() used_files = /* Macro references must be on one line for some compilers */ - (int FAR *)ALLOC(&Used_files, (size_ft+1)*sizeof(int), "used_files"); + (int *)ALLOC(&Used_files, (size_ft+1)*sizeof(int), "used_files"); db_lookup = /* Macro references must be on one line for some compilers */ - (LOOKUP_ENTRY FAR *) + (LOOKUP_ENTRY *) ALLOC(&Db_lookup, db_pgtab_sz*sizeof(LOOKUP_ENTRY), "db_lookup"); dbpg_table = /* Macro references must be on one line for some compilers */ - (PAGE_ENTRY FAR *) + (PAGE_ENTRY *) ALLOC(&Dbpg_table, db_pgtab_sz*sizeof(PAGE_ENTRY), "dbpg_table"); #ifdef DEBUG_DIO if (debugging_dio_init) { @@ -416,11 +416,11 @@ dio_init() if ( use_ovfl ) { ix_lookup = /* Macro references must be on one line for some compilers */ - (LOOKUP_ENTRY FAR *) + (LOOKUP_ENTRY *) ALLOC(&Ix_lookup, ix_pgtab_sz*sizeof(LOOKUP_ENTRY),"ix_lookup"); ixpg_table = /* Macro references must be on one line for some compilers */ - (PAGE_ENTRY FAR *) + (PAGE_ENTRY *) ALLOC(&Ixpg_table, ix_pgtab_sz*sizeof(PAGE_ENTRY), "ixpg_table"); if ( !ix_lookup || !ixpg_table ) return( dberr(S_NOMEMORY) ); @@ -454,8 +454,8 @@ dio_init() static void cache_init (pg_cnt, lu_ptr, pg_ptr, pgsize) int pg_cnt; -LOOKUP_ENTRY FAR * lu_ptr; -PAGE_ENTRY FAR * pg_ptr; +LOOKUP_ENTRY * lu_ptr; +PAGE_ENTRY * pg_ptr; int pgsize; { int pg_no; @@ -512,7 +512,7 @@ int pgsize; void dio_free() { int pgt_lc; /* loop control */ - PAGE_ENTRY FAR *pg_ptr; + PAGE_ENTRY *pg_ptr; #ifdef MULTI_TASK if ( task_count > 1 ) { @@ -594,13 +594,13 @@ FILE_NO to_file; /* ..to (not thru) file "to_file" */ FILE_NO s_file; /* start file to be cleared */ FILE_NO e_file; /* end file (+1) to be cleared */ int i; - LOOKUP_ENTRY FAR *lu_ptr, FAR *lu2_ptr; + LOOKUP_ENTRY *lu_ptr, *lu2_ptr; int pg_slot; - PAGE_ENTRY FAR *pg_ptr; - PGZERO FAR *pgzero_ptr; - FILE_ENTRY FAR *file_ptr; + PAGE_ENTRY *pg_ptr; + PGZERO *pgzero_ptr; + FILE_ENTRY *file_ptr; #ifndef SINGLE_USER - int FAR *appl_ptr, FAR *excl_ptr; + int *appl_ptr, *excl_ptr; #endif #ifndef SINGLE_USER @@ -711,8 +711,8 @@ int dio_flush() #ifndef NO_TRANS int fno; #endif - PAGE_ENTRY FAR *pg_ptr; - LOOKUP_ENTRY FAR *lu_ptr; + PAGE_ENTRY *pg_ptr; + LOOKUP_ENTRY *lu_ptr; #ifdef DEBUG_DIO if (debugging_dio_close) { @@ -802,10 +802,10 @@ FILE_NO file_no; int dio_get( page_no, page_ptr, hold ) F_ADDR page_no; -char FAR * FAR *page_ptr; +char * *page_ptr; int hold; { - PAGE_ENTRY FAR *pg_ptr; + PAGE_ENTRY *pg_ptr; #ifndef SINGLE_USER if ( dbopen == 1 ) { @@ -846,7 +846,7 @@ int dio_touch( page_no ) F_ADDR page_no; { - PAGE_ENTRY FAR *pg_ptr; + PAGE_ENTRY *pg_ptr; #ifndef NO_TRANS /* ensure overflow data is initialized when exclusive db access */ @@ -896,14 +896,14 @@ F_ADDR page_no; int dio_read( dba, recptr, hold ) DB_ADDR dba; -char FAR * FAR *recptr; +char * *recptr; int hold; { FILE_NO file; int offset; F_ADDR us1, us2; - FILE_ENTRY FAR *file_ptr; - PAGE_ENTRY FAR *pg_ptr; + FILE_ENTRY *file_ptr; + PAGE_ENTRY *pg_ptr; file = NUM2INT((FILE_NO)((dba >> FILESHIFT) & FILEMASK), ft_offset); file_ptr = &file_table[file]; @@ -953,14 +953,14 @@ int hold; int dio_write( dba, recptr, release ) DB_ADDR dba; -CONST char FAR *recptr; +CONST char *recptr; int release; { FILE_NO file; F_ADDR us1, us2; int offset; - FILE_ENTRY FAR *file_ptr; - PAGE_ENTRY FAR *pg_ptr; + FILE_ENTRY *file_ptr; + PAGE_ENTRY *pg_ptr; file = NUM2INT((FILE_NO)((dba >> FILESHIFT) & FILEMASK), ft_offset); @@ -1016,7 +1016,7 @@ DB_ADDR dba; { FILE_NO file; F_ADDR us1, us2; - PAGE_ENTRY FAR *pg_ptr; + PAGE_ENTRY *pg_ptr; file = NUM2INT((FILE_NO)((dba >> FILESHIFT) & FILEMASK), ft_offset); us1 = ADDRMASK & dba; @@ -1047,7 +1047,7 @@ INT *rid; F_ADDR sno; /* slot number */ F_ADDR spp; /* slots per page */ F_ADDR offset; /* lseek address - offset from start of file */ - FILE_ENTRY FAR *file_ptr; + FILE_ENTRY *file_ptr; file = NUM2INT((FILE_NO)((dba >> FILESHIFT) & FILEMASK), ft_offset); if ( dio_open(file) == S_OKAY ) { @@ -1058,7 +1058,7 @@ INT *rid; offset = PGHDRSIZE + page*file_ptr->ft_pgsize + (sno - 1 - (page - 1)*spp)*file_ptr->ft_slsize; DB_LSEEK(file_ptr->ft_desc, (off_t)offset, 0); - if ( DB_READ(file_ptr->ft_desc, (char FAR *)rid, sizeof(INT)) + if ( DB_READ(file_ptr->ft_desc, (char *)rid, sizeof(INT)) != sizeof(INT) ) { dberr(S_BADREAD); } @@ -1081,8 +1081,8 @@ INT rid; F_ADDR offset; /* offset from start of page or file */ int clr_in_tx; /* true if called from d_rlbclr in trx */ INT trid; /* [333] working rid */ - FILE_ENTRY FAR *file_ptr; - PAGE_ENTRY FAR *pg_ptr; + FILE_ENTRY *file_ptr; + PAGE_ENTRY *pg_ptr; file = NUM2INT((FILE_NO)((dba >> FILESHIFT) & FILEMASK), ft_offset); file_ptr = &file_table[file]; @@ -1120,7 +1120,7 @@ INT rid; /* read rid from disk, and set/clear rlb accordingly */ DB_LSEEK(file_ptr->ft_desc, (off_t)offset, 0); - if ( DB_READ(file_ptr->ft_desc, (char FAR *)&trid, sizeof(INT)) + if ( DB_READ(file_ptr->ft_desc, (char *)&trid, sizeof(INT)) != sizeof(INT) ) { dberr(S_BADREAD); } @@ -1130,7 +1130,7 @@ INT rid; /* write original rid out with modified rlb */ trid = htons (rid); /* make a copy in trid for byte swap */ DB_LSEEK(file_ptr->ft_desc, (off_t)offset, 0); /* reseek */ - if ( DB_WRITE(file_ptr->ft_desc, (char FAR *)&trid, sizeof(INT)) != + if ( DB_WRITE(file_ptr->ft_desc, (char *)&trid, sizeof(INT)) != sizeof(INT) ) dberr(S_BADWRITE); } @@ -1151,21 +1151,21 @@ int dio_findpg(file, page, pg_table, xpg_ptr, xlu_ptr ) FILE_NO file; /* file number = 0..size_ft-1 */ F_ADDR page; /* database page number */ -PAGE_ENTRY FAR *pg_table; /* = dbpg_table, ixpg_table, or NULL */ -PAGE_ENTRY FAR * FAR *xpg_ptr; /* pointer to page table entry for found page */ -LOOKUP_ENTRY FAR * FAR *xlu_ptr;/* pointer to lookup table slot for found page*/ +PAGE_ENTRY *pg_table; /* = dbpg_table, ixpg_table, or NULL */ +PAGE_ENTRY * *xpg_ptr; /* pointer to page table entry for found page */ +LOOKUP_ENTRY * *xlu_ptr;/* pointer to lookup table slot for found page*/ { #ifdef MULTI_TASK CHAR_P Tempbuff; #define tempbuff Tempbuff.ptr #endif - LOOKUP_ENTRY FAR *lookup; /* = db_lookup or ix_lookup */ + LOOKUP_ENTRY *lookup; /* = db_lookup or ix_lookup */ int pgtab_sz; /* = db_pgtab_sz or ix_pgtab_sz */ long cmp; int cnt; int lu_slot, l, u; - LOOKUP_ENTRY FAR *lu_ptr, FAR *replu_ptr; - PAGE_ENTRY FAR *pg_ptr; + LOOKUP_ENTRY *lu_ptr, *replu_ptr; + PAGE_ENTRY *pg_ptr; int *lru_ptr; int pg_slot; #ifndef NO_TRANS @@ -1459,8 +1459,8 @@ dio_out(pg_ptr, lu_ptr, db_cache) #else dio_out(pg_ptr, lu_ptr) #endif -PAGE_ENTRY FAR *pg_ptr; /* page table entry to be output */ -LOOKUP_ENTRY FAR *lu_ptr; /* corresponding lookup table entry */ +PAGE_ENTRY *pg_ptr; /* page table entry to be output */ +LOOKUP_ENTRY *lu_ptr; /* corresponding lookup table entry */ #ifndef NO_TRANS BOOLEAN db_cache; /* TRUE if pg_ptr is in db page cache */ #endif @@ -1526,14 +1526,14 @@ LOOKUP_ENTRY FAR *lu_ptr; /* corresponding lookup table entry */ /* Read in a page to the buffer */ static int dio_in(pg_ptr, lu_ptr) -PAGE_ENTRY FAR *pg_ptr; /* page table entry to be input */ -LOOKUP_ENTRY FAR *lu_ptr; /* corresponding to pg_ptr */ +PAGE_ENTRY *pg_ptr; /* page table entry to be input */ +LOOKUP_ENTRY *lu_ptr; /* corresponding to pg_ptr */ #else /* Read in a page to the buffer */ static int dio_in(pg_ptr, lu_ptr, db_cache ) -PAGE_ENTRY FAR *pg_ptr; /* page table entry to be input */ -LOOKUP_ENTRY FAR *lu_ptr; /* corresponding to pg_ptr */ +PAGE_ENTRY *pg_ptr; /* page table entry to be input */ +LOOKUP_ENTRY *lu_ptr; /* corresponding to pg_ptr */ BOOLEAN db_cache; /* TRUE if pg_ptr in db cache */ #endif { @@ -1541,8 +1541,8 @@ BOOLEAN db_cache; /* TRUE if pg_ptr in db cache */ int fno; /* file number */ int pgsize; /* page size */ long addr; /* file address */ - PGZERO FAR *pgzero_ptr; - FILE_ENTRY FAR *file_ptr; + PGZERO *pgzero_ptr; + FILE_ENTRY *file_ptr; int r; file_ptr = &file_table[fno = lu_ptr->file]; @@ -1600,7 +1600,7 @@ ULONG dio_pzsetts(fno ) FILE_NO fno; { ULONG ts; - PGZERO FAR *pgzero_ptr; + PGZERO *pgzero_ptr; if ( db_tsrecs || db_tssets ) { pgzero_ptr = &pgzero[fno]; @@ -1632,7 +1632,7 @@ FILE_NO fno; static int dio_pzinit() { FILE_NO i; - PGZERO FAR *pgzero_ptr; + PGZERO *pgzero_ptr; #ifdef DEBUG_DIO if (debugging_dio_init) { @@ -1680,8 +1680,8 @@ static int dio_pzflush() { FILE_NO i; int desc; - PGZERO FAR *pgzero_ptr; - FILE_ENTRY FAR *file_ptr; + PGZERO *pgzero_ptr; + FILE_ENTRY *file_ptr; LONG align_LONG; char *cptr; int j; @@ -1715,12 +1715,12 @@ static int dio_pzflush() } desc = file_ptr->ft_desc; DB_LSEEK(desc, (off_t)0L, 0); - if (DB_WRITE(desc, (char FAR *)pgzero_ptr, PGZEROSZ) != PGZEROSZ) + if (DB_WRITE(desc, (char *)pgzero_ptr, PGZEROSZ) != PGZEROSZ) return( dberr(S_BADWRITE) ); pgzero_ptr->pz_modified = FALSE; #ifndef NO_TRANS if ( trlog_flag ) - d_trlog(i, 0, (char FAR *)pgzero_ptr, PGZEROSZ); + d_trlog(i, 0, (char *)pgzero_ptr, PGZEROSZ); #endif } #ifdef CLOSE_FILES @@ -1745,8 +1745,8 @@ int dio_pzread(fno) FILE_NO fno; /* file number */ { - FILE_ENTRY FAR *file_ptr; - PGZERO FAR *pgzero_ptr; + FILE_ENTRY *file_ptr; + PGZERO *pgzero_ptr; pgzero_ptr = &pgzero[fno]; file_ptr = &file_table[fno]; @@ -1763,7 +1763,7 @@ FILE_NO fno; /* file number */ /* seek to and read page zero */ DB_LSEEK(file_ptr->ft_desc, (off_t)0L, 0); - if ( DB_READ(file_ptr->ft_desc, (char FAR *)pgzero_ptr, PGZEROSZ) + if ( DB_READ(file_ptr->ft_desc, (char *)pgzero_ptr, PGZEROSZ) != PGZEROSZ ) { return( dberr(S_BADREAD) ); } @@ -1791,8 +1791,8 @@ F_ADDR *loc; /* pointer to allocated location */ { DB_ADDR dba; F_ADDR pg; - char FAR *ptr; - PGZERO FAR *pgzero_ptr; + char *ptr; + PGZERO *pgzero_ptr; #ifndef SINGLE_USER /* check shared access privileges */ @@ -1814,7 +1814,7 @@ F_ADDR *loc; /* pointer to allocated location */ } else { pg = pgzero_ptr->pz_dchain; - if ( dio_get( pg, (char FAR * FAR *)&ptr, NOPGHOLD ) != S_OKAY ) + if ( dio_get( pg, (char * *)&ptr, NOPGHOLD ) != S_OKAY ) return( db_status ); /* Get the first key node on the delete chain. * (sizeof external timestamp set to 4 bytes) @@ -1834,7 +1834,7 @@ F_ADDR *loc; /* pointer to allocated location */ else { pg = pgzero_ptr->pz_dchain; dba = ((NUM2EXT(fno, ft_offset) & FILEMASK) << FILESHIFT) | pg; - if ( dio_read(dba, (char FAR * FAR *)&ptr, NOPGHOLD) != S_OKAY ) + if ( dio_read(dba, (char * *)&ptr, NOPGHOLD) != S_OKAY ) return( db_status ); bytecpy(&pgzero_ptr->pz_dchain, ptr+sizeof(INT), sizeof(F_ADDR)); } @@ -1859,8 +1859,8 @@ F_ADDR loc; /* location to be freed */ { DB_ADDR dba; INT recnum; - char FAR *ptr; - PGZERO FAR *pgzero_ptr; + char *ptr; + PGZERO *pgzero_ptr; #ifndef SINGLE_USER /* check shared access privileges */ @@ -1875,7 +1875,7 @@ F_ADDR loc; /* location to be freed */ if ( file_table[fno].ft_type == KEY ) { if ( working_file != fno ) return( dberr(S_NOWORK) ); - if ( dio_get( loc, (char FAR * FAR *)&ptr, PGHOLD ) != S_OKAY ) + if ( dio_get( loc, (char * *)&ptr, PGHOLD ) != S_OKAY ) return( db_status ); /********************************************* * Delete chain ptr in key node page is in location @@ -1892,7 +1892,7 @@ F_ADDR loc; /* location to be freed */ } else { dba = ((NUM2EXT(fno, ft_offset) & FILEMASK) << FILESHIFT) | loc; - if ( dio_read( dba, (char FAR * FAR *)&ptr , NOPGHOLD) != S_OKAY ) + if ( dio_read( dba, (char * *)&ptr , NOPGHOLD) != S_OKAY ) return( db_status ); bytecpy(&recnum, ptr, sizeof(INT)); recnum = ~recnum; /* indicates deleted record */ @@ -1932,7 +1932,7 @@ FILE_NO fno; void dio_pzclr() { FILE_NO i; - PGZERO FAR *pgzero_ptr; + PGZERO *pgzero_ptr; for (i = 0, pgzero_ptr = pgzero; i < size_ft; i++, pgzero_ptr++) { if (pgzero_ptr->pz_modified) { diff --git a/cde/lib/DtSearch/raima/discon.c b/cde/lib/DtSearch/raima/discon.c index 83321e9b..c0061b49 100644 --- a/cde/lib/DtSearch/raima/discon.c +++ b/cde/lib/DtSearch/raima/discon.c @@ -76,9 +76,9 @@ DBN_DECL /* database number */ SET_PTR cosp; /* current owner's set pointer */ MEM_PTR cmmp; /* member's member pointer */ MEM_PTR npmp; /* next or previous member's member pointer */ - char FAR *orec; /* ptr to current owner record contents in cache */ - char FAR *mrec = NULL; /* ptr to member record contents in cache */ - char FAR *nprec = NULL; /* ptr to next or prev record contents in cache */ + char *orec; /* ptr to current owner record contents in cache */ + char *mrec = NULL; /* ptr to member record contents in cache */ + char *nprec = NULL; /* ptr to next or prev record contents in cache */ DB_ADDR mdba; /* db address of member record */ DB_ADDR npdba; /* db address of next or previous member */ int set; /* set_table entry */ @@ -86,12 +86,12 @@ DBN_DECL /* database number */ #ifndef NO_TIMESTAMP FILE_NO file; /* file containing owner record */ #endif - SET_ENTRY FAR *set_ptr; - DB_ADDR FAR *co_ptr, FAR *cm_ptr; + SET_ENTRY *set_ptr; + DB_ADDR *co_ptr, *cm_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); - if (nset_check(nset, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) + if (nset_check(nset, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) RETURN( db_status ); /* make sure we have a current owner */ @@ -104,22 +104,22 @@ DBN_DECL /* database number */ /* read member record */ mdba = *cm_ptr; - if ( dio_read(mdba, (char FAR * FAR *)&mrec, PGHOLD) != S_OKAY ) + if ( dio_read(mdba, (char * *)&mrec, PGHOLD) != S_OKAY ) RETURN( db_status ); /* ensure record is connected */ - if ( (stat = r_gmem(set, mrec, (char FAR *)&cmmp)) != S_OKAY ) + if ( (stat = r_gmem(set, mrec, (char *)&cmmp)) != S_OKAY ) goto quit_b; if ( cmmp.owner == NULL_DBA ) { /* checks owner pointer */ stat = S_NOTCON; goto quit_b; } /* read owner record */ - if ( (stat = dio_read(*co_ptr, (char FAR * FAR *)&orec, PGHOLD)) != S_OKAY ) + if ( (stat = dio_read(*co_ptr, (char * *)&orec, PGHOLD)) != S_OKAY ) goto quit_b; /* get set pointer from owner */ - if ( r_gset(set, orec, (char FAR *)&cosp) != S_OKAY ) + if ( r_gset(set, orec, (char *)&cosp) != S_OKAY ) goto quit_a; if ( cmmp.next == NULL_DBA ) @@ -128,11 +128,11 @@ DBN_DECL /* database number */ else { /* set next record's prev to current member's prev */ npdba = cmmp.next; - if ((dio_read(npdba, (char FAR * FAR *)&nprec, NOPGHOLD) != S_OKAY) || - (r_gmem(set, nprec, (char FAR *)&npmp) != S_OKAY)) + if ((dio_read(npdba, (char * *)&nprec, NOPGHOLD) != S_OKAY) || + (r_gmem(set, nprec, (char *)&npmp) != S_OKAY)) goto quit_a; npmp.prev = cmmp.prev; - if ((r_pmem(set, nprec, (char FAR *)&npmp) != S_OKAY) || + if ((r_pmem(set, nprec, (char *)&npmp) != S_OKAY) || (dio_write(npdba, NULL, NOPGFREE) != S_OKAY)) goto quit_a; } @@ -142,11 +142,11 @@ DBN_DECL /* database number */ else { /* set previous record's next to current member's next */ npdba = cmmp.prev; - if ((dio_read(npdba, (char FAR * FAR *)&nprec, NOPGHOLD) != S_OKAY) || - (r_gmem(set, nprec, (char FAR *)&npmp) != S_OKAY)) + if ((dio_read(npdba, (char * *)&nprec, NOPGHOLD) != S_OKAY) || + (r_gmem(set, nprec, (char *)&npmp) != S_OKAY)) goto quit_a; npmp.next = cmmp.next; - if ((r_pmem(set, nprec, (char FAR *)&npmp) != S_OKAY) || + if ((r_pmem(set, nprec, (char *)&npmp) != S_OKAY) || (dio_write(npdba, NULL, NOPGFREE) != S_OKAY)) goto quit_a; } @@ -161,7 +161,7 @@ DBN_DECL /* database number */ --cosp.total; /* update owner record's set pointer */ - if ((r_pset(set, orec, (char FAR *)&cosp) != S_OKAY) || + if ((r_pset(set, orec, (char *)&cosp) != S_OKAY) || (dio_write(*co_ptr, NULL, PGFREE) != S_OKAY)) RETURN( db_status ); @@ -173,7 +173,7 @@ DBN_DECL /* database number */ cmmp.owner = cmmp.prev = cmmp.next = NULL_DBA; /* update member record */ - if ((r_pmem(set, mrec, (char FAR *)&cmmp) != S_OKAY) || + if ((r_pmem(set, mrec, (char *)&cmmp) != S_OKAY) || (dio_write(mdba, NULL, PGFREE) != S_OKAY)) RETURN( db_status ); #ifndef NO_TIMESTAMP diff --git a/cde/lib/DtSearch/raima/disdel.c b/cde/lib/DtSearch/raima/disdel.c index dbba1d48..b751d68a 100644 --- a/cde/lib/DtSearch/raima/disdel.c +++ b/cde/lib/DtSearch/raima/disdel.c @@ -58,9 +58,9 @@ DBN_DECL int rectype, nset, cset; int set, mem; DB_ADDR dba, odba, mdba; - DB_ADDR FAR *co_ptr, FAR *cm_ptr; - SET_ENTRY FAR *set_ptr; - MEMBER_ENTRY FAR *mem_ptr; + DB_ADDR *co_ptr, *cm_ptr; + SET_ENTRY *set_ptr; + MEMBER_ENTRY *mem_ptr; int memtot; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); diff --git a/cde/lib/DtSearch/raima/dproto.h b/cde/lib/DtSearch/raima/dproto.h index dba2dc5c..c9618e0b 100644 --- a/cde/lib/DtSearch/raima/dproto.h +++ b/cde/lib/DtSearch/raima/dproto.h @@ -162,23 +162,23 @@ int d_setfiles(P1(int)); /* dio.c */ int d_setpages(P1(int) Pi(int)); /* dio.c */ int d_trbound(P0); /* trlog.c */ -int d_trlog(P1(int) Pi(int) Pi(CONST char FAR *) Pi(int)); +int d_trlog(P1(int) Pi(int) Pi(CONST char *) Pi(int)); /* trlog.c */ int d_trmark(P0); /* trlog.c */ int d_tron(P0); /* trlog.c */ int d_troff(P0); /* trlog.c */ -int d_decode_dba(P1(DB_ADDR) Pi(int FAR *) Pi(long FAR *)); +int d_decode_dba(P1(DB_ADDR) Pi(int *) Pi(long *)); /* dbacode.c */ -int d_encode_dba(P1(int) Pi(long) Pi(DB_ADDR FAR *)); +int d_encode_dba(P1(int) Pi(long) Pi(DB_ADDR *)); /* dbacode.c */ #define d_memlock(p) /**/ #define d_memlock_group(lg) S_OKAY #define d_memunlock(p) /**/ #define d_memunlock_group(lg) /**/ -char FAR * d_alloc(P1(unsigned)); /* alloc.c */ -char FAR * d_calloc(P1(unsigned) Pi(unsigned)); /* alloc.c */ -void d_free(P1(CHAR_P FAR *)); /* alloc.c */ +char * d_alloc(P1(unsigned)); /* alloc.c */ +char * d_calloc(P1(unsigned) Pi(unsigned)); /* alloc.c */ +void d_free(P1(CHAR_P *)); /* alloc.c */ #ifndef MULTI_TASK /* MULTI_TASK */ #define dt_opentask(a) S_OKAY @@ -186,53 +186,53 @@ void d_free(P1(CHAR_P FAR *)); /* alloc.c */ int d_close(P0); /* dblfcns.c */ int d_cmstat(P1(int) DBN_Dn); /* cmstat.c */ -int d_cmtype(P1(int) Pi(int FAR *) DBN_Dn); /* cmtype.c */ +int d_cmtype(P1(int) Pi(int *) DBN_Dn); /* cmtype.c */ int d_connect(P1(int) DBN_Dn); /* connect.c */ #ifndef NO_TIMESTAMP /* NO_TIMESTAMP */ int d_costat(P1(int) DBN_Dn); /* costat.c */ #endif /* NO_TIMESTAMP */ -int d_cotype(P1(int) Pi(int FAR *) DBN_Dn); /* cotype.c */ -int d_crget(P1(DB_ADDR FAR *) DBN_Dn); /* crget.c */ -int d_crread(P1(long) Pi(char FAR *) DBN_Dn); /* crread.c */ -int d_crset(P1(DB_ADDR FAR *) DBN_Dn); /* crset.c */ +int d_cotype(P1(int) Pi(int *) DBN_Dn); /* cotype.c */ +int d_crget(P1(DB_ADDR *) DBN_Dn); /* crget.c */ +int d_crread(P1(long) Pi(char *) DBN_Dn); /* crread.c */ +int d_crset(P1(DB_ADDR *) DBN_Dn); /* crset.c */ #ifndef NO_TIMESTAMP /* NO_TIMESTAMP */ int d_crstat(P0); /* crstat.c */ #endif /* NO_TIMESTAMP */ -int d_crtype(P1(int FAR *) DBN_Dn); /* crtype.c */ -int d_crwrite(P1(long) Pi(char FAR *) DBN_Dn); /* crwrite.c */ -int d_csmget(P1(int) Pi(DB_ADDR FAR *) DBN_Dn); /* csmget.c */ -int d_csmread(P1(int) Pi(long) Pi(char FAR *) DBN_Dn); +int d_crtype(P1(int *) DBN_Dn); /* crtype.c */ +int d_crwrite(P1(long) Pi(char *) DBN_Dn); /* crwrite.c */ +int d_csmget(P1(int) Pi(DB_ADDR *) DBN_Dn); /* csmget.c */ +int d_csmread(P1(int) Pi(long) Pi(char *) DBN_Dn); /* csmread.c */ -int d_csmset(P1(int) Pi(DB_ADDR FAR *) DBN_Dn); /* csmset.c */ -int d_csmwrite(P1(int) Pi(long) Pi(CONST char FAR *) DBN_Dn); +int d_csmset(P1(int) Pi(DB_ADDR *) DBN_Dn); /* csmset.c */ +int d_csmwrite(P1(int) Pi(long) Pi(CONST char *) DBN_Dn); /* csmwrite.c */ -int d_csoget(P1(int) Pi(DB_ADDR FAR *) DBN_Dn); /* csoget.c */ -int d_csoread(P1(int) Pi(long) Pi(char FAR *) DBN_Dn); +int d_csoget(P1(int) Pi(DB_ADDR *) DBN_Dn); /* csoget.c */ +int d_csoread(P1(int) Pi(long) Pi(char *) DBN_Dn); /* csoread.c */ -int d_csoset(P1(int) Pi(DB_ADDR FAR *) DBN_Dn); /* csoset.c */ -int d_csowrite(P1(int) Pi(long) Pi(CONST char FAR *) DBN_Dn); +int d_csoset(P1(int) Pi(DB_ADDR *) DBN_Dn); /* csoset.c */ +int d_csowrite(P1(int) Pi(long) Pi(CONST char *) DBN_Dn); /* csowrite.c */ #ifndef NO_TIMESTAMP /* NO_TIMESTAMP */ int d_csstat(P1(int) DBN_Dn); /* csstat.c */ -int d_ctscm(P1(int) Pi(ULONG FAR *) DBN_Dn); /* ctscm.c */ -int d_ctsco(P1(int) Pi(ULONG FAR *) DBN_Dn); /* ctsco.c */ -int d_ctscr(P1(ULONG FAR *)); /* ctscr.c */ +int d_ctscm(P1(int) Pi(ULONG *) DBN_Dn); /* ctscm.c */ +int d_ctsco(P1(int) Pi(ULONG *) DBN_Dn); /* ctsco.c */ +int d_ctscr(P1(ULONG *)); /* ctscr.c */ #endif /* NO_TIMESTAMP */ #ifndef NO_COUNTRY -int d_ctbpath(P1(CONST char FAR *)); /* pathfcns.c */ +int d_ctbpath(P1(CONST char *)); /* pathfcns.c */ #endif /* NO_COUNTRY */ -int d_dbdpath(P1(CONST char FAR *)); /* dbdpath.c */ -int d_dbfpath(P1(CONST char FAR *)); /* dbfpath.c */ -int d_dblog(P1(CONST char FAR *)); /* dblog.c */ -int d_dbtaf(P1(CONST char FAR *)); /* dbtaf.c */ -int d_dbuserid(P1(CONST char FAR *)); /* dbuserid.c */ +int d_dbdpath(P1(CONST char *)); /* dbdpath.c */ +int d_dbfpath(P1(CONST char *)); /* dbfpath.c */ +int d_dblog(P1(CONST char *)); /* dblog.c */ +int d_dbtaf(P1(CONST char *)); /* dbtaf.c */ +int d_dbuserid(P1(CONST char *)); /* dbuserid.c */ int d_delete(DBN_D1); /* delete.c */ int d_disdel(DBN_D1); /* disdel.c */ int d_recnext(DBN_D1); /* recnext.c */ int d_recprev(DBN_D1); /* recprev.c */ -int d_destroy(P1(CONST char FAR *)); /* destroy.c */ +int d_destroy(P1(CONST char *)); /* destroy.c */ int d_discon(P1(int) DBN_Dn); /* discon.c */ -int d_fillnew(P1(int) Pi(CONST char FAR *) DBN_Dn); /* fillnew.c */ +int d_fillnew(P1(int) Pi(CONST char *) DBN_Dn); /* fillnew.c */ int d_findco(P1(int) DBN_Dn); /* findco.c */ int d_findfm(P1(int) DBN_Dn); /* findfm.c */ int d_findlm(P1(int) DBN_Dn); /* findlm.c */ @@ -240,10 +240,10 @@ int d_findnm(P1(int) DBN_Dn); /* findnm.c */ int d_findpm(P1(int) DBN_Dn); /* findpm.c */ int d_freeall(P0); /* dblfcns.c */ #ifndef NO_TIMESTAMP /* NO_TIMESTAMP */ -int d_gtscm(P1(int) Pi(ULONG FAR *) DBN_Dn); /* gtscm.c */ -int d_gtsco(P1(int) Pi(ULONG FAR *) DBN_Dn); /* gtsco.c */ -int d_gtscr(P1(ULONG FAR *)); /* gtscr.c */ -int d_gtscs(P1(int) Pi(ULONG FAR *) DBN_Dn); /* gtscs.c */ +int d_gtscm(P1(int) Pi(ULONG *) DBN_Dn); /* gtscm.c */ +int d_gtsco(P1(int) Pi(ULONG *) DBN_Dn); /* gtsco.c */ +int d_gtscr(P1(ULONG *)); /* gtscr.c */ +int d_gtscs(P1(int) Pi(ULONG *) DBN_Dn); /* gtscs.c */ #endif /* NO_TIMESTAMP */ int d_initialize(DBN_D1); /* initial.c */ int d_initfile(P1(FILE_NO) DBN_Dn); /* initial.c */ @@ -251,43 +251,43 @@ int d_ismember(P1(int) DBN_Dn); /* ismember.c */ int d_isowner(P1(int) DBN_Dn); /* isowner.c */ int d_keydel(P1(long) DBN_Dn); /* keydel.c */ int d_keyexist(P1(long) DBN_Dn); /* keyexist.c */ -int d_keyfind(P1(long) Pi(CONST char FAR *) DBN_Dn); +int d_keyfind(P1(long) Pi(CONST char *) DBN_Dn); /* keyfind.c */ int d_keyfree(P1(long) DBN_Dn); /* dblfcns.c */ int d_keyfrst(P1(long) DBN_Dn); /* keyfrst.c */ int d_keylast(P1(long) DBN_Dn); /* keylast.c */ -int d_keylock(P1(long) Pi(char FAR *) DBN_Dn); /* dblfcns.c */ -int d_keylstat(P1(long) Pi(char FAR *) DBN_Dn); /* dblfcns.c */ +int d_keylock(P1(long) Pi(char *) DBN_Dn); /* dblfcns.c */ +int d_keylstat(P1(long) Pi(char *) DBN_Dn); /* dblfcns.c */ int d_keynext(P1(long) DBN_Dn); /* keynext.c */ int d_keyprev(P1(long) DBN_Dn); /* keyprev.c */ -int d_keyread(P1(char FAR *)); /* keyfcns.c */ +int d_keyread(P1(char *)); /* keyfcns.c */ int d_keystore(P1(long) DBN_Dn); /* keystore.c */ -int d_lock(P1(int) Pi(LOCK_REQUEST FAR *) DBN_Dn); /* dblfcns.c */ +int d_lock(P1(int) Pi(LOCK_REQUEST *) DBN_Dn); /* dblfcns.c */ int d_makenew(P1(int) DBN_Dn); /* makenew.c */ int d_mapchar(P1(unsigned char) Pi(unsigned char) - Pi(CONST char FAR *) Pi(unsigned char)); /* mapchar.c */ -int d_members(P1(int) Pi(LONG FAR *) DBN_Dn); /* members.c */ + Pi(CONST char *) Pi(unsigned char)); /* mapchar.c */ +int d_members(P1(int) Pi(LONG *) DBN_Dn); /* members.c */ int d_off_opt(P1(int)); /* options.c */ int d_on_opt(P1(int)); /* options.c */ -int d_open(P1(CONST char FAR *) Pi(CONST char FAR *)); +int d_open(P1(CONST char *) Pi(CONST char *)); /* dblfcns.c */ -int d_rerdcurr(P1(DB_ADDR FAR **)); /* rwcurr.c */ -int d_rdcurr(P1(DB_ADDR FAR **) Pi(int FAR *)); /* rwcurr.c */ -int d_wrcurr(P1(DB_ADDR FAR *)); /* rwcurr.c */ +int d_rerdcurr(P1(DB_ADDR **)); /* rwcurr.c */ +int d_rdcurr(P1(DB_ADDR **) Pi(int *)); /* rwcurr.c */ +int d_wrcurr(P1(DB_ADDR *)); /* rwcurr.c */ int d_recfree(P1(int) DBN_Dn); /* dblfcns.c */ int d_recfrst(P1(int) DBN_Dn); /* recfrst.c */ int d_reclast(P1(int) DBN_Dn); /* reclast.c */ -int d_reclock(P1(int) Pi(char FAR *) DBN_Dn); /* dblfcns.c */ -int d_reclstat(P1(int) Pi(char FAR *) DBN_Dn); /* dblfcns.c */ -int d_recover(P1(CONST char FAR *)); /* recover.c */ -int d_recread(P1(char FAR *) DBN_Dn); /* recread.c */ +int d_reclock(P1(int) Pi(char *) DBN_Dn); /* dblfcns.c */ +int d_reclstat(P1(int) Pi(char *) DBN_Dn); /* dblfcns.c */ +int d_recover(P1(CONST char *)); /* recover.c */ +int d_recread(P1(char *) DBN_Dn); /* recread.c */ int d_recset(P1(int) DBN_Dn); /* recset.c */ #ifndef NO_TIMESTAMP /* NO_TIMESTAMP */ int d_recstat(P1(DB_ADDR) Pi(ULONG)); /* recstat.c */ #endif /* NO_TIMESTAMP */ -int d_recwrite(P1(CONST char FAR *) DBN_Dn); /* recwrite.c */ -int d_renfile(P1(CONST char FAR *) Pi(FILE_NO) - Pi(CONST char FAR *)); /* renfile.c */ +int d_recwrite(P1(CONST char *) DBN_Dn); /* recwrite.c */ +int d_renfile(P1(CONST char *) Pi(FILE_NO) + Pi(CONST char *)); /* renfile.c */ int d_retries(P1(int)); /* dblfcns.c */ int d_rlbclr(P0); /* dblfcns.c */ int d_rlbset(P0); /* dblfcns.c */ @@ -297,9 +297,9 @@ int d_set_dberr(P1(FARPROC)); /* dberr.c */ int d_setdb(P1(int)); /* setdb.c */ #endif /* ONE_DB */ int d_setfree(P1(int) DBN_Dn); /* dblfcns.c */ -int d_setkey(P1(long) Pi(CONST char FAR *) DBN_Dn); /* makenew.c */ -int d_setlock(P1(int) Pi(char FAR *) DBN_Dn); /* dblfcns.c */ -int d_setlstat(P1(int) Pi(char FAR *) DBN_Dn); /* dblfcns.c */ +int d_setkey(P1(long) Pi(CONST char *) DBN_Dn); /* makenew.c */ +int d_setlock(P1(int) Pi(char *) DBN_Dn); /* dblfcns.c */ +int d_setlstat(P1(int) Pi(char *) DBN_Dn); /* dblfcns.c */ int d_setmm(P1(int) Pi(int) DBN_Dn); /* setmm.c */ int d_setmo(P1(int) Pi(int) DBN_Dn); /* setmo.c */ int d_setmr(P1(int) DBN_Dn); /* setmr.c */ @@ -316,13 +316,13 @@ int d_stscs(P1(int) Pi(ULONG) DBN_Dn); /* stscs.c */ #endif /* NO_TIMESTAMP */ int d_timeout(P1(int)); /* dblfcns.c */ int d_trabort(P0); /* dblfcns.c */ -int d_trbegin(P1(CONST char FAR *)); /* dblfcns.c */ +int d_trbegin(P1(CONST char *)); /* dblfcns.c */ int d_trend(P0); /* dblfcns.c */ #ifndef NO_TIMESTAMP /* NO_TIMESTAMP */ -int d_utscm(P1(int) Pi(ULONG FAR *) DBN_Dn); /* utscm.c */ -int d_utsco(P1(int) Pi(ULONG FAR *) DBN_Dn); /* utsco.c */ -int d_utscr(P1(ULONG FAR *)); /* utscr.c */ -int d_utscs(P1(int) Pi(ULONG FAR *) DBN_Dn); /* utscs.c */ +int d_utscm(P1(int) Pi(ULONG *) DBN_Dn); /* utscm.c */ +int d_utsco(P1(int) Pi(ULONG *) DBN_Dn); /* utsco.c */ +int d_utscr(P1(ULONG *)); /* utscr.c */ +int d_utscs(P1(int) Pi(ULONG *) DBN_Dn); /* utscs.c */ #endif /* NO_TIMESTAMP */ #endif /* MULTI_TASK */ diff --git a/cde/lib/DtSearch/raima/fillnew.c b/cde/lib/DtSearch/raima/fillnew.c index 66e33c12..786d2789 100644 --- a/cde/lib/DtSearch/raima/fillnew.c +++ b/cde/lib/DtSearch/raima/fillnew.c @@ -57,7 +57,7 @@ int d_fillnew( nrec, recval TASK_PARM DBN_PARM ) int nrec; /* record number */ -CONST char FAR *recval; /* record value */ +CONST char *recval; /* record value */ TASK_DECL DBN_DECL /* database number */ { @@ -68,15 +68,15 @@ DBN_DECL /* database number */ INT recnum, stat; FILE_NO file; F_ADDR rec_addr; - char FAR *ptr; + char *ptr; char key[256]; - RECORD_ENTRY FAR *rec_ptr; - FIELD_ENTRY FAR *fld_ptr; + RECORD_ENTRY *rec_ptr; + FIELD_ENTRY *fld_ptr; int fld, fldtot; DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO)); - if (nrec_check(nrec, &nrec, (RECORD_ENTRY FAR * FAR *)&rec_ptr) != S_OKAY) + if (nrec_check(nrec, &nrec, (RECORD_ENTRY * *)&rec_ptr) != S_OKAY) RETURN( db_status ); recnum = NUM2EXT(nrec, rt_offset); @@ -88,9 +88,9 @@ DBN_DECL /* database number */ ++fld, ++fld_ptr) { if ((fld_ptr->fd_key == UNIQUE) && !(fld_ptr->fd_flags & OPTKEYMASK)) { if (fld_ptr->fd_type != COMKEY) - ptr = (char FAR *)recval + fld_ptr->fd_ptr - rec_ptr->rt_data; + ptr = (char *)recval + fld_ptr->fd_ptr - rec_ptr->rt_data; else - key_bldcom(fld, (char FAR *)recval, ptr = key, FALSE); /* Don't complement */ + key_bldcom(fld, (char *)recval, ptr = key, FALSE); /* Don't complement */ d_keyfind(FLDMARK*(long)recnum + (fld - rec_ptr->rt_fields), ptr TASK_PARM DBN_PARM); curr_rec = db_addr; @@ -109,7 +109,7 @@ DBN_DECL /* database number */ db_addr |= rec_addr; /* read record */ - if (dio_read(db_addr, (char FAR * FAR *)&ptr, PGHOLD) != S_OKAY) + if (dio_read(db_addr, (char * *)&ptr, PGHOLD) != S_OKAY) RETURN( db_status ); /* zero fill the record */ @@ -137,9 +137,9 @@ DBN_DECL /* database number */ ++fld, ++fld_ptr) { if ((fld_ptr->fd_key != 'n') && !(fld_ptr->fd_flags & OPTKEYMASK)) { if ( fld_ptr->fd_type != COMKEY ) - ptr = (char FAR *)recval + fld_ptr->fd_ptr - rec_ptr->rt_data; + ptr = (char *)recval + fld_ptr->fd_ptr - rec_ptr->rt_data; else - key_bldcom(fld, (char FAR *)recval, ptr = key, TRUE); + key_bldcom(fld, (char *)recval, ptr = key, TRUE); if ((stat = key_insert(fld, ptr, db_addr)) != S_OKAY) { r_delrec( nrec, db_addr ); dio_write(db_addr, NULL, PGFREE); diff --git a/cde/lib/DtSearch/raima/findco.c b/cde/lib/DtSearch/raima/findco.c index de5cb9ee..d97201f5 100644 --- a/cde/lib/DtSearch/raima/findco.c +++ b/cde/lib/DtSearch/raima/findco.c @@ -58,11 +58,11 @@ DBN_DECL int set; char mem[MEMPSIZE]; DB_ADDR own; - SET_ENTRY FAR *set_ptr; + SET_ENTRY *set_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); - if (nset_check(nset, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) + if (nset_check(nset, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) RETURN( db_status ); /* Make sure we have a current record */ @@ -70,7 +70,7 @@ DBN_DECL RETURN( dberr(S_NOCR) ); /* Read current record */ - if ( dio_read(curr_rec, (char FAR * FAR *)&crloc, NOPGHOLD) != S_OKAY ) + if ( dio_read(curr_rec, (char * *)&crloc, NOPGHOLD) != S_OKAY ) RETURN( db_status ); /* Get the member ptr for this set */ diff --git a/cde/lib/DtSearch/raima/findfm.c b/cde/lib/DtSearch/raima/findfm.c index adfbdba0..e4cd3ea2 100644 --- a/cde/lib/DtSearch/raima/findfm.c +++ b/cde/lib/DtSearch/raima/findfm.c @@ -57,13 +57,13 @@ DBN_DECL { char setp[SETPSIZE]; DB_ADDR mem; - char FAR *recp; + char *recp; int set; - SET_ENTRY FAR *set_ptr; + SET_ENTRY *set_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); - if (nset_check(nset, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) + if (nset_check(nset, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) RETURN( db_status ); /* make sure we have a current owner */ @@ -71,7 +71,7 @@ DBN_DECL RETURN( dberr(S_NOCO) ); /* read current owner of set */ - if ( dio_read(curr_own[set], (char FAR * FAR *)&recp, NOPGHOLD) != S_OKAY ) + if ( dio_read(curr_own[set], (char * *)&recp, NOPGHOLD) != S_OKAY ) RETURN( db_status ); /* get set pointer from record */ diff --git a/cde/lib/DtSearch/raima/findlm.c b/cde/lib/DtSearch/raima/findlm.c index 2b9af23d..5048cdfa 100644 --- a/cde/lib/DtSearch/raima/findlm.c +++ b/cde/lib/DtSearch/raima/findlm.c @@ -57,13 +57,13 @@ DBN_DECL { char setp[SETPSIZE]; DB_ADDR mem; - char FAR *recp; + char *recp; int set; - SET_ENTRY FAR *set_ptr; + SET_ENTRY *set_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); - if (nset_check(nset, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) + if (nset_check(nset, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) RETURN( db_status ); /* make sure we have a current owner */ @@ -71,7 +71,7 @@ DBN_DECL RETURN( dberr(S_NOCO) ); /* read current owner of set */ - if ( dio_read(curr_own[set], (char FAR * FAR *)&recp, NOPGHOLD) != S_OKAY ) + if ( dio_read(curr_own[set], (char * *)&recp, NOPGHOLD) != S_OKAY ) RETURN( db_status ); /* get set pointer from record */ diff --git a/cde/lib/DtSearch/raima/findnm.c b/cde/lib/DtSearch/raima/findnm.c index 07976330..10c0f7ce 100644 --- a/cde/lib/DtSearch/raima/findnm.c +++ b/cde/lib/DtSearch/raima/findnm.c @@ -58,13 +58,13 @@ DBN_DECL int set; char memp[MEMPSIZE]; DB_ADDR mem; - char FAR *recp; - DB_ADDR FAR *cm_ptr; - SET_ENTRY FAR *set_ptr; + char *recp; + DB_ADDR *cm_ptr; + SET_ENTRY *set_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); - if (nset_check(nset, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) + if (nset_check(nset, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) RETURN( db_status ); /* make sure we have a current owner */ @@ -76,7 +76,7 @@ DBN_DECL RETURN( d_findfm(nset TASK_PARM DBN_PARM) ); /* read current member of set and get member pointer from record */ - if ((dio_read(*cm_ptr, (char FAR * FAR *)&recp, NOPGHOLD) != S_OKAY) || + if ((dio_read(*cm_ptr, (char * *)&recp, NOPGHOLD) != S_OKAY) || (r_gmem(set, recp, memp) != S_OKAY)) RETURN( db_status ); diff --git a/cde/lib/DtSearch/raima/findpm.c b/cde/lib/DtSearch/raima/findpm.c index 26d94735..427aa0b0 100644 --- a/cde/lib/DtSearch/raima/findpm.c +++ b/cde/lib/DtSearch/raima/findpm.c @@ -58,13 +58,13 @@ DBN_DECL int set; char memp[MEMPSIZE]; DB_ADDR mem; - char FAR *recp; - DB_ADDR FAR *cm_ptr; - SET_ENTRY FAR *set_ptr; + char *recp; + DB_ADDR *cm_ptr; + SET_ENTRY *set_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); - if (nset_check(nset, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) + if (nset_check(nset, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) RETURN( db_status ); /* make sure we have a current owner */ @@ -76,7 +76,7 @@ DBN_DECL RETURN( d_findlm(nset TASK_PARM DBN_PARM) ); /* read current member of set and get member pointer from record */ - if ((dio_read(*cm_ptr, (char FAR * FAR *)&recp, NOPGHOLD) != S_OKAY) || + if ((dio_read(*cm_ptr, (char * *)&recp, NOPGHOLD) != S_OKAY) || (r_gmem(set, recp, memp) != S_OKAY)) RETURN( db_status ); diff --git a/cde/lib/DtSearch/raima/gtscm.c b/cde/lib/DtSearch/raima/gtscm.c index e6b9afe1..6920ffad 100644 --- a/cde/lib/DtSearch/raima/gtscm.c +++ b/cde/lib/DtSearch/raima/gtscm.c @@ -53,15 +53,15 @@ */ d_gtscm(set, timestamp TASK_PARM DBN_PARM) int set; -ULONG FAR *timestamp; +ULONG *timestamp; TASK_DECL DBN_DECL { - SET_ENTRY FAR *set_ptr; + SET_ENTRY *set_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_NOIO)); - if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) + if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) RETURN( db_status ); /* make sure we have a current member */ diff --git a/cde/lib/DtSearch/raima/gtsco.c b/cde/lib/DtSearch/raima/gtsco.c index 4e7fd7ed..575228f5 100644 --- a/cde/lib/DtSearch/raima/gtsco.c +++ b/cde/lib/DtSearch/raima/gtsco.c @@ -53,15 +53,15 @@ */ d_gtsco(set, timestamp TASK_PARM DBN_PARM) int set; -ULONG FAR *timestamp; +ULONG *timestamp; TASK_DECL DBN_DECL { - SET_ENTRY FAR *set_ptr; + SET_ENTRY *set_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_NOIO)); - if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) + if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) RETURN( db_status ); /* make sure we have a current owner */ diff --git a/cde/lib/DtSearch/raima/gtscr.c b/cde/lib/DtSearch/raima/gtscr.c index 5b4261b5..64999560 100644 --- a/cde/lib/DtSearch/raima/gtscr.c +++ b/cde/lib/DtSearch/raima/gtscr.c @@ -52,7 +52,7 @@ /* Get timestamp of current record */ d_gtscr(timestamp TASK_PARM) -ULONG FAR *timestamp; +ULONG *timestamp; TASK_DECL { DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(RECORD_NOIO)); diff --git a/cde/lib/DtSearch/raima/gtscs.c b/cde/lib/DtSearch/raima/gtscs.c index 0de6b814..c0465448 100644 --- a/cde/lib/DtSearch/raima/gtscs.c +++ b/cde/lib/DtSearch/raima/gtscs.c @@ -53,15 +53,15 @@ */ d_gtscs(set, timestamp TASK_PARM DBN_PARM) int set; -ULONG FAR *timestamp; +ULONG *timestamp; TASK_DECL DBN_DECL { - SET_ENTRY FAR *set_ptr; + SET_ENTRY *set_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_NOIO)); - if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) + if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) RETURN( db_status ); /* make sure we have a current owner */ diff --git a/cde/lib/DtSearch/raima/initial.c b/cde/lib/DtSearch/raima/initial.c index fb246402..8cf1b576 100644 --- a/cde/lib/DtSearch/raima/initial.c +++ b/cde/lib/DtSearch/raima/initial.c @@ -78,7 +78,7 @@ typedef union INIT_PAGE_U { } pg1; } INIT_PAGE; -typedef struct {union INIT_PAGE_U FAR *ptr; LOCK_DESC} INIT_PAGE_P; +typedef struct {union INIT_PAGE_U *ptr; LOCK_DESC} INIT_PAGE_P; static char nulls[5] = "\0\0\0\0"; static int dbfile; @@ -124,8 +124,8 @@ DBN_DECL F_ADDR addr; ULONG ts; INT rno, rec; - FILE_ENTRY FAR *file_ptr; - RECORD_ENTRY FAR *rec_ptr; + FILE_ENTRY *file_ptr; + RECORD_ENTRY *rec_ptr; time_t local_timestamp; LONG extern_timestamp; @@ -154,7 +154,7 @@ DBN_DECL if ((dbfile = DB_OPEN(file_ptr->ft_name, O_RDWR | O_CREAT | O_TRUNC)) < 0) RETURN( dberr(S_NOFILE) ); - page = (INIT_PAGE FAR *)ALLOC(&Page, file_ptr->ft_pgsize, "page"); + page = (INIT_PAGE *)ALLOC(&Page, file_ptr->ft_pgsize, "page"); if ( page == NULL ) RETURN( dberr(S_NOMEMORY) ); /*--------- Init PAGE 0 ---------*/ @@ -169,7 +169,7 @@ DBN_DECL page->pg0.dchain = htonl ((LONG) NONE); page->pg0.next = htonl (2); page->pg0.timestamp = 0; /* not really used by key file */ - DB_WRITE(dbfile, (char FAR *)page, (int)file_ptr->ft_pgsize); + DB_WRITE(dbfile, (char *)page, (int)file_ptr->ft_pgsize); /*--------- Write KEY FILE PAGE 1 ---------*/ byteset(page, '\0', file_ptr->ft_pgsize); @@ -179,7 +179,7 @@ DBN_DECL /* node 1, NONE page pointer */ addr = -1; bytecpy(page->pg1.init_addr, &addr, sizeof(F_ADDR)); - DB_WRITE(dbfile, (char FAR *)page, (int)file_ptr->ft_pgsize); + DB_WRITE(dbfile, (char *)page, (int)file_ptr->ft_pgsize); } else { /*--------- Init DATA PAGE 0 --------- @@ -194,7 +194,7 @@ DBN_DECL /*---Write special DATA FILE PAGE 0 for system record file ---*/ page->pg0.next = htonl (2); - DB_WRITE(dbfile, (char FAR *)page, (int)file_ptr->ft_pgsize); + DB_WRITE(dbfile, (char *)page, (int)file_ptr->ft_pgsize); /*--------- Write DATA FILE PAGE 1 for system record ---------*/ byteset(page, '\0', file_ptr->ft_pgsize); @@ -217,7 +217,7 @@ DBN_DECL bytecpy(page->pg1.init_crts, &ts, sizeof(ULONG)); bytecpy(page->pg1.init_upts, &ts, sizeof(ULONG)); } - DB_WRITE(dbfile, (char FAR *)page, (int)file_ptr->ft_pgsize); + DB_WRITE(dbfile, (char *)page, (int)file_ptr->ft_pgsize); break; } } @@ -227,7 +227,7 @@ DBN_DECL */ if (rec == size_rt) { page->pg0.next = htonl (1); - DB_WRITE(dbfile, (char FAR *)page, (int)file_ptr->ft_pgsize); + DB_WRITE(dbfile, (char *)page, (int)file_ptr->ft_pgsize); } } /* close database file */ diff --git a/cde/lib/DtSearch/raima/inittab.c b/cde/lib/DtSearch/raima/inittab.c index 62fd9c1f..30d5f405 100644 --- a/cde/lib/DtSearch/raima/inittab.c +++ b/cde/lib/DtSearch/raima/inittab.c @@ -103,8 +103,8 @@ inittab() char dbfile[DtSrFILENMLEN], dbd_ver[DBD_COMPAT_LEN + 1]; char dbname[FILENMLEN]; /* Temporary working space */ int dbf; - FILE_ENTRY FAR *file_ptr; - FIELD_ENTRY FAR *fld_ptr; + FILE_ENTRY *file_ptr; + FIELD_ENTRY *fld_ptr; #ifndef ONE_DB #define DB_ENABLE 1 #else @@ -116,13 +116,13 @@ inittab() #define TS_ENABLE 0 #endif #if DB_ENABLE | TS_ENABLE - RECORD_ENTRY FAR *rec_ptr; - SET_ENTRY FAR *set_ptr; + RECORD_ENTRY *rec_ptr; + SET_ENTRY *set_ptr; #endif #ifndef ONE_DB - MEMBER_ENTRY FAR *mem_ptr; - SORT_ENTRY FAR *srt_ptr; - KEY_ENTRY FAR *key_ptr; + MEMBER_ENTRY *mem_ptr; + SORT_ENTRY *srt_ptr; + KEY_ENTRY *key_ptr; #endif #ifndef NO_TIMESTAMP @@ -175,23 +175,23 @@ inittab() goodver: /* Read in database page size */ - DB_READ(dbf, (char FAR *)&DB_REF(Page_size), sizeof(INT)); + DB_READ(dbf, (char *)&DB_REF(Page_size), sizeof(INT)); NTOHS (DB_REF(Page_size)); /* Read in table sizes */ - DB_READ(dbf, (char FAR *)&DB_REF(Size_ft), sizeof(INT)); + DB_READ(dbf, (char *)&DB_REF(Size_ft), sizeof(INT)); NTOHS (DB_REF(Size_ft)); - DB_READ(dbf, (char FAR *)&DB_REF(Size_rt), sizeof(INT)); + DB_READ(dbf, (char *)&DB_REF(Size_rt), sizeof(INT)); NTOHS (DB_REF(Size_rt)); - DB_READ(dbf, (char FAR *)&DB_REF(Size_fd), sizeof(INT)); + DB_READ(dbf, (char *)&DB_REF(Size_fd), sizeof(INT)); NTOHS (DB_REF(Size_fd)); - DB_READ(dbf, (char FAR *)&DB_REF(Size_st), sizeof(INT)); + DB_READ(dbf, (char *)&DB_REF(Size_st), sizeof(INT)); NTOHS (DB_REF(Size_st)); - DB_READ(dbf, (char FAR *)&DB_REF(Size_mt), sizeof(INT)); + DB_READ(dbf, (char *)&DB_REF(Size_mt), sizeof(INT)); NTOHS (DB_REF(Size_mt)); - DB_READ(dbf, (char FAR *)&DB_REF(Size_srt), sizeof(INT)); + DB_READ(dbf, (char *)&DB_REF(Size_srt), sizeof(INT)); NTOHS (DB_REF(Size_srt)); - DB_READ(dbf, (char FAR *)&DB_REF(Size_kt), sizeof(INT)); + DB_READ(dbf, (char *)&DB_REF(Size_kt), sizeof(INT)); NTOHS (DB_REF(Size_kt)); close(dbf); /* end of PASS 1 */ @@ -278,7 +278,7 @@ goodver: DB_LSEEK(dbf, (off_t)(DBD_COMPAT_LEN + 8L*sizeof(INT)), 0); /*----------------- FILE TABLE -------------------*/ - DB_READ(dbf, (char FAR *)&file_table[ORIGIN(ft_offset)], + DB_READ(dbf, (char *)&file_table[ORIGIN(ft_offset)], (DB_REF(Size_ft)*sizeof(FILE_ENTRY))); /* Invalid if sizeof(xxxx_ENTRY) diff on each machine */ for ( i = 0, file_ptr = &file_table[ORIGIN(ft_offset)]; @@ -304,7 +304,7 @@ goodver: } /*----------------- RECORD TABLE -------------------*/ - DB_READ(dbf, (char FAR *)&record_table[ORIGIN(rt_offset)], + DB_READ(dbf, (char *)&record_table[ORIGIN(rt_offset)], (DB_REF(Size_rt)*sizeof(RECORD_ENTRY))); for ( i = 0, rec_ptr = &record_table[ORIGIN(rt_offset)]; i < DB_REF(Size_rt); @@ -332,7 +332,7 @@ goodver: } /*----------------- FIELD TABLE -------------------*/ - DB_READ(dbf, (char FAR *)&field_table[ORIGIN(fd_offset)], + DB_READ(dbf, (char *)&field_table[ORIGIN(fd_offset)], (DB_REF(Size_fd)*sizeof(FIELD_ENTRY))); for ( i = 0, fld_ptr = &field_table[ORIGIN(fd_offset)]; i < DB_REF(Size_fd); @@ -371,7 +371,7 @@ goodver: } /*----------------- SET TABLE -------------------*/ - DB_READ(dbf, (char FAR *)&set_table[ORIGIN(st_offset)], + DB_READ(dbf, (char *)&set_table[ORIGIN(st_offset)], (DB_REF(Size_st)*sizeof(SET_ENTRY))); for ( i = 0, set_ptr = &set_table[ORIGIN(st_offset)]; i < DB_REF(Size_st); @@ -399,7 +399,7 @@ goodver: } /*----------------- MEMBER TABLE -------------------*/ - DB_READ(dbf, (char FAR *)&member_table[ORIGIN(mt_offset)], + DB_READ(dbf, (char *)&member_table[ORIGIN(mt_offset)], (DB_REF(Size_mt)*sizeof(MEMBER_ENTRY))); for ( i = 0, mem_ptr = &member_table[ORIGIN(mt_offset)]; i < DB_REF(Size_mt); @@ -424,7 +424,7 @@ goodver: } - DB_READ(dbf, (char FAR *)&sort_table[ORIGIN(srt_offset)], + DB_READ(dbf, (char *)&sort_table[ORIGIN(srt_offset)], (DB_REF(Size_srt)*sizeof(SORT_ENTRY))); /* Member sort tables not used by DtSearch @@@ */ if (DB_REF(Size_srt)) { @@ -434,7 +434,7 @@ goodver: NTOHS (srt_ptr->se_set); } - DB_READ(dbf, (char FAR *)&key_table[ORIGIN(kt_offset)], + DB_READ(dbf, (char *)&key_table[ORIGIN(kt_offset)], (DB_REF(Size_kt)*sizeof(KEY_ENTRY))); /* Compound key tables not used by DtSearch @@@ */ if (DB_REF(Size_kt)) { @@ -578,7 +578,7 @@ static int alloc_dict() int new_size; int extra_file = 0; #ifndef ONE_DB - DB_ENTRY FAR *db_ptr; + DB_ENTRY *db_ptr; #endif /* allocate and initialize file_table */ @@ -682,9 +682,9 @@ static int initcurr() { int dbt_lc; /* loop control */ int rec, i; - RECORD_ENTRY FAR *rec_ptr; - SET_ENTRY FAR *set_ptr; - DB_ADDR FAR *co_ptr; + RECORD_ENTRY *rec_ptr; + SET_ENTRY *set_ptr; + DB_ADDR *co_ptr; int old_size; int new_size; diff --git a/cde/lib/DtSearch/raima/inittab.h b/cde/lib/DtSearch/raima/inittab.h index 54ed576a..4c2b5013 100644 --- a/cde/lib/DtSearch/raima/inittab.h +++ b/cde/lib/DtSearch/raima/inittab.h @@ -67,7 +67,7 @@ int db_status = 0; /* database dictionary tables */ INT largest_page = 0; -char FAR *crloc = NULL; +char *crloc = NULL; #ifndef ONE_DB INT old_size_ft = 0; diff --git a/cde/lib/DtSearch/raima/ismember.c b/cde/lib/DtSearch/raima/ismember.c index c8dc3585..1f0e4f28 100644 --- a/cde/lib/DtSearch/raima/ismember.c +++ b/cde/lib/DtSearch/raima/ismember.c @@ -57,11 +57,11 @@ TASK_DECL DBN_DECL /* database number */ { char crmp[MEMPSIZE]; /* current record's member pointer */ - SET_ENTRY FAR *set_ptr; + SET_ENTRY *set_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); - if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) + if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) RETURN( db_status ); /* Make sure we have a current record */ @@ -69,7 +69,7 @@ DBN_DECL /* database number */ RETURN( dberr(S_NOCR) ); /* Read current record and check connection */ - if ((dio_read( curr_rec, (char FAR * FAR *)&crloc , NOPGHOLD) == S_OKAY) && + if ((dio_read( curr_rec, (char * *)&crloc , NOPGHOLD) == S_OKAY) && (r_gmem(set, crloc, crmp) == S_OKAY) && null_dba(crmp + MP_OWNER)) db_status = S_EOS; /* end-of-set if curr rec not owned */ diff --git a/cde/lib/DtSearch/raima/isowner.c b/cde/lib/DtSearch/raima/isowner.c index c4d608bc..e2441efd 100644 --- a/cde/lib/DtSearch/raima/isowner.c +++ b/cde/lib/DtSearch/raima/isowner.c @@ -57,11 +57,11 @@ TASK_DECL DBN_DECL /* database number */ { char crsp[SETPSIZE]; /* current record's set pointer */ - SET_ENTRY FAR *set_ptr; + SET_ENTRY *set_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); - if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) + if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) RETURN( db_status ); /* Make sure we have a current record */ @@ -69,7 +69,7 @@ DBN_DECL /* database number */ RETURN( dberr(S_NOCR) ); /* Read current record and check for members */ - if ((dio_read( curr_rec, (char FAR * FAR *)&crloc, NOPGHOLD) == S_OKAY) && + if ((dio_read( curr_rec, (char * *)&crloc, NOPGHOLD) == S_OKAY) && (r_gset(set, crloc, crsp) == S_OKAY) && null_dba(crsp + SP_FIRST)) db_status = S_EOS; /* end-of-set if curr rec not owner */ diff --git a/cde/lib/DtSearch/raima/keydel.c b/cde/lib/DtSearch/raima/keydel.c index e1a82bd5..83c9ce1d 100644 --- a/cde/lib/DtSearch/raima/keydel.c +++ b/cde/lib/DtSearch/raima/keydel.c @@ -61,16 +61,16 @@ DBN_DECL /* database number */ { int fld; /* field number */ int rec, rn; /* record type of current record */ - char FAR *rptr; /* pointer to current record */ - CONST char FAR *fptr; /* pointer to field contents */ + char *rptr; /* pointer to current record */ + CONST char *fptr; /* pointer to field contents */ char ckey[256]; /* compound key data */ int stat; - RECORD_ENTRY FAR *rec_ptr; - FIELD_ENTRY FAR *fld_ptr; + RECORD_ENTRY *rec_ptr; + FIELD_ENTRY *fld_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO)); - if (nfld_check(field, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY) + if (nfld_check(field, &rec, &fld, (RECORD_ENTRY * *)&rec_ptr, (FIELD_ENTRY * *)&fld_ptr) != S_OKAY) RETURN( db_status ); /* ensure current record is valid for this field */ @@ -84,7 +84,7 @@ DBN_DECL /* database number */ RETURN( dberr(S_NOTOPTKEY) ); /* read current record */ - if ( (stat = dio_read(curr_rec, (char FAR * FAR *)&rptr, PGHOLD)) == S_OKAY ) { + if ( (stat = dio_read(curr_rec, (char * *)&rptr, PGHOLD)) == S_OKAY ) { /* Make sure that the key has been stored */ if ( r_tstopt( fld_ptr, rptr ) == S_OKAY ) { if ( dio_release( curr_rec ) != S_OKAY ) diff --git a/cde/lib/DtSearch/raima/keyexist.c b/cde/lib/DtSearch/raima/keyexist.c index a64365c8..e053e4c3 100644 --- a/cde/lib/DtSearch/raima/keyexist.c +++ b/cde/lib/DtSearch/raima/keyexist.c @@ -53,14 +53,14 @@ DBN_DECL /* database number */ { int fld; /* field number */ int rec, rn; /* record type of current record */ - char FAR *rptr; /* pointer to current record */ + char *rptr; /* pointer to current record */ int stat; - RECORD_ENTRY FAR *rec_ptr; - FIELD_ENTRY FAR *fld_ptr; + RECORD_ENTRY *rec_ptr; + FIELD_ENTRY *fld_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO)); - if (nfld_check(field, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY) + if (nfld_check(field, &rec, &fld, (RECORD_ENTRY * *)&rec_ptr, (FIELD_ENTRY * *)&fld_ptr) != S_OKAY) RETURN( db_status ); /* ensure current record is valid for this field */ @@ -74,7 +74,7 @@ DBN_DECL /* database number */ RETURN( dberr(S_NOTOPTKEY) ); /* read current record */ - if ( (stat = dio_read(curr_rec, (char FAR * FAR *)&rptr, NOPGHOLD)) == S_OKAY ) { + if ( (stat = dio_read(curr_rec, (char * *)&rptr, NOPGHOLD)) == S_OKAY ) { /* Check the bit map and return S_OKAY if already stored, else S_NOTFOUND */ if ((stat = r_tstopt(fld_ptr, rptr)) == S_OKAY) diff --git a/cde/lib/DtSearch/raima/keyfcns.c b/cde/lib/DtSearch/raima/keyfcns.c index 14fec477..439a6e29 100644 --- a/cde/lib/DtSearch/raima/keyfcns.c +++ b/cde/lib/DtSearch/raima/keyfcns.c @@ -114,24 +114,24 @@ typedef struct { #define KEYREPOS 3 /* Internal function prototypes */ -static int node_search(P1(CONST char FAR *) Pi(DB_ADDR FAR *) - Pi(NODE FAR *) Pi(int *) Pi(int *) +static int node_search(P1(CONST char *) Pi(DB_ADDR *) + Pi(NODE *) Pi(int *) Pi(int *) Pi(F_ADDR *)); -static int keycmp(P1(CONST char FAR *) Pi(KEY_SLOT FAR *) - Pi(DB_ADDR FAR *)); -static int expand(P1(CONST char FAR *) Pi(DB_ADDR) Pi(F_ADDR)); -static int split_root(P1(NODE FAR *)); -static int split_node(P1(F_ADDR) Pi(NODE FAR *)); +static int keycmp(P1(CONST char *) Pi(KEY_SLOT *) + Pi(DB_ADDR *)); +static int expand(P1(CONST char *) Pi(DB_ADDR) Pi(F_ADDR)); +static int split_root(P1(NODE *)); +static int split_node(P1(F_ADDR) Pi(NODE *)); static int delete(P0); -static void open_slots(P1(NODE FAR *) Pi(int) Pi(int)); -static void close_slots(P1(NODE FAR *) Pi(int) Pi(int)); +static void open_slots(P1(NODE *) Pi(int) Pi(int)); +static void close_slots(P1(NODE *) Pi(int) Pi(int)); static void key_found(P1(DB_ADDR *)); #ifdef ONE_DB #define prefix keyno #endif -static KEY_INFO FAR *curkey; +static KEY_INFO *curkey; static int key_len; static int key_data; static int slot_len; @@ -139,7 +139,7 @@ static int max_slots; static int mid_slot; static int keyfile; static INT fldno; -static FIELD_ENTRY FAR *cfld_ptr; +static FIELD_ENTRY *cfld_ptr; static INT keyno; #ifndef ONE_DB static INT prefix; @@ -156,9 +156,9 @@ key_open() long t; /* total keys thru level l */ int l; /* level number */ int i; /* field subscript */ - FIELD_ENTRY FAR *fld_ptr; - KEY_INFO FAR *ki_ptr; - FILE_ENTRY FAR *file_ptr; + FIELD_ENTRY *fld_ptr; + KEY_INFO *ki_ptr; + FILE_ENTRY *file_ptr; /* child ptr key number */ key_data = sizeof(F_ADDR) + sizeof(INT); @@ -173,7 +173,7 @@ key_open() if ( no_of_keys ) { key_info = /* Macro references must be on one line for some compilers */ - (KEY_INFO FAR *) + (KEY_INFO *) ALLOC(&db_global.Key_info, no_of_keys*sizeof(KEY_INFO), "key_info"); if ( ! key_info ) return( dberr(S_NOMEMORY) ); @@ -198,7 +198,7 @@ key_open() t *= file_ptr->ft_slots; ki_ptr->max_lvls = ++l; ki_ptr->node_path = - (NODE_PATH FAR *) + (NODE_PATH *) ALLOC(&ki_ptr->Node_path, l*sizeof(NODE_PATH), db_avname); if ( ! ki_ptr->node_path ) return( dberr(S_NOMEMORY) ); @@ -217,7 +217,7 @@ key_open() void key_close() { int k; - KEY_INFO FAR *ki_ptr; + KEY_INFO *ki_ptr; if ( key_info ) { /* free memory allocated for key functions */ @@ -239,8 +239,8 @@ int key_init(field ) int field; /* field number to be processed */ { - FIELD_ENTRY FAR *fld_ptr; - FILE_ENTRY FAR *file_ptr; + FIELD_ENTRY *fld_ptr; + FILE_ENTRY *file_ptr; fld_ptr = &field_table[field]; if ( fld_ptr->fd_key == NOKEY ) @@ -274,7 +274,7 @@ key_reset(fno ) FILE_NO fno; { int i; - KEY_INFO FAR *ki_ptr; + KEY_INFO *ki_ptr; for (i = 0, ki_ptr = key_info; i < no_of_keys; ++i, ++ki_ptr) { if (((fno == size_ft) || (ki_ptr->keyfile == fno)) && @@ -290,17 +290,17 @@ FILE_NO fno; */ int key_locpos(key_val, dba) -CONST char FAR *key_val; /* key search value */ -DB_ADDR FAR *dba; /* database address of located key */ +CONST char *key_val; /* key search value */ +DB_ADDR *dba; /* database address of located key */ { - NODE FAR *node; /* pointer to current node */ + NODE *node; /* pointer to current node */ F_ADDR child; /* page number of child node */ F_ADDR pg; /* page number of current node */ int stat; /* saves node search status */ int slot, slot_pos; int match_lvl; /* lowest level with duplicate key */ - NODE_PATH FAR *np_ptr; - char FAR *node_slot_ptr; + NODE_PATH *np_ptr; + char *node_slot_ptr; match_lvl = -1; MEM_LOCK(&curkey->Node_path); @@ -308,7 +308,7 @@ DB_ADDR FAR *dba; /* database address of located key */ TRUE; ++curkey->level, ++np_ptr, pg = child) { /* read in next node */ - if ( dio_get(pg, (char FAR * FAR *)&node, NOPGHOLD) != S_OKAY ) { + if ( dio_get(pg, (char * *)&node, NOPGHOLD) != S_OKAY ) { MEM_UNLOCK(&curkey->Node_path); return( db_status ); } @@ -382,15 +382,15 @@ DB_ADDR FAR *dba; /* database address of located key */ */ static int node_search(key_val, dba, node, slotno, slot_offset, child) -CONST char FAR *key_val; /* key being searched */ -DB_ADDR FAR *dba; /* database address included in comparison if not null */ -NODE FAR *node; /* node being searched */ +CONST char *key_val; /* key being searched */ +DB_ADDR *dba; /* database address included in comparison if not null */ +NODE *node; /* node being searched */ int *slotno; /* slot number of key position in node */ int *slot_offset; /* slot position offset */ F_ADDR *child; /* child ptr of located key */ { int cmp, i, l, u, slot_pos; - char FAR *node_slot_ptr; + char *node_slot_ptr; /* perform binary search on node */ l = 0; @@ -398,13 +398,13 @@ F_ADDR *child; /* child ptr of located key */ while ( u >= l ) { i = (l + u)/2; node_slot_ptr = &node->slots[slot_pos = i*slot_len]; - if ( (cmp = keycmp(key_val, (KEY_SLOT FAR *)node_slot_ptr, dba)) < 0 ) + if ( (cmp = keycmp(key_val, (KEY_SLOT *)node_slot_ptr, dba)) < 0 ) u = i - 1; else if ( cmp > 0 ) l = i + 1; else if ( i && !unique && !dba ) { /* backup to lowest duplicate in node */ - while (keycmp(key_val, (KEY_SLOT FAR *)(node_slot_ptr -= slot_len), + while (keycmp(key_val, (KEY_SLOT *)(node_slot_ptr -= slot_len), dba) == 0) { slot_pos -= slot_len; if (--i == 0) goto have_slot; @@ -436,9 +436,9 @@ have_slot: /* Compare key value */ static int keycmp(key_val, slot, dba) -CONST char FAR *key_val; /* key value */ -KEY_SLOT FAR *slot; /* pointer to key slot to be compared */ -DB_ADDR FAR *dba; /* database address included in comparison if not null */ +CONST char *key_val; /* key value */ +KEY_SLOT *slot; /* pointer to key slot to be compared */ +DB_ADDR *dba; /* database address included in comparison if not null */ { /* returns < 0 if key_val < slot @@ -447,10 +447,10 @@ DB_ADDR FAR *dba; /* database address included in comparison if not null */ */ int cmp; - if (((cmp = INTcmp((char FAR *)&prefix, (char FAR *)&slot->keyno)) == 0) && + if (((cmp = INTcmp((char *)&prefix, (char *)&slot->keyno)) == 0) && ((cmp = fldcmp(cfld_ptr, key_val, slot->data)) == 0) && dba) - cmp = ADDRcmp(dba, (DB_ADDR FAR *)&slot->data[key_len]); + cmp = ADDRcmp(dba, (DB_ADDR *)&slot->data[key_len]); return( cmp ); } @@ -464,9 +464,9 @@ int fcn; /* next or prev */ DB_ADDR *dba; /* db address of scanned record */ { F_ADDR child; - NODE FAR *node; - NODE_PATH FAR *np_ptr; - char FAR *node_slot_ptr; + NODE *node; + NODE_PATH *np_ptr; + char *node_slot_ptr; /* locate next key on file */ switch ( curkey->lstat ) { @@ -488,7 +488,7 @@ DB_ADDR *dba; /* db address of scanned record */ } MEM_LOCK(&curkey->Node_path); np_ptr = &curkey->node_path[curkey->level]; - if (dio_get(np_ptr->node, (char FAR * FAR *)&node, NOPGHOLD) != S_OKAY) { + if (dio_get(np_ptr->node, (char * *)&node, NOPGHOLD) != S_OKAY) { MEM_UNLOCK(&curkey->Node_path); return( db_status ); } @@ -509,7 +509,7 @@ DB_ADDR *dba; /* db address of scanned record */ } --curkey->level; node_slot_ptr = NULL; - if (dio_get((--np_ptr)->node, (char FAR * FAR *)&node, + if (dio_get((--np_ptr)->node, (char * *)&node, NOPGHOLD) != S_OKAY) { MEM_UNLOCK(&curkey->Node_path); return( db_status ); @@ -521,7 +521,7 @@ DB_ADDR *dba; /* db address of scanned record */ node_slot_ptr = &node->slots[np_ptr->slot*slot_len]; } else do { /* move down to leaf node */ - if ( dio_get(child, (char FAR * FAR *)&node, NOPGHOLD) != S_OKAY ) { + if ( dio_get(child, (char * *)&node, NOPGHOLD) != S_OKAY ) { MEM_UNLOCK(&curkey->Node_path); return( db_status ); } @@ -582,13 +582,13 @@ int fcn; /* KEYFRST or KEYLAST */ DB_ADDR *dba; /* to get dba of first or last key */ { F_ADDR pg; /* node number */ - NODE FAR *node; /* pointer to node contents in cache */ + NODE *node; /* pointer to node contents in cache */ int cmp; /* keycmp result */ int match_lvl; /* lowest level containing matched key */ int lvl; /* node_path level variable */ int slot; /* slot position in node */ - NODE_PATH FAR *np_ptr; - char FAR *node_slot_ptr; + NODE_PATH *np_ptr; + char *node_slot_ptr; if ( fcn == KEYFIND ) { curkey->lstat = KEYINIT; @@ -602,7 +602,7 @@ DB_ADDR *dba; /* to get dba of first or last key */ MEM_LOCK(&curkey->Node_path); for (lvl = 0; TRUE; ++lvl) { /* read next node */ - if ( dio_get(pg, (char FAR * FAR *)&node, NOPGHOLD) != S_OKAY ) { + if ( dio_get(pg, (char * *)&node, NOPGHOLD) != S_OKAY ) { MEM_UNLOCK(&curkey->Node_path); return( db_status ); } @@ -616,8 +616,8 @@ DB_ADDR *dba; /* to get dba of first or last key */ for (slot = 0, node_slot_ptr = node->slots; slot < node->used_slots; ++slot, node_slot_ptr += slot_len) { - if ((cmp = INTcmp((char FAR *)&prefix, - (char FAR *)(node_slot_ptr + sizeof(F_ADDR)))) <= 0) + if ((cmp = INTcmp((char *)&prefix, + (char *)(node_slot_ptr + sizeof(F_ADDR)))) <= 0) break; } } @@ -626,8 +626,8 @@ DB_ADDR *dba; /* to get dba of first or last key */ node_slot_ptr = &node->slots[slot*slot_len]; slot >= 0; --slot, node_slot_ptr -= slot_len) { - if ((cmp = INTcmp((char FAR *)&prefix, - (char FAR *)(node_slot_ptr + sizeof(F_ADDR)))) >= 0) + if ((cmp = INTcmp((char *)&prefix, + (char *)(node_slot_ptr + sizeof(F_ADDR)))) >= 0) break; } } @@ -669,7 +669,7 @@ DB_ADDR *dba; /* to get dba of first or last key */ int key_insert(fld, key_val, dba ) int fld; /* key field number */ -CONST char FAR *key_val; /* key value */ +CONST char *key_val; /* key value */ DB_ADDR dba; /* record's database address */ { int stat; @@ -703,20 +703,20 @@ DB_ADDR dba; /* record's database address */ /* Expand node for new key */ static int expand(key_val, dba, brother ) -CONST char FAR *key_val; /* key value */ +CONST char *key_val; /* key value */ DB_ADDR dba; /* record's database address */ F_ADDR brother; /* page number of brother node */ { F_ADDR pg; - NODE FAR *node; - NODE_PATH FAR *np_ptr; + NODE *node; + NODE_PATH *np_ptr; int slot_pos; - char FAR *node_slot_ptr; + char *node_slot_ptr; MEM_LOCK(&curkey->Node_path); np_ptr = &curkey->node_path[curkey->level]; - if (dio_get(pg = np_ptr->node, (char FAR * FAR *)&node, PGHOLD) != S_OKAY) { + if (dio_get(pg = np_ptr->node, (char * *)&node, PGHOLD) != S_OKAY) { MEM_UNLOCK(&curkey->Node_path); return( db_status ); } @@ -764,13 +764,13 @@ F_ADDR brother; /* page number of brother node */ */ static int split_node(l_pg, l_node ) F_ADDR l_pg; /* left node's page number */ -NODE FAR *l_node; /* left node buffer */ +NODE *l_node; /* left node buffer */ { F_ADDR r_pg; - NODE FAR *r_node; + NODE *r_node; char key_val[256]; DB_ADDR dba; - char FAR *l_node_slot_ptr; + char *l_node_slot_ptr; /* extract middle key */ l_node_slot_ptr = &l_node->slots[mid_slot*slot_len]; @@ -789,7 +789,7 @@ NODE FAR *l_node; /* left node buffer */ /* allocate new right node */ if ((dio_pzalloc(keyfile, &r_pg) != S_OKAY) || - (dio_get(r_pg, (char FAR * FAR *)&r_node, PGHOLD) != S_OKAY)) + (dio_get(r_pg, (char * *)&r_node, PGHOLD) != S_OKAY)) return( db_status ); /* copy slots from left node at slot mid_slot+1 into right node */ @@ -810,18 +810,18 @@ NODE FAR *l_node; /* left node buffer */ /* Split root node */ static int split_root(node ) -NODE FAR *node; +NODE *node; { F_ADDR l_pg, r_pg; - NODE FAR *l_node, FAR *r_node; + NODE *l_node, *r_node; int slot_pos; - char FAR *node_slot_ptr; + char *node_slot_ptr; /* allocate two new nodes */ if ((dio_pzalloc(keyfile, &l_pg) != S_OKAY) || (dio_pzalloc(keyfile, &r_pg) != S_OKAY) || - (dio_get(l_pg, (char FAR * FAR *)&l_node, PGHOLD) != S_OKAY) || - (dio_get(r_pg, (char FAR * FAR *)&r_node, PGHOLD) != S_OKAY)) + (dio_get(l_pg, (char * *)&l_node, PGHOLD) != S_OKAY) || + (dio_get(r_pg, (char * *)&r_node, PGHOLD) != S_OKAY)) return( db_status ); /* copy 0..max_slots/2-1 keys from root into left node */ @@ -860,7 +860,7 @@ NODE FAR *node; int key_delete(fld, key_val, dba ) int fld; -char CONST FAR *key_val; +char CONST *key_val; DB_ADDR dba; { int stat; @@ -891,22 +891,22 @@ DB_ADDR dba; static int delete() { F_ADDR pg, p_pg, l_pg, r_pg; - NODE FAR *node; - NODE FAR *p_node; - NODE FAR *l_node; - NODE FAR *r_node; + NODE *node; + NODE *p_node; + NODE *l_node; + NODE *r_node; int amt, slot_pos; - NODE_PATH FAR *np_ptr; - char FAR *node_slot_ptr; - char FAR *p_node_slot_ptr; - char FAR *l_node_slot_ptr; - char FAR *r_node_slot_ptr; + NODE_PATH *np_ptr; + char *node_slot_ptr; + char *p_node_slot_ptr; + char *l_node_slot_ptr; + char *r_node_slot_ptr; MEM_LOCK(&curkey->Node_path); np_ptr = &curkey->node_path[curkey->level]; /* read node containing key to be deleted */ - if (dio_get(pg = np_ptr->node, (char FAR * FAR *)&node, PGHOLD) != S_OKAY) { + if (dio_get(pg = np_ptr->node, (char * *)&node, PGHOLD) != S_OKAY) { MEM_UNLOCK(&curkey->Node_path); return( db_status ); } @@ -919,7 +919,7 @@ static int delete() /* find leftmost descendent of right sub-tree */ ++np_ptr->slot; do { - if ( dio_get(r_pg, (char FAR * FAR *)&r_node, NOPGHOLD) != S_OKAY ) { + if ( dio_get(r_pg, (char * *)&r_node, NOPGHOLD) != S_OKAY ) { MEM_UNLOCK(&curkey->Node_path); return( db_status ); } @@ -940,7 +940,7 @@ static int delete() /* (this is more efficient than a recursive call) */ slot_pos = 0; node_slot_ptr = node->slots; - if (dio_get(pg = np_ptr->node, (char FAR * FAR *)&node, PGHOLD) != S_OKAY) { + if (dio_get(pg = np_ptr->node, (char * *)&node, PGHOLD) != S_OKAY) { MEM_UNLOCK(&curkey->Node_path); return( db_status ); } @@ -951,7 +951,7 @@ shrink: /* delete key from leaf (shrink node ) */ /* check if necessary to adjust nodes */ if ((curkey->level > 0) && (node->used_slots < mid_slot)) { /* read in parent node */ - if (dio_get(p_pg = (np_ptr - 1)->node, (char FAR * FAR *)&p_node, + if (dio_get(p_pg = (np_ptr - 1)->node, (char * *)&p_node, PGHOLD) != S_OKAY) { MEM_UNLOCK(&curkey->Node_path); return( db_status ); @@ -970,7 +970,7 @@ shrink: /* delete key from leaf (shrink node ) */ /* read left node */ p_node_slot_ptr = &p_node->slots[slot_pos]; bytecpy(&l_pg, p_node_slot_ptr, sizeof(F_ADDR)); - if ( dio_get(l_pg, (char FAR * FAR *)&l_node, PGHOLD) != S_OKAY ) { + if ( dio_get(l_pg, (char * *)&l_node, PGHOLD) != S_OKAY ) { MEM_UNLOCK(&curkey->Node_path); return( db_status ); } @@ -983,7 +983,7 @@ shrink: /* delete key from leaf (shrink node ) */ /* read right node */ p_node_slot_ptr = &p_node->slots[slot_pos + slot_len]; bytecpy(&r_pg, p_node_slot_ptr, sizeof(F_ADDR)); - if (dio_get(r_pg, (char FAR * FAR *)&r_node, PGHOLD) != S_OKAY) { + if (dio_get(r_pg, (char * *)&r_node, PGHOLD) != S_OKAY) { MEM_UNLOCK(&curkey->Node_path); return( db_status ); } @@ -1103,11 +1103,11 @@ shrink: /* delete key from leaf (shrink node ) */ /* Open n slots in node */ static void open_slots(node, slot_pos, n) -NODE FAR *node; +NODE *node; int slot_pos; int n; { - char FAR *dst, FAR *src; + char *dst, *src; int amt, w, nw; nw = NODE_WIDTH(node); @@ -1126,11 +1126,11 @@ int n; /* Close n slots in node */ static void close_slots(node, slot_pos, n) -NODE FAR *node; +NODE *node; int slot_pos; int n; { - char FAR *dst, FAR *src; + char *dst, *src; int w, amt; node->used_slots -= n; @@ -1150,7 +1150,7 @@ int n; */ int d_keyread(key_val TASK_PARM) -char FAR *key_val; +char *key_val; TASK_DECL { int kt_lc; /* loop control */ @@ -1158,10 +1158,10 @@ TASK_DECL float fv; double dv; #endif - char FAR *fptr; - char FAR *kptr; - FIELD_ENTRY FAR *fld_ptr; - KEY_ENTRY FAR *key_ptr; + char *fptr; + char *kptr; + FIELD_ENTRY *fld_ptr; + KEY_ENTRY *key_ptr; DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(RECORD_IO)); @@ -1226,8 +1226,8 @@ TASK_DECL int key_bldcom(fld, rec, key, cflag ) int fld; /* compound key field number */ -char FAR *rec; /* ptr to record data */ -char FAR *key; /* ptr to array to recv constructed key */ +char *rec; /* ptr to record data */ +char *key; /* ptr to array to recv constructed key */ int cflag; /* TRUE to compliment compound descending keys */ { int kt_lc; /* loop control */ @@ -1235,9 +1235,9 @@ int cflag; /* TRUE to compliment compound descending keys */ float fv; double dv; #endif - char FAR *fptr; - FIELD_ENTRY FAR *fld_ptr, FAR *kfld_ptr; - KEY_ENTRY FAR *key_ptr; + char *fptr; + FIELD_ENTRY *fld_ptr, *kfld_ptr; + KEY_ENTRY *key_ptr; /* clear key area */ fld_ptr = &field_table[fld]; @@ -1289,8 +1289,8 @@ int cflag; /* TRUE to compliment compound descending keys */ /* Complement and copy bytes */ void key_cmpcpy(s1, s2, n) -char FAR *s1; -char FAR *s2; +char *s1; +char *s2; INT n; { while ( n-- ) { diff --git a/cde/lib/DtSearch/raima/keyfind.c b/cde/lib/DtSearch/raima/keyfind.c index be3819ae..8e2dcb7b 100644 --- a/cde/lib/DtSearch/raima/keyfind.c +++ b/cde/lib/DtSearch/raima/keyfind.c @@ -51,27 +51,27 @@ #include "dbtype.h" /* Internal function prototypes */ -static void chk_desc_key(P1(int) Pi(FIELD_ENTRY FAR *) - Pi(CONST char FAR *) Pi(char FAR *)); +static void chk_desc_key(P1(int) Pi(FIELD_ENTRY *) + Pi(CONST char *) Pi(char *)); /* Find record thru key field */ int d_keyfind(field, fldval TASK_PARM DBN_PARM) long field; /* field constant */ -CONST char FAR *fldval; /* value of the data field */ +CONST char *fldval; /* value of the data field */ TASK_DECL DBN_DECL /* database number */ { int fld, rec; DB_ADDR dba; - RECORD_ENTRY FAR *rec_ptr; - FIELD_ENTRY FAR *fld_ptr; + RECORD_ENTRY *rec_ptr; + FIELD_ENTRY *fld_ptr; char ckey[256]; DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO)); - if ((nfld_check(field, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY) || + if ((nfld_check(field, &rec, &fld, (RECORD_ENTRY * *)&rec_ptr, (FIELD_ENTRY * *)&fld_ptr) != S_OKAY) || /* initialize key function operation */ (key_init(fld) != S_OKAY)) RETURN( db_status ); @@ -104,26 +104,26 @@ DBN_DECL /* database number */ */ static void chk_desc_key(fld, fld_ptr, fldval, ckey) int fld; -FIELD_ENTRY FAR *fld_ptr; -CONST char FAR *fldval; -char FAR *ckey; +FIELD_ENTRY *fld_ptr; +CONST char *fldval; +char *ckey; { int kt_lc; /* loop control */ #ifndef NO_FLOAT float fv; double dv; #endif - char FAR *fptr; - char FAR *tptr; - FIELD_ENTRY FAR *kfld_ptr; - KEY_ENTRY FAR *key_ptr; + char *fptr; + char *tptr; + FIELD_ENTRY *kfld_ptr; + KEY_ENTRY *key_ptr; /* complement descending compound key values */ for (kt_lc = size_kt - fld_ptr->fd_ptr, key_ptr = &key_table[fld_ptr->fd_ptr]; (--kt_lc >= 0) && (key_ptr->kt_key == fld); ++key_ptr) { kfld_ptr = &field_table[key_ptr->kt_field]; - fptr = (char FAR *)fldval + key_ptr->kt_ptr; + fptr = (char *)fldval + key_ptr->kt_ptr; tptr = ckey + key_ptr->kt_ptr; if ( key_ptr->kt_sort == 'd' ) { switch ( kfld_ptr->fd_type ) { diff --git a/cde/lib/DtSearch/raima/keyfrst.c b/cde/lib/DtSearch/raima/keyfrst.c index 7890c715..efff50c9 100644 --- a/cde/lib/DtSearch/raima/keyfrst.c +++ b/cde/lib/DtSearch/raima/keyfrst.c @@ -58,12 +58,12 @@ DBN_DECL /* database number */ { int fld, rec; DB_ADDR dba; - RECORD_ENTRY FAR *rec_ptr; - FIELD_ENTRY FAR *fld_ptr; + RECORD_ENTRY *rec_ptr; + FIELD_ENTRY *fld_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO)); - if ((nfld_check(field, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY) || + if ((nfld_check(field, &rec, &fld, (RECORD_ENTRY * *)&rec_ptr, (FIELD_ENTRY * *)&fld_ptr) != S_OKAY) || /* initialize key function operation */ (key_init(fld) != S_OKAY)) RETURN( db_status ); diff --git a/cde/lib/DtSearch/raima/keylast.c b/cde/lib/DtSearch/raima/keylast.c index 8f924fb1..94e6b9ad 100644 --- a/cde/lib/DtSearch/raima/keylast.c +++ b/cde/lib/DtSearch/raima/keylast.c @@ -58,12 +58,12 @@ DBN_DECL /* database number */ { int fld, rec; DB_ADDR dba; - RECORD_ENTRY FAR *rec_ptr; - FIELD_ENTRY FAR *fld_ptr; + RECORD_ENTRY *rec_ptr; + FIELD_ENTRY *fld_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO)); - if ((nfld_check(field, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY) || + if ((nfld_check(field, &rec, &fld, (RECORD_ENTRY * *)&rec_ptr, (FIELD_ENTRY * *)&fld_ptr) != S_OKAY) || /* initialize key function operation */ (key_init(fld) != S_OKAY)) RETURN( db_status ); diff --git a/cde/lib/DtSearch/raima/keynext.c b/cde/lib/DtSearch/raima/keynext.c index 8f04edac..ebd5abdc 100644 --- a/cde/lib/DtSearch/raima/keynext.c +++ b/cde/lib/DtSearch/raima/keynext.c @@ -59,12 +59,12 @@ DBN_DECL /* database number */ { int fld, rec; DB_ADDR dba; - RECORD_ENTRY FAR *rec_ptr; - FIELD_ENTRY FAR *fld_ptr; + RECORD_ENTRY *rec_ptr; + FIELD_ENTRY *fld_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO)); - if ((nfld_check(field, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY) || + if ((nfld_check(field, &rec, &fld, (RECORD_ENTRY * *)&rec_ptr, (FIELD_ENTRY * *)&fld_ptr) != S_OKAY) || /* initialize key function operation */ (key_init(fld) != S_OKAY)) RETURN( db_status ); diff --git a/cde/lib/DtSearch/raima/keyprev.c b/cde/lib/DtSearch/raima/keyprev.c index 86cdd25c..bafc10a4 100644 --- a/cde/lib/DtSearch/raima/keyprev.c +++ b/cde/lib/DtSearch/raima/keyprev.c @@ -59,12 +59,12 @@ DBN_DECL /* database number */ { int fld, rec; DB_ADDR dba; - RECORD_ENTRY FAR *rec_ptr; - FIELD_ENTRY FAR *fld_ptr; + RECORD_ENTRY *rec_ptr; + FIELD_ENTRY *fld_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO)); - if ((nfld_check(field, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY) || + if ((nfld_check(field, &rec, &fld, (RECORD_ENTRY * *)&rec_ptr, (FIELD_ENTRY * *)&fld_ptr) != S_OKAY) || /* initialize key function operation */ (key_init(fld) != S_OKAY)) RETURN( db_status ); diff --git a/cde/lib/DtSearch/raima/keystore.c b/cde/lib/DtSearch/raima/keystore.c index 09c32ce1..7057951a 100644 --- a/cde/lib/DtSearch/raima/keystore.c +++ b/cde/lib/DtSearch/raima/keystore.c @@ -60,16 +60,16 @@ DBN_DECL /* database number */ { int fld; /* field number */ int rec, rn; /* record type of current record */ - char FAR *rptr; /* pointer to current record */ - char FAR *fptr; /* pointer to field contents */ + char *rptr; /* pointer to current record */ + char *fptr; /* pointer to field contents */ char ckey[256]; /* compound key */ int stat; - RECORD_ENTRY FAR *rec_ptr; - FIELD_ENTRY FAR *fld_ptr; + RECORD_ENTRY *rec_ptr; + FIELD_ENTRY *fld_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO)); - if (nfld_check(field, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY) + if (nfld_check(field, &rec, &fld, (RECORD_ENTRY * *)&rec_ptr, (FIELD_ENTRY * *)&fld_ptr) != S_OKAY) RETURN( db_status ); /* Make sure we have a current record */ @@ -87,7 +87,7 @@ DBN_DECL /* database number */ RETURN( dberr(S_NOTOPTKEY) ); /* read current record */ - if ( (stat = dio_read(curr_rec, (char FAR * FAR *)&rptr, PGHOLD)) == S_OKAY ) { + if ( (stat = dio_read(curr_rec, (char * *)&rptr, PGHOLD)) == S_OKAY ) { /* Make sure that the key has not already been stored */ if ( (stat = r_tstopt( fld_ptr, rptr )) != S_OKAY ) { if ( dio_release( curr_rec ) != S_OKAY ) diff --git a/cde/lib/DtSearch/raima/libfcns.c b/cde/lib/DtSearch/raima/libfcns.c index 509fab17..2fe51294 100644 --- a/cde/lib/DtSearch/raima/libfcns.c +++ b/cde/lib/DtSearch/raima/libfcns.c @@ -64,7 +64,7 @@ /* Internal function prototypes */ static int rec_okay(P1(int) Pi(int *) - Pi(RECORD_ENTRY FAR * FAR *)); + Pi(RECORD_ENTRY * *)); static int ctblcmp(P1(CONST unsigned char FAR*) Pi(CONST unsigned char FAR*) Pi(int)); @@ -98,7 +98,7 @@ int nset_check(nset, set, set_ptr ) int nset; int *set; -SET_ENTRY FAR * FAR *set_ptr; +SET_ENTRY * *set_ptr; { nset -= SETMARK; if ((nset < 0) || (nset >= TABLE_SIZE(Size_st))) @@ -117,13 +117,13 @@ nfld_check(nfld, rec, fld, rec_ptr, fld_ptr ) long nfld; int *rec; int *fld; -RECORD_ENTRY FAR * FAR *rec_ptr; -FIELD_ENTRY FAR * FAR *fld_ptr; +RECORD_ENTRY * *rec_ptr; +FIELD_ENTRY * *fld_ptr; { int trec; int tfld; - if (!rec_okay(trec = (int)(nfld/FLDMARK), rec, (RECORD_ENTRY FAR * FAR *)rec_ptr) || + if (!rec_okay(trec = (int)(nfld/FLDMARK), rec, (RECORD_ENTRY * *)rec_ptr) || ((tfld = (int)(nfld - trec*FLDMARK)) < 0) || (tfld >= TABLE_SIZE(Size_fd))) return( dberr(S_INVFLD) ); @@ -141,9 +141,9 @@ int nrec_check(nrec, rec, rec_ptr) int nrec; int *rec; -RECORD_ENTRY FAR * FAR *rec_ptr; +RECORD_ENTRY * *rec_ptr; { - if (rec_okay(nrec - RECMARK, rec, (RECORD_ENTRY FAR * FAR *)rec_ptr)) + if (rec_okay(nrec - RECMARK, rec, (RECORD_ENTRY * *)rec_ptr)) db_status = S_OKAY; else dberr(S_INVREC); @@ -156,7 +156,7 @@ RECORD_ENTRY FAR * FAR *rec_ptr; static int rec_okay(nrec, rec, rec_ptr) int nrec; int *rec; -RECORD_ENTRY FAR * FAR *rec_ptr; +RECORD_ENTRY * *rec_ptr; { if ((nrec < 0) || (nrec >= TABLE_SIZE(Size_rt))) return (FALSE); @@ -169,9 +169,9 @@ RECORD_ENTRY FAR * FAR *rec_ptr; /* Compare values of two db_VISTA data fields */ int fldcmp(fld_ptr, f1, f2) -FIELD_ENTRY FAR *fld_ptr; -CONST char FAR *f1; /* pointer to field 1 */ -CONST char FAR *f2; /* pointer to field 2 */ +FIELD_ENTRY *fld_ptr; +CONST char *f1; /* pointer to field 1 */ +CONST char *f2; /* pointer to field 2 */ /* returns < 0 if f1 < f2, = 0 if f1 == f2, @@ -196,10 +196,10 @@ CONST char FAR *f2; /* pointer to field 2 */ float F1, F2; double d1, d2; #endif - FIELD_ENTRY FAR *fld_max; - FIELD_ENTRY FAR *sfld_ptr; - KEY_ENTRY FAR *key_ptr; - INT FAR *dim_ptr; + FIELD_ENTRY *fld_max; + FIELD_ENTRY *sfld_ptr; + KEY_ENTRY *key_ptr; + INT *dim_ptr; len = fld_ptr->fd_len; @@ -293,8 +293,8 @@ CONST char FAR *f2; /* pointer to field 2 */ #endif case DBADDR: for ( result = elt = 0; result == 0 && elt < entries; ++elt ) { - result = ADDRcmp((DB_ADDR FAR *)(f1+(elt*sizeof(DB_ADDR))), - (DB_ADDR FAR *)(f2+(elt*sizeof(DB_ADDR)))); + result = ADDRcmp((DB_ADDR *)(f1+(elt*sizeof(DB_ADDR))), + (DB_ADDR *)(f2+(elt*sizeof(DB_ADDR)))); } break; case GROUPED: @@ -328,7 +328,7 @@ CONST char FAR *f2; /* pointer to field 2 */ /* compare the INT variables */ int INTcmp( i1, i2 ) -CONST char FAR *i1, FAR *i2; +CONST char *i1, *i2; { INT I1, I2; @@ -341,7 +341,7 @@ CONST char FAR *i1, FAR *i2; /* compare two DB_ADDR variables */ int ADDRcmp( d1, d2 ) -CONST DB_ADDR FAR *d1, FAR *d2; +CONST DB_ADDR *d1, *d2; { DB_ADDR a1, a2; FILE_NO f1, f2; @@ -371,7 +371,7 @@ CONST DB_ADDR FAR *d1, FAR *d2; */ int null_dba( db_addr ) -CONST char FAR *db_addr; +CONST char *db_addr; { DB_ADDR dba; @@ -409,8 +409,8 @@ DB_ADDR dba; /* Compare two strings with sorting according to char-table */ static int ctblcmp(s, t, n) -CONST unsigned char FAR *s; /* String 1 */ -CONST unsigned char FAR *t; /* String 2 */ +CONST unsigned char *s; /* String 1 */ +CONST unsigned char *t; /* String 2 */ int n; /* Max. String length */ { int x; diff --git a/cde/lib/DtSearch/raima/ll.h b/cde/lib/DtSearch/raima/ll.h index fae91c74..49e71c41 100644 --- a/cde/lib/DtSearch/raima/ll.h +++ b/cde/lib/DtSearch/raima/ll.h @@ -39,7 +39,7 @@ */ /* The functions in this file are defined in alloc.c */ -typedef struct {struct ll_elem FAR *ptr; LOCK_DESC} LL_P; +typedef struct {struct ll_elem *ptr; LOCK_DESC} LL_P; typedef struct ll_elem { LL_P next; @@ -51,16 +51,16 @@ typedef struct ll_elem { typedef struct { LL_P head; LL_P tail; - LL_P FAR *curr; + LL_P *curr; } llist; #define LLIST_INIT() { POINTER_INIT(), POINTER_INIT(), NULL } -BOOLEAN ll_access(P1(llist FAR *)); -int ll_append(P1(llist FAR *) Pi(CHAR_P FAR *)); +BOOLEAN ll_access(P1(llist *)); +int ll_append(P1(llist *) Pi(CHAR_P *)); #define ll_deaccess(ll) /**/ -CHAR_P FAR *ll_first(P1(llist FAR *)); -void ll_free(P1(llist FAR *)); -CHAR_P FAR *ll_next(P1(llist FAR *)); -int ll_prepend(P1(llist FAR *) Pi(CHAR_P FAR *)); +CHAR_P *ll_first(P1(llist *)); +void ll_free(P1(llist *)); +CHAR_P *ll_next(P1(llist *)); +int ll_prepend(P1(llist *) Pi(CHAR_P *)); /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin ll.h */ diff --git a/cde/lib/DtSearch/raima/makenew.c b/cde/lib/DtSearch/raima/makenew.c index 94e60eec..83d4720c 100644 --- a/cde/lib/DtSearch/raima/makenew.c +++ b/cde/lib/DtSearch/raima/makenew.c @@ -56,26 +56,26 @@ int d_setkey( field, fldvalue TASK_PARM DBN_PARM ) long field; -CONST char FAR *fldvalue; +CONST char *fldvalue; TASK_DECL DBN_DECL { - SK_P FAR *sk_ptr; + SK_P *sk_ptr; SK_P sk_p; int fld, rec; - RECORD_ENTRY FAR *rec_ptr; - FIELD_ENTRY FAR *fld_ptr; + RECORD_ENTRY *rec_ptr; + FIELD_ENTRY *fld_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_NOIO)); - if (nfld_check(field, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY) + if (nfld_check(field, &rec, &fld, (RECORD_ENTRY * *)&rec_ptr, (FIELD_ENTRY * *)&fld_ptr) != S_OKAY) RETURN( db_status ); if ( fld_ptr->fd_key == 'n' ) RETURN( dberr(S_NOTKEY) ); ll_access(&sk_list); - while ((sk_ptr = (SK_P FAR *)ll_next(&sk_list)) != NULL) { + while ((sk_ptr = (SK_P *)ll_next(&sk_list)) != NULL) { if ( sk_ptr->ptr->sk_fld == fld ) { MEM_LOCK(&sk_ptr->ptr->sk_val); if ( fld_ptr->fd_type != CHARACTER || fld_ptr->fd_dim[1] ) @@ -90,10 +90,10 @@ DBN_DECL } } /* need to allocate a slot for a new fld */ - sk_p.ptr = (struct sk FAR *)ALLOC(&sk_p, sizeof(struct sk), "sk_ptr->ptr"); + sk_p.ptr = (struct sk *)ALLOC(&sk_p, sizeof(struct sk), "sk_ptr->ptr"); if ( sk_p.ptr == NULL ) RETURN( dberr( S_NOMEMORY ) ); - if ( ll_prepend(&sk_list, (CHAR_P FAR *)&sk_p) != S_OKAY ) { + if ( ll_prepend(&sk_list, (CHAR_P *)&sk_p) != S_OKAY ) { RETURN( db_status ); } sk_p.ptr->sk_fld = fld; @@ -120,10 +120,10 @@ DBN_DECL */ int sk_free() { - SK_P FAR *sk_ptr; + SK_P *sk_ptr; ll_access(&sk_list); - while ((sk_ptr = (SK_P FAR *)ll_next(&sk_list)) != NULL) { + while ((sk_ptr = (SK_P *)ll_next(&sk_list)) != NULL) { MEM_UNLOCK(&sk_ptr->ptr->sk_val); FREE(&sk_ptr->ptr->sk_val); } @@ -148,15 +148,15 @@ DBN_DECL INT recnum, fld, stat; FILE_NO file; F_ADDR rec_addr; - char FAR *ptr; - SK_P FAR *sk_ptr; - RECORD_ENTRY FAR *rec_ptr; - FIELD_ENTRY FAR *fld_ptr; + char *ptr; + SK_P *sk_ptr; + RECORD_ENTRY *rec_ptr; + FIELD_ENTRY *fld_ptr; int fldtot; DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO)); - if (nrec_check(nrec, &nrec, (RECORD_ENTRY FAR * FAR *)&rec_ptr) != S_OKAY) + if (nrec_check(nrec, &nrec, (RECORD_ENTRY * *)&rec_ptr) != S_OKAY) RETURN( db_status ); recnum = NUM2EXT(nrec, rt_offset); @@ -172,7 +172,7 @@ DBN_DECL if ((fld_ptr->fd_key == UNIQUE) && !(fld_ptr->fd_flags & OPTKEYMASK)) { /* locate the key value in the set_key table */ ll_access(&sk_list); - while (((sk_ptr = (SK_P FAR *)ll_next(&sk_list)) != NULL) && + while (((sk_ptr = (SK_P *)ll_next(&sk_list)) != NULL) && (sk_ptr->ptr->sk_fld != fld)) ; /* NOP */ if (sk_ptr == NULL) { @@ -198,7 +198,7 @@ DBN_DECL db_addr |= rec_addr; /* read record */ - if ( dio_read( db_addr, (char FAR * FAR *)&ptr, PGHOLD) != S_OKAY ) + if ( dio_read( db_addr, (char * *)&ptr, PGHOLD) != S_OKAY ) RETURN( db_status ); /* zero fill the record */ @@ -224,7 +224,7 @@ DBN_DECL if ((fld_ptr->fd_key != 'n') && !(fld_ptr->fd_flags & OPTKEYMASK)) { /* locate the key value in the set_key table */ ll_access(&sk_list); - sk_ptr = (SK_P FAR *)ll_first(&sk_list); + sk_ptr = (SK_P *)ll_first(&sk_list); while (sk_ptr != NULL) { if ( sk_ptr->ptr->sk_fld == fld ) { MEM_LOCK(&sk_ptr->ptr->sk_val); @@ -245,7 +245,7 @@ DBN_DECL MEM_UNLOCK(&sk_ptr->ptr->sk_val); break; } - sk_ptr = (SK_P FAR *)ll_next(&sk_list); + sk_ptr = (SK_P *)ll_next(&sk_list); } ll_deaccess(&sk_list); if ( sk_ptr == NULL ) RETURN( dberr( S_KEYREQD ) ); diff --git a/cde/lib/DtSearch/raima/mapchar.c b/cde/lib/DtSearch/raima/mapchar.c index be1f67a7..19cbb7b8 100644 --- a/cde/lib/DtSearch/raima/mapchar.c +++ b/cde/lib/DtSearch/raima/mapchar.c @@ -79,7 +79,7 @@ static int nextc(P1(int)); int d_mapchar(inchar,outchar,sort_str,subsort TASK_PARM) unsigned char inchar; /* value of character to be mapped */ unsigned char outchar; /* output character as ... */ -CONST char FAR *sort_str; /* sort string (max. len = 2) */ +CONST char *sort_str; /* sort string (max. len = 2) */ unsigned char subsort; /* subsort value, to distinguish between two */ /* equal values (e.g. 'a' and 'A', if necessary) */ TASK_DECL @@ -184,7 +184,7 @@ int fd; */ int ctbl_alloc() { - if ((db_global.country_tbl.ptr = (CNTRY_TBL FAR *) + if ((db_global.country_tbl.ptr = (CNTRY_TBL *) ALLOC(&db_global.country_tbl,256*sizeof(CNTRY_TBL)+1,"country_tbl")) == NULL ) return( dberr(S_NOMEMORY) ); diff --git a/cde/lib/DtSearch/raima/members.c b/cde/lib/DtSearch/raima/members.c index 47df8529..6cad5d9e 100644 --- a/cde/lib/DtSearch/raima/members.c +++ b/cde/lib/DtSearch/raima/members.c @@ -53,18 +53,18 @@ int d_members(set, tot TASK_PARM DBN_PARM) int set; /* Set table entry */ -LONG FAR *tot; /* total members of set */ +LONG *tot; /* total members of set */ TASK_DECL DBN_DECL /* database number */ { char setp[SETPSIZE]; - char FAR *recp; + char *recp; LONG total; - SET_ENTRY FAR *set_ptr; + SET_ENTRY *set_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); - if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) + if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) RETURN( db_status ); /* Make sure we have a current owner */ @@ -72,7 +72,7 @@ DBN_DECL /* database number */ RETURN( dberr(S_NOCO) ); /* Read owner record */ - if ( dio_read( curr_own[set], (char FAR * FAR *)&recp, NOPGHOLD) != S_OKAY ) + if ( dio_read( curr_own[set], (char * *)&recp, NOPGHOLD) != S_OKAY ) RETURN( db_status ); /* Get set pointer from owner record */ diff --git a/cde/lib/DtSearch/raima/ncb.h b/cde/lib/DtSearch/raima/ncb.h index 12554e56..e985ae82 100644 --- a/cde/lib/DtSearch/raima/ncb.h +++ b/cde/lib/DtSearch/raima/ncb.h @@ -88,7 +88,7 @@ typedef struct { char retcode; /* Return value (some enumerated below) */ char lsn; /* Local session number */ char num; /* Name number */ - char FAR *buffer_off; /* Message buffer offset */ + char *buffer_off; /* Message buffer offset */ #ifdef SMALL_DATA int buffer_seg; /* Message buffer segment */ #endif @@ -97,7 +97,7 @@ typedef struct { char name[NETNAME_LEN]; /* My name */ char rto; /* Receive timeout (500ms units) */ char sto; /* Send timeout (500ms units) */ - char FAR *post_off; /* Post function offset */ + char *post_off; /* Post function offset */ #ifdef SMALL_DATA int post_seg; /* Post function segment */ #endif diff --git a/cde/lib/DtSearch/raima/opens.c b/cde/lib/DtSearch/raima/opens.c index 139de630..c61a72ad 100644 --- a/cde/lib/DtSearch/raima/opens.c +++ b/cde/lib/DtSearch/raima/opens.c @@ -61,7 +61,7 @@ /* Open a binary file for shared access */ int open_b(filenm, flags) -CONST char FAR *filenm; +CONST char *filenm; int flags; { int desc; diff --git a/cde/lib/DtSearch/raima/pathfcns.c b/cde/lib/DtSearch/raima/pathfcns.c index 7e8bd26f..b1eecc45 100644 --- a/cde/lib/DtSearch/raima/pathfcns.c +++ b/cde/lib/DtSearch/raima/pathfcns.c @@ -81,23 +81,23 @@ /* ********************** FUNCTION PROTOTYPES ************************ */ -static int isabs(P1(char FAR *)); +static int isabs(P1(char *)); /* TRUE if path is absolute */ -static char FAR * remdrv(P1(char FAR *)); +static char * remdrv(P1(char *)); /* Removes drive spec from path */ -static char FAR * remfile(P1(char FAR *)); +static char * remfile(P1(char *)); /* Removes file from path */ /* ====================================================================== Construct the full path to the dictionary. */ int con_dbd(path_str,dbname,dbdpath) -char FAR *path_str; /* (output) string to receive the full path to the +char *path_str; /* (output) string to receive the full path to the dictionary */ -char FAR *dbname; /* contains the filename of the dictionary preceded +char *dbname; /* contains the filename of the dictionary preceded optionally by a path preceded optionally (DOS only) by a drive spec. */ -char FAR *dbdpath; /* contains one element of the environment variable +char *dbdpath; /* contains one element of the environment variable DBDPATH. NULL means no DBDPATH defined. */ { /* @@ -143,10 +143,10 @@ char FAR *dbdpath; /* contains one element of the environment variable Construct full path to data/key files */ int con_dbf(path_str, dbfile, dbname, dbfpath) -char FAR *path_str; /* (output) receives full path to dictionary */ -char FAR *dbfile; /* path to database file (defn in schema) */ -char FAR *dbname; /* d_open dbname argument - path to dictionary */ -char FAR *dbfpath; /* one element from DBFPATH, or NULL for no path */ +char *path_str; /* (output) receives full path to dictionary */ +char *dbfile; /* path to database file (defn in schema) */ +char *dbname; /* d_open dbname argument - path to dictionary */ +char *dbfpath; /* one element from DBFPATH, or NULL for no path */ { /* RETURNS: db_status, S_OKAY means no error. @@ -190,8 +190,8 @@ char FAR *dbfpath; /* one element from DBFPATH, or NULL for no path */ /* ====================================================================== extracts a single element from DBxPATH type variables */ -char FAR * get_element(dbxpath,num) -char FAR *dbxpath; /* DBxPATH, elements separated by semicolons +char * get_element(dbxpath,num) +char *dbxpath; /* DBxPATH, elements separated by semicolons NULL causes get_element to return NULL. A NULL string also causes a NULL return */ int num; /* Element to extract (0 = first) */ @@ -205,7 +205,7 @@ int num; /* Element to extract (0 = first) */ static char element[FILENMLEN+1]; /* return value */ int i; - char FAR *save; + char *save; if (dbxpath == NULL) return (NULL); if (dbxpath[0] == '\0') return (NULL); /* NULL string? */ @@ -227,7 +227,7 @@ int num; /* Element to extract (0 = first) */ if ((dbxpath = strchr(dbxpath+1,';')) == NULL) return (NULL); dbxpath++; if ((save = strchr(dbxpath+1,';')) != NULL) *save = '\0'; - i = (dbxpath - (char FAR *)element) + strlen((CONST char FAR *)dbxpath); + i = (dbxpath - (char *)element) + strlen((CONST char *)dbxpath); if (element[i-1] != DIRCHAR && element[i-1] != ':') { element[i++] = DIRCHAR; element[i] = '\0'; @@ -239,13 +239,13 @@ int num; /* Element to extract (0 = first) */ Returns TRUE of path is absolute */ static int isabs(path_str) -char FAR *path_str; /* path to test, NULL causes iabs to return FALSE */ +char *path_str; /* path to test, NULL causes iabs to return FALSE */ { /* RETURNS: TRUE if path is absolute ASSUMES: None. */ - char FAR *path; /* Points to path w/o drive spec */ + char *path; /* Points to path w/o drive spec */ if (path_str == NULL) return (FALSE); path = remdrv(path_str); @@ -256,15 +256,15 @@ char FAR *path_str; /* path to test, NULL causes iabs to return FALSE */ /* ====================================================================== Removes drive specifier from path */ -static char FAR * remdrv(path_str) -char FAR *path_str; /* path to remove drive from */ +static char * remdrv(path_str) +char *path_str; /* path to remove drive from */ { /* RETURNS: Pointer to string w/o drive specification. Note that this simply points further into path_str. ASSUMES: None. */ - char FAR *path; /* Return value */ + char *path; /* Return value */ if ((path = strrchr(path_str,':')) == NULL) return (path_str); return (path+1); @@ -273,8 +273,8 @@ char FAR *path_str; /* path to remove drive from */ /* ====================================================================== Removes file from a path. */ -static char FAR * remfile(path_str) -char FAR *path_str; /* Path to remove filename from */ +static char * remfile(path_str) +char *path_str; /* Path to remove filename from */ { /* RETURNS: Pointer to the path with the filename removed (a static @@ -299,7 +299,7 @@ char FAR *path_str; /* Path to remove filename from */ /* Set Country Table path */ int d_ctbpath(ctb TASK_PARM) -CONST char FAR *ctb; +CONST char *ctb; TASK_DECL { int i; diff --git a/cde/lib/DtSearch/raima/proto.h b/cde/lib/DtSearch/raima/proto.h index 1cd1d4eb..d1cfc4e1 100644 --- a/cde/lib/DtSearch/raima/proto.h +++ b/cde/lib/DtSearch/raima/proto.h @@ -145,10 +145,10 @@ void dbautorec(P0); /* From dblfcns.c: */ -int taskinit(P1(TASK FAR *)); -int initdbt(P1(CONST char FAR *)); -int alloc_table(P1(CHAR_P FAR *) Pi(unsigned) Pi(unsigned)); -#define ALLOC_TABLE(t, n, o, v) alloc_table((CHAR_P FAR *)(t), n, o) +int taskinit(P1(TASK *)); +int initdbt(P1(CONST char *)); +int alloc_table(P1(CHAR_P *) Pi(unsigned) Pi(unsigned)); +#define ALLOC_TABLE(t, n, o, v) alloc_table((CHAR_P *)(t), n, o) #ifndef SINGLE_USER int termses(P0); #endif @@ -166,20 +166,20 @@ int dio_clrfile(P1(FILE_NO)); int dio_clear(P0); int dio_flush(P0); void dio_setdef(P1(FILE_NO)); -int dio_get(P1(F_ADDR) Pi(char FAR * FAR *) Pi(int)); +int dio_get(P1(F_ADDR) Pi(char * *) Pi(int)); int dio_touch(P1(F_ADDR)); -int dio_read(P1(DB_ADDR) Pi(char FAR * FAR *) Pi(int)); -int dio_write(P1(DB_ADDR) Pi(CONST char FAR *) Pi(int)); +int dio_read(P1(DB_ADDR) Pi(char * *) Pi(int)); +int dio_write(P1(DB_ADDR) Pi(CONST char *) Pi(int)); int dio_release(P1(DB_ADDR)); int dio_rrlb(P1(DB_ADDR) Pi(INT *)); int dio_wrlb(P1(DB_ADDR) Pi(INT)); -int dio_findpg(P1(FILE_NO) Pi(F_ADDR) Pi(PAGE_ENTRY FAR *) - Pi(PAGE_ENTRY FAR * FAR *) - Pi(LOOKUP_ENTRY FAR * FAR *)); +int dio_findpg(P1(FILE_NO) Pi(F_ADDR) Pi(PAGE_ENTRY *) + Pi(PAGE_ENTRY * *) + Pi(LOOKUP_ENTRY * *)); #ifdef NO_TRANS -int dio_out(P1(PAGE_ENTRY FAR *) Pi(LOOKUP_ENTRY FAR *)); +int dio_out(P1(PAGE_ENTRY *) Pi(LOOKUP_ENTRY *)); #else -int dio_out(P1(PAGE_ENTRY FAR *) Pi(LOOKUP_ENTRY FAR *) +int dio_out(P1(PAGE_ENTRY *) Pi(LOOKUP_ENTRY *) Pi(BOOLEAN)); #endif #ifndef NO_TIMESTAMP @@ -203,33 +203,33 @@ int key_open(P0); void key_close(P0); int key_init(P1(int)); int key_reset(P1(FILE_NO)); -int key_locpos(P1(CONST char FAR *) Pi(DB_ADDR FAR *)); +int key_locpos(P1(CONST char *) Pi(DB_ADDR *)); int key_scan(P1(int) Pi(DB_ADDR *)); int key_boundary(P1(int) Pi(DB_ADDR *)); -int key_insert(P1(int) Pi(CONST char FAR *) Pi(DB_ADDR)); -int key_delete(P1(int) Pi(CONST char FAR *) Pi(DB_ADDR)); +int key_insert(P1(int) Pi(CONST char *) Pi(DB_ADDR)); +int key_delete(P1(int) Pi(CONST char *) Pi(DB_ADDR)); /* Due to a problem with MSC 5.1, we couldn't declare the 2nd parm of key_bldcom as const (see keyfcns.c) */ -int key_bldcom(P1(int) Pi(char FAR *) Pi(char FAR *) Pi(int)); +int key_bldcom(P1(int) Pi(char *) Pi(char *) Pi(int)); /* Because of a "problem" with the MSC 5.1 compiler, we couldn't declare the second argument to key_cmpcpy with a const attribute. Hence we were not able to define the 2nd argument of key_bldcom as const. */ -void key_cmpcpy(P1(char FAR *) Pi(char FAR *) Pi(INT)); +void key_cmpcpy(P1(char *) Pi(char *) Pi(INT)); /* From libfcns.c: */ #ifndef ONE_DB int dbn_check(P1(int)); #endif -int nset_check(P1(int) Pi(int *) Pi(SET_ENTRY FAR * FAR *)); +int nset_check(P1(int) Pi(int *) Pi(SET_ENTRY * *)); int nfld_check(P1(long) Pi(int *) Pi(int *) - Pi(RECORD_ENTRY FAR * FAR *) - Pi(FIELD_ENTRY FAR * FAR *)); -int nrec_check(P1(int) Pi(int *) Pi(RECORD_ENTRY FAR * FAR *)); -int fldcmp(P1(FIELD_ENTRY FAR *) Pi(CONST char FAR *) - Pi(CONST char FAR *)); -int INTcmp(P1(CONST char FAR *) Pi(CONST char FAR *)); -int ADDRcmp(P1(CONST DB_ADDR FAR *) Pi(CONST DB_ADDR FAR *)); -int null_dba(P1(CONST char FAR *)); + Pi(RECORD_ENTRY * *) + Pi(FIELD_ENTRY * *)); +int nrec_check(P1(int) Pi(int *) Pi(RECORD_ENTRY * *)); +int fldcmp(P1(FIELD_ENTRY *) Pi(CONST char *) + Pi(CONST char *)); +int INTcmp(P1(CONST char *) Pi(CONST char *)); +int ADDRcmp(P1(CONST DB_ADDR *) Pi(CONST DB_ADDR *)); +int null_dba(P1(CONST char *)); int check_dba(P1(DB_ADDR)); /* From makenew.c: */ @@ -238,24 +238,24 @@ int sk_free(P0); /* From netwdos.c: */ int netbios_chk(P0); int nw_reset(P1(int) Pi(int)); -int nw_addnm(P1(char FAR *) Pi(int *)); -int nw_cleanup(P1(char FAR *)); +int nw_addnm(P1(char *) Pi(int *)); +int nw_cleanup(P1(char *)); int nw_sestat(P0); -int nw_delnm(P1(char FAR *)); -int nw_call(P1(char FAR *) Pi(char FAR *) Pi(int *)); +int nw_delnm(P1(char *)); +int nw_call(P1(char *) Pi(char *) Pi(int *)); int nw_hangup(P1(int)); -int nw_send(P1(int) Pi(MESSAGE FAR *) Pi(int)); -int nw_rcvmsg(P1(int) Pi(MESSAGE FAR *) Pi(int) Pi(int *)); +int nw_send(P1(int) Pi(MESSAGE *) Pi(int)); +int nw_rcvmsg(P1(int) Pi(MESSAGE *) Pi(int) Pi(int *)); /* From opens.c: */ -int open_b(P1(CONST char FAR *) Pi(int)); +int open_b(P1(CONST char *) Pi(int)); /* From ovfcns.c: */ int o_setup(P0); int o_init(P0); int o_fileinit(P1(FILE_NO)); int o_search(P1(FILE_NO) Pi(F_ADDR) Pi(F_ADDR *)); -int o_write(P1(PAGE_ENTRY FAR *) Pi(LOOKUP_ENTRY FAR *)); +int o_write(P1(PAGE_ENTRY *) Pi(LOOKUP_ENTRY *)); int o_pzwrite(P1(FILE_NO)); int o_flush(P0); int o_update(P0); @@ -263,26 +263,26 @@ long o_pages(P1(FILE_NO)); void o_free(P0); /* From recfcns.c: */ -int r_chkfld(P1(INT) Pi(FIELD_ENTRY FAR *) Pi(char FAR *) - Pi(CONST char FAR *)); +int r_chkfld(P1(INT) Pi(FIELD_ENTRY *) Pi(char *) + Pi(CONST char *)); int r_delrec(P1(INT) Pi(DB_ADDR)); -int r_gfld(P1(FIELD_ENTRY FAR *) Pi(char FAR *) Pi(char FAR *)); -int r_gmem(P1(int) Pi(char FAR *) Pi(char FAR *)); -int r_gset(P1(int) Pi(char FAR *) Pi(char FAR *)); -int r_pfld(P1(INT) Pi(FIELD_ENTRY FAR *) Pi(char FAR *) - Pi(CONST char FAR *) Pi(DB_ADDR FAR *)); -int r_pmem(P1(int) Pi(char FAR *) Pi(char FAR *)); -int r_pset(P1(int) Pi(char FAR *) Pi(char FAR *)); -int r_smem(P1(DB_ADDR FAR *) Pi(INT)); -int r_setopt(P1(FIELD_ENTRY FAR *) Pi(char FAR *)); -int r_clropt(P1(FIELD_ENTRY FAR *) Pi(char FAR *)); -int r_tstopt(P1(FIELD_ENTRY FAR *) Pi(char FAR *)); +int r_gfld(P1(FIELD_ENTRY *) Pi(char *) Pi(char *)); +int r_gmem(P1(int) Pi(char *) Pi(char *)); +int r_gset(P1(int) Pi(char *) Pi(char *)); +int r_pfld(P1(INT) Pi(FIELD_ENTRY *) Pi(char *) + Pi(CONST char *) Pi(DB_ADDR *)); +int r_pmem(P1(int) Pi(char *) Pi(char *)); +int r_pset(P1(int) Pi(char *) Pi(char *)); +int r_smem(P1(DB_ADDR *) Pi(INT)); +int r_setopt(P1(FIELD_ENTRY *) Pi(char *)); +int r_clropt(P1(FIELD_ENTRY *) Pi(char *)); +int r_tstopt(P1(FIELD_ENTRY *) Pi(char *)); /* From pathfcns.c */ -int con_dbd(P1(char FAR *) Pi(char FAR *) Pi(char FAR *)); -int con_dbf(P1(char FAR *) Pi(char FAR *) Pi(char FAR *) - Pi(char FAR *)); -char FAR * get_element(P1(char FAR *) Pi(int)); +int con_dbd(P1(char *) Pi(char *) Pi(char *)); +int con_dbf(P1(char *) Pi(char *) Pi(char *) + Pi(char *)); +char * get_element(P1(char *) Pi(int)); /* From renfile.c: */ int renfiles(P0); @@ -303,12 +303,12 @@ int taf_open(P0); int taf_close(P0); int taf_access(P0); int taf_release(P0); -int taf_add(P1(CONST char FAR *)); -int taf_del(P1(CONST char FAR *) ); +int taf_add(P1(CONST char *)); +int taf_del(P1(CONST char *) ); /* From task.c */ #ifdef MULTI_TASK -void task_switch(P1(DB_TASK FAR *)); +void task_switch(P1(DB_TASK *)); #endif /* From mapchar.c */ @@ -334,7 +334,7 @@ void ctbl_free(P0); char * CDECL strrchr(P1(CONST char *) Pi(int)); #endif -void CDECL free(P1(void FAR *)); /* AIXV3 - DPG 07/05/90 */ +void CDECL free(P1(void *)); /* AIXV3 - DPG 07/05/90 */ time_t CDECL time(P1(long *)); int CDECL write(P1(int) Pi(char *) Pi(unsigned int)); int CDECL read(P1(int) Pi(char *) Pi(unsigned int)); diff --git a/cde/lib/DtSearch/raima/recfcns.c b/cde/lib/DtSearch/raima/recfcns.c index 52d4ab4b..43b376d7 100644 --- a/cde/lib/DtSearch/raima/recfcns.c +++ b/cde/lib/DtSearch/raima/recfcns.c @@ -73,17 +73,17 @@ static int struct_key_chk = 1; int r_chkfld(field, fld_ptr, rec, data ) INT field; /* field_table entry number */ -FIELD_ENTRY FAR *fld_ptr; /* corresponds to field */ -char FAR *rec; /* pointer to record slot */ -CONST char FAR *data; /* pointer to data area containing field contents */ +FIELD_ENTRY *fld_ptr; /* corresponds to field */ +char *rec; /* pointer to record slot */ +CONST char *data; /* pointer to data area containing field contents */ { DB_ADDR dba; long fld; INT rn; - char FAR *fptr, ckey[256]; + char *fptr, ckey[256]; int i; - FIELD_ENTRY FAR *sfld_ptr; - RECORD_ENTRY FAR *rec_ptr; + FIELD_ENTRY *sfld_ptr; + RECORD_ENTRY *rec_ptr; bytecpy(&rn, rec, sizeof(INT)); rn &= ~RLBMASK; /* mask off rlb */ @@ -144,8 +144,8 @@ r_delrec( rt, db_addr ) INT rt; DB_ADDR db_addr; { - char FAR *rec; /* ptr to record slot */ - char FAR *fptr; /* field data ptr */ + char *rec; /* ptr to record slot */ + char *fptr; /* field data ptr */ char ckey[256]; /* compound key data */ #ifndef NO_TIMESTAMP ULONG timestamp; @@ -153,10 +153,10 @@ DB_ADDR db_addr; FILE_NO fno; F_ADDR rno; int fld; - RECORD_ENTRY FAR *rec_ptr; - FIELD_ENTRY FAR *fld_ptr; + RECORD_ENTRY *rec_ptr; + FIELD_ENTRY *fld_ptr; - if ( dio_read( db_addr, (char FAR * FAR *)&rec, PGHOLD) != S_OKAY ) + if ( dio_read( db_addr, (char * *)&rec, PGHOLD) != S_OKAY ) return( db_status ); rec_ptr = &record_table[rt]; @@ -201,14 +201,14 @@ DB_ADDR db_addr; */ int r_gfld(fld_ptr, rec, data ) -FIELD_ENTRY FAR *fld_ptr; -char FAR *rec; /* pointer to record */ -char FAR *data; /* pointer to data area to contain field contents */ +FIELD_ENTRY *fld_ptr; +char *rec; /* pointer to record */ +char *data; /* pointer to data area to contain field contents */ { int kt_lc; /* loop control */ INT rn; - FIELD_ENTRY FAR *kfld_ptr; - KEY_ENTRY FAR *key_ptr; + FIELD_ENTRY *kfld_ptr; + KEY_ENTRY *key_ptr; bytecpy(&rn, rec, sizeof(INT)); if ( rn < 0 ) @@ -256,13 +256,13 @@ char FAR *data; /* pointer to data area to contain field contents */ int r_gmem(set, rec, mem_addr ) int set; /* set table entry number */ -char FAR *rec; /* pointer to record */ -char FAR *mem_addr; /* pointer to member pointer */ +char *rec; /* pointer to record */ +char *mem_addr; /* pointer to member pointer */ { INT rt; int mem, memtot; - SET_ENTRY FAR *set_ptr; - MEMBER_ENTRY FAR *mem_ptr; + SET_ENTRY *set_ptr; + MEMBER_ENTRY *mem_ptr; /* search member list of set for record */ set_ptr = &set_table[set]; @@ -288,12 +288,12 @@ char FAR *mem_addr; /* pointer to member pointer */ int r_gset(set, rec, setptr ) int set; /* set table entry number */ -char FAR *rec; /* pointer to record */ -char FAR *setptr; /* pointer to set pointer */ +char *rec; /* pointer to record */ +char *setptr; /* pointer to set pointer */ { INT rt; int len; - SET_ENTRY FAR *set_ptr; + SET_ENTRY *set_ptr; set_ptr = &set_table[set]; bytecpy(&rt, rec, sizeof(INT)); @@ -316,20 +316,20 @@ char FAR *setptr; /* pointer to set pointer */ int r_pfld(field, fld_ptr, rec, data, db_addr ) INT field; /* field_table entry number */ -FIELD_ENTRY FAR *fld_ptr; /* corresponds to field */ -char FAR *rec; /* pointer to existing record */ -CONST char FAR *data; /* pointer to data area containing new field contents */ -DB_ADDR FAR *db_addr; +FIELD_ENTRY *fld_ptr; /* corresponds to field */ +char *rec; /* pointer to existing record */ +CONST char *data; /* pointer to data area containing new field contents */ +DB_ADDR *db_addr; { DB_ADDR mdba, odba, dba; int set, sn; char memp[MEMPSIZE]; - char FAR *fptr; - CONST char FAR *tfptr; + char *fptr; + CONST char *tfptr; int s, i, strfld; - FIELD_ENTRY FAR *sfld_ptr; - SORT_ENTRY FAR *srt_ptr; - DB_ADDR FAR *co_ptr, FAR *cm_ptr; + FIELD_ENTRY *sfld_ptr; + SORT_ENTRY *srt_ptr; + DB_ADDR *co_ptr, *cm_ptr; db_status = S_OKAY; fptr = rec + fld_ptr->fd_ptr; @@ -440,13 +440,13 @@ DB_ADDR FAR *db_addr; int r_pmem(set, rec, mem_addr ) int set; /* set table entry number */ -char FAR *rec; /* pointer to record */ -char FAR *mem_addr; /* pointer to member pointer */ +char *rec; /* pointer to record */ +char *mem_addr; /* pointer to member pointer */ { INT rt; int mem, memtot; - SET_ENTRY FAR *set_ptr; - MEMBER_ENTRY FAR *mem_ptr; + SET_ENTRY *set_ptr; + MEMBER_ENTRY *mem_ptr; /* search member list of set for record */ set_ptr = &set_table[set]; @@ -472,12 +472,12 @@ char FAR *mem_addr; /* pointer to member pointer */ int r_pset(set, rec, setptr ) int set; /* set table entry number */ -char FAR *rec; /* pointer to record */ -char FAR *setptr; /* pointer to set pointer */ +char *rec; /* pointer to record */ +char *setptr; /* pointer to set pointer */ { INT rt; int len; - SET_ENTRY FAR *set_ptr; + SET_ENTRY *set_ptr; set_ptr = &set_table[set]; bytecpy(&rt, rec, sizeof(INT)); @@ -501,19 +501,19 @@ char FAR *setptr; /* pointer to set pointer */ */ int r_smem( db_addr, set ) -DB_ADDR FAR *db_addr; +DB_ADDR *db_addr; INT set; { #ifndef NO_TIMESTAMP int nset; #endif - char mem[MEMPSIZE], FAR *ptr; + char mem[MEMPSIZE], *ptr; DB_ADDR dba; bytecpy(&dba, db_addr, DB_ADDR_SIZE); /* make sure record is owned */ - if ((dio_read(dba, (char FAR * FAR *)&ptr, NOPGHOLD) != S_OKAY) || + if ((dio_read(dba, (char * *)&ptr, NOPGHOLD) != S_OKAY) || (r_gmem(set, ptr, mem) != S_OKAY)) return( db_status ); @@ -539,8 +539,8 @@ INT set; /* Set the optional key field "stored" bit */ int r_setopt( fld_ptr, rec ) -FIELD_ENTRY FAR *fld_ptr; /* field table entry of optional key */ -char FAR *rec; /* Pointer to record */ +FIELD_ENTRY *fld_ptr; /* field table entry of optional key */ +char *rec; /* Pointer to record */ { int offset; /* offset to the bit map */ int keyndx; /* index into bit map of this key */ @@ -567,8 +567,8 @@ char FAR *rec; /* Pointer to record */ /* Clear the optional key field "stored" bit */ int r_clropt( fld_ptr, rec ) -FIELD_ENTRY FAR *fld_ptr; /* Field table entry of optional key */ -char FAR *rec; /* Pointer to record */ +FIELD_ENTRY *fld_ptr; /* Field table entry of optional key */ +char *rec; /* Pointer to record */ { int offset; /* offset to the bit map */ int keyndx; /* index into bit map of this key */ @@ -595,8 +595,8 @@ char FAR *rec; /* Pointer to record */ /* Test the optional key field "stored" bit */ int r_tstopt( fld_ptr, rec ) -FIELD_ENTRY FAR *fld_ptr; /* Field table entry of optional key */ -char FAR *rec; /* Pointer to record */ +FIELD_ENTRY *fld_ptr; /* Field table entry of optional key */ +char *rec; /* Pointer to record */ { int offset; /* offset to the bit map */ int keyndx; /* index into bit map of this key */ diff --git a/cde/lib/DtSearch/raima/recfrst.c b/cde/lib/DtSearch/raima/recfrst.c index bb0fc2da..84a03150 100644 --- a/cde/lib/DtSearch/raima/recfrst.c +++ b/cde/lib/DtSearch/raima/recfrst.c @@ -57,16 +57,16 @@ DBN_DECL INT rectype; FILE_NO ftype; DB_ADDR dba; - char FAR *recptr; + char *recptr; #ifndef SINGLE_USER int dbopen_sv; #endif F_ADDR rno, last; - RECORD_ENTRY FAR *rec_ptr; + RECORD_ENTRY *rec_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO)); - if (nrec_check(rec, &rec, (RECORD_ENTRY FAR * FAR *)&rec_ptr) != S_OKAY) + if (nrec_check(rec, &rec, (RECORD_ENTRY * *)&rec_ptr) != S_OKAY) RETURN( db_status ); #ifndef ONE_DB rec -= curr_db_table->rt_offset; @@ -93,7 +93,7 @@ DBN_DECL #endif /* read the record */ - dio_read( dba, (char FAR * FAR *)&recptr, NOPGHOLD ); + dio_read( dba, (char * *)&recptr, NOPGHOLD ); #ifndef SINGLE_USER dbopen = dbopen_sv; #endif diff --git a/cde/lib/DtSearch/raima/reclast.c b/cde/lib/DtSearch/raima/reclast.c index ef6bbc24..5869b7de 100644 --- a/cde/lib/DtSearch/raima/reclast.c +++ b/cde/lib/DtSearch/raima/reclast.c @@ -85,8 +85,8 @@ DBN_DECL /* optional database number */ DB_ADDR dba; /* current database addr we're scanning */ FILE_NO ftype; /* file desc for file holding rec */ F_ADDR last; /* last slot in file */ - char FAR *recptr; /* record from database */ - RECORD_ENTRY FAR *rec_ptr; /* RECORD ENTRY for this record */ + char *recptr; /* record from database */ + RECORD_ENTRY *rec_ptr; /* RECORD ENTRY for this record */ INT rectype; /* record type from record */ F_ADDR rno; /* current slot we're scanning */ @@ -97,7 +97,7 @@ DBN_DECL /* optional database number */ DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO)); /* validate and convert record number */ - if ( nrec_check(rec, &rec, (RECORD_ENTRY FAR * FAR *)&rec_ptr) != S_OKAY) + if ( nrec_check(rec, &rec, (RECORD_ENTRY * *)&rec_ptr) != S_OKAY) RETURN( db_status ); /* get the last record # for this file */ @@ -117,7 +117,7 @@ DBN_DECL /* optional database number */ dbopen_sv = dbopen; dbopen = 2; /* setup to allow unlocked read */ #endif - dio_read(dba, (char FAR * FAR *)&recptr, NOPGHOLD); + dio_read(dba, (char * *)&recptr, NOPGHOLD); #ifndef SINGLE_USER dbopen = dbopen_sv; #endif diff --git a/cde/lib/DtSearch/raima/recnext.c b/cde/lib/DtSearch/raima/recnext.c index fd21436b..12dfb952 100644 --- a/cde/lib/DtSearch/raima/recnext.c +++ b/cde/lib/DtSearch/raima/recnext.c @@ -62,8 +62,8 @@ DBN_DECL int dbopen_sv; #endif int rec_ndx; /* Index into record table */ - RECORD_ENTRY FAR *rec_ptr; /* Pointer to record table */ - char FAR *recptr; + RECORD_ENTRY *rec_ptr; /* Pointer to record table */ + char *recptr; F_ADDR rno, last; DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO)); @@ -77,7 +77,7 @@ DBN_DECL rno = RN_REF(rn_dba) & ADDRMASK; } else { /* No current rec - get fno from rn_type */ - nrec_check(RN_REF(rn_type) + RECMARK, &rec_ndx, (RECORD_ENTRY FAR * FAR *)&rec_ptr); + nrec_check(RN_REF(rn_type) + RECMARK, &rec_ndx, (RECORD_ENTRY * *)&rec_ptr); fno = (FILE_NO)NUM2EXT(rec_ptr->rt_file, ft_offset); fno = (int)((fno >> FILESHIFT) & FILEMASK); rno = 1; @@ -103,7 +103,7 @@ DBN_DECL #endif /* read the record */ - dio_read( dba, (char FAR * FAR *)&recptr, NOPGHOLD ); + dio_read( dba, (char * *)&recptr, NOPGHOLD ); #ifndef SINGLE_USER dbopen = dbopen_sv; #endif diff --git a/cde/lib/DtSearch/raima/recprev.c b/cde/lib/DtSearch/raima/recprev.c index a1ed8ada..c2c5598a 100644 --- a/cde/lib/DtSearch/raima/recprev.c +++ b/cde/lib/DtSearch/raima/recprev.c @@ -85,8 +85,8 @@ DBN_DECL FILE_NO fno; /* current file we're scanning */ F_ADDR last; /* last slot in file */ int rec_ndx; /* index of RECORD ENTRY (not used) */ - char FAR *recptr; /* record from database */ - RECORD_ENTRY FAR *rec_ptr; /* RECORD ENTRY for this record */ + char *recptr; /* record from database */ + RECORD_ENTRY *rec_ptr; /* RECORD ENTRY for this record */ INT rectype; /* record type from record */ F_ADDR rno; /* current slot we're scanning */ FILE_NO ft; /* normalized file */ @@ -104,7 +104,7 @@ DBN_DECL rno = RN_REF(rn_dba) & ADDRMASK; } else { /* no current rec, get fno from rn_type */ - nrec_check(RN_REF(rn_type) + RECMARK, &rec_ndx, (RECORD_ENTRY FAR * FAR *)&rec_ptr); + nrec_check(RN_REF(rn_type) + RECMARK, &rec_ndx, (RECORD_ENTRY * *)&rec_ptr); fno = NUM2EXT(rec_ptr->rt_file, ft_offset); fno = (int)((fno >> FILESHIFT) & FILEMASK); @@ -125,7 +125,7 @@ DBN_DECL dbopen_sv = dbopen; dbopen = 2; /* setup to allow for unlocked read */ #endif - dio_read(dba, (char FAR * FAR *)&recptr, NOPGHOLD); + dio_read(dba, (char * *)&recptr, NOPGHOLD); #ifndef SINGLE_USER dbopen = dbopen_sv; #endif diff --git a/cde/lib/DtSearch/raima/recread.c b/cde/lib/DtSearch/raima/recread.c index d35a192b..5dbe8c38 100644 --- a/cde/lib/DtSearch/raima/recread.c +++ b/cde/lib/DtSearch/raima/recread.c @@ -53,7 +53,7 @@ */ int d_recread(rec TASK_PARM DBN_PARM) -char FAR *rec; /* ptr to record area */ +char *rec; /* ptr to record area */ TASK_DECL DBN_DECL { @@ -62,7 +62,7 @@ DBN_DECL #ifndef SINGLE_USER int dbopen_sv; #endif - RECORD_ENTRY FAR *rec_ptr; + RECORD_ENTRY *rec_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO)); @@ -79,7 +79,7 @@ DBN_DECL #endif /* read current record */ - dio_read( curr_rec, (char FAR * FAR *)&crloc, NOPGHOLD); + dio_read( curr_rec, (char * *)&crloc, NOPGHOLD); #ifndef SINGLE_USER dbopen = dbopen_sv; #endif diff --git a/cde/lib/DtSearch/raima/recset.c b/cde/lib/DtSearch/raima/recset.c index 716e1673..2c3abed3 100644 --- a/cde/lib/DtSearch/raima/recset.c +++ b/cde/lib/DtSearch/raima/recset.c @@ -83,12 +83,12 @@ DBN_DECL FILE_NO rfile; /* file containing user specified rec */ FILE_NO fno; /* file containing current record */ int rec_ndx; /* Index into record table */ - RECORD_ENTRY FAR *rec_ptr; /* Pointer to record table */ + RECORD_ENTRY *rec_ptr; /* Pointer to record table */ DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_NOIO)); /* Check rec parameter user passed */ - if (nrec_check(rec, &rec_ndx, (RECORD_ENTRY FAR * FAR *)&rec_ptr) != S_OKAY) + if (nrec_check(rec, &rec_ndx, (RECORD_ENTRY * *)&rec_ptr) != S_OKAY) RETURN( db_status ); /* Check to make sure current record is in this file */ diff --git a/cde/lib/DtSearch/raima/recstat.c b/cde/lib/DtSearch/raima/recstat.c index eef89bc8..4afc60d7 100644 --- a/cde/lib/DtSearch/raima/recstat.c +++ b/cde/lib/DtSearch/raima/recstat.c @@ -57,12 +57,12 @@ ULONG rts; TASK_DECL { INT rec; - char FAR *ptr; + char *ptr; ULONG cts, uts; DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(RECORD_IO)); - if ((check_dba(dba) != S_OKAY) || (dio_read(dba, (char FAR * FAR *)&ptr, NOPGHOLD) != S_OKAY)) + if ((check_dba(dba) != S_OKAY) || (dio_read(dba, (char * *)&ptr, NOPGHOLD) != S_OKAY)) RETURN( db_status ); /* get record id */ diff --git a/cde/lib/DtSearch/raima/recwrite.c b/cde/lib/DtSearch/raima/recwrite.c index a1c24829..df56cce1 100644 --- a/cde/lib/DtSearch/raima/recwrite.c +++ b/cde/lib/DtSearch/raima/recwrite.c @@ -53,7 +53,7 @@ */ int d_recwrite(rec TASK_PARM DBN_PARM) -CONST char FAR *rec; /* ptr to record area */ +CONST char *rec; /* ptr to record area */ TASK_DECL DBN_DECL { @@ -61,13 +61,13 @@ DBN_DECL ULONG timestamp; #endif INT rt; /* record type */ - char FAR *fptr; /* field data pointer */ + char *fptr; /* field data pointer */ char ckey[256]; /* current compound key data */ char nkey[256]; /* new compound key data */ int stat; int fld; - RECORD_ENTRY FAR *rec_ptr; - FIELD_ENTRY FAR *fld_ptr; + RECORD_ENTRY *rec_ptr; + FIELD_ENTRY *fld_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); @@ -78,7 +78,7 @@ DBN_DECL RETURN( dberr(S_NOCR) ); /* Read current record */ - if ( dio_read( curr_rec, (char FAR * FAR *)&crloc, PGHOLD) != S_OKAY ) + if ( dio_read( curr_rec, (char * *)&crloc, PGHOLD) != S_OKAY ) RETURN( db_status ); /* Copy record type from record */ @@ -97,11 +97,11 @@ DBN_DECL /* Build compound key for new data supplied by user. Note: cflag must be the same here as in the 1st key_bldcom for r_chkfld */ if ( fld_ptr->fd_type == COMKEY ) { - key_bldcom(fld, (char FAR *)rec, nkey, FALSE); + key_bldcom(fld, (char *)rec, nkey, FALSE); fptr = nkey; } else - fptr = (char FAR *)rec + fld_ptr->fd_ptr - rec_ptr->rt_data; + fptr = (char *)rec + fld_ptr->fd_ptr - rec_ptr->rt_data; if ( ! (fld_ptr->fd_flags & STRUCTFLD) ) { if ( (stat = r_chkfld(fld, fld_ptr, crloc, fptr)) != S_OKAY ) { @@ -120,7 +120,7 @@ DBN_DECL if ( fld_ptr->fd_type == COMKEY ) { /* build old and new keys */ key_bldcom(fld, crloc + rec_ptr->rt_data, ckey, TRUE); - key_bldcom(fld, (char FAR *)rec, nkey, TRUE); + key_bldcom(fld, (char *)rec, nkey, TRUE); /* make sure value has changed */ if ((fldcmp(fld_ptr, ckey, nkey) != 0) && diff --git a/cde/lib/DtSearch/raima/renfile.c b/cde/lib/DtSearch/raima/renfile.c index 78fbf347..646a694c 100644 --- a/cde/lib/DtSearch/raima/renfile.c +++ b/cde/lib/DtSearch/raima/renfile.c @@ -48,9 +48,9 @@ */ int d_renfile(dbn, fno, fnm TASK_PARM) -CONST char FAR *dbn; /* database containing file to be renamed */ +CONST char *dbn; /* database containing file to be renamed */ FILE_NO fno; /* file id number for file to be renamed */ -CONST char FAR *fnm; /* new file name */ +CONST char *fnm; /* new file name */ TASK_DECL { REN_ENTRY_P r; @@ -59,11 +59,11 @@ TASK_DECL if ( dbopen ) RETURN( dberr(S_DBOPEN) ); - r.ptr = (REN_ENTRY FAR *)ALLOC(&r, sizeof(REN_ENTRY), "r"); + r.ptr = (REN_ENTRY *)ALLOC(&r, sizeof(REN_ENTRY), "r"); if ( r.ptr == NULL ) RETURN( dberr(S_NOMEMORY) ); ll_access(&ren_list); - if ( ll_append(&ren_list, (CHAR_P FAR *)&r) != S_OKAY ) { + if ( ll_append(&ren_list, (CHAR_P *)&r) != S_OKAY ) { RETURN( db_status ); } r.ptr->Ren_db_name.ptr = @@ -91,16 +91,16 @@ int renfiles() { int dbt_lc; /* loop control */ - REN_ENTRY_P FAR *rp; + REN_ENTRY_P *rp; #ifndef ONE_DB - DB_ENTRY FAR *db_ptr; + DB_ENTRY *db_ptr; #endif if ( ll_access(&ren_list) ) { #ifndef ONE_DB db_ptr = curr_db_table; /* Have to save it because of macros */ #endif - while ((rp = (REN_ENTRY_P FAR *)ll_next(&ren_list)) != NULL) { + while ((rp = (REN_ENTRY_P *)ll_next(&ren_list)) != NULL) { MEM_LOCK(&rp->ptr->Ren_db_name); MEM_LOCK(&rp->ptr->File_name); #ifndef ONE_DB diff --git a/cde/lib/DtSearch/raima/rwcurr.c b/cde/lib/DtSearch/raima/rwcurr.c index 4f2f2387..5c43cefe 100644 --- a/cde/lib/DtSearch/raima/rwcurr.c +++ b/cde/lib/DtSearch/raima/rwcurr.c @@ -57,7 +57,7 @@ int d_rdcurr(currbuff, currsize TASK_PARM) DB_ADDR **currbuff; -int FAR *currsize; +int *currsize; TASK_DECL { int cs; @@ -79,7 +79,7 @@ int d_rerdcurr(currbuff TASK_PARM) DB_ADDR **currbuff; TASK_DECL { - DB_ADDR FAR *cb_ptr; + DB_ADDR *cb_ptr; DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(SET_NOIO)); @@ -109,7 +109,7 @@ d_wrcurr(currbuff TASK_PARM) DB_ADDR *currbuff; TASK_DECL { - DB_ADDR FAR *cb_ptr; + DB_ADDR *cb_ptr; DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(SET_NOIO)); diff --git a/cde/lib/DtSearch/raima/setmm.c b/cde/lib/DtSearch/raima/setmm.c index 340458be..83d76267 100644 --- a/cde/lib/DtSearch/raima/setmm.c +++ b/cde/lib/DtSearch/raima/setmm.c @@ -58,14 +58,14 @@ DBN_DECL /* database number */ { int cmtype; /* current member type */ int mem; - SET_ENTRY FAR *set_ptr; - MEMBER_ENTRY FAR *mem_ptr; + SET_ENTRY *set_ptr; + MEMBER_ENTRY *mem_ptr; int memtot; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); if ((d_cmtype(sets, &cmtype TASK_PARM DBN_PARM) != S_OKAY) || - (nset_check(sett, &sett, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)) + (nset_check(sett, &sett, (SET_ENTRY * *)&set_ptr) != S_OKAY)) RETURN( db_status ); cmtype += NUM2INT(-RECMARK, rt_offset); diff --git a/cde/lib/DtSearch/raima/setmo.c b/cde/lib/DtSearch/raima/setmo.c index 9be31252..a14dcb58 100644 --- a/cde/lib/DtSearch/raima/setmo.c +++ b/cde/lib/DtSearch/raima/setmo.c @@ -57,17 +57,17 @@ TASK_DECL DBN_DECL /* database number */ { int mem; - SET_ENTRY FAR *setm_ptr, FAR *seto_ptr; - MEMBER_ENTRY FAR *mem_ptr; + SET_ENTRY *setm_ptr, *seto_ptr; + MEMBER_ENTRY *mem_ptr; int memtot; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); - if ((nset_check(seto, &seto, (SET_ENTRY FAR * FAR *)&seto_ptr) != S_OKAY) || - (nset_check(setm, &setm, (SET_ENTRY FAR * FAR *)&setm_ptr) != S_OKAY)) + if ((nset_check(seto, &seto, (SET_ENTRY * *)&seto_ptr) != S_OKAY) || + (nset_check(setm, &setm, (SET_ENTRY * *)&setm_ptr) != S_OKAY)) RETURN( db_status ); - if (null_dba((char FAR *)&curr_own[seto])) RETURN( dberr(S_NOCO) ); + if (null_dba((char *)&curr_own[seto])) RETURN( dberr(S_NOCO) ); for (mem = setm_ptr->st_members, memtot = mem + setm_ptr->st_memtot, mem_ptr = &member_table[mem]; diff --git a/cde/lib/DtSearch/raima/setmr.c b/cde/lib/DtSearch/raima/setmr.c index d1268be4..842ed552 100644 --- a/cde/lib/DtSearch/raima/setmr.c +++ b/cde/lib/DtSearch/raima/setmr.c @@ -57,13 +57,13 @@ DBN_DECL /* database number */ { int crtype; /* current record type */ int mem; - SET_ENTRY FAR *set_ptr; - MEMBER_ENTRY FAR *mem_ptr; + SET_ENTRY *set_ptr; + MEMBER_ENTRY *mem_ptr; int memtot; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); - if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) + if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) RETURN( db_status ); if ( ! curr_rec ) diff --git a/cde/lib/DtSearch/raima/setom.c b/cde/lib/DtSearch/raima/setom.c index d81f061e..5c2a09cd 100644 --- a/cde/lib/DtSearch/raima/setom.c +++ b/cde/lib/DtSearch/raima/setom.c @@ -59,12 +59,12 @@ DBN_DECL /* database number */ { int seto, setm; int cmtype; /* current record type */ - SET_ENTRY FAR *set_ptr; + SET_ENTRY *set_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); if ((d_cmtype(nsetm, &cmtype TASK_PARM DBN_PARM) != S_OKAY) || - (nset_check(nseto, &seto, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)) + (nset_check(nseto, &seto, (SET_ENTRY * *)&set_ptr) != S_OKAY)) RETURN( db_status ); cmtype += NUM2INT(-RECMARK, rt_offset); setm = NUM2INT(nsetm - SETMARK, st_offset); diff --git a/cde/lib/DtSearch/raima/setoo.c b/cde/lib/DtSearch/raima/setoo.c index 849e6d8d..bc89b1a0 100644 --- a/cde/lib/DtSearch/raima/setoo.c +++ b/cde/lib/DtSearch/raima/setoo.c @@ -58,18 +58,18 @@ TASK_DECL DBN_DECL /* database number */ { int sett, sets; - SET_ENTRY FAR *sett_ptr, FAR *sets_ptr; + SET_ENTRY *sett_ptr, *sets_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); - if ((nset_check(nsett, &sett, (SET_ENTRY FAR * FAR *)&sett_ptr) != S_OKAY) || - (nset_check(nsets, &sets, (SET_ENTRY FAR * FAR *)&sets_ptr) != S_OKAY)) + if ((nset_check(nsett, &sett, (SET_ENTRY * *)&sett_ptr) != S_OKAY) || + (nset_check(nsets, &sets, (SET_ENTRY * *)&sets_ptr) != S_OKAY)) RETURN( db_status ); if ( sett_ptr->st_own_rt != sets_ptr->st_own_rt ) RETURN( dberr( S_INVOWN ) ); - if (null_dba((char FAR *)&curr_own[sets])) + if (null_dba((char *)&curr_own[sets])) RETURN( dberr(S_NOCO) ); curr_own[sett] = curr_own[sets]; diff --git a/cde/lib/DtSearch/raima/setor.c b/cde/lib/DtSearch/raima/setor.c index 8533a3a4..ec2cc7d2 100644 --- a/cde/lib/DtSearch/raima/setor.c +++ b/cde/lib/DtSearch/raima/setor.c @@ -57,11 +57,11 @@ DBN_DECL /* database number */ { int set; int crtype; /* current record type */ - SET_ENTRY FAR *set_ptr; + SET_ENTRY *set_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); - if ((nset_check(nset, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) || + if ((nset_check(nset, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) || (d_crtype(&crtype TASK_PARM DBN_PARM) != S_OKAY)) RETURN( db_status ); diff --git a/cde/lib/DtSearch/raima/setrm.c b/cde/lib/DtSearch/raima/setrm.c index 9087b28b..c133e7f7 100644 --- a/cde/lib/DtSearch/raima/setrm.c +++ b/cde/lib/DtSearch/raima/setrm.c @@ -55,11 +55,11 @@ int set; /* set table entry number */ TASK_DECL DBN_DECL /* database number */ { - SET_ENTRY FAR *set_ptr; + SET_ENTRY *set_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_NOIO)); - if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) + if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) RETURN( db_status ); if ( ! curr_mem[set] ) diff --git a/cde/lib/DtSearch/raima/setro.c b/cde/lib/DtSearch/raima/setro.c index 400a1b1a..899c28b3 100644 --- a/cde/lib/DtSearch/raima/setro.c +++ b/cde/lib/DtSearch/raima/setro.c @@ -55,11 +55,11 @@ int set; /* set table entry number */ TASK_DECL DBN_DECL /* database number */ { - SET_ENTRY FAR *set_ptr; + SET_ENTRY *set_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_NOIO)); - if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) + if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) RETURN( db_status ); if ( ! curr_own[set] ) diff --git a/cde/lib/DtSearch/raima/startup.c b/cde/lib/DtSearch/raima/startup.c index 3569d74e..a38ac358 100644 --- a/cde/lib/DtSearch/raima/startup.c +++ b/cde/lib/DtSearch/raima/startup.c @@ -54,7 +54,7 @@ LOCK_DECL db_status = S_OKAY; if ( ! db_glob_init ) { #ifdef MULTI_TASK - Currtask.v.ptr = (TASK FAR *)&db_global; + Currtask.v.ptr = (TASK *)&db_global; #endif taskinit(&db_global); db_glob_init = 1; diff --git a/cde/lib/DtSearch/raima/stscm.c b/cde/lib/DtSearch/raima/stscm.c index f725f777..69c182a0 100644 --- a/cde/lib/DtSearch/raima/stscm.c +++ b/cde/lib/DtSearch/raima/stscm.c @@ -57,11 +57,11 @@ ULONG timestamp; TASK_DECL DBN_DECL { - SET_ENTRY FAR *set_ptr; + SET_ENTRY *set_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_NOIO)); - if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) + if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) RETURN( db_status ); /* make sure we have a current member */ diff --git a/cde/lib/DtSearch/raima/stsco.c b/cde/lib/DtSearch/raima/stsco.c index b74be171..077ba6c4 100644 --- a/cde/lib/DtSearch/raima/stsco.c +++ b/cde/lib/DtSearch/raima/stsco.c @@ -57,11 +57,11 @@ ULONG timestamp; TASK_DECL DBN_DECL { - SET_ENTRY FAR *set_ptr; + SET_ENTRY *set_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_NOIO)); - if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) + if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) RETURN( db_status ); /* make sure we have a current owner */ diff --git a/cde/lib/DtSearch/raima/stscs.c b/cde/lib/DtSearch/raima/stscs.c index 6b63226c..57176f7d 100644 --- a/cde/lib/DtSearch/raima/stscs.c +++ b/cde/lib/DtSearch/raima/stscs.c @@ -57,11 +57,11 @@ ULONG timestamp; TASK_DECL DBN_DECL { - SET_ENTRY FAR *set_ptr; + SET_ENTRY *set_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_NOIO)); - if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) + if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) RETURN( db_status ); /* make sure we have a current owner */ diff --git a/cde/lib/DtSearch/raima/task.h b/cde/lib/DtSearch/raima/task.h index 5fb1c4c7..e298e232 100644 --- a/cde/lib/DtSearch/raima/task.h +++ b/cde/lib/DtSearch/raima/task.h @@ -255,67 +255,67 @@ */ -int EXTERNAL_FIXED dt_opentask(P1(DB_TASK FAR *)); +int EXTERNAL_FIXED dt_opentask(P1(DB_TASK *)); int EXTERNAL_FIXED dt_closetask(P1(DB_TASK)); int EXTERNAL_FIXED dt_close(TASK_D1); /* dblfcns.c */ int EXTERNAL_DBN dt_cmstat(P1(int) TASK_Di DBN_Dn); /* cmstat.c */ -int EXTERNAL_DBN dt_cmtype(P1(int) Pi(int FAR *) TASK_Di DBN_Dn); +int EXTERNAL_DBN dt_cmtype(P1(int) Pi(int *) TASK_Di DBN_Dn); /* cmtype.c */ int EXTERNAL_DBN dt_connect(P1(int) TASK_Di DBN_Dn); /* connect.c */ #ifndef NO_TIMESTAMP int EXTERNAL_DBN dt_costat(P1(int) TASK_Di DBN_Dn); /* costat.c */ #endif -int EXTERNAL_DBN dt_cotype(P1(int) Pi(int FAR *) TASK_Di DBN_Dn); +int EXTERNAL_DBN dt_cotype(P1(int) Pi(int *) TASK_Di DBN_Dn); /* cotype.c */ -int EXTERNAL_DBN dt_crget(P1(DB_ADDR FAR *) TASK_Di DBN_Dn); /* crget.c */ -int EXTERNAL_DBN dt_crread(P1(long) Pi(char FAR *) TASK_Di DBN_Dn); +int EXTERNAL_DBN dt_crget(P1(DB_ADDR *) TASK_Di DBN_Dn); /* crget.c */ +int EXTERNAL_DBN dt_crread(P1(long) Pi(char *) TASK_Di DBN_Dn); /* crread.c */ -int EXTERNAL_DBN dt_crset(P1(DB_ADDR FAR *) TASK_Di DBN_Dn); /* crset.c */ +int EXTERNAL_DBN dt_crset(P1(DB_ADDR *) TASK_Di DBN_Dn); /* crset.c */ #ifndef NO_TIMESTAMP int EXTERNAL_FIXED dt_crstat(TASK_D1); /* crstat.c */ #endif -int EXTERNAL_DBN dt_crtype(P1(int FAR *) TASK_Di DBN_Dn); /* crtype.c */ -int EXTERNAL_DBN dt_crwrite(P1(long) Pi(char FAR *) TASK_Di DBN_Dn); +int EXTERNAL_DBN dt_crtype(P1(int *) TASK_Di DBN_Dn); /* crtype.c */ +int EXTERNAL_DBN dt_crwrite(P1(long) Pi(char *) TASK_Di DBN_Dn); /* crwrite.c */ -int EXTERNAL_DBN dt_csmget(P1(int) Pi(DB_ADDR FAR *) TASK_Di DBN_Dn); +int EXTERNAL_DBN dt_csmget(P1(int) Pi(DB_ADDR *) TASK_Di DBN_Dn); /* csmget.c */ -int EXTERNAL_DBN dt_csmread(P1(int) Pi(long) Pi(char FAR *) TASK_Di DBN_Dn); +int EXTERNAL_DBN dt_csmread(P1(int) Pi(long) Pi(char *) TASK_Di DBN_Dn); /* csmread.c */ -int EXTERNAL_DBN dt_csmset(P1(int) Pi(DB_ADDR FAR *) TASK_Di DBN_Dn); +int EXTERNAL_DBN dt_csmset(P1(int) Pi(DB_ADDR *) TASK_Di DBN_Dn); /* csmset.c */ -int EXTERNAL_DBN dt_csmwrite(P1(int) Pi(long) Pi(CONST char FAR *) TASK_Di +int EXTERNAL_DBN dt_csmwrite(P1(int) Pi(long) Pi(CONST char *) TASK_Di DBN_Dn); /* csmwrite.c */ -int EXTERNAL_DBN dt_csoget(P1(int) Pi(DB_ADDR FAR *) TASK_Di DBN_Dn); +int EXTERNAL_DBN dt_csoget(P1(int) Pi(DB_ADDR *) TASK_Di DBN_Dn); /* csoget.c */ -int EXTERNAL_DBN dt_csoread(P1(int) Pi(long) Pi(char FAR *) TASK_Di DBN_Dn); +int EXTERNAL_DBN dt_csoread(P1(int) Pi(long) Pi(char *) TASK_Di DBN_Dn); /* csoread.c */ -int EXTERNAL_DBN dt_csoset(P1(int) Pi(DB_ADDR FAR *) TASK_Di DBN_Dn); +int EXTERNAL_DBN dt_csoset(P1(int) Pi(DB_ADDR *) TASK_Di DBN_Dn); /* csoset.c */ -int EXTERNAL_DBN dt_csowrite(P1(int) Pi(long) Pi(CONST char FAR *) TASK_Di +int EXTERNAL_DBN dt_csowrite(P1(int) Pi(long) Pi(CONST char *) TASK_Di DBN_Dn); /* csowrite.c */ #ifndef NO_TIMESTAMP int EXTERNAL_DBN dt_csstat(P1(int) TASK_Di DBN_Dn); /* csstat.c */ -int EXTERNAL_DBN dt_ctscm(P1(int) Pi(ULONG FAR *) TASK_Di DBN_Dn); +int EXTERNAL_DBN dt_ctscm(P1(int) Pi(ULONG *) TASK_Di DBN_Dn); /* ctscm.c */ -int EXTERNAL_DBN dt_ctsco(P1(int) Pi(ULONG FAR *) TASK_Di DBN_Dn); +int EXTERNAL_DBN dt_ctsco(P1(int) Pi(ULONG *) TASK_Di DBN_Dn); /* ctsco.c */ -int EXTERNAL_FIXED dt_ctscr(P1(ULONG FAR *) TASK_Di ); /* ctscr.c */ +int EXTERNAL_FIXED dt_ctscr(P1(ULONG *) TASK_Di ); /* ctscr.c */ #endif #ifndef NO_COUNTRY -int EXTERNAL_FIXED dt_ctbpath(P1(CONST char FAR *) TASK_Di); /* pathfcns.c */ +int EXTERNAL_FIXED dt_ctbpath(P1(CONST char *) TASK_Di); /* pathfcns.c */ #endif -int EXTERNAL_FIXED dt_dbdpath(P1(CONST char FAR *) TASK_Di ); /* dbdpath.c */ -int EXTERNAL_FIXED dt_dbfpath(P1(CONST char FAR *) TASK_Di ); /* dbfpath.c */ -int EXTERNAL_FIXED dt_dblog(P1(CONST char FAR *) TASK_Di ); /* dblog.c */ -int EXTERNAL_FIXED dt_dbuserid(P1(CONST char FAR *) TASK_Di ); /* dbuserid.c */ +int EXTERNAL_FIXED dt_dbdpath(P1(CONST char *) TASK_Di ); /* dbdpath.c */ +int EXTERNAL_FIXED dt_dbfpath(P1(CONST char *) TASK_Di ); /* dbfpath.c */ +int EXTERNAL_FIXED dt_dblog(P1(CONST char *) TASK_Di ); /* dblog.c */ +int EXTERNAL_FIXED dt_dbuserid(P1(CONST char *) TASK_Di ); /* dbuserid.c */ int EXTERNAL_DBN dt_delete(TASK_D1 DBN_Dn); /* delete.c */ int EXTERNAL_DBN dt_disdel(TASK_D1 DBN_Dn); /* disdel.c */ int EXTERNAL_DBN dt_recnext(TASK_D1 DBN_Dn); /* recnext.c */ int EXTERNAL_DBN dt_recprev(TASK_D1 DBN_Dn); /* recprev.c */ -int EXTERNAL_FIXED dt_destroy(P1(CONST char FAR *) TASK_Di ); /* destroy.c */ +int EXTERNAL_FIXED dt_destroy(P1(CONST char *) TASK_Di ); /* destroy.c */ int EXTERNAL_DBN dt_discon(P1(int) TASK_Di DBN_Dn); /* discon.c */ -int EXTERNAL_DBN dt_fillnew(P1(int) Pi(CONST char FAR *) TASK_Di DBN_Dn); +int EXTERNAL_DBN dt_fillnew(P1(int) Pi(CONST char *) TASK_Di DBN_Dn); /* fillnew.c */ int EXTERNAL_DBN dt_findco(P1(int) TASK_Di DBN_Dn); /* findco.c */ int EXTERNAL_DBN dt_findfm(P1(int) TASK_Di DBN_Dn); /* findfm.c */ @@ -324,12 +324,12 @@ int EXTERNAL_DBN dt_findnm(P1(int) TASK_Di DBN_Dn); /* findnm.c */ int EXTERNAL_DBN dt_findpm(P1(int) TASK_Di DBN_Dn); /* findpm.c */ int EXTERNAL_FIXED dt_freeall(TASK_D1); /* dblfcns.c */ #ifndef NO_TIMESTAMP -int EXTERNAL_DBN dt_gtscm(P1(int) Pi(ULONG FAR *) TASK_Di DBN_Dn); +int EXTERNAL_DBN dt_gtscm(P1(int) Pi(ULONG *) TASK_Di DBN_Dn); /* gtscm.c */ -int EXTERNAL_DBN dt_gtsco(P1(int) Pi(ULONG FAR *) TASK_Di DBN_Dn); +int EXTERNAL_DBN dt_gtsco(P1(int) Pi(ULONG *) TASK_Di DBN_Dn); /* gtsco.c */ -int EXTERNAL_FIXED dt_gtscr(P1(ULONG FAR *) TASK_Di ); /* gtscr.c */ -int EXTERNAL_DBN dt_gtscs(P1(int) Pi(ULONG FAR *) TASK_Di DBN_Dn); +int EXTERNAL_FIXED dt_gtscr(P1(ULONG *) TASK_Di ); /* gtscr.c */ +int EXTERNAL_DBN dt_gtscs(P1(int) Pi(ULONG *) TASK_Di DBN_Dn); /* gtscs.c */ #endif int EXTERNAL_DBN dt_initialize(TASK_D1 DBN_Dn); /* initial.c */ @@ -338,52 +338,52 @@ int EXTERNAL_DBN dt_ismember(P1(int) TASK_Di DBN_Dn); /* ismember.c */ int EXTERNAL_DBN dt_isowner(P1(int) TASK_Di DBN_Dn); /* isowner.c */ int EXTERNAL_DBN dt_keydel(P1(long) TASK_Di DBN_Dn); /* keydel.c */ int EXTERNAL_DBN dt_keyexist(P1(long) TASK_Di DBN_Dn); /* keyexist.c */ -int EXTERNAL_DBN dt_keyfind(P1(long) Pi(CONST char FAR *) TASK_Di DBN_Dn); +int EXTERNAL_DBN dt_keyfind(P1(long) Pi(CONST char *) TASK_Di DBN_Dn); /* keyfind.c */ int EXTERNAL_DBN dt_keyfree(P1(long) TASK_Di DBN_Dn); /* dblfcns.c */ int EXTERNAL_DBN dt_keyfrst(P1(long) TASK_Di DBN_Dn); /* keyfrst.c */ int EXTERNAL_DBN dt_keylast(P1(long) TASK_Di DBN_Dn); /* keylast.c */ -int EXTERNAL_DBN dt_keylock(P1(long) Pi(char FAR *) TASK_Di DBN_Dn); +int EXTERNAL_DBN dt_keylock(P1(long) Pi(char *) TASK_Di DBN_Dn); /* dblfcns.c */ -int EXTERNAL_DBN dt_keylstat(P1(long) Pi(char FAR *) TASK_Di DBN_Dn); +int EXTERNAL_DBN dt_keylstat(P1(long) Pi(char *) TASK_Di DBN_Dn); /* dblfcns.c */ int EXTERNAL_DBN dt_keynext(P1(long) TASK_Di DBN_Dn); /* keynext.c */ int EXTERNAL_DBN dt_keyprev(P1(long) TASK_Di DBN_Dn); /* keyprev.c */ -int EXTERNAL_FIXED dt_keyread(P1(char FAR *) TASK_Di ); /* keyfcns.c */ +int EXTERNAL_FIXED dt_keyread(P1(char *) TASK_Di ); /* keyfcns.c */ int EXTERNAL_DBN dt_keystore(P1(long) TASK_Di DBN_Dn); /* keystore.c */ -int EXTERNAL_DBN dt_lock(P1(int) Pi(LOCK_REQUEST FAR *) TASK_Di DBN_Dn); +int EXTERNAL_DBN dt_lock(P1(int) Pi(LOCK_REQUEST *) TASK_Di DBN_Dn); /* dblfcns.c */ int EXTERNAL_DBN dt_makenew(P1(int) TASK_Di DBN_Dn); /* makenew.c */ int EXTERNAL_FIXED dt_mapchar(P1(unsigned char) Pi(unsigned char) - Pi(CONST char FAR *) Pi(unsigned char) TASK_Di); + Pi(CONST char *) Pi(unsigned char) TASK_Di); /* mapchar.c */ -int EXTERNAL_DBN dt_members(P1(int) Pi(LONG FAR *) TASK_Di DBN_Dn); +int EXTERNAL_DBN dt_members(P1(int) Pi(LONG *) TASK_Di DBN_Dn); /* members.c */ int EXTERNAL_FIXED dt_off_opt(P1(int) TASK_Di ); /* options.c */ int EXTERNAL_FIXED dt_on_opt(P1(int) TASK_Di ); /* options.c */ -int EXTERNAL_FIXED dt_open(P1(CONST char FAR *) Pi(CONST char FAR *) TASK_Di); +int EXTERNAL_FIXED dt_open(P1(CONST char *) Pi(CONST char *) TASK_Di); /* dblfcns.c */ -int EXTERNAL_FIXED dt_rdcurr(P1(DB_ADDR FAR **) Pi(int FAR *) TASK_Di); +int EXTERNAL_FIXED dt_rdcurr(P1(DB_ADDR **) Pi(int *) TASK_Di); /* rwcurr.c */ -int EXTERNAL_FIXED dt_rerdcurr(P1(DB_ADDR FAR **) TASK_Di); /* rwcurr.c */ -int EXTERNAL_FIXED dt_wrcurr(P1(DB_ADDR FAR *) TASK_Di); /* rwcurr.c */ +int EXTERNAL_FIXED dt_rerdcurr(P1(DB_ADDR **) TASK_Di); /* rwcurr.c */ +int EXTERNAL_FIXED dt_wrcurr(P1(DB_ADDR *) TASK_Di); /* rwcurr.c */ int EXTERNAL_DBN dt_recfree(P1(int) TASK_Di DBN_Dn); /* dblfcns.c */ int EXTERNAL_DBN dt_recfrst(P1(int) TASK_Di DBN_Dn); /* recfrst.c */ int EXTERNAL_DBN dt_reclast(P1(int) TASK_Di DBN_Dn); /* reclast.c */ -int EXTERNAL_DBN dt_reclock(P1(int) Pi(char FAR *) TASK_Di DBN_Dn); +int EXTERNAL_DBN dt_reclock(P1(int) Pi(char *) TASK_Di DBN_Dn); /* dblfcns.c */ -int EXTERNAL_DBN dt_reclstat(P1(int) Pi(char FAR *) TASK_Di DBN_Dn); +int EXTERNAL_DBN dt_reclstat(P1(int) Pi(char *) TASK_Di DBN_Dn); /* dblfcns.c */ -int EXTERNAL_FIXED dt_recover(P1(CONST char FAR *) TASK_Di ); /* recover.c */ -int EXTERNAL_DBN dt_recread(P1(char FAR *) TASK_Di DBN_Dn); /* recread.c */ +int EXTERNAL_FIXED dt_recover(P1(CONST char *) TASK_Di ); /* recover.c */ +int EXTERNAL_DBN dt_recread(P1(char *) TASK_Di DBN_Dn); /* recread.c */ int EXTERNAL_DBN dt_recset(P1(int) TASK_Di DBN_Dn); /* recset.c */ #ifndef NO_TIMESTAMP int EXTERNAL_FIXED dt_recstat(P1(DB_ADDR) Pi(ULONG) TASK_Di ); /* recstat.c */ #endif -int EXTERNAL_DBN dt_recwrite(P1(CONST char FAR *) TASK_Di DBN_Dn); +int EXTERNAL_DBN dt_recwrite(P1(CONST char *) TASK_Di DBN_Dn); /* recwrite.c */ -int EXTERNAL_FIXED dt_renfile(P1(CONST char FAR *) Pi(FILE_NO) - Pi(CONST char FAR *) TASK_Di); /* renfile.c */ +int EXTERNAL_FIXED dt_renfile(P1(CONST char *) Pi(FILE_NO) + Pi(CONST char *) TASK_Di); /* renfile.c */ int EXTERNAL_FIXED dt_retries(P1(int) TASK_Di ); /* dblfcns.c */ int EXTERNAL_FIXED dt_rlbclr(TASK_D1); /* dblfcns.c */ int EXTERNAL_FIXED dt_rlbset(TASK_D1); /* dblfcns.c */ @@ -393,11 +393,11 @@ int EXTERNAL_FIXED dt_set_dberr(P1(FARPROC) TASK_Di); /* dberr.c */ int EXTERNAL_FIXED dt_setdb(P1(int) TASK_Di); /* setdb.c */ #endif int EXTERNAL_DBN dt_setfree(P1(int) TASK_Di DBN_Dn); /* dblfcns.c */ -int EXTERNAL_DBN dt_setkey(P1(long) Pi(CONST char FAR *) TASK_Di DBN_Dn); +int EXTERNAL_DBN dt_setkey(P1(long) Pi(CONST char *) TASK_Di DBN_Dn); /* makenew.c */ -int EXTERNAL_DBN dt_setlock(P1(int) Pi(char FAR *) TASK_Di DBN_Dn); +int EXTERNAL_DBN dt_setlock(P1(int) Pi(char *) TASK_Di DBN_Dn); /* dblfcns.c */ -int EXTERNAL_DBN dt_setlstat(P1(int) Pi(char FAR *) TASK_Di DBN_Dn); +int EXTERNAL_DBN dt_setlstat(P1(int) Pi(char *) TASK_Di DBN_Dn); /* dblfcns.c */ int EXTERNAL_DBN dt_setmm(P1(int) Pi(int) TASK_Di DBN_Dn); /* setmm.c */ int EXTERNAL_DBN dt_setmo(P1(int) Pi(int) TASK_Di DBN_Dn); /* setmo.c */ @@ -415,15 +415,15 @@ int EXTERNAL_DBN dt_stscs(P1(int) Pi(ULONG) TASK_Di DBN_Dn); /* stscs.c */ #endif int EXTERNAL_FIXED dt_timeout(P1(int) TASK_Di ); /* dblfcns.c */ int EXTERNAL_FIXED dt_trabort(TASK_D1); /* dblfcns.c */ -int EXTERNAL_FIXED dt_trbegin(P1(CONST char FAR *) TASK_Di); /* dblfcns.c */ +int EXTERNAL_FIXED dt_trbegin(P1(CONST char *) TASK_Di); /* dblfcns.c */ int EXTERNAL_FIXED dt_trend(TASK_D1); /* dblfcns.c */ #ifndef NO_TIMESTAMP -int EXTERNAL_DBN dt_utscm(P1(int) Pi(ULONG FAR *) TASK_Di DBN_Dn); +int EXTERNAL_DBN dt_utscm(P1(int) Pi(ULONG *) TASK_Di DBN_Dn); /* utscm.c */ -int EXTERNAL_DBN dt_utsco(P1(int) Pi(ULONG FAR *) TASK_Di DBN_Dn); +int EXTERNAL_DBN dt_utsco(P1(int) Pi(ULONG *) TASK_Di DBN_Dn); /* utsco.c */ -int EXTERNAL_FIXED dt_utscr(P1(ULONG FAR *) TASK_Di ); /* utscr.c */ -int EXTERNAL_DBN dt_utscs(P1(int) Pi(ULONG FAR *) TASK_Di DBN_Dn); +int EXTERNAL_FIXED dt_utscr(P1(ULONG *) TASK_Di ); /* utscr.c */ +int EXTERNAL_DBN dt_utscs(P1(int) Pi(ULONG *) TASK_Di DBN_Dn); /* utscs.c */ #endif diff --git a/cde/lib/DtSearch/raima/utscm.c b/cde/lib/DtSearch/raima/utscm.c index a6946a87..d527290a 100644 --- a/cde/lib/DtSearch/raima/utscm.c +++ b/cde/lib/DtSearch/raima/utscm.c @@ -53,17 +53,17 @@ */ d_utscm(set, timestamp TASK_PARM DBN_PARM) int set; -ULONG FAR *timestamp; +ULONG *timestamp; TASK_DECL DBN_DECL { INT rec; - char FAR *rptr; - SET_ENTRY FAR *set_ptr; + char *rptr; + SET_ENTRY *set_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); - if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) + if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) RETURN( db_status ); /* make sure we have a current member */ @@ -71,7 +71,7 @@ DBN_DECL RETURN( dberr(S_NOCM) ); /* read current member */ - if ( dio_read( curr_mem[set], (char FAR * FAR *)&rptr , NOPGHOLD) != S_OKAY ) + if ( dio_read( curr_mem[set], (char * *)&rptr , NOPGHOLD) != S_OKAY ) RETURN( db_status ); /* get record id */ diff --git a/cde/lib/DtSearch/raima/utsco.c b/cde/lib/DtSearch/raima/utsco.c index 5a2cf444..41b8cbba 100644 --- a/cde/lib/DtSearch/raima/utsco.c +++ b/cde/lib/DtSearch/raima/utsco.c @@ -53,17 +53,17 @@ */ d_utsco(set, timestamp TASK_PARM DBN_PARM) int set; -ULONG FAR *timestamp; +ULONG *timestamp; TASK_DECL DBN_DECL { INT rec; - char FAR *rptr; - SET_ENTRY FAR *set_ptr; + char *rptr; + SET_ENTRY *set_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); - if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) + if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) RETURN( db_status ); /* make sure we have a current owner */ @@ -71,7 +71,7 @@ DBN_DECL RETURN( dberr(S_NOCO) ); /* read current owner */ - if ( dio_read( curr_own[set], (char FAR * FAR *)&rptr , NOPGHOLD) != S_OKAY ) + if ( dio_read( curr_own[set], (char * *)&rptr , NOPGHOLD) != S_OKAY ) RETURN( db_status ); /* get record id */ diff --git a/cde/lib/DtSearch/raima/utscr.c b/cde/lib/DtSearch/raima/utscr.c index 59d66386..d7e986ed 100644 --- a/cde/lib/DtSearch/raima/utscr.c +++ b/cde/lib/DtSearch/raima/utscr.c @@ -52,7 +52,7 @@ /* Get update timestamp of current record */ d_utscr(timestamp TASK_PARM) -ULONG FAR *timestamp; +ULONG *timestamp; TASK_DECL { INT rec; @@ -68,7 +68,7 @@ TASK_DECL dbopen_sv = dbopen; dbopen = 2; /* read current record */ - if ( dio_read( curr_rec, (char FAR * FAR *)&crloc , NOPGHOLD) != S_OKAY ) + if ( dio_read( curr_rec, (char * *)&crloc , NOPGHOLD) != S_OKAY ) RETURN( db_status ); dbopen = dbopen_sv; diff --git a/cde/lib/DtSearch/raima/utscs.c b/cde/lib/DtSearch/raima/utscs.c index 23dfd431..7c0d7931 100644 --- a/cde/lib/DtSearch/raima/utscs.c +++ b/cde/lib/DtSearch/raima/utscs.c @@ -53,17 +53,17 @@ */ d_utscs(set, timestamp TASK_PARM DBN_PARM) int set; -ULONG FAR *timestamp; +ULONG *timestamp; TASK_DECL DBN_DECL { INT rec; - char FAR *rptr; - SET_ENTRY FAR *set_ptr; + char *rptr; + SET_ENTRY *set_ptr; DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); - if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) + if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) RETURN( db_status ); /* make sure we have a current owner */ @@ -71,7 +71,7 @@ DBN_DECL RETURN( dberr(S_NOCO) ); /* read current owner */ - if ( dio_read( curr_own[set], (char FAR * FAR *)&rptr , NOPGHOLD) != S_OKAY ) + if ( dio_read( curr_own[set], (char * *)&rptr , NOPGHOLD) != S_OKAY ) RETURN( db_status ); /* get record id to ensure record not deleted */ diff --git a/cde/lib/DtSearch/raima/vista.h b/cde/lib/DtSearch/raima/vista.h index ee9a39fe..2d56e82e 100644 --- a/cde/lib/DtSearch/raima/vista.h +++ b/cde/lib/DtSearch/raima/vista.h @@ -280,10 +280,6 @@ extern int db_oflag; #endif /* MSC */ #endif /* GENERAL lockmgr */ -#ifndef FAR -#define FAR /**/ -#endif - #ifndef PASCAL #define PASCAL /**/ #endif @@ -292,12 +288,12 @@ extern int db_oflag; #define CDECL /**/ #endif -#define EXTERNAL_FIXED FAR PASCAL -#define EXTERNAL_VARIABLE FAR CDECL +#define EXTERNAL_FIXED PASCAL +#define EXTERNAL_VARIABLE CDECL #define INTERNAL_FIXED PASCAL #define INTERNAL_VARIABLE CDECL -typedef int (FAR PASCAL *FARPROC)(); +typedef int (PASCAL *FARPROC)(); typedef char *HANDLE; #ifdef NO_DBN_PARM @@ -314,11 +310,11 @@ typedef char *HANDLE; #define POINTER_INIT() { NULL } #define POINTER_ASSIGN(a) { a } -typedef struct {char FAR *ptr; LOCK_DESC} CHAR_P; -typedef struct {DB_ADDR FAR *ptr; LOCK_DESC} DB_ADDR_P; +typedef struct {char *ptr; LOCK_DESC} CHAR_P; +typedef struct {DB_ADDR *ptr; LOCK_DESC} DB_ADDR_P; #ifdef MULTI_TASK -typedef struct {struct TASK_S FAR *ptr; LOCK_DESC} TASK_P; -typedef struct {char FAR *ptr; LOCK_DESC} QFAKE_P; +typedef struct {struct TASK_S *ptr; LOCK_DESC} TASK_P; +typedef struct {char *ptr; LOCK_DESC} QFAKE_P; typedef struct { TASK_P v; QFAKE_P q; @@ -368,8 +364,8 @@ typedef struct { #define TASK_DBN_D1 P1(DB_TASK) DBN_Dn #define TASK_D1 P1(DB_TASK) #define TASK_Di Pi(DB_TASK) -#define TASK_PTR_D1 P1(DB_TASK FAR *) -#define TASK_PTR_Di Pi(DB_TASK FAR *) +#define TASK_PTR_D1 P1(DB_TASK *) +#define TASK_PTR_Di Pi(DB_TASK *) #define CURRTASK_PARM , Currtask #define CURRTASK_ONLY Currtask #else -- 2.25.1