w3m

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/w3m.git/
Log | Files | Refs | README

commit adf7bb879fdf3a1a0f8e4483f2868e90cf353dd6
parent 654493e6f401ee14af68bf4df20309e7c5a358c0
Author: ukai <ukai>
Date:   Wed, 14 May 2003 16:01:32 +0000

[w3m-dev 03902] Re: table rendering
* table.c (check_relative_width): check n_leftcell
			check w <= r
From: Akinori Ito <aito@fw.ipsj.or.jp>

Diffstat:
MChangeLog | 6++++++
Mtable.c | 12++++++++++--
2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,9 @@ +2003-05-15 Akinori Ito <aito@fw.ipsj.or.jp> + + * [w3m-dev 03902] Re: table rendering + * table.c (check_relative_width): check n_leftcell + check w <= r + 2003-05-14 ABE Yuji <cbo46560@pop12.odn.ne.jp> * [w3m-dev 03901] body with status-code 401 diff --git a/table.c b/table.c @@ -3525,10 +3525,18 @@ check_relative_width(struct table *t, int maxwidth) else n_leftcell++; } - if (w < r || (w == r && n_leftcell > 0)) { - cell->fixed_width[i] = -100 * r; + if (n_leftcell == 0) { + /* w must be identical to r */ + if (w != r) + cell->fixed_width[i] = -100*r; } else { + if (w <= r) { + /* make room for the left(width-unspecified) cell */ + /* the next formula is an estimation of required width */ + w = r*cell->colspan[i]/(cell->colspan[i]-n_leftcell); + cell->fixed_width[i] = -100*w; + } for (j = 0; j < cell->colspan[i]; j++) { if (rcolwidth[j + k] == 0) rcolwidth[j + k] = (w - r) / n_leftcell;