Adopt use of gnulib for portability.
[pspp-builds.git] / src / crosstabs.q
index 9c17ed0297379c06887ada4803d55de8bad91543..09873e85e1d71abeab56778b360ea43c1de146ef 100644 (file)
@@ -14,8 +14,8 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-   02111-1307, USA. */
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA. */
 
 /* FIXME:
 
 #include "var.h"
 #include "vfm.h"
 
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+#define N_(msgid) msgid
+
 /* (headers) */
 
 #include "debug-print.h"
 
 /* (specification)
    crosstabs (crs_):
-     *tables=custom;
+     *^tables=custom;
      +variables=custom;
      +missing=miss:!table/include/report;
      +write[wr_]=none,cells,all;
@@ -338,7 +342,7 @@ crs_custom_tables (struct cmd_crosstabs *cmd UNUSED)
     }
   
   {
-    int *by_iter = xcalloc (sizeof *by_iter * n_by);
+    int *by_iter = xcalloc (n_by, sizeof *by_iter);
     int i;
 
     xtab = xrealloc (xtab, sizeof *xtab * (nxtab + nx));
@@ -1641,7 +1645,7 @@ static void
 table_value_missing (struct tab_table *table, int c, int r, unsigned char opt,
                     const union value *v, const struct variable *var)
 {
-  struct len_string s;
+  struct fixed_string s;
 
   const char *label = val_labs_find (var->val_labs, *v);
   if (label) 
@@ -1688,7 +1692,7 @@ format_cell_entry (struct tab_table *table, int c, int r, double value,
 {
   const struct fmt_spec f = {FMT_F, 10, 1};
   union value v;
-  struct len_string s;
+  struct fixed_string s;
   
   s.length = 10;
   s.string = tab_alloc (table, 16);