From 3af1590f08a7d3a33c90c2cf7e12e92aac5f321a Mon Sep 17 00:00:00 2001 From: jjgarcia Date: Fri, 20 May 2005 15:11:06 +0000 Subject: [PATCH] It is valid for STREAM-LINE-COLUMN to output NIL instead of an integer --- src/c/file.d | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/c/file.d b/src/c/file.d index 784cb294b..33ac42594 100644 --- a/src/c/file.d +++ b/src/c/file.d @@ -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)