mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-29 19:30:36 +02:00
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
This commit is contained in:
parent
0d05ae7c4b
commit
f7f4d0477e
4 changed files with 10 additions and 10 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue