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