From 31d4d02be7288d32dce95ddc45d824b725b6712a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sun, 23 Jan 2011 00:13:27 +0100 Subject: [PATCH] Hide the string escaping hacks. * libguile/strings.c (scm_i_unistring_escapes_to_guile_escapes): Rename to... (unistring_escapes_to_guile_escapes): ... this. Make `static'. (scm_i_unistring_escapes_to_r6rs_escapes): Rename to... (unistring_escapes_to_r6rs_escapes): ... this. Make `static'. * libguile/strings.h (scm_i_unistring_escapes_to_guile_escapes, scm_i_unistring_escapes_to_r6rs_escapes): Remove declarations. --- libguile/strings.c | 18 +++++++++++------- libguile/strings.h | 4 ---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/libguile/strings.c b/libguile/strings.c index abe4a7b7c..93dd6a7b9 100644 --- a/libguile/strings.c +++ b/libguile/strings.c @@ -1584,9 +1584,13 @@ scm_take_locale_string (char *str) /* Change libunistring escapes (`\uXXXX' and `\UXXXXXXXX') in BUF, a *LENP-byte locale-encoded string, to `\xXX', `\uXXXX', or `\UXXXXXX'. - Set *LENP to the size of the resulting string. */ -void -scm_i_unistring_escapes_to_guile_escapes (char *buf, size_t *lenp) + Set *LENP to the size of the resulting string. + + FIXME: This is a hack we should get rid of. See + + for details. */ +static void +unistring_escapes_to_guile_escapes (char *buf, size_t *lenp) { char *before, *after; size_t i, j; @@ -1642,8 +1646,8 @@ scm_i_unistring_escapes_to_guile_escapes (char *buf, size_t *lenp) of the resulting string. BUF must be large enough to handle the worst case when `\uXXXX' escapes (6 characters) are replaced by `\xXXXX;' (7 characters). */ -void -scm_i_unistring_escapes_to_r6rs_escapes (char *buf, size_t *lenp) +static void +unistring_escapes_to_r6rs_escapes (char *buf, size_t *lenp) { char *before, *after; size_t i, j; @@ -1857,10 +1861,10 @@ scm_to_stringn (SCM str, size_t *lenp, const char *encoding, (seven characters). Make BUF large enough to hold that. */ buf = scm_realloc (buf, (len * 7) / 6 + 1); - scm_i_unistring_escapes_to_r6rs_escapes (buf, &len); + unistring_escapes_to_r6rs_escapes (buf, &len); } else - scm_i_unistring_escapes_to_guile_escapes (buf, &len); + unistring_escapes_to_guile_escapes (buf, &len); buf = scm_realloc (buf, len); } diff --git a/libguile/strings.h b/libguile/strings.h index 1a8ff7c33..168fcb7d1 100644 --- a/libguile/strings.h +++ b/libguile/strings.h @@ -216,10 +216,6 @@ SCM_INTERNAL char **scm_i_allocate_string_pointers (SCM list); SCM_INTERNAL void scm_i_get_substring_spec (size_t len, SCM start, size_t *cstart, SCM end, size_t *cend); -SCM_INTERNAL void scm_i_unistring_escapes_to_guile_escapes (char *buf, - size_t *len); -SCM_INTERNAL void scm_i_unistring_escapes_to_r6rs_escapes (char *buf, - size_t *len); /* Debugging functions */