The great includes migration of 2019 (autotools)
Ok - so one of the steps in building CDE is an early phase called the includes phase (make includes). At this point, all of the public header files are exported to exports/include/Dt, DtI, ... Then, the software is built using that include dir. This of course does not work in autotools. Much of the software does things like #include <Dt/something.h>, so in order for the build to succeed, this behavior must be represented/replicated in some way. It seems the usual way of dealing with this is to place all public headers (and in some projects, ALL headers) into a toplevel include directory. We now do this for all public headers - they have been moved from wherever they were and placed in the appropriate spot in includes/ This will break the Imake 'make includes' phase unless the Imakefiles are fixed (remove the HEADERS = stuff, and the incdir defines). This has not been done at this point since in reality, once autotools works properly, there will be no need for the Imake stuff anymore, and I intend to get rid of it. This is just a warning for now - Imake builds in this tree will now fail at the 'includes' stage. This commit is only the migration. In upcoming commits, libtt will be fixed so that the hack being used before to get around this problem is removed as there will no longer be any need. And then the autotools work continues...
This commit is contained in:
@@ -1,285 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $TOG: Search.h /main/12 1998/04/03 17:10:35 mgreess $
|
||||
*
|
||||
* (c) Copyright 1996 Digital Equipment Corporation.
|
||||
* (c) Copyright 1996 Hewlett-Packard Company.
|
||||
* (c) Copyright 1996 International Business Machines Corp.
|
||||
* (c) Copyright 1996 Sun Microsystems, Inc.
|
||||
* (c) Copyright 1996 Novell, Inc.
|
||||
* (c) Copyright 1996 FUJITSU LIMITED.
|
||||
* (c) Copyright 1996 Hitachi.
|
||||
*/
|
||||
/*
|
||||
* COMPONENT_NAME: austext
|
||||
*
|
||||
* FUNCTIONS: none
|
||||
*
|
||||
* ORIGINS: 27
|
||||
*
|
||||
*
|
||||
* (C) COPYRIGHT International Business Machines Corp. 1994,1995
|
||||
* All Rights Reserved
|
||||
* Licensed Materials - Property of IBM
|
||||
* US Government Users Restricted Rights - Use, duplication or
|
||||
* disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
|
||||
*/
|
||||
#ifndef _Search_h
|
||||
#define _Search_h
|
||||
/********************** Search.h ***********************
|
||||
* $TOG: Search.h /main/12 1998/04/03 17:10:35 mgreess $
|
||||
* Jan 1994.
|
||||
* Public header file for DtSearch/AusText API.
|
||||
* Formerly named ausapi.h. Externals renamed
|
||||
* from ausapi_... or aa_... to DtSearch conventions.
|
||||
* Documentation in dtsearch.doc.
|
||||
*
|
||||
*/
|
||||
#ifndef _XOPEN_SOURCE
|
||||
#define _XOPEN_SOURCE 1
|
||||
#endif
|
||||
#include <time.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#if defined(__linux__)
|
||||
# define __SVR4_I386_ABI_L1__
|
||||
#endif
|
||||
#include <limits.h>
|
||||
#if defined(__linux__)
|
||||
# undef __SVR4_I386_ABI_L1__
|
||||
# ifndef WORD_BIT
|
||||
# define WORD_BIT 32
|
||||
# endif
|
||||
# ifndef LONG_BIT
|
||||
# define LONG_BIT 32
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define DtSrVERSION "0.6"
|
||||
#define DtSrMAXHITS 20
|
||||
#define DtSrMAX_KTNAME 13
|
||||
#define DtSrMAX_DB_KEYSIZE 32
|
||||
#define DtSrMAXWIDTH_HWORD 134
|
||||
#define DtSrMAX_STEMCOUNT 8
|
||||
|
||||
/****************************************/
|
||||
/* */
|
||||
/* RETURN CODES */
|
||||
/* */
|
||||
/****************************************/
|
||||
#define DtSrOK 0 /* normal, successful response */
|
||||
#define DtSrPASSWD 1 /* failed communications authentication */
|
||||
#define DtSrNOTAVAIL 2 /* no hits on search, no such rec, etc */
|
||||
#define DtSrFAIL 3 /* misc unsuccessful engine returns */
|
||||
#define DtSrREINIT 4 /* engine reinitialized, request canceled */
|
||||
#define DtSrERROR 5 /* fatal caller (client) program error */
|
||||
#define DtSrABORT 6 /* fatal engine failure, caller must abort */
|
||||
#define DtSrCOMM 7 /* fatal communications failure */
|
||||
|
||||
/* In order to share databases among heterogenous machines,
|
||||
* certain integer types must be defined that are invariably
|
||||
* 2 and 4 bytes on all architectures.
|
||||
* Note WORD_BIT == 32 does not guarantee short == 16.
|
||||
*/
|
||||
#if (WORD_BIT == 16)
|
||||
typedef int DtSrINT16;
|
||||
typedef unsigned int DtSrUINT16;
|
||||
#elif (WORD_BIT == 32)
|
||||
typedef short DtSrINT16;
|
||||
typedef unsigned short DtSrUINT16;
|
||||
#else
|
||||
#error Unable to typedef DtSrINT16 and DtSrUINT16
|
||||
#endif
|
||||
|
||||
#if (WORD_BIT == 32)
|
||||
typedef int DtSrINT32;
|
||||
typedef unsigned int DtSrUINT32;
|
||||
#elif (LONG_BIT == 32)
|
||||
typedef long DtSrINT32;
|
||||
typedef unsigned long DtSrUINT32;
|
||||
#else
|
||||
#error Unable to typedef DtSrINT32 and DtSrUINT32
|
||||
#endif
|
||||
|
||||
#ifndef DB_ADDR
|
||||
typedef DtSrINT32 DB_ADDR; /* vista.h: must be 4 bytes */
|
||||
#endif
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
typedef DtSrUINT32 DtSrObjdate;
|
||||
|
||||
|
||||
/****************************************/
|
||||
/* */
|
||||
/* DtSrKeytype */
|
||||
/* */
|
||||
/****************************************/
|
||||
typedef struct {
|
||||
char is_selected; /* TRUE: user has selected this keytype */
|
||||
char ktchar; /* first char of opera record key */
|
||||
char name [DtSrMAX_KTNAME+1]; /* label string used in UI */
|
||||
} DtSrKeytype;
|
||||
|
||||
/****************************************/
|
||||
/* */
|
||||
/* DtSrResult */
|
||||
/* */
|
||||
/****************************************/
|
||||
/* DtSrResult ormerly DITTO. DtSrObj types formerly ORT_. */
|
||||
typedef struct _DtSrResult {
|
||||
struct _DtSrResult *link; /* ptr to next list node */
|
||||
DtSrUINT32 flags; /* (reserved) */
|
||||
DtSrINT32 objflags; /* flags from object record */
|
||||
#define DtSrFlDELETE (1<<0) /* (reserved) */
|
||||
#define DtSrFlOLDNOTES (1<<1) /* (reserved) */
|
||||
#define DtSrFlNOTAVAIL (1<<2) /* object not retrievable from engine */
|
||||
DtSrUINT32 objuflags; /* user flags from database rec */
|
||||
DtSrINT32 objsize; /* in uncompressed bytes */
|
||||
DtSrObjdate objdate; /* zero means object 'undated' */
|
||||
DtSrINT16 objtype; /* from database record */
|
||||
#define DtSrObjUNKNOWN 0 /* object type unknown or not applicable */
|
||||
#define DtSrObjTEXT 1 /* generic, unformatted flat text */
|
||||
#define DtSrObjBINARY 2 /* generic binary object */
|
||||
#define DtSrObjSGML 3 /* generic SGML formatted document */
|
||||
#define DtSrObjHTML 4 /* HTML formatted document */
|
||||
#define DtSrObjPOSTSCR 6 /* Postscript document */
|
||||
#define DtSrObjINTERLF 7 /* Interleaf document */
|
||||
#define DtSrObjDTINFO 8 /* DtInfo document */
|
||||
DtSrINT16 objcost; /* (reserved) */
|
||||
int dbn; /* dbnamesv index */
|
||||
DB_ADDR dba; /* data base addr within database */
|
||||
DtSrINT16 language; /* language of the database */
|
||||
#define DtSrLaENG 0 /* English, ASCII char set (default) */
|
||||
#define DtSrLaENG2 1 /* English, ISO Latin-1 char set */
|
||||
#define DtSrLaESP 2 /* Spanish, ISO Latin-1 char set */
|
||||
#define DtSrLaFRA 3 /* French, ISO Latin-1 char set */
|
||||
#define DtSrLaITA 4 /* Italian, ISO Latin-1 char set */
|
||||
#define DtSrLaDEU 5 /* German, ISO Latin-1 char set */
|
||||
#define DtSrLaJPN 6 /* Japanese, EUC, auto kanji compounds */
|
||||
#define DtSrLaJPN2 7 /* Japanese, EUC, listed kanji compounds */
|
||||
#define DtSrLaLAST 7 /* Last supported DtSrLa constant */
|
||||
char reckey [DtSrMAX_DB_KEYSIZE]; /* object's db key */
|
||||
int proximity; /* 'distance' of object from query */
|
||||
char *abstractp; /* object's abstract from db*/
|
||||
} DtSrResult;
|
||||
|
||||
/****************************************/
|
||||
/* */
|
||||
/* DtSrHitword */
|
||||
/* */
|
||||
/****************************************/
|
||||
typedef struct {
|
||||
long offset; /* word location in cleartext */
|
||||
long length; /* length of word */
|
||||
} DtSrHitword;
|
||||
|
||||
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Functions */
|
||||
/* */
|
||||
/************************************************/
|
||||
extern void DtSearchAddMessage (char *msg);
|
||||
extern int DtSearchHasMessages (void);
|
||||
extern char *DtSearchGetMessages (void);
|
||||
extern void DtSearchFreeMessages (void);
|
||||
extern int DtSearchGetMaxResults (void);
|
||||
extern void DtSearchSetMaxResults (int new_max_results);
|
||||
extern char *DtSearchFormatObjdate (DtSrObjdate objdate);
|
||||
extern void DtSearchExit (int return_code);
|
||||
extern void DtSearchAddUserExit (void (*user_exit)(int));
|
||||
extern void DtSearchRemoveUserExit (void);
|
||||
|
||||
extern int DtSearchSortResults (DtSrResult **list, int sort_type);
|
||||
#define DtSrSORT_PROX 1 /* sort on proximity */
|
||||
#define DtSrSORT_DATE 2 /* sort on objdate */
|
||||
extern int DtSearchMergeResults (DtSrResult **targ, DtSrResult **src);
|
||||
extern int DtSearchFreeResults (DtSrResult **list);
|
||||
extern DtSrObjdate
|
||||
DtSearchValidDateString (char *date_string);
|
||||
extern int DtSearchInit (
|
||||
char *argv0,
|
||||
char *userid,
|
||||
long switches,
|
||||
char *config_file,
|
||||
FILE *err_file,
|
||||
char ***dbnames,
|
||||
int *dbcount);
|
||||
/* Bit values valid for switches argument: */
|
||||
#define DtSrInNOLOCALE 0x0001L /* do not exec setlocale() */
|
||||
#define DtSrInSIGNAL 0x0002L /* register abort signal handlers */
|
||||
#define DtSrInUSEROCF 0x0004L /* (reserved) */
|
||||
#define DtSrInENAB_NOHUP 0x0008L /* enab nohup for backgnd progms */
|
||||
#define DtSrInIDEBUG 0x0010L /* set initialization debugging */
|
||||
#define DtSrInSDEBUG 0x0020L /* set search debugging */
|
||||
#define DtSrInRDEBUG 0x0040L /* set retrieval debugging */
|
||||
#define DtSrInCDEBUG 0x0080L /* set communications debugging */
|
||||
#define DtSrInANY_DEBUG \
|
||||
(DtSrInIDEBUG | DtSrInSDEBUG | DtSrInRDEBUG | DtSrInCDEBUG)
|
||||
#define DtSrInRDWR 0x0100L /* open db files for read and write */
|
||||
|
||||
extern int DtSearchReinit (
|
||||
char ***dbnames,
|
||||
int *dbcount);
|
||||
|
||||
extern int DtSearchGetKeytypes (
|
||||
char *dbname,
|
||||
int *ktcount,
|
||||
DtSrKeytype **keytypes);
|
||||
|
||||
extern int DtSearchQuery (
|
||||
void *qry,
|
||||
char *dbname,
|
||||
int search_type,
|
||||
char *date1,
|
||||
char *date2,
|
||||
DtSrResult **results,
|
||||
long *resultscount,
|
||||
char *stems,
|
||||
int *stemcount);
|
||||
|
||||
extern int DtSearchRetrieve (
|
||||
char *dbname,
|
||||
DB_ADDR dba,
|
||||
char **cleartext,
|
||||
long *clearlen,
|
||||
int *fzkeyi);
|
||||
|
||||
extern int DtSearchHighlight (
|
||||
char *dbname,
|
||||
char *cleartext,
|
||||
DtSrHitword **hitwptr,
|
||||
long *hitwcount,
|
||||
int search_type,
|
||||
char *stems,
|
||||
int stemcount);
|
||||
|
||||
/********************** Search.h ***********************/
|
||||
#endif /* _Search_h */
|
||||
@@ -1,639 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* COMPONENT_NAME: austext
|
||||
*
|
||||
* FUNCTIONS: none
|
||||
*
|
||||
* ORIGINS: 27
|
||||
*
|
||||
*
|
||||
* (C) COPYRIGHT International Business Machines Corp. 1991,1995
|
||||
* All Rights Reserved
|
||||
* Licensed Materials - Property of IBM
|
||||
* US Government Users Restricted Rights - Use, duplication or
|
||||
* disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
|
||||
*/
|
||||
#ifndef _SearchE_h
|
||||
#define _SearchE_h
|
||||
/***************************** SearchE.h ******************************
|
||||
* $XConsortium: SearchE.h /main/5 1996/08/12 13:16:47 cde-ibm $
|
||||
* August 1991.
|
||||
* Header file for online DtSearch Engine (OE.C etc).
|
||||
* SearchE.h was formerly called oe.h (Opera Engine).
|
||||
* The old OE engine is pretty much invisible now, having
|
||||
* been surrounded by the ausapi/DtSearch interface.
|
||||
*
|
||||
* The main data structure for passing and receiving arguments
|
||||
* between the callers and the engine is USRBLK which is
|
||||
* the only argument in the Opera_Engine() call.
|
||||
* The actual input and output arguments in the USRBLK for each
|
||||
* function are described below with the function description.
|
||||
*
|
||||
* All OE_functions pass a return code
|
||||
* to the caller. OE_OK = successful completion,
|
||||
* anything else may be partial completion/success or failure.
|
||||
* Return code mnemonics are also defined below.
|
||||
*
|
||||
* $Log$
|
||||
* Revision 2.7 1996/03/20 19:11:21 miker
|
||||
* Changed prototype of hilite_cleartext().
|
||||
*
|
||||
* Revision 2.6 1996/03/13 22:34:53 miker
|
||||
* Changed char to UCHAR several places.
|
||||
*
|
||||
* Revision 2.5 1996/03/05 19:17:50 miker
|
||||
* oe_unblob no longer converts to uppercase.
|
||||
*
|
||||
* Revision 2.4 1996/03/05 15:54:06 miker
|
||||
* Minor changes to support yacc-based boolean search.
|
||||
*
|
||||
* Revision 2.3 1996/02/01 16:14:38 miker
|
||||
* Obsoleted requests OE_DITTO2KWIC, OE_VALIDATE_PWD, OE_CHANGE_PWD,
|
||||
* OE_FINDSTR_REC, OE_FINDSTR_HITL, OE_ASSIST, OE_KILL.
|
||||
* Restored OE_PING as the official "null" function.
|
||||
* Added USRDBG_HILITE and USRDBG_PARSE.
|
||||
* Replaced STRKIND, OE_kind_of_stems, and oe_stems_to_hitwords
|
||||
* with hilite_cleartext. Deleted oe_ditto2kwic, oe_findstr_hitl.
|
||||
* Deleted usrblk.kwiclen.
|
||||
*
|
||||
* Revision 2.2 1995/10/25 22:35:45 miker
|
||||
* Added prolog.
|
||||
*
|
||||
* Revision 2.1 1995/09/22 22:39:39 miker
|
||||
* Freeze DtSearch 0.1, AusText 2.1.8
|
||||
*
|
||||
* Revision 1.1 1995/08/31 20:42:33 miker
|
||||
* Initial revision
|
||||
*
|
||||
* The DtSearch return codes wrap around the OE return codes.
|
||||
*/
|
||||
#include "SearchP.h"
|
||||
|
||||
#define AUDIT_FORMAT "UID=%-8s TIME=%s ELAP=%-3ld DB=%-8s HITS=%-5ld "
|
||||
#define AUDIT_WHOWHEN "UID=%-8s TIME=%s"
|
||||
#define DISCARD_FORMAT "%s\t\"%s\"\t%s\t%s\n"
|
||||
#define HARDCOPY_SCRIPT "opprt.bat"
|
||||
#define MAX_HITWCOUNT 200 /* max number hitwords that can be hilited */
|
||||
#define WORDS_HITLIMIT 300000L
|
||||
|
||||
|
||||
/*-------------------- Request Codes ------------------------
|
||||
* All Engine requests, in addition to input below, require valid
|
||||
* usrblk.userid
|
||||
* usrblk.request.
|
||||
* All Engine requests, in addition to output below,
|
||||
* may return ausapi_msglist.
|
||||
* There is no zero request code.
|
||||
* See list of return codes for the ones that are marked 'common retncodes'.
|
||||
*/
|
||||
|
||||
#define OE_INITIALIZE 1
|
||||
/* does lotsa stuff--see the function.
|
||||
* input:
|
||||
* .query = AUSAPI_VERSION of UI code
|
||||
* .dblist = data from user config file
|
||||
* .dblk = data from user config file
|
||||
* output:
|
||||
* .dblist = modified after load of site config file
|
||||
* .dblk = modified after load of site config file
|
||||
* .retncode = OE_OK, OE_NOTAVAIL, OE_ABORT
|
||||
*/
|
||||
|
||||
#define OE_TEXT2FZKEY 2
|
||||
/* converts problem description text to fzkey.
|
||||
* input:
|
||||
* .query = problem description text
|
||||
* .dblk = desired database and db parameters
|
||||
* output:
|
||||
* .fzkey = inference from query text analysis
|
||||
* .retncode = common retncodes + OE_BAD_QUERY
|
||||
*/
|
||||
|
||||
#define OE_SRCH_FZKEY 3
|
||||
/* Converts fzkey to hitlist of dba's.
|
||||
* Not available for databases without semantic dictionaries.
|
||||
* input:
|
||||
* .fzkey = database search vector
|
||||
* .dblk = desired database and db parameters
|
||||
* output:
|
||||
* .workproc = function to be called until !OE_SEARCHING
|
||||
* .dittolist = hitlist sorted by proximity
|
||||
* .dittocount = # of nodes on dittolist
|
||||
* .retncode = common retncodes + OE_SEARCHING, OE_NOTAVAIL,
|
||||
* OE_USER_STOP, OE_SYSTEM_STOP, OE_BAD_QUERY
|
||||
*/
|
||||
|
||||
#define OE_SRCH_STEMS 4
|
||||
/* converts string of wordstems and booleans to
|
||||
* hitlist of dba's and stems array.
|
||||
* input:
|
||||
* .query = text string of wordstems and booleans
|
||||
* .dblk = desired database and db parameters
|
||||
* output:
|
||||
* .fzkey = (value undefined)
|
||||
* .workproc = function to be called until !OE_SEARCHING
|
||||
* .dittolist = hitlist
|
||||
* .dittocount = # of nodes on dittolist
|
||||
* .stems = array of stems for hiliting in text of hits
|
||||
* .stemcount = size of 'stems' array
|
||||
* .retncode = common retncodes + OE_BAD_QUERY, OE_SEARCHING,
|
||||
* OE_NOTAVAIL, OE_USER_STOP
|
||||
*/
|
||||
|
||||
#define OE_SRCH_WORDS 5
|
||||
/* converts string of exact words and booleans to
|
||||
* hitlist of dba's and stems array.
|
||||
* input:
|
||||
* .query = text string of exact words and booleans
|
||||
* .dblk = desired database and db parameters
|
||||
* output:
|
||||
* .fzkey = (value undefined)
|
||||
* .workproc = function to be called until !OE_SEARCHING
|
||||
* .dittolist = hitlist
|
||||
* .dittocount = # of nodes on dittolist
|
||||
* .stems = array of words for hiliting in text of hits
|
||||
* .stemcount = size of 'stems' array
|
||||
* .retncode = common retncodes + OE_BAD_QUERY, OE_SEARCHING,
|
||||
* OE_NOTAVAIL, OE_USER_STOP
|
||||
*/
|
||||
|
||||
#define OE_STOP_SRCH 6
|
||||
/* sets global switch to cancel search work procedure.
|
||||
* workproc actually cancels itself after reading switch.
|
||||
* input: .request = OE_STOP_SEARCH
|
||||
* output: .retncode = 'common retncodes' only
|
||||
*/
|
||||
|
||||
#define OE_APPEND_NOTES 7
|
||||
/* appends user's notes to record at current dba.
|
||||
* input:
|
||||
* .query = freeform text of append
|
||||
* .dba = address of record to append
|
||||
* .dblk = desired database and db parameters
|
||||
* output:
|
||||
* .retncode = common retncodes + OE_TIMEOUT, OE_DISABLED
|
||||
*/
|
||||
|
||||
#define OE_GETREC 8
|
||||
/* retrieves record, cleartext, and notes for specified dba.
|
||||
* Clears hitwords array, does not use or change stems array.
|
||||
* input:
|
||||
* .dba = address of record to retrieve
|
||||
* .dblk = desired database and db parameters
|
||||
* output:
|
||||
* .objrec = austext record itself, as is from vista
|
||||
* .cleartext = NULL or uncompressed text string
|
||||
* .clearlen = 0 or size of cleartext
|
||||
* .hitwords = array pointer cleared to NULL
|
||||
* .hitwcount = size of hitwords array set to 0
|
||||
* .notes = NULL, or list of notes records, as is
|
||||
* .retncode = common retncodes + OE_NOTAVAIL
|
||||
*/
|
||||
|
||||
#define OE_GETREC_STEMS 9
|
||||
/* retrieves record, cleartext, notes, and hitwords
|
||||
* array for specified dba and stems (from OE_SRCH_STEMS).
|
||||
* If no text in repository, equivalent to OE_GETREC.
|
||||
* input:
|
||||
* .dba = address of record to retrieve
|
||||
* .stems = array of word stems to hilite
|
||||
* .stemcount = size of stems array
|
||||
* .dblk = desired database and db parameters
|
||||
* output:
|
||||
* .objrec = austext record itself, as is from vista
|
||||
* .cleartext = NULL or uncompressed text string
|
||||
* .clearlen = 0 or size of cleartext
|
||||
* .hitwords = NULL or array of words in cleartext to hilite
|
||||
* .hitwcount = 0 or size of hitwords array
|
||||
* .notes = NULL, or list of notes records, as is
|
||||
* .retncode = common retncodes + OE_NOTAVAIL
|
||||
*/
|
||||
|
||||
#define OE_GETREC_WORDS 10
|
||||
/* retrieves record, cleartext, notes, and hitwords
|
||||
* array for specified dba and stems array (from OE_SRCH_WORDS).
|
||||
* If no text in repository, equivalent to OE_GETREC.
|
||||
* input:
|
||||
* .dba = address of record to retrieve
|
||||
* .stems = array of exact words to hilite
|
||||
* .stemcount = size of stems array
|
||||
* .dblk = desired database and db parameters
|
||||
* output:
|
||||
* .objrec = austext record itself, as is from vista
|
||||
* .cleartext = NULL or uncompressed text string
|
||||
* .clearlen = 0 or size of cleartext
|
||||
* .hitwords = NULL or array of words in cleartext to hilite
|
||||
* .hitwcount = 0 or size of hitwords array
|
||||
* .notes = NULL, or list of notes records, as is
|
||||
* .retncode = common retncodes + OE_NOTAVAIL
|
||||
*/
|
||||
|
||||
#define OE_NEXT_DBA 11
|
||||
/* advances dba to next valid b-tree address. Wraps if necessary.
|
||||
* input:
|
||||
* .dba = current address of record
|
||||
* .dblk = desired database and db parameters
|
||||
* output:
|
||||
* .dba = address of next record in b-tree
|
||||
* .retncode = common retncodes + OE_WRAPPED
|
||||
*/
|
||||
|
||||
#define OE_PREV_DBA 12
|
||||
/* retreats dba to previous valid b-tree address.
|
||||
* Wraps if necessary.
|
||||
* input:
|
||||
* .dba = current address of record
|
||||
* .dblk = desired database and db parameters
|
||||
* output:
|
||||
* .dba = address of previous record in b-tree
|
||||
* .retncode = common retncodes + OE_WRAPPED
|
||||
*/
|
||||
|
||||
#define OE_RECKEY2DBA 13
|
||||
/* converts an austext record key into a dba. Wraps if not found.
|
||||
* input:
|
||||
* .query = desired record key
|
||||
* .dblk = desired database and db parameters
|
||||
* output:
|
||||
* .dba = address of record found,
|
||||
* or next avail address if not found
|
||||
* .retncode = common retncodes + OE_WRAPPED
|
||||
*/
|
||||
|
||||
#define OE_MARK_DELETION 14
|
||||
/* writes record id to an external file for
|
||||
* possible later deletion by external program.
|
||||
* input:
|
||||
* .query = record key to be marked for deletion
|
||||
* .dblk = database where record is located
|
||||
* output:
|
||||
* .retncode = common retncodes + OE_NOTAVAIL, OE_DISABLED
|
||||
*/
|
||||
|
||||
#define OE_GETREC_DIC 15
|
||||
/* THIS FUNCTION IS NO LONGER SUPPORTED.
|
||||
* IF RECEIVED BY ENGINE, IT IS TREATED EXACTLY AS OE_GETREC.
|
||||
* Retrieves record, cleartext, notes, and hitwords
|
||||
* array for specified dba. Hitwords are not derived from the
|
||||
* stems array; they are all the cleartext words that are in
|
||||
* the dictionary. (Compare to OE_GETREC_WORDS and OE_GETREC_STEMS).
|
||||
* If no text in repository, equivalent to OE_GETREC.
|
||||
* input:
|
||||
* .dba = address of record to retrieve
|
||||
* .dblk = desired database and db parameters
|
||||
* output:
|
||||
* .objrec = austext record itself, as is from vista
|
||||
* .cleartext = NULL or uncompressed text string
|
||||
* .clearlen = 0 or size of cleartext
|
||||
* .hitwords = NULL or array of words in cleartext to hilite
|
||||
* .hitwcount = 0 or size of hitwords array
|
||||
* .notes = NULL, or list of notes records, as is
|
||||
* .retncode = common retncodes + OE_NOTAVAIL
|
||||
*/
|
||||
|
||||
#define OE_DITTO2KWIC 16
|
||||
#define OE_VALIDATE_PWD 17
|
||||
#define OE_CHANGE_PWD 18
|
||||
/* (These functions are obsolete) */
|
||||
|
||||
#define OE_DELETE_RECID 19
|
||||
/* Deletes header record, all text, user notes,
|
||||
* and word/stems references for specified record.
|
||||
* Currently can only be called from offline program
|
||||
* when all online austext users have been logged off.
|
||||
* THIS FUNCTION IS <<<VERY>>> SLOW (about 15 min on large dbase)!
|
||||
* input:
|
||||
* .query = desired record key
|
||||
* .dblk = desired database and db parameters
|
||||
* output:
|
||||
* .dba = address of record deleted
|
||||
* THIS ADDRESS IS NO LONGER VALID!
|
||||
* .dbatab = (undefined)
|
||||
* .dbacount = 1
|
||||
* .retncode = common retncodes + OE_NOTAVAIL
|
||||
*/
|
||||
|
||||
#define OE_DELETE_BATCH 20
|
||||
/* Deletes header records, all text, user notes,
|
||||
* and word/stems references for all records in a
|
||||
* datbase address table. Currently can only be called
|
||||
* from offline program when all online austext users
|
||||
* have been logged off. This function is the preferred
|
||||
* deletion method because it is faster than deleting
|
||||
* single records at a time. Addresses not found are ignored.
|
||||
* input:
|
||||
* .dblk = desired database and db parameters
|
||||
* .dbatab = table of valid addresses to be deleted
|
||||
* .dbacount = number of addresses on the table
|
||||
* output:
|
||||
* .retncode = common retncodes only
|
||||
*/
|
||||
|
||||
#define OE_ASSIST 21
|
||||
#define OE_FINDSTR_REC 22
|
||||
#define OE_FINDSTR_HITL 23
|
||||
/* (These functions are obsolete) */
|
||||
|
||||
#define OE_SRCH_STATISTICAL 24
|
||||
/* Converts string of natural language text to
|
||||
* hitlist of dba's and stems array. Uses stems only,
|
||||
* no booleans, all words are ORed together. Hitlist sorted
|
||||
* based on statistics of included word stems.
|
||||
* input:
|
||||
* .query = natural language text string
|
||||
* .dblk = desired database and db parameters
|
||||
* output:
|
||||
* .stems = array of stems for hiliting in text of hits
|
||||
* .stemcount = size of 'stems' array (up to max allowed)
|
||||
* .workproc = function to be called until !OE_SEARCHING
|
||||
* .dittolist = hitlist
|
||||
* .dittocount = # of nodes on dittolist
|
||||
* .retncode = common retncodes + OE_BAD_QUERY, OE_SEARCHING,
|
||||
* OE_NOTAVAIL, OE_USER_STOP
|
||||
*/
|
||||
|
||||
#define OE_HILITE_STEMS 25
|
||||
/* Creates a hitwords array for hiliting using the text
|
||||
* in cleartext (however it may have been obtained),
|
||||
* and the stems array from the last search.
|
||||
* input:
|
||||
* .cleartext = text to be hilited
|
||||
* .clearlen = size of cleartext
|
||||
* .stems = array of words or stems to hilite
|
||||
* .stemcount = size of stems array
|
||||
* .search_type = 'W', 'P' or 'S', indicating type of
|
||||
* search that generated stems array.
|
||||
* output:
|
||||
* .hitwords = array of words in cleartext to hilite
|
||||
* .hitwcount = size of hitwords array
|
||||
* .retncode = common retncodes + OE_NOTAVAIL, OE_BAD_QUERY
|
||||
*/
|
||||
|
||||
#define OE_GET_EXPIRE 26
|
||||
/* Returns in 'dba' field the expiration date of OE as a timestamp.
|
||||
* Zero means no expiration date. Overlays previous value in dba.
|
||||
* input: .request = OE_GET_EXPIRE
|
||||
* output: .dba = unix timestamp of expiration date or 0
|
||||
* .retncode = common retncodes only
|
||||
*/
|
||||
|
||||
#define OE_KILL 9997
|
||||
#define OE_PING 9998
|
||||
#define OE_SHUTDOWN 9999
|
||||
/* (These functions are obsolete) */
|
||||
|
||||
/*-------------------- Return Codes ------------------------
|
||||
* The return codes marked 'common retncodes' are OE_OK, OE_NOOP, OE_REINIT,
|
||||
* and OE_ABORT, and can be returned by almost all functions.
|
||||
* OE_BAD_QUERY will be returned for any unknown function request.
|
||||
* There is no zero return code.
|
||||
*/
|
||||
#define OE_OK 1 /* normal successful completion */
|
||||
#define OE_REINIT 2 /* request canceled: OE reinitialized
|
||||
* databases so UI's dba's may be bad */
|
||||
#define OE_SEARCHING 3 /* keep calling workproc */
|
||||
#define OE_BAD_DBLK 4
|
||||
#define OE_BAD_REQUEST 5 /* invalid request field */
|
||||
#define OE_BAD_QUERY 6 /* invalid query or other input fld */
|
||||
#define OE_NOTAVAIL 7 /* no record, hits, function disabled */
|
||||
#define OE_TIMEOUT 8
|
||||
#define OE_WRAPPED 9 /* got next item instead of reqstd item */
|
||||
#define OE_SYSTEM_STOP 10 /* error: search canceled by OE */
|
||||
#define OE_BAD_PASSWD 11 /* invalid password */
|
||||
#define OE_BAD_HITLIST 12 /* invalid hitlist */
|
||||
#define OE_DISABLED 13 /* requested function disabled at this site */
|
||||
#define OE_USER_STOP 14 /* search canceled by user */
|
||||
#define OE_BAD_COMM 15 /* request canceled by comm layer */
|
||||
#define OE_NOOP 888 /* No Operation, nothing done */
|
||||
#define OE_ABORT 999 /* fatal OE error, OE permanently disabled */
|
||||
|
||||
|
||||
/****************************************/
|
||||
/* */
|
||||
/* OEFTAB */
|
||||
/* */
|
||||
/****************************************/
|
||||
/* Table used in load_ocf() oe_uninitialize() to allow overriding default
|
||||
* locations of various files. Complete discussion in .ocf documentation.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
char *id; /* keyword identifier */
|
||||
char **OEFptr; /* addr of variable to change */
|
||||
char previously_specified; /* bool ensures only one spec */
|
||||
} OEFTAB;
|
||||
|
||||
/****************************************/
|
||||
/* */
|
||||
/* USRBLK */
|
||||
/* */
|
||||
/****************************************/
|
||||
typedef struct
|
||||
{
|
||||
char userid [10]; /* 1 - 8 alphanumeric char */
|
||||
int search_type; /* single char = curr search type.
|
||||
* 'T' = Semantic Text search
|
||||
* 'W' = Exact Words search
|
||||
* 'S' = Stems search
|
||||
* 'Z' = Fzkey search
|
||||
* 'N' = Navigator string (unpacked fzk) srch
|
||||
* 'P' = Statistical (Probabilistic) search
|
||||
*/
|
||||
|
||||
long flags; /* bit switches... */
|
||||
#define USR_BIT_1 0x0001L /* (reserved) */
|
||||
#define USR_NO_ITERATE 0x0002L /* override iterations in workprocs */
|
||||
#define USR_STOPSRCH 0x0004L /* the "stop" button, cancels workproc */
|
||||
#define USR_MAXMIN 0x0008L /* symdif() algorithm = fuzzy max min */
|
||||
#define USR_OBJDATES 0x0010L /* restrict hitlists to objdate ranges */
|
||||
#define USR_KWIC_ABSTR 0x0020L /* retn KeyWord In Context for abstract */
|
||||
#define USR_NO_INFOMSGS 0x0040L /* do not retn information-only msgs to UI */
|
||||
#define USR_MAXHITS_MSG 0x0080L /* show # hits each keytype if sum > maxhits */
|
||||
#define USR_SORT_WHITL 0x0100L /* sort word/stem hitlists by semantics */
|
||||
|
||||
long debug; /* Nonproduction bit switches */
|
||||
#define USRDBG_RARE 0x0001L /* 1 Misc initialzatn trace msgs */
|
||||
#define USRDBG_SRCHCMPL 0x0002L /* 2 trace ui search_completed functions */
|
||||
#define USRDBG_RETRVL 0x0004L /* 4 trace record retrieval funcs */
|
||||
#define USRDBG_ITERATE 0x0008L /* 8 forces iteration on all iterable cmds */
|
||||
#define USRDBG_UTIL 0x0010L /* 16 trace misc utility functions */
|
||||
#define USRDBG_MEDPRMPT 0x0020L /* 32 Prints prompt of medley sockets cmds */
|
||||
#define USRDBG_HITLIST 0x0040L /* 64 print hitlists after searches */
|
||||
#define USRDBG_SYMP 0x0080L /* 128 trace symptom search funcs */
|
||||
#define USRDBG_DELETE 0x0100L /* 256 trace record deletion functions */
|
||||
#define USRDBG_RPC 0x0200L /* 512 trace RPC communications funcs */
|
||||
#define USRDBG_VERBOSE 0x0400L /* 1024 verbose debugging: iterative details */
|
||||
#define USRDBG_HILITE 0x0800L /* 2048 trace hiliting functions */
|
||||
#define USRDBG_PARSE 0x1000L /* 4096 trace linguistic parse/stem funcs */
|
||||
#define USRDBG_BOOL 0x2000L /* 8192 trace boolean parse funcs */
|
||||
|
||||
int request;
|
||||
int retncode;
|
||||
char *query; /* input data for text searches */
|
||||
DtSrObjdate objdate1; /* only retn hit objects >= (after) date1 */
|
||||
DtSrObjdate objdate2; /* only retn hit objects <= (before) date2 */
|
||||
DB_ADDR dba; /* for direct dba reads */
|
||||
DB_ADDR *dbatab; /* array of dba's for batch deletes */
|
||||
int dbacount; /* # of dba's in dbatab */
|
||||
void (*workproc) (void);
|
||||
/* (1) If single tasking (iterative), OE places ptr to work
|
||||
procedure. (2) If multitasking (no iterations), UI places
|
||||
ptr of func to call when OE's spawned subtask is done. */
|
||||
|
||||
DBLK *dblist; /* linked list of all databases */
|
||||
DBLK *dblk; /* users curr database selection */
|
||||
|
||||
DtSrResult *dittolist; /* hitlist retnd from various searches */
|
||||
long dittocount; /* # of items on hitlist */
|
||||
int stemcount; /* # of wordstems in 'stems' array */
|
||||
char stems [DtSrMAX_STEMCOUNT] [DtSrMAXWIDTH_HWORD];
|
||||
/* for hiliting words in text records */
|
||||
|
||||
struct or_objrec objrec; /* austext record buffer */
|
||||
char *abstrbuf; /* buf to hold abstracts */
|
||||
int abstrbufsz; /* maximum abstract size all databases */
|
||||
char *cleartext; /* decompressed austext record text */
|
||||
long clearlen; /* size of cleartext in bytes */
|
||||
LLIST *notes; /* uncompressed, right out of vista */
|
||||
DtSrHitword *hitwords; /* array of hit words inside cleartext */
|
||||
long hitwcount; /* number of elements in hitwords array */
|
||||
|
||||
} USRBLK;
|
||||
|
||||
|
||||
|
||||
/****************************************/
|
||||
/* */
|
||||
/* SAVEUSR */
|
||||
/* */
|
||||
/****************************************/
|
||||
/* The following data is saved between calls of the workprocs.
|
||||
* In a future msg passing protocol where there may be multiple UIs
|
||||
* per OE, this data would be maintained in a list of structures,
|
||||
* one for each currently active search (UI only passes user id name
|
||||
* in iterative calls, OE searches list to match curr status).
|
||||
* But for now, this will have to do.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
time_t start_time;
|
||||
int iterations;
|
||||
int vistano;
|
||||
DtSrResult *dittolist;
|
||||
long dittocount;
|
||||
int stemcount;
|
||||
char stems [DtSrMAX_STEMCOUNT] [DtSrMAXWIDTH_HWORD];
|
||||
char ktchars [MAX_KTCOUNT + 2];
|
||||
char *lastqry;
|
||||
long ktsum [MAX_KTCOUNT + 1];
|
||||
} SAVEUSR;
|
||||
|
||||
|
||||
/*--------------- GLOBALS in oe.c, loadocf.c -------------------*/
|
||||
extern char **ausapi_dbnamesv;
|
||||
extern int ausapi_dbnamesc;
|
||||
extern USRBLK usrblk;
|
||||
|
||||
extern char *global_memory_ptr;
|
||||
extern OEFTAB oef_table[];
|
||||
extern SAVEUSR saveusr; /* (only one for now) */
|
||||
extern int shm_id;
|
||||
|
||||
extern int OE_bmhtab_strlen [DtSrMAX_STEMCOUNT];
|
||||
extern size_t OE_bmhtables [DtSrMAX_STEMCOUNT] [MAX_BMHTAB];
|
||||
extern int OE_dbn;
|
||||
extern int OE_enable_markdel;
|
||||
extern int OE_enable_usernotes;
|
||||
extern time_t *OE_expiration;
|
||||
extern int OE_fastdecode;
|
||||
extern char *OE_fileio;
|
||||
extern long OE_flags;
|
||||
#define OE_AUDIT 1L /* enables audit file logging */
|
||||
#define OE_INITOK (1L<<1) /* ensures first reqst was INITIALIZE */
|
||||
#define OE_PERMERR (1L<<2) /* disables engine on fatal errors */
|
||||
#define OE_NO_ITERATE (1L<<3) /* override iterations in workprocs */
|
||||
extern char *OE_inittab_dir; /* local dir of server daemon */
|
||||
extern long OE_objsize;
|
||||
extern char *OE_prodname;
|
||||
extern int OE_search_type;
|
||||
extern char *OE_server_dir; /* local dir of server daemon */
|
||||
extern char *OE_sitecnfg_fname;
|
||||
extern time_t OE_sitecnfg_mtime;
|
||||
extern int OE_uppercase_keys;
|
||||
extern long OE_words_hitlimit;
|
||||
|
||||
/* Global pointers to formerly hardcoded path/file names.
|
||||
* The comment names the #define constant under which the
|
||||
* filename is/was specified in either fuzzy.h or oe.h.
|
||||
*/
|
||||
extern char *OEF_audit; /* FNAME_AUDIT */
|
||||
extern char *OEF_discard; /* FNAME_DISCARD_DATA */
|
||||
extern char *OEF_news; /* FNAME_SITENEWS */
|
||||
extern char *OEF_notesnot; /* FNAME_NOTES_BAC */
|
||||
extern char *OEF_notessem; /* FNAME_NOTES_SEM */
|
||||
extern char *OEF_readme; /* FNAME_README */
|
||||
|
||||
/*---------------- FUNCTION PROTOTYPES ----------------------*/
|
||||
extern char *calloe_getrec (char *dbname, DB_ADDR dba,
|
||||
LLIST **global_msglist);
|
||||
extern long calloe_hilite (char *cleartext, DtSrHitword *hitwords,
|
||||
LLIST **global_msglist);
|
||||
extern DtSrResult
|
||||
*calloe_search (char *qry, char *dbname,
|
||||
int search_type, LLIST **global_msglist);
|
||||
extern int call_output_script (char *shellcmd, char *text);
|
||||
extern void clear_hitwords (void);
|
||||
extern void clear_usrblk_record (void);
|
||||
extern void dummy_workproc (void);
|
||||
extern char *ensure_end_slash (char *charbuf);
|
||||
extern void fasthuf (UCHAR *input_bitstring, UCHAR *output_charbuf,
|
||||
int outbuf_size, time_t encode_id);
|
||||
extern char *get_hitlist_text (int maxlen);
|
||||
extern long hilite_cleartext (int parse_type, char *stems, int stemcount);
|
||||
extern int load_ocf (void);
|
||||
extern char *nowstring (time_t *now);
|
||||
extern void oe_initialize (void);
|
||||
extern int oe_unblob (LLIST *bloblist);
|
||||
extern void oe_write_audit_rec (long numhits);
|
||||
extern void Opera_Engine (void);
|
||||
extern void print_dittolist (DtSrResult *dittolist, char *label);
|
||||
extern void print_stems (int stemcount, void *stems, char *locstr);
|
||||
extern void print_usrblk_record (char *label);
|
||||
extern void release_shm_mem (void);
|
||||
extern char *retncode_str (int num);
|
||||
extern void symptom_search (void);
|
||||
extern int ve_append_notes (void);
|
||||
extern void ve_browse_dba (int direction);
|
||||
extern LLIST *ve_getblobs (DtSrINT32 dba, int vistano);
|
||||
extern int ve_getrec_dba (LLIST **bloblist);
|
||||
extern int ve_initialize (void);
|
||||
extern void ve_ditto (void);
|
||||
extern DtSrINT32 ve_reckey2dba (void);
|
||||
extern void ve_statistical (void);
|
||||
extern void ve_stem_search (void);
|
||||
extern void ve_word_search (void);
|
||||
extern void ve_shutdown (void);
|
||||
|
||||
/***************************** SearchE.h ******************************/
|
||||
#endif /* _SearchE_h */
|
||||
@@ -1,887 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* COMPONENT_NAME: austext
|
||||
*
|
||||
* FUNCTIONS:
|
||||
*
|
||||
* ORIGINS: 27
|
||||
*
|
||||
*
|
||||
* (C) COPYRIGHT International Business Machines Corp. 1990,1995
|
||||
* All Rights Reserved
|
||||
* Licensed Materials - Property of IBM
|
||||
* US Government Users Restricted Rights - Use, duplication or
|
||||
* disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
|
||||
*/
|
||||
#ifndef _SearchP_h
|
||||
#define _SearchP_h
|
||||
/************************ SearchP.h ********************************
|
||||
* $XConsortium: SearchP.h /main/9 1996/10/12 16:10:00 cde-ibm $
|
||||
* June 1990.
|
||||
* Private header file for DtSearch/AusText used by
|
||||
* both build tools and search engine.
|
||||
* Derived from original IBM fuzzy.h.
|
||||
*
|
||||
* Hierarchies of DtSearch/AusText Search*.h #includes:
|
||||
* Search.h is Dt/Aus public header, defines _XOPEN_SOURCE.
|
||||
* SearchP.h is private Dt/Aus, includes Search.h.
|
||||
* semantic.h is private Aus only, defines _ALL_SOURCE,
|
||||
* includes SearchP.h.
|
||||
* (Should be specified in place of SearchP.h).
|
||||
* SearchE.h is private engine header Dt/Aus. Invokes either
|
||||
* SearchP.h or semantic.h depending on whether DTSEARCH defined.
|
||||
* Only one of the above should be specified. They should always
|
||||
* be first include to get the _SOURCE defines right.
|
||||
* DTSEARCH should be defined on compiler cmd line.
|
||||
*
|
||||
* $Log$
|
||||
* Revision 2.11 1996/04/10 19:44:43 miker
|
||||
* AusText 2.1.13, DtSearch 0.5. Documentation cleanup.
|
||||
*
|
||||
* Revision 2.10 1996/03/13 22:35:14 miker
|
||||
* Added UCHAR definition. Changed char to UCHAR several places.
|
||||
*
|
||||
* Revision 2.9 1996/03/05 16:48:56 miker
|
||||
* Add COMMENT_CHARS from lang.c.
|
||||
*
|
||||
* Revision 2.8 1996/03/05 15:58:57 miker
|
||||
* Replace vewords with yacc-based boolean search.
|
||||
*
|
||||
* Revision 2.7 1996/02/01 16:26:06 miker
|
||||
* AUSAPI_VERSION 2.1.11, DtSearch 0.3:
|
||||
* Changed parsers to use character reading cofunctions.
|
||||
*
|
||||
* Revision 2.6 1995/12/27 15:51:36 miker
|
||||
* Version 2.1.10: First GA release of AusBuild.
|
||||
*
|
||||
* Revision 2.5 1995/12/07 23:24:38 miker
|
||||
* Version 2.1.9e: Freezing AusBuild version with
|
||||
* everything except multiple source files dialog box.
|
||||
*
|
||||
* Revision 2.4 1995/10/25 22:29:29 miker
|
||||
* Added prolog.
|
||||
*
|
||||
* Revision 2.3 1995/10/19 19:07:42 miker
|
||||
* Changed AUSAPI_VERSION to 2.1.9 (but not yet released).
|
||||
*
|
||||
* Revision 2.2 1995/10/03 21:36:13 miker
|
||||
* Added 'const' to strdup prototype for greater portability.
|
||||
*
|
||||
* Revision 2.1 1995/09/22 22:39:41 miker
|
||||
* Freeze DtSearch 0.1, AusText 2.1.8
|
||||
*
|
||||
* Revision 1.3 1995/09/19 21:38:59 miker
|
||||
* Removed debugging #defines.
|
||||
*/
|
||||
#include "Search.h" /* the "public" header file */
|
||||
#include <nl_types.h> /* for nl_catd below and all cat...() funcs */
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
#define AUSAPI_VERSION "2.1.13"
|
||||
/* Format: "v.r.m", where v,r,m are integer substrings
|
||||
* meaning version, revision, and mod respectively.
|
||||
* Complete new version austomatically sets revision=1, mod=0.
|
||||
* New revision within a version just sets mod=0.
|
||||
* When mod=0, full string may be abbreviated to "v.r".
|
||||
* Full string will contain no whitespace.
|
||||
* AUSAPI_VERSION is compared to current versions of database
|
||||
* schemas and client/server protocols by ausapi_init().
|
||||
* By convention, AusText programs display AUSAPI_VERSION
|
||||
* at the top of the main gui window and in usage statements.
|
||||
*/
|
||||
#define SCHEMA_VERSION "2.0"
|
||||
/* Identifies when schema last changed.
|
||||
* Same format as AUSAPI_VERSION, except only "v.r" substring used.
|
||||
* To ensure compatibility, database programs must have v.r integers
|
||||
* within the range between SCHEMA_VERSION and AUSAPI_VERSION.
|
||||
* The 3rd integer, the 'mod' number, never matters.
|
||||
*/
|
||||
#define PROTOCOL_VERSION "2.1"
|
||||
/* Identifies when protocol between ui and engine/ausapi
|
||||
* last changed. Typical changes would be changes to major
|
||||
* structures like usrblk, dblk, and socblk, or changes to
|
||||
* the arguments for either ausapi or Opera_Engine calls.
|
||||
* Only meaningful for client/server systems.
|
||||
* Same format as AUSAPI_VERSION, except only "v.r" substring used.
|
||||
* To ensure compatibility, clients must have v.r integers
|
||||
* within the range between PROTOCOL_VERSION and AUSAPI_VERSION
|
||||
* of the engine. The 3rd integer, the 'mod' number, never matters.
|
||||
*/
|
||||
|
||||
/*------------- #define Compiler and related #defines ------------------
|
||||
* #define TURBO_COMPILER...
|
||||
* #define PS2AIX_COMPILER...
|
||||
* #define AIX370_COMPILER...
|
||||
* #define HP_COMPILER...
|
||||
* #define _AIX...
|
||||
* ... define one of the above at top of Search.h to provide
|
||||
* structures and functions that are compiler dependent.
|
||||
* Since the compiler definition must precede all other headers,
|
||||
* the #include for Search.h must be the first statement of all source
|
||||
* files.
|
||||
*
|
||||
* UCHAR corrects for compilers whose default char is signed.
|
||||
*/
|
||||
#define UCHAR unsigned char
|
||||
#ifdef TURBO_COMPILER
|
||||
#define LINT_ARGS /* establishes strong prototyping in vista */
|
||||
#define ANSI /* allow multiple databases in vista */
|
||||
|
||||
#else
|
||||
#define SINGLE_USER /* eliminate vista lockmgr */
|
||||
#define UNIX /* used in vista.h and elsewhere */
|
||||
#endif
|
||||
|
||||
#ifdef HP_COMPILER
|
||||
#define _INCLUDE_HPUX_SOURCE
|
||||
#define _INCLUDE_POSIX_SOURCE
|
||||
#define _INCLUDE_XOPEN_SOURCE
|
||||
#endif
|
||||
|
||||
|
||||
/*----------------------- AUSTEXT.H ---------------------
|
||||
* DBMS record/key structure and constant declarations.
|
||||
* These represent the database schema formerly in austext.h
|
||||
* and derived from austext.sch.
|
||||
*/
|
||||
typedef struct or_dbrec {
|
||||
DtSrUINT32 or_dbflags;
|
||||
DtSrUINT32 or_dbuflags;
|
||||
DtSrINT32 or_reccount;
|
||||
DtSrINT32 or_maxdba;
|
||||
DtSrINT32 or_availd99;
|
||||
DtSrINT32 or_unavaild99;
|
||||
DtSrINT32 or_hufid;
|
||||
DtSrINT32 or_dbsecmask;
|
||||
char or_version[8];
|
||||
char or_dbfill[50];
|
||||
DtSrINT16 or_dbotype;
|
||||
DtSrINT16 or_compflags;
|
||||
DtSrINT16 or_dbaccess;
|
||||
DtSrINT16 or_minwordsz;
|
||||
DtSrINT16 or_maxwordsz;
|
||||
DtSrINT16 or_recslots;
|
||||
DtSrINT16 or_fzkeysz;
|
||||
DtSrINT16 or_abstrsz;
|
||||
DtSrINT16 or_language;
|
||||
} DBREC;
|
||||
|
||||
struct or_dbmiscrec {
|
||||
DtSrINT16 or_dbmisctype;
|
||||
char or_dbmisc[1][106];
|
||||
};
|
||||
struct or_objrec {
|
||||
DtSrUINT32 or_objflags;
|
||||
DtSrUINT32 or_objuflags;
|
||||
DtSrINT32 or_objsize;
|
||||
DtSrINT32 or_objdate;
|
||||
DtSrINT32 or_objsecmask;
|
||||
char or_objkey[32];
|
||||
char or_objfill[34];
|
||||
DtSrINT16 or_objaccess;
|
||||
DtSrINT16 or_objtype;
|
||||
DtSrINT16 or_objcost;
|
||||
DtSrINT16 or_objhdroffset;
|
||||
DtSrINT16 or_objeureka;
|
||||
};
|
||||
struct or_miscrec {
|
||||
DtSrINT16 or_misctype;
|
||||
char or_misc[1][105];
|
||||
};
|
||||
struct or_blobrec {
|
||||
DtSrINT16 or_bloblen;
|
||||
char or_blob[234][1];
|
||||
};
|
||||
struct or_swordrec {
|
||||
char or_swordkey[16];
|
||||
DtSrINT32 or_swoffset;
|
||||
DtSrINT32 or_swfree;
|
||||
DtSrINT32 or_swaddrs;
|
||||
};
|
||||
struct or_lwordrec {
|
||||
char or_lwordkey[40];
|
||||
DtSrINT32 or_lwoffset;
|
||||
DtSrINT32 or_lwfree;
|
||||
DtSrINT32 or_lwaddrs;
|
||||
};
|
||||
struct or_hwordrec {
|
||||
char or_hwordkey[134];
|
||||
DtSrINT32 or_hwoffset;
|
||||
DtSrINT32 or_hwfree;
|
||||
DtSrINT32 or_hwaddrs;
|
||||
};
|
||||
|
||||
/* File Id Constants */
|
||||
#define OR_D00 0
|
||||
#define OR_D01 1
|
||||
#define OR_D21 2
|
||||
#define OR_D22 3
|
||||
#define OR_D23 4
|
||||
#define OR_K00 5
|
||||
#define OR_K01 6
|
||||
#define OR_K21 7
|
||||
#define OR_K22 8
|
||||
#define OR_K23 9
|
||||
|
||||
/* Record Name Constants */
|
||||
#define OR_DBREC 10000
|
||||
#define OR_DBMISCREC 10001
|
||||
#define OR_OBJREC 10002
|
||||
#define OR_MISCREC 10003
|
||||
#define OR_BLOBREC 10004
|
||||
#define OR_SWORDREC 10005
|
||||
#define OR_LWORDREC 10006
|
||||
#define OR_HWORDREC 10007
|
||||
|
||||
/* Field Name Constants */
|
||||
#define OR_DBFLAGS 0L
|
||||
#define OR_DBUFLAGS 1L
|
||||
#define OR_RECCOUNT 2L
|
||||
#define OR_MAXDBA 3L
|
||||
#define OR_AVAILD99 4L
|
||||
#define OR_UNAVAILD99 5L
|
||||
#define OR_HUFID 6L
|
||||
#define OR_DBSECMASK 7L
|
||||
#define OR_VERSION 8L
|
||||
#define OR_DBFILL 9L
|
||||
#define OR_DBOTYPE 10L
|
||||
#define OR_COMPFLAGS 11L
|
||||
#define OR_DBACCESS 12L
|
||||
#define OR_MINWORDSZ 13L
|
||||
#define OR_MAXWORDSZ 14L
|
||||
#define OR_RECSLOTS 15L
|
||||
#define OR_FZKEYSZ 16L
|
||||
#define OR_ABSTRSZ 17L
|
||||
#define OR_LANGUAGE 18L
|
||||
#define OR_DBMISCTYPE 1000L
|
||||
#define OR_DBMISC 1001L
|
||||
#define OR_OBJFLAGS 2000L
|
||||
#define OR_OBJUFLAGS 2001L
|
||||
#define OR_OBJSIZE 2002L
|
||||
#define OR_OBJDATE 2003L
|
||||
#define OR_OBJSECMASK 2004L
|
||||
#define OR_OBJKEY 2005L
|
||||
#define OR_OBJFILL 2006L
|
||||
#define OR_OBJACCESS 2007L
|
||||
#define OR_OBJTYPE 2008L
|
||||
#define OR_OBJCOST 2009L
|
||||
#define OR_OBJHDROFFSET 2010L
|
||||
#define OR_OBJEUREKA 2011L
|
||||
#define OR_MISCTYPE 3000L
|
||||
#define OR_MISC 3001L
|
||||
#define OR_BLOBLEN 4000L
|
||||
#define OR_BLOB 4001L
|
||||
#define OR_SWORDKEY 5000L
|
||||
#define OR_SWOFFSET 5001L
|
||||
#define OR_SWFREE 5002L
|
||||
#define OR_SWADDRS 5003L
|
||||
#define OR_LWORDKEY 6000L
|
||||
#define OR_LWOFFSET 6001L
|
||||
#define OR_LWFREE 6002L
|
||||
#define OR_LWADDRS 6003L
|
||||
#define OR_HWORDKEY 7000L
|
||||
#define OR_HWOFFSET 7001L
|
||||
#define OR_HWFREE 7002L
|
||||
#define OR_HWADDRS 7003L
|
||||
|
||||
/* Set Name Constants */
|
||||
#define OR_DB_MISCS 20000
|
||||
#define OR_OBJ_BLOBS 20001
|
||||
#define OR_OBJ_MISCS 20002
|
||||
/*----------------------- end AUSTEXT.H ---------------------*/
|
||||
|
||||
|
||||
|
||||
/*------------- DMACROS.H -------------------
|
||||
* The following were formerly in dmacros.h.
|
||||
* They provide macro enhancements to the
|
||||
* DBMS function prototypes in vista.h.
|
||||
* Each DBMS function is coded in a macro which includes
|
||||
* a location string (usually module name + line number).
|
||||
* The location string is printed whenever there is
|
||||
* a user or system failure.
|
||||
* Warning: These should not be coded naked within 'if-else' statements
|
||||
* because the 'if' in the macros will interfere with the outside else.
|
||||
*/
|
||||
#define CMSTAT(s,a,b) if(d_cmstat(a,b) < S_OKAY) vista_abort(s)
|
||||
#define CMTYPE(s,a,b,c) if(d_cmtype(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define CONNECT(s,a,b) if(d_connect(a,b) < S_OKAY) vista_abort(s)
|
||||
#define COSTAT(s,a,b) if(d_costat(a,b) < S_OKAY) vista_abort(s)
|
||||
#define COTYPE(s,a,b,c) if(d_cotype(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define CRGET(s,a,b) if(d_crget(a,b) < S_OKAY) vista_abort(s)
|
||||
#define CRREAD(s,a,b,c) if(d_crread(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define CRSET(s,a,b) if(d_crset(a,b) < S_OKAY) vista_abort(s)
|
||||
#define CRSTAT(s,a) if(d_crstat(a) < S_OKAY) vista_abort(s)
|
||||
#define CRTYPE(s,a,b) if(d_crtype(a,b) < S_OKAY) vista_abort(s)
|
||||
#define CRWRITE(s,a,b,c) if(d_crwrite(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define CSMGET(s,a,b,c) if(d_csmget(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define CSMREAD(s,a,b,c,d) if(d_csmread(a,b,c,d) < S_OKAY) vista_abort(s)
|
||||
#define CSMSET(s,a,b,c) if(d_csmset(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define CSMWRITE(s,a,b,c,d) if(d_csmwrite(a,b,c,d) < S_OKAY) vista_abort(s)
|
||||
#define CSOGET(s,a,b,c) if(d_csoget(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define CSOREAD(s,a,b,c,d) if(d_csoread(a,b,c,d) < S_OKAY) vista_abort(s)
|
||||
#define CSOSET(s,a,b,c) if(d_csoset(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define CSOWRITE(s,a,b,c,d) if(d_csowrite(a,b,c,d) < S_OKAY) vista_abort(s)
|
||||
#define CSSTAT(s,a,b) if(d_csstat(a,b) < S_OKAY) vista_abort(s)
|
||||
#define CTBPATH(s,a) if(d_ctbpath(a) < S_OKAY) vista_abort(s)
|
||||
#define CTSCM(s,a,b,c) if(d_ctscm(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define CTSCO(s,a,b,c) if(d_ctsco(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define CTSCR(s,a,b) if(d_ctscr(a,b) < S_OKAY) vista_abort(s)
|
||||
#define DBDPATH(s,a) if(d_dbdpath(a) < S_OKAY) vista_abort(s)
|
||||
#define DBFPATH(s,a) if(d_dbfpath(a) < S_OKAY) vista_abort(s)
|
||||
#define DBLOG(s,a) if(d_dblog(a) < S_OKAY) vista_abort(s)
|
||||
#define DBTAF(s,a) if(d_dbtaf(a) < S_OKAY) vista_abort(s)
|
||||
#define DBUSERID(s,a) if(d_dbuserid(a) < S_OKAY) vista_abort(s)
|
||||
#define DECODE_DBA(s,a,b,c) if(d_decode_dba(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define DELETE(s,a) if(d_delete(a) < S_OKAY) vista_abort(s)
|
||||
#define DESTROY(s,a) if(d_desoy(a) < S_OKAY) vista_abort(s)
|
||||
#define DISCON(s,a,b) if(d_discon(a,b) < S_OKAY) vista_abort(s)
|
||||
#define DISDEL(s,a) if(d_disdel(a) < S_OKAY) vista_abort(s)
|
||||
#define ENCODE_DBA(s,a,b,c) if(d_encode_dba(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define FILLNEW(s,a,b,c) if(d_fillnew(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define FINDCO(s,a,b) if(d_findco(a,b) < S_OKAY) vista_abort(s)
|
||||
#define FINDFM(s,a,b) if(d_findfm(a,b) < S_OKAY) vista_abort(s)
|
||||
#define FINDLM(s,a,b) if(d_findlm(a,b) < S_OKAY) vista_abort(s)
|
||||
#define FINDNM(s,a,b) if(d_findnm(a,b) < S_OKAY) vista_abort(s)
|
||||
#define FINDPM(s,a,b) if(d_findpm(a,b) < S_OKAY) vista_abort(s)
|
||||
#define FREEALL(s) if(d_freeall() < S_OKAY) vista_abort(s)
|
||||
#define GTSCM(s,a,b,c) if(d_gtscm(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define GTSCO(s,a,b,c) if(d_gtsco(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define GTSCR(s,a,b) if(d_gtscr(a,b) < S_OKAY) vista_abort(s)
|
||||
#define GTSCS(s,a,b,c) if(d_gtscs(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define INITFILE(s,a,b) if(d_initfile(a,b) < S_OKAY) vista_abort(s)
|
||||
#define INITIALIZE(s,a) if(d_initialize(a) < S_OKAY) vista_abort(s)
|
||||
#define ISMEMBER(s,a,b) if(d_ismember(a,b) < S_OKAY) vista_abort(s)
|
||||
#define ISOWNER(s,a,b) if(d_isowner(a,b) < S_OKAY) vista_abort(s)
|
||||
#define KEYDEL(s,a,b) if(d_keydel(a,b) < S_OKAY) vista_abort(s)
|
||||
#define KEYEXIST(s,a,b) if(d_keyexist(a,b) < S_OKAY) vista_abort(s)
|
||||
#define KEYFIND(s,a,b,c) if(d_keyfind(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define KEYFREE(s,a,b) if(d_keyfree(a,b) < S_OKAY) vista_abort(s)
|
||||
#define KEYFRST(s,a,b) if(d_keyfrst(a,b) < S_OKAY) vista_abort(s)
|
||||
#define KEYLAST(s,a,b) if(d_keylast(a,b) < S_OKAY) vista_abort(s)
|
||||
#define KEYLOCK(s,a,b,c) if(d_keylock(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define KEYLSTAT(s,a,b,c) if(d_keylstat(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define KEYNEXT(s,a,b) if(d_keynext(a,b) < S_OKAY) vista_abort(s)
|
||||
#define KEYPREV(s,a,b) if(d_keyprev(a,b) < S_OKAY) vista_abort(s)
|
||||
#define KEYREAD(s,a) if(d_keyread(a) < S_OKAY) vista_abort(s)
|
||||
#define KEYSTORE(s,a,b) if(d_keystore(a,b) < S_OKAY) vista_abort(s)
|
||||
#define LOCK(s,a,b,c) if(d_lock(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define MAKENEW(s,a,b) if(d_makenew(a,b) < S_OKAY) vista_abort(s)
|
||||
#define MAPCHAR(s,a,b,c,d) if(d_mapchar(a,b,c,d) < S_OKAY) vista_abort(s)
|
||||
#define MEMBERS(s,a,b,c) if(d_members(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define OFF_OPT(s,a) if(d_off_opt(a) < S_OKAY) vista_abort(s)
|
||||
#define ON_OPT(s,a) if(d_on_opt(a) < S_OKAY) vista_abort(s)
|
||||
#define OPEN(s,a,b) if(d_open(a,b) < S_OKAY) vista_abort(s)
|
||||
#define RDCURR(s,a,b) if(d_rdcurr(a,b) < S_OKAY) vista_abort(s)
|
||||
#define RECFREE(s,a,b) if(d_recfree(a,b) < S_OKAY) vista_abort(s)
|
||||
#define RECFRST(s,a,b) if(d_recfrst(a,b) < S_OKAY) vista_abort(s)
|
||||
#define RECLAST(s,a,b) if(d_reclast(a,b) < S_OKAY) vista_abort(s)
|
||||
#define RECLOCK(s,a,b,c) if(d_reclock(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define RECLSTAT(s,a,b,c) if(d_reclstat(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define RECNEXT(s,a) if(d_recnext(a) < S_OKAY) vista_abort(s)
|
||||
#define RECOVER(s,a) if(d_recover(a) < S_OKAY) vista_abort(s)
|
||||
#define RECPREV(s,a) if(d_recprev(a) < S_OKAY) vista_abort(s)
|
||||
#define RECREAD(s,a,b) if(d_recread(a,b) < S_OKAY) vista_abort(s)
|
||||
#define RECSET(s,a,b) if(d_recset(a,b) < S_OKAY) vista_abort(s)
|
||||
#define RECSTAT(s,a,b,c) if(d_recstat(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define RECWRITE(s,a,b) if(d_recwrite(a,b) < S_OKAY) vista_abort(s)
|
||||
#define RENFILE(s,a,b,c) if(d_renfile(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define RLBCLR(s,a) if(d_rlbclr(a) < S_OKAY) vista_abort(s)
|
||||
#define RLBSET(s,a) if(d_rlbset(a) < S_OKAY) vista_abort(s)
|
||||
#define RLBTST(s,a) if(d_rlbtst(a) < S_OKAY) vista_abort(s)
|
||||
#define SETDB(s,a) if(d_setdb(a) < S_OKAY) vista_abort(s)
|
||||
#define SETFILES(s,a) if(d_setfiles(a) < S_OKAY) vista_abort(s)
|
||||
#define SETFREE(s,a,b) if(d_setfree(a,b) < S_OKAY) vista_abort(s)
|
||||
#define SETLOCK(s,a,b,c) if(d_setlock(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define SETLSTAT(s,a,b,c) if(d_setlstat(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define SETMM(s,a,b,c) if(d_setmm(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define SETMO(s,a,b,c) if(d_setmo(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define SETMR(s,a,b) if(d_setmr(a,b) < S_OKAY) vista_abort(s)
|
||||
#define SETOM(s,a,b,c) if(d_setom(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define SETOO(s,a,b,c) if(d_setoo(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define SETOR(s,a,b) if(d_setor(a,b) < S_OKAY) vista_abort(s)
|
||||
#define SETPAGES(s,a,b) if(d_setpages(a,b) < S_OKAY) vista_abort(s)
|
||||
#define SETRM(s,a,b) if(d_setrm(a,b) < S_OKAY) vista_abort(s)
|
||||
#define SETRO(s,a,b) if(d_setro(a,b) < S_OKAY) vista_abort(s)
|
||||
#define STSCM(s,a,b,c) if(d_stscm(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define STSCO(s,a,b,c) if(d_stsco(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define STSCR(s,a,b) if(d_stscr(a,b) < S_OKAY) vista_abort(s)
|
||||
#define STSCS(s,a,b,c) if(d_stscs(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define TIMEOUT(s,a) if(d_timeout(a) < S_OKAY) vista_abort(s)
|
||||
#define TRABORT(s) if(d_trabort() < S_OKAY) vista_abort(s)
|
||||
#define TRBEGIN(s,a) if(d_trbegin(a) < S_OKAY) vista_abort(s)
|
||||
#define TREND(s) if(d_trend() < S_OKAY) vista_abort(s)
|
||||
#define UTSCM(s,a,b,c) if(d_utscm(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define UTSCO(s,a,b,c) if(d_utsco(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define UTSCR(s,a,b) if(d_utscr(a,b) < S_OKAY) vista_abort(s)
|
||||
#define UTSCS(s,a,b,c) if(d_utscs(a,b,c) < S_OKAY) vista_abort(s)
|
||||
#define WRCURR(s,a) if(d_wrcurr(a) < S_OKAY) vista_abort(s)
|
||||
/*------------- end DMACROS.H -------------------*/
|
||||
|
||||
|
||||
/*------------- COMPILER DEPENDENT CONSTANTS -------------------*/
|
||||
#ifdef TURBO_COMPILER
|
||||
#define FNAME_NULL "nul"
|
||||
#define LOCAL_SLASH 92 /* ascii back slash char (\) */
|
||||
#endif
|
||||
|
||||
#ifdef UNIX
|
||||
#define FNAME_NULL "/dev/null"
|
||||
#define LOCAL_SLASH 47 /* ascii forward slash char (/) */
|
||||
#endif
|
||||
|
||||
/*------------ COMPILER INDEPENDENT CONSTANTS -------------------*/
|
||||
|
||||
#define CACHE_SIZE 64 /* used in vista d_setpages() function */
|
||||
#define COMMENT_CHARS "#*$!\n" /* identify comment lines in AusText files */
|
||||
#define CTRL_Z 26
|
||||
#define DIT_FINDSTR 1L /* DITTO.flags: retained aft FINDSTR srch */
|
||||
#define DIT_STOP 2L /* DITTO.flags: node where user pushed stop */
|
||||
#define END_RETAIN_PAGE 11 /* VT = marks end of RETAIN page */
|
||||
/***#define END_RETAIN_REC '\f'****/
|
||||
#define EXT_CHARTYPE ".chr" /* user definable wildcards (from LOADCHR) */
|
||||
#define EXT_CANDI ".can" /* candidate dictionary words format */
|
||||
#define EXT_CONFIG ".ocf" /* standard opera configuration file */
|
||||
#define EXT_DTBS ".d99" /* inverted index file for dbase addrs */
|
||||
#define EXT_FZKEY ".fzk" /* output of all opera text anal pgms */
|
||||
#define EXT_HANDEL ".han" /* standard handel profile file format */
|
||||
#define EXT_HUFFCODE ".huf" /* huffman encode tree (from HUFFCODE) */
|
||||
#define EXT_HDECODE ".c" /* huffman decode tree (from HUFFCODE) */
|
||||
#define EXT_INCLIST ".inc" /* "include" list file name extension */
|
||||
#define EXT_LIST ".lst" /* standard wordlist format: 1 word/line */
|
||||
#define EXT_SCHEMA ".sch" /* vista database schema format */
|
||||
#define EXT_STOPLIST ".stp" /* standard stop list format */
|
||||
#define EXT_SURVEY ".sur" /* standard survey file format */
|
||||
#define EXT_TEMP ".tmp" /* any kind of temporary file */
|
||||
#define EXT_TEXT ".txt" /* freeform ascii text format */
|
||||
#define EXT_USRNOTES ".not" /* user notes flatfile format */
|
||||
#define ETXDELIM "\f\n" /* default end-of-text (ETX) delim str */
|
||||
#define FNAME_AUDIT "opaudit.lst"
|
||||
#define FNAME_AUSCAT "austools.cat" /* Austools msgs catalog */
|
||||
#define FNAME_AUSTEXT_TUTORIAL "austext.tut"
|
||||
#define FNAME_CONFIRM_LIST "todscrd.lst" /* Shankar/Tomita files */
|
||||
#define FNAME_DISCARD_DATA "shdscrd.lst" /* OEF_discard */
|
||||
#define FNAME_DTSRCAT "dtsearch" /* DtSearch msgs catalog */
|
||||
#define FNAME_HUFFCODE_TAB "ophuf.huf" /* huffman encode table */
|
||||
#define FNAME_MUIRES "mui.res" /* motif class resources file */
|
||||
#define FNAME_NOTES_BAC "usrnotes.not"
|
||||
#define FNAME_NOTES_SEM "usrnotes.sem"
|
||||
#define FNAME_ORIGSTOP "orig.stp"
|
||||
#define FNAME_README "readme.txt"
|
||||
#define FNAME_SITECONFIG "dtsearch.ocf"
|
||||
#define FNAME_SITENEWS "sitenews.txt"
|
||||
#define MINWIDTH_TOKEN 2 /* default smallest word/stem allowed */
|
||||
#define MAX_BMHTAB 256 /* max alphabet size in bmstrstr tables */
|
||||
#define MAX_ETXDELIM 100 /* max size of ETX delim string */
|
||||
#define MAX_KTCOUNT 64 /* max number of keytypes */
|
||||
#define MAXWIDTH_LWORD 40 /* = sizeof(or_lwordrec.or_lwordkey) */
|
||||
#define MAXWIDTH_SWORD 16 /* = sizeof(or_swordrec.or_swordkey) */
|
||||
#define NULLDATESTR "0/0/0~0:0"
|
||||
#define NUM_HOLES 256 /* array size for defragmentation */
|
||||
#define OBJDATESTR "%02d/%02d/%02d~%02d:%02d"
|
||||
#define PRODNAME "DtSearch"
|
||||
#define PWDMASKSZ 20
|
||||
#define SCREEN_WIDTH 80 /* max len text line in online OPERA pgms */
|
||||
#define STEM_CH 15 /* Ctrl-O stemmed word prefix character */
|
||||
|
||||
/*--------------- BYTE SWAP DECLARATIONS ------------
|
||||
* The default database record format is the data ordering
|
||||
* for big endian machines (most significant byte first),
|
||||
* also known as "network" order. For non big_endian platforms,
|
||||
* all compiles should include the BYTE_SWAP define.
|
||||
* SWABDIR is direction of io to indicate correct byte swap function.
|
||||
* HTON is host to network, internal memory to external database file.
|
||||
* NTOH is network to host, file to memory.
|
||||
* Actual host_to_network functions defined in <netinit/in.h>
|
||||
* which is not yet standardized.
|
||||
*/
|
||||
typedef enum {HTON=1, NTOH} SWABDIR;
|
||||
|
||||
extern void swab_dbrec (struct or_dbrec *rec, SWABDIR direction);
|
||||
extern void swab_objrec (struct or_objrec *rec, SWABDIR direction);
|
||||
|
||||
#ifdef BYTE_SWAP /* ie (BYTE_ORDER != BIG_ENDIAN) */
|
||||
|
||||
#define HTONL(x) x = htonl(x)
|
||||
#define HTONS(x) x = htons(x)
|
||||
#define NTOHL(x) x = ntohl(x)
|
||||
#define NTOHS(x) x = ntohs(x)
|
||||
|
||||
#else /* !BYTE_SWAP, ie (BYTE_ORDER == BIG_ENDIAN) */
|
||||
|
||||
#define HTONL(x)
|
||||
#define HTONS(x)
|
||||
#define NTOHL(x)
|
||||
#define NTOHS(x)
|
||||
|
||||
#endif /* BYTE_SWAP */
|
||||
|
||||
|
||||
/*--------------- TESKEY PARSE CHARACTER TYPES ------------
|
||||
* Used in langmap.c for linguistic parsing modules.
|
||||
* Low order byte reserved for uppercase image of character
|
||||
* as locale independent replacement for toupper() and strupr().
|
||||
*/
|
||||
#define CONCORDABLE 0x4000 /* alpha, numeric: inside word */
|
||||
#define OPT_CONCORD 0x2000 /* "./-": maybe inside word, maybe outside */
|
||||
#define NON_CONCORD 0x1000 /* space, punctuation, etc: outside word */
|
||||
|
||||
#define VOWEL 0x0800 /* concordable subtype: aeiou */
|
||||
#define CONSONANT 0x0400 /* concordable subtype: all alpha - vowels */
|
||||
#define NUMERAL 0x0200 /* concordable subtype: 0-9 */
|
||||
#define WHITESPACE 0x0100 /* locale indep replacement for isspace() */
|
||||
|
||||
|
||||
/*--------------- SCHEMA CONSTANTS ----------------
|
||||
* Associated with fields in database schema (austext.h)
|
||||
* and in DITTO structures.
|
||||
* Values 20000 - 29999 reserved for custom user applic in all cardinal ints.
|
||||
* ORA_ retrieval access location cardinal integers in or_access.
|
||||
* ORC_ compression id bit switches in or_compflags.
|
||||
* ORD_ bit switches in or_dbflags.
|
||||
* (ORO_ bit switches in or_objflags
|
||||
* renamed to DtSrFlxxx and moved to Search.h)
|
||||
* ORM_ type cardinal integers in or_misctype.
|
||||
* (ORT_ object type (or_objtype, or_dbotype, DITTO)
|
||||
* renamed to DtSrObj... and moved to Search.h)
|
||||
* (ORL_ language id cardinal integers in or_language
|
||||
* renamed to DtSrLa... and moved to Search.h)
|
||||
*/
|
||||
#define ORA_VARIES 0 /* object accessibility unspec at curr lvl */
|
||||
#define ORA_NOTAVAIL 1 /* obj not directly accessible from engine */
|
||||
#define ORA_BLOB 2 /* obj stored in blob recs */
|
||||
#define ORA_REFBLOB 3 /* svr ref (filename of object) in blob */
|
||||
#define ORA_REFKEY 4 /* svr ref in or_objkey */
|
||||
#define ORA_REFHUGEKEY 5 /* svr ref in 'huge' key (misc) rec */
|
||||
#define ORA_REFABSTR 6 /* svr ref in abstract (misc rec) */
|
||||
#define ORA_CREFBLOB 13 /* clt ref (filename of object) in blob */
|
||||
#define ORA_CREFKEY 14 /* clt ref in or_objkey */
|
||||
#define ORA_CREFABSTR 16 /* clt ref in abstract (misc rec) */
|
||||
|
||||
#define ORC_COMPBLOB (1<<0) /* blobs are compressed */
|
||||
#define ORC_COMPABSTR (1<<1) /* abstracts are compressed */
|
||||
|
||||
#define ORD_XWORDS (1L<<0) /* inverted index includes exact words */
|
||||
#define ORD_XSTEMS (1L<<1) /* inverted index includes word stems */
|
||||
#define ORD_USEHUGEKEYS (1L<<4) /* all direct user access via huge keys */
|
||||
#define ORD_NOMARKDEL (1L<<8) /* permanently disables mark-for-deletion */
|
||||
#define ORD_NONOTES (1L<<9) /* permanently disables user notes */
|
||||
#define ORD_WIDECHAR (1L<<10) /* text is multibyte or wide chars */
|
||||
|
||||
#define ORO_DELETE (1L<<0) /* obj is marked for deletion */
|
||||
#define ORO_OLDNOTES (1L<<1) /* obj has old style usernotes in misc rec */
|
||||
|
||||
#define ORM_FZKABS 1 /* fzkey[fzkeysz] + abstract[abstrsz] */
|
||||
#define ORM_HUGEKEY 2 /* optional 'huge' key */
|
||||
#define ORM_OLDNOTES 3 /* old style user notes */
|
||||
#define ORM_KEYTYPE 4 /* database keytype rec (KEYTYPE struct) */
|
||||
|
||||
/*------------------------- MACROS ---------------------------*/
|
||||
/* (Use offsetof() in stddef.h to replace my old OFFSET macro) */
|
||||
#define NULLORSTR(str) ((str)?str:catgets(dtsearch_catd,1,1,"<null>"))
|
||||
#define NUMARRAY(arr) ((sizeof(arr) / sizeof(arr[0])))
|
||||
|
||||
/****************************************/
|
||||
/* */
|
||||
/* LLIST */
|
||||
/* */
|
||||
/****************************************/
|
||||
typedef struct llist_tag {
|
||||
struct llist_tag *link;
|
||||
void *data;
|
||||
} LLIST;
|
||||
|
||||
/****************************************/
|
||||
/* */
|
||||
/* FREE_SPACE_STR */
|
||||
/* */
|
||||
/****************************************/
|
||||
/* 'holes' structure used for dynamic defragmentation */
|
||||
typedef struct holes_str {
|
||||
DtSrINT32 hole_size;
|
||||
DtSrINT32 offset;
|
||||
} FREE_SPACE_STR;
|
||||
|
||||
/****************************************/
|
||||
/* */
|
||||
/* FILE_HEADER */
|
||||
/* */
|
||||
/****************************************/
|
||||
/* 'holes' structure used for dynamic defragmentation */
|
||||
typedef struct fl_head {
|
||||
DtSrINT32 hole_count [2];
|
||||
FREE_SPACE_STR hole_array [2] [NUM_HOLES];
|
||||
} FILE_HEADER;
|
||||
|
||||
/****************************************/
|
||||
/* */
|
||||
/* CMPLL, sort_llist, compare_llist */
|
||||
/* */
|
||||
/****************************************/
|
||||
/* Generic LLIST structure typically used for 'lines' of text,
|
||||
* as in ausapi.msglist and usrblk.msgs, and binary blobs.
|
||||
* See structure typedef below for blob list structure.
|
||||
* LLISTs can be sorted by calling sort_llist().
|
||||
* The compare function is stored in global pointer 'compare_llist'
|
||||
* prior to calling the sort function.
|
||||
*/
|
||||
typedef int (*CMPLL) (LLIST *left, LLIST *right);
|
||||
|
||||
/****************************************/
|
||||
/* */
|
||||
/* READCFP */
|
||||
/* */
|
||||
/****************************************/
|
||||
/* Pointer to a function that takes a void
|
||||
* pointer and returns a C char (1 octet).
|
||||
* Used by linguistic parsers as a character reading cofunction.
|
||||
* When parser is reading from a file stream as in dtsrindex,
|
||||
* usual cofunction is readchar_ftext(). When parser is reading
|
||||
* from a text string as in queries, the usual cofunction
|
||||
* is readchar_string() which just accesses next char in string.
|
||||
*/
|
||||
typedef UCHAR (*READCFP) (void *);
|
||||
|
||||
/********************************************************/
|
||||
/* */
|
||||
/* WORDTREE */
|
||||
/* */
|
||||
/********************************************************/
|
||||
/* A generic structure for creating binary trees of words
|
||||
* from stoplists, include-lists, etc.
|
||||
*/
|
||||
typedef struct _bintree_tag {
|
||||
struct _bintree_tag *rlink; /* ptr to right node */
|
||||
struct _bintree_tag *llink; /* ptr to left node */
|
||||
int len; /* length of word */
|
||||
void *word;
|
||||
} WORDTREE;
|
||||
|
||||
|
||||
/************************************************/
|
||||
/* */
|
||||
/* PARG */
|
||||
/* */
|
||||
/************************************************/
|
||||
/* Single argument for first parser call for a text block */
|
||||
typedef struct {
|
||||
void *dblk; /* dblk is (DBLK *) */
|
||||
FILE *ftext; /* Text file being parsed in dtsrindex */
|
||||
void *string; /* Query or other string being parsed */
|
||||
void *etxdelim; /* End of text (ETX) delimiter string */
|
||||
long *offsetp; /* where parser stores word offset */
|
||||
long flags;
|
||||
#define PA_INDEXING 0x0001 /* parse for indexing purposes (dtsrindex) */
|
||||
#define PA_HILITING 0x0002 /* parse for hiliting purposes */
|
||||
#define PA_MSGS 0x0004 /* explain parse failures with msgs */
|
||||
void *extra; /* reserved for generic use by parsers */
|
||||
} PARG;
|
||||
|
||||
|
||||
/********************************************************/
|
||||
/* */
|
||||
/* DBLK */
|
||||
/* */
|
||||
/********************************************************/
|
||||
/* One element of a linked list of universal information
|
||||
* about all databases accessible,
|
||||
* to an online search engine instance, chained off of
|
||||
* the global OE_dblist. It is also used individually
|
||||
* by offline build tools to store database data.
|
||||
* It contains pointers to linguistic processors and data structures,
|
||||
* data derived from the site configuration file,
|
||||
* data derived and used by the DBMS,
|
||||
* and some fields reflecting recommended initial user choices.
|
||||
* Changes here should also be reflected in initblks.c,
|
||||
* austext.sch, initausd.c, and in oeinit.c.
|
||||
*/
|
||||
typedef struct dblk_tag
|
||||
{
|
||||
struct dblk_tag *link; /* ptr to next dblk in list */
|
||||
char name [11]; /* 1 - 8 char dictionary name */
|
||||
char is_selected; /* bool: initial gui selection status */
|
||||
char *label; /* database description/label string for UI */
|
||||
long flags;
|
||||
char *path; /* where to find all database files */
|
||||
FILE *syofile; /* symptom offset (ranges) d97 file */
|
||||
FILE *syifile; /* symptom index d98 file */
|
||||
void *ranges; /* contents of syofile read into ram */
|
||||
FILE *iifile; /* inverted words index d99 file */
|
||||
time_t iimtime; /* last time d99 was modified */
|
||||
int vistano; /* vista database number */
|
||||
int ktcount; /* number of nodes in keytypes array */
|
||||
DtSrKeytype *keytypes; /* record types in this database */
|
||||
DBREC dbrec; /* copy of database's dbrec record */
|
||||
void *zblk; /* used only for semantic processing */
|
||||
|
||||
/*----- Huffman Compression -----*/
|
||||
time_t hufid; /* tree identification atom */
|
||||
int hufroot; /* index to inverted tree root (array bottom) */
|
||||
int *huftree; /* beginning of huffman tree array */
|
||||
|
||||
/*----- Language Fields -----*/
|
||||
char *fname_stp; /* name of stoplist file */
|
||||
char *fname_inc; /* name of include-list file */
|
||||
char *fname_sfx; /* name of suffixes file */
|
||||
int *charmap; /* parse/stem table for char set */
|
||||
WORDTREE *stoplist; /* root of stoplist tree */
|
||||
WORDTREE *inclist; /* root of include-list tree */
|
||||
char *(*lstrupr) (char *string, struct dblk_tag *dblk);
|
||||
char *(*parser) (PARG *parg);
|
||||
void *parse_extra; /* eg additional word trees */
|
||||
char *(*stemmer) (char *wordin, struct dblk_tag *dblk);
|
||||
long stem_flags; /* stemmer options */
|
||||
void *stem_extra; /* eg suffix tables */
|
||||
void *lang_extra; /* additional language dependent data */
|
||||
long lang_flags; /* language dependent switches */
|
||||
#define LF_DUP_STP 0x0001 /* duplicate stop list */
|
||||
#define LF_DUP_INC 0x0002 /* duplicate include list */
|
||||
#define LF_DUP_SFX 0x0004 /* duplicate suffixes list */
|
||||
|
||||
/*----- User Search Parameters -----*/
|
||||
int maxhits; /* max # hits to be returned from searches */
|
||||
void *resuser; /* reserved for private use by users */
|
||||
} DBLK;
|
||||
|
||||
|
||||
/*------------------------- GLOBALS -------------------------*/
|
||||
/* DtSearchExit (austext_exit) and DtSearchExitUser (austext_exit_user)
|
||||
* are in ausexit.c too but are "public" in DtSearch (defined in Search.h).
|
||||
*/
|
||||
extern char *aa_argv0; /* globals.c */
|
||||
extern int aa_maxhits; /* aajoint.c */
|
||||
extern FILE *aa_stderr; /* globals.c */
|
||||
extern int ascii_charmap[]; /* langmap.c */
|
||||
extern LLIST *ausapi_msglist; /* globals.c */
|
||||
extern void (*austext_exit_first) (int); /* ausexit.c */
|
||||
extern void (*austext_exit_dbms) (int); /* ausexit.c */
|
||||
extern void (*austext_exit_comm) (int); /* ausexit.c */
|
||||
extern void (*austext_exit_endwin) (int); /* ausexit.c */
|
||||
extern void (*austext_exit_mem) (int); /* ausexit.c */
|
||||
extern void (*austext_exit_last) (int); /* ausexit.c */
|
||||
extern void (*austext_exit_user) (int); /* ausexit.c */
|
||||
extern nl_catd austools_catd; /* globals.c */
|
||||
extern CMPLL compare_llist;
|
||||
extern nl_catd dtsearch_catd; /* globals.c */
|
||||
extern unsigned long
|
||||
duprec_hashsize; /* isduprec.c */
|
||||
extern int latin_charmap[]; /* langmap.c */
|
||||
|
||||
|
||||
/*------------------------ FUNCTION PROTOTYPES ------------------------*/
|
||||
extern void add_free_space(FREE_SPACE_STR *del_rec, FILE_HEADER *flh);
|
||||
extern void append_ext (char *buffer, int buflen,
|
||||
char *fname, char *fext);
|
||||
extern int austext_dopen (
|
||||
char *dbname,
|
||||
char *dbpath,
|
||||
char *d2xpath,
|
||||
int cache_size,
|
||||
DBREC *bufptr);
|
||||
extern void *austext_malloc (size_t size, char *location, void *ignored);
|
||||
extern char *bmhcore (
|
||||
UCHAR *text,
|
||||
size_t txtlen,
|
||||
UCHAR *pattern,
|
||||
size_t patlen,
|
||||
size_t *bmhtable);
|
||||
extern void bmhtable_build (
|
||||
UCHAR *pattern,
|
||||
size_t patlen,
|
||||
size_t *bmhtable);
|
||||
extern char *bmstrstr (
|
||||
UCHAR *text,
|
||||
size_t txtlen,
|
||||
UCHAR *pattern,
|
||||
size_t patlen);
|
||||
extern int clean_wrap (char *string, int linelen);
|
||||
extern LLIST *cutnode_llist (LLIST *node, LLIST **llistp);
|
||||
extern void (*dberr_exit)(int exitcode); /* defaults to exit() */
|
||||
extern void delete_whitespace (char *linebuf);
|
||||
extern void discard_to_ETX (PARG *parg);
|
||||
extern int endstroke (int c);
|
||||
extern void put_new_word(struct or_hwordrec *recbuf, int vistano);
|
||||
extern FREE_SPACE_STR
|
||||
*find_free_space (DtSrINT32 req_size, FILE_HEADER *flh);
|
||||
extern void free_llist (LLIST **llhead);
|
||||
extern int fread_d99_header (FILE_HEADER *flh, FILE *fp);
|
||||
extern int fwrite_d99_header (FILE_HEADER *flh, FILE *fp);
|
||||
extern char *get_email_addr (void);
|
||||
extern char *getnews (char *fname, int use_copyr);
|
||||
extern void hc_decode (UCHAR *input_bitstring, UCHAR *output_charbuf,
|
||||
int outbuf_size, time_t encode_id);
|
||||
extern int hc_encode (struct or_blobrec *targ, UCHAR *src,
|
||||
int srclen, int force_flush);
|
||||
extern void init_header (FILE *fp, FILE_HEADER *flh);
|
||||
extern int is_compatible_version (char *callers_vers, char *local_vers);
|
||||
extern int is_concordable (char *word, int *charmap);
|
||||
extern int is_duprec (char *recid);
|
||||
extern int is_objdatestr (char *string, DtSrObjdate *objdptr);
|
||||
extern int is_objdatetm (struct tm *objdatetm);
|
||||
extern void join_llists (LLIST **mainlist, LLIST **sublist);
|
||||
extern char *jpn_parser (PARG *parg);
|
||||
extern int load_custom_language (DBLK *dblk, DBLK *dblist);
|
||||
extern int load_jpn_language (DBLK *dblk, DBLK *dblist);
|
||||
extern int load_language (DBLK *dblk, DBLK *dblist);
|
||||
extern int load_wordtree (
|
||||
WORDTREE **treetop,
|
||||
DBLK *dblk,
|
||||
char *fname,
|
||||
int do_teskey_test);
|
||||
extern char *null_stemmer (char *word, DBLK *dblk);
|
||||
extern char *null_lstrupr (char *string, DBLK *dblk);
|
||||
extern char *objdate2fzkstr (DtSrObjdate objdate);
|
||||
extern struct tm
|
||||
*objdate2tm (DtSrObjdate objdate);
|
||||
extern int objdate_in_range (DtSrObjdate recdate,
|
||||
DtSrObjdate date1, DtSrObjdate date2);
|
||||
extern int offline_kbhit (void);
|
||||
extern int open_dblk (DBLK **dblist, int numpages, int debugging);
|
||||
extern LLIST *pop_llist (LLIST **llistp);
|
||||
extern void print_dbrec (char *dbname, struct or_dbrec *dbrec);
|
||||
extern int quit_escape(void);
|
||||
extern UCHAR readchar_ftext (PARG *parg);
|
||||
extern UCHAR readchar_string (UCHAR *string);
|
||||
extern char *remove_spaces (char *string);
|
||||
extern void replace_ext (char *buffer, int buflen,
|
||||
char *fname, char *fext);
|
||||
extern LLIST *sort_llist (LLIST *list_header);
|
||||
extern char *teskey_parser (PARG *parg);
|
||||
extern DtSrObjdate
|
||||
tm2objdate (struct tm *tmptr);
|
||||
#if !defined(__linux__)
|
||||
#ifndef _ALL_SOURCE
|
||||
extern char *strdup (const char *s);
|
||||
#endif
|
||||
#endif
|
||||
extern void toggle_insert (void);
|
||||
extern void unload_custom_language (DBLK *dblk);
|
||||
extern void unload_language (DBLK *dblk);
|
||||
extern void vista_abort (char *location);
|
||||
extern char *vista_msg (char *location);
|
||||
|
||||
/************************ SearchP.h ********************************/
|
||||
#endif /* _SearchP_h */
|
||||
|
||||
@@ -1,137 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: boolpars.h /main/1 1996/03/29 17:03:47 cde-ibm $
|
||||
*
|
||||
* (c) Copyright 1996 Digital Equipment Corporation.
|
||||
* (c) Copyright 1996 Hewlett-Packard Company.
|
||||
* (c) Copyright 1996 International Business Machines Corp.
|
||||
* (c) Copyright 1996 Sun Microsystems, Inc.
|
||||
* (c) Copyright 1996 Novell, Inc.
|
||||
* (c) Copyright 1996 FUJITSU LIMITED.
|
||||
* (c) Copyright 1996 Hitachi.
|
||||
*/
|
||||
/*
|
||||
* COMPONENT_NAME: austext
|
||||
*
|
||||
* FUNCTIONS: none
|
||||
*
|
||||
* ORIGINS: 27
|
||||
*
|
||||
*
|
||||
* (C) COPYRIGHT International Business Machines Corp. 1996
|
||||
* All Rights Reserved
|
||||
* Licensed Materials - Property of IBM
|
||||
* US Government Users Restricted Rights - Use, duplication or
|
||||
* disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
|
||||
*/
|
||||
#ifndef _boolpars_h
|
||||
#define _boolpars_h
|
||||
/******************** BOOLPARS.H ********************
|
||||
* $Id: boolpars.h /main/1 1996/03/29 17:03:47 cde-ibm $
|
||||
* February 1996.
|
||||
* Header for boolpars.c AusText/DtSearch yacc-based boolean query parser.
|
||||
*
|
||||
* FORMAT OF TRUTH TABLE:
|
||||
* Pointer to TRUTHTAB struct is main yacc stack value.
|
||||
* Represents 256 unsigned chars, every possible permutation of 8 (max)
|
||||
* query stems. The unsigned chars ("permutes") are bit vectors.
|
||||
* Bit #0 (lowest order) is for first word in stemsarray stems[0],
|
||||
* bit #1 is stems[1], etc.
|
||||
* Example: truthtab for query consisting of a single word,
|
||||
* call it 'A' (assigned bit #0), is the 128 chars 1, 3, 5, 7, ...,
|
||||
* ie all bitvector permutations with low order bit turned on.
|
||||
* B: (bit #1) is the 128 chars 2, 3, 6, 7, ..., ie all permutations
|
||||
* with 2nd bit turned on.
|
||||
* A & B: Intersection of truth tables: the 64 chars 3, 7, ...,
|
||||
* all the bit vector permutations they have in common.
|
||||
* A | B: Union of truth tables: the 192 permutes 1,2,3, 5,6,7, 9,10,11...
|
||||
* ~B: Complement of truth table, U - B: the 128 chars 0, 1, 4, 5, ...,
|
||||
* ie every bitvector permutation NOT in B.
|
||||
*
|
||||
* The zero permute (all bits zero) refers to the entire
|
||||
* balance of the database containing none of the query stems.
|
||||
* Needless to say searches with the zero permute in their
|
||||
* truth table will take an incredibly long time!
|
||||
*
|
||||
* The 'universal set' U is all 256 possible permutes.
|
||||
* The 'empty set' is indicated by truthtab.pmsz == 0;
|
||||
*
|
||||
* The permutes in a truth table are maintained in
|
||||
* ascending order for ease of comparisons.
|
||||
*
|
||||
* Truth table manipulations require and depend on
|
||||
* DtSrMAX_STEMCOUNT being defined only as 8.
|
||||
*
|
||||
* Newly allocated truth tables are maintained on the 'ttlist'
|
||||
* using the 'next' field. This is to ensure they are eventually
|
||||
* freed to prevent memory leaks.
|
||||
*
|
||||
* If 'stemno' >= 0 it points to the word in usrblk.stems to which
|
||||
* it applies. Stemno == -1 means truth table is not directly
|
||||
* associated with a word in usrblk.stems.
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.1 1996/03/05 15:52:06 miker
|
||||
* Initial revision
|
||||
*
|
||||
*/
|
||||
|
||||
#define COLLOC_STEM_FORMAT "@%02d%02d%d"
|
||||
|
||||
/****************************************/
|
||||
/* */
|
||||
/* TRUTHTAB */
|
||||
/* */
|
||||
/****************************************/
|
||||
/* Truth table returned from boolean_parse() */
|
||||
typedef struct tttag {
|
||||
struct tttag *next;
|
||||
int stemno; /* -1 means not assoc with stems[] array */
|
||||
int pmsz; /* number of bytes in permutes array */
|
||||
unsigned char *permutes; /* array of bit vector permutations */
|
||||
} TRUTHTAB;
|
||||
|
||||
/****************************************/
|
||||
/* */
|
||||
/* Globals */
|
||||
/* */
|
||||
/****************************************/
|
||||
extern int qry_has_no_NOTs;
|
||||
extern int qry_is_all_ANDs;
|
||||
extern int parser_invalid_wordcount;
|
||||
extern TRUTHTAB final_truthtab;
|
||||
|
||||
/****************************************/
|
||||
/* */
|
||||
/* Function Prototypes */
|
||||
/* */
|
||||
/****************************************/
|
||||
extern void add_syntax_errmsg (int msgno);
|
||||
extern TRUTHTAB *boolyac_AND (TRUTHTAB *tt1, TRUTHTAB *tt2);
|
||||
extern TRUTHTAB *boolyac_COLLOC (TRUTHTAB *tt1, int colval, TRUTHTAB *tt2);
|
||||
extern TRUTHTAB *boolyac_NOT (TRUTHTAB *tt1);
|
||||
extern TRUTHTAB *boolyac_OR (TRUTHTAB *tt1, TRUTHTAB *tt2);
|
||||
extern TRUTHTAB *copy_final_truthtab (TRUTHTAB *tt);
|
||||
|
||||
/******************** BOOLPARS.H *********************/
|
||||
#endif /* _boolpars_h */
|
||||
@@ -1,117 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: dberr.h /main/5 1996/09/23 21:00:53 cde-ibm $ */
|
||||
/*
|
||||
* COMPONENT_NAME: austext
|
||||
*
|
||||
* FUNCTIONS: none
|
||||
*
|
||||
* ORIGINS: 27
|
||||
*
|
||||
* (C) COPYRIGHT International Business Machines Corp. 1995
|
||||
* All Rights Reserved
|
||||
* Licensed Materials - Property of IBM
|
||||
* US Government Users Restricted Rights - Use, duplication or
|
||||
* disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
|
||||
*/
|
||||
/* $Log$
|
||||
* Revision 2.2 1995/10/24 21:37:15 miker
|
||||
* Add prolog.
|
||||
* */
|
||||
/* dberr error/status codes */
|
||||
static char *user_error[] = {
|
||||
"database not opened",
|
||||
"invalid set",
|
||||
"invalid record",
|
||||
"invalid database",
|
||||
"invalid field name",
|
||||
"invalid db_address",
|
||||
"no current record",
|
||||
"set has no current owner",
|
||||
"set has no current member",
|
||||
"key value required",
|
||||
"invalid lock value",
|
||||
"record is owner of non-empty set(s)",
|
||||
"record is member of set(s)",
|
||||
"member already owned",
|
||||
"field is a compound key",
|
||||
"record not connected to set",
|
||||
"field is not a valid key",
|
||||
"record not legal owner of set",
|
||||
"record not legal member of set",
|
||||
"error in d_setpages (database open or bad param)",
|
||||
"incompatible dictionary file",
|
||||
"illegal attempt to delete system record",
|
||||
"illegal attempt to lock locked set/record",
|
||||
"attempt to access unlocked set/record",
|
||||
"transaction id not supplied",
|
||||
"transaction already active",
|
||||
"transaction not active",
|
||||
"transaction cannot begin due to locked files",
|
||||
"cannot free locks within a transaction",
|
||||
"too many changed database pages",
|
||||
"cannot update database outside a transaction",
|
||||
"exclusive access required",
|
||||
"write locks not allowed on static files",
|
||||
"unspecified or duplicate user id",
|
||||
"database, path or file name too long",
|
||||
"invalid file number was passed to d_renfile",
|
||||
"field is not an optional key field",
|
||||
"field is not defined in current record type",
|
||||
"record/field has/in a compound key",
|
||||
"invalid record or set number",
|
||||
"record/set not timestamped",
|
||||
"bad DBUSERID (contains non-alphanumeric)",
|
||||
"NetBIOS has not been installed on machine",
|
||||
"wrong number of elements in DBDPATH",
|
||||
"wrong number of elements in DBFPATH",
|
||||
"no current record type",
|
||||
"invalid country table sort string",
|
||||
"database not closed"
|
||||
};
|
||||
static char *system_error[] = {
|
||||
"no more space on file",
|
||||
"system error",
|
||||
"page fault",
|
||||
"no working file in dio",
|
||||
"unable to allocate sufficient memory",
|
||||
"error opening file",
|
||||
"unable to get access to database taf file",
|
||||
"database taf/log file error",
|
||||
"inconsistent database locks",
|
||||
"file record limit exceeded",
|
||||
"key file inconsistency",
|
||||
"maximum concurrent user limit exceeded",
|
||||
"error seeking in database file",
|
||||
"invalid file specified",
|
||||
"error reading from a database/overflow file",
|
||||
"lock manager synchronization error",
|
||||
"debug check interrupt",
|
||||
"network communications error",
|
||||
"auto-recovery in process",
|
||||
"error writing to a database/overflow file",
|
||||
"no lock manager is installed",
|
||||
"DBUSERID is already being used",
|
||||
"the lock manager is busy"
|
||||
};
|
||||
/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin dberr.h */
|
||||
@@ -1,209 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: dproto.h /main/2 1996/05/09 03:55:20 drk $ */
|
||||
/*----------------------------------------------------------------------------
|
||||
dproto.h: db_VISTA (user) function declaration header file
|
||||
|
||||
(C) Copyright 1988 by Raima Corporation.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/* ********************** EDIT HISTORY *******************************
|
||||
|
||||
SCR DATE INI DESCRIPTION
|
||||
----- --------- --- -----------------------------------------------------
|
||||
571 31-Jan-89 RSC Placed ctbpath inside NO_COUNTRY, not NO_TIMESTAMP
|
||||
*/
|
||||
|
||||
|
||||
int d_setfiles(P1(int)); /* dio.c */
|
||||
int d_setpages(P1(int) Pi(int)); /* dio.c */
|
||||
int d_trbound(P0); /* trlog.c */
|
||||
int d_trlog(P1(int) Pi(int) Pi(CONST char FAR *) Pi(int));
|
||||
/* trlog.c */
|
||||
int d_trmark(P0); /* trlog.c */
|
||||
int d_tron(P0); /* trlog.c */
|
||||
int d_troff(P0); /* trlog.c */
|
||||
int d_decode_dba(P1(DB_ADDR) Pi(int FAR *) Pi(long FAR *));
|
||||
/* dbacode.c */
|
||||
int d_encode_dba(P1(int) Pi(long) Pi(DB_ADDR FAR *));
|
||||
/* dbacode.c */
|
||||
|
||||
#define d_memlock(p) /**/
|
||||
#define d_memlock_group(lg) S_OKAY
|
||||
#define d_memunlock(p) /**/
|
||||
#define d_memunlock_group(lg) /**/
|
||||
char FAR * d_alloc(P1(unsigned)); /* alloc.c */
|
||||
char FAR * d_calloc(P1(unsigned) Pi(unsigned)); /* alloc.c */
|
||||
void d_free(P1(CHAR_P FAR *)); /* alloc.c */
|
||||
|
||||
#ifndef MULTI_TASK /* MULTI_TASK */
|
||||
#define dt_opentask(a) S_OKAY
|
||||
#define dt_closetask(a) S_OKAY
|
||||
|
||||
int d_close(P0); /* dblfcns.c */
|
||||
int d_cmstat(P1(int) DBN_Dn); /* cmstat.c */
|
||||
int d_cmtype(P1(int) Pi(int FAR *) DBN_Dn); /* cmtype.c */
|
||||
int d_connect(P1(int) DBN_Dn); /* connect.c */
|
||||
#ifndef NO_TIMESTAMP /* NO_TIMESTAMP */
|
||||
int d_costat(P1(int) DBN_Dn); /* costat.c */
|
||||
#endif /* NO_TIMESTAMP */
|
||||
int d_cotype(P1(int) Pi(int FAR *) DBN_Dn); /* cotype.c */
|
||||
int d_crget(P1(DB_ADDR FAR *) DBN_Dn); /* crget.c */
|
||||
int d_crread(P1(long) Pi(char FAR *) DBN_Dn); /* crread.c */
|
||||
int d_crset(P1(DB_ADDR FAR *) DBN_Dn); /* crset.c */
|
||||
#ifndef NO_TIMESTAMP /* NO_TIMESTAMP */
|
||||
int d_crstat(P0); /* crstat.c */
|
||||
#endif /* NO_TIMESTAMP */
|
||||
int d_crtype(P1(int FAR *) DBN_Dn); /* crtype.c */
|
||||
int d_crwrite(P1(long) Pi(char FAR *) DBN_Dn); /* crwrite.c */
|
||||
int d_csmget(P1(int) Pi(DB_ADDR FAR *) DBN_Dn); /* csmget.c */
|
||||
int d_csmread(P1(int) Pi(long) Pi(char FAR *) DBN_Dn);
|
||||
/* csmread.c */
|
||||
int d_csmset(P1(int) Pi(DB_ADDR FAR *) DBN_Dn); /* csmset.c */
|
||||
int d_csmwrite(P1(int) Pi(long) Pi(CONST char FAR *) DBN_Dn);
|
||||
/* csmwrite.c */
|
||||
int d_csoget(P1(int) Pi(DB_ADDR FAR *) DBN_Dn); /* csoget.c */
|
||||
int d_csoread(P1(int) Pi(long) Pi(char FAR *) DBN_Dn);
|
||||
/* csoread.c */
|
||||
int d_csoset(P1(int) Pi(DB_ADDR FAR *) DBN_Dn); /* csoset.c */
|
||||
int d_csowrite(P1(int) Pi(long) Pi(CONST char FAR *) DBN_Dn);
|
||||
/* csowrite.c */
|
||||
#ifndef NO_TIMESTAMP /* NO_TIMESTAMP */
|
||||
int d_csstat(P1(int) DBN_Dn); /* csstat.c */
|
||||
int d_ctscm(P1(int) Pi(ULONG FAR *) DBN_Dn); /* ctscm.c */
|
||||
int d_ctsco(P1(int) Pi(ULONG FAR *) DBN_Dn); /* ctsco.c */
|
||||
int d_ctscr(P1(ULONG FAR *)); /* ctscr.c */
|
||||
#endif /* NO_TIMESTAMP */
|
||||
#ifndef NO_COUNTRY
|
||||
int d_ctbpath(P1(CONST char FAR *)); /* pathfcns.c */
|
||||
#endif /* NO_COUNTRY */
|
||||
int d_dbdpath(P1(CONST char FAR *)); /* dbdpath.c */
|
||||
int d_dbfpath(P1(CONST char FAR *)); /* dbfpath.c */
|
||||
int d_dblog(P1(CONST char FAR *)); /* dblog.c */
|
||||
int d_dbtaf(P1(CONST char FAR *)); /* dbtaf.c */
|
||||
int d_dbuserid(P1(CONST char FAR *)); /* dbuserid.c */
|
||||
int d_delete(DBN_D1); /* delete.c */
|
||||
int d_disdel(DBN_D1); /* disdel.c */
|
||||
int d_recnext(DBN_D1); /* recnext.c */
|
||||
int d_recprev(DBN_D1); /* recprev.c */
|
||||
int d_destroy(P1(CONST char FAR *)); /* destroy.c */
|
||||
int d_discon(P1(int) DBN_Dn); /* discon.c */
|
||||
int d_fillnew(P1(int) Pi(CONST char FAR *) DBN_Dn); /* fillnew.c */
|
||||
int d_findco(P1(int) DBN_Dn); /* findco.c */
|
||||
int d_findfm(P1(int) DBN_Dn); /* findfm.c */
|
||||
int d_findlm(P1(int) DBN_Dn); /* findlm.c */
|
||||
int d_findnm(P1(int) DBN_Dn); /* findnm.c */
|
||||
int d_findpm(P1(int) DBN_Dn); /* findpm.c */
|
||||
int d_freeall(P0); /* dblfcns.c */
|
||||
#ifndef NO_TIMESTAMP /* NO_TIMESTAMP */
|
||||
int d_gtscm(P1(int) Pi(ULONG FAR *) DBN_Dn); /* gtscm.c */
|
||||
int d_gtsco(P1(int) Pi(ULONG FAR *) DBN_Dn); /* gtsco.c */
|
||||
int d_gtscr(P1(ULONG FAR *)); /* gtscr.c */
|
||||
int d_gtscs(P1(int) Pi(ULONG FAR *) DBN_Dn); /* gtscs.c */
|
||||
#endif /* NO_TIMESTAMP */
|
||||
int d_initialize(DBN_D1); /* initial.c */
|
||||
int d_initfile(P1(FILE_NO) DBN_Dn); /* initial.c */
|
||||
int d_ismember(P1(int) DBN_Dn); /* ismember.c */
|
||||
int d_isowner(P1(int) DBN_Dn); /* isowner.c */
|
||||
int d_keydel(P1(long) DBN_Dn); /* keydel.c */
|
||||
int d_keyexist(P1(long) DBN_Dn); /* keyexist.c */
|
||||
int d_keyfind(P1(long) Pi(CONST char FAR *) DBN_Dn);
|
||||
/* keyfind.c */
|
||||
int d_keyfree(P1(long) DBN_Dn); /* dblfcns.c */
|
||||
int d_keyfrst(P1(long) DBN_Dn); /* keyfrst.c */
|
||||
int d_keylast(P1(long) DBN_Dn); /* keylast.c */
|
||||
int d_keylock(P1(long) Pi(char FAR *) DBN_Dn); /* dblfcns.c */
|
||||
int d_keylstat(P1(long) Pi(char FAR *) DBN_Dn); /* dblfcns.c */
|
||||
int d_keynext(P1(long) DBN_Dn); /* keynext.c */
|
||||
int d_keyprev(P1(long) DBN_Dn); /* keyprev.c */
|
||||
int d_keyread(P1(char FAR *)); /* keyfcns.c */
|
||||
int d_keystore(P1(long) DBN_Dn); /* keystore.c */
|
||||
int d_lock(P1(int) Pi(LOCK_REQUEST FAR *) DBN_Dn); /* dblfcns.c */
|
||||
int d_makenew(P1(int) DBN_Dn); /* makenew.c */
|
||||
int d_mapchar(P1(unsigned char) Pi(unsigned char)
|
||||
Pi(CONST char FAR *) Pi(unsigned char)); /* mapchar.c */
|
||||
int d_members(P1(int) Pi(LONG FAR *) DBN_Dn); /* members.c */
|
||||
int d_off_opt(P1(int)); /* options.c */
|
||||
int d_on_opt(P1(int)); /* options.c */
|
||||
int d_open(P1(CONST char FAR *) Pi(CONST char FAR *));
|
||||
/* dblfcns.c */
|
||||
int d_rerdcurr(P1(DB_ADDR FAR **)); /* rwcurr.c */
|
||||
int d_rdcurr(P1(DB_ADDR FAR **) Pi(int FAR *)); /* rwcurr.c */
|
||||
int d_wrcurr(P1(DB_ADDR FAR *)); /* rwcurr.c */
|
||||
int d_recfree(P1(int) DBN_Dn); /* dblfcns.c */
|
||||
int d_recfrst(P1(int) DBN_Dn); /* recfrst.c */
|
||||
int d_reclast(P1(int) DBN_Dn); /* reclast.c */
|
||||
int d_reclock(P1(int) Pi(char FAR *) DBN_Dn); /* dblfcns.c */
|
||||
int d_reclstat(P1(int) Pi(char FAR *) DBN_Dn); /* dblfcns.c */
|
||||
int d_recover(P1(CONST char FAR *)); /* recover.c */
|
||||
int d_recread(P1(char FAR *) DBN_Dn); /* recread.c */
|
||||
int d_recset(P1(int) DBN_Dn); /* recset.c */
|
||||
#ifndef NO_TIMESTAMP /* NO_TIMESTAMP */
|
||||
int d_recstat(P1(DB_ADDR) Pi(ULONG)); /* recstat.c */
|
||||
#endif /* NO_TIMESTAMP */
|
||||
int d_recwrite(P1(CONST char FAR *) DBN_Dn); /* recwrite.c */
|
||||
int d_renfile(P1(CONST char FAR *) Pi(FILE_NO)
|
||||
Pi(CONST char FAR *)); /* renfile.c */
|
||||
int d_retries(P1(int)); /* dblfcns.c */
|
||||
int d_rlbclr(P0); /* dblfcns.c */
|
||||
int d_rlbset(P0); /* dblfcns.c */
|
||||
int d_rlbtst(P0); /* dblfcns.c */
|
||||
int d_set_dberr(P1(FARPROC)); /* dberr.c */
|
||||
#ifndef ONE_DB /* ONE_DB */
|
||||
int d_setdb(P1(int)); /* setdb.c */
|
||||
#endif /* ONE_DB */
|
||||
int d_setfree(P1(int) DBN_Dn); /* dblfcns.c */
|
||||
int d_setkey(P1(long) Pi(CONST char FAR *) DBN_Dn); /* makenew.c */
|
||||
int d_setlock(P1(int) Pi(char FAR *) DBN_Dn); /* dblfcns.c */
|
||||
int d_setlstat(P1(int) Pi(char FAR *) DBN_Dn); /* dblfcns.c */
|
||||
int d_setmm(P1(int) Pi(int) DBN_Dn); /* setmm.c */
|
||||
int d_setmo(P1(int) Pi(int) DBN_Dn); /* setmo.c */
|
||||
int d_setmr(P1(int) DBN_Dn); /* setmr.c */
|
||||
int d_setom(P1(int) Pi(int) DBN_Dn); /* setom.c */
|
||||
int d_setoo(P1(int) Pi(int) DBN_Dn); /* setoo.c */
|
||||
int d_setor(P1(int) DBN_Dn); /* setor.c */
|
||||
int d_setrm(P1(int) DBN_Dn); /* setrm.c */
|
||||
int d_setro(P1(int) DBN_Dn); /* setro.c */
|
||||
#ifndef NO_TIMESTAMP /* NO_TIMESTAMP */
|
||||
int d_stscm(P1(int) Pi(ULONG) DBN_Dn); /* stscm.c */
|
||||
int d_stsco(P1(int) Pi(ULONG) DBN_Dn); /* stsco.c */
|
||||
int d_stscr(P1(ULONG)); /* stscr.c */
|
||||
int d_stscs(P1(int) Pi(ULONG) DBN_Dn); /* stscs.c */
|
||||
#endif /* NO_TIMESTAMP */
|
||||
int d_timeout(P1(int)); /* dblfcns.c */
|
||||
int d_trabort(P0); /* dblfcns.c */
|
||||
int d_trbegin(P1(CONST char FAR *)); /* dblfcns.c */
|
||||
int d_trend(P0); /* dblfcns.c */
|
||||
#ifndef NO_TIMESTAMP /* NO_TIMESTAMP */
|
||||
int d_utscm(P1(int) Pi(ULONG FAR *) DBN_Dn); /* utscm.c */
|
||||
int d_utsco(P1(int) Pi(ULONG FAR *) DBN_Dn); /* utsco.c */
|
||||
int d_utscr(P1(ULONG FAR *)); /* utscr.c */
|
||||
int d_utscs(P1(int) Pi(ULONG FAR *) DBN_Dn); /* utscs.c */
|
||||
#endif /* NO_TIMESTAMP */
|
||||
|
||||
#endif /* MULTI_TASK */
|
||||
|
||||
int dberr(P1(int)); /* dberr.c */
|
||||
|
||||
#define D_FUNCTIONS_H
|
||||
/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin dproto.h */
|
||||
@@ -1,194 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: dblock.h /main/2 1996/05/09 04:02:57 drk $ */
|
||||
/*
|
||||
* COMPONENT_NAME: austext
|
||||
*
|
||||
* FUNCTIONS: FCNINIT
|
||||
*
|
||||
* ORIGINS: 157
|
||||
*
|
||||
*/
|
||||
/* ********************** EDIT HISTORY *******************************
|
||||
|
||||
SCR DATE INI DESCRIPTION
|
||||
----- --------- --- -----------------------------------------------------
|
||||
368 28-Jul-88 RSC Integrate BSD changes into code
|
||||
115 16-Aug-88 RSC Integrate VAX/VMS changes into source code
|
||||
423 09-Sep-88 RSC Change variables to be compatible with MULTI_TASK
|
||||
420 07-Oct-88 RSC Unoptimized use of fl_list (full of bugs)
|
||||
441 09-Dec-88 RSC Modified defn of FCNPID for general lockmgr
|
||||
*/
|
||||
|
||||
/* Lock Manager/Runtime function interaction */
|
||||
|
||||
/* Network Bios Status codes */
|
||||
#define N_BUSY 0xff
|
||||
#define N_OKAY 0x00
|
||||
#define N_TIMEOUT 0x05
|
||||
#define N_SESCLOSED 0x0a
|
||||
#define N_DUPNAME 0x0d
|
||||
#define N_TABFULL 0x11
|
||||
#define N_OPENREJ 0x12
|
||||
#define N_CALLNAME 0x14
|
||||
#define N_NAMEUSED 0x16
|
||||
#define N_NAMEDEL 0x17
|
||||
#define N_SESABORT 0x18
|
||||
#define N_INTFBUSY 0x21
|
||||
#define N_COMMANDS 0x22
|
||||
|
||||
/* Function/Status codes */
|
||||
#define L_RECOVER -5
|
||||
#define L_QUEUEFULL -4
|
||||
#define L_TIMEOUT -3
|
||||
#define L_UNAVAIL -2
|
||||
#define L_SYSERR -1
|
||||
|
||||
#define L_OKAY 0
|
||||
|
||||
#define L_DBOPEN 1
|
||||
#define L_DBCLOSE 2
|
||||
#define L_LOCK 3
|
||||
#define L_FREE 4
|
||||
#define L_TRCOMMIT 5
|
||||
#define L_TREND 6
|
||||
#define L_SETTIME 7
|
||||
#define L_RECDONE 8
|
||||
#define L_LOGIN 9
|
||||
#define L_DELETE 10
|
||||
|
||||
#ifndef LOGFILELEN
|
||||
#define LOGFILELEN 48
|
||||
#endif
|
||||
|
||||
/* Macros for VMS mailbox usage */
|
||||
|
||||
|
||||
typedef struct LM_LOCKREQ_S {
|
||||
INT fref;
|
||||
INT type;
|
||||
} LM_LOCKREQ;
|
||||
|
||||
/* Message packets, Runtime to Lock Manager */
|
||||
|
||||
/* Some macro / typdefs to make this file much more readable */
|
||||
|
||||
#define PERMISSION 0666
|
||||
|
||||
#ifdef GENERAL
|
||||
|
||||
/* Defines for GENERAL LOCKMGR */
|
||||
|
||||
#define FCNPID INT fcn;
|
||||
#define FCNDEF INT fcn;
|
||||
#define FCNINIT() 0
|
||||
typedef char LM_FILEID;
|
||||
|
||||
#else /* GENERAL */
|
||||
|
||||
|
||||
/* Defines for UNIX SYS-V */
|
||||
|
||||
#define FCNPID LONG fcn;\
|
||||
int pid;
|
||||
#define FCNDEF LONG fcn;
|
||||
#define FCNINIT() 0
|
||||
|
||||
/* Defines for both UNIX SYS-V and BSD */
|
||||
|
||||
typedef struct LM_FILEID_S {
|
||||
ino_t inode;
|
||||
dev_t device;
|
||||
} LM_FILEID;
|
||||
|
||||
#endif /* GENERAL */
|
||||
|
||||
typedef struct LM_LOGIN_S {
|
||||
FCNPID
|
||||
char dbusrid[80];
|
||||
} LM_LOGIN;
|
||||
|
||||
typedef struct LM_DBOPEN_S {
|
||||
FCNPID
|
||||
INT nfiles;
|
||||
INT type;
|
||||
LM_FILEID fnames[1];
|
||||
} LM_DBOPEN;
|
||||
|
||||
typedef struct LM_DBCLOSE_S {
|
||||
FCNPID
|
||||
INT nfiles;
|
||||
INT frefs[1];
|
||||
} LM_DBCLOSE;
|
||||
|
||||
typedef struct LM_LOCK_S {
|
||||
FCNPID
|
||||
INT nfiles;
|
||||
LM_LOCKREQ locks[1];
|
||||
} LM_LOCK;
|
||||
|
||||
typedef struct LM_RECOVERED_S {
|
||||
FCNPID
|
||||
} LM_RECOVERED;
|
||||
|
||||
typedef struct LM_FREE_S {
|
||||
FCNPID
|
||||
INT nfiles;
|
||||
INT frefs[1];
|
||||
} LM_FREE;
|
||||
|
||||
typedef struct LM_TRCOMMIT_S {
|
||||
FCNPID
|
||||
char logfile[LOGFILELEN];
|
||||
} LM_TRCOMMIT;
|
||||
|
||||
typedef struct LM_TREND_S {
|
||||
FCNPID
|
||||
} LM_TREND;
|
||||
|
||||
typedef struct LM_SETTIME_S {
|
||||
FCNPID
|
||||
INT secs;
|
||||
} LM_SETTIME;
|
||||
|
||||
|
||||
/* Message packets, Lock Manager to Runtime */
|
||||
|
||||
|
||||
typedef struct LR_DBOPEN_S {
|
||||
FCNDEF
|
||||
INT status;
|
||||
char logfile[LOGFILELEN];
|
||||
INT nusers;
|
||||
INT nfiles;
|
||||
INT frefs[1];
|
||||
} LR_DBOPEN;
|
||||
|
||||
typedef struct LR_LOCK_S {
|
||||
FCNDEF
|
||||
INT status;
|
||||
char logfile[LOGFILELEN];
|
||||
} LR_LOCK;
|
||||
|
||||
#define DBLOCK_H
|
||||
/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin dblock.h */
|
||||
@@ -1,534 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* COMPONENT_NAME: austext
|
||||
*
|
||||
* FUNCTIONS: ALLOC
|
||||
* BITS
|
||||
* CALLOC
|
||||
* DB_ENTER
|
||||
* DB_REF
|
||||
* FREE
|
||||
* LOCK_SET
|
||||
* MEM_LOCK
|
||||
* MEM_UNLOCK
|
||||
* NUM2EXT
|
||||
* NUM2INT
|
||||
* ORIGIN
|
||||
* RETURN
|
||||
* RN_REF
|
||||
* TABLE_SIZE
|
||||
* arraysize
|
||||
* bytecmp
|
||||
* bytecpy
|
||||
* byteset
|
||||
*
|
||||
* ORIGINS: 27,157
|
||||
*
|
||||
* (C) COPYRIGHT International Business Machines Corp. 1995, 1996
|
||||
* All Rights Reserved
|
||||
* US Government Users Restricted Rights - Use, duplication or
|
||||
* disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
|
||||
*/
|
||||
/*----------------------------------------------------------------------------
|
||||
$TOG: dbtype.h /main/6 1998/03/19 19:00:38 mgreess $
|
||||
dbtype.h: Standard db_VISTA header file containing:
|
||||
|
||||
- DDL dictionary type definitions
|
||||
- Machine dependent constant definitions
|
||||
- Miscellaneous constants used by runtime functions
|
||||
- Virtual memory page table type definitions
|
||||
|
||||
(An #include "vista.h" must precede this include)
|
||||
|
||||
(C) Copyright 1984, 1985, 1986 by Raima Corporation.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/* ********************** EDIT HISTORY *******************************
|
||||
|
||||
SCR DATE INI DESCRIPTION
|
||||
----- --------- --- -----------------------------------------------------
|
||||
101 21-Jun-88 RSC Added rn_type and rn_dba to database table
|
||||
344 06-Jul-88 RSC LOGFILELEN also defined in dblock.h - add ifndef
|
||||
115 18-Jul-88 RSC Integrate VAX VMS changes
|
||||
21-Jul-88 RSC Fix bugaboo in VAX integration
|
||||
368 28-Jul-88 RSC Integrate BSD changes into code
|
||||
310 10-Aug-88 RSC Cleanup function prototype
|
||||
19-Aug-88 RSC Moved rn_type,rn_dba to separate table for compatibility
|
||||
with db_QUERY and db_REVISE
|
||||
423 10-Sep-88 RSC Add dbpush names for netunix.c
|
||||
423 22-Sep-88 RSC Modify/simplify DB_ENTER macro for Lattice compiler
|
||||
368 23-Sep-88 RSC Change type of pid from INT to int and
|
||||
corrected defn of MESSAGE
|
||||
423 26-Sep-88 RSC Moved INIT_PAGE_P defn to initial.c
|
||||
11-Oct-88 RSC Fix for ONE_DB compile
|
||||
441 06-Dec-88 RSC Move defn of MESSAGE from netgen.h to here
|
||||
532 06-Jan-89 RSC Fixed defn of DB_ID for ONE_DB
|
||||
|
||||
$Log$
|
||||
* Revision 1.2 1995/10/13 18:29:38 miker
|
||||
* Added #define DtSrFILENMLEN to expand max filename len.
|
||||
* Changed FILENMLEN from 48 to DtSrFILENMLEN (240: 256 - 16).
|
||||
*/
|
||||
|
||||
/* Compiler dependencies are handled with ifdef macros:
|
||||
NOTE: One of these macros should be defined on the compile command,
|
||||
for example
|
||||
cc -c -DUNIX fillnew.c
|
||||
Failure to do so will produce compilation errors.
|
||||
|
||||
UNIX = Unix C compiler
|
||||
LAT = Lattice
|
||||
MSC = Microsoft
|
||||
AZ = Aztec
|
||||
C86 = CI C86
|
||||
DS = DeSmet
|
||||
VMS = Vax/VMS
|
||||
HHS = Harris H-series
|
||||
*/
|
||||
|
||||
|
||||
#define PGHOLD 1
|
||||
#define NOPGHOLD 0
|
||||
#define PGFREE 1
|
||||
#define NOPGFREE 0
|
||||
|
||||
#define KEYFIND 0
|
||||
#define KEYNEXT 1
|
||||
#define KEYPREV 2
|
||||
#define KEYFRST 3
|
||||
#define KEYLAST 4
|
||||
|
||||
/* dictionary attribute flags */
|
||||
#define SORTFLD 0x0001 /* field is a set sort field */
|
||||
#define STRUCTFLD 0x0002 /* field is sub-field of struct */
|
||||
#define UNSIGNEDFLD 0x0004 /* field is unsigned */
|
||||
#define STATIC 0x0002 /* file/record is static */
|
||||
#define LOCAL 0x0004 /* file/record is local */
|
||||
#define COMKEYED 0x0010 /* record/field contains/included in compound key */
|
||||
#define TIMESTAMPED 0x0001 /* record/set is timestamped */
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
#define YES 1
|
||||
#define NO 0
|
||||
|
||||
#define BITS_PER_BYTE 8
|
||||
|
||||
/* Number of bits in a "type" */
|
||||
#define BITS( type ) (BITS_PER_BYTE * sizeof( type ))
|
||||
|
||||
/* Number of elements in a vector */
|
||||
#define arraysize(v) (sizeof(v)/sizeof(*(v)))
|
||||
|
||||
/* Number of bytes in a disk block */
|
||||
#define D_BLKSZ 512
|
||||
|
||||
#define DBD_COMPAT_LEN 6
|
||||
#define INT_SIZE sizeof(int)
|
||||
#define SHORT_SIZE sizeof(short)
|
||||
#define LONG_SIZE sizeof(long)
|
||||
#ifndef NO_FLOAT
|
||||
#define FLOAT_SIZE sizeof(float)
|
||||
#define DOUBLE_SIZE sizeof(double)
|
||||
#endif
|
||||
#define CHAR_SIZE sizeof(char)
|
||||
#define DB_ADDR_SIZE sizeof(LONG)
|
||||
#define PGHDRSIZE 4
|
||||
#define CTBNAME "vista.ctb"
|
||||
|
||||
#define RECHDRSIZE 6
|
||||
#define NONE -1
|
||||
|
||||
/* FILEMASK, ADDRMASK, FILESHIFT always operate on 4-byte variables */
|
||||
#define FILEMASK 0x000000FF
|
||||
#define ADDRMASK 0x00FFFFFF
|
||||
#define FILESHIFT 24
|
||||
|
||||
#define OPTKEYSHIFT 10
|
||||
#define OPTKEYMASK 0xFC00
|
||||
#define OPTKEYNDX 0x003F
|
||||
#define OPTKEY_LIMIT 63
|
||||
#define RLBMASK 0x4000
|
||||
|
||||
/* The following constants all depend on the size of INT and DB_ADDR */
|
||||
|
||||
/* creation timestamp in rec hdr = sizeof(INT) + DB_ADDR_SIZE */
|
||||
#define RECCRTIME 6
|
||||
/* update timestamp in rec hdr = RECCRTIME + sizeof(LONG) */
|
||||
#define RECUPTIME 10
|
||||
|
||||
/* member count prior + next timestamp (opt) */
|
||||
/* max size of set pointer = sizeof(LONG) + 2*DB_ADDR_SIZE + sizeof(ULONG) */
|
||||
#define SETPSIZE 16
|
||||
/* Offset to total members in set ptr */
|
||||
#define SP_MEMBERS 0
|
||||
/* Offset to first member ptr in set ptr */
|
||||
#define SP_FIRST 4
|
||||
/* Offset to last member ptr in set ptr = 2+DB_ADDR_SIZE */
|
||||
#define SP_LAST 8
|
||||
/* Size of member pointer = 3*DB_ADDR_SIZE */
|
||||
#define MEMPSIZE 12
|
||||
/* Offset to owner ptr in member ptr */
|
||||
#define MP_OWNER 0
|
||||
/* Offset to previous member ptr in member ptr = DB_ADDR_SIZE */
|
||||
#define MP_PREV 4
|
||||
/* Offset to next member ptr in member ptr = 2*DB_ADDR_SIZE */
|
||||
#define MP_NEXT 8
|
||||
|
||||
/* maximum length of a database file name */
|
||||
#define DtSrFILENMLEN 240 /* expand max filename len from 48 */
|
||||
#ifndef FILENMLEN
|
||||
#define FILENMLEN DtSrFILENMLEN
|
||||
#endif
|
||||
#ifndef LOGFILELEN
|
||||
#define LOGFILELEN 48
|
||||
#endif
|
||||
/* maximum length of a database name */
|
||||
#define DBNMLEN 12
|
||||
/* maximum length of a database path */
|
||||
#define PATHLEN FILENMLEN-15
|
||||
|
||||
#define MAXDIMS 3
|
||||
|
||||
#define OPEN 'o'
|
||||
#define CLOSED 'c'
|
||||
#define DATA 'd'
|
||||
#define KEY 'k'
|
||||
#define OVERFLOW 'o'
|
||||
|
||||
typedef struct FILE_ENTRY_S {
|
||||
char ft_name[FILENMLEN]; /* name of file */
|
||||
INT ft_desc; /* file descriptor */
|
||||
char ft_status; /* 'o'=opened, 'c'=closed */
|
||||
char ft_type; /* 'd'=data, 'k'=key, 'o'=overflow */
|
||||
INT ft_slots; /* record slots per page */
|
||||
INT ft_slsize; /* size of record slots in bytes */
|
||||
INT ft_pgsize; /* size of page */
|
||||
INT ft_flags; /* 0x0002 is set if file is static */
|
||||
} FILE_ENTRY;
|
||||
|
||||
typedef struct RECORD_ENTRY_S {
|
||||
INT rt_file; /* file table entry of file containing record */
|
||||
INT rt_len; /* total length of record */
|
||||
INT rt_data; /* offset to start of data in record */
|
||||
INT rt_fields; /* first field def in field_table */
|
||||
INT rt_fdtot; /* total number of fields in record */
|
||||
INT rt_flags; /* 0x0001 is set if record is timestamped
|
||||
0x0002 is set if record is static */
|
||||
} RECORD_ENTRY;
|
||||
|
||||
|
||||
#define FIRST 'f'
|
||||
#define LAST 'l'
|
||||
#define ASCENDING 'a'
|
||||
#define DESCENDING 'd'
|
||||
#define NOORDER 'n'
|
||||
#define NEXT 'n'
|
||||
typedef struct SET_ENTRY_S {
|
||||
INT st_order; /* 'f'=first, 'l'=last, 'a'=ascending,
|
||||
'd'=descending, 'n'=no order */
|
||||
INT st_own_rt; /* record table entry of owner */
|
||||
INT st_own_ptr; /* offset to set pointers in record */
|
||||
INT st_members; /* index of first member record in member table */
|
||||
INT st_memtot; /* total number of members of set */
|
||||
INT st_flags; /* 0x0001 is set if record is timestamped */
|
||||
} SET_ENTRY;
|
||||
|
||||
|
||||
typedef struct MEMBER_ENTRY_S {
|
||||
INT mt_record; /* record table entry for this member */
|
||||
INT mt_mem_ptr; /* offset to member ptrs in record */
|
||||
INT mt_sort_fld; /* sort table entry of first sort field */
|
||||
INT mt_totsf; /* total number of sort fields */
|
||||
} MEMBER_ENTRY;
|
||||
|
||||
|
||||
typedef struct SORT_ENTRY_S {
|
||||
INT se_fld; /* field table entry of sort field */
|
||||
INT se_set; /* set table entry of sorted set */
|
||||
} SORT_ENTRY;
|
||||
|
||||
|
||||
#define NOKEY 'n'
|
||||
#define DUPLICATES 'd'
|
||||
#define UNIQUE 'u'
|
||||
#define CHARACTER 'c'
|
||||
#define SHORTINT 's'
|
||||
#define REGINT 'i'
|
||||
#define LONGINT 'l'
|
||||
#ifndef NO_FLOAT
|
||||
#define FLOAT 'f'
|
||||
#define DOUBLE 'F'
|
||||
#endif
|
||||
#define DBADDR 'd'
|
||||
#define GROUPED 'g'
|
||||
#define COMKEY 'k'
|
||||
typedef struct FIELD_ENTRY_S {
|
||||
char fd_key; /* 'n'=none, 'd'=duplicates, 'u'=unique */
|
||||
char fd_type; /* 'c'=char, 's'=short, 'i'=int, 'l'=long, 'd'=DB_ADDR,
|
||||
'f' = float, 'D' = double, 'g'=grouped field,
|
||||
'k' = compound key */
|
||||
INT fd_len; /* length of field in bytes */
|
||||
INT fd_dim[MAXDIMS]; /* size of each array dimension */
|
||||
INT fd_keyfile; /* file_table entry for key file */
|
||||
INT fd_keyno; /* key prefix number */
|
||||
INT fd_ptr; /* offset to field in record or
|
||||
1st compound key field in key_table */
|
||||
INT fd_rec; /* record table entry of record containing field */
|
||||
INT fd_flags; /* 0x0001 is set if field in "by" clause of set spec
|
||||
0x0002 is set if field member of struct field
|
||||
0x0004 is set if field is unsigned data type
|
||||
0x0008 is set if field is an optional key */
|
||||
} FIELD_ENTRY;
|
||||
|
||||
/* compound key table entry declaration */
|
||||
typedef struct KEY_ENTRY_S {
|
||||
INT kt_key; /* compound key field number */
|
||||
INT kt_field; /* field number of included field */
|
||||
INT kt_ptr; /* offset to start of field data in key */
|
||||
INT kt_sort; /* 'a' = ascending, 'd' = descending */
|
||||
} KEY_ENTRY;
|
||||
|
||||
/* database table entry declaration */
|
||||
typedef struct DB_ENTRY_S {
|
||||
char db_name[DBNMLEN]; /* name of this database */
|
||||
char db_path[PATHLEN]; /* name of path to this database */
|
||||
DB_ADDR sysdba; /* database address of system record */
|
||||
DB_ADDR curr_dbt_rec;/* this db's current record */
|
||||
INT Page_size; /* size of this db's page */
|
||||
INT Size_ft; /* size of this db's file_table */
|
||||
INT ft_offset; /* offset to start of this db's file_table entries */
|
||||
INT Size_rt; /* size of this db's record_table */
|
||||
INT rt_offset; /* offset to start of this db's record_table entries */
|
||||
INT Size_fd; /* size of this db's field_table */
|
||||
INT fd_offset; /* offset to start of this db's field_table entries */
|
||||
INT Size_st; /* size of this db's set_table */
|
||||
INT st_offset; /* offset to start of this db's set_table entries */
|
||||
INT Size_mt; /* size of this db's member_table */
|
||||
INT mt_offset; /* offset to start of this db's member_table entries */
|
||||
INT Size_srt; /* size of this db's sort_table */
|
||||
INT srt_offset; /* offset to start of this db's sort_table entries */
|
||||
INT Size_kt; /* size of this db's key_table */
|
||||
INT kt_offset; /* offset to strary of this db's key table entries */
|
||||
INT key_offset; /* key prefix offset for this db */
|
||||
} DB_ENTRY;
|
||||
|
||||
/* Structure containing current record type & address for recfrst/set/next..*/
|
||||
typedef struct RN_ENTRY_S {
|
||||
INT rn_type; /* Last record type supplied to recfrst/recset */
|
||||
DB_ADDR rn_dba; /* Last db addr computed by recfrst/recset/recnext */
|
||||
} RN_ENTRY;
|
||||
#define DB_REF(item) (db_global.Curr_db_table->item)
|
||||
#define RN_REF(item) (curr_rn_table->item)
|
||||
#define NUM2INT(num, offset) ((num) + db_global.Curr_db_table->offset)
|
||||
#define NUM2EXT(num, offset) ((num) - db_global.Curr_db_table->offset)
|
||||
#define ORIGIN(offset) (curr_db_table->offset)
|
||||
#define TABLE_SIZE(size) DB_REF(size)
|
||||
|
||||
/* Country code table definition */
|
||||
typedef struct CNTRY_TBL_S {
|
||||
unsigned char out_chr;
|
||||
unsigned char sort_as1;
|
||||
unsigned char sort_as2;
|
||||
unsigned char sub_sort;
|
||||
} CNTRY_TBL;
|
||||
|
||||
/* names lists structure declaration */
|
||||
typedef struct OBJNAMES_S {
|
||||
char **recs;
|
||||
char **flds;
|
||||
char **sets;
|
||||
} OBJNAMES;
|
||||
|
||||
|
||||
/* directory separator character:
|
||||
MS-DOS: '\'
|
||||
UNIX: '/'
|
||||
*/
|
||||
#ifdef HHS
|
||||
#define DIRCHAR '*'
|
||||
#else
|
||||
#define DIRCHAR '/'
|
||||
#endif
|
||||
|
||||
/* The following define aid in the use of a set of routines which use RMS
|
||||
directly to do the i/o to database files. */
|
||||
|
||||
#define DB_OPEN open_b
|
||||
#define DB_CLOSE close
|
||||
#define DB_LSEEK lseek
|
||||
#define DB_WRITE write
|
||||
#define DB_READ read
|
||||
|
||||
typedef struct {FILE_NO *ptr; LOCK_DESC} FILE_NO_P;
|
||||
typedef struct {int *ptr; LOCK_DESC} INT_P;
|
||||
typedef struct {struct NODE_PATH_S *ptr; LOCK_DESC} NODE_PATH_P;
|
||||
typedef struct {struct KEY_INFO_S *ptr; LOCK_DESC} KEY_INFO_P;
|
||||
typedef struct {struct ren_entry *ptr; LOCK_DESC} REN_ENTRY_P;
|
||||
typedef struct {struct RN_ENTRY_S *ptr; LOCK_DESC} RN_ENTRY_P;
|
||||
typedef struct {struct LOOKUP_ENTRY_S *ptr; LOCK_DESC} LOOKUP_ENTRY_P;
|
||||
typedef struct {struct page_entry *ptr; LOCK_DESC} PAGE_ENTRY_P;
|
||||
typedef struct {struct DB_ENTRY_S *ptr; LOCK_DESC} DB_ENTRY_P;
|
||||
typedef struct {struct FILE_ENTRY_S *ptr; LOCK_DESC} FILE_ENTRY_P;
|
||||
typedef struct {struct RECORD_ENTRY_S *ptr; LOCK_DESC} RECORD_ENTRY_P;
|
||||
typedef struct {struct SET_ENTRY_S *ptr; LOCK_DESC} SET_ENTRY_P;
|
||||
typedef struct {struct MEMBER_ENTRY_S *ptr; LOCK_DESC} MEMBER_ENTRY_P;
|
||||
typedef struct {struct SORT_ENTRY_S *ptr; LOCK_DESC} SORT_ENTRY_P;
|
||||
typedef struct {struct FIELD_ENTRY_S *ptr; LOCK_DESC} FIELD_ENTRY_P;
|
||||
typedef struct {struct KEY_ENTRY_S *ptr; LOCK_DESC} KEY_ENTRY_P;
|
||||
typedef struct {struct PGZERO_S *ptr; LOCK_DESC} PGZERO_P;
|
||||
typedef struct {struct RI_ENTRY_S *ptr; LOCK_DESC} RI_ENTRY_P;
|
||||
typedef struct {ULONG *ptr; LOCK_DESC} ULONG_P;
|
||||
typedef struct {LONG *ptr; LOCK_DESC} LONG_P;
|
||||
typedef struct {struct CNTRY_TBL_S *ptr; LOCK_DESC} CNTRY_TBL_P;
|
||||
struct sk {
|
||||
INT sk_fld;
|
||||
CHAR_P sk_val;
|
||||
} __SK__;
|
||||
typedef struct { struct sk *ptr; LOCK_DESC } SK_P;
|
||||
|
||||
/* node key search path stack entry: one per level per key field */
|
||||
typedef struct NODE_PATH_S {
|
||||
F_ADDR node; /* node (page) number */
|
||||
INT slot; /* slot number of key */
|
||||
} NODE_PATH;
|
||||
|
||||
/* index key information: one entry per key field */
|
||||
typedef struct KEY_INFO_S {
|
||||
NODE_PATH_P Node_path; /* stack of node #s in search path */
|
||||
INT level; /* current level # in node path */
|
||||
INT max_lvls; /* maximum possible levels for key */
|
||||
INT lstat; /* last key function status */
|
||||
INT fldno; /* field number of key */
|
||||
FILE_NO keyfile; /* key file containing this key */
|
||||
CHAR_P Keyval; /* ptr to last key value */
|
||||
DB_ADDR dba; /* db address of last key */
|
||||
} KEY_INFO;
|
||||
#define node_path Node_path.ptr
|
||||
#define keyval Keyval.ptr
|
||||
|
||||
/* key slot structure */
|
||||
typedef struct key_slot {
|
||||
F_ADDR child; /* child node pointer */
|
||||
INT keyno; /* key number */
|
||||
char data[1]; /* start of key data */
|
||||
} KEY_SLOT;
|
||||
|
||||
typedef union key_type {
|
||||
char kd[256];
|
||||
struct key_slot ks;
|
||||
} KEY_TYPE;
|
||||
|
||||
/* file rename table entry declarations */
|
||||
typedef struct ren_entry {
|
||||
CHAR_P Ren_db_name;
|
||||
CHAR_P File_name;
|
||||
FILE_NO file_no;
|
||||
} REN_ENTRY;
|
||||
|
||||
#define bytecpy(s1, s2, n) memcpy((char *)(s1), (char *)(s2), (unsigned)(n))
|
||||
#define bytecmp(s1, s2, n) memcmp((char *)(s1), (char *)(s2), (unsigned)(n))
|
||||
#define byteset(s, c, n) memset((char *)(s), (char)(c), (unsigned)(n))
|
||||
|
||||
typedef struct MESSAGE_S {
|
||||
#ifdef GENERAL
|
||||
INT mtype;
|
||||
char mtext[1];
|
||||
#else /* GENERAL */
|
||||
LONG mtype;
|
||||
int pid;
|
||||
char mtext[1];
|
||||
#endif /* GENERAL */
|
||||
} MESSAGE;
|
||||
|
||||
#ifdef COMMA /* COMMA */
|
||||
#define DB_ID , dbn
|
||||
#define NO_DB_ID , -1
|
||||
#else /* COMMA */
|
||||
#define DB_ID dbn
|
||||
#define NO_DB_ID -1
|
||||
#define COMMA
|
||||
#endif /* COMMA */
|
||||
|
||||
#define TASK_ID /**/
|
||||
|
||||
#define LOCK_SET(a) /**/
|
||||
|
||||
#define TDTL_PARAM
|
||||
|
||||
#define DB_ENTER(TDTL_PARAM) if ( startup(TDTL_PARAM) != S_OKAY ) { return( db_status ); } else
|
||||
|
||||
#define RETURN(x) return( x )
|
||||
#define ALLOC(l, b, v) d_alloc(b)
|
||||
#define CALLOC(l, i, s, v) d_calloc(i, s)
|
||||
#define MEM_LOCK(cp) d_memlock((CHAR_P *)(cp))
|
||||
#define MEM_UNLOCK(cp) d_memunlock((CHAR_P *)(cp))
|
||||
#define FREE(cp) d_free((CHAR_P *)(cp))
|
||||
|
||||
/* Lock sets are defined in dblfcns.c */
|
||||
#define LOCK_NONE -1
|
||||
#define LOCK_ALL 0
|
||||
#define LOCK_IO 1
|
||||
#define LOCK_NOIO 2
|
||||
#define RECORD_IO 3
|
||||
#define RECORD_NOIO 4
|
||||
#define SET_IO 5
|
||||
#define SET_NOIO 6
|
||||
|
||||
#ifdef GENERAL
|
||||
#define TIMEOUT_DEF 20
|
||||
#else
|
||||
#define TIMEOUT_DEF 10
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include "trxlog.h"
|
||||
#include "dblock.h"
|
||||
#include "ll.h"
|
||||
#include "dbxtrn.h"
|
||||
|
||||
typedef struct LOOKUP_ENTRY_S {
|
||||
FILE_NO file; /* file table entry number (0..size_ft-1) */
|
||||
F_ADDR pageno; /* database page number */
|
||||
short pg_slot; /* page table slot pointing to this entry */
|
||||
} LOOKUP_ENTRY;
|
||||
|
||||
/* virtual page table entry */
|
||||
typedef struct page_entry {
|
||||
BOOLEAN recently_used; /* LRU flag */
|
||||
BOOLEAN modified; /* TRUE if page has been modified */
|
||||
INT holdcnt; /* "hold-in-cache" counter */
|
||||
short lu_slot; /* lookup table slot pointing to this entry */
|
||||
CHAR_P Buff; /* page buffer pointer */
|
||||
} PAGE_ENTRY;
|
||||
#define buff Buff.ptr
|
||||
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include "proto.h"
|
||||
|
||||
/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC dbtype.h */
|
||||
@@ -1,208 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: dbxtrn.h /main/2 1996/05/09 04:04:00 drk $ */
|
||||
/*
|
||||
* COMPONENT_NAME: austext
|
||||
*
|
||||
* FUNCTIONS: none
|
||||
*
|
||||
* ORIGINS: 157
|
||||
*
|
||||
*/
|
||||
/*----------------------------------------------------------------------------
|
||||
dbxtrn.h: db_VISTA external data header file
|
||||
|
||||
(This file is included by dbtype.h)
|
||||
|
||||
(C) Copyright 1984 by Raima Corporation.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/* ********************** EDIT HISTORY *******************************
|
||||
|
||||
SCR DATE INI DESCRIPTION
|
||||
----- --------- --- -----------------------------------------------------
|
||||
423 22-Sep-88 RSC Cleanup file to compile under Lattice
|
||||
368 23-Sep-88 RSC Changed defn of Last_mtype to match dbtype.h
|
||||
439 17-Nov-88 RSC Integrate 3.10 branch (w/o windows) into main
|
||||
440 13-Dec-88 RSC LR_LOCK was removed from db_global for general LM
|
||||
532 06-Jan-89 RSC Fixed defns of rn_dba/type,db_name for ONE_DB
|
||||
05-May-89 WLW Changed TASK_P to DB_TASK for query multi-tasking
|
||||
|
||||
*/
|
||||
|
||||
/* Database Dictionary Tables */
|
||||
extern INT largest_page;
|
||||
|
||||
extern INT old_size_ft;
|
||||
extern INT old_size_fd;
|
||||
extern INT old_size_st;
|
||||
extern INT old_size_mt;
|
||||
extern INT old_size_srt;
|
||||
extern INT old_size_kt;
|
||||
extern INT old_size_rt;
|
||||
extern INT old_no_of_dbs;
|
||||
|
||||
extern char *crloc; /* location in page buffer of current record */
|
||||
|
||||
typedef struct TASK_S {
|
||||
/* The following global variables came from dblfcns.c */
|
||||
int Dbopen; /* dbopen = 0 */
|
||||
char Dbuserid[FILENMLEN]; /* dbuserid = "" */
|
||||
char Dbdpath[FILENMLEN*2]; /* dbdpath = "" */
|
||||
char Dbfpath[FILENMLEN*2]; /* dbdpath = "" */
|
||||
const char *Trans_id; /* trans_id = NULL */
|
||||
char Dblog[FILENMLEN]; /* dblog = "" */
|
||||
/* The following global variables came from dio.c */
|
||||
BOOLEAN Cache_ovfl; /* cache_ovfl = FALSE */
|
||||
PGZERO_P Pgzero; /* database file page 0 array */
|
||||
/* The following global variables came from keyfcns.c */
|
||||
int No_of_keys; /* no_of_keys = 0 */
|
||||
KEY_INFO_P Key_info; /* key_info = NULL */
|
||||
KEY_TYPE Key_type;
|
||||
/* The following global variables came from netwdos.c */
|
||||
int Net_status;
|
||||
LONG Last_mtype;
|
||||
/* The following global variables came from options.c */
|
||||
int Dboptions; /* ifdef NO_TRANS: dboptions =
|
||||
DCHAINUSE | TRLOGGING
|
||||
else: dboptions = DCHAINUSE */
|
||||
/* The following global variables came from ovfcns.c */
|
||||
long Ov_initaddr; /* ov_initaddr = 0L */
|
||||
long Ov_rootaddr; /* ov_rootaddr = 0L */
|
||||
long Ov_nextaddr; /* ov_nextaddr = 0L */
|
||||
RI_ENTRY_P Root_ix;
|
||||
/* The following global variables came from renfiles.c */
|
||||
llist Ren_list; /* Ren_list = LLIST_INIT() */
|
||||
/* The following global variables came from inittab.h */
|
||||
INT Page_size;
|
||||
int Curr_db;
|
||||
DB_ENTRY *Curr_db_table;
|
||||
DB_ADDR Curr_rec; /* current record address */
|
||||
DB_ADDR_P Curr_own; /* current set owners array */
|
||||
DB_ADDR_P Curr_mem; /* current set members array */
|
||||
FILE_NO Ov_file;
|
||||
BOOLEAN Setdb_on;
|
||||
INT No_of_dbs;
|
||||
RN_ENTRY_P Rn_table;
|
||||
RN_ENTRY *Curr_rn_table;
|
||||
DB_ENTRY_P Db_table;
|
||||
FILE_ENTRY_P File_table;
|
||||
INT Size_ft;
|
||||
RECORD_ENTRY_P Record_table;
|
||||
INT Size_rt;
|
||||
SET_ENTRY_P Set_table;
|
||||
INT Size_st;
|
||||
MEMBER_ENTRY_P Member_table;
|
||||
INT Size_mt;
|
||||
SORT_ENTRY_P Sort_table;
|
||||
INT Size_srt;
|
||||
FIELD_ENTRY_P Field_table;
|
||||
INT Size_fd;
|
||||
KEY_ENTRY_P Key_table;
|
||||
INT Size_kt;
|
||||
int Lock_lvl;
|
||||
#define LOCK_STACK_SIZE 10
|
||||
int Lock_stack[LOCK_STACK_SIZE];
|
||||
CNTRY_TBL_P country_tbl;
|
||||
int ctbl_activ;
|
||||
char ctbpath[FILENMLEN];
|
||||
llist Sk_list;
|
||||
} TASK;
|
||||
|
||||
/* Dynamically allocated global variables */
|
||||
#define app_locks db_global.App_locks.ptr
|
||||
#define excl_locks db_global.Excl_locks.ptr
|
||||
#define kept_locks db_global.Kept_locks.ptr
|
||||
#define rec_locks db_global.Rec_locks.ptr
|
||||
#define set_locks db_global.Set_locks.ptr
|
||||
#define key_locks db_global.Key_locks.ptr
|
||||
#define lock_pkt db_global.Lock_pkt.ptr
|
||||
#define free_pkt db_global.Free_pkt.ptr
|
||||
#define file_refs db_global.File_refs.ptr
|
||||
#define key_info db_global.Key_info.ptr
|
||||
#define curr_own db_global.Curr_own.ptr
|
||||
#define curr_mem db_global.Curr_mem.ptr
|
||||
#define rn_table db_global.Rn_table.ptr
|
||||
#define db_table db_global.Db_table.ptr
|
||||
#define file_table db_global.File_table.ptr
|
||||
#define record_table db_global.Record_table.ptr
|
||||
#define set_table db_global.Set_table.ptr
|
||||
#define member_table db_global.Member_table.ptr
|
||||
#define sort_table db_global.Sort_table.ptr
|
||||
#define field_table db_global.Field_table.ptr
|
||||
#define key_table db_global.Key_table.ptr
|
||||
#define pgzero db_global.Pgzero.ptr
|
||||
#define root_ix db_global.Root_ix.ptr
|
||||
/* Used in DIO.C and OVFCNS.C */
|
||||
#define ixpg_table Ixpg_table.ptr
|
||||
#define dbpgbuff Dbpgbuff.ptr
|
||||
#define ix_lookup Ix_lookup.ptr
|
||||
|
||||
/* Non-dynamically allocated global variables */
|
||||
#define lock_tries db_global.Lock_tries
|
||||
#define dbwait_time db_global.Dbwait_time
|
||||
#define db_timeout db_global.Db_timeout
|
||||
#define dbopen db_global.Dbopen
|
||||
#define db_lockmgr db_global.Db_lockmgr
|
||||
#define dbuserid db_global.Dbuserid
|
||||
#define dbdpath db_global.Dbdpath
|
||||
#define dbfpath db_global.Dbfpath
|
||||
#define trans_id db_global.Trans_id
|
||||
#define dblog db_global.Dblog
|
||||
#define keyl_cnt db_global.Keyl_cnt
|
||||
#define lp_size db_global.Lp_size
|
||||
#define fp_size db_global.Fp_size
|
||||
#define session_active db_global.Session_active
|
||||
#define cache_ovfl db_global.Cache_ovfl
|
||||
#define no_of_keys db_global.No_of_keys
|
||||
#define key_type db_global.Key_type
|
||||
#define net_status db_global.Net_status
|
||||
#define last_mtype db_global.Last_mtype
|
||||
#define dboptions db_global.Dboptions
|
||||
#define ov_initaddr db_global.Ov_initaddr
|
||||
#define ov_rootaddr db_global.Ov_rootaddr
|
||||
#define ov_nextaddr db_global.Ov_nextaddr
|
||||
#define page_size db_global.Page_size
|
||||
#define curr_db db_global.Curr_db
|
||||
#define curr_db_table db_global.Curr_db_table
|
||||
#define curr_rec db_global.Curr_rec
|
||||
#define ov_file db_global.Ov_file
|
||||
#define setdb_on db_global.Setdb_on
|
||||
#define no_of_dbs db_global.No_of_dbs
|
||||
#define curr_rn_table db_global.Curr_rn_table
|
||||
#define size_ft db_global.Size_ft
|
||||
#define size_rt db_global.Size_rt
|
||||
#define size_st db_global.Size_st
|
||||
#define size_mt db_global.Size_mt
|
||||
#define size_srt db_global.Size_srt
|
||||
#define size_fd db_global.Size_fd
|
||||
#define size_kt db_global.Size_kt
|
||||
#define lock_lvl db_global.Lock_lvl
|
||||
#define lock_stack db_global.Lock_stack
|
||||
#define ren_list db_global.Ren_list
|
||||
#define sk_list db_global.Sk_list
|
||||
|
||||
extern TASK db_global;
|
||||
extern int db_glob_init;
|
||||
|
||||
/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin dbxtrn.h */
|
||||
@@ -1,140 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: dtcover.h /main/2 1996/05/09 04:05:27 drk $ */
|
||||
/*
|
||||
* COMPONENT_NAME: austext
|
||||
*
|
||||
* FUNCTIONS: none
|
||||
*
|
||||
* ORIGINS: 157
|
||||
*
|
||||
*/
|
||||
/*----------------------------------------------------------------------------
|
||||
dtcover.h: converts d_* calls to dt_* for MULTI_TASKing
|
||||
|
||||
(C) Copyright 1988 by Raima Corporation.
|
||||
----------------------------------------------------------------------------*/
|
||||
/* ********************** EDIT HISTORY *******************************
|
||||
|
||||
SCR DATE INI DESCRIPTION
|
||||
----- --------- --- -----------------------------------------------------
|
||||
571 31-Jan-89 RSC Placed ctbpath inside NO_COUNTRY, not NO_TIMESTAMP
|
||||
*/
|
||||
|
||||
|
||||
#define d_close dt_close
|
||||
#define d_cmstat dt_cmstat
|
||||
#define d_cmtype dt_cmtype
|
||||
#define d_connect dt_connect
|
||||
#define d_cotype dt_cotype
|
||||
#define d_crget dt_crget
|
||||
#define d_crread dt_crread
|
||||
#define d_crset dt_crset
|
||||
#define d_crtype dt_crtype
|
||||
#define d_crwrite dt_crwrite
|
||||
#define d_csmget dt_csmget
|
||||
#define d_csmread dt_csmread
|
||||
#define d_csmset dt_csmset
|
||||
#define d_csmwrite dt_csmwrite
|
||||
#define d_csoget dt_csoget
|
||||
#define d_csoread dt_csoread
|
||||
#define d_csoset dt_csoset
|
||||
#define d_csowrite dt_csowrite
|
||||
#define d_ctbpath dt_ctbpath
|
||||
#define d_dbdpath dt_dbdpath
|
||||
#define d_dbfpath dt_dbfpath
|
||||
#define d_dblog dt_dblog
|
||||
#define d_dbtaf dt_dbtaf
|
||||
#define d_dbuserid dt_dbuserid
|
||||
#define d_delete dt_delete
|
||||
#define d_disdel dt_disdel
|
||||
#define d_recnext dt_recnext
|
||||
#define d_recprev dt_recprev
|
||||
#define d_destroy dt_destroy
|
||||
#define d_discon dt_discon
|
||||
#define d_fillnew dt_fillnew
|
||||
#define d_findco dt_findco
|
||||
#define d_findfm dt_findfm
|
||||
#define d_findlm dt_findlm
|
||||
#define d_findnm dt_findnm
|
||||
#define d_findpm dt_findpm
|
||||
#define d_freeall dt_freeall
|
||||
#define d_initialize dt_initialize
|
||||
#define d_initfile dt_initfile
|
||||
#define d_ismember dt_ismember
|
||||
#define d_isowner dt_isowner
|
||||
#define d_keydel dt_keydel
|
||||
#define d_keyexist dt_keyexist
|
||||
#define d_keyfind dt_keyfind
|
||||
#define d_keyfree dt_keyfree
|
||||
#define d_keyfrst dt_keyfrst
|
||||
#define d_keylast dt_keylast
|
||||
#define d_keylock dt_keylock
|
||||
#define d_keylstat dt_keylstat
|
||||
#define d_keynext dt_keynext
|
||||
#define d_keyprev dt_keyprev
|
||||
#define d_keyread dt_keyread
|
||||
#define d_keystore dt_keystore
|
||||
#define d_lock dt_lock
|
||||
#define d_makenew dt_makenew
|
||||
#define d_mapchar dt_mapchar
|
||||
#define d_members dt_members
|
||||
#define d_off_opt dt_off_opt
|
||||
#define d_on_opt dt_on_opt
|
||||
#define d_open dt_open
|
||||
#define d_rdcurr dt_rdcurr
|
||||
#define d_rerdcurr dt_rerdcurr
|
||||
#define d_recfree dt_recfree
|
||||
#define d_recfrst dt_recfrst
|
||||
#define d_reclast dt_reclast
|
||||
#define d_reclock dt_reclock
|
||||
#define d_reclstat dt_reclstat
|
||||
#define d_recover dt_recover
|
||||
#define d_recread dt_recread
|
||||
#define d_recset dt_recset
|
||||
#define d_recwrite dt_recwrite
|
||||
#define d_renfile dt_renfile
|
||||
#define d_retries dt_retries
|
||||
#define d_rlbclr dt_rlbclr
|
||||
#define d_rlbset dt_rlbset
|
||||
#define d_rlbtst dt_rlbtst
|
||||
#define d_set_dberr dt_set_dberr
|
||||
#define d_setdb dt_setdb
|
||||
#define d_setfree dt_setfree
|
||||
#define d_setkey dt_setkey
|
||||
#define d_setlock dt_setlock
|
||||
#define d_setlstat dt_setlstat
|
||||
#define d_setmm dt_setmm
|
||||
#define d_setmo dt_setmo
|
||||
#define d_setmr dt_setmr
|
||||
#define d_setom dt_setom
|
||||
#define d_setoo dt_setoo
|
||||
#define d_setor dt_setor
|
||||
#define d_setrm dt_setrm
|
||||
#define d_setro dt_setro
|
||||
#define d_timeout dt_timeout
|
||||
#define d_trabort dt_trabort
|
||||
#define d_trbegin dt_trbegin
|
||||
#define d_trend dt_trend
|
||||
#define d_wrcurr dt_wrcurr
|
||||
/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC dtcover.h */
|
||||
@@ -1,86 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* COMPONENT_NAME: austext
|
||||
*
|
||||
* FUNCTIONS: sizeof
|
||||
*
|
||||
* ORIGINS: 27,157
|
||||
*
|
||||
* (C) COPYRIGHT International Business Machines Corp. 1995, 1996
|
||||
* All Rights Reserved
|
||||
* US Government Users Restricted Rights - Use, duplication or
|
||||
* disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
|
||||
*/
|
||||
/*----------------------------------------------------------------------------
|
||||
$XConsortium: inittab.h /main/5 1996/11/25 18:48:42 drk $
|
||||
inittab.h: db_VISTA header file containing:
|
||||
|
||||
- Compatible dictionary file versions
|
||||
|
||||
This file is intended to be included in inittab.c only. There are
|
||||
multiple versions of inittab.c which share this header.
|
||||
|
||||
(An #include "vista.h" must precede this include)
|
||||
|
||||
(C) Copyright 1987 by Raima Corporation.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/* ********************** EDIT HISTORY *******************************
|
||||
|
||||
SCR DATE INI DESCRIPTION
|
||||
----- --------- --- -----------------------------------------------------
|
||||
101 21-Jun-88 RSC Added decl for rn_type and rn_dba for ONE_DB
|
||||
08-Aug-88 RTK Moved rn_dba and rn_type to vista.h - needed in rec*.c
|
||||
18-Aug-88 RSC Moved rn_type/dba to separate table, add curr_rn_table..
|
||||
|
||||
$Log$
|
||||
* Revision 1.2 1995/10/13 18:36:46 miker
|
||||
* Changed compat_dbd[] from hardcoded str to dbd_VERSION.
|
||||
* (dbd_VERSION in vista.h changed bcs expanded max file name length.)
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
int db_status = 0;
|
||||
|
||||
/* database dictionary tables */
|
||||
INT largest_page = 0;
|
||||
|
||||
char *crloc = NULL;
|
||||
|
||||
INT old_size_ft = 0;
|
||||
INT old_size_fd = 0;
|
||||
INT old_size_st = 0;
|
||||
INT old_size_mt = 0;
|
||||
INT old_size_srt = 0;
|
||||
INT old_size_kt = 0;
|
||||
INT old_size_rt = 0;
|
||||
INT old_no_of_dbs = 0;
|
||||
|
||||
/* Compatible dictionary versions */
|
||||
char *compat_dbd[] = {
|
||||
dbd_VERSION
|
||||
};
|
||||
int size_compat = sizeof(compat_dbd)/sizeof(*compat_dbd);
|
||||
/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin inittab.h */
|
||||
@@ -1,66 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: ll.h /main/2 1996/05/09 04:11:29 drk $ */
|
||||
/*
|
||||
* COMPONENT_NAME: austext
|
||||
*
|
||||
* FUNCTIONS: LLIST_INIT
|
||||
* LL_ELEM_INIT
|
||||
* ll_access
|
||||
* ll_append
|
||||
* ll_deaccess
|
||||
* ll_first
|
||||
* ll_free
|
||||
* ll_next
|
||||
* ll_prepend
|
||||
*
|
||||
* ORIGINS: 157
|
||||
*
|
||||
*/
|
||||
/* The functions in this file are defined in alloc.c */
|
||||
|
||||
typedef struct {struct ll_elem *ptr; LOCK_DESC} LL_P;
|
||||
|
||||
typedef struct ll_elem {
|
||||
LL_P next;
|
||||
CHAR_P data;
|
||||
} ll_elem;
|
||||
|
||||
#define LL_ELEM_INIT() { POINTER_INIT(), POINTER_INIT() }
|
||||
|
||||
typedef struct {
|
||||
LL_P head;
|
||||
LL_P tail;
|
||||
LL_P *curr;
|
||||
} llist;
|
||||
|
||||
#define LLIST_INIT() { POINTER_INIT(), POINTER_INIT(), NULL }
|
||||
|
||||
BOOLEAN ll_access(P1(llist *));
|
||||
int ll_append(P1(llist *) Pi(CHAR_P *));
|
||||
#define ll_deaccess(ll) /**/
|
||||
CHAR_P *ll_first(P1(llist *));
|
||||
void ll_free(P1(llist *));
|
||||
CHAR_P *ll_next(P1(llist *));
|
||||
int ll_prepend(P1(llist *) Pi(CHAR_P *));
|
||||
/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin ll.h */
|
||||
@@ -1,125 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: ncb.h /main/2 1996/05/09 04:12:28 drk $ */
|
||||
/*
|
||||
* COMPONENT_NAME: austext
|
||||
*
|
||||
* FUNCTIONS: none
|
||||
*
|
||||
* ORIGINS: 157
|
||||
*
|
||||
*/
|
||||
#define NETNAME_LEN 16
|
||||
#ifndef NULL
|
||||
#define NULL (char *)0
|
||||
#endif
|
||||
|
||||
#define NETBIOS_INT 0x5c
|
||||
|
||||
#define ADDNAME 0x30
|
||||
#define DELNAME 0x31
|
||||
#define RESET 0x32
|
||||
#define STATUS 0x33
|
||||
#define SESSTAT 0x34
|
||||
#define CALL 0x10
|
||||
#define LISTEN 0x11
|
||||
#define HANGUP 0x12
|
||||
#define SEND 0x14
|
||||
#define RECEIVE 0x15
|
||||
#define ADDNAIT 0xB0
|
||||
#define DELNAIT 0xB1
|
||||
#define CALNAIT 0x90
|
||||
#define LISNAIT 0x91
|
||||
#define HANNAIT 0x92
|
||||
#define SENNAIT 0x94
|
||||
#define RECNAIT 0x95
|
||||
#define ARENAIT 0x96
|
||||
#define ANY 0xFF
|
||||
#define PENDING 0xFFFF
|
||||
#define NCBSIZE 64
|
||||
|
||||
#ifdef TURBO
|
||||
#ifdef __SMALL__
|
||||
#define SMALL_DATA
|
||||
#endif
|
||||
#ifdef __MEDIUM__
|
||||
#define SMALL_DATA
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MSC
|
||||
#ifdef M_I86SM
|
||||
#define SMALL_DATA
|
||||
#endif
|
||||
#ifdef M_I86MM
|
||||
#define SMALL_DATA
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef LAT
|
||||
#ifdef SPTR
|
||||
#define SMALL_DATA
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/***** NCB Commands parameter block *****/
|
||||
typedef struct {
|
||||
char command; /* NETBIOS Command */
|
||||
char retcode; /* Return value (some enumerated below) */
|
||||
char lsn; /* Local session number */
|
||||
char num; /* Name number */
|
||||
char *buffer_off; /* Message buffer offset */
|
||||
#ifdef SMALL_DATA
|
||||
int buffer_seg; /* Message buffer segment */
|
||||
#endif
|
||||
int length; /* Length of message buffer */
|
||||
char callname[NETNAME_LEN]; /* Name of user being called */
|
||||
char name[NETNAME_LEN]; /* My name */
|
||||
char rto; /* Receive timeout (500ms units) */
|
||||
char sto; /* Send timeout (500ms units) */
|
||||
char *post_off; /* Post function offset */
|
||||
#ifdef SMALL_DATA
|
||||
int post_seg; /* Post function segment */
|
||||
#endif
|
||||
char lana_num; /* Local area network adapter number (use 0) */
|
||||
char cmd_cplt; /* Command complete return value, used when posting */
|
||||
char reserve[14]; /* reserved for Net BIOS */
|
||||
} NCB;
|
||||
|
||||
typedef struct {
|
||||
char rep_sess;
|
||||
char name_sess;
|
||||
char gram;
|
||||
char rcvany;
|
||||
struct {
|
||||
char lsn;
|
||||
char state_sess;
|
||||
char loc_name[16];
|
||||
char rem_name[16];
|
||||
char rcvs;
|
||||
char sends;
|
||||
} s[32];
|
||||
} SESSION;
|
||||
|
||||
#define NCB_H
|
||||
/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin ncb.h */
|
||||
@@ -1,281 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $TOG: proto.h /main/5 1998/03/19 19:00:54 mgreess $ */
|
||||
/*
|
||||
* COMPONENT_NAME: austext
|
||||
*
|
||||
* FUNCTIONS: ADDRcmp
|
||||
* ALLOC_TABLE
|
||||
* INTcmp
|
||||
* Pi
|
||||
* alloc_table
|
||||
* check_dba
|
||||
* close
|
||||
* con_dbd
|
||||
* con_dbf
|
||||
* dbn_check
|
||||
* dio_close
|
||||
* dio_clrfile
|
||||
* dio_findpg
|
||||
* dio_get
|
||||
* dio_open
|
||||
* dio_out
|
||||
* dio_pzalloc
|
||||
* dio_pzdel
|
||||
* dio_pzgetts
|
||||
* dio_pznext
|
||||
* dio_pzread
|
||||
* dio_pzsetts
|
||||
* dio_read
|
||||
* dio_release
|
||||
* dio_rrlb
|
||||
* dio_setdef
|
||||
* dio_touch
|
||||
* dio_write
|
||||
* dio_wrlb
|
||||
* exit
|
||||
* fldcmp
|
||||
* free
|
||||
* get_element
|
||||
* getenv
|
||||
* initdbt
|
||||
* key_bldcom
|
||||
* key_boundary
|
||||
* key_cmpcpy
|
||||
* key_delete
|
||||
* key_init
|
||||
* key_insert
|
||||
* key_locpos
|
||||
* key_reset
|
||||
* key_scan
|
||||
* locking
|
||||
* lseek
|
||||
* memcmp
|
||||
* memcpy
|
||||
* memset
|
||||
* nfld_check
|
||||
* nrec_check
|
||||
* nset_check
|
||||
* null_dba
|
||||
* nw_addnm
|
||||
* nw_call
|
||||
* nw_cleanup
|
||||
* nw_delnm
|
||||
* nw_hangup
|
||||
* nw_rcvmsg
|
||||
* nw_reset
|
||||
* nw_send
|
||||
* o_fileinit
|
||||
* o_pages
|
||||
* o_pzwrite
|
||||
* o_search
|
||||
* o_write
|
||||
* open_b
|
||||
* r_chkfld
|
||||
* r_clropt
|
||||
* r_delrec
|
||||
* r_gfld
|
||||
* r_gmem
|
||||
* r_gset
|
||||
* r_pfld
|
||||
* r_pmem
|
||||
* r_pset
|
||||
* r_setopt
|
||||
* r_smem
|
||||
* r_tstopt
|
||||
* read
|
||||
* startup
|
||||
* strcat
|
||||
* strchr
|
||||
* strcmp
|
||||
* strcpy
|
||||
* strlen
|
||||
* strncmp
|
||||
* strncpy
|
||||
* strrchr
|
||||
* taf_add
|
||||
* taf_del
|
||||
* task_switch
|
||||
* taskinit
|
||||
* time
|
||||
* unlink
|
||||
* write
|
||||
*
|
||||
* ORIGINS: 157
|
||||
*
|
||||
*/
|
||||
/*----------------------------------------------------------------------------
|
||||
proto.h: db_VISTA function declaration header file
|
||||
|
||||
(This file must be included after dbtype.h)
|
||||
|
||||
(C) Copyright 1988 by Raima Corporation.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/* ********************** EDIT HISTORY *******************************
|
||||
|
||||
SCR DATE INI DESCRIPTION
|
||||
----- --------- --- -----------------------------------------------------
|
||||
03-AUG-88 RTK Added internal MULTI_TASKing function prototypes
|
||||
310 10-Aug-88 RSC Cleanup of function prototypes
|
||||
|
||||
*/
|
||||
|
||||
/* From dberr.c: */
|
||||
void dbautorec(void);
|
||||
|
||||
/* From dblfcns.c: */
|
||||
int taskinit(TASK *);
|
||||
int initdbt(const char *);
|
||||
int alloc_table(CHAR_P *, unsigned, unsigned);
|
||||
#define ALLOC_TABLE(t, n, o, v) alloc_table((CHAR_P *)(t), n, o)
|
||||
void termfree(void);
|
||||
|
||||
/* From dio.c: */
|
||||
int dio_open(FILE_NO);
|
||||
int dio_close(FILE_NO);
|
||||
int dio_init(void);
|
||||
void dio_free(void);
|
||||
int dio_clrfile(FILE_NO);
|
||||
int dio_clear(void);
|
||||
int dio_flush(void);
|
||||
void dio_setdef(FILE_NO);
|
||||
int dio_get(F_ADDR, char **, int);
|
||||
int dio_touch(F_ADDR);
|
||||
int dio_read(DB_ADDR, char **, int);
|
||||
int dio_write(DB_ADDR, const char *, int);
|
||||
int dio_release(DB_ADDR);
|
||||
int dio_rrlb(DB_ADDR, INT *);
|
||||
int dio_wrlb(DB_ADDR, INT);
|
||||
int dio_findpg(FILE_NO, F_ADDR, PAGE_ENTRY *, PAGE_ENTRY **, LOOKUP_ENTRY **);
|
||||
int dio_out(PAGE_ENTRY *, LOOKUP_ENTRY *);
|
||||
int dio_pzread(FILE_NO);
|
||||
int dio_pzalloc(FILE_NO, F_ADDR *);
|
||||
int dio_pzdel(FILE_NO, F_ADDR);
|
||||
F_ADDR dio_pznext(FILE_NO);
|
||||
void dio_pzclr(void);
|
||||
|
||||
/* From initenv.c: */
|
||||
int initenv(void);
|
||||
|
||||
/* From inittab.c: */
|
||||
int inittab(void);
|
||||
|
||||
/* From keyfcns.c: */
|
||||
int key_open(void);
|
||||
void key_close(void);
|
||||
int key_init(int);
|
||||
int key_reset(FILE_NO);
|
||||
int key_locpos(const char *, DB_ADDR *);
|
||||
int key_scan(int, DB_ADDR *);
|
||||
int key_boundary(int, DB_ADDR *);
|
||||
int key_insert(int, const char *, DB_ADDR);
|
||||
int key_delete(int, const char *, DB_ADDR);
|
||||
/* Due to a problem with MSC 5.1, we couldn't declare the 2nd parm
|
||||
of key_bldcom as const (see keyfcns.c) */
|
||||
int key_bldcom(int, char *, char *, int);
|
||||
/* Because of a "problem" with the MSC 5.1 compiler, we couldn't declare
|
||||
the second argument to key_cmpcpy with a const attribute. Hence we
|
||||
were not able to define the 2nd argument of key_bldcom as const. */
|
||||
void key_cmpcpy(char *, char *, INT);
|
||||
|
||||
/* From libfcns.c: */
|
||||
int dbn_check(int);
|
||||
int nset_check(int, int *, SET_ENTRY **);
|
||||
int nfld_check(long, int *, int *, RECORD_ENTRY **, FIELD_ENTRY **);
|
||||
int nrec_check(int, int *, RECORD_ENTRY **);
|
||||
int fldcmp(FIELD_ENTRY *, const char *, const char *);
|
||||
int INTcmp(const char *, const char *);
|
||||
int ADDRcmp(const DB_ADDR *, const DB_ADDR *);
|
||||
int null_dba(const char *);
|
||||
int check_dba(DB_ADDR);
|
||||
|
||||
/* From makenew.c: */
|
||||
int sk_free(void);
|
||||
|
||||
/* From netwdos.c: */
|
||||
int netbios_chk(void);
|
||||
int nw_reset(int, int);
|
||||
int nw_addnm(char *, int *);
|
||||
int nw_cleanup(char *);
|
||||
int nw_sestat(void);
|
||||
int nw_delnm(char *);
|
||||
int nw_call(char *, char *, int *);
|
||||
int nw_hangup(int);
|
||||
int nw_send(int, MESSAGE *, int);
|
||||
int nw_rcvmsg(int, MESSAGE *, int, int *);
|
||||
|
||||
/* From opens.c: */
|
||||
int open_b(const char *, int);
|
||||
|
||||
/* From ovfcns.c: */
|
||||
int o_setup(void);
|
||||
int o_init(void);
|
||||
int o_fileinit(FILE_NO);
|
||||
int o_search(FILE_NO, F_ADDR, F_ADDR *);
|
||||
int o_write(PAGE_ENTRY *, LOOKUP_ENTRY *);
|
||||
int o_pzwrite(FILE_NO);
|
||||
int o_flush(void);
|
||||
int o_update(void);
|
||||
long o_pages(FILE_NO);
|
||||
void o_free(void);
|
||||
|
||||
/* From recfcns.c: */
|
||||
int r_chkfld(INT, FIELD_ENTRY *, char *, const char *);
|
||||
int r_delrec(INT, DB_ADDR);
|
||||
int r_gfld(FIELD_ENTRY *, char *, char *);
|
||||
int r_gmem(int, char *, char *);
|
||||
int r_gset(int, char *, char *);
|
||||
int r_pfld(INT, FIELD_ENTRY *, char *, const char *, DB_ADDR *);
|
||||
int r_pmem(int, char *, char *);
|
||||
int r_pset(int, char *, char *);
|
||||
int r_smem(DB_ADDR *, INT);
|
||||
int r_setopt(FIELD_ENTRY *, char *);
|
||||
int r_clropt(FIELD_ENTRY *, char *);
|
||||
int r_tstopt(FIELD_ENTRY *, char *);
|
||||
|
||||
/* From pathfcns.c */
|
||||
int con_dbd(char *, char *, char *);
|
||||
int con_dbf(char *, char *, char *, char *);
|
||||
char * get_element(char *, int);
|
||||
|
||||
/* From renfile.c: */
|
||||
int renfiles(void);
|
||||
|
||||
/* From startup.c: */
|
||||
int startup(DBN_FIX_D1 TASK_PTR_Di LOCK_Di);
|
||||
|
||||
/* From taffcns.c: */
|
||||
int taf_open(void);
|
||||
int taf_close(void);
|
||||
int taf_access(void);
|
||||
int taf_release(void);
|
||||
int taf_add(const char *);
|
||||
int taf_del(const char *);
|
||||
|
||||
/* From mapchar.c */
|
||||
int ctb_init(void);
|
||||
int ctbl_alloc(void);
|
||||
void ctbl_free(void);
|
||||
|
||||
/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin proto.h */
|
||||
@@ -1,479 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: task.h /main/2 1996/05/09 04:20:28 drk $ */
|
||||
/*
|
||||
* COMPONENT_NAME: austext
|
||||
*
|
||||
* FUNCTIONS: Pi
|
||||
* d_close
|
||||
* d_cmstat
|
||||
* d_cmtype
|
||||
* d_connect
|
||||
* d_costat
|
||||
* d_cotype
|
||||
* d_crget
|
||||
* d_crread
|
||||
* d_crset
|
||||
* d_crstat
|
||||
* d_crtype
|
||||
* d_crwrite
|
||||
* d_csmget
|
||||
* d_csmread
|
||||
* d_csmset
|
||||
* d_csmwrite
|
||||
* d_csoget
|
||||
* d_csoread
|
||||
* d_csoset
|
||||
* d_csowrite
|
||||
* d_csstat
|
||||
* d_ctscm
|
||||
* d_ctsco
|
||||
* d_ctscr
|
||||
* d_dbdpath
|
||||
* d_dbfpath
|
||||
* d_dblog
|
||||
* d_dbuserid
|
||||
* d_delete
|
||||
* d_destroy
|
||||
* d_discon
|
||||
* d_disdel
|
||||
* d_fillnew
|
||||
* d_findco
|
||||
* d_findfm
|
||||
* d_findlm
|
||||
* d_findnm
|
||||
* d_findpm
|
||||
* d_freeall
|
||||
* d_gtscm
|
||||
* d_gtsco
|
||||
* d_gtscr
|
||||
* d_gtscs
|
||||
* d_initfile
|
||||
* d_initialize
|
||||
* d_ismember
|
||||
* d_isowner
|
||||
* d_keydel
|
||||
* d_keyexist
|
||||
* d_keyfind
|
||||
* d_keyfree
|
||||
* d_keyfrst
|
||||
* d_keylast
|
||||
* d_keylock
|
||||
* d_keylstat
|
||||
* d_keynext
|
||||
* d_keyprev
|
||||
* d_keyread
|
||||
* d_keystore
|
||||
* d_lock
|
||||
* d_makenew
|
||||
* d_members
|
||||
* d_off_opt
|
||||
* d_on_opt
|
||||
* d_open
|
||||
* d_rdcurr
|
||||
* d_recfree
|
||||
* d_recfrst
|
||||
* d_reclast
|
||||
* d_reclock
|
||||
* d_reclstat
|
||||
* d_recnext
|
||||
* d_recover
|
||||
* d_recprev
|
||||
* d_recread
|
||||
* d_recset
|
||||
* d_recstat
|
||||
* d_recwrite
|
||||
* d_renfile
|
||||
* d_rerdcurr
|
||||
* d_retries
|
||||
* d_rlbclr
|
||||
* d_rlbset
|
||||
* d_rlbtst
|
||||
* d_set_dberr
|
||||
* d_setdb
|
||||
* d_setfree
|
||||
* d_setkey
|
||||
* d_setlock
|
||||
* d_setlstat
|
||||
* d_setmm
|
||||
* d_setmo
|
||||
* d_setmr
|
||||
* d_setom
|
||||
* d_setoo
|
||||
* d_setor
|
||||
* d_setrm
|
||||
* d_setro
|
||||
* d_stscm
|
||||
* d_stsco
|
||||
* d_stscr
|
||||
* d_stscs
|
||||
* d_timeout
|
||||
* d_trabort
|
||||
* d_trbegin
|
||||
* d_trend
|
||||
* d_utscm
|
||||
* d_utsco
|
||||
* d_utscr
|
||||
* d_utscs
|
||||
* d_wrcurr
|
||||
* dt_closetask
|
||||
* dt_cmstat
|
||||
* dt_cmtype
|
||||
* dt_connect
|
||||
* dt_costat
|
||||
* dt_cotype
|
||||
* dt_crget
|
||||
* dt_crread
|
||||
* dt_crset
|
||||
* dt_crtype
|
||||
* dt_crwrite
|
||||
* dt_csmget
|
||||
* dt_csmread
|
||||
* dt_csmset
|
||||
* dt_csmwrite
|
||||
* dt_csoget
|
||||
* dt_csoread
|
||||
* dt_csoset
|
||||
* dt_csowrite
|
||||
* dt_csstat
|
||||
* dt_ctbpath
|
||||
* dt_ctscm
|
||||
* dt_ctsco
|
||||
* dt_ctscr
|
||||
* dt_dbdpath
|
||||
* dt_dbfpath
|
||||
* dt_dblog
|
||||
* dt_dbuserid
|
||||
* dt_destroy
|
||||
* dt_discon
|
||||
* dt_fillnew
|
||||
* dt_findco
|
||||
* dt_findfm
|
||||
* dt_findlm
|
||||
* dt_findnm
|
||||
* dt_findpm
|
||||
* dt_gtscm
|
||||
* dt_gtsco
|
||||
* dt_gtscr
|
||||
* dt_gtscs
|
||||
* dt_initfile
|
||||
* dt_ismember
|
||||
* dt_isowner
|
||||
* dt_keydel
|
||||
* dt_keyexist
|
||||
* dt_keyfind
|
||||
* dt_keyfree
|
||||
* dt_keyfrst
|
||||
* dt_keylast
|
||||
* dt_keylock
|
||||
* dt_keylstat
|
||||
* dt_keynext
|
||||
* dt_keyprev
|
||||
* dt_keyread
|
||||
* dt_keystore
|
||||
* dt_lock
|
||||
* dt_makenew
|
||||
* dt_mapchar
|
||||
* dt_members
|
||||
* dt_off_opt
|
||||
* dt_on_opt
|
||||
* dt_open
|
||||
* dt_opentask
|
||||
* dt_rdcurr
|
||||
* dt_recfree
|
||||
* dt_recfrst
|
||||
* dt_reclast
|
||||
* dt_reclock
|
||||
* dt_reclstat
|
||||
* dt_recover
|
||||
* dt_recread
|
||||
* dt_recset
|
||||
* dt_recstat
|
||||
* dt_recwrite
|
||||
* dt_renfile
|
||||
* dt_rerdcurr
|
||||
* dt_retries
|
||||
* dt_set_dberr
|
||||
* dt_setdb
|
||||
* dt_setfree
|
||||
* dt_setkey
|
||||
* dt_setlock
|
||||
* dt_setlstat
|
||||
* dt_setmm
|
||||
* dt_setmo
|
||||
* dt_setmr
|
||||
* dt_setom
|
||||
* dt_setoo
|
||||
* dt_setor
|
||||
* dt_setrm
|
||||
* dt_setro
|
||||
* dt_stscm
|
||||
* dt_stsco
|
||||
* dt_stscr
|
||||
* dt_stscs
|
||||
* dt_timeout
|
||||
* dt_trbegin
|
||||
* dt_utscm
|
||||
* dt_utsco
|
||||
* dt_utscr
|
||||
* dt_utscs
|
||||
* dt_wrcurr
|
||||
*
|
||||
* ORIGINS: 157
|
||||
*
|
||||
*/
|
||||
/*----------------------------------------------------------------------------
|
||||
task.h: db_VISTA task cover function declaration header file
|
||||
|
||||
(C) Copyright 1988 by Raima Corporation.
|
||||
----------------------------------------------------------------------------*/
|
||||
/* ********************** EDIT HISTORY *******************************
|
||||
|
||||
SCR DATE INI DESCRIPTION
|
||||
----- --------- --- -----------------------------------------------------
|
||||
571 31-Jan-89 RSC Placed ctbpath inside NO_COUNTRY, not NO_TIMESTAMP
|
||||
*/
|
||||
|
||||
|
||||
int EXTERNAL_FIXED dt_opentask(P1(DB_TASK *));
|
||||
int EXTERNAL_FIXED dt_closetask(P1(DB_TASK));
|
||||
|
||||
int EXTERNAL_FIXED dt_close(TASK_D1); /* dblfcns.c */
|
||||
int EXTERNAL_DBN dt_cmstat(P1(int) TASK_Di DBN_Dn); /* cmstat.c */
|
||||
int EXTERNAL_DBN dt_cmtype(P1(int) Pi(int *) TASK_Di DBN_Dn);
|
||||
/* cmtype.c */
|
||||
int EXTERNAL_DBN dt_connect(P1(int) TASK_Di DBN_Dn); /* connect.c */
|
||||
int EXTERNAL_DBN dt_cotype(P1(int) Pi(int *) TASK_Di DBN_Dn);
|
||||
/* cotype.c */
|
||||
int EXTERNAL_DBN dt_crget(P1(DB_ADDR *) TASK_Di DBN_Dn); /* crget.c */
|
||||
int EXTERNAL_DBN dt_crread(P1(long) Pi(char *) TASK_Di DBN_Dn);
|
||||
/* crread.c */
|
||||
int EXTERNAL_DBN dt_crset(P1(DB_ADDR *) TASK_Di DBN_Dn); /* crset.c */
|
||||
int EXTERNAL_DBN dt_crtype(P1(int *) TASK_Di DBN_Dn); /* crtype.c */
|
||||
int EXTERNAL_DBN dt_crwrite(P1(long) Pi(char *) TASK_Di DBN_Dn);
|
||||
/* crwrite.c */
|
||||
int EXTERNAL_DBN dt_csmget(P1(int) Pi(DB_ADDR *) TASK_Di DBN_Dn);
|
||||
/* csmget.c */
|
||||
int EXTERNAL_DBN dt_csmread(P1(int) Pi(long) Pi(char *) TASK_Di DBN_Dn);
|
||||
/* csmread.c */
|
||||
int EXTERNAL_DBN dt_csmset(P1(int) Pi(DB_ADDR *) TASK_Di DBN_Dn);
|
||||
/* csmset.c */
|
||||
int EXTERNAL_DBN dt_csmwrite(P1(int) Pi(long) Pi(const char *) TASK_Di
|
||||
DBN_Dn); /* csmwrite.c */
|
||||
int EXTERNAL_DBN dt_csoget(P1(int) Pi(DB_ADDR *) TASK_Di DBN_Dn);
|
||||
/* csoget.c */
|
||||
int EXTERNAL_DBN dt_csoread(P1(int) Pi(long) Pi(char *) TASK_Di DBN_Dn);
|
||||
/* csoread.c */
|
||||
int EXTERNAL_DBN dt_csoset(P1(int) Pi(DB_ADDR *) TASK_Di DBN_Dn);
|
||||
/* csoset.c */
|
||||
int EXTERNAL_DBN dt_csowrite(P1(int) Pi(long) Pi(const char *) TASK_Di
|
||||
DBN_Dn); /* csowrite.c */
|
||||
int EXTERNAL_FIXED dt_ctbpath(P1(const char *) TASK_Di); /* pathfcns.c */
|
||||
int EXTERNAL_FIXED dt_dbdpath(P1(const char *) TASK_Di ); /* dbdpath.c */
|
||||
int EXTERNAL_FIXED dt_dbfpath(P1(const char *) TASK_Di ); /* dbfpath.c */
|
||||
int EXTERNAL_FIXED dt_dblog(P1(const char *) TASK_Di ); /* dblog.c */
|
||||
int EXTERNAL_FIXED dt_dbuserid(P1(const char *) TASK_Di ); /* dbuserid.c */
|
||||
int EXTERNAL_DBN dt_delete(TASK_D1 DBN_Dn); /* delete.c */
|
||||
int EXTERNAL_DBN dt_disdel(TASK_D1 DBN_Dn); /* disdel.c */
|
||||
int EXTERNAL_DBN dt_recnext(TASK_D1 DBN_Dn); /* recnext.c */
|
||||
int EXTERNAL_DBN dt_recprev(TASK_D1 DBN_Dn); /* recprev.c */
|
||||
int EXTERNAL_FIXED dt_destroy(P1(const char *) TASK_Di ); /* destroy.c */
|
||||
int EXTERNAL_DBN dt_discon(P1(int) TASK_Di DBN_Dn); /* discon.c */
|
||||
int EXTERNAL_DBN dt_fillnew(P1(int) Pi(const char *) TASK_Di DBN_Dn);
|
||||
/* fillnew.c */
|
||||
int EXTERNAL_DBN dt_findco(P1(int) TASK_Di DBN_Dn); /* findco.c */
|
||||
int EXTERNAL_DBN dt_findfm(P1(int) TASK_Di DBN_Dn); /* findfm.c */
|
||||
int EXTERNAL_DBN dt_findlm(P1(int) TASK_Di DBN_Dn); /* findlm.c */
|
||||
int EXTERNAL_DBN dt_findnm(P1(int) TASK_Di DBN_Dn); /* findnm.c */
|
||||
int EXTERNAL_DBN dt_findpm(P1(int) TASK_Di DBN_Dn); /* findpm.c */
|
||||
int EXTERNAL_FIXED dt_freeall(TASK_D1); /* dblfcns.c */
|
||||
int EXTERNAL_DBN dt_initialize(TASK_D1 DBN_Dn); /* initial.c */
|
||||
int EXTERNAL_DBN dt_initfile(P1(FILE_NO) TASK_Di DBN_Dn); /* initial.c */
|
||||
int EXTERNAL_DBN dt_ismember(P1(int) TASK_Di DBN_Dn); /* ismember.c */
|
||||
int EXTERNAL_DBN dt_isowner(P1(int) TASK_Di DBN_Dn); /* isowner.c */
|
||||
int EXTERNAL_DBN dt_keydel(P1(long) TASK_Di DBN_Dn); /* keydel.c */
|
||||
int EXTERNAL_DBN dt_keyexist(P1(long) TASK_Di DBN_Dn); /* keyexist.c */
|
||||
int EXTERNAL_DBN dt_keyfind(P1(long) Pi(const char *) TASK_Di DBN_Dn);
|
||||
/* keyfind.c */
|
||||
int EXTERNAL_DBN dt_keyfree(P1(long) TASK_Di DBN_Dn); /* dblfcns.c */
|
||||
int EXTERNAL_DBN dt_keyfrst(P1(long) TASK_Di DBN_Dn); /* keyfrst.c */
|
||||
int EXTERNAL_DBN dt_keylast(P1(long) TASK_Di DBN_Dn); /* keylast.c */
|
||||
int EXTERNAL_DBN dt_keylock(P1(long) Pi(char *) TASK_Di DBN_Dn);
|
||||
/* dblfcns.c */
|
||||
int EXTERNAL_DBN dt_keylstat(P1(long) Pi(char *) TASK_Di DBN_Dn);
|
||||
/* dblfcns.c */
|
||||
int EXTERNAL_DBN dt_keynext(P1(long) TASK_Di DBN_Dn); /* keynext.c */
|
||||
int EXTERNAL_DBN dt_keyprev(P1(long) TASK_Di DBN_Dn); /* keyprev.c */
|
||||
int EXTERNAL_FIXED dt_keyread(P1(char *) TASK_Di ); /* keyfcns.c */
|
||||
int EXTERNAL_DBN dt_keystore(P1(long) TASK_Di DBN_Dn); /* keystore.c */
|
||||
int EXTERNAL_DBN dt_lock(P1(int) Pi(LOCK_REQUEST *) TASK_Di DBN_Dn);
|
||||
/* dblfcns.c */
|
||||
int EXTERNAL_DBN dt_makenew(P1(int) TASK_Di DBN_Dn); /* makenew.c */
|
||||
int EXTERNAL_FIXED dt_mapchar(P1(unsigned char) Pi(unsigned char)
|
||||
Pi(const char *) Pi(unsigned char) TASK_Di);
|
||||
/* mapchar.c */
|
||||
int EXTERNAL_DBN dt_members(P1(int) Pi(LONG *) TASK_Di DBN_Dn);
|
||||
/* members.c */
|
||||
int EXTERNAL_FIXED dt_off_opt(P1(int) TASK_Di ); /* options.c */
|
||||
int EXTERNAL_FIXED dt_on_opt(P1(int) TASK_Di ); /* options.c */
|
||||
int EXTERNAL_FIXED dt_open(P1(const char *) Pi(const char *) TASK_Di);
|
||||
/* dblfcns.c */
|
||||
int EXTERNAL_FIXED dt_rdcurr(P1(DB_ADDR **) Pi(int *) TASK_Di);
|
||||
/* rwcurr.c */
|
||||
int EXTERNAL_FIXED dt_rerdcurr(P1(DB_ADDR **) TASK_Di); /* rwcurr.c */
|
||||
int EXTERNAL_FIXED dt_wrcurr(P1(DB_ADDR *) TASK_Di); /* rwcurr.c */
|
||||
int EXTERNAL_DBN dt_recfree(P1(int) TASK_Di DBN_Dn); /* dblfcns.c */
|
||||
int EXTERNAL_DBN dt_recfrst(P1(int) TASK_Di DBN_Dn); /* recfrst.c */
|
||||
int EXTERNAL_DBN dt_reclast(P1(int) TASK_Di DBN_Dn); /* reclast.c */
|
||||
int EXTERNAL_DBN dt_reclock(P1(int) Pi(char *) TASK_Di DBN_Dn);
|
||||
/* dblfcns.c */
|
||||
int EXTERNAL_DBN dt_reclstat(P1(int) Pi(char *) TASK_Di DBN_Dn);
|
||||
/* dblfcns.c */
|
||||
int EXTERNAL_FIXED dt_recover(P1(const char *) TASK_Di ); /* recover.c */
|
||||
int EXTERNAL_DBN dt_recread(P1(char *) TASK_Di DBN_Dn); /* recread.c */
|
||||
int EXTERNAL_DBN dt_recset(P1(int) TASK_Di DBN_Dn); /* recset.c */
|
||||
int EXTERNAL_DBN dt_recwrite(P1(const char *) TASK_Di DBN_Dn);
|
||||
/* recwrite.c */
|
||||
int EXTERNAL_FIXED dt_renfile(P1(const char *) Pi(FILE_NO)
|
||||
Pi(const char *) TASK_Di); /* renfile.c */
|
||||
int EXTERNAL_FIXED dt_retries(P1(int) TASK_Di ); /* dblfcns.c */
|
||||
int EXTERNAL_FIXED dt_rlbclr(TASK_D1); /* dblfcns.c */
|
||||
int EXTERNAL_FIXED dt_rlbset(TASK_D1); /* dblfcns.c */
|
||||
int EXTERNAL_FIXED dt_rlbtst(TASK_D1); /* dblfcns.c */
|
||||
int EXTERNAL_FIXED dt_set_dberr(P1(FARPROC) TASK_Di); /* dberr.c */
|
||||
int EXTERNAL_FIXED dt_setdb(P1(int) TASK_Di); /* setdb.c */
|
||||
int EXTERNAL_DBN dt_setfree(P1(int) TASK_Di DBN_Dn); /* dblfcns.c */
|
||||
int EXTERNAL_DBN dt_setkey(P1(long) Pi(const char *) TASK_Di DBN_Dn);
|
||||
/* makenew.c */
|
||||
int EXTERNAL_DBN dt_setlock(P1(int) Pi(char *) TASK_Di DBN_Dn);
|
||||
/* dblfcns.c */
|
||||
int EXTERNAL_DBN dt_setlstat(P1(int) Pi(char *) TASK_Di DBN_Dn);
|
||||
/* dblfcns.c */
|
||||
int EXTERNAL_DBN dt_setmm(P1(int) Pi(int) TASK_Di DBN_Dn); /* setmm.c */
|
||||
int EXTERNAL_DBN dt_setmo(P1(int) Pi(int) TASK_Di DBN_Dn); /* setmo.c */
|
||||
int EXTERNAL_DBN dt_setmr(P1(int) TASK_Di DBN_Dn); /* setmr.c */
|
||||
int EXTERNAL_DBN dt_setom(P1(int) Pi(int) TASK_Di DBN_Dn); /* setom.c */
|
||||
int EXTERNAL_DBN dt_setoo(P1(int) Pi(int) TASK_Di DBN_Dn); /* setoo.c */
|
||||
int EXTERNAL_DBN dt_setor(P1(int) TASK_Di DBN_Dn); /* setor.c */
|
||||
int EXTERNAL_DBN dt_setrm(P1(int) TASK_Di DBN_Dn); /* setrm.c */
|
||||
int EXTERNAL_DBN dt_setro(P1(int) TASK_Di DBN_Dn); /* setro.c */
|
||||
int EXTERNAL_FIXED dt_timeout(P1(int) TASK_Di ); /* dblfcns.c */
|
||||
int EXTERNAL_FIXED dt_trabort(TASK_D1); /* dblfcns.c */
|
||||
int EXTERNAL_FIXED dt_trbegin(P1(const char *) TASK_Di); /* dblfcns.c */
|
||||
int EXTERNAL_FIXED dt_trend(TASK_D1); /* dblfcns.c */
|
||||
|
||||
#ifndef NO_DT_COVER
|
||||
|
||||
#define d_close() dt_close(CURRTASK_ONLY)
|
||||
#define d_dbdpath(a) dt_dbdpath(a CURRTASK_PARM)
|
||||
#define d_dbfpath(a) dt_dbfpath(a CURRTASK_PARM)
|
||||
#define d_dblog(a) dt_dblog(a CURRTASK_PARM)
|
||||
#define d_dbuserid(a) dt_dbuserid(a CURRTASK_PARM)
|
||||
#define d_destroy(a) dt_destroy(a CURRTASK_PARM)
|
||||
#define d_freeall() dt_freeall(CURRTASK_ONLY)
|
||||
#define d_off_opt(a) dt_off_opt(a CURRTASK_PARM)
|
||||
#define d_on_opt(a) dt_on_opt(a CURRTASK_PARM)
|
||||
#define d_open(a, b) dt_open(a, b CURRTASK_PARM)
|
||||
#define d_rdcurr(a, b) dt_rdcurr(a, b CURRTASK_PARM)
|
||||
#define d_rerdcurr(a, b) dt_rerdcurr(a, b CURRTASK_PARM)
|
||||
#define d_recover(a) dt_recover(a CURRTASK_PARM)
|
||||
#define d_renfile(a, b, c) dt_renfile(a, b, c CURRTASK_PARM)
|
||||
#define d_retries(a) dt_retries(a CURRTASK_PARM)
|
||||
#define d_set_dberr(a, b) dt_set_dberr(a, b, CURRTASK_PARM)
|
||||
#define d_setdb(a) dt_setdb(a CURRTASK_PARM)
|
||||
#define d_timeout(a) dt_timeout(a CURRTASK_PARM)
|
||||
#define d_trabort() dt_trabort(CURRTASK_ONLY)
|
||||
#define d_trbegin(a) dt_trbegin(a CURRTASK_PARM)
|
||||
#define d_trend() dt_trend(CURRTASK_ONLY)
|
||||
#define d_wrcurr(a) dt_wrcurr(a CURRTASK_PARM)
|
||||
|
||||
#define d_cmstat(a , dbn) dt_cmstat(a CURRTASK_PARM , dbn)
|
||||
#define d_cmtype(a, b , dbn) dt_cmtype(a, b CURRTASK_PARM , dbn)
|
||||
#define d_connect(a , dbn) dt_connect(a CURRTASK_PARM , dbn)
|
||||
#define d_cotype(a, b , dbn) dt_cotype(a, b CURRTASK_PARM , dbn)
|
||||
#define d_crget(a , dbn) dt_crget(a CURRTASK_PARM , dbn)
|
||||
#define d_crread(a, b , dbn) dt_crread(a, b CURRTASK_PARM , dbn)
|
||||
#define d_crset(a , dbn) dt_crset(a CURRTASK_PARM , dbn)
|
||||
#define d_crtype(a , dbn) dt_crtype(a CURRTASK_PARM , dbn)
|
||||
#define d_crwrite(a, b , dbn) dt_crwrite(a, b CURRTASK_PARM , dbn)
|
||||
#define d_csmget(a, b , dbn) dt_csmget(a, b CURRTASK_PARM , dbn)
|
||||
#define d_csmread(a, b, c , dbn) dt_csmread(a, b, c CURRTASK_PARM , dbn)
|
||||
#define d_csmset(a, b , dbn) dt_csmset(a, b CURRTASK_PARM , dbn)
|
||||
#define d_csmwrite(a, b, c , dbn) dt_csmwrite(a, b, c CURRTASK_PARM , dbn)
|
||||
#define d_csoget(a, b , dbn) dt_csoget(a, b CURRTASK_PARM , dbn)
|
||||
#define d_csoread(a, b, c , dbn) dt_csoread(a, b, c CURRTASK_PARM , dbn)
|
||||
#define d_csoset(a, b , dbn) dt_csoset(a, b CURRTASK_PARM , dbn)
|
||||
#define d_csowrite(a, b, c , dbn) dt_csowrite(a, b, c CURRTASK_PARM , dbn)
|
||||
#define d_delete(, dbn) dt_delete(CURRTASK_ONLY , dbn)
|
||||
#define d_disdel(, dbn) dt_disdel(CURRTASK_ONLY , dbn)
|
||||
#define d_recnext(, dbn) dt_recnext(CURRTASK_ONLY , dbn)
|
||||
#define d_recprev(, dbn) dt_recprev(CURRTASK_ONLY , dbn)
|
||||
#define d_discon(a , dbn) dt_discon(a CURRTASK_PARM , dbn)
|
||||
#define d_fillnew(a, b , dbn) dt_fillnew(a, b CURRTASK_PARM , dbn)
|
||||
#define d_findco(a , dbn) dt_findco(a CURRTASK_PARM , dbn)
|
||||
#define d_findfm(a , dbn) dt_findfm(a CURRTASK_PARM , dbn)
|
||||
#define d_findlm(a , dbn) dt_findlm(a CURRTASK_PARM , dbn)
|
||||
#define d_findnm(a , dbn) dt_findnm(a CURRTASK_PARM , dbn)
|
||||
#define d_findpm(a , dbn) dt_findpm(a CURRTASK_PARM , dbn)
|
||||
#define d_initialize(, dbn) dt_initialize(CURRTASK_ONLY , dbn)
|
||||
#define d_initfile(a , dbn) dt_initfile(a CURRTASK_PARM , dbn)
|
||||
#define d_ismember(a , dbn) dt_ismember(a CURRTASK_PARM , dbn)
|
||||
#define d_isowner(a , dbn) dt_isowner(a CURRTASK_PARM , dbn)
|
||||
#define d_keydel(a , dbn) dt_keydel(a CURRTASK_PARM , dbn)
|
||||
#define d_keyexist(a , dbn) dt_keyexist(a CURRTASK_PARM , dbn)
|
||||
#define d_keyfind(a, b , dbn) dt_keyfind(a, b CURRTASK_PARM , dbn)
|
||||
#define d_keyfree(a , dbn) dt_keyfree(a CURRTASK_PARM , dbn)
|
||||
#define d_keyfrst(a , dbn) dt_keyfrst(a CURRTASK_PARM , dbn)
|
||||
#define d_keylast(a , dbn) dt_keylast(a CURRTASK_PARM , dbn)
|
||||
#define d_keylock(a, b , dbn) dt_keylock(a, b CURRTASK_PARM , dbn)
|
||||
#define d_keylstat(a, b , dbn) dt_keylstat(a, b CURRTASK_PARM , dbn)
|
||||
#define d_keynext(a , dbn) dt_keynext(a CURRTASK_PARM , dbn)
|
||||
#define d_keyprev(a , dbn) dt_keyprev(a CURRTASK_PARM , dbn)
|
||||
#define d_keyread(a , dbn) dt_keyread(a CURRTASK_PARM)
|
||||
#define d_keystore(a , dbn) dt_keystore(a CURRTASK_PARM , dbn)
|
||||
#define d_lock(a, b , dbn) dt_lock(a, b CURRTASK_PARM , dbn)
|
||||
#define d_makenew(a , dbn) dt_makenew(a CURRTASK_PARM , dbn)
|
||||
#define d_members(a, b , dbn) dt_members(a, b CURRTASK_PARM , dbn)
|
||||
#define d_recfree(a , dbn) dt_recfree(a CURRTASK_PARM , dbn)
|
||||
#define d_recfrst(a , dbn) dt_recfrst(a CURRTASK_PARM , dbn)
|
||||
#define d_reclast(a , dbn) dt_reclast(a CURRTASK_PARM , dbn)
|
||||
#define d_reclock(a, b , dbn) dt_reclock(a, b CURRTASK_PARM , dbn)
|
||||
#define d_reclstat(a, b , dbn) dt_reclstat(a, b CURRTASK_PARM , dbn)
|
||||
#define d_recread(a , dbn) dt_recread(a CURRTASK_PARM , dbn)
|
||||
#define d_recset(a , dbn) dt_recset(a CURRTASK_PARM , dbn)
|
||||
#define d_recwrite(a , dbn) dt_recwrite(a CURRTASK_PARM , dbn)
|
||||
#define d_setfree(a , dbn) dt_setfree(a CURRTASK_PARM , dbn)
|
||||
#define d_setkey(a, b , dbn) dt_setkey(a, b CURRTASK_PARM , dbn)
|
||||
#define d_setlock(a, b , dbn) dt_setlock(a, b CURRTASK_PARM , dbn)
|
||||
#define d_setlstat(a, b , dbn) dt_setlstat(a, b CURRTASK_PARM , dbn)
|
||||
#define d_setmm(a, b , dbn) dt_setmm(a, b CURRTASK_PARM , dbn)
|
||||
#define d_setmo(a, b , dbn) dt_setmo(a, b CURRTASK_PARM , dbn)
|
||||
#define d_setmr(a , dbn) dt_setmr(a CURRTASK_PARM , dbn)
|
||||
#define d_setom(a, b , dbn) dt_setom(a, b CURRTASK_PARM , dbn)
|
||||
#define d_setoo(a, b , dbn) dt_setoo(a, b CURRTASK_PARM , dbn)
|
||||
#define d_setor(a , dbn) dt_setor(a CURRTASK_PARM , dbn)
|
||||
#define d_setrm(a , dbn) dt_setrm(a CURRTASK_PARM , dbn)
|
||||
#define d_setro(a , dbn) dt_setro(a CURRTASK_PARM , dbn)
|
||||
|
||||
#endif /* NO_DT_COVER */
|
||||
/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC task.h */
|
||||
@@ -1,87 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: trxlog.h /main/2 1996/05/09 04:20:43 drk $ */
|
||||
/*
|
||||
* COMPONENT_NAME: austext
|
||||
*
|
||||
* FUNCTIONS: BITMAP_SIZE
|
||||
* BM_BASE
|
||||
* IX_BASE
|
||||
* IX_SIZE
|
||||
* PZ_BASE
|
||||
*
|
||||
* ORIGINS: 157
|
||||
*
|
||||
*/
|
||||
|
||||
/* ********************** EDIT HISTORY *******************************
|
||||
|
||||
SCR DATE INI DESCRIPTION
|
||||
----- --------- --- -----------------------------------------------------
|
||||
611 21-Feb-89 RSC The defn of BUI for unix and vms needs parenthesis
|
||||
*/
|
||||
|
||||
|
||||
/* trxlog.h - header file to define structures, constants, etc. for the
|
||||
memory cache overflow and transaction log file control
|
||||
==========================================================================
|
||||
*/
|
||||
/*
|
||||
The following constants control the functioning of the cache overflow
|
||||
and transaction logging processes
|
||||
|
||||
BUI The number of bits in an unsigned int
|
||||
IX_PAGESIZE The size (in bytes) of an index page
|
||||
IX_EPP The number of entries that will fit on an index page
|
||||
BITMAP_SIZE The size of the index bitmap (in unsigned int units)
|
||||
IX_SIZE The number of index pages needed to control the db pages
|
||||
OADDR_OF_IXP Calculates the overflow file address of an index page #
|
||||
|
||||
==========================================================================
|
||||
*/
|
||||
/* (BITS(unsigned int)) */
|
||||
#define BUI (8*sizeof(unsigned int))
|
||||
|
||||
|
||||
/*
|
||||
==========================================================================
|
||||
*/
|
||||
|
||||
/* page zero table entry */
|
||||
#define PGZEROSZ (2*sizeof(F_ADDR)+sizeof(ULONG))
|
||||
typedef struct PGZERO_S {
|
||||
F_ADDR pz_dchain; /* delete chain pointer */
|
||||
F_ADDR pz_next; /* next available record number */
|
||||
ULONG pz_timestamp; /* file's timestamp value */
|
||||
BOOLEAN pz_modified; /* TRUE if page zero has been modified */
|
||||
} PGZERO;
|
||||
|
||||
/* binary search lookup table entry */
|
||||
|
||||
|
||||
/* Maximum number of transactions which can commit a time */
|
||||
#define TAFLIMIT 1
|
||||
|
||||
#define TRXLOG_H
|
||||
/* End - trxlog.h */
|
||||
/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin trxlog.h */
|
||||
@@ -1,342 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* COMPONENT_NAME: austext
|
||||
*
|
||||
* FUNCTIONS: P1
|
||||
* POINTER_ASSIGN
|
||||
* POINTER_INIT
|
||||
* Pi
|
||||
* Piv
|
||||
* Pv
|
||||
* int
|
||||
*
|
||||
* ORIGINS: 27,157
|
||||
*
|
||||
* (C) COPYRIGHT International Business Machines Corp. 1995, 1996
|
||||
* All Rights Reserved
|
||||
* US Government Users Restricted Rights - Use, duplication or
|
||||
* disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
|
||||
*/
|
||||
/*----------------------------------------------------------------------
|
||||
$TOG: vista.h /main/7 1998/04/03 17:10:52 mgreess $
|
||||
vista.h: db_VISTA standard header file
|
||||
|
||||
This file should be included in all programs which use db_VISTA. It
|
||||
contains database status/error code definitions and standard type
|
||||
definitions.
|
||||
|
||||
This file should only include user-oriented constructs.
|
||||
|
||||
(C) Copyright 1984, 1985, 1986, 1987 by Raima Corp.
|
||||
|
||||
----------------------------------------------------------------------*/
|
||||
|
||||
/* ********************** EDIT HISTORY *******************************
|
||||
|
||||
SCR DATE INI DESCRIPTION
|
||||
----- --------- --- -----------------------------------------------------
|
||||
03-AUG-88 RTK Multi-tasking support - see "#ifdef MULTI_TASK"
|
||||
08-AUG-88 RTK Declared globals rn_dba, rn_type, and ft_offset to
|
||||
support recfrst, recnext, etc in ONE_DB mode.
|
||||
16-Sep-88 RSC Fixed DBN_Dx to use variable # of arg macros.
|
||||
28-Sep-88 WLW Corrected the db_VERSION to 3.10 from 3.01.
|
||||
11-Oct-88 RSC Fixed DBN_Dx to use variable # of arg macros (again)
|
||||
11-Oct-88 RSC Fixed ONE_DB to compile correctly
|
||||
17-Oct-88 RSC Replaced MSC with ANSI, moved compiler check to dbtype
|
||||
439 17-Nov-88 RSC Placed some multi-tasking stuff within MULTI_TASK
|
||||
441 06-Dec-88 RSC Modifications to make gen lockmgr work with 3.10
|
||||
26-Jan-89 RSC Add defn for UINT (for lockmgr)
|
||||
420 13-Feb-89 WLW Removed unused prototypes of {Make,Free}ProcInstance
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.2 1995/10/17 18:33:01 miker
|
||||
* Added global db_oflag, changed values of db_VERSION and dbd_VERSION:
|
||||
* - Allow access to read-only databases.
|
||||
* - Expand maximum file names from 48 to 240 chars (DtSrFILENMLEN).
|
||||
* - Disable transaction processing (NO_TRANS) to obviate need
|
||||
* for vista.taf and vista.log files.
|
||||
* - Disregard all environment variables.
|
||||
* - Replace default dberr.c with one that doesn't read stdin.
|
||||
* - Rename library from libvista to prevent confusion with old code.
|
||||
* - Prefix all vista utility names with "dt...", also to deconfuse.
|
||||
*
|
||||
*/
|
||||
#if defined(__linux__)
|
||||
# define __SVR4_I386_ABI_L1__
|
||||
#endif
|
||||
#include <limits.h> /* pickup WORD_BIT, LONG_BIT */
|
||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
||||
# undef __SVR4_I386_ABI_L1__
|
||||
# ifndef WORD_BIT
|
||||
# define WORD_BIT 32
|
||||
# endif
|
||||
# ifndef LONG_BIT
|
||||
# define LONG_BIT 32
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define db_VERSION "3.dt" /* was "3.10" */
|
||||
#define dbd_VERSION "V3.dt\032" /* was "V3.00\032" */
|
||||
|
||||
/* -------------------status codes-------------------- */
|
||||
/* user errors */
|
||||
#define S_DBOPEN -1 /* database not opened */
|
||||
#define S_INVSET -2 /* invalid set */
|
||||
#define S_INVREC -3 /* invalid record */
|
||||
#define S_INVDB -4 /* invalid database */
|
||||
#define S_INVFLD -5 /* invalid field name */
|
||||
#define S_INVADDR -6 /* invalid db_address */
|
||||
#define S_NOCR -7 /* no current record */
|
||||
#define S_NOCO -8 /* set has no current owner */
|
||||
#define S_NOCM -9 /* set has no current member */
|
||||
#define S_KEYREQD -10 /* key value required */
|
||||
#define S_BADTYPE -11 /* invalid lock type */
|
||||
#define S_HASMEM -12 /* record is owner of non-empty set(s) */
|
||||
#define S_ISMEM -13 /* record is member of set(s) */
|
||||
#define S_ISOWNED -14 /* member already owned */
|
||||
#define S_ISCOMKEY -15 /* field is a compound key */
|
||||
#define S_NOTCON -16 /* record not connected to set */
|
||||
#define S_NOTKEY -17 /* field is not a valid key */
|
||||
#define S_INVOWN -18 /* record not legal owner of set */
|
||||
#define S_INVMEM -19 /* record not legal member of set */
|
||||
#define S_SETPAGES -20 /* error in d_setpages (database open or bad param) */
|
||||
#define S_INCOMPAT -21 /* incompatible dictionary file */
|
||||
#define S_DELSYS -22 /* illegal attempt to delete system record */
|
||||
#define S_NOTFREE -23 /* attempt to locked previously locked rec or set */
|
||||
#define S_NOTLOCKED -24 /* attempt to access unlocked record or set */
|
||||
#define S_TRANSID -25 /* transaction id not be supplied */
|
||||
#define S_TRACTIVE -26 /* transaction already active */
|
||||
#define S_TRNOTACT -27 /* transaction not currently active */
|
||||
#define S_TRLOCKS -28 /* transaction cannot begin due to locked files */
|
||||
#define S_TRFREE -29 /* attempt to free a lock inside a transaction */
|
||||
#define S_TRCHANGES -30 /* too many pages changed within transaction */
|
||||
#define S_NOTRANS -31 /* attempted update outside of transaction */
|
||||
#define S_EXCLUSIVE -32 /* functions requires exclusive db access */
|
||||
#define S_STATIC -33 /* Attempted to write lock a static file */
|
||||
#define S_USERID -34 /* No user id exists */
|
||||
#define S_NAMELEN -35 /* database file/path name too long */
|
||||
#define S_RENAME -36 /* invalid file number was passed to d_renfile */
|
||||
#define S_NOTOPTKEY -37 /* field is not an optional key */
|
||||
#define S_BADFIELD -38 /* field not defined in current record type */
|
||||
#define S_COMKEY -39 /* record/field has/in a compound key */
|
||||
#define S_INVNUM -40 /* invalid record or set number */
|
||||
#define S_TIMESTAMP -41 /* record or set not timestamped */
|
||||
#define S_BADUSERID -42 /* invalid user id - not alphanumeric */
|
||||
#define S_NONETBIOS -43 /* NetBIOS is not installed on machine */
|
||||
#define S_BADBDPATH -44 /* bad # of elements in DBDPATH */
|
||||
#define S_BADBFPATH -45 /* bad # of elements in DBFPATH */
|
||||
#define S_NOTYPE -46 /* No current record type */
|
||||
#define S_INVSORT -47 /* Invalid country table sort string */
|
||||
#define S_DBCLOSE -48 /* database not closed */
|
||||
|
||||
/* system errors */
|
||||
#define S_NOSPACE -900 /* no more space on file */
|
||||
#define S_SYSERR -901 /* system error */
|
||||
#define S_FAULT -902 /* page fault -- changed during usage */
|
||||
#define S_NOWORK -903 /* no working file set in dio */
|
||||
#define S_NOMEMORY -904 /* unable to allocate sufficient memory */
|
||||
#define S_NOFILE -905 /* unable to locate a file */
|
||||
#define S_DBLACCESS -906 /* unable to access db lock file */
|
||||
#define S_DBLERR -907 /* db lock file open/access error */
|
||||
#define S_BADLOCKS -908 /* inconsistent database locks */
|
||||
#define S_RECLIMIT -909 /* file record limit reached */
|
||||
#define S_KEYERR -910 /* key file inconsistency detected */
|
||||
#define S_USERLIMIT -911 /* Max concurrent user limit reached */
|
||||
#define S_FSEEK -912 /* Bad seek on database file */
|
||||
#define S_INVFILE -913 /* Invalid file specified */
|
||||
#define S_BADREAD -914 /* Bad read on database/overflow file */
|
||||
#define S_NETSYNC -915 /* Network synchronization error */
|
||||
#define S_DEBUG -916 /* Debugging check interrupt */
|
||||
#define S_NETERR -917 /* Network communications error */
|
||||
#define S_RECOVERY -918 /* Auto-recovery is in process */
|
||||
#define S_BADWRITE -919 /* Bad write on database/overflow file */
|
||||
#define S_NOLOCKMGR -920 /* Unable to open lockmgr session */
|
||||
#define S_DUPUSERID -921 /* DBUSERID is already used by another user */
|
||||
#define S_LMBUSY -922 /* The lock manager is busy */
|
||||
|
||||
/* function statuses */
|
||||
#define S_OKAY 0 /* normal return, okay */
|
||||
#define S_EOS 1 /* end of set */
|
||||
#define S_NOTFOUND 2 /* record not found */
|
||||
#define S_DUPLICATE 3 /* duplicate key */
|
||||
#define S_KEYSEQ 4 /* field type used out of sequence in d_keynext */
|
||||
#define S_UNAVAIL 5 /* database file currently unavailable */
|
||||
#define S_DELETED 6 /* record/set deleted since last accessed */
|
||||
#define S_UPDATED 7 /* record/set updated since last accessed */
|
||||
#define S_LOCKED 8 /* current record's lock bit is set */
|
||||
#define S_UNLOCKED 9 /* current record's lock bit is clear */
|
||||
|
||||
/* In order to share databases among heterogenous machines,
|
||||
* certain integer types must be defined that are invariably
|
||||
* 2 and 4 bytes on all architectures.
|
||||
* Note WORD_BIT == 32 does not guarantee short == 16.
|
||||
*/
|
||||
|
||||
#ifdef LONG
|
||||
#undef LONG
|
||||
#endif
|
||||
|
||||
#if (WORD_BIT == 16)
|
||||
typedef int INT;
|
||||
typedef unsigned int UINT;
|
||||
#elif (WORD_BIT == 32)
|
||||
typedef short INT;
|
||||
typedef unsigned short UINT;
|
||||
#else
|
||||
#error Unable to typedef INT and UINT
|
||||
#endif
|
||||
|
||||
#if (LONG_BIT == 32)
|
||||
typedef long LONG;
|
||||
typedef unsigned long ULONG;
|
||||
#elif (WORD_BIT == 32)
|
||||
typedef int LONG;
|
||||
typedef unsigned int ULONG;
|
||||
#else
|
||||
#error Unable to typedef LONG and ULONG
|
||||
#endif
|
||||
|
||||
typedef LONG BOOLEAN;
|
||||
|
||||
#define MAXRECORDS 16777215
|
||||
#define NULL_DBA 0
|
||||
|
||||
/* db_VISTA database address */
|
||||
#define DB_ADDR LONG
|
||||
|
||||
/* db_VISTA file number */
|
||||
#define FILE_NO INT
|
||||
|
||||
/* file address: page or record number */
|
||||
#define F_ADDR LONG
|
||||
|
||||
/* record number indicator */
|
||||
#define RECMARK 10000
|
||||
/* field number indicator = rec * FLDMARK + fld_in_rec */
|
||||
#define FLDMARK 1000
|
||||
/* set number indicator - must be greater than RECMARK */
|
||||
#define SETMARK 20000
|
||||
|
||||
/* runtime option flags */
|
||||
#define DCHAINUSE 0x01
|
||||
#define TRLOGGING 0x02
|
||||
#define ARCLOGGING 0x04
|
||||
#define IGNORECASE 0x08
|
||||
|
||||
/* grouped lock request packet */
|
||||
extern int db_status;
|
||||
|
||||
/* Mike Russell's custom open() flag. Default is O_RDWR.
|
||||
* Change to O_RDONLY prior to d_open() if not updating
|
||||
* the databases, if their permissions do not allow
|
||||
* writing, if they're on cd-roms, etc.
|
||||
* Not used internally for open functions that are known
|
||||
* to require write permissions (eg initializations),
|
||||
* or known to be read-only.
|
||||
*/
|
||||
extern int db_oflag;
|
||||
|
||||
#ifndef GENERAL /* GENERAL lockmgr */
|
||||
#ifdef MSC /* MSC */
|
||||
#ifndef NO_EXT_KEYWORDS /* NO_EXT_KEYWORDS */
|
||||
#ifndef PASCAL /* PASCAL */
|
||||
#define PASCAL pascal
|
||||
#endif /* PASCAL */
|
||||
#ifndef CDECL /* CDECL */
|
||||
#define CDECL cdecl
|
||||
#endif /* CDECL */
|
||||
#endif /* NO_EXT_KEYWORDS */
|
||||
#endif /* MSC */
|
||||
#endif /* GENERAL lockmgr */
|
||||
|
||||
#ifndef PASCAL
|
||||
#define PASCAL /**/
|
||||
#endif
|
||||
|
||||
#ifndef CDECL
|
||||
#define CDECL /**/
|
||||
#endif
|
||||
|
||||
#define EXTERNAL_FIXED PASCAL
|
||||
#define EXTERNAL_VARIABLE CDECL
|
||||
#define INTERNAL_FIXED PASCAL
|
||||
#define INTERNAL_VARIABLE CDECL
|
||||
|
||||
typedef int (PASCAL *FARPROC)();
|
||||
typedef char *HANDLE;
|
||||
|
||||
#define LOCK_DESC /**/
|
||||
#define POINTER_INIT() { NULL }
|
||||
#define POINTER_ASSIGN(a) { a }
|
||||
|
||||
typedef struct {char *ptr; LOCK_DESC} CHAR_P;
|
||||
typedef struct {DB_ADDR *ptr; LOCK_DESC} DB_ADDR_P;
|
||||
|
||||
|
||||
/* Allow for function prototyping */
|
||||
#ifdef LINT_ARGS
|
||||
#define P0 void /* parameterless function */
|
||||
#define P1(t) t /* first (or only) parameter in function */
|
||||
#define Pi(t) ,t /* subsequent (2,3,...) parameter in function */
|
||||
#ifdef ANSI
|
||||
#define Piv(t) ,... /* begining of variable number of parameters */
|
||||
#define Pv(t) /**/ /* function has 0 or more parameters */
|
||||
#else
|
||||
#define Piv(t) , /* [XENIX] begining of variable number of parameters */
|
||||
#define Pv(t) , /* [XENIX] function has 0 or more parameters */
|
||||
#endif
|
||||
#else
|
||||
#define P0 /**/
|
||||
#define P1(t) /**/
|
||||
#define Pi(t) /**/
|
||||
#define Piv(t) /**/
|
||||
#define Pv(t) /**/
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define DBN_D1 Pv(int)
|
||||
#define DBN_FIX_D1 P1(int)
|
||||
#define DBN_Dn Piv(int)
|
||||
|
||||
#define TASK_DBN_D1 DBN_D1
|
||||
#define TASK_D1 P0
|
||||
#define TASK_Di /**/
|
||||
#define TASK_PTR_D1 P0
|
||||
#define TASK_PTR_Di /**/
|
||||
#define CURRTASK_PARM /**/
|
||||
#define CURRTASK_ONLY /**/
|
||||
|
||||
#define LOCK_D1 /**/
|
||||
#define LOCK_Di /**/
|
||||
|
||||
typedef struct {
|
||||
int item; /* record or set number */
|
||||
char type; /* lock type: 'r', 'w', 'x', 'k' */
|
||||
} LOCK_REQUEST;
|
||||
|
||||
|
||||
#include "dproto.h"
|
||||
|
||||
/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC vista.h */
|
||||
Reference in New Issue
Block a user