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

Subversion Repositories or1k

[/] [or1k/] [tags/] [start/] [insight/] [tk/] [generic/] [tkInitScript.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
/*
2
 * tkInitScript.h --
3
 *
4
 *      This file contains Unix & Windows common init script
5
 *      It is not used on the Mac. (the mac init script is in tkMacInit.c)
6
 *
7
 * Copyright (c) 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
 * RCS: @(#) $Id: tkInitScript.h,v 1.1.1.1 2002-01-16 10:25:52 markom Exp $
13
 */
14
 
15
/*
16
 * In order to find tk.tcl during initialization, the following script
17
 * is invoked by Tk_Init().  It looks in several different directories:
18
 *
19
 *      $tk_library             - can specify a primary location, if set
20
 *                                no other locations will be checked
21
 *
22
 *      $env(TK_LIBRARY)        - highest priority so user can always override
23
 *                                the search path unless the application has
24
 *                                specified an exact directory above
25
 *
26
 *      $tcl_library/../tk$tk_version
27
 *                              - look relative to init.tcl in an installed
28
 *                                lib directory (e.g. /usr/local)
29
 *
30
 *      <executable directory>/../lib/tk$tk_version
31
 *                              - look for a lib/tk<ver> in a sibling of
32
 *                                the bin directory (e.g. /usr/local)
33
 *
34
 *      <executable directory>/../library
35
 *                              - look in Tk build directory
36
 *
37
 *      <executable directory>/../../tk$tk_patchLevel/library
38
 *                              - look for Tk build directory relative
39
 *                                to a parallel build directory
40
 *
41
 * The first directory on this path that contains a valid tk.tcl script
42
 * will be set ast the value of tk_library.
43
 *
44
 * Note that this entire search mechanism can be bypassed by defining an
45
 * alternate tkInit procedure before calling Tk_Init().
46
 */
47
 
48
static char initScript[] = "if {[info proc tkInit]==\"\"} {\n\
49
  proc tkInit {} {\n\
50
    global tk_library tk_version tk_patchLevel\n\
51
    rename tkInit {}\n\
52
    tcl_findLibrary tk $tk_version $tk_patchLevel tk.tcl TK_LIBRARY tk_library\n\
53
  }\n\
54
}\n\
55
tkInit";
56
 

powered by: WebSVN 2.1.0

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