28 |
#include "dbop.h" |
#include "dbop.h" |
29 |
#include "idset.h" |
#include "idset.h" |
30 |
#include "strbuf.h" |
#include "strbuf.h" |
31 |
|
#include "varray.h" |
32 |
|
|
33 |
#define VERSIONKEY " __.VERSION" |
#define VERSIONKEY " __.VERSION" |
34 |
#define COMPACTKEY " __.COMPACT" |
#define COMPACTKEY " __.COMPACT" |
60 |
#define GTOP_IGNORECASE 16 /* ignore case distinction */ |
#define GTOP_IGNORECASE 16 /* ignore case distinction */ |
61 |
#define GTOP_BASICREGEX 32 /* use basic regular expression */ |
#define GTOP_BASICREGEX 32 /* use basic regular expression */ |
62 |
|
|
63 |
|
struct gtop_compact_entry { |
64 |
|
struct gtop_compact_entry *next; |
65 |
|
VARRAY *vb; /* array of line numbers */ |
66 |
|
char tag[1]; |
67 |
|
}; |
68 |
|
|
69 |
typedef struct { |
typedef struct { |
70 |
DBOP *dbop; /* descripter of DBOP */ |
DBOP *dbop; /* descripter of DBOP */ |
71 |
int format_version; /* format version */ |
int format_version; /* format version */ |
81 |
int opened; /* whether or not file opened */ |
int opened; /* whether or not file opened */ |
82 |
char *line; /* current record */ |
char *line; /* current record */ |
83 |
char tag[IDENTLEN+1]; /* current tag */ |
char tag[IDENTLEN+1]; /* current tag */ |
|
char prev_tag[IDENTLEN+1]; /* previous tag */ |
|
84 |
char path[MAXPATHLEN+1]; /* current path */ |
char path[MAXPATHLEN+1]; /* current path */ |
85 |
char prev_path[MAXPATHLEN+1]; /* previous path */ |
char prev_path[MAXPATHLEN+1]; /* previous path */ |
86 |
STRBUF *sb; /* string buffer */ |
STRBUF *sb; /* string buffer */ |
88 |
FILE *fp; /* descriptor of 'path' */ |
FILE *fp; /* descriptor of 'path' */ |
89 |
const char *lnop; /* current line number */ |
const char *lnop; /* current line number */ |
90 |
int lno; /* integer value of 'lnop' */ |
int lno; /* integer value of 'lnop' */ |
91 |
|
struct gtop_compact_entry **htab;/* hash table */ |
92 |
} GTOP; |
} GTOP; |
93 |
|
|
94 |
const char *dbname(int); |
const char *dbname(int); |