1
0
Fork 0
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:
Peter Howkins 2018-06-29 01:45:29 +01:00
parent 86b9a0fee4
commit 60edbd3491
69 changed files with 100 additions and 186 deletions

View file

@ -52,10 +52,9 @@
/* Get current member type /* Get current member type
*/ */
int int
d_cmtype(set, cmtype TASK_PARM DBN_PARM) d_cmtype(set, cmtype DBN_PARM)
int set; int set;
int *cmtype; int *cmtype;
TASK_DECL
DBN_DECL DBN_DECL
{ {
char *mrec; char *mrec;

View file

@ -71,9 +71,8 @@ typedef struct {
/* Connect the current record as member of set /* Connect the current record as member of set
*/ */
int int
d_connect(set TASK_PARM DBN_PARM) d_connect(set DBN_PARM)
int set; /* Set constant */ int set; /* Set constant */
TASK_DECL
DBN_DECL /* Database number */ DBN_DECL /* Database number */
{ {
MEM_PTR crmp; /* current record's member pointer */ MEM_PTR crmp; /* current record's member pointer */

View file

@ -51,10 +51,9 @@
/* Get current owner type /* Get current owner type
*/ */
int int
d_cotype(set, cotype TASK_PARM DBN_PARM) d_cotype(set, cotype DBN_PARM)
int set; int set;
int *cotype; int *cotype;
TASK_DECL
DBN_DECL DBN_DECL
{ {
char *orec; char *orec;

View file

@ -50,9 +50,8 @@
/* Get current record /* Get current record
*/ */
int int
d_crget(dba TASK_PARM DBN_PARM) d_crget(dba DBN_PARM)
DB_ADDR *dba; /* db address of record to become current */ DB_ADDR *dba; /* db address of record to become current */
TASK_DECL
DBN_DECL DBN_DECL
{ {
DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_NOIO)); DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_NOIO));

View file

@ -51,10 +51,9 @@
/* Read data from field of current record /* Read data from field of current record
*/ */
int int
d_crread(field, data TASK_PARM DBN_PARM) d_crread(field, data DBN_PARM)
long field; /* Field constant */ long field; /* Field constant */
char *data; /* Data area to contain field contents */ char *data; /* Data area to contain field contents */
TASK_DECL
DBN_DECL /* database number */ DBN_DECL /* database number */
{ {
int fld, rec; int fld, rec;

View file

@ -50,9 +50,8 @@
/* Set current record /* Set current record
*/ */
int int
d_crset(dba TASK_PARM DBN_PARM) d_crset(dba DBN_PARM)
DB_ADDR *dba; /* db address of record to become current */ DB_ADDR *dba; /* db address of record to become current */
TASK_DECL
DBN_DECL DBN_DECL
{ {
DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO)); DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO));

View file

@ -50,9 +50,8 @@
/* Get current record type /* Get current record type
*/ */
int int
d_crtype(crtype TASK_PARM DBN_PARM) d_crtype(crtype DBN_PARM)
int *crtype; int *crtype;
TASK_DECL
DBN_DECL DBN_DECL
{ {
INT crt; INT crt;

View file

@ -51,10 +51,9 @@
/* Write data to a field in the current record /* Write data to a field in the current record
*/ */
int int
d_crwrite(field, data TASK_PARM DBN_PARM) d_crwrite(field, data DBN_PARM)
long field; /* field constant */ long field; /* field constant */
char *data; /* data area to contain field contents */ char *data; /* data area to contain field contents */
TASK_DECL
DBN_DECL /* database number */ DBN_DECL /* database number */
{ {
int stat, fld, rec; int stat, fld, rec;

View file

@ -50,10 +50,9 @@
/* Get current set member /* Get current set member
*/ */
int int
d_csmget(set, dba TASK_PARM DBN_PARM) d_csmget(set, dba DBN_PARM)
int set; /* Set table entry */ int set; /* Set table entry */
DB_ADDR *dba; /* db address of record to become current */ DB_ADDR *dba; /* db address of record to become current */
TASK_DECL
DBN_DECL /* database number */ DBN_DECL /* database number */
{ {
SET_ENTRY *set_ptr; SET_ENTRY *set_ptr;

View file

@ -51,11 +51,10 @@
/* Read data from field of current set member /* Read data from field of current set member
*/ */
int int
d_csmread(set, field, data TASK_PARM DBN_PARM) d_csmread(set, field, data DBN_PARM)
int set; /* Set constant */ int set; /* Set constant */
long field; /* Field constant */ long field; /* Field constant */
char *data; /* Data area to contain field contents */ char *data; /* Data area to contain field contents */
TASK_DECL
DBN_DECL /* database number */ DBN_DECL /* database number */
{ {
int fld, rec; int fld, rec;

View file

@ -50,10 +50,9 @@
/* Set current set member /* Set current set member
*/ */
int int
d_csmset(set, dba TASK_PARM DBN_PARM) d_csmset(set, dba DBN_PARM)
int set; /* Set table entry */ int set; /* Set table entry */
DB_ADDR *dba; /* db address of record to become current */ DB_ADDR *dba; /* db address of record to become current */
TASK_DECL
DBN_DECL /* database number */ DBN_DECL /* database number */
{ {
INT type; INT type;

View file

@ -51,11 +51,10 @@
/* Write data to a field in the current set member /* Write data to a field in the current set member
*/ */
int int
d_csmwrite(set, field, data TASK_PARM DBN_PARM) d_csmwrite(set, field, data DBN_PARM)
int set; /* Set constant */ int set; /* Set constant */
long field; /* Field constant */ long field; /* Field constant */
const char *data; /* Data area to contain field contents */ const char *data; /* Data area to contain field contents */
TASK_DECL
DBN_DECL /* database number */ DBN_DECL /* database number */
{ {
int stat, fld, rec; int stat, fld, rec;

View file

@ -51,10 +51,9 @@
/* Get current set owner /* Get current set owner
*/ */
int int
d_csoget(set, dba TASK_PARM DBN_PARM) d_csoget(set, dba DBN_PARM)
int set; /* Set table entry */ int set; /* Set table entry */
DB_ADDR *dba; /* db address of record to become current */ DB_ADDR *dba; /* db address of record to become current */
TASK_DECL
DBN_DECL /* database number */ DBN_DECL /* database number */
{ {
SET_ENTRY *set_ptr; SET_ENTRY *set_ptr;

View file

@ -51,11 +51,10 @@
/* Read data from field of current set owner /* Read data from field of current set owner
*/ */
int int
d_csoread(set, field, data TASK_PARM DBN_PARM) d_csoread(set, field, data DBN_PARM)
int set; /* Set constant */ int set; /* Set constant */
long field; /* Field constant */ long field; /* Field constant */
char *data; /* Data area to contain field contents */ char *data; /* Data area to contain field contents */
TASK_DECL
DBN_DECL /* database number */ DBN_DECL /* database number */
{ {
int fld, rec; int fld, rec;

View file

@ -51,10 +51,9 @@
/* Set current set owner /* Set current set owner
*/ */
int int
d_csoset(set, dba TASK_PARM DBN_PARM) d_csoset(set, dba DBN_PARM)
int set; /* Set table entry */ int set; /* Set table entry */
DB_ADDR *dba; /* db address of record to become current */ DB_ADDR *dba; /* db address of record to become current */
TASK_DECL
DBN_DECL /* database number */ DBN_DECL /* database number */
{ {
INT type; INT type;

View file

@ -51,11 +51,10 @@
/* Write data to a field in the current set owner /* Write data to a field in the current set owner
*/ */
int int
d_csowrite(set, field, data TASK_PARM DBN_PARM) d_csowrite(set, field, data DBN_PARM)
int set; /* Set constant */ int set; /* Set constant */
long field; /* Field constant */ long field; /* Field constant */
const char *data; /* Data area to contain field contents */ const char *data; /* Data area to contain field contents */
TASK_DECL
DBN_DECL /* database number */ DBN_DECL /* database number */
{ {
int stat, fld, rec; int stat, fld, rec;

View file

@ -50,9 +50,8 @@
/* Set Database Dictionary Path /* Set Database Dictionary Path
*/ */
int int
d_dbdpath(path TASK_PARM) d_dbdpath(path)
const char *path; const char *path;
TASK_DECL
{ {
DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_NONE)); DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_NONE));

View file

@ -50,9 +50,8 @@
/* Set Database Files Path /* Set Database Files Path
*/ */
int int
d_dbfpath(path TASK_PARM) d_dbfpath(path)
const char *path; const char *path;
TASK_DECL
{ {
DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_NONE)); DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_NONE));

View file

@ -209,10 +209,9 @@ static int recovery_check(P0);
/* Open db_VISTA database /* Open db_VISTA database
*/ */
int int
d_open(dbnames, opentype TASK_PARM) d_open(dbnames, opentype)
const char *dbnames; const char *dbnames;
const char *opentype; const char *opentype;
TASK_DECL
{ {
DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_ALL)); DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_ALL));
#ifdef DEBUG_DBLF #ifdef DEBUG_DBLF
@ -222,7 +221,7 @@ TASK_DECL
} }
#endif #endif
if ( dbopen ) d_close(TASK_ONLY); if ( dbopen ) d_close();
@ -376,8 +375,7 @@ const char *dbnames;
/* Close database /* Close database
*/ */
int int
d_close(TASK_ONLY) d_close()
TASK_DECL
{ {
int i; int i;

View file

@ -49,9 +49,8 @@
/* Set database log file name/path /* Set database log file name/path
*/ */
d_dblog(log TASK_PARM) d_dblog(log)
const char *log; const char *log;
TASK_DECL
{ {
DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_NONE)); DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_NONE));

View file

@ -52,9 +52,8 @@ static char VISTATAF[] = "vista.taf";
/* Set database transaction activity file name/path /* Set database transaction activity file name/path
*/ */
d_dbtaf(taf TASK_PARM) d_dbtaf(taf)
const char *taf; const char *taf;
TASK_DECL
{ {
char dbtaf[FILENMLEN]; char dbtaf[FILENMLEN];
int len; int len;

View file

@ -350,15 +350,6 @@ typedef struct RN_ENTRY_S {
#define DBN_DECL int dbn; #define DBN_DECL int dbn;
#define TABLE_SIZE(size) DB_REF(size) #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 */ /* Country code table definition */
typedef struct CNTRY_TBL_S { typedef struct CNTRY_TBL_S {
unsigned char out_chr; unsigned char out_chr;
@ -486,17 +477,14 @@ typedef struct MESSAGE_S {
#define COMMA #define COMMA
#endif /* COMMA */ #endif /* COMMA */
#define TASK_PARAM /**/
#define TASK_ID /**/ #define TASK_ID /**/
#define TASK_PTR_ID /**/
#define NO_TASK_ID /**/
#define LOCK_PARAM /**/ #define LOCK_PARAM /**/
#define LOCK_PARM /**/ #define LOCK_PARM /**/
#define LOCK_DECL /**/ #define LOCK_DECL /**/
#define LOCK_SET(a) /**/ #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 #define DB_ENTER(TDTL_PARAM) if ( startup(TDTL_PARAM) != S_OKAY ) { return( db_status ); } else

View file

@ -52,9 +52,8 @@
/* Set Database User Identifier /* Set Database User Identifier
*/ */
int int
d_dbuserid(id TASK_PARM) d_dbuserid(id)
const char *id; const char *id;
TASK_DECL
{ {
const char *chk_id; const char *chk_id;

View file

@ -53,8 +53,7 @@ static DB_ADDR zap_dba = NULL_DBA;
/* Delete the current record, with error checking /* Delete the current record, with error checking
*/ */
int int
d_delete(TASK_DBN_ONLY) d_delete(dbn)
TASK_DECL
DBN_DECL DBN_DECL
{ {
int st_lc, mt_lc; /* loop control */ int st_lc, mt_lc; /* loop control */

View file

@ -55,9 +55,8 @@
of the database of the database
*/ */
int int
d_destroy(dbname TASK_PARM) d_destroy(dbname)
const char *dbname; const char *dbname;
TASK_DECL
{ {
int ft_lc; /* loop control */ int ft_lc; /* loop control */
FILE_ENTRY *file_ptr; FILE_ENTRY *file_ptr;
@ -65,7 +64,7 @@ TASK_DECL
DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_ALL)); DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_ALL));
/* database must be closed (might be multiple databases open) */ /* 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 */ /* prepare for the inittab and read in the database tables */
if ((initdbt(dbname) != S_OKAY) || (inittab() != S_OKAY)) if ((initdbt(dbname) != S_OKAY) || (inittab() != S_OKAY))

View file

@ -65,9 +65,8 @@ typedef struct {
/* Disconnect the current member of set /* Disconnect the current member of set
*/ */
int int
d_discon(nset TASK_PARM DBN_PARM) d_discon(nset DBN_PARM)
int nset; /* set number */ int nset; /* set number */
TASK_DECL
DBN_DECL /* database number */ DBN_DECL /* database number */
{ {
SET_PTR cosp; /* current owner's set pointer */ SET_PTR cosp; /* current owner's set pointer */

View file

@ -51,8 +51,7 @@
/* Disconnect from all sets (owner and member) and delete record /* Disconnect from all sets (owner and member) and delete record
*/ */
int int
d_disdel(TASK_DBN_ONLY) d_disdel(dbn)
TASK_DECL
DBN_DECL DBN_DECL
{ {
int rectype, nset, cset; int rectype, nset, cset;
@ -65,11 +64,11 @@ DBN_DECL
DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); 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 ); RETURN( db_status );
rectype += NUM2INT(-RECMARK, rt_offset); 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)]; for (set = 0, set_ptr = &set_table[ORIGIN(st_offset)];
set < TABLE_SIZE(Size_st); set < TABLE_SIZE(Size_st);
++set, ++set_ptr) { ++set, ++set_ptr) {
@ -81,11 +80,11 @@ DBN_DECL
mdba = *cm_ptr; mdba = *cm_ptr;
if (set_ptr->st_own_rt == rectype) { if (set_ptr->st_own_rt == rectype) {
/* disconnect all member records from set s */ /* disconnect all member records from set s */
d_setor(nset TASK_PARM DBN_PARM); d_setor(nset DBN_PARM);
while (d_findfm(nset TASK_PARM DBN_PARM) == S_OKAY) while (d_findfm(nset DBN_PARM) == S_OKAY)
if (d_discon(nset TASK_PARM DBN_PARM) < S_OKAY) if (d_discon(nset DBN_PARM) < S_OKAY)
RETURN (db_status); 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, for (mem = set_ptr->st_members, memtot = mem + set_ptr->st_memtot,
mem_ptr = &member_table[mem]; mem_ptr = &member_table[mem];
@ -93,9 +92,9 @@ DBN_DECL
++mem, ++mem_ptr) { ++mem, ++mem_ptr) {
if (mem_ptr->mt_record == rectype) { if (mem_ptr->mt_record == rectype) {
/* disconnect current record from set */ /* disconnect current record from set */
if (d_ismember(nset TASK_PARM DBN_PARM) == S_OKAY) { if (d_ismember(nset DBN_PARM) == S_OKAY) {
d_csmset(nset, &dba TASK_PARM DBN_PARM); d_csmset(nset, &dba DBN_PARM);
if (d_discon(nset TASK_PARM DBN_PARM) < S_OKAY) if (d_discon(nset DBN_PARM) < S_OKAY)
RETURN (db_status); RETURN (db_status);
} }
} }
@ -113,6 +112,6 @@ DBN_DECL
else else
*cm_ptr = mdba; *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 */ /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin disdel.c */

View file

@ -55,10 +55,9 @@
/* Create and fill a new record /* Create and fill a new record
*/ */
int int
d_fillnew( nrec, recval TASK_PARM DBN_PARM ) d_fillnew( nrec, recval DBN_PARM )
int nrec; /* record number */ int nrec; /* record number */
const char *recval; /* record value */ const char *recval; /* record value */
TASK_DECL
DBN_DECL /* database number */ DBN_DECL /* database number */
{ {
DB_ADDR db_addr; DB_ADDR db_addr;
@ -89,7 +88,7 @@ DBN_DECL /* database number */
else else
key_bldcom(fld, (char *)recval, ptr = key, FALSE); /* Don't complement */ key_bldcom(fld, (char *)recval, ptr = key, FALSE); /* Don't complement */
d_keyfind(FLDMARK*(long)recnum + (fld - rec_ptr->rt_fields), ptr d_keyfind(FLDMARK*(long)recnum + (fld - rec_ptr->rt_fields), ptr
TASK_PARM DBN_PARM); DBN_PARM);
curr_rec = db_addr; curr_rec = db_addr;
if ( db_status == S_OKAY ) if ( db_status == S_OKAY )
RETURN( db_status = S_DUPLICATE ); RETURN( db_status = S_DUPLICATE );

View file

@ -50,9 +50,8 @@
/* Find owner of current record /* Find owner of current record
*/ */
int int
d_findco(nset TASK_PARM DBN_PARM) d_findco(nset DBN_PARM)
int nset; int nset;
TASK_DECL
DBN_DECL DBN_DECL
{ {
int set; int set;

View file

@ -50,9 +50,8 @@
/* Find first member of set /* Find first member of set
*/ */
int int
d_findfm(nset TASK_PARM DBN_PARM) d_findfm(nset DBN_PARM)
int nset; int nset;
TASK_DECL
DBN_DECL DBN_DECL
{ {
char setp[SETPSIZE]; char setp[SETPSIZE];

View file

@ -50,9 +50,8 @@
/* Find last member of set /* Find last member of set
*/ */
int int
d_findlm(nset TASK_PARM DBN_PARM) d_findlm(nset DBN_PARM)
int nset; int nset;
TASK_DECL
DBN_DECL DBN_DECL
{ {
char setp[SETPSIZE]; char setp[SETPSIZE];

View file

@ -50,9 +50,8 @@
/* Find next member of set /* Find next member of set
*/ */
int int
d_findnm(nset TASK_PARM DBN_PARM) d_findnm(nset DBN_PARM)
int nset; int nset;
TASK_DECL
DBN_DECL DBN_DECL
{ {
int set; int set;
@ -73,7 +72,7 @@ DBN_DECL
/* find first member if no current member */ /* find first member if no current member */
if ( !*(cm_ptr = &curr_mem[set]) ) 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 */ /* read current member of set and get member pointer from record */
if ((dio_read(*cm_ptr, (char * *)&recp, NOPGHOLD) != S_OKAY) || if ((dio_read(*cm_ptr, (char * *)&recp, NOPGHOLD) != S_OKAY) ||

View file

@ -50,9 +50,8 @@
/* Find previous member of set /* Find previous member of set
*/ */
int int
d_findpm(nset TASK_PARM DBN_PARM) d_findpm(nset DBN_PARM)
int nset; int nset;
TASK_DECL
DBN_DECL DBN_DECL
{ {
int set; int set;
@ -73,7 +72,7 @@ DBN_DECL
/* find last member if no current member */ /* find last member if no current member */
if ( !*(cm_ptr = &curr_mem[set]) ) 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 */ /* read current member of set and get member pointer from record */
if ((dio_read(*cm_ptr, (char * *)&recp, NOPGHOLD) != S_OKAY) || if ((dio_read(*cm_ptr, (char * *)&recp, NOPGHOLD) != S_OKAY) ||

View file

@ -89,8 +89,7 @@ extern int max_open_files; /* see dio.c */
/* Database initialization function /* Database initialization function
*/ */
int int
d_initialize(TASK_DBN_ONLY) d_initialize(dbn)
TASK_DECL
DBN_DECL DBN_DECL
{ {
FILE_NO fno; FILE_NO fno;
@ -102,7 +101,7 @@ DBN_DECL
else { else {
/* initialize db files in file_table */ /* initialize db files in file_table */
for (fno = 0; fno < DB_REF(Size_ft); ++fno) { 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; break;
} }
} }
@ -114,9 +113,8 @@ DBN_DECL
/* Initialize database file /* Initialize database file
*/ */
int int
d_initfile(fno TASK_PARM DBN_PARM) d_initfile(fno DBN_PARM)
FILE_NO fno; /* file table entry of file to be initialized */ FILE_NO fno; /* file table entry of file to be initialized */
TASK_DECL
DBN_DECL DBN_DECL
{ {
INIT_PAGE_P Page; INIT_PAGE_P Page;

View file

@ -51,9 +51,8 @@
/* Check to see if current record is a connected member of SET /* Check to see if current record is a connected member of SET
*/ */
int int
d_ismember(set TASK_PARM DBN_PARM) d_ismember(set DBN_PARM)
int set; /* set table entry */ int set; /* set table entry */
TASK_DECL
DBN_DECL /* database number */ DBN_DECL /* database number */
{ {
char crmp[MEMPSIZE]; /* current record's member pointer */ char crmp[MEMPSIZE]; /* current record's member pointer */

View file

@ -51,9 +51,8 @@
/* Check to see if current record is a owner of non-empty SET /* Check to see if current record is a owner of non-empty SET
*/ */
int int
d_isowner(set TASK_PARM DBN_PARM) d_isowner(set DBN_PARM)
int set; /* set table entry */ int set; /* set table entry */
TASK_DECL
DBN_DECL /* database number */ DBN_DECL /* database number */
{ {
char crsp[SETPSIZE]; /* current record's set pointer */ char crsp[SETPSIZE]; /* current record's set pointer */

View file

@ -54,9 +54,8 @@
/* Delete optional key value /* Delete optional key value
*/ */
int int
d_keydel(field TASK_PARM DBN_PARM) d_keydel(field DBN_PARM)
long field; /* key field constant */ long field; /* key field constant */
TASK_DECL
DBN_DECL /* database number */ DBN_DECL /* database number */
{ {
int fld; /* field number */ int fld; /* field number */
@ -74,7 +73,7 @@ DBN_DECL /* database number */
RETURN( db_status ); RETURN( db_status );
/* ensure current record is valid for this field */ /* 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)) if (rec != NUM2INT(rn - RECMARK, rt_offset))
RETURN( dberr(S_BADFIELD) ); RETURN( dberr(S_BADFIELD) );

View file

@ -46,9 +46,8 @@
/* Check for optional key existence /* Check for optional key existence
*/ */
int int
d_keyexist(field TASK_PARM DBN_PARM) d_keyexist(field DBN_PARM)
long field; /* key field constant */ long field; /* key field constant */
TASK_DECL
DBN_DECL /* database number */ DBN_DECL /* database number */
{ {
int fld; /* field number */ int fld; /* field number */
@ -64,7 +63,7 @@ DBN_DECL /* database number */
RETURN( db_status ); RETURN( db_status );
/* ensure current record is valid for this field */ /* 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)) if (rec != NUM2INT(rn - RECMARK, rt_offset))
RETURN( dberr(S_BADFIELD) ); RETURN( dberr(S_BADFIELD) );

View file

@ -1140,9 +1140,8 @@ int n;
/* Read value of last key scanned /* Read value of last key scanned
*/ */
int int
d_keyread(key_val TASK_PARM) d_keyread(key_val)
char *key_val; char *key_val;
TASK_DECL
{ {
int kt_lc; /* loop control */ int kt_lc; /* loop control */
#ifndef NO_FLOAT #ifndef NO_FLOAT

View file

@ -57,10 +57,9 @@ static void chk_desc_key(P1(int) Pi(FIELD_ENTRY *)
/* Find record thru key field /* Find record thru key field
*/ */
int int
d_keyfind(field, fldval TASK_PARM DBN_PARM) d_keyfind(field, fldval DBN_PARM)
long field; /* field constant */ long field; /* field constant */
const char *fldval; /* value of the data field */ const char *fldval; /* value of the data field */
TASK_DECL
DBN_DECL /* database number */ DBN_DECL /* database number */
{ {
int fld, rec; int fld, rec;

View file

@ -51,9 +51,8 @@
/* Find first key /* Find first key
*/ */
int int
d_keyfrst(field TASK_PARM DBN_PARM) d_keyfrst(field DBN_PARM)
long field; /* field constant */ long field; /* field constant */
TASK_DECL
DBN_DECL /* database number */ DBN_DECL /* database number */
{ {
int fld, rec; int fld, rec;

View file

@ -51,9 +51,8 @@
/* Find last key /* Find last key
*/ */
int int
d_keylast(field TASK_PARM DBN_PARM) d_keylast(field DBN_PARM)
long field; /* field constant */ long field; /* field constant */
TASK_DECL
DBN_DECL /* database number */ DBN_DECL /* database number */
{ {
int fld, rec; int fld, rec;

View file

@ -52,9 +52,8 @@
/* Find next record thru key field /* Find next record thru key field
*/ */
int int
d_keynext(field TASK_PARM DBN_PARM) d_keynext(field DBN_PARM)
long field; /* field constant */ long field; /* field constant */
TASK_DECL
DBN_DECL /* database number */ DBN_DECL /* database number */
{ {
int fld, rec; int fld, rec;

View file

@ -52,9 +52,8 @@
/* Find previous record thru key field /* Find previous record thru key field
*/ */
int int
d_keyprev(field TASK_PARM DBN_PARM) d_keyprev(field DBN_PARM)
long field; /* field constant */ long field; /* field constant */
TASK_DECL
DBN_DECL /* database number */ DBN_DECL /* database number */
{ {
int fld, rec; int fld, rec;

View file

@ -53,9 +53,8 @@
/* Store optional key value /* Store optional key value
*/ */
int int
d_keystore(field TASK_PARM DBN_PARM) d_keystore(field DBN_PARM)
long field; /* key field constant */ long field; /* key field constant */
TASK_DECL
DBN_DECL /* database number */ DBN_DECL /* database number */
{ {
int fld; /* field number */ int fld; /* field number */
@ -77,7 +76,7 @@ DBN_DECL /* database number */
RETURN( dberr(S_NOCR) ); RETURN( dberr(S_NOCR) );
/* ensure current record is valid for this field */ /* 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)) if (rec != NUM2INT(rn - RECMARK, rt_offset))
RETURN( dberr(S_BADFIELD) ); RETURN( dberr(S_BADFIELD) );

View file

@ -54,10 +54,9 @@
/* Set the value of a key field /* Set the value of a key field
*/ */
int int
d_setkey( field, fldvalue TASK_PARM DBN_PARM ) d_setkey( field, fldvalue DBN_PARM )
long field; long field;
const char *fldvalue; const char *fldvalue;
TASK_DECL
DBN_DECL DBN_DECL
{ {
SK_P *sk_ptr; SK_P *sk_ptr;
@ -136,9 +135,8 @@ int sk_free()
/* Create a new empty record /* Create a new empty record
*/ */
int int
d_makenew( nrec TASK_PARM DBN_PARM ) d_makenew( nrec DBN_PARM )
int nrec; int nrec;
TASK_DECL
DBN_DECL DBN_DECL
{ {
DB_ADDR db_addr; DB_ADDR db_addr;
@ -178,7 +176,7 @@ DBN_DECL
} }
MEM_LOCK(&sk_ptr->ptr->sk_val); MEM_LOCK(&sk_ptr->ptr->sk_val);
d_keyfind(FLDMARK*(long)recnum + (long)(fld - rec_ptr->rt_fields), 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); MEM_UNLOCK(&sk_ptr->ptr->sk_val);
curr_rec = db_addr; curr_rec = db_addr;
ll_deaccess(&sk_list); ll_deaccess(&sk_list);

View file

@ -75,13 +75,12 @@ static int nextc(P1(int));
/* Map ASCII-Characters for output and sorting /* 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 inchar; /* value of character to be mapped */
unsigned char outchar; /* output character as ... */ unsigned char outchar; /* output character as ... */
const char *sort_str; /* sort string (max. len = 2) */ const char *sort_str; /* sort string (max. len = 2) */
unsigned char subsort; /* subsort value, to distinguish between two */ unsigned char subsort; /* subsort value, to distinguish between two */
/* equal values (e.g. 'a' and 'A', if necessary) */ /* equal values (e.g. 'a' and 'A', if necessary) */
TASK_DECL
{ {
int indx; int indx;

View file

@ -51,10 +51,9 @@
/* Get number of members of the current set owner /* Get number of members of the current set owner
*/ */
int int
d_members(set, tot TASK_PARM DBN_PARM) d_members(set, tot DBN_PARM)
int set; /* Set table entry */ int set; /* Set table entry */
LONG *tot; /* total members of set */ LONG *tot; /* total members of set */
TASK_DECL
DBN_DECL /* database number */ DBN_DECL /* database number */
{ {
char setp[SETPSIZE]; char setp[SETPSIZE];

View file

@ -44,9 +44,8 @@
/* Turn on db_VISTA runtime options /* Turn on db_VISTA runtime options
*/ */
int int
d_on_opt(optflag TASK_PARM) d_on_opt(optflag)
int optflag; int optflag;
TASK_DECL
{ {
int i; int i;
@ -72,9 +71,8 @@ TASK_DECL
/* Turn off db_VISTA runtime options /* Turn off db_VISTA runtime options
*/ */
int int
d_off_opt(optflag TASK_PARM) d_off_opt(optflag)
int optflag; int optflag;
TASK_DECL
{ {
int i; int i;

View file

@ -297,9 +297,8 @@ char *path_str; /* Path to remove filename from */
/* Set Country Table path /* Set Country Table path
*/ */
int d_ctbpath(ctb TASK_PARM) int d_ctbpath(ctb)
const char *ctb; const char *ctb;
TASK_DECL
{ {
int i; int i;

View file

@ -49,9 +49,8 @@
/* Find first record of type /* Find first record of type
*/ */
int int
d_recfrst( rec TASK_PARM DBN_PARM ) d_recfrst( rec DBN_PARM )
int rec; /* record type/table entry */ int rec; /* record type/table entry */
TASK_DECL
DBN_DECL DBN_DECL
{ {
INT rectype; INT rectype;

View file

@ -73,9 +73,8 @@
/* ====================================================================== /* ======================================================================
d_reclast - find last record occurrence in database 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 */ int rec; /* record # to find last occurrence of */
TASK_DECL
DBN_DECL /* optional database number */ DBN_DECL /* optional database number */
{ {
/* /*

View file

@ -50,8 +50,7 @@
/* Find next record of type /* Find next record of type
*/ */
int int
d_recnext(TASK_DBN_ONLY) d_recnext(dbn)
TASK_DECL
DBN_DECL DBN_DECL
{ {
INT rectype; INT rectype;

View file

@ -73,8 +73,7 @@
/* ====================================================================== /* ======================================================================
d_recprev - find previous record via database address d_recprev - find previous record via database address
*/ */
int d_recprev( TASK_DBN_ONLY ) int d_recprev( dbn )
TASK_DECL
DBN_DECL DBN_DECL
{ {
/* /*

View file

@ -52,9 +52,8 @@
/* Read contents of current record /* Read contents of current record
*/ */
int int
d_recread(rec TASK_PARM DBN_PARM) d_recread(rec DBN_PARM)
char *rec; /* ptr to record area */ char *rec; /* ptr to record area */
TASK_DECL
DBN_DECL DBN_DECL
{ {
INT rt; /* record type */ INT rt; /* record type */

View file

@ -71,9 +71,8 @@
/* ====================================================================== /* ======================================================================
set record type and database address to current 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 */ int rec; /* record type */
TASK_DECL
DBN_DECL DBN_DECL
{ {
/* /*

View file

@ -52,9 +52,8 @@
/* Write contents to current record /* Write contents to current record
*/ */
int int
d_recwrite(rec TASK_PARM DBN_PARM) d_recwrite(rec DBN_PARM)
const char *rec; /* ptr to record area */ const char *rec; /* ptr to record area */
TASK_DECL
DBN_DECL DBN_DECL
{ {
INT rt; /* record type */ INT rt; /* record type */

View file

@ -47,11 +47,10 @@
/* Rename database file /* Rename database file
*/ */
int int
d_renfile(dbn, fno, fnm TASK_PARM) d_renfile(dbn, fno, fnm)
const char *dbn; /* database containing file to be renamed */ const char *dbn; /* database containing file to be renamed */
FILE_NO fno; /* file id number for file to be renamed */ FILE_NO fno; /* file id number for file to be renamed */
const char *fnm; /* new file name */ const char *fnm; /* new file name */
TASK_DECL
{ {
REN_ENTRY_P r; REN_ENTRY_P r;

View file

@ -55,10 +55,9 @@
/* Read currency table /* Read currency table
*/ */
int int
d_rdcurr(currbuff, currsize TASK_PARM) d_rdcurr(currbuff, currsize)
DB_ADDR **currbuff; DB_ADDR **currbuff;
int *currsize; int *currsize;
TASK_DECL
{ {
int cs; int cs;
@ -68,12 +67,11 @@ TASK_DECL
*currbuff = (DB_ADDR *)ALLOC(NULL, cs*sizeof(DB_ADDR), "currbuff"); *currbuff = (DB_ADDR *)ALLOC(NULL, cs*sizeof(DB_ADDR), "currbuff");
if ( *currbuff == NULL ) RETURN( dberr(S_NOMEMORY) ); if ( *currbuff == NULL ) RETURN( dberr(S_NOMEMORY) );
*currsize = cs * sizeof(DB_ADDR); *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; DB_ADDR **currbuff;
TASK_DECL
{ {
DB_ADDR *cb_ptr; DB_ADDR *cb_ptr;
@ -91,9 +89,8 @@ TASK_DECL
/* Write currency table /* Write currency table
*/ */
int int
d_wrcurr(currbuff TASK_PARM) d_wrcurr(currbuff)
DB_ADDR *currbuff; DB_ADDR *currbuff;
TASK_DECL
{ {
DB_ADDR *cb_ptr; DB_ADDR *cb_ptr;

View file

@ -52,9 +52,8 @@
/* Set current database /* Set current database
*/ */
int int
d_setdb(dbn TASK_PARM) d_setdb(dbn)
int dbn; /* database number */ int dbn; /* database number */
TASK_DECL
{ {
DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_NOIO)); DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_NOIO));

View file

@ -50,10 +50,9 @@
/* Set current member to current member /* Set current member to current member
*/ */
int 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 sett; /* set table entry number of target member */
int sets; /* set table entry number of source member */ int sets; /* set table entry number of source member */
TASK_DECL
DBN_DECL /* database number */ DBN_DECL /* database number */
{ {
int cmtype; /* current member type */ int cmtype; /* current member type */
@ -64,7 +63,7 @@ DBN_DECL /* database number */
DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); 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)) (nset_check(sett, &sett, (SET_ENTRY * *)&set_ptr) != S_OKAY))
RETURN( db_status ); RETURN( db_status );

View file

@ -50,10 +50,9 @@
/* Set current member to current owner /* Set current member to current owner
*/ */
int int
d_setmo(setm, seto TASK_PARM DBN_PARM) d_setmo(setm, seto DBN_PARM)
int setm; /* set table entry number of member */ int setm; /* set table entry number of member */
int seto; /* set table entry number of owner */ int seto; /* set table entry number of owner */
TASK_DECL
DBN_DECL /* database number */ DBN_DECL /* database number */
{ {
int mem; int mem;

View file

@ -50,9 +50,8 @@
/* Set current member to current record /* Set current member to current record
*/ */
int int
d_setmr(set TASK_PARM DBN_PARM) d_setmr(set DBN_PARM)
int set; /* set table entry number */ int set; /* set table entry number */
TASK_DECL
DBN_DECL /* database number */ DBN_DECL /* database number */
{ {
int crtype; /* current record type */ int crtype; /* current record type */
@ -69,7 +68,7 @@ DBN_DECL /* database number */
if ( ! curr_rec ) if ( ! curr_rec )
RETURN( dberr( S_NOCR ) ); 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 ); RETURN( db_status );
crtype += NUM2INT(-RECMARK, rt_offset); crtype += NUM2INT(-RECMARK, rt_offset);

View file

@ -51,10 +51,9 @@
/* Set current owner to current member /* Set current owner to current member
*/ */
int int
d_setom(nseto, nsetm TASK_PARM DBN_PARM) d_setom(nseto, nsetm DBN_PARM)
int nseto; /* set table entry number of owner */ int nseto; /* set table entry number of owner */
int nsetm; /* set table entry number of member */ int nsetm; /* set table entry number of member */
TASK_DECL
DBN_DECL /* database number */ DBN_DECL /* database number */
{ {
int seto, setm; int seto, setm;
@ -63,7 +62,7 @@ DBN_DECL /* database number */
DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); 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)) (nset_check(nseto, &seto, (SET_ENTRY * *)&set_ptr) != S_OKAY))
RETURN( db_status ); RETURN( db_status );
cmtype += NUM2INT(-RECMARK, rt_offset); cmtype += NUM2INT(-RECMARK, rt_offset);

View file

@ -51,10 +51,9 @@
/* Set current owner to current owner /* Set current owner to current owner
*/ */
int 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 nsett; /* set table entry number of target owner */
int nsets; /* set table entry number of source owner */ int nsets; /* set table entry number of source owner */
TASK_DECL
DBN_DECL /* database number */ DBN_DECL /* database number */
{ {
int sett, sets; int sett, sets;

View file

@ -50,9 +50,8 @@
/* Set current owner to current record /* Set current owner to current record
*/ */
int int
d_setor(nset TASK_PARM DBN_PARM) d_setor(nset DBN_PARM)
int nset; /* set number */ int nset; /* set number */
TASK_DECL
DBN_DECL /* database number */ DBN_DECL /* database number */
{ {
int set; int set;
@ -62,7 +61,7 @@ DBN_DECL /* database number */
DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO)); DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
if ((nset_check(nset, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) || 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 ); RETURN( db_status );
crtype += NUM2INT(-RECMARK, rt_offset); crtype += NUM2INT(-RECMARK, rt_offset);

View file

@ -50,9 +50,8 @@
/* Set current record to current member /* Set current record to current member
*/ */
int int
d_setrm(set TASK_PARM DBN_PARM) d_setrm(set DBN_PARM)
int set; /* set table entry number */ int set; /* set table entry number */
TASK_DECL
DBN_DECL /* database number */ DBN_DECL /* database number */
{ {
SET_ENTRY *set_ptr; SET_ENTRY *set_ptr;

View file

@ -50,9 +50,8 @@
/* Set current record to current owner /* Set current record to current owner
*/ */
int int
d_setro(set TASK_PARM DBN_PARM) d_setro(set DBN_PARM)
int set; /* set table entry number */ int set; /* set table entry number */
TASK_DECL
DBN_DECL /* database number */ DBN_DECL /* database number */
{ {
SET_ENTRY *set_ptr; SET_ENTRY *set_ptr;

View file

@ -46,9 +46,8 @@
/* Called once at the beginning of each external function /* 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 DBN_DECL
TASK_PTR_DECL
LOCK_DECL LOCK_DECL
{ {
db_status = S_OKAY; db_status = S_OKAY;