From: <log...@gm...> - 2008-12-05 22:05:27
|
Diff format of the previous email > Just a troublcshooting note: this fixes for windows .. However of course it almost reverts the code back to the trunk state. [root@titan trunk-diff]# svn diff src/org/armedbear/lisp/Stream.java Index: src/org/armedbear/lisp/Stream.java =================================================================== --- src/org/armedbear/lisp/Stream.java (revision 11418) +++ src/org/armedbear/lisp/Stream.java (working copy) @@ -1869,13 +1869,19 @@ * @param c * @throws org.armedbear.lisp.ConditionThrowable */ + int lastChar = -1; public void _writeChar(char c) throws ConditionThrowable { try { if (c == '\n') { - if (eolStyle == EolStyle.CRLF) - writer.write("\r\n"); + if (eolStyle == EolStyle.CRLF && lastChar!='\r') { + if (!Utilities.isPlatformWindows) //they are non windows but have specificed the CrLF so we obey + writer.write("\r\n"); + else + writer.write(eolChar); // this is delaying the win32 problem but passes the tests + + } else writer.write(eolChar); @@ -1883,6 +1889,8 @@ charPos = 0; } else { writer.write(c); + //for EolStyle.CR + if (eolChar==c) charPos = 0; else ++charPos; } } @@ -1895,6 +1903,7 @@ { error(new StreamError(this, e)); } + lastChar = c; } /** Writes a series of characters in the underlying stream, @@ -1915,7 +1924,7 @@ //###FIXME: the number of writes can be greatly reduced by // writing the space between newlines as chunks. _writeChar(chars[i]); - + return; // because each _writeChar(char) did all to positional updates :) } else writer.write(chars, start, end - start); [root@titan trunk-diff]# |