This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Bug in (read-line)


| Actually, you'll still get pretty much the same results with the test,
| since everything but the buffer is still treating things as a char (so
| you have to wonder; wholesale change to unsigned char for
| strings/characters, or a new type of string? 

It did work for me:

(with-input-from-string (string #\377)  (lambda ()
... (write (peek-char))
... (read-char)))
#\377#\377

Maybe I fixed something else too, but I think it was just unsigning
the char * and char fields in the port table.  The rest of the code 
seems to be OK because it's transferring chars as ints where it matters.
It was the cast from signed char to int that was causing the problem.