OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [itcl/] [itcl/] [mac/] [itclMacResource.r] - Blame information for rev 1773

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
/*
2
 * tclMacResource.r --
3
 *
4
 *      This file creates resources for use in a simple shell.
5
 *      This is designed to be an example of using the Tcl libraries
6
 *      statically in a Macintosh Application.  For an example of
7
 *      of using the dynamic libraries look at tclMacApplication.r.
8
 *
9
 * Copyright (c) 1993-94 Lockheed Missle & Space Company
10
 * Copyright (c) 1994-96 Sun Microsystems, Inc.
11
 *
12
 * See the file "license.terms" for information on usage and redistribution
13
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
14
 *
15
 * SCCS: @(#) tclMacResource.r 1.14 96/09/11 21:14:36
16
 */
17
 
18
#include 
19
#include 
20
 
21
/*
22
 * The folowing include and defines help construct
23
 * the version string for Tcl.
24
 */
25
 
26
#define RESOURCE_INCLUDED
27
#include "tcl.h"
28
#include "itcl.h"
29
#include "itclPatch.h"
30
 
31
#if (TCL_RELEASE_LEVEL == 0)
32
#   define RELEASE_LEVEL alpha
33
#elif (TCL_RELEASE_LEVEL == 1)
34
#   define RELEASE_LEVEL beta
35
#elif (TCL_RELEASE_LEVEL == 2)
36
#   define RELEASE_LEVEL final
37
#endif
38
 
39
#if (TCL_RELEASE_LEVEL == 2)
40
#   define MINOR_VERSION (ITCL_MINOR_VERSION * 16) + TCL_RELEASE_SERIAL
41
#else
42
#   define MINOR_VERSION ITCL_MINOR_VERSION * 16
43
#endif
44
 
45
resource 'vers' (1) {
46
        ITCL_MAJOR_VERSION, MINOR_VERSION,
47
        RELEASE_LEVEL, 0x00, verUS,
48
        ITCL_PATCH_LEVEL,
49
        ITCL_PATCH_LEVEL ", by Michael McLennan © Lucent Technologies, Inc."
50
};
51
 
52
resource 'vers' (2) {
53
        ITCL_MAJOR_VERSION, MINOR_VERSION,
54
        RELEASE_LEVEL, 0x00, verUS,
55
        ITCL_PATCH_LEVEL,
56
        "Simple Itcl Shell " ITCL_PATCH_LEVEL " © 1993-1998"
57
};
58
 
59
#define TCL_LIBRARY_RESOURCES 1000
60
#define ITCL_LIBRARY_RESOURCES 2000
61
 
62
/*
63
 * The mechanisim below loads Tcl source into the resource fork of the
64
 * application.  The example below creates a TEXT resource named
65
 * "Init" from the file "init.tcl".  This allows applications to use
66
 * Tcl to define the behavior of the application without having to
67
 * require some predetermined file structure - all needed Tcl "files"
68
 * are located within the application.  To source a file for the
69
 * resource fork the source command has been modified to support
70
 * sourcing from resources.  In the below case "source -rsrc {Init}"
71
 * will load the TEXT resource named "Init".
72
 */
73
read 'TEXT' (TCL_LIBRARY_RESOURCES, "Init", purgeable, preload) ":::tcl" TCL_VERSION ":library:init.tcl";
74
read 'TEXT' (ITCL_LIBRARY_RESOURCES, "itcl", purgeable,preload) "::library:itcl.tcl";
75
 
76
/*
77
 * The following resource is used when creating the 'env' variable in
78
 * the Macintosh environment.  The creation mechanisim looks for the
79
 * 'STR#' resource named "Tcl Environment Variables" rather than a
80
 * specific resource number.  (In other words, feel free to change the
81
 * resource id if it conflicts with your application.)  Each string in
82
 * the resource must be of the form "KEYWORD=SOME STRING".  See Tcl
83
 * documentation for futher information about the env variable.
84
 *
85
 * A good example of something you may want to set is: "TCL_LIBRARY=My
86
 * disk:etc."
87
 */
88
 
89
resource 'STR#' (128, "Tcl Environment Variables") {
90
        {       "SCHEDULE_NAME=Agent Controller Schedule",
91
                "SCHEDULE_PATH=Lozoya:System Folder:Tcl Lib:Tcl-Scheduler"
92
        };
93
};
94
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.