diff options
author | welch <welch> | 1998-11-11 02:39:29 (GMT) |
---|---|---|
committer | welch <welch> | 1998-11-11 02:39:29 (GMT) |
commit | f19fadb5f02ad1e17d94930901a7c55de98c2e1f (patch) | |
tree | 36d2afa8e07346b4567a7c5b583147d2742c723e /library/ldAout.tcl | |
parent | 1cc0d594c3e31cfb905ae0ccf1c05d262ea6e6cc (diff) | |
download | tcl-f19fadb5f02ad1e17d94930901a7c55de98c2e1f.zip tcl-f19fadb5f02ad1e17d94930901a7c55de98c2e1f.tar.gz tcl-f19fadb5f02ad1e17d94930901a7c55de98c2e1f.tar.bz2 |
Removed lint (thanks, procheck!)
Diffstat (limited to 'library/ldAout.tcl')
-rw-r--r-- | library/ldAout.tcl | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/library/ldAout.tcl b/library/ldAout.tcl index 11d301e..ad12624 100644 --- a/library/ldAout.tcl +++ b/library/ldAout.tcl @@ -18,7 +18,7 @@ # its .o file placed before all others in the command; then # "ld" is executed to bind the objects together. # -# RCS: @(#) $Id: ldAout.tcl,v 1.2 1998/09/14 18:40:03 stanton Exp $ +# RCS: @(#) $Id: ldAout.tcl,v 1.3 1998/11/11 02:39:31 welch Exp $ # # Copyright (c) 1995, by General Electric Company. All rights reserved. # @@ -98,9 +98,9 @@ proc tclLdAout {{cc {}} {shlib_suffix {}} {shlib_cflags none}} { } elseif {![string compare $a -o]} { set minusO 1 } - if [regexp {^-[lL]} $a] { + if {[regexp {^-[lL]} $a]} { lappend libraries $a - if [regexp {^-L} $a] { + if {[regexp {^-L} $a]} { lappend libdirs [string range $a 2 end] } } elseif {$seenDotO} { @@ -116,10 +116,10 @@ proc tclLdAout {{cc {}} {shlib_suffix {}} {shlib_cflags none}} { set libs {} foreach lib $libraries { - if [regexp {^-l} $lib] { + if {[regexp {^-l} $lib]} { set lname [string range $lib 2 end] foreach dir $libdirs { - if [file exists [file join $dir lib${lname}_G0.a]] { + if {[file exists [file join $dir lib${lname}_G0.a]]} { set lname ${lname}_G0 break } @@ -137,22 +137,22 @@ proc tclLdAout {{cc {}} {shlib_suffix {}} {shlib_cflags none}} { error "-o option must be supplied to link a Tcl load module" } set m [file tail $outputFile] - if [regexp {\.a$} $outputFile] { + if {[regexp {\.a$} $outputFile]} { set shlib_suffix .a } else { set shlib_suffix "" } - if [regexp {\..*$} $outputFile match] { - set l [expr [string length $m] - [string length $match]] + if {[regexp {\..*$} $outputFile match]} { + set l [expr {[string length $m] - [string length $match]}] } else { error "Output file does not appear to have a suffix" } - set modName [string tolower [string range $m 0 [expr $l-1]]] - if [regexp {^lib} $modName] { + set modName [string tolower [string range $m 0 [expr {$l-1}]]] + if {[regexp {^lib} $modName]} { set modName [string range $modName 3 end] } - if [regexp {[0-9\.]*(_g0)?$} $modName match] { - set modName [string range $modName 0 [expr [string length $modName]-[string length $match]-1]] + if {[regexp {[0-9\.]*(_g0)?$} $modName match]} { + set modName [string range $modName 0 [expr {[string length $modName]-[string length $match]-1}]] } set modName "[string toupper [string index $modName 0]][string range $modName 1 end]" @@ -160,7 +160,7 @@ proc tclLdAout {{cc {}} {shlib_suffix {}} {shlib_cflags none}} { set f [open $nmCommand r] while {[gets $f l] >= 0} { - if [regexp {T[ ]*_?([A-Z][a-z0-9_]*_(Safe)?Init(__FP10Tcl_Interp)?)$} $l trash symbol] { + if {[regexp {T[ ]*_?([A-Z][a-z0-9_]*_(Safe)?Init(__FP10Tcl_Interp)?)$} $l trash symbol]} { if {![regexp {_?([A-Z][a-z0-9_]*_(Safe)?Init)} $symbol trash s]} { set s $symbol } @@ -219,10 +219,10 @@ proc tclLdAout {{cc {}} {shlib_suffix {}} {shlib_cflags none}} { set ldCommand "ar cr $outputFile" regsub { -o} $tail {} tail } else { - set ldCommand ld - foreach item $head { - lappend ldCommand $item - } + set ldCommand ld + foreach item $head { + lappend ldCommand $item + } } lappend ldCommand tcl$modName.o foreach item $tail { |