X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fdata-io%2Fdata-list.c;h=3a6f807c00f63a4b11af204da886b27fcd59b9f8;hb=30728b09540b323fef43b23dd5f1e4d1e8298c92;hp=6002b1e91857e5e8787a176daadb812977a4d0c3;hpb=3fc7b08b53d3a07385327d6f2aff11a2f9abce08;p=pspp-builds.git diff --git a/src/language/data-io/data-list.c b/src/language/data-io/data-list.c index 6002b1e9..3a6f807c 100644 --- a/src/language/data-io/data-list.c +++ b/src/language/data-io/data-list.c @@ -18,32 +18,36 @@ 02110-1301, USA. */ #include -#include -#include + +#include "data-list.h" + #include #include #include #include -#include + #include -#include -#include #include -#include #include -#include -#include #include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include #include -#include #include #include -#include #include -#include "data-list.h" - #include "gettext.h" #define _(msgid) gettext (msgid) @@ -116,7 +120,7 @@ cmd_data_list (void) int table = -1; /* Print table if nonzero, -1=undecided. */ struct file_handle *fh = fh_inline_file (); - if (!case_source_is_complex (vfm_source)) + if (!in_input_program () && !in_file_type ()) discard_variables (); dls = xmalloc (sizeof *dls); @@ -136,8 +140,7 @@ cmd_data_list (void) fh = fh_parse (FH_REF_FILE | FH_REF_INLINE); if (fh == NULL) goto error; - if (case_source_is_class (vfm_source, &file_type_source_class) - && fh != fh_get_default_handle ()) + if (in_file_type () && fh != fh_get_default_handle ()) { msg (SE, _("DATA LIST must use the same file " "as the enclosing FILE TYPE.")); @@ -542,7 +545,7 @@ fixed_parse_compatible (struct fixed_parsing_state *fx, { convert_fmt_ItoO (&input, &v->print); v->write = v->print; - if (!case_source_is_complex (vfm_source)) + if (!in_input_program () && !in_file_type ()) v->init = 0; } else @@ -650,7 +653,7 @@ dump_fmt_list (struct fixed_parsing_state *fx, struct fmt_list *f, return 0; } - if (!case_source_is_complex (vfm_source)) + if (!in_input_program () && !in_file_type ()) v->init = 0; spec = xmalloc (sizeof *spec); @@ -859,7 +862,7 @@ parse_free (struct dls_var_spec **first, struct dls_var_spec **last) } v->print = v->write = output; - if (!case_source_is_complex (vfm_source)) + if (!in_input_program () && !in_file_type ()) v->init = 0; spec = xmalloc (sizeof *spec); @@ -1360,7 +1363,7 @@ cmd_repeating_data (void) bool saw_id = false; /* Saw ID subcommand? */ struct file_handle *const fh = fh_get_default_handle (); - assert (case_source_is_complex (vfm_source)); + assert (in_input_program () || in_file_type ()); rpd = xmalloc (sizeof *rpd); rpd->reader = dfm_open_reader (fh);