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

Diff for /mandoc/roff.c between version 1.188 and 1.190

version 1.188, 2013/12/25 00:50:05 version 1.190, 2014/01/06 21:34:31
Line 1 
Line 1 
 /*      $Id$ */  /*      $Id$ */
 /*  /*
  * Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>   * Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
  * Copyright (c) 2010, 2011, 2012, 2013 Ingo Schwarze <schwarze@openbsd.org>   * Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org>
  *   *
  * Permission to use, copy, modify, and distribute this software for any   * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above   * purpose with or without fee is hereby granted, provided that the above
Line 109  struct roffreg {
Line 109  struct roffreg {
 struct  roff {  struct  roff {
         enum mparset     parsetype; /* requested parse type */          enum mparset     parsetype; /* requested parse type */
         struct mparse   *parse; /* parse point */          struct mparse   *parse; /* parse point */
           int              quick; /* skip standard macro deletion */
         struct roffnode *last; /* leaf of stack */          struct roffnode *last; /* leaf of stack */
         enum roffrule    rstack[RSTACK_MAX]; /* stack of !`ie' rules */          enum roffrule    rstack[RSTACK_MAX]; /* stack of !`ie' rules */
         char             control; /* control character */          char             control; /* control character */
Line 468  roff_free(struct roff *r)
Line 469  roff_free(struct roff *r)
   
   
 struct roff *  struct roff *
 roff_alloc(enum mparset type, struct mparse *parse)  roff_alloc(enum mparset type, struct mparse *parse, int quick)
 {  {
         struct roff     *r;          struct roff     *r;
         int              i;          int              i;
Line 476  roff_alloc(enum mparset type, struct mparse *parse)
Line 477  roff_alloc(enum mparset type, struct mparse *parse)
         r = mandoc_calloc(1, sizeof(struct roff));          r = mandoc_calloc(1, sizeof(struct roff));
         r->parsetype = type;          r->parsetype = type;
         r->parse = parse;          r->parse = parse;
           r->quick = quick;
         r->rstackpos = -1;          r->rstackpos = -1;
   
         roffhash_init();          roffhash_init();
Line 646  roff_parsetext(char **bufp, size_t *szp, int pos, int 
Line 648  roff_parsetext(char **bufp, size_t *szp, int pos, int 
                 if ('\\' == *p) {                  if ('\\' == *p) {
                         /* Skip over escapes. */                          /* Skip over escapes. */
                         p++;                          p++;
                         esc = mandoc_escape                          esc = mandoc_escape((const char **)&p, NULL, NULL);
                                 ((const char const **)&p, NULL, NULL);  
                         if (ESCAPE_ERROR == esc)                          if (ESCAPE_ERROR == esc)
                                 break;                                  break;
                         continue;                          continue;
Line 1498  roff_Dd(ROFF_ARGS)
Line 1499  roff_Dd(ROFF_ARGS)
 {  {
         const char *const       *cp;          const char *const       *cp;
   
         if (MPARSE_MDOC != r->parsetype)          if (0 == r->quick && MPARSE_MDOC != r->parsetype)
                 for (cp = __mdoc_reserved; *cp; cp++)                  for (cp = __mdoc_reserved; *cp; cp++)
                         roff_setstr(r, *cp, NULL, 0);                          roff_setstr(r, *cp, NULL, 0);
   
Line 1511  roff_TH(ROFF_ARGS)
Line 1512  roff_TH(ROFF_ARGS)
 {  {
         const char *const       *cp;          const char *const       *cp;
   
         if (MPARSE_MDOC != r->parsetype)          if (0 == r->quick && MPARSE_MDOC != r->parsetype)
                 for (cp = __man_reserved; *cp; cp++)                  for (cp = __man_reserved; *cp; cp++)
                         roff_setstr(r, *cp, NULL, 0);                          roff_setstr(r, *cp, NULL, 0);
   

Legend:
Removed from v.1.188  
changed lines
  Added in v.1.190

CVSweb