It is valid for STREAM-LINE-COLUMN to output NIL instead of an integer

This commit is contained in:
jjgarcia 2005-05-20 15:11:06 +00:00
parent fad06b21a0
commit 3af1590f08

View file

@ -2280,7 +2280,13 @@ file_column(cl_object strm)
BEGIN:
#ifdef ECL_CLOS_STREAMS
if (type_of(strm) == t_instance) {
return fixint(funcall(2, @'ext::stream-line-column', strm));
cl_object col = funcall(2, @'ext::stream-line-column', strm);
/* FIXME! The Gray streams specifies NIL is a valid value but means
* "unknown". Should we make it zero? */
if (col == Cnil)
return 0;
else
return fixnnint(col);
}
#endif
if (type_of(strm) != t_stream)