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

Diff for /mandoc/mdoc_html.c between version 1.14 and 1.15

version 1.14, 2009/09/26 18:02:51 version 1.15, 2009/09/26 18:31:36
Line 1603  static int
Line 1603  static int
 mdoc_fn_pre(MDOC_ARGS)  mdoc_fn_pre(MDOC_ARGS)
 {  {
         struct tag              *t;          struct tag              *t;
         struct htmlpair          tag;          struct htmlpair          tag[2];
         const struct mdoc_node  *nn;          const struct mdoc_node  *nn;
         char                     nbuf[BUFSIZ];          char                     nbuf[BUFSIZ];
         const char              *sp, *ep;          const char              *sp, *ep;
         int                      sz;          int                      sz, i;
   
         if (SEC_SYNOPSIS == n->sec) {          if (SEC_SYNOPSIS == n->sec) {
                 if (n->next) {                  bufcat("margin-left: 6em;");
                         tag.key = ATTR_STYLE;                  bufcat("text-indent: -6em;");
                         tag.val = "margin-bottom: 1em";                  if (n->next)
                         print_otag(h, TAG_DIV, 1, &tag);                          bufcat("margin-bottom: 1em;");
                 } else                  tag[0].key = ATTR_STYLE;
                         print_otag(h, TAG_DIV, 0, NULL);                  tag[0].val = buf;
                   print_otag(h, TAG_DIV, 1, tag);
         }          }
   
         /* Split apart into type and name. */          /* Split apart into type and name. */
   
         tag.key = ATTR_CLASS;          tag[0].key = ATTR_CLASS;
         tag.val = "ftype";          tag[0].val = "ftype";
         t = print_otag(h, TAG_SPAN, 1, &tag);          t = print_otag(h, TAG_SPAN, 1, tag);
   
         assert(n->child->string);          assert(n->child->string);
         sp = n->child->string;          sp = n->child->string;
Line 1636  mdoc_fn_pre(MDOC_ARGS)
Line 1637  mdoc_fn_pre(MDOC_ARGS)
   
         print_tagq(h, t);          print_tagq(h, t);
   
         tag.key = ATTR_CLASS;          tag[0].key = ATTR_CLASS;
         tag.val = "fname";          tag[0].val = "fname";
         t = print_otag(h, TAG_SPAN, 1, &tag);          t = print_otag(h, TAG_SPAN, 1, tag);
   
         if (sp) {          if (sp) {
                 (void)strlcpy(nbuf, sp, BUFSIZ);                  (void)strlcpy(nbuf, sp, BUFSIZ);
Line 1651  mdoc_fn_pre(MDOC_ARGS)
Line 1652  mdoc_fn_pre(MDOC_ARGS)
         print_text(h, "(");          print_text(h, "(");
   
         for (nn = n->child->next; nn; nn = nn->next) {          for (nn = n->child->next; nn; nn = nn->next) {
                 tag.key = ATTR_CLASS;                  i = 0;
                 tag.val = "farg";                  tag[i].key = ATTR_CLASS;
                 t = print_otag(h, TAG_SPAN, 1, &tag);                  tag[i++].val = "farg";
                   if (SEC_SYNOPSIS == n->sec) {
                           tag[i].key = ATTR_STYLE;
                           tag[i++].val = "white-space: nowrap;";
                   }
   
                   t = print_otag(h, TAG_SPAN, i, tag);
                 print_text(h, nn->string);                  print_text(h, nn->string);
                 print_tagq(h, t);                  print_tagq(h, t);
                 if (nn->next)                  if (nn->next)

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

CVSweb