libDtSearch: Remove define ONE_DB which is always off for CDE
authorPeter Howkins <flibble@users.sf.net>
Thu, 28 Jun 2018 23:34:56 +0000 (00:34 +0100)
committerPeter Howkins <flibble@users.sf.net>
Thu, 28 Jun 2018 23:34:56 +0000 (00:34 +0100)
25 files changed:
cde/lib/DtSearch/raima/connect.c
cde/lib/DtSearch/raima/csmset.c
cde/lib/DtSearch/raima/csoset.c
cde/lib/DtSearch/raima/dblfcns.c
cde/lib/DtSearch/raima/dbtype.h
cde/lib/DtSearch/raima/dbxtrn.h
cde/lib/DtSearch/raima/delete.c
cde/lib/DtSearch/raima/dproto.h
cde/lib/DtSearch/raima/initial.c
cde/lib/DtSearch/raima/inittab.c
cde/lib/DtSearch/raima/inittab.h
cde/lib/DtSearch/raima/keyfcns.c
cde/lib/DtSearch/raima/libfcns.c
cde/lib/DtSearch/raima/proto.h
cde/lib/DtSearch/raima/recfcns.c
cde/lib/DtSearch/raima/recfrst.c
cde/lib/DtSearch/raima/recstat.c
cde/lib/DtSearch/raima/recwrite.c
cde/lib/DtSearch/raima/renfile.c
cde/lib/DtSearch/raima/setdb.c
cde/lib/DtSearch/raima/startup.c
cde/lib/DtSearch/raima/task.h
cde/lib/DtSearch/raima/utscm.c
cde/lib/DtSearch/raima/utsco.c
cde/lib/DtSearch/raima/utscr.c

index 27d8a08c962bca7a0e0c9cce5717019393f89e19..d710fbbc58c44f22ff75512afadf65fdf772230c 100644 (file)
@@ -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;
index 2fd0f5452382de9c9770a4087226b6560318f540..abb04bf8b734e9a98b52e80b97cbd471d329ce6d 100644 (file)
@@ -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];
index 6deab9695787d46c21b19a9a98827f4537bba326..8937c21030a0da862a23628dc43477e2ae89cddd 100644 (file)
@@ -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 ) );
index 0a201fbca05f19eb7d2e99da425bd89091cd119d..ac2290372db31acecb1fe61badaccb6af479e29b 100644 (file)
@@ -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 );
 }
index 1e5cc541d1ad63aa5d227aceb31bfabfd5adf550..7934d8a928887d36c3a9aee5e557cd265cf4c051 100644 (file)
@@ -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 */
index 813f93658d40ad6fdd2482422c176580ac9a093f..4752698eed4cc57681179472f9f1570af68d66cd 100644 (file)
@@ -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
index cec1651f031108410360f01f0ebf8754a97fc9de..b8e42365b054c41928501f00b3fc3754f58c548c 100644 (file)
@@ -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 )
index 9eba4bd41ada369056c719a331084d3254ecc1f0..6e4333f73ae500b4a1254fe9f27441e9f105301e 100644 (file)
@@ -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 */
index 8cf1b576b743c6801fca267599129292f8a3e979..270ce019569100bf348e41ab6f878e87aacc43b6 100644 (file)
@@ -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 */
index 30d5f405b5668edc2ab32ea641bf7b8d1d431c5f..0a8fa32a1428e20c4c7b159d502f777b729a68ad 100644 (file)
@@ -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 */
index 4c2b501377ae55d2f4246526d0b624b4596e8a68..f1aa1eb1ffa0001ad520aee1c2868095c7cf34e9 100644 (file)
@@ -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[] = {
index 3f8ce7d9099620d0ca6a3f590805e0680b04d65a..025a1b3e4810929e6929a614b7089a938dd5214e 100644 (file)
@@ -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;
index 4288f9050a0a04afb7556ad2e532f6dab7a8a38b..a335981c9feb396bd5c6c507b792e6aee23172d5 100644 (file)
@@ -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
index 5a2fdeb726fc0a47df6a2c92632079a2563a79f2..23263b537ee13233ddba6c49a0df7e30b467b3a1 100644 (file)
@@ -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 * *) 
index 1be30b3b89c59f7d7e564f7b3a4637ffa857769d..6c0b41be79e0e19caec3c474d49f6dce2a259919 100644 (file)
@@ -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) );
index 84a03150ad3d2f4e2bd515ad2c5dad2b80537fb3..deb55d866dfde2702bbc06bb68424609e189ba34 100644 (file)
@@ -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);
index 4afc60d785e5d75282395363455475d76583408b..00c456540b3337e9099248666c06b895b07fc2bb 100644 (file)
@@ -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 )
index f47fa3ec0acf2567ff9f8ee8aa38dcd436cb4d70..c024ff7c5cc67f52e21f32e613be41ef9f170502 100644 (file)
@@ -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 */
index 53e77bbd523e373a984a1cc0dd244af76ab530f4..f753efd8e459b78f45a73fa954210b28bd8ff9a2 100644 (file)
@@ -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);
index 4360f0d4eff6e9cd982ced11926632b0c5ecf34d..cbb06cc6351fb88ceb8347f111afdab5d0640832 100644 (file)
@@ -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 */
index 58f93ab6910914e4c14f9df868bc016f4e780418..6688f4921fe94634e7e80ec0386f1ad0194bcaec 100644 (file)
@@ -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 */
index a743bfb092c2d48ed143bc06207254ac75b084c7..9d7e3b707043c6815f0d7cbf8f3c0f5bd370bda6 100644 (file)
@@ -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)
index d527290a3ade775371b8f1cdb0c2fc447bf933bd..8c49b401d6781babac5cf5f824d357c25b981340 100644 (file)
@@ -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
index 41b8cbba173e5b028b91491a0bf16aea3cad7315..977e4b584c8119d023ed880c8c206cbefcfb71f1 100644 (file)
@@ -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
index d7e986ed596e74960296ae6edd7b2a821ef24fa6..3b84f7ce495520f740cf923f889a1b16cad526d1 100644 (file)
@@ -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