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

Diff for /texi2mdoc/main.c between version 1.68 and 1.69

version 1.68, 2015/03/12 10:44:34 version 1.69, 2015/03/13 08:07:33
Line 607  domacro(struct texi *p, enum texicmd cmd, size_t *pos)
Line 607  domacro(struct texi *p, enum texicmd cmd, size_t *pos)
         m.key[end - start] = '\0';          m.key[end - start] = '\0';
   
         m.args = argparse(p, pos, &m.argsz, 0);          m.args = argparse(p, pos, &m.argsz, 0);
           if (*pos == BUFSZ(p)) {
                   texiwarn(p, "unexpected EOF");
                   return;
           }
   
         /* Note: we advance to the beginning of the macro. */          /* Note: we advance to the beginning of the macro. */
         advanceeoln(p, pos, 1);          advanceeoln(p, pos, 1);
           if ((start = *pos) == BUFSZ(p)) {
                   texiwarn(p, "unexpected EOF");
                   return;
           }
   
         /*          /*
          * According to the Texinfo manual, the macro ends on the           * According to the Texinfo manual, the macro ends on the
Line 622  domacro(struct texi *p, enum texicmd cmd, size_t *pos)
Line 630  domacro(struct texi *p, enum texicmd cmd, size_t *pos)
          * @end macro without the leading newline else we might look           * @end macro without the leading newline else we might look
          * past empty macros.           * past empty macros.
          */           */
         start = *pos;  
         endtok = "@end macro\n";          endtok = "@end macro\n";
         endtoksz = strlen(endtok);          endtoksz = strlen(endtok);
         blk = memmem(&BUF(p)[start], BUFSZ(p) - start, endtok, endtoksz);          blk = memmem(&BUF(p)[start], BUFSZ(p) - start, endtok, endtoksz);
Line 1526  doprintindex(struct texi *p, enum texicmd cmd, size_t 
Line 1533  doprintindex(struct texi *p, enum texicmd cmd, size_t 
         }          }
   
         advance(p, pos);          advance(p, pos);
         if (0 == (len = end - start)) {          if (*pos == BUFSZ(p)) {
                   texiwarn(p, "unexpected EOF");
                   return;
           } else if (0 == (len = end - start)) {
                 texiwarn(p, "zero-length index");                  texiwarn(p, "zero-length index");
                 return;                  return;
         }          }
Line 1672  domenu(struct texi *p, enum texicmd cmd, size_t *pos)
Line 1682  domenu(struct texi *p, enum texicmd cmd, size_t *pos)
         while (*pos < BUFSZ(p)) {          while (*pos < BUFSZ(p)) {
                 while (*pos < BUFSZ(p) && isws(BUF(p)[*pos]))                  while (*pos < BUFSZ(p) && isws(BUF(p)[*pos]))
                         advance(p, pos);                          advance(p, pos);
                 if ('*' != BUF(p)[*pos]) {                  if (*pos < BUFSZ(p) && '*' != BUF(p)[*pos]) {
                         if (TEXICMD_END == peeklinecmd(p, *pos))                          if (TEXICMD_END == peeklinecmd(p, *pos))
                                 break;                                  break;
                         parseeoln(p, pos);                          parseeoln(p, pos);
Line 1695  domenu(struct texi *p, enum texicmd cmd, size_t *pos)
Line 1705  domenu(struct texi *p, enum texicmd cmd, size_t *pos)
                         p->seenws = *pos < BUFSZ(p) && isws(BUF(p)[*pos]);                          p->seenws = *pos < BUFSZ(p) && isws(BUF(p)[*pos]);
                 while (*pos < BUFSZ(p) && isws(BUF(p)[*pos]))                  while (*pos < BUFSZ(p) && isws(BUF(p)[*pos]))
                         advance(p, pos);                          advance(p, pos);
                 if ('*' != BUF(p)[*pos]) {                  if (*pos == BUFSZ(p)) {
                           texiwarn(p, "unexpected EOF");
                           return;
                   } else if ('*' != BUF(p)[*pos]) {
                         tcmd = peeklinecmd(p, *pos);                          tcmd = peeklinecmd(p, *pos);
                         if (TEXICMD_END == tcmd)                          if (TEXICMD_END == tcmd)
                                 break;                                  break;
Line 1714  domenu(struct texi *p, enum texicmd cmd, size_t *pos)
Line 1727  domenu(struct texi *p, enum texicmd cmd, size_t *pos)
                 while (*pos < BUFSZ(p) && ':' != BUF(p)[*pos])                  while (*pos < BUFSZ(p) && ':' != BUF(p)[*pos])
                         advance(p, pos);                          advance(p, pos);
                 entrynameend = *pos;                  entrynameend = *pos;
                   if (*pos == BUFSZ(p)) {
                           texiwarn(p, "unexpected EOF");
                           return;
                   }
                 advance(p, pos);                  advance(p, pos);
   
                 p->seenvs = 0;                  p->seenvs = 0;

Legend:
Removed from v.1.68  
changed lines
  Added in v.1.69

CVSweb