Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: notesnews 0.1 (unido 12/05/84); site unido.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!mcvax!unido!georg From: georg@unido.UUCP Newsgroups: net.lang.st80 Subject: bugfix in bs goody for printing clas Message-ID: Date: Mon, 1-Apr-85 13:26:00 EST Article-I.D.: unido.nf17400001 Posted: Mon Apr 1 13:26:00 1985 Date-Received: Sun, 7-Apr-85 06:36:36 EST Sender: notes@unido.UUCP Lines: 54 Nf-ID: #N:unido:17400001:000:1735 Nf-From: unido!georg Apr 1 16:26:00 1985 In the b2 goody for printing out classes in troff format there is a bug which causes an interrupt printing out methods with empty body. This is fixed in the following bugfix: Georg Heeg, University of Dortmund, West Germany georg@unido.UUCP 'From Smalltalk-80, version 2, of April 1, 1983 on 1 April 1985 at 14:15:21'! !ClassDescription methodsFor: 'fileIn/Out'! printOutMessage: aString on: aFileStream "Create troff ready file for the method aString" | sourceCode bodyStart inComment | sourceCode _ self sourceCodeAt: aString asSymbol. bodyStart _ sourceCode findString: '\' withCRs startingAt: 1. (bodyStart = 0) ifTrue:[self printOutMacro: 'MH' with: sourceCode on: aFileStream.] ifFalse:[self printOutMacro: 'MH' with: (sourceCode copyFrom: 1 to: (bodyStart - 1)) on: aFileStream.]. bodyStart = 0 ifTrue: [aFileStream tab; nextPutAll: '\(uaself'; cr; nextPutAll: '.ME'; cr. ^self]. inComment _ false. (sourceCode copyFrom: bodyStart + 1 to: sourceCode size) do: [:char | char = $^ ifTrue: [aFileStream nextPutAll: '\(ua'] ifFalse: [char = $\ ifTrue: [aFileStream nextPutAll: '\e'] ifFalse: [char = $~ ifTrue: [aFileStream nextPutAll: '\(ap'] ifFalse: [char = $_ ifTrue: [aFileStream nextPutAll: '\(<-'] ifFalse: [(char = $') | (char = $.) ifTrue: [aFileStream nextPutAll: '\&'; nextPut: char] ifFalse: [char = $" ifTrue: [aFileStream nextPutAll: (inComment ifTrue: ['"\fP'] ifFalse: ['\fI"']). inComment _ inComment not] ifFalse: [aFileStream nextPut: char]]]]]]]. (sourceCode at: sourceCode size) ~= Character cr ifTrue: [aFileStream cr]. aFileStream nextPutAll: '.ME'; cr! !