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

Diff for /mandoc/html.c between version 1.132 and 1.133

version 1.132, 2011/04/09 15:29:40 version 1.133, 2011/04/29 22:18:12
Line 122  ml_alloc(char *outopts, enum htmltype type)
Line 122  ml_alloc(char *outopts, enum htmltype type)
   
         h->type = type;          h->type = type;
         h->tags.head = NULL;          h->tags.head = NULL;
         h->symtab = chars_init(CHARS_HTML);          h->symtab = mchars_init(MCHARS_HTML);
   
         while (outopts && *outopts)          while (outopts && *outopts)
                 switch (getsubopt(&outopts, UNCONST(toks), &v)) {                  switch (getsubopt(&outopts, UNCONST(toks), &v)) {
Line 172  html_free(void *p)
Line 172  html_free(void *p)
         }          }
   
         if (h->symtab)          if (h->symtab)
                 chars_free(h->symtab);                  mchars_free(h->symtab);
   
         free(h);          free(h);
 }  }
Line 214  print_num(struct html *h, const char *p, size_t len)
Line 214  print_num(struct html *h, const char *p, size_t len)
 {  {
         const char      *rhs;          const char      *rhs;
   
         rhs = chars_num2char(p, len);          rhs = mchars_num2char(p, len);
         if (rhs)          if (rhs)
                 putchar((int)*rhs);                  putchar((int)*rhs);
 }  }
Line 226  print_spec(struct html *h, const char *p, size_t len)
Line 226  print_spec(struct html *h, const char *p, size_t len)
         const char      *rhs;          const char      *rhs;
         size_t           sz;          size_t           sz;
   
         if ((cp = chars_spec2cp(h->symtab, p, len)) > 0) {          if ((cp = mchars_spec2cp(h->symtab, p, len)) > 0) {
                 printf("&#%d;", cp);                  printf("&#%d;", cp);
                 return;                  return;
         } else if (-1 == cp && 1 == len) {          } else if (-1 == cp && 1 == len) {
Line 235  print_spec(struct html *h, const char *p, size_t len)
Line 235  print_spec(struct html *h, const char *p, size_t len)
         } else if (-1 == cp)          } else if (-1 == cp)
                 return;                  return;
   
         if (NULL != (rhs = chars_spec2str(h->symtab, p, len, &sz)))          if (NULL != (rhs = mchars_spec2str(h->symtab, p, len, &sz)))
                 fwrite(rhs, 1, sz, stdout);                  fwrite(rhs, 1, sz, stdout);
 }  }
   
Line 247  print_res(struct html *h, const char *p, size_t len)
Line 247  print_res(struct html *h, const char *p, size_t len)
         const char      *rhs;          const char      *rhs;
         size_t           sz;          size_t           sz;
   
         if ((cp = chars_res2cp(h->symtab, p, len)) > 0) {          if ((cp = mchars_res2cp(h->symtab, p, len)) > 0) {
                 printf("&#%d;", cp);                  printf("&#%d;", cp);
                 return;                  return;
         } else if (-1 == cp)          } else if (-1 == cp)
                 return;                  return;
   
         if (NULL != (rhs = chars_res2str(h->symtab, p, len, &sz)))          if (NULL != (rhs = mchars_res2str(h->symtab, p, len, &sz)))
                 fwrite(rhs, 1, sz, stdout);                  fwrite(rhs, 1, sz, stdout);
 }  }
   

Legend:
Removed from v.1.132  
changed lines
  Added in v.1.133

CVSweb