From 87321ba6b3131cc387e676f90a57f8985928b6e2 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Wed, 9 Aug 2006 15:30:28 +0000 Subject: fix options link order add fallbacks --- math/mkdb.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'math/mkdb.c') diff --git a/math/mkdb.c b/math/mkdb.c index db07eff..f4a6469 100644 --- a/math/mkdb.c +++ b/math/mkdb.c @@ -96,9 +96,17 @@ walk(char **fname) mp->pdf = strdup(p); else if (strstr(p, ".zip") != NULL) mp->code = strdup(p); + /* TODO: add doc, rtf, etc. */ } } + /* fallbacks */ + if (mp->title == NULL) + mp->title = mp->dir; + if (mp->author == NULL) + mp->author = strdup("unknown"); + if (mp->language == NULL) + mp->language = strdup("en"); db_add(mp, parent, id); closemeta(mp); -- cgit v1.2.3