Reform string library.
[pspp-builds.git] / src / libpspp / ChangeLog
1 Fri Jun  9 14:03:29 2006  Ben Pfaff  <blp@gnu.org>
2
3         Reform string library.
4         
5         * str.c (ss_empty): New function.  Replaces some uses of ls_init()
6         or ls_null().
7         (ss_cstr) New function.  Replaces some uses of ls_init().
8         (ss_buffer) New function.  Replaces some uses of ls_init().
9         (ss_substr) New function.
10         (ss_head) New function.
11         (ss_tail) New function.
12         (ss_alloc_substring) New function.  Replaces use of ls_create().
13         (ss_alloc_uninit) New function.
14         (ss_dealloc) New function.  Replaces use of ls_destroy().
15         (ss_truncate) New function.
16         (ss_rtrim) New function.
17         (ss_ltrim) New function.
18         (ss_trim) New function.
19         (ss_chomp) New function.
20         (ss_separate) New function.
21         (ss_tokenize) New function.
22         (ss_advance) New function.
23         (ds_create) Renamed ds_init_cstr().  Updated all callers.
24         (ss_match_char) New function.
25         (ss_get_char) New function.
26         (ss_get_until) New function.
27         (ss_get_chars) New function.
28         (ss_is_empty) New function.
29         (ss_length) New function.  Replaces ls_length().
30         (ss_data) New function.  Replaces many uses of ls_c_str().
31         (ss_end) New function.  Replaces ls_end().
32         (ss_at) New function.
33         (ss_first) New function.
34         (ss_last) New function.
35         (ss_span) New function.
36         (ss_cspan) New function.
37         (ss_compare) New function.
38         (ss_pointer_to_position) New function.
39         (ss_xstrdup) New function.
40         (ds_init) Renamed ds_init_empty().  All callers updated.
41         (ds_init_string) New function.
42         (ds_init_substring) Changed interface to take a struct substring.
43         Updated all callers.
44         (ds_init_cstr) New function.  Replaces ds_create().  All callers
45         updated.
46         (ds_assign_substring) Changed interface to take a struct
47         substring.  Updated all callers.
48         (ds_assign_buffer) Removed.  Changed all callers to use
49         ds_assign_substring().
50         (ds_assign_c_str) Renamed ds_assign_cstr().  All callers updated.
51         (ds_ss) New function.
52         (ds_substr) New function.
53         (ds_head) New function.
54         (ds_tail) New function.
55         (ds_rtrim) New function.  Replaces ds_rtrim_spaces().  All callers
56         updated.
57         (ds_ltrim) New function.  Replaces ds_ltrim_spaces().  All callers
58         updated.
59         (ds_trim) New function.  Replaces ds_trim_spaces().  All callers
60         updated.
61         (ds_rtrim_spaces) Removed.
62         (ds_ltrim_spaces) Removed.
63         (ds_trim_spaces) Removed.
64         (ds_separate) Changed interface to use substrings.  All callers
65         updated.
66         (ds_tokenize) Changed interface to use substrings.  All callers
67         updated.
68         (ds_c_str) Renamed ds_cstr().  All callers updated.
69         (ds_span) Changed interface to use substring for SKIP_SET and
70         dropped OFS.  All callers updated.
71         (ds_cspan) Changed interface to use substring for STOP_SET and
72         dropped OFS.  All callers updated.
73         (ds_find_char) New function.
74         (ds_compare) New function.
75         (ds_pointer_to_position) New function.
76         (ds_xstrdup) New function.  Replaced all users of
77         xstrdup(ds_c_str(s)) by a call to this function.
78         (ds_gets) Renamed ds_read_line().  All callers updated.
79         (ds_get_config_line) Renamed ds_read_config_line().  All callers
80         updated.
81         (ds_puts) Renamed ds_put_cstr().  All callers updated.
82         (ds_put_substring) New function.  Replaces ds_concat().  All
83         callers updated.
84         (ds_concat) Removed.
85         (ds_append_uninit) Renamed ds_put_uninit().  All callers updated.
86         (ds_printf) Renamed ds_put_format().  All callers updated.
87         (ds_vprintf) Renamed ds_put_vformat().  All callers updated.
88         (ds_putc) Renamed ds_put_char().  All callers updated.
89         (ds_putc_multiple) Renamed ds_put_char_multiple().  All callers
90         updated.
91         (ls_create) Removed.  Replaced by ss_alloc_substring().
92         (ls_create_buffer) Removed.  Replaced by ss_alloc_substring().
93         (ls_init) Removed.  Replaced by ss_buffer().
94         (ls_shallow_copy) Removed.  Just use assignment.
95         (ls_destroy) Removed.  Replaced by ss_dealloc().
96         (ls_null) Removed.
97         (ls_null_p) Removed.
98         (ls_empty_p) Removed.  Replaced by ss_is_empty().
99         (ls_c_str) Removed.
100         (ls_end) Removed.  Replaced by ss_end().
101
102         * str.h (struct fixed_string): Renamed struct substring, updated
103         all users.
104         (CC_SPACES) New macro.
105         (CC_DIGITS) Ditto.
106         (CC_XDIGITS) Ditto.
107         (CC_LETTERS) Ditto.
108         (CC_ALNUM) Ditto.
109         (SS_EMPTY_INITIALIZER) Ditto.
110         (SS_LITERAL_INITIALIZER) Ditto.
111         (struct string) Removed string, length members.  Add substring
112         member.
113         (DS_INITIALIZER) Rename DS_EMPTY_INITIALIZER.
114
115 Tue May 30 19:45:12 WST 2006 John Darrington <john@darrington.wattle.id.au>
116
117         * i18n.c i18n.h: New files.
118
119 Tue May 16 06:50:35 2006  Ben Pfaff  <blp@gnu.org>
120
121         * automake.mk (src/libpspp/version.c): Removed groff_font_path,
122         which is no longer used.
123
124         * message.c (request_bug_report_and_abort): Don't print
125         groff_font_path, which no longer exists.
126
127         * version.h (locale_dir): Removed groff_font_path.
128
129 Sun May 14 22:06:53 2006  Ben Pfaff  <blp@gnu.org>
130
131         * str.c (spprintf): Moved definition of spprintf() here, from
132         str.h.
133
134         * str.h: (nsprintf) Removed.  Changed all users to use sprintf()
135         instead.
136         (nvsprintf) Removed.  Changed all users to use vsprintf() instead.
137
138 Sun May 14 20:52:20 2006  Ben Pfaff  <blp@gnu.org>
139
140         * str.c (ds_init): Remove `capacity' argument and just initialize
141         the string to a capacity of zero.  Updated all callers.
142
143 Tue May  9 09:56:57 2006  Ben Pfaff  <blp@gnu.org>
144
145         * va_copy.h: Removed.  Now use va_copy() provided by gnulib
146         instead.
147
148         * automake.mk: (src_libpspp_libpspp_a_SOURCES) Removed va_copy.h.
149
150 Sun May  7 18:17:32 2006  Ben Pfaff  <blp@gnu.org>
151
152         * pool.c (pool_vasprintf): New function.
153         (pool_asprintf) New function.
154
155 Sun May  7 17:09:54 2006  Ben Pfaff  <blp@gnu.org>
156
157         * compiler.h: (macro WARN_UNUSED_RESULT) New macro.
158
159 Sun May  7 14:32:25 2006  Ben Pfaff  <blp@gnu.org>
160
161         * va_copy.h: New header.
162
163         * str.c: Use header instead of inlining va_copy() macro
164         implementation.
165
166 Sun May  7 10:06:29 WST 2006 John Darrington <john@darrington.wattle.id.au>
167
168         * array.c array.h: Constness of sort.
169
170 Thu May  4 18:01:37 WST 2006 John Darrington <john@darrington.wattle.id.au>
171
172         * message.c message.h: Added functions to create and copy a msg.
173
174 Tue May  2 15:41:50 2006  Ben Pfaff  <blp@gnu.org>
175
176         * str.c (ds_append_uninit): No need to add 1 to arg passed to
177         ds_extend(), because the argument does not include space for a
178         null terminator.  Also, fix warning.
179
180 Tue Apr 25 11:07:19 2006  Ben Pfaff  <blp@gnu.org>
181
182         Finish reforming error message support.  In this phase, move
183         message.c into libpspp.
184         
185         * message.c: Move here from src/.  Also remove a few unneeded
186         headers.
187
188         * automake.mk (src_libpspp_libpspp_a_SOURCES): Add message.c. 
189
190 Tue Apr 25 10:54:44 2006  Ben Pfaff  <blp@gnu.org>
191
192         Continue reforming error message support.  In this phase, drop
193         actual message printing from core code, substituting a callback,
194         and add the callback to each UI.  Also, move verbose_msg() into
195         its own module.
196
197         * automake.mk (src_libpspp_libpspp_a_SOURCES): Added
198         verbose-msg.c, verbose-msg.h.
199
200         * verbose-msg.c: New file.
201
202         * verbose-msg.h: New file.
203
204 Mon Apr 24 17:26:47 2006  Ben Pfaff  <blp@gnu.org>
205
206         Continue reforming error message support.  In this phase, rename
207         all the message functions and types to start with "msg", except
208         for the ones that will be moving to other modules anyway.
209
210         All references to the identifiers below were updated likewise.
211         
212         * message.h: (enum file_locator) Renamed `enum msg_locator'.
213         (struct error) Renamed `struct msg'.
214         (err_assert_fail) Renamed msg_assert_fail().
215
216 Sun Apr 23 22:07:06 2006  Ben Pfaff  <blp@gnu.org>
217
218         Continue reforming error message support.  In this phase, get rid
219         of message "titles" and put the message text in `struct error'.
220         Now `struct error' encapsulates a message more properly.
221         
222         * message.h: (struct error) Remove `title' member.  Add `text'
223         member.
224         
225 Sun Apr 16 20:43:35 2006  Ben Pfaff  <blp@gnu.org>
226
227         Continue reforming error message support.  In this phase, we
228         divide the classification of messages along "category" and
229         "severity" axes.
230
231         * message.h: (enum msg_class) Named this set of enumerations.
232         (enum msg_category) New enum: MSG_GENERAL, MSG_SYNTAX, MSG_DATA.
233         (enum msg_severity) New enum: MSG_ERROR, MSG_WARNING, MSG_NOTE.
234         (msg_class_to_category) New inline function.
235         (msg_class_to_severity) New inline function.
236         (msg_class_from_category_and_severity) New inline function.
237         (struct error) Removed `class' member, added `category',
238         `severity'.  Updated all users of this struct to use the new
239         members.
240
241 Sun Apr 16 20:33:19 2006  Ben Pfaff  <blp@gnu.org>
242
243         * str.c (ds_vprintf): Don't try to write into the string if it is
244         null.
245
246 Sun Apr 16 18:52:41 2006  Ben Pfaff  <blp@gnu.org>
247
248         GNU standards require "file name" instead of "filename" in
249         documentation.  It's nice for our code to follow the convention
250         too.
251         
252         * message.h: (struct file_locator) Rename filename member to
253         file_name.  Updated all references.
254
255 Sun Apr 16 16:05:43 2006  Ben Pfaff  <blp@gnu.org>
256
257         Continue reforming error message support.  In this phase, we get
258         rid of VM() and the other msg() support for "verbosity", replacing
259         it by a new function verbose_msg().
260
261         * message.h: (enum ERR_CLASS_COUNT) Renamed ERR_CLASS_CNT.
262         (enum ERR_CLASS_MASK) Removed.
263         (enum ERR_VERBOSITY_SHIFT) Removed.
264         (enum ERR_VERBOSITY_MASK) Removed.
265         (macro VM) Removed.
266
267 Sun Apr 16 11:48:07 2006  Ben Pfaff  <blp@gnu.org>
268
269         Start reforming error message support.  In this phase, we get rid
270         of "installation errors" and change all uses of msg() in the
271         output drivers to uses of error() or error_at_line().
272
273         * message.h: Remove IE, IS enums.
274
275 Mon Apr  3 11:10:21 2006  Ben Pfaff  <blp@gnu.org>
276
277         * str.c: (ds_separate) Change interface for cleanliness and
278         consistency with ds_tokenize(), and rewrite to shorten and
279         simplify.  Updated all callers.
280         (ds_tokenize) New function.
281
282 Fri Mar 31 10:38:46 2006  Ben Pfaff  <blp@gnu.org>
283
284         Add freaderror() analogous to fwriteerror() in gnulib.
285
286         * freaderror.c: New file.
287
288         * freaderror.h: New file.
289
290 Thu Mar 30 16:15:37 2006  Ben Pfaff  <blp@gnu.org>
291
292         * str.c: (ds_create) Adjust capacity selection.
293         (ds_init) Use MAX macro for clarity.
294         (ds_create_substr) Rewrote.
295         (ds_replace) Renamed ds_assign_c_str(), reimplemented.  Changed
296         all callers to use a ds_assign_*() function.
297         (ds_init_substring) New function.
298         (ds_assign_string) New function.
299         (ds_assign_substring) New function.
300         (ds_assign_buffer) New function.
301         (ds_assign_c_str) New function.
302         (ds_truncate) Rewrote for clarity.
303         (ds_rpad) Reimplement in terms of ds_putc_multiple().
304         (ds_ltrim_spaces) Reimplement.
305         (ds_trim_spaces) New function.
306         (ds_separate) New function.
307         (ds_c_str) Make tolerant of null pointer, allowing static
308         initialization of strings.
309         (ds_find) Rename ds_span(), change interface.
310         (ds_n_find) Rename ds_cspan(), change interface.
311         (ds_at) New function.
312         (ds_first) Reimplement in terms of ds_at().
313         (remove_comment) New function.
314         (ds_get_config_line) Reimplement in terms of other functions.
315         Change type of LINE_NUMBER parameter.  Updated all callers.
316         (ds_vprintf) Modify for clarity.
317         (ds_putc) Better to be safe than sorry.
318         (ds_putc_multiple) New function.
319
320         * str.h: (struct string) Reorder members.
321         (macro DS_INITIALIZER) New macro that can be used to initialize a
322         string (as empty).
323         (ds_c_str) Remove inline version.
324
325 Tue Mar 28 13:49:11 WST 2006 John Darrington <john@darrington.wattle.id.au>
326
327         * str.[ch]: New functions ds_create_substr, ds_find, ds_n_find, 
328         ds_ltrim_spaces
329
330 Sat Mar  4 12:59:01 2006  Ben Pfaff  <blp@gnu.org>
331
332         * compiler.h: New file.
333
334 Sat Mar  4 11:55:16 2006  Ben Pfaff  <blp@gnu.org>
335
336         * str.h: Now assume that sprintf() returns the correct value.
337         Always implement spprintf as a static inline function.  Change
338         nsprintf, nvsprintf to simple macros that call sprintf, vsprintf.
339
340         * str.c: Remove spprintf, nsprintf, nvsprintf conditional
341         definitions.
342
343 Thu Mar  2 08:40:33 WST 2006 John Darrington <john@darrington.wattle.id.au>
344         
345         * Moved files from src directory