FreeCalypso > hg > fc-sim-tools
annotate libutil/dbread.h @ 64:dba24129027e
doc/ADM-PIN-numbering article written
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 23 Mar 2021 23:30:00 +0000 |
parents | fa81221ac9b6 |
children |
rev | line source |
---|---|
27
ca8a6f95826a
implemented sws-card-lookup and underlying libutil functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
ca8a6f95826a
implemented sws-card-lookup and underlying libutil functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 * This header file defines the structure used for reading |
ca8a6f95826a
implemented sws-card-lookup and underlying libutil functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 * key=value database files. |
ca8a6f95826a
implemented sws-card-lookup and underlying libutil functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 */ |
ca8a6f95826a
implemented sws-card-lookup and underlying libutil functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 |
ca8a6f95826a
implemented sws-card-lookup and underlying libutil functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 #define DBREAD_LINEBUF_SIZE 1024 |
ca8a6f95826a
implemented sws-card-lookup and underlying libutil functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 #define DBREAD_MAX_KV_PAIRS 32 |
ca8a6f95826a
implemented sws-card-lookup and underlying libutil functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 |
ca8a6f95826a
implemented sws-card-lookup and underlying libutil functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 struct dbread_kv { |
ca8a6f95826a
implemented sws-card-lookup and underlying libutil functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 char *key; |
ca8a6f95826a
implemented sws-card-lookup and underlying libutil functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 char *value; |
ca8a6f95826a
implemented sws-card-lookup and underlying libutil functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 }; |
ca8a6f95826a
implemented sws-card-lookup and underlying libutil functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 |
ca8a6f95826a
implemented sws-card-lookup and underlying libutil functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 struct dbread_state { |
ca8a6f95826a
implemented sws-card-lookup and underlying libutil functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 char linebuf[DBREAD_LINEBUF_SIZE]; |
ca8a6f95826a
implemented sws-card-lookup and underlying libutil functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 struct dbread_kv kv_pairs[DBREAD_MAX_KV_PAIRS]; |
ca8a6f95826a
implemented sws-card-lookup and underlying libutil functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 unsigned num_kv_pairs; |
ca8a6f95826a
implemented sws-card-lookup and underlying libutil functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 }; |
ca8a6f95826a
implemented sws-card-lookup and underlying libutil functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 |
ca8a6f95826a
implemented sws-card-lookup and underlying libutil functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 extern char *dbread_find_key(); |
28
fa81221ac9b6
retrieval of required db fields moved into libutil
Mychaela Falconia <falcon@freecalypso.org>
parents:
27
diff
changeset
|
21 extern char *dbread_find_key_req(); |