mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
libDtSearch: Untangle large numbers of TASK_ macros that were all unused code
This commit is contained in:
parent
86b9a0fee4
commit
60edbd3491
69 changed files with 100 additions and 186 deletions
|
@ -52,10 +52,9 @@
|
|||
/* Get current member type
|
||||
*/
|
||||
int
|
||||
d_cmtype(set, cmtype TASK_PARM DBN_PARM)
|
||||
d_cmtype(set, cmtype DBN_PARM)
|
||||
int set;
|
||||
int *cmtype;
|
||||
TASK_DECL
|
||||
DBN_DECL
|
||||
{
|
||||
char *mrec;
|
||||
|
|
|
@ -71,9 +71,8 @@ typedef struct {
|
|||
/* Connect the current record as member of set
|
||||
*/
|
||||
int
|
||||
d_connect(set TASK_PARM DBN_PARM)
|
||||
d_connect(set DBN_PARM)
|
||||
int set; /* Set constant */
|
||||
TASK_DECL
|
||||
DBN_DECL /* Database number */
|
||||
{
|
||||
MEM_PTR crmp; /* current record's member pointer */
|
||||
|
|
|
@ -51,10 +51,9 @@
|
|||
/* Get current owner type
|
||||
*/
|
||||
int
|
||||
d_cotype(set, cotype TASK_PARM DBN_PARM)
|
||||
d_cotype(set, cotype DBN_PARM)
|
||||
int set;
|
||||
int *cotype;
|
||||
TASK_DECL
|
||||
DBN_DECL
|
||||
{
|
||||
char *orec;
|
||||
|
|
|
@ -50,9 +50,8 @@
|
|||
/* Get current record
|
||||
*/
|
||||
int
|
||||
d_crget(dba TASK_PARM DBN_PARM)
|
||||
d_crget(dba DBN_PARM)
|
||||
DB_ADDR *dba; /* db address of record to become current */
|
||||
TASK_DECL
|
||||
DBN_DECL
|
||||
{
|
||||
DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_NOIO));
|
||||
|
|
|
@ -51,10 +51,9 @@
|
|||
/* Read data from field of current record
|
||||
*/
|
||||
int
|
||||
d_crread(field, data TASK_PARM DBN_PARM)
|
||||
d_crread(field, data DBN_PARM)
|
||||
long field; /* Field constant */
|
||||
char *data; /* Data area to contain field contents */
|
||||
TASK_DECL
|
||||
DBN_DECL /* database number */
|
||||
{
|
||||
int fld, rec;
|
||||
|
|
|
@ -50,9 +50,8 @@
|
|||
/* Set current record
|
||||
*/
|
||||
int
|
||||
d_crset(dba TASK_PARM DBN_PARM)
|
||||
d_crset(dba DBN_PARM)
|
||||
DB_ADDR *dba; /* db address of record to become current */
|
||||
TASK_DECL
|
||||
DBN_DECL
|
||||
{
|
||||
DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO));
|
||||
|
|
|
@ -50,9 +50,8 @@
|
|||
/* Get current record type
|
||||
*/
|
||||
int
|
||||
d_crtype(crtype TASK_PARM DBN_PARM)
|
||||
d_crtype(crtype DBN_PARM)
|
||||
int *crtype;
|
||||
TASK_DECL
|
||||
DBN_DECL
|
||||
{
|
||||
INT crt;
|
||||
|
|
|
@ -51,10 +51,9 @@
|
|||
/* Write data to a field in the current record
|
||||
*/
|
||||
int
|
||||
d_crwrite(field, data TASK_PARM DBN_PARM)
|
||||
d_crwrite(field, data DBN_PARM)
|
||||
long field; /* field constant */
|
||||
char *data; /* data area to contain field contents */
|
||||
TASK_DECL
|
||||
DBN_DECL /* database number */
|
||||
{
|
||||
int stat, fld, rec;
|
||||
|
|
|
@ -50,10 +50,9 @@
|
|||
/* Get current set member
|
||||
*/
|
||||
int
|
||||
d_csmget(set, dba TASK_PARM DBN_PARM)
|
||||
d_csmget(set, dba DBN_PARM)
|
||||
int set; /* Set table entry */
|
||||
DB_ADDR *dba; /* db address of record to become current */
|
||||
TASK_DECL
|
||||
DBN_DECL /* database number */
|
||||
{
|
||||
SET_ENTRY *set_ptr;
|
||||
|
|
|
@ -51,11 +51,10 @@
|
|||
/* Read data from field of current set member
|
||||
*/
|
||||
int
|
||||
d_csmread(set, field, data TASK_PARM DBN_PARM)
|
||||
d_csmread(set, field, data DBN_PARM)
|
||||
int set; /* Set constant */
|
||||
long field; /* Field constant */
|
||||
char *data; /* Data area to contain field contents */
|
||||
TASK_DECL
|
||||
DBN_DECL /* database number */
|
||||
{
|
||||
int fld, rec;
|
||||
|
|
|
@ -50,10 +50,9 @@
|
|||
/* Set current set member
|
||||
*/
|
||||
int
|
||||
d_csmset(set, dba TASK_PARM DBN_PARM)
|
||||
d_csmset(set, dba DBN_PARM)
|
||||
int set; /* Set table entry */
|
||||
DB_ADDR *dba; /* db address of record to become current */
|
||||
TASK_DECL
|
||||
DBN_DECL /* database number */
|
||||
{
|
||||
INT type;
|
||||
|
|
|
@ -51,11 +51,10 @@
|
|||
/* Write data to a field in the current set member
|
||||
*/
|
||||
int
|
||||
d_csmwrite(set, field, data TASK_PARM DBN_PARM)
|
||||
d_csmwrite(set, field, data DBN_PARM)
|
||||
int set; /* Set constant */
|
||||
long field; /* Field constant */
|
||||
const char *data; /* Data area to contain field contents */
|
||||
TASK_DECL
|
||||
DBN_DECL /* database number */
|
||||
{
|
||||
int stat, fld, rec;
|
||||
|
|
|
@ -51,10 +51,9 @@
|
|||
/* Get current set owner
|
||||
*/
|
||||
int
|
||||
d_csoget(set, dba TASK_PARM DBN_PARM)
|
||||
d_csoget(set, dba DBN_PARM)
|
||||
int set; /* Set table entry */
|
||||
DB_ADDR *dba; /* db address of record to become current */
|
||||
TASK_DECL
|
||||
DBN_DECL /* database number */
|
||||
{
|
||||
SET_ENTRY *set_ptr;
|
||||
|
|
|
@ -51,11 +51,10 @@
|
|||
/* Read data from field of current set owner
|
||||
*/
|
||||
int
|
||||
d_csoread(set, field, data TASK_PARM DBN_PARM)
|
||||
d_csoread(set, field, data DBN_PARM)
|
||||
int set; /* Set constant */
|
||||
long field; /* Field constant */
|
||||
char *data; /* Data area to contain field contents */
|
||||
TASK_DECL
|
||||
DBN_DECL /* database number */
|
||||
{
|
||||
int fld, rec;
|
||||
|
|
|
@ -51,10 +51,9 @@
|
|||
/* Set current set owner
|
||||
*/
|
||||
int
|
||||
d_csoset(set, dba TASK_PARM DBN_PARM)
|
||||
d_csoset(set, dba DBN_PARM)
|
||||
int set; /* Set table entry */
|
||||
DB_ADDR *dba; /* db address of record to become current */
|
||||
TASK_DECL
|
||||
DBN_DECL /* database number */
|
||||
{
|
||||
INT type;
|
||||
|
|
|
@ -51,11 +51,10 @@
|
|||
/* Write data to a field in the current set owner
|
||||
*/
|
||||
int
|
||||
d_csowrite(set, field, data TASK_PARM DBN_PARM)
|
||||
d_csowrite(set, field, data DBN_PARM)
|
||||
int set; /* Set constant */
|
||||
long field; /* Field constant */
|
||||
const char *data; /* Data area to contain field contents */
|
||||
TASK_DECL
|
||||
DBN_DECL /* database number */
|
||||
{
|
||||
int stat, fld, rec;
|
||||
|
|
|
@ -50,9 +50,8 @@
|
|||
/* Set Database Dictionary Path
|
||||
*/
|
||||
int
|
||||
d_dbdpath(path TASK_PARM)
|
||||
d_dbdpath(path)
|
||||
const char *path;
|
||||
TASK_DECL
|
||||
{
|
||||
DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_NONE));
|
||||
|
||||
|
|
|
@ -50,9 +50,8 @@
|
|||
/* Set Database Files Path
|
||||
*/
|
||||
int
|
||||
d_dbfpath(path TASK_PARM)
|
||||
d_dbfpath(path)
|
||||
const char *path;
|
||||
TASK_DECL
|
||||
{
|
||||
DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_NONE));
|
||||
|
||||
|
|
|
@ -209,10 +209,9 @@ static int recovery_check(P0);
|
|||
/* Open db_VISTA database
|
||||
*/
|
||||
int
|
||||
d_open(dbnames, opentype TASK_PARM)
|
||||
d_open(dbnames, opentype)
|
||||
const char *dbnames;
|
||||
const char *opentype;
|
||||
TASK_DECL
|
||||
{
|
||||
DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_ALL));
|
||||
#ifdef DEBUG_DBLF
|
||||
|
@ -222,7 +221,7 @@ TASK_DECL
|
|||
}
|
||||
#endif
|
||||
|
||||
if ( dbopen ) d_close(TASK_ONLY);
|
||||
if ( dbopen ) d_close();
|
||||
|
||||
|
||||
|
||||
|
@ -376,8 +375,7 @@ const char *dbnames;
|
|||
/* Close database
|
||||
*/
|
||||
int
|
||||
d_close(TASK_ONLY)
|
||||
TASK_DECL
|
||||
d_close()
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
|
@ -49,9 +49,8 @@
|
|||
|
||||
/* Set database log file name/path
|
||||
*/
|
||||
d_dblog(log TASK_PARM)
|
||||
d_dblog(log)
|
||||
const char *log;
|
||||
TASK_DECL
|
||||
{
|
||||
DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_NONE));
|
||||
|
||||
|
|
|
@ -52,9 +52,8 @@ static char VISTATAF[] = "vista.taf";
|
|||
|
||||
/* Set database transaction activity file name/path
|
||||
*/
|
||||
d_dbtaf(taf TASK_PARM)
|
||||
d_dbtaf(taf)
|
||||
const char *taf;
|
||||
TASK_DECL
|
||||
{
|
||||
char dbtaf[FILENMLEN];
|
||||
int len;
|
||||
|
|
|
@ -350,15 +350,6 @@ typedef struct RN_ENTRY_S {
|
|||
#define DBN_DECL int dbn;
|
||||
#define TABLE_SIZE(size) DB_REF(size)
|
||||
|
||||
/* DBN_PARM... and TASK_PARM... are used for function interfaces */
|
||||
#define TASK_PARM /**/
|
||||
#define TASK_PARM_DBN /**/
|
||||
#define TASK_ONLY /**/
|
||||
#define TASK_DECL /**/
|
||||
#define TASK_PTR_DECL /**/
|
||||
#define TASK_DBN_ONLY DBN_ONLY
|
||||
|
||||
|
||||
/* Country code table definition */
|
||||
typedef struct CNTRY_TBL_S {
|
||||
unsigned char out_chr;
|
||||
|
@ -486,17 +477,14 @@ typedef struct MESSAGE_S {
|
|||
#define COMMA
|
||||
#endif /* COMMA */
|
||||
|
||||
#define TASK_PARAM /**/
|
||||
#define TASK_ID /**/
|
||||
#define TASK_PTR_ID /**/
|
||||
#define NO_TASK_ID /**/
|
||||
|
||||
#define LOCK_PARAM /**/
|
||||
#define LOCK_PARM /**/
|
||||
#define LOCK_DECL /**/
|
||||
#define LOCK_SET(a) /**/
|
||||
|
||||
#define TDTL_PARAM DBN_PARAM TASK_PARAM LOCK_PARAM
|
||||
#define TDTL_PARAM DBN_PARAM LOCK_PARAM
|
||||
|
||||
#define DB_ENTER(TDTL_PARAM) if ( startup(TDTL_PARAM) != S_OKAY ) { return( db_status ); } else
|
||||
|
||||
|
|
|
@ -52,9 +52,8 @@
|
|||
/* Set Database User Identifier
|
||||
*/
|
||||
int
|
||||
d_dbuserid(id TASK_PARM)
|
||||
d_dbuserid(id)
|
||||
const char *id;
|
||||
TASK_DECL
|
||||
{
|
||||
const char *chk_id;
|
||||
|
||||
|
|
|
@ -53,8 +53,7 @@ static DB_ADDR zap_dba = NULL_DBA;
|
|||
/* Delete the current record, with error checking
|
||||
*/
|
||||
int
|
||||
d_delete(TASK_DBN_ONLY)
|
||||
TASK_DECL
|
||||
d_delete(dbn)
|
||||
DBN_DECL
|
||||
{
|
||||
int st_lc, mt_lc; /* loop control */
|
||||
|
|
|
@ -55,9 +55,8 @@
|
|||
of the database
|
||||
*/
|
||||
int
|
||||
d_destroy(dbname TASK_PARM)
|
||||
d_destroy(dbname)
|
||||
const char *dbname;
|
||||
TASK_DECL
|
||||
{
|
||||
int ft_lc; /* loop control */
|
||||
FILE_ENTRY *file_ptr;
|
||||
|
@ -65,7 +64,7 @@ TASK_DECL
|
|||
DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_ALL));
|
||||
|
||||
/* database must be closed (might be multiple databases open) */
|
||||
if ( dbopen ) d_close(TASK_ONLY);
|
||||
if ( dbopen ) d_close();
|
||||
|
||||
/* prepare for the inittab and read in the database tables */
|
||||
if ((initdbt(dbname) != S_OKAY) || (inittab() != S_OKAY))
|
||||
|
|
|
@ -65,9 +65,8 @@ typedef struct {
|
|||
/* Disconnect the current member of set
|
||||
*/
|
||||
int
|
||||
d_discon(nset TASK_PARM DBN_PARM)
|
||||
d_discon(nset DBN_PARM)
|
||||
int nset; /* set number */
|
||||
TASK_DECL
|
||||
DBN_DECL /* database number */
|
||||
{
|
||||
SET_PTR cosp; /* current owner's set pointer */
|
||||
|
|
|
@ -51,8 +51,7 @@
|
|||
/* Disconnect from all sets (owner and member) and delete record
|
||||
*/
|
||||
int
|
||||
d_disdel(TASK_DBN_ONLY)
|
||||
TASK_DECL
|
||||
d_disdel(dbn)
|
||||
DBN_DECL
|
||||
{
|
||||
int rectype, nset, cset;
|
||||
|
@ -65,11 +64,11 @@ DBN_DECL
|
|||
|
||||
DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
|
||||
|
||||
if ( d_crtype(&rectype TASK_PARM DBN_PARM) != S_OKAY )
|
||||
if ( d_crtype(&rectype DBN_PARM) != S_OKAY )
|
||||
RETURN( db_status );
|
||||
rectype += NUM2INT(-RECMARK, rt_offset);
|
||||
|
||||
d_crget(&dba TASK_PARM DBN_PARM);
|
||||
d_crget(&dba DBN_PARM);
|
||||
for (set = 0, set_ptr = &set_table[ORIGIN(st_offset)];
|
||||
set < TABLE_SIZE(Size_st);
|
||||
++set, ++set_ptr) {
|
||||
|
@ -81,11 +80,11 @@ DBN_DECL
|
|||
mdba = *cm_ptr;
|
||||
if (set_ptr->st_own_rt == rectype) {
|
||||
/* disconnect all member records from set s */
|
||||
d_setor(nset TASK_PARM DBN_PARM);
|
||||
while (d_findfm(nset TASK_PARM DBN_PARM) == S_OKAY)
|
||||
if (d_discon(nset TASK_PARM DBN_PARM) < S_OKAY)
|
||||
d_setor(nset DBN_PARM);
|
||||
while (d_findfm(nset DBN_PARM) == S_OKAY)
|
||||
if (d_discon(nset DBN_PARM) < S_OKAY)
|
||||
RETURN (db_status);
|
||||
d_setro(nset TASK_PARM DBN_PARM);
|
||||
d_setro(nset DBN_PARM);
|
||||
}
|
||||
for (mem = set_ptr->st_members, memtot = mem + set_ptr->st_memtot,
|
||||
mem_ptr = &member_table[mem];
|
||||
|
@ -93,9 +92,9 @@ DBN_DECL
|
|||
++mem, ++mem_ptr) {
|
||||
if (mem_ptr->mt_record == rectype) {
|
||||
/* disconnect current record from set */
|
||||
if (d_ismember(nset TASK_PARM DBN_PARM) == S_OKAY) {
|
||||
d_csmset(nset, &dba TASK_PARM DBN_PARM);
|
||||
if (d_discon(nset TASK_PARM DBN_PARM) < S_OKAY)
|
||||
if (d_ismember(nset DBN_PARM) == S_OKAY) {
|
||||
d_csmset(nset, &dba DBN_PARM);
|
||||
if (d_discon(nset DBN_PARM) < S_OKAY)
|
||||
RETURN (db_status);
|
||||
}
|
||||
}
|
||||
|
@ -113,6 +112,6 @@ DBN_DECL
|
|||
else
|
||||
*cm_ptr = mdba;
|
||||
}
|
||||
RETURN( d_delete(TASK_DBN_ONLY) );
|
||||
RETURN( d_delete(dbn) );
|
||||
}
|
||||
/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin disdel.c */
|
||||
|
|
|
@ -55,10 +55,9 @@
|
|||
/* Create and fill a new record
|
||||
*/
|
||||
int
|
||||
d_fillnew( nrec, recval TASK_PARM DBN_PARM )
|
||||
d_fillnew( nrec, recval DBN_PARM )
|
||||
int nrec; /* record number */
|
||||
const char *recval; /* record value */
|
||||
TASK_DECL
|
||||
DBN_DECL /* database number */
|
||||
{
|
||||
DB_ADDR db_addr;
|
||||
|
@ -89,7 +88,7 @@ DBN_DECL /* database number */
|
|||
else
|
||||
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);
|
||||
DBN_PARM);
|
||||
curr_rec = db_addr;
|
||||
if ( db_status == S_OKAY )
|
||||
RETURN( db_status = S_DUPLICATE );
|
||||
|
|
|
@ -50,9 +50,8 @@
|
|||
/* Find owner of current record
|
||||
*/
|
||||
int
|
||||
d_findco(nset TASK_PARM DBN_PARM)
|
||||
d_findco(nset DBN_PARM)
|
||||
int nset;
|
||||
TASK_DECL
|
||||
DBN_DECL
|
||||
{
|
||||
int set;
|
||||
|
|
|
@ -50,9 +50,8 @@
|
|||
/* Find first member of set
|
||||
*/
|
||||
int
|
||||
d_findfm(nset TASK_PARM DBN_PARM)
|
||||
d_findfm(nset DBN_PARM)
|
||||
int nset;
|
||||
TASK_DECL
|
||||
DBN_DECL
|
||||
{
|
||||
char setp[SETPSIZE];
|
||||
|
|
|
@ -50,9 +50,8 @@
|
|||
/* Find last member of set
|
||||
*/
|
||||
int
|
||||
d_findlm(nset TASK_PARM DBN_PARM)
|
||||
d_findlm(nset DBN_PARM)
|
||||
int nset;
|
||||
TASK_DECL
|
||||
DBN_DECL
|
||||
{
|
||||
char setp[SETPSIZE];
|
||||
|
|
|
@ -50,9 +50,8 @@
|
|||
/* Find next member of set
|
||||
*/
|
||||
int
|
||||
d_findnm(nset TASK_PARM DBN_PARM)
|
||||
d_findnm(nset DBN_PARM)
|
||||
int nset;
|
||||
TASK_DECL
|
||||
DBN_DECL
|
||||
{
|
||||
int set;
|
||||
|
@ -73,7 +72,7 @@ DBN_DECL
|
|||
|
||||
/* find first member if no current member */
|
||||
if ( !*(cm_ptr = &curr_mem[set]) )
|
||||
RETURN( d_findfm(nset TASK_PARM DBN_PARM) );
|
||||
RETURN( d_findfm(nset DBN_PARM) );
|
||||
|
||||
/* read current member of set and get member pointer from record */
|
||||
if ((dio_read(*cm_ptr, (char * *)&recp, NOPGHOLD) != S_OKAY) ||
|
||||
|
|
|
@ -50,9 +50,8 @@
|
|||
/* Find previous member of set
|
||||
*/
|
||||
int
|
||||
d_findpm(nset TASK_PARM DBN_PARM)
|
||||
d_findpm(nset DBN_PARM)
|
||||
int nset;
|
||||
TASK_DECL
|
||||
DBN_DECL
|
||||
{
|
||||
int set;
|
||||
|
@ -73,7 +72,7 @@ DBN_DECL
|
|||
|
||||
/* find last member if no current member */
|
||||
if ( !*(cm_ptr = &curr_mem[set]) )
|
||||
RETURN( d_findlm(nset TASK_PARM DBN_PARM) );
|
||||
RETURN( d_findlm(nset DBN_PARM) );
|
||||
|
||||
/* read current member of set and get member pointer from record */
|
||||
if ((dio_read(*cm_ptr, (char * *)&recp, NOPGHOLD) != S_OKAY) ||
|
||||
|
|
|
@ -89,8 +89,7 @@ extern int max_open_files; /* see dio.c */
|
|||
/* Database initialization function
|
||||
*/
|
||||
int
|
||||
d_initialize(TASK_DBN_ONLY)
|
||||
TASK_DECL
|
||||
d_initialize(dbn)
|
||||
DBN_DECL
|
||||
{
|
||||
FILE_NO fno;
|
||||
|
@ -102,7 +101,7 @@ DBN_DECL
|
|||
else {
|
||||
/* initialize db files in file_table */
|
||||
for (fno = 0; fno < DB_REF(Size_ft); ++fno) {
|
||||
if ( d_initfile(fno TASK_PARM DBN_PARM) != S_OKAY )
|
||||
if ( d_initfile(fno DBN_PARM) != S_OKAY )
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -114,9 +113,8 @@ DBN_DECL
|
|||
/* Initialize database file
|
||||
*/
|
||||
int
|
||||
d_initfile(fno TASK_PARM DBN_PARM)
|
||||
d_initfile(fno DBN_PARM)
|
||||
FILE_NO fno; /* file table entry of file to be initialized */
|
||||
TASK_DECL
|
||||
DBN_DECL
|
||||
{
|
||||
INIT_PAGE_P Page;
|
||||
|
|
|
@ -51,9 +51,8 @@
|
|||
/* Check to see if current record is a connected member of SET
|
||||
*/
|
||||
int
|
||||
d_ismember(set TASK_PARM DBN_PARM)
|
||||
d_ismember(set DBN_PARM)
|
||||
int set; /* set table entry */
|
||||
TASK_DECL
|
||||
DBN_DECL /* database number */
|
||||
{
|
||||
char crmp[MEMPSIZE]; /* current record's member pointer */
|
||||
|
|
|
@ -51,9 +51,8 @@
|
|||
/* Check to see if current record is a owner of non-empty SET
|
||||
*/
|
||||
int
|
||||
d_isowner(set TASK_PARM DBN_PARM)
|
||||
d_isowner(set DBN_PARM)
|
||||
int set; /* set table entry */
|
||||
TASK_DECL
|
||||
DBN_DECL /* database number */
|
||||
{
|
||||
char crsp[SETPSIZE]; /* current record's set pointer */
|
||||
|
|
|
@ -54,9 +54,8 @@
|
|||
/* Delete optional key value
|
||||
*/
|
||||
int
|
||||
d_keydel(field TASK_PARM DBN_PARM)
|
||||
d_keydel(field DBN_PARM)
|
||||
long field; /* key field constant */
|
||||
TASK_DECL
|
||||
DBN_DECL /* database number */
|
||||
{
|
||||
int fld; /* field number */
|
||||
|
@ -74,7 +73,7 @@ DBN_DECL /* database number */
|
|||
RETURN( db_status );
|
||||
|
||||
/* ensure current record is valid for this field */
|
||||
d_crtype(&rn TASK_PARM DBN_PARM);
|
||||
d_crtype(&rn DBN_PARM);
|
||||
|
||||
if (rec != NUM2INT(rn - RECMARK, rt_offset))
|
||||
RETURN( dberr(S_BADFIELD) );
|
||||
|
|
|
@ -46,9 +46,8 @@
|
|||
/* Check for optional key existence
|
||||
*/
|
||||
int
|
||||
d_keyexist(field TASK_PARM DBN_PARM)
|
||||
d_keyexist(field DBN_PARM)
|
||||
long field; /* key field constant */
|
||||
TASK_DECL
|
||||
DBN_DECL /* database number */
|
||||
{
|
||||
int fld; /* field number */
|
||||
|
@ -64,7 +63,7 @@ DBN_DECL /* database number */
|
|||
RETURN( db_status );
|
||||
|
||||
/* ensure current record is valid for this field */
|
||||
d_crtype(&rn TASK_PARM DBN_PARM);
|
||||
d_crtype(&rn DBN_PARM);
|
||||
|
||||
if (rec != NUM2INT(rn - RECMARK, rt_offset))
|
||||
RETURN( dberr(S_BADFIELD) );
|
||||
|
|
|
@ -1140,9 +1140,8 @@ int n;
|
|||
/* Read value of last key scanned
|
||||
*/
|
||||
int
|
||||
d_keyread(key_val TASK_PARM)
|
||||
d_keyread(key_val)
|
||||
char *key_val;
|
||||
TASK_DECL
|
||||
{
|
||||
int kt_lc; /* loop control */
|
||||
#ifndef NO_FLOAT
|
||||
|
|
|
@ -57,10 +57,9 @@ static void chk_desc_key(P1(int) Pi(FIELD_ENTRY *)
|
|||
/* Find record thru key field
|
||||
*/
|
||||
int
|
||||
d_keyfind(field, fldval TASK_PARM DBN_PARM)
|
||||
d_keyfind(field, fldval DBN_PARM)
|
||||
long field; /* field constant */
|
||||
const char *fldval; /* value of the data field */
|
||||
TASK_DECL
|
||||
DBN_DECL /* database number */
|
||||
{
|
||||
int fld, rec;
|
||||
|
|
|
@ -51,9 +51,8 @@
|
|||
/* Find first key
|
||||
*/
|
||||
int
|
||||
d_keyfrst(field TASK_PARM DBN_PARM)
|
||||
d_keyfrst(field DBN_PARM)
|
||||
long field; /* field constant */
|
||||
TASK_DECL
|
||||
DBN_DECL /* database number */
|
||||
{
|
||||
int fld, rec;
|
||||
|
|
|
@ -51,9 +51,8 @@
|
|||
/* Find last key
|
||||
*/
|
||||
int
|
||||
d_keylast(field TASK_PARM DBN_PARM)
|
||||
d_keylast(field DBN_PARM)
|
||||
long field; /* field constant */
|
||||
TASK_DECL
|
||||
DBN_DECL /* database number */
|
||||
{
|
||||
int fld, rec;
|
||||
|
|
|
@ -52,9 +52,8 @@
|
|||
/* Find next record thru key field
|
||||
*/
|
||||
int
|
||||
d_keynext(field TASK_PARM DBN_PARM)
|
||||
d_keynext(field DBN_PARM)
|
||||
long field; /* field constant */
|
||||
TASK_DECL
|
||||
DBN_DECL /* database number */
|
||||
{
|
||||
int fld, rec;
|
||||
|
|
|
@ -52,9 +52,8 @@
|
|||
/* Find previous record thru key field
|
||||
*/
|
||||
int
|
||||
d_keyprev(field TASK_PARM DBN_PARM)
|
||||
d_keyprev(field DBN_PARM)
|
||||
long field; /* field constant */
|
||||
TASK_DECL
|
||||
DBN_DECL /* database number */
|
||||
{
|
||||
int fld, rec;
|
||||
|
|
|
@ -53,9 +53,8 @@
|
|||
/* Store optional key value
|
||||
*/
|
||||
int
|
||||
d_keystore(field TASK_PARM DBN_PARM)
|
||||
d_keystore(field DBN_PARM)
|
||||
long field; /* key field constant */
|
||||
TASK_DECL
|
||||
DBN_DECL /* database number */
|
||||
{
|
||||
int fld; /* field number */
|
||||
|
@ -77,7 +76,7 @@ DBN_DECL /* database number */
|
|||
RETURN( dberr(S_NOCR) );
|
||||
|
||||
/* ensure current record is valid for this field */
|
||||
d_crtype(&rn TASK_PARM DBN_PARM);
|
||||
d_crtype(&rn DBN_PARM);
|
||||
|
||||
if (rec != NUM2INT(rn - RECMARK, rt_offset))
|
||||
RETURN( dberr(S_BADFIELD) );
|
||||
|
|
|
@ -54,10 +54,9 @@
|
|||
/* Set the value of a key field
|
||||
*/
|
||||
int
|
||||
d_setkey( field, fldvalue TASK_PARM DBN_PARM )
|
||||
d_setkey( field, fldvalue DBN_PARM )
|
||||
long field;
|
||||
const char *fldvalue;
|
||||
TASK_DECL
|
||||
DBN_DECL
|
||||
{
|
||||
SK_P *sk_ptr;
|
||||
|
@ -136,9 +135,8 @@ int sk_free()
|
|||
/* Create a new empty record
|
||||
*/
|
||||
int
|
||||
d_makenew( nrec TASK_PARM DBN_PARM )
|
||||
d_makenew( nrec DBN_PARM )
|
||||
int nrec;
|
||||
TASK_DECL
|
||||
DBN_DECL
|
||||
{
|
||||
DB_ADDR db_addr;
|
||||
|
@ -178,7 +176,7 @@ DBN_DECL
|
|||
}
|
||||
MEM_LOCK(&sk_ptr->ptr->sk_val);
|
||||
d_keyfind(FLDMARK*(long)recnum + (long)(fld - rec_ptr->rt_fields),
|
||||
sk_ptr->ptr->sk_val.ptr TASK_PARM DBN_PARM);
|
||||
sk_ptr->ptr->sk_val.ptr DBN_PARM);
|
||||
MEM_UNLOCK(&sk_ptr->ptr->sk_val);
|
||||
curr_rec = db_addr;
|
||||
ll_deaccess(&sk_list);
|
||||
|
|
|
@ -75,13 +75,12 @@ static int nextc(P1(int));
|
|||
|
||||
/* Map ASCII-Characters for output and sorting
|
||||
*/
|
||||
int d_mapchar(inchar,outchar,sort_str,subsort TASK_PARM)
|
||||
int d_mapchar(inchar,outchar,sort_str,subsort)
|
||||
unsigned char inchar; /* value of character to be mapped */
|
||||
unsigned char outchar; /* output character as ... */
|
||||
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
|
||||
{
|
||||
int indx;
|
||||
|
||||
|
|
|
@ -51,10 +51,9 @@
|
|||
/* Get number of members of the current set owner
|
||||
*/
|
||||
int
|
||||
d_members(set, tot TASK_PARM DBN_PARM)
|
||||
d_members(set, tot DBN_PARM)
|
||||
int set; /* Set table entry */
|
||||
LONG *tot; /* total members of set */
|
||||
TASK_DECL
|
||||
DBN_DECL /* database number */
|
||||
{
|
||||
char setp[SETPSIZE];
|
||||
|
|
|
@ -44,9 +44,8 @@
|
|||
/* Turn on db_VISTA runtime options
|
||||
*/
|
||||
int
|
||||
d_on_opt(optflag TASK_PARM)
|
||||
d_on_opt(optflag)
|
||||
int optflag;
|
||||
TASK_DECL
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -72,9 +71,8 @@ TASK_DECL
|
|||
/* Turn off db_VISTA runtime options
|
||||
*/
|
||||
int
|
||||
d_off_opt(optflag TASK_PARM)
|
||||
d_off_opt(optflag)
|
||||
int optflag;
|
||||
TASK_DECL
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
|
@ -297,9 +297,8 @@ char *path_str; /* Path to remove filename from */
|
|||
|
||||
/* Set Country Table path
|
||||
*/
|
||||
int d_ctbpath(ctb TASK_PARM)
|
||||
int d_ctbpath(ctb)
|
||||
const char *ctb;
|
||||
TASK_DECL
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
|
@ -49,9 +49,8 @@
|
|||
/* Find first record of type
|
||||
*/
|
||||
int
|
||||
d_recfrst( rec TASK_PARM DBN_PARM )
|
||||
d_recfrst( rec DBN_PARM )
|
||||
int rec; /* record type/table entry */
|
||||
TASK_DECL
|
||||
DBN_DECL
|
||||
{
|
||||
INT rectype;
|
||||
|
|
|
@ -73,9 +73,8 @@
|
|||
/* ======================================================================
|
||||
d_reclast - find last record occurrence in database
|
||||
*/
|
||||
int d_reclast( rec TASK_PARM DBN_PARM )
|
||||
int d_reclast( rec DBN_PARM )
|
||||
int rec; /* record # to find last occurrence of */
|
||||
TASK_DECL
|
||||
DBN_DECL /* optional database number */
|
||||
{
|
||||
/*
|
||||
|
|
|
@ -50,8 +50,7 @@
|
|||
/* Find next record of type
|
||||
*/
|
||||
int
|
||||
d_recnext(TASK_DBN_ONLY)
|
||||
TASK_DECL
|
||||
d_recnext(dbn)
|
||||
DBN_DECL
|
||||
{
|
||||
INT rectype;
|
||||
|
|
|
@ -73,8 +73,7 @@
|
|||
/* ======================================================================
|
||||
d_recprev - find previous record via database address
|
||||
*/
|
||||
int d_recprev( TASK_DBN_ONLY )
|
||||
TASK_DECL
|
||||
int d_recprev( dbn )
|
||||
DBN_DECL
|
||||
{
|
||||
/*
|
||||
|
|
|
@ -52,9 +52,8 @@
|
|||
/* Read contents of current record
|
||||
*/
|
||||
int
|
||||
d_recread(rec TASK_PARM DBN_PARM)
|
||||
d_recread(rec DBN_PARM)
|
||||
char *rec; /* ptr to record area */
|
||||
TASK_DECL
|
||||
DBN_DECL
|
||||
{
|
||||
INT rt; /* record type */
|
||||
|
|
|
@ -71,9 +71,8 @@
|
|||
/* ======================================================================
|
||||
set record type and database address to current
|
||||
*/
|
||||
int d_recset( rec TASK_PARM DBN_PARM )
|
||||
int d_recset( rec DBN_PARM )
|
||||
int rec; /* record type */
|
||||
TASK_DECL
|
||||
DBN_DECL
|
||||
{
|
||||
/*
|
||||
|
|
|
@ -52,9 +52,8 @@
|
|||
/* Write contents to current record
|
||||
*/
|
||||
int
|
||||
d_recwrite(rec TASK_PARM DBN_PARM)
|
||||
d_recwrite(rec DBN_PARM)
|
||||
const char *rec; /* ptr to record area */
|
||||
TASK_DECL
|
||||
DBN_DECL
|
||||
{
|
||||
INT rt; /* record type */
|
||||
|
|
|
@ -47,11 +47,10 @@
|
|||
/* Rename database file
|
||||
*/
|
||||
int
|
||||
d_renfile(dbn, fno, fnm TASK_PARM)
|
||||
d_renfile(dbn, fno, fnm)
|
||||
const char *dbn; /* database containing file to be renamed */
|
||||
FILE_NO fno; /* file id number for file to be renamed */
|
||||
const char *fnm; /* new file name */
|
||||
TASK_DECL
|
||||
{
|
||||
REN_ENTRY_P r;
|
||||
|
||||
|
|
|
@ -55,10 +55,9 @@
|
|||
/* Read currency table
|
||||
*/
|
||||
int
|
||||
d_rdcurr(currbuff, currsize TASK_PARM)
|
||||
d_rdcurr(currbuff, currsize)
|
||||
DB_ADDR **currbuff;
|
||||
int *currsize;
|
||||
TASK_DECL
|
||||
{
|
||||
int cs;
|
||||
|
||||
|
@ -68,12 +67,11 @@ TASK_DECL
|
|||
*currbuff = (DB_ADDR *)ALLOC(NULL, cs*sizeof(DB_ADDR), "currbuff");
|
||||
if ( *currbuff == NULL ) RETURN( dberr(S_NOMEMORY) );
|
||||
*currsize = cs * sizeof(DB_ADDR);
|
||||
RETURN( d_rerdcurr(currbuff TASK_PARM) );
|
||||
RETURN( d_rerdcurr(currbuff) );
|
||||
}
|
||||
|
||||
int d_rerdcurr(currbuff TASK_PARM)
|
||||
int d_rerdcurr(currbuff)
|
||||
DB_ADDR **currbuff;
|
||||
TASK_DECL
|
||||
{
|
||||
DB_ADDR *cb_ptr;
|
||||
|
||||
|
@ -91,9 +89,8 @@ TASK_DECL
|
|||
/* Write currency table
|
||||
*/
|
||||
int
|
||||
d_wrcurr(currbuff TASK_PARM)
|
||||
d_wrcurr(currbuff)
|
||||
DB_ADDR *currbuff;
|
||||
TASK_DECL
|
||||
{
|
||||
DB_ADDR *cb_ptr;
|
||||
|
||||
|
|
|
@ -52,9 +52,8 @@
|
|||
/* Set current database
|
||||
*/
|
||||
int
|
||||
d_setdb(dbn TASK_PARM)
|
||||
d_setdb(dbn)
|
||||
int dbn; /* database number */
|
||||
TASK_DECL
|
||||
{
|
||||
DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_NOIO));
|
||||
|
||||
|
|
|
@ -50,10 +50,9 @@
|
|||
/* Set current member to current member
|
||||
*/
|
||||
int
|
||||
d_setmm(sett, sets TASK_PARM DBN_PARM)
|
||||
d_setmm(sett, sets DBN_PARM)
|
||||
int sett; /* set table entry number of target member */
|
||||
int sets; /* set table entry number of source member */
|
||||
TASK_DECL
|
||||
DBN_DECL /* database number */
|
||||
{
|
||||
int cmtype; /* current member type */
|
||||
|
@ -64,7 +63,7 @@ DBN_DECL /* database number */
|
|||
|
||||
DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
|
||||
|
||||
if ((d_cmtype(sets, &cmtype TASK_PARM DBN_PARM) != S_OKAY) ||
|
||||
if ((d_cmtype(sets, &cmtype DBN_PARM) != S_OKAY) ||
|
||||
(nset_check(sett, &sett, (SET_ENTRY * *)&set_ptr) != S_OKAY))
|
||||
RETURN( db_status );
|
||||
|
||||
|
|
|
@ -50,10 +50,9 @@
|
|||
/* Set current member to current owner
|
||||
*/
|
||||
int
|
||||
d_setmo(setm, seto TASK_PARM DBN_PARM)
|
||||
d_setmo(setm, seto DBN_PARM)
|
||||
int setm; /* set table entry number of member */
|
||||
int seto; /* set table entry number of owner */
|
||||
TASK_DECL
|
||||
DBN_DECL /* database number */
|
||||
{
|
||||
int mem;
|
||||
|
|
|
@ -50,9 +50,8 @@
|
|||
/* Set current member to current record
|
||||
*/
|
||||
int
|
||||
d_setmr(set TASK_PARM DBN_PARM)
|
||||
d_setmr(set DBN_PARM)
|
||||
int set; /* set table entry number */
|
||||
TASK_DECL
|
||||
DBN_DECL /* database number */
|
||||
{
|
||||
int crtype; /* current record type */
|
||||
|
@ -69,7 +68,7 @@ DBN_DECL /* database number */
|
|||
if ( ! curr_rec )
|
||||
RETURN( dberr( S_NOCR ) );
|
||||
|
||||
if ( d_crtype(&crtype TASK_PARM DBN_PARM) != S_OKAY )
|
||||
if ( d_crtype(&crtype DBN_PARM) != S_OKAY )
|
||||
RETURN( db_status );
|
||||
crtype += NUM2INT(-RECMARK, rt_offset);
|
||||
|
||||
|
|
|
@ -51,10 +51,9 @@
|
|||
/* Set current owner to current member
|
||||
*/
|
||||
int
|
||||
d_setom(nseto, nsetm TASK_PARM DBN_PARM)
|
||||
d_setom(nseto, nsetm DBN_PARM)
|
||||
int nseto; /* set table entry number of owner */
|
||||
int nsetm; /* set table entry number of member */
|
||||
TASK_DECL
|
||||
DBN_DECL /* database number */
|
||||
{
|
||||
int seto, setm;
|
||||
|
@ -63,7 +62,7 @@ DBN_DECL /* database number */
|
|||
|
||||
DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
|
||||
|
||||
if ((d_cmtype(nsetm, &cmtype TASK_PARM DBN_PARM) != S_OKAY) ||
|
||||
if ((d_cmtype(nsetm, &cmtype DBN_PARM) != S_OKAY) ||
|
||||
(nset_check(nseto, &seto, (SET_ENTRY * *)&set_ptr) != S_OKAY))
|
||||
RETURN( db_status );
|
||||
cmtype += NUM2INT(-RECMARK, rt_offset);
|
||||
|
|
|
@ -51,10 +51,9 @@
|
|||
/* Set current owner to current owner
|
||||
*/
|
||||
int
|
||||
d_setoo(nsett, nsets TASK_PARM DBN_PARM)
|
||||
d_setoo(nsett, nsets DBN_PARM)
|
||||
int nsett; /* set table entry number of target owner */
|
||||
int nsets; /* set table entry number of source owner */
|
||||
TASK_DECL
|
||||
DBN_DECL /* database number */
|
||||
{
|
||||
int sett, sets;
|
||||
|
|
|
@ -50,9 +50,8 @@
|
|||
/* Set current owner to current record
|
||||
*/
|
||||
int
|
||||
d_setor(nset TASK_PARM DBN_PARM)
|
||||
d_setor(nset DBN_PARM)
|
||||
int nset; /* set number */
|
||||
TASK_DECL
|
||||
DBN_DECL /* database number */
|
||||
{
|
||||
int set;
|
||||
|
@ -62,7 +61,7 @@ DBN_DECL /* database number */
|
|||
DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
|
||||
|
||||
if ((nset_check(nset, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) ||
|
||||
(d_crtype(&crtype TASK_PARM DBN_PARM) != S_OKAY))
|
||||
(d_crtype(&crtype DBN_PARM) != S_OKAY))
|
||||
RETURN( db_status );
|
||||
|
||||
crtype += NUM2INT(-RECMARK, rt_offset);
|
||||
|
|
|
@ -50,9 +50,8 @@
|
|||
/* Set current record to current member
|
||||
*/
|
||||
int
|
||||
d_setrm(set TASK_PARM DBN_PARM)
|
||||
d_setrm(set DBN_PARM)
|
||||
int set; /* set table entry number */
|
||||
TASK_DECL
|
||||
DBN_DECL /* database number */
|
||||
{
|
||||
SET_ENTRY *set_ptr;
|
||||
|
|
|
@ -50,9 +50,8 @@
|
|||
/* Set current record to current owner
|
||||
*/
|
||||
int
|
||||
d_setro(set TASK_PARM DBN_PARM)
|
||||
d_setro(set DBN_PARM)
|
||||
int set; /* set table entry number */
|
||||
TASK_DECL
|
||||
DBN_DECL /* database number */
|
||||
{
|
||||
SET_ENTRY *set_ptr;
|
||||
|
|
|
@ -46,9 +46,8 @@
|
|||
|
||||
/* Called once at the beginning of each external function
|
||||
*/
|
||||
int startup(DB_ID TASK_PTR_ID LOCK_PARM)
|
||||
int startup(DB_ID LOCK_PARM)
|
||||
DBN_DECL
|
||||
TASK_PTR_DECL
|
||||
LOCK_DECL
|
||||
{
|
||||
db_status = S_OKAY;
|
||||
|
|
Loading…
Reference in a new issue