Use trunc module from gnulib instead of our home-grown solution.
[pspp-builds.git] / src / language / expressions / ChangeLog
1 2007-10-12  Ben Pfaff  <blp@gnu.org>
2
3         Patch #6224.
4
5         * helpers.c: Don't need our own trunc function implementation
6         anymore, since we now use the one from gnulib.
7
8 2007-07-17  Ben Pfaff  <blp@gnu.org>
9
10         Patch #19335.  Reviewed by John Darrington.
11
12         * evaluate.h.pl: Use strict and all warnings.  Fix warnings that
13         this triggers.
14
15         * evaluate.inc.pl: Ditto.
16
17         * generate.pl: Ditto.
18
19         * operations.h.pl: Ditto.
20
21         * optimize.inc.pl: Ditto.
22
23         * parse.inc.pl: Ditto.
24
25 2007-04-15  Ben Pfaff  <blp@gnu.org>
26
27         * parse.c (expr_get_function): New function.
28         (expr_get_function_cnt): New function.
29         (expr_operation_get_name): New function.
30         (expr_operation_get_prototype): New function.
31         (expr_operation_get_arg_cnt): New function.
32
33 Thu Feb  1 06:59:27 2007  Ben Pfaff  <blp@gnu.org>
34
35         * parse.c (parse_function): Accept TO in any case for use with
36         n-ary functions.  Fixes bug #18923.  Thanks to John Darrington for
37         reporting this bug.
38
39 Sat Dec 16 12:20:14 2006  Ben Pfaff  <blp@gnu.org>
40
41         * operations.def: Reverse order of arguments to DATEDIFF, for
42         compatibility.  Thanks to Daniel Williams
43         <Daniel.E.Williams@state.or.us> for reporting this bug.
44
45 Wed Dec 13 19:30:26 2006  Ben Pfaff  <blp@gnu.org>
46
47         Implement support for DATESUM, DATEDIFF expression functions.  See
48         patch #5637.
49         
50         * helpers.c (enum date_unit): New enum.
51         [!HAVE_TRUNC] (trunc): New function.
52         (recognize_unit): New function.
53         (year_diff): New function.
54         (month_diff): New function.
55         (quarter_diff): New function.
56         (date_unit_duration): New function.
57         (expr_date_difference): New function.
58         (enum date_sum_method): New function.
59         (recognize_method): New function.
60         (add_months): New function.
61         (expr_date_sum): New function.
62         
63         * operations.def: Implement DATESUM, DATEDIFF functions.  Mark
64         VALUELABEL no_abbrev.
65
66 Sun Dec 10 16:49:33 2006  Ben Pfaff  <blp@gnu.org>
67
68         * operations.def: Implement VALUELABEL function.  Add DATEDIFF,
69         DATESUM unimplemented stubs.
70
71         * parse.c (type_coercion_core): Add support for OP_var type, which
72         is a name for a numeric or string variable.
73         (is_compatible) New function.
74         (check_operator) Only require values to be compatible with their
75         expected types, not identical.
76         (is_valid_node) Ditto.
77         (compare_names) Always return mismatch if the command name can't
78         be abbreviated.
79         (lookup_function_helper) Pass the new OPF_NO_ABBREV flag to the
80         comparison function.
81
82         * generate.pl (init_all_types): Add support for a type just called
83         "var" that may be a numeric or string variable name.  Also, add a
84         no_abbrev option that prevents a function name from being
85         abbreviated (in case of naming conflict otherwise).
86         
87         * parse.inc.pl: Output OPF_NO_ABBREV flag.
88
89         * private.h: Add OPF_NO_ABBREV flag.
90
91 Wed Jul 12 21:03:17 2006  Ben Pfaff  <blp@gnu.org>
92
93         * evaluate.c (cmd_debug_evaluate): Don't try to resize a null
94         case.
95
96 Fri Jun  9 13:59:15 2006  Ben Pfaff  <blp@gnu.org>
97
98         Reform string library.
99         
100         * generate.pl (init_all_types): `struct fixed_string' is now
101         `struct substring'.
102
103 Sun May  7 10:05:42 WST 2006 John Darrington <john@darrington.wattle.id.au>
104
105         * evaluate.c: Removed call to copy_mangle, and replaced with the
106         original buf_copy_rpad.
107
108 Mon May  1 15:11:48 2006  Ben Pfaff  <blp@gnu.org>
109
110         Prohibit LAG following TEMPORARY.  This both matches SPSS behavior
111         and fixes a bug: we saved the cases for LAG before TEMPORARY but
112         allowed access to variables created afterward anyhow (which could
113         cause a segfault).
114
115         * generate.pl: Parse "perm_only" flag on operations.
116
117         * operations.def: Add "perm_only" flag to LAG operations.
118
119         * parse.c: Disallow OPF_PERM_ONLY operations after TEMPORARY.
120
121         * parse.inc.pl: Output OPF_PERM_ONLY flag for "perm_only"
122         operations.
123
124         * private.h: Add OPF_PERM_ONLY flag.
125
126 Sun Apr 23 22:06:45 2006  Ben Pfaff  <blp@gnu.org>
127
128         Continue reforming error message support.  In this phase, get rid
129         of message "titles" and put the message text in `struct error'.
130         Now `struct error' encapsulates a message more properly.
131         
132         * helpers.c: (expr_error) Use err_msg() instead of err_vmsg().
133         Format message ourselves.
134
135 Thu Mar  2 08:40:33 WST 2006 John Darrington <john@darrington.wattle.id.au>
136         
137         * Moved files from src directory