XBMReader.st
changeset 1506 60e56746dce6
parent 1495 100e4e782f71
child 1510 4e0133eec046
equal deleted inserted replaced
1505:c7cd2082381b 1506:60e56746dce6
   227     [lineString notNil and:[lineString isEmpty]] whileTrue:[
   227     [lineString notNil and:[lineString isEmpty]] whileTrue:[
   228         lineString := aStream nextLine.
   228         lineString := aStream nextLine.
   229     ].
   229     ].
   230 
   230 
   231     [lineString notNil] whileTrue:[
   231     [lineString notNil] whileTrue:[
   232         index := 1.
   232         dstIndex <= data size ifTrue:[
   233         [index ~~ 0] whileTrue:[
   233             index := 1.
   234             index := lineString indexOf:$x startingAt:index.
   234             [index ~~ 0] whileTrue:[
   235             (index ~~ 0) ifTrue:[
   235                 dstIndex <= data size ifTrue:[
   236                 index := index + 1.
   236                     index := lineString indexOf:$x startingAt:index.
   237                 hi := (lineString at:index) digitValue.
   237                     (index ~~ 0) ifTrue:[
   238                 index := index + 1.
   238                         index := index + 1.
   239                 lo := (lineString at:index) digitValue.
   239                         hi := (lineString at:index) digitValue.
   240                 val := (hi bitShift:4) bitOr:lo.
   240                         index := index + 1.
   241                 data at:dstIndex put:(reverseBits at:(val + 1)).
   241                         lo := (lineString at:index) digitValue.
   242                 dstIndex := dstIndex + 1
   242                         val := (hi bitShift:4) bitOr:lo.
   243             ]
   243                         data at:dstIndex put:(reverseBits at:(val + 1)).
       
   244                         dstIndex := dstIndex + 1
       
   245                     ]
       
   246                 ] ifFalse:[
       
   247                     index := 0. "/ break loop
       
   248                 ] 
       
   249             ].
   244         ].
   250         ].
   245         lineString := aStream nextLine.
   251         lineString := aStream nextLine.
   246         [lineString notNil and:[lineString isEmpty]] whileTrue:[
   252         [lineString notNil and:[lineString isEmpty]] whileTrue:[
   247             lineString := aStream nextLine.
   253             lineString := aStream nextLine.
   248         ].
   254         ].
   343 ! !
   349 ! !
   344 
   350 
   345 !XBMReader class methodsFor:'documentation'!
   351 !XBMReader class methodsFor:'documentation'!
   346 
   352 
   347 version
   353 version
   348     ^ '$Header: /cvs/stx/stx/libview2/XBMReader.st,v 1.42 2001-08-22 16:38:44 cg Exp $'
   354     ^ '$Header: /cvs/stx/stx/libview2/XBMReader.st,v 1.43 2001-09-13 09:01:37 cg Exp $'
   349 ! !
   355 ! !
   350 XBMReader initialize!
   356 XBMReader initialize!