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