diff options
author | nijtmans <nijtmans> | 2010-07-01 21:28:15 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2010-07-01 21:28:15 (GMT) |
commit | abb430245e8a99364bb0ddbca7f85c8adb62d36f (patch) | |
tree | 6504f41b881faedff35589b0b480a44e4042fb92 /tools/eolFix.tcl | |
parent | e10b292750a32db464a69efbd938795b6f2c8d52 (diff) | |
download | tcl-abb430245e8a99364bb0ddbca7f85c8adb62d36f.zip tcl-abb430245e8a99364bb0ddbca7f85c8adb62d36f.tar.gz tcl-abb430245e8a99364bb0ddbca7f85c8adb62d36f.tar.bz2 |
[Bug #3020677] wish can't link reg1.2
formatting, spacing, cleanup unused variables
Diffstat (limited to 'tools/eolFix.tcl')
-rw-r--r-- | tools/eolFix.tcl | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/tools/eolFix.tcl b/tools/eolFix.tcl index ed3ec7c..3f35ed4 100644 --- a/tools/eolFix.tcl +++ b/tools/eolFix.tcl @@ -13,16 +13,18 @@ namespace eval ::EOL { variable outMode crlf } -proc EOL::fix {filename {newfilename ""}} { +proc EOL::fix {filename {newfilename {}}} { variable outMode - if {![file exists $filename]} { return } + if {![file exists $filename]} { + return + } puts "EOL Fixing: $filename" file rename ${filename} ${filename}.o set fhnd [open ${filename}.o r] - if {$newfilename != ""} { + if {$newfilename ne ""} { set newfhnd [open ${newfilename} w] } else { set newfhnd [open ${filename} w] @@ -63,12 +65,12 @@ proc EOL::fixall {args} { } if {$tcl_interactive == 0 && $argc > 0} { - if {[string index [lindex $argv 0] 0] == "-"} { + if {[string index [lindex $argv 0] 0] eq "-"} { switch -- [lindex $argv 0] { - -cr { set ::EOL::outMode cr } - -crlf { set ::EOL::outMode crlf } - -lf { set ::EOL::outMode lf } - default { puts stderr "improper mode switch" ; exit 1 } + -cr {set ::EOL::outMode cr} + -crlf {set ::EOL::outMode crlf} + -lf {set ::EOL::outMode lf} + default {puts stderr "improper mode switch"; exit 1} } set argv [lrange $argv 1 end] } |