diff options
author | Marius Vollmer <mvo@zagadka.de> | 2004-08-10 14:08:02 +0000 |
---|---|---|
committer | Marius Vollmer <mvo@zagadka.de> | 2004-08-10 14:08:02 +0000 |
commit | 7f9994d90437cfdaf6d733b9c3b050d66326f3bb (patch) | |
tree | 8f3e66daaf6b5651e0ebf9988b2083de548308cc /libguile/stime.c | |
parent | 02573e4c7a10dee980618c93f4902887b225433c (diff) | |
download | guile-7f9994d90437cfdaf6d733b9c3b050d66326f3bb.tar.gz |
* stime.c, socket.c, simpos.c, procs.c, posix.c, ports.c,
net_db.c, fports.c, filesys.c, eval.c, deprecation.c, dynl.c:
Replaced uses of SCM_STRING_CHARS with proper uses of
scm_to_locale_string. Replaced SCM_STRINGP with scm_is_string.
Replaced scm_mem2string with scm_from_locale_string.
* simpos.c, posix.c (allocate_string_pointers, environ_list_to_c):
Removed, replaced all uses with scm_i_allocate_string_pointers.
Diffstat (limited to 'libguile/stime.c')
-rw-r--r-- | libguile/stime.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/libguile/stime.c b/libguile/stime.c index c237ae7fb..f08ae28b5 100644 --- a/libguile/stime.c +++ b/libguile/stime.c @@ -293,10 +293,14 @@ setzone (SCM zone, int pos, const char *subr) { static char *tmpenv[2]; char *buf; - - SCM_ASSERT (SCM_STRINGP (zone), zone, pos, subr); - buf = scm_malloc (SCM_STRING_LENGTH (zone) + sizeof (tzvar) + 1); - sprintf (buf, "%s=%s", tzvar, SCM_STRING_CHARS (zone)); + size_t zone_len; + + zone_len = scm_to_locale_stringbuf (zone, NULL, 0); + buf = scm_malloc (zone_len + sizeof (tzvar) + 1); + strcpy (buf, tzvar); + buf[sizeof(tzvar)-1] = '='; + scm_to_locale_stringbuf (zone, buf+sizeof(tzvar), zone_len); + buf[sizeof(tzvar)+zone_len] = '\0'; oldenv = environ; tmpenv[0] = buf; tmpenv[1] = 0; @@ -459,7 +463,7 @@ bdtime2c (SCM sbd_time, struct tm *lt, int pos, const char *subr) { SCM_ASSERT (scm_is_integer (velts[i]), sbd_time, pos, subr); } - SCM_ASSERT (scm_is_false (velts[10]) || SCM_STRINGP (velts[10]), + SCM_ASSERT (scm_is_false (velts[10]) || scm_is_string (velts[10]), sbd_time, pos, subr); lt->tm_sec = scm_to_int (velts[0]); |