The Trunk: MorphicExtras-nice.86.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: MorphicExtras-nice.86.mcz

commits-2
Nicolas Cellier uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-nice.86.mcz

==================== Summary ====================

Name: MorphicExtras-nice.86
Author: nice
Time: 11 June 2010, 10:20:38.584 pm
UUID: 2ec50afe-7975-0a40-9727-f79c651a38fe
Ancestors: MorphicExtras-ar.85

Use nextLine to handle any case of in image LF leakage

=============== Diff against MorphicExtras-ar.85 ===============

Item was changed:
  ----- Method: EventRecorderMorph>>readFrom: (in category 'fileIn/Out') -----
  readFrom: aStream
  "Private"
+ | header |
+ header := aStream nextLine.
- | cr header |
- cr := Character cr.
- header := aStream upTo: cr.
  (header = 'Event Tape v1 BINARY') ifTrue:[^aStream fileInObjectAndCode].
  (header = 'Event Tape v1 ASCII') ifTrue:[^self readFromV1: aStream].
  "V0 had no header so guess"
  aStream reset.
  header first isDigit ifFalse:[^self convertV0Tape: (aStream fileInObjectAndCode)].
  ^self convertV0Tape: (self readFromV0: aStream).
  !

Item was changed:
  ----- Method: EventRecorderMorph>>readFromV0: (in category 'fileIn/Out') -----
  readFromV0: aStream
- | cr |
- cr := Character cr.
  ^Array streamContents:[:tStream | | evt line t lineStream |
  [aStream atEnd] whileFalse:
+ [line := aStream nextLine.
- [line := aStream upTo: cr.
  line isEmpty "Some MW tapes have an empty record at the end"
  ifFalse: [lineStream := ReadStream on: line.
  t := Integer readFrom: lineStream.
  [lineStream peek isLetter] whileFalse: [lineStream next].
  evt := MorphicEvent readFromObsolete: lineStream.
  tStream nextPut: t -> evt]]].!

Item was changed:
  ----- Method: EventRecorderMorph>>readFromV1: (in category 'fileIn/Out') -----
  readFromV1: aStream
- | cr |
- cr := Character cr.
  ^Array streamContents:[:tStream |
  [aStream atEnd] whileFalse:[
+ tStream nextPut: (MorphicEvent readFromString: aStream nextLine)]]!
- tStream nextPut: (MorphicEvent readFromString: (aStream upTo: cr))]]!