os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/mac/tclMacTclCode.r
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 /* 
     2  * tclMacTclCode.r --
     3  *
     4  *	This file creates resources from the Tcl code that is
     5  *	usually stored in the TCL_LiBRARY
     6  *
     7  * Copyright (c) 1996-1997 Sun Microsystems, Inc.
     8  *
     9  * See the file "license.terms" for information on usage and redistribution
    10  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    11  *
    12  * SCCS: @(#) tclMacTclCode.r 1.1 98/01/21 22:22:38
    13  */
    14 
    15 #include <Types.r>
    16 #include <SysTypes.r>
    17 
    18 #define TCL_LIBRARY_RESOURCES 2000
    19 
    20 /* 
    21  * The mechanisim below loads Tcl source into the resource fork of the
    22  * application.  The example below creates a TEXT resource named
    23  * "Init" from the file "init.tcl".  This allows applications to use
    24  * Tcl to define the behavior of the application without having to
    25  * require some predetermined file structure - all needed Tcl "files"
    26  * are located within the application.  To source a file for the
    27  * resource fork the source command has been modified to support
    28  * sourcing from resources.  In the below case "source -rsrc {Init}"
    29  * will load the TEXT resource named "Init".
    30  */
    31 
    32 read 'TEXT' (TCL_LIBRARY_RESOURCES, "init", purgeable) "::library:init.tcl";
    33 read 'TEXT' (TCL_LIBRARY_RESOURCES + 1, "auto", purgeable) "::library:auto.tcl";
    34 read 'TEXT' (TCL_LIBRARY_RESOURCES + 2, "package", purgeable,preload) "::library:package.tcl";
    35 read 'TEXT' (TCL_LIBRARY_RESOURCES + 3, "history", purgeable) "::library:history.tcl";
    36 read 'TEXT' (TCL_LIBRARY_RESOURCES + 4, "word", purgeable,preload) "::library:word.tcl";
    37 read 'TEXT' (TCL_LIBRARY_RESOURCES + 5, "parray", purgeable,preload) "::library:parray.tcl";