mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
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.
This commit is contained in:
parent
f4bc4e5934
commit
31d4d02be7
2 changed files with 11 additions and 11 deletions
|
@ -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
|
||||
<http://lists.gnu.org/archive/html/bug-libunistring/2010-09/msg00004.html>
|
||||
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);
|
||||
}
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue