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

Diff for /mandoc/roff.c between version 1.106 and 1.107

version 1.106, 2010/12/02 10:53:03 version 1.107, 2010/12/06 13:25:25
Line 463  roff_parseln(struct roff *r, int ln, char **bufp, 
Line 463  roff_parseln(struct roff *r, int ln, char **bufp, 
         if (ROFF_MAX == (t = roff_parse(r, *bufp, &pos)))          if (ROFF_MAX == (t = roff_parse(r, *bufp, &pos)))
                 return(ROFF_CONT);                  return(ROFF_CONT);
   
         ROFF_DEBUG("roff: intercept new-scope: %s, [%s]\n",          ROFF_DEBUG("roff: intercept new-scope: [%s], [%s]\n",
                         roffs[t].name, &(*bufp)[pos]);                          ROFF_USERDEF == t ? r->current_string : roffs[t].name,
                           &(*bufp)[pos]);
   
         assert(roffs[t].proc);          assert(roffs[t].proc);
         return((*roffs[t].proc)          return((*roffs[t].proc)
                         (r, t, bufp, szp,                          (r, t, bufp, szp,
Line 650  roff_block(ROFF_ARGS)
Line 652  roff_block(ROFF_ARGS)
                         (*r->msg)(MANDOCERR_NOARGS, r->data, ln, ppos, NULL);                          (*r->msg)(MANDOCERR_NOARGS, r->data, ln, ppos, NULL);
                         return(ROFF_IGN);                          return(ROFF_IGN);
                 }                  }
   
                   /*
                    * Re-write `de1', since we don't really care about
                    * groff's strange compatibility mode, into `de'.
                    */
   
                 if (ROFF_de1 == tok)                  if (ROFF_de1 == tok)
                         tok = ROFF_de;                          tok = ROFF_de;
                 if (ROFF_de == tok)                  if (ROFF_de == tok)
Line 657  roff_block(ROFF_ARGS)
Line 665  roff_block(ROFF_ARGS)
                 else                  else
                         (*r->msg)(MANDOCERR_REQUEST, r->data, ln, ppos,                          (*r->msg)(MANDOCERR_REQUEST, r->data, ln, ppos,
                             roffs[tok].name);                              roffs[tok].name);
   
                 while ((*bufp)[pos] && ' ' != (*bufp)[pos])                  while ((*bufp)[pos] && ' ' != (*bufp)[pos])
                         pos++;                          pos++;
   
                 while (' ' == (*bufp)[pos])                  while (' ' == (*bufp)[pos])
                         (*bufp)[pos++] = '\0';                          (*bufp)[pos++] = '\0';
         }          }
Line 670  roff_block(ROFF_ARGS)
Line 680  roff_block(ROFF_ARGS)
          * with the same name, if there is one.  New content will be           * with the same name, if there is one.  New content will be
          * added from roff_block_text() in multiline mode.           * added from roff_block_text() in multiline mode.
          */           */
   
         if (ROFF_de == tok)          if (ROFF_de == tok)
                 roff_setstr(r, name, "", 0);                  roff_setstr(r, name, NULL, 0);
   
         if ('\0' == (*bufp)[pos])          if ('\0' == (*bufp)[pos])
                 return(ROFF_IGN);                  return(ROFF_IGN);
   
           /* If present, process the custom end-of-line marker. */
   
         sv = pos;          sv = pos;
         while ((*bufp)[pos] && ' ' != (*bufp)[pos] &&          while ((*bufp)[pos] &&
                           ' ' != (*bufp)[pos] &&
                         '\t' != (*bufp)[pos])                          '\t' != (*bufp)[pos])
                 pos++;                  pos++;
   
Line 699  roff_block(ROFF_ARGS)
Line 713  roff_block(ROFF_ARGS)
         r->last->end[(int)sz] = '\0';          r->last->end[(int)sz] = '\0';
   
         if ((*bufp)[pos])          if ((*bufp)[pos])
                 if ( ! (*r->msg)(MANDOCERR_ARGSLOST, r->data, ln, pos, NULL))                  (*r->msg)(MANDOCERR_ARGSLOST, r->data, ln, pos, NULL);
                         return(ROFF_ERR);  
   
         return(ROFF_IGN);          return(ROFF_IGN);
 }  }
Line 933  roff_cond(ROFF_ARGS)
Line 946  roff_cond(ROFF_ARGS)
          */           */
   
         if ('\0' == (*bufp)[pos] && sv != pos) {          if ('\0' == (*bufp)[pos] && sv != pos) {
                 if ((*r->msg)(MANDOCERR_NOARGS, r->data, ln, ppos, NULL))                  (*r->msg)(MANDOCERR_NOARGS, r->data, ln, ppos, NULL);
                         return(ROFF_IGN);                  return(ROFF_IGN);
                 return(ROFF_ERR);  
         }          }
   
         roffnode_push(r, tok, NULL, ln, ppos);          roffnode_push(r, tok, NULL, ln, ppos);

Legend:
Removed from v.1.106  
changed lines
  Added in v.1.107

CVSweb