b5c4224af38d2ff50509467bc161c950b33fe902
[pspp-builds.git] / src / language / control / ChangeLog
1 Tue Dec 19 08:12:46 2006  Ben Pfaff  <blp@gnu.org>
2
3         Fix LOOP.  Thanks to Daniel Williams
4         <Daniel.E.Williams@state.or.us> for reporting one of the bugs
5         fixed here.
6         
7         * loop.c (cmd_loop): Keep track of whether we created the index
8         variable and delete it if parsing fails, instead of creating it
9         after parsing the IF clause.  This allows the index variable to be
10         used in the IF clause.  This incidentally fixes a segfault when no
11         index variable was used.  Also, return CMD_CASCADING_FAILURE if we
12         fail.
13         (parse_if_clause): Don't allow more than one IF clause.
14         (parse_index_clause): Don't allow more than one index clause.
15         Create the index variable if it doesn't exist.
16         (end_loop_trns_proc): Invert the sense of END LOOP's IF clause.
17
18 Sat Dec  9 20:12:34 2006  Ben Pfaff  <blp@gnu.org>
19
20         * repeat.c (parse_lines): Issue an error when attempting to nest
21         DO REPEAT in compatibility mode.
22
23 Sat Dec  2 17:01:59 2006  Ben Pfaff  <blp@gnu.org>
24
25         Significant cleanup to DO REPEAT.
26         
27         * repeat.c: (struct line_list) Rename struct repeat_line.  Use
28         struct ll instead of explicit "next" pointer.  Make "file_name"
29         const.  Change "const char *line" to "struct substring text".  Add
30         `syntax' member.  Update all references.
31         (enum repeat_entry_type) Rename repeat_macro_type, update all
32         references.
33         (struct repeat_entry) Rename struct repeat_macro.  Use struct ll
34         instead of explicit "next" pointer.  Change "char[] id" to "struct
35         substring name".  Change "char **replacement" to "struct substring
36         *replacements".  Update all references.
37         (struct repeat_block) Use struct ll_list for lists of lines,
38         macros.  Change "cur_line" to struct ll *.
39         (cmd_do_repeat) Don't bother adding an empty getl source at all.
40         This saves special-casing an empty source in repeat_read.
41         (parse_specification) Use new find_macro function.
42         (find_macro) New function.
43         (skip_indentor) Removed.
44         (recognize_keyword) Change interface, update callers.
45         (recognize_do_repeat) Ditto.
46         (recognize_end_repeat) Ditto.
47         (parse_lines) Use lex_preprocess_line to preprocess the input line
48         to check for DO REPEAT and END REPEAT, instead of coding it
49         inline.
50         (parse_ids) Need to make a copy of the array parsed by
51         parse_mixed_vars_pool, instead of using it verbatim, because we're
52         using struct substring now.
53         (add_replacement) Use struct substring in interface, instead of
54         const char *, and update all callers.
55         (find_substitution) Rewrite using substring, in terms of
56         find_macro.
57         (do_repeat_filter) Use struct substring to simplify code.
58         (current_line) New function.
59         
60 Sat Dec  2 16:40:12 2006  Ben Pfaff  <blp@gnu.org>
61
62         Fix lack of ->name and ->location in DO REPEAT's getl_interface.
63         See bug #15702.
64
65         * repeat.c: (cmd_do_repeat) Initialize name, location in
66         getl_interface.
67         (do_repeat_read) Adjust semantics of cur_line so that, after the
68         call, it points to the line just returned, instead of to the next
69         line to be returned.  Thus, do_repeat_name and do_repeat_location
70         can use cur_line to obtain the info they need.
71         (do_repeat_name) New function.
72         (do_repeat_location) New function.
73
74 Thu Nov 30 22:01:27 2006  Ben Pfaff  <blp@gnu.org>
75
76         * repeat.c (do_repeat_read): Properly handle empty DO REPEAT...END
77         REPEAT block.  Fixes bug #18407.  Thanks to John Darrington for
78         reporting this bug.
79
80 Sat Oct 28 16:18:48 WST 2006 John Darrington <john@darrington.wattle.id.au>
81
82         * repeat.c: Eliminated references to extern variable getl_buf.
83
84 Sun May  7 18:18:33 2006  Ben Pfaff  <blp@gnu.org>
85
86         Fix memory leaks.
87         
88         * repeat.c: (parse_ids) Take pool parameter and allocate all
89         memory from pool.  Reduce implementation from loop to single call
90         to parse_mixed_vars_pool().
91         (store_numeric) Removed.
92         (add_replacement) New function.
93         (parse_numbers) Take pool parameter and allocate all memory from
94         pool.  Require ranges to be in increasing order.
95         (parse_strings) Take pool parameter and allocate all memory from
96         pool.
97
98 Wed May  3 22:45:41 2006  Ben Pfaff  <blp@gnu.org>
99
100         Continue reforming procedure execution.  In this phase, get rid of
101         many global variables, consolidating procedure execution in
102         procedure.c.  Encapsulate transformations in new "struct
103         trns_chain".  Also, change implementation of N OF CASES, FILTER,
104         and PROCESS IF from special cases to transformations.
105          
106         * do-if.c: (cmd_do_if) Use finalizer to ensure control stack gets
107         cleared.
108         (do_if_finalize_func) New function.
109
110         * loop.c: (create_loop_trns) Use finalizer to ensure control stack gets
111         cleared.
112         (loop_trns_finalize) New function.
113
114         * temporary.c: (global var temporary) Removed.  Changed references
115         to use proc_make_temporary_transformations_permanent() or
116         proc_in_temporary_transformations().
117         (global var temp_dict) Removed.
118         (global var temp_trns) Removed.
119         (cmd_temporary) Reimplement in terms of
120         proc_in_temporary_transformations() and
121         proc_start_temporary_transformations().
122         (cancel_temporary) Moved to procedure.c, renamed
123         proc_cancel_temporary_transformations().
124                 
125 Thu Mar  2 08:40:33 WST 2006 John Darrington <john@darrington.wattle.id.au>
126         
127         * Moved files from src directory