* Revision 1.4 1995/08/31 21:54:23 miker
* Rename austext_exit() to DtSearchExit().
*/
+#include <stdlib.h>
#include "Search.h"
void (*austext_exit_first) (int) = NULL;
* Initial revision
*/
#include "SearchE.h"
+#include <stdlib.h>
#include <string.h>
#include "boolpars.h"
#include "boolyac.h"
/* Destructor of passed truth table.
* Unlinks it from ttlist and frees it.
*/
-static void *freett (TRUTHTAB *argtt)
+static void freett (TRUTHTAB *argtt)
{
TRUTHTAB *tt;
TRUTHTAB **lastlink = &ttlist;
}
/* 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;
last_token_was_boolop = FALSE;
}
static int vistano;
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);
/************************************************/
/* */
#define PROGNAME "DBCHANGE"
+void oe_uninitialize (void);
+
/************************************************/
/* */
/* file_has_changed */
#include <errno.h>
#include <signal.h>
#include <sys/stat.h>
+#include <stdlib.h>
#define PROGNAME "DTOE"
#define MAX_LASTQRY 64
char *str;
} NUMSTR;
+int boolean_parse (void);
+void boolean_search (void);
+void ve_delete (void);
/*------------------ OPERA ENGINE GLOBALS --------------------
* Default values set by init_globals() in oeinit.c
int shm_id = 0; /* shared mem, dynam defrag */
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_enable_markdel = 0;
int OE_enable_usernotes = 0;
#include "SearchE.h"
#include <string.h>
#include <sys/stat.h>
+#include <stdlib.h>
#define XOS_USE_NO_LOCKING
#define X_INCLUDE_TIME_H
#include <signal.h>
#include <locale.h>
#include <string.h>
+#include <stdlib.h>
#include <fcntl.h>
#define PROGNAME "DTSRAPI"
/*------------------- PRIVATE GLOBALS ---------------------*/
/* Usrblk should not be visible to user interface code,
* but must be visible to real engine... */
-USRBLK usrblk = { 0 };
+USRBLK usrblk = { { 0 } };
static int save_search_type = '$';
static char *sprintbuf = NULL;
sprintbuf = austext_malloc (SPRINTBUFSZ, PROGNAME "135", NULL);
/* Open msgs and help text catalogs. */
- if (switches & DtSrInNOLOCALE == 0) {
+ if (switches & (DtSrInNOLOCALE == 0)) {
setlocale (LC_ALL, "");
dtsearch_catd = catopen (FNAME_DTSRCAT, 0);
}
*/
#include "SearchE.h"
#include <string.h>
+#include <stdlib.h>
#include <sys/stat.h>
#define MS_misc 1
*/
#include "SearchE.h"
#include <string.h>
+#include <stdlib.h>
#include <errno.h>
#include <fcntl.h>
#include "vista.h"
static int max_abstrbufsz = 0;
static int max_ormisc_size;
+char *strupr(char *);
+
/************************************************/
/* */
/* dummy_workproc */
* terminate the abstract string in case there are no more misc recs.
* (but should not occur).
*/
- if (store_state = STORE_ABSTR)
+ if ((store_state = STORE_ABSTR))
*targ = 0;
return;
} /* store_next_misc() */
*/
#include "SearchP.h"
#include <errno.h>
+#include <stdlib.h>
#define X_INCLUDE_STRING_H
#define XOS_USE_NO_LOCKING
* Name changes for DtSearch.
*/
#include "SearchP.h"
+#include <stdlib.h>
#define X_INCLUDE_STRING_H
#define XOS_USE_NO_LOCKING
static UCHAR *substrbuf = NULL;
static long substr_offset;
+char *ensure_end_slash (char *pathstr);
/************************************************/
/* */
jstate = JS_KANJI;
else
jstate = jstates_set1 [(jchar[0] & 0x7F) - 32];
- if (jchar[1] = readchar (NULL))
+ if ((jchar[1] = readchar (NULL)))
readcount++;
else
jstate = JS_ETX;
if (jchar[0] == SS2_CHAR) {
jcharlen = 2;
jstate = JS_HALFKATA;
- if (jchar[1] = readchar (NULL))
+ if ((jchar[1] = readchar (NULL)))
readcount++;
else
jstate = JS_ETX;
* one by one, ie parse and return word tokens from string,
* including possible kanji compounds if switched on.
*/
- if (token = parse_substring())
+ if ((token = parse_substring()))
return (char *) token;
/* When current substring is empty, go back and fill another one.
char is_last_rule; /* '$' terminate or '>' continue algorithm */
} PRULE;
+char *ensure_end_slash (char *pathstr);
+void unload_jpn_language (DBLK *dblk);
/************************************************/
/* */
READ_ANOTHER_WORD:
outp = outbuf;
tpstate = BETW_WORDS;
- while (*outp = cofunction (cofunction_arg)) {
+ while ((*outp = cofunction (cofunction_arg))) {
readcount++;
cofunction_arg = NULL;
* Otherwise discard just like non_concord.
*/
outp++;
- if (*outp = cofunction(NULL))
+ if ((*outp = cofunction(NULL)))
readcount++;
if ((charmap[*outp] & CONCORDABLE) != 0) {
*outp = charmap[*outp] & 0x00ff;
}
/* Must be opt_concord... */
outp++;
- if (*outp = cofunction(NULL))
+ if ((*outp = cofunction(NULL)))
readcount++;
if ((charmap[*outp] & CONCORDABLE) != 0) {
if (outp < endmaxword) {
* Freeze DtSearch 0.1, AusText 2.1.8
*/
#include "SearchP.h"
+#include <stdlib.h>
#define PROGNAME "MSGS"
/****************************************/
*/
#include "SearchP.h"
+#include <stdlib.h>
#define X_INCLUDE_STRING_H
#define XOS_USE_NO_LOCKING
#include <X11/Xos_r.h>
*/
#include "SearchE.h"
+#include <ctype.h>
#include <stdlib.h>
#define X_INCLUDE_STRING_H
#define XOS_USE_NO_LOCKING
#include <unistd.h> /* for POSIX getcwd() */
#include <sys/stat.h>
+char *strupr (char *s);
+
/*****#define DEBUG_DUMP******/
/********#define DEBUG_OEF**********/
********/
OEFTAB oef_table[] =
{
- "AUDIT", &OEF_audit, FALSE,
- "DISCARD", &OEF_discard, FALSE,
- "NEWS", &OEF_news, FALSE,
- "NOTESNOT", &OEF_notesnot, FALSE,
- "NOTESSEM", &OEF_notessem, FALSE,
- "README", &OEF_readme, FALSE,
- NULL, NULL, FALSE /* end of list */
+ { "AUDIT", &OEF_audit, FALSE, },
+ { "DISCARD", &OEF_discard, FALSE, },
+ { "NEWS", &OEF_news, FALSE, },
+ { "NOTESNOT", &OEF_notesnot, FALSE, },
+ { "NOTESSEM", &OEF_notessem, FALSE, },
+ { "README", &OEF_readme, FALSE, },
+ { NULL, NULL, FALSE }, /* end of list */
};
*/
#include "SearchE.h"
#include <string.h>
+#include <stdlib.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/stat.h>
*/
#include <stdio.h>
+#include <stdlib.h>
#include "vista.h"
#include "dbtype.h"
-
-char *malloc(P1(unsigned));
-char *calloc(P1(unsigned) Pi(unsigned));
#define memlock(p) (p)
#define memunlock(p) 1
/* Get current member type
*/
+int
d_cmtype(set, cmtype TASK_PARM DBN_PARM)
int set;
int FAR *cmtype;
/* Connect the current record as member of set
*/
+int
d_connect(set TASK_PARM DBN_PARM)
int set; /* Set constant */
TASK_DECL
/* compare the two fields */
/* computation is pointer to next sort field in member record */
fld_ptr = &field_table[srt1_ptr->se_fld];
- if (cmp = fldcmp(fld_ptr, mem1 + fld_ptr->fd_ptr,
- mem2 + field_table[srt2_ptr->se_fld].fd_ptr))
+ if ((cmp = fldcmp(fld_ptr, mem1 + fld_ptr->fd_ptr,
+ mem2 + field_table[srt2_ptr->se_fld].fd_ptr)))
return (cmp); /* return at first unequal fields */
}
/* fields match */
/* Get current owner type
*/
+int
d_cotype(set, cotype TASK_PARM DBN_PARM)
int set;
int FAR *cotype;
/* Get current record
*/
+int
d_crget(dba TASK_PARM DBN_PARM)
DB_ADDR FAR *dba; /* db address of record to become current */
TASK_DECL
if ( ! dbopen ) RETURN( dberr(S_DBOPEN) );
- if ( *dba = curr_rec )
+ if (( *dba = curr_rec ))
db_status = S_OKAY;
else
db_status = S_NOCR;
/* Read data from field of current record
*/
+int
d_crread(field, data TASK_PARM DBN_PARM)
long field; /* Field constant */
char FAR *data; /* Data area to contain field contents */
/* Set current record
*/
+int
d_crset(dba TASK_PARM DBN_PARM)
DB_ADDR FAR *dba; /* db address of record to become current */
TASK_DECL
/* Get current record type
*/
+int
d_crtype(crtype TASK_PARM DBN_PARM)
int FAR *crtype;
TASK_DECL
/* Write data to a field in the current record
*/
+int
d_crwrite(field, data TASK_PARM DBN_PARM)
long field; /* field constant */
char FAR *data; /* data area to contain field contents */
/* Get current set member
*/
+int
d_csmget(set, dba TASK_PARM DBN_PARM)
int set; /* Set table entry */
DB_ADDR FAR *dba; /* db address of record to become current */
/* Read data from field of current set member
*/
+int
d_csmread(set, field, data TASK_PARM DBN_PARM)
int set; /* Set constant */
long field; /* Field constant */
/* Set current set member
*/
+int
d_csmset(set, dba TASK_PARM DBN_PARM)
int set; /* Set table entry */
DB_ADDR FAR *dba; /* db address of record to become current */
/* Write data to a field in the current set member
*/
+int
d_csmwrite(set, field, data TASK_PARM DBN_PARM)
int set; /* Set constant */
long field; /* Field constant */
/* Get current set owner
*/
+int
d_csoget(set, dba TASK_PARM DBN_PARM)
int set; /* Set table entry */
DB_ADDR FAR *dba; /* db address of record to become current */
/* Read data from field of current set owner
*/
+int
d_csoread(set, field, data TASK_PARM DBN_PARM)
int set; /* Set constant */
long field; /* Field constant */
/* Set current set owner
*/
+int
d_csoset(set, dba TASK_PARM DBN_PARM)
int set; /* Set table entry */
DB_ADDR FAR *dba; /* db address of record to become current */
/* Write data to a field in the current set owner
*/
+int
d_csowrite(set, field, data TASK_PARM DBN_PARM)
int set; /* Set constant */
long field; /* Field constant */
/* Decode file and slot number from a database address
*/
+int
d_decode_dba(dba, file, slot)
DB_ADDR dba; /* database address */
int FAR *file; /* returned file number */
/* Encode database address from file and slot number
*/
+int
d_encode_dba(file, slot, dba)
int file; /* returned file number */
long slot; /* returned slot number */
/* Set Database Dictionary Path
*/
+int
d_dbdpath(path TASK_PARM)
CONST char FAR *path;
TASK_DECL
/* Set Database Files Path
*/
+int
d_dbfpath(path TASK_PARM)
CONST char FAR *path;
TASK_DECL
/* Open db_VISTA database
*/
+int
d_open(dbnames, opentype TASK_PARM)
CONST char FAR *dbnames;
CONST char FAR *opentype;
/* Initialize multiple database table entries
*/
+int
initdbt(dbnames )
CONST char FAR *dbnames;
{
/****************************************/
/* Close database
*/
+int
d_close(TASK_ONLY)
TASK_DECL
{
} PAGE_ENTRY;
#define buff Buff.ptr
+#include <string.h>
+#ifndef _STRING_H
+#define _STRING_H
+#endif
#include "proto.h"
#ifdef MULTI_TASK
#ifdef NO_DT_COVER
/* Set Database User Identifier
*/
+int
d_dbuserid(id TASK_PARM)
CONST char FAR *id;
TASK_DECL
/* Delete the current record, with error checking
*/
+int
d_delete(TASK_DBN_ONLY)
TASK_DECL
DBN_DECL
/* Warning: this function will destroy the entire contents
of the database
*/
+int
d_destroy(dbname TASK_PARM)
CONST char FAR *dbname;
TASK_DECL
/* Set the maximum number of open db_VISTA files
*/
+int
d_setfiles(num)
int num;
{
/* Set number of virtual memory pages
*/
+int
d_setpages(dbpgs, ixpgs)
int dbpgs; /* # of db cache pages */
int ixpgs; /* # of index cache pages - ignored in single-user version */
/****************************************/
/* Open a database file
*/
+int
dio_open( fno )
FILE_NO fno;
{
/****************************************/
/* Close a database file
*/
+int
dio_close( fno )
FILE_NO fno;
{
/****************************************/
/* Initialize database I/O
*/
+int
dio_init()
{
CHAR_P Tempbuff;
/****************************************/
/* Clear pages for a single file.
*/
+int
dio_clrfile(fno )
register FILE_NO fno;
{
/****************************************/
/* Clear all pages for *all* files from I/O buffer
*/
+int
dio_clear()
{
return( clear_cache(0, size_ft) );
/****************************************/
/* Database I/O page get
*/
+int
dio_get( page_no, page_ptr, hold )
F_ADDR page_no;
char FAR * FAR *page_ptr;
/****************************************/
/* Set modified flag for a page
*/
+int
dio_touch( page_no )
F_ADDR page_no;
{
* Merely returns ptr into rec in a page
* unless a page swap is necessary.
*/
+int
dio_read( dba, recptr, hold )
DB_ADDR dba;
char FAR * FAR *recptr;
* Sets page's 'touched' flags, timestamps, etc.
* If recptr not NULL, copies rec to page cache.
*/
+int
dio_write( dba, recptr, release )
DB_ADDR dba;
CONST char FAR *recptr;
/* Release database page hold
*/
+int
dio_release( dba )
DB_ADDR dba;
{
/****************************************/
/* Search a cache for page
*/
+int
dio_findpg(file, page, pg_table, xpg_ptr, xlu_ptr )
FILE_NO file; /* file number = 0..size_ft-1 */
F_ADDR page; /* database page number */
* slot is byte swapped before the io by calling the
* page swap function.
*/
+int
#ifndef NO_TRANS
dio_out(pg_ptr, lu_ptr, db_cache)
#else
/****************************************/
/* Read a file's page zero
*/
+int
dio_pzread(fno)
FILE_NO fno; /* file number */
{
* ie from delete chain if possible.
* Returns memory address of the free slot into 'loc'.
*/
+int
dio_pzalloc(fno, loc )
FILE_NO fno; /* file number */
F_ADDR *loc; /* pointer to allocated location */
/****************************************/
/* Delete record slot or key node from page zero
*/
+int
dio_pzdel(fno, loc )
FILE_NO fno; /* file number */
F_ADDR loc; /* location to be freed */
/* Disconnect the current member of set
*/
+int
d_discon(nset TASK_PARM DBN_PARM)
int nset; /* set number */
TASK_DECL
/* Disconnect from all sets (owner and member) and delete record
*/
+int
d_disdel(TASK_DBN_ONLY)
TASK_DECL
DBN_DECL
/* Create and fill a new record
*/
+int
d_fillnew( nrec, recval TASK_PARM DBN_PARM )
int nrec; /* record number */
CONST char FAR *recval; /* record value */
/* Find owner of current record
*/
+int
d_findco(nset TASK_PARM DBN_PARM)
int nset;
TASK_DECL
/* Find first member of set
*/
+int
d_findfm(nset TASK_PARM DBN_PARM)
int nset;
TASK_DECL
/* Find last member of set
*/
+int
d_findlm(nset TASK_PARM DBN_PARM)
int nset;
TASK_DECL
/* Find next member of set
*/
+int
d_findnm(nset TASK_PARM DBN_PARM)
int nset;
TASK_DECL
/* Find previous member of set
*/
+int
d_findpm(nset TASK_PARM DBN_PARM)
int nset;
TASK_DECL
/* Database initialization function
*/
+int
d_initialize(TASK_DBN_ONLY)
TASK_DECL
DBN_DECL
/* Initialize database file
*/
+int
d_initfile(fno TASK_PARM DBN_PARM)
FILE_NO fno; /* file table entry of file to be initialized */
TASK_DECL
/* Initialize database tables
*/
+int
inittab()
{
register int dbt_lc; /* loop control */
/* Check to see if current record is a connected member of SET
*/
+int
d_ismember(set TASK_PARM DBN_PARM)
int set; /* set table entry */
TASK_DECL
/* Check to see if current record is a owner of non-empty SET
*/
+int
d_isowner(set TASK_PARM DBN_PARM)
int set; /* set table entry */
TASK_DECL
/* Delete optional key value
*/
+int
d_keydel(field TASK_PARM DBN_PARM)
long field; /* key field constant */
TASK_DECL
/* Check for optional key existence
*/
+int
d_keyexist(field TASK_PARM DBN_PARM)
long field; /* key field constant */
TASK_DECL
/* Open B-tree key field index processing
*/
+int
key_open()
{
register int fd_lc; /* loop control */
/* Initialize key function operation
*/
+int
key_init(field )
int field; /* field number to be processed */
{
/* Reset key_info last status to reposition keys on file "fno"
*/
+int
key_reset(fno )
FILE_NO fno;
{
/* Locate proper key position on B-tree
*/
+int
key_locpos(key_val, dba)
CONST char FAR *key_val; /* key search value */
DB_ADDR FAR *dba; /* database address of located key */
/* Scan thru key field
*/
+int
key_scan(fcn, dba )
int fcn; /* next or prev */
DB_ADDR *dba; /* db address of scanned record */
/* Find key boundary
*/
+int
key_boundary(fcn, dba )
int fcn; /* KEYFRST or KEYLAST */
DB_ADDR *dba; /* to get dba of first or last key */
/* Insert key field into B-tree
*/
+int
key_insert(fld, key_val, dba )
int fld; /* key field number */
CONST char FAR *key_val; /* key value */
/* Delete key from B-tree
*/
+int
key_delete(fld, key_val, dba )
int fld;
char CONST FAR *key_val;
/* Read value of last key scanned
*/
+int
d_keyread(key_val TASK_PARM)
char FAR *key_val;
TASK_DECL
/* Build compound key value from record
*/
+int
key_bldcom(fld, rec, key, cflag )
int fld; /* compound key field number */
char FAR *rec; /* ptr to record data */
/* Find record thru key field
*/
+int
d_keyfind(field, fldval TASK_PARM DBN_PARM)
long field; /* field constant */
CONST char FAR *fldval; /* value of the data field */
/* Find first key
*/
+int
d_keyfrst(field TASK_PARM DBN_PARM)
long field; /* field constant */
TASK_DECL
/* Find last key
*/
+int
d_keylast(field TASK_PARM DBN_PARM)
long field; /* field constant */
TASK_DECL
/* Find next record thru key field
*/
+int
d_keynext(field TASK_PARM DBN_PARM)
long field; /* field constant */
TASK_DECL
/* Find previous record thru key field
*/
+int
d_keyprev(field TASK_PARM DBN_PARM)
long field; /* field constant */
TASK_DECL
/* Store optional key value
*/
+int
d_keystore(field TASK_PARM DBN_PARM)
long field; /* key field constant */
TASK_DECL
#ifndef ONE_DB
/* Check for valid db number and set curr_db, curr_db_table and curr_rn_table
*/
+int
dbn_check(dbn)
int dbn;
{
/* Check for valid (external) set number and return (internal) set number
and set_table pointer.
*/
+int
nset_check(nset, set, set_ptr )
register int nset;
int *set;
/* Check for valid (external) field number and return (internal) record
and field numbers and pointers.
*/
+int
nfld_check(nfld, rec, fld, rec_ptr, fld_ptr )
long nfld;
int *rec;
/* Check for valid (external) record number and return (internal) record
number and pointer.
*/
+int
nrec_check(nrec, rec, rec_ptr)
int nrec;
int *rec;
(sfld_ptr < fld_max) && (sfld_ptr->fd_flags & STRUCTFLD);
++sfld_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 );
}
}
(--kt_lc >= 0) && (&field_table[key_ptr->kt_key] == fld_ptr);
++key_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 ( 0 );
/* check for empty DB_ADDR
*/
+int
null_dba( db_addr )
CONST char FAR *db_addr;
{
/* check for valid DB_ADDR
*/
+int
check_dba( dba )
DB_ADDR dba;
{
f2 = db_global.country_tbl.ptr[*t].sort_as1;
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 */
/*----------------------------------------------------*/
x1 = db_global.country_tbl.ptr[*s].sort_as2;
x2 = db_global.country_tbl.ptr[*t].sort_as2;
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 {
if ( x1 || x2 ) { /* Only sort_as2 value for one string */
if ( db_global.country_tbl.ptr[*t].sort_as1 )
f2 = db_global.country_tbl.ptr[*t].sort_as1;
else f2 = *t;
- if ( x = x1 - f2 ) return(x);
+ if (( x = x1 - f2 )) return(x);
}
if ( x2 ) {
*s++; /* Compare with next character in string 1 */
if ( db_global.country_tbl.ptr[*s].sort_as1 )
f1 = db_global.country_tbl.ptr[*s].sort_as1;
else f1 = *s;
- if ( x = f1 - x2 ) return(x);
+ if (( x = f1 - x2 )) return(x);
}
}
/* if both are equal compare sub_sort values */
/*-------------------------------------------*/
- if (x = db_global.country_tbl.ptr[*s].sub_sort -
- db_global.country_tbl.ptr[*t].sub_sort)
+ if ((x = db_global.country_tbl.ptr[*s].sub_sort -
+ db_global.country_tbl.ptr[*t].sub_sort))
return(x);
}
*s++;
/* Set the value of a key field
*/
+int
d_setkey( field, fldvalue TASK_PARM DBN_PARM )
long field;
CONST char FAR *fldvalue;
/* Create a new empty record
*/
+int
d_makenew( nrec TASK_PARM DBN_PARM )
int nrec;
TASK_DECL
/* Get number of members of the current set owner
*/
+int
d_members(set, tot TASK_PARM DBN_PARM)
int set; /* Set table entry */
LONG FAR *tot; /* total members of set */
#include <stdio.h>
#include <fcntl.h>
+#include <unistd.h>
#include "vista.h"
#ifdef MSC
#include <share.h>
/* Turn on db_VISTA runtime options
*/
+int
d_on_opt(optflag TASK_PARM)
int optflag;
TASK_DECL
/* Turn off db_VISTA runtime options
*/
+int
d_off_opt(optflag TASK_PARM)
int optflag;
TASK_DECL
/* Check a field for permission to change it
*/
+int
r_chkfld(field, fld_ptr, rec, data )
INT field; /* field_table entry number */
FIELD_ENTRY FAR *fld_ptr; /* corresponds to field */
/* Delete the current record
*/
+int
r_delrec( rt, db_addr )
INT rt;
DB_ADDR db_addr;
/* Get data field from record
*/
+int
r_gfld(fld_ptr, rec, data )
FIELD_ENTRY FAR *fld_ptr;
char FAR *rec; /* pointer to record */
/* Get member pointer from record
*/
+int
r_gmem(set, rec, mem_addr )
int set; /* set table entry number */
char FAR *rec; /* pointer to record */
/* Get set pointer from record
*/
+int
r_gset(set, rec, setptr )
int set; /* set table entry number */
char FAR *rec; /* pointer to record */
/* Put data field into record
*/
+int
r_pfld(field, fld_ptr, rec, data, db_addr )
INT field; /* field_table entry number */
FIELD_ENTRY FAR *fld_ptr; /* corresponds to field */
/* Put member pointer into record
*/
+int
r_pmem(set, rec, mem_addr )
int set; /* set table entry number */
char FAR *rec; /* pointer to record */
/* Put set pointer into record
*/
+int
r_pset(set, rec, setptr )
int set; /* set table entry number */
char FAR *rec; /* pointer to record */
/* Set the current set member from record
*/
+int
r_smem( db_addr, set )
DB_ADDR FAR *db_addr;
INT set;
}
/* Set the optional key field "stored" bit */
+int
r_setopt( fld_ptr, rec )
FIELD_ENTRY FAR *fld_ptr; /* field table entry of optional key */
char FAR *rec; /* Pointer to record */
}
/* Clear the optional key field "stored" bit */
+int
r_clropt( fld_ptr, rec )
FIELD_ENTRY FAR *fld_ptr; /* Field table entry of optional key */
char FAR *rec; /* Pointer to record */
}
/* Test the optional key field "stored" bit */
+int
r_tstopt( fld_ptr, rec )
FIELD_ENTRY FAR *fld_ptr; /* Field table entry of optional key */
char FAR *rec; /* Pointer to record */
/* Find first record of type
*/
+int
d_recfrst( rec TASK_PARM DBN_PARM )
int rec; /* record type/table entry */
TASK_DECL
/* Find next record of type
*/
+int
d_recnext(TASK_DBN_ONLY)
TASK_DECL
DBN_DECL
/* Read contents of current record
*/
+int
d_recread(rec TASK_PARM DBN_PARM)
char FAR *rec; /* ptr to record area */
TASK_DECL
/* Write contents to current record
*/
+int
d_recwrite(rec TASK_PARM DBN_PARM)
CONST char FAR *rec; /* ptr to record area */
TASK_DECL
/* Rename database file
*/
+int
d_renfile(dbn, fno, fnm TASK_PARM)
CONST char FAR *dbn; /* database containing file to be renamed */
FILE_NO fno; /* file id number for file to be renamed */
/* Process renamed file table
*/
+int
renfiles()
{
register int dbt_lc; /* loop control */
/* Read currency table
*/
+int
d_rdcurr(currbuff, currsize TASK_PARM)
DB_ADDR **currbuff;
int FAR *currsize;
/* Write currency table
*/
+int
d_wrcurr(currbuff TASK_PARM)
DB_ADDR *currbuff;
TASK_DECL
#ifndef ONE_DB
/* Set current database
*/
+int
d_setdb(dbn TASK_PARM)
int dbn; /* database number */
TASK_DECL
/* Set current member to current member
*/
+int
d_setmm(sett, sets TASK_PARM DBN_PARM)
int sett; /* set table entry number of target member */
int sets; /* set table entry number of source member */
/* Set current member to current owner
*/
+int
d_setmo(setm, seto TASK_PARM DBN_PARM)
int setm; /* set table entry number of member */
int seto; /* set table entry number of owner */
/* Set current member to current record
*/
+int
d_setmr(set TASK_PARM DBN_PARM)
int set; /* set table entry number */
TASK_DECL
/* Set current owner to current member
*/
+int
d_setom(nseto, nsetm TASK_PARM DBN_PARM)
int nseto; /* set table entry number of owner */
int nsetm; /* set table entry number of member */
/* Set current owner to current owner
*/
+int
d_setoo(nsett, nsets TASK_PARM DBN_PARM)
int nsett; /* set table entry number of target owner */
int nsets; /* set table entry number of source owner */
/* Set current owner to current record
*/
+int
d_setor(nset TASK_PARM DBN_PARM)
int nset; /* set number */
TASK_DECL
/* Set current record to current member
*/
+int
d_setrm(set TASK_PARM DBN_PARM)
int set; /* set table entry number */
TASK_DECL
/* Set current record to current owner
*/
+int
d_setro(set TASK_PARM DBN_PARM)
int set; /* set table entry number */
TASK_DECL
#ifdef MULTI_TASK
#include "task.h"
#endif
+
/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC vista.h */
* Initial revision
*/
#include "SearchP.h"
+#include <stdlib.h>
#include <string.h>
#define PROGNAME "READCHAR"
*/
#include "SearchE.h"
#include <ctype.h>
+#include <stdlib.h>
#include "vista.h"
#define PROGNAME "VEDELETE"
#define MEMORY_SIZE 64000 /* 65536 is 64 KBytes of memory */
#define REC_TYPES 256
#define NORM_VALUE 30
+#undef INFINITY /* XXX does GCC's __builtin_inff() work here? */
#define INFINITY 9999.0
#define SORT_MESG 10000
#define CHAR_BITS 8