[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.41 and 1.43

version 1.41, 2009/10/28 05:08:17 version 1.43, 2009/10/30 18:53:08
Line 19 
Line 19 
   
 #include <assert.h>  #include <assert.h>
 #include <ctype.h>  #include <ctype.h>
 #include <err.h>  
 #include <stdio.h>  #include <stdio.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
Line 583  mdoc_sh_pre(MDOC_ARGS)
Line 582  mdoc_sh_pre(MDOC_ARGS)
                 return(1);                  return(1);
         }          }
   
         html_idcpy(buf, "id_", BUFSIZ);          buf[0] = '\0';
         for (nn = n->child; nn; nn = nn->next) {          for (nn = n->child; nn; nn = nn->next) {
                 html_idcat(buf, nn->string, BUFSIZ);                  html_idcat(buf, nn->string, BUFSIZ);
                 if (nn->next)                  if (nn->next)
                         html_idcat(buf, "_", BUFSIZ);                          html_idcat(buf, " ", BUFSIZ);
         }          }
   
         /*          /*
Line 636  mdoc_ss_pre(MDOC_ARGS)
Line 635  mdoc_ss_pre(MDOC_ARGS)
   
         /* TODO: see note in mdoc_sh_pre() about duplicates. */          /* TODO: see note in mdoc_sh_pre() about duplicates. */
   
         html_idcpy(buf, "id_", BUFSIZ);          buf[0] = '\0';
         for (nn = n->child; nn; nn = nn->next) {          for (nn = n->child; nn; nn = nn->next) {
                 html_idcat(buf, nn->string, BUFSIZ);                  html_idcat(buf, nn->string, BUFSIZ);
                 if (nn->next)                  if (nn->next)
                         html_idcat(buf, "_", BUFSIZ);                          html_idcat(buf, " ", BUFSIZ);
         }          }
   
         SCALE_HS_INIT(&su, INDENT - HALFINDENT);          SCALE_HS_INIT(&su, INDENT - HALFINDENT);
Line 954  mdoc_it_head_pre(MDOC_ARGS, int type, struct roffsu *w
Line 953  mdoc_it_head_pre(MDOC_ARGS, int type, struct roffsu *w
         case (MDOC_Item):          case (MDOC_Item):
                 /* FALLTHROUGH */                  /* FALLTHROUGH */
         case (MDOC_Ohang):          case (MDOC_Ohang):
                 print_otag(h, TAG_DIV, 0, NULL);                  return(0);
                 break;  
         case (MDOC_Column):          case (MDOC_Column):
                 bufcat_su(h, "min-width", width);                  bufcat_su(h, "min-width", width);
                 bufcat_style(h, "clear", "none");                  bufcat_style(h, "clear", "none");
Line 1116  mdoc_bl_pre(MDOC_ARGS)
Line 1114  mdoc_bl_pre(MDOC_ARGS)
                 return(1);                  return(1);
   
         ord = malloc(sizeof(struct ord));          ord = malloc(sizeof(struct ord));
         if (NULL == ord)          if (NULL == ord) {
                 err(EXIT_FAILURE, "malloc");                  fprintf(stderr, "memory exhausted\n");
                   exit(EXIT_FAILURE);
           }
         ord->cookie = n;          ord->cookie = n;
         ord->pos = 1;          ord->pos = 1;
         ord->next = h->ords.head;          ord->next = h->ords.head;
Line 1298  mdoc_sx_pre(MDOC_ARGS)
Line 1298  mdoc_sx_pre(MDOC_ARGS)
         /* FIXME: duplicates? */          /* FIXME: duplicates? */
   
         strlcpy(buf, "#", BUFSIZ);          strlcpy(buf, "#", BUFSIZ);
         html_idcat(buf, "id_", BUFSIZ);  
         for (nn = n->child; nn; nn = nn->next) {          for (nn = n->child; nn; nn = nn->next) {
                 html_idcat(buf, nn->string, BUFSIZ);                  html_idcat(buf, nn->string, BUFSIZ);
                 if (nn->next)                  if (nn->next)
                         html_idcat(buf, "_", BUFSIZ);                          html_idcat(buf, " ", BUFSIZ);
         }          }
   
         PAIR_CLASS_INIT(&tag[0], "link-sec");          PAIR_CLASS_INIT(&tag[0], "link-sec");
Line 1719  mdoc_sp_pre(MDOC_ARGS)
Line 1718  mdoc_sp_pre(MDOC_ARGS)
         bufcat_su(h, "height", &su);          bufcat_su(h, "height", &su);
         PAIR_STYLE_INIT(&tag, h);          PAIR_STYLE_INIT(&tag, h);
         print_otag(h, TAG_DIV, 1, &tag);          print_otag(h, TAG_DIV, 1, &tag);
         return(1);          /* So the div isn't empty: */
           print_text(h, "\\~");
   
           return(0);
   
 }  }
   

Legend:
Removed from v.1.41  
changed lines
  Added in v.1.43

CVSweb