summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Gran <spk121@yahoo.com>2009-09-09 08:07:53 -0700
committerMichael Gran <spk121@yahoo.com>2009-09-09 08:07:53 -0700
commitf7f4d0477e2f67f0c1248da5d6e64044019196a3 (patch)
tree334a45969ee86f48b9a58865a52b59d4ee8fbd72
parent0d05ae7c4b1eddf6257f99f44eaf5cb7b11191be (diff)
Make scm_i_from_stringn into API for use with libguilereadline
* libguile/strings.c (scm_i_from_stringn): renamed to scm_from_stringn. All callers changed. * libguile/strings.h: change declaration of scm_i_from_stringn to scm_from_stringn * libguile/strports.c (scm_strport_to_string): scm_i_from_stringn -> scm_from_stringn * guile-readline/readline.c (internal_readline): scm_i_from_stringn -> scm_from_stringn
-rw-r--r--guile-readline/readline.c4
-rw-r--r--libguile/strings.c8
-rw-r--r--libguile/strings.h4
-rw-r--r--libguile/strports.c4
4 files changed, 10 insertions, 10 deletions
diff --git a/guile-readline/readline.c b/guile-readline/readline.c
index a665415bf..5f6719dd7 100644
--- a/guile-readline/readline.c
+++ b/guile-readline/readline.c
@@ -259,8 +259,8 @@ internal_readline (SCM text)
{
scm_t_port *pt = SCM_PTAB_ENTRY (output_port);
- ret = scm_i_from_stringn (s, strlen (s), pt->encoding,
- SCM_FAILED_CONVERSION_ESCAPE_SEQUENCE);
+ ret = scm_from_stringn (s, strlen (s), pt->encoding,
+ SCM_FAILED_CONVERSION_ESCAPE_SEQUENCE);
}
else
ret = SCM_EOF_VAL;
diff --git a/libguile/strings.c b/libguile/strings.c
index 06e3359d4..5784a0324 100644
--- a/libguile/strings.c
+++ b/libguile/strings.c
@@ -1478,8 +1478,8 @@ scm_is_string (SCM obj)
}
SCM
-scm_i_from_stringn (const char *str, size_t len, const char *encoding,
- scm_t_string_failed_conversion_handler handler)
+scm_from_stringn (const char *str, size_t len, const char *encoding,
+ scm_t_string_failed_conversion_handler handler)
{
size_t u32len, i;
scm_t_wchar *u32;
@@ -1578,7 +1578,7 @@ scm_from_locale_stringn (const char *str, size_t len)
hndl = SCM_FAILED_CONVERSION_ERROR;
}
- return scm_i_from_stringn (str, len, enc, hndl);
+ return scm_from_stringn (str, len, enc, hndl);
}
SCM
@@ -1593,7 +1593,7 @@ scm_from_locale_string (const char *str)
SCM
scm_i_from_utf8_string (const scm_t_uint8 *str)
{
- return scm_i_from_stringn ((const char *) str,
+ return scm_from_stringn ((const char *) str,
strlen ((char *) str), "UTF-8",
SCM_FAILED_CONVERSION_ERROR);
}
diff --git a/libguile/strings.h b/libguile/strings.h
index 658d64d46..c9c267e44 100644
--- a/libguile/strings.h
+++ b/libguile/strings.h
@@ -111,7 +111,7 @@ SCM_API SCM scm_substring_shared (SCM str, SCM start, SCM end);
SCM_API SCM scm_substring_copy (SCM str, SCM start, SCM end);
SCM_API SCM scm_string_append (SCM args);
-SCM_API SCM scm_i_from_stringn (const char *str, size_t len,
+SCM_API SCM scm_from_stringn (const char *str, size_t len,
const char *encoding,
scm_t_string_failed_conversion_handler
handler);
@@ -157,7 +157,7 @@ SCM_INTERNAL const scm_t_wchar *scm_i_string_wide_chars (SCM str);
SCM_INTERNAL SCM scm_i_string_start_writing (SCM str);
SCM_INTERNAL void scm_i_string_stop_writing (void);
SCM_INTERNAL int scm_i_is_narrow_string (SCM str);
-SCM_API scm_t_wchar scm_i_string_ref (SCM str, size_t x);
+SCM_INTERNAL scm_t_wchar scm_i_string_ref (SCM str, size_t x);
SCM_INTERNAL int scm_i_string_contains_char (SCM str, char c);
SCM_INTERNAL int scm_i_string_strcmp (SCM sstr, size_t start_x, const char *cstr);
SCM_INTERNAL void scm_i_string_set_x (SCM str, size_t p, scm_t_wchar chr);
diff --git a/libguile/strports.c b/libguile/strports.c
index 82895ac62..b984b8339 100644
--- a/libguile/strports.c
+++ b/libguile/strports.c
@@ -380,8 +380,8 @@ SCM scm_strport_to_string (SCM port)
memcpy (buf, pt->read_buf, pt->read_buf_size);
}
else
- str = scm_i_from_stringn ((char *)pt->read_buf, pt->read_buf_size,
- pt->encoding, pt->ilseq_handler);
+ str = scm_from_stringn ((char *)pt->read_buf, pt->read_buf_size,
+ pt->encoding, pt->ilseq_handler);
scm_remember_upto_here_1 (port);
return str;
}