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

Diff for /mandoc/tbl_term.c between version 1.7 and 1.10

version 1.7, 2011/01/04 12:06:21 version 1.10, 2011/01/04 15:02:00
Line 206  tbl_hframe(struct termp *tp, const struct tbl_span *sp
Line 206  tbl_hframe(struct termp *tp, const struct tbl_span *sp
                         TBL_OPT_DBOX & sp->tbl->opts))                          TBL_OPT_DBOX & sp->tbl->opts))
                 return;                  return;
   
         tp->flags |= TERMP_NONOSPACE;  
         tp->flags |= TERMP_NOSPACE;  
   
         /*          /*
          * Print out the horizontal part of a frame or double frame.  A           * Print out the horizontal part of a frame or double frame.  A
          * double frame has an unbroken `-' outer line the width of the           * double frame has an unbroken `-' outer line the width of the
Line 256  tbl_data(struct termp *tp, const struct tbl *tbl,
Line 253  tbl_data(struct termp *tp, const struct tbl *tbl,
         }          }
   
         switch (dp->pos) {          switch (dp->pos) {
           case (TBL_DATA_NONE):
                   tbl_char(tp, ASCII_NBRSP, tbp->width);
                   return;
         case (TBL_DATA_HORIZ):          case (TBL_DATA_HORIZ):
                 /* FALLTHROUGH */                  /* FALLTHROUGH */
         case (TBL_DATA_NHORIZ):          case (TBL_DATA_NHORIZ):
Line 423  tbl_calc(struct termp *tp, const struct tbl_span *sp)
Line 423  tbl_calc(struct termp *tp, const struct tbl_span *sp)
         hp = sp->head;          hp = sp->head;
   
         for ( ; sp; sp = sp->next) {          for ( ; sp; sp = sp->next) {
                 switch (sp->pos) {                  if (TBL_SPAN_DATA != sp->pos)
                 case (TBL_DATA_HORIZ):  
                         /* FALLTHROUGH */  
                 case (TBL_DATA_DHORIZ):  
                         continue;                          continue;
                 default:  
                         break;  
                 }  
                 for (dp = sp->first; dp; dp = dp->next) {                  for (dp = sp->first; dp; dp = dp->next) {
                         if (NULL == dp->layout)                          if (NULL == dp->layout)
                                 continue;                                  continue;
Line 458  static void
Line 453  static void
 tbl_calc_data(struct termp *tp, const struct tbl *tbl,  tbl_calc_data(struct termp *tp, const struct tbl *tbl,
                 const struct tbl_dat *dp, struct termp_tbl *tblp)                  const struct tbl_dat *dp, struct termp_tbl *tblp)
 {  {
           int              sz;
   
         /* Branch down into data sub-types. */          /* Branch down into data sub-types. */
   
Line 465  tbl_calc_data(struct termp *tp, const struct tbl *tbl,
Line 461  tbl_calc_data(struct termp *tp, const struct tbl *tbl,
         case (TBL_CELL_HORIZ):          case (TBL_CELL_HORIZ):
                 /* FALLTHROUGH */                  /* FALLTHROUGH */
         case (TBL_CELL_DHORIZ):          case (TBL_CELL_DHORIZ):
                 tblp->width = 1;                  sz = term_len(tp, 1);
                   if (tblp->width < sz)
                           tblp->width = sz;
                 break;                  break;
         case (TBL_CELL_LONG):          case (TBL_CELL_LONG):
                 /* FALLTHROUGH */                  /* FALLTHROUGH */
Line 536  tbl_calc_data_literal(struct termp *tp, 
Line 534  tbl_calc_data_literal(struct termp *tp, 
                 const struct tbl_dat *dp,                  const struct tbl_dat *dp,
                 struct termp_tbl *tblp)                  struct termp_tbl *tblp)
 {  {
         int              sz, bufsz;          int              sz, bufsz, spsz;
   
         /*          /*
          * Calculate our width and use the spacing, with a minimum           * Calculate our width and use the spacing, with a minimum
Line 551  tbl_calc_data_literal(struct termp *tp, 
Line 549  tbl_calc_data_literal(struct termp *tp, 
         case (TBL_CELL_LONG):          case (TBL_CELL_LONG):
                 /* FALLTHROUGH */                  /* FALLTHROUGH */
         case (TBL_CELL_CENTRE):          case (TBL_CELL_CENTRE):
                 bufsz = 2;                  bufsz = term_len(tp, 2);
                 break;                  break;
         default:          default:
                 bufsz = 1;                  bufsz = term_len(tp, 1);
                 break;                  break;
         }          }
   
           spsz = 0;
         if (dp->layout->spacing)          if (dp->layout->spacing)
                 bufsz = bufsz > dp->layout->spacing ?                  spsz = term_len(tp, dp->layout->spacing);
                         bufsz : dp->layout->spacing;  
           if (spsz)
                   bufsz = bufsz > spsz ?  bufsz : spsz;
   
         sz += bufsz;          sz += bufsz;
         if (tblp->width < sz)          if (tblp->width < sz)

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

CVSweb