1 Nov 2006 09:14
Re: ecl_stream_to_handle bug? (Was: Latest changes)
2006/10/30, Dave Roberts <dave@...>: > Juan Jose Garcia-Ripoll wrote: > > - New C functions: ecl_stream_to_handle(), ecl_base_char_code(), > > ecl_type_error(). > > I'm all for ecl_stream_to_handle() (very handy). But I'm having a > problem under SLIME [...] > Calling this in SLIME for *standard-input* and *standard-output* result > in -1, however: Well, the thing is that this routine does not know how to deal with sockets and sllime does communicate via sockets with ECL. Juanjo ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
In your case you probably do not even need do it. Your function must
check first whether the input/output stream is a CLOS object and
return NIL in that case because isatty() does not make a sense on Gray
streams.
Juanjo
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> In your case you probably do not even need do it. Your function must
> check first whether the input/output stream is a CLOS object and
> return NIL in that case because isatty() does not make a sense on Gray
> streams.
Actually, I'd pass the file handle to isatty. Something like:
(if (isatty (ecl_stream_to_handle *standard-input*))
...set terminal for raw IO...
...else just use readline...)
-- Dave
RSS Feed