[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.158 and 1.159

version 1.158, 2011/04/04 15:45:12 version 1.159, 2011/04/04 16:01:47
Line 1628  mdoc_lk_pre(MDOC_ARGS)
Line 1628  mdoc_lk_pre(MDOC_ARGS)
 static int  static int
 mdoc_mt_pre(MDOC_ARGS)  mdoc_mt_pre(MDOC_ARGS)
 {  {
         struct htmlpair          tag[2];          struct htmlpair  tag[2];
         struct tag              *t;          struct tag      *t;
         const struct mdoc_node  *nn;  
   
         PAIR_CLASS_INIT(&tag[0], "link-mail");          PAIR_CLASS_INIT(&tag[0], "link-mail");
   
         for (nn = n->child; nn; nn = nn->next) {          for (n = n->child; n; n = n->next) {
                   assert(MDOC_TEXT == n->type);
   
                 bufinit(h);                  bufinit(h);
                 bufcat(h, "mailto:");                  bufcat(h, "mailto:");
                 bufcat(h, nn->string);                  bufcat(h, n->string);
   
                 PAIR_HREF_INIT(&tag[1], h->buf);                  PAIR_HREF_INIT(&tag[1], h->buf);
                 t = print_otag(h, TAG_A, 2, tag);                  t = print_otag(h, TAG_A, 2, tag);
                 print_text(h, nn->string);                  print_text(h, n->string);
                 print_tagq(h, t);                  print_tagq(h, t);
         }          }
   
Line 1766  mdoc_ic_pre(MDOC_ARGS)
Line 1768  mdoc_ic_pre(MDOC_ARGS)
 static int  static int
 mdoc_rv_pre(MDOC_ARGS)  mdoc_rv_pre(MDOC_ARGS)
 {  {
         const struct mdoc_node  *nn;          struct htmlpair  tag;
         struct htmlpair          tag;          struct tag      *t;
         struct tag              *t;          int              nchild;
   
         if (n->prev)          if (n->prev)
                 print_otag(h, TAG_BR, 0, NULL);                  print_otag(h, TAG_BR, 0, NULL);
   
         print_text(h, "The");          print_text(h, "The");
   
         for (nn = n->child; nn; nn = nn->next) {          nchild = n->nchild;
           for (n = n->child; n; n = n->next) {
                   assert(MDOC_TEXT == n->type);
                 PAIR_CLASS_INIT(&tag, "fname");                  PAIR_CLASS_INIT(&tag, "fname");
   
                 t = print_otag(h, TAG_B, 1, &tag);                  t = print_otag(h, TAG_B, 1, &tag);
                 print_text(h, nn->string);                  print_text(h, n->string);
                 print_tagq(h, t);                  print_tagq(h, t);
   
                 h->flags |= HTML_NOSPACE;                  h->flags |= HTML_NOSPACE;
                 if (nn->next && NULL == nn->next->next)                  print_text(h, "()");
                         print_text(h, "(), and");  
                 else if (nn->next)                  if (nchild > 2 && n->next) {
                         print_text(h, "(),");                          h->flags |= HTML_NOSPACE;
                 else                          print_text(h, ",");
                         print_text(h, "()");                  }
   
                   if (n->next && NULL == n->next->next)
                           print_text(h, "and");
         }          }
   
         if (n->child && n->child->next)          if (nchild > 1)
                 print_text(h, "functions return");                  print_text(h, "functions return");
         else          else
                 print_text(h, "function returns");                  print_text(h, "function returns");

Legend:
Removed from v.1.158  
changed lines
  Added in v.1.159

CVSweb