diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-12-17 16:17:28 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-12-17 16:17:28 +0000 |
commit | 4e52a4adb4e09dbda024bc82f99100ad21dec696 (patch) | |
tree | 30aba01a3902a7e209082d00c5f902ca5169a13c /table.c | |
parent | [w3m-dev 03576] Re: news support (diff) | |
download | w3m-4e52a4adb4e09dbda024bc82f99100ad21dec696.tar.gz w3m-4e52a4adb4e09dbda024bc82f99100ad21dec696.zip |
[w3m-dev 03577] incorrect table width
* table.c (dv2sv): fix move direction
(set_integered_width): ditto
(check_table_height): ditto
(feed_table_tag): ditto
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to 'table.c')
-rw-r--r-- | table.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -1,4 +1,4 @@ -/* $Id: table.c,v 1.36 2002/12/06 16:50:41 ukai Exp $ */ +/* $Id: table.c,v 1.37 2002/12/17 16:17:30 ukai Exp $ */ /* * HTML table */ @@ -252,8 +252,8 @@ dv2sv(double *dv, short *iv, int size) i = bsearch_double(x, edv, indexarray, k); if (k > i) { int ii; - for (ii = i; ii < k; ii++) - indexarray[ii + 1] = indexarray[ii]; + for (ii = k; ii > i; ii--) + indexarray[ii] = indexarray[ii - 1]; } indexarray[i] = k; } @@ -1007,8 +1007,8 @@ set_integered_width(struct table *t, double *dwidth, short *iwidth) i = bsearch_double(x, mod, indexarray, k); if (k > i) { int ii; - for (ii = i; ii < k; ii++) - indexarray[ii + 1] = indexarray[ii]; + for (ii = k; ii > i; ii--) + indexarray[ii] = indexarray[ii - 1]; } indexarray[i] = k; } @@ -1594,8 +1594,8 @@ check_table_height(struct table *t) cell.height[cell.maxcell] = 0; if (cell.maxcell > k) { int ii; - for (ii = k; ii < cell.maxcell; ii++) - cell.indexarray[ii + 1] = cell.indexarray[ii]; + for (ii = cell.maxcell; ii > k; ii--) + cell.indexarray[ii] = cell.indexarray[ii - 1]; } cell.indexarray[k] = cell.maxcell; } @@ -2727,8 +2727,8 @@ feed_table_tag(struct table *tbl, char *line, struct table_mode *mode, cell->fixed_width[cell->maxcell] = 0; if (cell->maxcell > k) { int ii; - for (ii = k; ii < cell->maxcell; ii++) - cell->index[ii + 1] = cell->index[ii]; + for (ii = cell->maxcell; ii > k; ii--) + cell->index[ii] = cell->index[ii - 1]; } cell->index[k] = cell->maxcell; } |