Reform string library.
[pspp-builds.git] / src / libpspp / ChangeLog
index 1902d196dc261e9aa784a23c837dd60a3df6f00c..ec8a40de17f225b27ec919b3678405481019b7fe 100644 (file)
@@ -1,3 +1,327 @@
+Fri Jun  9 14:03:29 2006  Ben Pfaff  <blp@gnu.org>
+
+       Reform string library.
+       
+       * str.c (ss_empty): New function.  Replaces some uses of ls_init()
+       or ls_null().
+       (ss_cstr) New function.  Replaces some uses of ls_init().
+       (ss_buffer) New function.  Replaces some uses of ls_init().
+       (ss_substr) New function.
+       (ss_head) New function.
+       (ss_tail) New function.
+       (ss_alloc_substring) New function.  Replaces use of ls_create().
+       (ss_alloc_uninit) New function.
+       (ss_dealloc) New function.  Replaces use of ls_destroy().
+       (ss_truncate) New function.
+       (ss_rtrim) New function.
+       (ss_ltrim) New function.
+       (ss_trim) New function.
+       (ss_chomp) New function.
+       (ss_separate) New function.
+       (ss_tokenize) New function.
+       (ss_advance) New function.
+       (ds_create) Renamed ds_init_cstr().  Updated all callers.
+       (ss_match_char) New function.
+       (ss_get_char) New function.
+       (ss_get_until) New function.
+       (ss_get_chars) New function.
+       (ss_is_empty) New function.
+       (ss_length) New function.  Replaces ls_length().
+       (ss_data) New function.  Replaces many uses of ls_c_str().
+       (ss_end) New function.  Replaces ls_end().
+       (ss_at) New function.
+       (ss_first) New function.
+       (ss_last) New function.
+       (ss_span) New function.
+       (ss_cspan) New function.
+       (ss_compare) New function.
+       (ss_pointer_to_position) New function.
+       (ss_xstrdup) New function.
+       (ds_init) Renamed ds_init_empty().  All callers updated.
+       (ds_init_string) New function.
+       (ds_init_substring) Changed interface to take a struct substring.
+       Updated all callers.
+       (ds_init_cstr) New function.  Replaces ds_create().  All callers
+       updated.
+       (ds_assign_substring) Changed interface to take a struct
+       substring.  Updated all callers.
+       (ds_assign_buffer) Removed.  Changed all callers to use
+       ds_assign_substring().
+       (ds_assign_c_str) Renamed ds_assign_cstr().  All callers updated.
+       (ds_ss) New function.
+       (ds_substr) New function.
+       (ds_head) New function.
+       (ds_tail) New function.
+       (ds_rtrim) New function.  Replaces ds_rtrim_spaces().  All callers
+       updated.
+       (ds_ltrim) New function.  Replaces ds_ltrim_spaces().  All callers
+       updated.
+       (ds_trim) New function.  Replaces ds_trim_spaces().  All callers
+       updated.
+       (ds_rtrim_spaces) Removed.
+       (ds_ltrim_spaces) Removed.
+       (ds_trim_spaces) Removed.
+       (ds_separate) Changed interface to use substrings.  All callers
+       updated.
+       (ds_tokenize) Changed interface to use substrings.  All callers
+       updated.
+       (ds_c_str) Renamed ds_cstr().  All callers updated.
+       (ds_span) Changed interface to use substring for SKIP_SET and
+       dropped OFS.  All callers updated.
+       (ds_cspan) Changed interface to use substring for STOP_SET and
+       dropped OFS.  All callers updated.
+       (ds_find_char) New function.
+       (ds_compare) New function.
+       (ds_pointer_to_position) New function.
+       (ds_xstrdup) New function.  Replaced all users of
+       xstrdup(ds_c_str(s)) by a call to this function.
+       (ds_gets) Renamed ds_read_line().  All callers updated.
+       (ds_get_config_line) Renamed ds_read_config_line().  All callers
+       updated.
+       (ds_puts) Renamed ds_put_cstr().  All callers updated.
+       (ds_put_substring) New function.  Replaces ds_concat().  All
+       callers updated.
+       (ds_concat) Removed.
+       (ds_append_uninit) Renamed ds_put_uninit().  All callers updated.
+       (ds_printf) Renamed ds_put_format().  All callers updated.
+       (ds_vprintf) Renamed ds_put_vformat().  All callers updated.
+       (ds_putc) Renamed ds_put_char().  All callers updated.
+       (ds_putc_multiple) Renamed ds_put_char_multiple().  All callers
+       updated.
+       (ls_create) Removed.  Replaced by ss_alloc_substring().
+       (ls_create_buffer) Removed.  Replaced by ss_alloc_substring().
+       (ls_init) Removed.  Replaced by ss_buffer().
+       (ls_shallow_copy) Removed.  Just use assignment.
+       (ls_destroy) Removed.  Replaced by ss_dealloc().
+       (ls_null) Removed.
+       (ls_null_p) Removed.
+       (ls_empty_p) Removed.  Replaced by ss_is_empty().
+       (ls_c_str) Removed.
+       (ls_end) Removed.  Replaced by ss_end().
+
+       * str.h (struct fixed_string): Renamed struct substring, updated
+       all users.
+       (CC_SPACES) New macro.
+       (CC_DIGITS) Ditto.
+       (CC_XDIGITS) Ditto.
+       (CC_LETTERS) Ditto.
+       (CC_ALNUM) Ditto.
+       (SS_EMPTY_INITIALIZER) Ditto.
+       (SS_LITERAL_INITIALIZER) Ditto.
+       (struct string) Removed string, length members.  Add substring
+       member.
+       (DS_INITIALIZER) Rename DS_EMPTY_INITIALIZER.
+
+Tue May 30 19:45:12 WST 2006 John Darrington <john@darrington.wattle.id.au>
+
+       * i18n.c i18n.h: New files.
+
+Tue May 16 06:50:35 2006  Ben Pfaff  <blp@gnu.org>
+
+       * automake.mk (src/libpspp/version.c): Removed groff_font_path,
+       which is no longer used.
+
+       * message.c (request_bug_report_and_abort): Don't print
+       groff_font_path, which no longer exists.
+
+       * version.h (locale_dir): Removed groff_font_path.
+
+Sun May 14 22:06:53 2006  Ben Pfaff  <blp@gnu.org>
+
+       * str.c (spprintf): Moved definition of spprintf() here, from
+       str.h.
+
+       * str.h: (nsprintf) Removed.  Changed all users to use sprintf()
+       instead.
+       (nvsprintf) Removed.  Changed all users to use vsprintf() instead.
+
+Sun May 14 20:52:20 2006  Ben Pfaff  <blp@gnu.org>
+
+       * str.c (ds_init): Remove `capacity' argument and just initialize
+       the string to a capacity of zero.  Updated all callers.
+
+Tue May  9 09:56:57 2006  Ben Pfaff  <blp@gnu.org>
+
+       * va_copy.h: Removed.  Now use va_copy() provided by gnulib
+       instead.
+
+       * automake.mk: (src_libpspp_libpspp_a_SOURCES) Removed va_copy.h.
+
+Sun May  7 18:17:32 2006  Ben Pfaff  <blp@gnu.org>
+
+       * pool.c (pool_vasprintf): New function.
+       (pool_asprintf) New function.
+
+Sun May  7 17:09:54 2006  Ben Pfaff  <blp@gnu.org>
+
+       * compiler.h: (macro WARN_UNUSED_RESULT) New macro.
+
+Sun May  7 14:32:25 2006  Ben Pfaff  <blp@gnu.org>
+
+       * va_copy.h: New header.
+
+       * str.c: Use header instead of inlining va_copy() macro
+       implementation.
+
+Sun May  7 10:06:29 WST 2006 John Darrington <john@darrington.wattle.id.au>
+
+       * array.c array.h: Constness of sort.
+
+Thu May  4 18:01:37 WST 2006 John Darrington <john@darrington.wattle.id.au>
+
+       * message.c message.h: Added functions to create and copy a msg.
+
+Tue May  2 15:41:50 2006  Ben Pfaff  <blp@gnu.org>
+
+       * str.c (ds_append_uninit): No need to add 1 to arg passed to
+       ds_extend(), because the argument does not include space for a
+       null terminator.  Also, fix warning.
+
+Tue Apr 25 11:07:19 2006  Ben Pfaff  <blp@gnu.org>
+
+       Finish reforming error message support.  In this phase, move
+       message.c into libpspp.
+       
+       * message.c: Move here from src/.  Also remove a few unneeded
+       headers.
+
+       * automake.mk (src_libpspp_libpspp_a_SOURCES): Add message.c. 
+
+Tue Apr 25 10:54:44 2006  Ben Pfaff  <blp@gnu.org>
+
+       Continue reforming error message support.  In this phase, drop
+       actual message printing from core code, substituting a callback,
+       and add the callback to each UI.  Also, move verbose_msg() into
+       its own module.
+
+       * automake.mk (src_libpspp_libpspp_a_SOURCES): Added
+       verbose-msg.c, verbose-msg.h.
+
+       * verbose-msg.c: New file.
+
+       * verbose-msg.h: New file.
+
+Mon Apr 24 17:26:47 2006  Ben Pfaff  <blp@gnu.org>
+
+       Continue reforming error message support.  In this phase, rename
+       all the message functions and types to start with "msg", except
+       for the ones that will be moving to other modules anyway.
+
+       All references to the identifiers below were updated likewise.
+       
+       * message.h: (enum file_locator) Renamed `enum msg_locator'.
+       (struct error) Renamed `struct msg'.
+       (err_assert_fail) Renamed msg_assert_fail().
+
+Sun Apr 23 22:07:06 2006  Ben Pfaff  <blp@gnu.org>
+
+       Continue reforming error message support.  In this phase, get rid
+       of message "titles" and put the message text in `struct error'.
+       Now `struct error' encapsulates a message more properly.
+       
+       * message.h: (struct error) Remove `title' member.  Add `text'
+       member.
+       
+Sun Apr 16 20:43:35 2006  Ben Pfaff  <blp@gnu.org>
+
+       Continue reforming error message support.  In this phase, we
+       divide the classification of messages along "category" and
+       "severity" axes.
+
+       * message.h: (enum msg_class) Named this set of enumerations.
+       (enum msg_category) New enum: MSG_GENERAL, MSG_SYNTAX, MSG_DATA.
+       (enum msg_severity) New enum: MSG_ERROR, MSG_WARNING, MSG_NOTE.
+       (msg_class_to_category) New inline function.
+       (msg_class_to_severity) New inline function.
+       (msg_class_from_category_and_severity) New inline function.
+       (struct error) Removed `class' member, added `category',
+       `severity'.  Updated all users of this struct to use the new
+       members.
+
+Sun Apr 16 20:33:19 2006  Ben Pfaff  <blp@gnu.org>
+
+       * str.c (ds_vprintf): Don't try to write into the string if it is
+       null.
+
+Sun Apr 16 18:52:41 2006  Ben Pfaff  <blp@gnu.org>
+
+       GNU standards require "file name" instead of "filename" in
+       documentation.  It's nice for our code to follow the convention
+       too.
+       
+       * message.h: (struct file_locator) Rename filename member to
+       file_name.  Updated all references.
+
+Sun Apr 16 16:05:43 2006  Ben Pfaff  <blp@gnu.org>
+
+       Continue reforming error message support.  In this phase, we get
+       rid of VM() and the other msg() support for "verbosity", replacing
+       it by a new function verbose_msg().
+
+       * message.h: (enum ERR_CLASS_COUNT) Renamed ERR_CLASS_CNT.
+       (enum ERR_CLASS_MASK) Removed.
+       (enum ERR_VERBOSITY_SHIFT) Removed.
+       (enum ERR_VERBOSITY_MASK) Removed.
+       (macro VM) Removed.
+
+Sun Apr 16 11:48:07 2006  Ben Pfaff  <blp@gnu.org>
+
+       Start reforming error message support.  In this phase, we get rid
+       of "installation errors" and change all uses of msg() in the
+       output drivers to uses of error() or error_at_line().
+
+       * message.h: Remove IE, IS enums.
+
+Mon Apr  3 11:10:21 2006  Ben Pfaff  <blp@gnu.org>
+
+       * str.c: (ds_separate) Change interface for cleanliness and
+       consistency with ds_tokenize(), and rewrite to shorten and
+       simplify.  Updated all callers.
+       (ds_tokenize) New function.
+
+Fri Mar 31 10:38:46 2006  Ben Pfaff  <blp@gnu.org>
+
+       Add freaderror() analogous to fwriteerror() in gnulib.
+
+       * freaderror.c: New file.
+
+       * freaderror.h: New file.
+
+Thu Mar 30 16:15:37 2006  Ben Pfaff  <blp@gnu.org>
+
+       * str.c: (ds_create) Adjust capacity selection.
+       (ds_init) Use MAX macro for clarity.
+       (ds_create_substr) Rewrote.
+       (ds_replace) Renamed ds_assign_c_str(), reimplemented.  Changed
+       all callers to use a ds_assign_*() function.
+       (ds_init_substring) New function.
+       (ds_assign_string) New function.
+       (ds_assign_substring) New function.
+       (ds_assign_buffer) New function.
+       (ds_assign_c_str) New function.
+       (ds_truncate) Rewrote for clarity.
+       (ds_rpad) Reimplement in terms of ds_putc_multiple().
+       (ds_ltrim_spaces) Reimplement.
+       (ds_trim_spaces) New function.
+       (ds_separate) New function.
+       (ds_c_str) Make tolerant of null pointer, allowing static
+       initialization of strings.
+       (ds_find) Rename ds_span(), change interface.
+       (ds_n_find) Rename ds_cspan(), change interface.
+       (ds_at) New function.
+       (ds_first) Reimplement in terms of ds_at().
+       (remove_comment) New function.
+       (ds_get_config_line) Reimplement in terms of other functions.
+       Change type of LINE_NUMBER parameter.  Updated all callers.
+       (ds_vprintf) Modify for clarity.
+       (ds_putc) Better to be safe than sorry.
+       (ds_putc_multiple) New function.
+
+       * str.h: (struct string) Reorder members.
+       (macro DS_INITIALIZER) New macro that can be used to initialize a
+       string (as empty).
+       (ds_c_str) Remove inline version.
+
 Tue Mar 28 13:49:11 WST 2006 John Darrington <john@darrington.wattle.id.au>
 
        * str.[ch]: New functions ds_create_substr, ds_find, ds_n_find,