source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: kristaps@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: Make sure that we check for the \(en, \(em, \-, and - separators
Date: Wed, 11 May 2011 21:45:55 -0400 (EDT)	[thread overview]
Message-ID: <201105120145.p4C1jthN025207@krisdoz.my.domain> (raw)

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

                 reply	other threads:[~2011-05-12  1:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201105120145.p4C1jthN025207@krisdoz.my.domain \
    --to=kristaps@mdocml.bsd.lv \
    --cc=source@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).