diff options
author | Dirk Herrmann <dirk@dirk-herrmanns-seiten.de> | 2000-11-24 10:24:04 +0000 |
---|---|---|
committer | Dirk Herrmann <dirk@dirk-herrmanns-seiten.de> | 2000-11-24 10:24:04 +0000 |
commit | 08b5e6c31617be5dfc139891e177c482654730ef (patch) | |
tree | c77281402451e1981189ca60e5d8143a5557d515 | |
parent | 5b9eb8ae1687cbbb2bbf2f74be7eaef790851160 (diff) | |
download | guile-08b5e6c31617be5dfc139891e177c482654730ef.tar.gz |
* Don't uses anything deprecated any more.
-rw-r--r-- | guile-readline/ChangeLog | 10 | ||||
-rw-r--r-- | guile-readline/readline.c | 20 |
2 files changed, 20 insertions, 10 deletions
diff --git a/guile-readline/ChangeLog b/guile-readline/ChangeLog index cdb1174ca..a26018ea2 100644 --- a/guile-readline/ChangeLog +++ b/guile-readline/ChangeLog @@ -1,3 +1,13 @@ +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 diff --git a/guile-readline/readline.c b/guile-readline/readline.c index 8d6f6fc3c..228b42705 100644 --- a/guile-readline/readline.c +++ b/guile-readline/readline.c @@ -172,7 +172,7 @@ SCM_DEFINE (scm_readline, "%readline", 0, 4, 0, --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)) @@ -256,7 +256,7 @@ internal_readline (SCM text) { 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); @@ -328,9 +328,9 @@ SCM_DEFINE (scm_add_history, "add-history", 1, 0, 0, { 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; @@ -344,7 +344,7 @@ SCM_DEFINE (scm_read_history, "read-history", 1, 0, 0, #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 @@ -355,7 +355,7 @@ SCM_DEFINE (scm_write_history, "write-history", 1, 0, 0, #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 @@ -368,8 +368,8 @@ SCM_DEFINE (scm_filename_completion_function, "filename-completion-function", 2, 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; @@ -404,8 +404,8 @@ completion_function (char *text, int continuep) 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)); } } |