tclresource-commits Mailing List for TclResource (Page 2)
Status: Beta
Brought to you by:
bdesgraupes
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
(7) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(77) |
Oct
|
Nov
|
Dec
|
2006 |
Jan
(9) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Bernard D. <bde...@us...> - 2004-09-07 10:39:05
|
Update of /cvsroot/tclresource/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26852 Modified Files: tclResourceOSX.c Log Message: Modified error strings Index: tclResourceOSX.c =================================================================== RCS file: /cvsroot/tclresource/Source/tclResourceOSX.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- tclResourceOSX.c 6 Sep 2004 21:40:29 -0000 1.14 +++ tclResourceOSX.c 7 Sep 2004 10:38:48 -0000 1.15 @@ -1,7 +1,7 @@ /* * File : "tclResourceOSX.c" * Created : 2003-09-20 10:13:07 - * Last modification : 2003-10-24 19:37:30 + * Last modification : 2004-09-07 12:23:15 * Author: Bernard Desgraupes * e-mail: <bde...@ea...> * Note: @@ -185,8 +185,17 @@ Tcl_CreateObjCommand(interp, "resource", Tcl_ResourceObjCmd, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); - sprintf(vstr,"%d.%d%c%d\0", TCLRESOURCE_MAJOR, TCLRESOURCE_MINOR, - TCLRESOURCE_STAGE, TCLRESOURCE_SUBMINOR); + // Version numbering + if (TCLRESOURCE_STAGE=='f') { + if (TCLRESOURCE_SUBMINOR) { + sprintf(vstr,"%d.%d.%d\0", TCLRESOURCE_MAJOR, TCLRESOURCE_MINOR, TCLRESOURCE_SUBMINOR); + } else { + sprintf(vstr,"%d.%d\0", TCLRESOURCE_MAJOR, TCLRESOURCE_MINOR); + } + } else { + sprintf(vstr,"%d.%d%c%d\0", TCLRESOURCE_MAJOR, TCLRESOURCE_MINOR, + TCLRESOURCE_STAGE, TCLRESOURCE_SUBMINOR); + } /* Declare the tclResource package. */ if (Tcl_PkgProvide(interp, "resource", vstr) != TCL_OK) { @@ -342,7 +351,7 @@ long theLong; short saveRef, theAttrs; char *resourceId = NULL; - char buffer[16]; + char buffer[128]; OpenResourceFork *resourceRef; Handle resource = NULL; OSErr err; @@ -443,10 +452,9 @@ } if ((resourceId == NULL) && !gotInt) { - Tcl_AppendStringsToObj(resultPtr,"you must specify either ", - "\"-id\" or \"-name\" to get the ", - "attributes of a specified resource", - (char *) NULL); + Tcl_AppendStringsToObj(resultPtr,"you must specify either ", + "-id or -name", + (char *) NULL); return TCL_ERROR; } @@ -466,10 +474,8 @@ result = TCL_ERROR; goto attributesDone; } else if (err != noErr) { - sprintf(buffer, "%12d", err); - Tcl_AppendStringsToObj(resultPtr, "resource error #", - buffer, "occured while trying to find resource", - (char *) NULL); + sprintf(buffer, "resource error %d while trying to find resource", err); + Tcl_AppendStringsToObj(resultPtr, buffer, (char *) NULL); result = TCL_ERROR; goto attributesDone; } @@ -489,10 +495,8 @@ result = TCL_ERROR; goto attributesDone; } else if (err != noErr) { - sprintf(buffer, "%12d", err); - Tcl_AppendStringsToObj(resultPtr, "resource error #", - buffer, "occured while trying to find resource", - (char *) NULL); + sprintf(buffer, "resource error %d while trying to find resource", err); + Tcl_AppendStringsToObj(resultPtr, buffer, (char *) NULL); result = TCL_ERROR; goto attributesDone; } @@ -532,10 +536,8 @@ SetResAttrs(resource, newValue); err = ResError(); if (err != noErr) { - sprintf(buffer, "%12d", err); - Tcl_AppendStringsToObj(resultPtr, - "error ", buffer, " setting resource attributes", - (char *) NULL); + sprintf(buffer, "error %d setting resource attributes", err); + Tcl_AppendStringsToObj(resultPtr, buffer, (char *) NULL); result = TCL_ERROR; goto attributesDone; } @@ -593,6 +595,8 @@ int length; short fileRef; char *stringPtr; + OSErr err; + int result = TCL_OK; if (objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "resourceRef"); @@ -602,11 +606,16 @@ fileRef = TclMacUnRegisterResourceFork(stringPtr, resultPtr); if (fileRef >= 0) { - CloseResFile(fileRef); - return TCL_OK; - } else { - return TCL_ERROR; + CloseResFile(fileRef); + err = ResError(); + if (err != noErr) { + Tcl_AppendStringsToObj(resultPtr, "couldn't close the resource fork", (char *) NULL); + result = TCL_ERROR; + } + } else { + result = TCL_ERROR; } + return result; } @@ -642,6 +651,7 @@ long theLong; char *resourceId = NULL; OpenResourceFork *resourceRef; + char buffer[128]; Handle resource = NULL; OSErr err; Str255 theName; @@ -705,10 +715,8 @@ } if ((resourceId == NULL) && !gotInt) { - Tcl_AppendStringsToObj(resultPtr,"you must specify either ", - "\"-id\" or \"-name\" or both ", - "to \"resource delete\"", - (char *) NULL); + Tcl_AppendStringsToObj(resultPtr,"you must specify either ", + "-id or -name or both", (char *) NULL); return TCL_ERROR; } @@ -737,12 +745,8 @@ result = TCL_ERROR; goto deleteDone; } else if (err != noErr) { - char buffer[16]; - - sprintf(buffer, "%12d", err); - Tcl_AppendStringsToObj(resultPtr, "resource error #", - buffer, "occured while trying to find resource", - (char *) NULL); + sprintf(buffer, "error %d while trying to find resource", err); + Tcl_AppendStringsToObj(resultPtr, buffer, (char *) NULL); result = TCL_ERROR; goto deleteDone; } @@ -765,22 +769,16 @@ result = TCL_ERROR; goto deleteDone; } else if (err != noErr) { - char buffer[16]; - - sprintf(buffer, "%12d", err); - Tcl_AppendStringsToObj(resultPtr, "resource error #", - buffer, "occured while trying to find resource", - (char *) NULL); + sprintf(buffer, "error %d while trying to find resource", err); + Tcl_AppendStringsToObj(resultPtr, buffer, (char *) NULL); result = TCL_ERROR; goto deleteDone; } if (gotInt) { if (resource != tmpResource) { - Tcl_AppendStringsToObj(resultPtr, - "\"-id\" and \"-name\" ", - "values do not point to the same resource", - (char *) NULL); + Tcl_AppendStringsToObj(resultPtr, "-id and -name ", + "values do not point to the same resource", (char *) NULL); result = TCL_ERROR; goto deleteDone; } @@ -1278,7 +1276,8 @@ SInt8 macPermision; CONST char *str; char *native; - FSSpec fileSpec; + char resultStr[256]; + FSSpec fileSpec; FSRef fileFSRef, parentFSRef; OSErr err; Tcl_DString ds, buffer; @@ -1339,7 +1338,7 @@ Tcl_DStringFree(&buffer); if (!((err == noErr) || (err == fnfErr))) { - Tcl_AppendStringsToObj(resultPtr, "invalid path", (char *) NULL); + Tcl_AppendStringsToObj(resultPtr, "couldn't get file ref from path", (char *) NULL); return TCL_ERROR; } if (isDir) { @@ -1391,6 +1390,7 @@ mode = TclGetOpenMode(interp, stringPtr, &index); if (mode == -1) { /* TODO: TclGetOpenMode doesn't work with Obj commands. */ + Tcl_AppendStringsToObj(resultPtr, "couldn't get open mode for ", stringPtr, (char *) NULL); return TCL_ERROR; } switch (mode & (O_RDONLY | O_WRONLY | O_RDWR)) { @@ -1550,8 +1550,8 @@ return TCL_ERROR; } else { openError: - Tcl_AppendStringsToObj(resultPtr, - "error opening resource file", (char *) NULL); + sprintf(resultStr, "error %d opening resource file", err); + Tcl_AppendStringsToObj(resultPtr, resultStr, (char *) NULL); return TCL_ERROR; } } @@ -1761,7 +1761,7 @@ Tcl_Obj *resultPtr) /* Pointer to store the result. */ { OpenResourceFork *resourceRef; - char buffer[16]; + char buffer[128]; OSErr err; if (objc != 3) { @@ -1779,10 +1779,8 @@ UpdateResFile(resourceRef->fileRef); err = ResError(); if (err != noErr) { - sprintf(buffer, "%12d", err); - Tcl_AppendStringsToObj(resultPtr, - "error ", buffer, " updating resource map", - (char *) NULL); + sprintf(buffer, "error %d updating resource map", err); + Tcl_AppendStringsToObj(resultPtr, buffer, (char *) NULL); return TCL_ERROR; } return TCL_OK; @@ -2050,9 +2048,10 @@ ReleaseResource(resource); err = ResError(); if (err != noErr) { - Tcl_AppendStringsToObj(resultPtr, - "error releasing resource", - (char *) NULL); + Tcl_GetStringFromObj(resultPtr, &length); + if (length == 0) { + Tcl_AppendStringsToObj(resultPtr, "error releasing resource", (char *) NULL); + } result = TCL_ERROR; } } @@ -2612,7 +2611,7 @@ break; } else { if (tokenPtr != NULL) { - Tcl_SetStringObj(tokenPtr, "Resource already open with different permissions.", -1); + Tcl_SetStringObj(tokenPtr, "resource already opened with different permission", -1); } return TCL_ERROR; } @@ -2741,7 +2740,7 @@ if ( resourceRef->flags & TCL_RESOURCE_DONT_CLOSE ) { if (resultPtr != NULL) { Tcl_AppendStringsToObj(resultPtr, - "can't close \"", tokenPtr, "\" resource file", + "not allowed to close \"", tokenPtr, "\" resource file", (char *) NULL); } return -1; |
From: Daniel A. S. <da...@us...> - 2004-09-07 08:46:30
|
Update of /cvsroot/tclresource/Source/tclResource.pbproj In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5591 Modified Files: project.pbxproj Log Message: don't rely on Tcl.framework being installed in /Library/Frameworks Index: project.pbxproj =================================================================== RCS file: /cvsroot/tclresource/Source/tclResource.pbproj/project.pbxproj,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- project.pbxproj 11 Dec 2003 09:44:59 -0000 1.1 +++ project.pbxproj 7 Sep 2004 08:46:03 -0000 1.2 @@ -136,7 +136,6 @@ buildActionMask = 2147483647; files = ( F5509190036C35B40130931B, - F5A272830377DE8E01FEA954, ); isa = PBXFrameworksBuildPhase; runOnlyForDeploymentPostprocessing = 0; @@ -164,7 +163,7 @@ LIBRARY_STYLE = DYNAMIC; OPTIMIZATION_CFLAGS = "-O0"; OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; + OTHER_LDFLAGS = "-ltclstub8.4"; OTHER_LIBTOOL_FLAGS = ""; OTHER_REZFLAGS = ""; PRECOMPILE_PREFIX_HEADER = NO; @@ -199,12 +198,6 @@ path = /Library/Frameworks/Tcl.framework/libtclstub8.4.a; refType = 0; }; - F5A272830377DE8E01FEA954 = { - fileRef = F5A272820377DE8D01FEA954; - isa = PBXBuildFile; - settings = { - }; - }; //F50 //F51 //F52 |
From: Daniel A. S. <da...@us...> - 2004-09-07 08:45:00
|
Update of /cvsroot/tclresource/Help In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5454 Added Files: license.terms Log Message: split out license terms from TclResourceHelp for use in TclTkAquaBI distro --- NEW FILE: license.terms --- LICENSE AND DISCLAIMER This software is free software and distributed under the same licensing terms as the Tcl language itself. See license.terms in the Tcl distribution. The original code of the resource command has the following copyright. Copyright © 1997 Sun Microsystems, Inc. Copyright © 1995-1997 Roger E. Critchlow Jr. For the Tclresource extension: Copyright © 2003-2004 Bernard Desgraupes |
From: Bernard D. <bde...@us...> - 2004-09-07 08:25:03
|
Update of /cvsroot/tclresource/Help In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1701 Modified Files: ReadMe Log Message: 1.1b4 Index: ReadMe =================================================================== RCS file: /cvsroot/tclresource/Help/ReadMe,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ReadMe 9 Nov 2003 18:42:20 -0000 1.1 +++ ReadMe 7 Sep 2004 08:24:54 -0000 1.2 @@ -1,25 +1,29 @@ -Tclresource 1.0 -=============== +Tclresource 1.1b4 -This is the Tclresource extension implementing the [resource] command in -Tcl. System MacOSX 10.2 or greater is required. This extension is only -useful on Macintosh platforms. -The Tclresource1.1 folder should be installed on your system in /Library/Tcl -or ~/Library/Tcl or any folder contained in your auto_path variable. If you -use it with AlphaX (version 8.0b11 or greater), you can also install it in -the Tclextensions folder at the same level as the application and it will be -loaded automatically by AlphaX at startup. +This is the Tclresource extension implementing the [resource] command in +Tcl. System MacOSX 10.2 or greater is required. This extension is only +useful on Macintosh OSX platforms. -Please read the documentation about the command in the Help file - TclResourceHelp.html +The Tclresource1.1 folder should be installed on your system in +/Library/Tcl or ~/Library/Tcl or any folder contained in your auto_path +variable. If you use it with AlphaX (version 8.0b11 or greater), you can +also install it in the Tclextensions folder at the same level as the +application and it will be loaded automatically by AlphaX at startup. + +Please read the documentation about the command in the Help file TclResourceHelp.html To load the extension in a Tcl script, just use the following instruction: - package require resource + + package require resource + Please e-mail any bug or problem you encounter to Bernard Desgraupes -e-mail <bde...@ea...> -Web page <http://webperso.easyconnect.fr/bdesgraupes/> +e-mail: <bde...@us...> -Last modification: 2003-11-09 18:42:32 \ No newline at end of file +The official site for the Tclresource extension is at SourceForge: +<http://sourceforge.net/projects/tclresource> + +---------------------------------------------------------------------- +Last updated 2004-09-06 23:16:50 \ No newline at end of file |
From: Bernard D. <bde...@us...> - 2004-09-07 08:23:09
|
Update of /cvsroot/tclresource/Help In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1330 Modified Files: TclResourceHelp TclResourceHelp.html Log Message: Updated to 1.1.4 Index: TclResourceHelp =================================================================== RCS file: /cvsroot/tclresource/Help/TclResourceHelp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- TclResourceHelp 6 Nov 2003 06:40:17 -0000 1.2 +++ TclResourceHelp 7 Sep 2004 08:22:49 -0000 1.3 @@ -1,393 +1,398 @@ --*-WWW-*- - _________________________________________________________________ - This is a manual page for the Tclresource extension for Tcl. + Abstract - _________________________________________________________________ +This is a manual page for the Tclresource extension for Tcl. - NAME - SYNOPSIS - INTRODUCTION - resource attributes resourceRef ?option resourceType? ?value? - - resource attributes resourceRef + 1. NAME + 2. SYNOPSIS + 3. INTRODUCTION + 3.1. resource attributes resourceRef ?option resourceType ? ?value ? + resource attributes resourceRef + resource attributes resourceRef value + resource attributes resourceRef option resourceType + resource attributes resourceRef option resourceType value + 3.2. resource close resourceRef + 3.3. resource delete ?options ? resourceType + 3.4. resource fork resourceRef + 3.5. resource files ?resourceRef ? + 3.6. resource id resourceType resourceName resourceRef + 3.7. resource list ?-ids ? resourceType ?resourceRef ? + 3.8. resource name resourceType resourceId resourceRef + 3.9. resource open ?(-datafork |-resourcefork )? fileName ?access ? + 3.10. resource read resourceType resourceId ?resourceRef ? + 3.11. resource types ?resourceRef ? + 3.12. resource update resourceRef + 3.13. resource write ?options ? resourceType data + 4. RESOURCE TYPES + 5. RESOURCE IDS + 6. RESOURCE ATTRIBUTES + 7. PORTABILITY ISSUES + 8. VERSION HISTORY + 9. KNOW ISSUES + 10. LICENSE AND DISCLAIMER + 11. SOURCE CODE + 12. SEE ALSO + 13. KEYWORDS +---------------------------------------------------------------------- - resource attributes resourceRef value - resource attributes resourceRef option resourceType +1. NAME +resource - Manipulate Macintosh resources - resource attributes resourceRef option resourceType value +2. SYNOPSIS - resource close resourceRef + package require resource 1.1 + resource subcommand ?arg arg ...? - resource delete ?options? resourceType - resource fork resourceRef +3. INTRODUCTION +The resource command provides some generic operations for dealing with +Macintosh resources. This command is only supported on the Macintosh +platform. Prior to system OSX, each Macintosh file consisted of two forks: a +data fork and a resource fork. Since the advent of system OSX, resources can +also be stored in the data fork (this is the recommended format for +portability reasons: resource forks tend to be otherwise deleted when copied +on another platform). You use the normal open, puts, close, etc. commands to +manipulate the data fork but you must use this command, however, to interact +with the resource map, even if it is stored in the data fork. In a resource +map, resources are categorized by type and, in each type, are designated by +an ID and possibly a name. See RESOURCE TYPES and RESOURCE IDS below for +details. - resource files ?resourceRef? +On OSX, the resource command is not a built-in command of Tcl anymore. It is +made available by this extension which much be explicitely loaded with a +package require instruction like this: - resource id resourceType resourceName resourceRef + package require resource 1.1 - resource list ?-ids? resourceType ?resourceRef? - resource name resourceType resourceId resourceRef +Subcommand indicates what operation to perform. Any unique abbreviation +for subcommand is acceptable. The valid subcommands are explained in the next +sections. - resource open ?(-datafork|-resourcefork)? fileName ?access? +3.1. resource attributes resourceRef ?option resourceType ? ?value ? + This command is used to get or set the attributes of the resource map or + the attributes of a particular resource in the resource map. It has four + different syntaxes: - resource read resourceType resourceId ?resourceRef? + resource attributes resourceRef + To get the attributes of the resource map specified by the resourceRef + argument. - resource types ?resourceRef? + resource attributes resourceRef value + To give the value value to the attributes of the resource map specified + by the resourceRef argument. - resource update resourceRef + resource attributes resourceRef option resourceType + To get the attributes of the resource specified by the argument option + in the resource map designated by the resourceRef argument. The option + can be one of: - resource write ?options? resourceType data + ¥ -id resourceId : if the -id option is given, the id resourceId (see RESOURCE IDS below) + is used to specify the resource whose attributes must be returned or set. + The id must be a number: to specify a name use the -name option. - RESOURCE TYPES - RESOURCE IDS - RESOURCE ATTRIBUTES - PORTABILITY ISSUES - VERSION HISTORY - KNOW ISSUES - LICENSE AND DISCLAIMER - SOURCE CODE - SEE ALSO - KEYWORDS + ¥ -name resourceName : if the -name option is specified, the resource named resourceName is + used. - _________________________________________________________________ -NAME + resource attributes resourceRef option resourceType value + To give the value value to the attributes of the resource specified by + the argument option in the resource map designated by the resourceRef + argument. The resource can be specified using either the -id or the + -name as indicated above. -resource - Manipulate Macintosh resources + Note that the resource attributes command is available only since + version 1.1 of the Tclresource extension. See RESOURCE ATTRIBUTES below + for details about the possible values for attributes. -SYNOPSIS +3.2. resource close resourceRef + Closes the given resource reference (obtained from resource open). + Resources from that resource file will no longer be available. - package require resource 1.1 - resource subcommand ?arg arg ...? +3.3. resource delete ?options ? resourceType + This command will delete the resource specified by options and type + resourceType (see RESOURCE TYPES below). The options give you several + ways to specify the resource to be deleted. -INTRODUCTION -The resource command provides some generic operations for dealing with -Macintosh resources. This command is only supported on the Macintosh -platform. Prior to system OSX, each Macintosh file consisted of two forks: -a data fork and a resource fork. Since the advent of system OSX, resources -can also be stored in the data fork (this is the recommended format for -portability reasons: resource forks tend to be otherwise deleted when -copied on another platform). You use the normal open, puts, close, etc. -commands to manipulate the data fork but you must use this command, -however, to interact with the resource map, even if it is stored in the -data fork. In a resource map, resources are categorized by type and, in -each type, are designated by an ID and possibly a name. See RESOURCE TYPES -and RESOURCE IDS below for details. On OSX, the resource command is not a -built-in command of Tcl anymore. It is made available by this extension -which much be explicitely loaded with a package require instruction like -this: +((li -id resourceId : if the -id option is given the id resourceId (see RESOURCE IDS below) is + used to specify the resource to be deleted. The id must be a number: to + specify a name use the -name option. +((li -name resourceName : if -name is specified, the resource named resourceName will be deleted. + If the -id is also provided, then there must be a resource with BOTH this + name and this id. If no name is provided, then the id will be used + regardless of the name of the actual resource. - package require resource 1.1 +((li -file resourceRef : if the -file option is specified then the resource will be deleted from + the file pointed to by resourceRef . Otherwise the first resource with the + given resourceName and or resourceId which is found on the resource file + path will be deleted. To inspect the file path, use the resource files + command. + -Subcommand indicates what operation to perform. Any unique abbreviation for -subcommand is acceptable. The valid subcommands are explained in the next -sections. -resource attributes resourceRef ?option resourceType? ?value? - This command is used to get or set the attributes of the resource map or - the attributes of a particular resource in the resource map. It has four - different syntaxes: +3.4. resource fork resourceRef + Returns which fork (either data fork or resource fork) contains + the resource map specified by the argument resourceRef . The return value + will be datafork , resourcefork or unknown . The value unknown is returned + for the resource maps listed by the command resource list which were not + opened explicitely by a resource open command but were already in memory. + Note that the resource fork command is available only since version 1.1 + of the Tclresource extension. -resource attributes resourceRef - To get the attributes of the resource map specified by the resourceRef - argument. -resource attributes resourceRef value - To give the value value to the attributes of the resource map specified - by the resourceRef argument. -resource attributes resourceRef option resourceType - To get the attributes of the resource specified by the argument option in - the resource map designated by the resourceRef argument. The option can - be one of: --id resourceId - If the -id option is given, the id resourceId (see RESOURCE IDS below) - is used to specify the resource whose attributes must be returned or - set. The id must be a number: to specify a name use the -name option. --name resourceName - If the -name option is specified, the resource named resourceName is - used. +3.5. resource files ?resourceRef ? + If resourceRef is not provided, this command returns a Tcl list of the + resource references for all the currently open resource files. The list + is in the normal Macintosh search order for resources. If resourceRef is + specified, the command will return the path to the file whose resource + fork is represented by that token. -resource attributes resourceRef option resourceType value - To give the value value to the attributes of the resource specified by - the argument option in the resource map designated by the resourceRef - argument. The resource can be specified using either the -id or the - -name as indicated above. +3.6. resource id resourceType resourceName resourceRef + Returns the id of the resource of type resourceType with name + resourceName in the resource map designated by the argument resourceRef . + This is the reverse of command [resource name]. - Note that the resource attributes command is available only since - version 1.1 of the Tclresource extension. See RESOURCE ATTRIBUTES below - for details about the possible values for attributes. -resource close resourceRef - Closes the given resource reference (obtained from resource open). - Resources from that resource file will no longer be available. -resource delete ?options? resourceType - This command will delete the resource specified by options and type - resourceType (see RESOURCE TYPES below). The options give you several - ways to specify the resource to be deleted. +3.7. resource list ?-ids ? resourceType ?resourceRef ? + List all of the resources ids of type resourceType (see RESOURCE TYPES + below). If resourceRef is specified then the command will limit the + search to that particular resource file. Otherwise, all resource files + currently opened by the application will be searched. A Tcl list of + either the resource name's or resource id's of the found resources will + be returned: each time the name of the resource is not empty, it is used + preferably to the id, unless the -ids option has been specified, in + which case only id's are returned. See the RESOURCE IDS section below for + more details about what a resource id is. + Note that the -ids option is only available since version 1.1 of the + Tclresource extension. --id resourceId - If the -id option is given the id resourceId (see RESOURCE IDS below) is - used to specify the resource to be deleted. The id must be a number: to - specify a name use the -name option. --name resourceName - If -name is specified, the resource named resourceName will be deleted. - If the -id is also provided, then there must be a resource with BOTH - this name and this id. If no name is provided, then the id will be used - regardless of the name of the actual resource. --file resourceRef - If the -file option is specified then the resource will be deleted from - the file pointed to by resourceRef. Otherwise the first resource with - the given resourceName and or resourceId which is found on the resource - file path will be deleted. To inspect the file path, use the resource - files command. -resource fork resourceRef - Returns which fork (either data fork or resource fork) contains the - resource map specified by the argument resourceRef. The return value will - be datafork, resourcefork or unknown. The value unknown is returned for - the resource maps listed by the command resource list which were not - opened explicitely by a resource open command but were already in - memory. +3.8. resource name resourceType resourceId resourceRef + Returns the (possibly empty) name of the resource of type resourceType + with ID resourceId in the resource map designated by the argument + resourceRef . This is the reverse of command [resource id]. - Note that the resource fork command is available only since version 1.1 - of the Tclresource extension. -resource files ?resourceRef? - If resourceRef is not provided, this command returns a Tcl list of the - resource references for all the currently open resource files. The list - is in the normal Macintosh search order for resources. If resourceRef is - specified, the command will return the path to the file whose resource - fork is represented by that token. -resource id resourceType resourceName resourceRef - Returns the id of the resource of type resourceType with name - resourceName in the resource map designated by the argument resourceRef. - This is the reverse of command [resource name]. -resource list ?-ids? resourceType ?resourceRef? - List all of the resources ids of type resourceType (see RESOURCE TYPES - below). If resourceRef is specified then the command will limit the - search to that particular resource file. Otherwise, all resource files - currently opened by the application will be searched. A Tcl list of - either the resource name's or resource id's of the found resources will - be returned: each time the name of the resource is not empty, it is used - preferably to the id, unless the -ids option has been specified, in which - case only id's are returned. See the RESOURCE IDS section below for more - details about what a resource id is. - Note that the -ids option is only available since version 1.1 of the - Tclresource extension. -resource name resourceType resourceId resourceRef - Returns the (possibly empty) name of the resource of type resourceType - with ID resourceId in the resource map designated by the argument - resourceRef. This is the reverse of command [resource id]. -resource open ?(-datafork|-resourcefork)? fileName ?access? - Open the resource map for the file fileName. On OSX, resources can be - stored either in the resource fork of the file or in the data fork of - the file. By default, resource open will try to find resources in the - data fork of the file, then, if none is found, in its resource fork. - This behavior can be modified with one of the -datafork or -resourcefork - switches which force the command to search only in the data fork or the +3.9. resource open ?(-datafork |-resourcefork )? fileName ?access ? + Open the resource map for the file fileName . On OSX, resources can be + stored either in the resource fork of the file or in the data fork of the + file. By default, resource open will try to find resources in the data + fork of the file, then, if none is found, in its resource fork. This + behavior can be modified with one of the -datafork or -resourcefork + switches which force the command to search only in the data fork or the resource fork respectively. Standard file access permissions may also be - specified with the access optional argument (see the manual entry for - open for details). A resource reference (resourceRef) is returned that - can be used by the other resource commands to refer to this opened - resource map. + specified with the access optional argument (see the manual entry for + open for details). A resource reference (resourceRef ) is returned that + can be used by the other resource commands to refer to this opened + resource map. - An error can occur if the file doesn't exist or the file does not have - resources in the data or the resource fork. However, if you open the - file with write permissions the file and/or resource fork will be - created instead of generating an error: the -datafork or -resourcefork - switches let you specify which kind of resource file should be created - (data fork resource file or resource fork resource file). If neither - -datafork nor -resourcefork are specified, a data fork resource file is - created by default. + An error can occur if the file doesn't exist or the file does not have + resources in the data or the resource fork. However, if you open the file + with write permissions the file and/or resource fork will be created + instead of generating an error: the -datafork or -resourcefork switches + let you specify which kind of resource file should be created (data fork + resource file or resource fork resource file). If neither -datafork nor + -resourcefork are specified, a data fork resource file is created by + default. - Note that the -datafork and -resourcefork switches are only available - since version 1.1 of the Tclresource extension. -resource read resourceType resourceId ?resourceRef? - Read the entire resource of type resourceType (see RESOURCE TYPES below) - and the name or id of resourceId (see RESOURCE IDS below) into memory and - return the result. If resourceRef is specified we limit our search to - that resource file, otherwise we search all open resource forks in the - application. It is important to note that most Macintosh resource use a - binary format and the data returned from this command may have embedded - NULLs or other non-ASCII data. -resource types ?resourceRef? - This command returns a Tcl list of all resource types (see RESOURCE TYPES - below) found in the resource file pointed to by resourceRef. If - resourceRef is not specified it will return all the resource types found - in every resource file currently opened by the application. -resource update resourceRef - This command updates the resource map designated by the resourceRef - argument. It performs three tasks: + Note that the -datafork and -resourcefork switches are only available + since version 1.1 of the Tclresource extension. - changing, adding, or removing resource data in the fork on disk to - match the resource map in memory; - compacting the resource fork, closing up any empty space created when - a resource was removed, made smaller, or made larger; - writing the resource map in memory to the resource fork. - Because the [resource close] command calls [resource update] before it - closes the resource fork, you need to call it directly only if you want - to update the file without closing it. +3.10. resource read resourceType resourceId ?resourceRef ? + Read the entire resource of type resourceType (see RESOURCE TYPES below) + and the name or id of resourceId (see RESOURCE IDS below) into memory and + return the result. If resourceRef is specified we limit our search to + that resource file, otherwise we search all open resource forks in the + application. It is important to note that most Macintosh resource use a + binary format and the data returned from this command may have embedded + NULLs or other non-ASCII data. - Note that the resource update command is available only since version - 1.1 of the Tclresource extension. -resource write ?options? resourceType data - This command will write the passed in data as a new resource of type - resourceType (see RESOURCE TYPES below). Several options are available - that describe where and how the resource is stored. --id resourceId - If the -id option is given the id resourceId (see RESOURCE IDS below) is - used for the new resource, otherwise a unique id will be generated that - will not conflict with any existing resource. However, the id must be a - number: to specify a name use the -name option. --name resourceName - If -name is specified the resource will be named resourceName, otherwise - it will have the empty string as the name. --file resourceRef - If the -file option is specified then the resource will be written in - the file pointed to by resourceRef, otherwise the most recently open - resource will be used. --force - If the target resource already exists, then by default Tcl will not - overwrite it, but raise an error instead. Use the -force flag to force - overwriting the existant resource. +3.11. resource types ?resourceRef ? + This command returns a Tcl list of all resource types (see RESOURCE + TYPES below) found in the resource file pointed to by resourceRef . If + resourceRef is not specified it will return all the resource types found + in every resource file currently opened by the application. -RESOURCE TYPES -Resource types are defined as a four character string that is then mapped to -an underlying id. For example, TEXT refers to the Macintosh resource type -for text. The type STR# is a list of counted strings. All Macintosh -resources must be of some type. See Macintosh documentation for a more -complete list of resource types that are commonly used. +3.12. resource update resourceRef + This command updates the resource map designated by the resourceRef + argument. It performs three tasks: + ¥ changing, adding, or removing resource data in the fork on disk to + match the resource map in memory; + ¥ compacting the resource fork, closing up any empty space created when + a resource was removed, made smaller, or made larger; + ¥ writing the resource map in memory to the resource fork. -RESOURCE IDS + Because the [resource close] command calls [resource update] before it + closes the resource fork, you need to call it directly only if you want + to update the file without closing it. + + Note that the resource update command is available only since version + 1.1 of the Tclresource extension. + + +3.13. resource write ?options ? resourceType data + This command will write the passed in data as a new resource of type + resourceType (see RESOURCE TYPES below). Several options are available + that describe where and how the resource is stored. + + ¥ -id resourceId : if the -id option is given the id resourceId (see RESOURCE IDS below) is + used for the new resource, otherwise a unique id will be generated that + will not conflict with any existing resource. However, the id must be a + number: to specify a name use the -name option. + + ¥ -name resourceName : if -name is specified the resource will be named resourceName , otherwise + it will have the empty string as the name. + + ¥ -file resourceRef : if the -file option is specified then the resource will be written in + the file pointed to by resourceRef , otherwise the most recently open + resource will be used. + + ¥ -force : if the target resource already exists, then by default Tcl will not + overwrite it, but raise an error instead. Use the -force flag to force + overwriting the existant resource. + + +4. RESOURCE TYPES +Resource types are defined as a four character string that is then mapped to +an underlying id. For example, TEXT refers to the Macintosh resource type +for text. The type STR# is a list of counted strings. All Macintosh +resources must be of some type. See Macintosh documentation for a more +complete list of resource types that are commonly used. + +5. RESOURCE IDS For this command the notion of a resource id actually refers to two ideas in -Macintosh resources. Every place you can use a resource Id you can use +Macintosh resources. Every place you can use a resource Id you can use either the resource name or a resource number. Names are always searched or -returned in preference to numbers. For example, the resource list command -will return names if they exist or numbers if the name is NULL. +returned in preference to numbers. For example, the resource list command +will return names if they exist or numbers if the name is NULL. -RESOURCE ATTRIBUTES +6. RESOURCE ATTRIBUTES +Resource maps and individual resources have attributes. The attributes for +resource maps are: + +.___________.___.___________________________________________. +|mapChanged |32 |Write map out at update | +|mapCompact |64 |Compact resource file when writing to disk | +|mapReadOnly|128|Resource file is read-only | +|___________|___|___________________________________________| -Resource maps and individual resources have attributes. The attributes for -resource maps are: -mapChanged 32 Write map out at update -mapCompact 64 Compact resource file when writing to disk -mapReadOnly 128 Resource file is read-only -The attributes are additional values. To set both the mapReadOnly and -mapChangedattributes for the resource map with reference resourceRef, one -would write: +The attributes are additional values. To set both the mapReadOnly and +mapChanged attributes for the resource map with reference resourceRef , one +would write: + resource attributes ((i resourceRef i)) 160 - resource attributes resourceRef 160 The allowable attributes for individual resources are: + +.____________.__.___________________________. +|resChanged |2 |Resource changed | +|resPreload |4 |Load in on OpenResFile | +|resProtected|8 |Protected | +|resLocked |16|Load it in locked | +|resPurgeable|32|Purgeable resource | +|resSysHeap |64|System or application heap | +|____________|__|___________________________| -resChanged 2 Resource changed -resPreload 4 Load in on OpenResFile -resProtected 8 Protected -resLocked 16 Load it in locked -resPurgeable 32 Purgeable resource -resSysHeap 64 System or application heap -PORTABILITY ISSUES - -The resource command is only available on Macintosh. On systems older than -OSX, the resource command was built in Tcl but it was removed from the -versions of Tcl compiled for OSX. It is now made available as an extension -which should be loaded in the scripts with the following instruction: +7. PORTABILITY ISSUES +The resource command is only available on Macintosh. On systems older than +OSX, the resource command was built in Tcl but it was removed from the +versions of Tcl compiled for OSX. It is now made available as an extension +which should be loaded in the scripts with the following instruction: package require resource 1.1 -Version 1.0 of the extension is simply a port to OSX of the old resource + +Version 1.0 of the extension is simply a port to OSX of the old resource command: it does not handle data fork resource files. Support for data fork resource files is introduced in version 1.1. -VERSION HISTORY - - 1.0 - 03/09/25 - First release of the extension for OSX. - 1.1 - 03/10/05 - Support for data fork resources, attributes, update, - name. +8. VERSION HISTORY + ¥ 1.0 - 03/09/25 - First release of the extension for OSX. + ¥ 1.1 - 03/10/05 - Support for data fork resources, attributes, update, name. + ¥ 1.1.4 - 04/09/07 - Fixed a bug related to permissions. Added a +complete tests suite. Better error messages. -KNOW ISSUES -The resource command has been ported to OSX as a Tcl extension by Bernard -Desgraupes. Please e-mail any bug or problem you encounter: -<bde...@ea...> -Version 1.0 corresponds strictly to the code provided in the Tcl source code -(tclMacResource.c). Version 1.1 added several improvements: +9. KNOW ISSUES +The [resource] command has been ported to OSX as a Tcl extension +by Bernard Desgraupes. Please e-mail any bug or problem you encounter: +<bde...@us...> - possibility of opening and writing to datafork resource files as well as - resource fork resource files. - new subcommand [resource attributes] to get/set the attributes of a - resource map or an individual resource. - new subcommand [resource update] to update a resource map without closing - it. - new subcommand [resource fork] to indicate which fork a resource map was - opened from. - new subcommands [resource name] and [resource id] returning the name of a - resource given its ID, and vice versa. - new -ids option for the [resource list] command + Version 1.0 strictly corresponds to the old [resource] command +included in the pre-OSX versions of Tcl. Version 1.1 added several improvements: + ¥ possibility of opening and writing to datafork resource files as well + as resource fork resource files. + ¥ new subcommand [resource attributes] to get/set the attributes of a resource + map or an individual resource. + ¥ new subcommand [resource update] to update a resource map without closing it. + ¥ new subcommand [resource fork] to indicate which fork a resource map was opened from. + ¥ new subcommands [resource name] and [resource id] returning the name of a resource +given its ID, and vice versa. + ¥ new -ids option for the [resource list] command -The Tclresource folder (Tclresource1.0, Tclresource1.1 etc) contains the -extension compiled as a dynamic library. For the Tcl interpreter to find it -automatically, it should be located on your system in /Library/Tcl/ -(administrator password required) or in your personal folder -~/Library/Tcl/. -LICENSE AND DISCLAIMER +The Tclresource folder (Tclresource1.0, Tclresource1.1 etc) contains +the extension compiled as a dynamic library. For the Tcl interpreter to +find it automatically, it should be located on your system in +/Library/Tcl/ (administrator password required) or in your personal +folder ~/Library/Tcl/. -This software is free software and distributed under the same licensing -terms as the Tcl language itself. See license.terms in the Tcl -distribution. The original code of the resource command has the following -copyright. +10. LICENSE AND DISCLAIMER +This software is free software and distributed under the same licensing terms +as the Tcl language itself. See license.terms in the Tcl distribution. +The original code of the resource command has the following copyright. Copyright © 1997 Sun Microsystems, Inc. Copyright © 1995-1997 Roger E. Critchlow Jr. -For the Tclresource extension: - +For the Tclresource extension: - Copyright © 2003 Bernard Desgraupes + Copyright © 2003-2004 Bernard Desgraupes -SOURCE CODE -Tclresource is an Open Source Project. Its source code is public and can be -found on the SourceForge site at the following address: -http://sourceforge.net/projects/tclresource +11. SOURCE CODE +Tclresource is an Open Source Project. Its source code is public and can +be found on the SourceForge site at the following address: +<http://sourceforge.net/projects/tclresource> -Tclresource binary releases are available at -http://sourceforge.net/project/showfiles.php?group_id=93101 or on my web -page at http://webperso.easyconnect.fr/bdesgraupes/tcl.html + Tclresource binary releases are available at +<http://sourceforge.net/project/showfiles.php?group_id=93101> or on my web +page at <http://webperso.easyconnect.fr/bdesgraupes/tcl.html> -The code is under CVS control. You can retrieve the latest stage of -development using any CVS client. See instructions at: -http://sourceforge.net/cvs/?group_id=93101 + The code is under CVS control. You can retrieve the latest stage of +development using any CVS client. See instructions at: +<http://sourceforge.net/cvs/?group_id=93101> -You can browse the cvs repository online at -http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tclresource + You can browse the cvs repository online at +<http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tclresource> -SEE ALSO +12. SEE ALSO open -KEYWORDS +13. KEYWORDS +open, resource + + + + + -open, resource Index: TclResourceHelp.html =================================================================== RCS file: /cvsroot/tclresource/Help/TclResourceHelp.html,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- TclResourceHelp.html 6 Nov 2003 06:39:36 -0000 1.3 +++ TclResourceHelp.html 7 Sep 2004 08:22:49 -0000 1.4 @@ -1,69 +1,50 @@ <HTML> <HEAD> -<TITLE>TclResource Help</TITLE> +<TITLE>Resource Help </TITLE> <META NAME=GENERATOR CONTENT="Aida Mode"> </HEAD> <BODY> -<!-- :Title: Resource Help --> -<!-- :Project: Tclresource extension for Tcl --> -<!-- :Version: $Revision 1.1 $ --> -<!-- :Author: Bernard Desgraupes <A HREF="mailto:bde...@ea...">bde...@ea...</A> --> -<!-- :Homepage: <A HREF="http://webperso.easyconnect.fr/bdesgraupes/">http://webperso.easyconnect.fr/bdesgraupes/</A> --> -<!-- :Created: 2003-09-30 03:53:27 --> -<!-- :Modified: 2003-10-16 08:44:28 --> -<!-- :Keywords: resource, forks --> - - -<HR><BLOCKQUOTE><P><I> +<P><HR><BLOCKQUOTE><P><I> This is a manual page for the Tclresource extension for Tcl. </I></P></BLOCKQUOTE><HR> <UL> -<LI><A HREF="#anchor1">NAME</A> -<LI><A HREF="#anchor2">SYNOPSIS</A> -<LI><A HREF="#anchor3">INTRODUCTION</A> -<UL><LI><A HREF="#anchor4"><B>resource attributes</B> <I>resourceRef</I> ?<I>option</I> <I>resourceType</I>? ?<I>value</I>?</A></UL> -<UL><UL><LI><A HREF="#anchor5"><B>resource attributes</B> <I>resourceRef</I></A></UL></UL> -<UL><UL><LI><A HREF="#anchor6"><B>resource attributes</B> <I>resourceRef</I> <I>value</I></A></UL></UL> -<UL><UL><LI><A HREF="#anchor7"><B>resource attributes</B> <I>resourceRef</I> <I>option</I> <I>resourceType</I></A></UL></UL> -<UL><UL><LI><A HREF="#anchor8"><B>resource attributes</B> <I>resourceRef</I> <I>option</I> <I>resourceType</I> <I>value</I></A></UL></UL> -<UL><LI><A HREF="#anchor9"><B>resource close</B> <I>resourceRef</I></A></UL> -<UL><LI><A HREF="#anchor10"><B>resource delete</B> ?<I>options</I>? <I>resourceType</I></A></UL> -<UL><LI><A HREF="#anchor11"><B>resource fork</B> <I>resourceRef</I></A></UL> -<UL><LI><A HREF="#anchor12"><B>resource files</B> ?<I>resourceRef</I>?</A></UL> -<UL><LI><A HREF="#anchor13"><B>resource id</B> <I>resourceType</I> <I>resourceName</I> <I>resourceRef</I></A></UL> -<UL><LI><A HREF="#anchor14"><B>resource list</B> ?<I>-ids</I>? <I>resourceType</I> ?<I>resourceRef</I>?</A></UL> -<UL><LI><A HREF="#anchor15"><B>resource name</B> <I>resourceType</I> <I>resourceId</I> <I>resourceRef</I></A></UL> -<UL><LI><A HREF="#anchor16"><B>resource open</B> ?(<I>-datafork</I>|<I>-resourcefork</I>)? <I>fileName</I> ?<I>access</I>?</A></UL> -<UL><LI><A HREF="#anchor17"><B>resource read</B> <I>resourceType</I> <I>resourceId</I> ?<I>resourceRef</I>?</A></UL> -<UL><LI><A HREF="#anchor18"><B>resource types</B> ?<I>resourceRef</I>?</A></UL> -<UL><LI><A HREF="#anchor19"><B>resource update</B> <I>resourceRef</I></A></UL> -<UL><LI><A HREF="#anchor20"><B>resource write</B> ?<I>options</I>? <I>resourceType</I> <I>data</I></A></UL> -<LI><A HREF="#anchor21">RESOURCE TYPES</A> -<LI><A HREF="#anchor22">RESOURCE IDS</A> -<LI><A HREF="#anchor23">RESOURCE ATTRIBUTES</A> -<LI><A HREF="#anchor24">PORTABILITY ISSUES</A> -<LI><A HREF="#anchor25">VERSION HISTORY</A> -<LI><A HREF="#anchor26">KNOW ISSUES</A> -<LI><A HREF="#anchor27">LICENSE AND DISCLAIMER</A> -<LI><A HREF="#anchor28">SOURCE CODE</A> -<LI><A HREF="#anchor29">SEE ALSO</A> -<LI><A HREF="#anchor30">KEYWORDS</A> +<LI><A HREF="#M1">NAME</A> +<LI><A HREF="#M2">SYNOPSIS</A> +<LI><A HREF="#M3">INTRODUCTION</A> +<UL><LI><A HREF="#M4"><B>resource attributes</B> <I>resourceRef</I> ?<I>option</I> <I>resourceType</I> ? ?<I>value</I> ?</A></UL> +<UL><UL><LI><A HREF="#M5"><B>resource attributes</B> <I>resourceRef</I> </A></UL></UL> +<UL><UL><LI><A HREF="#M6"><B>resource attributes</B> <I>resourceRef</I> <I>value</I> </A></UL></UL> +<UL><UL><LI><A HREF="#M7"><B>resource attributes</B> <I>resourceRef</I> <I>option</I> <I>resourceType</I> </A></UL></UL> +<UL><UL><LI><A HREF="#M8"><B>resource attributes</B> <I>resourceRef</I> <I>option</I> <I>resourceType</I> <I>value</I> </A></UL></UL> +<UL><LI><A HREF="#M9"><B>resource close</B> <I>resourceRef</I> </A></UL> +<UL><LI><A HREF="#M10"><B>resource delete</B> ?<I>options</I> ? <I>resourceType</I> </A></UL> +<UL><LI><A HREF="#M11"><B>resource fork</B> <I>resourceRef</I> </A></UL> +<UL><LI><A HREF="#M12"><B>resource files</B> ?<I>resourceRef</I> ?</A></UL> +<UL><LI><A HREF="#M13"><B>resource id</B> <I>resourceType</I> <I>resourceName</I> <I>resourceRef</I> </A></UL> +<UL><LI><A HREF="#M14"><B>resource list</B> ?<I>-ids</I> ? <I>resourceType</I> ?<I>resourceRef</I> ?</A></UL> +<UL><LI><A HREF="#M15"><B>resource name</B> <I>resourceType</I> <I>resourceId</I> <I>resourceRef</I> </A></UL> +<UL><LI><A HREF="#M16"><B>resource open</B> ?(<I>-datafork</I> |<I>-resourcefork</I> )? <I>fileName</I> ?<I>access</I> ?</A></UL> +<UL><LI><A HREF="#M17"><B>resource read</B> <I>resourceType</I> <I>resourceId</I> ?<I>resourceRef</I> ?</A></UL> +<UL><LI><A HREF="#M18"><B>resource types</B> ?<I>resourceRef</I> ?</A></UL> +<UL><LI><A HREF="#M19"><B>resource update</B> <I>resourceRef</I> </A></UL> +<UL><LI><A HREF="#M20"><B>resource write</B> ?<I>options</I> ? <I>resourceType</I> <I>data</I> </A></UL> +<LI><A HREF="#M21">RESOURCE TYPES</A> +<LI><A HREF="#M22">RESOURCE IDS</A> +<LI><A HREF="#M23">RESOURCE ATTRIBUTES</A> +<LI><A HREF="#M24">PORTABILITY ISSUES</A> +<LI><A HREF="#M25">VERSION HISTORY</A> +<LI><A HREF="#M26">KNOW ISSUES</A> +<LI><A HREF="#M27">LICENSE AND DISCLAIMER</A> +<LI><A HREF="#M28">SOURCE CODE</A> +<LI><A HREF="#M29">SEE ALSO</A> +<LI><A HREF="#M30">KEYWORDS</A> </UL> -<HR> - - - - -<H2><A NAME="anchor1"></A> NAME</H2> -resource - Manipulate Macintosh resources - -<H2><A NAME="anchor2"></A> SYNOPSIS</H2> +<HR><P><H2><A NAME="M1"></A>NAME</H2> +resource - Manipulate Macintosh resources <P><H2><A NAME="M2"></A>SYNOPSIS</H2> <PRE> package require resource 1.1 resource subcommand ?arg arg ...? -</PRE> - -<H2><A NAME="anchor3"></A> INTRODUCTION</H2> +</PRE><P><H2><A NAME="M3"></A>INTRODUCTION</H2> The resource command provides some generic operations for dealing with Macintosh resources. This command is only supported on the Macintosh platform. Prior to system OSX, each Macintosh file consisted of two forks: a @@ -75,360 +56,221 @@ with the resource map, even if it is stored in the data fork. In a resource map, resources are categorized by type and, in each type, are designated by an ID and possibly a name. See RESOURCE TYPES and RESOURCE IDS below for -details. - -On OSX, the resource command is not a built-in command of Tcl anymore. It is +details. <P>On OSX, the resource command is not a built-in command of Tcl anymore. It is made available by this extension which much be explicitely loaded with a package require instruction like this: <PRE> - package require resource 1.1 -</PRE> - -<I>Subcommand</I> indicates what operation to perform. Any unique abbreviation -for <I>subcommand</I> is acceptable. The valid <I>subcommands</I> are explained in the next -sections. - -<DL> - <DT><A NAME="anchor4"></A> <B>resource attributes</B> <I>resourceRef</I> ?<I>option</I> <I>resourceType</I>? ?<I>value</I>?<DD> + package require resource 1.1 +</PRE><P><I>Subcommand</I> indicates what operation to perform. Any unique abbreviation +for <I>subcommand</I> is acceptable. The valid <I>subcommands</I> are explained in the next +sections. <P><H3><A NAME="M4"></A><B>resource attributes</B> <I>resourceRef</I> ?<I>option</I> <I>resourceType</I> ? ?<I>value</I> ?</H3> This command is used to get or set the attributes of the resource map or the attributes of a particular resource in the resource map. It has four - different syntaxes: -<DL> -<DT><A NAME="anchor5"></A> <B><B>resource attributes</B></B> <I>resourceRef</I><DD> - To get the attributes of the resource map specified by the <I>resourceRef</I> - argument. - -<DT><A NAME="anchor6"></A> <B><B>resource attributes</B></B> <I>resourceRef</I> <I>value</I><DD> - To give the value <I>value</I> to the attributes of the resource map specified - by the <I>resourceRef</I> argument. - -<DT><A NAME="anchor7"></A> <B>resource attributes</B> <I>resourceRef</I> <I>option</I> <I>resourceType</I><DD> - To get the attributes of the resource specified by the argument <I>option</I> - in the resource map designated by the <I>resourceRef</I> argument. The option - can be one of: -<DL> - -<DT><B>-id</B> <I>resourceId</I><DD> - If the <B>-id</B> option is given, the id <I>resourceId</I> (see RESOURCE IDS below) + different syntaxes:<P><H4><A NAME="M5"></A><B>resource attributes</B> <I>resourceRef</I> </H4> + To get the attributes of the resource map specified by the <I>resourceRef</I> + argument. <P><H4><A NAME="M6"></A><B>resource attributes</B> <I>resourceRef</I> <I>value</I> </H4> + To give the value <I>value</I> to the attributes of the resource map specified + by the <I>resourceRef</I> argument.<P><H4><A NAME="M7"></A><B>resource attributes</B> <I>resourceRef</I> <I>option</I> <I>resourceType</I> </H4> + To get the attributes of the resource specified by the argument <I>option</I> + in the resource map designated by the <I>resourceRef</I> argument. The option + can be one of:<P><UL> + <LI> <B>-id</B> <I>resourceId</I> : if the <B>-id</B> option is given, the id <I>resourceId</I> (see RESOURCE IDS below) is used to specify the resource whose attributes must be returned or set. - The id must be a number: to specify a name use the <B>-name</B> option. - - -<DT><B>-name</B> <I>resourceName</I><DD> - If the <B>-name</B> option is specified, the resource named <I>resourceName</I> is + The id must be a number: to specify a name use the <B>-name</B> option.<P> <LI> <B>-name</B> <I>resourceName</I> : if the <B>-name</B> option is specified, the resource named <I>resourceName</I> is used. - - -</DL> - -<DT><A NAME="anchor8"></A> <B>resource attributes</B> <I>resourceRef</I> <I>option</I> <I>resourceType</I> <I>value</I><DD> - To give the value <I>value</I> to the attributes of the resource specified by - the argument <I>option</I> in the resource map designated by the <I>resourceRef</I> - argument. The resource can be specified using either the <B>-id</B> or the - <B>-name</B> as indicated above. - - <P>Note that the <B>resource attributes</B> command is available only since +</UL><P><H4><A NAME="M8"></A><B>resource attributes</B> <I>resourceRef</I> <I>option</I> <I>resourceType</I> <I>value</I> </H4> + To give the value <I>value</I> to the attributes of the resource specified by + the argument <I>option</I> in the resource map designated by the <I>resourceRef</I> + argument. The resource can be specified using either the <B>-id</B> or the + <B>-name</B> as indicated above.<P><P> Note that the <B>resource attributes</B> command is available only since version 1.1 of the Tclresource extension. See RESOURCE ATTRIBUTES below - for details about the possible values for attributes. - -</DL> - -<DT><A NAME="anchor9"></A> <B>resource close</B> <I>resourceRef</I><DD> + for details about the possible values for attributes.<P><H3><A NAME="M9"></A><B>resource close</B> <I>resourceRef</I> </H3> Closes the given resource reference (obtained from resource open). - Resources from that resource file will no longer be available. - -<DT><A NAME="anchor10"></A> <B>resource delete</B> ?<I>options</I>? <I>resourceType</I><DD> - This command will delete the resource specified by <I>options</I> and type - <I>resourceType</I> (see RESOURCE TYPES below). The options give you several - ways to specify the resource to be deleted. - -<DL> - -<DT><B>-id</B> <I>resourceId</I><DD> - If the <B>-id</B> option is given the id <I>resourceId</I> (see RESOURCE IDS below) is + Resources from that resource file will no longer be available.<P><H3><A NAME="M10"></A><B>resource delete</B> ?<I>options</I> ? <I>resourceType</I> </H3> + This command will delete the resource specified by <I>options</I> and type + <I>resourceType</I> (see RESOURCE TYPES below). The options give you several + ways to specify the resource to be deleted.<P><UL> + <LI> <B>-id</B> <I>resourceId</I> : if the <B>-id</B> option is given the id <I>resourceId</I> (see RESOURCE IDS below) is used to specify the resource to be deleted. The id must be a number: to - specify a name use the <B>-name</B> option. - -<DT><B>-name</B> <I>resourceName</I><DD> - If <B>-name</B> is specified, the resource named <I>resourceName</I> will be deleted. - If the <B>-id</B> is also provided, then there must be a resource with BOTH this + specify a name use the <B>-name</B> option.<P> <LI> <B>-name</B> <I>resourceName</I> : if <B>-name</B> is specified, the resource named <I>resourceName</I> will be deleted. + If the <B>-id</B> is also provided, then there must be a resource with BOTH this name and this id. If no name is provided, then the id will be used - regardless of the name of the actual resource. - -<DT><B>-file</B> <I>resourceRef</I><DD> - If the <B>-file</B> option is specified then the resource will be deleted from - the file pointed to by <I>resourceRef</I>. Otherwise the first resource with the - given <I>resourceName</I> and or <I>resourceId</I> which is found on the resource file + regardless of the name of the actual resource.<P> <LI> <B>-file</B> <I>resourceRef</I> : if the <B>-file</B> option is specified then the resource will be deleted from + the file pointed to by <I>resourceRef</I> . Otherwise the first resource with the + given <I>resourceName</I> and or <I>resourceId</I> which is found on the resource file path will be deleted. To inspect the file path, use the resource files command. - -</DL> - -<DT><A NAME="anchor11"></A> <B>resource fork</B> <I>resourceRef</I><DD> + +</UL><P><H3><A NAME="M11"></A><B>resource fork</B> <I>resourceRef</I> </H3> Returns which fork (either data fork or resource fork) contains - the resource map specified by the argument <I>resourceRef</I>. The return value - will be <I>datafork</I>, <I>resourcefork</I> or <I>unknown</I>. The value <I>unknown</I> is returned - for the resource maps listed by the command <B>resource list</B> which were not + the resource map specified by the argument <I>resourceRef</I> . The return value + will be <I>datafork</I> , <I>resourcefork</I> or <I>unknown</I> . The value <I>unknown</I> is returned + for the resource maps listed by the command <B>resource list</B> which were not opened explicitely by a resource open command but were already in memory. - - <P>Note that the <B>resource fork</B> command is available only since version 1.1 - of the Tclresource extension. - -<DT><A NAME="anchor12"></A> <B>resource files</B> ?<I>resourceRef</I>?<DD> +<P> Note that the <B>resource fork</B> command is available only since version 1.1 + of the Tclresource extension.<P><H3><A NAME="M12"></A><B>resource files</B> ?<I>resourceRef</I> ?</H3> If resourceRef is not provided, this command returns a Tcl list of the resource references for all the currently open resource files. The list - is in the normal Macintosh search order for resources. If <I>resourceRef</I> is + is in the normal Macintosh search order for resources. If <I>resourceRef</I> is specified, the command will return the path to the file whose resource - fork is represented by that token. - -<DT><A NAME="anchor13"></A> <B>resource id</B> <I>resourceType</I> <I>resourceName</I> <I>resourceRef</I><DD> - Returns the id of the resource of type <I>resourceType</I> with name - <I>resourceName</I> in the resource map designated by the argument <I>resourceRef</I>. - This is the reverse of command [resource name]. - -<DT><A NAME="anchor14"></A> <B>resource list</B> ?<I>-ids</I>? <I>resourceType</I> ?<I>resourceRef</I>?<DD> - List all of the resources ids of type <I>resourceType</I> (see RESOURCE TYPES - below). If <I>resourceRef</I> is specified then the command will limit the + fork is represented by that token.<P><H3><A NAME="M13"></A><B>resource id</B> <I>resourceType</I> <I>resourceName</I> <I>resourceRef</I> </H3> + Returns the id of the resource of type <I>resourceType</I> with name + <I>resourceName</I> in the resource map designated by the argument <I>resourceRef</I> . + This is the reverse of command [resource name].<P><H3><A NAME="M14"></A><B>resource list</B> ?<I>-ids</I> ? <I>resourceType</I> ?<I>resourceRef</I> ?</H3> + List all of the resources ids of type <I>resourceType</I> (see RESOURCE TYPES + below). If <I>resourceRef</I> is specified then the command will limit the search to that particular resource file. Otherwise, all resource files currently opened by the application will be searched. A Tcl list of either the resource name's or resource id's of the found resources will be returned: each time the name of the resource is not empty, it is used - preferably to the id, unless the <I>-ids</I> option has been specified, in + preferably to the id, unless the <I>-ids</I> option has been specified, in which case only id's are returned. See the RESOURCE IDS section below for more details about what a resource id is. - - <P>Note that the <I>-ids</I> option is only available since version 1.1 of the - Tclresource extension. - -<DT><A NAME="anchor15"></A> <B>resource name</B> <I>resourceType</I> <I>resourceId</I> <I>resourceRef</I><DD> - Returns the (possibly empty) name of the resource of type <I>resourceType</I> - with ID <I>resourceId</I> in the resource map designated by the argument - <I>resourceRef</I>. This is the reverse of command [resource id]. - -<DT><A NAME="anchor16"></A> <B>resource open</B> ?(<I>-datafork</I>|<I>-resourcefork</I>)? <I>fileName</I> ?<I>access</I>?<DD> - Open the resource map for the file <I>fileName</I>. On OSX, resources can be +<P> Note that the <I>-ids</I> option is only available since version 1.1 of the + Tclresource extension.<P><H3><A NAME="M15"></A><B>resource name</B> <I>resourceType</I> <I>resourceId</I> <I>resourceRef</I> </H3> + Returns the (possibly empty) name of the resource of type <I>resourceType</I> + with ID <I>resourceId</I> in the resource map designated by the argument + <I>resourceRef</I> . This is the reverse of command [resource id].<P><H3><A NAME="M16"></A><B>resource open</B> ?(<I>-datafork</I> |<I>-resourcefork</I> )? <I>fileName</I> ?<I>access</I> ?</H3> + Open the resource map for the file <I>fileName</I> . On OSX, resources can be stored either in the resource fork of the file or in the data fork of the file. By default, resource open will try to find resources in the data fork of the file, then, if none is found, in its resource fork. This - behavior can be modified with one of the <I>-datafork</I> or <I>-resourcefork</I> + behavior can be modified with one of the <I>-datafork</I> or <I>-resourcefork</I> switches which force the command to search only in the data fork or the resource fork respectively. Standard file access permissions may also be - specified with the <I>access</I> optional argument (see the manual entry for - open for details). A resource reference (<I>resourceRef</I>) is returned that + specified with the <I>access</I> optional argument (see the manual entry for + open for details). A resource reference (<I>resourceRef</I> ) is returned that can be used by the other resource commands to refer to this opened - resource map. - - <P>An error can occur if the file doesn't exist or the file does not have + resource map.<P><P> An error can occur if the file doesn't exist or the file does not have resources in the data or the resource fork. However, if you open the file with write permissions the file and/or resource fork will be created - instead of generating an error: the <I>-datafork</I> or <I>-resourcefork</I> switches + instead of generating an error: the <I>-datafork</I> or <I>-resourcefork</I> switches let you specify which kind of resource file should be created (data fork - resource file or resource fork resource file). If neither <I>-datafork</I> nor - <I>-resourcefork</I> are specified, a data fork resource file is created by - default. - - <P>Note that the <I>-datafork</I> and <I>-resourcefork</I> switches are only available - since version 1.1 of the Tclresource extension. - -<DT><A NAME="anchor17"></A> <B>resource read</B> <I>resourceType</I> <I>resourceId</I> ?<I>resourceRef</I>?<DD> - Read the entire resource of type <I>resourceType</I> (see RESOURCE TYPES below) - and the name or id of <I>resourceId</I> (see RESOURCE IDS below) into memory and - return the result. If <I>resourceRef</I> is specified we limit our search to + resource file or resource fork resource file). If neither <I>-datafork</I> nor + <I>-resourcefork</I> are specified, a data fork resource file is created by + default.<P><P> Note that the <I>-datafork</I> and <I>-resourcefork</I> switches are only available + since version 1.1 of the Tclresource extension.<P><H3><A NAME="M17"></A><B>resource read</B> <I>resourceType</I> <I>resourceId</I> ?<I>resourceRef</I> ?</H3> + Read the entire resource of type <I>resourceType</I> (see RESOURCE TYPES below) + and the name or id of <I>resourceId</I> (see RESOURCE IDS below) into memory and + return the result. If <I>resourceRef</I> is specified we limit our search to that resource file, otherwise we search all open resource forks in the application. It is important to note that most Macintosh resource use a binary format and the data returned from this command may have embedded - NULLs or other non-ASCII data. - -<DT><A NAME="anchor18"></A> <B>resource types</B> ?<I>resourceRef</I>?<DD> + NULLs or other non-ASCII data.<P><H3><A NAME="M18"></A><B>resource types</B> ?<I>resourceRef</I> ?</H3> This command returns a Tcl list of all resource types (see RESOURCE - TYPES below) found in the resource file pointed to by <I>resourceRef</I>. If - <I>resourceRef</I> is not specified it will return all the resource types found - in every resource file currently opened by the application. - -<DT><A NAME="anchor19"></A> <B>resource update</B> <I>resourceRef</I><DD> - This command updates the resource map designated by the <I>resourceRef</I> + TYPES below) found in the resource file pointed to by <I>resourceRef</I> . If + <I>resourceRef</I> is not specified it will return all the resource types found + in every resource file currently opened by the application.<P><H3><A NAME="M19"></A><B>resource update</B> <I>resourceRef</I> </H3> + This command updates the resource map designated by the <I>resourceRef</I> argument. It performs three tasks: -<UL> +<UL> <LI> changing, adding, or removing resource data in the fork on disk to - match the resource map in memory; + match the resource map in memory; <LI> compacting the resource fork, closing up any empty space created when - a resource was removed, made smaller, or made larger; + a resource was removed, made smaller, or made larger; <LI> writing the resource map in memory to the resource fork. - -</UL> - - Because the [resource close] command calls [resource update] before it +</UL><P> Because the [resource close] command calls [resource update] before it closes the resource fork, you need to call it directly only if you want - to update the file without closing it. - - <P>Note that the <B>resource update</B> command is available only since version - 1.1 of the Tclresource extension. - -<DT><A NAME="anchor20"></A> <B>resource write</B> ?<I>options</I>? <I>resourceType</I> <I>data</I><DD> - This command will write the passed in <I>data</I> as a new resource of type - <I>resourceType</I> (see RESOURCE TYPES below). Several options are available - that describe where and how the resource is stored. -<DL> - -<DT><B>-id</B> <I>resourceId</I><DD> - If the <B>-id</B> option is given the id <I>resourceId</I> (see RESOURCE IDS below) is + to update the file without closing it.<P><P> Note that the <B>resource update</B> command is available only since version + 1.1 of the Tclresource extension.<P><H3><A NAME="M20"></A><B>resource write</B> ?<I>options</I> ? <I>resourceType</I> <I>data</I> </H3> + This command will write the passed in <I>data</I> as a new resource of type + <I>resourceType</I> (see RESOURCE TYPES below). Several options are available + that describe where and how the resource is stored.<P><UL> + <LI> <B>-id</B> <I>resourceId</I> : if the <B>-id</B> option is given the id <I>resourceId</I> (see RESOURCE IDS below) is used for the new resource, otherwise a unique id will be generated that will not conflict with any existing resource. However, the id must be a - number: to specify a name use the <B>-name</B> option. - - -<DT><B>-name</B> <I>resourceName</I><DD> - If <B>-name</B> is specified the resource will be named <I>resourceName</I>, otherwise - it will have the empty string as the name. - - -<DT><B>-file</B> <I>resourceRef</I><DD> - If the <B>-file</B> option is specified then the resource will be written in - the file pointed to by <I>resourceRef</I>, otherwise the most recently open - resource will be used. - - -<DT><B>-force</B><DD> - If the target resource already exists, then by default Tcl will not - overwrite it, but raise an error instead. Use the <B>-force</B> flag to force + number: to specify a name use the <B>-name</B> option.<P> <LI> <B>-name</B> <I>resourceName</I> : if <B>-name</B> is specified the resource will be named <I>resourceName</I> , otherwise + it will have the empty string as the name.<P> <LI> <B>-file</B> <I>resourceRef<... [truncated message content] |
From: Bernard D. <bde...@us...> - 2004-09-07 08:22:29
|
Update of /cvsroot/tclresource/Help In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1270 Removed Files: .DS_Store Log Message: rm --- .DS_Store DELETED --- |
From: Bernard D. <bde...@us...> - 2004-09-07 08:20:58
|
Update of /cvsroot/tclresource/Help In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv980 Removed Files: tclresource.n Log Message: rm --- tclresource.n DELETED --- |
From: Bernard D. <bde...@us...> - 2004-09-07 08:20:39
|
Update of /cvsroot/tclresource/Help In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv877 Added Files: resource.n Log Message: Renamed resource.n instead of tclresource.n --- NEW FILE: resource.n --- .de uline \Z'\\$1'\v'.25m'\D'l \w'\\$1'u 0'\v'-.25m' .. .TH resource n "" "2004-09-07" "Tclresource extension for Tcl " .cs \fBAbstract\fR .ce .RS This is a manual page for the Tclresource extension for Tcl. .RE .RS -7 .RS 4 NAME .RE 4 .RS 4 SYNOPSIS .RE 4 .RS 4 INTRODUCTION .RE 4 .RS 8 ((b resource attributes b)) ((i resourceRef i)) ?((i option i)) ((i resourceType i)) ? ?((i value i)) ? .RE 8 .RS 12 ((b resource attributes b)) ((i resourceRef i)) .RE 12 .RS 12 ((b resource attributes b)) ((i resourceRef i)) ((i value i)) .RE 12 .RS 12 ((b resource attributes b)) ((i resourceRef i)) ((i option i)) ((i resourceType i)) .RE 12 .RS 12 ((b resource attributes b)) ((i resourceRef i)) ((i option i)) ((i resourceType i)) ((i value i)) .RE 12 .RS 8 ((b resource close b)) ((i resourceRef i)) .RE 8 .RS 8 ((b resource delete b)) ?((i options i)) ? ((i resourceType i)) .RE 8 .RS 8 ((b resource fork b)) ((i resourceRef i)) .RE 8 .RS 8 ((b resource files b)) ?((i resourceRef i)) ? .RE 8 .RS 8 ((b resource id b)) ((i resourceType i)) ((i resourceName i)) ((i resourceRef i)) .RE 8 .RS 8 ((b resource list b)) ?((i -ids i)) ? ((i resourceType i)) ?((i resourceRef i)) ? .RE 8 .RS 8 ((b resource name b)) ((i resourceType i)) ((i resourceId i)) ((i resourceRef i)) .RE 8 .RS 8 ((b resource open b)) ?(((i -datafork i)) |((i -resourcefork i)) )? ((i fileName i)) ?((i access i)) ? .RE 8 .RS 8 ((b resource read b)) ((i resourceType i)) ((i resourceId i)) ?((i resourceRef i)) ? .RE 8 .RS 8 ((b resource types b)) ?((i resourceRef i)) ? .RE 8 .RS 8 ((b resource update b)) ((i resourceRef i)) .RE 8 .RS 8 ((b resource write b)) ?((i options i)) ? ((i resourceType i)) ((i data i)) .RE 8 .RS 4 RESOURCE TYPES .RE 4 .RS 4 RESOURCE IDS .RE 4 .RS 4 RESOURCE ATTRIBUTES .RE 4 .RS 4 PORTABILITY ISSUES .RE 4 .RS 4 VERSION HISTORY .RE 4 .RS 4 KNOW ISSUES .RE 4 .RS 4 LICENSE AND DISCLAIMER .RE 4 .RS 4 SOURCE CODE .RE 4 .RS 4 SEE ALSO .RE 4 .RS 4 KEYWORDS .RE 4 .RE .PP \l'70\(ul' .PP .SH NAME .PP resource - Manipulate Macintosh resources .SH SYNOPSIS .PP .RS .nf .sp package require resource 1.1 resource subcommand ?arg arg ...? .fi .RE .sp .SH INTRODUCTION .PP The resource command provides some generic operations for dealing with Macintosh resources. This command is only supported on the Macintosh platform. Prior to system OSX, each Macintosh file consisted of two forks: a data fork and a resource fork. Since the advent of system OSX, resources can also be stored in the data fork (this is the recommended format for portability reasons: resource forks tend to be otherwise deleted when copied on another platform). You use the normal open, puts, close, etc. commands to manipulate the data fork but you must use this command, however, to interact with the resource map, even if it is stored in the data fork. In a resource map, resources are categorized by type and, in each type, are designated by an ID and possibly a name. See RESOURCE TYPES and RESOURCE IDS below for details. On OSX, the resource command is not a built-in command of Tcl anymore. It is made available by this extension which much be explicitely loaded with a package require instruction like this: .RS .nf .sp package require resource 1.1 .fi .RE .sp \fI Subcommand\fP indicates what operation to perform. Any unique abbreviation for \fI subcommand\fP is acceptable. The valid \fI subcommands\fP are explained in the next sections. .SH\s-1 \fBresource attributes\fP \fI resourceRef\fP ?\fI option\fP \fI resourceType\fP ? ?\fI value\fP ?\s+1 .PP This command is used to get or set the attributes of the resource map or the attributes of a particular resource in the resource map. It has four different syntaxes: .SS \fBresource attributes\fP \fI resourceRef\fP .PP To get the attributes of the resource map specified by the \fI resourceRef\fP argument. .SS \fBresource attributes\fP \fI resourceRef\fP \fI value\fP .PP To give the value \fI value\fP to the attributes of the resource map specified by the \fI resourceRef\fP argument. .SS \fBresource attributes\fP \fI resourceRef\fP \fI option\fP \fI resourceType\fP .PP To get the attributes of the resource specified by the argument \fI option\fP in the resource map designated by the \fI resourceRef\fP argument. The option can be one of: .RS .IP * 4 \fB-id\fP \fI resourceId\fP : if the \fB-id\fP option is given, the id \fI resourceId\fP (see RESOURCE IDS below) is used to specify the resource whose attributes must be returned or set. The id must be a number: to specify a name use the \fB-name\fP option. .IP * 4 \fB-name\fP \fI resourceName\fP : if the \fB-name\fP option is specified, the resource named \fI resourceName\fP is used. .RE .SS \fBresource attributes\fP \fI resourceRef\fP \fI option\fP \fI resourceType\fP \fI value\fP .PP To give the value \fI value\fP to the attributes of the resource specified by the argument \fI option\fP in the resource map designated by the \fI resourceRef\fP argument. The resource can be specified using either the \fB-id\fP or the \fB-name\fP as indicated above. .PP Note that the \fBresource attributes\fP command is available only since version 1.1 of the Tclresource extension. See RESOURCE ATTRIBUTES below for details about the possible values for attributes. .SH\s-1 \fBresource close\fP \fI resourceRef\fP \s+1 .PP Closes the given resource reference (obtained from resource open). Resources from that resource file will no longer be available. .SH\s-1 \fBresource delete\fP ?\fI options\fP ? \fI resourceType\fP \s+1 .PP This command will delete the resource specified by \fI options\fP and type \fI resourceType\fP (see RESOURCE TYPES below). The options give you several ways to specify the resource to be deleted. ((lu ((li \fB-id\fP \fI resourceId\fP : if the \fB-id\fP option is given the id \fI resourceId\fP (see RESOURCE IDS below) is used to specify the resource to be deleted. The id must be a number: to specify a name use the \fB-name\fP option. ((li \fB-name\fP \fI resourceName\fP : if \fB-name\fP is specified, the resource named \fI resourceName\fP will be deleted. If the \fB-id\fP is also provided, then there must be a resource with BOTH this name and this id. If no name is provided, then the id will be used regardless of the name of the actual resource. ((li \fB-file\fP \fI resourceRef\fP : if the \fB-file\fP option is specified then the resource will be deleted from the file pointed to by \fI resourceRef\fP . Otherwise the first resource with the given \fI resourceName\fP and or \fI resourceId\fP which is found on the resource file path will be deleted. To inspect the file path, use the resource files command. lu)) .SH\s-1 \fBresource fork\fP \fI resourceRef\fP \s+1 .PP Returns which fork (either data fork or resource fork) contains the resource map specified by the argument \fI resourceRef\fP . The return value will be \fI datafork\fP , \fI resourcefork\fP or \fI unknown\fP . The value \fI unknown\fP is returned for the resource maps listed by the command \fBresource list\fP which were not opened explicitely by a resource open command but were already in memory. .PP Note that the \fBresource fork\fP command is available only since version 1.1 of the Tclresource extension. .SH\s-1 \fBresource files\fP ?\fI resourceRef\fP ?\s+1 .PP If resourceRef is not provided, this command returns a Tcl list of the resource references for all the currently open resource files. The list is in the normal Macintosh search order for resources. If \fI resourceRef\fP is specified, the command will return the path to the file whose resource fork is represented by that token. .SH\s-1 \fBresource id\fP \fI resourceType\fP \fI resourceName\fP \fI resourceRef\fP \s+1 .PP Returns the id of the resource of type \fI resourceType\fP with name \fI resourceName\fP in the resource map designated by the argument \fI resourceRef\fP . This is the reverse of command [resource name]. .SH\s-1 \fBresource list\fP ?\fI -ids\fP ? \fI resourceType\fP ?\fI resourceRef\fP ?\s+1 .PP List all of the resources ids of type \fI resourceType\fP (see RESOURCE TYPES below). If \fI resourceRef\fP is specified then the command will limit the search to that particular resource file. Otherwise, all resource files currently opened by the application will be searched. A Tcl list of either the resource name's or resource id's of the found resources will be returned: each time the name of the resource is not empty, it is used preferably to the id, unless the \fI -ids\fP option has been specified, in which case only id's are returned. See the RESOURCE IDS section below for more details about what a resource id is. .PP Note that the \fI -ids\fP option is only available since version 1.1 of the Tclresource extension. .SH\s-1 \fBresource name\fP \fI resourceType\fP \fI resourceId\fP \fI resourceRef\fP \s+1 .PP Returns the (possibly empty) name of the resource of type \fI resourceType\fP with ID \fI resourceId\fP in the resource map designated by the argument \fI resourceRef\fP . This is the reverse of command [resource id]. .SH\s-1 \fBresource open\fP ?(\fI -datafork\fP |\fI -resourcefork\fP )? \fI fileName\fP ?\fI access\fP ?\s+1 .PP Open the resource map for the file \fI fileName\fP . On OSX, resources can be stored either in the resource fork of the file or in the data fork of the file. By default, resource open will try to find resources in the data fork of the file, then, if none is found, in its resource fork. This behavior can be modified with one of the \fI -datafork\fP or \fI -resourcefork\fP switches which force the command to search only in the data fork or the resource fork respectively. Standard file access permissions may also be specified with the \fI access\fP optional argument (see the manual entry for open for details). A resource reference (\fI resourceRef\fP ) is returned that can be used by the other resource commands to refer to this opened resource map. .PP An error can occur if the file doesn't exist or the file does not have resources in the data or the resource fork. However, if you open the file with write permissions the file and/or resource fork will be created instead of generating an error: the \fI -datafork\fP or \fI -resourcefork\fP switches let you specify which kind of resource file should be created (data fork resource file or resource fork resource file). If neither \fI -datafork\fP nor \fI -resourcefork\fP are specified, a data fork resource file is created by default. .PP Note that the \fI -datafork\fP and \fI -resourcefork\fP switches are only available since version 1.1 of the Tclresource extension. .SH\s-1 \fBresource read\fP \fI resourceType\fP \fI resourceId\fP ?\fI resourceRef\fP ?\s+1 .PP Read the entire resource of type \fI resourceType\fP (see RESOURCE TYPES below) and the name or id of \fI resourceId\fP (see RESOURCE IDS below) into memory and return the result. If \fI resourceRef\fP is specified we limit our search to that resource file, otherwise we search all open resource forks in the application. It is important to note that most Macintosh resource use a binary format and the data returned from this command may have embedded NULLs or other non-ASCII data. .SH\s-1 \fBresource types\fP ?\fI resourceRef\fP ?\s+1 .PP This command returns a Tcl list of all resource types (see RESOURCE TYPES below) found in the resource file pointed to by \fI resourceRef\fP . If \fI resourceRef\fP is not specified it will return all the resource types found in every resource file currently opened by the application. .SH\s-1 \fBresource update\fP \fI resourceRef\fP \s+1 .PP This command updates the resource map designated by the \fI resourceRef\fP argument. It performs three tasks: .RS .IP * 8 changing, adding, or removing resource data in the fork on disk to match the resource map in memory; .IP * 8 compacting the resource fork, closing up any empty space created when a resource was removed, made smaller, or made larger; .IP * 8 writing the resource map in memory to the resource fork. .RE Because the [resource close] command calls [resource update] before it closes the resource fork, you need to call it directly only if you want to update the file without closing it. .PP Note that the \fBresource update\fP command is available only since version 1.1 of the Tclresource extension. .SH\s-1 \fBresource write\fP ?\fI options\fP ? \fI resourceType\fP \fI data\fP \s+1 .PP This command will write the passed in \fI data\fP as a new resource of type \fI resourceType\fP (see RESOURCE TYPES below). Several options are available that describe where and how the resource is stored. .RS .IP * 8 \fB-id\fP \fI resourceId\fP : if the \fB-id\fP option is given the id \fI resourceId\fP (see RESOURCE IDS below) is used for the new resource, otherwise a unique id will be generated that will not conflict with any existing resource. However, the id must be a number: to specify a name use the \fB-name\fP option. .IP * 8 \fB-name\fP \fI resourceName\fP : if \fB-name\fP is specified the resource will be named \fI resourceName\fP , otherwise it will have the empty string as the name. .IP * 8 \fB-file\fP \fI resourceRef\fP : if the \fB-file\fP option is specified then the resource will be written in the file pointed to by \fI resourceRef\fP , otherwise the most recently open resource will be used. .IP * 8 \fB-force\fP : if the target resource already exists, then by default Tcl will not overwrite it, but raise an error instead. Use the \fB-force\fP flag to force overwriting the existant resource. .RE .SH RESOURCE TYPES .PP Resource types are defined as a four character string that is then mapped to an underlying id. For example, TEXT refers to the Macintosh resource type for text. The type STR# is a list of counted strings. All Macintosh resources must be of some type. See Macintosh documentation for a more complete list of resource types that are commonly used. .SH RESOURCE IDS .PP For this command the notion of a resource id actually refers to two ideas in Macintosh resources. Every place you can use a resource Id you can use either the resource name or a resource number. Names are always searched or returned in preference to numbers. For example, the resource list command will return names if they exist or numbers if the name is NULL. .SH RESOURCE ATTRIBUTES .PP Resource maps and individual resources have attributes. The attributes for resource maps are: .PP .TS center, box; l | l | l. mapChanged 32 Write map out at update mapCompact 64 Compact resource file when writing to disk mapReadOnly 128 Resource file is read-only .TE The attributes are additional values. To set both the \fI mapReadOnly\fP and \fI mapChanged\fP attributes for the resource map with reference \fI resourceRef\fP , one would write: .RS .nf .sp resource attributes ((i resourceRef i)) 160 .fi .RE .sp The allowable attributes for individual resources are: .PP .TS center, box; l | l | l. resChanged 2 Resource changed resPreload 4 Load in on OpenResFile resProtected 8 Protected resLocked 16 Load it in locked resPurgeable 32 Purgeable resource resSysHeap 64 System or application heap .TE .SH PORTABILITY ISSUES .PP The resource command is only available on Macintosh. On systems older than OSX, the resource command was built in Tcl but it was removed from the versions of Tcl compiled for OSX. It is now made available as an extension which should be loaded in the scripts with the following instruction: .RS .nf .sp package require resource 1.1 .fi .RE .sp Version 1.0 of the extension is simply a port to OSX of the old \fBresource\fP command: it does not handle data fork resource files. Support for data fork resource files is introduced in version 1.1. .SH VERSION HISTORY .PP .RS .IP * 8 1.0 - 03/09/25 - First release of the extension for OSX. .IP * 8 1.1 - 03/10/05 - Support for data fork resources, attributes, update, name. .IP * 8 1.1.4 - 04/09/07 - Fixed a bug related to permissions. Added a complete tests suite. Better error messages. .RE .SH KNOW ISSUES .PP The [resource] command has been ported to OSX as a Tcl extension by Bernard Desgraupes. Please e-mail any bug or problem you encounter: <bde...@us...> .PP Version 1.0 strictly corresponds to the old [resource] command included in the pre-OSX versions of Tcl. Version 1.1 added several improvements: .RS .IP * 8 possibility of opening and writing to datafork resource files as well as resource fork resource files. .IP * 8 new subcommand [resource attributes] to get/set the attributes of a resource map or an individual resource. .IP * 8 new subcommand [resource update] to update a resource map without closing it. .IP * 8 new subcommand [resource fork] to indicate which fork a resource map was opened from. .IP * 8 new subcommands [resource name] and [resource id] returning the name of a resource given its ID, and vice versa. .IP * 8 new \fI -ids\fP option for the [resource list] command .RE The Tclresource folder (Tclresource1.0, Tclresource1.1 etc) contains the extension compiled as a dynamic library. For the Tcl interpreter to find it automatically, it should be located on your system in /Library/Tcl/ (administrator password required) or in your personal folder ~/Library/Tcl/. .SH LICENSE AND DISCLAIMER .PP This software is free software and distributed under the same licensing terms as the Tcl language itself. See license.terms in the Tcl distribution. The original code of the resource command has the following copyright. .RS .nf .sp Copyright © 1997 Sun Microsystems, Inc. Copyright © 1995-1997 Roger E. Critchlow Jr. .fi .RE .sp For the Tclresource extension: .RS .nf .sp Copyright © 2003-2004 Bernard Desgraupes .fi .RE .sp .SH SOURCE CODE .PP Tclresource is an Open Source Project. Its source code is public and can be found on the SourceForge site at the following address: <http://sourceforge.net/projects/tclresource> .PP Tclresource binary releases are available at <http://sourceforge.net/project/showfiles.php?group_id=93101> or on my web page at <http://webperso.easyconnect.fr/bdesgraupes/tcl.html> .PP The code is under CVS control. You can retrieve the latest stage of development using any CVS client. See instructions at: <http://sourceforge.net/cvs/?group_id=93101> .PP You can browse the cvs repository online at <http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tclresource> .SH SEE ALSO .PP open .SH KEYWORDS .PP open, resource |
From: Bernard D. <bde...@us...> - 2004-09-07 07:24:35
|
Update of /cvsroot/tclresource/Extras/Tests/Forks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23434 Modified Files: BuildTestForks.tcl Log Message: Using [clock format] Index: BuildTestForks.tcl =================================================================== RCS file: /cvsroot/tclresource/Extras/Tests/Forks/BuildTestForks.tcl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- BuildTestForks.tcl 6 Sep 2004 07:18:08 -0000 1.1 +++ BuildTestForks.tcl 7 Sep 2004 07:24:26 -0000 1.2 @@ -1,7 +1,7 @@ # ------------------------------------------------------- # File: "BuildTestsFiles.tcl" # Created: 2004-09-05 07:54:17 -# Last modification: 2004-09-06 08:39:42 +# Last modification: 2004-09-07 08:10:21 # Author: Bernard Desgraupes # e-mail: <bde...@ea...> # www: <http://webperso.easyconnect.fr/bdesgraupes/> @@ -14,7 +14,9 @@ package require resource 1.1 -set date [ISOTime::ISODateAndTimeRelaxed] +# set date [ISOTime::ISODateAndTimeRelaxed] +set date [clock format [clock seconds]] + set testdir [file dir [info script]] # Build a datafork and a resourcefork resource file |
From: Bernard D. <bde...@us...> - 2004-09-07 07:23:55
|
Update of /cvsroot/tclresource/Extras/Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23214 Modified Files: CloseCmd.test DeleteCmd.test WriteCmd.test Log Message: Fixes for tclsh Index: DeleteCmd.test =================================================================== RCS file: /cvsroot/tclresource/Extras/Tests/DeleteCmd.test,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- DeleteCmd.test 7 Sep 2004 05:57:13 -0000 1.4 +++ DeleteCmd.test 7 Sep 2004 07:23:45 -0000 1.5 @@ -92,6 +92,7 @@ test ResourceDelete-1-8 {Delete resource in read-only map} -setup $SETUP -body { resource write -id 128 -name "Hello1" -file $rid TEXT "Hello1" + resource close $rid # Reopen read-only set rid [resource open $fname r] resource delete -id 128 -file $rid TEXT Index: WriteCmd.test =================================================================== RCS file: /cvsroot/tclresource/Extras/Tests/WriteCmd.test,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- WriteCmd.test 7 Sep 2004 05:18:35 -0000 1.4 +++ WriteCmd.test 7 Sep 2004 07:23:45 -0000 1.5 @@ -51,11 +51,18 @@ test ResourceWrite-1-4 {Omit the -file option, no fork opened} -setup { } -body { - # Since no resource fork has been opened, this will generate an error - resource write TEXT "Hello Tclresource!" + # Since no resource fork has been opened, the command attemps to + # write to the currently active res file. This may or may not + # generate an error. + set res "" + if {[catch {resource write TEXT "Hello Tclresource!"} res]} { + if {[string match $res "error adding resource to resource map"]} { + set res "" + } + } + set res } -cleanup { - } -returnCodes error \ - -result "error adding resource to resource map error releasing resource" + } -returnCodes [list error ok] -result "" test ResourceWrite-1-5 {Omit the -file option, fork opened} -setup $SETUP -body { # If a resource fork is open, this will write therein Index: CloseCmd.test =================================================================== RCS file: /cvsroot/tclresource/Extras/Tests/CloseCmd.test,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- CloseCmd.test 6 Sep 2004 07:01:06 -0000 1.1 +++ CloseCmd.test 7 Sep 2004 07:23:45 -0000 1.2 @@ -1,7 +1,7 @@ # ------------------------------------------------------- # File: "CloseCmd.test" # Created: 2004-09-05 20:16:33 -# Last modification: 2004-09-05 10:49:55 +# Last modification: 2004-09-07 08:45:31 # Author: Bernard Desgraupes # e-mail: <bde...@ea...> # www: <http://webperso.easyconnect.fr/bdesgraupes/> @@ -31,10 +31,18 @@ test ResourceClose-1-2 {Closing self is forbidden} -setup { } -body { - catch {resource close application} res + # Make sure "application" exists + if {[lsearch -exact [resource files] "application"] == -1} { + set res "" + } else { + catch {resource close application} res + if {[string match $res "not allowed to close \"application\" resource file"]} { + set res "" + } + } set res } -cleanup { - } -result "not allowed to close \"application\" resource file" + } -result "" test ResourceClose-1-3 {Close a non existing fork is an error} -setup { } -body { |
From: Bernard D. <bde...@us...> - 2004-09-07 05:57:23
|
Update of /cvsroot/tclresource/Extras/Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9702 Modified Files: DeleteCmd.test Log Message: Use temp file in test ResourceDelete-1-8 Index: DeleteCmd.test =================================================================== RCS file: /cvsroot/tclresource/Extras/Tests/DeleteCmd.test,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- DeleteCmd.test 7 Sep 2004 05:18:06 -0000 1.3 +++ DeleteCmd.test 7 Sep 2004 05:57:13 -0000 1.4 @@ -90,13 +90,12 @@ } -cleanup $CLEANUP -returnCodes error -match glob \ -result "resource cannot be deleted: it is protected." - test ResourceDelete-1-8 {Delete resource in read-only map} -setup { - set rid [resource open $resfileDF] - } -body { + test ResourceDelete-1-8 {Delete resource in read-only map} -setup $SETUP -body { + resource write -id 128 -name "Hello1" -file $rid TEXT "Hello1" + # Reopen read-only + set rid [resource open $fname r] resource delete -id 128 -file $rid TEXT - } -cleanup { - resource close $rid - } -returnCodes error -match glob \ + } -cleanup $CLEANUP -returnCodes error -match glob \ -result "cannot delete from resource file *, it was opened read only" # Cleanup |
From: Bernard D. <bde...@us...> - 2004-09-07 05:56:10
|
Update of /cvsroot/tclresource/Extras/Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9460 Modified Files: AttributesCmd.test Log Message: Use temp file in test ResourceAttributes-1-5 Index: AttributesCmd.test =================================================================== RCS file: /cvsroot/tclresource/Extras/Tests/AttributesCmd.test,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- AttributesCmd.test 7 Sep 2004 05:18:35 -0000 1.3 +++ AttributesCmd.test 7 Sep 2004 05:56:00 -0000 1.4 @@ -61,12 +61,18 @@ } -result 0 test ResourceAttributes-1-5 {Set resLocked attr for res in RW map} -setup { - set rid [resource open $resfileDF w] + # Use a temporary file in order not to corrupt resfileDF + set fname [file join [file dir [info script]] Forks TempFork.rsrc] + set rid [resource open $fname w+] } -body { + resource write -id 128 -file $rid TEXT "Hello1" # resLocked = 16 set res [resource attributes $rid -id 128 TEXT 16] } -cleanup { resource close $rid + if {[file exists $fname]} { + file delete $fname + } } -result "" test ResourceAttributes-1-6 {Set resLocked attr for single resource} -setup { |
From: Bernard D. <bde...@us...> - 2004-09-07 05:18:44
|
Update of /cvsroot/tclresource/Extras/Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4303 Modified Files: AttributesCmd.test ReadCmd.test WriteCmd.test all.tcl Log Message: Completing tests suite Index: ReadCmd.test =================================================================== RCS file: /cvsroot/tclresource/Extras/Tests/ReadCmd.test,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ReadCmd.test 6 Sep 2004 11:12:25 -0000 1.2 +++ ReadCmd.test 7 Sep 2004 05:18:35 -0000 1.3 @@ -1,7 +1,7 @@ # ------------------------------------------------------- # File: "ReadCmd.test" # Created: 2004-09-05 20:16:33 -# Last modification: 2004-09-05 10:49:55 +# Last modification: 2004-09-06 13:17:38 # Author: Bernard Desgraupes # e-mail: <bde...@ea...> # www: <http://webperso.easyconnect.fr/bdesgraupes/> @@ -56,8 +56,8 @@ resource close $rid } -returnCodes error -result "could not load resource" -# Cleanup -::tcltest::cleanupTests + # Cleanup + ::tcltest::cleanupTests } namespace delete ::resource::test Index: all.tcl =================================================================== RCS file: /cvsroot/tclresource/Extras/Tests/all.tcl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- all.tcl 6 Sep 2004 11:13:03 -0000 1.2 +++ all.tcl 7 Sep 2004 05:18:35 -0000 1.3 @@ -17,7 +17,6 @@ # $Revision$ # ------------------------------------------------------- - source [file join [file dir [info script]] common.tcl] puts stdout "Tcl $tcl_patchLevel tests running in interp: [info nameofexecutable]" @@ -30,7 +29,6 @@ eval tcltest::configure $argv } - # Skip and match variables puts stdout "Tests running in working dir: $::tcltest::testsDirectory" if {[llength $::tcltest::skip] > 0} { @@ -49,7 +47,7 @@ puts stdout "Starting tests [clock format [clock seconds]]" -# Now execute the tests suite +# # Now execute the tests suite # tcltest::runAllTests # Source each of the specified tests foreach file [lsort [::tcltest::getMatchingFiles]] { Index: AttributesCmd.test =================================================================== RCS file: /cvsroot/tclresource/Extras/Tests/AttributesCmd.test,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- AttributesCmd.test 6 Sep 2004 22:16:46 -0000 1.2 +++ AttributesCmd.test 7 Sep 2004 05:18:35 -0000 1.3 @@ -1,7 +1,7 @@ # ------------------------------------------------------- # File: "AttributesCmd.test" # Created: 2004-09-05 20:16:33 -# Last modification: 2004-09-06 23:24:58 +# Last modification: 2004-09-07 07:12:14 # Author: Bernard Desgraupes # e-mail: <bde...@ea...> # www: <http://webperso.easyconnect.fr/bdesgraupes/> @@ -89,6 +89,15 @@ } -returnCodes error -match glob \ -result "resource not found" + test ResourceAttributes-1-8 {Call on non-existing resource reference} -setup { + set rid [resource open $resfileDF] + } -body { + resource attributes foo + } -cleanup { + resource close $rid + } -returnCodes error -match glob \ + -result "invalid resource file reference*" + # Cleanup ::tcltest::cleanupTests } |
From: Bernard D. <bde...@us...> - 2004-09-07 05:18:17
|
Update of /cvsroot/tclresource/Extras/Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4211 Modified Files: DeleteCmd.test Log Message: 2 more tests with protected res or map Index: DeleteCmd.test =================================================================== RCS file: /cvsroot/tclresource/Extras/Tests/DeleteCmd.test,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- DeleteCmd.test 6 Sep 2004 20:58:49 -0000 1.2 +++ DeleteCmd.test 7 Sep 2004 05:18:06 -0000 1.3 @@ -82,6 +82,23 @@ } -cleanup $CLEANUP -returnCodes error -match glob \ -result "you must specify either -id or -name or both" + test ResourceDelete-1-7 {Delete a protected resource} -setup $SETUP -body { + resource write -id 128 -name "Hello1" -file $rid TEXT "Hello1" + # Set the resProtected flag (= 8) + resource attributes $rid -id 128 TEXT 8 + resource delete -id 128 -file $rid TEXT + } -cleanup $CLEANUP -returnCodes error -match glob \ + -result "resource cannot be deleted: it is protected." + + test ResourceDelete-1-8 {Delete resource in read-only map} -setup { + set rid [resource open $resfileDF] + } -body { + resource delete -id 128 -file $rid TEXT + } -cleanup { + resource close $rid + } -returnCodes error -match glob \ + -result "cannot delete from resource file *, it was opened read only" + # Cleanup ::tcltest::cleanupTests } |
From: Bernard D. <bde...@us...> - 2004-09-07 05:17:37
|
Update of /cvsroot/tclresource/Extras/Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4099 Modified Files: UpdateCmd.test Log Message: 2 tests Index: UpdateCmd.test =================================================================== RCS file: /cvsroot/tclresource/Extras/Tests/UpdateCmd.test,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- UpdateCmd.test 6 Sep 2004 07:04:17 -0000 1.1 +++ UpdateCmd.test 7 Sep 2004 05:17:28 -0000 1.2 @@ -1,7 +1,7 @@ # ------------------------------------------------------- # File: "UpdateCmd.test" # Created: 2004-09-05 20:16:33 -# Last modification: 2004-09-05 10:49:55 +# Last modification: 2004-09-07 07:09:08 # Author: Bernard Desgraupes # e-mail: <bde...@ea...> # www: <http://webperso.easyconnect.fr/bdesgraupes/> @@ -22,23 +22,30 @@ namespace eval ::resource::test { namespace import ::tcltest::* - test ResourceUpdate-1-1 {} -setup { + test ResourceUpdate-1-1 {Update a read-write map} -setup { + set rid [resource open $resfileDF w] } -body { + set res [resource update $rid] } -cleanup { + resource close $rid } -result "" - test ResourceUpdate-1-2 {} -setup { + test ResourceUpdate-1-2 {Update a read-only map} -setup { + set rid [resource open $resfileDF] } -body { + resource update $rid } -cleanup { - } -result "" + resource close $rid + } -returnCodes error -match glob \ + -result "error * updating resource map" - test ResourceUpdate-1-3 {} -setup { - } -body { - } -cleanup { - } -result "" +# test ResourceUpdate-1-3 {} -setup { +# } -body { +# } -cleanup { +# } -result "" -# Cleanup -::tcltest::cleanupTests + # Cleanup + ::tcltest::cleanupTests } namespace delete ::resource::test |
From: Bernard D. <bde...@us...> - 2004-09-06 22:17:22
|
Update of /cvsroot/tclresource/Extras/Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv440 Modified Files: WriteCmd.test Log Message: Added test with resProtected flag Index: WriteCmd.test =================================================================== RCS file: /cvsroot/tclresource/Extras/Tests/WriteCmd.test,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- WriteCmd.test 6 Sep 2004 16:56:37 -0000 1.2 +++ WriteCmd.test 6 Sep 2004 22:17:10 -0000 1.3 @@ -1,7 +1,7 @@ # ------------------------------------------------------- # File: "WriteCmd.test" # Created: 2004-09-05 20:16:33 -# Last modification: 2004-09-06 18:52:16 +# Last modification: 2004-09-07 00:15:04 # Author: Bernard Desgraupes # e-mail: <bde...@ea...> # www: <http://webperso.easyconnect.fr/bdesgraupes/> @@ -90,10 +90,14 @@ resource write -id 1000 -file $rid ALRT "\x00\x28\x00\x28\x00\x87\x01\x7c\x00\x80\x55\x55\x30\x0a" } -cleanup $CLEANUP -result "" -# test ResourceWrite-1-10 {} -setup { -# } -body { -# } -cleanup { -# } -result "" + test ResourceWrite-1-10 {Try to write a resProtected resource} -setup $SETUP -body { + resource write -id 1000 -file $rid TEXT "Hello Tclresource!" + # resProtected = 8 + resource attributes $rid -id 1000 TEXT 8 + # Try to force write over the resource + resource write -id 1000 -file $rid -force TEXT "Goodbye Tclresource!" + } -cleanup $CLEANUP -returnCodes error -match glob \ + -result "could not write resource id 1000 of type TEXT, it was protected." # Cleanup ::tcltest::cleanupTests |
From: Bernard D. <bde...@us...> - 2004-09-06 22:16:57
|
Update of /cvsroot/tclresource/Extras/Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv318 Modified Files: AttributesCmd.test Log Message: 7 tests Index: AttributesCmd.test =================================================================== RCS file: /cvsroot/tclresource/Extras/Tests/AttributesCmd.test,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- AttributesCmd.test 6 Sep 2004 07:00:42 -0000 1.1 +++ AttributesCmd.test 6 Sep 2004 22:16:46 -0000 1.2 @@ -1,7 +1,7 @@ # ------------------------------------------------------- # File: "AttributesCmd.test" # Created: 2004-09-05 20:16:33 -# Last modification: 2004-09-05 10:49:55 +# Last modification: 2004-09-06 23:24:58 # Author: Bernard Desgraupes # e-mail: <bde...@ea...> # www: <http://webperso.easyconnect.fr/bdesgraupes/> @@ -19,26 +19,78 @@ source [file join [file dir [info script]] common.tcl] + namespace eval ::resource::test { namespace import ::tcltest::* + - test ResourceAttributes-1-1 {} -setup { + test ResourceAttributes-1-1 {Get attributes for read-only map} -setup { + set rid [resource open $resfileDF] } -body { + # Attributes should be 128 (mapReadOnly) since we opened + # with no specified permission (which defaults to "r") + set res [resource attributes $rid] } -cleanup { - } -result "" - - test ResourceAttributes-1-2 {} -setup { + resource close $rid + } -result 128 + + test ResourceAttributes-1-2 {Set mapChanged flag for map} -setup { + set rid [resource open $resfileDF] } -body { + resource attributes $rid 32 + set res [resource attributes $rid] } -cleanup { - } -result "" - - test ResourceAttributes-1-3 {} -setup { + resource close $rid + } -result 32 + + test ResourceAttributes-1-3 {Get attributes for read-write map} -setup { + set rid [resource open $resfileDF w] + } -body { + # Attributes should be 0 since we opened with "w" permission + set res [resource attributes $rid] + } -cleanup { + resource close $rid + } -result 0 + + test ResourceAttributes-1-4 {Get attributes for single resource} -setup { + set rid [resource open $resfileDF] } -body { + set res [resource attributes $rid -id 128 TEXT] + } -cleanup { + resource close $rid + } -result 0 + + test ResourceAttributes-1-5 {Set resLocked attr for res in RW map} -setup { + set rid [resource open $resfileDF w] + } -body { + # resLocked = 16 + set res [resource attributes $rid -id 128 TEXT 16] } -cleanup { + resource close $rid } -result "" - -# Cleanup -::tcltest::cleanupTests + + test ResourceAttributes-1-6 {Set resLocked attr for single resource} -setup { + set rid [resource open $resfileDF] + } -body { + # This should fail because the fork has been opened read-only + resource attributes $rid -id 128 TEXT 16 + } -cleanup { + resource close $rid + } -returnCodes error -match glob \ + -result "cannot set the attributes, resource map is read only" + + test ResourceAttributes-1-7 {Use non existing -id} -setup { + set rid [resource open $resfileDF] + } -body { + # Attributes should be 0 since we opened with "w" permission + set res [resource attributes $rid -id 1000 TEXT] + } -cleanup { + resource close $rid + } -returnCodes error -match glob \ + -result "resource not found" + + # Cleanup + ::tcltest::cleanupTests } namespace delete ::resource::test |
From: Bernard D. <bde...@us...> - 2004-09-06 21:40:53
|
Update of /cvsroot/tclresource/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26142 Modified Files: tclResourceOSX.c Log Message: Tcl_SetIntObj to return attributes value Index: tclResourceOSX.c =================================================================== RCS file: /cvsroot/tclresource/Source/tclResourceOSX.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- tclResourceOSX.c 6 Sep 2004 05:08:10 -0000 1.13 +++ tclResourceOSX.c 6 Sep 2004 21:40:29 -0000 1.14 @@ -394,7 +394,7 @@ (char *) NULL); return TCL_ERROR; } else { - Tcl_SetObjResult(interp, Tcl_NewIntObj(theAttrs) ); + Tcl_SetIntObj(resultPtr, theAttrs); return TCL_OK; } } @@ -554,7 +554,7 @@ result = TCL_ERROR; goto attributesDone; } else { - Tcl_SetObjResult(interp, Tcl_NewIntObj(theAttrs) ); + Tcl_SetIntObj(resultPtr, theAttrs); result = TCL_OK; } } |
From: Bernard D. <bde...@us...> - 2004-09-06 20:59:32
|
Update of /cvsroot/tclresource/Extras/Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18608 Added Files: TestSuite.readme Log Message: First checkin --- NEW FILE: TestSuite.readme --- File "TestSuite.readme" The Tclresource tests suite requires the tcltest Tcl package to be available (it is a part of all the standard distributions). To execute the complete suite, source the file "all.tcl". This is a master file which will invoke all the command-specific test files (AttributesCmd.test, CloseCmd.test etc.). There is one such file for each subcommand of the resource commands. It is also possible to evaluate each file individually. These test files make use of pre-built resource files found in the /Tests/Forks subfolder. These forks are named "TestResourcesDF.rsrc", "TestResourcesRF.rsrc", and "TestResourcesNF.rsrc". The official site for the Tclresource extension is at SourceForge: <http://sourceforge.net/projects/tclresource> ------------------------------------------------------- Author: Bernard Desgraupes e-mail: <bde...@us...> Last modification: 2004-09-06 19:19:02 |
From: Bernard D. <bde...@us...> - 2004-09-06 20:58:58
|
Update of /cvsroot/tclresource/Extras/Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18513 Modified Files: DeleteCmd.test Log Message: 6 tests Index: DeleteCmd.test =================================================================== RCS file: /cvsroot/tclresource/Extras/Tests/DeleteCmd.test,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- DeleteCmd.test 6 Sep 2004 07:01:45 -0000 1.1 +++ DeleteCmd.test 6 Sep 2004 20:58:49 -0000 1.2 @@ -22,23 +22,68 @@ namespace eval ::resource::test { namespace import ::tcltest::* - test ResourceDelete-1-1 {} -setup { - } -body { - } -cleanup { - } -result "" - - test ResourceDelete-1-2 {} -setup { - } -body { - } -cleanup { - } -result "" + # Common code for setup + variable SETUP { + set fname [file join [file dir [info script]] Forks TempFork.rsrc] + set rid [resource open $fname w+] + } + + # Common code for cleanup + variable CLEANUP { + resource close $rid + if {[file exists $fname]} { + file delete $fname + } + } + + test ResourceDelete-1-1 {Delete a resource specified by ID} -setup $SETUP -body { + resource write -id 128 -file $rid TEXT "Hello1" + resource write -id 129 -file $rid TEXT "Hello2" + set len1 [llength [resource list -ids TEXT $rid]] + resource delete -id 129 -file $rid TEXT + set len2 [llength [resource list -ids TEXT $rid]] + set res [expr {$len1 - $len2}] + } -cleanup $CLEANUP -result 1 - test ResourceDelete-1-3 {} -setup { - } -body { - } -cleanup { - } -result "" + test ResourceDelete-1-2 {Delete a resource specified by name} -setup $SETUP -body { + resource write -name "Hello1" -file $rid TEXT "Hello1" + resource write -name "Hello2" -file $rid TEXT "Hello2" + set len1 [llength [resource list -ids TEXT $rid]] + resource delete -name "Hello2" -file $rid TEXT + set len2 [llength [resource list -ids TEXT $rid]] + set res [expr {$len1 - $len2}] + } -cleanup $CLEANUP -result 1 -# Cleanup -::tcltest::cleanupTests + test ResourceDelete-1-3 {Invoke non-correlated ID and name } -setup $SETUP -body { + resource write -id 128 -name "Hello1" -file $rid TEXT "Hello1" + resource write -id 129 -name "Hello2" -file $rid TEXT "Hello2" + resource delete -id 128 -name "Hello2" -file $rid TEXT + } -cleanup $CLEANUP -returnCodes error -match glob \ + -result "-id and -name values do not point to the same resource" + + test ResourceDelete-1-4 {Delete a non-existing resource by -id} -setup $SETUP -body { + resource write -id 128 -name "Hello1" -file $rid TEXT "Hello1" + resource write -id 129 -name "Hello2" -file $rid TEXT "Hello2" + resource delete -id 130 -file $rid TEXT + } -cleanup $CLEANUP -returnCodes error -match glob \ + -result "resource not found" + + test ResourceDelete-1-5 {Delete a non-existing resource by -id} -setup $SETUP -body { + resource write -id 128 -name "Hello1" -file $rid TEXT "Hello1" + resource write -id 129 -name "Hello2" -file $rid TEXT "Hello2" + resource delete -name "Hello3" -file $rid TEXT + } -cleanup $CLEANUP -returnCodes error -match glob \ + -result "resource not found" + + test ResourceDelete-1-6 {Delete without -id or -name} -setup $SETUP -body { + resource write -id 128 -name "Hello1" -file $rid TEXT "Hello1" + resource write -id 129 -name "Hello2" -file $rid TEXT "Hello2" + resource delete TEXT + } -cleanup $CLEANUP -returnCodes error -match glob \ + -result "you must specify either -id or -name or both" + + # Cleanup + ::tcltest::cleanupTests } namespace delete ::resource::test |
From: Bernard D. <bde...@us...> - 2004-09-06 17:14:24
|
Update of /cvsroot/tclresource/Extras/Tests/Forks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7375 Modified Files: TestForks.readme Log Message: More informative Index: TestForks.readme =================================================================== RCS file: /cvsroot/tclresource/Extras/Tests/Forks/TestForks.readme,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- TestForks.readme 6 Sep 2004 13:58:48 -0000 1.2 +++ TestForks.readme 6 Sep 2004 17:13:56 -0000 1.3 @@ -1,19 +1,24 @@ -File: "TestForks.readme" +File "TestForks.readme" The Tclresource tests suite uses several pre-built resource files (TestResourcesDF.rsrc, TestResourcesNF.rsrc, TestResourcesRF.rsrc) which it -expects to find inside this /Tests/Forks folder. For proper storage in the -CVS repository, these files have been compressed in a zip archive named -TestResourcesForks.zip. Please unzip this archive to execute the tests. +expects to find inside this /Tests/Forks folder. The "BuildTestForks.tcl" file is a Tcl script which will regenerate the resource files in case they get damaged. Executing this script will create -the same resource files as found in the zipped archive. +the same resource files as found in the /Tests/Forks folder or in the +zipped archive. -The file TestResourcesDF.rsrc has resources in its data fork. The file -TestResourcesRF.rsrc has resources in its resource fork. The file -TestResourcesNF.rsrc has no resources at all, neither in its data fork, -nor in its resource fork. +The file TestResourcesDF.rsrc has resources in its data fork. +The file TestResourcesRF.rsrc has resources in its resource fork. +The file TestResourcesNF.rsrc has no resources at all, neither in its data +fork, nor in its resource fork. + +For proper storage in the CVS repository, these files have been compressed +in a zip archive named TestResourcesForks.zip. Please unzip this archive to +execute the tests if you have retreived the files from the CVS repository. +You can browse the cvs repository online at +<http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tclresource> ------------------------------------------------------- |
From: Bernard D. <bde...@us...> - 2004-09-06 16:56:47
|
Update of /cvsroot/tclresource/Extras/Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4330 Modified Files: WriteCmd.test Log Message: 9 tests Index: WriteCmd.test =================================================================== RCS file: /cvsroot/tclresource/Extras/Tests/WriteCmd.test,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- WriteCmd.test 6 Sep 2004 07:04:26 -0000 1.1 +++ WriteCmd.test 6 Sep 2004 16:56:37 -0000 1.2 @@ -1,7 +1,7 @@ # ------------------------------------------------------- # File: "WriteCmd.test" # Created: 2004-09-05 20:16:33 -# Last modification: 2004-09-05 10:49:55 +# Last modification: 2004-09-06 18:52:16 # Author: Bernard Desgraupes # e-mail: <bde...@ea...> # www: <http://webperso.easyconnect.fr/bdesgraupes/> @@ -18,27 +18,85 @@ # ------------------------------------------------------- source [file join [file dir [info script]] common.tcl] +# set fname /Volumes/hd3/Tcl/Tcl_Sources/Extensions/Tclresource/Tclresource/Extras/Tests/Forks/TempFork.rsrc namespace eval ::resource::test { namespace import ::tcltest::* - test ResourceWrite-1-1 {} -setup { - } -body { - } -cleanup { - } -result "" + # Common code for setup + variable SETUP { + set fname [file join [file dir [info script]] Forks TempFork.rsrc] + set rid [resource open $fname w+] + } + + # Common code for cleanup + variable CLEANUP { + resource close $rid + if {[file exists $fname]} { + file delete $fname + } + } + + test ResourceWrite-1-1 {Specify -id, -name and -file} -setup $SETUP -body { + set res [catch {resource write -id 128 -name "Hello" -file $rid TEXT "Hello Tclresource!"}] + } -cleanup $CLEANUP -result 0 - test ResourceWrite-1-2 {} -setup { + test ResourceWrite-1-2 {Omit the -id option} -setup $SETUP -body { + set res [catch {resource write -name "Hello" -file $rid TEXT "Hello Tclresource!"}] + } -cleanup $CLEANUP -result 0 + + test ResourceWrite-1-3 {Omit the -name option} -setup $SETUP -body { + set res [catch {resource write -file $rid TEXT "Hello Tclresource!"}] + } -cleanup $CLEANUP -result 0 + + test ResourceWrite-1-4 {Omit the -file option, no fork opened} -setup { } -body { + # Since no resource fork has been opened, this will generate an error + resource write TEXT "Hello Tclresource!" } -cleanup { - } -result "" + } -returnCodes error \ + -result "error adding resource to resource map error releasing resource" - test ResourceWrite-1-3 {} -setup { + test ResourceWrite-1-5 {Omit the -file option, fork opened} -setup $SETUP -body { + # If a resource fork is open, this will write therein + set res [catch {resource write TEXT "Hello Tclresource!"}] + } -cleanup $CLEANUP -result 0 + + test ResourceWrite-1-6 {A resource with same ID exists, no -force} -setup $SETUP -body { + resource write -id 1000 -file $rid TEXT "Hello Tclresource!" + resource write -id 1000 -file $rid TEXT "Hello Tclresource!" + } -cleanup $CLEANUP -returnCodes error -match glob \ + -result "the resource * already exists, use the \"-force\" option to overwrite it." + + test ResourceWrite-1-7 {A resource with same ID exists, use -force} -setup $SETUP -body { + resource write -id 1000 -file $rid TEXT "Hello Tclresource!" + catch {resource write -id 1000 -file $rid -force TEXT "Hello Tclresource!"} res + set res + } -cleanup $CLEANUP -result "" + + test ResourceWrite-1-8 {Write to fork opened read-only} -setup { + set fname [file join [file dir [info script]] Forks TempFork.rsrc] + # This creates the resource file + set rid [resource open $fname w+] + resource close $rid + # Now reopen it read-only + set rid [resource open $fname r] } -body { - } -cleanup { - } -result "" + resource write -id 1000 -file $rid TEXT "Hello Tclresource!" + } -cleanup $CLEANUP -returnCodes error -match glob \ + -result "cannot write to resource file *, it was opened read only" -# Cleanup -::tcltest::cleanupTests + test ResourceWrite-1-9 {Write binary data} -setup $SETUP -body { + resource write -id 1000 -file $rid ALRT "\x00\x28\x00\x28\x00\x87\x01\x7c\x00\x80\x55\x55\x30\x0a" + } -cleanup $CLEANUP -result "" + +# test ResourceWrite-1-10 {} -setup { +# } -body { +# } -cleanup { +# } -result "" + + # Cleanup + ::tcltest::cleanupTests } namespace delete ::resource::test |
From: Bernard D. <bde...@us...> - 2004-09-06 16:56:32
|
Update of /cvsroot/tclresource/Extras/Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4282 Modified Files: OpenCmd.test Log Message: Test for append permission "a" Index: OpenCmd.test =================================================================== RCS file: /cvsroot/tclresource/Extras/Tests/OpenCmd.test,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- OpenCmd.test 6 Sep 2004 13:42:23 -0000 1.2 +++ OpenCmd.test 6 Sep 2004 16:56:23 -0000 1.3 @@ -106,6 +106,19 @@ resource close $rid } -match glob -result resource* + test ResourceOpen-2-6 {Append permission "a"} -setup { + } -body { + set rid [resource open $resfileDF a] + } -cleanup { + resource close $rid + } -match glob -result resource* + + test ResourceOpen-2-7 {Unknown permission} -setup { + } -body { + set rid [resource open $resfileDF z] + } -cleanup { + } -returnCodes error -result "couldn't get open mode for z" + # Cleanup ::tcltest::cleanupTests } |
From: Bernard D. <bde...@us...> - 2004-09-06 13:58:58
|
Update of /cvsroot/tclresource/Extras/Tests/Forks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4560 Modified Files: TestForks.readme Log Message: Zipped resource files for the test suite Index: TestForks.readme =================================================================== RCS file: /cvsroot/tclresource/Extras/Tests/Forks/TestForks.readme,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- TestForks.readme 6 Sep 2004 07:18:16 -0000 1.1 +++ TestForks.readme 6 Sep 2004 13:58:48 -0000 1.2 @@ -1,14 +1,20 @@ File: "TestForks.readme" -The Tclresource tests suite uses several pre-built resource files (like -TestResourcesDF.rsrc, TestResourcesDF.rsrc etc.) which it expects to find -inside this /Tests/Forks folder. - -The "BuildTestForks.tcl" file is a Tcl script which will rebuild the -resource files in case they get damaged. +The Tclresource tests suite uses several pre-built resource files +(TestResourcesDF.rsrc, TestResourcesNF.rsrc, TestResourcesRF.rsrc) which it +expects to find inside this /Tests/Forks folder. For proper storage in the +CVS repository, these files have been compressed in a zip archive named +TestResourcesForks.zip. Please unzip this archive to execute the tests. +The "BuildTestForks.tcl" file is a Tcl script which will regenerate the +resource files in case they get damaged. Executing this script will create +the same resource files as found in the zipped archive. +The file TestResourcesDF.rsrc has resources in its data fork. The file +TestResourcesRF.rsrc has resources in its resource fork. The file +TestResourcesNF.rsrc has no resources at all, neither in its data fork, +nor in its resource fork. -> ------------------------------------------------------- -> Last modification: 2004-09-06 08:39:42 +------------------------------------------------------- +Last modification: 2004-09-06 15:53:28 |
From: Bernard D. <bde...@us...> - 2004-09-06 13:58:32
|
Update of /cvsroot/tclresource/Extras/Tests/Forks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4475 Added Files: TestResourcesForks.zip Log Message: First checkin --- NEW FILE: TestResourcesForks.zip --- (This appears to be a binary file; contents omitted.) |