summaryrefslogtreecommitdiff
path: root/guile-readline/readline.c
diff options
context:
space:
mode:
authorDirk Herrmann <dirk@dirk-herrmanns-seiten.de>2000-11-24 10:38:57 +0000
committerDirk Herrmann <dirk@dirk-herrmanns-seiten.de>2000-11-24 10:38:57 +0000
commit379b35daaa0d13f9e77979b358cec0c17861d29e (patch)
tree179c1555a5bdebcfb64a74a5907fbe72dc2a1af4 /guile-readline/readline.c
parent08b5e6c31617be5dfc139891e177c482654730ef (diff)
downloadguile-379b35daaa0d13f9e77979b358cec0c17861d29e.tar.gz
* Fixed readline default input/output port parameter handling.
* Removed redundant SCM_N?IMP tests.
Diffstat (limited to 'guile-readline/readline.c')
-rw-r--r--guile-readline/readline.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/guile-readline/readline.c b/guile-readline/readline.c
index 228b42705..037bcf7a2 100644
--- a/guile-readline/readline.c
+++ b/guile-readline/readline.c
@@ -129,7 +129,7 @@ static SCM before_read;
static int
current_input_getc (FILE *in)
{
- if (promptp && SCM_NIMP (before_read))
+ if (promptp && !SCM_FALSEP (before_read))
{
scm_apply (before_read, SCM_EOL, SCM_EOL);
promptp = 0;
@@ -167,7 +167,7 @@ SCM_DEFINE (scm_readline, "%readline", 0, 4, 0,
if (!SCM_UNBNDP (text))
{
- if (!(SCM_NIMP (text) && SCM_STRINGP (text)))
+ if (!SCM_STRINGP (text))
{
--in_readline;
scm_wrong_type_arg (s_scm_readline, SCM_ARG1, text);
@@ -175,8 +175,8 @@ SCM_DEFINE (scm_readline, "%readline", 0, 4, 0,
SCM_STRING_COERCE_0TERMINATION_X (text);
}
- if (!((SCM_UNBNDP (inp) && SCM_NIMP (scm_cur_inp) && SCM_OPINFPORTP (inp))
- || (SCM_NIMP (inp) && SCM_OPINFPORTP (inp))))
+ if (!((SCM_UNBNDP (inp) && SCM_OPINFPORTP (scm_cur_inp))
+ || SCM_OPINFPORTP (inp)))
{
--in_readline;
scm_misc_error (s_scm_readline,
@@ -184,8 +184,8 @@ SCM_DEFINE (scm_readline, "%readline", 0, 4, 0,
SCM_EOL);
}
- if (!((SCM_UNBNDP (outp) && SCM_NIMP (scm_cur_outp) && SCM_OPINFPORTP (outp))
- || (SCM_NIMP (outp) && SCM_OPOUTFPORTP (outp))))
+ if (!((SCM_UNBNDP (outp) && SCM_OPINFPORTP (scm_cur_outp))
+ || SCM_OPOUTFPORTP (outp)))
{
--in_readline;
scm_misc_error (s_scm_readline,
@@ -302,13 +302,13 @@ scm_readline_init_ports (SCM inp, SCM outp)
if (SCM_UNBNDP (outp))
outp = scm_cur_outp;
- if (!(SCM_NIMP (inp) && SCM_OPINFPORTP (inp))) {
+ if (!SCM_OPINFPORTP (inp)) {
scm_misc_error (0,
"Input port is not open or not a file port",
SCM_EOL);
}
- if (!(SCM_NIMP (outp) && SCM_OPOUTFPORTP (outp))) {
+ if (!SCM_OPOUTFPORTP (outp)) {
scm_misc_error (0,
"Output port is not open or not a file port",
SCM_EOL);
@@ -400,7 +400,7 @@ completion_function (char *text, int continuep)
if (SCM_FALSEP (res))
return NULL;
- if (!(SCM_NIMP (res) && SCM_STRINGP (res)))
+ if (!SCM_STRINGP (res))
scm_misc_error (s_scm_readline,
"Completion function returned bogus value: %S",
SCM_LIST1 (res));