home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
komix
/
DATA.Z
/
libocl.tcl
< prev
next >
Wrap
Text File
|
1996-06-11
|
1KB
|
39 lines
#---------------------------------------------------------------------------
#
# (c) Westmount Technology 1994
#
# File: @(#)libocl.tcl 1.4
# Author: frmo
# Description: Utilities for the Tcl Object System
#---------------------------------------------------------------------------
# SccsId = @(#)libocl.tcl 1.4 24 Aug 1995 Copyright 1994 Westmount Technology
# Require: source a file only once
#
proc require {file} {
global required_files
if [info exists required_files($file)] {
return
}
set required_files($file) 1
read_require_file $file
}
# Procedure to actually read in the "required" file. Can be overridden to
# use another method to read in a file (e.g. to use a search path).
#
proc read_require_file {file} {
source [m4_path_name tcl $file]
}
# Source file if it exists
#
proc read_if_exist {file} {
if [file exists $file] {
if {[catch {source $file} reason]} {
wmtkerror $reason
}
}
}