FreeCalypso > hg > fc-sim-tools
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libutil/dbread.h Tue Mar 16 23:22:37 2021 +0000 @@ -0,0 +1,20 @@ +/* + * This header file defines the structure used for reading + * key=value database files. + */ + +#define DBREAD_LINEBUF_SIZE 1024 +#define DBREAD_MAX_KV_PAIRS 32 + +struct dbread_kv { + char *key; + char *value; +}; + +struct dbread_state { + char linebuf[DBREAD_LINEBUF_SIZE]; + struct dbread_kv kv_pairs[DBREAD_MAX_KV_PAIRS]; + unsigned num_kv_pairs; +}; + +extern char *dbread_find_key();