home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume26 / tclx / part15 < prev    next >
Encoding:
Text File  |  1991-11-19  |  46.2 KB  |  1,452 lines

  1. Newsgroups: comp.sources.misc
  2. From: karl@sugar.neosoft.com (Karl Lehenbauer)
  3. Subject:  v26i015:  tclx - extensions and on-line help for tcl 6.1, Part15/23
  4. Message-ID: <1991Nov19.135448.1189@sparky.imd.sterling.com>
  5. X-Md4-Signature: e5ba0678d38d49bc02a61896ba333a55
  6. Date: Tue, 19 Nov 1991 13:54:48 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: karl@sugar.neosoft.com (Karl Lehenbauer)
  10. Posting-number: Volume 26, Issue 15
  11. Archive-name: tclx/part15
  12. Environment: UNIX
  13.  
  14. #! /bin/sh
  15. # This is a shell archive.  Remove anything before this line, then unpack
  16. # it by saving it into a file and typing "sh file".  To overwrite existing
  17. # files, type "sh file -c".  You can also feed this as standard input via
  18. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  19. # will see the following message at the end:
  20. #        "End of archive 15 (of 23)."
  21. # Contents:  extended/Makefile extended/Makefile.org
  22. #   extended/src/tcl++.h
  23. # Wrapped by karl@one on Wed Nov 13 21:50:28 1991
  24. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  25. if test -f 'extended/Makefile' -a "${1}" != "-c" ; then 
  26.   echo shar: Will not clobber existing file \"'extended/Makefile'\"
  27. else
  28. echo shar: Extracting \"'extended/Makefile'\" \(14592 characters\)
  29. sed "s/^X//" >'extended/Makefile' <<'END_OF_FILE'
  30. X#==============================================================================
  31. X#
  32. X# Makefile for Extended Tcl.  This requires Tcl 6.1 from Berkeley, which
  33. X# should be compiled before running this makefile.  Its location is configured
  34. X# below.
  35. X#
  36. X#------------------------------------------------------------------------------
  37. X# Copyright 1991 Karl Lehenbauer and Mark Diekhans.
  38. X#
  39. X# Permission to use, copy, modify, and distribute this software and its
  40. X# documentation for any purpose and without fee is hereby granted, provided
  41. X# that the above copyright notice appear in all copies.  Karl Lehenbauer and
  42. X# Mark Diekhans make no representations about the suitability of this
  43. X# software for any purpose.  It is provided "as is" without express or
  44. X# implied warranty.
  45. X#==============================================================================
  46. X#
  47. X# Configuration section.  Modify this section to set some general options and
  48. X# selecting a section for a specific Unix implementation.
  49. X#
  50. X#==============================================================================
  51. X
  52. X#------------------------------------------------------------------------------
  53. X#
  54. X# Location of the UCB Tcl distribution relative to this directory.
  55. X#
  56. XTCL_UCB_DIR=../tcl6.1
  57. X
  58. X#------------------------------------------------------------------------------
  59. X# Compiler debug/optimization/profiling flag to use.  Not that if debugging or
  60. X# profiling is enabled, the DO_STRIPPING option below must be disabled.
  61. X#
  62. XOPTIMIZE_FLAG=-O
  63. X
  64. X#------------------------------------------------------------------------------
  65. X# Stripping of the final tclshell binary.  Specify `true' if the binary is to
  66. X# be stripped (optimized case) or specify `false' if the binary is not to be
  67. X# stripped (debugging case).
  68. X#
  69. XDO_STRIPPING=true
  70. X
  71. X#------------------------------------------------------------------------------
  72. X# Enable or disable Tcl history in the Tcl flag.  If this macro is set to
  73. X# '-DTCL_NOHISTORY', the `history' command will not be available in the Tcl
  74. X# shell.  Many people do not find the history command useful and its rather
  75. X# large, so this way it can be excluded from the standard shell.  It will
  76. X# still be in the library and will be available in other applications if they
  77. X# use `Tcl_RecordAndEval'.
  78. X#
  79. XHISTORY_FLAG=
  80. X
  81. X#------------------------------------------------------------------------------
  82. X# Memory debugging defines.  These are only of interest if you are adding C
  83. X# code to Tcl or debugging Tcl C code.  They help find memory overwrites and
  84. X# leaks.  One or more of the following flags may be specified (in the form
  85. X# -DFLAGNAME).
  86. X#
  87. X#    o TCL_MEM_DEBUG - Turn on memory debugging. 
  88. X#    o TCL_SHELL_MEM_LEAK - Dump a list of active memory blocks when the
  89. X#      shell exits an eof (requires TCL_MEM_DEBUG).
  90. X#
  91. X# NOTE: If TCL_MEM_DEBUG is enabled, the Berkeley Tcl distribution must be 
  92. X# recompiled with this option as well, or it will not link.  In addition a flag
  93. X# MEM_VALIDATE may be specified in the Berkeley Tcl compilation to do
  94. X# validation of all memory blocks on each allocation or deallocation (very
  95. X# slow).
  96. X#
  97. XMEM_DEBUG_FLAGS=
  98. X
  99. X#==============================================================================
  100. X# Install options sections.  This sections describes the installation options.
  101. X# Some of the actual values are set under each system definition in the
  102. X# system dependent section.  Your might want to change some of these values
  103. X# before installing.
  104. X#..............................................................................
  105. X#
  106. X# o TCL_OWNER - The user that will own all Tcl files after installation.
  107. X#   (system dependent)
  108. X# o TCL_GROUP - The group that all Tcl files will belong to after installation.
  109. X#   (system dependent)
  110. X# o TCL_DEFAULT - Base name of Tcl default file.  This name will have a
  111. X#   version number appended.  (system dependent)
  112. X#
  113. X
  114. X#
  115. X# The directory to install Tcl binary into.
  116. X#
  117. XTCL_BINDIR=/usr/local/bin
  118. X
  119. X#
  120. X# The directory tcl.a library goes into.
  121. X#
  122. XTCL_LIBDIR=/usr/local/lib
  123. X
  124. X#
  125. X# The directory the Tcl .h files go into.
  126. X#
  127. XTCL_INCLUDEDIR=/usr/local/include
  128. X
  129. X#
  130. X# The directory .tcl files and the .tlib library goes into.
  131. X#
  132. XTCL_TCLDIR=/usr/local/tcl
  133. X
  134. X#==============================================================================
  135. X# This section defines where and how the manual pages are to be installed.
  136. X# This is somewhat problematic, so a global option not to install manual pages
  137. X# is provided. Since there are so many manual pages provided, they are placed
  138. X# together in one Tcl manual page directory, rather than splitting into the
  139. X# standard manual pages directories.  The actual definitions of these variables
  140. X# are set for in the system dependent section.  You might want to modify these
  141. X# values.
  142. X#..............................................................................
  143. X
  144. X#
  145. X# Set to 1 to install manual files, to 0 to not install manual files.
  146. X#
  147. X
  148. XTCL_MAN_INSTALL=1
  149. X
  150. X# o TCL_MAN_BASEDIR - Base manual directory where all of the man.* and cat.*
  151. X#   directories live.
  152. X# o TCL_MAN_SECTION - Section for Tcl manual pages. This is appended to the
  153. X#   directory name and all of the manual file names.
  154. X# o TCL_MAN_SEPARATOR - The separator character used in the directory name
  155. X#   of the cat* and man* manual directories.  This is usually empty  or 
  156. X#   a period.
  157. X# o TCL_MAN_STYLE - The style of manual management the system has.  It is
  158. X#   a string with one of the following values:
  159. X#      o SHORT - Short file name installation (an index can be generated).
  160. X#      o LONG - Long file name installation, a link will be made for each
  161. X#        name the manual page is to be available under.
  162. X# o TCL_MAN_INDEX - If 1, then a manual page index will be build in the manual
  163. X#   base directory named index.TCL.  Each line in the file has the form:
  164. X#       mansubject manfile section
  165. X# o TCL_MAN_INDEX_MERGE - If 1, then the manual index will be merged with the
  166. X#   an index file named `index' in the manual base directory.  The old index
  167. X#   will be backed up in a file named `index.bak'.
  168. X
  169. X#==============================================================================
  170. X# System specific configuration.  Comment out the section of defines that are
  171. X# required for your version of Unix.  In addition to the options defined in the
  172. X# Berkeley source the following options can be defined here.  This information
  173. X# will help you build your own system configuration if one is not supplied
  174. X# here.
  175. X#
  176. X#    o SYS_DEP_FLAGS - The system dependency flags.  The following options are
  177. X#      available, these should be defined using -Dflag.
  178. X#
  179. X#      o TCL_NO_TOLOWER_MACRO - Define if the `_tolower' and `_toupper' macros
  180. X#        are not available.
  181. X#      o TCL_HAVE_SETLINEBUF - Define if the `setlinebuf' is available as part
  182. X#        of stdio.
  183. X#      o TCL_32_BIT_RANDOM - Define if the `rand' function returns a value in
  184. X#        the range 0..(2^31)-1, leave undefined if `rand' returns a value
  185. X#        in the range 0..(2^15)-1.
  186. X#      o TCL_NO_SELECT - The select call is not available.
  187. X#      o TCL_USE_BZERO_MACRO - Use a macro to define bzero for the select
  188. X#        FD_ZERO macro.
  189. X#      o TCL_SIG_PROC_INT - Set if the signal handling procs have a return type
  190. X#        of int instead of void.
  191. X#      o TCL_POSIX_SIG - Set if posix signals are available (sigaction, etc).
  192. X#
  193. X#    o LINK_OPTIONS - The flags to specify when linking the tclshell.
  194. X#
  195. X#    o RANLIB_CMD - Either `ranlib' if ranlib is required or `true' if ranlib
  196. X#      should not be used.
  197. X#
  198. X#    o MCS_CMD - Command to delete comments from the object file comment
  199. X#      section, if available.  The command `true' if it's not available.  This
  200. X#      makes the object file even smaller after its stipped.
  201. X#
  202. X#    o SUPPORT_FLAGS - The flags for SUPPORT_OBJS code.  The following options
  203. X#      are available, these should be defined using -Dflag.
  204. X#
  205. X#      o TCL_HAS_TM_ZONE - If if 'struct tm' has the 'tm_zone' field.   Used
  206. X#        by strftime.
  207. X#
  208. X#    o SUPPORT_OBJS - The object files to compile to implement library 
  209. X#      functions that are not available on this particular version of Unix.
  210. X#      The following are available:
  211. X#         o strftime
  212. X
  213. X#------------------------------------------------------------------------------
  214. X# System V 3.2.0 (tested on Bell-Tech or Intel Unix for the Intel 386)
  215. X#
  216. X#SYS_DEP_FLAGS=-DTCL_NO_SELECT
  217. X#LINK_OPTIONS=-lc_s -lform -lm
  218. X#RANLIB_CMD=true
  219. X#MCS_CMD=mcs -d
  220. X#SUPPORT_FLAGS=
  221. X#SUPPORT_OBJS=strftime.o
  222. X#
  223. X#TCL_OWNER=bin
  224. X#TCL_GROUP=bin
  225. X#TCL_DEFAULT=/etc/default/tcl
  226. X#
  227. X#TCL_MAN_BASEDIR=/usr/man
  228. X#TCL_MAN_SECTION=tcl
  229. X#TCL_MAN_SEPARATOR="."
  230. X#TCL_MAN_STYLE=short
  231. X#TCL_MAN_INDEX=1
  232. X#TCL_MAN_INDEX_MERGE=0
  233. X
  234. X#------------------------------------------------------------------------------
  235. X#  SCO Unix - System V 3.2.2
  236. X#
  237. X#SYS_DEP_FLAGS=-DTCL_USE_BZERO_MACRO -DTCL_POSIX_SIG
  238. X#LINK_OPTIONS=-lc_s -lm
  239. X#RANLIB_CMD=true
  240. X#MCS_CMD=mcs -d
  241. X#SUPPORT_FLAGS=
  242. X#SUPPORT_OBJS=
  243. X#
  244. X#TCL_OWNER=bin
  245. X#TCL_GROUP=bin
  246. X#TCL_DEFAULT=/etc/default/tcl
  247. X#
  248. X#TCL_MAN_BASEDIR=/usr/man
  249. X#TCL_MAN_SECTION=tcl
  250. X#TCL_MAN_SEPARATOR="."
  251. X#TCL_MAN_STYLE=short
  252. X#TCL_MAN_INDEX=1
  253. X#TCL_MAN_INDEX_MERGE=1
  254. X
  255. X#------------------------------------------------------------------------------
  256. X# BSD
  257. X#
  258. X#SYS_DEP_FLAGS= -DTCL_NO_TOLOWER_MACRO -DTCL_HAVE_SETLINEBUF -DTCL_32_BIT_RANDOM
  259. X#LINK_OPTIONS=-lm
  260. X#RANLIB_CMD="ranlib"
  261. X#MCS_CMD=true
  262. X#SUPPORT_FLAGS=-DTCL_HAS_TM_ZONE
  263. X#SUPPORT_OBJS=strftime.o
  264. X#
  265. X#TCL_OWNER=root
  266. X#TCL_GROUP=system
  267. X#TCL_DEFAULT=/usr/local/lib/tcldefault
  268. X#
  269. X#TCL_MAN_BASEDIR=/usr/man
  270. X#TCL_MAN_SECTION=3
  271. X#TCL_MAN_SEPARATOR=""
  272. X#TCL_MAN_STYLE=long
  273. X#TCL_MAN_INDEX=0
  274. X#TCL_MAN_INDEX_MERGE=0
  275. X
  276. X#------------------------------------------------------------------------------
  277. X# SUN O/S
  278. X#
  279. X#SYS_DEP_FLAGS=-DTCL_NO_TOLOWER_MACRO -DTCL_HAVE_SETLINEBUF -DTCL_32_BIT_RANDOM -DTCL_POSIX_SIG
  280. X#LINK_OPTIONS=-lm
  281. X#RANLIB_CMD="ranlib"
  282. X#MCS_CMD=true
  283. X#SUPPORT_FLAGS=-DTCL_HAS_TM_ZONE
  284. X#SUPPORT_OBJS=
  285. X#
  286. X#TCL_OWNER=bin
  287. X#TCL_GROUP=bin
  288. X#TCL_DEFAULT=/usr/local/lib/tcldefault
  289. X#
  290. X#TCL_MAN_BASEDIR=/usr/man
  291. X#TCL_MAN_SECTION=3
  292. X#TCL_MAN_SEPARATOR=""
  293. X#TCL_MAN_STYLE=long
  294. X#TCL_MAN_INDEX=0
  295. X#TCL_MAN_INDEX_MERGE=0
  296. X
  297. X#------------------------------------------------------------------------------
  298. X#    HPUX - Hewlett-Packard HP/UX
  299. X#
  300. X#SYS_DEP_FLAGS= -DTCL_32_BIT_RANDOM -DTCL_POSIX_SIG
  301. X#LINK_OPTIONS=-lBSD -lPW -lm
  302. X#RANLIB_CMD=true
  303. X#MCS_CMD=true
  304. X#SUPPORT_FLAGS=-DTCL_HAS_TM_ZONE
  305. X#SUPPORT_OBJS=
  306. X#
  307. X#TCL_OWNER=root
  308. X#TCL_GROUP=system
  309. X#TCL_DEFAULT=/usr/local/lib/tcldefault
  310. X#
  311. X#TCL_MAN_BASEDIR=/usr/man
  312. X#TCL_MAN_SECTION=3
  313. X#TCL_MAN_SEPARATOR=""
  314. X#TCL_MAN_STYLE=long
  315. X#TCL_MAN_INDEX=0
  316. X#TCL_MAN_INDEX_MERGE=0
  317. X
  318. X#------------------------------------------------------------------------------
  319. X#    XENIX-386 - SCO Xenix 2.3.3 for the 80386
  320. X#
  321. X#SYS_DEP_FLAGS=-DTCL_NO_SELECT -DTCL_SIG_PROC_INT
  322. X#LINK_OPTIONS=-ldir -lm
  323. X#RANLIB_CMD=ranlib
  324. X#MCS_CMD=true
  325. X#SUPPORT_FLAGS=
  326. X#SUPPORT_OBJS=strftime.o
  327. X#
  328. X#TCL_OWNER=bin
  329. X#TCL_GROUP=bin
  330. X#TCL_DEFAULT=/etc/default/tcl
  331. X#
  332. X#TCL_MAN_BASEDIR=/usr/man
  333. X#TCL_MAN_SECTION=tcl
  334. X#TCL_MAN_SEPARATOR="."
  335. X#TCL_MAN_STYLE=short
  336. X#TCL_MAN_INDEX=1
  337. X#TCL_MAN_INDEX_MERGE=1
  338. X
  339. X#------------------------------------------------------------------------------
  340. X#                        End of Configuration Section
  341. X#==============================================================================
  342. X
  343. XSHELL=/bin/sh
  344. XTCLSHELL=../tcl
  345. X
  346. X# List of files that are touched by second makefiles when something changes.
  347. X
  348. XMADE.FILES=ucbsrc/made.tmp ossupport/made.tmp src/made.tmp
  349. X
  350. X# Options to pass to the next lowest level for C compilations.
  351. X
  352. XCFLAGS= $(OPTIMIZE_FLAG) -I../$(TCL_UCB_DIR) $(MEM_DEBUG_FLAGS) $(SYS_DEP_FLAGS)
  353. X
  354. Xall: ExtendedObjs tcl TCLDEFAULT
  355. X
  356. X#
  357. X# Generate the Tcl shell.
  358. X#
  359. Xtcl: libtcl.a src/main.o $(MADE.FILES)
  360. X    $(RANLIB_CMD) libtcl.a
  361. X    cc $(CFLAGS) src/main.o libtcl.a $(LINK_OPTIONS) -o tcl
  362. X    if $(DO_STRIPPING) ; then \
  363. X        strip tcl; \
  364. X        $(MCS_CMD) tcl; fi
  365. X#
  366. X# Objects in the lower-level directorys
  367. X#
  368. XExtendedObjs: libtcl.a
  369. X    cd ucbsrc;$(MAKE) -$(MAKEFLAGS) all 'CFLAGS=$(CFLAGS)'
  370. X
  371. X    cd ossupport;$(MAKE) -$(MAKEFLAGS) all 'OBJS=$(SUPPORT_OBJS)' 'CFLAGS=$(CFLAGS) $(SUPPORT_FLAGS)'
  372. X
  373. 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)'
  374. X
  375. X    cd tclsrc;$(MAKE) -$(MAKEFLAGS) 'TCL_UCB_DIR=../$(TCL_UCB_DIR)' all
  376. X
  377. X#
  378. X# Generate a temporary TCLDEFAULT file so Tcl can be run in this directory.
  379. X#
  380. XTCLDEFAULT:
  381. X    @echo "    - Generating temporary TCLDEFAULT file -"
  382. X    @echo '# Temporary TCLDEFAULT file for debugging'  >TCLDEFAULT
  383. X    @echo "set TCLPATH `pwd`/tcllib"                  >>TCLDEFAULT
  384. X    @echo "set TCLINIT `pwd`/tcllib/TclInit.tcl"      >>TCLDEFAULT
  385. X
  386. X
  387. X#
  388. X# Copy the baseline libtcl.a file.  Force the other Makefiles to add their
  389. X# .o files to the library by nuking their made.tmp file.
  390. X#
  391. Xlibtcl.a:$(TCL_UCB_DIR)/libtcl.a
  392. X    cp $(TCL_UCB_DIR)/libtcl.a .
  393. X    rm -f ossupport/made.tmp ucbsrc/made.tmp src/made.tmp
  394. X
  395. X#
  396. X# This just test to see if the C++ include file compiles.
  397. X#
  398. Xtcl++:
  399. X    cd src;$(MAKE) -$(MAKEFLAGS) tcl++ 'CFLAGS=$(CFLAGS)'
  400. X
  401. X#
  402. X# Run the Basic and Extended Tcl tests.
  403. X#
  404. Xtest: all
  405. X    ./tcl -c "cd $(TCL_UCB_DIR)/tests;source all"
  406. X    ./tcl -c "cd tests;source all"    
  407. X
  408. X#
  409. X# Install Tcl.
  410. X#
  411. Xinstall: all install.conf
  412. X    ./tcl tclsrc/installTcl.tcl install.conf
  413. X
  414. Xinstall.conf: Makefile
  415. X    @echo "Creating install.conf"
  416. X    @echo "set TCL_UCB_DIR         {$(TCL_UCB_DIR)}"          >install.conf
  417. X    @echo "set TCL_DEFAULT         {$(TCL_DEFAULT)}"         >>install.conf
  418. X    @echo "set TCL_OWNER           {$(TCL_OWNER)}"           >>install.conf
  419. X    @echo "set TCL_GROUP           {$(TCL_GROUP)}"           >>install.conf
  420. X    @echo "set TCL_BINDIR          {$(TCL_BINDIR)}"          >>install.conf
  421. X    @echo "set TCL_LIBDIR          {$(TCL_LIBDIR)}"          >>install.conf
  422. X    @echo "set TCL_INCLUDEDIR      {$(TCL_INCLUDEDIR)}"      >>install.conf
  423. X    @echo "set TCL_TCLDIR          {$(TCL_TCLDIR)}"          >>install.conf
  424. X    @echo "set TCL_MAN_INSTALL     {$(TCL_MAN_INSTALL)}"     >>install.conf
  425. X    @echo "set TCL_MAN_BASEDIR     {$(TCL_MAN_BASEDIR)}"     >>install.conf
  426. X    @echo "set TCL_MAN_SECTION     {$(TCL_MAN_SECTION)}"     >>install.conf
  427. X    @echo "set TCL_MAN_SEPARATOR   {$(TCL_MAN_SEPARATOR)}"   >>install.conf
  428. X    @echo "set TCL_MAN_STYLE       {$(TCL_MAN_STYLE)}"       >>install.conf
  429. X    @echo "set TCL_MAN_INDEX       {$(TCL_MAN_INDEX)}"       >>install.conf
  430. X    @echo "set TCL_MAN_INDEX_MERGE {$(TCL_MAN_INDEX_MERGE)}" >>install.conf
  431. X    
  432. X
  433. Xclean:
  434. X    cd ucbsrc;$(MAKE) -$(MAKEFLAGS) clean
  435. X    cd ossupport;$(MAKE) -$(MAKEFLAGS) clean
  436. X    cd src;$(MAKE) -$(MAKEFLAGS) clean
  437. X    cd tclsrc;$(MAKE) -$(MAKEFLAGS) clean
  438. X    -rm -f libtcl.a TCLDEFAULT tcl install.conf
  439. END_OF_FILE
  440. if test 14592 -ne `wc -c <'extended/Makefile'`; then
  441.     echo shar: \"'extended/Makefile'\" unpacked with wrong size!
  442. fi
  443. # end of 'extended/Makefile'
  444. fi
  445. if test -f 'extended/Makefile.org' -a "${1}" != "-c" ; then 
  446.   echo shar: Will not clobber existing file \"'extended/Makefile.org'\"
  447. else
  448. echo shar: Extracting \"'extended/Makefile.org'\" \(14592 characters\)
  449. sed "s/^X//" >'extended/Makefile.org' <<'END_OF_FILE'
  450. X#==============================================================================
  451. X#
  452. X# Makefile for Extended Tcl.  This requires Tcl 6.1 from Berkeley, which
  453. X# should be compiled before running this makefile.  Its location is configured
  454. X# below.
  455. X#
  456. X#------------------------------------------------------------------------------
  457. X# Copyright 1991 Karl Lehenbauer and Mark Diekhans.
  458. X#
  459. X# Permission to use, copy, modify, and distribute this software and its
  460. X# documentation for any purpose and without fee is hereby granted, provided
  461. X# that the above copyright notice appear in all copies.  Karl Lehenbauer and
  462. X# Mark Diekhans make no representations about the suitability of this
  463. X# software for any purpose.  It is provided "as is" without express or
  464. X# implied warranty.
  465. X#==============================================================================
  466. X#
  467. X# Configuration section.  Modify this section to set some general options and
  468. X# selecting a section for a specific Unix implementation.
  469. X#
  470. X#==============================================================================
  471. X
  472. X#------------------------------------------------------------------------------
  473. X#
  474. X# Location of the UCB Tcl distribution relative to this directory.
  475. X#
  476. XTCL_UCB_DIR=../tcl6.1
  477. X
  478. X#------------------------------------------------------------------------------
  479. X# Compiler debug/optimization/profiling flag to use.  Not that if debugging or
  480. X# profiling is enabled, the DO_STRIPPING option below must be disabled.
  481. X#
  482. XOPTIMIZE_FLAG=-O
  483. X
  484. X#------------------------------------------------------------------------------
  485. X# Stripping of the final tclshell binary.  Specify `true' if the binary is to
  486. X# be stripped (optimized case) or specify `false' if the binary is not to be
  487. X# stripped (debugging case).
  488. X#
  489. XDO_STRIPPING=true
  490. X
  491. X#------------------------------------------------------------------------------
  492. X# Enable or disable Tcl history in the Tcl flag.  If this macro is set to
  493. X# '-DTCL_NOHISTORY', the `history' command will not be available in the Tcl
  494. X# shell.  Many people do not find the history command useful and its rather
  495. X# large, so this way it can be excluded from the standard shell.  It will
  496. X# still be in the library and will be available in other applications if they
  497. X# use `Tcl_RecordAndEval'.
  498. X#
  499. XHISTORY_FLAG=
  500. X
  501. X#------------------------------------------------------------------------------
  502. X# Memory debugging defines.  These are only of interest if you are adding C
  503. X# code to Tcl or debugging Tcl C code.  They help find memory overwrites and
  504. X# leaks.  One or more of the following flags may be specified (in the form
  505. X# -DFLAGNAME).
  506. X#
  507. X#    o TCL_MEM_DEBUG - Turn on memory debugging. 
  508. X#    o TCL_SHELL_MEM_LEAK - Dump a list of active memory blocks when the
  509. X#      shell exits an eof (requires TCL_MEM_DEBUG).
  510. X#
  511. X# NOTE: If TCL_MEM_DEBUG is enabled, the Berkeley Tcl distribution must be 
  512. X# recompiled with this option as well, or it will not link.  In addition a flag
  513. X# MEM_VALIDATE may be specified in the Berkeley Tcl compilation to do
  514. X# validation of all memory blocks on each allocation or deallocation (very
  515. X# slow).
  516. X#
  517. XMEM_DEBUG_FLAGS=
  518. X
  519. X#==============================================================================
  520. X# Install options sections.  This sections describes the installation options.
  521. X# Some of the actual values are set under each system definition in the
  522. X# system dependent section.  Your might want to change some of these values
  523. X# before installing.
  524. X#..............................................................................
  525. X#
  526. X# o TCL_OWNER - The user that will own all Tcl files after installation.
  527. X#   (system dependent)
  528. X# o TCL_GROUP - The group that all Tcl files will belong to after installation.
  529. X#   (system dependent)
  530. X# o TCL_DEFAULT - Base name of Tcl default file.  This name will have a
  531. X#   version number appended.  (system dependent)
  532. X#
  533. X
  534. X#
  535. X# The directory to install Tcl binary into.
  536. X#
  537. XTCL_BINDIR=/usr/local/bin
  538. X
  539. X#
  540. X# The directory tcl.a library goes into.
  541. X#
  542. XTCL_LIBDIR=/usr/local/lib
  543. X
  544. X#
  545. X# The directory the Tcl .h files go into.
  546. X#
  547. XTCL_INCLUDEDIR=/usr/local/include
  548. X
  549. X#
  550. X# The directory .tcl files and the .tlib library goes into.
  551. X#
  552. XTCL_TCLDIR=/usr/local/tcl
  553. X
  554. X#==============================================================================
  555. X# This section defines where and how the manual pages are to be installed.
  556. X# This is somewhat problematic, so a global option not to install manual pages
  557. X# is provided. Since there are so many manual pages provided, they are placed
  558. X# together in one Tcl manual page directory, rather than splitting into the
  559. X# standard manual pages directories.  The actual definitions of these variables
  560. X# are set for in the system dependent section.  You might want to modify these
  561. X# values.
  562. X#..............................................................................
  563. X
  564. X#
  565. X# Set to 1 to install manual files, to 0 to not install manual files.
  566. X#
  567. X
  568. XTCL_MAN_INSTALL=1
  569. X
  570. X# o TCL_MAN_BASEDIR - Base manual directory where all of the man.* and cat.*
  571. X#   directories live.
  572. X# o TCL_MAN_SECTION - Section for Tcl manual pages. This is appended to the
  573. X#   directory name and all of the manual file names.
  574. X# o TCL_MAN_SEPARATOR - The separator character used in the directory name
  575. X#   of the cat* and man* manual directories.  This is usually empty  or 
  576. X#   a period.
  577. X# o TCL_MAN_STYLE - The style of manual management the system has.  It is
  578. X#   a string with one of the following values:
  579. X#      o SHORT - Short file name installation (an index can be generated).
  580. X#      o LONG - Long file name installation, a link will be made for each
  581. X#        name the manual page is to be available under.
  582. X# o TCL_MAN_INDEX - If 1, then a manual page index will be build in the manual
  583. X#   base directory named index.TCL.  Each line in the file has the form:
  584. X#       mansubject manfile section
  585. X# o TCL_MAN_INDEX_MERGE - If 1, then the manual index will be merged with the
  586. X#   an index file named `index' in the manual base directory.  The old index
  587. X#   will be backed up in a file named `index.bak'.
  588. X
  589. X#==============================================================================
  590. X# System specific configuration.  Comment out the section of defines that are
  591. X# required for your version of Unix.  In addition to the options defined in the
  592. X# Berkeley source the following options can be defined here.  This information
  593. X# will help you build your own system configuration if one is not supplied
  594. X# here.
  595. X#
  596. X#    o SYS_DEP_FLAGS - The system dependency flags.  The following options are
  597. X#      available, these should be defined using -Dflag.
  598. X#
  599. X#      o TCL_NO_TOLOWER_MACRO - Define if the `_tolower' and `_toupper' macros
  600. X#        are not available.
  601. X#      o TCL_HAVE_SETLINEBUF - Define if the `setlinebuf' is available as part
  602. X#        of stdio.
  603. X#      o TCL_32_BIT_RANDOM - Define if the `rand' function returns a value in
  604. X#        the range 0..(2^31)-1, leave undefined if `rand' returns a value
  605. X#        in the range 0..(2^15)-1.
  606. X#      o TCL_NO_SELECT - The select call is not available.
  607. X#      o TCL_USE_BZERO_MACRO - Use a macro to define bzero for the select
  608. X#        FD_ZERO macro.
  609. X#      o TCL_SIG_PROC_INT - Set if the signal handling procs have a return type
  610. X#        of int instead of void.
  611. X#      o TCL_POSIX_SIG - Set if posix signals are available (sigaction, etc).
  612. X#
  613. X#    o LINK_OPTIONS - The flags to specify when linking the tclshell.
  614. X#
  615. X#    o RANLIB_CMD - Either `ranlib' if ranlib is required or `true' if ranlib
  616. X#      should not be used.
  617. X#
  618. X#    o MCS_CMD - Command to delete comments from the object file comment
  619. X#      section, if available.  The command `true' if it's not available.  This
  620. X#      makes the object file even smaller after its stipped.
  621. X#
  622. X#    o SUPPORT_FLAGS - The flags for SUPPORT_OBJS code.  The following options
  623. X#      are available, these should be defined using -Dflag.
  624. X#
  625. X#      o TCL_HAS_TM_ZONE - If if 'struct tm' has the 'tm_zone' field.   Used
  626. X#        by strftime.
  627. X#
  628. X#    o SUPPORT_OBJS - The object files to compile to implement library 
  629. X#      functions that are not available on this particular version of Unix.
  630. X#      The following are available:
  631. X#         o strftime
  632. X
  633. X#------------------------------------------------------------------------------
  634. X# System V 3.2.0 (tested on Bell-Tech or Intel Unix for the Intel 386)
  635. X#
  636. X#SYS_DEP_FLAGS=-DTCL_NO_SELECT
  637. X#LINK_OPTIONS=-lc_s -lform -lm
  638. X#RANLIB_CMD=true
  639. X#MCS_CMD=mcs -d
  640. X#SUPPORT_FLAGS=
  641. X#SUPPORT_OBJS=strftime.o
  642. X#
  643. X#TCL_OWNER=bin
  644. X#TCL_GROUP=bin
  645. X#TCL_DEFAULT=/etc/default/tcl
  646. X#
  647. X#TCL_MAN_BASEDIR=/usr/man
  648. X#TCL_MAN_SECTION=tcl
  649. X#TCL_MAN_SEPARATOR="."
  650. X#TCL_MAN_STYLE=short
  651. X#TCL_MAN_INDEX=1
  652. X#TCL_MAN_INDEX_MERGE=0
  653. X
  654. X#------------------------------------------------------------------------------
  655. X#  SCO Unix - System V 3.2.2
  656. X#
  657. X#SYS_DEP_FLAGS=-DTCL_USE_BZERO_MACRO -DTCL_POSIX_SIG
  658. X#LINK_OPTIONS=-lc_s -lm
  659. X#RANLIB_CMD=true
  660. X#MCS_CMD=mcs -d
  661. X#SUPPORT_FLAGS=
  662. X#SUPPORT_OBJS=
  663. X#
  664. X#TCL_OWNER=bin
  665. X#TCL_GROUP=bin
  666. X#TCL_DEFAULT=/etc/default/tcl
  667. X#
  668. X#TCL_MAN_BASEDIR=/usr/man
  669. X#TCL_MAN_SECTION=tcl
  670. X#TCL_MAN_SEPARATOR="."
  671. X#TCL_MAN_STYLE=short
  672. X#TCL_MAN_INDEX=1
  673. X#TCL_MAN_INDEX_MERGE=1
  674. X
  675. X#------------------------------------------------------------------------------
  676. X# BSD
  677. X#
  678. X#SYS_DEP_FLAGS= -DTCL_NO_TOLOWER_MACRO -DTCL_HAVE_SETLINEBUF -DTCL_32_BIT_RANDOM
  679. X#LINK_OPTIONS=-lm
  680. X#RANLIB_CMD="ranlib"
  681. X#MCS_CMD=true
  682. X#SUPPORT_FLAGS=-DTCL_HAS_TM_ZONE
  683. X#SUPPORT_OBJS=strftime.o
  684. X#
  685. X#TCL_OWNER=root
  686. X#TCL_GROUP=system
  687. X#TCL_DEFAULT=/usr/local/lib/tcldefault
  688. X#
  689. X#TCL_MAN_BASEDIR=/usr/man
  690. X#TCL_MAN_SECTION=3
  691. X#TCL_MAN_SEPARATOR=""
  692. X#TCL_MAN_STYLE=long
  693. X#TCL_MAN_INDEX=0
  694. X#TCL_MAN_INDEX_MERGE=0
  695. X
  696. X#------------------------------------------------------------------------------
  697. X# SUN O/S
  698. X#
  699. X#SYS_DEP_FLAGS=-DTCL_NO_TOLOWER_MACRO -DTCL_HAVE_SETLINEBUF -DTCL_32_BIT_RANDOM -DTCL_POSIX_SIG
  700. X#LINK_OPTIONS=-lm
  701. X#RANLIB_CMD="ranlib"
  702. X#MCS_CMD=true
  703. X#SUPPORT_FLAGS=-DTCL_HAS_TM_ZONE
  704. X#SUPPORT_OBJS=
  705. X#
  706. X#TCL_OWNER=bin
  707. X#TCL_GROUP=bin
  708. X#TCL_DEFAULT=/usr/local/lib/tcldefault
  709. X#
  710. X#TCL_MAN_BASEDIR=/usr/man
  711. X#TCL_MAN_SECTION=3
  712. X#TCL_MAN_SEPARATOR=""
  713. X#TCL_MAN_STYLE=long
  714. X#TCL_MAN_INDEX=0
  715. X#TCL_MAN_INDEX_MERGE=0
  716. X
  717. X#------------------------------------------------------------------------------
  718. X#    HPUX - Hewlett-Packard HP/UX
  719. X#
  720. X#SYS_DEP_FLAGS= -DTCL_32_BIT_RANDOM -DTCL_POSIX_SIG
  721. X#LINK_OPTIONS=-lBSD -lPW -lm
  722. X#RANLIB_CMD=true
  723. X#MCS_CMD=true
  724. X#SUPPORT_FLAGS=-DTCL_HAS_TM_ZONE
  725. X#SUPPORT_OBJS=
  726. X#
  727. X#TCL_OWNER=root
  728. X#TCL_GROUP=system
  729. X#TCL_DEFAULT=/usr/local/lib/tcldefault
  730. X#
  731. X#TCL_MAN_BASEDIR=/usr/man
  732. X#TCL_MAN_SECTION=3
  733. X#TCL_MAN_SEPARATOR=""
  734. X#TCL_MAN_STYLE=long
  735. X#TCL_MAN_INDEX=0
  736. X#TCL_MAN_INDEX_MERGE=0
  737. X
  738. X#------------------------------------------------------------------------------
  739. X#    XENIX-386 - SCO Xenix 2.3.3 for the 80386
  740. X#
  741. X#SYS_DEP_FLAGS=-DTCL_NO_SELECT -DTCL_SIG_PROC_INT
  742. X#LINK_OPTIONS=-ldir -lm
  743. X#RANLIB_CMD=ranlib
  744. X#MCS_CMD=true
  745. X#SUPPORT_FLAGS=
  746. X#SUPPORT_OBJS=strftime.o
  747. X#
  748. X#TCL_OWNER=bin
  749. X#TCL_GROUP=bin
  750. X#TCL_DEFAULT=/etc/default/tcl
  751. X#
  752. X#TCL_MAN_BASEDIR=/usr/man
  753. X#TCL_MAN_SECTION=tcl
  754. X#TCL_MAN_SEPARATOR="."
  755. X#TCL_MAN_STYLE=short
  756. X#TCL_MAN_INDEX=1
  757. X#TCL_MAN_INDEX_MERGE=1
  758. X
  759. X#------------------------------------------------------------------------------
  760. X#                        End of Configuration Section
  761. X#==============================================================================
  762. X
  763. XSHELL=/bin/sh
  764. XTCLSHELL=../tcl
  765. X
  766. X# List of files that are touched by second makefiles when something changes.
  767. X
  768. XMADE.FILES=ucbsrc/made.tmp ossupport/made.tmp src/made.tmp
  769. X
  770. X# Options to pass to the next lowest level for C compilations.
  771. X
  772. XCFLAGS= $(OPTIMIZE_FLAG) -I../$(TCL_UCB_DIR) $(MEM_DEBUG_FLAGS) $(SYS_DEP_FLAGS)
  773. X
  774. Xall: ExtendedObjs tcl TCLDEFAULT
  775. X
  776. X#
  777. X# Generate the Tcl shell.
  778. X#
  779. Xtcl: libtcl.a src/main.o $(MADE.FILES)
  780. X    $(RANLIB_CMD) libtcl.a
  781. X    cc $(CFLAGS) src/main.o libtcl.a $(LINK_OPTIONS) -o tcl
  782. X    if $(DO_STRIPPING) ; then \
  783. X        strip tcl; \
  784. X        $(MCS_CMD) tcl; fi
  785. X#
  786. X# Objects in the lower-level directorys
  787. X#
  788. XExtendedObjs: libtcl.a
  789. X    cd ucbsrc;$(MAKE) -$(MAKEFLAGS) all 'CFLAGS=$(CFLAGS)'
  790. X
  791. X    cd ossupport;$(MAKE) -$(MAKEFLAGS) all 'OBJS=$(SUPPORT_OBJS)' 'CFLAGS=$(CFLAGS) $(SUPPORT_FLAGS)'
  792. X
  793. 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)'
  794. X
  795. X    cd tclsrc;$(MAKE) -$(MAKEFLAGS) 'TCL_UCB_DIR=../$(TCL_UCB_DIR)' all
  796. X
  797. X#
  798. X# Generate a temporary TCLDEFAULT file so Tcl can be run in this directory.
  799. X#
  800. XTCLDEFAULT:
  801. X    @echo "    - Generating temporary TCLDEFAULT file -"
  802. X    @echo '# Temporary TCLDEFAULT file for debugging'  >TCLDEFAULT
  803. X    @echo "set TCLPATH `pwd`/tcllib"                  >>TCLDEFAULT
  804. X    @echo "set TCLINIT `pwd`/tcllib/TclInit.tcl"      >>TCLDEFAULT
  805. X
  806. X
  807. X#
  808. X# Copy the baseline libtcl.a file.  Force the other Makefiles to add their
  809. X# .o files to the library by nuking their made.tmp file.
  810. X#
  811. Xlibtcl.a:$(TCL_UCB_DIR)/libtcl.a
  812. X    cp $(TCL_UCB_DIR)/libtcl.a .
  813. X    rm -f ossupport/made.tmp ucbsrc/made.tmp src/made.tmp
  814. X
  815. X#
  816. X# This just test to see if the C++ include file compiles.
  817. X#
  818. Xtcl++:
  819. X    cd src;$(MAKE) -$(MAKEFLAGS) tcl++ 'CFLAGS=$(CFLAGS)'
  820. X
  821. X#
  822. X# Run the Basic and Extended Tcl tests.
  823. X#
  824. Xtest: all
  825. X    ./tcl -c "cd $(TCL_UCB_DIR)/tests;source all"
  826. X    ./tcl -c "cd tests;source all"    
  827. X
  828. X#
  829. X# Install Tcl.
  830. X#
  831. Xinstall: all install.conf
  832. X    ./tcl tclsrc/installTcl.tcl install.conf
  833. X
  834. Xinstall.conf: Makefile
  835. X    @echo "Creating install.conf"
  836. X    @echo "set TCL_UCB_DIR         {$(TCL_UCB_DIR)}"          >install.conf
  837. X    @echo "set TCL_DEFAULT         {$(TCL_DEFAULT)}"         >>install.conf
  838. X    @echo "set TCL_OWNER           {$(TCL_OWNER)}"           >>install.conf
  839. X    @echo "set TCL_GROUP           {$(TCL_GROUP)}"           >>install.conf
  840. X    @echo "set TCL_BINDIR          {$(TCL_BINDIR)}"          >>install.conf
  841. X    @echo "set TCL_LIBDIR          {$(TCL_LIBDIR)}"          >>install.conf
  842. X    @echo "set TCL_INCLUDEDIR      {$(TCL_INCLUDEDIR)}"      >>install.conf
  843. X    @echo "set TCL_TCLDIR          {$(TCL_TCLDIR)}"          >>install.conf
  844. X    @echo "set TCL_MAN_INSTALL     {$(TCL_MAN_INSTALL)}"     >>install.conf
  845. X    @echo "set TCL_MAN_BASEDIR     {$(TCL_MAN_BASEDIR)}"     >>install.conf
  846. X    @echo "set TCL_MAN_SECTION     {$(TCL_MAN_SECTION)}"     >>install.conf
  847. X    @echo "set TCL_MAN_SEPARATOR   {$(TCL_MAN_SEPARATOR)}"   >>install.conf
  848. X    @echo "set TCL_MAN_STYLE       {$(TCL_MAN_STYLE)}"       >>install.conf
  849. X    @echo "set TCL_MAN_INDEX       {$(TCL_MAN_INDEX)}"       >>install.conf
  850. X    @echo "set TCL_MAN_INDEX_MERGE {$(TCL_MAN_INDEX_MERGE)}" >>install.conf
  851. X    
  852. X
  853. Xclean:
  854. X    cd ucbsrc;$(MAKE) -$(MAKEFLAGS) clean
  855. X    cd ossupport;$(MAKE) -$(MAKEFLAGS) clean
  856. X    cd src;$(MAKE) -$(MAKEFLAGS) clean
  857. X    cd tclsrc;$(MAKE) -$(MAKEFLAGS) clean
  858. X    -rm -f libtcl.a TCLDEFAULT tcl install.conf
  859. END_OF_FILE
  860. if test 14592 -ne `wc -c <'extended/Makefile.org'`; then
  861.     echo shar: \"'extended/Makefile.org'\" unpacked with wrong size!
  862. fi
  863. # end of 'extended/Makefile.org'
  864. fi
  865. if test -f 'extended/src/tcl++.h' -a "${1}" != "-c" ; then 
  866.   echo shar: Will not clobber existing file \"'extended/src/tcl++.h'\"
  867. else
  868. echo shar: Extracting \"'extended/src/tcl++.h'\" \(13609 characters\)
  869. sed "s/^X//" >'extended/src/tcl++.h' <<'END_OF_FILE'
  870. X/*
  871. X * tcl++.h --
  872. X *
  873. X * It also defines C++ classes that can be used to access a Tcl interpreter.
  874. X * If tcl.h is not already included, it includes it. Tcl.h  has macros that
  875. X * allow it to work with K&R C, ANSI C and C++.
  876. X *---------------------------------------------------------------------------
  877. X * Copyright 1991 Karl Lehenbauer and Mark Diekhans.
  878. X *
  879. X * Permission to use, copy, modify, and distribute this software and its
  880. X * documentation for any purpose and without fee is hereby granted, provided
  881. X * that the above copyright notice appear in all copies.  Karl Lehenbauer and
  882. X * Mark Diekhans make no representations about the suitability of this
  883. X * software for any purpose.  It is provided "as is" without express or
  884. X * implied warranty.
  885. X *---------------------------------------------------------------------------
  886. X * Based on Tcl C++ classes developed by Parag Patel.
  887. X */
  888. X
  889. X#ifndef _TCL_PLUS_PLUS_H
  890. X#define _TCL_PLUS_PLUS_H
  891. X
  892. X#include <stddef.h>
  893. X#include <stdlib.h>
  894. X#include <string.h>
  895. X#include <stdarg.h>
  896. X#ifndef TCLEXTEND_H
  897. X#    include "tclExtend.h"
  898. X#endif
  899. X
  900. Xclass TclInterp_cl
  901. X{
  902. X    Tcl_Interp *interp;
  903. X
  904. X    friend class TclTrace_cl;
  905. X
  906. Xpublic:
  907. X    inline 
  908. X    TclInterp_cl () 
  909. X    {
  910. X        interp = Tcl_CreateExtendedInterp ();
  911. X    }
  912. X
  913. X    inline 
  914. X    ~TclInterp_cl () 
  915. X    { 
  916. X        Tcl_DeleteInterp (interp);
  917. X    }
  918. X
  919. X    inline char *
  920. X    Result () 
  921. X    { 
  922. X        return interp->result; 
  923. X    }
  924. X
  925. X    inline int 
  926. X    ErrorLine () 
  927. X    { 
  928. X        return interp->errorLine;
  929. X    }
  930. X
  931. X    inline Tcl_Interp *
  932. X    GetInterp () 
  933. X    {
  934. X        return interp;
  935. X    }
  936. X
  937. X   /*
  938. X    * Exported Tcl procedures (from standard baseline):
  939. X    */
  940. X
  941. X    inline void
  942. X    AppendElement (const char *string,
  943. X                   int         noSep)
  944. X    { 
  945. X        Tcl_AppendElement (interp, (char *) string, noSep);
  946. X    }
  947. X
  948. X    inline void
  949. X    AppendResult (const char *p,
  950. X                  ...)
  951. X    {
  952. X        va_list argP;
  953. X
  954. X        va_start (argP, p);
  955. X        Tcl_AppendResult (interp, p, argP);
  956. X        va_end (argP);
  957. X    }
  958. X
  959. X    inline void
  960. X    AddErrorInfo (const char *message)
  961. X    {
  962. X        Tcl_AddErrorInfo (interp, (char *)message);
  963. X    }
  964. X
  965. X    inline void 
  966. X    CreateCommand (const char        *cmdName,
  967. X                   Tcl_CmdProc       *proc, 
  968. X                   ClientData         data, 
  969. X                   Tcl_CmdDeleteProc *deleteProc)
  970. X    { 
  971. X        Tcl_CreateCommand (interp, (char*) cmdName, proc, data, deleteProc);
  972. X    }
  973. X
  974. X    inline int
  975. X    CreatePipeline (int    argc, 
  976. X                    char **argv, 
  977. X                    int  **pidArrayPtr,
  978. X                    int   *inPipePtr, 
  979. X                    int   *outPipePtr,
  980. X                    int   *errFilePtr)
  981. X    {
  982. X        return Tcl_CreatePipeline (interp, argc, argv, pidArrayPtr, inPipePtr, 
  983. X                                   outPipePtr, errFilePtr);
  984. X    }
  985. X
  986. X    inline Tcl_Trace 
  987. X    CreateTrace (int               level, 
  988. X                 Tcl_CmdTraceProc *proc, 
  989. X                 ClientData        data)
  990. X    {
  991. X        return Tcl_CreateTrace (interp, level, proc, data);
  992. X    }
  993. X
  994. X    inline void 
  995. X    DeleteCommand (const char *cmdName)
  996. X    { 
  997. X        Tcl_DeleteCommand (interp, (char *)cmdName);
  998. X    }
  999. X
  1000. X    inline void 
  1001. X    DeleteTrace (Tcl_Trace trace)
  1002. X    { 
  1003. X        Tcl_DeleteTrace(interp, trace);
  1004. X    }
  1005. X
  1006. X    inline void
  1007. X    DetachPids (int  numPids, 
  1008. X                int *pidPtr)
  1009. X    {
  1010. X        Tcl_DetachPids (numPids, pidPtr);
  1011. X    }
  1012. X
  1013. X    inline int 
  1014. X    Eval (const char   *cmd, 
  1015. X          char          flags = 0, 
  1016. X          char        **termPtr = NULL)
  1017. X        { return Tcl_Eval (interp, (char *) cmd, flags, termPtr); }
  1018. X
  1019. X    inline int
  1020. X    EvalFile (const char *fileName)
  1021. X    { 
  1022. X        return Tcl_EvalFile (interp, (char *) fileName);
  1023. X    }
  1024. X
  1025. X    inline int
  1026. X    ExprBoolean (const char *string,
  1027. X                 int        *ptr)
  1028. X    {
  1029. X        return Tcl_ExprBoolean (interp, (char *) string, ptr);
  1030. X    }
  1031. X
  1032. X    inline int
  1033. X    ExprDouble (const char *string,
  1034. X                double     *ptr)
  1035. X    { 
  1036. X        return Tcl_ExprDouble (interp, (char *) string, ptr);
  1037. X    }
  1038. X
  1039. X    inline int
  1040. X    ExprLong (const char *string,
  1041. X              long       *ptr)
  1042. X    {
  1043. X        return Tcl_ExprLong (interp, (char *) string, ptr);
  1044. X    }
  1045. X
  1046. X    inline int
  1047. X    ExprString (const char *string)
  1048. X    {
  1049. X        return Tcl_ExprString (interp, (char *) string);
  1050. X    }
  1051. X
  1052. X    inline int
  1053. X    GetBoolean (Tcl_Interp *interp,
  1054. X                const char *string,
  1055. X                int        *boolPtr)
  1056. X    { 
  1057. X        return Tcl_GetBoolean (interp, (char *) string, boolPtr);
  1058. X    }
  1059. X
  1060. X    inline int
  1061. X    GetDouble (Tcl_Interp *interp,
  1062. X               const char *string,
  1063. X               double     *doublePtr)
  1064. X    { 
  1065. X        return Tcl_GetDouble (interp, (char *) string, doublePtr);
  1066. X    }
  1067. X
  1068. X    inline int
  1069. X    GetInt (Tcl_Interp *interp,
  1070. X            const char *string,
  1071. X            int        *intPtr)
  1072. X    { 
  1073. X        return Tcl_GetInt (interp, (char *) string, intPtr);
  1074. X    }
  1075. X
  1076. X    inline const char *
  1077. X    GetVar (const char *varName, 
  1078. X            int         flags = 0)
  1079. X    { 
  1080. X        return Tcl_GetVar (interp, (char *) varName, flags);
  1081. X    }
  1082. X
  1083. X    inline const char *
  1084. X    GetVar2 (const char *name1, 
  1085. X             const char *name2,
  1086. X             int         flags = 0)
  1087. X    { 
  1088. X        return Tcl_GetVar2 (interp, (char *) name1, (char *) name2, flags); 
  1089. X    }
  1090. X
  1091. X    inline void
  1092. X    InitMemory ()
  1093. X    {
  1094. X        Tcl_InitMemory (interp);
  1095. X    }
  1096. X
  1097. X    inline char *
  1098. X    ParseVar (const char  *string, 
  1099. X              char       **termPtr)
  1100. X       { return Tcl_ParseVar (interp, (char *) string, termPtr); }
  1101. X
  1102. X    inline int 
  1103. X    RecordAndEval (const char *cmd, 
  1104. X                   char        flags)
  1105. X        { return Tcl_RecordAndEval (interp, (char *) cmd, flags); }
  1106. X
  1107. X    inline void
  1108. X    ResetResult ()
  1109. X    {
  1110. X        Tcl_ResetResult (interp);
  1111. X    }
  1112. X
  1113. X    inline void
  1114. X    SetErrorCode (char *p, 
  1115. X                  ...)
  1116. X    {
  1117. X        va_list argP;
  1118. X
  1119. X        va_start (argP, p);
  1120. X        Tcl_SetErrorCode (interp, p, argP);
  1121. X        va_end (argP);
  1122. X    }
  1123. X
  1124. X    inline void 
  1125. X    SetResult (const char *string)
  1126. X    {
  1127. X        Tcl_SetResult (interp, (char *) string, TCL_VOLATILE);
  1128. X    }
  1129. X
  1130. X    inline void 
  1131. X    SetResult (const char   *string, 
  1132. X               Tcl_FreeProc *freeProc)
  1133. X    { 
  1134. X        Tcl_SetResult (interp, (char *) string, freeProc);
  1135. X    }
  1136. X
  1137. X    inline const char *
  1138. X    SetVar (const char  *varName, 
  1139. X            const char  *newValue, 
  1140. X            int          global = 0)
  1141. X    { 
  1142. X        return Tcl_SetVar (interp, (char *) varName, (char *) newValue, 
  1143. X                           global);
  1144. X    }
  1145. X
  1146. X    inline const char *
  1147. X    SetVar2 (const char *name1, 
  1148. X             const char *name2, 
  1149. X             const char *newValue, 
  1150. X             int         global)
  1151. X    {
  1152. X         return Tcl_SetVar2 (interp, (char *) name1, (char *) name2, 
  1153. X                             (char *) newValue, global);
  1154. X    }
  1155. X
  1156. X    inline int 
  1157. X    SplitList (const char   *list, 
  1158. X               int          &argcP, 
  1159. X               char       **&argvP)
  1160. X        { return Tcl_SplitList (interp, (char *) list, &argcP, &argvP); }
  1161. X
  1162. X    inline char *
  1163. X    TildeSubst (Tcl_Interp *interp,
  1164. X                const char *name)
  1165. X        { return Tcl_TildeSubst (interp, (char *) name); }
  1166. X
  1167. X    int
  1168. X    TraceVar (const char       *varName,
  1169. X              int               flags,
  1170. X              Tcl_VarTraceProc *proc,
  1171. X              ClientData        clientData)
  1172. X    {
  1173. X         return Tcl_TraceVar (interp, (char *) varName, flags, proc,
  1174. X                              clientData);
  1175. X    }
  1176. X
  1177. X    inline int
  1178. X    TraceVar2 (const char       *name1, 
  1179. X               const char       *name2,
  1180. X               int               flags, 
  1181. X               Tcl_VarTraceProc *proc, 
  1182. X               ClientData        clientData)
  1183. X    {
  1184. X         return Tcl_TraceVar2 (interp, (char *) name1, (char *) name2, flags,
  1185. X                               proc, clientData); 
  1186. X    }
  1187. X
  1188. X    inline const char *
  1189. X    UnixError ()
  1190. X    {
  1191. X        return Tcl_UnixError (interp);
  1192. X    }
  1193. X
  1194. X    inline void
  1195. X    UnsetVar (Tcl_Interp *interp,
  1196. X              const char *varName,
  1197. X              int         global)
  1198. X        { Tcl_UnsetVar (interp, (char *) varName, global); }
  1199. X
  1200. X    inline void
  1201. X    UnsetVar2 (Tcl_Interp *interp,
  1202. X               const char *name1, 
  1203. X               const char *name2, 
  1204. X               int         global)
  1205. X        { Tcl_UnsetVar2 (interp, (char *) name1, (char *) name2, global); }
  1206. X
  1207. X    inline void
  1208. X    UntraceVar (const char       *varName, 
  1209. X                int               flags,
  1210. X                Tcl_VarTraceProc *proc, 
  1211. X                ClientData        clientData)
  1212. X    {
  1213. X        Tcl_UntraceVar (interp, (char *) varName, flags, proc, clientData);
  1214. X    }
  1215. X
  1216. X
  1217. X    inline void
  1218. X    UntraceVar2 (Tcl_Interp       *interp,
  1219. X                 const char       *name1,
  1220. X                 const char       *name2,
  1221. X                 int               flags, 
  1222. X                 Tcl_VarTraceProc *proc, 
  1223. X                 ClientData        clientData)
  1224. X    { 
  1225. X        Tcl_UntraceVar2 (interp, (char *) name1, (char *) name2, flags, proc,
  1226. X                         clientData);
  1227. X    }
  1228. X
  1229. X    inline int
  1230. X    VarEval (const char *p,
  1231. X              ...)
  1232. X    {
  1233. X        int     intResult;
  1234. X        va_list argP;
  1235. X
  1236. X        va_start (argP, p);
  1237. X        intResult = Tcl_VarEval (interp, (char *) p, argP);
  1238. X        va_end (argP);
  1239. X        return intResult;
  1240. X    }
  1241. X
  1242. X    inline ClientData
  1243. X    VarTraceInfo (const char       *varName,
  1244. X                  int               flags,
  1245. X                  Tcl_VarTraceProc *procPtr,
  1246. X                  ClientData        prevClientData)
  1247. X    { 
  1248. X        return Tcl_VarTraceInfo (interp, (char *) varName, flags, procPtr,
  1249. X                                 prevClientData);
  1250. X    }
  1251. X
  1252. X    inline ClientData
  1253. X    VarTraceInfo2 (const char       *name1, 
  1254. X                   const char       *name2, 
  1255. X                   int               flags,
  1256. X                   Tcl_VarTraceProc *procPtr,
  1257. X                   ClientData        prevClientData)
  1258. X    { 
  1259. X        return Tcl_VarTraceInfo2 (interp, (char *) name1, (char *) name2, 
  1260. X                                  flags, procPtr, prevClientData);
  1261. X    }
  1262. X
  1263. X    /*
  1264. X     * Exported Tcl functions added to baseline Tcl by the Extended Tcl 
  1265. X     * implementation.
  1266. X     */
  1267. X
  1268. X    inline void
  1269. X    CommandLoop (FILE       *in,
  1270. X                 FILE       *out,
  1271. X                 int         interactive)
  1272. X    {
  1273. X        Tcl_CommandLoop (interp, in, out, interactive);
  1274. X    }
  1275. X
  1276. X    inline char *
  1277. X    DeleteKeyedListField (const char  *fieldName,
  1278. X                          const char  *keyedList)
  1279. X    {
  1280. X        return Tcl_DeleteKeyedListField (interp, fieldName, keyedList);
  1281. X    }
  1282. X
  1283. X    inline int
  1284. X    GetKeyedListField (const char  *fieldName,
  1285. X                       const char  *keyedList,
  1286. X                       char       **fieldValuePtr)
  1287. X    {
  1288. X        return Tcl_GetKeyedListField (interp, fieldName, keyedList,
  1289. X                                      fieldValuePtr);
  1290. X    }
  1291. X
  1292. X    inline int
  1293. X    GetLong (Tcl_Interp *interp,
  1294. X             const char *string,
  1295. X             long       *longPtr)
  1296. X        { return Tcl_GetLong (interp, string, longPtr); }
  1297. X
  1298. X    inline int
  1299. X    GetUnsigned (Tcl_Interp *interp,
  1300. X                 const char *string,
  1301. X                 unsigned   *unsignedPtr)
  1302. X        { return Tcl_GetUnsigned (interp, string, unsignedPtr); }
  1303. X
  1304. X    inline char *
  1305. X    SetKeyedListField (const char  *fieldName,
  1306. X                       const char  *fieldvalue,
  1307. X                       const char  *keyedList)
  1308. X    {
  1309. X        return Tcl_SetKeyedListField (interp, fieldName, fieldvalue,
  1310. X                                      keyedList);
  1311. X    }
  1312. X
  1313. X    inline void 
  1314. X    Startup (int          argc,
  1315. X             const char **argv,
  1316. X             const char  *defaultFile) 
  1317. X    {
  1318. X       Tcl_Startup (interp, argc, argv, defaultFile);
  1319. X    }
  1320. X
  1321. X    inline int
  1322. X    System (const char *command)
  1323. X    {
  1324. X        return Tcl_System (interp, (char*) command);
  1325. X    }
  1326. X};
  1327. X
  1328. Xclass TclTrace_cl
  1329. X{
  1330. X    Tcl_Trace trace;
  1331. X    Tcl_Interp *interp;
  1332. X
  1333. Xpublic:
  1334. X    inline 
  1335. X    TclTrace_cl (TclInterp_cl     &interpCl, 
  1336. X                 int               level, 
  1337. X                 Tcl_CmdTraceProc *proc, 
  1338. X                 ClientData        data)
  1339. X    { 
  1340. X        trace = Tcl_CreateTrace (interp = interpCl.interp, level, proc, data);
  1341. X    }
  1342. X
  1343. X    inline ~TclTrace_cl () 
  1344. X        { Tcl_DeleteTrace (interp, trace); }
  1345. X};
  1346. X
  1347. X
  1348. Xclass TclCmdBuf_cl
  1349. X{
  1350. X    Tcl_CmdBuf buf;
  1351. X
  1352. Xpublic:
  1353. X    inline 
  1354. X    TclCmdBuf_cl () 
  1355. X        { buf = Tcl_CreateCmdBuf (); }
  1356. X
  1357. X    inline 
  1358. X    ~TclCmdBuf_cl () 
  1359. X        { Tcl_DeleteCmdBuf (buf); }
  1360. X
  1361. X    inline const char *
  1362. X    AssembleCmd (const char *string)
  1363. X        { return Tcl_AssembleCmd (buf, (char *) string); }
  1364. X};
  1365. X
  1366. Xclass TclHandleTbl_cl
  1367. X{
  1368. X    void_pt headerPtr;
  1369. X
  1370. Xpublic:
  1371. X    inline
  1372. X    TclHandleTbl_cl (const char *handleBase,
  1373. X                     int         entrySize,
  1374. X                     int         initEntries)
  1375. X
  1376. X    {
  1377. X        headerPtr = Tcl_HandleTblInit (handleBase, entrySize, initEntries);
  1378. X    }
  1379. X
  1380. X    inline
  1381. X    ~TclHandleTbl_cl ()
  1382. X    {
  1383. X        Tcl_HandleTblRelease (headerPtr);
  1384. X    }
  1385. X
  1386. X    inline void_pt  
  1387. X    HandleAlloc (char *handlePtr)
  1388. X    {
  1389. X        return Tcl_HandleAlloc (headerPtr, handlePtr);
  1390. X    }
  1391. X
  1392. X    inline void 
  1393. X    HandleFree (void_pt  entryPtr)
  1394. X    {
  1395. X        Tcl_HandleFree (headerPtr, entryPtr);
  1396. X    }
  1397. X
  1398. X    inline int
  1399. X    HandleTblUseCount (int amount)
  1400. X    {
  1401. X        return Tcl_HandleTblUseCount (headerPtr, amount);
  1402. X    }
  1403. X
  1404. X    inline void_pt
  1405. X    HandleWalk (int *walkKeyPtr)
  1406. X    {
  1407. X        return Tcl_HandleWalk (headerPtr, walkKeyPtr);
  1408. X    }
  1409. X
  1410. X    inline void_pt
  1411. X    HandleXlate (Tcl_Interp  *interp,
  1412. X                 const  char *handle)
  1413. X    {
  1414. X        return Tcl_HandleXlate (interp, headerPtr, handle);
  1415. X    }
  1416. X};
  1417. X
  1418. X#endif /* _TCL_PLUS_PLUS_H */
  1419. X
  1420. END_OF_FILE
  1421. if test 13609 -ne `wc -c <'extended/src/tcl++.h'`; then
  1422.     echo shar: \"'extended/src/tcl++.h'\" unpacked with wrong size!
  1423. fi
  1424. # end of 'extended/src/tcl++.h'
  1425. fi
  1426. echo shar: End of archive 15 \(of 23\).
  1427. cp /dev/null ark15isdone
  1428. MISSING=""
  1429. 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
  1430.     if test ! -f ark${I}isdone ; then
  1431.     MISSING="${MISSING} ${I}"
  1432.     fi
  1433. done
  1434. if test "${MISSING}" = "" ; then
  1435.     echo You have unpacked all 23 archives.
  1436.     echo "Now cd to "extended", edit the makefile, then do a "make""
  1437.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1438. else
  1439.     echo You still need to unpack the following archives:
  1440.     echo "        " ${MISSING}
  1441. fi
  1442. ##  End of shell archive.
  1443. exit 0
  1444.  
  1445. exit 0 # Just in case...
  1446. -- 
  1447. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  1448. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  1449. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  1450. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  1451.