mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
Low-hanging fruit: Fix most warnings in lib/DtSearch.
Most of these are related to missing includes and prototypes as well as parens/braces. A few are also potential 64bit issues.
This commit is contained in:
parent
0bbd4ff9aa
commit
a1cbcd24db
89 changed files with 181 additions and 33 deletions
|
@ -94,6 +94,7 @@
|
||||||
* Revision 1.4 1995/08/31 21:54:23 miker
|
* Revision 1.4 1995/08/31 21:54:23 miker
|
||||||
* Rename austext_exit() to DtSearchExit().
|
* Rename austext_exit() to DtSearchExit().
|
||||||
*/
|
*/
|
||||||
|
#include <stdlib.h>
|
||||||
#include "Search.h"
|
#include "Search.h"
|
||||||
|
|
||||||
void (*austext_exit_first) (int) = NULL;
|
void (*austext_exit_first) (int) = NULL;
|
||||||
|
|
|
@ -83,6 +83,7 @@
|
||||||
* Initial revision
|
* Initial revision
|
||||||
*/
|
*/
|
||||||
#include "SearchE.h"
|
#include "SearchE.h"
|
||||||
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "boolpars.h"
|
#include "boolpars.h"
|
||||||
#include "boolyac.h"
|
#include "boolyac.h"
|
||||||
|
@ -223,7 +224,7 @@ static TRUTHTAB *creatett (int stemno, int pmsz, unsigned char *permutes)
|
||||||
/* Destructor of passed truth table.
|
/* Destructor of passed truth table.
|
||||||
* Unlinks it from ttlist and frees it.
|
* Unlinks it from ttlist and frees it.
|
||||||
*/
|
*/
|
||||||
static void *freett (TRUTHTAB *argtt)
|
static void freett (TRUTHTAB *argtt)
|
||||||
{
|
{
|
||||||
TRUTHTAB *tt;
|
TRUTHTAB *tt;
|
||||||
TRUTHTAB **lastlink = &ttlist;
|
TRUTHTAB **lastlink = &ttlist;
|
||||||
|
@ -809,7 +810,7 @@ GET_ANOTHER_TOKEN:
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Load stem into stems arrays and return it's truth table. */
|
/* Load stem into stems arrays and return it's truth table. */
|
||||||
if (yylval.truthtab = get_stem_truthtab (stembufp, yytext)) {
|
if ((yylval.truthtab = get_stem_truthtab (stembufp, yytext))) {
|
||||||
retn_token = WORD_TOKEN;
|
retn_token = WORD_TOKEN;
|
||||||
last_token_was_boolop = FALSE;
|
last_token_was_boolop = FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -169,6 +169,8 @@ static long tot_addr_count; /* may be > reccount bcs deletes */
|
||||||
static int vistano;
|
static int vistano;
|
||||||
static float *wtvec = NULL;
|
static float *wtvec = NULL;
|
||||||
|
|
||||||
|
extern void find_keyword (char *cur_word, int vista_num);
|
||||||
|
extern void read_wordstr (struct or_hwordrec * glob_word, int vista_num);
|
||||||
|
|
||||||
/************************************************/
|
/************************************************/
|
||||||
/* */
|
/* */
|
||||||
|
|
|
@ -60,6 +60,8 @@
|
||||||
|
|
||||||
#define PROGNAME "DBCHANGE"
|
#define PROGNAME "DBCHANGE"
|
||||||
|
|
||||||
|
void oe_uninitialize (void);
|
||||||
|
|
||||||
/************************************************/
|
/************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* file_has_changed */
|
/* file_has_changed */
|
||||||
|
|
|
@ -91,6 +91,7 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#define PROGNAME "DTOE"
|
#define PROGNAME "DTOE"
|
||||||
#define MAX_LASTQRY 64
|
#define MAX_LASTQRY 64
|
||||||
|
@ -104,6 +105,9 @@ typedef struct {
|
||||||
char *str;
|
char *str;
|
||||||
} NUMSTR;
|
} NUMSTR;
|
||||||
|
|
||||||
|
int boolean_parse (void);
|
||||||
|
void boolean_search (void);
|
||||||
|
void ve_delete (void);
|
||||||
|
|
||||||
/*------------------ OPERA ENGINE GLOBALS --------------------
|
/*------------------ OPERA ENGINE GLOBALS --------------------
|
||||||
* Default values set by init_globals() in oeinit.c
|
* Default values set by init_globals() in oeinit.c
|
||||||
|
@ -120,7 +124,7 @@ char *global_memory_ptr = NULL; /* shared mem, dynam
|
||||||
int shm_id = 0; /* shared mem, dynam defrag */
|
int shm_id = 0; /* shared mem, dynam defrag */
|
||||||
|
|
||||||
int OE_bmhtab_strlen[DtSrMAX_STEMCOUNT] = { 0 };
|
int OE_bmhtab_strlen[DtSrMAX_STEMCOUNT] = { 0 };
|
||||||
size_t OE_bmhtables[DtSrMAX_STEMCOUNT][MAX_BMHTAB] = { 0 };
|
size_t OE_bmhtables[DtSrMAX_STEMCOUNT][MAX_BMHTAB] = { { 0 } };
|
||||||
int OE_dbn = 0; /* dynamic */
|
int OE_dbn = 0; /* dynamic */
|
||||||
int OE_enable_markdel = 0;
|
int OE_enable_markdel = 0;
|
||||||
int OE_enable_usernotes = 0;
|
int OE_enable_usernotes = 0;
|
||||||
|
|
|
@ -66,6 +66,7 @@
|
||||||
#include "SearchE.h"
|
#include "SearchE.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#define XOS_USE_NO_LOCKING
|
#define XOS_USE_NO_LOCKING
|
||||||
#define X_INCLUDE_TIME_H
|
#define X_INCLUDE_TIME_H
|
||||||
|
|
|
@ -110,6 +110,7 @@
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
#define PROGNAME "DTSRAPI"
|
#define PROGNAME "DTSRAPI"
|
||||||
|
@ -120,7 +121,7 @@
|
||||||
/*------------------- PRIVATE GLOBALS ---------------------*/
|
/*------------------- PRIVATE GLOBALS ---------------------*/
|
||||||
/* Usrblk should not be visible to user interface code,
|
/* Usrblk should not be visible to user interface code,
|
||||||
* but must be visible to real engine... */
|
* but must be visible to real engine... */
|
||||||
USRBLK usrblk = { 0 };
|
USRBLK usrblk = { { 0 } };
|
||||||
static int save_search_type = '$';
|
static int save_search_type = '$';
|
||||||
static char *sprintbuf = NULL;
|
static char *sprintbuf = NULL;
|
||||||
|
|
||||||
|
@ -321,7 +322,7 @@ int DtSearchInit (
|
||||||
sprintbuf = austext_malloc (SPRINTBUFSZ, PROGNAME "135", NULL);
|
sprintbuf = austext_malloc (SPRINTBUFSZ, PROGNAME "135", NULL);
|
||||||
|
|
||||||
/* Open msgs and help text catalogs. */
|
/* Open msgs and help text catalogs. */
|
||||||
if (switches & DtSrInNOLOCALE == 0) {
|
if (switches & (DtSrInNOLOCALE == 0)) {
|
||||||
setlocale (LC_ALL, "");
|
setlocale (LC_ALL, "");
|
||||||
dtsearch_catd = catopen (FNAME_DTSRCAT, 0);
|
dtsearch_catd = catopen (FNAME_DTSRCAT, 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,6 +66,7 @@
|
||||||
*/
|
*/
|
||||||
#include "SearchE.h"
|
#include "SearchE.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#define MS_misc 1
|
#define MS_misc 1
|
||||||
|
|
||||||
|
|
|
@ -75,6 +75,7 @@
|
||||||
*/
|
*/
|
||||||
#include "SearchE.h"
|
#include "SearchE.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include "vista.h"
|
#include "vista.h"
|
||||||
|
@ -93,6 +94,8 @@ extern time_t hctree_id; /**** hardcoded only temporarily ******/
|
||||||
static int max_abstrbufsz = 0;
|
static int max_abstrbufsz = 0;
|
||||||
static int max_ormisc_size;
|
static int max_ormisc_size;
|
||||||
|
|
||||||
|
char *strupr(char *);
|
||||||
|
|
||||||
/************************************************/
|
/************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* dummy_workproc */
|
/* dummy_workproc */
|
||||||
|
@ -669,7 +672,7 @@ static void store_next_misc (
|
||||||
* terminate the abstract string in case there are no more misc recs.
|
* terminate the abstract string in case there are no more misc recs.
|
||||||
* (but should not occur).
|
* (but should not occur).
|
||||||
*/
|
*/
|
||||||
if (store_state = STORE_ABSTR)
|
if ((store_state = STORE_ABSTR))
|
||||||
*targ = 0;
|
*targ = 0;
|
||||||
return;
|
return;
|
||||||
} /* store_next_misc() */
|
} /* store_next_misc() */
|
||||||
|
|
|
@ -57,6 +57,7 @@
|
||||||
*/
|
*/
|
||||||
#include "SearchP.h"
|
#include "SearchP.h"
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#define X_INCLUDE_STRING_H
|
#define X_INCLUDE_STRING_H
|
||||||
#define XOS_USE_NO_LOCKING
|
#define XOS_USE_NO_LOCKING
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
* Name changes for DtSearch.
|
* Name changes for DtSearch.
|
||||||
*/
|
*/
|
||||||
#include "SearchP.h"
|
#include "SearchP.h"
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#define X_INCLUDE_STRING_H
|
#define X_INCLUDE_STRING_H
|
||||||
#define XOS_USE_NO_LOCKING
|
#define XOS_USE_NO_LOCKING
|
||||||
|
|
|
@ -232,6 +232,7 @@ static UCHAR *save_parg_string = NULL;
|
||||||
static UCHAR *substrbuf = NULL;
|
static UCHAR *substrbuf = NULL;
|
||||||
static long substr_offset;
|
static long substr_offset;
|
||||||
|
|
||||||
|
char *ensure_end_slash (char *pathstr);
|
||||||
|
|
||||||
/************************************************/
|
/************************************************/
|
||||||
/* */
|
/* */
|
||||||
|
@ -311,7 +312,7 @@ static int read_jchar (void)
|
||||||
jstate = JS_KANJI;
|
jstate = JS_KANJI;
|
||||||
else
|
else
|
||||||
jstate = jstates_set1 [(jchar[0] & 0x7F) - 32];
|
jstate = jstates_set1 [(jchar[0] & 0x7F) - 32];
|
||||||
if (jchar[1] = readchar (NULL))
|
if ((jchar[1] = readchar (NULL)))
|
||||||
readcount++;
|
readcount++;
|
||||||
else
|
else
|
||||||
jstate = JS_ETX;
|
jstate = JS_ETX;
|
||||||
|
@ -362,7 +363,7 @@ static int read_jchar (void)
|
||||||
if (jchar[0] == SS2_CHAR) {
|
if (jchar[0] == SS2_CHAR) {
|
||||||
jcharlen = 2;
|
jcharlen = 2;
|
||||||
jstate = JS_HALFKATA;
|
jstate = JS_HALFKATA;
|
||||||
if (jchar[1] = readchar (NULL))
|
if ((jchar[1] = readchar (NULL)))
|
||||||
readcount++;
|
readcount++;
|
||||||
else
|
else
|
||||||
jstate = JS_ETX;
|
jstate = JS_ETX;
|
||||||
|
@ -908,7 +909,7 @@ FILL_ANOTHER_SUBSTRING:
|
||||||
* one by one, ie parse and return word tokens from string,
|
* one by one, ie parse and return word tokens from string,
|
||||||
* including possible kanji compounds if switched on.
|
* including possible kanji compounds if switched on.
|
||||||
*/
|
*/
|
||||||
if (token = parse_substring())
|
if ((token = parse_substring()))
|
||||||
return (char *) token;
|
return (char *) token;
|
||||||
|
|
||||||
/* When current substring is empty, go back and fill another one.
|
/* When current substring is empty, go back and fill another one.
|
||||||
|
|
|
@ -156,6 +156,8 @@ typedef struct prule_t {
|
||||||
char is_last_rule; /* '$' terminate or '>' continue algorithm */
|
char is_last_rule; /* '$' terminate or '>' continue algorithm */
|
||||||
} PRULE;
|
} PRULE;
|
||||||
|
|
||||||
|
char *ensure_end_slash (char *pathstr);
|
||||||
|
void unload_jpn_language (DBLK *dblk);
|
||||||
|
|
||||||
/************************************************/
|
/************************************************/
|
||||||
/* */
|
/* */
|
||||||
|
@ -389,7 +391,7 @@ char *teskey_parser (PARG *parg)
|
||||||
READ_ANOTHER_WORD:
|
READ_ANOTHER_WORD:
|
||||||
outp = outbuf;
|
outp = outbuf;
|
||||||
tpstate = BETW_WORDS;
|
tpstate = BETW_WORDS;
|
||||||
while (*outp = cofunction (cofunction_arg)) {
|
while ((*outp = cofunction (cofunction_arg))) {
|
||||||
readcount++;
|
readcount++;
|
||||||
cofunction_arg = NULL;
|
cofunction_arg = NULL;
|
||||||
|
|
||||||
|
@ -421,7 +423,7 @@ READ_ANOTHER_WORD:
|
||||||
* Otherwise discard just like non_concord.
|
* Otherwise discard just like non_concord.
|
||||||
*/
|
*/
|
||||||
outp++;
|
outp++;
|
||||||
if (*outp = cofunction(NULL))
|
if ((*outp = cofunction(NULL)))
|
||||||
readcount++;
|
readcount++;
|
||||||
if ((charmap[*outp] & CONCORDABLE) != 0) {
|
if ((charmap[*outp] & CONCORDABLE) != 0) {
|
||||||
*outp = charmap[*outp] & 0x00ff;
|
*outp = charmap[*outp] & 0x00ff;
|
||||||
|
@ -476,7 +478,7 @@ READ_ANOTHER_WORD:
|
||||||
}
|
}
|
||||||
/* Must be opt_concord... */
|
/* Must be opt_concord... */
|
||||||
outp++;
|
outp++;
|
||||||
if (*outp = cofunction(NULL))
|
if ((*outp = cofunction(NULL)))
|
||||||
readcount++;
|
readcount++;
|
||||||
if ((charmap[*outp] & CONCORDABLE) != 0) {
|
if ((charmap[*outp] & CONCORDABLE) != 0) {
|
||||||
if (outp < endmaxword) {
|
if (outp < endmaxword) {
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
* Freeze DtSearch 0.1, AusText 2.1.8
|
* Freeze DtSearch 0.1, AusText 2.1.8
|
||||||
*/
|
*/
|
||||||
#include "SearchP.h"
|
#include "SearchP.h"
|
||||||
|
#include <stdlib.h>
|
||||||
#define PROGNAME "MSGS"
|
#define PROGNAME "MSGS"
|
||||||
|
|
||||||
/****************************************/
|
/****************************************/
|
||||||
|
|
|
@ -67,6 +67,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "SearchP.h"
|
#include "SearchP.h"
|
||||||
|
#include <stdlib.h>
|
||||||
#define X_INCLUDE_STRING_H
|
#define X_INCLUDE_STRING_H
|
||||||
#define XOS_USE_NO_LOCKING
|
#define XOS_USE_NO_LOCKING
|
||||||
#include <X11/Xos_r.h>
|
#include <X11/Xos_r.h>
|
||||||
|
|
|
@ -102,6 +102,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "SearchE.h"
|
#include "SearchE.h"
|
||||||
|
#include <ctype.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#define X_INCLUDE_STRING_H
|
#define X_INCLUDE_STRING_H
|
||||||
#define XOS_USE_NO_LOCKING
|
#define XOS_USE_NO_LOCKING
|
||||||
|
@ -110,6 +111,8 @@
|
||||||
#include <unistd.h> /* for POSIX getcwd() */
|
#include <unistd.h> /* for POSIX getcwd() */
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
char *strupr (char *s);
|
||||||
|
|
||||||
/*****#define DEBUG_DUMP******/
|
/*****#define DEBUG_DUMP******/
|
||||||
/********#define DEBUG_OEF**********/
|
/********#define DEBUG_OEF**********/
|
||||||
|
|
||||||
|
@ -145,13 +148,13 @@ char *OE_inittab_dir = NULL;
|
||||||
********/
|
********/
|
||||||
OEFTAB oef_table[] =
|
OEFTAB oef_table[] =
|
||||||
{
|
{
|
||||||
"AUDIT", &OEF_audit, FALSE,
|
{ "AUDIT", &OEF_audit, FALSE, },
|
||||||
"DISCARD", &OEF_discard, FALSE,
|
{ "DISCARD", &OEF_discard, FALSE, },
|
||||||
"NEWS", &OEF_news, FALSE,
|
{ "NEWS", &OEF_news, FALSE, },
|
||||||
"NOTESNOT", &OEF_notesnot, FALSE,
|
{ "NOTESNOT", &OEF_notesnot, FALSE, },
|
||||||
"NOTESSEM", &OEF_notessem, FALSE,
|
{ "NOTESSEM", &OEF_notessem, FALSE, },
|
||||||
"README", &OEF_readme, FALSE,
|
{ "README", &OEF_readme, FALSE, },
|
||||||
NULL, NULL, FALSE /* end of list */
|
{ NULL, NULL, FALSE }, /* end of list */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -99,6 +99,7 @@
|
||||||
*/
|
*/
|
||||||
#include "SearchE.h"
|
#include "SearchE.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
|
@ -68,12 +68,10 @@
|
||||||
|
|
||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include "vista.h"
|
#include "vista.h"
|
||||||
#include "dbtype.h"
|
#include "dbtype.h"
|
||||||
|
|
||||||
|
|
||||||
char *malloc(P1(unsigned));
|
|
||||||
char *calloc(P1(unsigned) Pi(unsigned));
|
|
||||||
#define memlock(p) (p)
|
#define memlock(p) (p)
|
||||||
#define memunlock(p) 1
|
#define memunlock(p) 1
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
|
|
||||||
/* Get current member type
|
/* Get current member type
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_cmtype(set, cmtype TASK_PARM DBN_PARM)
|
d_cmtype(set, cmtype TASK_PARM DBN_PARM)
|
||||||
int set;
|
int set;
|
||||||
int FAR *cmtype;
|
int FAR *cmtype;
|
||||||
|
|
|
@ -73,6 +73,7 @@ typedef struct {
|
||||||
|
|
||||||
/* Connect the current record as member of set
|
/* Connect the current record as member of set
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_connect(set TASK_PARM DBN_PARM)
|
d_connect(set TASK_PARM DBN_PARM)
|
||||||
int set; /* Set constant */
|
int set; /* Set constant */
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
@ -357,8 +358,8 @@ char FAR *mem2; /* member record 2 */
|
||||||
/* compare the two fields */
|
/* compare the two fields */
|
||||||
/* computation is pointer to next sort field in member record */
|
/* computation is pointer to next sort field in member record */
|
||||||
fld_ptr = &field_table[srt1_ptr->se_fld];
|
fld_ptr = &field_table[srt1_ptr->se_fld];
|
||||||
if (cmp = fldcmp(fld_ptr, mem1 + fld_ptr->fd_ptr,
|
if ((cmp = fldcmp(fld_ptr, mem1 + fld_ptr->fd_ptr,
|
||||||
mem2 + field_table[srt2_ptr->se_fld].fd_ptr))
|
mem2 + field_table[srt2_ptr->se_fld].fd_ptr)))
|
||||||
return (cmp); /* return at first unequal fields */
|
return (cmp); /* return at first unequal fields */
|
||||||
}
|
}
|
||||||
/* fields match */
|
/* fields match */
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
|
|
||||||
/* Get current owner type
|
/* Get current owner type
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_cotype(set, cotype TASK_PARM DBN_PARM)
|
d_cotype(set, cotype TASK_PARM DBN_PARM)
|
||||||
int set;
|
int set;
|
||||||
int FAR *cotype;
|
int FAR *cotype;
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
|
|
||||||
/* Get current record
|
/* Get current record
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_crget(dba TASK_PARM DBN_PARM)
|
d_crget(dba TASK_PARM DBN_PARM)
|
||||||
DB_ADDR FAR *dba; /* db address of record to become current */
|
DB_ADDR FAR *dba; /* db address of record to become current */
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
@ -58,7 +59,7 @@ DBN_DECL
|
||||||
|
|
||||||
if ( ! dbopen ) RETURN( dberr(S_DBOPEN) );
|
if ( ! dbopen ) RETURN( dberr(S_DBOPEN) );
|
||||||
|
|
||||||
if ( *dba = curr_rec )
|
if (( *dba = curr_rec ))
|
||||||
db_status = S_OKAY;
|
db_status = S_OKAY;
|
||||||
else
|
else
|
||||||
db_status = S_NOCR;
|
db_status = S_NOCR;
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
|
|
||||||
/* Read data from field of current record
|
/* Read data from field of current record
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_crread(field, data TASK_PARM DBN_PARM)
|
d_crread(field, data TASK_PARM DBN_PARM)
|
||||||
long field; /* Field constant */
|
long field; /* Field constant */
|
||||||
char FAR *data; /* Data area to contain field contents */
|
char FAR *data; /* Data area to contain field contents */
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
|
|
||||||
/* Set current record
|
/* Set current record
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_crset(dba TASK_PARM DBN_PARM)
|
d_crset(dba TASK_PARM DBN_PARM)
|
||||||
DB_ADDR FAR *dba; /* db address of record to become current */
|
DB_ADDR FAR *dba; /* db address of record to become current */
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
|
|
||||||
/* Get current record type
|
/* Get current record type
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_crtype(crtype TASK_PARM DBN_PARM)
|
d_crtype(crtype TASK_PARM DBN_PARM)
|
||||||
int FAR *crtype;
|
int FAR *crtype;
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
|
|
||||||
/* Write data to a field in the current record
|
/* Write data to a field in the current record
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_crwrite(field, data TASK_PARM DBN_PARM)
|
d_crwrite(field, data TASK_PARM DBN_PARM)
|
||||||
long field; /* field constant */
|
long field; /* field constant */
|
||||||
char FAR *data; /* data area to contain field contents */
|
char FAR *data; /* data area to contain field contents */
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
|
|
||||||
/* Get current set member
|
/* Get current set member
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_csmget(set, dba TASK_PARM DBN_PARM)
|
d_csmget(set, dba TASK_PARM DBN_PARM)
|
||||||
int set; /* Set table entry */
|
int set; /* Set table entry */
|
||||||
DB_ADDR FAR *dba; /* db address of record to become current */
|
DB_ADDR FAR *dba; /* db address of record to become current */
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
|
|
||||||
/* Read data from field of current set member
|
/* Read data from field of current set member
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_csmread(set, field, data TASK_PARM DBN_PARM)
|
d_csmread(set, field, data TASK_PARM DBN_PARM)
|
||||||
int set; /* Set constant */
|
int set; /* Set constant */
|
||||||
long field; /* Field constant */
|
long field; /* Field constant */
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
|
|
||||||
/* Set current set member
|
/* Set current set member
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_csmset(set, dba TASK_PARM DBN_PARM)
|
d_csmset(set, dba TASK_PARM DBN_PARM)
|
||||||
int set; /* Set table entry */
|
int set; /* Set table entry */
|
||||||
DB_ADDR FAR *dba; /* db address of record to become current */
|
DB_ADDR FAR *dba; /* db address of record to become current */
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
|
|
||||||
/* Write data to a field in the current set member
|
/* 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 TASK_PARM DBN_PARM)
|
||||||
int set; /* Set constant */
|
int set; /* Set constant */
|
||||||
long field; /* Field constant */
|
long field; /* Field constant */
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
|
|
||||||
/* Get current set owner
|
/* Get current set owner
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_csoget(set, dba TASK_PARM DBN_PARM)
|
d_csoget(set, dba TASK_PARM DBN_PARM)
|
||||||
int set; /* Set table entry */
|
int set; /* Set table entry */
|
||||||
DB_ADDR FAR *dba; /* db address of record to become current */
|
DB_ADDR FAR *dba; /* db address of record to become current */
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
|
|
||||||
/* Read data from field of current set owner
|
/* Read data from field of current set owner
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_csoread(set, field, data TASK_PARM DBN_PARM)
|
d_csoread(set, field, data TASK_PARM DBN_PARM)
|
||||||
int set; /* Set constant */
|
int set; /* Set constant */
|
||||||
long field; /* Field constant */
|
long field; /* Field constant */
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
|
|
||||||
/* Set current set owner
|
/* Set current set owner
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_csoset(set, dba TASK_PARM DBN_PARM)
|
d_csoset(set, dba TASK_PARM DBN_PARM)
|
||||||
int set; /* Set table entry */
|
int set; /* Set table entry */
|
||||||
DB_ADDR FAR *dba; /* db address of record to become current */
|
DB_ADDR FAR *dba; /* db address of record to become current */
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
|
|
||||||
/* Write data to a field in the current set owner
|
/* 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 TASK_PARM DBN_PARM)
|
||||||
int set; /* Set constant */
|
int set; /* Set constant */
|
||||||
long field; /* Field constant */
|
long field; /* Field constant */
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
|
|
||||||
/* Decode file and slot number from a database address
|
/* Decode file and slot number from a database address
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_decode_dba(dba, file, slot)
|
d_decode_dba(dba, file, slot)
|
||||||
DB_ADDR dba; /* database address */
|
DB_ADDR dba; /* database address */
|
||||||
int FAR *file; /* returned file number */
|
int FAR *file; /* returned file number */
|
||||||
|
@ -57,6 +58,7 @@ long FAR *slot; /* returned slot number */
|
||||||
|
|
||||||
/* Encode database address from file and slot number
|
/* Encode database address from file and slot number
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_encode_dba(file, slot, dba)
|
d_encode_dba(file, slot, dba)
|
||||||
int file; /* returned file number */
|
int file; /* returned file number */
|
||||||
long slot; /* returned slot number */
|
long slot; /* returned slot number */
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
|
|
||||||
/* Set Database Dictionary Path
|
/* Set Database Dictionary Path
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_dbdpath(path TASK_PARM)
|
d_dbdpath(path TASK_PARM)
|
||||||
CONST char FAR *path;
|
CONST char FAR *path;
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
|
|
||||||
/* Set Database Files Path
|
/* Set Database Files Path
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_dbfpath(path TASK_PARM)
|
d_dbfpath(path TASK_PARM)
|
||||||
CONST char FAR *path;
|
CONST char FAR *path;
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
|
|
@ -275,6 +275,7 @@ TASK_DECL
|
||||||
|
|
||||||
/* Open db_VISTA database
|
/* Open db_VISTA database
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_open(dbnames, opentype TASK_PARM)
|
d_open(dbnames, opentype TASK_PARM)
|
||||||
CONST char FAR *dbnames;
|
CONST char FAR *dbnames;
|
||||||
CONST char FAR *opentype;
|
CONST char FAR *opentype;
|
||||||
|
@ -441,6 +442,7 @@ TASK FAR *tsk;
|
||||||
|
|
||||||
/* Initialize multiple database table entries
|
/* Initialize multiple database table entries
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
initdbt(dbnames )
|
initdbt(dbnames )
|
||||||
CONST char FAR *dbnames;
|
CONST char FAR *dbnames;
|
||||||
{
|
{
|
||||||
|
@ -901,6 +903,7 @@ static int bld_lock_tables()
|
||||||
/****************************************/
|
/****************************************/
|
||||||
/* Close database
|
/* Close database
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_close(TASK_ONLY)
|
d_close(TASK_ONLY)
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
{
|
{
|
||||||
|
|
|
@ -627,6 +627,10 @@ typedef struct page_entry {
|
||||||
} PAGE_ENTRY;
|
} PAGE_ENTRY;
|
||||||
#define buff Buff.ptr
|
#define buff Buff.ptr
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
#ifndef _STRING_H
|
||||||
|
#define _STRING_H
|
||||||
|
#endif
|
||||||
#include "proto.h"
|
#include "proto.h"
|
||||||
#ifdef MULTI_TASK
|
#ifdef MULTI_TASK
|
||||||
#ifdef NO_DT_COVER
|
#ifdef NO_DT_COVER
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
|
|
||||||
/* Set Database User Identifier
|
/* Set Database User Identifier
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_dbuserid(id TASK_PARM)
|
d_dbuserid(id TASK_PARM)
|
||||||
CONST char FAR *id;
|
CONST char FAR *id;
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
|
|
@ -52,6 +52,7 @@ static DB_ADDR zap_dba = NULL_DBA;
|
||||||
|
|
||||||
/* Delete the current record, with error checking
|
/* Delete the current record, with error checking
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_delete(TASK_DBN_ONLY)
|
d_delete(TASK_DBN_ONLY)
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
DBN_DECL
|
DBN_DECL
|
||||||
|
|
|
@ -54,6 +54,7 @@
|
||||||
/* Warning: this function will destroy the entire contents
|
/* Warning: this function will destroy the entire contents
|
||||||
of the database
|
of the database
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_destroy(dbname TASK_PARM)
|
d_destroy(dbname TASK_PARM)
|
||||||
CONST char FAR *dbname;
|
CONST char FAR *dbname;
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
|
|
@ -228,6 +228,7 @@ static int dio_in(P1(PAGE_ENTRY FAR *) Pi(LOOKUP_ENTRY FAR *)
|
||||||
|
|
||||||
/* Set the maximum number of open db_VISTA files
|
/* Set the maximum number of open db_VISTA files
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_setfiles(num)
|
d_setfiles(num)
|
||||||
int num;
|
int num;
|
||||||
{
|
{
|
||||||
|
@ -242,6 +243,7 @@ int num;
|
||||||
|
|
||||||
/* Set number of virtual memory pages
|
/* Set number of virtual memory pages
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_setpages(dbpgs, ixpgs)
|
d_setpages(dbpgs, ixpgs)
|
||||||
int dbpgs; /* # of db cache pages */
|
int dbpgs; /* # of db cache pages */
|
||||||
int ixpgs; /* # of index cache pages - ignored in single-user version */
|
int ixpgs; /* # of index cache pages - ignored in single-user version */
|
||||||
|
@ -266,6 +268,7 @@ int ixpgs; /* # of index cache pages - ignored in single-user version */
|
||||||
/****************************************/
|
/****************************************/
|
||||||
/* Open a database file
|
/* Open a database file
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
dio_open( fno )
|
dio_open( fno )
|
||||||
FILE_NO fno;
|
FILE_NO fno;
|
||||||
{
|
{
|
||||||
|
@ -313,6 +316,7 @@ FILE_NO fno;
|
||||||
/****************************************/
|
/****************************************/
|
||||||
/* Close a database file
|
/* Close a database file
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
dio_close( fno )
|
dio_close( fno )
|
||||||
FILE_NO fno;
|
FILE_NO fno;
|
||||||
{
|
{
|
||||||
|
@ -335,6 +339,7 @@ FILE_NO fno;
|
||||||
/****************************************/
|
/****************************************/
|
||||||
/* Initialize database I/O
|
/* Initialize database I/O
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
dio_init()
|
dio_init()
|
||||||
{
|
{
|
||||||
CHAR_P Tempbuff;
|
CHAR_P Tempbuff;
|
||||||
|
@ -549,6 +554,7 @@ void dio_free()
|
||||||
/****************************************/
|
/****************************************/
|
||||||
/* Clear pages for a single file.
|
/* Clear pages for a single file.
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
dio_clrfile(fno )
|
dio_clrfile(fno )
|
||||||
register FILE_NO fno;
|
register FILE_NO fno;
|
||||||
{
|
{
|
||||||
|
@ -564,6 +570,7 @@ register FILE_NO fno;
|
||||||
/****************************************/
|
/****************************************/
|
||||||
/* Clear all pages for *all* files from I/O buffer
|
/* Clear all pages for *all* files from I/O buffer
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
dio_clear()
|
dio_clear()
|
||||||
{
|
{
|
||||||
return( clear_cache(0, size_ft) );
|
return( clear_cache(0, size_ft) );
|
||||||
|
@ -787,6 +794,7 @@ FILE_NO file_no;
|
||||||
/****************************************/
|
/****************************************/
|
||||||
/* Database I/O page get
|
/* Database I/O page get
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
dio_get( page_no, page_ptr, hold )
|
dio_get( page_no, page_ptr, hold )
|
||||||
F_ADDR page_no;
|
F_ADDR page_no;
|
||||||
char FAR * FAR *page_ptr;
|
char FAR * FAR *page_ptr;
|
||||||
|
@ -829,6 +837,7 @@ int hold;
|
||||||
/****************************************/
|
/****************************************/
|
||||||
/* Set modified flag for a page
|
/* Set modified flag for a page
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
dio_touch( page_no )
|
dio_touch( page_no )
|
||||||
F_ADDR page_no;
|
F_ADDR page_no;
|
||||||
{
|
{
|
||||||
|
@ -879,6 +888,7 @@ F_ADDR page_no;
|
||||||
* Merely returns ptr into rec in a page
|
* Merely returns ptr into rec in a page
|
||||||
* unless a page swap is necessary.
|
* unless a page swap is necessary.
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
dio_read( dba, recptr, hold )
|
dio_read( dba, recptr, hold )
|
||||||
DB_ADDR dba;
|
DB_ADDR dba;
|
||||||
char FAR * FAR *recptr;
|
char FAR * FAR *recptr;
|
||||||
|
@ -935,6 +945,7 @@ int hold;
|
||||||
* Sets page's 'touched' flags, timestamps, etc.
|
* Sets page's 'touched' flags, timestamps, etc.
|
||||||
* If recptr not NULL, copies rec to page cache.
|
* If recptr not NULL, copies rec to page cache.
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
dio_write( dba, recptr, release )
|
dio_write( dba, recptr, release )
|
||||||
DB_ADDR dba;
|
DB_ADDR dba;
|
||||||
CONST char FAR *recptr;
|
CONST char FAR *recptr;
|
||||||
|
@ -994,6 +1005,7 @@ int release;
|
||||||
|
|
||||||
/* Release database page hold
|
/* Release database page hold
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
dio_release( dba )
|
dio_release( dba )
|
||||||
DB_ADDR dba;
|
DB_ADDR dba;
|
||||||
{
|
{
|
||||||
|
@ -1130,6 +1142,7 @@ INT rid;
|
||||||
/****************************************/
|
/****************************************/
|
||||||
/* Search a cache for page
|
/* Search a cache for page
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
dio_findpg(file, page, pg_table, xpg_ptr, xlu_ptr )
|
dio_findpg(file, page, pg_table, xpg_ptr, xlu_ptr )
|
||||||
FILE_NO file; /* file number = 0..size_ft-1 */
|
FILE_NO file; /* file number = 0..size_ft-1 */
|
||||||
F_ADDR page; /* database page number */
|
F_ADDR page; /* database page number */
|
||||||
|
@ -1435,6 +1448,7 @@ LOOKUP_ENTRY FAR * FAR *xlu_ptr;/* pointer to lookup table slot for found page*/
|
||||||
* slot is byte swapped before the io by calling the
|
* slot is byte swapped before the io by calling the
|
||||||
* page swap function.
|
* page swap function.
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
#ifndef NO_TRANS
|
#ifndef NO_TRANS
|
||||||
dio_out(pg_ptr, lu_ptr, db_cache)
|
dio_out(pg_ptr, lu_ptr, db_cache)
|
||||||
#else
|
#else
|
||||||
|
@ -1722,6 +1736,7 @@ static int dio_pzflush()
|
||||||
/****************************************/
|
/****************************************/
|
||||||
/* Read a file's page zero
|
/* Read a file's page zero
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
dio_pzread(fno)
|
dio_pzread(fno)
|
||||||
FILE_NO fno; /* file number */
|
FILE_NO fno; /* file number */
|
||||||
{
|
{
|
||||||
|
@ -1764,6 +1779,7 @@ FILE_NO fno; /* file number */
|
||||||
* ie from delete chain if possible.
|
* ie from delete chain if possible.
|
||||||
* Returns memory address of the free slot into 'loc'.
|
* Returns memory address of the free slot into 'loc'.
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
dio_pzalloc(fno, loc )
|
dio_pzalloc(fno, loc )
|
||||||
FILE_NO fno; /* file number */
|
FILE_NO fno; /* file number */
|
||||||
F_ADDR *loc; /* pointer to allocated location */
|
F_ADDR *loc; /* pointer to allocated location */
|
||||||
|
@ -1831,6 +1847,7 @@ F_ADDR *loc; /* pointer to allocated location */
|
||||||
/****************************************/
|
/****************************************/
|
||||||
/* Delete record slot or key node from page zero
|
/* Delete record slot or key node from page zero
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
dio_pzdel(fno, loc )
|
dio_pzdel(fno, loc )
|
||||||
FILE_NO fno; /* file number */
|
FILE_NO fno; /* file number */
|
||||||
F_ADDR loc; /* location to be freed */
|
F_ADDR loc; /* location to be freed */
|
||||||
|
|
|
@ -67,6 +67,7 @@ typedef struct {
|
||||||
|
|
||||||
/* Disconnect the current member of set
|
/* Disconnect the current member of set
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_discon(nset TASK_PARM DBN_PARM)
|
d_discon(nset TASK_PARM DBN_PARM)
|
||||||
int nset; /* set number */
|
int nset; /* set number */
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
|
|
||||||
/* Disconnect from all sets (owner and member) and delete record
|
/* Disconnect from all sets (owner and member) and delete record
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_disdel(TASK_DBN_ONLY)
|
d_disdel(TASK_DBN_ONLY)
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
DBN_DECL
|
DBN_DECL
|
||||||
|
|
|
@ -54,6 +54,7 @@
|
||||||
|
|
||||||
/* Create and fill a new record
|
/* Create and fill a new record
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_fillnew( nrec, recval TASK_PARM DBN_PARM )
|
d_fillnew( nrec, recval TASK_PARM DBN_PARM )
|
||||||
int nrec; /* record number */
|
int nrec; /* record number */
|
||||||
CONST char FAR *recval; /* record value */
|
CONST char FAR *recval; /* record value */
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
|
|
||||||
/* Find owner of current record
|
/* Find owner of current record
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_findco(nset TASK_PARM DBN_PARM)
|
d_findco(nset TASK_PARM DBN_PARM)
|
||||||
int nset;
|
int nset;
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
|
|
||||||
/* Find first member of set
|
/* Find first member of set
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_findfm(nset TASK_PARM DBN_PARM)
|
d_findfm(nset TASK_PARM DBN_PARM)
|
||||||
int nset;
|
int nset;
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
|
|
||||||
/* Find last member of set
|
/* Find last member of set
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_findlm(nset TASK_PARM DBN_PARM)
|
d_findlm(nset TASK_PARM DBN_PARM)
|
||||||
int nset;
|
int nset;
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
|
|
||||||
/* Find next member of set
|
/* Find next member of set
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_findnm(nset TASK_PARM DBN_PARM)
|
d_findnm(nset TASK_PARM DBN_PARM)
|
||||||
int nset;
|
int nset;
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
|
|
||||||
/* Find previous member of set
|
/* Find previous member of set
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_findpm(nset TASK_PARM DBN_PARM)
|
d_findpm(nset TASK_PARM DBN_PARM)
|
||||||
int nset;
|
int nset;
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
|
|
@ -87,6 +87,7 @@ extern int max_open_files; /* see dio.c */
|
||||||
|
|
||||||
/* Database initialization function
|
/* Database initialization function
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_initialize(TASK_DBN_ONLY)
|
d_initialize(TASK_DBN_ONLY)
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
DBN_DECL
|
DBN_DECL
|
||||||
|
@ -111,6 +112,7 @@ DBN_DECL
|
||||||
|
|
||||||
/* Initialize database file
|
/* Initialize database file
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_initfile(fno TASK_PARM DBN_PARM)
|
d_initfile(fno TASK_PARM 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
|
TASK_DECL
|
||||||
|
|
|
@ -94,6 +94,7 @@ static int initcurr(P0);
|
||||||
|
|
||||||
/* Initialize database tables
|
/* Initialize database tables
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
inittab()
|
inittab()
|
||||||
{
|
{
|
||||||
register int dbt_lc; /* loop control */
|
register int dbt_lc; /* loop control */
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
|
|
||||||
/* 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
|
||||||
d_ismember(set TASK_PARM DBN_PARM)
|
d_ismember(set TASK_PARM DBN_PARM)
|
||||||
int set; /* set table entry */
|
int set; /* set table entry */
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
|
|
||||||
/* 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
|
||||||
d_isowner(set TASK_PARM DBN_PARM)
|
d_isowner(set TASK_PARM DBN_PARM)
|
||||||
int set; /* set table entry */
|
int set; /* set table entry */
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
|
|
@ -53,6 +53,7 @@
|
||||||
|
|
||||||
/* Delete optional key value
|
/* Delete optional key value
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_keydel(field TASK_PARM DBN_PARM)
|
d_keydel(field TASK_PARM DBN_PARM)
|
||||||
long field; /* key field constant */
|
long field; /* key field constant */
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
|
|
@ -45,6 +45,7 @@
|
||||||
|
|
||||||
/* Check for optional key existence
|
/* Check for optional key existence
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_keyexist(field TASK_PARM DBN_PARM)
|
d_keyexist(field TASK_PARM DBN_PARM)
|
||||||
long field; /* key field constant */
|
long field; /* key field constant */
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
|
|
@ -149,6 +149,7 @@ static int unique;
|
||||||
|
|
||||||
/* Open B-tree key field index processing
|
/* Open B-tree key field index processing
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
key_open()
|
key_open()
|
||||||
{
|
{
|
||||||
register int fd_lc; /* loop control */
|
register int fd_lc; /* loop control */
|
||||||
|
@ -234,6 +235,7 @@ void key_close()
|
||||||
|
|
||||||
/* Initialize key function operation
|
/* Initialize key function operation
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
key_init(field )
|
key_init(field )
|
||||||
int field; /* field number to be processed */
|
int field; /* field number to be processed */
|
||||||
{
|
{
|
||||||
|
@ -267,6 +269,7 @@ int field; /* field number to be processed */
|
||||||
|
|
||||||
/* Reset key_info last status to reposition keys on file "fno"
|
/* Reset key_info last status to reposition keys on file "fno"
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
key_reset(fno )
|
key_reset(fno )
|
||||||
FILE_NO fno;
|
FILE_NO fno;
|
||||||
{
|
{
|
||||||
|
@ -285,6 +288,7 @@ FILE_NO fno;
|
||||||
|
|
||||||
/* Locate proper key position on B-tree
|
/* Locate proper key position on B-tree
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
key_locpos(key_val, dba)
|
key_locpos(key_val, dba)
|
||||||
CONST char FAR *key_val; /* key search value */
|
CONST char FAR *key_val; /* key search value */
|
||||||
DB_ADDR FAR *dba; /* database address of located key */
|
DB_ADDR FAR *dba; /* database address of located key */
|
||||||
|
@ -454,6 +458,7 @@ DB_ADDR FAR *dba; /* database address included in comparison if not null */
|
||||||
|
|
||||||
/* Scan thru key field
|
/* Scan thru key field
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
key_scan(fcn, dba )
|
key_scan(fcn, dba )
|
||||||
int fcn; /* next or prev */
|
int fcn; /* next or prev */
|
||||||
DB_ADDR *dba; /* db address of scanned record */
|
DB_ADDR *dba; /* db address of scanned record */
|
||||||
|
@ -571,6 +576,7 @@ DB_ADDR *dba;
|
||||||
|
|
||||||
/* Find key boundary
|
/* Find key boundary
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
key_boundary(fcn, dba )
|
key_boundary(fcn, dba )
|
||||||
int fcn; /* KEYFRST or KEYLAST */
|
int fcn; /* KEYFRST or KEYLAST */
|
||||||
DB_ADDR *dba; /* to get dba of first or last key */
|
DB_ADDR *dba; /* to get dba of first or last key */
|
||||||
|
@ -660,6 +666,7 @@ DB_ADDR *dba; /* to get dba of first or last key */
|
||||||
|
|
||||||
/* Insert key field into B-tree
|
/* Insert key field into B-tree
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
key_insert(fld, key_val, dba )
|
key_insert(fld, key_val, dba )
|
||||||
int fld; /* key field number */
|
int fld; /* key field number */
|
||||||
CONST char FAR *key_val; /* key value */
|
CONST char FAR *key_val; /* key value */
|
||||||
|
@ -850,6 +857,7 @@ NODE FAR *node;
|
||||||
|
|
||||||
/* Delete key from B-tree
|
/* Delete key from B-tree
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
key_delete(fld, key_val, dba )
|
key_delete(fld, key_val, dba )
|
||||||
int fld;
|
int fld;
|
||||||
char CONST FAR *key_val;
|
char CONST FAR *key_val;
|
||||||
|
@ -1140,6 +1148,7 @@ int n;
|
||||||
|
|
||||||
/* Read value of last key scanned
|
/* Read value of last key scanned
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_keyread(key_val TASK_PARM)
|
d_keyread(key_val TASK_PARM)
|
||||||
char FAR *key_val;
|
char FAR *key_val;
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
@ -1214,6 +1223,7 @@ TASK_DECL
|
||||||
|
|
||||||
/* Build compound key value from record
|
/* Build compound key value from record
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
key_bldcom(fld, rec, key, cflag )
|
key_bldcom(fld, rec, key, cflag )
|
||||||
int fld; /* compound key field number */
|
int fld; /* compound key field number */
|
||||||
char FAR *rec; /* ptr to record data */
|
char FAR *rec; /* ptr to record data */
|
||||||
|
|
|
@ -56,6 +56,7 @@ static void chk_desc_key(P1(int) Pi(FIELD_ENTRY FAR *)
|
||||||
|
|
||||||
/* Find record thru key field
|
/* Find record thru key field
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_keyfind(field, fldval TASK_PARM DBN_PARM)
|
d_keyfind(field, fldval TASK_PARM DBN_PARM)
|
||||||
long field; /* field constant */
|
long field; /* field constant */
|
||||||
CONST char FAR *fldval; /* value of the data field */
|
CONST char FAR *fldval; /* value of the data field */
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
|
|
||||||
/* Find first key
|
/* Find first key
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_keyfrst(field TASK_PARM DBN_PARM)
|
d_keyfrst(field TASK_PARM DBN_PARM)
|
||||||
long field; /* field constant */
|
long field; /* field constant */
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
|
|
||||||
/* Find last key
|
/* Find last key
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_keylast(field TASK_PARM DBN_PARM)
|
d_keylast(field TASK_PARM DBN_PARM)
|
||||||
long field; /* field constant */
|
long field; /* field constant */
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
|
|
||||||
/* Find next record thru key field
|
/* Find next record thru key field
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_keynext(field TASK_PARM DBN_PARM)
|
d_keynext(field TASK_PARM DBN_PARM)
|
||||||
long field; /* field constant */
|
long field; /* field constant */
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
|
|
||||||
/* Find previous record thru key field
|
/* Find previous record thru key field
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_keyprev(field TASK_PARM DBN_PARM)
|
d_keyprev(field TASK_PARM DBN_PARM)
|
||||||
long field; /* field constant */
|
long field; /* field constant */
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
|
|
@ -52,6 +52,7 @@
|
||||||
|
|
||||||
/* Store optional key value
|
/* Store optional key value
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_keystore(field TASK_PARM DBN_PARM)
|
d_keystore(field TASK_PARM DBN_PARM)
|
||||||
long field; /* key field constant */
|
long field; /* key field constant */
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
|
|
@ -71,6 +71,7 @@ static int ctblcmp(P1(CONST unsigned char FAR*)
|
||||||
#ifndef ONE_DB
|
#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
|
||||||
dbn_check(dbn)
|
dbn_check(dbn)
|
||||||
int dbn;
|
int dbn;
|
||||||
{
|
{
|
||||||
|
@ -93,6 +94,7 @@ int dbn;
|
||||||
/* Check for valid (external) set number and return (internal) set number
|
/* Check for valid (external) set number and return (internal) set number
|
||||||
and set_table pointer.
|
and set_table pointer.
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
nset_check(nset, set, set_ptr )
|
nset_check(nset, set, set_ptr )
|
||||||
register int nset;
|
register int nset;
|
||||||
int *set;
|
int *set;
|
||||||
|
@ -110,6 +112,7 @@ SET_ENTRY FAR * FAR *set_ptr;
|
||||||
/* Check for valid (external) field number and return (internal) record
|
/* Check for valid (external) field number and return (internal) record
|
||||||
and field numbers and pointers.
|
and field numbers and pointers.
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
nfld_check(nfld, rec, fld, rec_ptr, fld_ptr )
|
nfld_check(nfld, rec, fld, rec_ptr, fld_ptr )
|
||||||
long nfld;
|
long nfld;
|
||||||
int *rec;
|
int *rec;
|
||||||
|
@ -134,6 +137,7 @@ FIELD_ENTRY FAR * FAR *fld_ptr;
|
||||||
/* Check for valid (external) record number and return (internal) record
|
/* Check for valid (external) record number and return (internal) record
|
||||||
number and pointer.
|
number and pointer.
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
nrec_check(nrec, rec, rec_ptr)
|
nrec_check(nrec, rec, rec_ptr)
|
||||||
int nrec;
|
int nrec;
|
||||||
int *rec;
|
int *rec;
|
||||||
|
@ -301,7 +305,7 @@ CONST char FAR *f2; /* pointer to field 2 */
|
||||||
(sfld_ptr < fld_max) && (sfld_ptr->fd_flags & STRUCTFLD);
|
(sfld_ptr < fld_max) && (sfld_ptr->fd_flags & STRUCTFLD);
|
||||||
++sfld_ptr) {
|
++sfld_ptr) {
|
||||||
sub_len = cur_len + sfld_ptr->fd_ptr - fld_ptr->fd_ptr;
|
sub_len = cur_len + sfld_ptr->fd_ptr - fld_ptr->fd_ptr;
|
||||||
if (k = fldcmp(sfld_ptr, f1 + sub_len, f2 + sub_len))
|
if ((k = fldcmp(sfld_ptr, f1 + sub_len, f2 + sub_len)))
|
||||||
return ( k );
|
return ( k );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -312,7 +316,7 @@ CONST char FAR *f2; /* pointer to field 2 */
|
||||||
(--kt_lc >= 0) && (&field_table[key_ptr->kt_key] == fld_ptr);
|
(--kt_lc >= 0) && (&field_table[key_ptr->kt_key] == fld_ptr);
|
||||||
++key_ptr) {
|
++key_ptr) {
|
||||||
i = key_ptr->kt_ptr;
|
i = key_ptr->kt_ptr;
|
||||||
if ( k = fldcmp(&field_table[key_ptr->kt_field], f1 + i, f2 + i) )
|
if (( k = fldcmp(&field_table[key_ptr->kt_field], f1 + i, f2 + i) ))
|
||||||
return ( k );
|
return ( k );
|
||||||
}
|
}
|
||||||
return ( 0 );
|
return ( 0 );
|
||||||
|
@ -365,6 +369,7 @@ CONST DB_ADDR FAR *d1, FAR *d2;
|
||||||
|
|
||||||
/* check for empty DB_ADDR
|
/* check for empty DB_ADDR
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
null_dba( db_addr )
|
null_dba( db_addr )
|
||||||
CONST char FAR *db_addr;
|
CONST char FAR *db_addr;
|
||||||
{
|
{
|
||||||
|
@ -377,6 +382,7 @@ CONST char FAR *db_addr;
|
||||||
|
|
||||||
/* check for valid DB_ADDR
|
/* check for valid DB_ADDR
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
check_dba( dba )
|
check_dba( dba )
|
||||||
DB_ADDR dba;
|
DB_ADDR dba;
|
||||||
{
|
{
|
||||||
|
@ -419,14 +425,14 @@ int n; /* Max. String length */
|
||||||
f2 = db_global.country_tbl.ptr[*t].sort_as1;
|
f2 = db_global.country_tbl.ptr[*t].sort_as1;
|
||||||
else f2 = *t;
|
else f2 = *t;
|
||||||
|
|
||||||
if (x = f1 - f2) return(x);
|
if ((x = f1 - f2)) return(x);
|
||||||
|
|
||||||
/* Check sort_as2-values if sort_as1-values are equal */
|
/* Check sort_as2-values if sort_as1-values are equal */
|
||||||
/*----------------------------------------------------*/
|
/*----------------------------------------------------*/
|
||||||
x1 = db_global.country_tbl.ptr[*s].sort_as2;
|
x1 = db_global.country_tbl.ptr[*s].sort_as2;
|
||||||
x2 = db_global.country_tbl.ptr[*t].sort_as2;
|
x2 = db_global.country_tbl.ptr[*t].sort_as2;
|
||||||
if ( x1 && x2 ) { /* We have an entry for char. of both strings */
|
if ( x1 && x2 ) { /* We have an entry for char. of both strings */
|
||||||
if ( x = x1 - x2 ) return(x);
|
if (( x = x1 - x2 )) return(x);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ( x1 || x2 ) { /* Only sort_as2 value for one string */
|
if ( x1 || x2 ) { /* Only sort_as2 value for one string */
|
||||||
|
@ -435,21 +441,21 @@ int n; /* Max. String length */
|
||||||
if ( db_global.country_tbl.ptr[*t].sort_as1 )
|
if ( db_global.country_tbl.ptr[*t].sort_as1 )
|
||||||
f2 = db_global.country_tbl.ptr[*t].sort_as1;
|
f2 = db_global.country_tbl.ptr[*t].sort_as1;
|
||||||
else f2 = *t;
|
else f2 = *t;
|
||||||
if ( x = x1 - f2 ) return(x);
|
if (( x = x1 - f2 )) return(x);
|
||||||
}
|
}
|
||||||
if ( x2 ) {
|
if ( x2 ) {
|
||||||
*s++; /* Compare with next character in string 1 */
|
*s++; /* Compare with next character in string 1 */
|
||||||
if ( db_global.country_tbl.ptr[*s].sort_as1 )
|
if ( db_global.country_tbl.ptr[*s].sort_as1 )
|
||||||
f1 = db_global.country_tbl.ptr[*s].sort_as1;
|
f1 = db_global.country_tbl.ptr[*s].sort_as1;
|
||||||
else f1 = *s;
|
else f1 = *s;
|
||||||
if ( x = f1 - x2 ) return(x);
|
if (( x = f1 - x2 )) return(x);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if both are equal compare sub_sort values */
|
/* if both are equal compare sub_sort values */
|
||||||
/*-------------------------------------------*/
|
/*-------------------------------------------*/
|
||||||
if (x = db_global.country_tbl.ptr[*s].sub_sort -
|
if ((x = db_global.country_tbl.ptr[*s].sub_sort -
|
||||||
db_global.country_tbl.ptr[*t].sub_sort)
|
db_global.country_tbl.ptr[*t].sub_sort))
|
||||||
return(x);
|
return(x);
|
||||||
}
|
}
|
||||||
*s++;
|
*s++;
|
||||||
|
|
|
@ -53,6 +53,7 @@
|
||||||
|
|
||||||
/* Set the value of a key field
|
/* Set the value of a key field
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_setkey( field, fldvalue TASK_PARM DBN_PARM )
|
d_setkey( field, fldvalue TASK_PARM DBN_PARM )
|
||||||
long field;
|
long field;
|
||||||
CONST char FAR *fldvalue;
|
CONST char FAR *fldvalue;
|
||||||
|
@ -134,6 +135,7 @@ int sk_free()
|
||||||
|
|
||||||
/* Create a new empty record
|
/* Create a new empty record
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_makenew( nrec TASK_PARM DBN_PARM )
|
d_makenew( nrec TASK_PARM DBN_PARM )
|
||||||
int nrec;
|
int nrec;
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
|
|
||||||
/* Get number of members of the current set owner
|
/* Get number of members of the current set owner
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_members(set, tot TASK_PARM DBN_PARM)
|
d_members(set, tot TASK_PARM DBN_PARM)
|
||||||
int set; /* Set table entry */
|
int set; /* Set table entry */
|
||||||
LONG FAR *tot; /* total members of set */
|
LONG FAR *tot; /* total members of set */
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#include <unistd.h>
|
||||||
#include "vista.h"
|
#include "vista.h"
|
||||||
#ifdef MSC
|
#ifdef MSC
|
||||||
#include <share.h>
|
#include <share.h>
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
|
|
||||||
/* Turn on db_VISTA runtime options
|
/* Turn on db_VISTA runtime options
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_on_opt(optflag TASK_PARM)
|
d_on_opt(optflag TASK_PARM)
|
||||||
int optflag;
|
int optflag;
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
@ -75,6 +76,7 @@ TASK_DECL
|
||||||
|
|
||||||
/* Turn off db_VISTA runtime options
|
/* Turn off db_VISTA runtime options
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_off_opt(optflag TASK_PARM)
|
d_off_opt(optflag TASK_PARM)
|
||||||
int optflag;
|
int optflag;
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
|
|
@ -70,6 +70,7 @@ static int struct_key_chk = 1;
|
||||||
|
|
||||||
/* Check a field for permission to change it
|
/* Check a field for permission to change it
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
r_chkfld(field, fld_ptr, rec, data )
|
r_chkfld(field, fld_ptr, rec, data )
|
||||||
INT field; /* field_table entry number */
|
INT field; /* field_table entry number */
|
||||||
FIELD_ENTRY FAR *fld_ptr; /* corresponds to field */
|
FIELD_ENTRY FAR *fld_ptr; /* corresponds to field */
|
||||||
|
@ -138,6 +139,7 @@ CONST char FAR *data; /* pointer to data area containing field contents */
|
||||||
|
|
||||||
/* Delete the current record
|
/* Delete the current record
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
r_delrec( rt, db_addr )
|
r_delrec( rt, db_addr )
|
||||||
INT rt;
|
INT rt;
|
||||||
DB_ADDR db_addr;
|
DB_ADDR db_addr;
|
||||||
|
@ -197,6 +199,7 @@ DB_ADDR db_addr;
|
||||||
|
|
||||||
/* Get data field from record
|
/* Get data field from record
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
r_gfld(fld_ptr, rec, data )
|
r_gfld(fld_ptr, rec, data )
|
||||||
FIELD_ENTRY FAR *fld_ptr;
|
FIELD_ENTRY FAR *fld_ptr;
|
||||||
char FAR *rec; /* pointer to record */
|
char FAR *rec; /* pointer to record */
|
||||||
|
@ -250,6 +253,7 @@ char FAR *data; /* pointer to data area to contain field contents */
|
||||||
|
|
||||||
/* Get member pointer from record
|
/* Get member pointer from record
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
r_gmem(set, rec, mem_addr )
|
r_gmem(set, rec, mem_addr )
|
||||||
int set; /* set table entry number */
|
int set; /* set table entry number */
|
||||||
char FAR *rec; /* pointer to record */
|
char FAR *rec; /* pointer to record */
|
||||||
|
@ -281,6 +285,7 @@ char FAR *mem_addr; /* pointer to member pointer */
|
||||||
|
|
||||||
/* Get set pointer from record
|
/* Get set pointer from record
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
r_gset(set, rec, setptr )
|
r_gset(set, rec, setptr )
|
||||||
int set; /* set table entry number */
|
int set; /* set table entry number */
|
||||||
char FAR *rec; /* pointer to record */
|
char FAR *rec; /* pointer to record */
|
||||||
|
@ -308,6 +313,7 @@ char FAR *setptr; /* pointer to set pointer */
|
||||||
|
|
||||||
/* Put data field into record
|
/* Put data field into record
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
r_pfld(field, fld_ptr, rec, data, db_addr )
|
r_pfld(field, fld_ptr, rec, data, db_addr )
|
||||||
INT field; /* field_table entry number */
|
INT field; /* field_table entry number */
|
||||||
FIELD_ENTRY FAR *fld_ptr; /* corresponds to field */
|
FIELD_ENTRY FAR *fld_ptr; /* corresponds to field */
|
||||||
|
@ -431,6 +437,7 @@ DB_ADDR FAR *db_addr;
|
||||||
|
|
||||||
/* Put member pointer into record
|
/* Put member pointer into record
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
r_pmem(set, rec, mem_addr )
|
r_pmem(set, rec, mem_addr )
|
||||||
int set; /* set table entry number */
|
int set; /* set table entry number */
|
||||||
char FAR *rec; /* pointer to record */
|
char FAR *rec; /* pointer to record */
|
||||||
|
@ -462,6 +469,7 @@ char FAR *mem_addr; /* pointer to member pointer */
|
||||||
|
|
||||||
/* Put set pointer into record
|
/* Put set pointer into record
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
r_pset(set, rec, setptr )
|
r_pset(set, rec, setptr )
|
||||||
int set; /* set table entry number */
|
int set; /* set table entry number */
|
||||||
char FAR *rec; /* pointer to record */
|
char FAR *rec; /* pointer to record */
|
||||||
|
@ -491,6 +499,7 @@ char FAR *setptr; /* pointer to set pointer */
|
||||||
|
|
||||||
/* Set the current set member from record
|
/* Set the current set member from record
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
r_smem( db_addr, set )
|
r_smem( db_addr, set )
|
||||||
DB_ADDR FAR *db_addr;
|
DB_ADDR FAR *db_addr;
|
||||||
INT set;
|
INT set;
|
||||||
|
@ -528,6 +537,7 @@ INT set;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set the optional key field "stored" bit */
|
/* Set the optional key field "stored" bit */
|
||||||
|
int
|
||||||
r_setopt( fld_ptr, rec )
|
r_setopt( fld_ptr, rec )
|
||||||
FIELD_ENTRY FAR *fld_ptr; /* field table entry of optional key */
|
FIELD_ENTRY FAR *fld_ptr; /* field table entry of optional key */
|
||||||
char FAR *rec; /* Pointer to record */
|
char FAR *rec; /* Pointer to record */
|
||||||
|
@ -555,6 +565,7 @@ char FAR *rec; /* Pointer to record */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Clear the optional key field "stored" bit */
|
/* Clear the optional key field "stored" bit */
|
||||||
|
int
|
||||||
r_clropt( fld_ptr, rec )
|
r_clropt( fld_ptr, rec )
|
||||||
FIELD_ENTRY FAR *fld_ptr; /* Field table entry of optional key */
|
FIELD_ENTRY FAR *fld_ptr; /* Field table entry of optional key */
|
||||||
char FAR *rec; /* Pointer to record */
|
char FAR *rec; /* Pointer to record */
|
||||||
|
@ -582,6 +593,7 @@ char FAR *rec; /* Pointer to record */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Test the optional key field "stored" bit */
|
/* Test the optional key field "stored" bit */
|
||||||
|
int
|
||||||
r_tstopt( fld_ptr, rec )
|
r_tstopt( fld_ptr, rec )
|
||||||
FIELD_ENTRY FAR *fld_ptr; /* Field table entry of optional key */
|
FIELD_ENTRY FAR *fld_ptr; /* Field table entry of optional key */
|
||||||
char FAR *rec; /* Pointer to record */
|
char FAR *rec; /* Pointer to record */
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
|
|
||||||
/* Find first record of type
|
/* Find first record of type
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_recfrst( rec TASK_PARM DBN_PARM )
|
d_recfrst( rec TASK_PARM DBN_PARM )
|
||||||
int rec; /* record type/table entry */
|
int rec; /* record type/table entry */
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
|
|
||||||
/* Find next record of type
|
/* Find next record of type
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_recnext(TASK_DBN_ONLY)
|
d_recnext(TASK_DBN_ONLY)
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
DBN_DECL
|
DBN_DECL
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
|
|
||||||
/* Read contents of current record
|
/* Read contents of current record
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_recread(rec TASK_PARM DBN_PARM)
|
d_recread(rec TASK_PARM DBN_PARM)
|
||||||
char FAR *rec; /* ptr to record area */
|
char FAR *rec; /* ptr to record area */
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
|
|
||||||
/* Write contents to current record
|
/* Write contents to current record
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_recwrite(rec TASK_PARM DBN_PARM)
|
d_recwrite(rec TASK_PARM DBN_PARM)
|
||||||
CONST char FAR *rec; /* ptr to record area */
|
CONST char FAR *rec; /* ptr to record area */
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
|
|
||||||
/* Rename database file
|
/* Rename database file
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_renfile(dbn, fno, fnm TASK_PARM)
|
d_renfile(dbn, fno, fnm TASK_PARM)
|
||||||
CONST char FAR *dbn; /* database containing file to be renamed */
|
CONST char FAR *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 */
|
||||||
|
@ -86,6 +87,7 @@ TASK_DECL
|
||||||
|
|
||||||
/* Process renamed file table
|
/* Process renamed file table
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
renfiles()
|
renfiles()
|
||||||
{
|
{
|
||||||
register int dbt_lc; /* loop control */
|
register int dbt_lc; /* loop control */
|
||||||
|
|
|
@ -57,6 +57,7 @@ static DB_ADDR_P Cb = POINTER_INIT();
|
||||||
|
|
||||||
/* Read currency table
|
/* Read currency table
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_rdcurr(currbuff, currsize TASK_PARM)
|
d_rdcurr(currbuff, currsize TASK_PARM)
|
||||||
DB_ADDR **currbuff;
|
DB_ADDR **currbuff;
|
||||||
int FAR *currsize;
|
int FAR *currsize;
|
||||||
|
@ -106,6 +107,7 @@ TASK_DECL
|
||||||
|
|
||||||
/* Write currency table
|
/* Write currency table
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_wrcurr(currbuff TASK_PARM)
|
d_wrcurr(currbuff TASK_PARM)
|
||||||
DB_ADDR *currbuff;
|
DB_ADDR *currbuff;
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
|
|
@ -52,6 +52,7 @@
|
||||||
#ifndef ONE_DB
|
#ifndef ONE_DB
|
||||||
/* Set current database
|
/* Set current database
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_setdb(dbn TASK_PARM)
|
d_setdb(dbn TASK_PARM)
|
||||||
int dbn; /* database number */
|
int dbn; /* database number */
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
|
|
||||||
/* Set current member to current member
|
/* Set current member to current member
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_setmm(sett, sets TASK_PARM DBN_PARM)
|
d_setmm(sett, sets TASK_PARM 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 */
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
|
|
||||||
/* Set current member to current owner
|
/* Set current member to current owner
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_setmo(setm, seto TASK_PARM DBN_PARM)
|
d_setmo(setm, seto TASK_PARM 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 */
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
|
|
||||||
/* Set current member to current record
|
/* Set current member to current record
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_setmr(set TASK_PARM DBN_PARM)
|
d_setmr(set TASK_PARM DBN_PARM)
|
||||||
int set; /* set table entry number */
|
int set; /* set table entry number */
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
|
|
||||||
/* Set current owner to current member
|
/* Set current owner to current member
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_setom(nseto, nsetm TASK_PARM DBN_PARM)
|
d_setom(nseto, nsetm TASK_PARM 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 */
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
|
|
||||||
/* Set current owner to current owner
|
/* Set current owner to current owner
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_setoo(nsett, nsets TASK_PARM DBN_PARM)
|
d_setoo(nsett, nsets TASK_PARM 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 */
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
|
|
||||||
/* Set current owner to current record
|
/* Set current owner to current record
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_setor(nset TASK_PARM DBN_PARM)
|
d_setor(nset TASK_PARM DBN_PARM)
|
||||||
int nset; /* set number */
|
int nset; /* set number */
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
|
|
||||||
/* Set current record to current member
|
/* Set current record to current member
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_setrm(set TASK_PARM DBN_PARM)
|
d_setrm(set TASK_PARM DBN_PARM)
|
||||||
int set; /* set table entry number */
|
int set; /* set table entry number */
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
|
|
||||||
/* Set current record to current owner
|
/* Set current record to current owner
|
||||||
*/
|
*/
|
||||||
|
int
|
||||||
d_setro(set TASK_PARM DBN_PARM)
|
d_setro(set TASK_PARM DBN_PARM)
|
||||||
int set; /* set table entry number */
|
int set; /* set table entry number */
|
||||||
TASK_DECL
|
TASK_DECL
|
||||||
|
|
|
@ -395,4 +395,5 @@ typedef struct {
|
||||||
#ifdef MULTI_TASK
|
#ifdef MULTI_TASK
|
||||||
#include "task.h"
|
#include "task.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC vista.h */
|
/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC vista.h */
|
||||||
|
|
|
@ -59,6 +59,7 @@
|
||||||
* Initial revision
|
* Initial revision
|
||||||
*/
|
*/
|
||||||
#include "SearchP.h"
|
#include "SearchP.h"
|
||||||
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#define PROGNAME "READCHAR"
|
#define PROGNAME "READCHAR"
|
||||||
|
|
|
@ -63,6 +63,7 @@
|
||||||
*/
|
*/
|
||||||
#include "SearchE.h"
|
#include "SearchE.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include "vista.h"
|
#include "vista.h"
|
||||||
|
|
||||||
#define PROGNAME "VEDELETE"
|
#define PROGNAME "VEDELETE"
|
||||||
|
|
|
@ -96,6 +96,7 @@
|
||||||
#define MEMORY_SIZE 64000 /* 65536 is 64 KBytes of memory */
|
#define MEMORY_SIZE 64000 /* 65536 is 64 KBytes of memory */
|
||||||
#define REC_TYPES 256
|
#define REC_TYPES 256
|
||||||
#define NORM_VALUE 30
|
#define NORM_VALUE 30
|
||||||
|
#undef INFINITY /* XXX does GCC's __builtin_inff() work here? */
|
||||||
#define INFINITY 9999.0
|
#define INFINITY 9999.0
|
||||||
#define SORT_MESG 10000
|
#define SORT_MESG 10000
|
||||||
#define CHAR_BITS 8
|
#define CHAR_BITS 8
|
||||||
|
|
Loading…
Reference in a new issue