bugGNU Common Lisp - Bugs: bug #14820, READ-CHAR-NO-HANG is broken

 
 

bug #14820: READ-CHAR-NO-HANG is broken

Submitted by:  None
Submitted on:  Wed 19 Oct 2005 05:22:06 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 20 Dec 2005 02:57:25 PM UTC, comment #2:

Greetings! OK this appears fixed now in 2.6.8pre and cvs head, though there is a separate error reporting issue in the former. Thanks for the report!

Camm Maguire <camm>
Project Administrator
Fri 21 Oct 2005 04:47:21 PM UTC, comment #1:

Greetings!

OK, this should be fixed with the following, which I am now committing to branch Version_2_6_8pre:

--- read.d 2005-01-15 16:28:50.000000000 +0000
+++ ../../../6.7/gcl-2.6.7/o/read.d 2005-10-21 16:37:46.000000000 +0000
@@ -2259,9 +2259,12 @@
else if (strm == Ct)
strm = symbol_value(sLAterminal_ioA);
check_type_stream(&strm);
- if (!listen_stream(strm))
- /* Incomplete! */
- @(return Cnil)
+ if (!listen_stream(strm)) {
+ if (eof_errorp == Cnil)
+ @(return eof_value)
+ else
+ end_of_stream(strm);
+ }
@(return `read_char(strm)`)
@)

Could someone please test this on Windows?

take care,

Camm Maguire <camm>
Project Administrator
Wed 19 Oct 2005 05:22:06 AM UTC, original submission:

READ-CHAR-NO-HANG is broken.

GCL 2.6.7 / Linux: READ-CHAR-NO-HANG always returns NIL (even if EOF-ERROR-P is T or EOF-VALUE is nonnull; should throw an exception in the first case and return EOF-VALUE in the second).

GCL 2.6.7 / Windows: READ-CHAR-NO-HANG always throws an exception (even if EOF-ERROR-P is NIL or EOF-VALUE is nonnull; should return NIL in the first case and return EOF-VALUE in the second).

Example (GCL 2.6.7 / Linux):

"empty-file" is a file which exists and contains 0 bytes.

(with-open-file (st "empty-file") (read-char-no-hang st t)) => NIL
(should throw an exception)

(with-open-file (st "empty-file") (read-char-no-hang st nil 'eof)) => NIL
(should be EOF)

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 4 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Tue 20 Dec 2005 02:57:25 PM UTCcammStatusNone=>Fixed
  Open/ClosedOpen=>Closed
Fri 21 Oct 2005 04:47:21 PM UTCcammCarbon-Copy-=>Added mjthomas
  Carbon-Copy-=>Added -unavailable-

Back to the top


Powered by Savane 3.1-cleanup1