1 2007-11-05 Ben Pfaff <blp@gnu.org>
3 Patch #6258. Reviewed by John Darrington.
5 * command.c (report_state_mismatch): Replace code to construct an
6 error message from bits and pieces by a switch statement that
7 hard-codes each possible error. Makes i18n easier.
8 Suggested by Chusslove Illich <caslav.ilic@gmx.net>.
10 2007-09-22 Ben Pfaff <blp@gnu.org>
12 Bug #21128. Reviewed by John Darrington.
14 * command.def: Add DEBUG PAPER SIZE command.
16 2007-09-05 John Darrington <john@darrington.wattle.id.au>
18 * command.c (do_parse_command): Translate CMD_FAILURE into
19 CMD_CASCADING_FAILURE, if the ERRMODE_STOP is set on the syntax
22 2007-06-06 Ben Pfaff <blp@gnu.org>
24 * command.def: Add DEBUG DATASHEET command. Remove DEBUG CASEFILE
27 2007-03-18 Ben Pfaff <blp@gnu.org>
29 * syntax-string-source.c (close): Rename to do_close to avoid
30 conflict with POSIX function of the same name.
32 Thu Feb 8 15:04:42 2007 Ben Pfaff <blp@gnu.org>
34 Reduce platform dependence.
36 * command.c (shell): Always define this function, instead of only
37 in unix, but make it a stub when fork or execl is not available.
38 (run_command): Move parsing code into cmd_host.
39 (cmd_host): Drop unix dependence now that the shell function is
42 Sun Jan 21 15:31:52 WST 2007 John Darrington <john@darrington.wattle.id.au>
44 * command.c command.h: Renamed cmd_parse to cmd_parse_in_state.
45 New function cmd_parse.
47 Wed Dec 13 21:02:51 2006 Ben Pfaff <blp@gnu.org>
49 * command.def: Add DELETE VARS.
51 Sat Dec 16 22:15:55 2006 Ben Pfaff <blp@gnu.org>
53 Make it possible to pull cases from the active file with a
54 function call, instead of requiring indirection through a callback
57 * command.def: Marked MATRIX DATA as unimplemented.
59 Sun Dec 3 11:59:10 2006 Ben Pfaff <blp@gnu.org>
61 * syntax-file.c (read_syntax_file): Always read GETL_BATCH lines.
63 Wed Nov 29 19:35:44 WST 2006 John Darrington <john@darrington.wattle.id.au>
65 * command.c: Updated to reflect changed function names.
67 * line-buffer.c line-buffer.h: Removed. Guts of it moved to
68 libpspp/getl.[ch] The rest moved to files listed below.
70 * syntax-file.c syntax-file.h prompt.c prompt.h: New files.
72 Wed Nov 22 06:26:42 2006 Ben Pfaff <blp@gnu.org>
74 * command.def: HOST command needs F_KEEP_FINAL_TOKEN.
76 Sat Oct 28 16:15:56 WST 2006 John Darrington <john@darrington.wattle.id.au>
78 * linebuffer.c linebuffer.h: Moved getl_buf from here, into
81 Thu Oct 26 20:19:00 2006 Ben Pfaff <blp@gnu.org>
83 * command.def: Add DEBUG FLOAT FORMAT.
85 Fri Oct 20 10:59:06 WST 2006 John Darrington <john@darrington.wattle.id.au>
87 * command.def: Added additional unimpl commands.
89 Sun Oct 15 19:38:55 2006 Ben Pfaff <blp@gnu.org>
91 * command.c: (do_parse_command) Issue an error for unimplemented
92 commands, instead of silently ignoring them. Reported by John
95 Wed Jun 28 11:38:23 2006 Ben Pfaff <blp@gnu.org>
97 Don't offer both the full and abbreviated names for a single
98 command in command name completion.
100 * command.c: (enum flags) Add F_ABBREV flag.
101 (cmd_complete) Ignore command with F_ABBREV flag set.
103 * command.def: Add F_ABBREV to N, Q, SORT commands.
105 Tue Jun 27 22:36:38 2006 Ben Pfaff <blp@gnu.org>
107 Fix regression in command name completion reported by John
108 Darrington. Now completion is again state-dependent and occurs
109 only on the first line of a command.
111 * command.c (do_parse_command): Move reading the first token of
112 the command here, from execute_command and cmd_input_program.
113 Call set_completion_state and getl_set_prompt_style here.
114 (do_parse_command) Use in_correct_state instead of
115 verify_valid_command.
116 (verify_valid_command) Break into two new functions,
117 in_correct_state and report_state_mismatch.
118 (set_completion_state) New function.
119 (cmd_complete) New function.
120 [HAVE_READLINE] (pspp_attempted_completion_function) Removed.
121 [HAVE_READLINE] (command_generator) Removed.
123 * line-buffer.c: (struct getl_source) Change `interactive' member
124 signature to take enum getl_prompt_style instead of const char *.
125 (create_interactive_source) Ditto, for parameter type.
126 (getl_append_interactive) Ditto.
127 (read_line_from_source) Pass get_prompt_style() to interactive
128 function instead of get_prompt().
129 (get_prompt) Removed.
130 (get_prompt_style) New function.
132 Sat May 6 13:25:25 2006 Ben Pfaff <blp@gnu.org>
134 Continue reforming procedure execution. In this phase, remove
135 PROCESS IF, which was deprecated anyway and can be easily
136 simulated with TEMPORARY followed by SELECT IF.
138 * command.def: Removed PROCESS IF.
140 Mon May 1 18:17:52 2006 Ben Pfaff <blp@gnu.org>
142 Further clean up the CMD_* command result codes.
144 * command.c (cmd_result_is_valid): New function.
145 (cmd_result_is_success) Assert that argument is valid. Simplified
146 check to one for a positive result.
147 (cmd_result_is_failure) Assert that argument is valid. Simplified
148 check to one for a negative result.
149 (do_parse_command) Check that command's returned result is valid.
151 * command.h: (enum cmd_result) Renamed CMD_QUIT to CMD_FINISH and
152 updated all users. Removed CMD_END_SUBLOOP in favor of new
153 CMD_PRIVATE_FIRST...CMD_PRIVATE_LAST range. Changed failure codes
154 to have negative values.
156 Mon May 1 15:56:56 2006 Ben Pfaff <blp@gnu.org>
158 Remove vestiges of FILE TYPE support.
160 * command.def: Mark FILE TYPE, RECORD TYPE unimplemented.
162 Wed Apr 26 21:13:46 2006 Ben Pfaff <blp@gnu.org>
164 CLEAR TRANSFORMATIONS is unsafe as implemented. It's a fair
165 amount of work to implement it correctly, so make it
168 * command.c: (cmd_clear_transformations) Removed.
170 * command.def: Mark CLEAR TRANSFORMATIONS as unimplemented.
172 Wed Apr 26 13:06:42 2006 Ben Pfaff <blp@gnu.org>
174 Work on readline completion.
176 * command.c: (pspp_completion_function) Removed.
177 (pspp_attempted_completion_function) New function.
178 (command_generator) New function.
180 Wed Apr 26 13:04:48 2006 Ben Pfaff <blp@gnu.org>
182 Improve the way we handle the various parsing "states". Until now
183 we've hard-coded the state transitions in the command definition
184 file, but that's error-prone and, worse, it's redundant--we can
185 figure out what state we're in anyhow. We can cleanly handle
186 INPUT PROGRAM and FILE TYPE with a nested command-processing loop.
188 * command.c: (cmd_result_is_success) New function.
189 (cmd_result_is_failure) New function.
190 (enum states) New enum.
191 (enum flags) New enum.
192 (struct command) Add states, flags members. Remove transition,
193 skip_entire_name, debug members. Renamed func member as function.
194 (macro DEFCMD) Removed.
195 (macro DBGCMD) Removed.
196 (macro SPCCMD) Removed.
197 (macro UNIMPL) Removed.
199 (macro UNIMPL_CMD) New.
200 (macro COMMAND_CNT) Changed to static const var, renamed
201 command_cnt. Updated all references.
202 (FILE_TYPE_okay) Removed.
203 (cmd_parse) Rewrote in terms of do_parse_command().
204 (do_parse_command) New function.
205 (find_command) New function.
206 (unknown_command_error) Use struct string to simplify code.
207 (parse_command_name) Recognize comment command names. Handle
208 flags. Don't reject testing-mode-only commands here--let higher
210 (verify_valid_command) New function.
211 (cmd_comment) New function.
213 * command.def: Completely rewritten and now sensibly organized.
215 * command.h: (enum STATE_*) Renamed CMD_STATE_*.
216 (CMD_*) Now "enum cmd_result". Added CMD_QUIT. New
217 CMD_END_SUBLOOP. Removed CMD_TRAILING_GARBAGE, CMD_PART_SUCCESS,
218 CMD_PART_SUCCESS_MAYBE and replaced all references by CMD_FAILURE.
219 Added CMD_NOT_IMPLEMENTED.
220 (macro DEFCMD) Removed.
221 (macro DBGCMD) Removed.
222 (macro SPCCMD) Removed.
223 (macro UNIMPL) Removed.
225 (macro UNIMPL_CMD) New.
227 Mon Apr 3 11:03:36 2006 Ben Pfaff <blp@gnu.org>
229 * list.q: (write_all_headers) Adapt to new html and output
232 (write_varname) Ditto.
233 (write_fallback_headers) Ditto.
234 (determine_layout) Ditto.
238 Thu Mar 2 08:40:33 WST 2006 John Darrington <john@darrington.wattle.id.au>
240 * Moved files from src directory