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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [tcl/] [mac/] [tclMacResource.r] - Blame information for rev 1774

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-97 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
 * RCS: @(#) $Id: tclMacResource.r,v 1.1.1.1 2002-01-16 10:25:32 markom Exp $
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
 
29
#if (TCL_RELEASE_LEVEL == 0)
30
#   define RELEASE_LEVEL alpha
31
#elif (TCL_RELEASE_LEVEL == 1)
32
#   define RELEASE_LEVEL beta
33
#elif (TCL_RELEASE_LEVEL == 2)
34
#   define RELEASE_LEVEL final
35
#endif
36
 
37
#if (TCL_RELEASE_LEVEL == 2)
38
#   define MINOR_VERSION (TCL_MINOR_VERSION * 16) + TCL_RELEASE_SERIAL
39
#else
40
#   define MINOR_VERSION TCL_MINOR_VERSION * 16
41
#endif
42
 
43
resource 'vers' (1) {
44
        TCL_MAJOR_VERSION, MINOR_VERSION,
45
        RELEASE_LEVEL, 0x00, verUS,
46
        TCL_PATCH_LEVEL,
47
        TCL_PATCH_LEVEL ", by Ray Johnson © Sun Microsystems"
48
};
49
 
50
resource 'vers' (2) {
51
        TCL_MAJOR_VERSION, MINOR_VERSION,
52
        RELEASE_LEVEL, 0x00, verUS,
53
        TCL_PATCH_LEVEL,
54
        "Simple Tcl Shell " TCL_PATCH_LEVEL " © 1996"
55
};
56
 
57
 
58
/*
59
 * The mechanisim below loads Tcl source into the resource fork of the
60
 * application.  The example below creates a TEXT resource named
61
 * "Init" from the file "init.tcl".  This allows applications to use
62
 * Tcl to define the behavior of the application without having to
63
 * require some predetermined file structure - all needed Tcl "files"
64
 * are located within the application.  To source a file for the
65
 * resource fork the source command has been modified to support
66
 * sourcing from resources.  In the below case "source -rsrc {Init}"
67
 * will load the TEXT resource named "Init".
68
 */
69
 
70
read 'TEXT' (0, "Init", purgeable, preload) "::library:init.tcl";
71
read 'TEXT' (1, "History", purgeable,preload) "::library:history.tcl";
72
read 'TEXT' (2, "Word", purgeable,preload) "::library:word.tcl";
73
 
74
/*
75
 * The following resource is used when creating the 'env' variable in
76
 * the Macintosh environment.  The creation mechanisim looks for the
77
 * 'STR#' resource named "Tcl Environment Variables" rather than a
78
 * specific resource number.  (In other words, feel free to change the
79
 * resource id if it conflicts with your application.)  Each string in
80
 * the resource must be of the form "KEYWORD=SOME STRING".  See Tcl
81
 * documentation for futher information about the env variable.
82
 *
83
 * A good example of something you may want to set is: "TCL_LIBRARY=My
84
 * disk:etc."
85
 */
86
 
87
resource 'STR#' (128, "Tcl Environment Variables") {
88
        {       "SCHEDULE_NAME=Agent Controller Schedule",
89
                "SCHEDULE_PATH=Lozoya:System Folder:Tcl Lib:Tcl-Scheduler"
90
        };
91
};
92
 

powered by: WebSVN 2.1.0

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