* mdocml: Make sure that we check for the \(en, \(em, \-, and - separators
@ 2011-05-12 1:45 kristaps
0 siblings, 0 replies; only message in thread
From: kristaps @ 2011-05-12 1:45 UTC (permalink / raw)
To: source
Log Message:
-----------
Make sure that we check for the \(en, \(em, \-, and - separators for
the heuristic dance to grab manual descriptions from man documents.
Modified Files:
--------------
mdocml:
mandoc-db.c
Revision Data
-------------
Index: mandoc-db.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mandoc-db.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -Lmandoc-db.c -Lmandoc-db.c -u -p -r1.19 -r1.20
--- mandoc-db.c
+++ mandoc-db.c
@@ -871,6 +871,7 @@ pman_node(MAN_ARGS)
/*
* Go through a special heuristic dance here.
* This is why -man manuals are great!
+ * (I'm being sarcastic: my eyes are bleeding.)
* Conventionally, one or more manual names are
* comma-specified prior to a whitespace, then a
* dash, then a description. Try to puzzle out
@@ -908,10 +909,14 @@ pman_node(MAN_ARGS)
while (' ' == *start)
start++;
- if ('\\' == *start && '-' == *(start + 1))
+ if (0 == strncmp(start, "-", 1))
+ start += 1;
+ else if (0 == strncmp(start, "\\-", 2))
start += 2;
- else if ('-' == *start)
- start++;
+ else if (0 == strncmp(start, "\\(en", 4))
+ start += 4;
+ else if (0 == strncmp(start, "\\(em", 4))
+ start += 4;
while (' ' == *start)
start++;
--
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:[~2011-05-12 1:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-12 1:45 mdocml: Make sure that we check for the \(en, \(em, \-, and - separators kristaps
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).