home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1991-11-19 | 46.2 KB | 1,452 lines
Newsgroups: comp.sources.misc From: karl@sugar.neosoft.com (Karl Lehenbauer) Subject: v26i015: tclx - extensions and on-line help for tcl 6.1, Part15/23 Message-ID: <1991Nov19.135448.1189@sparky.imd.sterling.com> X-Md4-Signature: e5ba0678d38d49bc02a61896ba333a55 Date: Tue, 19 Nov 1991 13:54:48 GMT Approved: kent@sparky.imd.sterling.com Submitted-by: karl@sugar.neosoft.com (Karl Lehenbauer) Posting-number: Volume 26, Issue 15 Archive-name: tclx/part15 Environment: UNIX #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of archive 15 (of 23)." # Contents: extended/Makefile extended/Makefile.org # extended/src/tcl++.h # Wrapped by karl@one on Wed Nov 13 21:50:28 1991 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'extended/Makefile' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'extended/Makefile'\" else echo shar: Extracting \"'extended/Makefile'\" \(14592 characters\) sed "s/^X//" >'extended/Makefile' <<'END_OF_FILE' X#============================================================================== X# X# Makefile for Extended Tcl. This requires Tcl 6.1 from Berkeley, which X# should be compiled before running this makefile. Its location is configured X# below. X# X#------------------------------------------------------------------------------ X# Copyright 1991 Karl Lehenbauer and Mark Diekhans. X# X# Permission to use, copy, modify, and distribute this software and its X# documentation for any purpose and without fee is hereby granted, provided X# that the above copyright notice appear in all copies. Karl Lehenbauer and X# Mark Diekhans make no representations about the suitability of this X# software for any purpose. It is provided "as is" without express or X# implied warranty. X#============================================================================== X# X# Configuration section. Modify this section to set some general options and X# selecting a section for a specific Unix implementation. X# X#============================================================================== X X#------------------------------------------------------------------------------ X# X# Location of the UCB Tcl distribution relative to this directory. X# XTCL_UCB_DIR=../tcl6.1 X X#------------------------------------------------------------------------------ X# Compiler debug/optimization/profiling flag to use. Not that if debugging or X# profiling is enabled, the DO_STRIPPING option below must be disabled. X# XOPTIMIZE_FLAG=-O X X#------------------------------------------------------------------------------ X# Stripping of the final tclshell binary. Specify `true' if the binary is to X# be stripped (optimized case) or specify `false' if the binary is not to be X# stripped (debugging case). X# XDO_STRIPPING=true X X#------------------------------------------------------------------------------ X# Enable or disable Tcl history in the Tcl flag. If this macro is set to X# '-DTCL_NOHISTORY', the `history' command will not be available in the Tcl X# shell. Many people do not find the history command useful and its rather X# large, so this way it can be excluded from the standard shell. It will X# still be in the library and will be available in other applications if they X# use `Tcl_RecordAndEval'. X# XHISTORY_FLAG= X X#------------------------------------------------------------------------------ X# Memory debugging defines. These are only of interest if you are adding C X# code to Tcl or debugging Tcl C code. They help find memory overwrites and X# leaks. One or more of the following flags may be specified (in the form X# -DFLAGNAME). X# X# o TCL_MEM_DEBUG - Turn on memory debugging. X# o TCL_SHELL_MEM_LEAK - Dump a list of active memory blocks when the X# shell exits an eof (requires TCL_MEM_DEBUG). X# X# NOTE: If TCL_MEM_DEBUG is enabled, the Berkeley Tcl distribution must be X# recompiled with this option as well, or it will not link. In addition a flag X# MEM_VALIDATE may be specified in the Berkeley Tcl compilation to do X# validation of all memory blocks on each allocation or deallocation (very X# slow). X# XMEM_DEBUG_FLAGS= X X#============================================================================== X# Install options sections. This sections describes the installation options. X# Some of the actual values are set under each system definition in the X# system dependent section. Your might want to change some of these values X# before installing. X#.............................................................................. X# X# o TCL_OWNER - The user that will own all Tcl files after installation. X# (system dependent) X# o TCL_GROUP - The group that all Tcl files will belong to after installation. X# (system dependent) X# o TCL_DEFAULT - Base name of Tcl default file. This name will have a X# version number appended. (system dependent) X# X X# X# The directory to install Tcl binary into. X# XTCL_BINDIR=/usr/local/bin X X# X# The directory tcl.a library goes into. X# XTCL_LIBDIR=/usr/local/lib X X# X# The directory the Tcl .h files go into. X# XTCL_INCLUDEDIR=/usr/local/include X X# X# The directory .tcl files and the .tlib library goes into. X# XTCL_TCLDIR=/usr/local/tcl X X#============================================================================== X# This section defines where and how the manual pages are to be installed. X# This is somewhat problematic, so a global option not to install manual pages X# is provided. Since there are so many manual pages provided, they are placed X# together in one Tcl manual page directory, rather than splitting into the X# standard manual pages directories. The actual definitions of these variables X# are set for in the system dependent section. You might want to modify these X# values. X#.............................................................................. X X# X# Set to 1 to install manual files, to 0 to not install manual files. X# X XTCL_MAN_INSTALL=1 X X# o TCL_MAN_BASEDIR - Base manual directory where all of the man.* and cat.* X# directories live. X# o TCL_MAN_SECTION - Section for Tcl manual pages. This is appended to the X# directory name and all of the manual file names. X# o TCL_MAN_SEPARATOR - The separator character used in the directory name X# of the cat* and man* manual directories. This is usually empty or X# a period. X# o TCL_MAN_STYLE - The style of manual management the system has. It is X# a string with one of the following values: X# o SHORT - Short file name installation (an index can be generated). X# o LONG - Long file name installation, a link will be made for each X# name the manual page is to be available under. X# o TCL_MAN_INDEX - If 1, then a manual page index will be build in the manual X# base directory named index.TCL. Each line in the file has the form: X# mansubject manfile section X# o TCL_MAN_INDEX_MERGE - If 1, then the manual index will be merged with the X# an index file named `index' in the manual base directory. The old index X# will be backed up in a file named `index.bak'. X X#============================================================================== X# System specific configuration. Comment out the section of defines that are X# required for your version of Unix. In addition to the options defined in the X# Berkeley source the following options can be defined here. This information X# will help you build your own system configuration if one is not supplied X# here. X# X# o SYS_DEP_FLAGS - The system dependency flags. The following options are X# available, these should be defined using -Dflag. X# X# o TCL_NO_TOLOWER_MACRO - Define if the `_tolower' and `_toupper' macros X# are not available. X# o TCL_HAVE_SETLINEBUF - Define if the `setlinebuf' is available as part X# of stdio. X# o TCL_32_BIT_RANDOM - Define if the `rand' function returns a value in X# the range 0..(2^31)-1, leave undefined if `rand' returns a value X# in the range 0..(2^15)-1. X# o TCL_NO_SELECT - The select call is not available. X# o TCL_USE_BZERO_MACRO - Use a macro to define bzero for the select X# FD_ZERO macro. X# o TCL_SIG_PROC_INT - Set if the signal handling procs have a return type X# of int instead of void. X# o TCL_POSIX_SIG - Set if posix signals are available (sigaction, etc). X# X# o LINK_OPTIONS - The flags to specify when linking the tclshell. X# X# o RANLIB_CMD - Either `ranlib' if ranlib is required or `true' if ranlib X# should not be used. X# X# o MCS_CMD - Command to delete comments from the object file comment X# section, if available. The command `true' if it's not available. This X# makes the object file even smaller after its stipped. X# X# o SUPPORT_FLAGS - The flags for SUPPORT_OBJS code. The following options X# are available, these should be defined using -Dflag. X# X# o TCL_HAS_TM_ZONE - If if 'struct tm' has the 'tm_zone' field. Used X# by strftime. X# X# o SUPPORT_OBJS - The object files to compile to implement library X# functions that are not available on this particular version of Unix. X# The following are available: X# o strftime X X#------------------------------------------------------------------------------ X# System V 3.2.0 (tested on Bell-Tech or Intel Unix for the Intel 386) X# X#SYS_DEP_FLAGS=-DTCL_NO_SELECT X#LINK_OPTIONS=-lc_s -lform -lm X#RANLIB_CMD=true X#MCS_CMD=mcs -d X#SUPPORT_FLAGS= X#SUPPORT_OBJS=strftime.o X# X#TCL_OWNER=bin X#TCL_GROUP=bin X#TCL_DEFAULT=/etc/default/tcl X# X#TCL_MAN_BASEDIR=/usr/man X#TCL_MAN_SECTION=tcl X#TCL_MAN_SEPARATOR="." X#TCL_MAN_STYLE=short X#TCL_MAN_INDEX=1 X#TCL_MAN_INDEX_MERGE=0 X X#------------------------------------------------------------------------------ X# SCO Unix - System V 3.2.2 X# X#SYS_DEP_FLAGS=-DTCL_USE_BZERO_MACRO -DTCL_POSIX_SIG X#LINK_OPTIONS=-lc_s -lm X#RANLIB_CMD=true X#MCS_CMD=mcs -d X#SUPPORT_FLAGS= X#SUPPORT_OBJS= X# X#TCL_OWNER=bin X#TCL_GROUP=bin X#TCL_DEFAULT=/etc/default/tcl X# X#TCL_MAN_BASEDIR=/usr/man X#TCL_MAN_SECTION=tcl X#TCL_MAN_SEPARATOR="." X#TCL_MAN_STYLE=short X#TCL_MAN_INDEX=1 X#TCL_MAN_INDEX_MERGE=1 X X#------------------------------------------------------------------------------ X# BSD X# X#SYS_DEP_FLAGS= -DTCL_NO_TOLOWER_MACRO -DTCL_HAVE_SETLINEBUF -DTCL_32_BIT_RANDOM X#LINK_OPTIONS=-lm X#RANLIB_CMD="ranlib" X#MCS_CMD=true X#SUPPORT_FLAGS=-DTCL_HAS_TM_ZONE X#SUPPORT_OBJS=strftime.o X# X#TCL_OWNER=root X#TCL_GROUP=system X#TCL_DEFAULT=/usr/local/lib/tcldefault X# X#TCL_MAN_BASEDIR=/usr/man X#TCL_MAN_SECTION=3 X#TCL_MAN_SEPARATOR="" X#TCL_MAN_STYLE=long X#TCL_MAN_INDEX=0 X#TCL_MAN_INDEX_MERGE=0 X X#------------------------------------------------------------------------------ X# SUN O/S X# X#SYS_DEP_FLAGS=-DTCL_NO_TOLOWER_MACRO -DTCL_HAVE_SETLINEBUF -DTCL_32_BIT_RANDOM -DTCL_POSIX_SIG X#LINK_OPTIONS=-lm X#RANLIB_CMD="ranlib" X#MCS_CMD=true X#SUPPORT_FLAGS=-DTCL_HAS_TM_ZONE X#SUPPORT_OBJS= X# X#TCL_OWNER=bin X#TCL_GROUP=bin X#TCL_DEFAULT=/usr/local/lib/tcldefault X# X#TCL_MAN_BASEDIR=/usr/man X#TCL_MAN_SECTION=3 X#TCL_MAN_SEPARATOR="" X#TCL_MAN_STYLE=long X#TCL_MAN_INDEX=0 X#TCL_MAN_INDEX_MERGE=0 X X#------------------------------------------------------------------------------ X# HPUX - Hewlett-Packard HP/UX X# X#SYS_DEP_FLAGS= -DTCL_32_BIT_RANDOM -DTCL_POSIX_SIG X#LINK_OPTIONS=-lBSD -lPW -lm X#RANLIB_CMD=true X#MCS_CMD=true X#SUPPORT_FLAGS=-DTCL_HAS_TM_ZONE X#SUPPORT_OBJS= X# X#TCL_OWNER=root X#TCL_GROUP=system X#TCL_DEFAULT=/usr/local/lib/tcldefault X# X#TCL_MAN_BASEDIR=/usr/man X#TCL_MAN_SECTION=3 X#TCL_MAN_SEPARATOR="" X#TCL_MAN_STYLE=long X#TCL_MAN_INDEX=0 X#TCL_MAN_INDEX_MERGE=0 X X#------------------------------------------------------------------------------ X# XENIX-386 - SCO Xenix 2.3.3 for the 80386 X# X#SYS_DEP_FLAGS=-DTCL_NO_SELECT -DTCL_SIG_PROC_INT X#LINK_OPTIONS=-ldir -lm X#RANLIB_CMD=ranlib X#MCS_CMD=true X#SUPPORT_FLAGS= X#SUPPORT_OBJS=strftime.o X# X#TCL_OWNER=bin X#TCL_GROUP=bin X#TCL_DEFAULT=/etc/default/tcl X# X#TCL_MAN_BASEDIR=/usr/man X#TCL_MAN_SECTION=tcl X#TCL_MAN_SEPARATOR="." X#TCL_MAN_STYLE=short X#TCL_MAN_INDEX=1 X#TCL_MAN_INDEX_MERGE=1 X X#------------------------------------------------------------------------------ X# End of Configuration Section X#============================================================================== X XSHELL=/bin/sh XTCLSHELL=../tcl X X# List of files that are touched by second makefiles when something changes. X XMADE.FILES=ucbsrc/made.tmp ossupport/made.tmp src/made.tmp X X# Options to pass to the next lowest level for C compilations. X XCFLAGS= $(OPTIMIZE_FLAG) -I../$(TCL_UCB_DIR) $(MEM_DEBUG_FLAGS) $(SYS_DEP_FLAGS) X Xall: ExtendedObjs tcl TCLDEFAULT X X# X# Generate the Tcl shell. X# Xtcl: libtcl.a src/main.o $(MADE.FILES) X $(RANLIB_CMD) libtcl.a X cc $(CFLAGS) src/main.o libtcl.a $(LINK_OPTIONS) -o tcl X if $(DO_STRIPPING) ; then \ X strip tcl; \ X $(MCS_CMD) tcl; fi X# X# Objects in the lower-level directorys X# XExtendedObjs: libtcl.a X cd ucbsrc;$(MAKE) -$(MAKEFLAGS) all 'CFLAGS=$(CFLAGS)' X X cd ossupport;$(MAKE) -$(MAKEFLAGS) all 'OBJS=$(SUPPORT_OBJS)' 'CFLAGS=$(CFLAGS) $(SUPPORT_FLAGS)' X X cd src;$(MAKE) -$(MAKEFLAGS) all 'CFLAGS=$(CFLAGS)' 'HISTORY_FLAG=$(HISTORY_FLAG)' 'TCL_DEFAULT=$(TCL_DEFAULT)' 'RANLIB_CMD=$(RANLIB_CMD)' 'LINK_OPTIONS=$(LINK_OPTIONS)' 'DO_STRIPPING=$(DO_STRIPPING)' 'MCS_CMD=$(MCS_CMD)' X X cd tclsrc;$(MAKE) -$(MAKEFLAGS) 'TCL_UCB_DIR=../$(TCL_UCB_DIR)' all X X# X# Generate a temporary TCLDEFAULT file so Tcl can be run in this directory. X# XTCLDEFAULT: X @echo " - Generating temporary TCLDEFAULT file -" X @echo '# Temporary TCLDEFAULT file for debugging' >TCLDEFAULT X @echo "set TCLPATH `pwd`/tcllib" >>TCLDEFAULT X @echo "set TCLINIT `pwd`/tcllib/TclInit.tcl" >>TCLDEFAULT X X X# X# Copy the baseline libtcl.a file. Force the other Makefiles to add their X# .o files to the library by nuking their made.tmp file. X# Xlibtcl.a:$(TCL_UCB_DIR)/libtcl.a X cp $(TCL_UCB_DIR)/libtcl.a . X rm -f ossupport/made.tmp ucbsrc/made.tmp src/made.tmp X X# X# This just test to see if the C++ include file compiles. X# Xtcl++: X cd src;$(MAKE) -$(MAKEFLAGS) tcl++ 'CFLAGS=$(CFLAGS)' X X# X# Run the Basic and Extended Tcl tests. X# Xtest: all X ./tcl -c "cd $(TCL_UCB_DIR)/tests;source all" X ./tcl -c "cd tests;source all" X X# X# Install Tcl. X# Xinstall: all install.conf X ./tcl tclsrc/installTcl.tcl install.conf X Xinstall.conf: Makefile X @echo "Creating install.conf" X @echo "set TCL_UCB_DIR {$(TCL_UCB_DIR)}" >install.conf X @echo "set TCL_DEFAULT {$(TCL_DEFAULT)}" >>install.conf X @echo "set TCL_OWNER {$(TCL_OWNER)}" >>install.conf X @echo "set TCL_GROUP {$(TCL_GROUP)}" >>install.conf X @echo "set TCL_BINDIR {$(TCL_BINDIR)}" >>install.conf X @echo "set TCL_LIBDIR {$(TCL_LIBDIR)}" >>install.conf X @echo "set TCL_INCLUDEDIR {$(TCL_INCLUDEDIR)}" >>install.conf X @echo "set TCL_TCLDIR {$(TCL_TCLDIR)}" >>install.conf X @echo "set TCL_MAN_INSTALL {$(TCL_MAN_INSTALL)}" >>install.conf X @echo "set TCL_MAN_BASEDIR {$(TCL_MAN_BASEDIR)}" >>install.conf X @echo "set TCL_MAN_SECTION {$(TCL_MAN_SECTION)}" >>install.conf X @echo "set TCL_MAN_SEPARATOR {$(TCL_MAN_SEPARATOR)}" >>install.conf X @echo "set TCL_MAN_STYLE {$(TCL_MAN_STYLE)}" >>install.conf X @echo "set TCL_MAN_INDEX {$(TCL_MAN_INDEX)}" >>install.conf X @echo "set TCL_MAN_INDEX_MERGE {$(TCL_MAN_INDEX_MERGE)}" >>install.conf X X Xclean: X cd ucbsrc;$(MAKE) -$(MAKEFLAGS) clean X cd ossupport;$(MAKE) -$(MAKEFLAGS) clean X cd src;$(MAKE) -$(MAKEFLAGS) clean X cd tclsrc;$(MAKE) -$(MAKEFLAGS) clean X -rm -f libtcl.a TCLDEFAULT tcl install.conf END_OF_FILE if test 14592 -ne `wc -c <'extended/Makefile'`; then echo shar: \"'extended/Makefile'\" unpacked with wrong size! fi # end of 'extended/Makefile' fi if test -f 'extended/Makefile.org' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'extended/Makefile.org'\" else echo shar: Extracting \"'extended/Makefile.org'\" \(14592 characters\) sed "s/^X//" >'extended/Makefile.org' <<'END_OF_FILE' X#============================================================================== X# X# Makefile for Extended Tcl. This requires Tcl 6.1 from Berkeley, which X# should be compiled before running this makefile. Its location is configured X# below. X# X#------------------------------------------------------------------------------ X# Copyright 1991 Karl Lehenbauer and Mark Diekhans. X# X# Permission to use, copy, modify, and distribute this software and its X# documentation for any purpose and without fee is hereby granted, provided X# that the above copyright notice appear in all copies. Karl Lehenbauer and X# Mark Diekhans make no representations about the suitability of this X# software for any purpose. It is provided "as is" without express or X# implied warranty. X#============================================================================== X# X# Configuration section. Modify this section to set some general options and X# selecting a section for a specific Unix implementation. X# X#============================================================================== X X#------------------------------------------------------------------------------ X# X# Location of the UCB Tcl distribution relative to this directory. X# XTCL_UCB_DIR=../tcl6.1 X X#------------------------------------------------------------------------------ X# Compiler debug/optimization/profiling flag to use. Not that if debugging or X# profiling is enabled, the DO_STRIPPING option below must be disabled. X# XOPTIMIZE_FLAG=-O X X#------------------------------------------------------------------------------ X# Stripping of the final tclshell binary. Specify `true' if the binary is to X# be stripped (optimized case) or specify `false' if the binary is not to be X# stripped (debugging case). X# XDO_STRIPPING=true X X#------------------------------------------------------------------------------ X# Enable or disable Tcl history in the Tcl flag. If this macro is set to X# '-DTCL_NOHISTORY', the `history' command will not be available in the Tcl X# shell. Many people do not find the history command useful and its rather X# large, so this way it can be excluded from the standard shell. It will X# still be in the library and will be available in other applications if they X# use `Tcl_RecordAndEval'. X# XHISTORY_FLAG= X X#------------------------------------------------------------------------------ X# Memory debugging defines. These are only of interest if you are adding C X# code to Tcl or debugging Tcl C code. They help find memory overwrites and X# leaks. One or more of the following flags may be specified (in the form X# -DFLAGNAME). X# X# o TCL_MEM_DEBUG - Turn on memory debugging. X# o TCL_SHELL_MEM_LEAK - Dump a list of active memory blocks when the X# shell exits an eof (requires TCL_MEM_DEBUG). X# X# NOTE: If TCL_MEM_DEBUG is enabled, the Berkeley Tcl distribution must be X# recompiled with this option as well, or it will not link. In addition a flag X# MEM_VALIDATE may be specified in the Berkeley Tcl compilation to do X# validation of all memory blocks on each allocation or deallocation (very X# slow). X# XMEM_DEBUG_FLAGS= X X#============================================================================== X# Install options sections. This sections describes the installation options. X# Some of the actual values are set under each system definition in the X# system dependent section. Your might want to change some of these values X# before installing. X#.............................................................................. X# X# o TCL_OWNER - The user that will own all Tcl files after installation. X# (system dependent) X# o TCL_GROUP - The group that all Tcl files will belong to after installation. X# (system dependent) X# o TCL_DEFAULT - Base name of Tcl default file. This name will have a X# version number appended. (system dependent) X# X X# X# The directory to install Tcl binary into. X# XTCL_BINDIR=/usr/local/bin X X# X# The directory tcl.a library goes into. X# XTCL_LIBDIR=/usr/local/lib X X# X# The directory the Tcl .h files go into. X# XTCL_INCLUDEDIR=/usr/local/include X X# X# The directory .tcl files and the .tlib library goes into. X# XTCL_TCLDIR=/usr/local/tcl X X#============================================================================== X# This section defines where and how the manual pages are to be installed. X# This is somewhat problematic, so a global option not to install manual pages X# is provided. Since there are so many manual pages provided, they are placed X# together in one Tcl manual page directory, rather than splitting into the X# standard manual pages directories. The actual definitions of these variables X# are set for in the system dependent section. You might want to modify these X# values. X#.............................................................................. X X# X# Set to 1 to install manual files, to 0 to not install manual files. X# X XTCL_MAN_INSTALL=1 X X# o TCL_MAN_BASEDIR - Base manual directory where all of the man.* and cat.* X# directories live. X# o TCL_MAN_SECTION - Section for Tcl manual pages. This is appended to the X# directory name and all of the manual file names. X# o TCL_MAN_SEPARATOR - The separator character used in the directory name X# of the cat* and man* manual directories. This is usually empty or X# a period. X# o TCL_MAN_STYLE - The style of manual management the system has. It is X# a string with one of the following values: X# o SHORT - Short file name installation (an index can be generated). X# o LONG - Long file name installation, a link will be made for each X# name the manual page is to be available under. X# o TCL_MAN_INDEX - If 1, then a manual page index will be build in the manual X# base directory named index.TCL. Each line in the file has the form: X# mansubject manfile section X# o TCL_MAN_INDEX_MERGE - If 1, then the manual index will be merged with the X# an index file named `index' in the manual base directory. The old index X# will be backed up in a file named `index.bak'. X X#============================================================================== X# System specific configuration. Comment out the section of defines that are X# required for your version of Unix. In addition to the options defined in the X# Berkeley source the following options can be defined here. This information X# will help you build your own system configuration if one is not supplied X# here. X# X# o SYS_DEP_FLAGS - The system dependency flags. The following options are X# available, these should be defined using -Dflag. X# X# o TCL_NO_TOLOWER_MACRO - Define if the `_tolower' and `_toupper' macros X# are not available. X# o TCL_HAVE_SETLINEBUF - Define if the `setlinebuf' is available as part X# of stdio. X# o TCL_32_BIT_RANDOM - Define if the `rand' function returns a value in X# the range 0..(2^31)-1, leave undefined if `rand' returns a value X# in the range 0..(2^15)-1. X# o TCL_NO_SELECT - The select call is not available. X# o TCL_USE_BZERO_MACRO - Use a macro to define bzero for the select X# FD_ZERO macro. X# o TCL_SIG_PROC_INT - Set if the signal handling procs have a return type X# of int instead of void. X# o TCL_POSIX_SIG - Set if posix signals are available (sigaction, etc). X# X# o LINK_OPTIONS - The flags to specify when linking the tclshell. X# X# o RANLIB_CMD - Either `ranlib' if ranlib is required or `true' if ranlib X# should not be used. X# X# o MCS_CMD - Command to delete comments from the object file comment X# section, if available. The command `true' if it's not available. This X# makes the object file even smaller after its stipped. X# X# o SUPPORT_FLAGS - The flags for SUPPORT_OBJS code. The following options X# are available, these should be defined using -Dflag. X# X# o TCL_HAS_TM_ZONE - If if 'struct tm' has the 'tm_zone' field. Used X# by strftime. X# X# o SUPPORT_OBJS - The object files to compile to implement library X# functions that are not available on this particular version of Unix. X# The following are available: X# o strftime X X#------------------------------------------------------------------------------ X# System V 3.2.0 (tested on Bell-Tech or Intel Unix for the Intel 386) X# X#SYS_DEP_FLAGS=-DTCL_NO_SELECT X#LINK_OPTIONS=-lc_s -lform -lm X#RANLIB_CMD=true X#MCS_CMD=mcs -d X#SUPPORT_FLAGS= X#SUPPORT_OBJS=strftime.o X# X#TCL_OWNER=bin X#TCL_GROUP=bin X#TCL_DEFAULT=/etc/default/tcl X# X#TCL_MAN_BASEDIR=/usr/man X#TCL_MAN_SECTION=tcl X#TCL_MAN_SEPARATOR="." X#TCL_MAN_STYLE=short X#TCL_MAN_INDEX=1 X#TCL_MAN_INDEX_MERGE=0 X X#------------------------------------------------------------------------------ X# SCO Unix - System V 3.2.2 X# X#SYS_DEP_FLAGS=-DTCL_USE_BZERO_MACRO -DTCL_POSIX_SIG X#LINK_OPTIONS=-lc_s -lm X#RANLIB_CMD=true X#MCS_CMD=mcs -d X#SUPPORT_FLAGS= X#SUPPORT_OBJS= X# X#TCL_OWNER=bin X#TCL_GROUP=bin X#TCL_DEFAULT=/etc/default/tcl X# X#TCL_MAN_BASEDIR=/usr/man X#TCL_MAN_SECTION=tcl X#TCL_MAN_SEPARATOR="." X#TCL_MAN_STYLE=short X#TCL_MAN_INDEX=1 X#TCL_MAN_INDEX_MERGE=1 X X#------------------------------------------------------------------------------ X# BSD X# X#SYS_DEP_FLAGS= -DTCL_NO_TOLOWER_MACRO -DTCL_HAVE_SETLINEBUF -DTCL_32_BIT_RANDOM X#LINK_OPTIONS=-lm X#RANLIB_CMD="ranlib" X#MCS_CMD=true X#SUPPORT_FLAGS=-DTCL_HAS_TM_ZONE X#SUPPORT_OBJS=strftime.o X# X#TCL_OWNER=root X#TCL_GROUP=system X#TCL_DEFAULT=/usr/local/lib/tcldefault X# X#TCL_MAN_BASEDIR=/usr/man X#TCL_MAN_SECTION=3 X#TCL_MAN_SEPARATOR="" X#TCL_MAN_STYLE=long X#TCL_MAN_INDEX=0 X#TCL_MAN_INDEX_MERGE=0 X X#------------------------------------------------------------------------------ X# SUN O/S X# X#SYS_DEP_FLAGS=-DTCL_NO_TOLOWER_MACRO -DTCL_HAVE_SETLINEBUF -DTCL_32_BIT_RANDOM -DTCL_POSIX_SIG X#LINK_OPTIONS=-lm X#RANLIB_CMD="ranlib" X#MCS_CMD=true X#SUPPORT_FLAGS=-DTCL_HAS_TM_ZONE X#SUPPORT_OBJS= X# X#TCL_OWNER=bin X#TCL_GROUP=bin X#TCL_DEFAULT=/usr/local/lib/tcldefault X# X#TCL_MAN_BASEDIR=/usr/man X#TCL_MAN_SECTION=3 X#TCL_MAN_SEPARATOR="" X#TCL_MAN_STYLE=long X#TCL_MAN_INDEX=0 X#TCL_MAN_INDEX_MERGE=0 X X#------------------------------------------------------------------------------ X# HPUX - Hewlett-Packard HP/UX X# X#SYS_DEP_FLAGS= -DTCL_32_BIT_RANDOM -DTCL_POSIX_SIG X#LINK_OPTIONS=-lBSD -lPW -lm X#RANLIB_CMD=true X#MCS_CMD=true X#SUPPORT_FLAGS=-DTCL_HAS_TM_ZONE X#SUPPORT_OBJS= X# X#TCL_OWNER=root X#TCL_GROUP=system X#TCL_DEFAULT=/usr/local/lib/tcldefault X# X#TCL_MAN_BASEDIR=/usr/man X#TCL_MAN_SECTION=3 X#TCL_MAN_SEPARATOR="" X#TCL_MAN_STYLE=long X#TCL_MAN_INDEX=0 X#TCL_MAN_INDEX_MERGE=0 X X#------------------------------------------------------------------------------ X# XENIX-386 - SCO Xenix 2.3.3 for the 80386 X# X#SYS_DEP_FLAGS=-DTCL_NO_SELECT -DTCL_SIG_PROC_INT X#LINK_OPTIONS=-ldir -lm X#RANLIB_CMD=ranlib X#MCS_CMD=true X#SUPPORT_FLAGS= X#SUPPORT_OBJS=strftime.o X# X#TCL_OWNER=bin X#TCL_GROUP=bin X#TCL_DEFAULT=/etc/default/tcl X# X#TCL_MAN_BASEDIR=/usr/man X#TCL_MAN_SECTION=tcl X#TCL_MAN_SEPARATOR="." X#TCL_MAN_STYLE=short X#TCL_MAN_INDEX=1 X#TCL_MAN_INDEX_MERGE=1 X X#------------------------------------------------------------------------------ X# End of Configuration Section X#============================================================================== X XSHELL=/bin/sh XTCLSHELL=../tcl X X# List of files that are touched by second makefiles when something changes. X XMADE.FILES=ucbsrc/made.tmp ossupport/made.tmp src/made.tmp X X# Options to pass to the next lowest level for C compilations. X XCFLAGS= $(OPTIMIZE_FLAG) -I../$(TCL_UCB_DIR) $(MEM_DEBUG_FLAGS) $(SYS_DEP_FLAGS) X Xall: ExtendedObjs tcl TCLDEFAULT X X# X# Generate the Tcl shell. X# Xtcl: libtcl.a src/main.o $(MADE.FILES) X $(RANLIB_CMD) libtcl.a X cc $(CFLAGS) src/main.o libtcl.a $(LINK_OPTIONS) -o tcl X if $(DO_STRIPPING) ; then \ X strip tcl; \ X $(MCS_CMD) tcl; fi X# X# Objects in the lower-level directorys X# XExtendedObjs: libtcl.a X cd ucbsrc;$(MAKE) -$(MAKEFLAGS) all 'CFLAGS=$(CFLAGS)' X X cd ossupport;$(MAKE) -$(MAKEFLAGS) all 'OBJS=$(SUPPORT_OBJS)' 'CFLAGS=$(CFLAGS) $(SUPPORT_FLAGS)' X X cd src;$(MAKE) -$(MAKEFLAGS) all 'CFLAGS=$(CFLAGS)' 'HISTORY_FLAG=$(HISTORY_FLAG)' 'TCL_DEFAULT=$(TCL_DEFAULT)' 'RANLIB_CMD=$(RANLIB_CMD)' 'LINK_OPTIONS=$(LINK_OPTIONS)' 'DO_STRIPPING=$(DO_STRIPPING)' 'MCS_CMD=$(MCS_CMD)' X X cd tclsrc;$(MAKE) -$(MAKEFLAGS) 'TCL_UCB_DIR=../$(TCL_UCB_DIR)' all X X# X# Generate a temporary TCLDEFAULT file so Tcl can be run in this directory. X# XTCLDEFAULT: X @echo " - Generating temporary TCLDEFAULT file -" X @echo '# Temporary TCLDEFAULT file for debugging' >TCLDEFAULT X @echo "set TCLPATH `pwd`/tcllib" >>TCLDEFAULT X @echo "set TCLINIT `pwd`/tcllib/TclInit.tcl" >>TCLDEFAULT X X X# X# Copy the baseline libtcl.a file. Force the other Makefiles to add their X# .o files to the library by nuking their made.tmp file. X# Xlibtcl.a:$(TCL_UCB_DIR)/libtcl.a X cp $(TCL_UCB_DIR)/libtcl.a . X rm -f ossupport/made.tmp ucbsrc/made.tmp src/made.tmp X X# X# This just test to see if the C++ include file compiles. X# Xtcl++: X cd src;$(MAKE) -$(MAKEFLAGS) tcl++ 'CFLAGS=$(CFLAGS)' X X# X# Run the Basic and Extended Tcl tests. X# Xtest: all X ./tcl -c "cd $(TCL_UCB_DIR)/tests;source all" X ./tcl -c "cd tests;source all" X X# X# Install Tcl. X# Xinstall: all install.conf X ./tcl tclsrc/installTcl.tcl install.conf X Xinstall.conf: Makefile X @echo "Creating install.conf" X @echo "set TCL_UCB_DIR {$(TCL_UCB_DIR)}" >install.conf X @echo "set TCL_DEFAULT {$(TCL_DEFAULT)}" >>install.conf X @echo "set TCL_OWNER {$(TCL_OWNER)}" >>install.conf X @echo "set TCL_GROUP {$(TCL_GROUP)}" >>install.conf X @echo "set TCL_BINDIR {$(TCL_BINDIR)}" >>install.conf X @echo "set TCL_LIBDIR {$(TCL_LIBDIR)}" >>install.conf X @echo "set TCL_INCLUDEDIR {$(TCL_INCLUDEDIR)}" >>install.conf X @echo "set TCL_TCLDIR {$(TCL_TCLDIR)}" >>install.conf X @echo "set TCL_MAN_INSTALL {$(TCL_MAN_INSTALL)}" >>install.conf X @echo "set TCL_MAN_BASEDIR {$(TCL_MAN_BASEDIR)}" >>install.conf X @echo "set TCL_MAN_SECTION {$(TCL_MAN_SECTION)}" >>install.conf X @echo "set TCL_MAN_SEPARATOR {$(TCL_MAN_SEPARATOR)}" >>install.conf X @echo "set TCL_MAN_STYLE {$(TCL_MAN_STYLE)}" >>install.conf X @echo "set TCL_MAN_INDEX {$(TCL_MAN_INDEX)}" >>install.conf X @echo "set TCL_MAN_INDEX_MERGE {$(TCL_MAN_INDEX_MERGE)}" >>install.conf X X Xclean: X cd ucbsrc;$(MAKE) -$(MAKEFLAGS) clean X cd ossupport;$(MAKE) -$(MAKEFLAGS) clean X cd src;$(MAKE) -$(MAKEFLAGS) clean X cd tclsrc;$(MAKE) -$(MAKEFLAGS) clean X -rm -f libtcl.a TCLDEFAULT tcl install.conf END_OF_FILE if test 14592 -ne `wc -c <'extended/Makefile.org'`; then echo shar: \"'extended/Makefile.org'\" unpacked with wrong size! fi # end of 'extended/Makefile.org' fi if test -f 'extended/src/tcl++.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'extended/src/tcl++.h'\" else echo shar: Extracting \"'extended/src/tcl++.h'\" \(13609 characters\) sed "s/^X//" >'extended/src/tcl++.h' <<'END_OF_FILE' X/* X * tcl++.h -- X * X * It also defines C++ classes that can be used to access a Tcl interpreter. X * If tcl.h is not already included, it includes it. Tcl.h has macros that X * allow it to work with K&R C, ANSI C and C++. X *--------------------------------------------------------------------------- X * Copyright 1991 Karl Lehenbauer and Mark Diekhans. X * X * Permission to use, copy, modify, and distribute this software and its X * documentation for any purpose and without fee is hereby granted, provided X * that the above copyright notice appear in all copies. Karl Lehenbauer and X * Mark Diekhans make no representations about the suitability of this X * software for any purpose. It is provided "as is" without express or X * implied warranty. X *--------------------------------------------------------------------------- X * Based on Tcl C++ classes developed by Parag Patel. X */ X X#ifndef _TCL_PLUS_PLUS_H X#define _TCL_PLUS_PLUS_H X X#include <stddef.h> X#include <stdlib.h> X#include <string.h> X#include <stdarg.h> X#ifndef TCLEXTEND_H X# include "tclExtend.h" X#endif X Xclass TclInterp_cl X{ X Tcl_Interp *interp; X X friend class TclTrace_cl; X Xpublic: X inline X TclInterp_cl () X { X interp = Tcl_CreateExtendedInterp (); X } X X inline X ~TclInterp_cl () X { X Tcl_DeleteInterp (interp); X } X X inline char * X Result () X { X return interp->result; X } X X inline int X ErrorLine () X { X return interp->errorLine; X } X X inline Tcl_Interp * X GetInterp () X { X return interp; X } X X /* X * Exported Tcl procedures (from standard baseline): X */ X X inline void X AppendElement (const char *string, X int noSep) X { X Tcl_AppendElement (interp, (char *) string, noSep); X } X X inline void X AppendResult (const char *p, X ...) X { X va_list argP; X X va_start (argP, p); X Tcl_AppendResult (interp, p, argP); X va_end (argP); X } X X inline void X AddErrorInfo (const char *message) X { X Tcl_AddErrorInfo (interp, (char *)message); X } X X inline void X CreateCommand (const char *cmdName, X Tcl_CmdProc *proc, X ClientData data, X Tcl_CmdDeleteProc *deleteProc) X { X Tcl_CreateCommand (interp, (char*) cmdName, proc, data, deleteProc); X } X X inline int X CreatePipeline (int argc, X char **argv, X int **pidArrayPtr, X int *inPipePtr, X int *outPipePtr, X int *errFilePtr) X { X return Tcl_CreatePipeline (interp, argc, argv, pidArrayPtr, inPipePtr, X outPipePtr, errFilePtr); X } X X inline Tcl_Trace X CreateTrace (int level, X Tcl_CmdTraceProc *proc, X ClientData data) X { X return Tcl_CreateTrace (interp, level, proc, data); X } X X inline void X DeleteCommand (const char *cmdName) X { X Tcl_DeleteCommand (interp, (char *)cmdName); X } X X inline void X DeleteTrace (Tcl_Trace trace) X { X Tcl_DeleteTrace(interp, trace); X } X X inline void X DetachPids (int numPids, X int *pidPtr) X { X Tcl_DetachPids (numPids, pidPtr); X } X X inline int X Eval (const char *cmd, X char flags = 0, X char **termPtr = NULL) X { return Tcl_Eval (interp, (char *) cmd, flags, termPtr); } X X inline int X EvalFile (const char *fileName) X { X return Tcl_EvalFile (interp, (char *) fileName); X } X X inline int X ExprBoolean (const char *string, X int *ptr) X { X return Tcl_ExprBoolean (interp, (char *) string, ptr); X } X X inline int X ExprDouble (const char *string, X double *ptr) X { X return Tcl_ExprDouble (interp, (char *) string, ptr); X } X X inline int X ExprLong (const char *string, X long *ptr) X { X return Tcl_ExprLong (interp, (char *) string, ptr); X } X X inline int X ExprString (const char *string) X { X return Tcl_ExprString (interp, (char *) string); X } X X inline int X GetBoolean (Tcl_Interp *interp, X const char *string, X int *boolPtr) X { X return Tcl_GetBoolean (interp, (char *) string, boolPtr); X } X X inline int X GetDouble (Tcl_Interp *interp, X const char *string, X double *doublePtr) X { X return Tcl_GetDouble (interp, (char *) string, doublePtr); X } X X inline int X GetInt (Tcl_Interp *interp, X const char *string, X int *intPtr) X { X return Tcl_GetInt (interp, (char *) string, intPtr); X } X X inline const char * X GetVar (const char *varName, X int flags = 0) X { X return Tcl_GetVar (interp, (char *) varName, flags); X } X X inline const char * X GetVar2 (const char *name1, X const char *name2, X int flags = 0) X { X return Tcl_GetVar2 (interp, (char *) name1, (char *) name2, flags); X } X X inline void X InitMemory () X { X Tcl_InitMemory (interp); X } X X inline char * X ParseVar (const char *string, X char **termPtr) X { return Tcl_ParseVar (interp, (char *) string, termPtr); } X X inline int X RecordAndEval (const char *cmd, X char flags) X { return Tcl_RecordAndEval (interp, (char *) cmd, flags); } X X inline void X ResetResult () X { X Tcl_ResetResult (interp); X } X X inline void X SetErrorCode (char *p, X ...) X { X va_list argP; X X va_start (argP, p); X Tcl_SetErrorCode (interp, p, argP); X va_end (argP); X } X X inline void X SetResult (const char *string) X { X Tcl_SetResult (interp, (char *) string, TCL_VOLATILE); X } X X inline void X SetResult (const char *string, X Tcl_FreeProc *freeProc) X { X Tcl_SetResult (interp, (char *) string, freeProc); X } X X inline const char * X SetVar (const char *varName, X const char *newValue, X int global = 0) X { X return Tcl_SetVar (interp, (char *) varName, (char *) newValue, X global); X } X X inline const char * X SetVar2 (const char *name1, X const char *name2, X const char *newValue, X int global) X { X return Tcl_SetVar2 (interp, (char *) name1, (char *) name2, X (char *) newValue, global); X } X X inline int X SplitList (const char *list, X int &argcP, X char **&argvP) X { return Tcl_SplitList (interp, (char *) list, &argcP, &argvP); } X X inline char * X TildeSubst (Tcl_Interp *interp, X const char *name) X { return Tcl_TildeSubst (interp, (char *) name); } X X int X TraceVar (const char *varName, X int flags, X Tcl_VarTraceProc *proc, X ClientData clientData) X { X return Tcl_TraceVar (interp, (char *) varName, flags, proc, X clientData); X } X X inline int X TraceVar2 (const char *name1, X const char *name2, X int flags, X Tcl_VarTraceProc *proc, X ClientData clientData) X { X return Tcl_TraceVar2 (interp, (char *) name1, (char *) name2, flags, X proc, clientData); X } X X inline const char * X UnixError () X { X return Tcl_UnixError (interp); X } X X inline void X UnsetVar (Tcl_Interp *interp, X const char *varName, X int global) X { Tcl_UnsetVar (interp, (char *) varName, global); } X X inline void X UnsetVar2 (Tcl_Interp *interp, X const char *name1, X const char *name2, X int global) X { Tcl_UnsetVar2 (interp, (char *) name1, (char *) name2, global); } X X inline void X UntraceVar (const char *varName, X int flags, X Tcl_VarTraceProc *proc, X ClientData clientData) X { X Tcl_UntraceVar (interp, (char *) varName, flags, proc, clientData); X } X X X inline void X UntraceVar2 (Tcl_Interp *interp, X const char *name1, X const char *name2, X int flags, X Tcl_VarTraceProc *proc, X ClientData clientData) X { X Tcl_UntraceVar2 (interp, (char *) name1, (char *) name2, flags, proc, X clientData); X } X X inline int X VarEval (const char *p, X ...) X { X int intResult; X va_list argP; X X va_start (argP, p); X intResult = Tcl_VarEval (interp, (char *) p, argP); X va_end (argP); X return intResult; X } X X inline ClientData X VarTraceInfo (const char *varName, X int flags, X Tcl_VarTraceProc *procPtr, X ClientData prevClientData) X { X return Tcl_VarTraceInfo (interp, (char *) varName, flags, procPtr, X prevClientData); X } X X inline ClientData X VarTraceInfo2 (const char *name1, X const char *name2, X int flags, X Tcl_VarTraceProc *procPtr, X ClientData prevClientData) X { X return Tcl_VarTraceInfo2 (interp, (char *) name1, (char *) name2, X flags, procPtr, prevClientData); X } X X /* X * Exported Tcl functions added to baseline Tcl by the Extended Tcl X * implementation. X */ X X inline void X CommandLoop (FILE *in, X FILE *out, X int interactive) X { X Tcl_CommandLoop (interp, in, out, interactive); X } X X inline char * X DeleteKeyedListField (const char *fieldName, X const char *keyedList) X { X return Tcl_DeleteKeyedListField (interp, fieldName, keyedList); X } X X inline int X GetKeyedListField (const char *fieldName, X const char *keyedList, X char **fieldValuePtr) X { X return Tcl_GetKeyedListField (interp, fieldName, keyedList, X fieldValuePtr); X } X X inline int X GetLong (Tcl_Interp *interp, X const char *string, X long *longPtr) X { return Tcl_GetLong (interp, string, longPtr); } X X inline int X GetUnsigned (Tcl_Interp *interp, X const char *string, X unsigned *unsignedPtr) X { return Tcl_GetUnsigned (interp, string, unsignedPtr); } X X inline char * X SetKeyedListField (const char *fieldName, X const char *fieldvalue, X const char *keyedList) X { X return Tcl_SetKeyedListField (interp, fieldName, fieldvalue, X keyedList); X } X X inline void X Startup (int argc, X const char **argv, X const char *defaultFile) X { X Tcl_Startup (interp, argc, argv, defaultFile); X } X X inline int X System (const char *command) X { X return Tcl_System (interp, (char*) command); X } X}; X Xclass TclTrace_cl X{ X Tcl_Trace trace; X Tcl_Interp *interp; X Xpublic: X inline X TclTrace_cl (TclInterp_cl &interpCl, X int level, X Tcl_CmdTraceProc *proc, X ClientData data) X { X trace = Tcl_CreateTrace (interp = interpCl.interp, level, proc, data); X } X X inline ~TclTrace_cl () X { Tcl_DeleteTrace (interp, trace); } X}; X X Xclass TclCmdBuf_cl X{ X Tcl_CmdBuf buf; X Xpublic: X inline X TclCmdBuf_cl () X { buf = Tcl_CreateCmdBuf (); } X X inline X ~TclCmdBuf_cl () X { Tcl_DeleteCmdBuf (buf); } X X inline const char * X AssembleCmd (const char *string) X { return Tcl_AssembleCmd (buf, (char *) string); } X}; X Xclass TclHandleTbl_cl X{ X void_pt headerPtr; X Xpublic: X inline X TclHandleTbl_cl (const char *handleBase, X int entrySize, X int initEntries) X X { X headerPtr = Tcl_HandleTblInit (handleBase, entrySize, initEntries); X } X X inline X ~TclHandleTbl_cl () X { X Tcl_HandleTblRelease (headerPtr); X } X X inline void_pt X HandleAlloc (char *handlePtr) X { X return Tcl_HandleAlloc (headerPtr, handlePtr); X } X X inline void X HandleFree (void_pt entryPtr) X { X Tcl_HandleFree (headerPtr, entryPtr); X } X X inline int X HandleTblUseCount (int amount) X { X return Tcl_HandleTblUseCount (headerPtr, amount); X } X X inline void_pt X HandleWalk (int *walkKeyPtr) X { X return Tcl_HandleWalk (headerPtr, walkKeyPtr); X } X X inline void_pt X HandleXlate (Tcl_Interp *interp, X const char *handle) X { X return Tcl_HandleXlate (interp, headerPtr, handle); X } X}; X X#endif /* _TCL_PLUS_PLUS_H */ X X END_OF_FILE if test 13609 -ne `wc -c <'extended/src/tcl++.h'`; then echo shar: \"'extended/src/tcl++.h'\" unpacked with wrong size! fi # end of 'extended/src/tcl++.h' fi echo shar: End of archive 15 \(of 23\). cp /dev/null ark15isdone MISSING="" for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked all 23 archives. echo "Now cd to "extended", edit the makefile, then do a "make"" rm -f ark[1-9]isdone ark[1-9][0-9]isdone else echo You still need to unpack the following archives: echo " " ${MISSING} fi ## End of shell archive. exit 0 exit 0 # Just in case... -- Kent Landfield INTERNET: kent@sparky.IMD.Sterling.COM Sterling Software, IMD UUCP: uunet!sparky!kent Phone: (402) 291-8300 FAX: (402) 291-4362 Please send comp.sources.misc-related mail to kent@uunet.uu.net.