Subcommand to export a model as a C function
[pspp-builds.git] / src / list.q
index d55e76cc446a622c966082a5067e6542d475ff58..c2f3cd61e3e95b3bae92cd6cab2e5bceb6cbe358 100644 (file)
@@ -24,7 +24,6 @@
 #include "alloc.h"
 #include "case.h"
 #include "command.h"
-#include "devind.h"
 #include "dictionary.h"
 #include "lexer.h"
 #include "error.h"
@@ -191,9 +190,8 @@ cmd_list (void)
            {
              /* Add the weight variable to the end of the variable list. */
              cmd.n_variables++;
-             cmd.v_variables = xrealloc (cmd.v_variables,
-                                         (cmd.n_variables
-                                          * sizeof *cmd.v_variables));
+             cmd.v_variables = xnrealloc (cmd.v_variables, cmd.n_variables,
+                                           sizeof *cmd.v_variables);
              cmd.v_variables[cmd.n_variables - 1]
                 = dict_get_weight (default_dict);
            }
@@ -215,8 +213,8 @@ cmd_list (void)
 
       /* Add the weight variable at the beginning of the variable list. */
       cmd.n_variables++;
-      cmd.v_variables = xrealloc (cmd.v_variables,
-                                 cmd.n_variables * sizeof *cmd.v_variables);
+      cmd.v_variables = xnrealloc (cmd.v_variables,
+                                   cmd.n_variables, sizeof *cmd.v_variables);
       memmove (&cmd.v_variables[1], &cmd.v_variables[0],
               (cmd.n_variables - 1) * sizeof *cmd.v_variables);
       cmd.v_variables[0] = &casenum_var;
@@ -271,10 +269,6 @@ write_all_headers (void *aux UNUSED)
 
          fputs ("  <TR>\n", x->file.file);
        }
-      else if (d->class == &devind_class) 
-        {
-          /* FIXME */
-        }
       else
        assert (0);
     }
@@ -303,7 +297,7 @@ write_header (struct outp_driver *d)
       size_t x;
       
       /* Allocate, initialize header. */
-      prc->header = xmalloc (sizeof (char *) * prc->header_rows);
+      prc->header = xnmalloc (prc->header_rows, sizeof *prc->header);
       {
        int w = n_chars_width (d);
        for (i = 0; i < prc->header_rows; i++)
@@ -395,10 +389,6 @@ clean_up (void)
            fputs ("</TABLE>\n", x->file.file);
          }
       }
-    else if (d->class == &devind_class) 
-      {
-        /* FIXME */
-      }
     else
       assert (0);
   
@@ -531,12 +521,6 @@ determine_layout (void)
 
       if (d->class == &html_class)
        continue;
-      else if (d->class == &devind_class) 
-        {
-          /* FIXME */
-          tab_output_text (TAT_NONE, "(devind not supported on LIST yet)");
-          continue;
-        }
       
       assert (d->class->special == 0);
 
@@ -726,10 +710,6 @@ list_cases (struct ccase *c, void *aux UNUSED)
          
        fputs ("  </TR>\n", x->file.file);
       }
-    else if (d->class == &devind_class) 
-      {
-        /* FIXME */
-      }
     else
       assert (0);