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

Diff for /mandoc/html.c between version 1.203 and 1.204

version 1.203, 2017/01/28 22:36:38 version 1.204, 2017/01/29 14:02:41
Line 132  html_alloc(const struct manoutput *outopts)
Line 132  html_alloc(const struct manoutput *outopts)
   
         h = mandoc_calloc(1, sizeof(struct html));          h = mandoc_calloc(1, sizeof(struct html));
   
         h->tags.head = NULL;          h->tag = NULL;
         h->style = outopts->style;          h->style = outopts->style;
         h->base_man = outopts->man;          h->base_man = outopts->man;
         h->base_includes = outopts->includes;          h->base_includes = outopts->includes;
Line 150  html_free(void *p)
Line 150  html_free(void *p)
   
         h = (struct html *)p;          h = (struct html *)p;
   
         while ((tag = h->tags.head) != NULL) {          while ((tag = h->tag) != NULL) {
                 h->tags.head = tag->next;                  h->tag = tag->next;
                 free(tag);                  free(tag);
         }          }
   
Line 455  print_otag(struct html *h, enum htmltag tag, const cha
Line 455  print_otag(struct html *h, enum htmltag tag, const cha
   
         tflags = htmltags[tag].flags;          tflags = htmltags[tag].flags;
   
         /* Push this tags onto the stack of open scopes. */          /* Push this tag onto the stack of open scopes. */
   
         if ((tflags & HTML_NOSTACK) == 0) {          if ((tflags & HTML_NOSTACK) == 0) {
                 t = mandoc_malloc(sizeof(struct tag));                  t = mandoc_malloc(sizeof(struct tag));
                 t->tag = tag;                  t->tag = tag;
                 t->next = h->tags.head;                  t->next = h->tag;
                 h->tags.head = t;                  h->tag = t;
         } else          } else
                 t = NULL;                  t = NULL;
   
Line 699  print_ctag(struct html *h, struct tag *tag)
Line 699  print_ctag(struct html *h, struct tag *tag)
         if (tflags & HTML_NLAFTER)          if (tflags & HTML_NLAFTER)
                 print_endline(h);                  print_endline(h);
   
         h->tags.head = tag->next;          h->tag = tag->next;
         free(tag);          free(tag);
 }  }
   
Line 760  print_tagq(struct html *h, const struct tag *until)
Line 760  print_tagq(struct html *h, const struct tag *until)
 {  {
         struct tag      *tag;          struct tag      *tag;
   
         while ((tag = h->tags.head) != NULL) {          while ((tag = h->tag) != NULL) {
                 print_ctag(h, tag);                  print_ctag(h, tag);
                 if (until && tag == until)                  if (until && tag == until)
                         return;                          return;
Line 772  print_stagq(struct html *h, const struct tag *suntil)
Line 772  print_stagq(struct html *h, const struct tag *suntil)
 {  {
         struct tag      *tag;          struct tag      *tag;
   
         while ((tag = h->tags.head) != NULL) {          while ((tag = h->tag) != NULL) {
                 if (suntil && tag == suntil)                  if (suntil && tag == suntil)
                         return;                          return;
                 print_ctag(h, tag);                  print_ctag(h, tag);

Legend:
Removed from v.1.203  
changed lines
  Added in v.1.204

CVSweb