* texi2mdoc: When calling `TS', we can temporarily unset literal mode
@ 2015-02-23 12:28 kristaps
0 siblings, 0 replies; only message in thread
From: kristaps @ 2015-02-23 12:28 UTC (permalink / raw)
To: source
Log Message:
-----------
When calling `TS', we can temporarily unset literal mode because the TS
isn't really part of the mdoc(7) document itself.
Modified Files:
--------------
texi2mdoc:
extern.h
main.c
Revision Data
-------------
Index: main.c
===================================================================
RCS file: /home/cvs/mdocml/texi2mdoc/main.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -Lmain.c -Lmain.c -u -p -r1.31 -r1.32
--- main.c
+++ main.c
@@ -151,6 +151,7 @@ static const struct texitok __texitoks[T
{ doinline, "file", 4 }, /* TEXICMD_FILE */
{ doignline, "finalout", 8 }, /* TEXICMD_FINALOUT */
{ doignline, "findex", 6 }, /* TEXICMD_FINDEX */
+ { doignbracket, "footnote", 8 }, /* TEXICMD_FOOTNOTE */
{ dotable, "ftable", 6 }, /* TEXICMD_FTABLE */
{ dodisplay, "format", 6 }, /* TEXICMD_FORMAT */
{ doaccent, "`", 1 }, /* TEXICMD_GRAVE */
@@ -1351,10 +1352,16 @@ domultitable(struct texi *p, enum texicm
const char *buf, size_t sz, size_t *pos)
{
enum texilist sv = p->list;
+ int svliteral = p->literal;
enum texicmd type;
size_t i, end, columns;
p->list = TEXILIST_TABLE;
+ /*
+ * TS/TE blocks aren't "in mdoc(7)", so we can disregard the
+ * fact that we're in literal mode right now.
+ */
+ p->literal = 0;
teximacro(p, "TS");
columns = 0;
@@ -1407,6 +1414,7 @@ domultitable(struct texi *p, enum texicm
parseto(p, buf, sz, pos, texitoks[cmd].tok);
p->outmacro--;
teximacro(p, "TE");
+ p->literal = svliteral;
p->list = sv;
}
Index: extern.h
===================================================================
RCS file: /home/cvs/mdocml/texi2mdoc/extern.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lextern.h -Lextern.h -u -p -r1.6 -r1.7
--- extern.h
+++ extern.h
@@ -96,6 +96,7 @@ enum texicmd {
TEXICMD_FILE,
TEXICMD_FINALOUT,
TEXICMD_FINDEX,
+ TEXICMD_FOOTNOTE,
TEXICMD_FTABLE,
TEXICMD_FORMAT,
TEXICMD_GRAVE,
--
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:[~2015-02-23 12:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-23 12:28 texi2mdoc: When calling `TS', we can temporarily unset literal mode 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).