Finish converting struct variable to an opaque type. In this
[pspp-builds.git] / src / libpspp / ChangeLog
1 Sat Dec  9 18:48:55 2006  Ben Pfaff  <blp@gnu.org>
2
3         * misc.h (macro range): Removed, as it was unused.
4
5 Sat Dec  9 07:19:01 WST 2006 John Darrington <john@darrington.wattle.id.au>
6
7         * array.c: Removed gratuitous #include
8
9 Thu Dec  7 20:33:23 WST 2006 John Darrington <john@darrington.wattle.id.au>
10
11         * getl.c getl.h : Changed signature of create function to take a 
12         string indicating the initial include path.
13
14 Sun Dec  3 11:36:10 2006  Ben Pfaff  <blp@gnu.org>
15
16         * str.h (SS_LITERAL_INITIALIZER): Cast the string literal to "char
17         *".  This normally does nothing but when GCC's -Wwrite-strings is
18         used it fixes a warning that otherwise can't be avoided.
19
20 Sun Dec  3 11:35:35 2006  Ben Pfaff  <blp@gnu.org>
21
22         * str.c (ss_alloc_substring_pool): New function.
23         (ss_alloc_uninit_pool) New function.
24
25 Sun Dec  3 11:28:06 2006  Ben Pfaff  <blp@gnu.org>
26
27         * getl.h: (enum getl_syntax) New enumeration to distinguish
28         between "batch" and "interactive" in a clearer way than a bool.
29         (struct getl_interface) Add an arg to "read" to return the
30         intended syntax mode.  Add an arg to "filter" to specify the
31         syntax mode of the line to filter.
32
33         * getl.c (do_read_line): Instead of returning the syntax type of
34         the line read based on whether the source itself is interactive,
35         return it based on whether the line itself should be treated as
36         having batch or interactive syntax.  Also, adapt interface to the
37         new interfaces of lex_init() and getl_interface.
38
39 Wed Nov 29 19:35:44 WST 2006 John Darrington <john@darrington.wattle.id.au>
40
41         * getl.c getl.h: New files. Created interface from base of 
42         language/line-buffer.[ch]
43
44         * msg-locator.c msg-locator.h: New files. Moved from
45         language/line-buffer.[ch]
46
47 Fri Nov 24 17:27:00 2006  Ben Pfaff  <blp@gnu.org>
48
49         * misc.h: (min) Removed.  All references updated to use MIN, from
50         minmax.h provided by gnulib.
51         (max) Ditto (for MAX).
52
53 Sun Nov 19 09:22:26 2006  Ben Pfaff  <blp@gnu.org>
54
55         * str.c (ss_get_long): New function.
56         (ss_compare_case) Ditto.
57         (ss_equals) Ditto.
58         (ss_equals_case) Ditto.
59
60 Tue Oct 31 19:28:19 2006  Ben Pfaff  <blp@gnu.org>
61
62         * str.h: [!HAVE_STRCHR] Drop compatibility code, because now we
63         assume a C89 compliant library.  (Gnulib makes this assumption so
64         we might as well too.)
65         [!HAVE_STRRCHR] Ditto.
66
67 Thu Oct 26 20:19:50 2006  Ben Pfaff  <blp@gnu.org>
68
69         * automake.mk: Add the new files.
70
71         * legacy-encoding.c: New file.
72
73         * legacy-encoding.h: New file.
74
75         * float-format.c: New file.
76
77         * float-format.h: New file.
78
79         * integer-format.c: New file.
80
81         * integer-format.h: New file.
82
83 Sun Oct 15 09:49:50 WST 2006 John Darrington <john@darrington.wattle.id.au>
84
85         * hash.c hash.h: Added hsh_create_pool, a hash which uses a pool
86         for its memory allocation.
87
88 Mon Jul 31 15:49:46 2006  Ben Pfaff  <blp@gnu.org>
89
90         * compiler.h: (macro CONST_FUNCTION) New macro.
91         (macro PURE_FUNCTION) New macro.
92
93 Sun Jul 16 21:07:35 2006  Ben Pfaff  <blp@gnu.org>
94
95         * message.c: (static int messages_disabled) New variable.
96         (msg_emit) Don't emit the message if messages are disabled.
97         (msg_disable) New function.
98         (msg_enable) New function.
99
100         * str.c: (free_string) New function.
101         (ds_register_pool) New function.
102         (ds_unregister_pool) New function.
103         (ds_set_length) New function.
104
105 Mon Jul 10 17:26:58 WST 2006 John Darrington <john@darrington.wattle.id.au>
106
107         * llx.c: #included compiler.h and removed explicit preprocessor cruft.
108
109 Fri Jul  7 20:01:26 2006  Ben Pfaff  <blp@gnu.org>
110
111         * automake.mk: (src_libpspp_libpspp_a_SOURCES) Add assertion.h.
112         
113         * assertion.h: New file.  Replaced usage of assert(0) and abort()
114         with NOT_REACHED() from this file throughout the source tree.
115
116         * message.c: (request_bug_report_and_abort) Revise message printed
117         to include request to include lines above the message, which
118         should include an assertion failure message in many cases.
119         (msg_assert_fail) Removed.
120
121         * message.h: (assert) Removed.
122         (request_bug_report_and_abort) Mark NO_RETURN.
123
124 Mon Jul  3 09:36:42 WST 2006 John Darrington <john@darrington.wattle.id.au>
125
126         * i18n.c: Made character conversion tolerant of failure to create the 
127         necessary iconv structs.
128
129 Sat Jul  1 15:32:54 2006  Ben Pfaff  <blp@gnu.org>
130
131         * automake.mk: (src_libpspp_libpspp_a_SOURCES) Add new files.
132
133         * ll.c: New file.
134
135         * ll.h: New file.
136
137         * llx.c: New file.
138
139         * llx.h: New file.
140
141 Sun Jun 25 22:35:28 2006  Ben Pfaff  <blp@gnu.org>
142
143         Optimize rehashing: we know that none of the entries in the hash
144         table are equal, so we need not compare them to each other during
145         rehashing.
146         
147         * hash.c: (locate_empty_entry) New function.
148         (rehash) Use locate_empty_entry() instead of
149         locate_matching_entry().
150
151 Fri Jun  9 14:03:29 2006  Ben Pfaff  <blp@gnu.org>
152
153         Reform string library.
154         
155         * str.c (ss_empty): New function.  Replaces some uses of ls_init()
156         or ls_null().
157         (ss_cstr) New function.  Replaces some uses of ls_init().
158         (ss_buffer) New function.  Replaces some uses of ls_init().
159         (ss_substr) New function.
160         (ss_head) New function.
161         (ss_tail) New function.
162         (ss_alloc_substring) New function.  Replaces use of ls_create().
163         (ss_alloc_uninit) New function.
164         (ss_dealloc) New function.  Replaces use of ls_destroy().
165         (ss_truncate) New function.
166         (ss_rtrim) New function.
167         (ss_ltrim) New function.
168         (ss_trim) New function.
169         (ss_chomp) New function.
170         (ss_separate) New function.
171         (ss_tokenize) New function.
172         (ss_advance) New function.
173         (ds_create) Renamed ds_init_cstr().  Updated all callers.
174         (ss_match_char) New function.
175         (ss_get_char) New function.
176         (ss_get_until) New function.
177         (ss_get_chars) New function.
178         (ss_is_empty) New function.
179         (ss_length) New function.  Replaces ls_length().
180         (ss_data) New function.  Replaces many uses of ls_c_str().
181         (ss_end) New function.  Replaces ls_end().
182         (ss_at) New function.
183         (ss_first) New function.
184         (ss_last) New function.
185         (ss_span) New function.
186         (ss_cspan) New function.
187         (ss_compare) New function.
188         (ss_pointer_to_position) New function.
189         (ss_xstrdup) New function.
190         (ds_init) Renamed ds_init_empty().  All callers updated.
191         (ds_init_string) New function.
192         (ds_init_substring) Changed interface to take a struct substring.
193         Updated all callers.
194         (ds_init_cstr) New function.  Replaces ds_create().  All callers
195         updated.
196         (ds_assign_substring) Changed interface to take a struct
197         substring.  Updated all callers.
198         (ds_assign_buffer) Removed.  Changed all callers to use
199         ds_assign_substring().
200         (ds_assign_c_str) Renamed ds_assign_cstr().  All callers updated.
201         (ds_ss) New function.
202         (ds_substr) New function.
203         (ds_head) New function.
204         (ds_tail) New function.
205         (ds_rtrim) New function.  Replaces ds_rtrim_spaces().  All callers
206         updated.
207         (ds_ltrim) New function.  Replaces ds_ltrim_spaces().  All callers
208         updated.
209         (ds_trim) New function.  Replaces ds_trim_spaces().  All callers
210         updated.
211         (ds_rtrim_spaces) Removed.
212         (ds_ltrim_spaces) Removed.
213         (ds_trim_spaces) Removed.
214         (ds_separate) Changed interface to use substrings.  All callers
215         updated.
216         (ds_tokenize) Changed interface to use substrings.  All callers
217         updated.
218         (ds_c_str) Renamed ds_cstr().  All callers updated.
219         (ds_span) Changed interface to use substring for SKIP_SET and
220         dropped OFS.  All callers updated.
221         (ds_cspan) Changed interface to use substring for STOP_SET and
222         dropped OFS.  All callers updated.
223         (ds_find_char) New function.
224         (ds_compare) New function.
225         (ds_pointer_to_position) New function.
226         (ds_xstrdup) New function.  Replaced all users of
227         xstrdup(ds_c_str(s)) by a call to this function.
228         (ds_gets) Renamed ds_read_line().  All callers updated.
229         (ds_get_config_line) Renamed ds_read_config_line().  All callers
230         updated.
231         (ds_puts) Renamed ds_put_cstr().  All callers updated.
232         (ds_put_substring) New function.  Replaces ds_concat().  All
233         callers updated.
234         (ds_concat) Removed.
235         (ds_append_uninit) Renamed ds_put_uninit().  All callers updated.
236         (ds_printf) Renamed ds_put_format().  All callers updated.
237         (ds_vprintf) Renamed ds_put_vformat().  All callers updated.
238         (ds_putc) Renamed ds_put_char().  All callers updated.
239         (ds_putc_multiple) Renamed ds_put_char_multiple().  All callers
240         updated.
241         (ls_create) Removed.  Replaced by ss_alloc_substring().
242         (ls_create_buffer) Removed.  Replaced by ss_alloc_substring().
243         (ls_init) Removed.  Replaced by ss_buffer().
244         (ls_shallow_copy) Removed.  Just use assignment.
245         (ls_destroy) Removed.  Replaced by ss_dealloc().
246         (ls_null) Removed.
247         (ls_null_p) Removed.
248         (ls_empty_p) Removed.  Replaced by ss_is_empty().
249         (ls_c_str) Removed.
250         (ls_end) Removed.  Replaced by ss_end().
251
252         * str.h (struct fixed_string): Renamed struct substring, updated
253         all users.
254         (CC_SPACES) New macro.
255         (CC_DIGITS) Ditto.
256         (CC_XDIGITS) Ditto.
257         (CC_LETTERS) Ditto.
258         (CC_ALNUM) Ditto.
259         (SS_EMPTY_INITIALIZER) Ditto.
260         (SS_LITERAL_INITIALIZER) Ditto.
261         (struct string) Removed string, length members.  Add substring
262         member.
263         (DS_INITIALIZER) Rename DS_EMPTY_INITIALIZER.
264
265 Tue May 30 19:45:12 WST 2006 John Darrington <john@darrington.wattle.id.au>
266
267         * i18n.c i18n.h: New files.
268
269 Tue May 16 06:50:35 2006  Ben Pfaff  <blp@gnu.org>
270
271         * automake.mk (src/libpspp/version.c): Removed groff_font_path,
272         which is no longer used.
273
274         * message.c (request_bug_report_and_abort): Don't print
275         groff_font_path, which no longer exists.
276
277         * version.h (locale_dir): Removed groff_font_path.
278
279 Sun May 14 22:06:53 2006  Ben Pfaff  <blp@gnu.org>
280
281         * str.c (spprintf): Moved definition of spprintf() here, from
282         str.h.
283
284         * str.h: (nsprintf) Removed.  Changed all users to use sprintf()
285         instead.
286         (nvsprintf) Removed.  Changed all users to use vsprintf() instead.
287
288 Sun May 14 20:52:20 2006  Ben Pfaff  <blp@gnu.org>
289
290         * str.c (ds_init): Remove `capacity' argument and just initialize
291         the string to a capacity of zero.  Updated all callers.
292
293 Tue May  9 09:56:57 2006  Ben Pfaff  <blp@gnu.org>
294
295         * va_copy.h: Removed.  Now use va_copy() provided by gnulib
296         instead.
297
298         * automake.mk: (src_libpspp_libpspp_a_SOURCES) Removed va_copy.h.
299
300 Sun May  7 18:17:32 2006  Ben Pfaff  <blp@gnu.org>
301
302         * pool.c (pool_vasprintf): New function.
303         (pool_asprintf) New function.
304
305 Sun May  7 17:09:54 2006  Ben Pfaff  <blp@gnu.org>
306
307         * compiler.h: (macro WARN_UNUSED_RESULT) New macro.
308
309 Sun May  7 14:32:25 2006  Ben Pfaff  <blp@gnu.org>
310
311         * va_copy.h: New header.
312
313         * str.c: Use header instead of inlining va_copy() macro
314         implementation.
315
316 Sun May  7 10:06:29 WST 2006 John Darrington <john@darrington.wattle.id.au>
317
318         * array.c array.h: Constness of sort.
319
320 Thu May  4 18:01:37 WST 2006 John Darrington <john@darrington.wattle.id.au>
321
322         * message.c message.h: Added functions to create and copy a msg.
323
324 Tue May  2 15:41:50 2006  Ben Pfaff  <blp@gnu.org>
325
326         * str.c (ds_append_uninit): No need to add 1 to arg passed to
327         ds_extend(), because the argument does not include space for a
328         null terminator.  Also, fix warning.
329
330 Tue Apr 25 11:07:19 2006  Ben Pfaff  <blp@gnu.org>
331
332         Finish reforming error message support.  In this phase, move
333         message.c into libpspp.
334         
335         * message.c: Move here from src/.  Also remove a few unneeded
336         headers.
337
338         * automake.mk (src_libpspp_libpspp_a_SOURCES): Add message.c. 
339
340 Tue Apr 25 10:54:44 2006  Ben Pfaff  <blp@gnu.org>
341
342         Continue reforming error message support.  In this phase, drop
343         actual message printing from core code, substituting a callback,
344         and add the callback to each UI.  Also, move verbose_msg() into
345         its own module.
346
347         * automake.mk (src_libpspp_libpspp_a_SOURCES): Added
348         verbose-msg.c, verbose-msg.h.
349
350         * verbose-msg.c: New file.
351
352         * verbose-msg.h: New file.
353
354 Mon Apr 24 17:26:47 2006  Ben Pfaff  <blp@gnu.org>
355
356         Continue reforming error message support.  In this phase, rename
357         all the message functions and types to start with "msg", except
358         for the ones that will be moving to other modules anyway.
359
360         All references to the identifiers below were updated likewise.
361         
362         * message.h: (enum file_locator) Renamed `enum msg_locator'.
363         (struct error) Renamed `struct msg'.
364         (err_assert_fail) Renamed msg_assert_fail().
365
366 Sun Apr 23 22:07:06 2006  Ben Pfaff  <blp@gnu.org>
367
368         Continue reforming error message support.  In this phase, get rid
369         of message "titles" and put the message text in `struct error'.
370         Now `struct error' encapsulates a message more properly.
371         
372         * message.h: (struct error) Remove `title' member.  Add `text'
373         member.
374         
375 Sun Apr 16 20:43:35 2006  Ben Pfaff  <blp@gnu.org>
376
377         Continue reforming error message support.  In this phase, we
378         divide the classification of messages along "category" and
379         "severity" axes.
380
381         * message.h: (enum msg_class) Named this set of enumerations.
382         (enum msg_category) New enum: MSG_GENERAL, MSG_SYNTAX, MSG_DATA.
383         (enum msg_severity) New enum: MSG_ERROR, MSG_WARNING, MSG_NOTE.
384         (msg_class_to_category) New inline function.
385         (msg_class_to_severity) New inline function.
386         (msg_class_from_category_and_severity) New inline function.
387         (struct error) Removed `class' member, added `category',
388         `severity'.  Updated all users of this struct to use the new
389         members.
390
391 Sun Apr 16 20:33:19 2006  Ben Pfaff  <blp@gnu.org>
392
393         * str.c (ds_vprintf): Don't try to write into the string if it is
394         null.
395
396 Sun Apr 16 18:52:41 2006  Ben Pfaff  <blp@gnu.org>
397
398         GNU standards require "file name" instead of "filename" in
399         documentation.  It's nice for our code to follow the convention
400         too.
401         
402         * message.h: (struct file_locator) Rename filename member to
403         file_name.  Updated all references.
404
405 Sun Apr 16 16:05:43 2006  Ben Pfaff  <blp@gnu.org>
406
407         Continue reforming error message support.  In this phase, we get
408         rid of VM() and the other msg() support for "verbosity", replacing
409         it by a new function verbose_msg().
410
411         * message.h: (enum ERR_CLASS_COUNT) Renamed ERR_CLASS_CNT.
412         (enum ERR_CLASS_MASK) Removed.
413         (enum ERR_VERBOSITY_SHIFT) Removed.
414         (enum ERR_VERBOSITY_MASK) Removed.
415         (macro VM) Removed.
416
417 Sun Apr 16 11:48:07 2006  Ben Pfaff  <blp@gnu.org>
418
419         Start reforming error message support.  In this phase, we get rid
420         of "installation errors" and change all uses of msg() in the
421         output drivers to uses of error() or error_at_line().
422
423         * message.h: Remove IE, IS enums.
424
425 Mon Apr  3 11:10:21 2006  Ben Pfaff  <blp@gnu.org>
426
427         * str.c: (ds_separate) Change interface for cleanliness and
428         consistency with ds_tokenize(), and rewrite to shorten and
429         simplify.  Updated all callers.
430         (ds_tokenize) New function.
431
432 Fri Mar 31 10:38:46 2006  Ben Pfaff  <blp@gnu.org>
433
434         Add freaderror() analogous to fwriteerror() in gnulib.
435
436         * freaderror.c: New file.
437
438         * freaderror.h: New file.
439
440 Thu Mar 30 16:15:37 2006  Ben Pfaff  <blp@gnu.org>
441
442         * str.c: (ds_create) Adjust capacity selection.
443         (ds_init) Use MAX macro for clarity.
444         (ds_create_substr) Rewrote.
445         (ds_replace) Renamed ds_assign_c_str(), reimplemented.  Changed
446         all callers to use a ds_assign_*() function.
447         (ds_init_substring) New function.
448         (ds_assign_string) New function.
449         (ds_assign_substring) New function.
450         (ds_assign_buffer) New function.
451         (ds_assign_c_str) New function.
452         (ds_truncate) Rewrote for clarity.
453         (ds_rpad) Reimplement in terms of ds_putc_multiple().
454         (ds_ltrim_spaces) Reimplement.
455         (ds_trim_spaces) New function.
456         (ds_separate) New function.
457         (ds_c_str) Make tolerant of null pointer, allowing static
458         initialization of strings.
459         (ds_find) Rename ds_span(), change interface.
460         (ds_n_find) Rename ds_cspan(), change interface.
461         (ds_at) New function.
462         (ds_first) Reimplement in terms of ds_at().
463         (remove_comment) New function.
464         (ds_get_config_line) Reimplement in terms of other functions.
465         Change type of LINE_NUMBER parameter.  Updated all callers.
466         (ds_vprintf) Modify for clarity.
467         (ds_putc) Better to be safe than sorry.
468         (ds_putc_multiple) New function.
469
470         * str.h: (struct string) Reorder members.
471         (macro DS_INITIALIZER) New macro that can be used to initialize a
472         string (as empty).
473         (ds_c_str) Remove inline version.
474
475 Tue Mar 28 13:49:11 WST 2006 John Darrington <john@darrington.wattle.id.au>
476
477         * str.[ch]: New functions ds_create_substr, ds_find, ds_n_find, 
478         ds_ltrim_spaces
479
480 Sat Mar  4 12:59:01 2006  Ben Pfaff  <blp@gnu.org>
481
482         * compiler.h: New file.
483
484 Sat Mar  4 11:55:16 2006  Ben Pfaff  <blp@gnu.org>
485
486         * str.h: Now assume that sprintf() returns the correct value.
487         Always implement spprintf as a static inline function.  Change
488         nsprintf, nvsprintf to simple macros that call sprintf, vsprintf.
489
490         * str.c: Remove spprintf, nsprintf, nvsprintf conditional
491         definitions.
492
493 Thu Mar  2 08:40:33 WST 2006 John Darrington <john@darrington.wattle.id.au>
494         
495         * Moved files from src directory