+2000-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
+
+ * readline.c (scm_readline, scm_add_history, completion_function,
+ scm_filename_completion_function): Replace calls to
+ SCM_COERCE_SUBSTR with SCM_STRING_COERCE_0TERMINATION_X.
+
+ (internal_readline, scm_add_history, scm_read_history,
+ scm_write_history, scm_filename_completion_function,
+ completion_function): Replace SCM_CHARS with SCM_STRING_CHARS.
+
2000-11-19 Gary Houston <ghouston@arglist.com>
* configure.in: test $ac_cv_lib_readline_readline instead of
--in_readline;
scm_wrong_type_arg (s_scm_readline, SCM_ARG1, text);
}
- SCM_COERCE_SUBSTR (text);
+ SCM_STRING_COERCE_0TERMINATION_X (text);
}
if (!((SCM_UNBNDP (inp) && SCM_NIMP (scm_cur_inp) && SCM_OPINFPORTP (inp))
{
SCM ret;
char *s;
- char *prompt = SCM_UNBNDP (text) ? "" : SCM_CHARS (text);
+ char *prompt = SCM_UNBNDP (text) ? "" : SCM_STRING_CHARS (text);
promptp = 1;
s = readline (prompt);
{
char* s;
SCM_VALIDATE_STRING (1,text);
- SCM_COERCE_SUBSTR (text);
+ SCM_STRING_COERCE_0TERMINATION_X (text);
- s = SCM_CHARS (text);
+ s = SCM_STRING_CHARS (text);
add_history (strdup (s));
return SCM_UNSPECIFIED;
#define FUNC_NAME s_scm_read_history
{
SCM_VALIDATE_STRING (1,file);
- return SCM_NEGATE_BOOL(read_history (SCM_ROCHARS (file)));
+ return SCM_NEGATE_BOOL (read_history (SCM_STRING_CHARS (file)));
}
#undef FUNC_NAME
#define FUNC_NAME s_scm_write_history
{
SCM_VALIDATE_STRING (1,file);
- return SCM_NEGATE_BOOL(write_history (SCM_ROCHARS (file)));
+ return SCM_NEGATE_BOOL (write_history (SCM_STRING_CHARS (file)));
}
#undef FUNC_NAME
char *s;
SCM ans;
SCM_VALIDATE_STRING (1,text);
- SCM_COERCE_SUBSTR (text);
- s = filename_completion_function (SCM_CHARS (text), SCM_NFALSEP (continuep));
+ SCM_STRING_COERCE_0TERMINATION_X (text);
+ s = filename_completion_function (SCM_STRING_CHARS (text), SCM_NFALSEP (continuep));
ans = scm_makfrom0str (s);
free (s);
return ans;
scm_misc_error (s_scm_readline,
"Completion function returned bogus value: %S",
SCM_LIST1 (res));
- SCM_COERCE_SUBSTR (res);
- return strdup (SCM_CHARS (res));
+ SCM_STRING_COERCE_0TERMINATION_X (res);
+ return strdup (SCM_STRING_CHARS (res));
}
}