URL
https://opencores.org/ocsvn/or1k/or1k/trunk
[/] [or1k/] [trunk/] [insight/] [itcl/] [itcl/] [mac/] [itclMacTclCode.r] - Blame information for rev 1765
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
578 |
markom |
/*
|
2 |
|
|
* itclMacTclCode.r
|
3 |
|
|
*
|
4 |
|
|
* This file includes the Itcl code that is needed to startup Tcl.
|
5 |
|
|
* It is to be included either in the resource fork of the shared library, or in the
|
6 |
|
|
* resource fork of the application for a statically bound application.
|
7 |
|
|
*
|
8 |
|
|
* Jim Ingham
|
9 |
|
|
* Lucent Technologies 1996
|
10 |
|
|
*
|
11 |
|
|
*/
|
12 |
|
|
|
13 |
|
|
#include
|
14 |
|
|
#include
|
15 |
|
|
|
16 |
|
|
|
17 |
|
|
|
18 |
|
|
#define ITCL_LIBRARY_RESOURCES 2500
|
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' (ITCL_LIBRARY_RESOURCES, "itcl", purgeable,preload) "::library:itcl.tcl";
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.