* mdocml: When running into a mandoc.db(5) file still using the obsolete
@ 2016-08-22 16:07 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2016-08-22 16:07 UTC (permalink / raw)
To: source
Log Message:
-----------
When running into a mandoc.db(5) file still using the obsolete
format based on SQLite 3, say so in words that mortals can
understand rather than babbling about hex magic.
Suggested by espie@.
Modified Files:
--------------
mdocml:
dbm_map.c
Revision Data
-------------
Index: dbm_map.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/dbm_map.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -Ldbm_map.c -Ldbm_map.c -u -p -r1.3 -r1.4
--- dbm_map.c
+++ dbm_map.c
@@ -80,8 +80,14 @@ dbm_map(const char *fname)
goto fail;
magic = dbm_getint(0);
if (be32toh(*magic) != MANDOCDB_MAGIC) {
- warnx("dbm_map(%s): Bad initial magic %x (expected %x)",
- fname, be32toh(*magic), MANDOCDB_MAGIC);
+ if (strncmp(dbm_base, "SQLite format 3", 15))
+ warnx("dbm_map(%s): "
+ "Bad initial magic %x (expected %x)",
+ fname, be32toh(*magic), MANDOCDB_MAGIC);
+ else
+ warnx("dbm_map(%s): "
+ "Obsolete format based on SQLite 3",
+ fname);
errno = EFTYPE;
goto fail;
}
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-08-22 16:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-22 16:07 mdocml: When running into a mandoc.db(5) file still using the obsolete schwarze
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).