Added confidence and prediction intervals to model export
[pspp] / src / pfm-write.c
index cd088b7b85048be501fbd2ccbec3c45b316ddcee..c3562f34c437b594ca16f99c48b14ff4915f80ef 100644 (file)
@@ -129,7 +129,7 @@ pfm_open_writer (struct file_handle *fh, struct dictionary *dict,
   w->vars = NULL;
   
   w->var_cnt = dict_get_var_cnt (dict);
-  w->vars = xmalloc (sizeof *w->vars * w->var_cnt);
+  w->vars = xnmalloc (w->var_cnt, sizeof *w->vars);
   for (i = 0; i < w->var_cnt; i++) 
     {
       const struct variable *dv = dict_get_var (dict, i);
@@ -246,7 +246,7 @@ write_header (struct pfm_writer *w)
   {
     /* PORTME: Translation table from SPSS character code to this
        computer's native character code (which is probably ASCII). */
-    static const unsigned char spss2ascii[256] =
+    static const char spss2ascii[256] =
       {
        "0000000000000000000000000000000000000000000000000000000000000000"
        "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ."