Compare commits

...
Author SHA1 Message Date
hobbs c240074700 updated for 8.3.5 release 2002-10-18 20:33:18 +00:00
hobbs 51fa030ca3 * win/configure: Regen.
* win/configure.in: Set CFLAGS to "" if the user
	did not set CFLAGS in the env. This keeps AC_PROG_CC
	from adding "-g -O2" to the CFLAGS by default. (dejong)
2002-10-18 01:43:15 +00:00
hobbs ba12cc6cac * win/configure: add workaround for cygwin windres
* win/tcl.m4 (SC_CONFIG_CFLAGS): problem. [Patch #624010] (howell)
2002-10-17 05:50:16 +00:00
hobbs aecd57d51d aix-5 ppc support 2002-10-16 01:07:36 +00:00
hobbs 764f2a0116 corrected sh syntax error 2002-10-16 00:57:31 +00:00
hobbs c1f7621af8 * README: updated to 8.3.5 patchlevel
* generic/tcl.h:     with readmes pointing to www.tcl.tk
	* mac/README:
	* tools/tcl.wse.in:
	* unix/configure:
	* unix/configure.in:
	* unix/tcl.spec:
	* win/README.binary:
	* win/configure:
	* win/configure.in:
2002-10-16 00:06:48 +00:00
hobbs c4fdcd0805 * unix/configure:
* unix/tcl.m4: updated platform targets to match 8.4 fixes.
2002-10-15 20:54:45 +00:00
hobbs c89d592335 backport of cygwin build support cobbled together.
[Patch #622183] (hobbs, howell, khan, dejong)

	* win/configure: regen.
	* win/configure.in: Add configure time test for SEH
	support in the compiler.
	* win/tcl.m4 (SC_PATH_TCLCONFIG): Support one-tree build.
	(SC_PATH_TKCONFIG): Likewise.
	(SC_PROG_TCLSH): Likewise.
	(SC_CONFIG_CFLAGS): Assume real Cygwin port and remove -mno-cygwin
	flags.  Add -mwin32 to extra_cflags and extra_ldflags.
	Remove ``-e _WinMain@16'' from LDFLAGS_WINDOW.
2002-10-15 20:27:43 +00:00
hobbs 72b15d2b4f * win/tclWin32Dll.c (ESP, EBP, TclpCheckStackSpace,
_except_checkstackspace_handler):
	* win/tclWinChan.c (ESP, EBP, Tcl_MakeFileChannel,
	_except_makefilechannel_handler):
	* win/tclWinFCmd.c (ESP, EBP, DoRenameFile,
	_except_dorenamefile_handler,
	DoCopyFile, _except_docopyfile_handler):
	Implement SEH support under gcc using inline asm.
	Tcl should now compile with Mingw 1.1. [Patch 525746]
2002-10-15 20:26:01 +00:00
hobbs 5b40591604 * win/tclWinFile.c (TclpReadlink): alternative readlink for cygwin. 2002-10-15 20:25:22 +00:00
hobbs 21f025b4ad * generic/tclFileName.c (Tcl_TranslateFileName, TclDoGlob):
Convert POSIX to native format for cygwin.
2002-10-15 20:24:55 +00:00
hobbs 7124bab528 * generic/tclEnv.c (TclCygwinPutenv): cygwin env handling function.
* win/tclWinPort.h (environ, putenv, timezone): Define for Cygwin.
	(TclpSysAlloc, TclpSysFree, TclpSysRealloc): Use C runtime rather
	than Windows API.
2002-10-15 20:23:51 +00:00
hobbs d744ca6e56 * generic/tclPlatDecls.h (tchar.h): Do not include on Cygwin. 2002-10-15 20:23:18 +00:00
hobbs ca39fbb020 match up to fixes in 8.4 2002-10-15 20:15:52 +00:00
hobbs b54276a923 removed unnecessary dos.h include 2002-10-15 19:38:48 +00:00
hobbs 7ce7df8818 * win/tclWinThrd.c: removed unnecessary dos.h include.
Use problematic CreateThread/ExitThread for compilers that can't
	do _beginthreadex/_endthreadex.
2002-10-15 19:38:20 +00:00
hobbs a6e53f0653 * generic/tclEnv.c (Tcl_PutEnv): correct possible mem leak.
[Patch #623269] (brouwers)
2002-10-14 22:26:00 +00:00
das 293230494d * mac/tclMacFCmd.c: removed GenerateUniqueName(), use equivalent
(and identically named) routine from MoreFiles instead.
2002-10-10 16:17:03 +00:00
das b72c6a25a4 * mac/tclMacOSA.c: (8.4 backport) sprintf fixes, UH 3.4.x changes;
fix for missing autoname token from TclOSACompileCmd. (bdesgraupes)
	* mac/AppleScript.html(AppleScript delete): doc fix. (bdesgraupes)

	* mac/tcltkMacBuildSupport.sea.hqx: updated MoreFiles to 1.5.3,
	updated build instructions.
2002-10-10 13:42:40 +00:00
hobbs 80efc3a2d7 * unix/Makefile.in: removed @MEM_DEBUG_FLAGS@ subst.
* unix/configure: regen
	* unix/configure.in: removed SC_ENABLE_MEMDEBUG call
	* unix/tcl.m4: replaced SC_ENABLE_MEMDEBUG with a more intelligent
	SC_ENABLE_SYMBOLS that takes yes|no|mem|compile|all as options now.
2002-10-10 07:31:36 +00:00
hobbs fa7ab05998 * win/tclWinConsole.c (ConsoleCloseProc): only wait on writable
pipe if there was something to write.  This may prevent infinite
	wait on exit.
2002-10-10 07:31:11 +00:00
andreas_kupries dbe211b806 * win/Makefile.in (CFLAGS):
* unix/Makefile.in (MEM_DEBUG_FLAGS): Added usage of @MEM_DEBUG_FLAGS@.
	* win/configure.in:
	* unix/configure.in: Added usage of SC_ENABLE_MEMDEBUG.
	* win/tcl.m4:
	* unix/tcl.m4: Added macro SC_ENABLE_MEMDEBUG. Allows a user of
	  configure to (de)activate memory validation and debugging
	  (TCL_MEM_DEBUG). No need to modify the makefile anymore.
2002-08-20 21:45:29 +00:00
mdejong 64d1c49176 Revert incorrect RANLIB related changed added
to support OS X.

	* unix/Makefile.in: Don't try to conditionally
	run RANLIB in the Makefile.
	* unix/configure: Regen.
	* unix/configure.in: Remove incorrect setting
	of MAKE_LIB and set RANLIB to : when building
	a shared library.
2002-07-30 19:18:26 +00:00
das c9c05ac0ac * unix/configure.in: backport of corrected fix for [Bug 529801]:
ranlib needed for static builds on Mac OS X.
	* unix/configure: Regen.
2002-07-24 13:54:45 +00:00
hobbs e1955efb3f fixed errant @ added in shell target 2002-07-12 01:04:14 +00:00
dgp 9f174b868d * Corrected reaction to existing but false ::tcl_interactive. 2002-07-11 18:59:28 +00:00
rmax 7bda06a946 * generic/tclClock.c (FormatClock): Convert the format string to
UTF8 before calling TclpStrftime, so that non-ASCII characters
        don't get mangled when the result string is being converted back.
        * tests/clock.test: Added a test for that.
2002-07-05 13:14:24 +00:00
dgp c030329741 * library/auto.tcl: Fix [tcl_findLibrary] to be sure it sets
$varName only if a successful library script is found.  [Bug 577033]
2002-07-03 20:15:02 +00:00
Miguel Sofer 0c61926fbe * generic/tclCompCmds.c (TclCompileCatchCmd): return
TCL_OUT_LINE_COMPILE instead of TCL_ERROR: let the failure happen
	at runtime so that it can be caught [Bug 577015].
2002-07-03 17:34:42 +00:00
dgp d3c40ee868 * Corrected comments and namespace style
issues.  Thanks to Bruce Stephens. [Bug 572025]
2002-06-21 19:11:09 +00:00
das c84523136e * unix/tclUnixInit.c (TclpSetInitialEncodings): 8.4 backport
of default fallback encoding set with TCL_DEFAULT_ENCODING
	* unix/tcl.m4 (Darwin): set TCL_DEFAULT_ENCODING to utf-8 on
	MacOSX (where posix file apis expect utf-8, not iso8859-1).
	* unix/configure: regen
	* unix/Makefile.in: set DYLD_LIBRARY_PATH in parallel
	to LD_LIBRARY_PATH for MacOSX dynamic linker.
	* generic/tclEnv.c (TclSetEnv): fix env var setting on
	MacOSX (adapted from patch #524352 by jkbonfield).
2002-06-06 17:39:34 +00:00
das a2fae61d8c * mac/tclMacResource.c (Tcl_MacConvertTextResource): added utf
conversion of text resource contents.
	* mac/tclMacResource.c (Tcl_MacEvalResource): overlooked 8.4
	backport of resource name utf conversion.
	* tests/macFCmd.test (macFCmd-1.2): allow CWIE creator.
	* tests/ioCmd.test (iocmd-8.15): added mac specific result string.
2002-06-05 12:01:32 +00:00
hobbs d7de50f778 * tests/clock.test: added clock-9.1
* compat/strftime.c:
	* generic/tclClock.c:
	* generic/tclInt.decls:
	* generic/tclIntDecls.h:
	* unix/tclUnixTime.c: fix for Windows msvcrt mem leak caused by
	using an env(TZ) setting trick for in clock format -gmt 1.  This
	also makes %s seem to work correctly with -gmt 1 as well as
	making it a lot faster by avoid the env(TZ) hack.  TclpStrftime
	now takes useGMT as an arg.  [Bug #559376]
2002-05-24 19:36:28 +00:00
das 7f26617845 * mac/tclMacChan.c: use MSL provided creator type if available
instead of the default 'MPW '.
2002-05-20 10:24:07 +00:00
hobbs 7c1cb95bfe * unix/configure:
* unix/tcl.m4: change HP-11 SHLIB_LD_LIBS from "" to ${LIBS} so
	that the .sl knows its dependent libs.
2002-04-26 19:28:50 +00:00
dgp b467118d27 strtol takes three arguments 2002-04-26 12:15:05 +00:00
dkf ac965f3f7d Added more thorough tests for conversion to boolean. 2002-04-26 08:44:08 +00:00
dkf 909c571133 Hex values can be booleans too! [Bug 548686] 2002-04-26 08:34:01 +00:00
dkf 07b26a83dd Backport of fix for Bug #545644 2002-04-19 08:12:38 +00:00
hobbs aa29d4e400 updated dependencies for runtest and backported shell/gdb targets 2002-04-18 22:23:45 +00:00
Miguel Sofer a7de7caa2b [Bug 545325 ] info level didn't report namespace eval. 2002-04-18 18:15:26 +00:00
dgp 0c95a2b80a * Added "package require"s to msgcat documentation. 2002-04-18 16:56:55 +00:00
dgp 58d26d0391 typo 2002-04-18 16:46:09 +00:00
Miguel Sofer 2a2d70d3f1 fix for [Bug #542588], where "too large integers" were reported as "floating-point value" in [expr] error messages. 2002-04-18 13:10:26 +00:00
hobbs 3dd23648d6 * tcl.m4: Enabled COFF as well as CV style debug info with
--enable-symbols to allow Dr. Watson users to see function info.
	More info on debugging levels can be obtained at:
	http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
2002-04-12 06:21:53 +00:00
das c83b429588 2002-04-08 Daniel Steffen <das@users.sourceforge.net>
* mac/tclMacOSA.c:
	* mac/tclMacResource.c: added missing Tcl_UtfToExternalDString
	conversions of resource file names.
	* mac/tclMacSock.c (TcpGetOptionProc): fixed bug introduced
	by Andreas on 02-25; changed strcmp's to strncmp's so that
	option comparison behaves like on other platforms.
	* mac/tcltkMacBuildSupport.sea.hqx (CW Pro6 changes): added
	support to allow Tk to hookup C library stderr/stdout to TkConsole.
	* mac/tclMacTime.c (TclpGetTZName): fix for daylight savings TZName bug
2002-04-08 08:58:53 +00:00
hobbs f3002c7b4a fixed doc name error 2002-04-04 05:32:26 +00:00
hobbs 29ded576df fixed doc name error 2002-04-04 05:32:09 +00:00
hobbs 8d6b844150 * tests/trace.test (trace-18.2):
* generic/tclCmdMZ.c (Tcl_TraceObjCmd, TraceVarProc): corrected
	potential double-free of traces on variables by flagging in
	TraceVarProc that it will free the var in case the eval wants to
	delete the var trace as well. [Bug #536937]
2002-03-29 22:42:50 +00:00
Miguel Sofer f358affc06 passing the correct commandSize to TclEvalObjvInternal. [Bug 219362], fix by David Knoll. 2002-03-27 19:50:53 +00:00
hobbs 4bf84273d6 * unix/configure:
* unix/configure.in: backported improved AIX build support from 8.4.
	* unix/tcl.m4: backported 8.4 changes to HP-UX, IRIX64-6.*, SunOS,
	FreeBSD, AIX and Darwin targets.  Updated SC_LOADTCLCONFIG to
	detect when we build against a Tcl build dir.
2002-03-26 02:27:57 +00:00
hobbs 20eaeeb40d added shell and gdb targets 2002-03-26 02:27:27 +00:00
hobbs 896b6f0ad9 generic/tclMain.c: reduced oversized static buffer allocation 2002-03-26 02:26:58 +00:00
dgp a61455fda6 * Be sure the tcltest variable is updated. [Bug 454050]. 2002-03-24 19:07:48 +00:00
dgp dbd9b35792 * Allow non-proc commands to be used
as the customization hooks.  Bump to 1.0.2.  Converted from lazy to
        direct loading.  [Bug 495662]
2002-03-24 18:31:08 +00:00
hobbs 4148e817d6 * generic/tclScan.c (Tcl_ScanObjCmd): prevented ckfree being
called on a pointer to NULL.
2002-03-18 20:56:16 +00:00
Miguel Sofer ae5e9a8fbf Backport of patch for [Bug 530320] 2002-03-15 20:10:01 +00:00
hobbs 68300848b4 * tests/encoding.test: added encoding-23.* tests
* generic/tclIO.c (FilterInputBytes): reset the TCL_ENCODING_START
	flags in the ChannelState when using 'gets'. [Bug #523988]
	Also reduced the value of ENCODING_LINESIZE from 30 to 20 as this
	seems to improve the performance of 'gets' according to tclbench.
2002-03-02 05:00:59 +00:00
hobbs cf6989b49b * tests/io.test:
* tests/encoding.test: updated to reflect iso2022 escape change
	* library/encoding/iso2022-jp.enc:
	* library/encoding/iso2022.enc:
	* tools/encoding/iso2022-jp.esc:
	* tools/encoding/iso2022.esc: gave <ESC>$B precedence over <ESC>$@,
	based on comments (point 1) in [Bug #219283] (rfc 1468)
2002-03-02 05:00:39 +00:00
andreas_kupries 0e96d8f21f * unix/tclUnixChan.c (TclpOpenFileChannel): Added code to regonize
"/dev/tty" (by name) and to not handle it as tty / serial
	  line. This is the controlling terminal and is special. Setting
	  it into raw mode as is done for other tty's is a bad idea. This
	  is a hackish fix for expect SGF Bug #520624.
2002-02-27 18:51:39 +00:00
andreas_kupries d9db2b089f * mac/tclMacSock.c (TcpGetOptionProc): Changed to recognize the
option "-error". Essentially ignores the option, always
	  returning an empty string.
2002-02-26 02:49:35 +00:00
hobbs 3e39f7cec8 * win/tclWinNotify.c (Tcl_FinalizeNotifier): backported fix for
[Bug #217982] which also affected Tkinter [Python Bug #216289]
2002-02-25 23:36:48 +00:00
das dd26817d12 * unix/tclLoadDyld.c: updated to use Mac OS X 10.1 dyld APIs that
have more libdl-like semantics. (bug #514392)
2002-02-25 15:20:35 +00:00
dgp e9a1a5e5ac * reversed the order of 8.3.3 changes 2002-02-19 08:29:05 +00:00
dgp 1c88ca69f9 * First draft of Tcl changes for 8.3.5 release. 2002-02-15 23:21:37 +00:00
hobbs 63d4d312c2 * tests/scan.test:
* generic/tclScan.c (Tcl_ScanObjCmd): corrected scan 0x... %x
	handling that didn't accept the 0x as a prelude to a base 16
	number.  [Bug #495213]
2002-02-07 01:54:04 +00:00
andreas_kupries f2a0654d74 * unix/tclUnixChan.c (FileOutputProc): Fixed [bug 465765] reported
by Dale Talcott <daletalcott@users.sourceforge.net>. Avoid
	  writing nothing into a file as STREAM based implementations will
	  consider this a EOF (if the file is a pipe). Not done in the
	  generic layer as this type of writing is actually useful to
	  check the state of a socket.
2002-02-05 17:57:41 +00:00
dgp 7f77853438 * Corrected use of http::error when
::error was intended.  Bump to http 2.4.2.
2002-02-05 17:09:50 +00:00
hobbs 5e15c2af04 reverted pwd changes for AIX, the best fix is to replace sh with bsh on 4.3.3 2002-02-05 02:46:23 +00:00
hobbs 6d2ae7b6b5 get full path to pwd to avoid errors on AIX-4.3 2002-02-05 01:31:40 +00:00
hobbs 3fb3d8723f call /bin/pwd on AIX-4.3 to avoid pwd errors 2002-02-05 01:04:29 +00:00
hobbs 856837da2e call /bin/pwd on AIX-4.3 to avoid pwd errors 2002-02-05 01:04:03 +00:00
andreas_kupries ba96667e1e * tests/io.test: io-39.22 split into two tests, one platform
dependent, the other not. -eofchar is not empty on the windows
	  platform.
2002-02-01 21:47:12 +00:00
mdejong 245ca4f9cd Make -eofchar and -translation options read only for
server sockets. [Bug 496733]

	* generic/tclIO.c (Tcl_GetChannelOption, Tcl_SetChannelOption):
	Instead of returning nothing for the -translation option
	on a server socket, always return "auto". Return the empty
	string enclosed in quotes for the -eofchar option on
	a server socket. Fixup -eofchar usage message so that
	it matches the implementation.
	* tests/io.test: Add -eofchar tests and -translation tests
	to ensure options are read only on server sockets.
	* tests/socket.test: Update tests to account for -eofchar
	and -translation option changes.
2002-01-26 00:30:30 +00:00
hobbs 85fcef5d5c * library/http/pkgIndex.tcl:
* library/http/http.tcl: don't add port in default case to handle
	broken servers.  http bumped to 2.4.1  [Bug #504508]
2002-01-25 03:07:50 +00:00
andreas_kupries bbde2bcde6 * generic/tclIO.c (WriteChars): Fix for SF #506297, reported by
Martin Forssen <ruric@users.sourceforge.net>. The encoding
	  chosen in the script exposing the bug writes out three intro
	  characters when TCL_ENCODING_START is set, but does not consume
	  any input as TCL_ENCODING_END is cleared. As some output was
	  generated the enclosing loop calls UtfToExternal again, again
	  with START set. Three more characters in the out and still no
	  use of input ... To break this infinite loop we remove
	  TCL_ENCODING_START from the set of flags after the first call
	  (no condition is required, the later calls remove an unset flag,
	  which is a no-op). This causes the subsequent calls to
	  UtfToExternal to consume and convert the actual input.
2002-01-21 20:37:25 +00:00
andreas_kupries 095766349c * generic/tclIOCmd.c (Tcl_GetsObjCmd): Fixed bug #504642 as
reported by Brian Griffin <bgriffin@users.sourceforge.net>,
	  using his patch. Before the patch the generic I/O layer held an
	  unannounced reference to the interp result to store the read
	  line into. This unfortunately has disastrous results if the
	  channel driver executes a tcl script to perform its operation,
	  this freeing the interp result. In that case we are
	  dereferencing essentially a dangling reference. It is not truly
	  dangling because the object is in the free list, but this only
	  causes us to smash the free list and have the error occur later
	  somewhere else. The patch simply creates a new object for the
	  line and later sets it into the interp result when we are done
	  with reading.
2002-01-17 20:35:39 +00:00
hobbs 756c8d712d * library/init.tcl (auto_execok): make sure env(COMSPEC) on
Windows is executed with the right case, as it may otherwise fail
	inexplicably.
2001-12-29 00:54:26 +00:00
das f3b45aae69 * unix/mkLinks.tcl: improved case-insensitive
filesystem support.
	* unix/mkLinks: Regen.
2001-12-20 18:55:53 +00:00
das 3fda99ed55 * unix/tcl.m4: fixed incorrect SHLIB_LD_LIBS
setting for MacOSX / Darwin.
	* unix/configure: Regen.
	* unix/mkLinks.tcl: improved case-insensitive
	filesystem support.
	* unix/mkLinks: Regen.
2001-12-20 18:28:38 +00:00
dgp 0430cc84de * Several typo and formatting corrections discovered
during conversion to TMML.  Thanks to Joe English.  [Patch 490514]
2001-12-10 16:01:42 +00:00
dgp a5e62f2ef5 Fixed typo 2001-12-07 17:39:04 +00:00
dgp cbbdfb761c * typo fix: index -> lindex 2001-12-05 22:27:25 +00:00
Miguel Sofer 214681bf95 backporting patch for [Bug 231259] 2001-11-29 20:08:33 +00:00
Kevin B Kenny e870360760 * generic/tclCmdMZ.c (Tcl_TimeObjCmd) Added extra parentheses to a
cast expression to remove ambiguity and conform with Tcl
Engineering Manual. [Suggestion by Donal Fellows in commentary on
patch #483500]
2001-11-20 15:14:09 +00:00
Kevin B Kenny ecc1b36781 * generic/tclCmdMZ.c (Tcl_TimeObjCmd): Corrected bug in [time]
when dealing with test sequences that run more than 2**31
microseconds. [Bug 478847]
2001-11-19 22:06:42 +00:00
dgp 3bfeaf2008 * tests/var.test:
* generic/tclVar.c: Corrected bug in [global] when dealing
        with variable names matching :*.  [Bug 480176]
2001-11-09 23:09:09 +00:00
andreas_kupries d3041fc891 See ChangeLog. 2001-11-07 04:48:14 +00:00
hobbs 4496bc0277 see ChangeLog 2001-10-20 00:22:19 +00:00
hobbs 4bbed5c997 added -DPURIFY object allocation option 2001-10-19 23:47:57 +00:00
hobbs 634c2bfa56 added -lc to LIBS on AIX 2001-10-19 23:47:45 +00:00
das dddcfb8b06 * mac/tclMacFile.c: fix to glob -join, wasn't traversing aliased
folders

        * mac/tclMacLoad.c: : corrected utf8 handling, comparison of
        package names to code fragment names changed to only match on the
        length of package name, this allows for fragment names with version
        numbers appended (backport from 8.4)
2001-10-19 19:39:46 +00:00
hobbs 2826e50359 noted 8.3.4 tag date 2001-10-18 23:04:05 +00:00
hobbs d99c0edc79 * unix/configure: regend
* unix/tcl.m4 (SC_ENABLE_GCC): enabled better recognition of gcc.
2001-10-18 22:03:53 +00:00
hobbs 8cb0f2416f * tests/clock.test (clock-8.1):
* generic/tclDate.c (RelativeMonth):
	* generic/tclGetDate.y (RelativeMonth): corrected off-by-one-day
	error in clock scan with relative months and years during swing
	hours. [Bug #413397, Patch #414024] (lavana)
2001-10-18 20:17:17 +00:00
hobbs 39d061fecc updated for 8.3.4 2001-10-18 20:17:01 +00:00
hobbs 5c92fbd0cb * unix/tclUnixPipe.c (PipeInputProc, PipeOutputProc): do immediate
retry when error is returned with errno == EINTR.
	[Bug #415131] (leger)
2001-10-18 01:02:02 +00:00
hobbs 40ecd2c14d regend from stubs changes for mac 2001-10-18 01:01:53 +00:00
das 169ce99510 updated mac binary archives for 8.3.4 2001-10-17 21:38:40 +00:00
das 0380bbce14 Backport of some mac specific changes added to 8.4 since 8.3.3 2001-10-17 19:29:24 +00:00
hobbs 58e48c7727 * unix/configure: regened
* unix/configure.in: added preset CFLAGS check from HEAD to
	prevent --enable-gcc from adding "-g -O2"
2001-10-17 19:12:41 +00:00
hobbs 55e000e1bb minor casts to prevent warnings 2001-10-17 19:12:26 +00:00
dgp 121b2e45e3 * First draft of Tcl changes for 8.3.4 release. 2001-10-17 15:49:36 +00:00
dgp 9be24a854d corrected reference 2001-10-17 15:47:26 +00:00
dgp 068e77d0a7 * Restored install of tclConfig.sh file
to $TCL_EXEC_PREFIX/lib.  It contains platform-dependent
        definitions, and must not be installed under $TCL_PREFIX.
2001-10-16 23:53:21 +00:00
dgp 911e5017c6 * unix/configure: Autoconf
* 'make mklinks' for Tcl_SetMainLoop.
	* 'make dist': Removed copy of files matching mac/*.exp; no such files.
2001-10-16 21:38:07 +00:00
hobbs 4fe57adac3 * unix/tclLoadAout.c (TclGuessPackageName): removed unused vars
and fixed warnings. [Bug #446622] (lim)
2001-10-16 21:13:35 +00:00
das d6895dc020 MacOSX / Darwin support [Patch 435258] 2001-10-16 06:44:08 +00:00
dgp 6c6734ed78 * Added test to demonstrate memory corruption problems. [Bug 219393]. 2001-10-16 05:46:04 +00:00
hobbs 6143463370 fixed dangling ; 2001-10-15 21:54:20 +00:00
hobbs 7148ca69e7 * unix/configure:
* unix/configure.in:
	* win/configure:
	* win/configure.in:
	* win/tcl.m4: reworked to be a little cleaner in comparison to
	each other, and to AC_SUBST even empty vars for win/tclConfig.sh
2001-10-15 21:36:22 +00:00
andreas_kupries 6d887d1f93 * generic/tclInt.decls (TclExpandCodeArray,TclGetInstructionTable):
Added to internal stubs table. Tclcompiler (Tclpro project)
	  needs them if used as loadable package under Windows. Changed
	  signatures. We don't want to describe compiler internal
	  structures in "tclInt.h".

	* generic/tclCompile.h: S.a. Removed function declarations.
	* generic/tclCompile.c: S.a. Adapted to changed signatures.
2001-10-15 20:27:23 +00:00
hobbs e12ed46cbc * generic/tcl.h:
* win/tclWinPort.h: moved #define of WIN32 to tcl.h where __WIN32__
	is defined and added #ifndef check.
2001-10-15 17:39:34 +00:00
dgp e264ffe6d8 * Corrected typos in doc/RegExp.3 2001-10-14 16:25:29 +00:00
hobbs b4b8ca99d7 * tests/winPipe.test: removed obsolete cat16 tests, fixed
winpipe-1.22 to only run on Win9*.
2001-10-13 01:14:34 +00:00
hobbs b6035c725f * tests/timer.test: slight skewing of after values to allow for
correct results on burdened machines.
2001-10-13 01:14:19 +00:00
hobbs c802f67786 added WIN32 define to back-port from 8.4 2001-10-13 01:10:03 +00:00
hobbs 56125cbe12 * tests/winFCmd.test: differentiated test results for win2k
versus not.
2001-10-12 23:43:10 +00:00
hobbs 1c0894c782 back-ported from 8.4 HEAD 2001-10-12 22:46:27 +00:00
hobbs 29625020a0 * library/encoding/ebcdic.enc:
* tools/encoding/ebcdic.txt: EBCDIC charset mapping.
	[Patch #219323] (nijtmans)
2001-10-12 20:41:09 +00:00
hobbs 97a918ea8f * library/encoding/tis-620.enc:
* tools/encoding/tis-620.txt: TIS-620 charset mapping.
	[Patch #467423] (poonlap)
2001-10-12 20:40:55 +00:00
Miguel Sofer 84086a9ee7 generic/tclLiteral.c: (TclReleaseLiteral) insured that
self-referential bytecodes are properly cleaned up on interpreter
deletion [Bug 467523]
2001-10-11 22:34:11 +00:00
dgp 6c2f390400 * Corrected restore of ::env(LANG). 2001-10-10 20:05:45 +00:00
dkf 32f2ccf0e9 Updated as best I can without adding additional Unicode handling functions
from 8.4 (from where most of the real fixes stem.)
2001-10-10 15:34:24 +00:00
hobbs 4178398800 corrected () balancing in back-port 2001-10-10 00:47:41 +00:00
Miguel Sofer 23b0a56940 removed duplicate definition of tclObjsAlloced and
tclObjsFreed. These variables only exist when compiling with
 TCL_COMPILE_STATS, and are already defined in generic/tclExecute.c
2001-10-09 20:42:53 +00:00
hobbs 837e54b36d see ChangeLog 2001-10-09 19:04:17 +00:00
hobbs 7a991240e5 * doc/bgerror.n: back-port from 8.4 that indicates new behavior of
bgerror in Tk.
2001-10-09 19:04:01 +00:00
hobbs 4d6c5d6895 generic/tclFileName.c (ExtractWinRoot): corrected ABR error 2001-10-09 19:03:16 +00:00
Miguel Sofer 021a567691 generic/tclLiteral.c: (TclReleaseLiteral) reverted previous patch for [Bug 467523] - cure is worse than the illness. 2001-10-09 17:16:08 +00:00
dkf 848e4c604f Fixed stupid error in test io-32.8 which only happened to work by chance... 2001-10-09 12:20:17 +00:00
dkf 0314989f70 tclCmdIL bugfixes (info body & lsort -index end-x) 2001-10-08 15:50:24 +00:00
Miguel Sofer 0ad02b4b44 forgot credit for last bugfix ... 2001-10-06 01:03:30 +00:00
Miguel Sofer 817d423905 insured that self-referential bytecodes are properly cleaned up on
interpreter deletion [Bug 467523]
2001-10-06 01:00:28 +00:00
hobbs 0c7f3d5fd4 Updated encodings with latest mappings from www.unicode.org. This
did not include some Mac encodings that have special multi-unichar
	translations now (like symbols, dingbats and japanese).  Also does
	not include big5, gb or euc* as those have different formats in
	the latest Unicode version that need new conversion tools.  Not
	all related .enc files changed as some had been updated separately.
2001-10-04 20:27:48 +00:00
hobbs 5a3771e778 updated patchlevel to 8.3.4.
Changed URLs to point to www.tcl-tk.net where appropriate.
Added proper Win64 build support (for SDK RC1).
2001-10-03 20:26:08 +00:00
hobbs f18899bee0 updated copyright info 2001-10-03 20:24:59 +00:00
hobbs e5e507f989 * generic/tclEvent.c (Tcl_FinalizeThread): moved freeing of
tclLibraryPath to before the thread exit handlers are called.
	Slight modification to change on 2001-09-24.
2001-10-03 18:30:45 +00:00
Miguel Sofer ad076740ab added a comment not to change the working directory before calling Tcl_GetNameOfExecutable [Bug 219215] 2001-09-28 17:53:47 +00:00
andreas_kupries 78d2177415 * generic/tclIO.c: added (on behalf of Kevin Kenny
<kennykb@users.sourceforge.net>) two more '(ClientData)' casts
	  on calls to Tcl_Preserve and Tcl_Release -- ones that Vince
	  apparently missed.
2001-09-28 16:30:12 +00:00
dgp 0ad880e7db * generic/tclIO.c (ChannelTimerProc): Added Tcl_Preserve()
and Tcl_Release() to fix segfault introduced by the 2001-09-26
        changes.  [Bug 465494]

        * doc/TCL_MEM_DEBUG.3:  Updated out-of-date reference to
        #define GUARD_SIZE.
2001-09-28 02:26:35 +00:00
andreas_kupries 5eabea9a35 * The changes below fix [Bug #462317] where Expect tried to read
more than was in the buffers and then blocked in the OS call as
	  its pty channel driver provides no blockmodeproc through which
	  the OS could be notified of blocking-behaviour. Because of this
	  the general I/O core has to take more care than usual to
	  preserve the semantics of non-blocking channels.

	* generic/tclIO.c (Tcl_ReadRaw): Do not read from the driver if
	  the channel is non-blocking and the fileevent causing the read
	  was generated by a timer. We do not know if there is data
	  available from the OS. Instead of going to the OS for more and
	  potentially blocking we simply signal EWOULDBLOCK to the higher
	  levels to cause the system to wait for true fileevents.
	  (GetInput): Same as before.
	  (ChannelTimerProc): Added set and clear of CHANNEL_TIMER_FEV.

	* generic/tclIO.h (CHANNEL_TIMER_FEV): New flag for channels. Is
	  set if a fileevent was generated by a timer, the channel is not
	  blocking and the driver did not provide a blockmodeproc. In that
	  case the I/O core has to be especially careful about going to
	  the driver for more data.
2001-09-27 02:26:42 +00:00
andreas_kupries 138bca983e * The change below fixes [Bug #464380]. The bug was reported by
Ronnie Brunner <rbrunner@users.sourceforge.net>. He also
	  provided the patch.

	* generic/tclEvent.c (Tcl_Finalize): Moved release of
	  'tclLibraryPath' to Tcl_FinalizeThread.
	  (Tcl_FinalizeThread): See above, new place for release of
	  'tclLibraryPath'.
2001-09-24 17:54:54 +00:00
hobbs c9fcc4aacc * win/makefile.vc: updated IA64 compile settings
* win/tclWinInit.c: added extra processor definitions. (mstacy)

	* win/tclWinSock.c (SocketThread): corrected pointer cast for _WIN64.

	* win/tclWinNotify.c: removed unnecessary winsock include (it is
	already in from tclWinPort.h).

	* win/tclWinPort.h: changed winsock.h include to winsock2.h.
	Reverses change from 2000-11-16, but is necessary for WIN64.
	Extensions should comply with defined OS words, or use #ifndef.
2001-09-20 18:50:24 +00:00
dgp d1598dc73b log entry correction 2001-09-20 16:38:17 +00:00
hobbs 3d6927887b see ChangeLog 2001-09-20 01:15:08 +00:00
hobbs 33f7f43ef2 * generic/tclCmdAH.c (Tcl_FormatObjCmd):
* generic/tclScan.c (Tcl_ScanObjCmd): corrected handling of format
	and scan on 64-bit machines. [Bug #412696] (rmax)
2001-09-20 01:13:16 +00:00
hobbs 557a25b6e1 * generic/tclTest.c (TestcmdtokenCmd): corrected pointer
storage/retrieval for 64bit machines.
2001-09-20 01:13:03 +00:00
hobbs 88a0b7abea * unix/configure: regen'ed
* unix/tcl.m4: added --enable-64bit support for HP-11 with the
	64-bit kernel.
2001-09-20 01:12:49 +00:00
hobbs 7a08e6a048 * generic/tcl.h: removed forced #define USE_TCLALLOC 1 for
Windows.  This means the native system allocator will be used by
	default.  This should be binary and source compatible with
	extensions, as Tcl_Alloc is a properly stubbed function.
2001-09-19 16:56:35 +00:00
dgp f26e491227 * On Linux, disable inlining when
one of the compat/*.c routines is to be linked in. [Patch 440891]
2001-09-18 20:15:33 +00:00
dgp 004a1c1b5c Corrected errors in prior commit message 2001-09-13 20:03:47 +00:00
hobbs 9a35222276 * generic/tclUtf.c (Tcl_UtfPrev): corrected to return the proper
location when the middle of a UTF-8 byte was passed in.
	[Bug #450504]
2001-09-13 19:33:19 +00:00
andreas_kupries 6941fda78b * tests/ioCmd.test: Changed the computation of the result for
iocmd-8.1[123] so that the tests work for single- and
	  multi-process execution of the testsuite. Depending on the
	  choice of the user stdout is a tty or not and thus reports
	  different channel options. Fixes [460993] reported by Don
	  Porter.
2001-09-13 19:10:51 +00:00
dgp 6d0e9ee3a5 Backport several bug fixes from HEAD to core-8-3-1-branch:
* tests/rename.test:
        * tests/split.test:  Corrected tests to better isolate tests in
        one file from influencing tests in other files.  [Bug 460591]

        * unix/tclLoadShl.c:  Added #include of tclInt.h; access to Tcl
        internals, notably TclpUnloadFile(), is required.  Thanks to
        Bob Techentin for report and patch.  [Bug 459305]

        * generic/tclInitScript.h (initScript):
        * win/tclWinInit.c (TCL_REGISTRY_KEY, TclpSetVariables):  Removed
        vestiges of Tcl's old initialization from registry variables.
        [Bug 455645]

        * tests/unixInit.test (unixInit-3.2): Updated test to support
        newer HP-UX releases that properly report euc-jp as the system
        encoding for Japanese.  Bug report and patch verification by Bob
        Techentin.  [Bug 453883]

        * compat/strtod.c (strtod):  Fixed failure to handle expressions
        like 3eq2 and failure to set errno on overflow.  [Bug 440894]
2001-09-12 21:26:36 +00:00
dgp 68b1f4f3d2 * Corrected tests to better isolate tests in
one file from influencing tests in other files.  [Bug 460591]
2001-09-12 20:34:59 +00:00
hobbs 663339fe5a reworked stack-2.1 to be impervious to interp state 2001-09-11 18:23:45 +00:00
hobbs 39338c0ce8 * generic/tclEvent.c (TclInExit): Corrected handling of tsd in
late stages of finalization.  [Bug #419449] (darley)
2001-09-11 01:31:43 +00:00
hobbs 1a92eb4faf * tests/stack.test:
* generic/tclInterp.c (AliasObjCmd): Check the numLevels to ensure
	that we aren't hitting some alias loop condition.  [Bug #443184]
2001-09-11 00:53:27 +00:00
andreas_kupries 3d56edaa4e * generic/tclInt.decls: Added 'TclWinFlushDirtyChannels' to
the internal platform specific stub table.
2001-09-10 17:15:13 +00:00
andreas_kupries b6b046d98b * All the changes below serve to fix bug [219148] which reports a
80x performance hit for file I/O on Win* systems. On my system
	  it was closer to a 120x hit. Problem report by Uwe Traum <no
	  email address available>.

	  The fix goes like this: The obstacle is 'FlushFileBuffers',
	  executed whenever Tcl writes data to the OS, as Tcl has to wait
	  for the disk to complete I/O, and disks are slow. We remove that
	  obstacle. This opens another problem, [file size] reports back
	  wrong numbers. So for [file size] we add the call back in. As
	  optimization we keep track of the channels which were written to
	  and flush only these.

	* win/tclWinFile.c (TclpObjStat): Added a call to
	  'TclWinFlushDirtyChannels'. This ensures that [file size] and
	  related commands report the correct size of a file even if Tcl
	  has recently written to it. Unixoid OS's always report the
	  correct size even for files with pending data, but Win*
	  syssystem don't. They only report what is actually on disk.

	* win/tclWinInt.h: Added declaration of
	  'TclWinFlushDirtyChannels', making it available to other parts
	  of the tcl core.

	* win/tclWinChan.c (TclWinFlushDirtyChannels): New, internal,
	  procedure. Goes through the list of open file channels and
	  forces the OS to flush its file buffers for all which were
	  written to since the last call of this function. This is an
	  expensive operation as Tcl has to wait for the OS to complete
	  actual writes to the disk.

	  (FileInfo): Added dirty flag required by the procedure above.

	  (FileOutputProc): Removed flushing of file buffers, setting the
	  dirty flag instead. This means that the previously incurred
	  delays do not happen anymore.

	  (TclWinOpenFileChannel): Added initialization of 'dirty' flag.
2001-09-07 17:10:32 +00:00
dgp a9e595cb4c * Updated http package to version 2.4,
reflecting the new features just added.
2001-09-07 02:43:38 +00:00
hobbs 1a26c423bd * doc/http.n: noted -binary, charset and coding state keys.
* tests/http.test:
	* library/http/pkgIndex.tcl:
	* library/http/http.tcl (geturl): correctly get charset parameter
	and convert text according to specified encoding (if known).  RFC
	iso8859-1 is used by default.  Also recognize Content-encoding to
	see if we should do binary translation.  Added a CYA -binary
	switch for the cases that were missed. [Bug #219211 #219399]

	* tests/ioUtil.test: changed to make better use of constraints and
	remove knownBug constraints that weren't valid.
2001-09-07 00:10:56 +00:00
davygrvy 3b938bab08 no message 2001-09-01 23:37:37 +00:00
davygrvy 29a70713dd Added use of new private TclFinalizeAsync() found in tclAsync.c 2001-09-01 23:06:28 +00:00
davygrvy 1e312e1c5b no message 2001-09-01 22:54:21 +00:00
davygrvy 465252903c -=[ Tcl_Async* API merge from HEAD ]=-
* generic/tclInt.decls:  Removed TclpAsyncMark permanently and left
	the hole not to upset the positions.

	* generic/tclDecls.h:
	* generic/tclIntDecls.h:
	* generic/tclIntPlatDecls.h:
	* generic/tclPlatDecls.h:
	* generic/tclStubInit.c:  regen'd tables.

	* generic/tclAsync.c:  Brought source to match -r1.6 on the HEAD branch.

	* unix/tclUnixPort.h:
	* mac/tclMacPort.h: removed #defines for TclpAsyncMark.

	* win/tclWinInit.c:  Removed the TclpAsyncMark function and the thread ID
	saving that was going on in TclpInitPlatform(). [the old hack]

	* win/tclWinThread.c:  TclpFinalizeCondition() and TclpFinalizeMutex()
	are now properly returning the old CriticalSection handle to the system.
	Tcl_CreateThread() is now decrementing its handle reference, so the
	system will recover resources when the thread closes (doh!).  These
	changes are all already up on the HEAD.

	* doc/Async.3:  matches HEAD.
2001-09-01 22:53:45 +00:00
hobbs 9ee2b3da95 * generic/tclIndexObj.c: fixed some casting problems that upset
Crays. [Bug #419528] (andreasen)
2001-08-30 19:02:21 +00:00
hobbs 67c9a93a5e * tests/httpd (httpdRespond): added response to timeout value in
query string.
2001-08-30 17:07:59 +00:00
dgp 1def2a858a * Silence warning from Sun compiler. [Bug 454374] 2001-08-30 15:43:31 +00:00
hobbs 034534b6ff * doc/Tcl_Main.3: added docs for Tcl_SetMainLoop
* generic/tclStubInit.c:
	* generic/tclDecls.h:
	* generic/tcl.decls: added Tcl_SetMainLoop proc that allows people
	to set a main loop that will run for tclsh.
	* generic/tcl.h: added Tcl_MainLoopProc typedef
	* generic/tclMain.c (Tcl_SetMainLoop, StdinProc, Prompt): new
	StdinProc and Prompt static procs and Tcl_SetMainLoop stubs proc.
	The first two handle a fileevent based prompt (taken from
	tkMain.c).  Tcl_SetMainLoop enables the interactive setting of a
	main loop procedure.  This enables Tk to be a loadable package.
2001-08-28 00:12:43 +00:00
hobbs c56429f966 * doc/Encoding.3: added note that tclPlatDecls.h must be included
for use of Tcl_WinTCharToUtf and Tcl_WinUtfToTChar.
2001-08-28 00:08:40 +00:00
dgp 814083448a * Backport of several bug fixes from HEAD to core-8-3-1-branch 2001-08-24 16:19:09 +00:00
andreas_kupries b3af10ed93 2001-08-23 Andreas Kupries <andreas_kupries@users.sourceforge.net>
* win/tclWinPipe.c (BuildCommandLine): Fixed tcl Bug
	  [432499]. Part of the code used the non-absolute path to the
	  executable to determine quoting. This failed if the absolute
	  path contained spaces, but the application name itself not. This
	  bug caused no trouble on Win NT 5, but does for other variants
	  in the Win* family. Report and fix due to Ken Poole
	  <kenpoole@users.sourceforge.net>.
2001-08-23 21:19:34 +00:00
hobbs 84a18feb5f added QNX-6 build support. [Bug #219410] (loverso) 2001-08-23 19:13:45 +00:00
hobbs 85875ffd9d * library/http/http.tcl (geturl): added port number to Host:
header to comply with HTTP/1.1 spec (RFC 2068).  [Bug #452217]
2001-08-21 01:16:50 +00:00
dgp e5331b50bc Add package dependency checks. Upgrade packages bundled with
Tcl 8.3.x: http 2.3.2, msgcat 1.1.1, opt 0.4.3, tcltest 1.0.1.
2001-08-09 01:00:56 +00:00
dgp 29b186b0e2 BRANCH: core-8-3-1-branch
Removed library/tcltest/* .  The package tcltest 1.0 is distributed
	with Tcl 8.3.x and its files are in library/tcltest1.0 .
2001-08-08 03:38:03 +00:00
dgp 190f8e6421 BRANCH: core-8-3-1-branch
Removed library/reg/* . The index of the registry package moved
	to that directory in the Tcl 8.4 development.  In Tcl 8.3.x
	releases, the registry package is in library/reg1.0 .
2001-08-08 03:32:10 +00:00
dgp fa89538851 BRANCH: core-8-3-1-branch
Removed library/opt0.4/* . The files of the opt package moved to
	library/opt in the Tcl 8.3.3 release.
2001-08-08 03:28:17 +00:00
dgp 3deb35ce0f BRANCH: core-8-3-1-branch
Removed library/msgcat1.0/*.  The msgcat package files moved
	to library/msgcat in the Tcl 8.3.3 release.
2001-08-08 03:25:44 +00:00
dgp 2b50ee61d0 BRANCH: core-8-3-1-branch
Removed library/http2.3/* .  The http package moved to
	library/http in the 8.3.3 release.
2001-08-08 03:23:23 +00:00
dgp 9ed33112a9 BRANCH: core-8-3-1-branch
Removed library/dde/*.  They first appear in the 8.4 work.
	In 8.3, the dde package is in library/dde1.1 .
2001-08-08 03:13:50 +00:00
Miguel Sofer 279537e74c Avoid panic when there are extra items in the tcl stack [Bugs #406709 and 439843, Patch #414470] 2001-08-07 15:41:20 +00:00
hobbs 48ae72be11 * generic/tclCmdMZ.c (Tcl_RegexpObjCmd, Tcl_RegsubObjCmd):
reordered the retrieval of arguments to avoid shimmering bug when
	the pattern and string referenced the same object.
2001-08-07 00:51:12 +00:00
hobbs add60805e6 added GNU (HURD) configuration target. (brinkmann) 2001-08-07 00:47:50 +00:00
andreas_kupries 1d5d257602 Extended description of fix 442665. 2001-08-06 22:43:53 +00:00
andreas_kupries f2cff8e701 2001-08-06 Andreas Kupries <andreas_kupries@users.sourceforge.net>
* generic/tclIOCmd.c (Tcl_GetsObjCmd): Applied patch from SF item
	  [442665] to fix the bug reported by it.
2001-08-06 22:24:11 +00:00
hobbs 53f188c357 * win/configure: regenerated
* win/tcl.m4: fixed DLLSUFFIX definition to always be ${DBGX}.dll.
	This is necessary for TEA compliant builds that build shared
	against a static-built Tcl.
	* win/Makefile.in ($(TCLSH)): added $(TCL_STUB_LIB_FILE) to build
	target, otherwise it wouldn't get generated in a static build.
2001-08-04 00:33:59 +00:00
andreas_kupries d31b1fb794 2001-07-18 Andreas Kupries <andreas_kupries@users.sourceforge.net>
* generic/tclIO.c: Aftermath to [SF #427196]. Squash empty buffers
	  if they are smaller than the requested buffersize, to prevent
	  reusage of old buffers and to honor changes in the requested
	  buffersize made by the user.
2001-07-18 17:17:19 +00:00
hobbs 245af7255b * generic/tclIO.c (GetInput): Fixed [SF #427196]. Memory was
overwritten because a buffer was used after a change of the
	  requested buffersize together with that requested buffersize and
	  not its actual size, which was smaller. Note that the continous
	  reuse of the smaller buffer negatively impacts performance. The
	  system never allocates a buffer with the newly requested bigger
	  buffersize.
2001-07-17 20:43:52 +00:00
hobbs 43573b2889 * win/tclWinPipe.c (PipeClose2Proc): constrained the mutex lock to
just the TerminateThread call and waiting for termination. (jsmith)
2001-07-17 01:45:42 +00:00
hobbs de4e401bc6 updated build setup 2001-07-16 23:14:27 +00:00
hobbs 857ae17df7 2001-07-02 Jeff Hobbs <jeffh@ActiveState.com>
* tests/util.test: added util-4.6
	* generic/tclUtil.c (Tcl_ConcatObj): Corrected walking backwards
	over utf-8 chars. [Bug #227512]

2001-06-27  Jeff Hobbs  <jeffh@ActiveState.com>

	* generic/tclUtf.c (Tcl_UtfBackslash): Corrected backslash
	handling of multibyte utf-8 chars. [Bug #217987]

	* generic/tclCmdIL.c (InfoProcsCmd): fixed potential mem leak in
	info procs that created objects without using them.

	* generic/tclCompCmds.c (TclCompileStringCmd): fixed mem leak when
	string command failed to parse the subcommand.

2001-05-22  Jeff Hobbs  <jeffh@ActiveState.com>

	* generic/tclObj.c (TclAllocateFreeObjects): simplified
	objSizePlusPadding to use sizeof(Tcl_Obj) (max)
2001-07-16 23:14:13 +00:00
das 4a83040c8a 2001-05-04 Daniel Steffen <das@users.sourceforge.net>
** Mac 8.3.3 binary release

        **  detailed change log for changes to mac code for 8.3.3
        **  (expands on log entries below marked 2001-04-04  Jeff Hobbs)
2001-05-17 13:32:18 +00:00
das 02a5eee47e 2001-05-04 Daniel Steffen <das@users.sourceforge.net>
** Mac 8.3.3 binary release
2001-05-17 13:30:47 +00:00
das 64249b78e8 2001-05-04 Daniel Steffen <das@users.sourceforge.net>
** Mac 8.3.3 binary release

        * mac/tclMacAlloc.c: modernized TclpSysAlloc() to use temporary
        memory instead of system heap memory when available (MacOS
        >= 7.5 and possibly earlier, use of system heap has been
        discouraged for a long time and has many disadvantages, e.g. memory
        isn't paged out, and errors can very easily bring the system down);
        fixed crashing bug in TclpSysRealloc() and CleanUpExitProc() where
        memory was being accessed after having been deallocated; fixed
        memory leak in (de)allocation code (for every block ever allocated
        with TclpSysAlloc, a Ptr was leaked), if temporary memory is
        available, don't track allocated memory, instead use
        RecoverHandle() to get Handle from Ptr, otherwise use doubly linked
        list to correctly track memory and free all allocated memory; added
        new option for ConfigureMemory: MEMORY_DONT_USE_TEMPMEM, disables
        use of temporary memory even when it would be available, only
        necessary when writing e.g. a driver (using tcl??); increased
        fraction of application heap reserved for OS routines to 512K
2001-05-17 13:30:02 +00:00
hobbs fdcbd30ab2 * unix/install-sh: added -S option
* unix/tcl.m4: added Rhapsody/Darwin target
	* unix/tclLoadDyld.c (TclpLoadFile):
	* unix/tclMtherr.c (matherr): added support for Mac OS X
2001-04-06 18:42:39 +00:00
hobbs f193dfaa3a * win/README:
* win/README.binary: removed note about use of registry (hasn't
	been used for loading since 8.0).

	* win/configure:
	* win/tcl.m4: added -link50compat
2001-04-06 01:32:52 +00:00
hobbs be82a506d9 * generic/tclObj.c (TclAllocateFreeObjects): simplified
objSizePlusPadding to use sizeof(Tcl_Obj) (max)
2001-04-06 01:32:34 +00:00
hobbs 9c09633636 * mac/tclMacProjects.sea.hqx: fixed accidental swap with Tk
project files.
2001-04-05 20:34:10 +00:00
hobbs a0fa32de80 forgot to add some () style notes 2001-04-04 23:05:06 +00:00
hobbs 951eaf510f updated changes from ChangeLog 2001-04-04 23:00:59 +00:00
hobbs 140cc143aa * mac/tclMacShLib.exp:
* mac/tclMacMSLPrefix.h: removed files
2001-04-04 21:45:52 +00:00
hobbs 7e591f8baf * generic/tcl.h: addition of ConditionalMacros.h and use of
DLLIMPORT and DLLEXPORT.

	* generic/tclIntPlatDecls.h:
	* generic/tclInt.decls:
	* generic/tclMain.c:
	* generic/tclStubInit.c:
	* generic/tclThreadTest.c: NewThread -> NewTestThread
	* mac/MW_TclAppleScriptHeader.pch:
	* mac/MW_TclHeader.pch:
	* mac/MW_TclTestHeader.pch:
	* mac/tclMac.h:
	* mac/tclMacAppInit.c:
	* mac/tclMacApplication.r:
	* mac/tclMacChan.c: cast for *BlockMode
	* mac/tclMacCommonPch.h:
	* mac/tclMacFCmd.c:
	* mac/tclMacInt.h:
	* mac/tclMacLibrary.c:
	* mac/tclMacLibrary.r:
	* mac/tclMacMath.h:
	* mac/tclMacNotify.c:
	* mac/tclMacOSA.c:
	* mac/tclMacOSA.r:
	* mac/tclMacPanic.c:
	* mac/tclMacPort.h:
	* mac/tclMacResource.r:
	* mac/tclMacSock.c: cast for *BlockMode
	* mac/tclMacThrd.c:
	* mac/tclMacUnix.c:
	* mac/tclMacUtil.c: changed mac declarations to use Tcl ending,
	fixed copyrights, updated headers, fixed comments, updated
	resource files.  Mac builds are now meant to be build with
	MetroWerks CW 6.
2001-04-04 21:22:17 +00:00
hobbs df63f960c6 * mac/MW_TclBuildLibHeader.h:
* mac/MW_TclBuildLibHeader.pch:
	* mac/MW_TclHeaderCommon.h:
	* mac/MW_TclStaticHeader.h:
	* mac/MW_TclStaticHeader.pch:
	* mac/tcltkMacBuildSupport.sea.hqx: new files for improved mac build
	* mac/tclMacProjects.sea.hqx: new mac build project files.  (steffen)
2001-04-04 21:09:25 +00:00
hobbs 54119507aa * unix/configure:
* unix/tcl.m4: extended test of termios vs. termio vs. sgtty to
	better detect result on Linux and when certain configure
	redirections are being used. (max) [Patch #402923; Bug #227412,
	#219194]
2001-04-04 19:13:29 +00:00
dgp 4666060916 Corrected out of date comments 2001-04-04 14:47:16 +00:00
hobbs 31b70a077d improved cygwin compat for RC_DEFINES 2001-04-04 08:36:16 +00:00
hobbs 47f446dc9c * generic/tclListObj.c (Tcl_SetListObj): set objPtr->length = 0 in
empty object case to maintain sanctity of Tcl_Obj bytes/length
	pairing. (porter) [Patch #405998]
2001-04-04 07:38:47 +00:00
hobbs 1167313c78 adjust mklinks target 2001-04-03 23:00:17 +00:00
hobbs b3050df2ed see backport log in ChangeLog for specific file backports from 8.4aCVS 2001-04-03 22:54:36 +00:00
hobbs a5516756e8 added configure scripts to 8.3 branch 2001-04-03 22:10:13 +00:00
hobbs 12f19af98c README link and notes updates 2001-04-03 22:08:32 +00:00
hobbs 85835b4a8f doc clarifications and cleanup 2001-04-03 22:06:43 +00:00
hobbs a4d73ade8b updated changes for 8.3.2 release 2000-08-08 19:03:30 +00:00
hobbs 6c763f11df * library/msgcat1.0/pkgIndex.tcl:
* library/msgcat1.0/msgcat.tcl: bumped msgcat version to 1.1.
2000-08-08 18:08:10 +00:00
hobbs e70a563f41 * library/msgcat1.0/msgcat.tcl: bumped msgcat version to 1.1. 2000-08-08 17:53:41 +00:00
hobbs e9d49a692b see changes 2000-08-08 00:58:04 +00:00
hobbs c98a74fe71 * doc/ChnlStack.3:
* doc/CrtChannel.3: updated the docs to be aware of the
	TCL_CHANNEL_VERSION_2 style of Tcl channels.
2000-08-08 00:57:52 +00:00
hobbs 1f56cc3bd7 * generic/tclIO.c (Tcl_CreateChannel): added assertion to verify
that the new channel versioning will be binary compatible with
	older channel drivers.
2000-08-08 00:57:40 +00:00
hobbs accffd7c20 * unix/mkLinks: Regen'd with new mkLinks.tcl.
* unix/mkLinks.tcl: Fixed indentation, made link setup more
	intelligent (only do one existance test per man page, instead of
	one per function).
2000-08-08 00:57:06 +00:00
hobbs d0f0c9d9ee * unix/Makefile.in: add tclsh.ico and tcl.spec to dist target 2000-08-07 22:04:23 +00:00
hobbs 3a087e89d3 see changes 2000-08-07 21:33:37 +00:00
hobbs 913b10b863 * generic/tclIndexObj.c (Tcl_GetIndexFromObjStruct): Corrected
caching of the index ptr to account for offsets != sizeof(char *).
	[Bug: 5153]
2000-08-07 21:33:15 +00:00
hobbs 9e21fa252f * generic/tclEnv.c: cast cleanup [Bug: 5624]
* win/tclWinFCmd.c: cast cleanup [Bug: 5627]
2000-08-07 21:33:02 +00:00
hobbs 32b27dad85 * generic/tclPosixStr.c (Tcl_SignalMsg): clarified #defines for
Linux on Sparc to compile correctly. [Bug: 5364]
2000-08-07 21:32:40 +00:00
hobbs 0d83eab121 * tests/stringObj.test: Tweaked tests to avoid hardcoded
high-ASCII characters (which will fail in multibyte locales);
	instead used \uXXXX syntax. [Bug: 3842].
2000-08-07 21:32:25 +00:00
hobbs 9e397a3d6e * tests/opt.test:
* library/opt0.4/optparse.tcl: Applied patch from [Bug: 5922], which
	corrected an incorrect use of [string match].
2000-08-07 21:32:11 +00:00
hobbs 229bd49ed9 * library/history.tcl: Corrected an off-by-one error in HistIndex,
which was causing [history redo] to start its search at the wrong
	event index. [Bug: 1269].
2000-08-07 21:31:47 +00:00
hobbs 7779704e5e * library/init.tcl (auto_import): added check to see if a valid
pattern was coming in, to avoid simple error cases [Bug: 3326]
2000-08-07 21:31:33 +00:00
hobbs 9a0c91d82f * unix/tclUnixInit.c (TclpSetInitialEncodings): attempt to
correct setlocale calls for XIM support and locale issues.
	[BUG: 5422 3345 4236 2522 2521]
2000-08-07 21:31:12 +00:00
hobbs f18451a485 * generic/tclClock.c (FormatClock): correct code to handle locale
specific return values from strftime, if any. [Bug: 3345]
2000-08-07 21:30:56 +00:00
hobbs 6e872bc573 * tests/clock.test: Added test for "2 days 2 hours ago" style
specifications.

	* generic/tclDate.c: Regenerated from tclGetDate.y.

	* generic/tclGetDate.y: Tweaked grammar to properly handle the
	"ago" keyword when it follows multiple relative unit specifiers,
	as in "2 days 2 hours ago".  [Bug: 5497].
2000-08-07 21:30:35 +00:00
hobbs 5ef54bcca9 * generic/tclCkalloc.c: Fixed some function headers. 2000-08-07 21:30:08 +00:00
hobbs 447ba1bd68 * doc/AddErrInfo.3:
* doc/ChnlStack.3:
	* doc/Exit.3:
	* doc/GetIndex.3:
	* doc/Notifier.3:
	* doc/Object.3:
	* doc/RegExp.3:
	* doc/SetResult.3:
	* doc/SplitList.3:
	* doc/Thread.3:  Added missing entries to NAME section.

	* doc/AddErrInfo.3:
	* doc/CrtObjCmd.3:
	* doc/RecEvalObj.3: Changed Tcl_EvalObj to Tcl_EvalObjEx

	* doc/library.n: Added entries for auto_qualify and auto_import
	[Bug: 1271].
	* doc/library.n: Fixed .SH NAME macro to include each function
	documented on the page, so that mkLinks will know about the
	functions listed there, and so that the Windows help file index
	will get set up correctly [Bug: 1898, 5273].

	* doc/expr.n: Added documentation for each of the math library
	functions that expr supports [Bug: 1054].

	* doc/regsub.n: correct regsub docs [Bug: 5346]

	* doc/scan.n: minor doc fixes [Bug: 5396]

	* doc/RegExp.3: Replaced instances of "Tcl_GetRegExpInfo" with
	"Tcl_RegExpGetInfo", the correct name of the function [Bug: 5901].

	* doc/package.n: Corrected information about [package forget]
	arguments [Bug: 5418].
2000-08-07 21:29:36 +00:00
hobbs 4772e4fbbc * generic/tclIOGT.c (TclChannelTransform): fixed segfault that
would occur when transforming a channel with a proc that did not
	yet exist. (Kupries)

	* generic/tclTest.c (TestChannelCmd): added some lint init'ing of
	statePtr and chan vars.
2000-08-06 00:20:09 +00:00
ericm 42903a965d Finished backport of mcunknown fix for 8.3.2. 2000-08-03 21:59:35 +00:00
ericm 1f041cbeb8 Backport of mcunknown fixes for 8.3.2. 2000-08-03 21:40:55 +00:00
ericm 6a77788f92 Backport of mcunknown fixes. 2000-08-03 21:40:15 +00:00
mo 49b4e7289d * win/Makefile.in:
* win/configure.in:
	* win/tcl.m4:
	* win/tclConfig.sh.in: Back port of gcc for windows
	build system from 8.4.
2000-07-28 07:58:27 +00:00
hobbs e6ca6caa2e * merged core-8-3-1-io-rewrite back into core-8-3-1-branch.
The core-8-3-1-io-rewrite branch should now be considered defunct.
2000-07-27 01:39:11 +00:00
welch 76a4df192b Added builds of the tclreg and tcldde static libraries. 2000-07-13 01:08:46 +00:00
welch 2c47ecc37b *** empty log message *** 2000-07-13 01:08:29 +00:00
jingham f50091eae7 Fix Weak links 2000-06-21 03:49:40 +00:00
hershey e803430f83 fixed the arglist for scan--varNames are all optional 2000-06-14 01:38:00 +00:00
hobbs a43e59c36a reduced unnecessary iterations in http-3.13 2000-06-02 23:44:06 +00:00
hobbs 3187daa417 * generic/tclIO.c (CloseChannel): removed the &ing out of
(TCL_READABLE|TCL_WRITABLE) from the flags, as CloseChannel does
	this on the next pass through for the top channel, and it appeared
	to be causing hangs by not allowing the final flush.
2000-06-02 20:04:05 +00:00
hobbs 25eb6f30ba (CloseChannel): further extended CloseChannel in the stacked case
to effect certain operations on the next channel that would have
	been done in Tcl_Close.  Also added CHANNEL_CLOSED and removed
	(TCL_READABLE|TCL_WRITABLE) bits from chanPtr->flags.  Changed
	final reset of the WatchProc to check the chanDownPtr's (next)
	interestMask.
2000-06-02 05:20:09 +00:00
hobbs fe38772e86 * generic/tclIO.c (CloseChannel): Rewrote CloseChannel code to
unstack a channel during the close process.  Fixed a refcount bug
	in Tcl_UnstackChannel.  [Bug: 5623]
2000-06-02 03:01:37 +00:00
sandeep f5f35eb289 2000-05-29 Sandeep Tamhankar <sandeep@scriptics.com>
* tests/http.test
	* doc/http.n
	* library/http2.3/http.tcl: Fixed bug 5741, where unsuccessful
	geturl calls sometimes leaked memory and resources (sockets).
	Also, switched around some of the logic so that http::wait never
	throws an exception.  This is because in an asynchronous geturl,
	the command callback will probably end up doing all the error
	handling anyway, and in an asynchronous situation, the user
	expects to check the state when the transaction completes, as
	opposed to being thrown an exception.	For the http package, this
	menas the user can check http::status for "error" and http::error
	for the error message after doing the http::wait.
2000-05-31 01:28:55 +00:00
401 changed files with 97328 additions and 73065 deletions
+2292 -9
View File
File diff suppressed because it is too large Load Diff
+77 -92
View File
@@ -1,11 +1,11 @@
README: Tcl
This is the Tcl 8.3.1 source distribution.
You can get any release of Tcl from:
http://dev.scriptics.com/registration/<version>.tml
This is the Tcl 8.3.5 source distribution.
Tcl/Tk is also available through NetCVS:
http://dev.scriptics.com/software/tcltk/netcvs.html
http://tcl.sourceforge.net/
You can get any source release of Tcl from the file distributions
link at the above URL.
RCS: @(#) $Id: README,v 1.31 2000/04/26 17:31:19 hobbs Exp $
RCS: @(#) $Id: README,v 1.31.2.4 2002/10/16 00:06:49 hobbs Exp $
Contents
--------
@@ -22,19 +22,21 @@ Contents
1. Introduction
---------------
Tcl provides a powerful platform for creating integration
applications that tie together diverse applications, protocols,
devices, and frameworks. When paired with the Tk toolkit, Tcl
provides the fastest and most powerful way to create GUI applications
that run on PCs, Unix, and the Macintosh. Tcl can also be used for a
variety of web-related tasks and for creating powerful command
languages for applications.
Tcl provides a powerful platform for creating integration applications that
tie together diverse applications, protocols, devices, and frameworks.
When paired with the Tk toolkit, Tcl provides the fastest and most powerful
way to create GUI applications that run on PCs, Unix, and the Macintosh.
Tcl can also be used for a variety of web-related tasks and for creating
powerful command languages for applications.
Tcl is maintained, enhanced, and distributed freely as a
service to the Tcl community by Scriptics Corporation.
The official home for Tcl/Tk is on the Scriptics Web site:
Tcl is maintained, enhanced, and distributed freely by the Tcl community.
The home for Tcl/Tk sources and bug/patch database is on SourceForge:
http://dev.scriptics.com
http://tcl.sourceforge.net/
with the Tcl Developer Xchange hosted at:
http://www.tcl.tk/
Tcl is a freely available open source package. You can do virtually
anything you like with it, such as modifying it, redistributing it,
@@ -42,20 +44,20 @@ and selling it either in whole or in part. See the file
"license.terms" for complete information.
2. Documentation
---------------
----------------
Extensive documentation is available at our website.
The home page for this release, including new features, is
http://dev.scriptics.com/software/tcltk/8.3.html
http://www.tcl.tk/software/tcltk/8.3.html
Detailed release notes can be found at
http://dev.scriptics.com/software/tcltk/relnotes/tcl8.3.1.txt
http://sourceforge.net/project/showfiles.php?group_id=10894
Information about Tcl itself can be found at
http://dev.scriptics.com/scripting/
http://www.tcl.tk/scripting/
There are many Tcl books on the market. Most are listed at
http://dev.scriptics.com/resource/doc/books/
http://www.tcl.tk/resource/doc/books/
2a. Unix Documentation
----------------------
@@ -71,66 +73,69 @@ normal -man macros, for example
ditroff -man Tcl.n
to print Tcl.n. If Tcl has been installed correctly and your "man"
program supports it, you should be able to access the Tcl manual entries
using the normal "man" mechanisms, such as
to print Tcl.n. If Tcl has been installed correctly and your "man" program
supports it, you should be able to access the Tcl manual entries using the
normal "man" mechanisms, such as
man Tcl
2b. Windows Documentation
-------------------------
The "doc" subdirectory in this release contains a complete set of
Windows help files for Tcl. Once you install this Tcl release, a
shortcut to the Windows help Tcl documentation will appear in the
"Start" menu:
The "doc" subdirectory in this release contains a complete set of Windows
help files for Tcl. Once you install this Tcl release, a shortcut to the
Windows help Tcl documentation will appear in the "Start" menu:
Start | Programs | Tcl | Tcl Help
3. Compiling and installing Tcl
-------------------------------
There are brief notes in the unix/README, win/README, and mac/README
about compiling on these different platforms. There is additional
information about building Tcl from sources at
http://dev.scriptics.com/support/howto/compile.html
There are brief notes in the unix/README, win/README, and mac/README about
compiling on these different platforms. There is additional information
about building Tcl from sources at
http://www.tcl.tk/doc/howto/compile.html
4. TclPro Development tools
--------------------
---------------------------
A high quality set of commercial development tools is now available to
accelerate your Tcl application development. Scriptics' TclPro
product provides a debugger, static code checker, packaging utility,
and bytecode compiler. Visit the Scriptics Web site at:
A high quality set of commercial quality development tools is available to
accelerate your Tcl application development. The TclPro product provides a
debugger, static code checker, packaging utility, and bytecode compiler.
TclPro was open-sourced when Scriptics/Ajuba was acquired by Interwoven.
Visit its home at SourceForge for more information and source/binaries:
http://dev.scriptics.com/tclpro
http://tclpro.sourceforge.net/
for more information on TclPro and for a free evaluation download.
ActiveState has picked up support for commercial Tcl development tools.
More information can be found at
http://www.ActiveState.com/Tcl
5. Tcl newsgroup
----------------
There is a network news group "comp.lang.tcl" intended for the
exchange of information about Tcl, Tk, and related applications. The
newsgroup is a great place to ask general information questions. For
bug reports, please see the "Support and bug fixes" section below.
There is a network news group "comp.lang.tcl" intended for the exchange of
information about Tcl, Tk, and related applications. The newsgroup is a
great place to ask general information questions. For bug reports, please
see the "Support and bug fixes" section below.
6. Tcl contributed archive
--------------------------
Many people have created exciting packages and applications based on Tcl
and/or Tk and made them freely available to the Tcl community. An archive
of these contributions is kept on the machine ftp.neosoft.com. You
can access the archive using anonymous FTP; the Tcl contributed archive is
in the directory "/pub/tcl". The archive also contains several FAQ
("frequently asked questions") documents that provide solutions to problems
that are commonly encountered by TCL newcomers.
of these contributions is kept on the machine ftp://archives.tcl.tk/pub/tcl
(aka ftp://ftp.procplace.com/pub/tcl). You can access the archive using
anonymous FTP. The archive also contains several FAQ ("frequently asked
questions") documents that provide solutions to problems that are commonly
encountered by Tcl newcomers.
7. Tcl Resource Center
----------------------
Visit http://dev.scriptics.com/resource/ to see an annotated index of
Visit http://www.tcl.tk/resource/ to see an annotated index of
many Tcl resources available on the World Wide Web. This includes
papers, books, and FAQs, as well as development tools, extensions,
applications, binary releases, and patches. You can also recommend
@@ -140,62 +145,42 @@ Resource".
8. Mailing lists
----------------
A couple of Mailing List have been set up to discuss Macintosh or
Windows related Tcl issues. To subscribe send a message to:
wintcl-request@tclconsortium.org
mactcl-request@tclconsortium.org
In the body of the message (the subject will be ignored) put:
subscribe mactcl Joe Smith
Replace Joe Smith with your real name, of course. (Use wintcl
instead of mactcl if you're interested in the Windows list.) If you
would just like to receive more information about the list without
subscribing put the line:
Several mailing lists are hosted at SourceForge to discuss development or
use issues (like Macintosh and Windows topics). For more information and
to subscribe, visit:
information mactcl
(or wintcl) in the body instead.
http://sourceforge.net/projects/tcl/
and go to the Mailing Lists page.
9. Support and Training
------------------------
Scriptics is very interested in receiving bug reports, patches, and
suggestions for improvements. We prefer that you send this
information to us via the bug form on the Scriptics Web site, rather
than emailing us directly. The bug form is at:
We are very interested in receiving bug reports, patches, and suggestions
for improvements. We prefer that you send this information to us via the
bug form at SourceForge, rather than emailing us directly. The bug
database is at:
http://dev.scriptics.com/ticket/
http://tcl.sourceforge.net/
The bug form was designed to give uniform structure to bug reports as
well as to solicit enough information to minimize followup questions.
The bug form also includes an option to automatically post your report
on comp.lang.tcl. We strongly recommend that you select this option
because someone else who reads comp.lang.tcl may be able to offer a
solution.
We will log and follow-up on each bug, although we cannot promise a
specific turn-around time. Enhancements may take longer and may not
happen at all unless there is widespread support for them (we're
trying to slow the rate at which Tcl/Tk turns into a kitchen sink).
It's very difficult to make incompatible changes to Tcl/Tk at this
point, due to the size of the installed base.
specific turn-around time. Enhancements may take longer and may not happen
at all unless there is widespread support for them (we're trying to slow
the rate at which Tcl/Tk turns into a kitchen sink). It's very difficult
to make incompatible changes to Tcl/Tk at this point, due to the size of
the installed base.
The Tcl community is too large for us to provide much individual
support for users. If you need help we suggest that you post
questions to comp.lang.tcl. We read the newsgroup and will attempt to
answer esoteric questions for which no-one else is likely to know the
answer. In addition, Tcl/Tk support and training are available
commercially from Scriptics at:
The Tcl community is too large for us to provide much individual support
for users. If you need help we suggest that you post questions to
comp.lang.tcl. We read the newsgroup and will attempt to answer esoteric
questions for which no-one else is likely to know the answer. In addition,
see the following Web site for links to other organizations that offer
Tcl/Tk training:
http://dev.scriptics.com/training
Also see the following Web site for links to other organizations that
offer Tcl/Tk training:
http://www.scriptics.com/resource/community/commercial/training
http://www.tcl.tk/resource/community/commercial/training
10. Thank You
-------------
+284 -1
View File
@@ -1,6 +1,6 @@
Recent user-visible changes to Tcl:
RCS: @(#) $Id: changes,v 1.56 2000/04/26 00:24:19 hobbs Exp $
RCS: @(#) $Id: changes,v 1.56.2.8 2002/10/18 20:33:19 hobbs Exp $
1. No more [command1] [command2] construct for grouping multiple
commands on a single command line.
@@ -4873,3 +4873,286 @@ tclLoadDyld.c dl type. (sanchez)
exec process was running (dejong)
--- Released 8.3.1, April 26, 2000 --- See ChangeLog for details ---
2000-05-29 (bug fix) corrected resource cleanup in http error cases.
Improved handling of error cases in http. (tamhankar)
2000-07 (feature rewrite) complete rewrite of the Tcl IO channel subsystem
to correct problems (hangs, core dumps) with the initial stacked channel
implementation. The new system has many more tests for robustness and
scalability. There are new C APIs (see Tcl_CreateChannel), but only
stacked channel drivers are affected (ie: TLS, Trf, iogt). The iogt
extension has been added to the core test code to test the system.
(hobbs, kupries)
**** POTENTIAL INCOMPATABILITY ****
2000-07 (build improvements) cleanup of the makefiles and configure scripts
to correct support for building under gcc for Windows. (dejong)
2000-08-07 (bug fix) corrected sizeof error in Tcl_GetIndexFromObjStruct.
(perkins)
2000-08-07 (bug fix) correct off-by-one error in HistIndex, which was
causing [history redo] to start its search at the wrong event index. (melski)
2000-08-07 (bug fix) corrected setlocale calls for XIM support and locale
issues in startup. (takahashi)
2000-08-07 (bug fix) correct code to handle locale specific return values
from strftime, if any. (wagner)
2000-08-07 (bug fix) tweaked grammar to properly handle the "ago" keyword
when it follows multiple relative unit specifiers, as in
"2 days 2 hours ago". (melski)
2000-08-07 (doc fixes) numerous doc fixes to correct SEE ALSO and NAME
sections. (english)
2000-08-07 (bug fix) new man pages memory.n, TCL_MEM_DEBUG.3, Init.3 and
DumpActiveMemory.3. (melski)
--- Released 8.3.2, August 9, 2000 --- See ChangeLog for details ---
2000-09-27 (bug fix) fixed a bug introduced by a partial fix in 8.3.2 that
didn't set nonBlocking correctly when resetting the flags for the write
side (mem leak) Correct mem leak in channels when statePtr was released
(hobbs)
2000-09-29 (bug fix) corrected reporting of space parity on Windows (Eason)
2000-10-06 (bug fix) corrected [file channels] to only return channels in
the current interpreter (hobbs)
2000-10-20 (feature enhancement) call stat only when necessary in 'glob' to
speed up command significantly in base cases (hobbs)
2000-11-01 (mem leak) Corrected excessive mem use of info exists on a
non-existent array element (hobbs)
2000-11-02 (bug fix) Corrected sharing of tclLibraryPath in threaded
environment (gravereaux)
2000-11-23 (mem leak) fixed potential memory leak in error case of lsort
(fellows)
2000-12-09 (feature enhancement) changed %o and %x to use strtoul instead
of strtol to correctly preserve scan<>format conversion of large integers
(hobbs)
Fixed handling of {!<boolean>} in expressions (hobbs, fellows)
2000-12-14 (feature enhancement) improved (s)rand for 64-bit platforms
(porter)
2001-01-04 (bug fix) corrected parsing of $tcl_libPath at startup on
Windows (porter)
2001-01-30 (bug fix) Fixed possible hangs in fcopy. (porter)
2001-02-15 (feature enhancement) improved efficiency of [string split]
(fellows)
2001-03-13 (bug fix) Correctly possible memory corruption in string map {}
$str (fellows)
2001-03-29 (bug fix) prevent potential race condition and security leak in
tmp filename creation on Unix. (max)
Fixed handling of timeout for threads (corrects excessive CPU usage issue
for Tk on Unix in threaded Tcl environment). (ruppert)
2001-03-30 (bug fix) corrected Windows memory error on exit (wu)
Fixed race condition in readability of socket on Windows.
2001-04-03 (doc fixes) numerous doc corrections and clarifications.
Update of READMEs.
2001-04-04 (build improvements) redid Mac build structure (steffen)
Corrected IRIX-5* configure (english). Added support for AIX-5 (hobbs).
Added support for Win64 (hobbs).
--- Released 8.3.3, April 6, 2001 --- See ChangeLog for details ---
2001-06-27 (bug fix) corrected backslash substitution of non-ASCII characters.
(hobbs, riefenstahl)
2001-07-02 (bug fix) corrected [concat] treatment of UTF-8 strings (hobbs,
barras)
2001-07-16 (bug fix) corrected thread-enabled pipe closing on Windows
(hobbs, jsmith)
2001-07-18 (bug fix) corrected memory overwrite error when buffer size
of a channel is changed after channel use has already begun (kupries, porter)
2001-08-06 (bug fix) corrected object reference counting in [gets] (jikamens)
2001-08-06 (new feature) added GNU (HURD) configuration target. (brinkmann)
2001-08-07 (bug fix) corrected bytecode stack management during [break]
(see test foreach-5.5) (sofer, tallneil, jstrot)
2001-08-08 (new features) updated packages msgcat 1.1.1, opt 0.4.3,
tcltest 1.0.1, dependencies checked (porter)
2001-08-20 (new feature) http 2.3.2: include port number in Host: header
to comply with HTTP/1.1 spec (RFC 2068) (hobbs, tils)
2001-08-23 (new feature) added QNX-6 build support (loverso)
2001-08-23 (bug fix) corrected handling of spaces in path name passed to
[exec] on Windows (kenpoole)
2001-08-24 (bug fix) corrected [package forget] stopping on non-existent
package (porter)
2001-08-24 (bug fix) corrected construction of script library search path
relative to executable (porter)
2001-08-24 (bug fix) [auto_import] now matches patterns like
[namespace import], not like [string match] (porter)
**** POTENTIAL INCOMPATABILITY ****
2001-08-27 (new feature) added Tcl_SetMainLoop() to enable loading Tk as a
true package (hobbs)
2001-08-30 (bug fix) build support for Crays (andreasen)
2001-09-01 (bug fix) rewrite of Tcl_Async* APIs to better manage thread
cleanup (gravereaux)
2001-09-06 (new feature) http 2.4: honor the Content-encoding and charset
parameters; add -binary switch for forcing the issue (hobbs, saoukhi, orwell)
2001-09-06 (speed improvement) rewrite of file I/O flush management on
Windows. Approximately 100x speedup for some operations. (kupries, traum)
2001-09-10 (bug fix) corrected finalization error in TclInExit (darley)
2001-09-10 (bug fix) protect against alias loops (hobbs)
2001-09-12 (bug fix) added missing #include in tclLoadShl.c (techentin)
2001-09-12 (bug fix) script library path construction on Windows no longer
uses registry, nor adds the current working directory to the path (porter)
2001-09-12 (bug fix) correct bugs in compatibility strtod() (porter)
2001-09-13 (bug fix) Tcl_UtfPrev now returns the proper location when the
middle of a UTF-8 byte is passed in (hobbs)
2001-09-19 (bug fix) [format] and [scan] corrected for 64-bit machines (rmax)
2001-09-19 (new feature) --enable-64-bit support for HP-11. (hobbs)
2001-09-19 (new feature) native memory allocator now default on Windows
(hobbs)
2001-09-20 (new feature) WIN64 support and extra processor definitions
(hobbs, mstacy)
2001-09-26 (bug fix) corrected potential deadlock in channels that do not
provide a BlockModeProc (kupries, kogorman)
2001-10-03 (new feature) WIN64 build support (hobbs)
2001-10-03 (bug fix) correction in thread finalization (rbrunner)
2001-10-04 (new feature) updated encodings with latest mappings from
www.unicode.org (hobbs)
2001-10-11 (bug fix) corrected cleanup of self-referential bytecodes at
interpreter deletion (sofer, rbrunner)
2001-10-16 (new feature) config support for MacOSX / Darwin (steffen)
2001-10-16 (new feature, Mac) change in binary extension format from MachO
bundles to standard .dylib dynamic libraries like on other unices.
**POTENTIAL INCOMPATIBILITY***
2001-10-18 (bug fix) corrected off-by-one-day error in clock scan with
relative months and years during swing hours. (lavana)
--- Released 8.3.4, October 19, 2001 --- See ChangeLog for details ---
2001-11-06 (bug fix)[478856] loss of fileevents due to short reads (kupries)
2001-11-09 (bug fix)[480176] [global] mishandled varnames matching :* (porter)
2001-11-19 (bug fix)[478847] overflows in [time] of >2**31 microseconds (kenny)
2001-11-29 (bug fix)[231259] failure to re-compile after cmd shadowing (sofer)
2001-12-10 (bug fix)[490514] doc fixes (porter,english)
2001-12-21 (new feature) MaxOSX / Darwin support (steffen)
2001-12-28 (bug fix) proper case in [auto_execok] use of $env(COMPSPEC) (hobbs)
2002-01-17 (bug fix)[504642] Tcl_Obj refCounts in [gets] (griffen,kupries)
2002-01-21 (bug fix)[506297] infinite loop writing in iso2022-jap encoding
(forssen,kupries)
2002-01-24 (HTTP server bug workaround)[504508] leave the default port out
of the Host: header value
=> http 2.4.1 (hobbs)
2002-01-25 (new feature)[496733] socket options -eofchar and -translation
return read-only values (dejong)
2002-02-05 (bug fix) [http::error] called when [::error] intended
=> http 2.4.2 (porter)
2002-02-05 (bug fix)[465765] avoid zero-byte writes to STREAMs
(talcott, kupries)
2002-02-06 (bug fix)[495213] [scan] accept 0x as prefix of base 16 value
(hobbs)
2002-02-25 (bug fix)[514392] use Mac OS X 10.1 dyld APIs that
have more libdl-like semantics. (steffen)
2002-02-25 (bug fix)[217982] prevent Tcl on Windows from possible crash when
shutdown from a non-Tcl thread (affected Tkinter).
2002-02-27 (bug fix)[520624] Added code to regonize "/dev/tty" (by name)
and to not handle it as tty / serial line. (kupries)
2002-03-01 (bug fix)[219283, 523988] fixed iso2022 encoding handling of
escape change to match RFC 1468 (hobbs)
2002-03-25 (bug fix) updated build support for HP-UX, IRIX64-6.*, SunOS,
FreeBSD, AIX and Darwin (OS X) targets.
2002-03-28 (bug fix)[219362] passing the correct commandSize to
TclEvalObjvInternal (knoll)
2002-03-29 (bug fix)[536937] corrected potential double-free of traces on
variables (hobbs)
2002-04-11 (bug fix) Enabled COFF as well as CV style debug info with
--enable-symbols on Windows (hobbs)
2002-04-18 (bug fix)[545325] fixed info level to report namespace eval (sofer)
2002-04-26 (bug fix)[548686] corrected interpretation of integers that did
not look like doubles as booleans (fellows)
2002-05-24 (bug fix)[559376] fix for Windows msvcrt mem leak caused by
using an env(TZ) setting trick for in clock format -gmt 1. (hobbs)
2002-06-06 (bug fixes) updated utf and env variable handling for OS X.
(steffen)
2002-07-03 (bug fix)[577033] Fix [tcl_findLibrary] to be sure it sets
$varName only if a successful library script is found. (porter)
2002-07-05 (bug fix) Convert the format string to UTF8 before calling
TclpStrftime (max)
2002-10-10 (bug fix) on Windows, only wait during close on writable pipe if
there was something to write (hobbs)
2002-10-15 (bug fix)[622183] backport of cygwin build support (hobbs,
howell, khan, dejong)
--- Released 8.3.5, October 18, 2002 --- See ChangeLog for details ---
+66 -10
View File
@@ -8,7 +8,9 @@
* source. See the copyright notice below for details on redistribution
* restrictions. The "license.terms" file does not apply to this file.
*
* RCS: @(#) $Id: strftime.c,v 1.7 2000/01/15 01:50:43 hobbs Exp $
* Changes 2002 Copyright (c) 2002 ActiveState Corporation.
*
* RCS: @(#) $Id: strftime.c,v 1.7.2.2 2002/05/24 19:36:28 hobbs Exp $
*/
/*
@@ -45,7 +47,7 @@
*/
#if defined(LIBC_SCCS)
static char *rcsid = "$Id: strftime.c,v 1.7 2000/01/15 01:50:43 hobbs Exp $";
static char *rcsid = "$Id: strftime.c,v 1.7.2.2 2002/05/24 19:36:28 hobbs Exp $";
#endif /* LIBC_SCCS */
#include <time.h>
@@ -69,6 +71,12 @@ typedef struct {
const char *t_fmt_ampm;
} _TimeLocale;
/*
* This is the C locale default. On Windows, if we wanted to make this
* localized, we would use GetLocaleInfo to get the correct values.
* It may be acceptable to do localization of month/day names, as the
* numerical values would be considered the locale-independent versions.
*/
static const _TimeLocale _DefaultTimeLocale =
{
{
@@ -97,6 +105,7 @@ static const _TimeLocale _DefaultTimeLocale =
static const _TimeLocale *_CurrentTimeLocale = &_DefaultTimeLocale;
static int isGMT;
static size_t gsize;
static char *pt;
static int _add _ANSI_ARGS_((const char* str));
@@ -106,11 +115,12 @@ static size_t _fmt _ANSI_ARGS_((const char *format,
const struct tm *t));
size_t
TclpStrftime(s, maxsize, format, t)
TclpStrftime(s, maxsize, format, t, useGMT)
char *s;
size_t maxsize;
const char *format;
const struct tm *t;
int useGMT;
{
if (format[0] == '%' && format[1] == 'Q') {
/* Format as a stardate */
@@ -122,6 +132,11 @@ TclpStrftime(s, maxsize, format, t)
return(strlen(s));
}
isGMT = useGMT;
/*
* We may be able to skip this for useGMT, but it should be harmless.
* -- hobbs
*/
tzset();
pt = s;
@@ -144,6 +159,20 @@ _fmt(format, t)
const char *format;
const struct tm *t;
{
#ifdef WIN32
#define BUF_SIZ 256
TCHAR buf[BUF_SIZ];
SYSTEMTIME syst = {
t->tm_year + 1900,
t->tm_mon + 1,
t->tm_wday,
t->tm_mday,
t->tm_hour,
t->tm_min,
t->tm_sec,
0,
};
#endif
for (; *format; ++format) {
if (*format == '%') {
++format;
@@ -188,10 +217,6 @@ _fmt(format, t)
2, '0'))
return(0);
continue;
case 'c':
if (!_fmt(_CurrentTimeLocale->d_t_fmt, t))
return(0);
continue;
case 'D':
if (!_fmt("%m/%d/%y", t))
return(0);
@@ -307,6 +332,38 @@ _fmt(format, t)
if (!_conv(t->tm_wday, 1, '0'))
return(0);
continue;
#ifdef WIN32
/*
* To properly handle the localized time routines on Windows,
* we must make use of the special localized calls.
*/
case 'c':
if (!GetDateFormat(LOCALE_USER_DEFAULT, DATE_LONGDATE,
&syst, NULL, buf, BUF_SIZ) || !_add(buf)
|| !_add(" ")) {
return(0);
}
/*
* %c is created with LONGDATE + " " + TIME on Windows,
* so continue to %X case here.
*/
case 'X':
if (!GetTimeFormat(LOCALE_USER_DEFAULT, 0,
&syst, NULL, buf, BUF_SIZ) || !_add(buf)) {
return(0);
}
continue;
case 'x':
if (!GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE,
&syst, NULL, buf, BUF_SIZ) || !_add(buf)) {
return(0);
}
continue;
#else
case 'c':
if (!_fmt(_CurrentTimeLocale->d_t_fmt, t))
return(0);
continue;
case 'x':
if (!_fmt(_CurrentTimeLocale->d_fmt, t))
return(0);
@@ -315,6 +372,7 @@ _fmt(format, t)
if (!_fmt(_CurrentTimeLocale->t_fmt, t))
return(0);
continue;
#endif
case 'y':
if (!_conv((t->tm_year + TM_YEAR_BASE) % 100,
2, '0'))
@@ -324,15 +382,13 @@ _fmt(format, t)
if (!_conv((t->tm_year + TM_YEAR_BASE), 4, '0'))
return(0);
continue;
#ifndef MAC_TCL
case 'Z': {
char *name = TclpGetTZName(t->tm_isdst);
char *name = (isGMT ? "GMT" : TclpGetTZName(t->tm_isdst));
if (name && !_add(name)) {
return 0;
}
continue;
}
#endif
case '%':
/*
* X311J/88-090 (4.12.3.5): if conversion char is
+4 -3
View File
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* RCS: @(#) $Id: string.h,v 1.3 1999/04/16 00:46:30 stanton Exp $
* RCS: @(#) $Id: string.h,v 1.3.12.1 2001/04/03 22:54:36 hobbs Exp $
*/
#ifndef _STRING
@@ -59,12 +59,13 @@ extern int strncmp _ANSI_ARGS_((CONST char *s1, CONST char *s2,
size_t nChars));
extern char * strncpy _ANSI_ARGS_((char *dst, CONST char *src,
size_t numChars));
extern char * strpbrk _ANSI_ARGS_((CONST char *string, char *chars));
extern char * strpbrk _ANSI_ARGS_((CONST char *string,
CONST char *chars));
extern char * strrchr _ANSI_ARGS_((CONST char *string, int c));
extern size_t strspn _ANSI_ARGS_((CONST char *string,
CONST char *chars));
extern char * strstr _ANSI_ARGS_((CONST char *string,
CONST char *substring));
extern char * strtok _ANSI_ARGS_((CONST char *s, CONST char *delim));
extern char * strtok _ANSI_ARGS_((char *s, CONST char *delim));
#endif /* _STRING */
+7 -1
View File
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* RCS: @(#) $Id: strtod.c,v 1.2 1998/09/14 18:39:45 stanton Exp $
* RCS: @(#) $Id: strtod.c,v 1.2.18.1 2001/09/12 21:26:36 dgp Exp $
*/
#include "tcl.h"
@@ -19,6 +19,7 @@
# include <stdlib.h>
#endif
#include <ctype.h>
#include "tclPort.h"
#ifndef TRUE
#define TRUE 1
@@ -206,6 +207,10 @@ strtod(string, endPtr)
}
expSign = FALSE;
}
if (!isdigit(*p)) {
p = pExp;
goto done;
}
while (isdigit(*p)) {
exp = exp * 10 + (*p - '0');
p += 1;
@@ -232,6 +237,7 @@ strtod(string, endPtr)
}
if (exp > maxExponent) {
exp = maxExponent;
errno = ERANGE;
}
dblExp = 1.0;
for (d = powersOf10; exp != 0; exp >>= 1, d += 1) {
+2 -2
View File
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: Access.3,v 1.3 1999/05/06 19:14:39 stanton Exp $
'\" RCS: @(#) $Id: Access.3,v 1.3.12.1 2001/12/10 16:01:42 dgp Exp $
'\"
.so man.macros
.TH Tcl_Access 3 8.1 Tcl "Tcl Library Procedures"
@@ -68,4 +68,4 @@ is filled with data. Otherwise, -1 is returned, and no stat info is
given.
.SH KEYWORDS
stat access
stat, access
+6 -6
View File
@@ -5,13 +5,13 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: AddErrInfo.3,v 1.4 2000/04/26 17:00:43 ericm Exp $
'\" RCS: @(#) $Id: AddErrInfo.3,v 1.4.2.1 2000/08/07 21:29:36 hobbs Exp $
'\"
.so man.macros
.TH Tcl_AddErrorInfo 3 8.0 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_AddObjErrorInfo, Tcl_AddErrorInfo, Tcl_SetErrorCode, Tcl_SetErrorCodeVA, Tcl_PosixError, Tcl_LogCommandInfo \- record information about errors
Tcl_AddObjErrorInfo, Tcl_AddErrorInfo, Tcl_SetObjErrorCode, Tcl_SetErrorCode, Tcl_SetErrorCodeVA, Tcl_PosixError, Tcl_LogCommandInfo \- record information about errors
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
@@ -82,8 +82,8 @@ formats for \fBerrorCode\fR.
.PP
The \fBerrorInfo\fR variable is gradually built up as an
error unwinds through the nested operations.
Each time an error code is returned to \fBTcl_EvalObj\fR
(or \fBTcl_Eval\fR, which calls \fBTcl_EvalObj\fR)
Each time an error code is returned to \fBTcl_EvalObjEx\fR
(or \fBTcl_Eval\fR, which calls \fBTcl_EvalObjEx\fR)
it calls the procedure \fBTcl_AddObjErrorInfo\fR to add
additional text to \fBerrorInfo\fR describing the
command that was being executed when the error occurred.
@@ -93,7 +93,7 @@ of the activity in progress when the error occurred.
.PP
It is sometimes useful to add additional information to
\fBerrorInfo\fR beyond what can be supplied automatically
by \fBTcl_EvalObj\fR.
by \fBTcl_EvalObjEx\fR.
\fBTcl_AddObjErrorInfo\fR may be used for this purpose:
its \fImessage\fR and \fIlength\fR arguments describe an additional
string to be appended to \fBerrorInfo\fR.
@@ -103,7 +103,7 @@ line number on which the error occurred;
for Tcl procedures, the procedure name and line number
within the procedure are recorded, and so on.
The best time to call \fBTcl_AddObjErrorInfo\fR is just after
\fBTcl_EvalObj\fR has returned \fBTCL_ERROR\fR.
\fBTcl_EvalObjEx\fR has returned \fBTCL_ERROR\fR.
In calling \fBTcl_AddObjErrorInfo\fR, you may find it useful to
use the \fBerrorLine\fR field of the interpreter (see the
\fBTcl_Interp\fR manual entry for details).
+8 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: Async.3,v 1.4 2000/04/14 23:01:48 hobbs Exp $
'\" RCS: @(#) $Id: Async.3,v 1.4.2.1 2001/09/01 22:53:45 davygrvy Exp $
'\"
.so man.macros
.TH Tcl_AsyncCreate 3 7.0 Tcl "Tcl Library Procedures"
@@ -60,6 +60,13 @@ The only safe approach is to set a flag indicating that the event
occurred, then handle the event later when the world has returned
to a clean state, such as after the current Tcl command completes.
.PP
\fBTcl_AsyncCreate\fR, \fBTcl_AsyncDelete\fR, and \fBTcl_AsyncReady\fR
are thread sensitive. They access and/or set a thread-specific data
structure in the event of an --enable-thread built core. The token
created by Tcl_AsyncCreate contains the needed thread information it
was called from so that calling Tcl_AsyncMark(token) will only yield
the origin thread into the AsyncProc.
.PP
\fBTcl_AsyncCreate\fR creates an asynchronous handler and returns
a token for it.
The asynchronous handler must be created before
+39 -51
View File
@@ -1,16 +1,16 @@
'\"
'\" Copyright (c) 1999 Scriptics Corporation
'\" Copyright (c) 1999-2000 Ajuba Solutions.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: ChnlStack.3,v 1.1 1999/07/02 19:51:14 welch Exp $
'\" RCS: @(#) $Id: ChnlStack.3,v 1.1.10.2 2000/08/08 00:57:52 hobbs Exp $
.so man.macros
.TH Tcl_StackChannel 3 8.2 Tcl "Tcl Library Procedures"
.TH Tcl_StackChannel 3 8.3 Tcl "Tcl Library Procedures"
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
Tcl_StackChannel, Tcl_UnstackChannel \- stack an I/O channel on top of another, and undo it
Tcl_StackChannel, Tcl_UnstackChannel, Tcl_GetStackedChannel \- stack an I/O channel on top of another, and undo it
.SH SYNOPSIS
.nf
.nf
@@ -19,7 +19,7 @@ Tcl_StackChannel, Tcl_UnstackChannel \- stack an I/O channel on top of another,
Tcl_Channel
\fBTcl_StackChannel\fR(\fIinterp, typePtr, clientData, mask, channel\fR)
.sp
void
int
\fBTcl_UnstackChannel\fR(\fIinterp, channel\fR)
.sp
Tcl_Channel
@@ -43,57 +43,45 @@ An existing Tcl channel such as returned by \fBTcl_CreateChannel\fR.
.SH DESCRIPTION
.PP
These functions are for use by extensions that add processing
layers to Tcl I/O channels. Examples include compression
and encryption modules. These functions transparently stack and unstack
a new channel on top of an existing one.
Any number of channels can be stacked together.
These functions are for use by extensions that add processing layers to Tcl
I/O channels. Examples include compression and encryption modules. These
functions transparently stack and unstack a new channel on top of an
existing one. Any number of channels can be stacked together.
.PP
\fBTcl_StackChannel\fR
replaces an existing \fIchannel\fP with a new channel by
the same name that was registered for \fIchannel\fP
with \fBTcl_RegisterChannel\fP.
The implementation of the Tcl channel code was rewritten in 8.3.2 to
correct some problems with the previous implementation with regard to
stacked channels. Anyone using stacked channels or creating stacked
channel drivers should update to the new \fBTCL_CHANNEL_VERSION_2\fR
\fBTcl_ChannelType\fR structure. See \fBTcl_CreateChannel\fR for details.
.PP
\fBTcl_StackChannel\fR
works by creating a new channel structure under the existing
\fIchannel\fP and pushing the existing channel functions
down to the newly created channel.
The hidden channel does no buffering, newline translations,
or character set encoding.
Instead,
the buffering, newline translations, and
encoding functions all remain at the top of the channel stack.
The top-most channel gets changed to use the
I/O channel functions
defined in \fItypePtr\fP, and the channel functions are passed
the new \fIclientData\fP.
The existing \fIchannel\fP structure is modified in place,
so C applications that continue to use \fIchannel\fP will
also see the effects of the new processing module.
A pointer to a new channel structure is returned,
although this new data structure is the one that has been
pushed down below the top of the channel module stack.
(This pointer can also be obtained with the
\fBTcl_GetStackedChannel\fP call.)
If an error occurs when stacking the channel,
NULL is returned instead.
\fBTcl_StackChannel\fR stacks a new \fIchannel\fP on an existing channel
with the same name that was registered for \fIchannel\fP by
\fBTcl_RegisterChannel\fP.
.PP
The \fImask\fP parameter specifies the operations that
are allowed on the new channel.
These can be a subset of the operations allowed on the original channel.
For example, a read-write channel may become
read-only after the \fBTcl_StackChannel\fR call.
\fBTcl_StackChannel\fR works by creating a new channel structure and
placing itself on top of the channel stack. EOL translation, encoding and
buffering options are shared between all channels in the stack. The hidden
channel does no buffering, newline translations, or character set encoding.
Instead, the buffering, newline translations, and encoding functions all
remain at the top of the channel stack. A pointer to the new top channel
structure is returned. If an error occurs when stacking the channel, NULL
is returned instead.
.PP
Closing a channel closes the channels stacked below it.
The close of stacked channels is executed in a way that
allows buffered data to be properly flushed.
The \fImask\fP parameter specifies the operations that are allowed on the
new channel. These can be a subset of the operations allowed on the
original channel. For example, a read-write channel may become read-only
after the \fBTcl_StackChannel\fR call.
.PP
\fBTcl_UnstackChannel\fP reverses the process.
The old channel is associated with the channel name,
and the processing module added by
\fBTcl_StackChannel\fR is destroyed.
If there is no old channel, then \fBTcl_UnstackChannel\fP
is equivalent to \fBTcl_Close\fP .
Closing a channel closes the channels stacked below it. The close of
stacked channels is executed in a way that allows buffered data to be
properly flushed.
.PP
\fBTcl_UnstackChannel\fP reverses the process. The old channel is
associated with the channel name, and the processing module added by
\fBTcl_StackChannel\fR is destroyed. If there is no old channel, then
\fBTcl_UnstackChannel\fP is equivalent to \fBTcl_Close\fP. If an error
occurs unstacking the channel, \fBTCL_ERROR\fR is returned, otherwise
\fBTCL_OK\fR is returned.
.SH "SEE ALSO"
Notifier(3), Tcl_CreateChannel(3), Tcl_OpenFileChannel(3), vwait(n).
+208 -40
View File
@@ -1,16 +1,17 @@
'\"
'\" Copyright (c) 1996-1997 Sun Microsystems, Inc.
'\" Copyright (c) 1997-2000 Ajuba Solutions.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: CrtChannel.3,v 1.5 2000/04/14 23:01:49 hobbs Exp $
'\" RCS: @(#) $Id: CrtChannel.3,v 1.5.2.2 2001/04/03 22:06:43 hobbs Exp $
.so man.macros
.TH Tcl_CreateChannel 3 8.0 Tcl "Tcl Library Procedures"
.TH Tcl_CreateChannel 3 8.3 Tcl "Tcl Library Procedures"
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
Tcl_CreateChannel, Tcl_GetChannelInstanceData, Tcl_GetChannelType, Tcl_GetChannelName, Tcl_GetChannelHandle, Tcl_GetChannelMode, Tcl_GetChannelBufferSize, Tcl_SetChannelBufferSize, Tcl_NotifyChannel, Tcl_BadChannelOption \- procedures for creating and manipulating channels
Tcl_CreateChannel, Tcl_GetChannelInstanceData, Tcl_GetChannelType, Tcl_GetChannelName, Tcl_GetChannelHandle, Tcl_GetChannelMode, Tcl_GetChannelBufferSize, Tcl_SetChannelBufferSize, Tcl_NotifyChannel, Tcl_BadChannelOption, Tcl_ChannelName, Tcl_ChannelVersion, Tcl_ChannelBlockModeProc, Tcl_ChannelCloseProc, Tcl_ChannelClose2Proc, Tcl_ChannelInputProc, Tcl_ChannelOutputProc, Tcl_ChannelSeekProc, Tcl_ChannelSetOptionProc, Tcl_ChannelGetOptionProc, Tcl_ChannelWatchProc, Tcl_ChannelGetHandleProc, Tcl_ChannelFlushProc, Tcl_ChannelHandlerProc, \- procedures for creating and manipulating channels
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
@@ -26,22 +27,62 @@ Tcl_ChannelType *
.sp
char *
\fBTcl_GetChannelName\fR(\fIchannel\fR)
.VS
.sp
int
\fBTcl_GetChannelHandle\fR(\fIchannel, direction, handlePtr\fR)
.VE
.sp
int
\fBTcl_GetChannelBufferSize\fR(\fIchannel\fR)
.sp
\fBTcl_SetChannelBufferSize\fR(\fIchannel, size\fR)
.sp
.VS
\fBTcl_NotifyChannel\fR(\fIchannel, mask\fR)
.sp
int
\fBTcl_BadChannelOption\fR(\fIinterp, optionName, optionList\fR)
.VS 8.3.2
.sp
char *
\fBTcl_ChannelName\fR(\fItypePtr\fR)
.sp
Tcl_ChannelTypeVersion
\fBTcl_ChannelVersion\fR(\fItypePtr\fR)
.sp
Tcl_DriverBlockModeProc *
\fBTcl_ChannelBlockModeProc\fR(\fItypePtr\fR)
.sp
Tcl_DriverCloseProc *
\fBTcl_ChannelCloseProc\fR(\fItypePtr\fR)
.sp
Tcl_DriverClose2Proc *
\fBTcl_ChannelClose2Proc\fR(\fItypePtr\fR)
.sp
Tcl_DriverInputProc *
\fBTcl_ChannelInputProc\fR(\fItypePtr\fR)
.sp
Tcl_DriverOutputProc *
\fBTcl_ChannelOutputProc\fR(\fItypePtr\fR)
.sp
Tcl_DriverSeekProc *
\fBTcl_ChannelSeekProc\fR(\fItypePtr\fR)
.sp
Tcl_DriverSetOptionProc *
\fBTcl_ChannelSetOptionProc\fR(\fItypePtr\fR)
.sp
Tcl_DriverGetOptionProc *
\fBTcl_ChannelGetOptionProc\fR(\fItypePtr\fR)
.sp
Tcl_DriverWatchProc *
\fBTcl_ChannelWatchProc\fR(\fItypePtr\fR)
.sp
Tcl_DriverGetHandleProc *
\fBTcl_ChannelGetHandleProc\fR(\fItypePtr\fR)
.sp
Tcl_DriverFlushProc *
\fBTcl_ChannelFlushProc\fR(\fItypePtr\fR)
.sp
Tcl_DriverHandlerProc *
\fBTcl_ChannelHandlerProc\fR(\fItypePtr\fR)
.VE
.sp
.SH ARGUMENTS
@@ -61,20 +102,17 @@ OR-ed combination of \fBTCL_READABLE\fR and \fBTCL_WRITABLE\fR to indicate
whether a channel is readable and writable.
.AP Tcl_Channel channel in
The channel to operate on.
.VS
.AP int direction in
\fBTCL_READABLE\fR means the input handle is wanted; \fBTCL_WRITABLE\fR
means the output handle is wanted.
.AP ClientData *handlePtr out
Points to the location where the desired OS-specific handle should be
stored.
.VE
.AP Tcl_EolTranslation transMode in
The translation mode; one of the constants \fBTCL_TRANSLATE_AUTO\fR,
\fBTCL_TRANSLATE_CR\fR, \fBTCL_TRANSLATE_LF\fR and \fBTCL_TRANSLATE_CRLF\fR.
.AP int size in
The size, in bytes, of buffers to allocate in this channel.
.VS
.AP int mask in
An OR-ed combination of \fBTCL_READABLE\fR, \fBTCL_WRITABLE\fR
and \fBTCL_EXCEPTION\fR that indicates events that have occurred on
@@ -87,7 +125,6 @@ Name of the invalid option.
Specific options list (space separated words, without "-")
to append to the standard generic options list.
Can be NULL for generic options error message only.
.VE
.BE
@@ -151,7 +188,6 @@ the same as the \fItypePtr\fR argument in the call to
with the channel, or NULL if the \fIchannelName\fR argument to
\fBTcl_CreateChannel\fR was NULL.
.PP
.VS
\fBTcl_GetChannelHandle\fR places the OS-specific device handle
associated with \fIchannel\fR for the given \fIdirection\fR in the
location specified by \fIhandlePtr\fR and returns \fBTCL_OK\fR. If
@@ -159,7 +195,6 @@ the channel does not have a device handle for the specified direction,
then \fBTCL_ERROR\fR is returned instead. Different channel drivers
will return different types of handle. Refer to the manual entries
for each driver to determine what type of handle is returned.
.VE
.PP
\fBTcl_GetChannelMode\fR returns an OR-ed combination of \fBTCL_READABLE\fR
and \fBTCL_WRITABLE\fR, indicating whether the channel is open for input
@@ -177,31 +212,29 @@ allowing buffers of ten bytes to one million bytes. If \fIsize\fR is
outside this range, \fBTcl_SetChannelBufferSize\fR sets the buffer size to
4096.
.PP
.VS
\fBTcl_NotifyChannel\fR is called by a channel driver to indicate to
the generic layer that the events specified by \fImask\fR have
occurred on the channel. Channel drivers are responsible for invoking
this function whenever the channel handlers need to be called for the
channel. See \fBWATCHPROC\fR below for more details.
.VE
.PP
.VS
\fBTcl_BadChannelOption\fR is called from driver specific set or get option
procs to generate a complete error message.
.VE
.SH TCL_CHANNELTYPE
.PP
A channel driver provides a \fBTcl_ChannelType\fR structure that contains
pointers to functions that implement the various operations on a channel;
these operations are invoked as needed by the generic layer. The
\fBTcl_ChannelType\fR structure contains the following fields:
these operations are invoked as needed by the generic layer. The structure
was versioned starting in Tcl 8.3.2/8.4 to correct a problem with stacked
channel drivers. See the \fBOLD_CHANNEL\fR section below for details about
the old structure.
.PP
.VS
The \fBTcl_ChannelType\fR structure contains the following fields:
.CS
typedef struct Tcl_ChannelType {
char *\fItypeName\fR;
Tcl_DriverBlockModeProc *\fIblockModeProc\fR;
Tcl_ChannelTypeVersion \fIversion\fR;
Tcl_DriverCloseProc *\fIcloseProc\fR;
Tcl_DriverInputProc *\fIinputProc\fR;
Tcl_DriverOutputProc *\fIoutputProc\fR;
@@ -211,24 +244,62 @@ typedef struct Tcl_ChannelType {
Tcl_DriverWatchProc *\fIwatchProc\fR;
Tcl_DriverGetHandleProc *\fIgetHandleProc\fR;
Tcl_DriverClose2Proc *\fIclose2Proc\fR;
Tcl_DriverBlockModeProc *\fIblockModeProc\fR;
Tcl_DriverFlushProc *\fIflushProc\fR;
Tcl_DriverHandlerProc *\fIhandlerProc\fR;
} Tcl_ChannelType;
.CE
.VE
.PP
The driver must provide implementations for all functions except
\fIblockModeProc\fR, \fIseekProc\fR, \fIsetOptionProc\fR,
.VS
\fIgetOptionProc\fR, and \fIclose2Proc\fR, which may be specified as
.VE
NULL. Other functions that can not be implemented for this type of
device should return \fBEINVAL\fR when invoked to indicate that they
are not implemented.
are not implemented, except in the case of \fIflushProc\fR and
\fIhandlerProc\fR, which should specified as NULL if not otherwise defined.
.PP
.VS 8.3.2
The user should only use the above structure for \fBTcl_ChannelType\fR
instantiation. When referencing fields in a \fBTcl_ChannelType\fR
structure, the following functions should be used to obtain the values:
\fBTcl_ChannelName\fR, \fBTcl_ChannelVersion\fR,
\fBTcl_ChannelBlockModeProc\fR, \fBTcl_ChannelCloseProc\fR,
\fBTcl_ChannelClose2Proc\fR, \fBTcl_ChannelInputProc\fR,
\fBTcl_ChannelOutputProc\fR, \fBTcl_ChannelSeekProc\fR,
\fBTcl_ChannelSetOptionProc\fR, \fBTcl_ChannelGetOptionProc\fR,
\fBTcl_ChannelWatchProc\fR, \fBTcl_ChannelGetHandleProc\fR,
\fBTcl_ChannelFlushProc\fR, or \fBTcl_ChannelHandlerProc\fR.
.PP
The change to the structures was made in such a way that standard channel
types are binary compatible. However, channel types that use stacked
channels (ie: TLS, Trf) have new versions to correspond to the above change
since the previous code for stacked channels had problems.
.VE
.SH TYPENAME
.PP
The \fItypeName\fR field contains a null-terminated string that
identifies the type of the device implemented by this driver, e.g.
\fBfile\fR or \fBsocket\fR.
.PP
.VS 8.3.2
This value can be retrieved with \fBTcl_ChannelName\fR, which returns
a pointer to the string.
.VE
.VS 8.3.2
.SH VERSION
.PP
The \fIversion\fR field should be set to \fBTCL_CHANNEL_VERSION_2\fR.
If it is not set to this value \fBTCL_CHANNEL_VERSION_2\fR, then this
\fBTcl_ChannelType\fR is assumed to have the older structure. See
\fBOLD_CHANNEL\fR for more details. While Tcl will recognize and
function with either structure, stacked channels must be of the newer
style to function correctly.
.PP
This value can be retrieved with \fBTcl_ChannelVersion\fR, which returns
either \fBTCL_CHANNEL_VERSION_2\fR or \fBTCL_CHANNEL_VERSION_1\fR.
.VE
.SH BLOCKMODEPROC
.PP
@@ -255,6 +326,11 @@ nonblocking mode and to implement the blocking or nonblocking behavior.
For some device types, the blocking and nonblocking behavior can be
implemented by the underlying operating system; for other device types, the
behavior must be emulated in the channel driver.
.PP
.VS 8.3.2
This value can be retrieved with \fBTcl_ChannelBlockModeProc\fR, which returns
a pointer to the function.
.VE
.SH "CLOSEPROC AND CLOSE2PROC"
.PP
@@ -279,7 +355,6 @@ procedure should return zero; otherwise it should return a nonzero POSIX
error code. In addition, if an error occurs and \fIinterp\fR is not NULL,
the procedure should store an error message in the interpreter's result.
.PP
.VS
Alternatively, channels that support closing the read and write sides
independently may set \fIcloseProc\fR to \fBTCL_CLOSE2PROC\fR and set
\fIclose2Proc\fR to the address of a function that matches the
@@ -306,6 +381,11 @@ return zero if the close operation was successful; otherwise it should
return a nonzero POSIX error code. In addition, if an error occurs and
\fIinterp\fR is not NULL, the procedure should store an error message
in the interpreter's result.
.PP
.VS 8.3.2
These value can be retrieved with \fBTcl_ChannelCloseProc\fR or
\fBTcl_ChannelClose2Proc\fR, which returns a pointer to the respective
function.
.VE
.SH INPUTPROC
@@ -349,6 +429,11 @@ whatsoever and the channel is in blocking mode, the function should block
for the shortest possible time until at least one byte of data can be read
from the device; then, it should return as much data as it can read without
blocking.
.PP
.VS 8.3.2
This value can be retrieved with \fBTcl_ChannelInputProc\fR, which returns
a pointer to the function.
.VE
.SH OUTPUTPROC
.PP
@@ -385,6 +470,11 @@ error, some data may have been written to the device.
If the channel is nonblocking and the output device is unable to absorb any
data whatsoever, the function should return -1 with an \fBEAGAIN\fR error
without writing any data.
.PP
.VS 8.3.2
This value can be retrieved with \fBTcl_ChannelOutputProc\fR, which returns
a pointer to the function.
.VE
.SH SEEKPROC
.PP
@@ -414,6 +504,11 @@ does not implement seeking.
.PP
The return value is the new access point or -1 in case of error. If an
error occurred, the function should not move the access point.
.PP
.VS 8.3.2
This value can be retrieved with \fBTcl_ChannelSeekProc\fR, which returns
a pointer to the function.
.VE
.SH SETOPTIONPROC
.PP
@@ -444,17 +539,20 @@ options.
.PP
If the option value is successfully modified to the new value, the function
returns \fBTCL_OK\fR.
.VS
It should call \fBTcl_BadChannelOption\fR which itself returns
\fBTCL_ERROR\fR if the \fIoptionName\fR is
unrecognized.
.VE
If \fIoptionValue\fR specifies a value for the option that
is not supported or if a system call error occurs,
the function should leave an error message in the
\fIresult\fR field of \fIinterp\fR if \fIinterp\fR is not NULL. The
function should also call \fBTcl_SetErrno\fR to store an appropriate POSIX
error code.
.PP
.VS 8.3.2
This value can be retrieved with \fBTcl_ChannelSetOptionProc\fR, which returns
a pointer to the function.
.VE
.SH GETOPTIONPROC
.PP
@@ -465,9 +563,7 @@ channel. \fIgetOptionProc\fR must match the following prototype:
.CS
typedef int Tcl_DriverGetOptionProc(
ClientData \fIinstanceData\fR,
.VS
Tcl_Interp *\fIinterp\fR,
.VE
char *\fIoptionName\fR,
Tcl_DString *\fIdsPtr\fR);
.CE
@@ -478,7 +574,6 @@ value, as a string, in the Tcl dynamic string \fIdsPtr\fR.
If \fIoptionName\fR is NULL, the function stores in \fIdsPtr\fR an
alternating list of all supported options and their current values.
On success, the function returns \fBTCL_OK\fR.
.VS
It should call \fBTcl_BadChannelOption\fR which itself returns
\fBTCL_ERROR\fR if the \fIoptionName\fR is
unrecognized. If a system call error occurs,
@@ -486,7 +581,6 @@ the function should leave an error message in the
\fIresult\fR field of \fIinterp\fR if \fIinterp\fR is not NULL. The
function should also call \fBTcl_SetErrno\fR to store an appropriate POSIX
error code.
.VE
.PP
Some options are handled by the generic code and this function is never
called to retrieve their value, e.g. \fB-blockmode\fR. Other options are
@@ -494,9 +588,13 @@ specific to each channel type and the \fIgetOptionProc\fR procedure of the
channel driver will get called to implement them. The \fIgetOptionProc\fR
field can be NULL, which indicates that this channel type supports no type
specific options.
.PP
.VS 8.3.2
This value can be retrieved with \fBTcl_ChannelGetOptionProc\fR, which returns
a pointer to the function.
.VE
.SH WATCHPROC
.VS
.PP
The \fIwatchProc\fR field contains the address of a function called
by the generic layer to initialize the event notification mechanism to
@@ -508,7 +606,6 @@ typedef void Tcl_DriverWatchProc(
ClientData \fIinstanceData\fR,
int \fImask\fR);
.CE
.VE
.PP
The \fIinstanceData\fR is the same as the value passed to
\fBTcl_CreateChannel\fR when this channel was created. The \fImask\fR
@@ -516,7 +613,6 @@ argument is an OR-ed combination of \fBTCL_READABLE\fR, \fBTCL_WRITABLE\fR
and \fBTCL_EXCEPTION\fR; it indicates events the caller is interested in
noticing on this channel.
.PP
.VS
The function should initialize device type specific mechanisms to
notice when an event of interest is present on the channel. When one
or more of the designated events occurs on the channel, the channel
@@ -527,6 +623,11 @@ Tcl_NotifyChannel too frequently. Fairness can be insured by using
the Tcl event queue to allow the channel event to be scheduled in sequence
with other events. See the description of \fBTcl_QueueEvent\fR for
details on how to queue an event.
.PP
.VS 8.3.2
This value can be retrieved with \fBTcl_ChannelWatchProc\fR, which returns
a pointer to the function.
.VE
.SH GETHANDLEPROC
.PP
@@ -541,7 +642,7 @@ typedef int Tcl_DriverGetHandleProc(
ClientData *\fIhandlePtr\fR);
.CE
.PP
\fIInstanceData is the same as the value passed to
\fIInstanceData\fR is the same as the value passed to
\fBTcl_CreateChannel\fR when this channel was created. The \fIdirection\fR
argument is either \fBTCL_READABLE\fR to retrieve the handle used
for input, or \fBTCL_WRITABLE\fR to retrieve the handle used for
@@ -554,9 +655,50 @@ stored in the location referred to by \fIhandlePtr\fR, and
\fBTCL_OK\fR should be returned. If the channel is not open for the
specified direction, or if the channel implementation does not use
device handles, the function should return \fBTCL_ERROR\fR.
.PP
.VS 8.3.2
This value can be retrieved with \fBTcl_ChannelGetHandleProc\fR, which returns
a pointer to the function.
.VE
.VS 8.3.2
.SH FLUSHPROC
.PP
The \fIflushProc\fR field is currently reserved for future use.
It should be set to NULL.
\fIFlushProc\fR should match the following prototype:
.PP
.CS
typedef int Tcl_DriverFlushProc(
ClientData \fIinstanceData\fR);
.CE
.PP
This value can be retrieved with \fBTcl_ChannelFlushProc\fR, which returns
a pointer to the function.
.SH HANDLERPROC
.PP
The \fIhandlerProc\fR field contains the address of a function called by
the generic layer to notify the channel that an event occured. It should
be defined for stacked channel drivers that wish to be notified of events
that occur on the underlying (stacked) channel.
\fIHandlerProc\fR should match the following prototype:
.PP
.CS
typedef int Tcl_DriverHandlerProc(
ClientData \fIinstanceData\fR,
int \fIinterestMask\fR);
.CE
.PP
\fIInstanceData\fR is the same as the value passed to \fBTcl_CreateChannel\fR
when this channel was created. The \fIinterestMask\fR is an OR-ed
combination of \fBTCL_READABLE\fR or \fBTCL_WRITABLE\fR; it indicates what
type of event occured on this channel.
.PP
This value can be retrieved with \fBTcl_ChannelHandlerProc\fR, which returns
a pointer to the function.
.VE
.VS
.SH TCL_BADCHANNELOPTION
.PP
This procedure generates a "bad option" error message in an
@@ -579,14 +721,40 @@ so you get for instance:
-peername, or -sockname
when called with optionList="peername sockname"
.CE
"blah" is the optionName argument and "<specific options>"
``blah'' is the optionName argument and ``<specific options>''
is a space separated list of specific option words.
The function takes good care of inserting minus signs before
each option, commas after, and an "or" before the last option.
.VE
each option, commas after, and an ``or'' before the last option.
.SH OLD_CHANNEL
The original (8.3.1 and below) \fBTcl_ChannelType\fR structure contains
the following fields:
.PP
.CS
typedef struct Tcl_ChannelType {
char *\fItypeName\fR;
Tcl_DriverBlockModeProc *\fIblockModeProc\fR;
Tcl_DriverCloseProc *\fIcloseProc\fR;
Tcl_DriverInputProc *\fIinputProc\fR;
Tcl_DriverOutputProc *\fIoutputProc\fR;
Tcl_DriverSeekProc *\fIseekProc\fR;
Tcl_DriverSetOptionProc *\fIsetOptionProc\fR;
Tcl_DriverGetOptionProc *\fIgetOptionProc\fR;
Tcl_DriverWatchProc *\fIwatchProc\fR;
Tcl_DriverGetHandleProc *\fIgetHandleProc\fR;
Tcl_DriverClose2Proc *\fIclose2Proc\fR;
} Tcl_ChannelType;
.CE
.PP
It is still possible to create channel with the above structure. The
internal channel code will determine the version. It is imperative to use
the new \fBTcl_ChannelType\fR structure if you are creating a stacked
channel driver, due to problems with the earlier stacked channel
implementation (in 8.2.0 to 8.3.1).
.SH "SEE ALSO"
Tcl_Close(3), Tcl_OpenFileChannel(3), Tcl_SetErrno(3), Tcl_QueueEvent(3)
Tcl_Close(3), Tcl_OpenFileChannel(3), Tcl_SetErrno(3), Tcl_QueueEvent(3), Tcl_StackChannel(3)
.SH KEYWORDS
blocking, channel driver, channel registration, channel type, nonblocking
+3 -4
View File
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: CrtObjCmd.3,v 1.3 1999/04/16 00:46:30 stanton Exp $
'\" RCS: @(#) $Id: CrtObjCmd.3,v 1.3.12.1 2000/08/07 21:29:37 hobbs Exp $
'\"
.so man.macros
.TH Tcl_CreateObjCommand 3 8.0 Tcl "Tcl Library Procedures"
@@ -59,7 +59,7 @@ Tcl command.
\fBTcl_CreateObjCommand\fR defines a new command in \fIinterp\fR
and associates it with procedure \fIproc\fR
such that whenever \fIname\fR is
invoked as a Tcl command (e.g., via a call to \fBTcl_EvalObj\fR)
invoked as a Tcl command (e.g., via a call to \fBTcl_EvalObjEx\fR)
the Tcl interpreter will call \fIproc\fR to process the command.
.PP
\fBTcl_CreateObjCommand\fR deletes any existing command
@@ -120,7 +120,7 @@ In the case of a \fBTCL_OK\fR return code this gives the result
of the command,
and in the case of \fBTCL_ERROR\fR this gives an error message.
Before invoking a command procedure,
\fBTcl_EvalObj\fR sets interpreter's result to
\fBTcl_EvalObjEx\fR sets interpreter's result to
point to an object representing an empty string, so simple
commands can return an empty result by doing nothing at all.
.PP
@@ -252,7 +252,6 @@ The string returned by \fBTcl_GetCommandName\fR is in dynamic memory
owned by Tcl and is only guaranteed to retain its value as long as the
command isn't deleted or renamed; callers should copy the string if
they need to keep it for a long time.
.PP
.SH "SEE ALSO"
Tcl_CreateCommand, Tcl_ResetResult, Tcl_SetObjResult
+3 -2
View File
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: CrtSlave.3,v 1.3 1999/08/21 19:40:47 hobbs Exp $
'\" RCS: @(#) $Id: CrtSlave.3,v 1.3.2.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH Tcl_CreateSlave 3 7.6 Tcl "Tcl Library Procedures"
@@ -220,9 +220,10 @@ If the operation succeeds, it returns \fBTCL_OK\fR.
After executing this command, attempts to use \fIcmdName\fR in a call to
\fBTcl_Eval\fR or with the Tcl \fBeval\fR command will fail.
.PP
.SH "SEE ALSO"
For a description of the Tcl interface to multiple interpreters, see
\fIinterp(n)\fR.
.SH "SEE ALSO"
interp
.SH KEYWORDS
alias, command, exposed commands, hidden commands, interpreter, invoke,
+2 -2
View File
@@ -5,13 +5,13 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: DString.3,v 1.5 2000/04/14 23:01:50 hobbs Exp $
'\" RCS: @(#) $Id: DString.3,v 1.5.2.1 2001/12/10 16:01:43 dgp Exp $
'\"
.so man.macros
.TH Tcl_DString 3 7.4 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_DStringInit, Tcl_DStringAppend, Tcl_DStringAppendElement, Tcl_DStringStartSublist, Tcl_DStringEndSublist, Tcl_DStringLength, Tcl_DStringValue, Tcl_DStringSetLength, Tcl_DStringFree, Tcl_DStringResult, Tcl_DStringGetResult \- manipulate dynamic strings
Tcl_DStringInit, Tcl_DStringAppend, Tcl_DStringAppendElement, Tcl_DStringStartSublist, Tcl_DStringEndSublist, Tcl_DStringLength, Tcl_DStringValue, Tcl_DStringSetLength, Tcl_DStringTrunc, Tcl_DStringFree, Tcl_DStringResult, Tcl_DStringGetResult \- manipulate dynamic strings
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
+18 -3
View File
@@ -5,13 +5,13 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: DetachPids.3,v 1.2 1998/09/14 18:39:48 stanton Exp $
'\" RCS: @(#) $Id: DetachPids.3,v 1.2.18.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH Tcl_DetachPids 3 "" Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_DetachPids, Tcl_ReapDetachedProcs \- manage child processes in background
Tcl_DetachPids, Tcl_ReapDetachedProcs, Tcl_WaitPid \- manage child processes in background
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
@@ -19,14 +19,23 @@ Tcl_DetachPids, Tcl_ReapDetachedProcs \- manage child processes in background
\fBTcl_DetachPids\fR(\fInumPids, pidPtr\fR)
.sp
\fBTcl_ReapDetachedProcs\fR()
.sp
Tcl_Pid
\fBTcl_WaitPid\fR(\fIpid, statPtr, options\fR)
.SH ARGUMENTS
.AS int *statusPtr
.AP int numPids in
Number of process ids contained in the array pointed to by \fIpidPtr\fR.
.AP int *pidPtr in
Address of array containing \fInumPids\fR process ids.
.AP Tcl_Pid pid in
The id of the process (pipe) to wait for.
.AP int* statPtr out
The result of waiting on a process (pipe). Either 0 or ECHILD.
.AP int options
The options controlling the wait. WNOHANG specifies not to wait when
checking the process.
.BE
.SH DESCRIPTION
.PP
\fBTcl_DetachPids\fR and \fBTcl_ReapDetachedProcs\fR provide a
@@ -57,6 +66,12 @@ However, if you call \fBTcl_DetachPids\fR in situations where the
\fBexec\fR command may never get executed, you may wish to call
\fBTcl_ReapDetachedProcs\fR from time to time so that background
processes can be cleaned up.
.PP
\fBTcl_WaitPid\fR is a thin wrapper around the facilities provided by
the operating system to wait on the end of a spawned process and to
check a whether spawned process is still running. It is used by
\fBTcl_ReapDetachedProcs\fR and the channel system to portably access
the operating system.
.SH KEYWORDS
background, child, detach, process, wait
+2 -1
View File
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: Encoding.3,v 1.7 1999/10/13 00:32:05 hobbs Exp $
'\" RCS: @(#) $Id: Encoding.3,v 1.7.2.1 2001/08/28 00:08:40 hobbs Exp $
'\"
.so man.macros
.TH Tcl_GetEncoding 3 "8.1" Tcl "Tcl Library Procedures"
@@ -14,6 +14,7 @@ Tcl_GetEncoding, Tcl_FreeEncoding, Tcl_ExternalToUtfDString, Tcl_ExternalToUtf,
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
\fB#include <tclPlatDecls.h>\fR \fI/* Tcl_Win* functions only */\fR
.sp
Tcl_Encoding
\fBTcl_GetEncoding\fR(\fIinterp, name\fR)
+12 -9
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: Eval.3,v 1.6 2000/04/14 23:01:50 hobbs Exp $
'\" RCS: @(#) $Id: Eval.3,v 1.6.2.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH Tcl_Eval 3 8.1 Tcl "Tcl Library Procedures"
@@ -66,9 +66,9 @@ The number of bytes in \fIscript\fR, not including any
null terminating character. If \-1, then all characters up to the
first null byte are used.
.AP char *script in
Points to first byte of script to execute. This script must be in
writable memory: temporary modifications are made to it during
parsing.
Points to first byte of script to execute (NULL terminated and UTF-8).
This script must be in writable memory: temporary modifications are made
to it during parsing.
.AP char *string in
String forming part of a Tcl script.
.AP va_list argList in
@@ -110,11 +110,14 @@ a completion code and result just like \fBTcl_EvalObjEx\fR.
.PP
\fBTcl_Eval\fR is similar to \fBTcl_EvalObjEx\fR except that the script to
be executed is supplied as a string instead of an object and no compilation
occurs. The string is parsed and executed directly (using
\fBTcl_EvalObjv\fR) instead of compiling it and executing the bytecodes.
In situations where it is known that the script will never be executed
again, \fBTcl_Eval\fR may be faster than \fBTcl_EvalObjEx\fR.
\fBTcl_Eval\fR returns a completion code and result just like
occurs. The string should be a proper UTF-8 string as converted by
\fBTcl_ExternalToUtfDString\fR or \fBTcl_ExternalToUtf\fR when it is known
to possibly contain upper ascii characters who's possible combinations
might be a UTF-8 special code. The string is parsed and executed directly
(using \fBTcl_EvalObjv\fR) instead of compiling it and executing the
bytecodes. In situations where it is known that the script will never be
executed again, \fBTcl_Eval\fR may be faster than \fBTcl_EvalObjEx\fR.
\fBTcl_Eval\fR returns a completion code and result just like
\fBTcl_EvalObjEx\fR. Note: for backward compatibility with versions before
Tcl 8.0, \fBTcl_Eval\fR copies the object result in \fIinterp\fR to
\fIinterp->result\fR (use is deprecated) where it can be accessed directly.
+2 -2
View File
@@ -4,13 +4,13 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: Exit.3,v 1.3 1999/04/16 00:46:31 stanton Exp $
'\" RCS: @(#) $Id: Exit.3,v 1.3.12.1 2000/08/07 21:29:37 hobbs Exp $
'\"
.so man.macros
.TH Tcl_Exit 3 8.1 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_Exit, Tcl_Finalize, Tcl_FinalizeThread, Tcl_CreateExitHandler, Tcl_DeleteExitHandler, Tcl_CreateThreadExitHandler, Tcl_DeleteThreadExitHandler \- end the application or thread (and invoke exit handlers)
Tcl_Exit, Tcl_Finalize, Tcl_CreateExitHandler, Tcl_DeleteExitHandler, Tcl_ExitThread, Tcl_FinalizeThread, Tcl_CreateThreadExitHandler, Tcl_DeleteThreadExitHandler \- end the application or thread (and invoke exit handlers)
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
+2 -2
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: ExprLong.3,v 1.3 2000/04/14 23:01:50 hobbs Exp $
'\" RCS: @(#) $Id: ExprLong.3,v 1.3.2.1 2001/12/10 16:01:43 dgp Exp $
'\"
.so man.macros
.TH Tcl_ExprLong 3 7.0 Tcl "Tcl Library Procedures"
@@ -54,7 +54,7 @@ and return the result in one of four different forms.
The expression can have any of the forms accepted by the \fBexpr\fR command.
Note that these procedures have been largely replaced by the
object-based procedures \fBTcl_ExprLongObj\fR, \fBTcl_ExprDoubleObj\fR,
\fBTcl_ExprBooleanObj\fR, and \fBTcl_ExprStringObj\fR.
\fBTcl_ExprBooleanObj\fR, and \fBTcl_ExprObj\fR.
Those object-based procedures evaluate an expression held in a Tcl object
instead of a string.
The object argument can retain an internal representation
+4 -2
View File
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: FindExec.3,v 1.4 2000/03/03 02:57:37 hobbs Exp $
'\" RCS: @(#) $Id: FindExec.3,v 1.4.2.1 2001/09/28 17:53:48 msofer Exp $
'\"
.so man.macros
.TH Tcl_FindExecutable 3 8.1 Tcl "Tcl Library Procedures"
@@ -39,7 +39,9 @@ It is also returned by the \fBinfo nameofexecutable\fR command.
.PP
On UNIX platforms this procedure is typically invoked as the very
first thing in the application's main program; it must be passed
\fIargv[0]\fR as its argument. \fBTcl_FindExecutable\fR uses \fIargv0\fR
\fIargv[0]\fR as its argument. It is important not to change the
working directory before the invocation.
\fBTcl_FindExecutable\fR uses \fIargv0\fR
along with the \fBPATH\fR environment variable to find the
application's executable, if possible. If it fails to find
the binary, then future calls to \fBinfo nameofexecutable\fR
+2 -2
View File
@@ -4,13 +4,13 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: GetIndex.3,v 1.5 1999/08/13 19:01:04 welch Exp $
'\" RCS: @(#) $Id: GetIndex.3,v 1.5.8.1 2000/08/07 21:29:37 hobbs Exp $
'\"
.so man.macros
.TH Tcl_GetIndexFromObj 3 8.1 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_GetIndexFromObj \- lookup string in table of keywords
Tcl_GetIndexFromObj, Tcl_GetIndexFromObjStruct \- lookup string in table of keywords
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
+4 -4
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: Notifier.3,v 1.7 1999/05/06 20:13:22 stanton Exp $
'\" RCS: @(#) $Id: Notifier.3,v 1.7.12.1 2000/08/07 21:29:37 hobbs Exp $
'\"
.so man.macros
.TH Notifier 3 8.1 Tcl "Tcl Library Procedures"
@@ -337,10 +337,10 @@ must be a structure of type \fBTcl_Event\fR, and the address of this
structure is used when communicating between the event source and the
rest of the notifier. A \fBTcl_Event\fR has the following definition:
.CS
typedef struct Tcl_Event {
typedef struct {
Tcl_EventProc *\fIproc\fR;
struct Tcl_Event *\fInextPtr\fR;
};
} Tcl_Event;
.CE
The event source must fill in the \fIproc\fR field of
the event before calling \fBTcl_QueueEvent\fR.
@@ -597,6 +597,6 @@ mode.
.VE
.SH "SEE ALSO"
\fBTcl_CreateFileHandler\fR, \fBTcl_DeleteFileHandler\fR, \fBTcl_Sleep\fR,
\fBTcl_DoOneEvent\fR, \fBThreads.3\fR
\fBTcl_DoOneEvent\fR, \fBThread(3)\fR
.SH KEYWORDS
event, notifier, event queue, event sources, file events, timer, idle, service mode, threads
+2 -2
View File
@@ -4,13 +4,13 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: Object.3,v 1.4 1999/08/09 16:30:34 hobbs Exp $
'\" RCS: @(#) $Id: Object.3,v 1.4.10.1 2000/08/07 21:29:38 hobbs Exp $
'\"
.so man.macros
.TH Tcl_Obj 3 8.0 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_NewObj, Tcl_DuplicateObj, Tcl_IncrRefCount, Tcl_DecrRefCount, Tcl_IsShared \- manipulate Tcl objects
Tcl_NewObj, Tcl_DuplicateObj, Tcl_IncrRefCount, Tcl_DecrRefCount, Tcl_IsShared, Tcl_InvalidateStringRep \- manipulate Tcl objects
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
+2 -2
View File
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: ObjectType.3,v 1.2 1998/09/14 18:39:49 stanton Exp $
'\" RCS: @(#) $Id: ObjectType.3,v 1.2.18.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH Tcl_ObjType 3 8.0 Tcl "Tcl Library Procedures"
@@ -55,7 +55,7 @@ The argument \fItypePtr\fR points to a Tcl_ObjType structure that
describes the new type by giving its name
and by supplying pointers to four procedures
that implement the type.
If the type table already containes a type
If the type table already contains a type
with the same name as in \fItypePtr\fR,
it is replaced with the new type.
The Tcl_ObjType structure is described
+2 -2
View File
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: OpenFileChnl.3,v 1.9 2000/04/25 00:54:53 ericm Exp $
'\" RCS: @(#) $Id: OpenFileChnl.3,v 1.9.2.1 2001/12/07 17:39:04 dgp Exp $
.so man.macros
.TH Tcl_OpenFileChannel 3 8.3 Tcl "Tcl Library Procedures"
.BS
@@ -445,7 +445,7 @@ procedure may be invoked to determine if the channel is blocked because
of input unavailability.
.PP
\fBTcl_Gets\fR is the same as \fBTcl_GetsObj\fR except the resulting
characters are appended to the appended to the dynamic string given by
characters are appended to the dynamic string given by
\fIdsPtr\fR rather than a Tcl object.
.SH "TCL_UNGETS"
+5 -5
View File
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: RecEvalObj.3,v 1.2 1998/09/14 18:39:49 stanton Exp $
'\" RCS: @(#) $Id: RecEvalObj.3,v 1.2.18.1 2000/08/07 21:29:38 hobbs Exp $
'\"
.so man.macros
.TH Tcl_RecordAndEvalObj 3 8.0 Tcl "Tcl Library Procedures"
@@ -33,15 +33,15 @@ the command at global level instead of the current stack level.
.SH DESCRIPTION
.PP
\fBTcl_RecordAndEvalObj\fR is invoked to record a command as an event
on the history list and then execute it using \fBTcl_EvalObj\fR
on the history list and then execute it using \fBTcl_EvalObjEx\fR
(or \fBTcl_GlobalEvalObj\fR if the TCL_EVAL_GLOBAL bit is set
in \fIflags\fR).
It returns a completion code such as TCL_OK just like \fBTcl_EvalObj\fR,
It returns a completion code such as TCL_OK just like \fBTcl_EvalObjEx\fR,
as well as a result object containing additional information
(a result value or error message)
that can be retrieved using \fBTcl_GetObjResult\fR.
If you don't want the command recorded on the history list then
you should invoke \fBTcl_EvalObj\fR instead of \fBTcl_RecordAndEvalObj\fR.
you should invoke \fBTcl_EvalObjEx\fR instead of \fBTcl_RecordAndEvalObj\fR.
Normally \fBTcl_RecordAndEvalObj\fR is only called with top-level
commands typed by the user, since the purpose of history is to
allow the user to re-issue recently-invoked commands.
@@ -49,7 +49,7 @@ If the \fIflags\fR argument contains the TCL_NO_EVAL bit then
the command is recorded without being evaluated.
.SH "SEE ALSO"
Tcl_EvalObj, Tcl_GetObjResult
Tcl_EvalObjEx, Tcl_GetObjResult
.SH KEYWORDS
command, event, execute, history, interpreter, object, record
+9 -9
View File
@@ -6,13 +6,13 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: RegExp.3,v 1.6 1999/12/21 23:57:33 hobbs Exp $
'\" RCS: @(#) $Id: RegExp.3,v 1.6.2.2 2001/10/14 16:25:29 dgp Exp $
'\"
.so man.macros
.TH Tcl_RegExpMatch 3 8.1 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_RegExpMatch, Tcl_RegExpCompile, Tcl_RegExpExec, Tcl_RegExpRange, Tcl_GetRegExpFromObj, Tcl_RegExpMatchObj, Tcl_GetRegExpInfo \- Pattern matching with regular expressions
Tcl_RegExpMatch, Tcl_RegExpCompile, Tcl_RegExpExec, Tcl_RegExpRange, Tcl_GetRegExpFromObj, Tcl_RegExpMatchObj, Tcl_RegExpExecObj, Tcl_RegExpGetInfo \- Pattern matching with regular expressions
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
@@ -38,7 +38,7 @@ Tcl_RegExp
int
\fBTcl_RegExpExecObj\fR(\fIinterp\fR, \fIregexp\fR, \fIobjPtr\fR, \fIoffset\fR, \fInmatches\fR, \fIeflags\fR)
.sp
\fBTcl_GetRegExpInfo\fR(\fIregexp\fR, \fIinfoPtr\fR)
\fBTcl_RegExpGetInfo\fR(\fIregexp\fR, \fIinfoPtr\fR)
.VE 8.1
.SH ARGUMENTS
@@ -99,7 +99,7 @@ OR-ed combination of the values TCL_REG_NOTBOL and TCL_REG_NOTEOL.
See below for more information.
.AP Tcl_RegExpInfo *infoPtr out
The address of the location where information about a previous match
should be stored by \fBTcl_GetRegExpInfo\fR.
should be stored by \fBTcl_RegExpGetInfo\fR.
.VE 8.1
.BE
@@ -166,11 +166,11 @@ of characters that matched the entire pattern; otherwise,
information is returned about the range of characters that matched the
\fIindex\fR'th parenthesized subexpression within the pattern.
If there is no range corresponding to \fIindex\fR then NULL
is stored in \fI*firstPtr\fR and \fI*lastPtr\fR.
is stored in \fI*startPtr\fR and \fI*endPtr\fR.
.PP
.VS 8.1
\fBTcl_GetRegExpFromObj\fR, \fBTcl_RegExpExecObj\fR, and
\fBTcl_GetRegExpInfo\fR are object interfaces that provide the most
\fBTcl_RegExpGetInfo\fR are object interfaces that provide the most
direct control of Henry Spencer's regular expression library. For
users that need to modify compilation and execution options directly,
it is recommended that you use these interfaces instead of calling the
@@ -185,7 +185,7 @@ from the string in the object and assign it to the internal
representation of the \fIpatObj\fR. The return value of this function
is of type \fBTcl_RegExp\fR. The return value is a token for this
compiled form, which can be used in subsequent calls to
\fBTcl_RegExpExecObj\fR or \fBTcl_GetRegExpInfo\fR. If an error
\fBTcl_RegExpExecObj\fR or \fBTcl_RegExpGetInfo\fR. If an error
occurs while compiling the regular expression then
\fBTcl_GetRegExpFromObj\fR returns NULL and leaves an error message in
the interpreter result. The regular expression token can be used as
@@ -251,7 +251,7 @@ an empty string before any newline in addition to its normal function.
\fBTCL_REG_NOSUB\fR
Compile for matching that reports only success or failure,
not what was matched. This reduces compile overhead and may improve
performance. Subsequent calls to \fBTcl_GetRegExpInfo\fR or
performance. Subsequent calls to \fBTcl_RegExpGetInfo\fR or
\fBTcl_RegExpRange\fR will not report any match information.
.TP
\fBTCL_REG_CANMATCH\fR
@@ -294,7 +294,7 @@ line or the end of the string, so '$' will not match there.
Note that this flag has no effect on how `\fB\eZ\fR' matches.
.RE
.PP
\fBTcl_GetRegExpInfo\fR retrieves information about the last match
\fBTcl_RegExpGetInfo\fR retrieves information about the last match
performed with a given regular expression \fIregexp\fR. The
\fIinfoPtr\fR argument contains a pointer to a structure that is
defined as follows:
+2 -2
View File
@@ -5,13 +5,13 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: SetResult.3,v 1.5 2000/04/14 23:01:53 hobbs Exp $
'\" RCS: @(#) $Id: SetResult.3,v 1.5.2.1 2000/08/07 21:29:38 hobbs Exp $
'\"
.so man.macros
.TH Tcl_SetResult 3 8.0 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_SetObjResult, Tcl_GetObjResult, Tcl_SetResult, Tcl_GetStringResult, Tcl_AppendResult, Tcl_AppendResultVA, Tcl_AppendElement, Tcl_ResetResult \- manipulate Tcl result
Tcl_SetObjResult, Tcl_GetObjResult, Tcl_SetResult, Tcl_GetStringResult, Tcl_AppendResult, Tcl_AppendResultVA, Tcl_AppendElement, Tcl_ResetResult, Tcl_FreeResult \- manipulate Tcl result
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
+2 -2
View File
@@ -5,13 +5,13 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: SplitList.3,v 1.3 2000/04/14 23:01:53 hobbs Exp $
'\" RCS: @(#) $Id: SplitList.3,v 1.3.2.1 2000/08/07 21:29:38 hobbs Exp $
'\"
.so man.macros
.TH Tcl_SplitList 3 8.0 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_SplitList, Tcl_Merge, Tcl_ScanElement, Tcl_ConvertElement \- manipulate Tcl lists
Tcl_SplitList, Tcl_Merge, Tcl_ScanElement, Tcl_ConvertElement, Tcl_ScanCountedElement, Tcl_ConvertCountedElement \- manipulate Tcl lists
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
+3 -6
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: StrMatch.3,v 1.3 1999/05/22 01:20:11 stanton Exp $
'\" RCS: @(#) $Id: StrMatch.3,v 1.3.10.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH Tcl_StringMatch 3 8.1 Tcl "Tcl Library Procedures"
@@ -18,21 +18,18 @@ Tcl_StringMatch, Tcl_StringCaseMatch \- test whether a string matches a pattern
.sp
int
\fBTcl_StringMatch\fR(\fIstring\fR, \fIpattern\fR)
.VS 8.1
.sp
\fBTcl_StringCaseMatch\fR(\fIstring, pattern, nocase\fR)
.VE 8.1
int
\fBTcl_StringCaseMatch\fR(\fIstring\fR, \fIpattern\fR, \fInocase\fR)
.SH ARGUMENTS
.AP char *string in
String to test.
.AP char *pattern in
Pattern to match against string. May contain special
characters from the set *?\e[].
.VS 8.1
.AP int nocase in
Specifies whether the match should be done case-sensitive (0) or
case-insensitive (1).
.VE 8.1
.BE
.SH DESCRIPTION
+7 -6
View File
@@ -3,7 +3,7 @@
'\" Copyright (c) 2000 by Scriptics Corporation.
'\" All rights reserved.
'\"
'\" RCS: @(#) $Id: TCL_MEM_DEBUG.3,v 1.2 2000/04/28 00:47:49 ericm Exp $
'\" RCS: @(#) $Id: TCL_MEM_DEBUG.3,v 1.2.14.2 2001/12/10 16:01:43 dgp Exp $
'\"
.so man.macros
.TH TCL_MEM_DEBUG 3 8.1 Tcl "Tcl Library Procedures"
@@ -18,7 +18,7 @@ includes C and Tcl functions which can aid with debugging
memory leaks, memory allocation overruns, and other memory related
errors.
.SH ENABLING MEMORY DEBUGGING
.SH "ENABLING MEMORY DEBUGGING"
.PP
To enable memory debugging, Tcl should be recompiled from scratch with
\fBTCL_MEM_DEBUG\fR defined. This will also compile in a non-stub
@@ -34,14 +34,15 @@ functions \fBTcl_ValidateAllMemory\fR, and \fBTcl_DumpActiveMemory\fR,
and the Tcl \fBmemory\fR command can be used to validate and examine
memory usage.
.SH GUARD ZONES
.SH "GUARD ZONES"
.PP
When memory debugging is enabled, whenever a call to \fBckalloc\fR is
made, slightly more memory than requested is allocated so the memory debugging
code can keep track of the allocated memory, and eight-byte ``guard
zones'' are placed in front of and behind the space that will be
returned to the caller. (The size of the guard zone is defined by the
C #define \fBGUARD_SIZE\fR in \fIbaseline/src/ckalloc.c\fR -- it can
returned to the caller. (The sizes of the guard zones are defined by the
C #define \fBLOW_GUARD_SIZE\fR and #define \fBHIGH_GUARD_SIZE\fR
in the file \fIgeneric/tclCkalloc.c\fR -- it can
be extended if you suspect large overwrite problems, at some cost in
performance.) A known pattern is written into the guard zones and, on
a call to \fBckfree\fR, the guard zones of the space being freed are
@@ -54,7 +55,7 @@ This allows you to detect the common sorts of one-off problems, where
not enough space was allocated to contain the data written, for
example.
.SH DEBUGGING DIFFICULT MEMORY CORRUPTION PROBLEMS
.SH "DEBUGGING DIFFICULT MEMORY CORRUPTION PROBLEMS"
.PP
Normally, Tcl compiled with memory debugging enabled will make it easy
to isolate a corruption problem. Turning on memory validation with
+26 -6
View File
@@ -1,22 +1,25 @@
'\"
'\" Copyright (c) 1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\" Copyright (c) 2000 Ajuba Solutions.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: Tcl_Main.3,v 1.2 1998/09/14 18:39:50 stanton Exp $
'\" RCS: @(#) $Id: Tcl_Main.3,v 1.2.18.1 2001/08/28 00:12:43 hobbs Exp $
'\"
.so man.macros
.TH Tcl_Main 3 7.4 Tcl "Tcl Library Procedures"
.TH Tcl_Main 3 8.3.4 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_Main \- main program for Tcl-based applications
Tcl_Main, Tcl_SetMainLoop \- main program and event loop definition for Tcl-based applications
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
.sp
\fBTcl_Main\fR(\fIargc, argv, appInitProc\fR)
.sp
\fBTcl_SetMainLoop\fR(\fImainLoopProc\fR)
.SH ARGUMENTS
.AS Tcl_AppInitProc *appInitProc
.AP int argc in
@@ -26,6 +29,8 @@ Array of strings containing command-line arguments.
.AP Tcl_AppInitProc *appInitProc in
Address of an application-specific initialization procedure.
The value for this argument is usually \fBTcl_AppInit\fR.
.AP Tcl_MainLoopProc *mainLoopProc in
Address of an application-specific event loop procedure.
.BE
.SH DESCRIPTION
@@ -53,9 +58,24 @@ that matches the type \fBTcl_AppInitProc\fR:
.CS
typedef int Tcl_AppInitProc(Tcl_Interp *\fIinterp\fR);
.CE
\fIAppInitProc\fR is almost always a pointer to \fBTcl_AppInit\fR;
for more details on this procedure, see the documentation
for \fBTcl_AppInit\fR.
\fIAppInitProc\fR is almost always a pointer to \fBTcl_AppInit\fR; for more
details on this procedure, see the documentation for \fBTcl_AppInit\fR.
When the \fIappInitProc\fR is finished, the startup script will be
evaluated. If none exists, then an interactive prompt is provided.
.PP
.VS 8.3.4
\fBTcl_SetMainLoop\fR allows setting an event loop procedure to be run.
This allows, for example, Tk to be dynamically loaded and set its event
loop. The event loop will run following the startup script. If you
are in interactive mode, setting the main loop procedure will cause the
prompt to become fileevent based and then the loop procedure is called.
The main loop procedure must have an interface that matches the type
\fBTcl_MainLoopProc\fR:
.CS
typedef void Tcl_MainLoopProc(void);
.CE
.VE 8.3.4
.SH KEYWORDS
application-specific initialization, command-line arguments, main program
+7 -2
View File
@@ -5,13 +5,13 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: Thread.3,v 1.11 2000/04/25 23:03:53 hobbs Exp $
'\" RCS: @(#) $Id: Thread.3,v 1.11.2.1 2000/08/07 21:29:38 hobbs Exp $
'\"
.so man.macros
.TH Threads 3 "8.1" Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_ConditionNotify, Tcl_ConditionWait, Tcl_ConditionFinalize, Tcl_GetThreadData, Tcl_MutexLock, Tcl_MutexUnlock, Tcl_MutexFinalize \- Tcl thread support.
Tcl_ConditionNotify, Tcl_ConditionWait, Tcl_ConditionFinalize, Tcl_GetThreadData, Tcl_MutexLock, Tcl_MutexUnlock, Tcl_MutexFinalize, Tcl_CreateThread \- Tcl thread support.
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
@@ -59,6 +59,8 @@ calls \fBTcl_GetThreadData\fR.
.AP Tcl_ThreadId *idPtr out
The refered storage will contain the id of the newly created thread as
returned by the operating system.
.AP Tcl_ThreadId id in
Id of the thread waited upon.
.AP Tcl_ThreadCreateProc threadProc in
This procedure will act as the \fBmain()\fR of the newly created
thread. The specified \fIclientData\fR will be its sole argument.
@@ -69,6 +71,9 @@ The size of the stack given to the new thread.
.AP int flags in
Bitmask containing flags allowing the caller to modify behaviour of
the new thread.
.AP int *result out
The refered storage is used to place the exit code of the thread
waited upon into it.
.BE
.SH INTRODUCTION
Beginning with the 8.1 release, the Tcl core is thread safe, which
+2 -2
View File
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: Utf.3,v 1.7 2000/04/25 17:55:29 hobbs Exp $
'\" RCS: @(#) $Id: Utf.3,v 1.7.2.1 2001/12/10 16:01:43 dgp Exp $
'\"
.so man.macros
.TH Utf 3 "8.1" Tcl "Tcl Library Procedures"
@@ -135,7 +135,7 @@ Unicode string. Storage for the return value is appended to the
end of the \fBTcl_DString\fR.
.PP
\fBTcl_UtfToUniCharDString\fR coverts the given UTF-8 string to Unicode,
storing the result in the previously-initialized \fBTcl_Dstring\fR.
storing the result in the previously-initialized \fBTcl_DString\fR.
you may either specify the length of the given UTF-8 string or "-1",
in which case \fBTcl_UtfToUniCharDString\fR uses \fBstrlen\fR to
calculate the length. The return value is a pointer to the Unicode
+2 -2
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: after.n,v 1.2 1998/09/14 18:39:51 stanton Exp $
'\" RCS: @(#) $Id: after.n,v 1.2.18.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH after n 7.5 Tcl "Tcl Built-In Commands"
@@ -103,7 +103,7 @@ In applications that are not normally event-driven, such as
and \fBupdate\fR commands.
.SH "SEE ALSO"
bgerror
bgerror(n), concat(n), update(n), vwait(n)
.SH KEYWORDS
cancel, delay, idle callback, sleep, time
+4 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: append.n,v 1.2 1998/09/14 18:39:51 stanton Exp $
'\" RCS: @(#) $Id: append.n,v 1.2.18.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH append n "" Tcl "Tcl Built-In Commands"
@@ -28,5 +28,8 @@ variables incrementally.
For example, ``\fBappend a $b\fR'' is much more efficient than
``\fBset a $a$b\fR'' if \fB$a\fR is long.
.SH "SEE ALSO"
concat(n), lappend(n)
.SH KEYWORDS
append, variable
+39 -28
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: bgerror.n,v 1.2 1998/09/14 18:39:51 stanton Exp $
'\" RCS: @(#) $Id: bgerror.n,v 1.2.18.3 2001/10/09 19:04:01 hobbs Exp $
'\"
.so man.macros
.TH bgerror n 7.5 Tcl "Tcl Built-In Commands"
@@ -31,38 +31,49 @@ with the \fBafter\fR command, then it is a background error.
For a non-background error, the error can simply be returned up
through nested Tcl command evaluations until it reaches the top-level
code in the application; then the application can report the error
in whatever way it wishes.
When a background error occurs, the unwinding ends in
the Tcl library and there is no obvious way for Tcl to report
the error.
in whatever way it wishes. When a background error occurs, the
unwinding ends in the Tcl library and there is no obvious way for Tcl
to report the error.
.PP
When Tcl detects a background error, it saves information about the
error and invokes the \fBbgerror\fR command later as an idle event handler.
Before invoking \fBbgerror\fR, Tcl restores the \fBerrorInfo\fR
and \fBerrorCode\fR variables to their values at the time the
error occurred, then it invokes \fBbgerror\fR with
the error message as its only argument.
Tcl assumes that the application has implemented the \fBbgerror\fR
command, and that the command will report the error in a way that
makes sense for the application. Tcl will ignore any result returned
by the \fBbgerror\fR command as long as no error is generated.
error and invokes the \fBbgerror\fR command later as an idle event
handler. Before invoking \fBbgerror\fR, Tcl restores the
\fBerrorInfo\fR and \fBerrorCode\fR variables to their values at the
time the error occurred, then it invokes \fBbgerror\fR with the error
message as its only argument. Tcl assumes that the application has
implemented the \fBbgerror\fR command, and that the command will
report the error in a way that makes sense for the application. Tcl
will ignore any result returned by the \fBbgerror\fR command as long
as no error is generated.
.PP
If another Tcl error occurs within the \fBbgerror\fR command
(for example, because no \fBbgerror\fR command has been defined)
then Tcl reports the error itself by writing a message to stderr.
If another Tcl error occurs within the \fBbgerror\fR command (for
example, because no \fBbgerror\fR command has been defined) then Tcl
reports the error itself by writing a message to stderr.
.PP
If several background errors accumulate before \fBbgerror\fR
is invoked to process them, \fBbgerror\fR will be invoked once
for each error, in the order they occurred.
However, if \fBbgerror\fR returns with a break exception, then
any remaining errors are skipped without calling \fBbgerror\fR.
If several background errors accumulate before \fBbgerror\fR is
invoked to process them, \fBbgerror\fR will be invoked once for each
error, in the order they occurred. However, if \fBbgerror\fR returns
with a break exception, then any remaining errors are skipped without
calling \fBbgerror\fR.
.PP
Tcl has no default implementation for \fBbgerror\fR.
However, in applications using Tk there is a default
\fBbgerror\fR procedure
which posts a dialog box containing
the error message and offers the user a chance to see a stack
trace showing where the error occurred.
Tcl has no default implementation for \fBbgerror\fR. However, in
applications using Tk there is a default \fBbgerror\fR procedure which
posts a dialog box containing the error message and offers the user a
chance to see a stack trace showing where the error occurred. In
addition to allowing the user to view the stack trace, the dialog
provides an additional application configurable button which may be
used, for example, to save the stack trace to a file. By default,
this is the behavior associated with that button. This behavior can
be redefined by setting the option database values
\fB*ErrorDialog.function.text\fR, to specify the caption for the
function button, and \fB*ErrorDialog.function.command\fR, to specify
the command to be run. The text of the stack trace is appended to the
command when it is evaluated. If either of these options is set to
the empty string, then the additional button will not be displayed in
the dialog.
.SH "SEE ALSO"
after(n), tclvars(n)
.SH KEYWORDS
background error, reporting
+7 -7
View File
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: binary.n,v 1.4 2000/04/08 02:35:17 hobbs Exp $
'\" RCS: @(#) $Id: binary.n,v 1.4.2.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH binary n 8.0 Tcl "Tcl Built-In Commands"
@@ -22,11 +22,11 @@ binary \- Insert and extract fields from binary strings
.PP
This command provides facilities for manipulating binary data. The
first form, \fBbinary format\fR, creates a binary string from normal
Tcl values. For example, given the values 16 and 22, it might produce
an 8-byte binary string consisting of two 4-byte integers, one for
each of the numbers. The second form of the command,
\fBbinary scan\fR, does the opposite: it extracts data from a binary
string and returns it as ordinary Tcl string values.
Tcl values. For example, given the values 16 and 22, on a 32 bit
architecture, it might produce an 8-byte binary string consisting of
two 4-byte integers, one for each of the numbers. The second form of
the command, \fBbinary scan\fR, does the opposite: it extracts data
from a binary string and returns it as ordinary Tcl string values.
.SH "BINARY FORMAT"
.PP
@@ -542,7 +542,7 @@ element of the \fBtcl_platform\fR array to decide which type character
to use when formatting or scanning integers.
.SH "SEE ALSO"
format, scan, tclvars
format(n), scan(n), tclvars(n)
.SH KEYWORDS
binary, format, scan
+4 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: break.n,v 1.2 1998/09/14 18:39:51 stanton Exp $
'\" RCS: @(#) $Id: break.n,v 1.2.18.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH break n "" Tcl "Tcl Built-In Commands"
@@ -30,5 +30,8 @@ Break exceptions are also handled in a few other situations, such
as the \fBcatch\fR command, Tk event bindings, and the outermost
scripts of procedure bodies.
.SH "SEE ALSO"
catch(n), continue(n), for(n), foreach(n), while(n)
.SH KEYWORDS
abort, break, loop
+4 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: case.n,v 1.2 1998/09/14 18:39:51 stanton Exp $
'\" RCS: @(#) $Id: case.n,v 1.2.18.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH case n 7.0 Tcl "Tcl Built-In Commands"
@@ -55,5 +55,8 @@ no command or variable substitutions are performed on them; this makes
the behavior of the second form different than the first form in some
cases.
.SH "SEE ALSO"
switch(n)
.SH KEYWORDS
case, match, regular expression
+4 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: cd.n,v 1.2 1998/09/14 18:39:51 stanton Exp $
'\" RCS: @(#) $Id: cd.n,v 1.2.18.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH cd n "" Tcl "Tcl Built-In Commands"
@@ -24,5 +24,8 @@ home directory (as specified in the HOME environment variable) if
\fIdirName\fR is not given.
Returns an empty string.
.SH "SEE ALSO"
filename(n), glob(n), pwd(n)
.SH KEYWORDS
working directory
+4 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: close.n,v 1.2 1998/09/14 18:39:51 stanton Exp $
'\" RCS: @(#) $Id: close.n,v 1.2.18.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH close n 7.5 Tcl "Tcl Built-In Commands"
@@ -55,5 +55,8 @@ that all output is correctly flushed before the process exits.
The command returns an empty string, and may generate an error if
an error occurs while flushing output.
.SH "SEE ALSO"
file(n), open(n), socket(n), eof(n)
.SH KEYWORDS
blocking, channel, close, nonblocking
+4 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: concat.n,v 1.2 1998/09/14 18:39:51 stanton Exp $
'\" RCS: @(#) $Id: concat.n,v 1.2.18.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH concat n "" Tcl "Tcl Built-In Commands"
@@ -36,5 +36,8 @@ as its result.
.PP
If no \fIarg\fRs are supplied, the result is an empty string.
.SH "SEE ALSO"
append(n), eval(n)
.SH KEYWORDS
concatenate, join, lists
+4 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: continue.n,v 1.2 1998/09/14 18:39:51 stanton Exp $
'\" RCS: @(#) $Id: continue.n,v 1.2.18.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH continue n "" Tcl "Tcl Built-In Commands"
@@ -30,5 +30,8 @@ Catch exceptions are also handled in a few other situations, such
as the \fBcatch\fR command and the outermost scripts of procedure
bodies.
.SH "SEE ALSO"
break(n), for(n), foreach(n), while(n)
.SH KEYWORDS
continue, iteration, loop
+4 -2
View File
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: dde.n,v 1.5 2000/04/12 18:41:54 hobbs Exp $
'\" RCS: @(#) $Id: dde.n,v 1.5.2.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH dde n 8.1 Tcl "Tcl Built-In Commands"
@@ -128,7 +128,9 @@ without adding the \fB&\fR to place the process in the background).
If for any reason the event queue is not flushed, DDE commands may
hang until the event queue is flushed. This can create a deadlock
situation.
.SH "SEE ALSO"
tk, winfo, send
tk(n), winfo(n), send(n)
.SH KEYWORDS
application, dde, name, remote execution
+2 -2
View File
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: encoding.n,v 1.2 1999/04/16 00:46:34 stanton Exp $
'\" RCS: @(#) $Id: encoding.n,v 1.2.12.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH encoding n "8.1" Tcl "Tcl Built-In Commands"
@@ -73,7 +73,7 @@ would return the Unicode string "\\u306F", which is the Hiragana
letter HA.
.SH "SEE ALSO"
Tcl_GetEncoding
Tcl_GetEncoding(3)
.SH KEYWORDS
encoding
+4 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: eof.n,v 1.2 1998/09/14 18:39:51 stanton Exp $
'\" RCS: @(#) $Id: eof.n,v 1.2.18.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH eof n 7.5 Tcl "Tcl Built-In Commands"
@@ -23,5 +23,8 @@ Returns 1 if an end of file condition occurred during the most
recent input operation on \fIchannelId\fR (such as \fBgets\fR),
0 otherwise.
.SH "SEE ALSO"
file(n), open(n), close(n), fblocked(n)
.SH KEYWORDS
channel, end of file
+4 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: error.n,v 1.2 1998/09/14 18:39:52 stanton Exp $
'\" RCS: @(#) $Id: error.n,v 1.2.18.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH error n "" Tcl "Tcl Built-In Commands"
@@ -54,5 +54,8 @@ present, then \fBerrorCode\fR is automatically reset to
``NONE'' by the Tcl interpreter as part of processing the
error generated by the command.
.SH "SEE ALSO"
catch(n), tclvars(n)
.SH KEYWORDS
error, errorCode, errorInfo
+4 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: eval.n,v 1.2 1998/09/14 18:39:52 stanton Exp $
'\" RCS: @(#) $Id: eval.n,v 1.2.18.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH eval n "" Tcl "Tcl Built-In Commands"
@@ -28,3 +28,6 @@ evaluation (or any error generated by it).
.SH KEYWORDS
concatenate, evaluate, script
.SH "SEE ALSO"
catch(n), concat(n), error(n), subs(n), tclvars(n)
+2 -4
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: exec.n,v 1.4 1999/12/09 14:43:47 hobbs Exp $
'\" RCS: @(#) $Id: exec.n,v 1.4.2.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH exec n 7.6 Tcl "Tcl Built-In Commands"
@@ -301,9 +301,7 @@ The \fBexec\fR command is not implemented and does not exist under Macintosh.
The \fBexec\fR command is fully functional and works as described.
.SH "SEE ALSO"
open(n)
.VE
error(n), open(n)
.SH KEYWORDS
execute, pipeline, redirection, subprocess
+4 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: exit.n,v 1.2 1998/09/14 18:39:52 stanton Exp $
'\" RCS: @(#) $Id: exit.n,v 1.2.18.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH exit n "" Tcl "Tcl Built-In Commands"
@@ -24,5 +24,8 @@ system as the exit status.
If \fIreturnCode\fR isn't specified then it defaults
to 0.
.SH "SEE ALSO"
exec(n), tclvars(n)
.SH KEYWORDS
exit, process
+5 -7
View File
@@ -1,14 +1,14 @@
'\"
'\" Copyright (c) 1993 The Regents of the University of California.
'\" Copyright (c) 1994-1997 Sun Microsystems, Inc.
'\" Copyright (c) 1994-2000 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: expr.n,v 1.3 2000/04/28 00:47:49 ericm Exp $
'\" RCS: @(#) $Id: expr.n,v 1.2.18.1 2000/08/07 21:29:39 hobbs Exp $
'\"
.so man.macros
.TH expr n 8.0 Tcl "Tcl Built-In Commands"
.TH expr n 8.3 Tcl "Tcl Built-In Commands"
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
@@ -348,11 +348,10 @@ the second operand is converted to the string \fB18\fR.
Because of Tcl's tendency to treat values as numbers whenever
possible, it isn't generally a good idea to use operators like \fB==\fR
when you really want string comparison and the values of the
operands could be arbitrary; it's better in these cases to use the
\fBstring compare\fR command instead.
operands could be arbitrary; it's better in these cases to use
the \fBstring\fR command instead.
.SH "PERFORMANCE CONSIDERATIONS"
.VS
.PP
Enclose expressions in braces for the best speed and the smallest
storage requirements.
@@ -383,7 +382,6 @@ The most expensive code is required for
unbraced expressions that contain command substitutions.
These expressions must be implemented by generating new code
each time the expression is executed.
.VE
.SH KEYWORDS
arithmetic, boolean, compare, expression, fuzzy comparison
+3 -2
View File
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: fblocked.n,v 1.2 1998/09/14 18:39:52 stanton Exp $
'\" RCS: @(#) $Id: fblocked.n,v 1.2.18.1 2001/04/03 22:06:43 hobbs Exp $
.so man.macros
.TH fblocked n 7.5 Tcl "Tcl Built-In Commands"
.BS
@@ -25,8 +25,9 @@ characters available for input and no end-of-line sequence, \fBgets\fR
returns an empty string and a subsequent call to \fBfblocked\fR will
return 1.
.PP
.SH "SEE ALSO"
gets(n), read(n)
gets(n), open(n), read(n)
.SH KEYWORDS
blocking, nonblocking
+3 -3
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: file.n,v 1.5 2000/01/12 11:10:35 hobbs Exp $
'\" RCS: @(#) $Id: file.n,v 1.5.2.1 2001/12/10 16:01:43 dgp Exp $
'\"
.so man.macros
.TH file n 8.3 Tcl "Tcl Built-In Commands"
@@ -242,9 +242,9 @@ Returns the value of the symbolic link given by \fIname\fR (i.e. the name
of the file it points to). If \fIname\fR isn't a symbolic link or its
value cannot be read, then an error is returned. On systems that don't
support symbolic links this option is undefined.
.PP
.TP
\fBfile rename \fR?\fB\-force\fR? ?\fB\-\|\-\fR? \fIsource\fR \fItarget\fR
.br
.TP
\fBfile rename \fR?\fB\-force\fR? ?\fB\-\|\-\fR? \fIsource\fR ?\fIsource\fR ...? \fItargetDir\fR
.RS
The first form takes the file or directory specified by pathname
+2 -2
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: fileevent.n,v 1.2 1998/09/14 18:39:52 stanton Exp $
'\" RCS: @(#) $Id: fileevent.n,v 1.2.18.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH fileevent n 7.5 Tcl "Tcl Built-In Commands"
@@ -102,7 +102,7 @@ buggy handlers.
by Mark Diekhans.
.SH "SEE ALSO"
bgerror, fconfigure, gets, puts, read
bgerror(n), fconfigure(n), gets(n), puts(n), read(n)
.SH KEYWORDS
asynchronous I/O, blocking, channel, event handler, nonblocking, readable,
+4 -1
View File
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: filename.n,v 1.3 1999/08/21 19:40:48 hobbs Exp $
'\" RCS: @(#) $Id: filename.n,v 1.3.2.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH filename n 7.5 Tcl "Tcl Built-In Commands"
@@ -195,3 +195,6 @@ more than 3 characters.
.SH KEYWORDS
current directory, absolute file name, relative file name,
volume-relative file name, portability
.SH "SEE ALSO"
file(n), glob(n)
+2 -2
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: flush.n,v 1.2 1998/09/14 18:39:52 stanton Exp $
'\" RCS: @(#) $Id: flush.n,v 1.2.18.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH flush n 7.5 Tcl "Tcl Built-In Commands"
@@ -29,7 +29,7 @@ flushed; the remainder will be flushed in the background as fast as the
underlying file or device is able to absorb it.
.SH "SEE ALSO"
open(n), socket(n)
file(n), open(n), socket(n)
.SH KEYWORDS
blocking, buffer, channel, flush, nonblocking, output
+4 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: for.n,v 1.2 1998/09/14 18:39:52 stanton Exp $
'\" RCS: @(#) $Id: for.n,v 1.2.18.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH for n "" Tcl "Tcl Built-In Commands"
@@ -56,5 +56,8 @@ for {set x 0} {$x<10} {incr x} {
}
.CE
.SH "SEE ALSO"
break, continue, foreach, while
.SH KEYWORDS
for, iteration, looping
+5 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: foreach.n,v 1.2 1998/09/14 18:39:52 stanton Exp $
'\" RCS: @(#) $Id: foreach.n,v 1.2.18.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH foreach n "" Tcl "Tcl Built-In Commands"
@@ -82,5 +82,9 @@ foreach i {a b c} {j k} {d e f g} {
# The value of x is "a d e b f g c {} {}"
# There are 3 iterations of the loop.
.DE
.SH "SEE ALSO"
for(n), while(n), break(n), continue(n)
.SH KEYWORDS
foreach, iteration, list, looping
+4 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: format.n,v 1.4 1999/11/19 06:33:58 hobbs Exp $
'\" RCS: @(#) $Id: format.n,v 1.4.2.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH format n 8.1 Tcl "Tcl Built-In Commands"
@@ -210,5 +210,8 @@ converted as if the \fBl\fR modifier were present (i.e. type
If the \fBh\fR modifier is specified then integer values are truncated
to \fBshort\fR before conversion.
.SH "SEE ALSO"
sprintf(3), string(n)
.SH KEYWORDS
conversion specifier, format, sprintf, string, substitution
+2 -2
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: gets.n,v 1.2 1998/09/14 18:39:52 stanton Exp $
'\" RCS: @(#) $Id: gets.n,v 1.2.18.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH gets n 7.5 Tcl "Tcl Built-In Commands"
@@ -44,7 +44,7 @@ The \fBeof\fR and \fBfblocked\fR commands can be used to distinguish
these three cases.
.SH "SEE ALSO"
eof(n), fblocked(n)
file(n), eof(n), fblocked(n)
.SH KEYWORDS
blocking, channel, end of file, end of line, line, nonblocking, read
+3 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: glob.n,v 1.7 2000/01/26 03:37:30 hobbs Exp $
'\" RCS: @(#) $Id: glob.n,v 1.7.2.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH glob n 8.3 Tcl "Tcl Built-In Commands"
@@ -154,6 +154,8 @@ assumes the directory separator for the entire pattern is the standard
``:''. When not using these options, glob examines each pattern argument
and uses ``/'' unless the pattern contains a ``:''.
.SH "SEE ALSO"
file(n)
.SH KEYWORDS
exist, file, glob, pattern
+6 -2
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: global.n,v 1.2 1998/09/14 18:39:53 stanton Exp $
'\" RCS: @(#) $Id: global.n,v 1.2.18.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH global n "" Tcl "Tcl Built-In Commands"
@@ -27,9 +27,13 @@ For the duration of the current procedure
(and only while executing in the current procedure),
any reference to any of the \fIvarname\fRs
will refer to the global variable by the same name.
.PP
Please note that this is done by creating local variables that are
linked to the global variables, and therefore that these variables
will be listed by \fBinfo locals\fR like all other local variables.
.SH "SEE ALSO"
namespace(n), variable(n)
namespace(n), upvar(n), variable(n)
.SH KEYWORDS
global, namespace, procedure, variable
+78 -30
View File
@@ -1,11 +1,11 @@
'\"
'\" Copyright (c) 1995-1997 Sun Microsystems, Inc.
'\" Copyright (c) 1999 by Scriptics Corporation.
'\" Copyright (c) 1998-2000 by Ajuba Solutions.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: http.n,v 1.10 2000/04/09 23:55:54 welch Exp $
'\" RCS: @(#) $Id: http.n,v 1.10.2.5 2002/04/18 16:46:09 dgp Exp $
'\"
.so man.macros
.TH "Http" n 8.3 Tcl "Tcl Built-In Commands"
@@ -14,7 +14,7 @@
.SH NAME
Http \- Client-side implementation of the HTTP/1.0 protocol.
.SH SYNOPSIS
\fBpackage require http ?2.2?\fP
\fBpackage require http ?2.4?\fR
.sp
\fB::http::config \fI?options?\fR
.sp
@@ -32,8 +32,12 @@ Http \- Client-side implementation of the HTTP/1.0 protocol.
.sp
\fB::http::code \fItoken\fR
.sp
\fB::http::ncode \fItoken\fR
.sp
\fB::http::data \fItoken\fR
.sp
\fB::http::error \fItoken\fR
.sp
\fB::http::cleanup \fItoken\fR
.sp
\fB::http::register \fIproto port command\fR
@@ -57,9 +61,8 @@ Its \fIoptions \fR determine whether a GET, POST, or HEAD transaction
is performed.
The return value of \fB::http::geturl\fR is a token for the transaction.
The value is also the name of an array in the ::http namespace
that contains state
information about the transaction. The elements of this array are
described in the STATE ARRAY section.
that contains state information about the transaction. The elements
of this array are described in the STATE ARRAY section.
.PP
If the \fB-command\fP option is specified, then
the HTTP operation is done in the background.
@@ -111,7 +114,7 @@ is \fB"Tcl http client package 2.2."\fR
.RE
.TP
\fB::http::geturl\fP \fIurl\fP ?\fIoptions\fP?
The \fB::http::geturl \fR command is the main procedure in the package.
The \fB::http::geturl\fR command is the main procedure in the package.
The \fB\-query\fR option causes a POST operation and
the \fB\-validate\fR option causes a HEAD operation;
otherwise, a GET operation is performed. The \fB::http::geturl\fR command
@@ -123,13 +126,16 @@ that is invoked when the HTTP transaction completes.
\fB::http::geturl\fR takes several options:
.RS
.TP
\fB\-binary\fP \fIboolean\fP
Specifies whether to force interpreting the url data as binary. Normally
this is auto-detected (anything not beginning with a \fBtext\fR content
type or whose content encoding is \fBgzip\fR or \fBcompress\fR is
considered binary data).
.TP
\fB\-blocksize\fP \fIsize\fP
The blocksize used when reading the URL.
At most
\fIsize\fR
bytes are read at once. After each block, a call to the
\fB\-progress\fR
callback is made (if that option is specified).
At most \fIsize\fR bytes are read at once. After each block, a call to the
\fB\-progress\fR callback is made (if that option is specified).
.TP
\fB\-channel\fP \fIname\fP
Copy the URL contents to channel \fIname\fR instead of saving it in
@@ -262,12 +268,20 @@ any. This sets the \fBstate(status)\fP value to \fIwhy\fP, which defaults to \f
\fB::http::wait\fP \fItoken\fP
This is a convenience procedure that blocks and waits for the
transaction to complete. This only works in trusted code because it
uses \fBvwait\fR.
uses \fBvwait\fR. Also, it's not useful for the case where
\fB::http::geturl\fP is called \fIwithout\fP the \fB-command\fP option
because in this case the \fB::http::geturl\fP call doesn't return
until the HTTP transaction is complete, and thus there's nothing to
wait for.
.TP
\fB::http::data\fP \fItoken\fP
This is a convenience procedure that returns the \fBbody\fP element
(i.e., the URL data) of the state array.
.TP
\fB::http::error\fP \fItoken\fP
This is a convenience procedure that returns the \fBerror\fP element
of the state array.
.TP
\fB::http::status\fP \fItoken\fP
This is a convenience procedure that returns the \fBstatus\fP element of
the state array.
@@ -276,15 +290,24 @@ the state array.
This is a convenience procedure that returns the \fBhttp\fP element of the
state array.
.TP
\fB::http::ncode\fP \fItoken\fP
This is a convenience procedure that returns just the numeric return
code (200, 404, etc.) from the \fBhttp\fP element of the state array.
.TP
\fB::http::size\fP \fItoken\fP
This is a convenience procedure that returns the \fBcurrentsize\fP
element of the state array.
element of the state array, which represents the number of bytes
received from the URL in the \fB::http::geturl\fP call.
.TP
\fB::http::cleanup\fP \fItoken\fP
This procedure cleans up the state associated with the connection
identified by \fItoken\fP. After this call, the procedures
like \fB::http::data\fP cannot be used to get information
about the operation.
about the operation. It is \fIstrongly\fP recommended that you call
this function after you're done with a given HTTP request. Not doing
so will result in memory not being freed, and if your app calls
\fB::http::geturl\fP enough times, the memory leak could cause a
performance hit...or worse.
.TP
\fB::http::register\fP \fIproto port command\fP
This procedure allows one to provide custom HTTP transport types
@@ -309,19 +332,36 @@ registered via \fBhttp::register\fR.
The \fBhttp::geturl\fP procedure will raise errors in the following cases:
invalid command line options,
an invalid URL,
or a URL on a non-existent host,
a URL on a non-existent host,
or a URL at a bad port on an existing host.
These errors mean that it
cannot even start the network transaction.
It will also raise an error if it gets an I/O error while
writing out the HTTP request header.
For synchronous \fB::http::geturl\fP calls (where \fB-command\fP is
not specified), it will raise an error if it gets an I/O error while
reading the HTTP reply headers or data. Because \fB::http::geturl\fP
doesn't return a token in these cases, it does all the required
cleanup and there's no issue of your app having to call
\fB::http::cleanup\fP.
.PP
The \fBhttp::wait\fP procedure will raise errors if an I/O error
occurs while reading the HTTP reply headers or data. If the
\fB-command\fP flag is not passed to \fBhttp::geturl\fP,
then it will call \fBhttp::wait\fP and so these errors will
occur in \fBhttp::geturl\fP.
If you get an error from \fBhttp::wait\fP, you must still call
\fBhttp::cleanup\fP to delete the state array.
For asynchronous \fB::http::geturl\fP calls, all of the above error
situations apply, except that if there's any error while
reading the
HTTP reply headers or data, no exception is thrown. This is because
after writing the HTTP headers, \fB::http::geturl\fP returns, and the
rest of the HTTP transaction occurs in the background. The command
callback can check if any error occurred during the read by calling
\fB::http::status\fP to check the status and if it's \fIerror\fP,
calling \fB::http::error\fP to get the error message.
.PP
Alternatively, if the main program flow reaches a point where it needs
to know the result of the asynchronous HTTP request, it can call
\fB::http::wait\fP and then check status and error, just as the
callback does.
.PP
In any case, you must still call
\fBhttp::cleanup\fP to delete the state array when you're done.
.PP
There are other possible results of the HTTP transaction
determined by examining the status from \fBhttp::status\fP.
@@ -336,12 +376,11 @@ procedure returns a value like "HTTP 404 File not found".
.TP
eof
If the server closes the socket without replying, then no error
is rasied, but the status of the transaction will be \fBeof\fP.
is raised, but the status of the transaction will be \fBeof\fP.
.TP
error
In this case \fBhttp::wait\fP should have raised an error.
The error message will also be stored in the \fBerror\fP status
array element.
array element, accessible via \fB::http::error\fP.
.PP
Another error possibility is that \fBhttp::geturl\fP is unable to
write all the post query data to the server before the server
@@ -371,6 +410,15 @@ the array are supported:
The contents of the URL. This will be empty if the \fB\-channel\fR
option has been specified. This value is returned by the \fB::http::data\fP command.
.TP
\fBcharset\fR
The value of the charset attribute from the \fBContent-Type\fR meta-data
value. If none was specified, this defaults to the RFC standard
\fBiso8859-1\fR, or the value of \fB$::http::defaultCharset\fR. Incoming
text data will be automatically converted from this charset to utf-8.
.TP
\fBcoding\fR
A copy of the \fBContent-Encoding\fR meta-data value.
.TP
\fBcurrentsize\fR
The current number of bytes fetched from the URL.
This value is returned by the \fB::http::size\fP command.
@@ -424,7 +472,8 @@ the post query data to the server.
.TP
\fBstatus\fR
Either \fBok\fR, for successful completion, \fBreset\fR for
user-reset, or \fBerror\fR for an error condition. During the
user-reset, \fBtimeout\fP if a timeout occurred before the transaction
could complete, or \fBerror\fR for an error condition. During the
transaction this value is the empty string.
.TP
\fBtotalsize\fR
@@ -468,11 +517,10 @@ proc ::http::copy { url file {chunk 4096} } {
proc ::http::Progress {args} {
puts -nonewline stderr . ; flush stderr
}
.DE
.SH "SEE ALSO"
safe(n), socket(n), safesock(n)
.SH KEYWORDS
security policy, socket
+4 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: if.n,v 1.2 1998/09/14 18:39:53 stanton Exp $
'\" RCS: @(#) $Id: if.n,v 1.2.18.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH if n "" Tcl "Tcl Built-In Commands"
@@ -39,5 +39,8 @@ The return value from the command is the result of the body script
that was executed, or an empty string
if none of the expressions was non-zero and there was no \fIbodyN\fR.
.SH "SEE ALSO"
expr(n), for(n), foreach(n)
.SH KEYWORDS
boolean, conditional, else, false, if, true
+4 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: incr.n,v 1.2 1998/09/14 18:39:53 stanton Exp $
'\" RCS: @(#) $Id: incr.n,v 1.2.18.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH incr n "" Tcl "Tcl Built-In Commands"
@@ -27,5 +27,8 @@ integer) is added to the value of variable \fIvarName\fR; otherwise
The new value is stored as a decimal string in variable \fIvarName\fR
and also returned as result.
.SH "SEE ALSO"
expr(n)
.SH KEYWORDS
add, increment, variable, value
+4 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: join.n,v 1.2 1998/09/14 18:39:53 stanton Exp $
'\" RCS: @(#) $Id: join.n,v 1.2.18.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH join n "" Tcl "Tcl Built-In Commands"
@@ -25,5 +25,8 @@ formed by joining all of the elements of \fIlist\fR together with
\fIjoinString\fR separating each adjacent pair of elements.
The \fIjoinString\fR argument defaults to a space character.
.SH "SEE ALSO"
list(n), lappend(n)
.SH KEYWORDS
element, join, list, separator
+4 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: lappend.n,v 1.2 1998/09/14 18:39:53 stanton Exp $
'\" RCS: @(#) $Id: lappend.n,v 1.2.18.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH lappend n "" Tcl "Tcl Built-In Commands"
@@ -31,5 +31,8 @@ large lists. For example, ``\fBlappend a $b\fR'' is much
more efficient than ``\fBset a [concat $a [list $b]]\fR'' when
\fB$a\fR is long.
.SH "SEE ALSO"
list(n), lindex(n), linsert(n), llength(n), lsort(n), lrange(n)
.SH KEYWORDS
append, element, list, variable
+4 -3
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: library.n,v 1.13 2000/04/28 00:47:49 ericm Exp $
'\" RCS: @(#) $Id: library.n,v 1.11.2.3 2001/08/24 16:19:09 dgp Exp $
.so man.macros
.TH library n "8.0" Tcl "Tcl Built-In Commands"
.BS
@@ -81,7 +81,8 @@ the imported commands specified by \fIpattern\fR reside in an
autoloaded library. If so, the commands are loaded so that they will
be available to the interpreter for creating the import links. If the
commands do not reside in an autoloaded library, \fBauto_import\fR
does nothing.
does nothing. The pattern matching is performed according to the
matching rules of \fBnamespace import\fR.
.TP
\fBauto_load \fIcmd\fR
This command attempts to load the definition for a Tcl command named
@@ -304,7 +305,7 @@ infinitely.
The variable is unset before \fBunknown\fR returns.
.SH "SEE ALSO"
re_syntax(n)
info(n), re_syntax(n)
.SH KEYWORDS
auto-exec, auto-load, library, unknown, word, whitespace
+4 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: lindex.n,v 1.4 1999/09/21 04:20:36 hobbs Exp $
'\" RCS: @(#) $Id: lindex.n,v 1.4.2.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH lindex n 8.2 Tcl "Tcl Built-In Commands"
@@ -32,6 +32,9 @@ If \fIindex\fR has the value \fBend\fR, it refers to the last element
in the list, and \fBend\-\fIinteger\fR refers to the last element in
the list minus the specified integer offset.
.SH "SEE ALSO"
list(n), lappend(n), linsert(n), llength(n), lsearch(n), lsort(n),
lrange(n), lreplace(n)
.SH KEYWORDS
element, index, list
+4 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: linsert.n,v 1.3 1999/09/21 04:20:36 hobbs Exp $
'\" RCS: @(#) $Id: linsert.n,v 1.3.2.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH linsert n 8.2 Tcl "Tcl Built-In Commands"
@@ -29,5 +29,8 @@ elements in the list, then the new elements are appended to the list.
\fBend\-\fIinteger\fR refers to the last element in the list minus the
specified integer offset.
.SH "SEE ALSO"
list(n), lappend(n), llength(n)
.SH KEYWORDS
element, insert, list
+6 -2
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: list.n,v 1.2 1998/09/14 18:39:53 stanton Exp $
'\" RCS: @(#) $Id: list.n,v 1.2.18.2 2001/12/05 22:27:25 dgp Exp $
'\"
.so man.macros
.TH list n "" Tcl "Tcl Built-In Commands"
@@ -21,7 +21,7 @@ list \- Create a list
.PP
This command returns a list comprised of all the \fIarg\fRs,
or an empty string if no \fIarg\fRs are specified.
Braces and backslashes get added as necessary, so that the \fBindex\fR command
Braces and backslashes get added as necessary, so that the \fBlindex\fR command
may be used on the result to re-extract the original arguments, and also
so that \fBeval\fR may be used to execute the resulting list, with
\fIarg1\fR comprising the command's name and the other \fIarg\fRs comprising
@@ -41,5 +41,9 @@ while \fBconcat\fR with the same arguments will return
\fBa b c d e f {g h}\fR
.CE
.SH "SEE ALSO"
lappend(n), lindex(n), linsert(n), llength(n), lsearch(n), lsort(n),
lrange(n), lreplace(n)
.SH KEYWORDS
element, list
+4 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: llength.n,v 1.2 1998/09/14 18:39:53 stanton Exp $
'\" RCS: @(#) $Id: llength.n,v 1.2.18.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH llength n "" Tcl "Tcl Built-In Commands"
@@ -22,5 +22,8 @@ llength \- Count the number of elements in a list
Treats \fIlist\fR as a list and returns a decimal string giving
the number of elements in it.
.SH "SEE ALSO"
list(n), lindex(n), lrange(n)
.SH KEYWORDS
element, list, length
+2 -2
View File
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: load.n,v 1.5 2000/04/14 23:01:55 hobbs Exp $
'\" RCS: @(#) $Id: load.n,v 1.5.2.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH load n 7.5 Tcl "Tcl Built-In Commands"
@@ -129,7 +129,7 @@ behavior of this varies from system to system (some systems may
detect the redundant loads, others may not).
.SH "SEE ALSO"
\fBinfo sharedlibextension\fR, Tcl_StaticPackage, safe(n)
\fBinfo sharedlibextension\fR, Tcl_StaticPackage(3), safe(n)
.SH KEYWORDS
binary code, loading, safe interpreter, shared library
+4 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: lrange.n,v 1.2 1998/09/14 18:39:53 stanton Exp $
'\" RCS: @(#) $Id: lrange.n,v 1.2.18.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH lrange n 7.4 Tcl "Tcl Built-In Commands"
@@ -35,5 +35,8 @@ same result as ``\fBlindex \fIlist first\fR'' (although it often does
for simple fields that aren't enclosed in braces); it does, however,
produce exactly the same results as ``\fBlist [lindex \fIlist first\fB]\fR''
.SH "SEE ALSO"
lappend(n), lindex(n), linsert(n), list(n), llength(n), lreplace(n)
.SH KEYWORDS
element, list, range, sublist
+5 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: lreplace.n,v 1.4 2000/01/21 18:24:06 ericm Exp $
'\" RCS: @(#) $Id: lreplace.n,v 1.4.2.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH lreplace n 7.4 Tcl "Tcl Built-In Commands"
@@ -43,5 +43,9 @@ the list. If no \fIelement\fR arguments are specified, then the elements
between \fIfirst\fR and \fIlast\fR are simply deleted. If \fIlist\fR
is empty, any \fIelement\fR arguments are added to the end of the list.
.SH "SEE ALSO"
lappend(n), lindex(n), linsert(n), list(n), llength(n), lrange(n),
lsearch(n), lsort(n)
.SH KEYWORDS
element, list, replace
+107 -8
View File
@@ -6,7 +6,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: lsort.n,v 1.5 1999/12/21 23:57:33 hobbs Exp $
'\" RCS: @(#) $Id: lsort.n,v 1.5.2.2 2001/10/08 15:50:24 dkf Exp $
'\"
.so man.macros
.TH lsort n 8.3 Tcl "Tcl Built-In Commands"
@@ -65,19 +65,33 @@ Sort the list in decreasing order (``largest'' items first).
.TP 20
\fB\-index\0\fIindex\fR
If this option is specified, each of the elements of \fIlist\fR must
itself be a proper Tcl sublist. Instead of sorting based on whole sublists,
\fBlsort\fR will extract the \fIindex\fR'th element from each sublist
and sort based on the given element. The keyword \fBend\fP is allowed
for the \fIindex\fP to sort on the last sublist element. For example,
itself be a proper Tcl sublist. Instead of sorting based on whole
sublists, \fBlsort\fR will extract the \fIindex\fR'th element from
each sublist and sort based on the given element. The keyword
\fBend\fP is allowed for the \fIindex\fP to sort on the last sublist
element,
.VS 8.3.4
and \fBend-\fIindex\fR sorts on a sublist element offset from
the end.
.VE
For example,
.RS
.CS
lsort -integer -index 1 {{First 24} {Second 18} {Third 30}}
.CE
returns \fB{Second 18} {First 24} {Third 30}\fR.
returns \fB{Second 18} {First 24} {Third 30}\fR, and
.VS 8.3.4
'\"
'\" This example is from the test suite!
'\"
.CS
lsort -index end-1 {{a 1 e i} {b 2 3 f g} {c 4 5 6 d h}}
.CE
returns \fB{c 4 5 6 d h} {a 1 e i} {b 2 3 f g}\fR.
.VE
This option is much more efficient than using \fB\-command\fR
to achieve the same effect.
.RE
.VS 8.3
.TP 20
\fB\-unique\fR
If this option is specified, then only the last set of duplicate
@@ -86,7 +100,92 @@ determined relative to the comparison used in the sort. Thus if
\fI-index 0\fR is used, \fB{1 a}\fR and \fB{1 b}\fR would be
considered duplicates and only the second element, \fB{1 b}\fR, would
be retained.
.VE
.SH "NOTES"
.PP
The options to \fBlsort\fR only control what sort of comparison is
used, and do not necessarily constrain what the values themselves
actually are. This distinction is only noticeable when the list to be
sorted has fewer than two elements.
.PP
The \fBlsort\fR command is reentrant, meaning it is safe to use as
part of the implementation of a command used in the \fB\-command\fR
option.
.SH "EXAMPLES"
.PP
Sorting a list using ASCII sorting:
.CS
% lsort {a10 B2 b1 a1 a2}
B2 a1 a10 a2 b1
.CE
.PP
Sorting a list using Dictionary sorting:
.CS
% lsort -dictionary {a10 B2 b1 a1 a2}
a1 a2 a10 b1 B2
.CE
.PP
Sorting lists of integers:
.CS
% lsort -integer {5 3 1 2 11 4}
1 2 3 4 5 11
% lsort -integer {1 2 0x5 7 0 4 -1}
-1 0 1 2 4 0x5 7
.CE
.PP
Sorting lists of floating-point numbers:
.CS
% lsort -real {5 3 1 2 11 4}
1 2 3 4 5 11
% lsort -real {.5 0.07e1 0.4 6e-1}
0.4 .5 6e-1 0.07e1
.CE
.PP
Sorting using indices:
.CS
% # Note the space character before the c
% lsort {{a 5} { c 3} {b 4} {e 1} {d 2}}
{ c 3} {a 5} {b 4} {d 2} {e 1}
% lsort -index 0 {{a 5} { c 3} {b 4} {e 1} {d 2}}
{a 5} {b 4} { c 3} {d 2} {e 1}
% lsort -index 1 {{a 5} { c 3} {b 4} {e 1} {d 2}}
{e 1} {d 2} { c 3} {b 4} {a 5}
.CE
.PP
Stripping duplicate values using sorting:
.CS
% lsort -unique {a b c a b c a b c}
a b c
.CE
.PP
More complex sorting using a comparison function:
.CS
% proc compare {a b} {
set a0 [lindex $a 0]
set b0 [lindex $b 0]
if {$a0 < $b0} {
return -1
} elseif {$a0 > $b0} {
return 1
}
return [string compare [lindex $a 1] [lindex $b 1]]
}
% lsort -command compare \\
{{3 apple} {0x2 carrot} {1 dingo} {2 banana}}
{1 dingo} {2 banana} {0x2 carrot} {3 apple}
.CE
.SH "SEE ALSO"
lappend(n), lindex(n), linsert(n), list(n), llength(n), lrange(n),
lreplace(n), lsearch(n)
.SH KEYWORDS
element, list, order, sort
+2 -2
View File
@@ -59,7 +59,7 @@
'\" .UL arg1 arg2
'\" Print arg1 underlined, then print arg2 normally.
'\"
'\" RCS: @(#) $Id: man.macros,v 1.3 1999/04/16 00:46:35 stanton Exp $
'\" RCS: @(#) $Id: man.macros,v 1.3.12.1 2001/04/03 22:06:43 hobbs Exp $
'\"
'\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
.if t .wh -1.3i ^B
@@ -199,7 +199,7 @@
.SH "STANDARD OPTIONS"
.LP
.nf
.ta 4c 8c 12c
.ta 5.5c 11c
.ft B
..
'\" # SE - end of list of standard options
+1 -3
View File
@@ -3,7 +3,7 @@
'\" Copyright (c) 2000 by Scriptics Corporation.
'\" All rights reserved.
'\"
'\" RCS: @(#) $Id: memory.n,v 1.2 2000/04/28 00:47:49 ericm Exp $
'\" RCS: @(#) $Id: memory.n,v 1.2.2.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH memory n 8.1 Tcl "Tcl Built-In Commands"
@@ -78,5 +78,3 @@ ckalloc, ckfree, Tcl_ValidateAllMemory, Tcl_DumpActiveMemory, TCL_MEM_DEBUG
.SH KEYWORDS
memory, debug
+4
View File
@@ -13,6 +13,10 @@
.SH NAME
msgcat \- Tcl message catalog
.SH SYNOPSIS
\fBpackage require Tcl 8.2\fR
.sp
\fBpackage require msgcat 1.1\fR
.sp
\fB::msgcat::mc \fIsrc-string\fR
.sp
\fB::msgcat::mclocale \fR?\fInewLocale\fR?
+17 -3
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: open.n,v 1.9 1999/12/21 23:57:33 hobbs Exp $
'\" RCS: @(#) $Id: open.n,v 1.9.2.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH open n 7.6 Tcl "Tcl Built-In Commands"
@@ -108,6 +108,18 @@ If a new file is created as part of opening it, \fIpermissions\fR
(an integer) is used to set the permissions for the new file in
conjunction with the process's file mode creation mask.
\fIPermissions\fR defaults to 0666.
.PP
'\" Not versioned as advice applies to all recent versions of Tcl.
'\" Prior to that, Tcl didn't really support binary files anyway...
.VS
Note that if you are going to be reading or writing binary data from
the channel created by this command, you should use the
\fBfconfigure\fR command to change the \fB-translation\fR option of
the channel to \fBbinary\fR before transferring any binary data. This
is in contrast to the ``b'' character passed as part of the equivalent
of the \fIaccess\fR parameter to some versions of the C library
\fIfopen()\fR function.
.VE
.SH "COMMAND PIPELINES"
.PP
If the first character of \fIfileName\fR is ``|'' then the
@@ -251,9 +263,11 @@ input, but is redirected from a file, then the above problem does not occur.
See the PORTABILITY ISSUES section of the \fBexec\fR command for additional
information not specific to command pipelines about executing
applications on the various platforms
.SH "SEE ALSO"
close(n), filename(n), gets(n), read(n), puts(n), exec(n)
.VE
file(n), close(n), filename(n), fconfigure(n), gets(n), read(n),
puts(n), exec(n), fopen(1)
.SH KEYWORDS
access mode, append, create, file, non-blocking, open, permissions,
pipeline, process, serial
+7 -4
View File
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: package.n,v 1.3 1999/03/10 05:52:45 stanton Exp $
'\" RCS: @(#) $Id: package.n,v 1.3.14.2 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH package n 7.5 Tcl "Tcl Built-In Commands"
@@ -14,7 +14,7 @@
package \- Facilities for package loading and version control
.SH SYNOPSIS
.nf
\fBpackage forget \fIpackage\fR
\fBpackage forget ?\fIpackage package ...\fR?
\fBpackage ifneeded \fIpackage version\fR ?\fIscript\fR?
\fBpackage names\fR
\fBpackage present \fR?\fB\-exact\fR? \fIpackage \fR?\fIversion\fR?
@@ -43,8 +43,8 @@ primarily by system scripts that maintain the package database.
The behavior of the \fBpackage\fR command is determined by its first argument.
The following forms are permitted:
.TP
\fBpackage forget \fIpackage\fR
Removes all information about \fIpackage\fR from this interpreter,
\fBpackage forget ?\fIpackage package ...\fR?
Removes all information about each specified package from this interpreter,
including information provided by both \fBpackage ifneeded\fR and
\fBpackage provide\fR.
.TP
@@ -189,5 +189,8 @@ Once you've done this, packages will be loaded automatically
in response to \fBpackage require\fR commands.
See the documentation for \fBpkg_mkIndex\fR for details.
.SH "SEE ALSO"
msgcat(n), packagens(n), pkgMkIndex(n)
.SH KEYWORDS
package, version
+4 -1
View File
@@ -2,7 +2,7 @@
'\" Copyright (c) 1998-2000 by Scriptics Corporation.
'\" All rights reserved.
'\"
'\" RCS: @(#) $Id: packagens.n,v 1.2 2000/02/10 10:09:18 hobbs Exp $
'\" RCS: @(#) $Id: packagens.n,v 1.2.2.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH pkg::create n 8.3 Tcl "Tcl Built-In Commands"
@@ -48,5 +48,8 @@ specified.
.PP
At least one \fB\-load\fR or \fB\-source\fR paramter must be given.
.SH "SEE ALSO"
package(n)
.SH KEYWORDS
auto-load, index, package, version
+4 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: pid.n,v 1.2 1998/09/14 18:39:54 stanton Exp $
'\" RCS: @(#) $Id: pid.n,v 1.2.18.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH pid n 7.0 Tcl "Tcl Built-In Commands"
@@ -30,5 +30,8 @@ If no \fIfileId\fR argument is given then \fBpid\fR returns the process
identifier of the current process.
All process identifiers are returned as decimal strings.
.SH "SEE ALSO"
exec(n), open(n)
.SH KEYWORDS
file, pipeline, process identifier
+9 -2
View File
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: pkgMkIndex.n,v 1.9 2000/02/10 10:09:18 hobbs Exp $
'\" RCS: @(#) $Id: pkgMkIndex.n,v 1.9.2.2 2001/08/24 16:19:09 dgp Exp $
'\"
.so man.macros
.TH pkg_mkIndex n 8.3 Tcl "Tcl Built-In Commands"
@@ -15,7 +15,7 @@ pkg_mkIndex \- Build an index for automatic loading of packages
.SH SYNOPSIS
.nf
.VS 8.3.0
\fBpkg_mkIndex ?\fI\-lazy\fR? ?\fI\-load pkgPat\fR? ?\fI\-verbose\fR? \fIdir\fR ?\fIpattern pattern ...\fR?
\fBpkg_mkIndex ?\fI\-direct\fR? ?\fI\-lazy\fR? ?\fI\-load pkgPat\fR? ?\fI\-verbose\fR? \fIdir\fR ?\fIpattern pattern ...\fR?
.VE
.fi
.BE
@@ -102,6 +102,10 @@ interpreters.
.SH OPTIONS
The optional switches are:
.TP 15
\fB\-direct\fR
The generated index will implement direct loading of the package
upon \fBpackage require\fR. This is the default.
.TP 15
\fB\-lazy\fR
The generated index will manage to delay loading the package until the
use of one of the commands provided by the package, instead of loading
@@ -232,5 +236,8 @@ If you must use \fB\-load\fP,
then you must specify the scripts first; otherwise the package loaded from
the binary file may mask the package defined by the scripts.
.SH "SEE ALSO"
package(n)
.SH KEYWORDS
auto-load, index, package, version
+4 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: proc.n,v 1.2 1998/09/14 18:39:54 stanton Exp $
'\" RCS: @(#) $Id: proc.n,v 1.2.18.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH proc n "" Tcl "Tcl Built-In Commands"
@@ -70,5 +70,8 @@ executed in the procedure's body.
If an error occurs while executing the procedure
body, then the procedure-as-a-whole will return that same error.
.SH "SEE ALSO"
info(n), unknown(n)
.SH KEYWORDS
argument, procedure
+2 -2
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: puts.n,v 1.3 1999/04/16 00:46:35 stanton Exp $
'\" RCS: @(#) $Id: puts.n,v 1.3.12.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH puts n 7.5 Tcl "Tcl Built-In Commands"
@@ -63,7 +63,7 @@ be used in an event-driven fashion with the \fBfileevent\fR command
via a file event that the channel is ready for more output data).
.SH "SEE ALSO"
fileevent(n)
file(n), fileevent(n)
.SH KEYWORDS
channel, newline, output, write
+4 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: pwd.n,v 1.2 1998/09/14 18:39:54 stanton Exp $
'\" RCS: @(#) $Id: pwd.n,v 1.2.18.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH pwd n "" Tcl "Tcl Built-In Commands"
@@ -21,5 +21,8 @@ pwd \- Return the current working directory
.PP
Returns the path name of the current working directory.
.SH "SEE ALSO"
file(n), cd(n), glob(n), filename(n)
.SH KEYWORDS
working directory
+2 -2
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: read.n,v 1.4 1999/05/05 01:19:42 stanton Exp $
'\" RCS: @(#) $Id: read.n,v 1.4.12.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH read n 8.1 Tcl "Tcl Built-In Commands"
@@ -52,7 +52,7 @@ See the \fBfconfigure\fR manual entry for a discussion on ways in
which \fBfconfigure\fR will alter input.
.SH "SEE ALSO"
eof(n), fblocked(n), fconfigure(n)
file(n), eof(n), fblocked(n), fconfigure(n)
.SH KEYWORDS
blocking, channel, end of line, end of file, nonblocking, read, translation, encoding
+2 -2
View File
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: regexp.n,v 1.9 2000/04/14 06:42:32 hobbs Exp $
'\" RCS: @(#) $Id: regexp.n,v 1.9.2.1 2001/04/03 22:06:43 hobbs Exp $
'\"
.so man.macros
.TH regexp n 8.3 Tcl "Tcl Built-In Commands"
@@ -127,7 +127,7 @@ portion of the expression that wasn't matched), then the corresponding
has been specified or to an empty string otherwise.
.SH "SEE ALSO"
re_syntax(n)
re_syntax(n), regsub(n)
.SH KEYWORDS
match, regular expression, string
+31 -4
View File
@@ -1,11 +1,12 @@
'\"
'\" Copyright (c) 1993 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\" Copyright (c) 2000 Scriptics Corporation.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: regsub.n,v 1.4 1999/09/21 04:20:36 hobbs Exp $
'\" RCS: @(#) $Id: regsub.n,v 1.4.2.2 2001/04/03 22:06:44 hobbs Exp $
'\"
.so man.macros
.TH regsub n 8.3 Tcl "Tcl Built-In Commands"
@@ -55,6 +56,31 @@ matching range is found and substituted.
If \fB\-all\fR is specified, then ``&'' and ``\e\fIn\fR''
sequences are handled for each substitution using the information
from the corresponding match.
.TP 15
\fB\-expanded\fR
Enables use of the expanded regular expression syntax where
whitespace and comments are ignored. This is the same as specifying
the \fB(?x)\fR embedded option (see METASYNTAX, below).
.TP 15
\fB\-line\fR
Enables newline-sensitive matching. By default, newline is a
completely ordinary character with no special meaning. With this
flag, `[^' bracket expressions and `.' never match newline, `^'
matches an empty string after any newline in addition to its normal
function, and `$' matches an empty string before any newline in
addition to its normal function. This flag is equivalent to
specifying both \fB\-linestop\fR and \fB\-lineanchor\fR, or the
\fB(?n)\fR embedded option (see METASYNTAX, below).
.TP 15
\fB\-linestop\fR
Changes the behavior of `[^' bracket expressions and `.' so that they
stop at newlines. This is the same as specifying the \fB(?p)\fR
embedded option (see METASYNTAX, below).
.TP 15
\fB\-lineanchor\fR
Changes the behavior of `^' and `$' (the ``anchors'') so they match the
beginning and end of a line respectively. This is the same as
specifying the \fB(?w)\fR embedded option (see METASYNTAX, below).
.TP 10
\fB\-nocase\fR
Upper-case characters in \fIstring\fR will be converted to lower-case
@@ -66,9 +92,7 @@ by \fIsubSpec\fR use the original unconverted form of \fIstring\fR.
Specifies a character index offset into the string to start
matching the regular expression at. When using this switch, `^'
will not match the beginning of the line, and \\A will still
match the start of the string at \fIindex\fR. If \fB\-indices\fR
is specified, the indices will be indexed starting from the
absolute beginning of the input string.
match the start of the string at \fIindex\fR.
\fIindex\fR will be constrained to the bounds of the input string.
.VE 8.3
.TP 10
@@ -81,5 +105,8 @@ were found and replaced.
See the manual entry for \fBregexp\fR for details on the interpretation
of regular expressions.
.SH "SEE ALSO"
regexp(n), re_syntax(n)
.SH KEYWORDS
match, pattern, regular expression, substitute
+4 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: rename.n,v 1.2 1998/09/14 18:39:54 stanton Exp $
'\" RCS: @(#) $Id: rename.n,v 1.2.18.1 2001/04/03 22:06:44 hobbs Exp $
'\"
.so man.macros
.TH rename n "" Tcl "Tcl Built-In Commands"
@@ -28,5 +28,8 @@ If a command is renamed into a different namespace,
future invocations of it will execute in the new namespace.
The \fBrename\fR command returns an empty string as result.
.SH "SEE ALSO"
namespace(n), proc(n)
.SH KEYWORDS
command, delete, namespace, rename
+2 -2
View File
@@ -3,7 +3,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\" RCS: @(#) $Id: resource.n,v 1.5 1999/08/21 19:40:48 hobbs Exp $
'\" RCS: @(#) $Id: resource.n,v 1.5.2.1 2001/04/03 22:06:44 hobbs Exp $
'\"
.so man.macros
.TH resource n 8.0 Tcl "Tcl Built-In Commands"
@@ -149,7 +149,7 @@ numbers if the name is NULL.
The resource command is only available on Macintosh.
.SH "SEE ALSO"
open
open(n)
.SH KEYWORDS
open, resource
+4 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: return.n,v 1.2 1998/09/14 18:39:54 stanton Exp $
'\" RCS: @(#) $Id: return.n,v 1.2.18.1 2001/04/03 22:06:44 hobbs Exp $
'\"
.so man.macros
.TH return n 7.0 Tcl "Tcl Built-In Commands"
@@ -85,5 +85,8 @@ a value for the \fBerrorCode\fR variable.
If the option is not specified then \fBerrorCode\fR will
default to \fBNONE\fR.
.SH "SEE ALSO"
break(n), continue(n), error(n), proc(n)
.SH KEYWORDS
break, continue, error, procedure, return
+17 -15
View File
@@ -1,11 +1,12 @@
'\"
'\" Copyright (c) 1993 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\" Copyright (c) 2000 Scriptics Corporation.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: scan.n,v 1.4 1999/11/19 06:33:59 hobbs Exp $
'\" RCS: @(#) $Id: scan.n,v 1.4.2.3 2001/04/03 22:06:44 hobbs Exp $
'\"
.so man.macros
.TH scan n 8.3 Tcl "Tcl Built-In Commands"
@@ -14,7 +15,7 @@
.SH NAME
scan \- Parse string using conversion specifiers in the style of sscanf
.SH SYNOPSIS
\fBscan \fIstring format varName \fR?\fIvarName ...\fR?
\fBscan \fIstring format \fR?\fIvarName varName ...\fR?
.BE
.SH INTRODUCTION
@@ -47,9 +48,7 @@ When a \fB%\fR is encountered in \fIformat\fR, it indicates
the start of a conversion specifier.
A conversion specifier contains up to four fields after the \fB%\fR:
a \fB*\fR, which indicates that the converted value is to be discarded
.VS 8.1
instead of assigned to a variable; a XPG3 position specifier; a number
.VE 8.1
indicating a maximum field width; and a conversion character.
All of these fields are optional except for the conversion character.
The fields that are present must appear in the order given above.
@@ -60,7 +59,6 @@ specifier is \fB[\fR or \fBc\fR).
Then it converts the next input characters according to the
conversion specifier and stores the result in the variable given
by the next argument to \fBscan\fR.
.VS 8.1
.PP
If the \fB%\fR is followed by a decimal number and a \fB$\fR, as in
``\fB%2$d\fR'', then the variable to use is not taken from the next
@@ -71,7 +69,6 @@ specifiers must be positional. Every \fIvarName\fR on the argument
list must correspond to exactly one conversion specifier or an error
is generated, or in the inline case, any position can be specified
at most once and the empty positions will be filled in with empty strings.
.VE 8.1
.PP
The following conversion characters are supported:
.TP 10
@@ -82,11 +79,20 @@ It is read in and the value is stored in the variable as a decimal string.
\fBo\fR
The input field must be an octal integer. It is read in and the
value is stored in the variable as a decimal string.
.VS 8.4
If the value exceeds MAX_INT (017777777777 on platforms using 32-bit
integers), it will be truncated to a signed integer. Hence, 037777777777
will appear as -1 on a 32-bit machine.
.VE 8.4
.TP 10
\fBx\fR
The input field must be a hexadecimal integer. It is read in
and the value is stored in the variable as a decimal string.
.VS 8.1
.VS 8.4
If the value exceeds MAX_INT (0x7FFFFFFF on platforms using 32-bit
integers), it will be truncated to a signed integer. Hence, 0xFFFFFFFF
will appear as -1 on a 32-bit machine.
.VE 8.4
.TP 10
\fBu\fR
The input field must be a decimal integer. The value is stored in the
@@ -96,7 +102,6 @@ variable as an unsigned decimal integer string.
The input field must be an integer. The base (i.e. decimal, octal, or
hexadecimal) is determined in the same fashion as described in
\fBexpr\fR. The value is stored in the variable as a decimal string.
.VE 8.1
.TP 10
\fBc\fR
A single character is read in and its binary value is stored in
@@ -126,13 +131,11 @@ The matching string is stored in the variable.
If the first character between the brackets is a \fB]\fR then
it is treated as part of \fIchars\fR rather than the closing
bracket for the set.
.VS 8.1
If \fIchars\fR
contains a sequence of the form \fIa\fB\-\fIb\fR then any
character between \fIa\fR and \fIb\fR (inclusive) will match.
If the first or last character between the brackets is a \fB\-\fR, then
it is treated as part of \fIchars\fR rather than indicating a range.
.VE 8.1
.TP 10
\fB[^\fIchars\fB]\fR
The input field consists of any number of characters not in
@@ -141,7 +144,6 @@ The matching string is stored in the variable.
If the character immediately following the \fB^\fR is a \fB]\fR then it is
treated as part of the set rather than the closing bracket for
the set.
.VS 8.1
If \fIchars\fR
contains a sequence of the form \fIa\fB\-\fIb\fR then any
character between \fIa\fR and \fIb\fR (inclusive) will be excluded
@@ -152,7 +154,6 @@ it is treated as part of \fIchars\fR rather than indicating a range.
\fBn\fR
No input is consumed from the input string. Instead, the total number
of chacters scanned from the input string so far is stored in the variable.
.VE 8.1
.LP
The number of characters read from the input for a conversion is the
largest number that makes sense for that particular conversion (e.g.
@@ -168,10 +169,8 @@ then no variable is assigned and the next scan argument is not consumed.
.PP
The behavior of the \fBscan\fR command is the same as the behavior of
the ANSI C \fBsscanf\fR procedure except for the following differences:
.VS 8.1
.IP [1]
\fB%p\fR conversion specifier is not currently supported.
.VE 8.1
.IP [2]
For \fB%c\fR conversions a single character value is
converted to a decimal string, which is then assigned to the
@@ -183,11 +182,14 @@ values are always converted as if there were no modifier present
and real values are always converted as if the \fBl\fR modifier
were present (i.e. type \fBdouble\fR is used for the internal
representation).
.VS 8.3
.IP [4]
.VS 8.3
If the end of the input string is reached before any conversions have been
performed and no variables are given, and empty string is returned.
.VE 8.3
.SH "SEE ALSO"
format(n), sscanf(3)
.SH KEYWORDS
conversion specifier, parse, scan
+4 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: seek.n,v 1.3 1999/05/05 01:19:43 stanton Exp $
'\" RCS: @(#) $Id: seek.n,v 1.3.12.1 2001/04/03 22:06:44 hobbs Exp $
'\"
.so man.macros
.TH seek n 8.1 Tcl "Tcl Built-In Commands"
@@ -57,5 +57,8 @@ offsets. Both \fBseek\fR and \fBtell\fR operate in terms of bytes,
not characters, unlike \fBread\fR.
.VE 8.1
.SH "SEE ALSO"
file(n), open(n), close(n), gets(n), tell(n)
.SH KEYWORDS
access position, file, seek
+4 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: set.n,v 1.2 1998/09/14 18:39:55 stanton Exp $
'\" RCS: @(#) $Id: set.n,v 1.2.18.1 2001/04/03 22:06:44 hobbs Exp $
'\"
.so man.macros
.TH set n "" Tcl "Tcl Built-In Commands"
@@ -44,5 +44,8 @@ was invoked to declare \fIvarName\fR to be global,
or unless a \fBvariable\fR command
was invoked to declare \fIvarName\fR to be a namespace variable.
.SH "SEE ALSO"
expr(n), proc(n), trace(n), unset(n)
.SH KEYWORDS
read, write, variable
+4 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: split.n,v 1.2 1998/09/14 18:39:55 stanton Exp $
'\" RCS: @(#) $Id: split.n,v 1.2.18.1 2001/04/03 22:06:44 hobbs Exp $
'\"
.so man.macros
.TH split n "" Tcl "Tcl Built-In Commands"
@@ -40,5 +40,8 @@ returns \fB"comp unix misc"\fR and
.CE
returns \fB"H e l l o { } w o r l d"\fR.
.SH "SEE ALSO"
join(n), list(n), string(n)
.SH KEYWORDS
list, split, string
+4 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: string.n,v 1.13 1999/12/21 23:57:34 hobbs Exp $
'\" RCS: @(#) $Id: string.n,v 1.13.2.1 2001/04/03 22:06:44 hobbs Exp $
'\"
.so man.macros
.TH string n 8.1 Tcl "Tcl Built-In Commands"
@@ -334,5 +334,8 @@ or underscore (Unicode connector punctuation) characters, or any
single character other than these.
.VE 8.1
.SH "SEE ALSO"
expr(n), list(n)
.SH KEYWORDS
case conversion, compare, index, match, pattern, string, word, equal, ctype
+4 -1
View File
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: subst.n,v 1.2 1998/09/14 18:39:55 stanton Exp $
'\" RCS: @(#) $Id: subst.n,v 1.2.18.1 2001/04/03 22:06:44 hobbs Exp $
'\"
.so man.macros
.TH subst n 7.4 Tcl "Tcl Built-In Commands"
@@ -44,5 +44,8 @@ subst {xyz {$a}}\fR
.CE
returns ``\fBxyz {44}\fR'', not ``\fBxyz {$a}\fR''.
.SH "SEE ALSO"
eval(n)
.SH KEYWORDS
backslash substitution, command substitution, variable substitution

Some files were not shown because too many files have changed in this diff Show More