* texi2mdoc: Add (and ignore) a few more macros.
@ 2015-02-24 21:07 kristaps
0 siblings, 0 replies; only message in thread
From: kristaps @ 2015-02-24 21:07 UTC (permalink / raw)
To: source
Log Message:
-----------
Add (and ignore) a few more macros.
Modified Files:
--------------
texi2mdoc:
extern.h
main.c
texi2mdoc.1
Revision Data
-------------
Index: extern.h
===================================================================
RCS file: /home/cvs/mdocml/texi2mdoc/extern.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -Lextern.h -Lextern.h -u -p -r1.13 -r1.14
--- extern.h
+++ extern.h
@@ -95,6 +95,7 @@ enum texicmd {
TEXICMD_DMN,
TEXICMD_DOCUMENTDESCRPITION,
TEXICMD_DOCUMENTENCODING,
+ TEXICMD_DOCUMENTLANGUAGE,
TEXICMD_DOTACCENT,
TEXICMD_DOTLESS,
TEXICMD_DOTS,
@@ -114,7 +115,11 @@ enum texicmd {
TEXICMD_FILE,
TEXICMD_FINALOUT,
TEXICMD_FINDEX,
+ TEXICMD_FLUSHLEFT,
+ TEXICMD_FLUSHRIGHT,
+ TEXICMD_FIRSTPARAGRAPHINDENT,
TEXICMD_FOOTNOTE,
+ TEXICMD_FOOTNOTESTYLE,
TEXICMD_FTABLE,
TEXICMD_FORMAT,
TEXICMD_GEQ,
@@ -151,6 +156,7 @@ enum texicmd {
TEXICMD_IMAGE,
TEXICMD_INCLUDE,
TEXICMD_INDENTBLOCK,
+ TEXICMD_INDICATEURL,
TEXICMD_INFOREF,
TEXICMD_INSERTCOPYING,
TEXICMD_ITEM,
Index: main.c
===================================================================
RCS file: /home/cvs/mdocml/texi2mdoc/main.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -Lmain.c -Lmain.c -u -p -r1.43 -r1.44
--- main.c
+++ main.c
@@ -45,6 +45,7 @@ static void dobye(struct texi *, enum te
static void dodefindex(struct texi *, enum texicmd, const char *, size_t, size_t *);
static void dodefn(struct texi *, enum texicmd, const char *, size_t, size_t *);
static void dodisplay(struct texi *, enum texicmd, const char *, size_t, size_t *);
+static void doend(struct texi *, enum texicmd, const char *, size_t, size_t *);
static void doenumerate(struct texi *, enum texicmd, const char *, size_t, size_t *);
static void doexample(struct texi *, enum texicmd, const char *, size_t, size_t *);
static void doignargn(struct texi *, enum texicmd, const char *, size_t, size_t *);
@@ -149,12 +150,13 @@ static const struct texitok __texitoks[T
{ doignbracket, "dmn", 3 }, /* TEXICMD_DMN */
{ doignblock, "documentdescription", 19 }, /* TEXICMD_DOCUMENTDESCRIPTION */
{ doignline, "documentencoding", 16 }, /* TEXICMD_DOCUMENTENCODING */
+ { doignline, "documentlanguage", 16 }, /* TEXICMD_DOCUMENTLANGUAGE */
{ doaccent, "dotaccent", 9 }, /* TEXICMD_DOTACCENT */
{ doaccent, "dotless", 7 }, /* TEXICMD_DOTLESS */
{ dosymbol, "dots", 4 }, /* TEXICMD_DOTS */
{ dolink, "email", 5 }, /* TEXICMD_EMAIL */
{ doinline, "emph", 4 }, /* TEXICMD_EMPH */
- { NULL, "end", 3 }, /* TEXICMD_END */
+ { doend, "end", 3 }, /* TEXICMD_END */
{ dosymbol, "enddots", 7 }, /* TEXICMD_ENDDOTS */
{ doenumerate, "enumerate", 9 }, /* TEXICMD_ENUMERATE */
{ doinline, "env", 3 }, /* TEXICMD_ENV */
@@ -168,7 +170,11 @@ static const struct texitok __texitoks[T
{ doinline, "file", 4 }, /* TEXICMD_FILE */
{ doignline, "finalout", 8 }, /* TEXICMD_FINALOUT */
{ doignline, "findex", 6 }, /* TEXICMD_FINDEX */
+ { doblock, "flushleft", 9 }, /* TEXICMD_FLUSHLEFT */
+ { doblock, "flushright", 10 }, /* TEXICMD_FLUSHRIGHT */
+ { doignline, "firstparagraphindent", 20 }, /* TEXICMD_FIRSTPARAGRAPHINDENT */
{ doignbracket, "footnote", 8 }, /* TEXICMD_FOOTNOTE */
+ { doignline, "footnotestyle", 13 }, /* TEXICMD_FOOTNOTESTYLE */
{ dotable, "ftable", 6 }, /* TEXICMD_FTABLE */
{ dodisplay, "format", 6 }, /* TEXICMD_FORMAT */
{ dosymbol, "geq", 3 }, /* TEXICMD_GEQ */
@@ -205,7 +211,8 @@ static const struct texitok __texitoks[T
{ doignbracket, "image", 5 }, /* TEXICMD_IMAGE */
{ doinclude, "include", 7 }, /* TEXICMD_INCLUDE */
{ dodisplay, "indentblock", 11 }, /* TEXICMD_INDENTBLOCK */
- { dolink, "inforef", 7 }, /* TEXICMD_INDENTBLOCK */
+ { dolink, "indicateurl", 11 }, /* TEXICMD_INDICATEURL */
+ { dolink, "inforef", 7 }, /* TEXICMD_INFOREF */
{ doignline, "insertcopying", 13 }, /* TEXICMD_INSERTCOPYING */
{ doitem, "item", 4 }, /* TEXICMD_ITEM */
{ doitemize, "itemize", 7 }, /* TEXICMD_ITEMIZE */
@@ -1401,6 +1408,7 @@ dolink(struct texi *p, enum texicmd cmd,
break;
case (TEXICMD_UREF):
case (TEXICMD_URL):
+ case (TEXICMD_INDICATEURL):
teximacroopen(p, "Lk");
break;
case (TEXICMD_XREF):
@@ -1738,6 +1746,22 @@ dotable(struct texi *p, enum texicmd cmd
parseto(p, buf, sz, pos, texitoks[cmd].tok);
teximacro(p, "El");
p->list = sv;
+}
+
+static void
+doend(struct texi *p, enum texicmd cmd,
+ const char *buf, size_t sz, size_t *pos)
+{
+ size_t start;
+
+ while (*pos < sz && isws(buf[*pos]))
+ advance(p, buf, pos);
+ start = *pos;
+ while (*pos < sz && '\n' != buf[*pos])
+ advance(p, buf, pos);
+
+ texiwarn(p, "unexpected \"end\": %.*s", (int)(*pos - start), &buf[start]);
+ advanceeoln(p, buf, sz, pos, 1);
}
static void
Index: texi2mdoc.1
===================================================================
RCS file: /home/cvs/mdocml/texi2mdoc/texi2mdoc.1,v
retrieving revision 1.9
retrieving revision 1.10
diff -Ltexi2mdoc.1 -Ltexi2mdoc.1 -u -p -r1.9 -r1.10
--- texi2mdoc.1
+++ texi2mdoc.1
@@ -96,19 +96,22 @@ utility was written by
.Sh CAVEATS
The output of
.Nm
-doesn't play entirely nicely with
-.Xr mdoc 7 .
-It doesn't detect whether a line trailing slash is properly escaped, nor
+currently doesn't play nicely with
+.Xr mdoc 7 :
+it doesn't detect whether a line trailing slash is properly escaped nor
does it properly account for how it mingles
.Sq \&Pp
with the text.
-Moreover, many commands that might contain useful information (such as
+.Pp
+Many commands that might contain useful information (such as
.Li @footnote )
are thrown away.
.Pp
-Not all accent marks are supported by
-.Xr mdoc 7 :
-carons, breves, etc.
+Lastly, the comma in Texinfo macro arguments may at times be escaped
+with a backslash.
+This is
+.Em not
+supported.
.\" .Sh BUGS
.Sh SECURITY CONSIDERATIONS
As a security precaution,
--
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-24 21:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-24 21:07 texi2mdoc: Add (and ignore) a few more macros 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).