allow lines to begin with spaces
authorClaus Gittinger <cg@exept.de>
Sat, 01 Mar 1997 23:15:10 +0100
changeset 471 350583677b5b
parent 470 4709c3f524cd
child 472 40eaf3d339c9
allow lines to begin with spaces
XPMReader.st
--- a/XPMReader.st	Sat Mar 01 22:54:52 1997 +0100
+++ b/XPMReader.st	Sat Mar 01 23:15:10 1997 +0100
@@ -170,6 +170,9 @@
             line := aStream nextLine.
         ].
     ].
+    line notNil ifTrue:[
+        line := line withoutSeparators
+    ].
     (line notNil and:[line startsWith:'"']) ifFalse:[
         'XPM: format error (expected "ww hh nn mm)' errorPrintNL.
         ^ nil
@@ -198,6 +201,9 @@
         [line notNil and:[line startsWith:'/*']] whileTrue:[
             line := aStream nextLine.
         ].
+        line notNil ifTrue:[
+            line := line withoutSeparators
+        ].
         (line notNil and:[line startsWith:'"']) ifFalse:[
             'XPM: format error (expected color spec)' errorPrintNL.
             ^ nil
@@ -332,6 +338,9 @@
         [line notNil and:[line startsWith:'/*']] whileTrue:[
             line := aStream nextLine withoutSpaces.
         ].
+        line notNil ifTrue:[
+            line := line withoutSeparators
+        ].
         (line notNil and:[line startsWith:'"']) ifFalse:[
             'XPM: format error (expected pixels)' errorPrintNL.
             ^ nil
@@ -365,7 +374,7 @@
     "Created: 24.9.1995 / 06:20:06 / claus"
     "Modified: 24.9.1995 / 07:07:33 / claus"
     "Modified: 5.7.1996 / 17:27:59 / stefan"
-    "Modified: 1.3.1997 / 22:22:53 / cg"
+    "Modified: 1.3.1997 / 23:14:51 / cg"
 ! !
 
 !XPMReader methodsFor:'writing to a file'!
@@ -481,6 +490,6 @@
 !XPMReader class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/XPMReader.st,v 1.26 1997-03-01 21:54:52 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/XPMReader.st,v 1.27 1997-03-01 22:15:10 cg Exp $'
 ! !
 XPMReader initialize!