summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authordas <das@noemail.net>2003-05-14 19:21:20 (GMT)
committerdas <das@noemail.net>2003-05-14 19:21:20 (GMT)
commit12c2ff9d30314e4383f8d3735ab39ada802b4429 (patch)
tree18a23b38b5ab18b3714c78cd1f0f131855938b1f /tools
parentf13a73e097e9538aad65fa5be146d83d35f11d6c (diff)
downloadtcl-12c2ff9d30314e4383f8d3735ab39ada802b4429.zip
tcl-12c2ff9d30314e4383f8d3735ab39ada802b4429.tar.gz
tcl-12c2ff9d30314e4383f8d3735ab39ada802b4429.tar.bz2
Implementation of TIP 118:
* generic/tclFCmd.c (TclFileAttrsCmd): return the list of attributes that can be retrieved without error for a given file, instead of aborting the whole command when any error occurs. * unix/tclUnixFCmd.c: added support for new file attributes and for copying Mac OS X file attributes & resource fork during [file copy]. * generic/tclInt.decls: added declarations of new external commands needed by new file attributes support in tclUnixFCmd.c. * macosx/tclMacOSXFCmd.c (new): Mac OS X specific implementation of new file attributes and of attribute & resource fork copying. * mac/tclMacFCmd.c: added implementation of -rsrclength attribute & fixes to other attributes for consistency with OSX implementation. * mac/tclMacResource.c: fixes to OSType handling. * doc/file.n: documentation of [file attributes] changes. * unix/configure.in: check for APIs needed by new file attributes. * unix/Makefile.in: * unix/tcl.m4: added new platform specifc tclMacOSXFCmd.c source. * unix/configure: * generic/tclStubInit.c: * generic/tclIntPlatDecls.h: regen. * tools/genStubs.tcl: fixes to completely broken code trying to prevent overlap of "aqua", "macosx", "x11" and "unix" stub entries. * tests/unixFCmd.test: added tests of -readonly attribute. * tests/macOSXFCmd.test (new): tests of macosx file attributes and of preservation of attributes & resource fork during [file copy]. * tests/macFCmd.test: restore -readonly attribute of test dir, as otherwise its removal can fail on unices supporting -readonly. FossilOrigin-Name: a25df0d3d994f84ae358d728b146f05dae415a83
Diffstat (limited to 'tools')
-rw-r--r--tools/genStubs.tcl53
1 files changed, 29 insertions, 24 deletions
diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl
index 9911fd2..36e17db 100644
--- a/tools/genStubs.tcl
+++ b/tools/genStubs.tcl
@@ -8,7 +8,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: genStubs.tcl,v 1.14 2003/03/19 21:58:01 dgp Exp $
+# RCS: @(#) $Id: genStubs.tcl,v 1.15 2003/05/14 19:21:25 das Exp $
package require Tcl 8
@@ -631,7 +631,8 @@ proc genStubs::forAllStubs {name slotProc onAll textVar \
# emit duplicate stubs entries for the two.
#
if {[info exists stubs($name,aqua,$i)]
- && ![info exists stubs($name,macosx,$i)]} {
+ && ![info exists stubs($name,macosx,$i)]
+ && ![info exists stubs($name,unix,$i)]} {
append text [addPlatformGuard aqua \
[$slotProc $name $stubs($name,aqua,$i) $i]]
set emit 1
@@ -670,48 +671,52 @@ proc genStubs::forAllStubs {name slotProc onAll textVar \
append text [addPlatformGuard $plat $temp]
}
}
- # Again, make sure you don't duplicate entries for macosx & aqua.
- if {[info exists stubs($name,aqua,lastNum)]
- && ![info exists stubs($name,macosx,lastNum)]} {
+ if {[info exists stubs($name,unix,lastNum)]} {
+ set afterUnixNum [expr $stubs($name,unix,lastNum) + 1]
+ } else {
+ set afterUnixNum 0
+ }
+ if {[info exists stubs($name,aqua,lastNum)]} {
set lastNum $stubs($name,aqua,lastNum)
set temp {}
- for {set i 0} {$i <= $lastNum} {incr i} {
- if {![info exists stubs($name,aqua,$i)]} {
- eval {append temp} $skipString
- } else {
+ # Again, make sure you don't duplicate entries for macosx & unix & aqua.
+ for {set i $afterUnixNum} {$i <= $lastNum} {incr i} {
+ if {![info exists stubs($name,macosx,$i)]} {
+ if {![info exists stubs($name,aqua,$i)]} {
+ eval {append temp} $skipString
+ } else {
append temp [$slotProc $name $stubs($name,aqua,$i) $i]
}
}
- append text [addPlatformGuard aqua $temp]
}
- # Again, make sure you don't duplicate entries for macosx & unix.
- if {[info exists stubs($name,macosx,lastNum)]
- && ![info exists stubs($name,unix,lastNum)]} {
+ append text [addPlatformGuard aqua $temp]
+ }
+ if {[info exists stubs($name,macosx,lastNum)]} {
set lastNum $stubs($name,macosx,lastNum)
set temp {}
- for {set i 0} {$i <= $lastNum} {incr i} {
+ # Again, make sure you don't duplicate entries for macosx & unix.
+ for {set i $afterUnixNum} {$i <= $lastNum} {incr i} {
if {![info exists stubs($name,macosx,$i)]} {
eval {append temp} $skipString
} else {
- append temp [$slotProc $name $stubs($name,macosx,$i) $i]
- }
+ append temp [$slotProc $name $stubs($name,macosx,$i) $i]
}
- append text [addPlatformGuard macosx $temp]
}
- # Again, make sure you don't duplicate entries for x11 & unix.
- if {[info exists stubs($name,x11,lastNum)]
- && ![info exists stubs($name,unix,lastNum)]} {
+ append text [addPlatformGuard macosx $temp]
+ }
+ if {[info exists stubs($name,x11,lastNum)]} {
set lastNum $stubs($name,x11,lastNum)
set temp {}
- for {set i 0} {$i <= $lastNum} {incr i} {
+ # Again, make sure you don't duplicate entries for x11 & unix.
+ for {set i $afterUnixNum} {$i <= $lastNum} {incr i} {
if {![info exists stubs($name,x11,$i)]} {
eval {append temp} $skipString
} else {
- append temp [$slotProc $name $stubs($name,x11,$i) $i]
- }
+ append temp [$slotProc $name $stubs($name,x11,$i) $i]
}
- append text [addPlatformGuard x11 $temp]
}
+ append text [addPlatformGuard x11 $temp]
+ }
}
}