[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.22 and 1.24

version 1.22, 2012/05/27 17:54:54 version 1.24, 2012/05/27 18:02:49
Line 1 
Line 1 
 /*      $Id$ */  /*      $Id$ */
 /*  /*
  * Copyright (c) 2009, 2011 Kristaps Dzonsons <kristaps@bsd.lv>   * Copyright (c) 2009, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
  * Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org>   * Copyright (c) 2011, 2012 Ingo Schwarze <schwarze@openbsd.org>
  *   *
  * Permission to use, copy, modify, and distribute this software for any   * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above   * purpose with or without fee is hereby granted, provided that the above
Line 171  term_tbl(struct termp *tp, const struct tbl_span *sp)
Line 171  term_tbl(struct termp *tp, const struct tbl_span *sp)
   
         if (TBL_SPAN_LAST & sp->flags) {          if (TBL_SPAN_LAST & sp->flags) {
                 if (TBL_OPT_DBOX & sp->tbl->opts ||                  if (TBL_OPT_DBOX & sp->tbl->opts ||
                     TBL_OPT_BOX  & sp->tbl->opts)                      TBL_OPT_BOX  & sp->tbl->opts) {
                         tbl_hframe(tp, sp, 0);                          tbl_hframe(tp, sp, 0);
                 if (TBL_OPT_DBOX & sp->tbl->opts)                          tp->skipvsp = 1;
                   }
                   if (TBL_OPT_DBOX & sp->tbl->opts) {
                         tbl_hframe(tp, sp, 1);                          tbl_hframe(tp, sp, 1);
                           tp->skipvsp = 2;
                   }
                 assert(tp->tbl.cols);                  assert(tp->tbl.cols);
                 free(tp->tbl.cols);                  free(tp->tbl.cols);
                 tp->tbl.cols = NULL;                  tp->tbl.cols = NULL;
Line 337  static void
Line 341  static void
 tbl_literal(struct termp *tp, const struct tbl_dat *dp,  tbl_literal(struct termp *tp, const struct tbl_dat *dp,
                 const struct roffcol *col)                  const struct roffcol *col)
 {  {
         size_t           len, padl, padr;          struct tbl_head         *hp;
           size_t                   width, len, padl, padr;
           int                      spans;
   
         assert(dp->string);          assert(dp->string);
         len = term_strlen(tp, dp->string);          len = term_strlen(tp, dp->string);
         padr = col->width > len ? col->width - len : 0;  
           hp = dp->layout->head->next;
           width = col->width;
           for (spans = dp->spans; spans--; hp = hp->next)
                   width += tp->tbl.cols[hp->ident].width + 3;
   
           padr = width > len ? width - len : 0;
         padl = 0;          padl = 0;
   
         switch (dp->layout->pos) {          switch (dp->layout->pos) {

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.24

CVSweb