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