* command.c: (do_parse_command) Issue an error for unimplemented
[pspp-builds.git] / src / language / ChangeLog
1 Sun Oct 15 19:38:55 2006  Ben Pfaff  <blp@gnu.org>
2
3         * command.c: (do_parse_command) Issue an error for unimplemented
4         commands, instead of silently ignoring them.  Reported by John
5         Darrington.
6
7 Wed Jun 28 11:38:23 2006  Ben Pfaff  <blp@gnu.org>
8
9         Don't offer both the full and abbreviated names for a single
10         command in command name completion.
11         
12         * command.c: (enum flags) Add F_ABBREV flag.
13         (cmd_complete) Ignore command with F_ABBREV flag set.
14
15         * command.def: Add F_ABBREV to N, Q, SORT commands.
16
17 Tue Jun 27 22:36:38 2006  Ben Pfaff  <blp@gnu.org>
18
19         Fix regression in command name completion reported by John
20         Darrington.  Now completion is again state-dependent and occurs
21         only on the first line of a command.
22         
23         * command.c (do_parse_command): Move reading the first token of
24         the command here, from execute_command and cmd_input_program.
25         Call set_completion_state and getl_set_prompt_style here.
26         (do_parse_command) Use in_correct_state instead of
27         verify_valid_command.
28         (verify_valid_command) Break into two new functions,
29         in_correct_state and report_state_mismatch.
30         (set_completion_state) New function.
31         (cmd_complete) New function.
32         [HAVE_READLINE] (pspp_attempted_completion_function) Removed.
33         [HAVE_READLINE] (command_generator) Removed.
34
35         * line-buffer.c: (struct getl_source) Change `interactive' member
36         signature to take enum getl_prompt_style instead of const char *.
37         (create_interactive_source) Ditto, for parameter type.
38         (getl_append_interactive) Ditto.
39         (read_line_from_source) Pass get_prompt_style() to interactive
40         function instead of get_prompt().
41         (get_prompt) Removed.
42         (get_prompt_style) New function.
43         
44 Sat May  6 13:25:25 2006  Ben Pfaff  <blp@gnu.org>
45
46         Continue reforming procedure execution.  In this phase, remove
47         PROCESS IF, which was deprecated anyway and can be easily
48         simulated with TEMPORARY followed by SELECT IF.
49
50         * command.def: Removed PROCESS IF.
51
52 Mon May  1 18:17:52 2006  Ben Pfaff  <blp@gnu.org>
53
54         Further clean up the CMD_* command result codes.
55         
56         * command.c (cmd_result_is_valid): New function.
57         (cmd_result_is_success) Assert that argument is valid.  Simplified
58         check to one for a positive result.
59         (cmd_result_is_failure) Assert that argument is valid.  Simplified
60         check to one for a negative result.
61         (do_parse_command) Check that command's returned result is valid.
62
63         * command.h: (enum cmd_result) Renamed CMD_QUIT to CMD_FINISH and
64         updated all users.  Removed CMD_END_SUBLOOP in favor of new
65         CMD_PRIVATE_FIRST...CMD_PRIVATE_LAST range.  Changed failure codes
66         to have negative values.
67
68 Mon May  1 15:56:56 2006  Ben Pfaff  <blp@gnu.org>
69
70         Remove vestiges of FILE TYPE support. 
71         
72         * command.def: Mark FILE TYPE, RECORD TYPE unimplemented.
73
74 Wed Apr 26 21:13:46 2006  Ben Pfaff  <blp@gnu.org>
75
76         CLEAR TRANSFORMATIONS is unsafe as implemented.  It's a fair
77         amount of work to implement it correctly, so make it
78         unimplemented.
79                 
80         * command.c: (cmd_clear_transformations) Removed.
81
82         * command.def: Mark CLEAR TRANSFORMATIONS as unimplemented.
83
84 Wed Apr 26 13:06:42 2006  Ben Pfaff  <blp@gnu.org>
85
86         Work on readline completion.
87
88         * command.c: (pspp_completion_function) Removed.
89         (pspp_attempted_completion_function) New function.
90         (command_generator) New function.
91
92 Wed Apr 26 13:04:48 2006  Ben Pfaff  <blp@gnu.org>
93
94         Improve the way we handle the various parsing "states".  Until now
95         we've hard-coded the state transitions in the command definition
96         file, but that's error-prone and, worse, it's redundant--we can
97         figure out what state we're in anyhow.  We can cleanly handle
98         INPUT PROGRAM and FILE TYPE with a nested command-processing loop.
99         
100         * command.c: (cmd_result_is_success) New function.
101         (cmd_result_is_failure) New function.
102         (enum states) New enum.
103         (enum flags) New enum.
104         (struct command) Add states, flags members.  Remove transition,
105         skip_entire_name, debug members.  Renamed func member as function.
106         (macro DEFCMD) Removed.
107         (macro DBGCMD) Removed.
108         (macro SPCCMD) Removed.
109         (macro UNIMPL) Removed.
110         (macro DEF_CMD) New.
111         (macro UNIMPL_CMD) New.
112         (macro COMMAND_CNT) Changed to static const var, renamed
113         command_cnt.  Updated all references.
114         (FILE_TYPE_okay) Removed.
115         (cmd_parse) Rewrote in terms of do_parse_command().
116         (do_parse_command) New function.
117         (find_command) New function.
118         (unknown_command_error) Use struct string to simplify code.
119         (parse_command_name) Recognize comment command names.  Handle
120         flags.  Don't reject testing-mode-only commands here--let higher
121         level do it.
122         (verify_valid_command) New function.
123         (cmd_comment) New function.
124
125         * command.def: Completely rewritten and now sensibly organized.
126
127         * command.h: (enum STATE_*) Renamed CMD_STATE_*.
128         (CMD_*) Now "enum cmd_result".  Added CMD_QUIT.  New
129         CMD_END_SUBLOOP.  Removed CMD_TRAILING_GARBAGE, CMD_PART_SUCCESS,
130         CMD_PART_SUCCESS_MAYBE and replaced all references by CMD_FAILURE.
131         Added CMD_NOT_IMPLEMENTED.
132         (macro DEFCMD) Removed.
133         (macro DBGCMD) Removed.
134         (macro SPCCMD) Removed.
135         (macro UNIMPL) Removed.
136         (macro DEF_CMD) New.
137         (macro UNIMPL_CMD) New.
138
139 Mon Apr  3 11:03:36 2006  Ben Pfaff  <blp@gnu.org>
140
141         * list.q: (write_all_headers) Adapt to new html and output
142         internals.
143         (clean_up) Ditto.
144         (write_varname) Ditto.
145         (write_fallback_headers) Ditto.
146         (determine_layout) Ditto.
147         (list_cases) Ditto.
148         
149
150 Thu Mar  2 08:40:33 WST 2006 John Darrington <john@darrington.wattle.id.au>
151         
152         * Moved files from src directory