[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.78 and 1.84

version 1.78, 2010/06/07 11:01:15 version 1.84, 2010/06/13 21:41:58
Line 1035  mdoc_it_pre(MDOC_ARGS)
Line 1035  mdoc_it_pre(MDOC_ARGS)
         if (MDOC_BLOCK != n->type)          if (MDOC_BLOCK != n->type)
                 bl = bl->parent;                  bl = bl->parent;
   
         type = bl->data.list;          SCALE_HS_INIT(&offs, 0);
   
         /* Set default width and offset. */          type = bl->data.Bl.type;
           comp = bl->data.Bl.comp;
   
         SCALE_HS_INIT(&offs, 0);          if (bl->data.Bl.offs)
                   a2offs(bl->data.Bl.offs, &offs);
   
         switch (type) {          switch (type) {
         case (LIST_enum):          case (LIST_enum):
Line 1056  mdoc_it_pre(MDOC_ARGS)
Line 1058  mdoc_it_pre(MDOC_ARGS)
                 break;                  break;
         }          }
   
         /* Get width, offset, and compact arguments. */          if (bl->data.Bl.width)
                   a2width(bl->data.Bl.width, &width);
   
         wp = -1;          wp = -1;
         for (comp = i = 0; bl->args && i < (int)bl->args->argc; i++)          for (i = 0; bl->args && i < (int)bl->args->argc; i++)
                 switch (bl->args->argv[i].arg) {                  switch (bl->args->argv[i].arg) {
                 case (MDOC_Column):                  case (MDOC_Column):
                         wp = i; /* Save for later. */                          wp = i; /* Save for later. */
                         break;                          break;
                 case (MDOC_Width):  
                         a2width(bl->args->argv[i].value[0], &width);  
                         break;  
                 case (MDOC_Offset):  
                         a2offs(bl->args->argv[i].value[0], &offs);  
                         break;  
                 case (MDOC_Compact):  
                         comp = 1;  
                         break;  
                 default:                  default:
                         break;                          break;
                 }                  }
Line 1123  mdoc_bl_pre(MDOC_ARGS)
Line 1117  mdoc_bl_pre(MDOC_ARGS)
                 return(0);                  return(0);
         if (MDOC_BLOCK != n->type)          if (MDOC_BLOCK != n->type)
                 return(1);                  return(1);
         if (LIST_enum != n->data.list)          if (LIST_enum != n->data.Bl.type)
                 return(1);                  return(1);
   
         ord = malloc(sizeof(struct ord));          ord = malloc(sizeof(struct ord));
Line 1147  mdoc_bl_post(MDOC_ARGS)
Line 1141  mdoc_bl_post(MDOC_ARGS)
   
         if (MDOC_BLOCK != n->type)          if (MDOC_BLOCK != n->type)
                 return;                  return;
         if (LIST_enum != n->data.list)          if (LIST_enum != n->data.Bl.type)
                 return;                  return;
   
         ord = h->ords.head;          ord = h->ords.head;
Line 1353  static int
Line 1347  static int
 mdoc_bd_pre(MDOC_ARGS)  mdoc_bd_pre(MDOC_ARGS)
 {  {
         struct htmlpair          tag[2];          struct htmlpair          tag[2];
         int                      type, comp, i;          int                      comp;
         const struct mdoc_node  *bl, *nn;          const struct mdoc_node  *nn;
         struct roffsu            su;          struct roffsu            su;
   
         if (MDOC_BLOCK == n->type)          if (MDOC_HEAD == n->type)
                 bl = n;  
         else if (MDOC_HEAD == n->type)  
                 return(0);                  return(0);
         else  
                 bl = n->parent;  
   
         SCALE_VS_INIT(&su, 0);          SCALE_VS_INIT(&su, 0);
   
         type = comp = 0;          if (n->data.Bd.offs)
         for (i = 0; bl->args && i < (int)bl->args->argc; i++)                  a2offs(n->data.Bd.offs, &su);
                 switch (bl->args->argv[i].arg) {  
                 case (MDOC_Offset):  
                         a2offs(bl->args->argv[i].value[0], &su);  
                         break;  
                 case (MDOC_Compact):  
                         comp = 1;  
                         break;  
                 case (MDOC_Centred):  
                         /* FALLTHROUGH */  
                 case (MDOC_Ragged):  
                         /* FALLTHROUGH */  
                 case (MDOC_Filled):  
                         /* FALLTHROUGH */  
                 case (MDOC_Unfilled):  
                         /* FALLTHROUGH */  
                 case (MDOC_Literal):  
                         type = bl->args->argv[i].arg;  
                         break;  
                 default:  
                         break;  
                 }  
   
           comp = n->data.Bd.comp;
   
         /* FIXME: -centered, etc. formatting. */          /* FIXME: -centered, etc. formatting. */
         /* FIXME: does not respect -offset ??? */          /* FIXME: does not respect -offset ??? */
   
Line 1415  mdoc_bd_pre(MDOC_ARGS)
Line 1386  mdoc_bd_pre(MDOC_ARGS)
                 return(1);                  return(1);
         }          }
   
         if (MDOC_Unfilled != type && MDOC_Literal != type)          if (DISP_unfilled != n->data.Bd.type &&
                           DISP_literal != n->data.Bd.type)
                 return(1);                  return(1);
   
         PAIR_CLASS_INIT(&tag[0], "lit");          PAIR_CLASS_INIT(&tag[0], "lit");

Legend:
Removed from v.1.78  
changed lines
  Added in v.1.84

CVSweb