X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flist.q;h=c2f3cd61e3e95b3bae92cd6cab2e5bceb6cbe358;hb=e210b20bf6f405637c8c03dd280b5a4a627191b8;hp=d55e76cc446a622c966082a5067e6542d475ff58;hpb=6eea9310493902d3b06b25c612c7ba89d467b6fa;p=pspp-builds.git diff --git a/src/list.q b/src/list.q index d55e76cc..c2f3cd61 100644 --- a/src/list.q +++ b/src/list.q @@ -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 (" \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 ("\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 (" \n", x->file.file); } - else if (d->class == &devind_class) - { - /* FIXME */ - } else assert (0);