annotate src/aci2/aci/db_int.h @ 662:8cd8fd15a095

SIM speed enhancement re-enabled and made configurable TI's original code supported SIM speed enhancement, but Openmoko had it disabled, and OM's disabling of speed enhancement somehow caused certain SIM cards to start working which didn't work before (OM's bug #666). Because our FC community is much smaller in year 2020 than OM's community was in their day, we are not able to find one of those #666-affected SIMs, thus the real issue they had encountered remains elusive. Thus our solution is to re-enable SIM speed enhancement and simply wait for if and when someone runs into a #666-affected SIM once again. We provide a SIM_allow_speed_enhancement global variable that allows SIM speed enhancement to be enabled or disabled per session, and an /etc/SIM_spenh file in FFS that allows it to enabled or disabled on a non-volatile basis. SIM speed enhancement is now enabled by default.
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 24 May 2020 05:02:28 +0000
parents 93999a60b835
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 +-----------------------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 | Project : PHB
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 | Modul : DBM
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 +-----------------------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 | Copyright 2005 Texas Instruments Berlin, AG
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 | All rights reserved.
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 | This file is confidential and a trade secret of Texas
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 | Instruments Berlin, AG
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 | The receipt of or possession of this file does not convey
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 | any rights to reproduce or disclose its contents or to
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 | manufacture, use, or sell anything it may describe, in
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 | whole, or in part, without the specific written consent of
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 | Texas Instruments Berlin, AG.
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 +-----------------------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 | Purpose : Internal declarations for DBM module
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 +-----------------------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 #ifndef DB_INT_H
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 #define DB_INT_H
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 #include "db.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 /* This macro allows us to close the file before
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 returning from function */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 #define FFS_OPEN_PROBLEM_PATCH
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 /* If this macro is activated, we close earlier activated file
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 before opening next file */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 #define FFS_CLOSE_BEFORE_OPEN
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 /* Mutually exclusive macros */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 #ifdef FFS_CLOSE_BEFORE_OPEN
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 #undef FFS_OPEN_PROBLEM_PATCH
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 #endif
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 #ifdef FFS_CLOSE_BEFORE_OPEN
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 #define MAX_OPEN_READ_PER_DB 2
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 #define MAX_OPEN_WRITE_PER_DB 1
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 #endif
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 #ifdef _SIMULATION_
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 #include "ffs_pc_api.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 #else
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 #include "ffs/ffs.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 #endif
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 #include "vsi.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 #include "aci_mem.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 #define RECORD_BITMAP_SIZE 32 /* Based on MAX_NUM_RECORDS
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 RECORD_BITMAP_SIZE = MAX_NUM_RECORDS/8*/
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 #define MAX_LEN_DIRECTORY 16 /* Assumed to be max 16 characters */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 DBM state
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 typedef enum
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 DBM_NOT_INITIALISED = 0,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 DBM_INITIALISED
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 } T_DBM_STATE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 Database state
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 typedef enum
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 CLOSED = 0,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 OPEN,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 IN_USE,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 UNUSED_ENTRY = 0xFF
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 } T_DB_STATE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 #ifdef FFS_CLOSE_BEFORE_OPEN
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 typedef struct
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 UBYTE fld_ctr;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 T_FFS_FD filehandle;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 } FileHandleRecord;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93 #endif
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 Field record
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98 typedef struct
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101 USHORT FieldID; /* Elementary file identifier */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102 T_DB_TYPE DBType; /* database type (UNMANAGED, FREELIST) */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 USHORT RecordSize; /* Size of data in data base record */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 UBYTE NumOfRecords; /* Number of records */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105 UBYTE UsedRecords; /* Number of used records */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106 UBYTE RecordBitMap [RECORD_BITMAP_SIZE]; /* Bitmap representing whether record is present or not */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107 UBYTE Clean; /* File consistency: 0x01 => Clean, 0x00 => Not Clean */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 UBYTE SortIndexList [MAX_NUM_OF_SORT_INDEXS]; /* Number of associated index files */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109 UBYTE* SortedLists [MAX_NUM_OF_SORT_INDEXS]; /* Sorted lists */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111 #ifndef FFS_CLOSE_BEFORE_OPEN
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112 T_FFS_FD FFSFileHandle; /* FFS File Handle for User file */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113 #endif
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115 UBYTE NextRecordNum; /* To take care of non-seqential write */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117 } T_DBM_FIELDRECORD;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120 typedef struct
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123 UBYTE DBDirectory[MAX_LEN_DIRECTORY]; /* Directory path */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124 UBYTE NumOfFiles; /* Maximum files in that database */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125 UBYTE UsedFiles; /* Number of used files */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126 UBYTE Tracked_Clean; /* Tracked: History log to be maintained or not
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127 Clean: Database is consistent or not */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128 T_DB_STATE DBState; /* Database state */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
129
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
130 T_FFS_FD FFSFileHandle; /* FFS File Handle for DD_<db_handle> */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
131
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
132 #ifdef FFS_CLOSE_BEFORE_OPEN
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
133 FileHandleRecord READ_OPEN_FIELDS [MAX_OPEN_READ_PER_DB]; /* fields opened for read only */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
134 FileHandleRecord WRITE_OPEN_FIELDS [MAX_OPEN_WRITE_PER_DB]; /* fields opened for read/write both */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
135 UBYTE old_read; /* remeber oldest open */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
136 UBYTE old_write; /* remeber oldest read */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137 #endif
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
138
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139 T_DBM_FIELDRECORD* ptrFieldRecord; /* pointer to fields */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141 } T_DBM_MASTERRECORD;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 Which sort ?
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147 typedef enum
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150 QUICK_SORT = 0,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152 #ifdef INSERTION_SORT
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153 INCREMENTAL_SORT
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154 #endif
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156 } T_DB_SORT;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158 #endif
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159