1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 14:00:21 +02:00

* ioext.c (scm_isatty_p): Accept any kind of data as argument. If

not a tty, return #f.
This commit is contained in:
Mikael Djurfeldt 1998-06-09 21:57:26 +00:00
parent 279ba8c035
commit 10ccfad75f
2 changed files with 5 additions and 1 deletions

View file

@ -1,5 +1,8 @@
1998-06-09 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
* ioext.c (scm_isatty_p): Accept any kind of data as argument. If
not a tty, return #f.
* regex-posix.c (scm_regexp_exec): Free malloced memory. (Thanks
to Julian Satchell and Roland Kaufmann.)

View file

@ -399,7 +399,8 @@ scm_isatty_p (port)
port = SCM_COERCE_OUTPORT (port);
SCM_ASSERT (SCM_NIMP (port) && SCM_OPFPORTP (port), port, SCM_ARG1, s_isatty);
if (!(SCM_NIMP (port) && SCM_OPFPORTP (port)))
return SCM_BOOL_F;
rv = fileno ((FILE *)SCM_STREAM (port));
if (rv == -1)
scm_syserror (s_isatty);