From: Ben Pfaff Date: Sun, 8 May 2005 20:55:05 +0000 (+0000) Subject: "Fix" PR 13021 by disabling FILE TYPE. X-Git-Tag: v0.4.0~83 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=119676ae19d4f862cab6261936d1f6223f5534cc;p=pspp-builds.git "Fix" PR 13021 by disabling FILE TYPE. --- diff --git a/src/ChangeLog b/src/ChangeLog index 17c28062..e48267b9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,14 @@ +Sun May 8 13:52:12 2005 Ben Pfaff + + "Fix" PR 13021 by disabling FILE TYPE. Eventually, we should + actually implement it. + + * command.c: (FILE_TYPE_okay) Always return 1. + + * command.def: Change FILE TYPE, END FILE TYPE into UNIMPL. + + * file-type.c: Add prototypes to get rid of warnings. + Sun May 8 08:08:07 WST 2005 John Darrington * barchart.c box-whisker.c cartesian.c piechart.c plot-hist.c: Fixed diff --git a/src/command.c b/src/command.c index 0e5d9d63..1e9fd570 100644 --- a/src/command.c +++ b/src/command.c @@ -134,7 +134,8 @@ static const struct command *parse_command_name (void); /* Determines whether command C is appropriate to call in this part of a FILE TYPE structure. */ static int -FILE_TYPE_okay (const struct command *c) +FILE_TYPE_okay (const struct command *c UNUSED) +#if 0 { int okay = 0; @@ -143,7 +144,6 @@ FILE_TYPE_okay (const struct command *c) && c->func != cmd_repeating_data && c->func != cmd_end_file_type) msg (SE, _("%s not allowed inside FILE TYPE/END FILE TYPE."), c->name); -#if 0 /* FIXME */ else if (c->func == cmd_repeating_data && fty.type == FTY_GROUPED) msg (SE, _("%s not allowed inside FILE TYPE GROUPED/END FILE TYPE."), @@ -151,17 +151,19 @@ FILE_TYPE_okay (const struct command *c) else if (!fty.had_rec_type && c->func != cmd_record_type) msg (SE, _("RECORD TYPE must be the first command inside a " "FILE TYPE structure.")); -#endif else okay = 1; -#if 0 if (c->func == cmd_record_type) fty.had_rec_type = 1; -#endif return okay; } +#else +{ + return 1; +} +#endif /* Parses an entire PSPP command. This includes everything from the command name to the terminating dot. Does most of its work by diff --git a/src/command.def b/src/command.def index 681fe5b6..495ba669 100644 --- a/src/command.def +++ b/src/command.def @@ -66,7 +66,7 @@ DEFCMD ("ELSE", ERRO, INPU, TRAN, TRAN, cmd_else) DEFCMD ("ELSE IF", ERRO, INPU, TRAN, TRAN, cmd_else_if) DEFCMD ("END CASE", ERRO, INPU, ERRO, ERRO, cmd_end_case) DEFCMD ("END FILE", ERRO, INPU, ERRO, ERRO, cmd_end_file) -DEFCMD ("END FILE TYPE", ERRO, TRAN, ERRO, ERRO, cmd_end_file_type) +UNIMPL ("END FILE TYPE", ERRO, TRAN, ERRO, ERRO, "Ends complex data input") DEFCMD ("END IF", ERRO, INPU, TRAN, TRAN, cmd_end_if) DEFCMD ("END INPUT PROGRAM", ERRO, TRAN, ERRO, ERRO, cmd_end_input_program) DEFCMD ("END LOOP", ERRO, INPU, TRAN, TRAN, cmd_end_loop) @@ -79,7 +79,7 @@ DEFCMD ("EXPORT", ERRO, ERRO, PROC, PROC, cmd_export) UNIMPL ("FACTOR", ERRO, ERRO, ERRO, ERRO, "Factor analysis") DEFCMD ("FILE HANDLE", INIT, INPU, TRAN, PROC, cmd_file_handle) SPCCMD ("FILE LABEL", INIT, INPU, TRAN, PROC, cmd_file_label) -DEFCMD ("FILE TYPE", INPU, ERRO, INPU, INPU, cmd_file_type) +UNIMPL ("FILE TYPE", INPU, ERRO, INPU, INPU, "Complex data input") DEFCMD ("FILTER", ERRO, ERRO, TRAN, TRAN, cmd_filter) DEFCMD ("FINISH", INIT, INPU, TRAN, PROC, cmd_finish) UNIMPL ("FIT", ERRO, ERRO, ERRO, ERRO, "Goodness of Fit") diff --git a/src/file-type.c b/src/file-type.c index 87bd874f..6a706eec 100644 --- a/src/file-type.c +++ b/src/file-type.c @@ -94,6 +94,8 @@ struct file_type_pgm static int parse_col_spec (struct col_spec *, const char *); static void create_col_var (struct col_spec *c); +int cmd_file_type (void); + /* Parses FILE TYPE command. */ int cmd_file_type (void) @@ -569,6 +571,7 @@ cmd_record_type (void) /* END FILE TYPE. */ +int cmd_end_file_type (void); int cmd_end_file_type (void) {