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

Diff for /mandoc/man.c between version 1.22 and 1.26

version 1.22, 2009/06/18 10:32:00 version 1.26, 2009/07/04 09:01:55
Line 252  man_node_free(struct man_node *p)
Line 252  man_node_free(struct man_node *p)
   
         if (p->string)          if (p->string)
                 free(p->string);                  free(p->string);
           if (p->parent)
                   p->parent->nchild--;
         free(p);          free(p);
 }  }
   
Line 265  man_node_freelist(struct man_node *p)
Line 267  man_node_freelist(struct man_node *p)
         if (p->next)          if (p->next)
                 man_node_freelist(p->next);                  man_node_freelist(p->next);
   
           assert(0 == p->nchild);
         man_node_free(p);          man_node_free(p);
 }  }
   
Line 434  man_vwarn(struct man *man, int ln, int pos, const char
Line 437  man_vwarn(struct man *man, int ln, int pos, const char
 }  }
   
   
   int
   man_err(struct man *m, int line, int pos,
                   int iserr, enum merr type)
   {
           const char       *p;
   
           p = NULL;
           switch (type) {
           case (WNPRINT):
                   p = "invalid character";
                   break;
           case (WNMEM):
                   p = "memory exhausted";
                   break;
           case (WMSEC):
                   p = "invalid manual section";
                   break;
           case (WDATE):
                   p = "invalid date format";
                   break;
           case (WLNSCOPE):
                   p = "scope of prior line violated";
                   break;
           case (WTSPACE):
                   p = "trailing whitespace at end of line";
                   break;
           case (WTQUOTE):
                   p = "unterminated quotation";
                   break;
           case (WNODATA):
                   p = "document has no data";
                   break;
           case (WNOTITLE):
                   p = "document has no title/section";
                   break;
           case (WESCAPE):
                   p = "invalid escape sequence";
                   break;
           }
           assert(p);
   
           if (iserr)
                   return(man_verr(m, line, pos, p));
   
           return(man_vwarn(m, line, pos, p));
   }

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.26

CVSweb