[BACK]Return to main.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / texi2mdoc

Diff for /texi2mdoc/main.c between version 1.12 and 1.13

version 1.12, 2015/02/18 23:08:16 version 1.13, 2015/02/19 07:50:51
Line 92  enum texicmd {
Line 92  enum texicmd {
         TEXICMD_IFSET,          TEXICMD_IFSET,
         TEXICMD_IMAGE,          TEXICMD_IMAGE,
         TEXICMD_INCLUDE,          TEXICMD_INCLUDE,
           TEXICMD_INDENTBLOCK,
         TEXICMD_INSERTCOPYING,          TEXICMD_INSERTCOPYING,
         TEXICMD_ITEM,          TEXICMD_ITEM,
         TEXICMD_ITEMIZE,          TEXICMD_ITEMIZE,
Line 123  enum texicmd {
Line 124  enum texicmd {
         TEXICMD_SPACE,          TEXICMD_SPACE,
         TEXICMD_SMALLDISPLAY,          TEXICMD_SMALLDISPLAY,
         TEXICMD_SMALLEXAMPLE,          TEXICMD_SMALLEXAMPLE,
           TEXICMD_SMALLINDENTBLOCK,
         TEXICMD_SQUIGGLE_LEFT,          TEXICMD_SQUIGGLE_LEFT,
         TEXICMD_SQUIGGLE_RIGHT,          TEXICMD_SQUIGGLE_RIGHT,
         TEXICMD_STRONG,          TEXICMD_STRONG,
Line 298  static const struct texitok texitoks[TEXICMD__MAX] = {
Line 300  static const struct texitok texitoks[TEXICMD__MAX] = {
         { doignblock, "ifset", 5 }, /* TEXICMD_IFSET */          { doignblock, "ifset", 5 }, /* TEXICMD_IFSET */
         { doignbracket, "image", 5 }, /* TEXICMD_IMAGE */          { doignbracket, "image", 5 }, /* TEXICMD_IMAGE */
         { doinclude, "include", 7 }, /* TEXICMD_INCLUDE */          { doinclude, "include", 7 }, /* TEXICMD_INCLUDE */
           { dodisplay, "indentblock", 11 }, /* TEXICMD_INDENTBLOCK */
         { doignline, "insertcopying", 13 }, /* TEXICMD_INSERTCOPYING */          { doignline, "insertcopying", 13 }, /* TEXICMD_INSERTCOPYING */
         { doitem, "item", 4 }, /* TEXICMD_ITEM */          { doitem, "item", 4 }, /* TEXICMD_ITEM */
         { doitemize, "itemize", 7 }, /* TEXICMD_ITEMIZE */          { doitemize, "itemize", 7 }, /* TEXICMD_ITEMIZE */
Line 329  static const struct texitok texitoks[TEXICMD__MAX] = {
Line 332  static const struct texitok texitoks[TEXICMD__MAX] = {
         { dosymbol, " ", 1 }, /* TEXICMD_SPACE */          { dosymbol, " ", 1 }, /* TEXICMD_SPACE */
         { dodisplay, "smalldisplay", 12 }, /* TEXICMD_SMALLDISPLAY */          { dodisplay, "smalldisplay", 12 }, /* TEXICMD_SMALLDISPLAY */
         { doexample, "smallexample", 12 }, /* TEXICMD_SMALLEXAMPLE */          { doexample, "smallexample", 12 }, /* TEXICMD_SMALLEXAMPLE */
           { dodisplay, "smallindentblock", 16 }, /* TEXICMD_SMALLINDENTBLOCK */
         { dosymbol, "{", 1 }, /* TEXICMD_SQUIGGLE_LEFT */          { dosymbol, "{", 1 }, /* TEXICMD_SQUIGGLE_LEFT */
         { dosymbol, "}", 1 }, /* TEXICMD_SQUIGGLE_RIGHT */          { dosymbol, "}", 1 }, /* TEXICMD_SQUIGGLE_RIGHT */
         { dofont, "strong", 6 }, /* TEXICMD_STRONG */          { dofont, "strong", 6 }, /* TEXICMD_STRONG */
Line 1251  dodisplay(struct texi *p, enum texicmd cmd, 
Line 1255  dodisplay(struct texi *p, enum texicmd cmd, 
         const char *buf, size_t sz, size_t *pos)          const char *buf, size_t sz, size_t *pos)
 {  {
   
         teximacro(p, "Bd -display -offset indent");          teximacro(p, "Bd -filled -offset indent");
         p->seenvs = 1;          p->seenvs = 1;
         /* FIXME: ignore and parseeoln. */          /* FIXME: ignore and parseeoln. */
         advanceeoln(p, buf, sz, pos, 1);          advanceeoln(p, buf, sz, pos, 1);
         parseto(p, buf, sz, pos, "display");          parseto(p, buf, sz, pos, texitoks[cmd].tok);
         teximacro(p, "Ed");          teximacro(p, "Ed");
 }  }
   
Line 1263  static void
Line 1267  static void
 doexample(struct texi *p, enum texicmd cmd,  doexample(struct texi *p, enum texicmd cmd,
         const char *buf, size_t sz, size_t *pos)          const char *buf, size_t sz, size_t *pos)
 {  {
         const char      *blk;  
   
         blk = TEXICMD_EXAMPLE == cmd ?  "example" : "smallexample";  
   
         teximacro(p, "Bd -literal -offset indent");          teximacro(p, "Bd -literal -offset indent");
         /* FIXME: ignore and parseeoln. */          /* FIXME: ignore and parseeoln. */
         advanceeoln(p, buf, sz, pos, 1);          advanceeoln(p, buf, sz, pos, 1);
         p->literal++;          p->literal++;
         parseto(p, buf, sz, pos, blk);          parseto(p, buf, sz, pos, texitoks[cmd].tok);
         p->literal--;          p->literal--;
         teximacro(p, "Ed");          teximacro(p, "Ed");
 }  }
Line 1459  static void
Line 1460  static void
 dosubsection(struct texi *p, enum texicmd cmd,  dosubsection(struct texi *p, enum texicmd cmd,
                 const char *buf, size_t sz, size_t *pos)                  const char *buf, size_t sz, size_t *pos)
 {  {
   
           if (p->outmacro)
                   texierr(p, "\"Em\" in open line scope!?");
           else if (p->literal)
                   texierr(p, "\"Em\" in a literal scope!?");
   
         texivspace(p);          texivspace(p);
         teximacroopen(p, "Em");          teximacroopen(p, "Em");

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

CVSweb