X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Frender.c;h=6722a13dc2e1100a99fc0f3d8b971a14150e665e;hb=207dcaa849d7c1d5090f198e9c86f9bfc484a89e;hp=8c02833ceef3b225669851ef67cc13221726612f;hpb=f8cbc356e15010f4ca86b4f43652bbc12b57b8fc;p=pspp-builds.git diff --git a/src/output/render.c b/src/output/render.c index 8c02833c..6722a13d 100644 --- a/src/output/render.c +++ b/src/output/render.c @@ -359,9 +359,14 @@ distribute_spanned_width (int width, w1 by the common denominator of all three calculations (d), dividing that out in the column width calculation, and then keeping the remainder for the next iteration. + + (We actually compute the unspanned width of a column as twice the + unspanned width, plus the width of the rule on the left, plus the width of + the rule on the right. That way each rule contributes to both the cell on + its left and on its right.) */ d0 = n; - d1 = total_unspanned * 2.0; + d1 = 2.0 * (total_unspanned > 0 ? total_unspanned : 1.0); d = d0 * d1; if (total_unspanned > 0) d *= 2.0; @@ -1212,7 +1217,7 @@ render_page_select (const struct render_page *page, enum table_axis axis, if (z0 == page->h[a][0] && p0 == 0 && z1 == page->n[a] - page->h[a][1] && p1 == 0) { - struct render_page *page_rw = (struct render_page *) page; + struct render_page *page_rw = CONST_CAST (struct render_page *, page); page_rw->ref_cnt++; return page_rw; }