From: SourceForge.net <no...@so...> - 2005-06-21 18:01:54
|
Bugs item #1215385, was opened at 2005-06-05 20:28 Message generated for change (Comment added) made by sds You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101355&aid=1215385&group_id=1355 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: clisp Group: lisp error Status: Open Resolution: None Priority: 5 Submitted By: James Amundson (amundson) Assigned to: Sam Steingold (sds) Summary: read-char-no-hang broken on cygwin Initial Comment: Hi, I am using clisp 2.33.1 on cygwin. (I realize that the current version of clisp is 2.33.2, but 2.33.1 is what is listed as "current" on cygwin.) When I try to read-char-no-hang from a file, I find that some characters are missed. I do not see this behavior on Linux using clisp 2.33.2. Here is an example demonstrating the bug. The following code uses read-char to copy the file foon.mac to fhe file tmp.out, then uses read-char-no-hang to copy the file foon.mac to the file tmp-no-hang.out. ------------------------------------------------------------------------ (defun readit-no-hang (&optional (stream *standard-input*)) (let ((out-stream (open "tmp-no-hang.out" :direction :output :if-exists :overwrite :if-does-not-exist :create :external-format :unix))) (do ((ch (read-char-no-hang stream nil 'eof) (read-char-no-hang stream nil 'eof))) ((eql ch 'eof) t) (if ch (write-char ch out-stream) (format t "not hanging!~%"))) (close out-stream))) (defun readit (&optional (stream *standard-input*)) (let ((out-stream (open "tmp.out" :direction :output :if-exists :overwrite :if-does-not-exist :create :external-format :unix))) (do ((ch (read-char stream nil 'eof) (read-char stream nil 'eof))) ((eql ch 'eof) t) (write-char ch out-stream)) (close out-stream))) (readit (open "foon.mac")) (readit-no-hang (open "foon.mac")) ------------------------------------------------------------------------ The file foon.mac contains the line abcdefghijklmnopqrstuvwxyz; repeated 1642 times. (It's just a random file I created for testing.) In all cases (cygwin and Linux) tmp.out and foon.mac are identical. On cygwin, however, tmp-no-hang.out and foon.mac differ: |abacus3>diff tmp-no-hang.out foon.mac 1d0 < bcdefghijklmnopqrstuvwxyz; 147d145 < abcdefghiklmnopqrstuvwxyz; 293d290 < abcdefghijklmnopqrtuvwxyz; 439d435 < abcdefghijklmnopqrstuvwxyz;abcdefghijklmnopqrstuvwxyz; 585d580 < abcdefghjklmnopqrstuvwxyz; 731d725 < abcdefghijklmnopqstuvwxyz; 877d870 < abcdefghijklmnopqrstuvwxyz 1024d1016 < abcdefgijklmnopqrstuvwxyz; 1170d1161 < abcdefghijklmnoprstuvwxyz; 1316d1306 < abcdefghijklmnopqrstuvwxy; 1463d1452 < abcdefhijklmnopqrstuvwxyz; 1609c1598,1610 < abcdefghijklmnoqrstuvwxyz; --- > abcdefghijklmnopqrstuvwxyz; > abcdefghijklmnopqrstuvwxyz; > abcdefghijklmnopqrstuvwxyz; > abcdefghijklmnopqrstuvwxyz; > abcdefghijklmnopqrstuvwxyz; > abcdefghijklmnopqrstuvwxyz; > abcdefghijklmnopqrstuvwxyz; > abcdefghijklmnopqrstuvwxyz; > abcdefghijklmnopqrstuvwxyz; > abcdefghijklmnopqrstuvwxyz; > abcdefghijklmnopqrstuvwxyz; > abcdefghijklmnopqrstuvwxyz; > abcdefghijklmnopqrstuvwxyz; |abacus3> Sadly, this bug causes the test suite in the cvs version of Maxima to fail horribly. --Jim Amundson ---------------------------------------------------------------------- >Comment By: Sam Steingold (sds) Date: 2005-06-21 13:56 Message: Logged In: YES user_id=5735 (I mean, I cannot reproduce this with the current cvs head - please try it!) ---------------------------------------------------------------------- Comment By: Sam Steingold (sds) Date: 2005-06-21 13:55 Message: Logged In: YES user_id=5735 I cannot reproduce this: $ ./clisp ../../bugs/rcnh.lisp $ cmp ../../bugs/foon.mac tmp.out $ cmp ../../bugs/foon.mac tmp-no-hang.out $ ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101355&aid=1215385&group_id=1355 |