X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Ftable.c;h=d488f3aa68b60e590709b442cc79e3e433d620c4;hb=04bf0e1fed86a5dc9032f2fc8d89ed6217b566e1;hp=029fd5d07ddc57db49395c02717e45664d93ab57;hpb=3a61659a8fc11c51ad5af02b20f5613dcde50382;p=pspp diff --git a/src/output/table.c b/src/output/table.c index 029fd5d07d..d488f3aa68 100644 --- a/src/output/table.c +++ b/src/output/table.c @@ -1,6 +1,5 @@ /* PSPP - computes sample statistics. Copyright (C) 1997-9, 2000, 2006 Free Software Foundation, Inc. - Written by Ben Pfaff . This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -29,8 +28,9 @@ #include "output.h" #include "manager.h" +#include #include -#include +#include #include #include #include @@ -141,8 +141,8 @@ tab_realloc (struct tab_table *t, int nc, int nr) if (nc > t->cf) { - int mr1 = min (nr, t->nr); - int mc1 = min (nc, t->nc); + int mr1 = MIN (nr, t->nr); + int mc1 = MIN (nc, t->nc); struct substring *new_cc; unsigned char *new_ct; @@ -274,7 +274,7 @@ tab_hline (struct tab_table * t, int style, int x1, int x2, int y) y += t->row_ofs; assert (y >= 0); - assert (y < t->nr); + assert (y <= t->nr); assert (x2 >= x1 ); assert (x1 >= 0 ); assert (x2 < t->nc); @@ -541,7 +541,7 @@ tab_value (struct tab_table *table, int c, int r, unsigned char opt, table->cc[c + r * table->cf] = ss_buffer (contents, f->w); table->ct[c + r * table->cf] = opt; - data_out (contents, f, v); + data_out (v, f, contents); } /* Sets cell (C,R) in TABLE, with options OPT, to have value VAL @@ -580,7 +580,7 @@ tab_float (struct tab_table *table, int c, int r, unsigned char opt, #endif double_value.f = val; - data_out (buf, &f, &double_value); + data_out (&double_value, &f, buf); cp = buf; while (isspace ((unsigned char) *cp) && cp < &buf[w])