source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Parse from/to clauses in eqn.
@ 2014-09-28 14:05 kristaps
  0 siblings, 0 replies; only message in thread
From: kristaps @ 2014-09-28 14:05 UTC (permalink / raw)
  To: source

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-09-28 14:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-28 14:05 mdocml: Parse from/to clauses in eqn 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).