1 /* PSPP - computes sample statistics.
2 Copyright (C) 1997-9, 2000, 2006 Free Software Foundation, Inc.
3 Written by Ben Pfaff <blp@gnu.org>.
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25 /* Command return values. */
28 /* Successful return values. */
29 CMD_SUCCESS = 1, /* Successfully parsed and executed. */
30 CMD_EOF, /* No commands left. */
31 CMD_QUIT, /* Requested exit. */
32 CMD_END_SUBLOOP, /* End of INPUT PROGRAM. */
34 /* Various kinds of failures. */
35 CMD_FAILURE, /* Not executed at all. */
36 CMD_NOT_IMPLEMENTED, /* Command not implemented. */
37 CMD_CASCADING_FAILURE /* Serious error: don't continue. */
40 bool cmd_result_is_success (enum cmd_result);
41 bool cmd_result_is_failure (enum cmd_result);
43 /* Command processing state. */
46 CMD_STATE_INITIAL, /* No active file yet defined. */
47 CMD_STATE_DATA, /* Active file has been defined. */
48 CMD_STATE_INPUT_PROGRAM, /* Inside INPUT PROGRAM. */
49 CMD_STATE_FILE_TYPE /* Inside FILE TYPE. */
53 char **pspp_attempted_completion_function (const char *, int start, int end);
56 enum cmd_result cmd_parse (enum cmd_state);
58 /* Prototype all the command functions. */
59 #define DEF_CMD(STATES, FLAGS, NAME, FUNCTION) int FUNCTION (void);
60 #define UNIMPL_CMD(NAME, DESCRIPTION)
61 #include "command.def"
65 #endif /* command.h */