From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (kristaps@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id p4C1jtoh029890 for ; Wed, 11 May 2011 21:45:56 -0400 (EDT) Received: (from kristaps@localhost) by krisdoz.my.domain (8.14.3/8.14.3/Submit) id p4C1jthN025207; Wed, 11 May 2011 21:45:55 -0400 (EDT) Date: Wed, 11 May 2011 21:45:55 -0400 (EDT) Message-Id: <201105120145.p4C1jthN025207@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: kristaps@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Make sure that we check for the \(en, \(em, \-, and - separators X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 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