[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mandoc-source
Subject:    mdocml: warn about missing one-line description; missing feature found
From:       schwarze () mdocml ! bsd ! lv
Date:       2017-01-27 11:33:57
Message-ID: 16001655715615072935.enqueue () fantadrom ! bsd ! lv
[Download RAW message or body]

Log Message:
-----------
warn about missing one-line description;
missing feature found in the TODO file

Modified Files:
--------------
    mdocml:
        mandocdb.c

Revision Data
-------------
Index: mandocdb.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/mandocdb.c,v
retrieving revision 1.241
retrieving revision 1.242
diff -Lmandocdb.c -Lmandocdb.c -u -p -r1.241 -r1.242
--- mandocdb.c
+++ mandocdb.c
@@ -1231,8 +1231,12 @@ mpages_merge(struct dba *dba, struct mpa
 			parse_mdoc(mpage, &man->meta, man->first);
 		else
 			parse_man(mpage, &man->meta, man->first);
-		if (mpage->desc == NULL)
-			mpage->desc = mandoc_strdup(mpage->mlinks->name);
+		if (mpage->desc == NULL) {
+			mpage->desc = mandoc_strdup(mlink->name);
+			if (warnings)
+				say(mlink->file, "No one-line description, "
+				    "using filename \"%s\"", mlink->name);
+		}
 
 		for (mlink = mpage->mlinks;
 		     mlink != NULL;
@@ -1360,7 +1364,8 @@ parse_cat(struct mpage *mpage, int fd)
 			/* Skip to next word. */ ;
 	} else {
 		if (warnings)
-			say(mlink->file, "No dash in title line");
+			say(mlink->file, "No dash in title line, "
+			    "reusing \"%s\" as one-line description", title);
 		p = title;
 	}
 
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic