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

Diff for /mandoc/out.c between version 1.66 and 1.70

version 1.66, 2017/06/12 20:14:18 version 1.70, 2017/06/27 18:25:02
Line 20 
Line 20 
 #include <sys/types.h>  #include <sys/types.h>
   
 #include <assert.h>  #include <assert.h>
   #include <stdint.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
 #include <time.h>  #include <time.h>
Line 85  a2roffsu(const char *src, struct roffsu *dst, enum rof
Line 86  a2roffsu(const char *src, struct roffsu *dst, enum rof
         case 'v':          case 'v':
                 dst->unit = SCALE_VS;                  dst->unit = SCALE_VS;
                 break;                  break;
         case '\0':  
                 endptr--;  
                 /* FALLTHROUGH */  
         default:          default:
                   endptr--;
                 if (SCALE_MAX == def)                  if (SCALE_MAX == def)
                         return NULL;                          return NULL;
                 dst->unit = def;                  dst->unit = def;
Line 142  tblcalc(struct rofftbl *tbl, const struct tbl_span *sp
Line 141  tblcalc(struct rofftbl *tbl, const struct tbl_span *sp
                         if (1 < spans)                          if (1 < spans)
                                 continue;                                  continue;
                         icol = dp->layout->col;                          icol = dp->layout->col;
                         if (maxcol < icol)                          while (maxcol < icol)
                                 maxcol = icol;                                  tbl->cols[++maxcol].spacing = SIZE_MAX;
                         col = tbl->cols + icol;                          col = tbl->cols + icol;
                         col->flags |= dp->layout->flags;                          col->flags |= dp->layout->flags;
                         if (dp->layout->flags & TBL_CELL_WIGN)                          if (dp->layout->flags & TBL_CELL_WIGN)
Line 156  tblcalc(struct rofftbl *tbl, const struct tbl_span *sp
Line 155  tblcalc(struct rofftbl *tbl, const struct tbl_span *sp
                                     (*tbl->sulen)(&su, tbl->arg);                                      (*tbl->sulen)(&su, tbl->arg);
                         if (col->width < dp->layout->width)                          if (col->width < dp->layout->width)
                                 col->width = dp->layout->width;                                  col->width = dp->layout->width;
                           if (dp->layout->spacing != SIZE_MAX &&
                               (col->spacing == SIZE_MAX ||
                                col->spacing < dp->layout->spacing))
                                   col->spacing = dp->layout->spacing;
                         tblcalc_data(tbl, col, opts, dp,                          tblcalc_data(tbl, col, opts, dp,
                             rmargin && dp->block ?                              dp->block == 0 ? 0 :
                             rmargin / (sp->opts->cols + 1) : 0);                              dp->layout->width ? dp->layout->width :
                               rmargin ? (rmargin + sp->opts->cols / 2)
                               / (sp->opts->cols + 1) : 0);
                 }                  }
         }          }
   
Line 172  tblcalc(struct rofftbl *tbl, const struct tbl_span *sp
Line 177  tblcalc(struct rofftbl *tbl, const struct tbl_span *sp
         ewidth = xwidth = 0;          ewidth = xwidth = 0;
         for (icol = 0; icol <= maxcol; icol++) {          for (icol = 0; icol <= maxcol; icol++) {
                 col = tbl->cols + icol;                  col = tbl->cols + icol;
                   if (col->spacing == SIZE_MAX || icol == maxcol)
                           col->spacing = 3;
                 if (col->flags & TBL_CELL_EQUAL) {                  if (col->flags & TBL_CELL_EQUAL) {
                         necol++;                          necol++;
                         if (ewidth < col->width)                          if (ewidth < col->width)

Legend:
Removed from v.1.66  
changed lines
  Added in v.1.70

CVSweb