--- a/DiffListUtility.st Fri Feb 01 16:13:02 2013 +0100
+++ b/DiffListUtility.st Fri Feb 01 16:13:18 2013 +0100
@@ -59,12 +59,6 @@
You can change this via the diffCommandTemplate"
DiffCommandTemplate notNil ifTrue:[ ^ DiffCommandTemplate ].
-
- OperatingSystem isMSDOSlike ifTrue:[
- (OperatingSystem canExecuteCommand:'diff') ifFalse:[
- 'DiffTextView [warning]: no diff command found (please download and unzip "UnxUtils.zip" from "unxutils.sourceforge.net")' infoPrintCR.
- ].
- ].
^ UserPreferences current externalDiffCommandTemplate
!
@@ -89,16 +83,20 @@
(line includes:Character return) ifTrue: [
(line endsWith:Character return) ifTrue:[
lOut := line copyWithoutLast:1.
- ] ifFalse:[
- i := line indexOf:Character return.
- (line at:i+1) == Character nl ifTrue:[
- "/ crnl endings
- lOut := line copyReplaceString:(String crlf) withString:(String lf).
- ] ifFalse:[
- "/ cr endings
- lOut := line copyReplaceAll:Character return with:Character nl.
- ].
+ ].
+ ] ifFalse:[
+ (line endsWith:(String crlf)) ifTrue: [
+ lOut := line copyWithoutLast:2.
]
+"/ i := line indexOf:Character return.
+"/ (line at:i+1) == Character nl ifTrue:[
+"/ "/ crnl endings
+"/ lOut := line copyReplaceString:(String crlf) withString:(String lf).
+"/ ] ifFalse:[
+"/ "/ cr endings
+"/ lOut := line copyReplaceAll:(Character return) with:Character nl.
+"/ ].
+"/ ]
].
lOut isWideString ifTrue:[
(lOut first = (Character value:16rFEFF)) ifTrue:[
@@ -163,7 +161,7 @@
stream := PipeStream readingFrom:diffCmd.
stream isNil ifTrue:[
- stream := PipeStream readingFrom:('support' , Filename separator , diffCmd).
+ stream := PipeStream readingFrom:('support' asFilename / diffCmd).
stream isNil ifTrue:[
self error:'cannot execute diff' mayProceed:true.
^ nil.
@@ -208,7 +206,11 @@
!DiffListUtility class methodsFor:'documentation'!
+version
+ ^ '$Header: /cvs/stx/stx/libtool/DiffListUtility.st,v 1.6 2013-02-01 15:13:18 cg Exp $'
+!
+
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/DiffListUtility.st,v 1.5 2013-02-01 13:44:14 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/DiffListUtility.st,v 1.6 2013-02-01 15:13:18 cg Exp $'
! !