source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: kristaps@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: Parse from/to clauses in eqn.
Date: Sun, 28 Sep 2014 10:05:12 -0400 (EDT)	[thread overview]
Message-ID: <201409281405.s8SE5Crj015153@krisdoz.my.domain> (raw)

Log Message:
-----------
Parse from/to clauses in eqn.

Modified Files:
--------------
    mdocml:
        eqn.c
        mandoc.h

Revision Data
-------------
Index: eqn.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/eqn.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -Leqn.c -Leqn.c -u -p -r1.46 -r1.47
--- eqn.c
+++ eqn.c
@@ -195,13 +195,14 @@ static	const struct eqnstr eqnfonts[EQNF
 };
 
 static	const struct eqnstr eqnposs[EQNPOS__MAX] = {
-	{ "", 0 }, /* EQNPOS_NONE */
+	{ NULL, 0 }, /* EQNPOS_NONE */
 	{ "over", 4 }, /* EQNPOS_OVER */
 	{ "sup", 3 }, /* EQNPOS_SUP */
 	{ NULL, 0 }, /* EQNPOS_SUPSUB */
 	{ "sub", 3 }, /* EQNPOS_SUB */
 	{ "to", 2 }, /* EQNPOS_TO */
 	{ "from", 4 }, /* EQNPOS_FROM */
+	{ NULL, 0 }, /* EQNPOS_FROMTO */
 };
 
 static	const struct eqnstr eqnpiles[EQNPILE__MAX] = {
@@ -591,6 +592,10 @@ eqn_box(struct eqn_node *ep, struct eqn_
 			NULL != last->last->prev &&
 			EQNPOS_SUB == last->last->prev->pos)
 			last->last->prev->pos = EQNPOS_SUBSUP;
+		else if (EQNPOS_TO == i &&
+			NULL != last->last->prev &&
+			EQNPOS_FROM == last->last->prev->pos)
+			last->last->prev->pos = EQNPOS_FROMTO;
 		else
 			last->last->pos = (enum eqn_post)i;
 
Index: mandoc.h
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mandoc.h,v
retrieving revision 1.157
retrieving revision 1.158
diff -Lmandoc.h -Lmandoc.h -u -p -r1.157 -r1.158
--- mandoc.h
+++ mandoc.h
@@ -340,6 +340,7 @@ enum	eqn_post {
 	EQNPOS_SUB,
 	EQNPOS_TO,
 	EQNPOS_FROM,
+	EQNPOS_FROMTO,
 	EQNPOS__MAX
 };
 
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

                 reply	other threads:[~2014-09-28 14:05 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=201409281405.s8SE5Crj015153@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).