[armedbear-cvs] r11430 - branches/open-external-format/src/org/armedbear/lisp

Erik Huelsmann ehuelsmann at common-lisp.net
Sat Dec 6 21:13:52 UTC 2008


Author: ehuelsmann
Date: Sat Dec  6 21:13:50 2008
New Revision: 11430

Log:
Resolve 2 FIXMEs.

* Stream.java:Stream::_writeChars(): Don't try to access characters before 'start'.

* StringInputStream.java:StringInputStream(),
* StringOutputStream.java:StringOutputStream(): Use RAW eol style, as per the FIXME.

Modified:
   branches/open-external-format/src/org/armedbear/lisp/Stream.java
   branches/open-external-format/src/org/armedbear/lisp/StringInputStream.java
   branches/open-external-format/src/org/armedbear/lisp/StringOutputStream.java

Modified: branches/open-external-format/src/org/armedbear/lisp/Stream.java
==============================================================================
--- branches/open-external-format/src/org/armedbear/lisp/Stream.java	(original)
+++ branches/open-external-format/src/org/armedbear/lisp/Stream.java	Sat Dec  6 21:13:50 2008
@@ -1945,7 +1945,9 @@
         }
         
         writer.write(chars, start, end - start);
-        lastChar = chars[end-1];
+        if (start < end)
+          lastChar = chars[end-1];
+        
         int index = -1;
         for (int i = end; i-- > start;)
           {

Modified: branches/open-external-format/src/org/armedbear/lisp/StringInputStream.java
==============================================================================
--- branches/open-external-format/src/org/armedbear/lisp/StringInputStream.java	(original)
+++ branches/open-external-format/src/org/armedbear/lisp/StringInputStream.java	Sat Dec  6 21:13:50 2008
@@ -54,8 +54,7 @@
     {
         elementType = Symbol.CHARACTER;
         setExternalFormat(keywordDefault);
-        //###FIXME: we actually want RAW here
-        eolStyle = EolStyle.LF;
+        eolStyle = EolStyle.RAW;
 
         this.start = start;
         

Modified: branches/open-external-format/src/org/armedbear/lisp/StringOutputStream.java
==============================================================================
--- branches/open-external-format/src/org/armedbear/lisp/StringOutputStream.java	(original)
+++ branches/open-external-format/src/org/armedbear/lisp/StringOutputStream.java	Sat Dec  6 21:13:50 2008
@@ -47,8 +47,7 @@
     private StringOutputStream(LispObject elementType)
     {
         this.elementType = elementType;
-        //###FIXME we actually want RAW here
-        this.eolStyle = EolStyle.LF;
+        this.eolStyle = EolStyle.RAW;
         initAsCharacterOutputStream(stringWriter = new StringWriter());
     }
 




More information about the armedbear-cvs mailing list