summaryrefslogtreecommitdiff
path: root/src/lib/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/file.c')
-rw-r--r--src/lib/file.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/file.c b/src/lib/file.c
index c5eabb2..34086e0 100644
--- a/src/lib/file.c
+++ b/src/lib/file.c
@@ -6,6 +6,9 @@
static char *getpair(int *c, FILE *fp);
+// readdb - reads the given file into a key table list
+// if fp returns NULL it will return the empty list
+// if readdb fails it will return NULL
struct keytablist *readdb(char *filename)
{
int len = 2;
@@ -48,6 +51,7 @@ struct keytablist *readdb(char *filename)
return list;
}
+// writedb - writes a keytablist to a given file
void writedb(char *filename, struct keytablist *list)
{
FILE *fp = fopen(filename, "wb");