equal
deleted
inserted
replaced
167 (line notNil and:[line startsWith:'/*']) ifTrue:[ |
167 (line notNil and:[line startsWith:'/*']) ifTrue:[ |
168 [line notNil |
168 [line notNil |
169 and:[(line startsWith:'/*') or:[line startsWith:' *']]] whileTrue:[ |
169 and:[(line startsWith:'/*') or:[line startsWith:' *']]] whileTrue:[ |
170 line := aStream nextLine. |
170 line := aStream nextLine. |
171 ]. |
171 ]. |
|
172 ]. |
|
173 line notNil ifTrue:[ |
|
174 line := line withoutSeparators |
172 ]. |
175 ]. |
173 (line notNil and:[line startsWith:'"']) ifFalse:[ |
176 (line notNil and:[line startsWith:'"']) ifFalse:[ |
174 'XPM: format error (expected "ww hh nn mm)' errorPrintNL. |
177 'XPM: format error (expected "ww hh nn mm)' errorPrintNL. |
175 ^ nil |
178 ^ nil |
176 ]. |
179 ]. |
195 |index line color t word| |
198 |index line color t word| |
196 |
199 |
197 line := aStream nextLine. |
200 line := aStream nextLine. |
198 [line notNil and:[line startsWith:'/*']] whileTrue:[ |
201 [line notNil and:[line startsWith:'/*']] whileTrue:[ |
199 line := aStream nextLine. |
202 line := aStream nextLine. |
|
203 ]. |
|
204 line notNil ifTrue:[ |
|
205 line := line withoutSeparators |
200 ]. |
206 ]. |
201 (line notNil and:[line startsWith:'"']) ifFalse:[ |
207 (line notNil and:[line startsWith:'"']) ifFalse:[ |
202 'XPM: format error (expected color spec)' errorPrintNL. |
208 'XPM: format error (expected color spec)' errorPrintNL. |
203 ^ nil |
209 ^ nil |
204 ]. |
210 ]. |
330 1 to:height do:[:row | |
336 1 to:height do:[:row | |
331 line := aStream nextLine withoutSpaces. |
337 line := aStream nextLine withoutSpaces. |
332 [line notNil and:[line startsWith:'/*']] whileTrue:[ |
338 [line notNil and:[line startsWith:'/*']] whileTrue:[ |
333 line := aStream nextLine withoutSpaces. |
339 line := aStream nextLine withoutSpaces. |
334 ]. |
340 ]. |
|
341 line notNil ifTrue:[ |
|
342 line := line withoutSeparators |
|
343 ]. |
335 (line notNil and:[line startsWith:'"']) ifFalse:[ |
344 (line notNil and:[line startsWith:'"']) ifFalse:[ |
336 'XPM: format error (expected pixels)' errorPrintNL. |
345 'XPM: format error (expected pixels)' errorPrintNL. |
337 ^ nil |
346 ^ nil |
338 ]. |
347 ]. |
339 srcIndex := 2. |
348 srcIndex := 2. |
363 " |
372 " |
364 |
373 |
365 "Created: 24.9.1995 / 06:20:06 / claus" |
374 "Created: 24.9.1995 / 06:20:06 / claus" |
366 "Modified: 24.9.1995 / 07:07:33 / claus" |
375 "Modified: 24.9.1995 / 07:07:33 / claus" |
367 "Modified: 5.7.1996 / 17:27:59 / stefan" |
376 "Modified: 5.7.1996 / 17:27:59 / stefan" |
368 "Modified: 1.3.1997 / 22:22:53 / cg" |
377 "Modified: 1.3.1997 / 23:14:51 / cg" |
369 ! ! |
378 ! ! |
370 |
379 |
371 !XPMReader methodsFor:'writing to a file'! |
380 !XPMReader methodsFor:'writing to a file'! |
372 |
381 |
373 colorNameOf:aColor |
382 colorNameOf:aColor |
479 ! ! |
488 ! ! |
480 |
489 |
481 !XPMReader class methodsFor:'documentation'! |
490 !XPMReader class methodsFor:'documentation'! |
482 |
491 |
483 version |
492 version |
484 ^ '$Header: /cvs/stx/stx/libview2/XPMReader.st,v 1.26 1997-03-01 21:54:52 cg Exp $' |
493 ^ '$Header: /cvs/stx/stx/libview2/XPMReader.st,v 1.27 1997-03-01 22:15:10 cg Exp $' |
485 ! ! |
494 ! ! |
486 XPMReader initialize! |
495 XPMReader initialize! |