add scm_{to,from}_{utf8,latin1}_string{n,}
authorAndy Wingo <wingo@pobox.com>
Thu, 6 Jan 2011 00:21:54 +0000 (18:21 -0600)
committerAndy Wingo <wingo@pobox.com>
Fri, 7 Jan 2011 17:18:36 +0000 (09:18 -0800)
commitd40e1ca893149e9781bad54ac1e39d03e7be988f
tree65d09a9a0a194ee7dad0275c11f93cf8836d9457
parent929ccf48fc4bada585b29b3887f295bfcc1dcdaa
add scm_{to,from}_{utf8,latin1}_string{n,}

* libguile/strings.h:
* libguile/strings.c (scm_from_latin1_string, scm_to_latin1_string): New
  functions, in terms of the latin1_stringn variants.
  (scm_from_utf8_string, scm_from_utf8_stringn)
  (scm_to_utf8_string, scm_to_utf8_stringn): New functions.
  (scm_i_from_utf8_string, scm_i_to_utf8_string): Removed these internal
  functions.
  (scm_from_stringn): Handle -1 as a length. Unlike the previous
  behavior of scm_from_locale_string (NULL), which returned the empty
  string, we now raise an error.  The null pointer is not the same as
  the empty string.

* libguile/stime.c (scm_strftime, scm_strptime): Adapt to publishing of
  utf8 functions.
libguile/stime.c
libguile/strings.c
libguile/strings.h