mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
libDtSearch: Remove define ONE_DB which is always off for CDE
This commit is contained in:
parent
e5b3c011c6
commit
162fd49971
25 changed files with 0 additions and 162 deletions
|
@ -325,10 +325,8 @@ char *mem2; /* member record 2 */
|
||||||
rn1 &= ~RLBMASK; /* mask off rlb */
|
rn1 &= ~RLBMASK; /* mask off rlb */
|
||||||
bytecpy(&rn2, mem2, sizeof(INT));
|
bytecpy(&rn2, mem2, sizeof(INT));
|
||||||
rn2 &= ~RLBMASK; /* mask off rlb */
|
rn2 &= ~RLBMASK; /* mask off rlb */
|
||||||
#ifndef ONE_DB
|
|
||||||
rn1 += curr_db_table->rt_offset;
|
rn1 += curr_db_table->rt_offset;
|
||||||
rn2 += curr_db_table->rt_offset;
|
rn2 += curr_db_table->rt_offset;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* locate member_table entries for these record types */
|
/* locate member_table entries for these record types */
|
||||||
mt2 = mt1 = NULL;
|
mt2 = mt1 = NULL;
|
||||||
|
|
|
@ -75,9 +75,7 @@ DBN_DECL /* database number */
|
||||||
if ( dio_read( *dba, (char * *)&ptr, NOPGHOLD ) ) RETURN( db_status );
|
if ( dio_read( *dba, (char * *)&ptr, NOPGHOLD ) ) RETURN( db_status );
|
||||||
bytecpy( &type, ptr, sizeof(INT) );
|
bytecpy( &type, ptr, sizeof(INT) );
|
||||||
type &= ~RLBMASK;
|
type &= ~RLBMASK;
|
||||||
#ifndef ONE_DB
|
|
||||||
type += curr_db_table->rt_offset;
|
type += curr_db_table->rt_offset;
|
||||||
#endif
|
|
||||||
|
|
||||||
for (mem = set_ptr->st_members, memtot = mem + set_ptr->st_memtot,
|
for (mem = set_ptr->st_members, memtot = mem + set_ptr->st_memtot,
|
||||||
mem_ptr = &member_table[mem];
|
mem_ptr = &member_table[mem];
|
||||||
|
|
|
@ -74,9 +74,7 @@ DBN_DECL /* database number */
|
||||||
if ( dio_read( *dba, (char * *)&ptr , NOPGHOLD) ) RETURN( db_status );
|
if ( dio_read( *dba, (char * *)&ptr , NOPGHOLD) ) RETURN( db_status );
|
||||||
bytecpy( &type, ptr, sizeof(INT) );
|
bytecpy( &type, ptr, sizeof(INT) );
|
||||||
type &= ~RLBMASK;
|
type &= ~RLBMASK;
|
||||||
#ifndef ONE_DB
|
|
||||||
type += curr_db_table->rt_offset;
|
type += curr_db_table->rt_offset;
|
||||||
#endif
|
|
||||||
|
|
||||||
if (set_ptr->st_own_rt != type)
|
if (set_ptr->st_own_rt != type)
|
||||||
RETURN( dberr( S_INVOWN ) );
|
RETURN( dberr( S_INVOWN ) );
|
||||||
|
|
|
@ -419,9 +419,7 @@ int taskinit(tsk)
|
||||||
TASK *tsk;
|
TASK *tsk;
|
||||||
{
|
{
|
||||||
byteset(tsk, '\0', sizeof(TASK));
|
byteset(tsk, '\0', sizeof(TASK));
|
||||||
#ifndef ONE_DB
|
|
||||||
tsk->No_of_dbs = 1;
|
tsk->No_of_dbs = 1;
|
||||||
#endif
|
|
||||||
#ifndef SINGLE_USER
|
#ifndef SINGLE_USER
|
||||||
tsk->Lock_tries = 5;
|
tsk->Lock_tries = 5;
|
||||||
tsk->Dbwait_time = 1;
|
tsk->Dbwait_time = 1;
|
||||||
|
@ -446,12 +444,9 @@ const char *dbnames;
|
||||||
int dbt_lc; /* loop control */
|
int dbt_lc; /* loop control */
|
||||||
char dbfile [DtSrFILENMLEN];
|
char dbfile [DtSrFILENMLEN];
|
||||||
char *ptr;
|
char *ptr;
|
||||||
#ifndef ONE_DB
|
|
||||||
const char *cp;
|
const char *cp;
|
||||||
int i;
|
int i;
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef ONE_DB
|
|
||||||
/* compute number of databases to be opened */
|
/* compute number of databases to be opened */
|
||||||
old_no_of_dbs = (( no_of_dbs == 1 ) ? 0 : no_of_dbs);
|
old_no_of_dbs = (( no_of_dbs == 1 ) ? 0 : no_of_dbs);
|
||||||
for ( cp = dbnames; *cp; ++cp )
|
for ( cp = dbnames; *cp; ++cp )
|
||||||
|
@ -498,9 +493,6 @@ const char *dbnames;
|
||||||
for ( i = 0; *cp && *cp != ';'; ++cp, ++i )
|
for ( i = 0; *cp && *cp != ';'; ++cp, ++i )
|
||||||
dbfile[i] = *cp;
|
dbfile[i] = *cp;
|
||||||
dbfile[i] = '\0';
|
dbfile[i] = '\0';
|
||||||
#else
|
|
||||||
strcpy(dbfile, dbnames);
|
|
||||||
#endif
|
|
||||||
if ( (ptr = strrchr(dbfile, DIRCHAR)) == NULL )
|
if ( (ptr = strrchr(dbfile, DIRCHAR)) == NULL )
|
||||||
ptr = strrchr(dbfile, ':');
|
ptr = strrchr(dbfile, ':');
|
||||||
if ( ptr ) {
|
if ( ptr ) {
|
||||||
|
@ -514,9 +506,7 @@ const char *dbnames;
|
||||||
strcpy(DB_REF(db_path), "");
|
strcpy(DB_REF(db_path), "");
|
||||||
strcpy(DB_REF(db_name), dbfile);
|
strcpy(DB_REF(db_name), dbfile);
|
||||||
}
|
}
|
||||||
#ifndef ONE_DB
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return( db_status = S_OKAY );
|
return( db_status = S_OKAY );
|
||||||
} /* initdbt() */
|
} /* initdbt() */
|
||||||
|
|
||||||
|
@ -959,11 +949,9 @@ TASK_DECL
|
||||||
#ifndef NO_TIMESTAMP
|
#ifndef NO_TIMESTAMP
|
||||||
cr_time = 0;
|
cr_time = 0;
|
||||||
#endif
|
#endif
|
||||||
#ifndef ONE_DB
|
|
||||||
setdb_on = FALSE;
|
setdb_on = FALSE;
|
||||||
curr_db = 0;
|
curr_db = 0;
|
||||||
no_of_dbs = 1;
|
no_of_dbs = 1;
|
||||||
#endif
|
|
||||||
#ifndef SINGLE_USER
|
#ifndef SINGLE_USER
|
||||||
lock_tries = 5;
|
lock_tries = 5;
|
||||||
dbwait_time = 1;
|
dbwait_time = 1;
|
||||||
|
@ -1137,7 +1125,6 @@ void termfree()
|
||||||
FREE(&db_global.Free_pkt);
|
FREE(&db_global.Free_pkt);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifndef ONE_DB
|
|
||||||
if ( db_table ) {
|
if ( db_table ) {
|
||||||
MEM_UNLOCK(&db_global.Db_table);
|
MEM_UNLOCK(&db_global.Db_table);
|
||||||
FREE(&db_global.Db_table);
|
FREE(&db_global.Db_table);
|
||||||
|
@ -1146,7 +1133,6 @@ void termfree()
|
||||||
MEM_UNLOCK(&db_global.Rn_table);
|
MEM_UNLOCK(&db_global.Rn_table);
|
||||||
FREE(&db_global.Rn_table);
|
FREE(&db_global.Rn_table);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NO_TRANS
|
#ifndef NO_TRANS
|
||||||
|
@ -2344,13 +2330,11 @@ unsigned old_size;
|
||||||
return( dberr(S_NOMEMORY) );
|
return( dberr(S_NOMEMORY) );
|
||||||
}
|
}
|
||||||
byteset(&Temp_table.ptr[old_size], 0, new_size - old_size);
|
byteset(&Temp_table.ptr[old_size], 0, new_size - old_size);
|
||||||
#ifndef ONE_DB
|
|
||||||
if ( old_size ) {
|
if ( old_size ) {
|
||||||
bytecpy(Temp_table.ptr, table, old_size);
|
bytecpy(Temp_table.ptr, table, old_size);
|
||||||
MEM_UNLOCK(Table);
|
MEM_UNLOCK(Table);
|
||||||
FREE(Table);
|
FREE(Table);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
*Table = Temp_table;
|
*Table = Temp_table;
|
||||||
return( db_status );
|
return( db_status );
|
||||||
}
|
}
|
||||||
|
|
|
@ -320,7 +320,6 @@ typedef struct KEY_ENTRY_S {
|
||||||
INT kt_sort; /* 'a' = ascending, 'd' = descending */
|
INT kt_sort; /* 'a' = ascending, 'd' = descending */
|
||||||
} KEY_ENTRY;
|
} KEY_ENTRY;
|
||||||
|
|
||||||
#ifndef ONE_DB
|
|
||||||
/* database table entry declaration */
|
/* database table entry declaration */
|
||||||
typedef struct DB_ENTRY_S {
|
typedef struct DB_ENTRY_S {
|
||||||
char db_name[DBNMLEN]; /* name of this database */
|
char db_name[DBNMLEN]; /* name of this database */
|
||||||
|
@ -359,17 +358,6 @@ typedef struct RN_ENTRY_S {
|
||||||
#define DBN_PARM , dbn
|
#define DBN_PARM , dbn
|
||||||
#define DBN_ONLY dbn
|
#define DBN_ONLY dbn
|
||||||
#define DBN_DECL int 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)
|
#define TABLE_SIZE(size) DB_REF(size)
|
||||||
|
|
||||||
/* DBN_PARM... and TASK_PARM... are used for function interfaces */
|
/* DBN_PARM... and TASK_PARM... are used for function interfaces */
|
||||||
|
|
|
@ -53,7 +53,6 @@
|
||||||
/* Database Dictionary Tables */
|
/* Database Dictionary Tables */
|
||||||
extern INT largest_page;
|
extern INT largest_page;
|
||||||
|
|
||||||
#ifndef ONE_DB
|
|
||||||
extern INT old_size_ft;
|
extern INT old_size_ft;
|
||||||
extern INT old_size_fd;
|
extern INT old_size_fd;
|
||||||
extern INT old_size_st;
|
extern INT old_size_st;
|
||||||
|
@ -62,16 +61,6 @@ extern INT old_size_srt;
|
||||||
extern INT old_size_kt;
|
extern INT old_size_kt;
|
||||||
extern INT old_size_rt;
|
extern INT old_size_rt;
|
||||||
extern INT old_no_of_dbs;
|
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 */
|
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() */
|
llist Ren_list; /* Ren_list = LLIST_INIT() */
|
||||||
/* The following global variables came from inittab.h */
|
/* The following global variables came from inittab.h */
|
||||||
INT Page_size;
|
INT Page_size;
|
||||||
#ifndef ONE_DB
|
|
||||||
int Curr_db;
|
int Curr_db;
|
||||||
DB_ENTRY *Curr_db_table;
|
DB_ENTRY *Curr_db_table;
|
||||||
#endif
|
|
||||||
DB_ADDR Curr_rec; /* current record address */
|
DB_ADDR Curr_rec; /* current record address */
|
||||||
DB_ADDR_P Curr_own; /* current set owners array */
|
DB_ADDR_P Curr_own; /* current set owners array */
|
||||||
DB_ADDR_P Curr_mem; /* current set members array */
|
DB_ADDR_P Curr_mem; /* current set members array */
|
||||||
|
@ -148,23 +135,11 @@ typedef struct TASK_S {
|
||||||
BOOLEAN Db_tssets;
|
BOOLEAN Db_tssets;
|
||||||
#endif
|
#endif
|
||||||
FILE_NO Ov_file;
|
FILE_NO Ov_file;
|
||||||
#ifndef ONE_DB
|
|
||||||
BOOLEAN Setdb_on;
|
BOOLEAN Setdb_on;
|
||||||
INT No_of_dbs;
|
INT No_of_dbs;
|
||||||
RN_ENTRY_P Rn_table;
|
RN_ENTRY_P Rn_table;
|
||||||
RN_ENTRY *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 */
|
|
||||||
INT Ft_offset;
|
|
||||||
#endif
|
|
||||||
#ifndef ONE_DB
|
|
||||||
DB_ENTRY_P Db_table;
|
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;
|
FILE_ENTRY_P File_table;
|
||||||
INT Size_ft;
|
INT Size_ft;
|
||||||
RECORD_ENTRY_P Record_table;
|
RECORD_ENTRY_P Record_table;
|
||||||
|
@ -258,11 +233,9 @@ typedef struct TASK_S {
|
||||||
#define db_tssets db_global.Db_tssets
|
#define db_tssets db_global.Db_tssets
|
||||||
#endif
|
#endif
|
||||||
#define ov_file db_global.Ov_file
|
#define ov_file db_global.Ov_file
|
||||||
#ifndef ONE_DB
|
|
||||||
#define setdb_on db_global.Setdb_on
|
#define setdb_on db_global.Setdb_on
|
||||||
#define no_of_dbs db_global.No_of_dbs
|
#define no_of_dbs db_global.No_of_dbs
|
||||||
#define curr_rn_table db_global.Curr_rn_table
|
#define curr_rn_table db_global.Curr_rn_table
|
||||||
#endif
|
|
||||||
#define size_ft db_global.Size_ft
|
#define size_ft db_global.Size_ft
|
||||||
#define size_rt db_global.Size_rt
|
#define size_rt db_global.Size_rt
|
||||||
#define size_st db_global.Size_st
|
#define size_st db_global.Size_st
|
||||||
|
|
|
@ -80,9 +80,7 @@ DBN_DECL
|
||||||
if (rt < 0)
|
if (rt < 0)
|
||||||
RETURN( dberr(S_INVADDR) );
|
RETURN( dberr(S_INVADDR) );
|
||||||
rt &= ~RLBMASK; /* mask off rlb */
|
rt &= ~RLBMASK; /* mask off rlb */
|
||||||
#ifndef ONE_DB
|
|
||||||
rt += curr_db_table->rt_offset;
|
rt += curr_db_table->rt_offset;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* make sure this is not the system record */
|
/* make sure this is not the system record */
|
||||||
if ( record_table[rt].rt_fdtot == -1 )
|
if ( record_table[rt].rt_fdtot == -1 )
|
||||||
|
|
|
@ -292,9 +292,7 @@ int d_rlbclr(P0); /* dblfcns.c */
|
||||||
int d_rlbset(P0); /* dblfcns.c */
|
int d_rlbset(P0); /* dblfcns.c */
|
||||||
int d_rlbtst(P0); /* dblfcns.c */
|
int d_rlbtst(P0); /* dblfcns.c */
|
||||||
int d_set_dberr(P1(FARPROC)); /* dberr.c */
|
int d_set_dberr(P1(FARPROC)); /* dberr.c */
|
||||||
#ifndef ONE_DB /* ONE_DB */
|
|
||||||
int d_setdb(P1(int)); /* setdb.c */
|
int d_setdb(P1(int)); /* setdb.c */
|
||||||
#endif /* ONE_DB */
|
|
||||||
int d_setfree(P1(int) DBN_Dn); /* dblfcns.c */
|
int d_setfree(P1(int) DBN_Dn); /* dblfcns.c */
|
||||||
int d_setkey(P1(long) Pi(const char *) DBN_Dn); /* makenew.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_setlock(P1(int) Pi(char *) DBN_Dn); /* dblfcns.c */
|
||||||
|
|
|
@ -137,9 +137,7 @@ DBN_DECL
|
||||||
time (&local_timestamp);
|
time (&local_timestamp);
|
||||||
extern_timestamp = htonl ((LONG) local_timestamp);
|
extern_timestamp = htonl ((LONG) local_timestamp);
|
||||||
|
|
||||||
#ifndef ONE_DB
|
|
||||||
fno += curr_db_table->ft_offset;
|
fno += curr_db_table->ft_offset;
|
||||||
#endif
|
|
||||||
file_ptr = &file_table[fno];
|
file_ptr = &file_table[fno];
|
||||||
|
|
||||||
/* If file is open - close it */
|
/* If file is open - close it */
|
||||||
|
|
|
@ -105,11 +105,7 @@ inittab()
|
||||||
int dbf;
|
int dbf;
|
||||||
FILE_ENTRY *file_ptr;
|
FILE_ENTRY *file_ptr;
|
||||||
FIELD_ENTRY *fld_ptr;
|
FIELD_ENTRY *fld_ptr;
|
||||||
#ifndef ONE_DB
|
|
||||||
#define DB_ENABLE 1
|
#define DB_ENABLE 1
|
||||||
#else
|
|
||||||
#define DB_ENABLE 0
|
|
||||||
#endif
|
|
||||||
#ifndef NO_TIMESTAMP
|
#ifndef NO_TIMESTAMP
|
||||||
#define TS_ENABLE 1
|
#define TS_ENABLE 1
|
||||||
#else
|
#else
|
||||||
|
@ -119,11 +115,9 @@ inittab()
|
||||||
RECORD_ENTRY *rec_ptr;
|
RECORD_ENTRY *rec_ptr;
|
||||||
SET_ENTRY *set_ptr;
|
SET_ENTRY *set_ptr;
|
||||||
#endif
|
#endif
|
||||||
#ifndef ONE_DB
|
|
||||||
MEMBER_ENTRY *mem_ptr;
|
MEMBER_ENTRY *mem_ptr;
|
||||||
SORT_ENTRY *srt_ptr;
|
SORT_ENTRY *srt_ptr;
|
||||||
KEY_ENTRY *key_ptr;
|
KEY_ENTRY *key_ptr;
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef NO_TIMESTAMP
|
#ifndef NO_TIMESTAMP
|
||||||
db_tsrecs = db_tssets = FALSE;
|
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;
|
size_ft = size_rt = size_st = size_mt = size_srt = size_fd = size_kt = 0;
|
||||||
|
|
||||||
/* compute individual dictionary sizes and offsets */
|
/* compute individual dictionary sizes and offsets */
|
||||||
#ifndef ONE_DB
|
|
||||||
for (dbt_lc = 0, curr_db_table = &db_table[old_no_of_dbs];
|
for (dbt_lc = 0, curr_db_table = &db_table[old_no_of_dbs];
|
||||||
dbt_lc < no_of_dbs; ++dbt_lc, ++curr_db_table) {
|
dbt_lc < no_of_dbs; ++dbt_lc, ++curr_db_table) {
|
||||||
#endif
|
|
||||||
|
|
||||||
/* form database dictionary name */
|
/* form database dictionary name */
|
||||||
if ( DB_REF(db_path[0]) )
|
if ( DB_REF(db_path[0]) )
|
||||||
|
@ -214,7 +206,6 @@ goodver:
|
||||||
|
|
||||||
DB_REF(sysdba) = NULL_DBA;
|
DB_REF(sysdba) = NULL_DBA;
|
||||||
|
|
||||||
#ifndef ONE_DB
|
|
||||||
/* update merged dictionary offsets and sizes */
|
/* update merged dictionary offsets and sizes */
|
||||||
if ( curr_db_table->Page_size > page_size ) {
|
if ( curr_db_table->Page_size > page_size ) {
|
||||||
page_size = curr_db_table->Page_size;
|
page_size = curr_db_table->Page_size;
|
||||||
|
@ -242,16 +233,13 @@ goodver:
|
||||||
curr_db_table->kt_offset = size_kt;
|
curr_db_table->kt_offset = size_kt;
|
||||||
size_kt += curr_db_table->Size_kt;
|
size_kt += curr_db_table->Size_kt;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
/* allocate dictionary space */
|
/* allocate dictionary space */
|
||||||
if ( alloc_dict() != S_OKAY ) return( db_status );
|
if ( alloc_dict() != S_OKAY ) return( db_status );
|
||||||
|
|
||||||
/* read in and adjust dictionary entries for each database */
|
/* 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];
|
for (dbt_lc = 0, curr_db_table = &db_table[old_no_of_dbs];
|
||||||
dbt_lc < no_of_dbs;
|
dbt_lc < no_of_dbs;
|
||||||
++dbt_lc, ++curr_db_table) {
|
++dbt_lc, ++curr_db_table) {
|
||||||
#endif
|
|
||||||
|
|
||||||
/* form database dictionary name */
|
/* form database dictionary name */
|
||||||
if ( DB_REF(db_path[0]) )
|
if ( DB_REF(db_path[0]) )
|
||||||
|
@ -450,9 +438,7 @@ goodver:
|
||||||
#ifdef DEBUG_INITTAB
|
#ifdef DEBUG_INITTAB
|
||||||
dump_init_tables = FALSE;
|
dump_init_tables = FALSE;
|
||||||
#endif
|
#endif
|
||||||
#ifndef ONE_DB
|
|
||||||
curr_db_table->key_offset = key_offset;
|
curr_db_table->key_offset = key_offset;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* update file table path entries */
|
/* update file table path entries */
|
||||||
if ( DB_REF(db_path[0]) || dbfpath[0] ) {
|
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)];
|
for (i = ORIGIN(rt_offset), rec_ptr = &record_table[ORIGIN(rt_offset)];
|
||||||
i < ORIGIN(rt_offset) + DB_REF(Size_rt);
|
i < ORIGIN(rt_offset) + DB_REF(Size_rt);
|
||||||
++i, ++rec_ptr) {
|
++i, ++rec_ptr) {
|
||||||
#ifndef ONE_DB
|
|
||||||
rec_ptr->rt_file += curr_db_table->ft_offset;
|
rec_ptr->rt_file += curr_db_table->ft_offset;
|
||||||
rec_ptr->rt_fields += curr_db_table->fd_offset;
|
rec_ptr->rt_fields += curr_db_table->fd_offset;
|
||||||
#endif
|
|
||||||
#ifndef NO_TIMESTAMP
|
#ifndef NO_TIMESTAMP
|
||||||
if ( rec_ptr->rt_flags & TIMESTAMPED ) {
|
if ( rec_ptr->rt_flags & TIMESTAMPED ) {
|
||||||
db_tsrecs = TRUE;
|
db_tsrecs = TRUE;
|
||||||
#ifdef ONE_DB
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -500,17 +481,13 @@ goodver:
|
||||||
fld_ptr = &field_table[ORIGIN(fd_offset)];
|
fld_ptr = &field_table[ORIGIN(fd_offset)];
|
||||||
i < ORIGIN(fd_offset) + DB_REF(Size_fd);
|
i < ORIGIN(fd_offset) + DB_REF(Size_fd);
|
||||||
++i, ++fld_ptr) {
|
++i, ++fld_ptr) {
|
||||||
#ifndef ONE_DB
|
|
||||||
fld_ptr->fd_rec += curr_db_table->rt_offset;
|
fld_ptr->fd_rec += curr_db_table->rt_offset;
|
||||||
#endif
|
|
||||||
if ( fld_ptr->fd_key != NOKEY ) {
|
if ( fld_ptr->fd_key != NOKEY ) {
|
||||||
fld_ptr->fd_keyno += key_offset;
|
fld_ptr->fd_keyno += key_offset;
|
||||||
++key_count;
|
++key_count;
|
||||||
#ifndef ONE_DB
|
|
||||||
fld_ptr->fd_keyfile += curr_db_table->ft_offset;
|
fld_ptr->fd_keyfile += curr_db_table->ft_offset;
|
||||||
if ( fld_ptr->fd_type == 'k' )
|
if ( fld_ptr->fd_type == 'k' )
|
||||||
fld_ptr->fd_ptr += curr_db_table->kt_offset;
|
fld_ptr->fd_ptr += curr_db_table->kt_offset;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
key_offset += key_count;
|
key_offset += key_count;
|
||||||
|
@ -520,22 +497,16 @@ goodver:
|
||||||
for (i = ORIGIN(st_offset), set_ptr = &set_table[ORIGIN(st_offset)];
|
for (i = ORIGIN(st_offset), set_ptr = &set_table[ORIGIN(st_offset)];
|
||||||
i < ORIGIN(st_offset) + DB_REF(Size_st);
|
i < ORIGIN(st_offset) + DB_REF(Size_st);
|
||||||
++i, ++set_ptr) {
|
++i, ++set_ptr) {
|
||||||
#ifndef ONE_DB
|
|
||||||
set_ptr->st_own_rt += curr_db_table->rt_offset;
|
set_ptr->st_own_rt += curr_db_table->rt_offset;
|
||||||
set_ptr->st_members += curr_db_table->mt_offset;
|
set_ptr->st_members += curr_db_table->mt_offset;
|
||||||
#endif
|
|
||||||
#ifndef NO_TIMESTAMP
|
#ifndef NO_TIMESTAMP
|
||||||
if ( set_ptr->st_flags & TIMESTAMPED ) {
|
if ( set_ptr->st_flags & TIMESTAMPED ) {
|
||||||
db_tssets = TRUE;
|
db_tssets = TRUE;
|
||||||
#ifdef ONE_DB
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef ONE_DB
|
|
||||||
/* adjust member table entries */
|
/* adjust member table entries */
|
||||||
for (i = curr_db_table->mt_offset,
|
for (i = curr_db_table->mt_offset,
|
||||||
mem_ptr = &member_table[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;
|
key_ptr->kt_field += curr_db_table->fd_offset;
|
||||||
}
|
}
|
||||||
} /* end loop for each database */
|
} /* end loop for each database */
|
||||||
#endif
|
|
||||||
initcurr();
|
initcurr();
|
||||||
return( db_status );
|
return( db_status );
|
||||||
}
|
}
|
||||||
|
@ -577,9 +547,7 @@ static int alloc_dict()
|
||||||
int old_size;
|
int old_size;
|
||||||
int new_size;
|
int new_size;
|
||||||
int extra_file = 0;
|
int extra_file = 0;
|
||||||
#ifndef ONE_DB
|
|
||||||
DB_ENTRY *db_ptr;
|
DB_ENTRY *db_ptr;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* allocate and initialize file_table */
|
/* allocate and initialize file_table */
|
||||||
#ifndef NO_TRANS
|
#ifndef NO_TRANS
|
||||||
|
@ -588,7 +556,6 @@ static int alloc_dict()
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef ONE_DB
|
|
||||||
if ( old_no_of_dbs == 0 ) {
|
if ( old_no_of_dbs == 0 ) {
|
||||||
old_size_ft = 0;
|
old_size_ft = 0;
|
||||||
old_size_fd = 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_kt = db_ptr->Size_kt + db_ptr->kt_offset;
|
||||||
old_size_rt = db_ptr->Size_rt + db_ptr->rt_offset;
|
old_size_rt = db_ptr->Size_rt + db_ptr->rt_offset;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
new_size = (size_ft + extra_file) * sizeof(FILE_ENTRY);
|
new_size = (size_ft + extra_file) * sizeof(FILE_ENTRY);
|
||||||
old_size = old_size_ft * sizeof(FILE_ENTRY);
|
old_size = old_size_ft * sizeof(FILE_ENTRY);
|
||||||
|
@ -689,17 +655,13 @@ static int initcurr()
|
||||||
int new_size;
|
int new_size;
|
||||||
|
|
||||||
/* Initialize current record and type */
|
/* Initialize current record and type */
|
||||||
#ifndef ONE_DB
|
|
||||||
for (dbt_lc = no_of_dbs, curr_db_table = &db_table[old_no_of_dbs],
|
for (dbt_lc = no_of_dbs, curr_db_table = &db_table[old_no_of_dbs],
|
||||||
curr_rn_table = &rn_table[old_no_of_dbs];
|
curr_rn_table = &rn_table[old_no_of_dbs];
|
||||||
--dbt_lc >= 0; ++curr_db_table, ++curr_rn_table) {
|
--dbt_lc >= 0; ++curr_db_table, ++curr_rn_table) {
|
||||||
DB_REF(curr_dbt_rec) = NULL_DBA;
|
DB_REF(curr_dbt_rec) = NULL_DBA;
|
||||||
#endif
|
|
||||||
RN_REF(rn_dba) = NULL_DBA;
|
RN_REF(rn_dba) = NULL_DBA;
|
||||||
RN_REF(rn_type) = -1;
|
RN_REF(rn_type) = -1;
|
||||||
#ifndef ONE_DB
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if ( size_st ) {
|
if ( size_st ) {
|
||||||
new_size = size_st * sizeof(DB_ADDR);
|
new_size = size_st * sizeof(DB_ADDR);
|
||||||
|
@ -733,10 +695,8 @@ static int initcurr()
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
/* for each db make system record as curr_own of its sets */
|
/* 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];
|
for (dbt_lc = no_of_dbs, curr_db_table = &db_table[old_no_of_dbs];
|
||||||
--dbt_lc >= 0; ++curr_db_table) {
|
--dbt_lc >= 0; ++curr_db_table) {
|
||||||
#endif
|
|
||||||
for (rec = ORIGIN(rt_offset),
|
for (rec = ORIGIN(rt_offset),
|
||||||
rec_ptr = &record_table[ORIGIN(rt_offset)];
|
rec_ptr = &record_table[ORIGIN(rt_offset)];
|
||||||
rec < ORIGIN(rt_offset) + DB_REF(Size_rt);
|
rec < ORIGIN(rt_offset) + DB_REF(Size_rt);
|
||||||
|
@ -756,21 +716,16 @@ static int initcurr()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DB_REF(sysdba) = curr_rec;
|
DB_REF(sysdba) = curr_rec;
|
||||||
#ifndef ONE_DB
|
|
||||||
DB_REF(curr_dbt_rec) = curr_rec;
|
DB_REF(curr_dbt_rec) = curr_rec;
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifndef ONE_DB
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
curr_own = NULL;
|
curr_own = NULL;
|
||||||
curr_mem = NULL;
|
curr_mem = NULL;
|
||||||
}
|
}
|
||||||
#ifndef ONE_DB
|
|
||||||
curr_db = 0;
|
curr_db = 0;
|
||||||
MEM_LOCK(&db_global.Db_table);
|
MEM_LOCK(&db_global.Db_table);
|
||||||
curr_db_table = db_table;
|
curr_db_table = db_table;
|
||||||
|
@ -778,7 +733,6 @@ static int initcurr()
|
||||||
curr_rn_table = rn_table;
|
curr_rn_table = rn_table;
|
||||||
setdb_on = FALSE;
|
setdb_on = FALSE;
|
||||||
curr_rec = DB_REF(curr_dbt_rec);
|
curr_rec = DB_REF(curr_dbt_rec);
|
||||||
#endif
|
|
||||||
return( db_status = S_OKAY );
|
return( db_status = S_OKAY );
|
||||||
}
|
}
|
||||||
/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin inittab.c */
|
/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin inittab.c */
|
||||||
|
|
|
@ -69,7 +69,6 @@ INT largest_page = 0;
|
||||||
|
|
||||||
char *crloc = NULL;
|
char *crloc = NULL;
|
||||||
|
|
||||||
#ifndef ONE_DB
|
|
||||||
INT old_size_ft = 0;
|
INT old_size_ft = 0;
|
||||||
INT old_size_fd = 0;
|
INT old_size_fd = 0;
|
||||||
INT old_size_st = 0;
|
INT old_size_st = 0;
|
||||||
|
@ -78,7 +77,6 @@ INT old_size_srt = 0;
|
||||||
INT old_size_kt = 0;
|
INT old_size_kt = 0;
|
||||||
INT old_size_rt = 0;
|
INT old_size_rt = 0;
|
||||||
INT old_no_of_dbs = 0;
|
INT old_no_of_dbs = 0;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Compatible dictionary versions */
|
/* Compatible dictionary versions */
|
||||||
char *compat_dbd[] = {
|
char *compat_dbd[] = {
|
||||||
|
|
|
@ -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 close_slots(P1(NODE *) Pi(int) Pi(int));
|
||||||
static void key_found(P1(DB_ADDR *));
|
static void key_found(P1(DB_ADDR *));
|
||||||
|
|
||||||
#ifdef ONE_DB
|
|
||||||
#define prefix keyno
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static KEY_INFO *curkey;
|
static KEY_INFO *curkey;
|
||||||
static int key_len;
|
static int key_len;
|
||||||
|
@ -141,9 +138,7 @@ static int keyfile;
|
||||||
static INT fldno;
|
static INT fldno;
|
||||||
static FIELD_ENTRY *cfld_ptr;
|
static FIELD_ENTRY *cfld_ptr;
|
||||||
static INT keyno;
|
static INT keyno;
|
||||||
#ifndef ONE_DB
|
|
||||||
static INT prefix;
|
static INT prefix;
|
||||||
#endif
|
|
||||||
static int unique;
|
static int unique;
|
||||||
|
|
||||||
|
|
||||||
|
@ -249,9 +244,7 @@ int field; /* field number to be processed */
|
||||||
fldno = field;
|
fldno = field;
|
||||||
cfld_ptr = fld_ptr;
|
cfld_ptr = fld_ptr;
|
||||||
keyno = fld_ptr->fd_keyno;
|
keyno = fld_ptr->fd_keyno;
|
||||||
#ifndef ONE_DB
|
|
||||||
prefix = keyno - curr_db_table->key_offset;
|
prefix = keyno - curr_db_table->key_offset;
|
||||||
#endif
|
|
||||||
key_len = fld_ptr->fd_len;
|
key_len = fld_ptr->fd_len;
|
||||||
keyfile = fld_ptr->fd_keyfile;
|
keyfile = fld_ptr->fd_keyfile;
|
||||||
file_ptr = &file_table[keyfile];
|
file_ptr = &file_table[keyfile];
|
||||||
|
@ -775,9 +768,7 @@ NODE *l_node; /* left node buffer */
|
||||||
/* extract middle key */
|
/* extract middle key */
|
||||||
l_node_slot_ptr = &l_node->slots[mid_slot*slot_len];
|
l_node_slot_ptr = &l_node->slots[mid_slot*slot_len];
|
||||||
bytecpy(&prefix, l_node_slot_ptr + sizeof(F_ADDR), sizeof(INT));
|
bytecpy(&prefix, l_node_slot_ptr + sizeof(F_ADDR), sizeof(INT));
|
||||||
#ifndef ONE_DB
|
|
||||||
keyno = prefix + curr_db_table->key_offset;
|
keyno = prefix + curr_db_table->key_offset;
|
||||||
#endif
|
|
||||||
fldno = key_info[keyno].fldno;
|
fldno = key_info[keyno].fldno;
|
||||||
cfld_ptr = &field_table[fldno];
|
cfld_ptr = &field_table[fldno];
|
||||||
key_len = cfld_ptr->fd_len;
|
key_len = cfld_ptr->fd_len;
|
||||||
|
|
|
@ -68,7 +68,6 @@ static int rec_okay(P1(int) Pi(int *)
|
||||||
static int ctblcmp(P1(const unsigned char FAR*)
|
static int ctblcmp(P1(const unsigned char FAR*)
|
||||||
Pi(const unsigned char FAR*) Pi(int));
|
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
|
/* Check for valid db number and set curr_db, curr_db_table and curr_rn_table
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
|
@ -88,7 +87,6 @@ int dbn;
|
||||||
}
|
}
|
||||||
return( db_status = S_OKAY );
|
return( db_status = S_OKAY );
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* Check for valid (external) set number and return (internal) set number
|
/* Check for valid (external) set number and return (internal) set number
|
||||||
|
|
|
@ -217,9 +217,7 @@ int key_bldcom(P1(int) Pi(char *) Pi(char *) Pi(int));
|
||||||
void key_cmpcpy(P1(char *) Pi(char *) Pi(INT));
|
void key_cmpcpy(P1(char *) Pi(char *) Pi(INT));
|
||||||
|
|
||||||
/* From libfcns.c: */
|
/* From libfcns.c: */
|
||||||
#ifndef ONE_DB
|
|
||||||
int dbn_check(P1(int));
|
int dbn_check(P1(int));
|
||||||
#endif
|
|
||||||
int nset_check(P1(int) Pi(int *) Pi(SET_ENTRY * *));
|
int nset_check(P1(int) Pi(int *) Pi(SET_ENTRY * *));
|
||||||
int nfld_check(P1(long) Pi(int *) Pi(int *)
|
int nfld_check(P1(long) Pi(int *) Pi(int *)
|
||||||
Pi(RECORD_ENTRY * *)
|
Pi(RECORD_ENTRY * *)
|
||||||
|
|
|
@ -223,9 +223,7 @@ char *data; /* pointer to data area to contain field contents */
|
||||||
rlb_status = S_UNLOCKED;
|
rlb_status = S_UNLOCKED;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifndef ONE_DB
|
|
||||||
rn += curr_db_table->rt_offset;
|
rn += curr_db_table->rt_offset;
|
||||||
#endif
|
|
||||||
|
|
||||||
if ( fld_ptr->fd_rec != rn )
|
if ( fld_ptr->fd_rec != rn )
|
||||||
return( dberr(S_INVFLD) );
|
return( dberr(S_INVFLD) );
|
||||||
|
|
|
@ -68,9 +68,7 @@ DBN_DECL
|
||||||
|
|
||||||
if (nrec_check(rec, &rec, (RECORD_ENTRY * *)&rec_ptr) != S_OKAY)
|
if (nrec_check(rec, &rec, (RECORD_ENTRY * *)&rec_ptr) != S_OKAY)
|
||||||
RETURN( db_status );
|
RETURN( db_status );
|
||||||
#ifndef ONE_DB
|
|
||||||
rec -= curr_db_table->rt_offset;
|
rec -= curr_db_table->rt_offset;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* get the normalized number of file containing this record type */
|
/* get the normalized number of file containing this record type */
|
||||||
ftype = NUM2EXT(rec_ptr->rt_file, ft_offset);
|
ftype = NUM2EXT(rec_ptr->rt_file, ft_offset);
|
||||||
|
|
|
@ -69,9 +69,7 @@ TASK_DECL
|
||||||
bytecpy(&rec, ptr, sizeof(INT));
|
bytecpy(&rec, ptr, sizeof(INT));
|
||||||
if ( rec >= 0 ) {
|
if ( rec >= 0 ) {
|
||||||
rec &= ~RLBMASK; /* mask off rlb */
|
rec &= ~RLBMASK; /* mask off rlb */
|
||||||
#ifndef ONE_DB
|
|
||||||
rec += curr_db_table->rt_offset;
|
rec += curr_db_table->rt_offset;
|
||||||
#endif
|
|
||||||
if ( record_table[rec].rt_flags & TIMESTAMPED ) {
|
if ( record_table[rec].rt_flags & TIMESTAMPED ) {
|
||||||
bytecpy(&cts, ptr + RECCRTIME, sizeof(ULONG));
|
bytecpy(&cts, ptr + RECCRTIME, sizeof(ULONG));
|
||||||
if ( cts > rts )
|
if ( cts > rts )
|
||||||
|
|
|
@ -84,9 +84,7 @@ DBN_DECL
|
||||||
/* Copy record type from record */
|
/* Copy record type from record */
|
||||||
bytecpy(&rt, crloc, sizeof(INT));
|
bytecpy(&rt, crloc, sizeof(INT));
|
||||||
rt &= ~RLBMASK; /* mask off rlb */
|
rt &= ~RLBMASK; /* mask off rlb */
|
||||||
#ifndef ONE_DB
|
|
||||||
rt += curr_db_table->rt_offset;
|
rt += curr_db_table->rt_offset;
|
||||||
#endif
|
|
||||||
rec_ptr = &record_table[rt];
|
rec_ptr = &record_table[rt];
|
||||||
|
|
||||||
/* Check out each field before they are changed */
|
/* Check out each field before they are changed */
|
||||||
|
|
|
@ -92,21 +92,15 @@ renfiles()
|
||||||
{
|
{
|
||||||
int dbt_lc; /* loop control */
|
int dbt_lc; /* loop control */
|
||||||
REN_ENTRY_P *rp;
|
REN_ENTRY_P *rp;
|
||||||
#ifndef ONE_DB
|
|
||||||
DB_ENTRY *db_ptr;
|
DB_ENTRY *db_ptr;
|
||||||
#endif
|
|
||||||
|
|
||||||
if ( ll_access(&ren_list) ) {
|
if ( ll_access(&ren_list) ) {
|
||||||
#ifndef ONE_DB
|
|
||||||
db_ptr = curr_db_table; /* Have to save it because of macros */
|
db_ptr = curr_db_table; /* Have to save it because of macros */
|
||||||
#endif
|
|
||||||
while ((rp = (REN_ENTRY_P *)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->Ren_db_name);
|
||||||
MEM_LOCK(&rp->ptr->File_name);
|
MEM_LOCK(&rp->ptr->File_name);
|
||||||
#ifndef ONE_DB
|
|
||||||
for (dbt_lc = no_of_dbs, curr_db_table = db_table;
|
for (dbt_lc = no_of_dbs, curr_db_table = db_table;
|
||||||
--dbt_lc >= 0; ++curr_db_table) {
|
--dbt_lc >= 0; ++curr_db_table) {
|
||||||
#endif
|
|
||||||
if (strcmp(rp->ptr->Ren_db_name.ptr, DB_REF(db_name)) == 0) {
|
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) ) {
|
if ( rp->ptr->file_no < 0 || rp->ptr->file_no >= DB_REF(Size_ft) ) {
|
||||||
MEM_UNLOCK(&rp->ptr->Ren_db_name);
|
MEM_UNLOCK(&rp->ptr->Ren_db_name);
|
||||||
|
@ -118,21 +112,15 @@ renfiles()
|
||||||
}
|
}
|
||||||
strcpy(file_table[NUM2INT(rp->ptr->file_no, ft_offset)].ft_name,
|
strcpy(file_table[NUM2INT(rp->ptr->file_no, ft_offset)].ft_name,
|
||||||
rp->ptr->File_name.ptr);
|
rp->ptr->File_name.ptr);
|
||||||
#ifndef ONE_DB
|
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#ifndef ONE_DB
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
MEM_UNLOCK(&rp->ptr->Ren_db_name);
|
MEM_UNLOCK(&rp->ptr->Ren_db_name);
|
||||||
MEM_UNLOCK(&rp->ptr->File_name);
|
MEM_UNLOCK(&rp->ptr->File_name);
|
||||||
FREE(&rp->ptr->Ren_db_name);
|
FREE(&rp->ptr->Ren_db_name);
|
||||||
FREE(&rp->ptr->File_name);
|
FREE(&rp->ptr->File_name);
|
||||||
}
|
}
|
||||||
#ifndef ONE_DB
|
|
||||||
curr_db_table = db_ptr;
|
curr_db_table = db_ptr;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
ll_deaccess(&ren_list);
|
ll_deaccess(&ren_list);
|
||||||
ll_free(&ren_list);
|
ll_free(&ren_list);
|
||||||
|
|
|
@ -49,7 +49,6 @@
|
||||||
#include "vista.h"
|
#include "vista.h"
|
||||||
#include "dbtype.h"
|
#include "dbtype.h"
|
||||||
|
|
||||||
#ifndef ONE_DB
|
|
||||||
/* Set current database
|
/* Set current database
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
|
@ -72,5 +71,4 @@ TASK_DECL
|
||||||
|
|
||||||
RETURN( db_status = S_OKAY );
|
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 */
|
/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin setdb.c */
|
||||||
|
|
|
@ -56,11 +56,9 @@ LOCK_DECL
|
||||||
taskinit(&db_global);
|
taskinit(&db_global);
|
||||||
db_glob_init = 1;
|
db_glob_init = 1;
|
||||||
}
|
}
|
||||||
#ifndef ONE_DB
|
|
||||||
if ( dbn >= 0 && dbn_check(dbn) != S_OKAY ) {
|
if ( dbn >= 0 && dbn_check(dbn) != S_OKAY ) {
|
||||||
return( db_status );
|
return( db_status );
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return( db_status );
|
return( db_status );
|
||||||
}
|
}
|
||||||
/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin startup.c */
|
/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin startup.c */
|
||||||
|
|
|
@ -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_rlbset(TASK_D1); /* dblfcns.c */
|
||||||
int EXTERNAL_FIXED dt_rlbtst(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 */
|
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 */
|
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_setfree(P1(int) TASK_Di DBN_Dn); /* dblfcns.c */
|
||||||
int EXTERNAL_DBN dt_setkey(P1(long) Pi(const char *) TASK_Di DBN_Dn);
|
int EXTERNAL_DBN dt_setkey(P1(long) Pi(const char *) TASK_Di DBN_Dn);
|
||||||
/* makenew.c */
|
/* 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_renfile(a, b, c) dt_renfile(a, b, c CURRTASK_PARM)
|
||||||
#define d_retries(a) dt_retries(a CURRTASK_PARM)
|
#define d_retries(a) dt_retries(a CURRTASK_PARM)
|
||||||
#define d_set_dberr(a, b) dt_set_dberr(a, b, 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)
|
#define d_setdb(a) dt_setdb(a CURRTASK_PARM)
|
||||||
#endif
|
|
||||||
#define d_timeout(a) dt_timeout(a CURRTASK_PARM)
|
#define d_timeout(a) dt_timeout(a CURRTASK_PARM)
|
||||||
#define d_trabort() dt_trabort(CURRTASK_ONLY)
|
#define d_trabort() dt_trabort(CURRTASK_ONLY)
|
||||||
#define d_trbegin(a) dt_trbegin(a CURRTASK_PARM)
|
#define d_trbegin(a) dt_trbegin(a CURRTASK_PARM)
|
||||||
|
|
|
@ -78,9 +78,7 @@ DBN_DECL
|
||||||
bytecpy(&rec, rptr, sizeof(INT));
|
bytecpy(&rec, rptr, sizeof(INT));
|
||||||
if ( rec >= 0 ) {
|
if ( rec >= 0 ) {
|
||||||
rec &= ~RLBMASK; /* mask off rlb */
|
rec &= ~RLBMASK; /* mask off rlb */
|
||||||
#ifndef ONE_DB
|
|
||||||
rec += curr_db_table->rt_offset;
|
rec += curr_db_table->rt_offset;
|
||||||
#endif
|
|
||||||
if ( record_table[rec].rt_flags & TIMESTAMPED )
|
if ( record_table[rec].rt_flags & TIMESTAMPED )
|
||||||
bytecpy(timestamp, rptr + RECUPTIME, sizeof(ULONG));
|
bytecpy(timestamp, rptr + RECUPTIME, sizeof(ULONG));
|
||||||
else
|
else
|
||||||
|
|
|
@ -78,9 +78,7 @@ DBN_DECL
|
||||||
bytecpy(&rec, rptr, sizeof(INT));
|
bytecpy(&rec, rptr, sizeof(INT));
|
||||||
if ( rec >= 0 ) {
|
if ( rec >= 0 ) {
|
||||||
rec &= ~RLBMASK; /* mask off rlb */
|
rec &= ~RLBMASK; /* mask off rlb */
|
||||||
#ifndef ONE_DB
|
|
||||||
rec += curr_db_table->rt_offset;
|
rec += curr_db_table->rt_offset;
|
||||||
#endif
|
|
||||||
if ( record_table[rec].rt_flags & TIMESTAMPED )
|
if ( record_table[rec].rt_flags & TIMESTAMPED )
|
||||||
bytecpy(timestamp, rptr + RECUPTIME, sizeof(ULONG));
|
bytecpy(timestamp, rptr + RECUPTIME, sizeof(ULONG));
|
||||||
else
|
else
|
||||||
|
|
|
@ -76,9 +76,7 @@ TASK_DECL
|
||||||
bytecpy(&rec, crloc, sizeof(INT));
|
bytecpy(&rec, crloc, sizeof(INT));
|
||||||
if ( rec >= 0 ) {
|
if ( rec >= 0 ) {
|
||||||
rec &= ~RLBMASK; /* mask off rlb */
|
rec &= ~RLBMASK; /* mask off rlb */
|
||||||
#ifndef ONE_DB
|
|
||||||
rec += curr_db_table->rt_offset;
|
rec += curr_db_table->rt_offset;
|
||||||
#endif
|
|
||||||
if ( record_table[rec].rt_flags & TIMESTAMPED )
|
if ( record_table[rec].rt_flags & TIMESTAMPED )
|
||||||
bytecpy(timestamp, crloc + RECUPTIME, sizeof(ULONG));
|
bytecpy(timestamp, crloc + RECUPTIME, sizeof(ULONG));
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue