From 162fd49971ae0524c051dbc82ae30ec93bd4d631 Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Fri, 29 Jun 2018 00:34:56 +0100 Subject: [PATCH] libDtSearch: Remove define ONE_DB which is always off for CDE --- cde/lib/DtSearch/raima/connect.c | 2 -- cde/lib/DtSearch/raima/csmset.c | 2 -- cde/lib/DtSearch/raima/csoset.c | 2 -- cde/lib/DtSearch/raima/dblfcns.c | 16 ----------- cde/lib/DtSearch/raima/dbtype.h | 12 -------- cde/lib/DtSearch/raima/dbxtrn.h | 27 ------------------ cde/lib/DtSearch/raima/delete.c | 2 -- cde/lib/DtSearch/raima/dproto.h | 2 -- cde/lib/DtSearch/raima/initial.c | 2 -- cde/lib/DtSearch/raima/inittab.c | 46 ------------------------------- cde/lib/DtSearch/raima/inittab.h | 2 -- cde/lib/DtSearch/raima/keyfcns.c | 9 ------ cde/lib/DtSearch/raima/libfcns.c | 2 -- cde/lib/DtSearch/raima/proto.h | 2 -- cde/lib/DtSearch/raima/recfcns.c | 2 -- cde/lib/DtSearch/raima/recfrst.c | 2 -- cde/lib/DtSearch/raima/recstat.c | 2 -- cde/lib/DtSearch/raima/recwrite.c | 2 -- cde/lib/DtSearch/raima/renfile.c | 12 -------- cde/lib/DtSearch/raima/setdb.c | 2 -- cde/lib/DtSearch/raima/startup.c | 2 -- cde/lib/DtSearch/raima/task.h | 4 --- cde/lib/DtSearch/raima/utscm.c | 2 -- cde/lib/DtSearch/raima/utsco.c | 2 -- cde/lib/DtSearch/raima/utscr.c | 2 -- 25 files changed, 162 deletions(-) diff --git a/cde/lib/DtSearch/raima/connect.c b/cde/lib/DtSearch/raima/connect.c index 27d8a08c..d710fbbc 100644 --- a/cde/lib/DtSearch/raima/connect.c +++ b/cde/lib/DtSearch/raima/connect.c @@ -325,10 +325,8 @@ char *mem2; /* member record 2 */ rn1 &= ~RLBMASK; /* mask off rlb */ bytecpy(&rn2, mem2, sizeof(INT)); rn2 &= ~RLBMASK; /* mask off rlb */ -#ifndef ONE_DB rn1 += curr_db_table->rt_offset; rn2 += curr_db_table->rt_offset; -#endif /* locate member_table entries for these record types */ mt2 = mt1 = NULL; diff --git a/cde/lib/DtSearch/raima/csmset.c b/cde/lib/DtSearch/raima/csmset.c index 2fd0f545..abb04bf8 100644 --- a/cde/lib/DtSearch/raima/csmset.c +++ b/cde/lib/DtSearch/raima/csmset.c @@ -75,9 +75,7 @@ DBN_DECL /* database number */ if ( dio_read( *dba, (char * *)&ptr, NOPGHOLD ) ) RETURN( db_status ); bytecpy( &type, ptr, sizeof(INT) ); type &= ~RLBMASK; -#ifndef ONE_DB type += curr_db_table->rt_offset; -#endif for (mem = set_ptr->st_members, memtot = mem + set_ptr->st_memtot, mem_ptr = &member_table[mem]; diff --git a/cde/lib/DtSearch/raima/csoset.c b/cde/lib/DtSearch/raima/csoset.c index 6deab969..8937c210 100644 --- a/cde/lib/DtSearch/raima/csoset.c +++ b/cde/lib/DtSearch/raima/csoset.c @@ -74,9 +74,7 @@ DBN_DECL /* database number */ if ( dio_read( *dba, (char * *)&ptr , NOPGHOLD) ) RETURN( db_status ); bytecpy( &type, ptr, sizeof(INT) ); type &= ~RLBMASK; -#ifndef ONE_DB type += curr_db_table->rt_offset; -#endif if (set_ptr->st_own_rt != type) RETURN( dberr( S_INVOWN ) ); diff --git a/cde/lib/DtSearch/raima/dblfcns.c b/cde/lib/DtSearch/raima/dblfcns.c index 0a201fbc..ac229037 100644 --- a/cde/lib/DtSearch/raima/dblfcns.c +++ b/cde/lib/DtSearch/raima/dblfcns.c @@ -419,9 +419,7 @@ int taskinit(tsk) TASK *tsk; { byteset(tsk, '\0', sizeof(TASK)); -#ifndef ONE_DB tsk->No_of_dbs = 1; -#endif #ifndef SINGLE_USER tsk->Lock_tries = 5; tsk->Dbwait_time = 1; @@ -446,12 +444,9 @@ const char *dbnames; int dbt_lc; /* loop control */ char dbfile [DtSrFILENMLEN]; char *ptr; -#ifndef ONE_DB const char *cp; int i; -#endif -#ifndef ONE_DB /* compute number of databases to be opened */ old_no_of_dbs = (( no_of_dbs == 1 ) ? 0 : no_of_dbs); for ( cp = dbnames; *cp; ++cp ) @@ -498,9 +493,6 @@ const char *dbnames; for ( i = 0; *cp && *cp != ';'; ++cp, ++i ) dbfile[i] = *cp; dbfile[i] = '\0'; -#else - strcpy(dbfile, dbnames); -#endif if ( (ptr = strrchr(dbfile, DIRCHAR)) == NULL ) ptr = strrchr(dbfile, ':'); if ( ptr ) { @@ -514,9 +506,7 @@ const char *dbnames; strcpy(DB_REF(db_path), ""); strcpy(DB_REF(db_name), dbfile); } -#ifndef ONE_DB } -#endif return( db_status = S_OKAY ); } /* initdbt() */ @@ -959,11 +949,9 @@ TASK_DECL #ifndef NO_TIMESTAMP cr_time = 0; #endif -#ifndef ONE_DB setdb_on = FALSE; curr_db = 0; no_of_dbs = 1; -#endif #ifndef SINGLE_USER lock_tries = 5; dbwait_time = 1; @@ -1137,7 +1125,6 @@ void termfree() FREE(&db_global.Free_pkt); } #endif -#ifndef ONE_DB if ( db_table ) { MEM_UNLOCK(&db_global.Db_table); FREE(&db_global.Db_table); @@ -1146,7 +1133,6 @@ void termfree() MEM_UNLOCK(&db_global.Rn_table); FREE(&db_global.Rn_table); } -#endif } #ifndef NO_TRANS @@ -2344,13 +2330,11 @@ unsigned old_size; return( dberr(S_NOMEMORY) ); } byteset(&Temp_table.ptr[old_size], 0, new_size - old_size); -#ifndef ONE_DB if ( old_size ) { bytecpy(Temp_table.ptr, table, old_size); MEM_UNLOCK(Table); FREE(Table); } -#endif *Table = Temp_table; return( db_status ); } diff --git a/cde/lib/DtSearch/raima/dbtype.h b/cde/lib/DtSearch/raima/dbtype.h index 1e5cc541..7934d8a9 100644 --- a/cde/lib/DtSearch/raima/dbtype.h +++ b/cde/lib/DtSearch/raima/dbtype.h @@ -320,7 +320,6 @@ typedef struct KEY_ENTRY_S { INT kt_sort; /* 'a' = ascending, 'd' = descending */ } KEY_ENTRY; -#ifndef ONE_DB /* database table entry declaration */ typedef struct DB_ENTRY_S { char db_name[DBNMLEN]; /* name of this database */ @@ -359,17 +358,6 @@ typedef struct RN_ENTRY_S { #define DBN_PARM , dbn #define DBN_ONLY dbn #define DBN_DECL int dbn; -#else -#define DB_REF(item) (db_global.item) -#define RN_REF(item) (db_global.item) -#define NUM2INT(num, offset) (num) -#define NUM2EXT(num, offset) (num) -#define ORIGIN(offset) (0) -#define CURR_DB_PARM /**/ -#define DBN_PARM /**/ -#define DBN_ONLY /**/ -#define DBN_DECL /**/ -#endif #define TABLE_SIZE(size) DB_REF(size) /* DBN_PARM... and TASK_PARM... are used for function interfaces */ diff --git a/cde/lib/DtSearch/raima/dbxtrn.h b/cde/lib/DtSearch/raima/dbxtrn.h index 813f9365..4752698e 100644 --- a/cde/lib/DtSearch/raima/dbxtrn.h +++ b/cde/lib/DtSearch/raima/dbxtrn.h @@ -53,7 +53,6 @@ /* Database Dictionary Tables */ extern INT largest_page; -#ifndef ONE_DB extern INT old_size_ft; extern INT old_size_fd; extern INT old_size_st; @@ -62,16 +61,6 @@ extern INT old_size_srt; extern INT old_size_kt; extern INT old_size_rt; extern INT old_no_of_dbs; -#else -#define old_size_ft 0 -#define old_size_fd 0 -#define old_size_st 0 -#define old_size_mt 0 -#define old_size_srt 0 -#define old_size_kt 0 -#define old_size_rt 0 -#define old_no_of_dbs 0 -#endif extern char *crloc; /* location in page buffer of current record */ @@ -132,10 +121,8 @@ typedef struct TASK_S { llist Ren_list; /* Ren_list = LLIST_INIT() */ /* The following global variables came from inittab.h */ INT Page_size; -#ifndef ONE_DB int Curr_db; DB_ENTRY *Curr_db_table; -#endif DB_ADDR Curr_rec; /* current record address */ DB_ADDR_P Curr_own; /* current set owners array */ DB_ADDR_P Curr_mem; /* current set members array */ @@ -148,23 +135,11 @@ typedef struct TASK_S { BOOLEAN Db_tssets; #endif FILE_NO Ov_file; -#ifndef ONE_DB BOOLEAN Setdb_on; INT No_of_dbs; RN_ENTRY_P 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 */ - INT Ft_offset; -#endif -#ifndef ONE_DB DB_ENTRY_P Db_table; -#else - char db_name[DBNMLEN]; /* name of this database */ - char db_path[PATHLEN]; /* name of path to this database */ - DB_ADDR sysdba; /* database address of system record */ -#endif FILE_ENTRY_P File_table; INT Size_ft; RECORD_ENTRY_P Record_table; @@ -258,11 +233,9 @@ typedef struct TASK_S { #define db_tssets db_global.Db_tssets #endif #define ov_file db_global.Ov_file -#ifndef ONE_DB #define setdb_on db_global.Setdb_on #define no_of_dbs db_global.No_of_dbs #define curr_rn_table db_global.Curr_rn_table -#endif #define size_ft db_global.Size_ft #define size_rt db_global.Size_rt #define size_st db_global.Size_st diff --git a/cde/lib/DtSearch/raima/delete.c b/cde/lib/DtSearch/raima/delete.c index cec1651f..b8e42365 100644 --- a/cde/lib/DtSearch/raima/delete.c +++ b/cde/lib/DtSearch/raima/delete.c @@ -80,9 +80,7 @@ DBN_DECL if (rt < 0) RETURN( dberr(S_INVADDR) ); rt &= ~RLBMASK; /* mask off rlb */ -#ifndef ONE_DB rt += curr_db_table->rt_offset; -#endif /* make sure this is not the system record */ if ( record_table[rt].rt_fdtot == -1 ) diff --git a/cde/lib/DtSearch/raima/dproto.h b/cde/lib/DtSearch/raima/dproto.h index 9eba4bd4..6e4333f7 100644 --- a/cde/lib/DtSearch/raima/dproto.h +++ b/cde/lib/DtSearch/raima/dproto.h @@ -292,9 +292,7 @@ int d_rlbclr(P0); /* dblfcns.c */ int d_rlbset(P0); /* dblfcns.c */ int d_rlbtst(P0); /* dblfcns.c */ int d_set_dberr(P1(FARPROC)); /* dberr.c */ -#ifndef ONE_DB /* ONE_DB */ 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 *) DBN_Dn); /* makenew.c */ int d_setlock(P1(int) Pi(char *) DBN_Dn); /* dblfcns.c */ diff --git a/cde/lib/DtSearch/raima/initial.c b/cde/lib/DtSearch/raima/initial.c index 8cf1b576..270ce019 100644 --- a/cde/lib/DtSearch/raima/initial.c +++ b/cde/lib/DtSearch/raima/initial.c @@ -137,9 +137,7 @@ DBN_DECL time (&local_timestamp); extern_timestamp = htonl ((LONG) local_timestamp); -#ifndef ONE_DB fno += curr_db_table->ft_offset; -#endif file_ptr = &file_table[fno]; /* If file is open - close it */ diff --git a/cde/lib/DtSearch/raima/inittab.c b/cde/lib/DtSearch/raima/inittab.c index 30d5f405..0a8fa32a 100644 --- a/cde/lib/DtSearch/raima/inittab.c +++ b/cde/lib/DtSearch/raima/inittab.c @@ -105,11 +105,7 @@ inittab() int dbf; FILE_ENTRY *file_ptr; FIELD_ENTRY *fld_ptr; -#ifndef ONE_DB #define DB_ENABLE 1 -#else -#define DB_ENABLE 0 -#endif #ifndef NO_TIMESTAMP #define TS_ENABLE 1 #else @@ -119,11 +115,9 @@ inittab() RECORD_ENTRY *rec_ptr; SET_ENTRY *set_ptr; #endif -#ifndef ONE_DB MEMBER_ENTRY *mem_ptr; SORT_ENTRY *srt_ptr; KEY_ENTRY *key_ptr; -#endif #ifndef NO_TIMESTAMP db_tsrecs = db_tssets = FALSE; @@ -131,10 +125,8 @@ inittab() size_ft = size_rt = size_st = size_mt = size_srt = size_fd = size_kt = 0; /* compute individual dictionary sizes and offsets */ -#ifndef ONE_DB for (dbt_lc = 0, curr_db_table = &db_table[old_no_of_dbs]; dbt_lc < no_of_dbs; ++dbt_lc, ++curr_db_table) { -#endif /* form database dictionary name */ if ( DB_REF(db_path[0]) ) @@ -214,7 +206,6 @@ goodver: DB_REF(sysdba) = NULL_DBA; -#ifndef ONE_DB /* update merged dictionary offsets and sizes */ if ( curr_db_table->Page_size > page_size ) { page_size = curr_db_table->Page_size; @@ -242,16 +233,13 @@ goodver: curr_db_table->kt_offset = size_kt; size_kt += curr_db_table->Size_kt; } -#endif /* allocate dictionary space */ if ( alloc_dict() != S_OKAY ) return( db_status ); /* read in and adjust dictionary entries for each database */ -#ifndef ONE_DB for (dbt_lc = 0, curr_db_table = &db_table[old_no_of_dbs]; dbt_lc < no_of_dbs; ++dbt_lc, ++curr_db_table) { -#endif /* form database dictionary name */ if ( DB_REF(db_path[0]) ) @@ -450,9 +438,7 @@ goodver: #ifdef DEBUG_INITTAB dump_init_tables = FALSE; #endif -#ifndef ONE_DB curr_db_table->key_offset = key_offset; -#endif /* update file table path entries */ if ( DB_REF(db_path[0]) || dbfpath[0] ) { @@ -481,16 +467,11 @@ goodver: for (i = ORIGIN(rt_offset), rec_ptr = &record_table[ORIGIN(rt_offset)]; i < ORIGIN(rt_offset) + DB_REF(Size_rt); ++i, ++rec_ptr) { -#ifndef ONE_DB rec_ptr->rt_file += curr_db_table->ft_offset; rec_ptr->rt_fields += curr_db_table->fd_offset; -#endif #ifndef NO_TIMESTAMP if ( rec_ptr->rt_flags & TIMESTAMPED ) { db_tsrecs = TRUE; -#ifdef ONE_DB - break; -#endif } #endif } @@ -500,17 +481,13 @@ goodver: fld_ptr = &field_table[ORIGIN(fd_offset)]; i < ORIGIN(fd_offset) + DB_REF(Size_fd); ++i, ++fld_ptr) { -#ifndef ONE_DB fld_ptr->fd_rec += curr_db_table->rt_offset; -#endif if ( fld_ptr->fd_key != NOKEY ) { fld_ptr->fd_keyno += key_offset; ++key_count; -#ifndef ONE_DB fld_ptr->fd_keyfile += curr_db_table->ft_offset; if ( fld_ptr->fd_type == 'k' ) fld_ptr->fd_ptr += curr_db_table->kt_offset; -#endif } } key_offset += key_count; @@ -520,22 +497,16 @@ goodver: for (i = ORIGIN(st_offset), set_ptr = &set_table[ORIGIN(st_offset)]; i < ORIGIN(st_offset) + DB_REF(Size_st); ++i, ++set_ptr) { -#ifndef ONE_DB set_ptr->st_own_rt += curr_db_table->rt_offset; set_ptr->st_members += curr_db_table->mt_offset; -#endif #ifndef NO_TIMESTAMP if ( set_ptr->st_flags & TIMESTAMPED ) { db_tssets = TRUE; -#ifdef ONE_DB - break; -#endif } #endif } #endif -#ifndef ONE_DB /* adjust member table entries */ for (i = curr_db_table->mt_offset, mem_ptr = &member_table[curr_db_table->mt_offset]; @@ -563,7 +534,6 @@ goodver: key_ptr->kt_field += curr_db_table->fd_offset; } } /* end loop for each database */ -#endif initcurr(); return( db_status ); } @@ -577,9 +547,7 @@ static int alloc_dict() int old_size; int new_size; int extra_file = 0; -#ifndef ONE_DB DB_ENTRY *db_ptr; -#endif /* allocate and initialize file_table */ #ifndef NO_TRANS @@ -588,7 +556,6 @@ static int alloc_dict() } #endif -#ifndef ONE_DB if ( old_no_of_dbs == 0 ) { old_size_ft = 0; old_size_fd = 0; @@ -608,7 +575,6 @@ static int alloc_dict() old_size_kt = db_ptr->Size_kt + db_ptr->kt_offset; old_size_rt = db_ptr->Size_rt + db_ptr->rt_offset; } -#endif new_size = (size_ft + extra_file) * sizeof(FILE_ENTRY); old_size = old_size_ft * sizeof(FILE_ENTRY); @@ -689,17 +655,13 @@ static int initcurr() int new_size; /* Initialize current record and type */ -#ifndef ONE_DB for (dbt_lc = no_of_dbs, curr_db_table = &db_table[old_no_of_dbs], curr_rn_table = &rn_table[old_no_of_dbs]; --dbt_lc >= 0; ++curr_db_table, ++curr_rn_table) { DB_REF(curr_dbt_rec) = NULL_DBA; -#endif RN_REF(rn_dba) = NULL_DBA; RN_REF(rn_type) = -1; -#ifndef ONE_DB } -#endif if ( size_st ) { new_size = size_st * sizeof(DB_ADDR); @@ -733,10 +695,8 @@ static int initcurr() } #endif /* for each db make system record as curr_own of its sets */ -#ifndef ONE_DB for (dbt_lc = no_of_dbs, curr_db_table = &db_table[old_no_of_dbs]; --dbt_lc >= 0; ++curr_db_table) { -#endif for (rec = ORIGIN(rt_offset), rec_ptr = &record_table[ORIGIN(rt_offset)]; rec < ORIGIN(rt_offset) + DB_REF(Size_rt); @@ -756,21 +716,16 @@ static int initcurr() } } DB_REF(sysdba) = curr_rec; -#ifndef ONE_DB DB_REF(curr_dbt_rec) = curr_rec; -#endif break; } } -#ifndef ONE_DB } -#endif } else { curr_own = NULL; curr_mem = NULL; } -#ifndef ONE_DB curr_db = 0; MEM_LOCK(&db_global.Db_table); curr_db_table = db_table; @@ -778,7 +733,6 @@ static int initcurr() curr_rn_table = rn_table; setdb_on = FALSE; curr_rec = DB_REF(curr_dbt_rec); -#endif return( db_status = S_OKAY ); } /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin inittab.c */ diff --git a/cde/lib/DtSearch/raima/inittab.h b/cde/lib/DtSearch/raima/inittab.h index 4c2b5013..f1aa1eb1 100644 --- a/cde/lib/DtSearch/raima/inittab.h +++ b/cde/lib/DtSearch/raima/inittab.h @@ -69,7 +69,6 @@ INT largest_page = 0; char *crloc = NULL; -#ifndef ONE_DB INT old_size_ft = 0; INT old_size_fd = 0; INT old_size_st = 0; @@ -78,7 +77,6 @@ INT old_size_srt = 0; INT old_size_kt = 0; INT old_size_rt = 0; INT old_no_of_dbs = 0; -#endif /* Compatible dictionary versions */ char *compat_dbd[] = { diff --git a/cde/lib/DtSearch/raima/keyfcns.c b/cde/lib/DtSearch/raima/keyfcns.c index 3f8ce7d9..025a1b3e 100644 --- a/cde/lib/DtSearch/raima/keyfcns.c +++ b/cde/lib/DtSearch/raima/keyfcns.c @@ -127,9 +127,6 @@ 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 *curkey; static int key_len; @@ -141,9 +138,7 @@ static int keyfile; static INT fldno; static FIELD_ENTRY *cfld_ptr; static INT keyno; -#ifndef ONE_DB static INT prefix; -#endif static int unique; @@ -249,9 +244,7 @@ int field; /* field number to be processed */ fldno = field; cfld_ptr = fld_ptr; keyno = fld_ptr->fd_keyno; -#ifndef ONE_DB prefix = keyno - curr_db_table->key_offset; -#endif key_len = fld_ptr->fd_len; keyfile = fld_ptr->fd_keyfile; file_ptr = &file_table[keyfile]; @@ -775,9 +768,7 @@ NODE *l_node; /* left node buffer */ /* extract middle key */ l_node_slot_ptr = &l_node->slots[mid_slot*slot_len]; bytecpy(&prefix, l_node_slot_ptr + sizeof(F_ADDR), sizeof(INT)); -#ifndef ONE_DB keyno = prefix + curr_db_table->key_offset; -#endif fldno = key_info[keyno].fldno; cfld_ptr = &field_table[fldno]; key_len = cfld_ptr->fd_len; diff --git a/cde/lib/DtSearch/raima/libfcns.c b/cde/lib/DtSearch/raima/libfcns.c index 4288f905..a335981c 100644 --- a/cde/lib/DtSearch/raima/libfcns.c +++ b/cde/lib/DtSearch/raima/libfcns.c @@ -68,7 +68,6 @@ static int rec_okay(P1(int) Pi(int *) static int ctblcmp(P1(const unsigned char FAR*) Pi(const unsigned char FAR*) Pi(int)); -#ifndef ONE_DB /* Check for valid db number and set curr_db, curr_db_table and curr_rn_table */ int @@ -88,7 +87,6 @@ int dbn; } return( db_status = S_OKAY ); } -#endif /* Check for valid (external) set number and return (internal) set number diff --git a/cde/lib/DtSearch/raima/proto.h b/cde/lib/DtSearch/raima/proto.h index 5a2fdeb7..23263b53 100644 --- a/cde/lib/DtSearch/raima/proto.h +++ b/cde/lib/DtSearch/raima/proto.h @@ -217,9 +217,7 @@ int key_bldcom(P1(int) Pi(char *) Pi(char *) 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 * *)); int nfld_check(P1(long) Pi(int *) Pi(int *) Pi(RECORD_ENTRY * *) diff --git a/cde/lib/DtSearch/raima/recfcns.c b/cde/lib/DtSearch/raima/recfcns.c index 1be30b3b..6c0b41be 100644 --- a/cde/lib/DtSearch/raima/recfcns.c +++ b/cde/lib/DtSearch/raima/recfcns.c @@ -223,9 +223,7 @@ char *data; /* pointer to data area to contain field contents */ rlb_status = S_UNLOCKED; } #endif -#ifndef ONE_DB rn += curr_db_table->rt_offset; -#endif if ( fld_ptr->fd_rec != rn ) return( dberr(S_INVFLD) ); diff --git a/cde/lib/DtSearch/raima/recfrst.c b/cde/lib/DtSearch/raima/recfrst.c index 84a03150..deb55d86 100644 --- a/cde/lib/DtSearch/raima/recfrst.c +++ b/cde/lib/DtSearch/raima/recfrst.c @@ -68,9 +68,7 @@ DBN_DECL if (nrec_check(rec, &rec, (RECORD_ENTRY * *)&rec_ptr) != S_OKAY) RETURN( db_status ); -#ifndef ONE_DB rec -= curr_db_table->rt_offset; -#endif /* get the normalized number of file containing this record type */ ftype = NUM2EXT(rec_ptr->rt_file, ft_offset); diff --git a/cde/lib/DtSearch/raima/recstat.c b/cde/lib/DtSearch/raima/recstat.c index 4afc60d7..00c45654 100644 --- a/cde/lib/DtSearch/raima/recstat.c +++ b/cde/lib/DtSearch/raima/recstat.c @@ -69,9 +69,7 @@ TASK_DECL bytecpy(&rec, ptr, sizeof(INT)); if ( rec >= 0 ) { rec &= ~RLBMASK; /* mask off rlb */ -#ifndef ONE_DB rec += curr_db_table->rt_offset; -#endif if ( record_table[rec].rt_flags & TIMESTAMPED ) { bytecpy(&cts, ptr + RECCRTIME, sizeof(ULONG)); if ( cts > rts ) diff --git a/cde/lib/DtSearch/raima/recwrite.c b/cde/lib/DtSearch/raima/recwrite.c index f47fa3ec..c024ff7c 100644 --- a/cde/lib/DtSearch/raima/recwrite.c +++ b/cde/lib/DtSearch/raima/recwrite.c @@ -84,9 +84,7 @@ DBN_DECL /* Copy record type from record */ bytecpy(&rt, crloc, sizeof(INT)); rt &= ~RLBMASK; /* mask off rlb */ -#ifndef ONE_DB rt += curr_db_table->rt_offset; -#endif rec_ptr = &record_table[rt]; /* Check out each field before they are changed */ diff --git a/cde/lib/DtSearch/raima/renfile.c b/cde/lib/DtSearch/raima/renfile.c index 53e77bbd..f753efd8 100644 --- a/cde/lib/DtSearch/raima/renfile.c +++ b/cde/lib/DtSearch/raima/renfile.c @@ -92,21 +92,15 @@ renfiles() { int dbt_lc; /* loop control */ REN_ENTRY_P *rp; -#ifndef ONE_DB 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 *)ll_next(&ren_list)) != NULL) { MEM_LOCK(&rp->ptr->Ren_db_name); MEM_LOCK(&rp->ptr->File_name); -#ifndef ONE_DB for (dbt_lc = no_of_dbs, curr_db_table = db_table; --dbt_lc >= 0; ++curr_db_table) { -#endif if (strcmp(rp->ptr->Ren_db_name.ptr, DB_REF(db_name)) == 0) { if ( rp->ptr->file_no < 0 || rp->ptr->file_no >= DB_REF(Size_ft) ) { MEM_UNLOCK(&rp->ptr->Ren_db_name); @@ -118,21 +112,15 @@ renfiles() } strcpy(file_table[NUM2INT(rp->ptr->file_no, ft_offset)].ft_name, rp->ptr->File_name.ptr); -#ifndef ONE_DB break; -#endif } -#ifndef ONE_DB } -#endif MEM_UNLOCK(&rp->ptr->Ren_db_name); MEM_UNLOCK(&rp->ptr->File_name); FREE(&rp->ptr->Ren_db_name); FREE(&rp->ptr->File_name); } -#ifndef ONE_DB curr_db_table = db_ptr; -#endif } ll_deaccess(&ren_list); ll_free(&ren_list); diff --git a/cde/lib/DtSearch/raima/setdb.c b/cde/lib/DtSearch/raima/setdb.c index 4360f0d4..cbb06cc6 100644 --- a/cde/lib/DtSearch/raima/setdb.c +++ b/cde/lib/DtSearch/raima/setdb.c @@ -49,7 +49,6 @@ #include "vista.h" #include "dbtype.h" -#ifndef ONE_DB /* Set current database */ int @@ -72,5 +71,4 @@ TASK_DECL RETURN( db_status = S_OKAY ); } -#endif /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin setdb.c */ diff --git a/cde/lib/DtSearch/raima/startup.c b/cde/lib/DtSearch/raima/startup.c index 58f93ab6..6688f492 100644 --- a/cde/lib/DtSearch/raima/startup.c +++ b/cde/lib/DtSearch/raima/startup.c @@ -56,11 +56,9 @@ LOCK_DECL taskinit(&db_global); db_glob_init = 1; } -#ifndef ONE_DB if ( dbn >= 0 && dbn_check(dbn) != S_OKAY ) { return( db_status ); } -#endif return( db_status ); } /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin startup.c */ diff --git a/cde/lib/DtSearch/raima/task.h b/cde/lib/DtSearch/raima/task.h index a743bfb0..9d7e3b70 100644 --- a/cde/lib/DtSearch/raima/task.h +++ b/cde/lib/DtSearch/raima/task.h @@ -389,9 +389,7 @@ int EXTERNAL_FIXED dt_rlbclr(TASK_D1); /* dblfcns.c */ int EXTERNAL_FIXED dt_rlbset(TASK_D1); /* dblfcns.c */ int EXTERNAL_FIXED dt_rlbtst(TASK_D1); /* dblfcns.c */ int EXTERNAL_FIXED dt_set_dberr(P1(FARPROC) TASK_Di); /* dberr.c */ -#ifndef ONE_DB 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 *) TASK_Di DBN_Dn); /* makenew.c */ @@ -445,9 +443,7 @@ int EXTERNAL_DBN dt_utscs(P1(int) Pi(ULONG *) TASK_Di DBN_Dn); #define d_renfile(a, b, c) dt_renfile(a, b, c CURRTASK_PARM) #define d_retries(a) dt_retries(a CURRTASK_PARM) #define d_set_dberr(a, b) dt_set_dberr(a, b, CURRTASK_PARM) -#ifndef ONE_DB #define d_setdb(a) dt_setdb(a CURRTASK_PARM) -#endif #define d_timeout(a) dt_timeout(a CURRTASK_PARM) #define d_trabort() dt_trabort(CURRTASK_ONLY) #define d_trbegin(a) dt_trbegin(a CURRTASK_PARM) diff --git a/cde/lib/DtSearch/raima/utscm.c b/cde/lib/DtSearch/raima/utscm.c index d527290a..8c49b401 100644 --- a/cde/lib/DtSearch/raima/utscm.c +++ b/cde/lib/DtSearch/raima/utscm.c @@ -78,9 +78,7 @@ DBN_DECL bytecpy(&rec, rptr, sizeof(INT)); if ( rec >= 0 ) { rec &= ~RLBMASK; /* mask off rlb */ -#ifndef ONE_DB rec += curr_db_table->rt_offset; -#endif if ( record_table[rec].rt_flags & TIMESTAMPED ) bytecpy(timestamp, rptr + RECUPTIME, sizeof(ULONG)); else diff --git a/cde/lib/DtSearch/raima/utsco.c b/cde/lib/DtSearch/raima/utsco.c index 41b8cbba..977e4b58 100644 --- a/cde/lib/DtSearch/raima/utsco.c +++ b/cde/lib/DtSearch/raima/utsco.c @@ -78,9 +78,7 @@ DBN_DECL bytecpy(&rec, rptr, sizeof(INT)); if ( rec >= 0 ) { rec &= ~RLBMASK; /* mask off rlb */ -#ifndef ONE_DB rec += curr_db_table->rt_offset; -#endif if ( record_table[rec].rt_flags & TIMESTAMPED ) bytecpy(timestamp, rptr + RECUPTIME, sizeof(ULONG)); else diff --git a/cde/lib/DtSearch/raima/utscr.c b/cde/lib/DtSearch/raima/utscr.c index d7e986ed..3b84f7ce 100644 --- a/cde/lib/DtSearch/raima/utscr.c +++ b/cde/lib/DtSearch/raima/utscr.c @@ -76,9 +76,7 @@ TASK_DECL bytecpy(&rec, crloc, sizeof(INT)); if ( rec >= 0 ) { rec &= ~RLBMASK; /* mask off rlb */ -#ifndef ONE_DB rec += curr_db_table->rt_offset; -#endif if ( record_table[rec].rt_flags & TIMESTAMPED ) bytecpy(timestamp, crloc + RECUPTIME, sizeof(ULONG)); else -- 2.25.1