[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.6 and 1.7

version 1.6, 2009/09/24 11:05:45 version 1.7, 2009/09/24 11:55:28
Line 15 
Line 15 
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.   * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */   */
 #include <sys/types.h>  #include <sys/types.h>
   #include <sys/param.h>
 #include <sys/queue.h>  #include <sys/queue.h>
   
 #include <assert.h>  #include <assert.h>
Line 1560  mdoc_ft_pre(MDOC_ARGS)
Line 1561  mdoc_ft_pre(MDOC_ARGS)
         }          }
   
         tag.key = ATTR_CLASS;          tag.key = ATTR_CLASS;
         tag.val = "type";          tag.val = "ftype";
         print_otag(h, TAG_SPAN, 1, &tag);          print_otag(h, TAG_SPAN, 1, &tag);
         return(1);          return(1);
 }  }
Line 1573  mdoc_fn_pre(MDOC_ARGS)
Line 1574  mdoc_fn_pre(MDOC_ARGS)
         struct tag              *t;          struct tag              *t;
         struct htmlpair          tag;          struct htmlpair          tag;
         const struct mdoc_node  *nn;          const struct mdoc_node  *nn;
           char                     nbuf[BUFSIZ];
           const char              *sp, *ep;
           int                      sz;
   
         if (SEC_SYNOPSIS == n->sec) {          if (SEC_SYNOPSIS == n->sec) {
                 if (n->next) {                  if (n->next) {
Line 1583  mdoc_fn_pre(MDOC_ARGS)
Line 1587  mdoc_fn_pre(MDOC_ARGS)
                         print_otag(h, TAG_DIV, 0, NULL);                          print_otag(h, TAG_DIV, 0, NULL);
         }          }
   
           /* Split apart into type and name. */
   
         tag.key = ATTR_CLASS;          tag.key = ATTR_CLASS;
         tag.val = "type";          tag.val = "ftype";
           t = print_otag(h, TAG_SPAN, 1, &tag);
   
         /* FIXME: can be "type funcname" "type varname"... */          assert(n->child->string);
           sp = n->child->string;
           while ((ep = strchr(sp, ' '))) {
                   sz = MIN(ep - sp, BUFSIZ - 1);
                   (void)memcpy(nbuf, sp, sz);
                   nbuf[sz] = '\0';
                   print_text(h, nbuf);
                   sp = ++ep;
           }
   
           print_tagq(h, t);
   
           tag.key = ATTR_CLASS;
           tag.val = "fname";
         t = print_otag(h, TAG_SPAN, 1, &tag);          t = print_otag(h, TAG_SPAN, 1, &tag);
         print_text(h, n->child->string);  
           if (sp) {
                   (void)strlcpy(nbuf, sp, BUFSIZ);
                   print_text(h, nbuf);
           }
   
         print_tagq(h, t);          print_tagq(h, t);
   
         h->flags |= HTML_NOSPACE;          h->flags |= HTML_NOSPACE;

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

CVSweb