2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: dbxtrn.h /main/2 1996/05/09 04:04:00 drk $ */
25 * COMPONENT_NAME: austext
32 /*----------------------------------------------------------------------------
33 dbxtrn.h: db_VISTA external data header file
35 (This file is included by dbtype.h)
37 (C) Copyright 1984 by Raima Corporation.
38 ----------------------------------------------------------------------------*/
40 /* ********************** EDIT HISTORY *******************************
42 SCR DATE INI DESCRIPTION
43 ----- --------- --- -----------------------------------------------------
44 423 22-Sep-88 RSC Cleanup file to compile under Lattice
45 368 23-Sep-88 RSC Changed defn of Last_mtype to match dbtype.h
46 439 17-Nov-88 RSC Integrate 3.10 branch (w/o windows) into main
47 440 13-Dec-88 RSC LR_LOCK was removed from db_global for general LM
48 532 06-Jan-89 RSC Fixed defns of rn_dba/type,db_name for ONE_DB
49 05-May-89 WLW Changed TASK_P to DB_TASK for query multi-tasking
53 /* Database Dictionary Tables */
54 extern INT largest_page;
57 extern INT old_size_ft;
58 extern INT old_size_fd;
59 extern INT old_size_st;
60 extern INT old_size_mt;
61 extern INT old_size_srt;
62 extern INT old_size_kt;
63 extern INT old_size_rt;
64 extern INT old_no_of_dbs;
70 #define old_size_srt 0
73 #define old_no_of_dbs 0
76 extern char FAR *crloc; /* location in page buffer of current record */
78 typedef struct TASK_S {
79 /* The following global variables came from dblfcns.c */
81 int Lock_tries; /* lock_tries = 5 */
82 int Dbwait_time; /* dbwait_time = 1 */
83 int Db_timeout; /* db_timeout = TIMEOUT_DEF */
85 int Dbopen; /* dbopen = 0 */
87 int Db_lockmgr; /* db_lockmgr = 1 */
89 char Dbuserid[FILENMLEN]; /* dbuserid = "" */
90 char Dbdpath[FILENMLEN*2]; /* dbdpath = "" */
91 char Dbfpath[FILENMLEN*2]; /* dbdpath = "" */
93 INT_P App_locks; /* app_locks = NULL */
94 INT_P Excl_locks; /* excl_locks = NULL */
95 INT_P Kept_locks; /* kept_locks = NULL */
97 CONST char FAR *Trans_id; /* trans_id = NULL */
98 char Dblog[FILENMLEN]; /* dblog = "" */
100 LOCK_DESCR_P Rec_locks; /* rec_locks = NULL */
101 LOCK_DESCR_P Set_locks; /* set_locks = NULL */
102 LOCK_DESCR_P Key_locks; /* key_locks = NULL */
106 LM_LOCK_P Lock_pkt; /* lock_pkt = NULL */
107 LM_FREE_P Free_pkt; /* free_pkt = NULL */
110 BOOLEAN Session_active; /* session_active = FALSE */
112 /* The following global variables came from dio.c */
113 BOOLEAN Cache_ovfl; /* cache_ovfl = FALSE */
114 PGZERO_P Pgzero; /* database file page 0 array */
115 /* The following global variables came from keyfcns.c */
116 int No_of_keys; /* no_of_keys = 0 */
117 KEY_INFO_P Key_info; /* key_info = NULL */
119 /* The following global variables came from netwdos.c */
122 /* The following global variables came from options.c */
123 int Dboptions; /* ifdef NO_TRANS: dboptions =
124 DCHAINUSE | TRLOGGING
125 else: dboptions = DCHAINUSE */
126 /* The following global variables came from ovfcns.c */
127 long Ov_initaddr; /* ov_initaddr = 0L */
128 long Ov_rootaddr; /* ov_rootaddr = 0L */
129 long Ov_nextaddr; /* ov_nextaddr = 0L */
131 /* The following global variables came from renfiles.c */
132 llist Ren_list; /* Ren_list = LLIST_INIT() */
133 /* The following global variables came from inittab.h */
137 DB_ENTRY FAR *Curr_db_table;
139 DB_ADDR Curr_rec; /* current record address */
140 DB_ADDR_P Curr_own; /* current set owners array */
141 DB_ADDR_P Curr_mem; /* current set members array */
144 ULONG_P Co_time; /* co_time = NULL */
145 ULONG_P Cm_time; /* cm_time = NULL */
146 ULONG_P Cs_time; /* cs_time = NULL */
155 RN_ENTRY FAR *Curr_rn_table;
157 DB_ADDR rn_dba; /* last computed dba by recfrst/recset/recnext */
158 INT rn_type; /* last record type supplied to recfrst/recset */
164 char db_name[DBNMLEN]; /* name of this database */
165 char db_path[PATHLEN]; /* name of path to this database */
166 DB_ADDR sysdba; /* database address of system record */
168 FILE_ENTRY_P File_table;
170 RECORD_ENTRY_P Record_table;
172 SET_ENTRY_P Set_table;
174 MEMBER_ENTRY_P Member_table;
176 SORT_ENTRY_P Sort_table;
178 FIELD_ENTRY_P Field_table;
180 KEY_ENTRY_P Key_table;
183 #define LOCK_STACK_SIZE 10
184 int Lock_stack[LOCK_STACK_SIZE];
186 CNTRY_TBL_P country_tbl;
188 char ctbpath[FILENMLEN];
193 /* Dynamically allocated global variables */
194 #define app_locks db_global.App_locks.ptr
195 #define excl_locks db_global.Excl_locks.ptr
196 #define kept_locks db_global.Kept_locks.ptr
197 #define rec_locks db_global.Rec_locks.ptr
198 #define set_locks db_global.Set_locks.ptr
199 #define key_locks db_global.Key_locks.ptr
200 #define lock_pkt db_global.Lock_pkt.ptr
201 #define free_pkt db_global.Free_pkt.ptr
202 #define file_refs db_global.File_refs.ptr
203 #define key_info db_global.Key_info.ptr
204 #define curr_own db_global.Curr_own.ptr
205 #define curr_mem db_global.Curr_mem.ptr
206 #define rn_table db_global.Rn_table.ptr
207 #define db_table db_global.Db_table.ptr
208 #define file_table db_global.File_table.ptr
209 #define record_table db_global.Record_table.ptr
210 #define set_table db_global.Set_table.ptr
211 #define member_table db_global.Member_table.ptr
212 #define sort_table db_global.Sort_table.ptr
213 #define field_table db_global.Field_table.ptr
214 #define key_table db_global.Key_table.ptr
215 #define pgzero db_global.Pgzero.ptr
216 #define root_ix db_global.Root_ix.ptr
218 #define co_time db_global.Co_time.ptr
219 #define cm_time db_global.Cm_time.ptr
220 #define cs_time db_global.Cs_time.ptr
222 /* Used in DIO.C and OVFCNS.C */
223 #define ixpg_table Ixpg_table.ptr
224 #define dbpgbuff Dbpgbuff.ptr
225 #define ix_lookup Ix_lookup.ptr
227 /* Non-dynamically allocated global variables */
228 #define lock_tries db_global.Lock_tries
229 #define dbwait_time db_global.Dbwait_time
230 #define db_timeout db_global.Db_timeout
231 #define dbopen db_global.Dbopen
232 #define db_lockmgr db_global.Db_lockmgr
233 #define dbuserid db_global.Dbuserid
234 #define dbdpath db_global.Dbdpath
235 #define dbfpath db_global.Dbfpath
236 #define trans_id db_global.Trans_id
237 #define dblog db_global.Dblog
238 #define keyl_cnt db_global.Keyl_cnt
239 #define lp_size db_global.Lp_size
240 #define fp_size db_global.Fp_size
241 #define session_active db_global.Session_active
242 #define cache_ovfl db_global.Cache_ovfl
243 #define no_of_keys db_global.No_of_keys
244 #define key_type db_global.Key_type
245 #define net_status db_global.Net_status
246 #define last_mtype db_global.Last_mtype
247 #define dboptions db_global.Dboptions
248 #define ov_initaddr db_global.Ov_initaddr
249 #define ov_rootaddr db_global.Ov_rootaddr
250 #define ov_nextaddr db_global.Ov_nextaddr
251 #define page_size db_global.Page_size
252 #define curr_db db_global.Curr_db
253 #define curr_db_table db_global.Curr_db_table
254 #define curr_rec db_global.Curr_rec
256 #define cr_time db_global.Cr_time
257 #define db_tsrecs db_global.Db_tsrecs
258 #define db_tssets db_global.Db_tssets
260 #define ov_file db_global.Ov_file
262 #define setdb_on db_global.Setdb_on
263 #define no_of_dbs db_global.No_of_dbs
264 #define curr_rn_table db_global.Curr_rn_table
266 #define size_ft db_global.Size_ft
267 #define size_rt db_global.Size_rt
268 #define size_st db_global.Size_st
269 #define size_mt db_global.Size_mt
270 #define size_srt db_global.Size_srt
271 #define size_fd db_global.Size_fd
272 #define size_kt db_global.Size_kt
273 #define lock_lvl db_global.Lock_lvl
274 #define lock_stack db_global.Lock_stack
275 #define ren_list db_global.Ren_list
276 #define sk_list db_global.Sk_list
278 extern TASK db_global;
279 extern int db_glob_init;
281 extern DB_TASK Currtask;
286 extern int task_count;
288 /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin dbxtrn.h */