summaryrefslogtreecommitdiff
path: root/math/mkdb.c
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2006-08-09 15:30:28 +0000
committerDimitri Sokolyuk <demon@dim13.org>2006-08-09 15:30:28 +0000
commit87321ba6b3131cc387e676f90a57f8985928b6e2 (patch)
tree249551c488ec0ad2ecc06d8d4ec5ffc6b92b8195 /math/mkdb.c
parent8b7cb963f0da1d255e92b772dd4ed5a5af0cc68b (diff)
fix options link order
add fallbacks
Diffstat (limited to 'math/mkdb.c')
-rw-r--r--math/mkdb.c8
1 files changed, 8 insertions, 0 deletions
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);