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

Diff for /texi2mdoc/main.c between version 1.55 and 1.56

version 1.55, 2015/03/01 00:25:07 version 1.56, 2015/03/01 13:39:51
Line 990  dotitle(struct texi *p, enum texicmd cmd, size_t *pos)
Line 990  dotitle(struct texi *p, enum texicmd cmd, size_t *pos)
         start = end = *pos;          start = end = *pos;
         while (end < BUFSZ(p) && '\n' != BUF(p)[end])          while (end < BUFSZ(p) && '\n' != BUF(p)[end])
                 end++;                  end++;
           if (end < BUFSZ(p))
                   end++;
         advanceeoln(p, pos, 1);          advanceeoln(p, pos, 1);
         free(p->subtitle);          free(p->subtitle);
         p->subtitle = malloc(end - start + 1);          p->subtitle = malloc(end - start + 1);
Line 1410  dovalue(struct texi *p, enum texicmd cmd, size_t *pos)
Line 1412  dovalue(struct texi *p, enum texicmd cmd, size_t *pos)
                         texiputchar(p, ' ');                          texiputchar(p, ' ');
                 p->seenws = 0;                  p->seenws = 0;
                 if (NULL != (cp = valueblookup(p, pos)))                  if (NULL != (cp = valueblookup(p, pos)))
                         texisplice(p, cp, strlen(cp), pos);                          texisplice(p, cp, strlen(cp), *pos);
                 else                  else
                         texiputchars(p, "{No value}");                          texiputchars(p, "{No value}");
         } else if (TEXICMD_IFCLEAR == cmd) {          } else if (TEXICMD_IFCLEAR == cmd) {
Line 1577  dosection(struct texi *p, enum texicmd cmd, size_t *po
Line 1579  dosection(struct texi *p, enum texicmd cmd, size_t *po
   
         if (0 == sec && NULL != p->chapters) {          if (0 == sec && NULL != p->chapters) {
                 teximdocclose(p, 0);                  teximdocclose(p, 0);
                 teximdocopen(p);                  teximdocopen(p, pos);
         }          }
   
         teximacroopen(p, sects[sec]);          teximacroopen(p, sects[sec]);
Line 1594  dotop(struct texi *p, enum texicmd cmd, size_t *pos)
Line 1596  dotop(struct texi *p, enum texicmd cmd, size_t *pos)
                 texierr(p, "@top command while ignoring");                  texierr(p, "@top command while ignoring");
   
         if (NULL == p->chapters)          if (NULL == p->chapters)
                 teximdocopen(p);                  teximdocopen(p, pos);
         dosection(p, cmd, pos);          dosection(p, cmd, pos);
 }  }
   
Line 1752  doend(struct texi *p, enum texicmd cmd, size_t *pos)
Line 1754  doend(struct texi *p, enum texicmd cmd, size_t *pos)
         while (*pos < BUFSZ(p) && '\n' != BUF(p)[*pos])          while (*pos < BUFSZ(p) && '\n' != BUF(p)[*pos])
                 advance(p, pos);                  advance(p, pos);
   
         texiwarn(p, "unexpected \"end\": %.*s", (int)(*pos - start), &BUF(p)[start]);          texiwarn(p, "unexpected \"end\": %.*s",
                   (int)(*pos - start), &BUF(p)[start]);
         advanceeoln(p, pos, 1);          advanceeoln(p, pos, 1);
 }  }
   
Line 1899  main(int argc, char *argv[])
Line 1902  main(int argc, char *argv[])
         }          }
   
         texiexit(&texi);          texiexit(&texi);
         return(EXIT_FAILURE);          exit(EXIT_SUCCESS);
 usage:  usage:
         fprintf(stderr, "usage: %s [-Cdir] [-Idirs] [file]\n", progname);          fprintf(stderr, "usage: %s [-Cdir] [-Idirs] [file]\n", progname);
         return(EXIT_FAILURE);          return(EXIT_FAILURE);

Legend:
Removed from v.1.55  
changed lines
  Added in v.1.56

CVSweb