source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* pod2mdoc: ignore line breaks in the NAME section; written on the train
@ 2015-02-19 10:47 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2015-02-19 10:47 UTC (permalink / raw)
  To: source

Log Message:
-----------
ignore line breaks in the NAME section;
written on the train to Munich

Modified Files:
--------------
    pod2mdoc:
        pod2mdoc.c

Revision Data
-------------
Index: pod2mdoc.c
===================================================================
RCS file: /home/cvs/mdocml/pod2mdoc/pod2mdoc.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -Lpod2mdoc.c -Lpod2mdoc.c -u -p -r1.46 -r1.47
--- pod2mdoc.c
+++ pod2mdoc.c
@@ -1287,7 +1287,7 @@ donamenm(struct state *st, const char *b
 	assert(OUST_NL == st->oust);
 	assert(st->wantws);
 
-	while (*start < end && ' ' == buf[*start])
+	while (*start < end && isspace((unsigned char)buf[*start]))
 		(*start)++;
 
 	if (end == *start) {
@@ -1308,7 +1308,7 @@ donamenm(struct state *st, const char *b
 		printf(" ,");
 		mdoc_newln(st);
 		(*start)++;
-		while (*start < end && ' ' == buf[*start])
+		while (*start < end && isspace((unsigned char)buf[*start]))
 			(*start)++;
 	}
 }
@@ -1345,7 +1345,8 @@ ordinary(struct state *st, const char *b
 	 */
 	if (SECT_NAME == st->sect) {
 		for (i = end - 2; i > start; i--)
-			if ('-' == buf[i] && ' ' == buf[i + 1])
+			if ('-' == buf[i] &&
+			    isspace((unsigned char)buf[i + 1]))
 				break;
 		if ('-' == buf[i]) {
 			j = i;
@@ -1355,7 +1356,8 @@ ordinary(struct state *st, const char *b
 					break;
 			donamenm(st, buf, &start, i + 1);
 			start = j + 1;
-			while (start < end && ' ' == buf[start])
+			while (start < end &&
+			     isspace((unsigned char)buf[start]))
 				start++;
 			formatcodeln(st, "Nd", buf, &start, end, 1);
 			mdoc_newln(st);
--
 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:[~2015-02-19 10:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-19 10:47 pod2mdoc: ignore line breaks in the NAME section; written on the train 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).