#include <language/data-io/file-handle.h>
#include <language/expressions/public.h>
#include <language/lexer/lexer.h>
+#include <language/lexer/variable-parser.h>
#include <libpspp/alloc.h>
+#include <libpspp/assertion.h>
#include <libpspp/compiler.h>
#include <libpspp/message.h>
#include <libpspp/message.h>
internal_cmd_print (int f)
{
int table = 0; /* Print table? */
- struct print_trns *trns; /* malloc()'d transformation. */
+ struct print_trns *trns = NULL; /* malloc()'d transformation. */
struct file_handle *fh = NULL;
/* Fill in prt to facilitate error-handling. */
{
fx.spec.type = PRT_CONST;
fx.spec.fc = fx.sc - 1;
- fx.spec.u.c = xstrdup (ds_c_str (&tokstr));
+ fx.spec.u.c = ds_xstrdup (&tokstr);
lex_get ();
/* Parse the included column range. */
case PRT_SPACE:
break;
case PRT_ERROR:
- assert (0);
+ NOT_REACHED ();
}
if (fh != NULL)
break;
case PRT_ERROR:
default:
- assert (0);
- abort ();
+ NOT_REACHED ();
}
if (pot_w > w)
w = pot_w;
break;
case PRT_ERROR:
- assert (0);
- break;
+ NOT_REACHED ();
}
if (t->writer != NULL && dfm_write_error (t->writer))
return TRNS_CONTINUE;
}
-/* Frees all the data inside print_trns T. Does not free T. */
+/* Frees all the data inside print_trns PRT. Does not free PRT. */
static bool
print_trns_free (void *prt_)
{
/* nothing to do */
break;
case PRT_ERROR:
- assert (0);
- break;
+ NOT_REACHED ();
}
n = i->next;
free (i);
if (prt->writer != NULL)
ok = dfm_close_writer (prt->writer);
free (prt->line);
- free (prt);
return ok;
}
\f