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

Diff for /mandoc/mdoc.c between version 1.170 and 1.171

version 1.170, 2010/12/16 17:14:48 version 1.171, 2010/12/22 11:15:16
Line 511  static void
Line 511  static void
 mdoc_node_free(struct mdoc_node *p)  mdoc_node_free(struct mdoc_node *p)
 {  {
   
         /*          if (p->norm && 0 == --(p->norm->refcnt))
          * XXX: if these end up being problematic in terms of memory                  free(p->norm);
          * management and dereferencing freed blocks, then make them  
          * into reference-counted double-pointers.  
          */  
   
         if (MDOC_Bd == p->tok && MDOC_BLOCK == p->type)  
                 if (p->data.Bd)  
                         free(p->data.Bd);  
         if (MDOC_Bl == p->tok && MDOC_BLOCK == p->type)  
                 if (p->data.Bl)  
                         free(p->data.Bl);  
         if (MDOC_Bf == p->tok && MDOC_HEAD == p->type)  
                 if (p->data.Bf)  
                         free(p->data.Bf);  
         if (MDOC_An == p->tok)  
                 if (p->data.An)  
                         free(p->data.An);  
   
         if (p->string)          if (p->string)
                 free(p->string);                  free(p->string);
         if (p->args)          if (p->args)
Line 624  mdoc_ptext(struct mdoc *m, int line, char *buf, int of
Line 608  mdoc_ptext(struct mdoc *m, int line, char *buf, int of
          */           */
   
         if (MDOC_Bl == n->tok && MDOC_BODY == n->type &&          if (MDOC_Bl == n->tok && MDOC_BODY == n->type &&
                         LIST_column == n->data.Bl->type) {                          LIST_column == n->norm->d.Bl.type) {
                 /* `Bl' is open without any children. */                  /* `Bl' is open without any children. */
                 m->flags |= MDOC_FREECOL;                  m->flags |= MDOC_FREECOL;
                 return(mdoc_macro(m, MDOC_It, line, offs, &offs, buf));                  return(mdoc_macro(m, MDOC_It, line, offs, &offs, buf));
Line 633  mdoc_ptext(struct mdoc *m, int line, char *buf, int of
Line 617  mdoc_ptext(struct mdoc *m, int line, char *buf, int of
         if (MDOC_It == n->tok && MDOC_BLOCK == n->type &&          if (MDOC_It == n->tok && MDOC_BLOCK == n->type &&
                         NULL != n->parent &&                          NULL != n->parent &&
                         MDOC_Bl == n->parent->tok &&                          MDOC_Bl == n->parent->tok &&
                         LIST_column == n->parent->data.Bl->type) {                          LIST_column == n->parent->norm->d.Bl.type) {
                 /* `Bl' has block-level `It' children. */                  /* `Bl' has block-level `It' children. */
                 m->flags |= MDOC_FREECOL;                  m->flags |= MDOC_FREECOL;
                 return(mdoc_macro(m, MDOC_It, line, offs, &offs, buf));                  return(mdoc_macro(m, MDOC_It, line, offs, &offs, buf));
Line 814  mdoc_pmacro(struct mdoc *m, int ln, char *buf, int off
Line 798  mdoc_pmacro(struct mdoc *m, int ln, char *buf, int off
          */           */
   
         if (MDOC_Bl == n->tok && MDOC_BODY == n->type &&          if (MDOC_Bl == n->tok && MDOC_BODY == n->type &&
                         LIST_column == n->data.Bl->type) {                          LIST_column == n->norm->d.Bl.type) {
                 m->flags |= MDOC_FREECOL;                  m->flags |= MDOC_FREECOL;
                 if ( ! mdoc_macro(m, MDOC_It, ln, sv, &sv, buf))                  if ( ! mdoc_macro(m, MDOC_It, ln, sv, &sv, buf))
                         goto err;                          goto err;
Line 830  mdoc_pmacro(struct mdoc *m, int ln, char *buf, int off
Line 814  mdoc_pmacro(struct mdoc *m, int ln, char *buf, int off
         if (MDOC_It == n->tok && MDOC_BLOCK == n->type &&          if (MDOC_It == n->tok && MDOC_BLOCK == n->type &&
                         NULL != n->parent &&                          NULL != n->parent &&
                         MDOC_Bl == n->parent->tok &&                          MDOC_Bl == n->parent->tok &&
                         LIST_column == n->parent->data.Bl->type) {                          LIST_column == n->parent->norm->d.Bl.type) {
                 m->flags |= MDOC_FREECOL;                  m->flags |= MDOC_FREECOL;
                 if ( ! mdoc_macro(m, MDOC_It, ln, sv, &sv, buf))                  if ( ! mdoc_macro(m, MDOC_It, ln, sv, &sv, buf))
                         goto err;                          goto err;

Legend:
Removed from v.1.170  
changed lines
  Added in v.1.171

CVSweb