comparison libutil/dbread.h @ 27:ca8a6f95826a

implemented sws-card-lookup and underlying libutil functions
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 16 Mar 2021 23:22:37 +0000
parents
children fa81221ac9b6
comparison
equal deleted inserted replaced
26:322f6fcdc36e 27:ca8a6f95826a
1 /*
2 * This header file defines the structure used for reading
3 * key=value database files.
4 */
5
6 #define DBREAD_LINEBUF_SIZE 1024
7 #define DBREAD_MAX_KV_PAIRS 32
8
9 struct dbread_kv {
10 char *key;
11 char *value;
12 };
13
14 struct dbread_state {
15 char linebuf[DBREAD_LINEBUF_SIZE];
16 struct dbread_kv kv_pairs[DBREAD_MAX_KV_PAIRS];
17 unsigned num_kv_pairs;
18 };
19
20 extern char *dbread_find_key();