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

Diff for /mandoc/html.c between version 1.71 and 1.72

version 1.71, 2009/10/30 04:57:17 version 1.72, 2009/10/30 18:43:24
Line 100  html_alloc(char *outopts)
Line 100  html_alloc(char *outopts)
         toks[2] = "includes";          toks[2] = "includes";
         toks[3] = NULL;          toks[3] = NULL;
   
         if (NULL == (h = calloc(1, sizeof(struct html))))          h = calloc(1, sizeof(struct html));
                 return(NULL);          if (NULL == h) {
                   fprintf(stderr, "memory exhausted\n");
                   exit(EXIT_FAILURE);
           }
   
         h->tags.head = NULL;          h->tags.head = NULL;
         h->ords.head = NULL;          h->ords.head = NULL;
           h->symtab = chars_init(CHARS_HTML);
   
         if (NULL == (h->symtab = chars_init(CHARS_HTML))) {  
                 free(h);  
                 return(NULL);  
         }  
   
         while (outopts && *outopts)          while (outopts && *outopts)
                 switch (getsubopt(&outopts, UNCONST(toks), &v)) {                  switch (getsubopt(&outopts, UNCONST(toks), &v)) {
                 case (0):                  case (0):
Line 354  print_otag(struct html *h, enum htmltag tag, 
Line 353  print_otag(struct html *h, enum htmltag tag, 
         struct tag      *t;          struct tag      *t;
   
         if ( ! (HTML_NOSTACK & htmltags[tag].flags)) {          if ( ! (HTML_NOSTACK & htmltags[tag].flags)) {
                 if (NULL == (t = malloc(sizeof(struct tag))))                  t = malloc(sizeof(struct tag));
                         err(EXIT_FAILURE, "malloc");                  if (NULL == t) {
                           fprintf(stderr, "memory exhausted\n");
                           exit(EXIT_FAILURE);
                   }
                 t->tag = tag;                  t->tag = tag;
                 t->next = h->tags.head;                  t->next = h->tags.head;
                 h->tags.head = t;                  h->tags.head = t;

Legend:
Removed from v.1.71  
changed lines
  Added in v.1.72

CVSweb