Compare commits

...
979 Commits
Author SHA1 Message Date
hobbs 7a903ce32d syntax cleanup 2000-02-10 10:21:02 +00:00
hobbs 10c9b49cd1 cleaned up syntax, corrected package:: -> pkg:: 2000-02-10 10:09:18 +00:00
jingham d277943d8c Remove need for "OLDROUTINENAMES" def'n in one more file... 2000-02-10 09:59:10 +00:00
hobbs 7f5e420c3e * doc/load.n: added notes about dll load errors on Windows 2000-02-10 09:53:53 +00:00
hobbs 6eb6479cb1 * changes: updated for 8.3.0 release
* doc/load.n: added notes about dll load errors on Windows
2000-02-10 09:53:45 +00:00
hobbs aa8004ebaa * win/tclWinLoad.c (TclpLoadFile): improved error message for load
failures, could perhaps be even more intelligent.
2000-02-10 08:55:39 +00:00
hobbs dd33cec55f * unix/README:
* unix/Makefile.in (dist): removed porting.notes and porting.old
	from distribution and CVS.  The information was very outdated.  Now
	refer to http://dev.scriptics.com/services/support/platforms.html

	* tests/unixInit.test: fixed japanese LANG encoding test [Bug: 3549]

	* unix/configure.in:
	* unix/tcl.m4: correct CFLAG_WARNING setting,
	fixed gcc config for AIX,
	added -export-dynamic to LDFLAGS for FreeBSD-3+ [Bug: 2998]

	* win/tclWinLoad.c (TclpLoadFile): improved error message for load
	failures, could perhaps be even more intelligent.
2000-02-10 08:55:14 +00:00
jingham 4541ee11ae *** empty log message *** 2000-02-10 08:43:10 +00:00
jingham af20e1900d Don't panic when you can't close an async socket on error. It seems to be benign to just pass out the error, which is a better solution in the long term. 2000-02-10 08:41:46 +00:00
jingham e1bbc0e373 Minor doco fixes 2000-02-10 08:39:37 +00:00
jingham be3a66cd07 Change to using .h files as the prefix file. This is more convenient, since the same file can be used for all targets. Also add a pre-built .pch file for tcltest 2000-02-10 08:38:58 +00:00
jingham 9205dde79c Updated for Tcl8.3 2000-02-10 08:37:04 +00:00
hobbs 8aea95d970 flipped debug bit 2000-02-10 02:54:33 +00:00
ericm 43f67ff23b * tests/clock.test: Added tests for "next monthname" constructs.
* generic/tclDate.c:
* generic/tclGetDate.y (Message): Added a grammar rule for "next
monthname" so that we can handle "next january" and similar
constructs (bug #4146).
2000-02-09 03:56:24 +00:00
hobbs 67763d47ff * unix/configure.in:
* win/configure.in:
	* win/README:
	* win/README.binary:
	* generic/tcl.h (TCL_RELEASE_SERIAL): Moved to 8.3.0 patchlevel

	* unix/tcl.m4: changed all -fpic to -fPIC
2000-02-08 10:06:58 +00:00
hobbs c8f6788c1a * README:
* tools/tcl.wse.in:
	* unix/configure.in:
	* win/configure.in:
	* win/README:
	* win/README.binary:
	* generic/tcl.h (TCL_RELEASE_SERIAL): Moved to 8.3.0 patchlevel
2000-02-08 10:06:33 +00:00
hobbs 17c784c725 * library/tcltest1.0/tcltest.tcl: correctly protected searchDirectory
list to allow dirnames with spaces
2000-02-08 10:06:22 +00:00
hobbs 3c07029345 * doc/library.n:
* library/auto.tcl: fixed crufty puts code and docs [Bug: 4122]
2000-02-08 10:06:12 +00:00
hobbs 1721f69f9f * generic/tclDecls.h:
* generic/tcl.decls: change Tcl_GetOpenFile to use decl of 'int
	forWriting' instead of 'int write' to avoid shadowing [Bug: 4121]

	* generic/tcl.h (TCL_RELEASE_SERIAL): Moved to 8.3.0 patchlevel
2000-02-08 10:05:40 +00:00
hobbs 3e98f7fcb0 * doc/library.n:
* library/auto.tcl: fixed crufty puts code and docs [Bug: 4122]
2000-02-08 10:05:24 +00:00
hobbs 326879ecc0 * README:
* tools/tcl.wse.in:
	* unix/configure.in:
	* win/configure.in:
	* win/README:
	* win/README.binary:
	* generic/tcl.h (TCL_RELEASE_SERIAL): Moved to 8.3.0 patchlevel

	* doc/library.n:
	* library/auto.tcl: fixed crufty puts code and docs [Bug: 4122]

	* library/tcltest1.0/tcltest.tcl: correctly protected searchDirectory
	list to allow dirnames with spaces

	* unix/tcl.m4: changed all -fpic to -fPIC

	* generic/tclDecls.h:
	* generic/tcl.decls: change Tcl_GetOpenFile to use decl of 'int
	forWriting' instead of 'int write' to avoid shadowing [Bug: 4121]
2000-02-08 10:05:08 +00:00
ericm c58e1d4cf7 * tests/package.test:
* library/tclIndex:
* library/package.tcl: Renamed ::package namespace to ::pkg.
2000-02-07 22:33:17 +00:00
ericm 05a83f1943 Removed references to struct1.0 dir. 2000-02-07 21:35:03 +00:00
ericm 25cce6507c Removing struct namespace stuff. 2000-02-07 19:15:25 +00:00
hobbs b1a627adb9 * tests/httpold.test: changed test script to source in the httpd
server procs from httpd instead of having its own set.
2000-02-05 12:37:57 +00:00
hobbs f2697f9021 * unix/README: fixed notes about --enable-shared and add note
about --disable-shared.
2000-02-05 12:09:16 +00:00
hobbs 1def23b8af * tests/httpd: improved query support in test httpd to handle fix
in http.tcl. [Bug: 4089 change 2000-02-01]
2000-02-05 12:09:08 +00:00
hobbs 924d9e0129 *** empty log message *** 2000-02-05 12:08:59 +00:00
hobbs c337343925 * tests/httpd: improved query support in test httpd to handle fix
in http.tcl. [Bug: 4089 change 2000-02-01]

	* unix/README: fixed notes about --enable-shared and add note
	about --disable-shared.
2000-02-05 12:08:49 +00:00
ericm 09aefc9124 * doc/tree.n:
* doc/stack.n:
* doc/queue.n: docs for tree, stack, and queue.

* win/Makefile.in:
* unix/Makefile.in: Added struct1.0 to list of libraries to install.

* tests/stackstruct.test: stack tests

* tests/queue.test: queue tests

* library/struct1.0/queue.tcl: queue data structure.

* library/struct1.0/stack.tcl: stack data structure.

* library/struct1.0/pkgIndex.tcl:
* library/struct1.0/struct.tcl: data structure package
2000-02-05 03:20:20 +00:00
ericm 8bf5f65362 Renamed Package.n -> packagens.n to deal with (one of) NT's (many) shortcomings. 2000-02-03 17:27:02 +00:00
hobbs 249c0cdd33 * tests/regexp.test: added tests for -all and -inline switches
* doc/regexp.n: added docs for -all and -inline switches
	* generic/tclCmdMZ.c (Tcl_RegexpObjCmd): added extra comments for
	new -all and -inline switches to regexp command
2000-02-02 22:32:07 +00:00
ericm 178a952f93 * library/init.tcl: Applied patch from rfe 1734 regarding
auto_load errors not setting error message and errorInfo properly.
2000-02-01 19:26:07 +00:00
hobbs 79bed9aebe see log 2000-02-01 11:50:54 +00:00
hobbs b6c48947a8 improved OSF1 thread build flags 2000-02-01 11:50:37 +00:00
hobbs 7f8849b418 * win/Makefile.in (install-*): reduced verbosity of install 2000-02-01 11:49:39 +00:00
hobbs 1b26df6269 * generic/tclFileName.c (Tcl_JoinPath): improved support for special
QNX node id prefixes in pathnames [Bug: 4053]
2000-02-01 11:49:24 +00:00
hobbs 557e06ed57 * library/http1.0/http.tcl:
* library/http2.1/http.tcl: The query data POSTed was newline
	terminated when it shouldn't be altered [Bug: 4089]
2000-02-01 11:48:30 +00:00
ericm acb2f260be * tests/package.test:
* library/tclIndex:
* library/package.tcl: Added ::package namespace and
::package::create function.

* library/init.tcl: Fixed problem with auto_load and determining
if commands were loaded.

* library/auto.tcl: "Fixed" issues with $ in files to be auto indexed.

* doc/Package.n: New man page for package::create function.

* doc/pkgMkIndex.n: Added additional information.

* doc/library.n: Added additional qualification regarding auto_mkindex.
2000-02-01 01:14:00 +00:00
ericm bfc121a8bd * tests/pkg/magicchar2.tcl:
* tests/autoMkindex.test: Test for auto loader fix (bug #2480).

* library/init.tcl: auto_load was using [info commands $name] to
determine if a given command was available; if the command name
had * or [] it, this would fail because info commands uses
glob-style matching.  This is fixed.  (Bug #2480).
2000-01-29 00:12:46 +00:00
ericm c6f3f1f205 * tests/pkg/spacename.tcl:
* tests/pkgMkIndex.test: Tests for fix for bug #2360.

* library/package.tcl: Fixed to extract only the first element of
the list returned by auto_qualify (bug #2360).
2000-01-28 19:32:05 +00:00
ericm 7f1780c6f5 * tests/pkg/magicchar.tcl:
* tests/autoMkindex.test: Test for fix for bug #2611.

* library/auto.tcl: Fixed the regular expression that performs $
escaping before sourcing a file to index.  It was erroneously
adding \ escapes even to $'s that were already escaped,
effectively "un-escaping" those $'s.  (bug #2611).
2000-01-28 16:38:34 +00:00
ericm ce3b1a3fb5 * tests/autoMkindex.test:
* library/auto.tcl: Applied patch (with slight modification) from
bug #2701:  auto_mkIndex uses platform dependent file paths.
Added test for fix.
2000-01-28 00:09:15 +00:00
jenn 335c1f7812 * library/tcltest1.0/tcltest.tcl: Changed NormalizePath to
normalizePath and exported it as a public proc.  This proc
creates an absolute path given the name of the variable containing
the path to modify.  The path is modified in place.
* library/tcltest1.0/pkgIndex.tcl: Added normalizePath.
* tests/all.tcl: Changed code to use normalizePath.
2000-01-27 23:44:01 +00:00
ericm d8c3ee2177 * tests/pkg/samename.tcl: test file for bug #1983
* tests/pkgMkIndex.test:
* library/package.tcl:
Fixed bug #1983, dealing with pkg_mkIndex incorrectly handling
situations with two procs by the same name but in different
namespaces (ie, foo::baz and bar::baz).
2000-01-27 19:48:29 +00:00
ericm b51a945c65 * tests/pkgMkIndex.test:
* doc/pkgMkIndex.n:
* library/package.tcl: Per rfe #4097, optimized creation of direct
load packages to bypass computing the list of commands added by
the new package.  Also made direct loading the default, and added
a -lazy option.
2000-01-27 19:20:05 +00:00
ericm d3256a88c6 * generic/tclNamesp.c: Undid fix for #956, which broke backwards
compatibility.

	* doc/variable.n:
	* doc/trace.n:
	* doc/namespace.n:
	* doc/info.n: Added further information about differences between
	"namespace which" and "info exists".

	* doc/SetErrno.3: Added descriptions of ErrnoId() and ErrnoMsg()
	functions.
2000-01-26 21:36:35 +00:00
hobbs 7b6b3a5c4a * win/makefile.vc: added some support for building helpfile on Windows 2000-01-26 03:38:10 +00:00
hobbs 83cc84e37e * unix/tcl.m4: modified EXTRA_CFLAGS to add -DHAVE_TZSET for
OSF1-V* and ULTRIX-4.* when not using gcc.  Also added higher min
	stack size for OSF1-V* when building with threads. [Bug: 4063]
	* unix/tclUnixChan.c (CreateSocketAddress): changed comparison
	with -1 to 0xFFFFFFFF, to ensure 32 bit comparison even on 64 bit
	systems. [Bug: 3878]
2000-01-26 03:38:00 +00:00
hobbs 3eb5dfa1d2 * generic/tclClock.c (FormatClock): inlined resultPtr, as it
conflicted with var creation for HAVE_TZSET #def [Bug: 4063]

	* generic/tclCmdIL.c (Tcl_LsortObjCmd): fixed potential leak
	when calling lsort -command with bad command [Bug: 4067]

	* generic/tclFileName.c (Tcl_JoinPath): added support for special
	QNX node id prefixes in pathnames [Bug: 4053]
2000-01-26 03:37:40 +00:00
hobbs 04bd0d9f87 * doc/ListObj.3: clarified Tcl_ListObjGetElements docs [Bug: 4080]
* doc/glob.n: clarified Mac path separator determination docs.
2000-01-26 03:37:30 +00:00
hobbs 985b9d320f see logs 2000-01-26 03:37:22 +00:00
hobbs 1476eeb702 simplified makefile flags 2000-01-24 02:30:39 +00:00
hobbs 73759975a6 * unix/tclUnixPort.h: moved include of <utime.h> lower since some
systems (UTS) require sys/types.h to be included first [Bug: 4031]

	* unix/tclUnixChan.c (CreateSocketAddress): changed comparison
	with -1 to 0xFFFFFFFFFFFFFFF, which is the pedantic way to say -1
	for both 32 bit and 64 bit systems. [Bug: 3878]
2000-01-24 02:30:16 +00:00
hobbs 3aa0e680ba * library/init.tcl (auto_execok): added 'start' to list of
recognized built-in commands for COMSPEC on NT. [Bug: 2858]
2000-01-24 02:30:08 +00:00
hobbs 5c9fad7cc4 * generic/tclInt.h:
* generic/tcl.decls: moved Tcl_ProcObjCmd to stubs table [Bug: 3827]
	and removed 'register' from stub definition of
	Tcl_AppendUnicodeToObj [Bug: 4038]

	* generic/tclFileName.c: improved guessing of path separator
	for the Mac. (Darley)
2000-01-24 02:29:57 +00:00
hobbs e75bb1f59b see logs 2000-01-24 02:29:41 +00:00
ericm b500ef6a18 * unix/mkLinks:
* doc/GetHostName.3: Man page for Tcl_GetHostName (bug #1817).
2000-01-21 18:52:07 +00:00
ericm edc8402b2f * doc/lreplace.n: Corrected man page with respect to treatment of
empty lists, and "prettied up" the page. (bug #1705).
2000-01-21 18:24:06 +00:00
ericm be7a220702 ChangeLog commit. 2000-01-21 04:00:06 +00:00
ericm c2882b5f15 * namespace.test: Added test for undefined variables with
namespace which (bug #956).

* tclNamesp.c: Added check for undefined variables in
NamespaceWhichCmd (bug #956).
2000-01-21 03:58:16 +00:00
hobbs 1816d85fa7 added test for [info body] bytecompiled object bug 2000-01-21 03:40:04 +00:00
ericm ac4b7b9af8 * var.test: Added tests for corrected variable behavior (bug #981).
* upvar.n: Expanded explanation of upvar behavior with respect to
variable traces.  (bugs 3917 1433 2110).

* tclVar.c: Changed behavior of variable command when name refers
to an element in an array (ie, "variable foo(x)") to always return
an error, regardless of existance of that element in the array
(now behavior is consistant with docs too) (bug #981).
2000-01-21 03:29:13 +00:00
hobbs e5a18035ec added catch {unset t} for atomic test 2000-01-21 03:26:04 +00:00
hobbs 63cd0157ba *** empty log message *** 2000-01-21 02:26:32 +00:00
hobbs 0b1ee00117 * unix/tclUnixNotfy.c (Tcl_InitNotifier): added cast for tsdPtr 2000-01-21 02:26:25 +00:00
hobbs bfa48ee9ca set.test: added test for complex array elem name compiling 2000-01-21 02:26:09 +00:00
hobbs 0dc0f2f4c0 * library/word.tcl: changed tcl_(non)wordchars settings to use
new unicode regexp char class escapes instead of char sequences
2000-01-21 02:25:38 +00:00
hobbs df05056e3f * generic/tclCmdIL.c (InfoBodyCmd): made [info body] return a
string if the body has been bytecompiled.
	* generic/tclBasic.c (Tcl_EvalObjEx): added pedantic check for
	originating proc body of bytecompiled code, #def'd out as the
	change for [info body] should make it unnecessary

	* tests/set.test: added test for complex array elem name compiling
	* generic/tclCompCmds.c (TclCompileSetCmd): Fixed parsing of array
	elements during compiling, and slightly optimised same [Bug: 3889]
2000-01-21 02:25:25 +00:00
hobbs df89ccaf77 * doc/tclvars.n: added definitions for tcl_(non)wordchars
* doc/vwait.n: added notes about requirement for vwait var being
	globally scoped [Bug: 3329]
2000-01-21 02:25:05 +00:00
hobbs c03cc4dde2 see logs 2000-01-21 02:24:29 +00:00
wart f939f45d0c Fixed typo 2000-01-19 00:34:37 +00:00
hobbs 4079d1d513 made install less verbose 2000-01-16 05:32:32 +00:00
ericm eecf434337 * tests/var.test: Added a test for the array multiple delete
protection in Tcl_UnsetVar2.

* generic/tclVar.c: Added protection in Tcl_UnsetVar2 against
attempts to multiply delete arrays when unsetting them (bug
#3453).  This could happen if there was an unset trace on an array
element and the trace proc made a global or upvar link to the
array, and then the array was unset at the global level.  See the
bug reference for more information.
2000-01-15 02:52:32 +00:00
hobbs 91b7d84e6d added IsLeapYear macro (from tclGetDate.y) 2000-01-15 01:50:43 +00:00
ericm 35d4ffd9a7 * unix/tclUnixTime.c: New clock format format.
* compat/strftime.c: New clock format format.

* generic/tclGetDate.y: New clock scan format.
2000-01-14 22:15:51 +00:00
hobbs 72978d2b3d * README:
* generic/tcl.h:
	* tools/tcl.wse.in:
	* unix/configure.in:
	* unix/tcl.m4:
	* win/README.binary:
	* win/configure.in: updated to patchlevel 8.3b2
2000-01-14 00:20:41 +00:00
ericm f520391c23 Re-added stuff that CVS lost. 2000-01-13 23:40:36 +00:00
ericm da818de0d7 Wow! CVS really fucked this one up. 2000-01-13 23:30:52 +00:00
ericm 2df6830899 * tests/cmdIL.test: Added tests for lsort -dictionary with
characters that occur between Z and a in ASCII.

* generic/tclCmdIL.c: Modified DictionaryCompare function (used by
lsort -dictionary) to do upper/lower case equivalency before doing
character comparisons, instead of after.  This fixes bug #1357, in
which lsort -dictionary [list ` AA c CC] and lsort -dictionary
[list AA c ` CC] gave different (and both wrong) results.
2000-01-13 20:33:09 +00:00
ericm dee657ae62 * tests/clock.test: Added tests for "monday 1 week ago", etc, from RFE #3671. 2000-01-13 00:12:33 +00:00
ericm d5177d8145 * tests/clock.test: Added tests for "next <day-of-week>" and
"<day-of-week>"
2000-01-12 23:35:52 +00:00
ericm 85c2e86dee * doc/tests/clock.test: Added numerous tests for clock scan.
* doc/generic/tclGetDate.y: Fixed some shift/reduce conflicts in
        clock grammar.

        * doc/doc/clock.n: Added documentation for new supported clock
        scan formats and additional explanation of daylight savings time
        correction algorithm.
2000-01-12 19:36:41 +00:00
hobbs ada01064f7 * tests/unixFCmd.test:
* unix/tclUnixFCmd.c: added support for symbolic permissions
	setting in SetPermissionsAttribute (file attr $file -perm ...)
	[Bug: 3970]

	* tests/expr.test:
	* unix/Makefile.in:
	* unix/configure.in:
	* unix/tcl.m4: strtod bug on Tru64 [Bug: 3378]
	and added tests to prevent unnecessary chmod +x in sources while
	installing, as well as more intelligent setsockopt/gethostbyname
	checks [Bug: 3366, 3389]

	* unix/tclUnixThrd.c: added compile time support (through use of
	the TCL_THREAD_STACK_MIN define) for increasing the default stack
	size for a thread. [Bug: 3797, 1966]
2000-01-12 11:13:54 +00:00
hobbs f0c936b8a5 * tests/info.test:
* generic/tclCmdIL.c: fixed 'info procs ::namesp::*' behavior (Dejong)

	* tests/unixFCmd.test:
	* unix/tclUnixFCmd.c: added support for symbolic permissions
	setting in SetPermissionsAttribute (file attr $file -perm ...)
	[Bug: 3970]

	* tests/utf.test: fixed test that allowed \8 as octal value
2000-01-12 11:13:25 +00:00
hobbs 406d6b83a7 * generic/tclClock.c: fixed support for 64bit handling of clock
values [Bug: 1806]

	* generic/tclThreadTest.c: upped a buffer size to hold double

	* tests/info.test:
	* generic/tclCmdIL.c: fixed 'info procs ::namesp::*' behavior (Dejong)

	* generic/tclNamesp.c: made imported commands also import their
	compile proc [Bug: 2100]
2000-01-12 11:12:52 +00:00
hobbs 27b97b815a * doc/file.n:
* tests/unixFCmd.test:
	* unix/tclUnixFCmd.c: added support for symbolic permissions
	setting in SetPermissionsAttribute (file attr $file -perm ...)
	[Bug: 3970]
2000-01-12 11:10:35 +00:00
hobbs 5da366a4ea see log 2000-01-12 11:10:25 +00:00
ericm 6fc6a1932b * generic/tclGetDate.y: Added comments for the Convert function.
Added a fix for daylight savings time handling for relative time
spans of days, weeks or fortnights.

* generic/tclDate.c: Fixed compiler warning issues.
2000-01-12 03:13:19 +00:00
ericm 927d806eff * generic/tclGetDate.y: Added comments for the Convert function.
* generic/tclDate.c: Fixed compiler warning issues.
2000-01-12 01:16:08 +00:00
hobbs 80aca675e0 * unix/tclUnixFile.c: fixed signature style on functions
* unix/Makefile.in: made sure tcl.m4 would be installed with dist

	* unix/tcl.m4: added ELF support for NetBSD [Bug: 3959]
2000-01-11 22:09:18 +00:00
hobbs 6cf44cfd1a * library/http2.1/http.tcl: trim value for $state(meta) key 2000-01-11 22:09:10 +00:00
hobbs dba4ade206 * generic/tclUtf.c: changed Tcl_UtfBackslash to not allow
non-octal digits (8,9) in \ooo substs. [Bug: 3975]

	* generic/tcl.h: noted need to change win/tcl.m4 and
	tools/tclSplash.bmp for minor version changes
2000-01-11 22:08:59 +00:00
hobbs 40c309568a * compat/waitpid.c: use pid_t type instead of int [Bug: 3999] 2000-01-11 22:08:50 +00:00
hobbs e169a7fbfa see log 2000-01-11 22:08:43 +00:00
ericm 19e7a439c8 fixed "next" constant to give 1 unit ahead, not 2. 2000-01-11 02:59:47 +00:00
ericm 31e465a97f yacc run 2000-01-11 02:36:15 +00:00
ericm dc39a1177a *** empty log message *** 2000-01-11 02:35:11 +00:00
ericm a98f0bdb5d * generic/tclGetDate.y: Added rules for ISO 8601 formats (BUG #847):
CCYY-MM-DD
CCYYMMDD
YY-MM-DD
YYMMDD
CCYYMMDDTHHMMSS
CCYYMMDD HHMMSS
CCYYMMDDTHH:MM:SS
Fixed "clock scan <number>" to scan the number as an hour for the
current day, rather than a minute after 00:00 for the current day
(bug #2732).
2000-01-11 00:51:49 +00:00
ericm ed90c969d0 * generic/tclClock.c: Changed switch in Tcl_ClockObjCmd to use
enumerated values instead of constants. (ie, COMMAND_SCAN instead
of 3).
2000-01-08 02:31:22 +00:00
hobbs d709bfe7fe fixed backslashing of } 1999-12-22 23:48:56 +00:00
hobbs e3480a5688 updated to 8.3 1999-12-22 23:00:23 +00:00
hobbs 7f6b5be051 minor bug fix in man2help.tcl and updated configure.in to 8.3 1999-12-22 22:59:59 +00:00
hobbs 95c0c1a32d * changes: updated changes file 1999-12-22 20:00:23 +00:00
hobbs ab255c9931 splash screen for Wise for 8.3 1999-12-22 19:48:34 +00:00
hobbs 4fa10d968d fixed 8.2 setting 1999-12-22 02:38:18 +00:00
hobbs 185fbe2e6d updated fully for 8.3 1999-12-22 02:26:31 +00:00
hobbs 5cd545ece8 updated for 8.3b1 changes 1999-12-22 01:27:57 +00:00
hobbs 378be31562 removed ^M's from man page - confuses man2tcl 1999-12-22 00:41:13 +00:00
hobbs a25906a134 updated for 8.3 1999-12-22 00:24:10 +00:00
hobbs ba532fa572 * win/mkd.bat:
* win/rmd.bat: removed necessity of tag.txt [Bug: 3874]

	* win/tclWinThrd.c: changed CreateThread to _beginthreadex and
	ExitThread to _endthreadex

	* win/README.binary:
	* win/configure.in: updated to patch level 8.3b1
1999-12-22 00:00:16 +00:00
hobbs a29fb141e2 * unix/Makefile.in: added -srcdir=... for 'make html' 1999-12-21 23:59:49 +00:00
hobbs 671c6e58fc renamed tcl8.1-tk8.1-man-html.tcl tcltk-man2html.tcl, and rewrote
the internals to use 8.2+ string functions

tcl.wse.in moved to 8.3b1
1999-12-21 23:59:28 +00:00
hobbs 569c90e503 * tests/cmdIL.test:
* generic/tclCmdIL.c: added -unique option to lsort
1999-12-21 23:58:22 +00:00
hobbs 657087664e * mac/tclMacOSA.c: fixed applescript for I18N [Bug: 3644] 1999-12-21 23:58:13 +00:00
hobbs bdf52c7793 * generic/tclCmdIL.c: added -unique option to lsort
* generic/tclThreadTest.c: changed thread ids to longs [Bug: 3902]
1999-12-21 23:58:03 +00:00
hobbs ad4a42c1c2 * doc/Hash.3: fixed reference to ckfree [Bug: 3912]
* doc/RegExp.3: fixed calling params for Tcl_RegExecFromObj
	* doc/open.n: fixed minor formatting errors
	* doc/string.n: fixed minor formatting errors

	* doc/lsort.n: added -unique docs
1999-12-21 23:57:33 +00:00
hobbs a7f2bf5da7 up'd to 8.3b1 1999-12-21 23:57:20 +00:00
hobbs 4597602e48 removed \n in panic 1999-12-13 03:05:52 +00:00
hobbs db164c1b19 * doc/glob.n:
* tests/fileName.test:
	* generic/tclInt.decls:
	* generic/tclInt.h:
	* generic/tclIntDecls.h:
	* generic/tclStubInit.c:
	* generic/tclEncoding.c:
	* generic/tclFileName.c:
	* mac/tclMacFile.c:
	* unix/tclUnixFile.c:
	* win/tclWinFile.c: enhanced the glob command with the new options
	-types -path -directory and -join.  Deprecated TclpMatchFiles with
	TclpMatchFilesTypes, extended TclGlob and TclDoGlob and added
	GlobTypeData structure.
1999-12-12 22:46:38 +00:00
hobbs cbdb029297 see log 1999-12-12 22:46:27 +00:00
hobbs 2dd7c91590 *** empty log message *** 1999-12-12 02:58:21 +00:00
hobbs b183ce5e03 * unix/configure.in:
* unix/tcl.m4:
	* unix/tclUnixPipe.c: removed checking for compatible vfork
	function and use of the vfork function.  Modern VM systems rarely
	suffer any performance degradation when fork is used, and it
	solves multiple problems with vfork.  Users that still want vfork
	and add -Dfork=vfork to the compile flags. [Bug: 942 2228 1312]
1999-12-12 02:27:19 +00:00
hobbs cd9655fd91 * tests/info.test:
* tests/parseOld.test:
	* generic/tclCmdAH.c:
	* generic/tclProc.c: changed Tcl_UplevelObjCmd (uplevel) and
	Tcl_EvalObjCmd (eval) to use TCL_EVAL_DIRECT in the single arg
	case as well, to take advantage	of potential pure list input
	optimization.  This means that it won't get byte compiled though,
	which should be acceptable.
1999-12-12 02:27:03 +00:00
hobbs 9d5c1c3ab0 * tests/var.test:
* generic/tclCompile.c: fixed problem where setting to {} array
	would intermittently not work. (Fontaine) [Bug: 3339]

	* generic/tclCmdMZ.c:
	* generic/tclExecute.c: optimized INST_TRY_CVT_TO_NUMERIC to
	recognize boolean objects. (Spjuth) [Bug: 2815]

	* tests/info.test:
	* tests/parseOld.test:
	* generic/tclCmdAH.c:
	* generic/tclProc.c: changed Tcl_UplevelObjCmd (uplevel) and
	Tcl_EvalObjCmd (eval) to use TCL_EVAL_DIRECT in the single arg
	case as well, to take advantage	of potential pure list input
	optimization.  This means that it won't get byte compiled though,
	which should be acceptable.
	* generic/tclBasic.c: made Tcl_EvalObjEx pure list object aware in
	the TCL_EVAL_DIRECT case for efficiency.
	* generic/tclUtil.c: made Tcl_ConcatObj pure list object aware,
	and return a list object in that case [Bug: 2098 2257]

	* generic/tclMain.c: changed Tcl_Main to not constantly reuse the
	commandPtr object (interactive case) as it could be shared. (Fellows)
1999-12-12 02:26:40 +00:00
hobbs 5f809539e3 see log 1999-12-12 02:26:26 +00:00
hobbs 2f64bc5e83 * win/tclWin32Dll.c:
* win/tclWinChan.c:
	* win/tclWinFCmd.c:
	* win/tclWinInit.c:
	* win/tclWinPipe.c:
	* win/tclWinSock.c: removed all code that supported Win32s.  It
	was no longer officially supported, and likely didn't work anyway.
	* win/makefile.vc: removed 16 bit stuff, cleaned up.
	* win/tcl16.rc:
	* win/tclWin16.c:
	* win/winDumpExts.c: these files have been removed from the
	source tree (no longer necessary to build)
	* win/aclocal.m4: made it just include tcl.m4
1999-12-09 14:44:09 +00:00
hobbs a5996b1951 * doc/exec.n:
* doc/open.n: removed references to Win32s
1999-12-09 14:43:47 +00:00
hobbs 420b90553a see log 1999-12-09 14:43:14 +00:00
hobbs c4b020730a * unix/Makefile.in: fixed make gendate to swap const with CONST
so it uses the Tcl defined CONST type [Bug: 3521]
1999-12-08 03:50:22 +00:00
hobbs c8b04b0da2 * tests/io.test: removed 'knownBug' tests that were for
unsupported0, which is now fcopy (that already has tests)
1999-12-08 03:50:12 +00:00
hobbs 272afc55df * mac/tclMacPort.h: added utime.h include 1999-12-08 03:50:04 +00:00
hobbs df65ef241d * generic/tclDate.c:
* unix/Makefile.in: fixed make gendate to swap const with CONST
	so it uses the Tcl defined CONST type [Bug: 3521]

	* generic/tclIO.c: removed panic that could occur in FlushChannel
	when a "blocking" channel would receive EAGAIN, instead treating
	it the same as non-blocking. [Bug: 3773]

	* generic/tclUtil.c: fixed Tcl_ScanCountedElement to not step
	beyond the end of the counted string [Bug: 3336]
1999-12-08 03:49:51 +00:00
hobbs eb4ef63944 see log 1999-12-08 03:49:40 +00:00
wart 49a5e65eb6 Winhelp should build more cleanly now. 1999-12-07 00:40:55 +00:00
wart 8fdf50b3c1 Don't build winhelp as part of the doc: target. Now we use a separate "winhelp" target for building it. 1999-12-07 00:18:32 +00:00
wart 66175fe6ed Added "doc" target to the Makefile that will build the winhelp files 1999-12-06 01:46:07 +00:00
wart 567d7c2cac Added #define around include of <errno.h> so that systems with the
header file (win NT) will pick it up.
1999-12-06 01:43:15 +00:00
wart 1e47168d13 Changed version number from "82" to "83" 1999-12-06 00:34:19 +00:00
hobbs 846d269ebe check for whitespace after bad octals 1999-12-04 06:28:05 +00:00
hobbs 8bd88ae75e * tests/env.test: removed knownBug limitation from working test
* tests/all.tcl: ensured that ::tcltest::testsDirectory would be
	set to an absolute path

	* tests/expr-old.test:
	* tests/parseExpr.test:
	* tests/string.test:
	* generic/tclGet.c:
	* generic/tclInt.h:
	* generic/tclObj.c:
	* generic/tclParseExpr.c:
	* generic/tclUtil.c:
	* generic/tclExecute.c: added TclCheckBadOctal routine to enhance
	error message checking for when users use invalid octal numbers
	(like 08), as well as replumbed the Expr*Funcs with a new
	VerifyExprObjType to simplify type handling.
1999-12-04 06:16:48 +00:00
hobbs 0cbb9c47d7 * library/http2.1/http.tcl: fixed error handling in http::Event
[Bug: 3752]
1999-12-04 06:16:00 +00:00
hobbs 78a6d2f842 * tests/expr-old.test:
* tests/parseExpr.test:
	* tests/string.test:
	* generic/tclGet.c:
	* generic/tclInt.h:
	* generic/tclObj.c:
	* generic/tclParseExpr.c:
	* generic/tclUtil.c:
	* generic/tclExecute.c: added TclCheckBadOctal routine to enhance
	error message checking for when users use invalid octal numbers
	(like 08), as well as replumbed the Expr*Funcs with a new
	VerifyExprObjType to simplify type handling.

	* tests/expr.test:
	* generic/tclCompile.c: fixed 'bad code length' error for
	'expr + {[incr]}' case, with new test case [Bug: 3736]
	and seg fault on 'expr + {[error]}' (different cause) that
	was caused by a correct optimization that didn't correctly
	track how it was modifying the source string in the opt.
	The optimization was removed, which means that:
		expr 1 + {[string length abc]}
	will be not be compiled inline as before, but this should be
	written:
		expr {1 + [string length abc]}
	which will be compiled inline for speed.  This prevents
		expr 1 + {[mindless error]}
	from seg faulting, and only affects optimizations for
	degenerate cases [Bug: 3737]
1999-12-04 06:15:40 +00:00
hobbs 5239dbb379 * doc/load.n: added note about NT's buggy handling of './' with
LoadLibrary
1999-12-04 06:15:26 +00:00
hobbs 8854c777b0 see log 1999-12-04 06:15:17 +00:00
redman 15e8d4b1c9 * generic/tcl.decls :
* generic/tclMain.c :
	* unix/tclAppInit.c:
	* win/tclAppInit.c: Added two new internal functions,
	TclSetStartupScriptFileName() and TclGetStartupScriptFileName()
	and added hooks into the main() code for supporting TclPro and
	other "big" shells more easily without requiring a copy of the
	main() code.

	* generic/tclEncoding.c:
	* generic/tclEvent.c:  Moved encoding-related startup code from
	tclEvent.c into the more appropriate tclEncoding.c.
1999-12-02 02:03:16 +00:00
hobbs f4b89549e3 * generic/tclIO.c: fix from Kupries for Tcl_UnstackChannel that
correctly handles resetting translation and encoding.
1999-12-01 02:45:00 +00:00
hobbs 79bdb822ff * win/tclWinTime.c: fixed handling of %Z on NT for time zones
that don't have DST.
1999-12-01 00:08:36 +00:00
hobbs dad51dd35e * generic/tclLoad.c: #def'd out the unloading of DLLs at finalize
time for Unix in TclFinalizeLoad. [Bug: 2560 3373]  Should be
	parametrized to allow for user to specify unload or not.
1999-12-01 00:08:28 +00:00
hobbs ed5c8c5b54 * generic/tclLoad.c: #def'd out the unloading of DLLs at finalize
time for Unix in TclFinalizeLoad. [Bug: 2560 3373]  Should be
	parametrized to allow for user to specify unload or not.

	* win/tclWinTime.c: fixed handling of %Z on NT for time zones
	that don't have DST.
1999-12-01 00:08:21 +00:00
hobbs 97e5858211 * unix/tclUnixPipe.c: fixed PipeBlockModeProc to properly set
isNonBlocking flag on pipe. [Bug: 1356 710]
1999-11-30 08:37:15 +00:00
hobbs d7393c5cca * library/dde1.1/pkgIndex.tcl:
* library/reg1.0/pkgIndex.tcl: added supported for debugged
	versions of the libraries
1999-11-30 08:37:02 +00:00
hobbs f27b3b7ae4 see log 1999-11-30 08:36:52 +00:00
hobbs 75a24aeedd * tests/scan.test:
* generic/tclScan.c: fixed scan where %[..] didn't match anything
	and added test case [Bug: 3700]
1999-11-30 01:42:57 +00:00
hobbs d33e2488bc * win/tclWinSerial.c: adopted patch from Schroedter to handle
fconfigure $sock -lasterror on Windows. [RFE: 3368]
1999-11-24 20:55:17 +00:00
hobbs 63975d2fea * generic/tclCmdIL.c: made SORTMODE_INTEGER work with Longs
[Bug: 3652]
1999-11-24 20:55:07 +00:00
hobbs dba6bd040e * doc/open.n:
* win/tclWinSerial.c: adopted patch from Schroedter to handle
	fconfigure $sock -lasterror on Windows. [RFE: 3368]
1999-11-24 20:54:54 +00:00
hobbs f09e8933fe see log 1999-11-24 20:54:41 +00:00
wart b0146405ee Changed version number on dlls 1999-11-24 01:52:29 +00:00
stanton f419d4778c * library/tcltest1.0/tcltest.tcl: Fixed bug where tcltest output
went to stdout instead of the specified output file in some
cases.
1999-11-23 22:59:12 +00:00
welch ca8c104bda Took out "nonPortable" flag that was hiding -timeout tests,
plus added more timeout cases for various bad host/port combinations.
1999-11-22 20:15:04 +00:00
hobbs 967fc05747 updated to 2.2 version for http 1999-11-20 17:57:43 +00:00
hobbs fa32157731 *** empty log message *** 1999-11-19 23:10:08 +00:00
hobbs 241971c7b2 updated to 2.2 in example 1999-11-19 23:08:29 +00:00
hobbs c7501d67ee see log 1999-11-19 23:08:16 +00:00
hobbs 2c6aa0c621 * tools/tcl.wse.in: added tcltest1.0 library to distribution list 1999-11-19 23:02:48 +00:00
hobbs 81d1607bc1 removed excess newliunes 1999-11-19 23:02:40 +00:00
hobbs ecf2eb5e84 * library/http2.1/http.tcl:
* library/http2.1/pkgIndex.tcl: updated http package to 2.2
1999-11-19 23:02:29 +00:00
hobbs 859fecd9de * generic/tclProc.c: backed out change from 1999-11-18 as it
could affect return string from upvar as well.
1999-11-19 23:02:12 +00:00
hobbs 87d2bf889d see log 1999-11-19 23:02:03 +00:00
hobbs d2698ccc3d minor change that prevents stack blowing 1999-11-19 06:40:01 +00:00
hobbs e3bceb1eef * unix/tcl.m4: added defined for _THREAD_SAFE in --enable-threads
case; added check for pthread_mutex_init in libc; in AIX case,
	with --enable-threads ${CC}_r is used; fixed flags when using gcc
	on SCO
1999-11-19 06:35:26 +00:00
hobbs fc623251c4 * tests/scan.test:
* generic/tclScan.c: finished support for inline scan by
	supporting XPG identifiers.
1999-11-19 06:35:01 +00:00
hobbs 0672aef810 * library/http2.1/http.tcl: added register and unregister
commands to http:: package (better support for tls/SSL),
	as well as -type argument to http::geturl. [RFE: 2617]
1999-11-19 06:34:44 +00:00
hobbs cda8b14a36 * generic/tclProc.c: corrected error reporting for default case
at the global level for uplevel command.

	* generic/tclIOSock.c: changed int to size_t type for len
	in TclSockMinimumBuffers.

	* generic/tclCkalloc.c: fixed Tcl_DbCkfree to return a value
	on NULL input. [Bug: 3400]

	* generic/tclStringObj.c: fixed support for passing in negative
	length to Tcl_SetUnicodeObj, et al handling routines. [Bug: 3380]

	* doc/scan.n:
	* tests/scan.test:
	* generic/tclScan.c: finished support for inline scan by
	supporting XPG identifiers.

	* doc/http.n:
	* library/http2.1/http.tcl: added register and unregister
	commands to http:: package (better support for tls/SSL),
	as well as -type argument to http::geturl. [RFE: 2617]

	* generic/tclBasic.c: removed extra decr of numLevels in
	Tcl_EvalObjEx that could cause seg fault. (mjansen@wendt.de)

	* generic/tclEvent.c: fixed possible lack of MutexUnlock in
	Tcl_DeleteExitHandler [Bug: 3545]
1999-11-19 06:34:22 +00:00
hobbs b5a3b0736e * doc/scan.n:
* tests/scan.test:
	* generic/tclScan.c: finished support for inline scan by
	supporting XPG identifiers.

	* doc/http.n:
	* library/http2.1/http.tcl: added register and unregister
	commands to http:: package (better support for tls/SSL),
	as well as -type argument to http::geturl. [RFE: 2617]

	* doc/glob.n: added note about ..../ glob behavior on Win9*
	* doc/tcltest.n: fixed minor example errors [Bug: 3551]
1999-11-19 06:33:58 +00:00
hobbs 4085140e65 see log 1999-11-19 06:33:34 +00:00
welch bf803ce3d2 Improved error handling of http::geturl in the case the server is
not available.  Also correctly fixed the bug between -timeout
and a subsequent http::status call.
1999-11-18 02:22:41 +00:00
wart 61c5d130c8 Added support for the TCLTESTARGS method for passing in additional test arguments 1999-11-13 01:35:43 +00:00
hobbs 04cff1ae61 * unix/tcl.m4: added recognition of pthreads library for AIX 1999-11-10 02:52:41 +00:00
hobbs e9ba4a78e3 * tools/tcl.wse.in: updated to 8.3a1, fixed install of twind.tcl
and koi8-r.enc files
1999-11-10 02:52:29 +00:00
hobbs d9b03f0b9e *** empty log message *** 1999-11-10 02:52:20 +00:00
hobbs ca84f4e6ba * library/init.tcl: removed the installed binary directory from
the auto_path variable
1999-11-10 02:52:10 +00:00
hobbs 92091cf229 * generic/tclIOUtil.c: changed Tcl_Alloc to ckalloc
* generic/tclInt.h:
	* generic/tclObj.c: rolled back changes from 1999-10-29
	Purify noted new leaks with that code

	* generic/tclParse.c: added code in Tcl_ParseBraces to test for
	possible unbalanced open brace in a comment
1999-11-10 02:51:56 +00:00
hobbs 284e6ca672 * doc/open.n: corrected docs for 'a' open mode. 1999-11-10 02:51:42 +00:00
hobbs 2c8cf93e08 see log 1999-11-10 02:51:32 +00:00
jenn 8e6f7c3796 Changed references to the README to references to the man page for tcltest. 1999-11-04 18:20:12 +00:00
welch edb3486b17 Updated for http.tcl changes 1999-10-30 00:33:32 +00:00
welch 9a5af1a048 Fixed bug in the handling of the status code after an asynchronous connect,
e.g., one that is used with the -timeout flag.
1999-10-30 00:31:58 +00:00
welch 7dc09492f0 Cleanup of the TclNewObj family of macros, and elimination of the
special Tcl_Obj memory allocator for the TCL_THREADS case, because
this only adds lock contention.
1999-10-30 00:27:22 +00:00
hobbs b24019fd0f removed // comments (IBM's AIX compiler complained) 1999-10-29 04:34:22 +00:00
hobbs aef40e6197 * win/tclWinTest.c: added testvolumetype command, as atime is
completely ignored for Windows FAT file systems
	* win/tclWinPort.h: added sys/utime.h to includes
1999-10-29 03:05:12 +00:00
hobbs 3160b5cc1b * unix/tclUnixPort.h: added utime.h to includes
* unix/aclocal.m4: made it just include tcl.m4
1999-10-29 03:04:58 +00:00
hobbs 7f43d8ecc2 added tests for related fixes 1999-10-29 03:04:37 +00:00
hobbs da3760e58b * library/tcltest1.0/tcltest.tcl: updated makeFile to return
full pathname of file created
1999-10-29 03:04:16 +00:00
hobbs 92efc11980 * generic/tclStringObj.c: fixed Tcl_AppendResultVA so it only
iterates once over the va_list (avoiding a memcpy of it,
	which is not portable).

	* generic/tclEnv.c: fixed possible ABR error in environ array

	* tests/scan.test:
	* generic/tclScan.c: added support for use of inline scan,
	XPG3 currently not included

	* tests/incr.test:
	* tests/set.test:
	* generic/tclCompCmds.c: fixed improper bytecode handling of
	'eval {set array($unknownvar) 5}' (also for incr)

	* win/tclWinTest.c: added testvolumetype command, as atime is
	completely ignored for Windows FAT file systems
	* win/tclWinPort.h: added sys/utime.h to includes
	* unix/tclUnixPort.h: added utime.h to includes
	* doc/file.n:
	* tests/cmdAH.test:
	* generic/tclCmdAH.c: added time arguments to atime and mtime
	file command methods (support 'touch' functionality)
1999-10-29 03:03:59 +00:00
hobbs bba32831be see log 1999-10-29 03:03:31 +00:00
hobbs 54ed06429e * unix/tclUnixNotfy.c: fixed event/io threading problems by
making triggerPipe non-blocking
1999-10-21 02:18:09 +00:00
hobbs f8731757a4 new test cases 1999-10-21 02:17:57 +00:00
hobbs 1ed0bec0ca Changed update to 'after 1' to cause a true sleep in the current
thread, avoiding numerous superfluous thread send calls.
1999-10-21 02:17:43 +00:00
hobbs 5febb5a71e * library/http2.1/http.tcl: protected gets with catch [Bug: 2665] 1999-10-21 02:16:37 +00:00
hobbs 255b6f7841 * unix/tclUnixNotfy.c: fixed event/io threading problems by
making triggerPipe non-blocking

	* library/tcltest1.0/tcltest.tcl:
	* generic/tclThreadTest.c: fixed mem leaks in threads

	* generic/tclResult.c: fixed Tcl_AppendResultVA so it only
	iterates once over the va_list (avoiding a memcpy of it,
	which is not portable).

	* generic/regc_color.c: fixed mem leak and assertion, from HS

	* generic/tclCompile.c: removed savedChar trick that appeared to
	be causing a segv when the literal table was released

	* tests/string.test:
	* generic/tclCmdMZ.c: fixed [string index] to return ByteArrayObj
	when indexing into one (test case string-5.16) [Bug: 2871]
1999-10-21 02:16:21 +00:00
hobbs d5139c797f see log 1999-10-21 02:16:04 +00:00
jenn 97749c4bf1 Merged code from core-8-2-1 branch that changes the checks for the
value of tcl_interactive to also incorporate a check for the
existence of the variable.
1999-10-20 01:27:03 +00:00
jenn b6451a8e12 *** empty log message *** 1999-10-19 18:59:00 +00:00
jenn 6a4211168c * tests/tcltest.test:
* doc/tcltest.n:
* library/tcltest1.0/tcltest.tcl: Removed the extra return at the
  end of the tcltest.tcl file.

  Applied patches sent in by Andreas Kupries to add helper procs for
  debug output, add 3 new flags (-testsdir, -load, -loadfile), and
  internally refactors common code for dealing with paths into
  separate procedures. [Bug: 2838, 2842]
1999-10-19 18:08:35 +00:00
jingham 92548c63db Stupid bug in TclpLoadFile - use the converted value! 1999-10-15 04:47:12 +00:00
jingham 589a14c549 *** empty log message *** 1999-10-15 04:47:09 +00:00
jingham 727440c6bc Fix a merge error in the UTF8 conversion bug fix [Bug: 2869] 1999-10-15 04:47:03 +00:00
hobbs ed37411b40 * tests/reg.test: updated to Henry Spencer's new regexp engine
(mid-Sept 99).  Should greatly reduce stack space reqs.
1999-10-13 02:22:28 +00:00
hobbs 71fd2723b9 * generic/regc_color.c:
* generic/regc_cvec.c:
	* generic/regc_lex.c:
	* generic/regc_locale.c:
	* generic/regcomp.c:
	* generic/regcustom.h:
	* generic/regerrs.h:
	* generic/regex.h:
	* generic/regexec.c:
	* generic/regguts.h:
	* generic/tclRegexp.c:
	* generic/tclTest.c:
	* tests/reg.test: updated to Henry Spencer's new regexp engine
	(mid-Sept 99).  Should greatly reduce stack space reqs.
1999-10-13 02:22:16 +00:00
hobbs 70325c9bcd *** empty log message *** 1999-10-13 02:22:09 +00:00
hobbs eef711b7bb * library/tcltest1.0/pkgIndex.tcl: fixed procs in pkgIndex.tcl file 1999-10-13 01:24:31 +00:00
hobbs fbca4c0659 *** empty log message *** 1999-10-13 01:24:21 +00:00
hobbs 04ea820b91 * unix/Makefile.in: purify has to use -best-effort to instrument
* unix/tclAppInit.c: identified potential mem leak when compiling
	tcltest (not critical)
	* unix/tclUnixPipe.c: fixed mem leak in TclpCreateProcess when
	doing alloc between vfork and execvp.
	* unix/tclUnixTest.c: fixed mem leak in findexecutable test command
1999-10-13 00:32:49 +00:00
hobbs 67604b787a * tests/basic.test: updated test cases for 8.3
* tests/encoding.test: fixed test case that change system
	encoding to a double-byte one (this causes a bogus mem read
	error for purify)
1999-10-13 00:32:29 +00:00
hobbs c732fecaa0 * generic/tclEnv.c: fixed mem leak with putenv and DStrings 1999-10-13 00:32:16 +00:00
hobbs 95a22713b0 * doc/Encoding.3: corrected docs 1999-10-13 00:32:05 +00:00
hobbs 9d1b56f3ea *** empty log message *** 1999-10-13 00:31:53 +00:00
hobbs c67d7bf369 * {win,mac,unix,tools,}/README:
* win/README.binary:
	* win/makefile.vc:
	* {win,unix}/configure.in:
	* generic/tcl.h:
	* library/init.tcl: updated to 8.3a1 from 8.2.0.
	* win/tclWinReg.c: fixed registry command to properly 'get'
	HKEY_PERFORMANCE_DATA root key data.  Needs more work.
	* win/tclWinSerial.c: changed SerialSetOptionProc to return
	TCL_OK by default. (patch from Rolf Schroedter)
1999-10-05 22:47:04 +00:00
hobbs 0e113a9fa5 * {win,mac,unix,tools,}/README:
* win/README.binary:
	* win/makefile.vc:
	* {win,unix}/configure.in:
	* generic/tcl.h:
	* library/init.tcl: updated to 8.3a1 from 8.2.0.
1999-10-05 22:46:36 +00:00
hobbs f15864c82e * mac/tclMacFCmd.c: fixed filename stuff to support UTF-8 [Bug: 2869] 1999-10-05 22:46:13 +00:00
hobbs 25e723296d * library/http2.1/http.tcl: fixed possible use of global c var. 1999-10-05 22:46:00 +00:00
hobbs 913f582a55 * library/init.tcl: updated to 8.3a1 from 8.2.0. 1999-10-05 22:45:49 +00:00
hobbs 09d294ea82 * generic/tclNamesp.c:
* generic/tclVar.c:
	* generic/tclCmdIL.c: fixed comment typos
	* generic/tcl.h:
	* library/init.tcl: updated to 8.3a1 from 8.2.0.
1999-10-05 22:45:39 +00:00
hobbs 4fb666fe06 *** empty log message *** 1999-10-05 22:45:15 +00:00
jenn 5f0a4f4709 * library/tcltest1.0/tcltest.tcl: Applied patches sent in by
Andreas Kupries to fix typos in comments and ::tcltest::grep,
fix hook redefinition problems, and change "string compare" to
"string equal." [Bug: 2836, 2837, 2839, 2840]
1999-09-21 23:10:55 +00:00
hobbs 591b46b0f4 1999-09-20 Jeff Hobbs <hobbs@scriptics.com>
* tests/env.test:
	* unix/Makefile.in: added support for AIX LIBPATH env var [Bug:	2793]
	removed second definition of INCLUDE_INSTALL_DIR (the one that
	referenced @includedir@) [Bug: 2805]
	* unix/dltest/Makefile.in: added -lc to LIBS [Bug: 2794]
1999-09-21 06:37:22 +00:00
hobbs 89420b81b9 * unix/Makefile.in: fixed gendate target - this never worked
since RCS was intro'd.

	* unix/tcl.m4:
	* unix/aclocal.m4: added fix for FreeBSD-[1-2] recognition
	[Bug: 2070] and fix for IRIX SHLIB_LB_LIBS. [Bug: 2610]
1999-09-21 04:21:26 +00:00
hobbs a583a768fb 1999-09-16 Jeff Hobbs <hobbs@scriptics.com>
* tests/timer.test: changed after delay in timer test 6.29 from
	1 to 10. [Bug: 2796]

	* tests/pkg.test:
	* generic/tclPkg.c: fixed package version check to disallow 1.2..3
	[Bug: 2539]


	* unix/Makefile.in: fixed gendate target - this never worked
	since RCS was intro'd.
	* generic/tclGetDate.y: updated to reflect previous changes
	to tclDate.c (leap year calc) and added CEST and UCT time zone
	recognition.  Fixed 4 missing UCHAR() casts. [Bug: 2717, 954,
	1245, 1249]

	* generic/tclCkalloc.c: changed Tcl_DumpActiveMemory to really
	dump to stderr and close it [Bug: 725] and changed Tcl_Ckrealloc
	and Tcl_Ckfree to not bomb when NULL was passed in [Bug: 1719]
	and changed Tcl_Alloc, et al to not panic when a alloc request
	for zero came through and NULL was returned (valid on AIX, Tru64)
	[Bug: 2795, etc]

	* tests/clock.test:
	* doc/clock.n:
	* generic/tclClock.c: added -milliseconds switch to clock clicks
	to guarantee that the return value of clicks is in the millisecs
	granularity [Bug: 2682, 1332]

1999-09-15  Jeff Hobbs  <hobbs@scriptics.com>

	* generic/tclIOCmd.c: fixed potential core dump in conjunction
	with stacked channels with result obj manipulation in
	Tcl_ReadChars [Bug: 2623]

	* tests/format.test:
	* generic/tclCmdAH.c: fixed translation of %0#s in format [Bug: 2605]

	* doc/msgcat.n: fixed \\ bug in example [Bug: 2548]

	* unix/tcl.m4:
	* unix/aclocal.m4: added fix for FreeBSD-[1-2] recognition
	[Bug: 2070] and fix for IRIX SHLIB_LB_LIBS. [Bug: 2610]

	* doc/array.n:
	* tests/var.test:
	* tests/set.test:
	* generic/tclVar.c: added an array unset operation, with docs
	and tests.  Variation of [Bug: 1775].  Added fix in TclArraySet
	to check when trying to set in a non-existent namespace. [Bug: 2613]

1999-09-14  Jeff Hobbs  <hobbs@scriptics.com>

	* tests/linsert.test:
	* doc/linsert.n:
	* generic/tclCmdIL.c: fixed end-int interpretation of linsert
	to correctly calculate value for end, added test and docs [Bug: 2693]

	* doc/regexp.n:
	* doc/regsub.n:
	* tests/regexp.test:
	* generic/tclCmdMZ.c: add -start switch to regexp and regsub
	with docs and tests

	* doc/switch.n: added proper use of comments to example.
	* generic/tclCmdMZ.c: changed switch to complain when an error
	occurs that seems to be due to a misplaced comment.

	* generic/tclCmdMZ.c: fixed illegal ref for \[0-9] substitutions
	in regsub [Bug: 2723]

	* generic/tclCmdMZ.c: changed [string equal] to return an Int
	type object (was a Boolean)
1999-09-21 04:20:28 +00:00
hobbs 1f66507f55 1999-09-01 Jeff Hobbs <hobbs@scriptics.com>
* unix/aclocal.m4:
	* unix/tcl.m4: adjusted fix from 8-21 to add -bnoentry to the
	AIX-* case and readjusted the range
1999-09-02 16:26:51 +00:00
hobbs dda9412829 1999-09-01 Jeff Hobbs <hobbs@scriptics.com>
* generic/tclParseExpr.c: changed '"' to '\"' to make FreeBSD
	happy [Bug: 2625]
	* generic/tclProc.c: moved static buf to better location and
	changed static msg that would overflow in ProcessProcResultCode
	[Bug: 2483] and added Tcl_DStringFree to Tcl_ProcObjCmd.
	Also reworked size of static buffers.
	* tests/stringObj.test: added test 9.11
	* generic/tclStringObj.c: changed Tcl_AppendObjToObj to
	properly handle the 1-byte dest and mixed src case where
	both had had Unicode string len checks made on them.  [Bug: 2678]
1999-09-02 16:26:33 +00:00
hobbs 8de7074c8b 1999-09-01 Jeff Hobbs <hobbs@scriptics.com>
remove TclInitStubs.3 - it was duplicate of InitStubs.3
1999-09-02 16:26:11 +00:00
hobbs d6ddf4acdc 1999-09-01 Jeff Hobbs <hobbs@scriptics.com>
* generic/tclParseExpr.c: changed '"' to '\"' to make FreeBSD
	happy [Bug: 2625]
	* generic/tclProc.c: moved static buf to better location and
	changed static msg that would overflow in ProcessProcResultCode
	[Bug: 2483] and added Tcl_DStringFree to Tcl_ProcObjCmd.
	Also reworked size of static buffers.
	* tests/stringObj.test: added test 9.11
	* generic/tclStringObj.c: changed Tcl_AppendObjToObj to
	properly handle the 1-byte dest and mixed src case where
	both had had Unicode string len checks made on them.  [Bug: 2678]
	* unix/aclocal.m4:
	* unix/tcl.m4: adjusted fix from 8-21 to add -bnoentry to the
	AIX-* case and readjusted the range
1999-09-02 16:25:12 +00:00
jenn a856dda168 Process command-line arguments only ::tcltest doesn't have a
child namespace (requires that command-line args are processed
in that namespace)
1999-09-01 23:15:41 +00:00
wart b1a8d8eea5 Subst 2 more values into tclConfig.sh 1999-09-01 00:38:18 +00:00
jenn d749d927bb typos 1999-08-31 21:49:27 +00:00
jenn cd26280044 * library/tcltest1.0/tcltest.tcl:
* doc/tcltest.n:
* tests/README: Modified testConstraints variable so that it isn't
unset every time ::tcltest::initConstraints is called and cleaned up
documentation in the README file and the man page.
1999-08-31 21:43:44 +00:00
jenn f2ae9ef8a4 lint 1999-08-31 01:48:25 +00:00
jenn f6d9c470d0 * tests/env.test:
* tests/exec.test:
* tests/io.test:
* tests/event.test:
* tests/tcltest.test: Added 'exit' calls to scripts that the tests
themselves write, and removed accidental checkin of knownBugThreaded
constraints for Solaris and Linux.
1999-08-27 21:45:17 +00:00
jenn 16b4771e72 * library/tcltest1.0/tcltest.tcl: Modified tcltest so that
variables are only initialized to their default values if they did
not previously exist.
1999-08-27 18:12:23 +00:00
jenn 0d3afa4a15 * tests/tcltest.test:
* library/tcltest1.0/tcltest.tcl:  Added a -args flag that sets a
	variable named ::tcltest::parameters based on whatever's being
	sent in as the argument to the -args flag.
1999-08-27 01:17:01 +00:00
jenn 5091b79432 * tests/tcltest.test: Added additional tests for -tmpdir, marked
all tests that use exec as unixOrPc.

	* tests/encoding.test:
	* tests/interp.test:
	* tests/macFCmd.test:
	* tests/parseOld.test:
	* tests/regexp.test: Applied patches from Jim Ingham to add
	encoding to a Mac only interp test, change an error message in
	macFCmd.tet, put a comment in parseOld.test, fix tests using the
	testencoding path command, and put unixOrPc constraints on tests
	that use exec.
1999-08-23 17:54:59 +00:00
hobbs 4c6a266de9 *** empty log message *** 1999-08-21 19:41:30 +00:00
hobbs 007c3c4a19 1999-08-21 Jeff Hobbs <hobbs@scriptics.com>
* unix/aclocal.m4: Changed AIX-4.[2-9] check to AIX-4.[1-9]
	[Bug: 1909]
1999-08-21 19:41:18 +00:00
hobbs 1658119434 1999-08-20 Jeff Hobbs <hobbs@scriptics.com>
* generic/tclPosixStr.c: fixed typo [Bug: 2592]
1999-08-21 19:41:04 +00:00
hobbs 4bfe5ab933 1999-08-20 Jeff Hobbs <hobbs@scriptics.com>
* doc/*: fixed various nroff bugs in man pages [Bug: 2503 2588]
1999-08-21 19:40:47 +00:00
hobbs 40c26bfd16 1999-08-21 Jeff Hobbs <hobbs@scriptics.com>
* unix/aclocal.m4: Changed AIX-4.[2-9] check to AIX-4.[1-9]
	[Bug: 1909]

1999-08-20  Jeff Hobbs  <hobbs@scriptics.com>

	* generic/tclPosixStr.c: fixed typo [Bug: 2592]

	* doc/*: fixed various nroff bugs in man pages [Bug: 2503 2588]

1999-08-19  Jeff Hobbs  <hobbs@scriptics.com>

	* win/README.binary: fixed version info and some typos [Bug: 2561]
1999-08-21 19:40:27 +00:00
hobbs 6d54731bf1 1999-08-19 Jeff Hobbs <hobbs@scriptics.com>
* generic/tclIO.c: changed Tcl_GetChannelNames* to use K&R
	style headers (style guide, also pleases HP cc)
1999-08-19 17:39:15 +00:00
hobbs 3623d06f54 1999-08-18 Jeff Hobbs <hobbs@scriptics.com>
* unix/Makefile.in: changed the dependency structure so that
	install-* is dependent on * (ie - install-binaries is dependent
	on binaries).
1999-08-19 03:00:26 +00:00
hobbs e2a4ee1ac2 1999-08-18 Jeff Hobbs <hobbs@scriptics.com>
added tests for bug fixes
1999-08-19 03:00:12 +00:00
hobbs 827f1718a3 1999-08-18 Jeff Hobbs <hobbs@scriptics.com>
* library/auto.tcl:
	* library/init.tcl:
	* library/ldAout.tcl:
	* library/package.tcl:
	* library/safe.tcl:
	* library/word.tcl:
	* library/http2.1/http.tcl:
	* library/msgcat1.0/msgcat.tcl: updated libraries to better
	Tcl style guide (no more string comparisons with == or !=, spacing
	changes).
1999-08-19 02:59:40 +00:00
hobbs 92e37b2bd1 1999-08-18 Jeff Hobbs <hobbs@scriptics.com>
* doc/OpenFileChnl.3:
	* doc/file.n:
	* tests/cmdAH.test:
	* tclIO.c:
	* tclCmdAH.c: added "file channels ?pattern?" tcl command, with
	associated Tcl_GetChannelNames and Tcl_GetChannelNamesEx public
	C APIs (added to tcl.decls as well), with docs and tests.

	* generic/tclCompile.c: add TCL_TOKEN_VARIABLE to the part types
	that cause differed compilation for exprs, to correct the expr
	double-evaluation problem for vars.  Added test cases.
1999-08-19 02:59:08 +00:00
hobbs 5e5c7d8418 1999-08-18 Jeff Hobbs <hobbs@scriptics.com>
* doc/Eval.3: fixed doc on input args [Bug: 2114]

	* doc/OpenFileChnl.3:
	* doc/file.n:
	* tests/cmdAH.test:
	* tclIO.c:
	* tclCmdAH.c: added "file channels ?pattern?" tcl command, with
	associated Tcl_GetChannelNames and Tcl_GetChannelNamesEx public
	C APIs (added to tcl.decls as well), with docs and tests.
1999-08-19 02:58:34 +00:00
hobbs 7070ed9f34 1999-08-18 Jeff Hobbs <hobbs@scriptics.com>
* doc/Eval.3: fixed doc on input args [Bug: 2114]

	* doc/OpenFileChnl.3:
	* doc/file.n:
	* tests/cmdAH.test:
	* tclIO.c:
	* tclCmdAH.c: added "file channels ?pattern?" tcl command, with
	associated Tcl_GetChannelNames and Tcl_GetChannelNamesEx public
	C APIs (added to tcl.decls as well), with docs and tests.

	* tests/expr.test:
	* generic/tclCompile.c: add TCL_TOKEN_VARIABLE to the part types
	that cause differed compilation for exprs, to correct the expr
	double-evaluation problem for vars.  Added test cases.

	* unix/Makefile.in: changed the dependency structure so that
	install-* is dependent on * (ie - install-binaries is dependent
	on binaries).

	* library/auto.tcl:
	* library/init.tcl:
	* library/ldAout.tcl:
	* library/package.tcl:
	* library/safe.tcl:
	* library/word.tcl:
	* library/http2.1/http.tcl:
	* library/msgcat1.0/msgcat.tcl: updated libraries to better
	Tcl style guide (no more string comparisons with == or !=, spacing
	changes).
1999-08-19 02:58:17 +00:00
jenn a9539e1dbc typo 1999-08-17 21:34:45 +00:00
jingham 3083761320 Update copyrights and add my name to Ray's in the credits (blush). 1999-08-16 00:09:30 +00:00
jingham 9f4a83262c Update the copyrights. 1999-08-16 00:09:26 +00:00
jingham 08502fc8e0 Update copyrights and add my name to Ray's in the credits (blush). 1999-08-16 00:09:22 +00:00
jingham 24495e08d6 If you are running the testsuite, set the Stack size to 768K so you can pass the regexp tests. For most sane regexps, however 512K is fine. 1999-08-16 00:09:18 +00:00
jingham 5404016d81 Update copyrights and add my name to Ray's in the credits (blush). 1999-08-16 00:09:09 +00:00
jingham eb0438e136 Change the permissions for opening resource files to Shared. Suprisingly enough, this is the only way to get notification if you have opened the file twice... 1999-08-15 04:54:03 +00:00
jingham df28c68de1 Note Stack space increase needed for complex patterns with many subexpressions in Tcl8.2 regexp package. 1999-08-15 04:05:13 +00:00
jingham 28a8123abe Require Tcl 8.2 1999-08-15 04:04:06 +00:00
jingham e4097bf37a Typo in comment 1999-08-15 04:03:52 +00:00
welch a68fb83f3a Minor tweaks to get these pages through the HTML converter 1999-08-13 19:01:04 +00:00
welch 9f97a0a02a Updated to handle more special backslash sequences found
in re_syntax.n
1999-08-13 19:00:37 +00:00
redman 2c5ff5f369 Release 8.2.0. 1999-08-13 18:30:24 +00:00
redman 5298b4644f Fixed bad function definition, should use void instead of VOID for
return type (does not return "void *").
1999-08-13 17:53:19 +00:00
redman 36ea59d725 Fixed type, USE_TCL_ALLOC should be USE_TCLALLOC 1999-08-13 16:49:06 +00:00
jingham addd9bdf50 Update to move the build directory out of the source tree. 1999-08-13 08:07:17 +00:00
jingham 8d8899a103 *** empty log message *** 1999-08-13 08:06:19 +00:00
stanton 233a6d7df1 *** empty log message *** 1999-08-12 23:14:57 +00:00
stanton 42028a159e * win/Makefile.in: Added COMPILE_DEBUG_FLAGS macro to make it
easier to turn on compiler tracing.

* tests/parse.test:
* generic/tclParse.c: Fixed bug in Tcl_EvalEx where the termOffset
was not being updated in cases where the evaluation returned a non
TCL_OK error code. [Bug: 2535]
1999-08-12 23:14:42 +00:00
wart 1b63b4ff82 tclConfig.sh is now installed for windows 1999-08-12 20:02:51 +00:00
redman fd628b582d Applied patch to remove compiler warning. 1999-08-12 17:38:49 +00:00
wart 0bb185a015 Added definition for STLIB_LD 1999-08-11 23:09:27 +00:00
wart 720e09d73a Added substitution for STLIB_LD, the static linker. 1999-08-11 22:48:09 +00:00
redman 1f23830c3b Include the unix/aclocal.m4 file in the distribution. 1999-08-11 20:51:54 +00:00
redman 399c0fbbc6 Change version numbers to 8.2.0 1999-08-10 23:16:25 +00:00
redman 9d34f16944 Rolled back changes to change the prototype of
Tcl_ListObjGetElements()
1999-08-10 22:45:10 +00:00
redman 324d20b570 * generic/tclListObj.c:
* generic/tcl.decls:
* generic/tclDecls.h: Applied patch from Jim Ingham to change the
prototype of Tcl_ListObjGetElements to have the last argument have
a CONST so that you can feed it the objv that you get from the
standard TclObj command proc.

* generic/tclAlloc.c:
* generic/tclCmdIL.c:
* generic/tclIO.c:
* generic/tclThread.c:
* win/tclWinThrd.c:
* unix/tclUnixThrd.c: Fixed Brent's changes so that they work on
Windows (and he fixed the bug in the Unix thread implementation).
1999-08-10 17:35:14 +00:00
welch 7cd43815d0 Fixed level of indirection in Tcl_GetAllocMutex 1999-08-10 17:17:27 +00:00
hobbs 29e7f1a552 1999-08-09 Jeff Hobbs <hobbs@scriptics.com>
* tests/string.test: added largest_int proc to adapt for >32 bit
	machines and int overflow testing.
	* tests/tcltest.test: fixed minor error in 8.2 result (from dgp)
1999-08-10 05:09:16 +00:00
jingham 5faf3edecd Move Mark Roseman's fix for slow connections from Tcl 8.0 to Tcl 8.2. 1999-08-10 04:21:55 +00:00
jingham 1cc2e984d3 Trivial cleanup - Windows -> Macintosh in comments. 1999-08-10 04:21:40 +00:00
jingham 590454e7d5 Convert the directory name from Utf to External before passing it to the Toolbox. 1999-08-10 04:21:35 +00:00
welch 24e9f11aa2 Added Tcl_GetAllocMutex for use by tclAlloc.c and tclCkalloc.c 1999-08-10 02:42:36 +00:00
welch 3a26c6d449 1 Added use of Tcl_GetAllocMutex to tclAlloc.c and tclCkalloc.c so they
can be linked against alternate thread packages.
2   Added Tcl_GetChannelNames to tclIO.c
3   Added TclVarTraceExists hook so "info exists" triggers read traces
    exactly like it did in Tcl 7.6
4   Stubs table changes to reflect new internal and external APIs
1999-08-10 02:42:12 +00:00
welch 2690329046 Updated change log for my aolserver-related changes 1999-08-10 02:40:04 +00:00
redman abc7360081 removed unreferenced variable from regcomp.c 1999-08-10 01:23:53 +00:00
hobbs 724a8328fb 1999-08-09 Jeff Hobbs <hobbs@scriptics.com>
* library/init.tcl: fixed path handling in auto_execok (it could
	miss including the normal path on some Windows machines) [Bug: 1276]
1999-08-09 16:30:50 +00:00
hobbs c6cad9a80c 1999-08-09 Jeff Hobbs <hobbs@scriptics.com>
* doc/Object.3: clarified Tcl_DecrRefCount docs [Bug: 1952]
	* doc/array.n: clarified array pattern docs [Bug: 1330]
	* doc/clock.n: fixed clock docs [Bug: 693]
	* doc/lindex.n: clarified to account for new end-int behavior.
	* doc/string.n: fixed formatting errors [Bug: 2188 2189]
	* doc/tclvars.n: fixed doc error [Bug: 2042]
1999-08-09 16:30:34 +00:00
hobbs 4ff6daaaf9 1999-08-09 Jeff Hobbs <hobbs@scriptics.com>
* doc/Object.3: clarified Tcl_DecrRefCount docs [Bug: 1952]
	* doc/array.n: clarified array pattern docs [Bug: 1330]
	* doc/clock.n: fixed clock docs [Bug: 693]
	* doc/lindex.n: clarified to account for new end-int behavior.
	* doc/string.n: fixed formatting errors [Bug: 2188 2189]
	* doc/tclvars.n: fixed doc error [Bug: 2042]
	* library/init.tcl: fixed path handling in auto_execok (it could
	miss including the normal path on some Windows machines) [Bug: 1276]
1999-08-09 16:30:15 +00:00
hobbs d4cffe067f 1999-08-05 Jeff Hobbs <hobbs@scriptics.com>
* library/http2.1/http.tcl: Made use of "i" in init section not
	use global var and start at 0 (was 1). [Bug: 2502]
1999-08-05 16:57:48 +00:00
hobbs add46ecf01 1999-08-05 Jeff Hobbs <hobbs@scriptics.com>
* generic/tclLiteral.c: fixed reference to bytes that might
	not be null terminated (using objPtr->bytes, which is) [Bug: 2496]
1999-08-05 16:56:45 +00:00
hobbs 071c17935f 1999-08-05 Jeff Hobbs <hobbs@scriptics.com>
* doc/tclvars.n: Made it clear that tcl_pkgPath was not set
	for Windows (already mentioned in init.tcl) [Bug: 2455]
1999-08-05 16:56:31 +00:00
hobbs 1c3746549e 1999-08-05 Jeff Hobbs <hobbs@scriptics.com>
* doc/tclvars.n: Made it clear that tcl_pkgPath was not set
	for Windows (already mentioned in init.tcl) [Bug: 2455]
	* generic/tclLiteral.c: fixed reference to bytes that might
	not be null terminated (using objPtr->bytes, which is) [Bug: 2496]
	* library/http2.1/http.tcl: Made use of "i" in init section not
	use global var. [Bug: 2502]
1999-08-05 16:56:15 +00:00
jingham e8dbc9b6ba Declare the tclStubs table so we can use it to swap out Tcl_SetTimer and Tcl_WaitForEvent in this file. 1999-08-05 06:17:51 +00:00
stanton c882b20715 *** empty log message *** 1999-08-05 01:21:15 +00:00
stanton cda7ffb973 * tests/reg.test: Added test for REG_EXPECT bug fixed by Henry's
patch.
1999-08-05 01:21:09 +00:00
stanton 144c26987f * generic/regc_nfa.c:
* generic/regcomp.c:
* generic/rege_dfa.c:
* generic/regexec.c:
* generic/regguts.h: Applied patches supplied by Henry Spencer to
greatly enhance the performance of certain classes of regular
expressions. [Bug: 2440, 2447]
1999-08-05 01:16:57 +00:00
redman 9732015163 Released Tcl 8.2b2. 1999-08-04 20:58:48 +00:00
redman a1bd78b24d Remove extern declaration for TclWinGetPlatform functions, they're
already in tclInt.decls.  Only affects open source release.
1999-08-04 15:58:42 +00:00
redman 575b82f7be Move functions declarations out of win/tclWinInt.h that are now in
generic/tclInt.decls
1999-08-03 18:07:12 +00:00
redman 46639f655d * unix/configure.in:
* win/configure.in: Change beta level to b2.
1999-08-02 21:57:23 +00:00
redman d8e3995b69 removed extra declaration of Tcl_RegExpMatchObj 1999-08-02 18:33:43 +00:00
redman 28cb778fa9 * generic/tcl.h:
* generic/tcl.decls:
* generic/tclDecls.h:
* generic/tclInt.h:
* generic/tclInt.decls:
* generic/tclIntDecls.h:
* generic/tclRegexp.h:
* generic/tclStubInit.c: Move some exported public and internal
functions to the stub tables.  Removed functions that are in the
stub tables (from this and previous changes) from the original
header files.
1999-08-02 17:45:33 +00:00
redman 82389cfbf4 * win/tclWinSock.c: Added comment block to SocketThread()
function.  Added code to avoid calling TerminateThread(), but
instead to send a message to the socket event window to tell it to
terminate its thread.
1999-08-01 22:09:25 +00:00
hobbs 920d13e1cc * generic/tclInt.decls: added declaractions necessary for the
Tcl test code to work wth stubs [Bug: 2445]
1999-08-01 20:43:59 +00:00
redman 7736a343ed * unix/tclUnixThrd.c: Applied patch to fix threads on Irix 6.5.
Patch from James Dennett.  [Bug: 2450]

* tests/info.test: Enable test for tclParse.c change (info
complete).
1999-07-31 01:55:48 +00:00
redman 4440b020d4 * win/tclWinPipe.c:
* win/Makefile.in: Fixing launching of 16-bit apps on Win9x from
wish.  The command line was primed with tclpip82.dll, but it was
ignored.  Fixed that, then fixed the gmake makefile to build
tclpip82.dll as an executable.

* win/tclWinSock.c: Applied small patch to get thread-specific
data after initializing the socket driver.
1999-07-31 01:24:22 +00:00
wart 69f23df0ea Added definitions for some symbols in tclConfig.sh that never got
values in Windows.
1999-07-30 23:31:32 +00:00
wart 8ea6844741 Parameterized the static library linkers (ar cr and lib -nologo) to assist
in merging the Makefile.in files later.
1999-07-30 22:26:23 +00:00
hobbs 77a242e5ab * tclParse.c: fixed bug in info complete regarding nested square
brackets [Bug: 2382, 2466]
1999-07-30 22:19:10 +00:00
hobbs 901e9cf34b updated trf patch to fix problems created when adapting Kupries'
previous patch to our specs.
1999-07-30 21:46:47 +00:00
jenn a0e51c52b4 Updated to match the new return values from tcltest. 1999-07-30 19:10:47 +00:00
redman 6468cf2bca * win/tclWinChan.c: Allow tcl to open CON and NUL, even for std
channels.  Checking for bad/unusable std channels was moved to Tk
since its only purpose was to check whether to use the Tk Console
Window for the std channels.  [Bug: 2393 2392 2209 2458]
1999-07-30 02:02:26 +00:00
jenn 8ae23baa02 Exit with non-zero status if there were problems with the way the test
suite was started (e.g. wrong # arguments)
1999-07-30 01:35:27 +00:00
redman dfd80e527a * unix/mkLinks.tcl: Applied patch to avoid linking pack.n to
pack-old.n.  Patch from Don Porter. [Bug: 2469]

* doc/Encoding.n: Applied patch to fix typo in .SH NAME line.
Patch from Don Porter.  [Bug: 2451]
1999-07-29 23:17:38 +00:00
redman 2a5093e845 win/tclWinSock.c: free Win32 Event handles when destroying socket
helper threads.
1999-07-29 22:58:22 +00:00
wart 832069eb84 Added lines so that extensions can set up static linker (ar vs. lib) and
C compiler warning flags easily.
1999-07-29 19:21:32 +00:00
wart 5c79295d28 Added entries for LDFLAGS_DEBUG and LDFLAGS_OPTIMIZE so that extensions can
get these values in the same way they get the debug and optimize CFLAGS.
1999-07-28 18:51:29 +00:00
jenn eee25bb571 * tests/tcltest.test:
* library/tcltest1.0/tcltest.tcl: Fixed the condition under which
::tcltest::PrintError had an infinite loop problem and added a
test case for it.  Added an optional argument to
::tcltest::getMatchingFiles telling it where to search for test
files.
1999-07-28 18:33:18 +00:00
redman 592b1317a7 update Windows installer bitmap to read Tcl/Tk Version 8.2 1999-07-27 16:31:43 +00:00
redman fd9ef8bf5f Bug fixes for threaded Tcl on NT with single and dual CPUs. Still some
open issues, this code is a little more stable though.
1999-07-27 01:42:21 +00:00
jenn 1f5265171e * tests/tcltest.test:
* library/tcltest1.0/tcltest.tcl:
	* doc/tcltest.n: Cleaned up code in ::tcltest::PrintError, revised
	documentation, and added tests for the tcltest package.
1999-07-26 22:50:47 +00:00
jenn 225dbfa198 Tests for the tcltest package 1999-07-26 17:59:12 +00:00
redman f895fcc54f Change destination of dde package to dde1.1. 1999-07-26 17:51:08 +00:00
redman d9cfa1c063 Removed patch for bug 2382, for info complete. 1999-07-23 23:40:28 +00:00
redman fb66aafc51 * win/tclWinSock.c: Fixed hang with threads enabled, fixed
semaphores with threads disabled.

* win/safe.test: Fixed safe-6.3 with threads enabled.

* win/Makefile.in:  Fixed calling of tcltest to fix safe.test
failures due to path TCL_LIBRARY path.
1999-07-22 23:47:29 +00:00
redman 9e9f6a1ae6 Fix hange with socket code (win32) with threads enabled, fixed
the semaphores for threads disabled.  Fixed calling of tcltest
in Makefile.in (win32) and fixed safe-6.3 for threads enabled.
1999-07-22 23:45:52 +00:00
redman 56b77d9d6c * Changed version to 8.2b2.
* win/tclWinPort.h: Block out include of sys/*.h in order to
build extensions with MetroWerks compiler for Win32. [Bug: 2385]

* generic/tclCmdMZ.c:
* generic/tclIO.c: Fix ANSI-style prototypes based on patch from
Ulrich Ring.  [Bug: 2391]

* unix/Makefile.in: Need to make install-sh executable before
calling (with chmod +x).  [Bug: 2413]

* tests/var.test:
* generic/tclVar.c:  Fixed bug that caused a seg. fault when using
"array set a(b) {}", which is a bad array name anyway.  Now the
"array set" command will return an error in this case.  Added test
case and fixed existing test. [Bug: 2427]
1999-07-22 21:50:53 +00:00
redman 41b1b6389d Applied patch for info complete. [Bug: 2382] 1999-07-22 02:15:44 +00:00
redman 42dc6740de revert changes to TclpStrftime, not needed for internal functions. 1999-07-22 01:26:17 +00:00
redman 54b6980992 * doc/Utf.3:
* generic/tcl.decls:
* generic/tclInt.decls:
* generic/tclDecls.h:
* generic/tclIntDecls.h:
* generic/tclUtf.c:
* compat/strftime.c:
* unix/tclUnixTime.c: Changed function declarations in
non-platform-specific APIs to use "unsigned long" instead of
"size_t", which may not be defined on certain compilers (rather
than include sys/types.h, which may not exist).
1999-07-22 01:08:03 +00:00
redman 0921ebbced * unix/Makefile.in: Added the Windows configure script to the
distribution file list, already shipping configure.in and the .m4
files, but needed the configure script itself.
1999-07-22 00:38:39 +00:00
redman 410c93c86f * win/makefile.vc: Changed version number of DDE package in VC++
makefile to use 1.1 instead of 1.0.
1999-07-22 00:13:12 +00:00
redman 412a279944 * doc/open.n: Added documentation of \\.\comX notation for opening
serial ports on Windows (alternative to comX:).

* tests/ioCmd.test:
* doc/open.n:
* win/tclWinSerial.c: Applied patch from Rolf Schroedter to add
-pollinterval option to fconfigure to modify the maxblocktime used
in the fileevent polling. Added documentation and fixed the test
case as well.
1999-07-22 00:06:09 +00:00
hershey daeda8f9c3 added a line to initialize the tclDefaultLibrary tcl global var to "", as
was done in Tcl8.0.5.
1999-07-21 23:28:05 +00:00
redman 6b75c1c7b9 Previous version was a mistake, roll it back. 1999-07-21 21:29:43 +00:00
redman c3e207442e * win/tclWinSock.c: Modified 8.1.0 version of the Win32 socket
driver to move the handling of the socket event window in a
separate thread.  It also turned out that Win95 & Win98 were, in
some cases, getting multiple FD_ACCEPTs but only handling one.
Added a count for the FD_ACCEPT to take care of this.  Tested on
NT4 SP3, NT4 SP4, Win95, and Win98.
[Bug: 2178 2256 2259 2329 2323 2355]
1999-07-21 21:28:58 +00:00
hershey 8898e7a751 added missing '\' at the end of one line (only irix complained about this) 1999-07-21 17:43:21 +00:00
jpeek a1210c7b20 Small tweaks to the top-level README to fix typos and wording. 1999-07-21 16:04:22 +00:00
hershey 2608662137 * generic/tclInitScript.h:
* unix/tclUnixInit.c: merged code with 8.0.5.  We now use an
	intermediate global tcl var "tclDefaultLibrary" to keep the
	"tcl_library" var from being set by the default value in the
	Makefile.  Also fixed a bug in which caused the value of
	TCL_LIBRARY env var to be ignored.
	* unix/tclWinInit.c: just updated some comments.
1999-07-21 02:01:36 +00:00
hershey 8cc4afecef changed http package version from 2.0 to 2.1 1999-07-20 00:11:51 +00:00
hershey 76306cfd57 changed http dir from 2.0 to 2.1 1999-07-19 21:03:38 +00:00
redman ba02196dd7 Add Tcl_SetNotifier to stubs table. [Bug: 2354] 1999-07-16 21:56:36 +00:00
redman 1756fda322 * unix/aclocal.m4:
* unix/tcl.m4:  Add check for Alpha/Linux to correct the IEEE
	floating flag to the compiler, should be -mieee.  Patch from Don
	Porter.
* tools/tcl.hpj.in: Change version number of .cnt file referenced
	in .HPJ file.
1999-07-16 21:40:32 +00:00
redman 835d644cc3 Fix minor version number. 1999-07-16 01:52:24 +00:00
redman e7517d3e27 Install files with 82 instead of 81 suffix 1999-07-15 21:00:01 +00:00
redman 31a95f977e Change version number 1999-07-15 01:47:21 +00:00
jpeek 4c2deb2f3b Deleted sentence as suggested by Scott Stanton 1999-07-14 19:09:36 +00:00
jpeek 06ff6e681a doc/re_syntax.n: Deleted sentence suggested by Scott S. 1999-07-14 19:07:20 +00:00
redman 20317564b9 Makefile.in: fixed cat32.exe build
makefile.vc: fixed calling tcltest.exe
1999-07-13 22:23:44 +00:00
redman dff386f7a7 Add .m4 files and Windows configure.in and Makefile.in 1999-07-13 22:23:06 +00:00
redman 3a6602b01b Change dde package to 1.1 1999-07-13 22:22:51 +00:00
redman 289a85deac Merged ChangeLog for 8.2b1 1999-07-13 22:21:56 +00:00
jpeek 7ab72851c3 Removed two notes to myself (oops), cleaned up wording, moved changebars. 1999-07-13 02:07:37 +00:00
jpeek 3cd14b96cf Documented tweaks to the tcl/docs/re_syntax.n manpage file. 1999-07-13 02:06:20 +00:00
jenn c4467af985 Catch the cd that sets up the initial value for the testsDirectory variable. 1999-07-12 21:03:48 +00:00
redman 828449bf97 Changed version numbers in NMAKE makefile. 1999-07-11 20:31:50 +00:00
redman c6b89bc14e Change version number in NMAKE makefile 1999-07-11 20:29:57 +00:00
wart d2f2e730e7 install-man target renamed to "install-doc" to be consistent with TEA spec. 1999-07-09 21:18:10 +00:00
redman c7086983c9 * win/configure.in: Eval DLLSUFFIX, LIBSUFFIX, and EXESUFFIX in
the configure script so that substitutions get expanded before
being placed in the Makefile.  The "d" portion for debug libraries
and DLLs was not being set properly.
1999-07-09 18:24:00 +00:00
stanton b8a5640f14 fixed line termination character 1999-07-09 02:31:30 +00:00
stanton 9891179615 *** empty log message *** 1999-07-09 02:12:26 +00:00
stanton 196bfbe531 * tests/string.test:
* generic/tclCmdMZ.c: Fixed bug in string range bounds checking
code.
1999-07-09 02:11:56 +00:00
jenn 96da551293 Removed -asidefromdir and -relateddir flags, removed unused
::tcltest::dotests proc, cleaned up implementation of core file checking,
and fixed the code that checks for 1-letter flag abbreviations.
1999-07-09 00:00:58 +00:00
stanton aa4a2e7991 * win/Makefile.in: Added tcltest target so runtest works
properly.  Added missing names to the clean/distclean targets.

* tests/reg.test:
* generic/rege_dfa.c: Applied fix supplied by Henry Spencer for
bug in DFA state caching under lookahead conditions.  [Bug: 2318]
1999-07-08 23:17:55 +00:00
rjohnson b1a20a8744 Fixed bogus test for env.test 1999-07-08 19:44:43 +00:00
jenn fde896cb6e Do additional checks to unset any environment variables set, changed or
created by the tests.
1999-07-08 17:29:30 +00:00
rjohnson c047428bcb Improved test to handle empty env array - (will raise error) 1999-07-08 03:35:18 +00:00
rjohnson 4fb709aa45 Fixed a couple of bad registry tests... 1999-07-08 03:30:12 +00:00
rjohnson e913966033 Fixed bug in test suite - remember to update tests when
changing features!!!
1999-07-08 03:08:03 +00:00
rjohnson 1d5f32d6e9 Fixed broken utility function makeFile. 1999-07-08 02:57:17 +00:00
rjohnson 95230d707c Made test encoding test understand platform differences. 1999-07-07 23:08:13 +00:00
stanton 0939ac05ff * doc/fconfigure.n: Clarified default buffering behavior for the
standard channels. [Bug: 2335]
1999-07-07 18:59:51 +00:00
redman 75c5493d11 New windows serial port driver.
[Bug 1980 2217]
1999-07-07 02:37:30 +00:00
welch 783338db2a Marked two timing-dependent tests "nonPortable",
but I really need to fix these (4.11 and 4.12)
1999-07-07 02:28:57 +00:00
welch 996f9cdcd3 Back-fitted notes about my recent changes 1999-07-07 02:08:35 +00:00
welch 7c8e505f41 Fixed handling of connection timeouts. 1999-07-07 01:58:19 +00:00
jenn 89802c634a Removed extra '\' characters at the beginning of the parseOld.test
file that were causing "invalid command" messages whenever the test
was run.
1999-07-06 23:55:44 +00:00
jenn 45c5cefa32 Added entries for 6/25/99 and 6/29/99 reflecting the addition of
the tcltest package and all changes associated with it.
1999-07-06 23:43:45 +00:00
jpeek 56db8af08f Added entry re: 1999-06-23 changes that created re_syntax(n) page. 1999-07-06 22:50:58 +00:00
redman 01e565256c Fix missing declaration of tclStubs 1999-07-02 22:08:28 +00:00
redman cd0cbda2bc Fix Tcl_GetStackedChannel declaration, the function
returns a Tcl_Channel, not void.
1999-07-02 21:59:18 +00:00
redman 2472e67044 Block out unix-only code for windows & mac. 1999-07-02 21:50:04 +00:00
redman acb2e7aeb4 Regen the stub files after changes in tcl.decls were made, but the
stub files were not regenerated.
1999-07-02 21:09:11 +00:00
jenn 00080a5c8d Temporarily disabling core file checking. 1999-07-02 20:39:52 +00:00
welch 273c0ca7ae Fixed lint found by Jim Ingham 1999-07-02 19:59:38 +00:00
welch 2d937e1009 Name change from Tcl_ReplaceChannel to Tcl_StackChannel
Added new code that modifies the channel in place.
1999-07-02 19:51:29 +00:00
welch 66a17ecd63 Name change from Tcl_ReplaceChannel to Tcl_StackChannel 1999-07-02 19:51:14 +00:00
welch b7e8369091 Improved support for empty array names 1999-07-02 06:41:23 +00:00
welch 77a4b3e4bb Added hook points to the notifier 1999-07-02 06:05:39 +00:00
welch b032007a3e Added hook points to the notifier
Updated Xt tests to use new Tcl_SetNotifier
1999-07-02 06:05:34 +00:00
welch 4e5672a072 Fixed package version number 1999-07-02 06:05:11 +00:00
welch 87cdcc34ea Added hook points to the notifier 1999-07-02 06:04:55 +00:00
welch 7a43ce5002 Added Tcl_SetNotifier and associated typedef.
This lets you hook the notifier procs.
1999-07-02 06:04:26 +00:00
redman acb6f56b85 fix to call TclStat instead of TclpStat 1999-07-01 23:24:02 +00:00
redman 733df6bdb2 Call TclStat instead of TclpStat in order to allow the
stat hooks to work properly.
1999-07-01 23:21:06 +00:00
jenn cbc160d0d8 Changed the tests to use the testConstraints array that the
test harness uses instead of the old name (testConfig).
1999-07-01 17:36:17 +00:00
welch 4b2545f828 Updated for new package version number 1999-07-01 16:54:10 +00:00
redman 757f1e133a Fix genstubs target. 1999-06-30 22:35:10 +00:00
redman 437839cb10 Add TclHandle functions to the internal stub table.
Remove unused tclStubs.c file.
1999-06-30 22:34:44 +00:00
wart ac52131b24 Removed call to obsolete AC_C_CROSS macro. 1999-06-30 18:39:45 +00:00
welch 31463576a0 Initial version of the Tcl_ReplaceChannel and Tcl_UndoReplaceChannel
functions.
1999-06-30 17:47:27 +00:00
welch cf9b05a0bb Updated http and ReplaceChannel man pages 1999-06-30 17:46:51 +00:00
welch c9e74e1ec6 Fixed -timeout bug to handle connections to dead servers properly.
Added http::cleanup function
1999-06-30 17:43:51 +00:00
hershey c6757f9c32 updated dde version from 1.0 to 1.1 1999-06-30 05:51:51 +00:00
jenn 8a59345df4 Added a check to not rename incr unless it's been previously
renamed.
1999-06-30 00:17:36 +00:00
jenn ad8e9072d6 Added a check at the end of the test to not unset variables if
they don't exist.
1999-06-30 00:17:06 +00:00
jenn c99437b6b6 Added flags -limitconstraints, -preservecore, -help, -file, -notfile, -relateddir,
and -asidefromdir to tcltest.tcl.  Also added exported proc
::tcltest::getMatchingTestFiles to tcltest.tcl.  Modified documentation to match
and all.tcl to use the new functionality instead of implementing -file itself.

Changed some test names in winPipe.test to remove duplicates.
1999-06-29 20:14:10 +00:00
jenn 3c38d311e4 Modified the last three tests to run with pcOnly constraint. 1999-06-29 03:22:06 +00:00
welch 7d96e2b24e Adopted Doc patch that changes "unknown_active" to "unknown_pending" 1999-06-29 00:25:23 +00:00
redman 71008cf5a4 Applied patch from Peter Hardie (with modifications) to fix
Tcl_GetIndexFromObj when the key is "".  Added test cases and
doc note.
1999-06-28 23:49:29 +00:00
wart c258b333c6 Documented 2 more files that need to be updated when the Tcl version
number changes.
1999-06-28 19:02:52 +00:00
redman d5e40f3d0b Fixed test suite to call $tcltest::tcltest instead of $::tcltest
(for the name of the executable).
1999-06-28 18:23:21 +00:00
wart 9973c32cda Updated versions to 8.2 and 8.2b1 where appropriate. 1999-06-28 18:23:07 +00:00
hershey 976a29d345 updated 8.1 to 8.2 1999-06-27 20:38:35 +00:00
redman 8b73ba3278 Added poke command to dde.
Changed dde package version to 1.1
Fixed makefile to install tcl8.2 library correctly
Fixed dll names in pkgIndex files for dde and reg
1999-06-26 22:41:52 +00:00
rjohnson 9ac9b8135f Marked on of the string tests non-portable. IRIX thinks that
.e1 is a valid double - the spec and most other UNIX systems
do not think it's valid.
1999-06-26 22:29:06 +00:00
rjohnson cabe0c5ecc Fixed another bug in test suite... 1999-06-26 21:41:53 +00:00
rjohnson 45416777a1 Fixed bug in all.tcl that caused "make test" not to work. The var
testsDirectory was getting the wrong value.  It was set to the
workingDir - but when running all.tcl it should be set to the
same dir as all.tcl.
1999-06-26 21:09:15 +00:00
rjohnson b7d2ed098d Fixed style problems in many of the test files.
Fixed bug in pkg.test where defs.tcl was still being used.
1999-06-26 20:55:07 +00:00
redman 13e2875c78 Export functions for TclHandle 1999-06-26 19:35:58 +00:00
jenn e3bbd904bc Added tcltest to the list of packages to install 1999-06-26 03:56:48 +00:00
jenn c70d17644d Added package tcltest to the list of packages to install. 1999-06-26 03:56:25 +00:00
jenn c750824920 Modified the tests to use the package tcltest 1999-06-26 03:54:09 +00:00
jenn f95999e4e2 Adding package tcltest; this replaces the original defs.tcl file
that was a part of the test suite.
1999-06-26 03:53:45 +00:00
jenn 2c7f3c5f2b This file contains what used to be in the tests/README file
and documents the tcltest package.
1999-06-26 03:47:59 +00:00
redman a902e4fe9a Changed so unix always maps ckalloc to Tcl_Alloc or Tcl_DbCkAlloc to avoid
problems with mixed TCL_MEM_DEBUG modes.
1999-06-26 00:01:47 +00:00
welch 898d7759a0 Changed to Tcl 8.2b1 1999-06-25 23:47:28 +00:00
welch f10b2cae30 Added note about win/configure.in needing a version change 1999-06-25 23:47:16 +00:00
welch bcd6617ebb Fixed return value in doc. 1999-06-25 23:46:59 +00:00
welch c73acda883 Changed to Tcl 8.2b1 1999-06-25 23:29:45 +00:00
welch ff48e1814f Added man page for Tcl_Replace Channel and TclUndoReplaceChannel 1999-06-25 23:29:25 +00:00
stanton 2db3c34abe * tests/reg.test:
* generic/regexec.c: Fixed bugs in non-greedy quantifiers.
1999-06-25 18:42:14 +00:00
jpeek 9f6f5c519a Moved description of regular expression syntax from regexp.n into a
new re_syntax.n page.  Modified other pages' references to regexp(n).
Added a few new "see also" entries pointing to re_syntax(n).
1999-06-24 21:15:13 +00:00
stanton 79d36b8166 * unix/Makefile.in: Changed install-doc to install-man.
* tools/uniParse.tcl:
* tools/uniClass.tcl:
* tools/README:
* tests/string.test:
* generic/regc_locale.c:
* generic/tclUniData.c:
* generic/tclUtf.c:
* doc/string.n: Updated Unicode character tables to reflect latest
Unicode 2.1 data.  Also rationalized "regexp" and "string is"
definitions of character classes.
1999-06-24 03:27:56 +00:00
wart 3497f9531e One more try at fixing the TCL_LIBRARY problem 1999-06-22 18:57:23 +00:00
wart 600a32065c TCL_LIBRARY is now set in the Makefile 1999-06-22 18:51:00 +00:00
stanton d24bf9855f *** empty log message *** 1999-06-21 19:02:07 +00:00
stanton 364bb9f49b * unix/tclUnixThrd.c (TclpThreadCreate): Fixed memory leak where
thread attributes were not being released. [Bug: 2254]
1999-06-21 19:02:02 +00:00
jenn fd32291979 Merged with tk defs.tcl file 1999-06-19 00:57:57 +00:00
wart e0116ad4b9 Reflects recent changes in tcl.m4 (compiler warnings) 1999-06-19 00:18:42 +00:00
redman 83d871bf2d Modifications to correct CC_EXENAME macro. 1999-06-18 17:34:21 +00:00
redman 4f97bfe752 Modify aclocal.m4 for PC to run cygpath on path of CC_EXENAME first. 1999-06-17 23:30:44 +00:00
stanton 2b1e6ef423 *** empty log message *** 1999-06-17 19:32:25 +00:00
stanton 9704de8721 * doc/RegExp.3: Documented the new regexp interfaces and
the compile/execute flags.
1999-06-17 19:32:21 +00:00
stanton 132b0b161f * generic/tclTest.c:
* generic/tclRegexp.h:
* generic/tclRegexp.c:
* generic/tcl.h:
* generic/tcl.decls: Renamed Tcl_RegExpMatchObj to
Tcl_RegExpExecObj and added a new Tcl_RegExpMatchObj that is
equivalent to Tcl_RegExpMatch.  Added public macros for the regexp
compile/execute flags.  Changed to store either an object pointer
or a string pointer in the TclRegexp structure.  Changed to avoid
adding a reference to the object or copying the string.
1999-06-17 19:32:14 +00:00
stanton 0db76eb23c * tests/regexp.test:
* generic/tclCmdMZ.c:
* generic/tclCmdIL.c: Changed to use new regexp interfaces.  Added
-expanded, -line, -linestop, and -lineanchor switches to regsub.
1999-06-17 19:31:50 +00:00
stanton 36fade5673 * generic/regcomp.c: lint
* tests/reg.test:
* generic/regex.h:
* generic/regc_lex.c: Added REG_BOSONLY flag to allow Expect to
iterate through a string an only find matches that start at the
current position within the string.
1999-06-17 19:30:25 +00:00
wart e544512a2d Updated to reflect recent changes 1999-06-17 01:38:52 +00:00
wart 16638385e9 Fixed compiler optimization flags for Linux to remove a plethora of warnings. 1999-06-17 00:36:42 +00:00
hershey 15888e552b * generic/tclVar.c (Tcl_VariableObjCmd): fixed premature increment
in loop that was causing out-of-bounds reads on array "varName".
1999-06-17 00:20:54 +00:00
wart e04beeacaa Reflects changes to tcl.m4 1999-06-16 23:41:51 +00:00
wart 9554b8a02d Added changes to make the macros bahave in the same manner as the Windows
tcl.m4 macros
1999-06-16 23:30:43 +00:00
surles d4d462a89d more incremental changes 1999-06-16 23:18:11 +00:00
surles 689941bae5 added tclConfig.sh.in for Windows 1999-06-16 22:38:25 +00:00
surles 9603fe9cba merged unix and windows styles 1999-06-16 22:36:23 +00:00
stanton f18136a157 *** empty log message *** 1999-06-16 21:56:41 +00:00
stanton 4d921fccee * tests/execute.test:
* generic/tclExecute.c (TclExecuteByteCode): Fixed crash caused by
a bug in INST_LOAD_SCALAR1 where the scalar index was read as
a signed 1 byte value instead of unsigned.  [Bug: 2243]
1999-06-16 21:56:33 +00:00
wart c59020a570 Reorganized the order of the macros (cosmetic change) 1999-06-16 20:17:35 +00:00
surles fdff0f9c3a modified files to work with new windows Makefiles 1999-06-16 20:12:01 +00:00
wart 5ec5645522 More TEA changes. Should play well with TclX now. 1999-06-16 02:20:41 +00:00
redman 26bf1f75c9 Fix DDE code to reinitialize with new servername. 1999-06-16 02:10:25 +00:00
hershey 3b0e43889a fixed bug that cause bad memory read on Windows 1999-06-16 00:47:56 +00:00
hershey 51f2d76280 fixed bugs that kept windows from compiling. 1999-06-16 00:00:48 +00:00
hershey 1b1bab45a7 beefed up the string object tests 1999-06-15 22:06:17 +00:00
wart 2008a70f51 Tcl configure / Makefile sequence now complies with the most basic
spec for TEA.
1999-06-15 20:44:36 +00:00
wart 109fba01c0 Includes changes to tcl.m4 1999-06-15 20:41:57 +00:00
wart 2e11da5bdc Modified some macros based on how some of the extensions work. 1999-06-15 20:41:17 +00:00
hershey 341ee3ff2a Improved the appendObj functions (uncomented the optimized code that was
present in the Unicode obj).
Updated the teststringobj command to look in the correct location for the
amount of space allocated for the UTF string rep.

Note: one stringObj test is still failing; it reflects a change in
that may not be undesirable...
1999-06-15 03:14:44 +00:00
hershey 73d440a8ed Merged String and Unicode object types. Added new functions to
the puplic API:  Tcl_NewUnicodeObj, Tcl_SetUnicodeObj,
	Tcl_GetUnicode, Tcl_GetUniChar, Tcl_GetCharLength, Tcl_GetRange,
	Tcl_AppendUnicodeToObj.

Note: some stringObj tests are still failing--the teststringobj command
still needs to be updated.
1999-06-15 01:16:21 +00:00
surles 9710a67498 Continued work on configure and make scripts 1999-06-11 02:06:27 +00:00
surles a0a78db773 Continued work on configure and make scripts 1999-06-11 01:53:03 +00:00
stanton 472789da3f *** empty log message *** 1999-06-10 22:07:05 +00:00
wart 79e2d3b919 macros that autoconf will be looking for (tcl.m4) 1999-06-10 21:49:56 +00:00
wart 19710f1030 Macros that autoconf will be looking for (tcl.m4) 1999-06-10 21:49:28 +00:00
wart 9bf6209940 Modified to use the tcl.m4 macros 1999-06-10 21:47:45 +00:00
wart de0c1b2baf Modified configure.in that uses the tcl.m4 macros 1999-06-10 21:47:28 +00:00
wart c02e24e314 First pass at Windows Tcl autoconf macros 1999-06-10 21:46:38 +00:00
wart 3f46c3fd86 First pass at Tcl autoconf macros 1999-06-10 21:45:53 +00:00
hershey a1bbc1ac05 fied a memory leak. purify nolonger complains. 1999-06-10 19:14:54 +00:00
stanton 7d849078f7 * tools/genStubs.tcl: Changed to always write output in LF mode. 1999-06-10 04:29:01 +00:00
stanton 81e8aa10e3 * generic/tclUnicodeObj.c: Lots of cleanup and simplification.
Fixed several memory bugs.  Added TclAppendUnicodeToObj.

* generic/tclInt.h: Added declarations for various Unicode string
functions.

* generic/tclRegexp.c:
* generic/tclCmdMZ.c: Changed to use new Unicode string interfaces
for better performance.

* generic/tclRegexp.h:
* generic/tclRegexp.c:
* generic/tcl.h:
* generic/tcl.decls: Added Tcl_RegExpMatchObj and
Tcl_RegExpGetInfo calls to access lower level regexp API.  These
features are needed by Expect.  This is a preliminary
implementation pending final review and cleanup.

* generic/tclCmdMZ.c:
* tests/string.test: Fixed bug where string map failed on null
strings.
1999-06-10 04:28:49 +00:00
stanton d94b3c0f6b * generic/regexec.c:
* unix/tclUnixNotfy.c: lint
1999-06-10 04:27:44 +00:00
hershey 52ecb1fb06 performance improvement for TclGetUnicodeFromObj function and the Unicode
object type.
1999-06-09 17:06:57 +00:00
hershey cfa9255fae unset the variable "u" whose initial value could affect test passage. 1999-06-09 17:06:00 +00:00
hershey 3ccb7bcea5 added TclGetUnicodeFromObj function for use with regexp 1999-06-08 23:30:24 +00:00
stanton 3502bcbc83 *** empty log message *** 1999-06-08 19:02:19 +00:00
stanton ea87cfa4ba * win/tclWinSock.c: Rolled back to the 8.1.0 implementation
because of serious problems with the new driver.  Basically no
incoming socket connections would be reported to a server port.
The 8.1.1 code needs to be redesigned and fixed correctly.
1999-06-08 19:02:15 +00:00
hershey 7f00886c12 added code to unset the "data" array so tests that follow can use a scalar
data var w/o having to unset it first.
1999-06-08 18:06:51 +00:00
hershey 0e53e351cd * tests/string.test:
* generic/tclVar.c (Tcl_SetVar2Ex):
	* generic/tclStringObj.c (Tcl_AppendObjToObj):
	* generic/tclCmdMZ.c (Tcl_StringObjCmd): optimized the string
	index, string length, string range, and append command in cases
	where the object's internal rep is a bytearray.  Objects with
	other internal reps are converted to have the new unicode internal
	rep.

	* unix/Makefile.in:
	* win/Makefile.in:
	* win/Makefile.vc:
	* tests/unicode.test:
	* generic/tclInt.h:
	* generic/tclObj.c:
	* generic/tclUnicodeObj.c: added a new object type to store the
	unicode representation of a string.

	* generic/tclTestObj.c: added the objtype option to the testobj
	command.  This option returns the name of the type of internal rep
	an object has.
1999-06-08 02:59:23 +00:00
stanton b2759d9c54 *** empty log message *** 1999-06-05 00:18:23 +00:00
stanton 8e3096b735 * win/configure.in:
* win/Makefile.in: Windows build now handles static/dynamic
debug/nodebug builds and supports the standard targets using
Cygwin user tools plus GNU make and autoconf.
1999-06-05 00:18:12 +00:00
stanton b49f291ebe *** empty log message *** 1999-06-03 18:43:40 +00:00
stanton 1ee755b0c7 * generic/tclCmdMZ.c (Tcl_StringObjCmd):
* tests/string.test: Fixed bug where string equal/compare -nocase
reported wrong result on null strings. [Bug: 2138]
1999-06-03 18:43:30 +00:00
surles afdabb4790 fixed install target for man pages 1999-06-02 22:05:55 +00:00
stanton 3e9a0727c1 fixed typo 1999-06-02 20:53:29 +00:00
stanton 079a1bc35a * generic/tclUtf.c (Tcl_UtfNcasecmp): Fixed incorrect computation
of relative ordering. [Bug: 2135]
1999-06-02 20:21:24 +00:00
surles b5c1be6c95 Added makefile targets and configure switches to be TEA compliant 1999-06-02 19:29:19 +00:00
stanton acdb8dd7bf *** empty log message *** 1999-06-02 02:03:30 +00:00
stanton 508a5a579d * unix/configure.in: Fixed various small configure.in patches
submitted by Jan Nijtmans. [Bug: 2121]
1999-06-02 02:03:25 +00:00
stanton 21c3baed52 * tests/reg.test:
* generic/regc_color.c:
* generic/regc_cvec.c:
* generic/regc_lex.c:
* generic/regc_locale.c:
* generic/regc_nfa.c:
* generic/regcomp.c:
* generic/regcustom.h:
* generic/rege_dfa.c:
* generic/regerror.c:
* generic/regerrs.h:
* generic/regex.h:
* generic/regexec.c:
* generic/regfree.c:
* generic/regfronts.c:
* generic/regguts.h:
* generic/tclCmdMZ.c:
* generic/tclRegexp.c:
* generic/tclRegexp.h:
* generic/tclTest.c: Applied Henry Spencer's latest regexp patches
that fix an infinite loop bug and add support for testing whether
a string could match with additional input.  [Bug: 2117]
1999-06-02 01:53:29 +00:00
stanton a045db4812 *** empty log message *** 1999-05-28 23:02:52 +00:00
stanton 6c416ba058 * win/Makefile.in:
* win/configure.in: Added preliminary TEA implementation.
1999-05-28 23:02:44 +00:00
stanton 7e2a1d16b4 * win/tclWinDde.c: Fixed bug where dde calls were being passed an
invalid dde handle because Initialize had not been called.
[Bug: 2124]
1999-05-28 23:02:38 +00:00
stanton 4ff9cb0b76 * generic/tclObj.c: Changed to eliminate use of isupper/tolower in
favor of the Unicode versions.
1999-05-28 23:02:33 +00:00
surles 587613988a fixed error in test reported by procheck 1999-05-28 00:01:08 +00:00
redman 476ec5da42 Changes for generic/tclThreadTest.c and win/tclWinSock.c bug fixes. 1999-05-26 20:53:36 +00:00
redman 6cd14bf554 generic/tclThreadTest.c: Fix race condition in testthread code.
win/tclWinSock.c: Fixed hang in WinNT socket driver, now wakes up
the socket thread to check for events that didn't
trigger the WSAEvent.
1999-05-26 20:24:43 +00:00
stanton 9b8d0c42d5 Merged changes from 1-3-b2 branch into mainline. 1999-05-26 02:39:12 +00:00
stanton 4ed003db12 *** empty log message *** 1999-05-25 01:00:46 +00:00
stanton 8046888a06 * tools/genStubs.tcl: Changed to allow a list of platforms instead
of just one at a time.
1999-05-25 01:00:37 +00:00
stanton 7f971b8cac * generic/tcl.decls:
* generic/tclCmdMZ.c:
* generic/tclDecls.h:
* generic/tclInt.decls:
* generic/tclIntDecls.h:
* generic/tclPort.h:
* generic/tclStubInit.c:
* generic/tclStubLib.c: Various header file related changes and other
lint to try to get the Mac builds working.
1999-05-25 01:00:24 +00:00
surles 60e436c4cf Added stub entry for the TclGetAuxDataType routine so tbcload can use stubs 1999-05-23 16:37:14 +00:00
stanton ac39508cf9 Merged changes from scriptics-tclpro-1-3-b2 branch 1999-05-22 01:20:10 +00:00
redman 21bd132482 Added test for command.com /c dir /b hang. 1999-05-21 19:05:04 +00:00
redman cc188b0748 Bug 2105: fixed execing command.com on Win95/98. 1999-05-21 18:31:55 +00:00
redman 54553da760 Fix command.com bug on Windows 95/98. [Bug: 2105] 1999-05-21 18:28:45 +00:00
hershey 0ed0dd7107 lint in comments 1999-05-20 23:40:34 +00:00
hershey 2117601f29 changed call to "remove" to "removeFile"--this bug was causing "httpd" file
to be left in working dir whenever tests are run.
1999-05-18 22:59:17 +00:00
hershey 6d276bccd1 added -encoding to the list of legal options used in the error message when
a bad option is used.  Because the fconfigure command is configurable (so
more option can be added), the error string is hardcoded.
1999-05-18 20:17:59 +00:00
welch 0b42aa885e Added note about running autoconf if you are using the CVS source tree
instead of a source distribution.
1999-05-17 20:22:29 +00:00
surles 26d816d7ed added new tcl_platform documentation [bug 2076] 1999-05-14 23:22:18 +00:00
surles c4e326675c added intospection variable to determine if the interp was compiled with threads enabled 1999-05-14 23:16:54 +00:00
stanton 489a58b5fc merged 1-3-b2 changes into mainline 1999-05-14 18:29:49 +00:00
stanton 8caafaac85 *** empty log message *** 1999-05-14 18:18:13 +00:00
stanton 3ef230567e *** empty log message *** 1999-05-14 02:18:48 +00:00
stanton a0ab2701b2 * unix/Makefile.in:
* unix/tclAppInit.c: Minor cleanup related to Xt notifier.

* unix/tclUnixInit.c (TclpSetInitialEncodings): Tcl now looks for
an encoding subfield in the LANG/LC_ALL variables in cases where
the locale is not found in the locale table.  Ensure that
setlocale() is called at least once so X11 will initialize
properly.  Also, forces the LC_NUMERIC locale to be "C" so numeric
processing in scripts is not affected by the current locale
setting. [Bug: 1989]
1999-05-14 02:18:31 +00:00
stanton d384504a71 increased per-thread regexp cache to 30 1999-05-14 02:04:05 +00:00
stanton 070799ec78 fixed typo 1999-05-14 00:20:02 +00:00
stanton 9525d92265 * tests/regexp.test:
* generic/tclInt.h:
* generic/tclBasic.c:
* generic/tclRegexp.h:
* generic/tclRegexp.c: Replaced the per-interpreter regexp cache
with a per-thread cache.  Changed the Regexp object to take
advantage of this extra cache.  Added a reference count to the
TclRegexp type so regexps can be shared by multiple objects.
Removed the per-interp regexp cache from the interpreter.  Now
regexps can be used with no need for an interpreter. [Bug: 1063]
1999-05-13 01:50:31 +00:00
stanton 1fcc7feac6 * win/tclWinInit.c (TclpSetVariables): Avoid calling GetUserName
if the value can be determined from the USERNAME environment
variable.  GetUserName is very slow.
1999-05-13 01:50:17 +00:00
stanton c1365e61e4 * doc/tclsh.1: Updated references to rc script names to accurately
reflect the platform differences on Windows.
1999-05-13 01:50:13 +00:00
redman ef038f826e back out previous commit 1999-05-11 21:16:33 +00:00
redman 997433a8e8 Fix loading of dde and reg to load with info nameofexecutable. 1999-05-11 20:47:57 +00:00
jingham 7e5fa22b27 Various small fixes that were required to get Tcl to build cleanly on the Mac. 1999-05-11 07:11:46 +00:00
stanton 7c4092a142 removed bad patch 1999-05-07 23:40:37 +00:00
stanton 65da72655e *** empty log message *** 1999-05-07 20:08:00 +00:00
stanton aac17d4d2a * unix/configure.in: Added fix for OS/390. [Bug: 1976] 1999-05-07 20:07:56 +00:00
stanton 9fb95d170d * generic/tcl.decls: Replaced const with CONST. 1999-05-07 20:07:46 +00:00
stanton e1d8c75e60 * generic/tclLoadNone.c: Updated to use current interfaces, added
TclpUnloadFile. [Bug: 2003]
1999-05-07 20:07:40 +00:00
stanton a859402af1 * generic/tclResult.c (Tcl_AppendResultVA):
* generic/tclStringObj.c (Tcl_AppendStringsToObjVA): Fixed to copy
arglist using memcpy instead of assignment so it works properly on
OS/390. [Bug: 1997]
1999-05-07 20:07:35 +00:00
stanton 3d35353fe9 * win/winDumpExts.c:
* win/makefile.vc: Changed to emit library name in defs
file. [Bug: 1998]
1999-05-07 20:06:52 +00:00
stanton acaa514d52 *** empty log message *** 1999-05-06 22:51:12 +00:00
stanton b8db0c357b * tests/string.test:
* generic/tclCmdMZ.c:
* doc/string.n: Fixed bug in string equal/compare code when using
-length option.  Cleaned up docs a bit more.
1999-05-06 22:50:02 +00:00
stanton e8006c8de9 more documentation lint 1999-05-06 20:13:22 +00:00
stanton c9350a70e9 lint 1999-05-06 19:21:11 +00:00
stanton ea802bf05a merged doc changes from 8.1.0 1999-05-06 19:14:39 +00:00
stanton ee668e4166 *** empty log message *** 1999-05-06 18:46:50 +00:00
stanton f832cd22b1 * doc/string.n:
* tests/cmdIL.test:
* tests/cmdMZ.test:
* tests/error.test:
* tests/ioCmd.test:
* tests/lindex.test:
* tests/linsert.test:
* tests/lrange.test:
* tests/lreplace.test:
* tests/string.test:
* tests/cmdIL.test:
* generic/tclUtil.c:
* generic/tclCmdMZ.c: Replaced "string icompare/iequal" with
-nocase and -length switches to "string compare/equal".  Added a
-nocase option to "string map".  Changed index syntax to allow
integer or end?-integer? instead of a full expression.  This is
much simpler with safeTcl scripts since it avoids double
substitution issues.
1999-05-06 18:46:42 +00:00
stanton a23a8f73b3 * doc/Utf.3:
* generic/tclStubInit.c:
* generic/tclDecls.h:
* generic/tclUtf.c:
* generic/tcl.decls: Added Tcl_UtfNcmp and Tcl_UtfNcasecmp.
1999-05-06 18:46:23 +00:00
stanton 790b81e6f7 * tests/http.test: Unset "data" array before running tests to
avoid failures due to previous tests.
1999-05-06 18:45:41 +00:00
hershey e87fc48c3d ran dos2unix on this file--Irix couldn't build Tcl because it detected strange
chars at the end of each line.
1999-05-06 02:34:42 +00:00
hershey 83892355ab renamed to avoid conflict with tk's InitStubs doc. 1999-05-05 21:45:17 +00:00
stanton 4d76b1c40d * win/makefile.vc: Added encoding directory to install-libraries
target.
1999-05-05 20:29:04 +00:00
stanton 1c648c9143 lint and better documentation of the character vs. byte oriented commands 1999-05-05 01:19:42 +00:00
surles f080563e1c fixed memory leak 1999-05-05 00:35:41 +00:00
stanton 6127009d43 *** empty log message *** 1999-05-04 02:58:02 +00:00
stanton ba038ecba1 * doc/string.n:
* tests/cmdMZ.test:
* tests/string.test:
* generic/tclCmdMZ.c (Tcl_StringObjCmd): Changed "string length"
to avoid regenerating the string rep of a ByteArray object.
1999-05-04 02:57:54 +00:00
stanton f46a13245d *** empty log message *** 1999-05-04 01:33:31 +00:00
stanton cbfd4003a1 * tests/cmdIL.test:
* tests/cmdMZ.test:
* tests/error.test:
* tests/lindex.test:
* tests/linsert.test:
* tests/lrange.test:
* tests/lreplace.test:
* tests/string.test:
* generic/tclCmdMZ.c (Tcl_StringObjCmd):
* generic/tclUtil.c (TclGetIntForIndex): Applied Jeff Hobbs's
string patch which includes the following changes [Bug: 1845]:
1999-05-04 01:33:10 +00:00
stanton 1b188bce84 * generic/tclParse.c (Tcl_ParseCommand): Changed to avoid
modifying eval'ed strings that are already null terminated.
[Bug: 1793]
1999-05-04 01:32:12 +00:00
stanton 119e9038ea *** empty log message *** 1999-05-03 19:19:09 +00:00
stanton f6a3092a5a * tests/binary.test:
* generic/tclBinary.c (DupByteArrayInternalRep): Fixed bug where
type was not being set in duplicated object.
1999-05-03 19:19:03 +00:00
stanton 98d911dd45 *** empty log message *** 1999-04-30 23:36:01 +00:00
stanton 90da45da03 * Changed version to 8.1.1. 1999-04-30 23:35:40 +00:00
stanton fe45fa11e3 * Merged changes from 8.1.0 branch 1999-04-30 22:44:59 +00:00
hershey b81b15c0f2 Tcl_UtfToUpper and Tcl_UtfToTitle now works on badly formed Utf strings. 1999-04-30 16:22:24 +00:00
hershey b069872348 Added tests for string toupper and string tolower called with badly formed
Utf strings.
1999-04-29 18:14:29 +00:00
redman 504fb9ec09 Don't rename the twind.tcl widget demo file... 1999-04-29 17:52:16 +00:00
hershey f94af92683 fixed part of bug 1791: Tcl_UtfToUpper and Tcl_UtfToLower now work on
badly formed Utf strings.
1999-04-29 00:04:41 +00:00
stanton dc761a9ff0 *** empty log message *** 1999-04-28 21:01:08 +00:00
stanton a12837eeef * mac/tclMacResource.c:
* generic/tclListObj.c:
* generic/tclObj.c:
* generic/tclStringObj.c: Changed to avoid freeing the string
representation before freeing the internal rep.  This helps with
debugging since the string rep will still be valid when the free
proc is invoked.
1999-04-28 17:06:06 +00:00
stanton 5bec727409 *** empty log message *** 1999-04-28 01:56:51 +00:00
stanton 7d3a9223f3 * generic/tclLiteral.c (TclHideLiteral): Fixed so hidden literals
get duplicated to avoid accidental sharing in the global object
table.
1999-04-28 01:56:39 +00:00
stanton d6f3ad6207 merged 8.1.0 changes into mainline 1999-04-24 01:46:51 +00:00
stanton 7fe0693f63 *** empty log message *** 1999-04-23 18:06:24 +00:00
stanton bfa7087b8f * library/encoding/koi8-r.enc:
* tools/encoding/koi8-r.txt: Added support for the koi8-r Cyrillic
encoding. [Bug: 1771]
1999-04-23 18:06:15 +00:00
stanton d0a2c4b1a5 *** empty log message *** 1999-04-23 01:57:37 +00:00
stanton 555140dc3f * win/tclWinInit.c (TclpInitPlatform): Added call to TclWinInit
when building a static library since DllMain will not be invoked.
This could break old code that explicitly called TclWinInit, but
should be simpler in the long run.
1999-04-23 01:57:32 +00:00
stanton 900205b769 * win/tclWinFCmd.c:
* win/tclWin32Dll.c: Changed uses of "try" to "__try", since that
is the actual keyword.  This eliminates the need for some -D flags
from the makefile.
1999-04-23 01:57:23 +00:00
stanton a9e9c4de3d * generic/tclPort.h: Added include of tcl.h since it defines
various Windows macros that are needed before deciding which
platform porting file to use.
1999-04-23 01:57:12 +00:00
stanton 4b582e9889 * generic/tclEvent.c: lint 1999-04-23 01:57:08 +00:00
stanton 0c10a5580e *** empty log message *** 1999-04-22 22:57:19 +00:00
stanton 804bb2b478 * generic/tclInt.h:
* generic/tclInt.decls:
* generic/tclCompile.c: Added TclSetByteCodeFromAny that takes a
hook procedure to invoke after compilation but before the byte
codes are emitted.  This makes it possible to do postprocessing on
the compiled byte codes before the ByteCode is generated.

* generic/tclLiteral.c: Added TclHideLiteral and TclAddLiteralObj
to make it possible to create local unshared literal objects.
1999-04-22 22:57:06 +00:00
redman eeb2fba346 Entry for new WinSock code. 1999-04-22 20:31:07 +00:00
redman 31b2a3e33f Improved socket driver, use WSAEventSelect on NT 1999-04-22 20:28:02 +00:00
stanton f0d1d4682e * win/tclWinInit.c:
* unix/tclUnixInit.c: Changed initial search path to match that
found used by tcl_findLibrary.
1999-04-21 22:00:29 +00:00
rjohnson 1df32a4d2c Resynced with mainline. 1999-04-21 21:50:22 +00:00
redman d2a3e887ca Merge with 8.1.0 branch 1999-04-21 20:08:17 +00:00
surles 7ab2eee54b merged the parse changes between TclPro1.2 and Tcl8.1. Fixed bug in Windows makefile caused when the win/pkgIndex.tcl file was replaced 1999-04-21 18:16:45 +00:00
hershey 7c9285dfe8 added a delay to a event to so it can pass on slower machines. 1999-04-20 19:19:35 +00:00
hershey 1078972deb moved the ThreadReap command to ::tcltest::threadReap. Now each thread test calls
threadReap at the beginning and end of the test, inside the test body.  This fixes
the problem where the test suite was exiting on a call to threadReap (reap was
killing the main thread by accident because other tests were leaving threads
running and setting mainthread to be the list of running threads).
1999-04-20 18:12:18 +00:00
surles d81cb57b05 fixed bug 1497 for 8.1: tclPkgUnknown should test for read privs 1999-04-20 02:20:41 +00:00
surles e3fc51eed6 fixed bug 1497 for 8.1: tclPkgUnknown should test for read privs 1999-04-20 02:08:38 +00:00
surles 6c1fd3dae2 modified the Tcl makefile to copy the new pkgIndex files for reg and dde. 1999-04-20 01:48:40 +00:00
surles 1b148acb2f fixed bug 1571: pkgIndex files fail for dde and registry packages: 1999-04-19 22:05:23 +00:00
hershey 79352456b6 added tests/httpd file to distribution--tests get skipped if this file is
missing (bug id 1769).
1999-04-19 20:24:27 +00:00
hershey dd43c4b15c fixed bugs in tests--bug id 1769 1999-04-19 20:23:41 +00:00
hershey d5a79b1be3 added first draft of documentation for Tcl_Access and Tcl_Stat.
defined Tcl_Stat and Tcl_Access to call TclStat and TclAccess instead of
TclpStat and TclpAccess.
1999-04-17 01:36:32 +00:00
hershey 099c93d0b4 changes make Tcl_Access and Tcl_Stat public.
also one minor fix in tests/all.tcl to fix bug 1770.
1999-04-17 00:32:27 +00:00
surles 7ef335cb1b fixed bugs 1785 and 1799: decl header files not installed 1999-04-17 00:18:26 +00:00
hershey edef398a09 added Tcl_DStringTrunc to DString.3
added mention of Tcl_ThreadQueueEvent, Tcl_ThreadAlert to Notifier.3
added Tcl_ThreadQueueEvent, Tcl_ThreadAlert, and Tcl_GetCurrentThread to
  Thread.3
1999-04-16 22:53:43 +00:00
surles bc1186e23a fixed bug 1811: Add TclSetPreInitScript to the stubs files. 1999-04-16 22:03:58 +00:00
surles 3a8f2f8eda modified the API checker script 1999-04-16 18:48:25 +00:00
stanton 97464e6cba merged tcl 8.1 branch back into the main trunk 1999-04-16 00:46:29 +00:00
stanton a8c96ddb94 added release date 1999-04-15 22:40:33 +00:00
stanton 7430175238 * Merge 8.0.5 changes:
- Mac changes for final release
    - Minor fixes to tools configure file

* win/tclWinSock.c: Apply patch to allow write access to a socket
if FD_WRITE is sent but FD_CONNECT is not.  Some strange problem
with either Win32 or a socket driver.  [Bug: 1664 1776]
1999-04-15 22:38:46 +00:00
welch ae56f9fc88 Tests for pkg_mkIndex when input files do "namespace import". BUG 1327 1999-03-31 22:37:17 +00:00
welch 0fc6a714da Fixed pkg_mkIndex when input files do "namespace import". BUG 1327 1999-03-31 22:37:03 +00:00
welch 138f850c5c Added tests for auto_mkindex_parser quoting problems, BUGID 1657 1999-03-31 18:58:50 +00:00
welch 7ac30eabf1 Fixed quoting bugs in auto_mkindex_parser, BUGID 1657 1999-03-31 18:58:14 +00:00
welch fb960d1dc0 Fixed typo in LD_SEARCH_FLAGS definition for Linux. 1999-03-25 22:47:54 +00:00
stanton 8dca693488 Changed magic number so it doesn't match the plus patch, at Jan's request. 1999-03-12 23:03:51 +00:00
stanton 9ee0bae50a Changed package tests to build against the stubs library. 1999-03-11 21:47:38 +00:00
redman 5b3a5d29ab add CrtVersion.3 documentation for Tcl_GetVersion() 1999-03-11 19:30:38 +00:00
redman 2efa9d5287 Add documentation for Tcl_GetVersion() 1999-03-11 19:29:34 +00:00
stanton 0c1e2fd321 * generic/tclAlloc.c: Changed TCL_NATIVE_MALLOC to USE_TCLALLOC so
it matches 8.1.

* generic/tclBasic.c:
* generic/tcl.h:
* generic/tcl.decls: Changed Tcl_ReleaseType from an enum to
macros so it can be used in .rc files.
Added Tcl_GetString.

* unix/Makefile.in: Added compat binaries to the stub library.
Changed compat binaries to always compile with shared flags since
they need to be shared for the stub library.
1999-03-11 02:49:33 +00:00
stanton 959ef23977 * win/tclWinPipe.c:
* generic/tclInt.decls: Added TclWinAddProcess to make it possible
for expect to use Tcl_WaitForPid().  This patch is from Gordon
Chaffee.

* mac/tclMacPort.h:
* win/tclWinInit.c:
* unix/tclUnixPort.h:
* generic/tclAsync.c: Added TclpAsyncMark to fix bug in async
handling on Windows where async events don't wake up the event
loop.  This patch comes from Gordon Chaffee.

* generic/tcl.decls: Fixed declarations of reserved slots.
1999-03-11 00:19:23 +00:00
redman 17d56fd5b9 fix declarations of empty slots. 1999-03-10 23:45:50 +00:00
redman 2ef4d3492a Add Tcl_GetVersion to stubs table, add 6 additional slots for future use. 1999-03-10 23:19:09 +00:00
redman 470a185b28 ChangeLog entries for Tcl_GetVersion C API 1999-03-10 22:58:18 +00:00
redman afe8ba0aa0 Add Tcl_GetVersion C API 1999-03-10 22:55:51 +00:00
stanton 10a767e640 Changed TCL_STUB_MAGIC back to match plus patch implementation. 1999-03-10 06:12:55 +00:00
stanton 0b4be24161 Merged stubs changes into mainline for 8.0 1999-03-10 05:52:45 +00:00
stanton a5bface5b6 *** empty log message *** 1999-03-04 01:02:24 +00:00
stanton 8074a699cc * generic/tcl.decls: Added Mac specific declarations.
* generic/tclStubs.c:
* generic/tclStubInit.c: Added undefs for all of the TCL_MEM_DEBUG
macros to avoid conflicts with the stub names.

* generic/tclStubInit.c:
* generic/tclInt.h:
* generic/tclInt.decls: Moved some declarations out of the generic
and into the platform specific sections.  Added missing
declarations and Mac specific declarations.

* generic/tclInt.h:
* generic/tclDate.c:
* generic/tclClock.c: Created a new opaque TclpTime_t type so
generic functions that depend on the format of time_t can appear
in the generic header files.

* generic/tclStubInit.c:
* generic/tclPanic.c:
* generic/tcl.h:
* generic/tcl.decls: renamed Tcl_Panic back to panic to avoid
incompatibilities in a patch release.
1999-03-04 01:01:57 +00:00
stanton fd1dfeea29 * generic/tclStubLib.c: Added internal interface hooks. 1999-03-04 00:54:07 +00:00
stanton 19b0cf51d5 updated changelog 1999-03-03 00:39:59 +00:00
stanton 531a666d60 * unix/Makefile.in:
* unix/configure.in:
* unix/ldAix: Enhanced AIX shared library support.

* win/tclWinSock.c: Removed a bunch of extraneous PASCAL FAR
attributes from internal functions.

* win/tclWinReg.c: Changed registry package to use stubs mechanism
so it no longer depends on the specific version of Tcl.

* doc/AddErrInfo.3:
* doc/Eval.3:
* doc/PkgRequire.3:
* doc/SetResult.3:
* doc/StringObj.3:
* generic/tcl.h:
* generic/tclBasic.c:
* generic/tclPanic.c:
* generic/tclStringObj.c:
* generic/tclUtil.c:
* unix/mkLinks: Added va_list versions of all VARARGS
functions so they can be invoked from the stub functions.

* doc/package.n:
* doc/PkgRequire.3:
* generic/tclPkg.c: Added Tcl_PkgProvideEx, Tcl_RequireEx,
Tcl_PresentEx, and Tcl_PkgPresent.  Added "package present"
command.

* generic/tclFileName.c:
* mac/tclMacFile.c:
* mac/tclMacShLib.exp:
* unix/tclUnixFile.c:
* win/tclWinFile.c: Changed so TclGetUserHome is defined on
all platforms, even though it is currently a noop on mac and
windows, and renamed it to TclpGetUserHome.

* generic/tclCkalloc.c: Added stub versions of memory checking
functions when compiling without TCL_MEM_DEBUG.

* doc/ByteArrObj.3:
* generic/tcl.h:
* generic/tclBinary.c:
* generic/tclObj.c: Ported the 8.1 ByteArray type back to 8.0.

* generic/tcl.decls:
* generic/tcl.h:
* generic/tclBasic.c:
* generic/tclDecls.h:
* generic/tclInt.decls:
* generic/tclInt.h:
* generic/tclIntDecls.h:
* generic/tclIntPlatDecls.h:
* generic/tclIntPlatStubs.c:
* generic/tclIntStubs.c:
* generic/tclPlatDecls.h:
* generic/tclPlatStubs.c:
* generic/tclStubInit.c:
* generic/tclStubLib.c:
* generic/tclStubs.c:
* tools/genStubs.tcl:
* unix/configure.in:
* unix/Makefile.in:
* unix/tclConfig.sh.in:
* win/makefile.vc:
* win/tclWinPort.h: Added Tcl stubs implementation.  There are
now two new macros USE_TCL_STUBS and USE_TCL_STUB_PROCS that
enable use of stubs and disable stub macros respectively.  All of
the public and private function declarations from tcl.h and
tclInt.h have moved into the *.decls files and the *Stubs.c and
*Decls.h files are generated using the genStubs.tcl script.

* generic/tclPanic.c:
* generic/panic.c: renamed panic to Tcl_Panic, added macro for
backwards compatibility, renamed file to tclPanic.c
1999-03-03 00:38:35 +00:00
hershey 8f97fc1f42 updated old URL in README 1999-02-26 22:25:04 +00:00
stanton b786355c1a renamed tcl.hpj to tcl.hpj.in 1999-02-19 02:22:22 +00:00
stanton 8b366d83a2 changed so helpfile generation can work from the build environment 1999-02-19 02:14:56 +00:00
hershey 016e252a68 updated for 8.0.5 with John O's changes. 1999-02-17 02:05:53 +00:00
stanton 0eebb767fc * library/init.tcl: Fixed auto_mkindex so it handles .tbc files.
Did some general cleanup to handle bad eval statements that didn't
use "list".
1999-02-11 03:04:46 +00:00
stanton 3ef25d0bef updated readmes for 8.0.5 release 1999-02-09 03:31:54 +00:00
stanton 9459fb6e47 updated man page generation for TclPro 1999-02-05 03:12:50 +00:00
stanton 9263d25321 lint 1999-02-05 01:49:03 +00:00
stanton d9c25afbfa * generic/tclInt.h:
* generic/tclNamesp.c (TclGetNamespaceForQualName): Restored
signature so that TclGetNamespaceForQualName returns an int, even
though it is always TCL_OK.  This is needed for forwards
compatibility of tbcload.  This should be removed at some point,
when we are willing to break forward compatibility.
1999-02-03 21:28:00 +00:00
stanton 51100ef26a * test/winPipe.test: Changed to remove echoArgs.tcl temporary file
when done.

* tests/cmdAH.test:
* generic/tclFileName.c (TclGetExtension): Changed behavior so the
split happens at the last period in the name instead of the first
period of the last run of periods.  So, "foo..o" is split into
"foo." and ".o" now. [Bug: 1126]
1999-02-03 19:12:25 +00:00
stanton 3e5c4b0cfd removed AC_CONFIG_SUBDIRS(dltest) since this doesn't work in our build
environment
1999-02-03 18:37:42 +00:00
stanton 6b883e17e7 * win/makefile.vc: Added better support for paths with spaces in
the name. Added .lib and support .dlls to the install-binaries
target.  Added generate of a pkgIndex.tcl script to the
install-libraries target.
1999-02-03 02:59:17 +00:00
stanton a47064bfda stripped carriage returns at end of lines 1999-02-03 02:59:08 +00:00
stanton cbffe4fd58 * unix/configure.in: Changed to automatically configure in dltest. 1999-02-03 02:58:51 +00:00
stanton 18cb0870c4 * tests/interp.test:
* generic/tclInterp.c (DeleteAlias): Changed to use
Tcl_DeleteCommandFromToken so we handle renames properly. This
avoids senseless panic. [Bug: 736]
1999-02-03 02:58:40 +00:00
stanton 17481a9360 * win/tclAppInit.c:
* unix/tclAppInit.c:
* mac/tclMacAppInit.c:
* generic/tclTest.c: Changed some EXTERN declarations to extern
since they are not defining exported interfaces.  This avoids
generating useless declspec() attributes and makes the windows
makefile simpler.

* generic/tcl.h: Moved Tcl_AppInit declaration to end and cleared
out TCL_STORAGE_CLASS so it is not declared with a declspec().
1999-02-03 02:58:25 +00:00
stanton e0ef154327 * generic/tclProc.c:
* generic/tclNamesp.c:
* generic/tclInt.h:
* generic/tclCmdIL.c:
* generic/tclBasic.c:
* generic/tclVar.c: Applied patch from Viktor Dukhovni to
rationalize TCL_LEAVE_ERR_MSG behavior when creating variables.

* generic/tclVar.c: Fixed bug in namespace tail computation.
Fixed bug where upvar could resurrect a namespace variable whose
namespace had been deleted.

* generic/tclCompile.c (TclCompileExprCmd): Eliminated yet another
bogus optimization in expression compilation.

* generic/tclCompile.c (CompileExprWord): Fixed exception stack
overflow bug caused by missing statement. [Bug: 928]

* generic/tclIOCmd.c:
* generic/tclBasic.c: Objectified the "open" command. [Bug: 1113]
1999-02-03 00:55:04 +00:00
stanton d302d0e710 * unix/tclUnixChan.c:
* win/tclWinSock.c:
* doc/socket.n: Applied Gordon Chaffee's patch to handle failures
during asynchronous socket connection operations.  This adds a new
"-error" fconfgure option to socket channels. [Bug: 893]
1999-02-03 00:51:19 +00:00
stanton bfede94fa7 lint 1999-02-02 23:01:41 +00:00
stanton 9708a6b49c Changed to pass registry dll path into test script so the test doesn't
depend on being able to find a working pkgIndex.tcl file
1999-02-02 23:01:15 +00:00
stanton 3b21460697 added tcltest as a dependency of runtest 1999-02-02 23:00:07 +00:00
stanton 8ee185f04e * win/winDumpExts.c: Patched to be picker about stripping
@'s. [Bug: 920]
1999-02-02 22:32:17 +00:00
stanton ed912f84b4 * unix/configure.in: Added branch for BSD/OS-4* to shared library
case statement. [Bug: 975]
Fixed to correctly handle IRIX 6.5 n32 library support. [Bug: 1117]

* unix/configure.in: Changed Linux and IRIX to set SHLIB_LIBS to
LIBS so shared libraries are linked with the system
libraries. [Bug: 1018]
1999-02-02 22:29:16 +00:00
stanton ae08beafac * library/http2.0/http.tcl: Added catch around eof test in
CopyDone since the user may have already called http::reset.
[Bug: 1108]
1999-02-02 22:28:30 +00:00
stanton e8f0296a25 * library/init.tcl: Various small changes requested by Jan Nijtmans.
- If the variable $tcl_library contains the empty string, this
empty string will be put in $auto_path. This is not useful at all,
it only slows down later package processing.
- If the variable tcl_pkgPath is not set, the "unset __dir"
fails. Thich makes init.tcl totally unusable. Better put a "catch"
around it.
- In the function tcl_findLibraries, the "string match" function
only works correctly if $tcl_patchLevel is in one of the forms
"?.?a?", "?.?b?" or "?.?.?". Could a "regexp" be used instead,
then it allows anything to be appended to the patchLevel
string. And it is more efficient.
- The tclPkgSetup function assumes that if $type != "load" then
the type must be "source". This needn't be true. Some users want
to add their own setup types.
[RFE: 1138] [Bug: 978]
1999-02-02 22:28:10 +00:00
stanton a26fbfadc3 * generic/tclPosixStr.c (Tcl_ErrnoId, Tcl_ErrnoMsg): When using
egcs, ENOTSUP and EOPNOTSUPP are the same, so now we handle that
case. [Bug: 1137]
1999-02-02 22:27:16 +00:00
stanton cc6752c3c0 objectified open command 1999-02-02 22:27:02 +00:00
stanton d2bb30303b * generic/tclCompile.c (CompileExprWord): Fixed exception stack
overflow bug caused by missing statement. [Bug: 928]
1999-02-02 22:26:11 +00:00
stanton f4df4aba71 * generic/tclIOCmd.c:
* generic/tclBasic.c: Objectified the "open" command. [Bug: 1113]
1999-02-02 22:25:42 +00:00
stanton cd1b425257 * win/tclWinReg.c:
* doc/registry.n: Added support for HKEY_PERFORMANCE_DATA and
HKEY_DYN_DATA keys. [Bug: 1109]
1999-02-02 22:25:21 +00:00
stanton 287e43ac10 * library/init.tcl: Added catch around unset. [Bug: 978] 1999-02-02 18:36:36 +00:00
stanton 82742d54bc * win/tclWinInit.c (TclPlatformInit): Added code to ensure
tcl_pkgPath is set to "" when no registry entry is found. [Bug: 978]
1999-02-02 18:36:31 +00:00
rjohnson 141681c541 Added -pipe option if gcc is being used. 1999-01-29 00:32:01 +00:00
welch 6d0c27b1c6 Making it possible for http -command callbacks to safely
uset the state array.
1999-01-19 23:30:54 +00:00
rjohnson e7baa9f3c3 Updated changes. 1999-01-12 02:50:33 +00:00
rjohnson ffc7df0a0b Changed so sh_lib extension is return on HP even if it isn't compiled
as a shared object.
1999-01-12 02:29:33 +00:00
stanton ebe914ee21 * win/makefile.vc:
* generic/tcl.h:
* generic/tclAlloc.c: Added USE_NATIVEMALLOC ifdefs to make it easier
  to compile for use with Purify.
1999-01-06 21:08:50 +00:00
rjohnson 83b3538905 Added more info to lsort man page. RFE 873 1999-01-05 01:40:01 +00:00
rjohnson 4dc2e2283d Added supoport for _-dclspec on gcc - RFE 972.
Ray
1999-01-05 01:18:34 +00:00
rjohnson 760c4938e4 Updated the version to 8.0.5. 1999-01-04 19:25:00 +00:00
surles d776c5c382 fixed typo in resource doc. 1998-12-29 22:55:12 +00:00
rjohnson c610c243ea Made error message for cd cmd consistant with 8.1. 1998-12-23 02:01:42 +00:00
rjohnson 016bee55b5 Fixed problem with running tests on IRIX. 1998-12-10 19:09:55 +00:00
suresh da572fa3a6 Added -p flag to "mkdir" commands in "install-libraries" target to allow error-
free installation of Tcl script libraries.
1998-12-08 12:43:10 +00:00
hershey 7de7608f53 added pkg and pkg1 to list of files to copy to the current working dir, if
the cwd is not tk8.0/tests
1998-12-07 23:33:53 +00:00
suresh 31802410ac Fixed minor bug with recently added copy stmts ("TOP_DOR" --> "DISTDIR"). 1998-12-04 23:12:44 +00:00
welch c971b70591 Added test file 1998-12-04 06:28:11 +00:00
hershey cbff5b9a59 Updated all and defs to work more smoothly with nightly tests.
Check for existence of "testgetplatform" command before calling
it in fCmd.test file--this command is only in tcltest interps.
1998-12-04 04:18:20 +00:00
stanton efa9715239 *** empty log message *** 1998-12-04 01:04:15 +00:00
stanton b52dbdeae0 * tclWinSock.c (CreateSocket, TcpAccept): Windows NT creates
sockets so they are inheritable by default.  Turn off this bit so
sockets aren't kept open by exec'ed processes. [Bug: 892]
1998-12-04 01:01:55 +00:00
welch 0e7017ef8c Added tests/pkg to distribution 1998-12-02 01:42:52 +00:00
welch 5cbddb2f34 Changed this so it can find man2tcl easier 1998-12-02 01:42:39 +00:00
welch 9435160133 Cleaned up man page so it works with html generator 1998-12-02 01:42:18 +00:00
welch 7dfe000165 Added 8.0.4 release note 1998-12-02 01:42:00 +00:00
hershey 07929b5fe5 all file can now be run from any working dir. 1998-11-19 21:46:59 +00:00
stanton 2ca2b6fdac eliminated purify warning and other lint 1998-11-19 20:10:50 +00:00
rjohnson 5ba038ae32 Added new project files for Mac. 1998-11-12 12:33:26 +00:00
welch 9d8456a7c2 Added test cases for new pkg_mkIndex -load case 1998-11-12 05:54:21 +00:00
welch c2bba04f0c Fixed pkg_mkIndex tcl to deal with failed loads. 1998-11-12 05:54:02 +00:00
welch d9bda916f0 Updated to reflect newer implementation. 1998-11-12 05:52:46 +00:00
jingham e4af7404e9 Updated Changes file, and added Vince Darley's suggested change to TclMacExit. 1998-11-11 07:46:04 +00:00
welch 4b506e7cdb Fixed quoting of { in an info complete test case. 1998-11-11 02:39:56 +00:00
welch f19fadb5f0 Removed lint (thanks, procheck!) 1998-11-11 02:39:29 +00:00
rjohnson 1cc0d594c3 Added pre compiled header common to all Mac Tcl projects. This
was supplied by Jom Ingham.
1998-11-10 16:30:35 +00:00
jingham 73d2c5f07c Add changelog entry for the resource command bug fix. 1998-11-10 06:56:47 +00:00
jingham 554f088073 Fixed some tests which were failing on the Mac because of path differences. Added a test to the resource tests to cover the but I fixed. Fixed the stat test commands - the mac files were getting a leading :, which the test commands did not expect 1998-11-10 06:54:11 +00:00
jingham 0b7d54658d Fixed a bug in the resource command when the file was opened twice. Fixed a bug in the testWriteTextResource command - it wrote one too many bytes. Factored out the common code from the .pch files FspLocationFromPath - make path a CONST 1998-11-10 06:49:19 +00:00
welch 1507799b72 Fixed timeout-related HTTP test 1998-11-03 02:00:54 +00:00
stanton 581eb2ace2 fixed test that got stale on Windows 1998-11-03 01:02:28 +00:00
stanton 099b6e9e41 cleaned up test suite so most of the tests pass on Windows 1998-11-02 23:04:13 +00:00
stanton f8c896766a fixed bug in pkg_mkIndex that is hit when TCL_LIBRARY is a relative
path (e.g. in the test suite)
1998-11-02 23:03:34 +00:00
welch cd8c940da2 Fixed declaration of errorInfo in tcl_findLibrary 1998-11-02 22:40:04 +00:00
suresh f398200e1d Made "install-libraries" target more silent when copying library files. 1998-11-02 19:36:54 +00:00
welch f1783c8a8a Overhaul of pkg_mkIndex 1998-10-30 23:01:57 +00:00
welch 87056a32f6 Fixed the Tcl_NotifyChannel bug, plus added a test case for it.
Simply replaced Tcl_RegisterChannel/UnregisterChannel with
Tcl_Preserve/Tcl_Release was all it took.  Chanels are already
"eventually freed"
1998-10-30 00:38:28 +00:00
suresh 4cc4398f85 Added "-D_OLD_TERMIOS" when building on IRIX 6.3 to create backward compatible
binaries for IRIX 6.2.
1998-10-28 18:34:23 +00:00
welch d92d1894ea Fixed a typo in tcl_findLibrary, and fixed the logic that ensures
the parent directory of tcl_library is on the auto_path.  Added
a comment to init.tcl about how auto_path is initialized.
1998-10-23 22:22:02 +00:00
rjohnson 8fd77f6049 Changed config & Makefile to support n32 on IRIX. 1998-10-20 20:01:22 +00:00
suresh 53bd99ffe4 On Windows, Added the "debug" element of the tcl_platform array which
indicates that the particular Tcl shell has been compiled with debug
information Using "info exists tcl_platform(debug)" a Tcl script can
direct the interpreter to load debug versions of DLLs with the load
command.
1998-10-20 17:27:43 +00:00
escoffon 0d09c36145 Added the pkg_mkIndex test suite 1998-10-17 00:21:39 +00:00
escoffon 0d1101d7ed Bumped the optimization to -O2 (optimize speed); test suite seems to have
worked (as much as test suites under windows work)
1998-10-17 00:20:50 +00:00
escoffon a5da671b52 Added README and README.binary to the list of files to modify 1998-10-17 00:19:24 +00:00
escoffon 12d1f29c91 upgraded to the new interfaces: -direct, -nopkgrequire 1998-10-17 00:16:38 +00:00
escoffon 5568096c25 Fixed a number of buglets in pkg_mkIndex:
- on windows, use case-insensitive comparison with the shared lib extension,
  so that both .DLL and .dll files are loaded (.DLL were sourced)
- if the glob fails, make sure we go back to the old directory
- make sure we can handle packages that spread over multiple files
- set auto_path in the slave consistently with ours
1998-10-17 00:15:40 +00:00
rjohnson af8a60c773 Added fix to list processing in tclNotify that could cause events to be dropped.
Added test to intetp test suite.
1998-10-14 21:12:09 +00:00
rjohnson a9c63f1a55 Made some the prototypes & function defs consistant in tclUnixTest.c 1998-10-14 00:32:55 +00:00
rjohnson 2145c0e799 Fixed bug in Tcl_SetListObj - it used to create invalid Tcl_Obj if you passed
in 0 elements.  Despite what docs said.

Also updated a few copyright notices.
1998-10-13 20:30:21 +00:00
rjohnson 34fd6003c9 Fixed bug in "lsort -dictionary" that caused problems when comparing
numbers that started with 0.
1998-10-13 20:05:38 +00:00
escoffon 70f31cd5c9 Bumped patch number to 8.0.4 1998-10-13 19:03:52 +00:00
rjohnson b091a84076 Fixed bug in "info complete" - it did not handle NULLs correctly. 1998-10-13 18:44:15 +00:00
escoffon 7e68669921 Fixed a bug that caused the Tcl DLL to be linked against msvcrt.lib for
both debug and nodebug builds.
1998-10-07 20:57:09 +00:00
rjohnson c86d4bddaa Minor changes in test file & C style. 1998-10-06 19:12:06 +00:00
escoffon 7a0266fc2a Added a new Tcl object called "procbody"; this object's internal
representation contains both a Proc struct and its associated ByteCode.
Updated tclProc.c::TclCreateProc to take procbody instances as the body
argument, for future support of compiler extensions.
Added the "procbodytest" package for testing all this stuff.
1998-10-05 22:32:09 +00:00
stanton 96be4fa0ab added comment to clarify that it is not valid to modify argument
strings in a string-based Tcl command
1998-10-05 17:35:53 +00:00
stanton cb04919214 merged tcl8.0.4 changes 1998-09-30 23:59:08 +00:00
stanton 795fdacd5f merged tcl8.0.4 changes to fix Windows memory allocation 1998-09-30 23:57:18 +00:00
escoffon 06843a4560 Added tests/stack.test, to test recursion limits.
Added SHLIB_PATH to the list of special macros to ignore.
1998-09-30 20:52:00 +00:00
escoffon 8828811353 Added support for Win95. 1998-09-30 20:19:35 +00:00
rjohnson ef4f41df2b Removed function declarations that were never used and not referenced
by any implementation.
1998-09-29 18:22:39 +00:00
suresh 28cbc95b72 Removed "sccs" commands from "Makefile.in" to facilititate switch over to CVS. 1998-09-23 20:13:41 +00:00
stanton aada09aa91 Replaced SCCS strings, fixed binary files 1998-09-14 18:39:43 +00:00
stanton f8dab0988b *** empty log message *** 1998-09-08 17:03:01 +00:00
stanton 037d1c95e2 Initial revision 1998-08-31 16:31:53 +00:00
stanton fe05fb354a removed version number from help file 1998-08-21 10:44:44 +00:00
welch 5f87638c73 Updates for Jim 1998-08-17 11:56:45 +00:00
welch d68ee6b7bc Restored attribution 1998-08-13 13:43:41 +00:00
welch 80170bc9b7 UnixWare patches 1998-08-12 17:29:39 +00:00
welch fe86cac421 Fixes for trimming . out of library names 1998-08-12 16:37:31 +00:00
rjohnson 8b968fdc23 updated copyright info & sccs ids 1998-08-10 17:21:31 +00:00
rjohnson e8528498a5 fixed a few code style issues 1998-08-10 17:18:36 +00:00
rjohnson 1e3d989cf1 fixed style problems 1998-08-10 17:18:18 +00:00
welch 63b1baf8ac import bug fix 1998-08-10 16:00:18 +00:00
welch 69609d1d83 Added test for namespace import fix 1998-08-10 15:52:50 +00:00
welch c46637e50d Moved shared typedef here 1998-08-10 15:44:18 +00:00
welch 35ef4bda26 Moved data struct to tclInt.h 1998-08-10 15:43:59 +00:00
welch 32adce342e Fixed to handle import links when redefining commands 1998-08-10 15:43:41 +00:00
stanton 3d614fba70 *** empty log message *** 1998-08-07 18:25:56 +00:00
welch 30ec6e22ce release note 1998-08-07 14:28:31 +00:00
suresh 41c6020b2b Removed DOS-EOLs. 1998-08-07 12:02:42 +00:00
stanton 608647ca98 Merged changes between child workspace "/home/stanton/ws/tcl8.0" and
parent workspace "/ws/tcl8.0".
1998-08-07 11:58:21 +00:00
stanton 7466eb7103 changed isArg/isTemp to flags
made resolver api more object oriented
1998-08-07 11:48:51 +00:00
stanton 409220214f replaced isArg/isTemp with flags 1998-08-07 11:48:12 +00:00
stanton 5886eafd66 changed resolver epoch so it only invalidates the resolver cache
rather than forcing a complete recompile of the byte codes
changed to use TclInitCompiledLocals
changed resolver api to be a bit more object oriented
1998-08-07 11:47:46 +00:00
stanton 558a5a3709 added TclInitCompiledLocals
deferred resolver caching code to procedure invocation time
1998-08-07 11:46:30 +00:00
stanton 9ddc01dabd changed isArg and isTemp fields to us flags field in CompiledLocal structure 1998-08-07 11:41:56 +00:00
welch e455d67c2f Make AlarmHandler static 1998-08-07 11:03:05 +00:00
welch 75994376b6 Nuked / from file paths 1998-08-07 11:02:16 +00:00
welch f8d54fd42e added tcl_findLibrary 1998-08-06 15:49:24 +00:00
welch 39d07c3dbc Added tcl_findLibrary 1998-08-06 15:25:30 +00:00
welch a321c1ddc9 Added unix/arch possibility to library search path 1998-08-06 15:22:54 +00:00
welch fba48c5eaa Updated for 8.0.3 1998-08-06 15:22:34 +00:00
welch ccf7e447a8 Updated for final 8.0.3 1998-08-06 15:18:30 +00:00
escoffon ac3239faeb changed the panic in TclProcCompileProc when a precompiled script jumps
interps to an error instead.
1998-08-06 12:15:50 +00:00
welch 1db919d7dc 8.0.3 1998-08-06 12:10:34 +00:00
welch 490f3f6739 Updated to 8.0.3 1998-08-06 12:10:20 +00:00
welch 95a0493259 Marked EINTR tests nonPortable 1998-08-06 11:41:40 +00:00
welch 18f01ec236 Nuked EINTR wrappers 1998-08-06 11:41:01 +00:00
welch c67a273799 Changed testalarm to use SA_RESTART 1998-08-06 11:40:51 +00:00
welch 0ef093b2cf Nuked EINTR wrappers 1998-08-06 11:40:25 +00:00
surles ffbaca9a6f Changed the alarm test 1998-08-06 10:13:00 +00:00
stanton 8a2c0761a1 *** empty log message *** 1998-08-05 20:00:02 +00:00
stanton 7935ba9d79 fixed bad registry code 1998-08-05 19:57:47 +00:00
welch 4d15525a97 *** empty log message *** 1998-08-04 23:31:19 +00:00
welch 377809e4b7 8.0.3-5 1998-08-04 23:22:45 +00:00
welch d4f36b089a *** empty log message *** 1998-08-04 23:22:31 +00:00
welch 6f808a629f *** empty log message *** 1998-08-04 15:43:17 +00:00
escoffon 3bf83fdb9c a few more fixes, hope this is the last one! 1998-08-04 11:54:40 +00:00
escoffon e04a81a2d7 EXPORT is now TCL_STORAGE_CLASS 1998-08-04 11:53:13 +00:00
surles 36e80da197 Added test that verifies the EINTR bug has been fixed. 1998-08-04 11:50:54 +00:00
surles 76b7ca72cf Added the testalarm command. 1998-08-04 11:50:23 +00:00
surles 65e105be54 Added test that creates the REGSIGTYPE variable 1998-08-04 11:50:02 +00:00
escoffon 7b465e4732 EXPORT is now TCL_STORAGE_CLASS 1998-08-04 11:48:17 +00:00
escoffon 75fb001955 oh well, it was supposed to be TCL_STORAGE_CLASS not TCLSTORAGECLASS 1998-08-04 11:19:03 +00:00
escoffon c016773677 deleted a spurious line after my EXPORT changes. 1998-08-04 10:15:50 +00:00
escoffon 8866347b16 changes made to accomodate extension writers:
- retain the old EXPORT(a,b) macro
- rename the EXPORT macro to TCLSTORAGECLASS
1998-08-04 09:57:24 +00:00
surles 053ef46b52 Fixed EINTR bug 1998-08-03 18:25:11 +00:00
escoffon 2cc40581c1 modified the support for specifying a build directory to be consistent with
the Tk makefile.vc
1998-08-03 15:49:47 +00:00
stanton c9a810f764 remove temporary variables 1998-07-31 15:54:26 +00:00
stanton c2c520dcfc added EXTFLAGS hook 1998-07-31 15:43:49 +00:00
stanton 4e68f20bb4 added support for getting tcl_pkgPath from the registry 1998-07-31 15:43:38 +00:00
escoffon a090df5a25 One more tweak for the import/export. 1998-07-30 11:56:48 +00:00
welch 3b31dbc7a5 Added notes about DLLIMPORT and DLLEXPORT 1998-07-29 22:50:43 +00:00
welch f90dbc2c4a 8.0.3-4 1998-07-29 22:24:11 +00:00
escoffon 16b7e804de rearranged the DLL import/export macros to give better default behaviour 1998-07-29 20:27:59 +00:00
welch 41d923e2b2 More fixes for DBGX 1998-07-29 17:41:12 +00:00
escoffon a8b52f8940 - added setting of EXPORT to DLLEXPORT if we are building Tcl. 1998-07-29 14:16:25 +00:00
escoffon 7bfb47586c Define EXPORT to be DLLEXPORT 1998-07-29 14:12:16 +00:00
escoffon 8b7e4180c3 - added setting of EXPORT to DLLEXPORT if we are building Tcl 1998-07-29 14:02:01 +00:00
escoffon 54f9510d6a - added setting of EXPORT to DLLEXPORT if we are building Tcl. 1998-07-29 13:50:02 +00:00
escoffon c6a15af8ea added unconitional setting of EXPORT to DLLEXPORT (source files that
contain an EXTERN must declare EXPORT to be DLLEXPORT)
1998-07-29 13:48:33 +00:00
escoffon 571c38b377 - added setting of EXPORT to DLLEXPORT if we are building the Tcl lib. 1998-07-29 13:25:58 +00:00
escoffon 0d1f2a5794 Merged changes between child workspace "/home/escoffon/ws/tcl8.0" and
parent workspace "/export/home/ws/tcl8.0".
1998-07-29 13:12:12 +00:00
escoffon 108aafca87 set EXPORT to DLLEXPORT unconditionally, since the declaration of
Registry_Init is inside the source file.
1998-07-29 12:46:15 +00:00
escoffon 72ab2e65a0 dropped a couple of unnecessary #defines 1998-07-29 11:43:18 +00:00
escoffon 848d4ea6b2 make sure the EXPORT macro is reset to DLLIMPORT at the end of the file 1998-07-29 11:41:24 +00:00
escoffon 9e0ef81eaf modified to support the new EXTERN macro, which has support for DLL
import/export mechanisms.
- Defines DLL_BUILD and BUILD_tcl.
- Still uses the .def file for the DLLs, we'll phase it out later.
1998-07-29 11:12:24 +00:00
escoffon eb1bc81f09 use "ifdef DLL_BUILD" instead of "ifndef STATIC_BUILD" 1998-07-29 11:10:35 +00:00
escoffon ae70bad153 Added support for DLL import/export declarations in the EXTERN macro 1998-07-29 11:09:48 +00:00
welch eaba13bb79 More DBG quoting fixes 1998-07-29 10:30:30 +00:00
welch f1eccf188c DBGX changes 1998-07-28 17:33:43 +00:00
welch cdf40f8995 *** empty log message *** 1998-07-28 17:33:22 +00:00
welch 15ab57c598 DGBX 1998-07-28 17:32:56 +00:00
escoffon 5a99404be0 Created a couple of procedures to export internal procs out of a DLL;
this is needed to support precompiled procedure bodies and the info body
command (without them one gets "not a procedure: xxxx" for all precompiled
procedure bodies if Tcl is in a DLL)
1998-07-28 13:55:21 +00:00
escoffon 69cb9eb344 Info body creates a copy of the procedure body if it is a precompiled
procedure body, to avoid having the internal representation invalidated
1998-07-28 13:53:29 +00:00
hershey 46f7811d98 checks for existence of test commands 1998-07-28 11:21:27 +00:00
hershey 39297f4d68 checks for existence of test commands 1998-07-28 11:08:25 +00:00
hershey b58c7260ec check for test commands before running tests. 1998-07-28 10:37:18 +00:00
escoffon 50fb089ec2 cosmetic change to a comment 1998-07-28 09:08:40 +00:00
escoffon 05da531bdd added the TCLPIPEDLLNAME and TCLREGDLLNAME macros, so that the names can be
overridden at the command line
1998-07-28 08:56:18 +00:00
stanton 300ce5c260 fixed typo 1998-07-25 11:33:25 +00:00
stanton ebb4503d7a *** empty log message *** 1998-07-25 11:28:31 +00:00
welch c11f8ea0a6 *** empty log message *** 1998-07-24 22:20:52 +00:00
stanton 1d379b3c51 unset tclDefaultLibrary in safe mode 1998-07-24 18:58:48 +00:00
escoffon fbfb70dbed basically reapplied the changes for rev 1.7, modified to match the itcl 3.0
merges
1998-07-24 18:47:37 +00:00
stanton 72822bcfb5 lint 1998-07-24 15:50:11 +00:00
stanton 562b313564 changed to use default value instead of "Root"
changed to set tclDefaultLibrary instead of tcl_library
1998-07-24 15:38:58 +00:00
stanton 8dc078d494 changed to set tclDefaultLibrary instead of tcl_library 1998-07-24 15:37:52 +00:00
stanton 7815ce557f Merged changes between child workspace "/home/stanton/ws/tcl8.0" and
parent workspace "/export/home/ws/tcl8.0".
1998-07-24 15:36:40 +00:00
welch 6683231e5a *** empty log message *** 1998-07-24 15:06:04 +00:00
welch 2ea4bcac72 Merged changes between child workspace "/home/welch/ws/tcl8.0.3" and
parent workspace "/export/home/ws/tcl8.0".
1998-07-24 14:54:00 +00:00
welch 624c026c58 *** empty log message *** 1998-07-24 14:48:45 +00:00
welch 8f081319f9 Initial revision 1998-07-24 14:31:08 +00:00
welch 31bbea25be *** empty log message *** 1998-07-24 14:30:22 +00:00
surles 4841d98507 Removed changed from version 1.9 1998-07-24 13:52:42 +00:00
surles aaf71b1852 Updated core w/ Micheals latest changes. 1998-07-24 13:49:13 +00:00
hershey 88d6f2dc3a fixed bug in socket-9.3 {testing EOF stickyness} 1998-07-24 11:12:00 +00:00
escoffon 693bcba7c5 Added support for specifying warning flags for the compiler, with checks
for gcc and appropriate defaults.
1998-07-22 13:39:13 +00:00
rjohnson b9b329dc19 Initial revision 1998-07-21 16:13:10 +00:00
surles d9e893c2ef Removed unreferenced vars 1998-07-21 15:58:44 +00:00
escoffon bdc74a471a Merged changes between child workspace "/home/escoffon/ws/tcl8.0" and
parent workspace "/export/home/ws/tcl8.0".
1998-07-21 15:25:42 +00:00
escoffon 78fb54b924 added the TCL_LIB_FLAG variable 1998-07-21 15:22:15 +00:00
welch 65a28929d7 8.0.3-3 1998-07-20 16:54:16 +00:00
welch 2ba4eccab7 *** empty log message *** 1998-07-20 16:52:10 +00:00
welch be9f877c18 Merged changes between child workspace "/home/welch/ws/tcl8.0.3i" and
parent workspace "/home/welch/ws/tcl8.0.3".
1998-07-20 16:43:31 +00:00
welch 3c3cfebe9a Merged changes between child workspace "/home/welch/ws/tcl8.0.3i" and
parent workspace "/home/welch/ws/tcl8.0.3".
1998-07-20 16:24:45 +00:00
welch b123803b8f *** empty log message *** 1998-07-20 16:23:34 +00:00
escoffon f916e7601c Added check for precompiled ByteCodes, to avoid recompilation if the epoch
has changed in the interpreter. Instead, reset the epoch in the ByteCode.
1998-07-15 11:08:17 +00:00
escoffon 383a24c0e1 fixed a typo in the name of the -verbose flag 1998-07-14 14:49:54 +00:00
escoffon 26e4dbbde2 rolled back the check for compiled procs in Tcl_ProcObjCmd, do the unsharing
even for compiled procs. This will cause an error to be triggered the first
time the proc is called (because the source is just an error statement)
1998-07-14 10:34:43 +00:00
escoffon ee668dffac - added the -verbose flag, to show progress
- make sure that namespaces are not imported more than once per interpreter
- make sure we import the namespaces before setting the initial list of
  commands, or we miss the imported commands.
1998-07-13 17:53:36 +00:00
suresh 766bbb87fb Minor comment fixups. 1998-07-13 14:17:42 +00:00
suresh dede9b01c9 Implemented tests for the internal C routines: TclInsertAccessProc(),
TclDeleteAccessProc(), TclInsertOpenFileChannelProc(),
  TclDeleteOpenFileChannel().
1998-07-13 14:04:50 +00:00
welch f18aaf8da0 Merged changes between child workspace "/home/welch/ws/tcl8.0.3i" and
parent workspace "/home/welch/ws/tcl8.0.3".
1998-07-13 13:43:24 +00:00
welch 1128bd59e7 Fixed pkg_mkIndex 1998-07-11 13:07:06 +00:00
welch e3142a5267 *** empty log message *** 1998-07-11 13:06:42 +00:00
welch c733916a63 Initial revision 1998-07-10 14:48:02 +00:00
welch 5a51eca35f Updated 1998-07-10 12:26:40 +00:00
stanton b94c5efc08 added STATIC_BUILD test around DllMain, etc. 1998-07-09 19:02:42 +00:00
suresh aa1335bf62 Moved the variable 'tclPreInitScript' to generic/tclInitScript.h. 1998-07-09 13:47:07 +00:00
suresh 4a18847f0f Moved the variable 'tclPreInitScript' to the file generic/tclInitScript.h 1998-07-09 13:46:49 +00:00
suresh d53df41197 Fixed a bug in the Tcl init script that did not have a "global env" and thus
setting the TCL_LIBRARY environment variable was not being set in the global
  'env' array.
Moved the varaibe 'tclPreInitScript' from respective tcl<plat>Init.c file.
Added a routine 'TclSetPreInitScript()' to facilite setting the pre-init
  script variable.   This file should only be included once in the entire
  set of C source files for Tcl (by the respective platform initialization
  C source file, tclUnixInit.c and tclWinInit.c) and thus the presence of
  the routine, TclSetPreInitScript, below, should be harmless.
1998-07-09 13:46:23 +00:00
suresh 280cb76214 Removed the extern delcaration of the variable 'tclPreInitScript'.
Added prototype for the routine "TclSetPreInitScript()'.
Doing this allows for this functionality of setting the pre-init Tcl script
  to exist in the Tcl shared library.
1998-07-09 13:41:38 +00:00
escoffon d0ddb381aa added install targets 1998-07-09 09:55:50 +00:00
welch f77adfd021 Initial revision 1998-07-07 17:23:48 +00:00
welch f43eaabfa3 Merged changes between child workspace "/home/welch/ws/tcl8.0.3i" and
parent workspace "/home/welch/ws/tcl8.0.3".
1998-07-06 22:55:18 +00:00
welch cb117bb057 *** empty log message *** 1998-07-06 22:53:32 +00:00
welch a1f78d13a8 Cleaned up PlatformInitExitHandler 1998-07-06 22:51:51 +00:00
welch c9ddd166e1 *** empty log message *** 1998-07-06 22:37:35 +00:00
welch 9edc3ee966 Merged changes between child workspace "/home/welch/ws/tcl8.0.3i" and
parent workspace "/home/welch/ws/tcl8.0.3".
1998-07-06 22:21:25 +00:00
welch 6a6605f4ad Updated for 8.0.3-2 1998-07-06 22:14:09 +00:00
welch 7ead33b195 Updated for 8.0.3 1998-07-06 22:13:52 +00:00
welch 644c34a1c3 Undid the change to Tcl_EvalObj 1998-07-06 22:13:34 +00:00
welch bda3b6cd5c Updated for 8.0.3-2 1998-07-06 22:11:44 +00:00
welch 99b5d44e05 Merged changes between child workspace "/home/welch/ws/tcl8.0.3i" and
parent workspace "/home/welch/ws/tcl8.0.3".
1998-07-06 14:54:30 +00:00
escoffon 58bde70788 replaced the SCCS id string with %% keywords 1998-07-06 14:38:20 +00:00
escoffon 30b6041e75 Exported {TclProc}CleanupProc, {Tcl}ProcDeleteProc, and {TclProc}InterpProc,
for use by the TclPro compiler.
1998-07-06 14:37:54 +00:00
escoffon d276aa2648 replaced the SCCS id string with %% keywords 1998-07-06 14:37:29 +00:00
escoffon 72bbcaf03a Exported {TclProc}CleanupProc, {Tcl}ProcDeleteProc, and {TclProc}InterpProc
from tclProc.c, for use by the TclPro compiler.
1998-07-06 14:36:34 +00:00
escoffon a8de39aac1 - merged in the pkg_MkIndex changes 1998-07-02 17:54:45 +00:00
escoffon 3cf78441c1 Merged changes between child workspace "/home/escoffon/ws/tcl8.0" and
parent workspace "/ws/tcl8.0".
1998-07-02 17:52:32 +00:00
escoffon ee77e83f0b Merged changes between child workspace "/home/escoffon/ws/tcl8.0" and
parent workspace "/ws/tcl8.0".
1998-07-01 19:08:21 +00:00
rjohnson 43a575cb60 *** empty log message *** 1998-07-01 18:52:57 +00:00
rjohnson 38a602fd9e changed TclFindProc & TclIsProc to understand aliased commands 1998-07-01 18:38:11 +00:00
rjohnson 7e69dded97 *** empty log message *** 1998-07-01 18:37:16 +00:00
escoffon 3c1f36adfd - added SCCS id 1998-07-01 18:08:46 +00:00
escoffon f9f2eacc1d - added SCCS id string
- fixed a logic bug
1998-07-01 18:08:34 +00:00
escoffon 2f293ae32f Initial revision 1998-07-01 18:04:01 +00:00
escoffon a1ba681999 - dropped the .\ from temp dir name
- .pch file is now generated in temp dir, not in .
1998-07-01 18:03:15 +00:00
escoffon 4574ec8c1d - added support for configuration of debug/nodebug in configure script.
- also added a atring to append to generated libraries when built with
symbols.
1998-07-01 18:01:03 +00:00
escoffon 14b51b9da5 - modified to use the AuxDataType setup. 1998-07-01 17:57:42 +00:00
escoffon add8d19062 - added the AuxDataType stuff 1998-07-01 17:57:17 +00:00
suresh bdcb01fdbb Changed variable name "tclAlternateInitScript" to "tclPreInitScript".
Added error-checking for pre-initialization script.
1998-07-01 15:45:21 +00:00
suresh ed563f3785 Changed variable name "tclAlternateInitScript" to "tclPreInitScript".
Added error checking in in Tcl_Init() for pre-initialization script.
1998-07-01 15:45:02 +00:00
suresh bf13c9923b Changed variable name "tclAlternateInitScript" to "tclPreInitScript". 1998-07-01 15:44:31 +00:00
suresh 969c2a4780 Added definition of variable "tclAlternateInitScript" which is a globabl var-
iable and if set to a non-NULL value, will be evaluated just before the
  built-in script given in the file (variable) "generic/tclInitScript.h"
  ("initScript").
1998-07-01 14:54:47 +00:00
suresh e00df2e46e Added extern definition of variable 'tclAlternateInitScript' which is defined
in the file(s) "<platform>/tcl<platform>Init.c".
1998-07-01 14:53:20 +00:00
welch c68f9173d1 Added preface 1998-06-29 22:57:36 +00:00
welch dcadadc2ae Merged changes between child workspace "/home/welch/ws/tcl8.0.3i" and
parent workspace "/home/welch/ws/tcl8.0.3".
1998-06-29 18:11:58 +00:00
welch a9b33b7767 Updated for 8.0.3 1998-06-29 18:08:34 +00:00
welch f91a692f0d Added Scriptics 1998-06-29 18:08:05 +00:00
welch 8d0f19b1d0 Jans compatibility patch 1998-06-29 18:06:11 +00:00
welch 318a8541ea Changed patchlevel to 8.0.3 1998-06-29 17:46:01 +00:00
welch 6cc4239d19 Added Jans compatibility patch 1998-06-29 17:32:08 +00:00
welch 834bf0c2d0 Fixed IsLocalScalar 1998-06-29 16:41:49 +00:00
welch 9f38695878 expr bracing 1998-06-29 15:30:16 +00:00
welch 456c19cd15 Fixed bug in testfindexecutable 1998-06-29 15:29:35 +00:00
welch 61317caad1 Initial revision 1998-06-28 21:41:31 +00:00
welch 7d1f712068 incr tcl updtaes 1998-06-28 21:38:48 +00:00
welch 5660a1b99f Initial revision 1998-06-28 14:11:40 +00:00
welch 0d74c411d6 Initial revision 1998-06-27 22:11:40 +00:00
welch e49b28cf44 plugin updates 1998-06-27 18:09:53 +00:00
stanton 32e60ee1ba *** empty log message *** 1998-06-25 16:12:10 +00:00
stanton c9c610cd11 catch didn't compile non-local variables correctly 1998-06-25 16:12:05 +00:00
stanton 690834e1c7 lint 1998-06-25 16:11:27 +00:00
suresh 49c256e178 Added an additional env. var. ("tcl_pkgLibrary") that is searched prior to all
other locations for the "tk.tcl" file. This facilitates application packaging.
1998-06-23 17:02:48 +00:00
surles 693d8104b7 Typo fix 1998-06-22 14:42:36 +00:00
escoffon 894276a029 put the DLLs, LIBs, and EXEs in the Debug/Release subdirs rather than
in win.
1998-06-18 19:59:29 +00:00
escoffon 4ef25db455 Added changes to support builds of different configurations in parallel:
- the NODEBUG flag controls Debug/Release builds
- different values of NODEBUG create temp files in either Debug or
Release subdirectories.
- Debug DLLs and executables follow the Windows convention of a 'd' at
the end of the name (e.g. tcl80d.dll)
1998-06-18 19:56:31 +00:00
stanton 7c668f59bd *** empty log message *** 1998-06-18 18:32:55 +00:00
stanton 9c26160ec5 fixed bad array bounds checks
added performance boost for small values
1998-06-18 18:26:50 +00:00
stanton e27be7921a *** empty log message *** 1998-06-18 18:25:58 +00:00
stanton 75b521227f remove tmp file 1998-06-18 18:25:55 +00:00
stanton 408878bbbe fixed behavior of "array set" on initialization with an emtpy list
removed memory leak
1998-06-18 18:25:39 +00:00
stanton f1072578da removed dead code 1998-06-18 18:24:39 +00:00
stanton b0f1b14712 added fix for foreach compile proc so it handles non-local names correctly
fixed compile procs so they no longer corrupt the exception stack
don't inline expressions when it is unsafe to do so
1998-06-18 18:24:29 +00:00
stanton 7e4ff74f9e fixed "info vars" and "info locals" to not report compiled temporary variables
changed dictionary sort to use unsigned char comparisons
1998-06-18 18:21:57 +00:00
stanton 29ec2f13e5 changed size of static buffers in tclUnixInit to ensure that they are
large enough for any TCL_LIBRARY or TCL_PACKAGE_PATH
1998-06-18 18:07:04 +00:00
stanton 8a178c6be4 minor HPUX tweak 1998-06-18 18:04:56 +00:00
stanton c470e0206e added SHLIB_PATH to test targets 1998-06-18 18:04:46 +00:00
stanton 05bffc244a *** empty log message *** 1998-06-17 18:19:16 +00:00
stanton be486008c2 fixed behavior of Tcl_FindExecutable on null path elements 1998-06-17 18:19:11 +00:00
stanton 5d04357f56 Initial revision 1998-06-17 18:16:41 +00:00
stanton 03ef8f3f34 added code to handle null arguments 1998-06-15 19:09:09 +00:00
stanton 9850759572 *** empty log message *** 1998-06-15 19:08:59 +00:00
suresh e05b039436 Cleaned up prototype for 'Tcl_GetNameOfExecutable'. 1998-06-15 12:33:20 +00:00
suresh 831adc93ab Added prototype for the new public routine 'Tcl_GetNameOfExecutable(...)'. 1998-06-12 16:49:33 +00:00
suresh 8139ad0bcb Moved the definition of "char *tclExecutableName" to this file.
Added implementation for the new public routine 'Tcl_GetNameOfExecutable(...)'.
1998-06-12 16:49:08 +00:00
suresh e7fef6f610 Moved the definition of 'char *tclExecutableName' to the file 'tclUtil.c'
and revised the routine 'InfoNameOfExecutableCmd()' to use the new public
  routine 'Tcl_GetNameOfExecutable(...)'.
1998-06-12 16:48:11 +00:00
suresh 83dec88f96 Added documentation for the C API "Tcl_GetNameOfExecutable" which simply
returns a pointer to the internal "tclExecutablename" char* variable.
1998-06-12 16:46:08 +00:00
suresh 1c397fa9b9 Added some ^L page breaks. 1998-06-12 11:26:57 +00:00
suresh 064466541c Some code clean up to removed unnecesary pointer definitions.
Comments and "@@@" To-Do symbols removed.
1998-06-12 11:00:48 +00:00
escoffon de77b3855e added cleanup of .pdb and .pch files in the clean target 1998-06-10 12:36:19 +00:00
escoffon fa6729be12 turn off check for shared source string in Tcl_ProcObjCmd if the body
is a PRECOMPILED ByteCode object.
1998-06-10 12:34:22 +00:00
escoffon 0c5942c453 - Added the flags field in a ByteCode struct, and added one flag:
TCL_BYTECODE_PRECOMPILED to mark ByteCodes generated from .tbc files
- Added the TclGetInstructionTable procedure
1998-06-10 12:32:36 +00:00
escoffon 36dcbab765 Restored the SCCS id string back to id strings 1998-06-10 12:30:43 +00:00
escoffon 288ec4dcdd Added the definition of the EXPORT macro, used to declare that some
symbols are to be exported from DLLs. This was added so that C
packages can use a standard way of declaring exported symbols.
1998-06-10 12:22:29 +00:00
escoffon e89ceb463a - Added initialization of the flags field in ByteCode
- Added the TclGetInstructionTable procedure so that the table can be accessed
1998-06-10 12:12:41 +00:00
escoffon 37a0c8976d replaced the SCCS id string in header to display ids 1998-06-10 12:06:58 +00:00
escoffon 12368f9441 modified the check for no source string in Tcl_EvalObj to account for 1998-06-10 11:29:50 +00:00
stanton 7be16ea127 *** empty log message *** 1998-06-09 13:47:42 +00:00
stanton 571cec9ea6 changed so server sockets can't be trashed by fileevent 1998-06-09 13:09:02 +00:00
stanton cb4a15daed *** empty log message *** 1998-06-09 13:08:23 +00:00
stanton 64e1a8813e fixed bug that caused file events to not be reported on buffered data 1998-06-09 13:08:16 +00:00
suresh 33f21833b3 Added function prototypes for 'TclAccess', 'TclStat', 'TclAccessInsertProc',
'TclAccessDeleteProc', 'TclStatInsertProc', 'TclStatDeleteProc',
  'TclOpenFileChannelInsertProc', 'TclOpenFileChannelDeleteProc'.  Also
  included are appropriate data structures for declaring the respective
  functions: 'TclAccessProc_', 'TclStatProc_', & 'TclOpenFileChannelProc_'.
1998-06-04 13:11:48 +00:00
suresh c160774b9e Added routiens to support testing of new routines ('TclStatInsertProc',
'TclAccessInsertProc', 'TclOpenFileChannelInsertProc', etc.).  The new
  test commads (e.g. "testTclStat", etc.) are excersized from the file
  "test/iOUtil.test'.
1998-06-04 13:07:35 +00:00
suresh 79184e8574 Changed call references of 'stat(...)' to 'TclStat(...)' & 'access(...)' to
'TclAccess(...)'.
Added the "hookable" functions 'TclStat(...)', 'TclAccess(...)', &
  'Tcl_OpenFileChannel(...)'.
Added appropriate data structure to maintain the linked list of 'TclStat(...)',
  'TclAccess(...)', & 'Tcl_OpenFileChannel(...)'.  Added the appropriate
  "insert" and "delete" routines for each of these.
A test file 'tests/iOUtil.test' has been written to test the hooking function-
  ality of each of the routines.
'tclInt.h' has been updated to include the function prototypes for all new
  functions.
1998-06-04 13:04:41 +00:00
suresh 565e0f9b7e Initial revision 1998-06-04 12:44:44 +00:00
suresh b632be8cbb Renamed 'TclmacStat(...)' to 'TclpStat(...)' & 'TclmacAccess(...)' to
'TclpAccess(...)'.
Removed macro defines for 'stat' and 'access' because there are no longer
  any explicit calls to these function; only calls to 'TclStat' and
  'TclAccess' which are implemented in '../generic/tclIOUtil.c'.
Changed macro 'lstat' to simply call 'TclStat(...)' instead of 'stat(..)'.
1998-06-03 09:37:24 +00:00
suresh 072f0d39c6 Renamed 'TclMacStat(...)' to 'TclpStat(...)' & 'TclMacAccess(...)' to
'TclpAccess(...)'.
Added 'TclStat' & 'TclAccess' which are implemented in '../generic/tclIOUtil.c'.
1998-06-03 09:33:12 +00:00
suresh d4ef83fec2 Renamed 'TclMacStat(...)' to 'TclpStat(...)' & 'TclMacAccess(...)' to
'TclpAccess(...)'.
1998-06-03 09:32:16 +00:00
suresh d94accfbbd Renamed function 'Tcl_OpenFileChannel' to 'TclpOpenFileChannel'. 1998-06-03 09:14:10 +00:00
suresh e57eeca0a3 Renamed 'TclWinStat(...)' to 'TclpStat(...)' & 'TclWinAccess(...)' to
'TclpAccess(...)'.
Removed macro defines for 'stat' and 'access' because there are no longer
  any explicit calls to these function; only calls to 'TclStat' and
  'TclAccess' which are implemented in '../generic/tclIOUtil.c'.
Changed macro 'lstat' to simply call 'TclStat(...)' instead of 'stat(..)'.
1998-05-28 16:44:26 +00:00
suresh 880fea0671 Added macro ti simply map 'TclpStat(...)' to 'stat(...)'.
Added macro to simply map 'TclpAccess(...)' to 'access(...)'.
1998-05-28 15:18:17 +00:00
stanton 5110e5f588 *** empty log message *** 1998-05-27 18:47:30 +00:00
stanton 3ce19fb214 added test for windows bug 1998-05-27 18:25:39 +00:00
stanton 5bb29014d4 fixed bug in socket code: use of FIONREAD is not supported on Windows
changed to completely drain the socket window before checking any state
1998-05-27 18:10:40 +00:00
suresh f609c8885e Changed call ref's of 'stat(...)' to 'TclStat(...)'. 1998-05-20 17:37:39 +00:00
suresh ee2ba26d61 Changed call ref's of 'stat(...)' to 'TclStat(...)' and 'access(...)' to
'TclAccess(...)'.
1998-05-20 17:33:52 +00:00
suresh 9218425ba9 Changed call ref's from 'access(...)' to 'TclAccess(...)'. 1998-05-20 17:10:52 +00:00
suresh 8a4a4e3743 Changed call ref's from 'stat(...)' to 'TclStat(...)'. 1998-05-20 16:57:47 +00:00
suresh 6b7c77f618 Changed call ref's of 'stat(...)' to 'TclStat(...)' & 'access(...)' to
'TclAccess(...)'.
1998-05-20 16:53:03 +00:00
suresh 258204483c Renamed 'TclWinAccess()' to 'TclpAccess()' & 'TclWinStat()' to 'TclpStat()'. 1998-05-16 11:51:39 +00:00
stanton fcbdafcc79 *** empty log message *** 1998-04-29 17:10:32 +00:00
stanton 2557e212d6 added TclWinInit and TclpFinalize 1998-04-29 17:10:27 +00:00
stanton a03de997df *** empty log message *** 1998-04-29 17:09:54 +00:00
781 changed files with 306848 additions and 48398 deletions
+3124
View File
File diff suppressed because it is too large Load Diff
+140 -313
View File
@@ -1,46 +1,76 @@
Tcl
README: Tcl
This is the Tcl 8.3.0 source distribution.
You can get any release of Tcl from:
http://www.scriptics.com/registration/<version>.tml
Tcl/Tk is also available through NetCVS:
http://www.scriptics.com/products/tcltk/netcvs.html
SCCS: @(#) README 1.52 97/11/20 12:43:16
RCS: @(#) $Id: README,v 1.28 2000/02/08 10:05:09 hobbs Exp $
Contents
--------
1. Introduction
2. Documentation
3. Compiling and installing Tcl
4. Development tools
5. Tcl newsgroup
6. Tcl contributed archive
7. Tcl Resource Center
8. Mailing lists
9. Support and Training
10. Thank You
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.
This directory and its descendants contain the sources and documentation
for Tcl, an embeddable scripting language. The information here
corresponds to release 8.0p2, which is the second patch update for Tcl
8.0. Tcl 8.0 is a major new release that replaces the core of the
interpreter with an on-the-fly bytecode compiler to improve execution
speed. It also includes several other new features such as namespaces
and binary I/O, plus many bug fixes. The compiler introduces a few
incompatibilities that may affect existing Tcl scripts; the
incompatibilities are relatively obscure but may require modifications
to some old scripts before they can run with this version. The compiler
introduces many new C-level APIs, but the old APIs are still supported.
See below for more details. This patch release fixes various bugs in
Tcl 8.0; there are no feature changes relative to Tcl 8.0.
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:
http://www.scriptics.com
Tcl is a freely available open source package. You can do virtually
anything you like with it, such as modifying it, redistributing it,
and selling it either in whole or in part. See the file
"license.terms" for complete information.
2. Documentation
----------------
---------------
The best way to get started with Tcl is to read one of the introductory
books on Tcl:
Extensive documentation is available at our website.
The home page for this release is
http://www.scriptics.com/software/8.3.html
Practical Programming in Tcl and Tk, 2nd Edition, by Brent Welch,
Prentice-Hall, 1997, ISBN 0-13-616830-2
Information about new features in 8.3 can be found at
http://www.scriptics.com/software/whatsnew83.html
Tcl and the Tk Toolkit, by John Ousterhout,
Addison-Wesley, 1994, ISBN 0-201-63337-X
Detailed release notes can be found at
http://www.scriptics.com/software/relnotes/tcl8.3.0
Exploring Expect, by Don Libes,
O'Reilly and Associates, 1995, ISBN 1-56592-090-2
Information about Tcl itself can be found at
http://www.scriptics.com/scripting/
The "doc" subdirectory in this release contains a complete set of reference
manual entries for Tcl. Files with extension ".1" are for programs (for
example, tclsh.1); files with extension ".3" are for C library procedures;
and files with extension ".n" describe Tcl commands. The file "doc/Tcl.n"
gives a quick summary of the Tcl language syntax. To print any of the man
pages, cd to the "doc" directory and invoke your favorite variant of
troff using the normal -man macros, for example
There are many Tcl books on the market. Most are listed at
http://www.scriptics.com/resource/doc/books/
2a. Unix Documentation
----------------------
The "doc" subdirectory in this release contains a complete set of
reference manual entries for Tcl. Files with extension ".1" are for
programs (for example, tclsh.1); files with extension ".3" are for C
library procedures; and files with extension ".n" describe Tcl
commands. The file "doc/Tcl.n" gives a quick summary of the Tcl
language syntax. To print any of the man pages on Unix, cd to the
"doc" directory and invoke your favorite variant of troff using the
normal -man macros, for example
ditroff -man Tcl.n
@@ -50,219 +80,44 @@ using the normal "man" mechanisms, such as
man Tcl
There is also an official home for Tcl and Tk on the Web:
http://sunscript.sun.com
These Web pages include information about the latest releases, products
related to Tcl and Tk, reports on bug fixes and porting issues, HTML
versions of the manual pages, and pointers to many other Tcl/Tk Web
pages at other sites. Check them out!
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:
Start | Programs | Tcl | Tcl Help
3. Compiling and installing Tcl
-------------------------------
This release contains everything you should need to compile and run
Tcl under UNIX, Macintoshes, and PCs (either Windows NT, Windows 95,
or Win 3.1 with Win32s).
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.scriptics.com/support/howto/compile.html
Before trying to compile Tcl you should do the following things:
(a) Check for a binary release. Pre-compiled binary releases are
available now for PCs, Macintoshes, and several flavors of UNIX.
Binary releases are much easier to install than source releases.
To find out whether a binary release is available for your
platform, check the home page for SunScript
(http://sunscript.sun.com) under "Tech Corner". Also, check in
the FTP directory from which you retrieved the base
distribution. Some of the binary releases are available freely,
while others are for sale.
4. TclPro Development tools
--------------------
(b) Make sure you have the most recent patch release. Look in the
FTP directory from which you retrieved this distribution to see
if it has been updated with patches. Patch releases fix bugs
without changing any features, so you should normally use the
latest patch release for the version of Tcl that you want.
Patch releases are available in two forms. A file like
tcl8.0p2.tar.Z is a complete release for patch level 2 of Tcl
version 8.0. If there is a file with a higher patch level than
this release, just fetch the file with the highest patch level
and use it.
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:
Patches are also available in the form of patch files that just
contain the changes from one patch level to another. These
files will have names like tcl8.0p1.patch, tcl8.0p2.patch, etc. They
may also have .gz or .Z extensions to indicate compression. To
use one of these files, you apply it to an existing release with
the "patch" program. Patches must be applied in order:
tcl8.0p1.patch must be applied to an unpatched Tcl 8.0 release
to produce a Tcl 8.0p1 release; tcl8.0p2.patch can then be
applied to Tcl8.0p1 to produce Tcl 8.0p2, and so on. To apply an
uncompressed patch file such as tcl8.0p1.patch, invoke a shell
command like the following from the directory containing this
file:
patch -p < tcl8.0p1.patch
If the patch file has a .gz extension, invoke a command like the
following:
gunzip -c tcl8.0p1.patch.gz | patch -p
If the patch file has a .Z extension, it was compressed with
compress. To apply it, invoke a command like the following:
zcat tcl8.0p1.patch.Z | patch -p
If you're applying a patch to a release that has already been
compiled, then before applying the patch you should cd to the
"unix" subdirectory and type "make distclean" to restore the
directory to a pristine state.
http://www.scriptics.com/tclpro
Once you've done this, change to the "unix" subdirectory if you're
compiling under UNIX, "win" if you're compiling under Windows, or
"mac" if you're compiling on a Macintosh. Then follow the instructions
in the README file in that directory for compiling Tcl, installing it,
and running the test suite.
4. Summary of changes in Tcl 8.0
--------------------------------
Here are the most significant changes in Tcl 8.0. In addition to these
changes, there are several smaller changes and bug fixes. See the file
"changes" for a complete list of all changes.
1. Bytecode compiler. The core of the Tcl interpreter has been
replaced with an on-the-fly compiler that translates Tcl scripts to
byte codes; a new interpreter then executes the byte codes. In
earlier versions of Tcl, strings were used as a universal
representation; in Tcl 8.0 strings are replaced with Tcl_Obj
structures ("objects") that can hold both a string value and an
internal form such as a binary integer or compiled bytecodes. The
new objects make it possible to store information in efficient
internal forms and avoid the constant translations to and from
strings that occurred with the old interpreter. We have not yet
converted all of Tcl to take full advantage of the compiler and
objects and have not converted any of Tk yet, but even so you
should see speedups of 2-3x on many programs and you may see
speedups as much as 10-20x in some cases (such as code that
manipulates long lists). Future releases should achieve even
greater speedups. The compiler introduces only a few minor changes
at the level of Tcl scripts, but it introduces many new C APIs for
managing objects. See, for example, the manual entries doc/*Obj*.3.
2. Namespaces. There is a new namespace mechanism based on the
namespace implementation by Michael McLennan of Lucent Technologies.
This includes new "namespace" and "variable" commands. There are
many new C APIs associated with namespaces, but they will not be
exported until Tcl 8.1. Note: the syntax of the namespace command
has been changed slightly since the b1 release. See the changes
file for details.
3. Binary I/O. The new object system in Tcl 8.0 supports binary
strings (internally, strings are counted in addition to being null
terminated). There is a new "binary" command for inserting and
extracting data to/from binary strings. Commands such as "puts",
"gets", and "read" commands now operate correctly on binary data.
There is a new variable tcl_platform(byteOrder) to identify the
native byte order for the current host.
4. Random numbers. The "expr" command now contains a random number
generator, which can be accessed via the "rand()" and "srand()" math
functions.
5. Safe-Tcl enhancements. There is a new "hidden command"
mechanism, implemented with the Tcl commands "interp hide", "interp
expose", "interp invokehidden", and "interp hidden" and the C APIs
Tcl_HideCommand and Tcl_ExposeCommand. There is now support for
safe packages and extension loading, including new library
procedures such as safe::interpCreate (see the manual entry safe.n
for details).
6. There is a new package "registry" available under Windows for
accessing the Windows registry.
7. There is a new command "file attributes" for getting and setting
things like permissions and owner. There is also a new command
"file nativename" for getting back the platform-specific name for a
particular file.
8. There is a new "fcopy" command to copy data between channels.
This replaces and improves upon the not-so-secret unsupported old
command "unsupported0".
9. There is a new package "http" for doing GET, POST, and HEAD
requests via the HTTP/1.0 protocol. See the manual entry http.n
for details.
10. There are new library procedures for finding word breaks in
strings. See the manual entry library.n for details.
11. There are new C APIs Tcl_Finalize (for cleaning up before
unloading the Tcl DLL) and Tcl_Ungets for pushing bytes back into a
channel's input buffer.
12. Tcl now supports serial I/O devices on Windows and Unix, with a
new fconfigure -mode option. The Windows driver does not yet
support event-driven I/O.
13. The lsort command has new options -dictionary and -index. The
-index option allows for very rapid sorting based on an element
of a list.
14. The event notifier has been completely rewritten (again). It
should now allow Tcl to use an external event loop (like Motif's)
when it is embedded in other applications. No script-level
interfaces have changed, but many of the C APIs have.
Tcl 8.0 introduces the following incompatibilities that may affect Tcl
scripts that worked under Tcl 7.6 and earlier releases:
1. Variable and command names may not include the character sequence
"::" anymore: this sequence is now used as a namespace separator.
2. The semantics of some Tcl commands have been changed slightly to
maximize performance under the compiler. These incompatibilities
are documented on the Web so that we can keep the list up-to-date.
See the URL http://www.sunlabs.com/research/tcl/compiler.html.
3. 2-digit years are now parsed differently by the "clock" command
to handle year 2000 issues better (years 00-38 are treated as
2000-2038 instead of 1900-1938).
4. The old Macintosh commands "cp", "mkdir", "mv", "rm", and "rmdir"
are no longer supported; all of these features are now available on
all platforms via the "file" command.
5. The variable tcl_precision is now shared between interpreters
and defaults to 12 digits instead of 6; safe interpreters cannot
modify tcl_precision. The new object system in Tcl 8.0 causes
floating-to-string conversions (and the associated rounding) to
occur much less often than in Tcl 7.6, which can sometimes cause
behavioral changes.
6. The C APIs associated with the notifier have changed substantially.
7. The procedures Tcl_CreateModalTimeout and Tcl_DeleteModalTimeout
have been removed.
8. Tcl_CreateFileHandler and Tcl_DeleteFileHandler now take Unix
fd's and are only supported on the Unix platform
9. The C APIs for creating channel drivers have changed as part of
the new notifier implementation. The Tcl_File interfaces have been
removed. Tcl_GetChannelFile has been replaced with
Tcl_GetChannelHandle. Tcl_MakeFileChannel now takes a platform-
specific file handle. Tcl_DriverGetOptionProc procedures now take
an additional interp argument.
for more information on TclPro and for a free evaluation download.
5. Tcl newsgroup
-----------------
----------------
There is a network news group "comp.lang.tcl" intended for the exchange
of information about Tcl, Tk, and related applications. Feel free to use
the newsgroup both for general information questions and for bug reports.
We read the newsgroup and will attempt to fix bugs and problems reported
to it.
When using comp.lang.tcl, please be sure that your e-mail return address
is correctly set in your postings. This allows people to respond directly
to you, rather than the entire newsgroup, for answers that are not of
general interest. A bad e-mail return address may prevent you from
getting answers to your questions. You may have to reconfigure your news
reading software to ensure that it is supplying valid e-mail addresses.
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
--------------------------
@@ -270,112 +125,84 @@ reading software to ensure that it is supplying valid e-mail addresses.
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
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.
7. Mailing lists
7. Tcl Resource Center
----------------------
Visit http://www.scriptics.com/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
additional URLs for the resource center using the forms labeled "Add a
Resource".
8. Mailing lists
----------------
A couple of Mailing List have been set up to discuss Macintosh or
Windows related Tcl issues. In order to use these Mailing Lists you
must have access to the internet. If you have access to the WWW the
home pages for these mailing lists are located at the following URLs:
http://www.sunlabs.com/research/tcl/lists/mactcl-list.html
-and-
http://www.sunlabs.com/research/tcl/lists/wintcl-list.html
The home pages contain information about the lists and an HTML archive
of all the past messages on the list. To subscribe send a message to:
Windows related Tcl issues. To subscribe send a message to:
listserv@sunlabs.sun.com
wintcl-request@tclconsortium.org
mactcl-request@tclconsortium.org
In the body of the message (the subject will be ignored) put:
subscribe mactcl Joe Blow
subscribe mactcl Joe Smith
Replacing Joe Blow with your real name, of course. (Use wintcl
instead of mactcl if your interested in the Windows list.) If you
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:
information mactcl
in the body instead (or wintcl).
(or wintcl) in the body instead.
8. Support and bug fixes
9. Support and Training
------------------------
We're very interested in receiving bug reports and suggestions for
improvements. We prefer that you send this information to the
comp.lang.tcl newsgroup rather than to any of us at Sun. We'll see
anything on comp.lang.tcl, and in addition someone else who reads
comp.lang.tcl may be able to offer a solution. The normal turn-around
time for bugs is 3-6 weeks. 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 turns into a kitchen sink). It's
very difficult to make incompatible changes to Tcl at this point, due
to the size of the installed base.
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:
When reporting bugs, please provide a short tclsh script that we can
use to reproduce the bug. Make sure that the script runs with a
bare-bones tclsh and doesn't depend on any extensions or other
programs, particularly those that exist only at your site. Also,
please include three additional pieces of information with the
script:
(a) how do we use the script to make the problem happen (e.g.
what things do we click on, in what order)?
(b) what happens when you do these things (presumably this is
undesirable)?
(c) what did you expect to happen instead?
http://www.scriptics.com/support/bugForm.html
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.
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 support and training are available commercially from
NeoSoft (info@neosoft.com), Computerized Processes Unlimited
(gwl@cpu.com), and Data Kinetics (education@dkl.com).
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:
9. Tcl version numbers
----------------------
http://www.scriptics.com/training
Each Tcl release is identified by two numbers separated by a dot, e.g.
6.7 or 7.0. If a new release contains changes that are likely to break
existing C code or Tcl scripts then the major release number increments
and the minor number resets to zero: 6.0, 7.0, etc. If a new release
contains only bug fixes and compatible changes, then the minor number
increments without changing the major number, e.g. 7.1, 7.2, etc. If
you have C code or Tcl scripts that work with release X.Y, then they
should also work with any release X.Z as long as Z > Y.
Also see the following Web site for links to other organizations that
offer Tcl/Tk training:
Alpha and beta releases have an additional suffix of the form a2 or b1.
For example, Tcl 7.0b1 is the first beta release of Tcl version 7.0,
Tcl 7.0b2 is the second beta release, and so on. A beta release is an
initial version of a new release, used to fix bugs and bad features before
declaring the release stable. An alpha release is like a beta release,
except it's likely to need even more work before it's "ready for prime
time". New releases are normally preceded by one or more alpha and beta
releases. We hope that lots of people will try out the alpha and beta
releases and report problems. We'll make new alpha/beta releases to fix
the problems, until eventually there is a beta release that appears to
be stable. Once this occurs we'll make the final release.
http://www.scriptics.com/resource/commercial/training
We can't promise to maintain compatibility among alpha and beta releases.
For example, release 7.1b2 may not be backward compatible with 7.1b1, even
though the final 7.1 release will be backward compatible with 7.0. This
allows us to change new features as we find problems during beta testing.
We'll try to minimize incompatibilities between beta releases, but if
a major problem turns up then we'll fix it even if it introduces an
incompatibility. Once the official release is made then there won't
be any more incompatibilities until the next release with a new major
version number.
10. Thank You
-------------
Patch releases have a suffix such as p1 or p2. These releases contain
bug fixes only. A patch release (e.g Tcl 7.6p2) should be completely
compatible with the base release from which it is derived (e.g. Tcl
7.6), and you should normally use the highest available patch release.
We'd like to express our thanks to the Tcl community for all the
helpful suggestions, bug reports, and patches we have received.
Tcl/Tk has improved vastly and will continue to do so with your help.
+1383 -4
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -5,4 +5,4 @@ Tcl when a system doesn't contain the corresponding files or when
they are known to be incorrect. When the whole world becomes POSIX-
compliant this directory should be unnecessary.
sccsid = SCCS: @(#) README 1.3 96/02/16 08:56:51
RCS: @(#) $Id: README,v 1.2 1998/09/14 18:39:44 stanton Exp $
+1 -1
View File
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* SCCS: @(#) dirent.h 1.4 96/02/15 14:43:50
* RCS: @(#) $Id: dirent.h,v 1.2 1998/09/14 18:39:44 stanton Exp $
*/
#ifndef _DIRENT
+1 -1
View File
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* SCCS: @(#) dirent2.h 1.4 96/02/15 14:43:51
* RCS: @(#) $Id: dirent2.h,v 1.2 1998/09/14 18:39:44 stanton Exp $
*/
#ifndef _DIRENT
+1 -1
View File
@@ -17,7 +17,7 @@
* for any results of using the software, alterations are clearly marked
* as such, and this notice is not modified.
*
* SCCS: @(#) dlfcn.h 1.4 96/09/17 09:05:59
* RCS: @(#) $Id: dlfcn.h,v 1.2 1998/09/14 18:39:44 stanton Exp $
*/
/*
+1 -1
View File
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* SCCS: @(#) fixstrtod.c 1.5 96/02/15 12:08:21
* RCS: @(#) $Id: fixstrtod.c,v 1.2 1998/09/14 18:39:44 stanton Exp $
*/
#include <stdio.h>
+1 -1
View File
@@ -12,5 +12,5 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* SCCS: @(#) float.h 1.3 96/02/15 14:43:52
* RCS: @(#) $Id: float.h,v 1.2 1998/09/14 18:39:44 stanton Exp $
*/
+1 -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.
*
* SCCS: @(#) gettod.c 1.2 96/02/15 12:08:26
* RCS: @(#) $Id: gettod.c,v 1.2 1998/09/14 18:39:44 stanton Exp $
*/
#include "tcl.h"
+1 -1
View File
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* SCCS: @(#) limits.h 1.8 96/07/08 18:00:13
* RCS: @(#) $Id: limits.h,v 1.2 1998/09/14 18:39:44 stanton Exp $
*/
#define LONG_MIN 0x80000000
+61
View File
@@ -0,0 +1,61 @@
/*
* memcmp.c --
*
* Source code for the "memcmp" library routine.
*
* Copyright (c) 1998 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* SCCS: @(#) memcmp.c 1.2 98/01/19 10:48:58
*/
#include "tcl.h"
#include "tclPort.h"
/*
* Here is the prototype just in case it is not included
* in tclPort.h.
*/
int memcmp _ANSI_ARGS_((CONST VOID *s1,
CONST VOID *s2, size_t n));
/*
*----------------------------------------------------------------------
*
* memcmp --
*
* Compares two bytes sequences.
*
* Results:
* compares its arguments, looking at the first n
* bytes (each interpreted as an unsigned char), and returns
* an integer less than, equal to, or greater than 0, accord-
* ing as s1 is less than, equal to, or
* greater than s2 when taken to be unsigned 8 bit numbers.
*
* Side effects:
* None.
*
*----------------------------------------------------------------------
*/
int
memcmp(s1, s2, n)
CONST VOID *s1; /* First string. */
CONST VOID *s2; /* Second string. */
size_t n; /* Length to compare. */
{
unsigned char u1, u2;
for ( ; n-- ; s1++, s2++) {
u1 = * (unsigned char *) s1;
u2 = * (unsigned char *) s2;
if ( u1 != u2) {
return (u1-u2);
}
}
return 0;
}
+1 -1
View File
@@ -7,7 +7,7 @@
* originally from Larry Wall.
*
*
* SCCS: @(#) opendir.c 1.3 96/02/15 12:08:21
* RCS: @(#) $Id: opendir.c,v 1.2 1998/09/14 18:39:44 stanton Exp $
*/
#include "tclInt.h"
+2 -2
View File
@@ -9,12 +9,12 @@
* declare all the procedures needed here (such as strtod).
*
* Copyright (c) 1991 The Regents of the University of California.
* Copyright (c) 1994 Sun Microsystems, Inc.
* Copyright (c) 1994-1998 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* SCCS: @(#) stdlib.h 1.10 96/02/15 14:43:54
* RCS: @(#) $Id: stdlib.h,v 1.3 1999/04/16 00:46:30 stanton Exp $
*/
#ifndef _STDLIB
+17 -7
View File
@@ -8,7 +8,7 @@
* source. See the copyright notice below for details on redistribution
* restrictions. The "license.terms" file does not apply to this file.
*
* SCCS: @(#) strftime.c 1.4 97/08/07 17:17:02
* RCS: @(#) $Id: strftime.c,v 1.7 2000/01/15 01:50:43 hobbs Exp $
*/
/*
@@ -44,10 +44,9 @@
* SUCH DAMAGE.
*/
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)strftime.c 5.11 (Berkeley) 2/24/91";*/
static char *rcsid = "$Id: strftime.c,v 1.1 1998/03/26 14:46:31 rjohnson Exp $";
#endif /* LIBC_SCCS and not lint */
#if defined(LIBC_SCCS)
static char *rcsid = "$Id: strftime.c,v 1.7 2000/01/15 01:50:43 hobbs Exp $";
#endif /* LIBC_SCCS */
#include <time.h>
#include <string.h>
@@ -56,6 +55,7 @@ static char *rcsid = "$Id: strftime.c,v 1.1 1998/03/26 14:46:31 rjohnson Exp $";
#include "tclPort.h"
#define TM_YEAR_BASE 1900
#define IsLeapYear(x) ((x % 4 == 0) && (x % 100 != 0 || x % 400 == 0))
typedef struct {
const char *abday[7];
@@ -106,12 +106,22 @@ static size_t _fmt _ANSI_ARGS_((const char *format,
const struct tm *t));
size_t
TclStrftime(s, maxsize, format, t)
TclpStrftime(s, maxsize, format, t)
char *s;
size_t maxsize;
const char *format;
const struct tm *t;
{
if (format[0] == '%' && format[1] == 'Q') {
/* Format as a stardate */
sprintf(s, "Stardate %2d%03d.%01d",
(((t->tm_year + TM_YEAR_BASE) + 377) - 2323),
(((t->tm_yday + 1) * 1000) /
(365 + IsLeapYear((t->tm_year + TM_YEAR_BASE)))),
(((t->tm_hour * 60) + t->tm_min)/144));
return(strlen(s));
}
tzset();
pt = s;
@@ -316,7 +326,7 @@ _fmt(format, t)
continue;
#ifndef MAC_TCL
case 'Z': {
char *name = TclpGetTZName();
char *name = TclpGetTZName(t->tm_isdst);
if (name && !_add(name)) {
return 0;
}
+5 -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.
*
* SCCS: @(#) string.h 1.13 96/04/09 22:14:53
* RCS: @(#) $Id: string.h,v 1.3 1999/04/16 00:46:30 stanton Exp $
*/
#ifndef _STRING
@@ -32,8 +32,12 @@ extern char * memchr _ANSI_ARGS_((CONST VOID *s, int c, size_t n));
extern int memcmp _ANSI_ARGS_((CONST VOID *s1, CONST VOID *s2,
size_t n));
extern char * memcpy _ANSI_ARGS_((VOID *t, CONST VOID *f, size_t n));
#ifdef NO_MEMMOVE
#define memmove(d, s, n) bcopy ((s), (d), (n))
#else
extern char * memmove _ANSI_ARGS_((VOID *t, CONST VOID *f,
size_t n));
#endif
extern char * memset _ANSI_ARGS_((VOID *s, int c, size_t n));
extern int strcasecmp _ANSI_ARGS_((CONST char *s1,
+1 -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.
*
* SCCS: @(#) strncasecmp.c 1.7 96/10/24 15:23:36
* RCS: @(#) $Id: strncasecmp.c,v 1.2 1998/09/14 18:39:45 stanton Exp $
*/
#include "tclPort.h"
+1 -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.
*
* SCCS: @(#) strstr.c 1.4 96/02/15 12:08:22
* RCS: @(#) $Id: strstr.c,v 1.2 1998/09/14 18:39:45 stanton Exp $
*/
/*
+1 -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.
*
* SCCS: @(#) strtod.c 1.9 96/12/13 15:02:46
* RCS: @(#) $Id: strtod.c,v 1.2 1998/09/14 18:39:45 stanton Exp $
*/
#include "tcl.h"
+1 -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.
*
* SCCS: @(#) strtol.c 1.4 96/02/15 12:08:23
* RCS: @(#) $Id: strtol.c,v 1.2 1998/09/14 18:39:45 stanton Exp $
*/
#include <ctype.h>
+1 -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.
*
* SCCS: @(#) strtoul.c 1.5 96/02/15 12:08:24
* RCS: @(#) $Id: strtoul.c,v 1.2 1998/09/14 18:39:45 stanton Exp $
*/
#include <ctype.h>
+1 -1
View File
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* SCCS: @(#) tclErrno.h 1.1 96/04/29 15:25:31
* RCS: @(#) $Id: tclErrno.h,v 1.2 1998/09/14 18:39:45 stanton Exp $
*/
extern int errno; /* global error number */
+1 -1
View File
@@ -9,7 +9,7 @@
* software without specific written prior permission. This software
* is provided ``as is'' without express or implied warranty.
*
* SCCS: @(#) tmpnam.c 1.3 96/02/15 12:08:25
* RCS: @(#) $Id: tmpnam.c,v 1.2 1998/09/14 18:39:45 stanton Exp $
*/
#include <sys/param.h>
+1 -1
View File
@@ -12,7 +12,7 @@
* software for any purpose. It is provided "as is" without
* express or implied warranty.
*
* SCCS: @(#) unistd.h 1.7 96/02/15 14:43:57
* RCS: @(#) $Id: unistd.h,v 1.2 1998/09/14 18:39:45 stanton Exp $
*/
#ifndef _UNISTD
+9 -5
View File
@@ -12,12 +12,16 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* SCCS: @(#) waitpid.c 1.9 96/02/15 12:08:26
* RCS: @(#) $Id: waitpid.c,v 1.3 2000/01/11 22:08:50 hobbs Exp $
*/
#include "tclInt.h"
#include "tclPort.h"
#ifndef pid_t
#define pid_t int
#endif
/*
* A linked list of the following structures is used to keep track
* of processes for which we received notification from the kernel,
@@ -28,7 +32,7 @@
*/
typedef struct WaitInfo {
int pid; /* Pid of process that exited. */
pid_t pid; /* Pid of process that exited. */
WAIT_STATUS_TYPE status; /* Status returned when child exited
* or suspended. */
struct WaitInfo *nextPtr; /* Next in list of exited processes. */
@@ -64,9 +68,9 @@ static WaitInfo *deadList = NULL; /* First in list of all dead
# undef waitpid
#endif
int
pid_t
waitpid(pid, statusPtr, options)
int pid; /* The pid to wait on. Must be -1 or
pid_t pid; /* The pid to wait on. Must be -1 or
* greater than zero. */
int *statusPtr; /* Where to store wait status for the
* process. */
@@ -74,7 +78,7 @@ waitpid(pid, statusPtr, options)
* WUNTRACED. */
{
register WaitInfo *waitPtr, *prevPtr;
int result;
pid_t result;
WAIT_STATUS_TYPE status;
if ((pid < -1) || (pid == 0)) {
+71
View File
@@ -0,0 +1,71 @@
'\"
'\" Copyright (c) 1998-1999 Scriptics Corportation
'\"
'\" 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 $
'\"
.so man.macros
.TH Tcl_Access 3 8.1 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_Access, Tcl_Stat \- check file permissions and other attributes
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
.sp
int
\fBTcl_Access\fR(\fIpath\fR, \fImode\fR)
.sp
int
\fBTcl_Stat\fR(\fIpath\fR, \fIstatPtr\fR)
.SH ARGUMENTS
.AS stat *statPtr in
.AP char *path in
Native name of the file to check the attributes of.
.AP int mode in
Mask consisting of one or more of R_OK, W_OK, X_OK and F_OK. R_OK,
W_OK and X_OK request checking whether the file exists and has read,
write and execute permissions, respectively. F_OK just requests
checking for the existence of the file.
.AP stat *statPtr out
The structure that contains the result.
.BE
.SH DESCRIPTION
.PP
There are two reasons for calling \fBTcl_Access\fR and \fBTcl_Stat\fR
rather than calling system level functions \fBaccess\fR and \fBstat\fR
directly. First, the Windows implementation of both functions fixes
some bugs in the system level calls. Second, both \fBTcl_Access\fR
and \fBTcl_Stat\fR (as well as \fBTcl_OpenFileChannelProc\fR) hook
into a linked list of functions. This allows the possibity to reroute
file access to alternative media or access methods.
.PP
\fBTcl_Access\fR checks whether the process would be allowed to read,
write or test for existence of the file (or other file system object)
whose name is pathname. If pathname is a symbolic link on Unix,
then permissions of the file referred by this symbolic link are
tested.
.PP
On success (all requested permissions granted), zero is returned. On
error (at least one bit in mode asked for a permission that is denied,
or some other error occurred), -1 is returned.
.PP
\fBTcl_Stat\fR fills the stat structure \fIstatPtr\fR with information
about the specified file. You do not need any access rights to the
file to get this information but you need search rights to all
directories named in the path leading to the file. The stat structure
includes info regarding device, inode (always 0 on Windows),
priviledge mode, nlink (always 1 on Windows), user id (always 0 on
Windows), group id (always 0 on Windows), rdev (same as device on
Windows), size, last access time, last modification time, and creation
time.
.PP
If \fIpath\fR exists, \fBTcl_Stat\fR returns 0 and the stat structure
is filled with data. Otherwise, -1 is returned, and no stat info is
given.
.SH KEYWORDS
stat access
+10 -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.
'\"
'\" SCCS: @(#) AddErrInfo.3 1.28 97/06/12 13:39:53
'\" RCS: @(#) $Id: AddErrInfo.3,v 1.3 1999/03/10 05:52:45 stanton Exp $
'\"
.so man.macros
.TH Tcl_AddErrorInfo 3 7.5 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_AddObjErrorInfo, Tcl_AddErrorInfo, Tcl_SetErrorCode, Tcl_PosixError \- record information about errors
Tcl_AddObjErrorInfo, Tcl_AddErrorInfo, Tcl_SetErrorCode, Tcl_SetErrorCodeVA, Tcl_PosixError \- record information about errors
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
@@ -24,6 +24,8 @@ Tcl_AddObjErrorInfo, Tcl_AddErrorInfo, Tcl_SetErrorCode, Tcl_PosixError \- recor
.sp
\fBTcl_SetErrorCode\fR(\fIinterp, element, element, ... \fB(char *) NULL\fR)
.sp
\fBTcl_SetErrorCodeVA\fR(\fIinterp, argList\fR)
.sp
char *
\fBTcl_PosixError\fR(\fIinterp\fR)
.SH ARGUMENTS
@@ -47,6 +49,9 @@ This variable \fBerrorCode\fR will be set to this value.
.AP char *element in
String to record as one element of \fBerrorCode\fR variable.
Last \fIelement\fR argument must be NULL.
.AP va_list argList in
An argument list which must have been initialised using
\fBTCL_VARARGS_START\fR, and cleared using \fBva_end\fR.
.BE
.SH DESCRIPTION
@@ -118,6 +123,9 @@ The procedure \fBTcl_SetErrorCode\fR is also used to set the
record instead of an object. Otherwise, it is similar to
\fBTcl_SetObjErrorCode\fR in behavior.
.PP
\fBTcl_SetErrorCodeVA\fR is the same as \fBTcl_SetErrorCode\fR except that
instead of taking a variable number of arguments it takes an argument list.
.PP
\fBTcl_PosixError\fR
sets the \fBerrorCode\fR variable after an error in a POSIX kernel call.
It reads the value of the \fBerrno\fR C variable and calls
+1 -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.
'\"
'\" SCCS: @(#) Alloc.3 1.2 96/06/05 18:00:19
'\" RCS: @(#) $Id: Alloc.3,v 1.2 1998/09/14 18:39:45 stanton Exp $
'\"
.so man.macros
.TH Tcl_Alloc 3 7.5 Tcl "Tcl Library Procedures"
+1 -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.
'\"
'\" SCCS: @(#) AllowExc.3 1.5 96/03/25 19:55:47
'\" RCS: @(#) $Id: AllowExc.3,v 1.2 1998/09/14 18:39:45 stanton Exp $
'\"
.so man.macros
.TH Tcl_AllowExceptions 3 7.4 Tcl "Tcl Library Procedures"
+1 -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.
'\"
'\" SCCS: @(#) AppInit.3 1.10 96/08/26 12:59:40
'\" RCS: @(#) $Id: AppInit.3,v 1.2 1998/09/14 18:39:46 stanton Exp $
'\"
.so man.macros
.TH Tcl_AppInit 3 7.0 Tcl "Tcl Library Procedures"
+2 -2
View File
@@ -5,7 +5,7 @@
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
'\" SCCS: @(#) AssocData.3 1.8 96/03/25 19:56:17
'\" RCS: @(#) $Id: AssocData.3,v 1.3 1999/04/16 00:46:30 stanton Exp $
.so man.macros
.TH Tcl_SetAssocData 3 7.5 Tcl "Tcl Library Procedures"
.BS
@@ -84,6 +84,6 @@ specified key exists in the given interpreter \fBTcl_GetAssocData\fR
returns \fBNULL\fR.
.PP
\fBTcl_DeleteAssocData\fR deletes an association with a specified key in
the given interpreter. It does not call the deletion procedure.
the given interpreter. Then it calls the deletion procedure.
.SH KEYWORDS
association, data, deletion procedure, interpreter, key
+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.
'\"
'\" SCCS: @(#) Async.3 1.14 96/08/26 12:59:41
'\" RCS: @(#) $Id: Async.3,v 1.3 1999/04/16 00:46:30 stanton Exp $
'\"
.so man.macros
.TH Tcl_AsyncCreate 3 7.0 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_AsyncCreate, Tcl_AsyncMark, Tcl_AsyncInvoke, Tcl_AsyncDelete \- handle asynchronous events
Tcl_AsyncCreate, Tcl_AsyncMark, Tcl_AsyncInvoke, Tcl_AsyncDelete, Tcl_AsyncReady \- handle asynchronous events
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
+1 -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.
'\"
'\" SCCS: @(#) BackgdErr.3 1.3 96/03/25 19:56:51
'\" RCS: @(#) $Id: BackgdErr.3,v 1.2 1998/09/14 18:39:46 stanton Exp $
'\"
.so man.macros
.TH Tcl_BackgroundError 3 7.5 Tcl "Tcl Library Procedures"
+19 -11
View File
@@ -5,10 +5,10 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" SCCS: @(#) Backslash.3 1.16 96/03/25 19:57:09
'\" RCS: @(#) $Id: Backslash.3,v 1.3 1999/04/16 00:46:30 stanton Exp $
'\"
.so man.macros
.TH Tcl_Backslash 3 "" Tcl "Tcl Library Procedures"
.TH Tcl_Backslash 3 "8.1" Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_Backslash \- parse a backslash sequence
@@ -30,16 +30,24 @@ the backslash character.
.SH DESCRIPTION
.PP
This is a utility procedure used by several of the Tcl
commands. It parses a backslash sequence and returns
the single character corresponding to the sequence.
\fBTcl_Backslash\fR modifies \fI*countPtr\fR to contain the number
of characters in the backslash sequence.
.VS 8.1
The use of \fBTcl_Backslash\fR is deprecated in favor of
\fBTcl_UtfBackslash\fR.
.PP
See the Tcl manual entry for information on the valid
backslash sequences.
All of the sequences described in the Tcl
manual entry are supported by \fBTcl_Backslash\fR.
This is a utility procedure provided for backwards compatibilty with
non-internationalized Tcl extensions. It parses a backslash sequence and
returns the low byte of the Unicode character corresponding to the sequence.
.VE
\fBTcl_Backslash\fR modifies \fI*countPtr\fR to contain the number of
characters in the backslash sequence.
.PP
See the Tcl manual entry for information on the valid backslash sequences.
All of the sequences described in the Tcl manual entry are supported by
\fBTcl_Backslash\fR.
.VS 8.1 br
.SH "SEE ALSO"
Tcl(n), Tcl_UtfBackslash(3)
.VE
.SH KEYWORDS
backslash, parse
+1 -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.
'\"
'\" SCCS: @(#) @(#) BoolObj.3 1.7 97/05/08 19:50:57
'\" RCS: @(#) $Id: BoolObj.3,v 1.2 1998/09/14 18:39:46 stanton Exp $
'\"
.so man.macros
.TH Tcl_BooleanObj 3 8.0 Tcl "Tcl Library Procedures"
+91
View File
@@ -0,0 +1,91 @@
'\"
'\" Copyright (c) 1997 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: ByteArrObj.3,v 1.2 1999/03/03 00:38:36 stanton Exp $
'\"
.so man.macros
.TH Tcl_ByteArrayObj 3 8.1 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_NewByteArrayObj, Tcl_SetByteArrayObj, Tcl_GetByteArrayFromObj, Tcl_SetByteArrayLength \- manipulate Tcl objects as a arrays of bytes
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
.sp
Tcl_Obj *
\fBTcl_NewByteArrayObj\fR(\fIbytes, length\fR)
.sp
void
\fBTcl_SetByteArrayObj\fR(\fIobjPtr, bytes, length\fR)
.sp
unsigned char *
\fBTcl_GetByteArrayFromObj\fR(\fIobjPtr, lengthPtr\fR)
.sp
unsigned char *
\fBTcl_SetByteArrayLength\fR(\fIobjPtr, length\fR)
.SH ARGUMENTS
.AS "unsigned char" *lengthPtr in/out
.AP "unsigned char" *bytes in
The array of bytes used to initialize or set a byte-array object.
.AP int length in
The length of the array of bytes. It must be >= 0.
.AP Tcl_Obj *objPtr in/out
For \fBTcl_SetByteArrayObj\fR, this points to the object to be converted to
byte-array type. For \fBTcl_GetByteArrayFromObj\fR and
\fBTcl_SetByteArrayLength\fR, this points to the object from which to get
the byte-array value; if \fIobjPtr\fR does not already point to a byte-array
object, it will be converted to one.
.AP int *lengthPtr out
If non-NULL, filled with the length of the array of bytes in the object.
.BE
.SH DESCRIPTION
.PP
These procedures are used to create, modify, and read Tcl byte-array objects
from C code. Byte-array objects are typically used to hold the
results of binary IO operations or data structures created with the
\fBbinary\fR command. In Tcl, an array of bytes is not equivalent to a
string. Conceptually, a string is an array of Unicode characters, while a
byte-array is an array of 8-bit quantities with no implicit meaning.
Accesser functions are provided to get the string representation of a
byte-array or to convert an arbitrary object to a byte-array. Obtaining the
string representation of a byte-array object (by calling
\fBTcl_GetStringFromObj\fR) produces a properly formed UTF-8 sequence with a
one-to-one mapping between the bytes in the internal representation and the
UTF-8 characters in the string representation.
.PP
\fBTcl_NewByteArrayObj\fR and \fBTcl_SetByteArrayObj\fR will
create a new object of byte-array type or modify an existing object to have a
byte-array type. Both of these procedures set the object's type to be
byte-array and set the object's internal representation to a copy of the
array of bytes given by \fIbytes\fR. \fBTcl_NewByteArrayObj\fR returns a
pointer to a newly allocated object with a reference count of zero.
\fBTcl_SetByteArrayObj\fR invalidates any old string representation and, if
the object is not already a byte-array object, frees any old internal
representation.
.PP
\fBTcl_GetByteArrayFromObj\fR converts a Tcl object to byte-array type and
returns a pointer to the object's new internal representation as an array of
bytes. The length of this array is stored in \fIlengthPtr\fR if
\fIlengthPtr\fR is non-NULL. The storage for the array of bytes is owned by
the object and should not be freed. The contents of the array may be
modified by the caller only if the object is not shared and the caller
invalidates the string representation.
.PP
\fBTcl_SetByteArrayLength\fR converts the Tcl object to byte-array type
and changes the length of the object's internal representation as an
array of bytes. If \fIlength\fR is greater than the space currently
allocated for the array, the array is reallocated to the new length; the
newly allocated bytes at the end of the array have arbitrary values. If
\fIlength\fR is less than the space currently allocated for the array,
the length of array is reduced to the new length. The return value is a
pointer to the object's new array of bytes.
.SH "SEE ALSO"
Tcl_GetStringFromObj, Tcl_NewObj, Tcl_IncrRefCount, Tcl_DecrRefCount
.SH KEYWORDS
object, byte array, utf, unicode, internationalization
+1 -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.
'\"
'\" SCCS: @(#) CallDel.3 1.11 96/03/25 19:57:25
'\" RCS: @(#) $Id: CallDel.3,v 1.2 1998/09/14 18:39:46 stanton Exp $
'\"
.so man.macros
.TH Tcl_CallWhenDeleted 3 7.0 Tcl "Tcl Library Procedures"
+102
View File
@@ -0,0 +1,102 @@
'\"
'\" Copyright (c) 1999 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: ChnlStack.3,v 1.1 1999/07/02 19:51:14 welch Exp $
.so man.macros
.TH Tcl_StackChannel 3 8.2 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
.SH SYNOPSIS
.nf
.nf
\fB#include <tcl.h>\fR
.sp
Tcl_Channel
\fBTcl_StackChannel\fR(\fIinterp, typePtr, clientData, mask, channel\fR)
.sp
void
\fBTcl_UnstackChannel\fR(\fIinterp, channel\fR)
.sp
Tcl_Channel
\fBTcl_GetStackedChannel\fR(\fIchannel\fR)
.sp
.SH ARGUMENTS
.AS Tcl_ChannelType
.AP Tcl_Interp *interp in
Interpreter for error reporting - can be NULL.
.AP Tcl_ChannelType *typePtr in
The new channel I/O procedures to use for \fIchannel\fP.
.AP ClientData clientData in
Arbitrary one-word value to pass to channel I/O procedures.
.AP int mask in
Conditions under which \fIchannel\fR will be used: OR-ed combination of
\fBTCL_READABLE\fR, \fBTCL_WRITABLE\fR and \fBTCL_EXCEPTION\fR.
This can be a subset of the operations currently allowed on \fIchannel\fP.
.AP Tcl_Channel channel in
An existing Tcl channel such as returned by \fBTcl_CreateChannel\fR.
.BE
.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.
.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.
.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.
.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.
.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.
.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 .
.SH "SEE ALSO"
Notifier(3), Tcl_CreateChannel(3), Tcl_OpenFileChannel(3), vwait(n).
.SH KEYWORDS
channel, compression
+1 -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.
'\"
'\" SCCS: @(#) CmdCmplt.3 1.6 96/03/25 19:57:46
'\" RCS: @(#) $Id: CmdCmplt.3,v 1.2 1998/09/14 18:39:46 stanton Exp $
'\"
.so man.macros
.TH Tcl_CommandComplete 3 "" Tcl "Tcl Library Procedures"
+1 -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.
'\"
'\" SCCS: @(#) Concat.3 1.12 97/06/11 17:54:12
'\" RCS: @(#) $Id: Concat.3,v 1.2 1998/09/14 18:39:46 stanton Exp $
'\"
.so man.macros
.TH Tcl_Concat 3 7.5 Tcl "Tcl Library Procedures"
+42 -21
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.
'\"
'\" SCCS: @(#) CrtChannel.3 1.29 97/06/20 13:37:45
'\" RCS: @(#) $Id: CrtChannel.3,v 1.4 1999/08/21 19:40:47 hobbs Exp $
.so man.macros
.TH Tcl_CreateChannel 3 8.0 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_SetDefaultTranslation, 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 \- procedures for creating and manipulating channels
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
@@ -33,11 +33,6 @@ int
.VE
.sp
int
\fBTcl_GetChannelFlags\fR(\fIchannel\fR)
.sp
\fBTcl_SetDefaultTranslation\fR(\fIchannel, transMode\fR)
.sp
int
\fBTcl_GetChannelBufferSize\fR(\fIchannel\fR)
.sp
\fBTcl_SetChannelBufferSize\fR(\fIchannel, size\fR)
@@ -170,13 +165,7 @@ for each driver to determine what type of handle is returned.
and \fBTCL_WRITABLE\fR, indicating whether the channel is open for input
and output.
.PP
\fBTcl_SetDefaultTranslation\fR sets the default end of line translation
mode. This mode will be installed as the translation mode for the channel
if an attempt is made to output on the channel while it is still in
\fBTCL_TRANSLATE_AUTO\fR mode. For a description of end of line translation
modes, see the manual entry for \fBfconfigure\fR.
.PP
\fBTcl_GetChannelBufferSize\fR returns the size, in bytes, of buffers
\fBTcl_GetChannelBufferSize\fR returns the size, in bytes, of buffers
allocated to store input or output in \fIchan\fR. If the value was not set
by a previous call to \fBTcl_SetChannelBufferSize\fR, described below, then
the default value of 4096 is returned.
@@ -221,16 +210,19 @@ typedef struct Tcl_ChannelType {
Tcl_DriverGetOptionProc *\fIgetOptionProc\fR;
Tcl_DriverWatchProc *\fIwatchProc\fR;
Tcl_DriverGetHandleProc *\fIgetHandleProc\fR;
Tcl_DriverClose2Proc *\fIclose2Proc\fR;
} Tcl_ChannelType;
.CE
.VE
.PP
The driver must provide implementations for all functions except
\fIblockModeProc\fR, \fIseekProc\fR, \fIsetOptionProc\fR, and
\fIgetOptionProc\fR, which may be specified as NULL to indicate that the
channel does not support seeking. 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.
\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.
.SH TYPENAME
.PP
@@ -264,7 +256,7 @@ 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.
.SH CLOSEPROC
.SH "CLOSEPROC AND CLOSE2PROC"
.PP
The \fIcloseProc\fR field contains the address of a function called by the
generic layer to clean up driver-related information when the channel is
@@ -286,6 +278,35 @@ calling the \fIcloseProc\fR. If the close operation is successful, the
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 \fIinterp->result\fR.
.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
following prototype:
.PP
.CS
typedef int Tcl_DriverClose2Proc(
ClientData \fIinstanceData\fR,
Tcl_Interp *\fIinterp\fR,
int \fIflags\fR);
.CE
.PP
The \fIclose2Proc\fR will be called with \fIflags\fR set to an OR'ed
combination of \fBTCL_CLOSE_READ\fR or \fBTCL_CLOSE_WRITE\fR to
indicate that the driver should close the read and/or write side of
the channel. The channel driver may be invoked to perform
additional operations on the channel after \fIclose2Proc\fR is
called to close one or both sides of the channel. If \fIflags\fR is
\fB0\fR (zero), the driver should close the channel in the manner
described above for \fIcloseProc\fR. No further operations will be
invoked on this instance after \fIclose2Proc\fR is called with all
flags cleared. In all cases, the \fIclose2Proc\fR function should
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 \fIinterp->result\fR.
.VE
.SH INPUTPROC
.PP
@@ -382,7 +403,7 @@ typedef int Tcl_DriverSeekProc(
.PP
The \fIinstanceData\fR argument is the same as the value given to
\fBTcl_CreateChannel\fR when this channel was created. \fIOffset\fR and
\fIseekMode\fR have the same meaning as for the \fBTcl_SeekChannel\fR
\fIseekMode\fR have the same meaning as for the \fBTcl_Seek\fR
procedure (described in the manual entry for \fBTcl_OpenFileChannel\fR).
.PP
The \fIerrorCodePtr\fR argument points to an integer variable provided by
+1 -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.
'\"
'\" SCCS: @(#) CrtChnlHdlr.3 1.10 96/03/14 10:54:43
'\" RCS: @(#) $Id: CrtChnlHdlr.3,v 1.2 1998/09/14 18:39:46 stanton Exp $
.so man.macros
.TH Tcl_CreateChannelHandler 3 7.5 Tcl "Tcl Library Procedures"
.BS
+1 -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.
'\"
'\" SCCS: @(#) CrtCloseHdlr.3 1.7 96/04/15 13:08:19
'\" RCS: @(#) $Id: CrtCloseHdlr.3,v 1.2 1998/09/14 18:39:47 stanton Exp $
.so man.macros
.TH Tcl_CreateCloseHandler 3 7.5 Tcl "Tcl Library Procedures"
.BS
+7 -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.
'\"
'\" SCCS: @(#) CrtCommand.3 1.29 97/06/04 17:23:53
'\" RCS: @(#) $Id: CrtCommand.3,v 1.3 1998/10/05 17:35:53 stanton Exp $
'\"
.so man.macros
.TH Tcl_CreateCommand 3 "" Tcl "Tcl Library Procedures"
@@ -94,7 +94,12 @@ the command, \fIargc\fR giving the number of arguments (including
the command name) and \fIargv\fR giving the values of the arguments
as strings. The \fIargv\fR array will contain \fIargc\fR+1 values;
the first \fIargc\fR values point to the argument strings, and the
last value is NULL.
last value is NULL.
.VS
Note that the argument strings should not be modified as they may
point to constant strings or may be shared with other parts of the
interpreter.
.VE
.PP
\fIProc\fR must return an integer code that is either \fBTCL_OK\fR, \fBTCL_ERROR\fR,
\fBTCL_RETURN\fR, \fBTCL_BREAK\fR, or \fBTCL_CONTINUE\fR. See the Tcl overview man page
+1 -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.
'\"
'\" SCCS: @(#) CrtFileHdlr.3 1.7 97/04/23 16:11:17
'\" RCS: @(#) $Id: CrtFileHdlr.3,v 1.2 1998/09/14 18:39:47 stanton Exp $
'\"
.so man.macros
.TH Tcl_CreateFileHandler 3 8.0 Tcl "Tcl Library Procedures"
+5 -5
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.
'\"
'\" SCCS: @(#) CrtInterp.3 1.17 97/10/31 13:05:51
'\" RCS: @(#) $Id: CrtInterp.3,v 1.4 1999/08/21 19:40:47 hobbs Exp $
'\"
.so man.macros
.TH Tcl_CreateInterp 3 7.5 Tcl "Tcl Library Procedures"
@@ -36,7 +36,7 @@ a token for it. The token is required in calls to most other Tcl
procedures, such as \fBTcl_CreateCommand\fR, \fBTcl_Eval\fR, and
\fBTcl_DeleteInterp\fR.
Clients are only allowed to access a few of the fields of
Tcl_Interp structures; see the Tcl_Interp
Tcl_Interp structures; see the \fBTcl_Interp\fR
and \fBTcl_CreateCommand\fR man pages for details.
The new interpreter is initialized with no defined variables and only
the built-in Tcl commands. To bind in additional commands, call
@@ -124,8 +124,8 @@ All uses of interpreters in Tcl and Tk have already been protected.
Extension writers should ensure that their code also properly protects any
additional interpreters used, as described above.
.SH KEYWORDS
command, create, delete, interpreter
.SH "SEE ALSO"
Tcl_Preserve(3), Tcl_Release(3)
.SH KEYWORDS
command, create, delete, interpreter
+1 -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.
'\"
'\" SCCS: @(#) CrtMathFnc.3 1.9 96/08/26 12:59:43
'\" RCS: @(#) $Id: CrtMathFnc.3,v 1.2 1998/09/14 18:39:47 stanton Exp $
'\"
.so man.macros
.TH Tcl_CreateMathFunc 3 7.0 Tcl "Tcl Library Procedures"
+17 -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.
'\"
'\" SCCS: @(#) @(#) CrtObjCmd.3 1.10 97/07/31 14:10:38
'\" RCS: @(#) $Id: CrtObjCmd.3,v 1.3 1999/04/16 00:46:30 stanton Exp $
'\"
.so man.macros
.TH Tcl_CreateObjCommand 3 8.0 Tcl "Tcl Library Procedures"
@@ -62,8 +62,10 @@ such that whenever \fIname\fR is
invoked as a Tcl command (e.g., via a call to \fBTcl_EvalObj\fR)
the Tcl interpreter will call \fIproc\fR to process the command.
.PP
\fBTcl_CreateObjCommand\fR will delete any command \fIname\fR
already associated with the interpreter.
\fBTcl_CreateObjCommand\fR deletes any existing command
\fIname\fR already associated with the interpreter
(however see below for an exception where the existing command
is not deleted).
It returns a token that may be used to refer
to the command in subsequent calls to \fBTcl_GetCommandName\fR.
If \fIname\fR contains any \fB::\fR namespace qualifiers,
@@ -101,7 +103,7 @@ cause memory to be lost and the runtime stack to be corrupted. The
compilers to report any such attempted assignment as an error. However,
it is acceptable to modify the internal representation of any individual
object argument. For instance, the user may call
\fBTcl_GetIntFromObject\fR on \fIobjv\fR[\fB2\fR] to obtain the integer
\fBTcl_GetIntFromObj\fR on \fIobjv\fR[\fB2\fR] to obtain the integer
representation of that object; that call may change the type of the object
that \fIobjv\fR[\fB2\fR] points at, but will not change where
\fIobjv\fR[\fB2\fR] points.
@@ -128,6 +130,17 @@ not modify them.
Call \fBTcl_SetObjResult\fR if you want
to return something from the \fIobjv\fR array.
.PP
Ordinarily, \fBTcl_CreateObjCommand\fR deletes any existing command
\fIname\fR already associated with the interpreter.
However, if the existing command was created by a previous call to
\fBTcl_CreateCommand\fR,
\fBTcl_CreateObjCommand\fR does not delete the command
but instead arranges for the Tcl interpreter to call the
\fBTcl_ObjCmdProc\fR \fIproc\fR in the future.
The old string-based \fBTcl_CmdProc\fR associated with the command
is retained and its address can be obtained by subsequent
\fBTcl_GetCommandInfo\fR calls. This is done for backwards compatibility.
.PP
\fIDeleteProc\fR will be invoked when (if) \fIname\fR is deleted.
This can occur through a call to \fBTcl_DeleteCommand\fR,
\fBTcl_DeleteCommandFromToken\fR, or \fBTcl_DeleteInterp\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.
'\"
'\" SCCS: @(#) CrtSlave.3 1.26 97/07/31 18:00:14
'\" RCS: @(#) $Id: CrtSlave.3,v 1.3 1999/08/21 19:40:47 hobbs Exp $
'\"
.so man.macros
.TH Tcl_CreateSlave 3 7.6 Tcl "Tcl Library Procedures"
@@ -170,7 +170,7 @@ created by \fBTcl_CreateSlave\fR) between \fIslaveInterp\fR and
\fItargetInterp\fR. Any two interpreters can be used, without any
restrictions on how they are related.
.PP
\fBTcl_CreateAliasObj\fR is similar to \fBTcl_CreateAliasObj\fR except
\fBTcl_CreateAliasObj\fR is similar to \fBTcl_CreateAlias\fR except
that it takes a vector of objects to pass as additional arguments instead
of a vector of strings.
.VE
+1 -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.
'\"
'\" SCCS: @(#) CrtTimerHdlr.3 1.4 96/09/17 10:54:58
'\" RCS: @(#) $Id: CrtTimerHdlr.3,v 1.2 1998/09/14 18:39:47 stanton Exp $
'\"
.so man.macros
.TH Tcl_CreateTimerHandler 3 7.5 Tcl "Tcl Library Procedures"
+1 -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.
'\"
'\" SCCS: @(#) CrtTrace.3 1.14 96/03/25 20:01:10
'\" RCS: @(#) $Id: CrtTrace.3,v 1.2 1998/09/14 18:39:47 stanton Exp $
'\"
.so man.macros
.TH Tcl_CreateTrace 3 "" Tcl "Tcl Library Procedures"
+7 -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.
'\"
'\" SCCS: @(#) DString.3 1.20 96/08/26 12:59:44
'\" RCS: @(#) $Id: DString.3,v 1.4 1999/04/21 21:50:22 rjohnson Exp $
'\"
.so man.macros
.TH Tcl_DString 3 7.4 Tcl "Tcl Library Procedures"
@@ -36,6 +36,8 @@ char *
.sp
\fBTcl_DStringSetLength\fR(\fIdsPtr, newLength\fR)
.sp
\fBTcl_DStringTrunc\fR(\fIdsPtr, newLength\fR)
.sp
\fBTcl_DStringFree\fR(\fIdsPtr\fR)
.sp
\fBTcl_DStringResult\fR(\fIinterp, dsPtr\fR)
@@ -124,6 +126,10 @@ caller to fill in the new space.
even if the string is truncated to zero length, so \fBTcl_DStringFree\fR
will still need to be called.
.PP
\fBTcl_DStringTrunc\fR changes the length of a dynamic string.
This procedure is now deprecated. \fBTcl_DStringSetLength\fR should
be used instead.
.PP
\fBTcl_DStringFree\fR should be called when you're finished using
the string. It frees up any memory that was allocated for the string
and reinitializes the string's value to an empty string.
+1 -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.
'\"
'\" SCCS: @(#) DetachPids.3 1.15 96/08/26 12:59:44
'\" RCS: @(#) $Id: DetachPids.3,v 1.2 1998/09/14 18:39:48 stanton Exp $
'\"
.so man.macros
.TH Tcl_DetachPids 3 "" Tcl "Tcl Library Procedures"
+1 -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.
'\"
'\" SCCS: @(#) DoOneEvent.3 1.6 97/05/09 18:12:05
'\" RCS: @(#) $Id: DoOneEvent.3,v 1.2 1998/09/14 18:39:48 stanton Exp $
'\"
.so man.macros
.TH Tcl_DoOneEvent 3 7.5 Tcl "Tcl Library Procedures"
+1 -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.
'\"
'\" SCCS: @(#) DoWhenIdle.3 1.6 97/05/09 18:18:33
'\" RCS: @(#) $Id: DoWhenIdle.3,v 1.2 1998/09/14 18:39:48 stanton Exp $
'\"
.so man.macros
.TH Tcl_DoWhenIdle 3 7.5 Tcl "Tcl Library Procedures"
+1 -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.
'\"
'\" SCCS: @(#) @(#) DoubleObj.3 1.6 97/05/08 19:50:07
'\" RCS: @(#) $Id: DoubleObj.3,v 1.2 1998/09/14 18:39:48 stanton Exp $
'\"
.so man.macros
.TH Tcl_DoubleObj 3 8.0 Tcl "Tcl Library Procedures"
+522
View File
@@ -0,0 +1,522 @@
'\"
'\" Copyright (c) 1997-1998 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: Encoding.3,v 1.7 1999/10/13 00:32:05 hobbs Exp $
'\"
.so man.macros
.TH Tcl_GetEncoding 3 "8.1" Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_GetEncoding, Tcl_FreeEncoding, Tcl_ExternalToUtfDString, Tcl_ExternalToUtf, Tcl_UtfToExternalDString, Tcl_UtfToExternal, Tcl_WinTCharToUtf, Tcl_WinUtfToTChar, Tcl_GetEncodingName, Tcl_SetSystemEncoding, Tcl_GetEncodingNames, Tcl_CreateEncoding, Tcl_GetDefaultEncodingDir, Tcl_SetDefaultEncodingDir \- procedures for creating and using encodings.
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
.sp
Tcl_Encoding
\fBTcl_GetEncoding\fR(\fIinterp, name\fR)
.sp
void
\fBTcl_FreeEncoding\fR(\fIencoding\fR)
.sp
char *
\fBTcl_ExternalToUtfDString\fR(\fIencoding, src, srcLen, dstPtr\fR)
.sp
int
\fBTcl_ExternalToUtf\fR(\fIinterp, encoding, src, srcLen, flags, statePtr, dst, dstLen, srcReadPtr, dstWrotePtr,
dstCharsPtr\fR)
.sp
char *
\fBTcl_UtfToExternalDString\fR(\fIencoding, src, srcLen, dstPtr\fR)
.sp
int
\fBTcl_UtfToExternal\fR(\fIinterp, encoding, src, srcLen, flags, statePtr, dst, dstLen, srcReadPtr, dstWrotePtr,
dstCharsPtr\fR)
.sp
char *
\fBTcl_WinTCharToUtf\fR(\fItsrc, srcLen, dstPtr\fR)
.sp
TCHAR *
\fBTcl_WinUtfToTChar\fR(\fIsrc, srcLen, dstPtr\fR)
.sp
char *
\fBTcl_GetEncodingName\fR(\fIencoding\fR)
.sp
int
\fBTcl_SetSystemEncoding\fR(\fIinterp, name\fR)
.sp
void
\fBTcl_GetEncodingNames\fR(\fIinterp\fR)
.sp
Tcl_Encoding
\fBTcl_CreateEncoding\fR(\fItypePtr\fR)
.sp
char *
\fBTcl_GetDefaultEncodingDir\fR(\fIvoid\fR)
.sp
void
\fBTcl_SetDefaultEncodingDir\fR(\fIpath\fR)
.SH ARGUMENTS
.AS Tcl_EncodingState *dstWrotePtr
.AP Tcl_Interp *interp in
Interpreter to use for error reporting, or NULL if no error reporting is
desired.
.AP "CONST char" *name in
Name of encoding to load.
.AP Tcl_Encoding encoding in
The encoding to query, free, or use for converting text. If \fIencoding\fR is
NULL, the current system encoding is used.
.AP "CONST char" *src in
For the \fBTcl_ExternalToUtf\fR functions, an array of bytes in the
specified encoding that are to be converted to UTF-8. For the
\fBTcl_UtfToExternal\fR and \fBTcl_WinUtfToTChar\fR functions, an array of
UTF-8 characters to be converted to the specified encoding.
.AP "CONST TCHAR" *tsrc in
An array of Windows TCHAR characters to convert to UTF-8.
.AP int srcLen in
Length of \fIsrc\fR or \fItsrc\fR in bytes. If the length is negative, the
encoding-specific length of the string is used.
.AP Tcl_DString *dstPtr out
Pointer to an uninitialized or free \fBTcl_DString\fR in which the converted
result will be stored.
.AP int flags in
Various flag bits OR-ed together.
TCL_ENCODING_START signifies that the
source buffer is the first block in a (potentially multi-block) input
stream, telling the conversion routine to reset to an initial state and
perform any initialization that needs to occur before the first byte is
converted. TCL_ENCODING_END signifies that the source buffer is the last
block in a (potentially multi-block) input stream, telling the conversion
routine to perform any finalization that needs to occur after the last
byte is converted and then to reset to an initial state.
TCL_ENCODING_STOPONERROR signifies that the conversion routine should
return immediately upon reading a source character that doesn't exist in
the target encoding; otherwise a default fallback character will
automatically be substituted.
.AP Tcl_EncodingState *statePtr in/out
Used when converting a (generally long or indefinite length) byte stream
in a piece by piece fashion. The conversion routine stores its current
state in \fI*statePtr\fR after \fIsrc\fR (the buffer containing the
current piece) has been converted; that state information must be passed
back when converting the next piece of the stream so the conversion
routine knows what state it was in when it left off at the end of the
last piece. May be NULL, in which case the value specified for \fIflags\fR
is ignored and the source buffer is assumed to contain the complete string to
convert.
.AP char *dst out
Buffer in which the converted result will be stored. No more than
\fIdstLen\fR bytes will be stored in \fIdst\fR.
.AP int dstLen in
The maximum length of the output buffer \fIdst\fR in bytes.
.AP int *srcReadPtr out
Filled with the number of bytes from \fIsrc\fR that were actually
converted. This may be less than the original source length if there was
a problem converting some source characters. May be NULL.
.AP int *dstWrotePtr out
Filled with the number of bytes that were actually stored in the output
buffer as a result of the conversion. May be NULL.
.AP int *dstCharsPtr out
Filled with the number of characters that correspond to the number of bytes
stored in the output buffer. May be NULL.
.AP Tcl_EncodingType *typePtr in
Structure that defines a new type of encoding.
.AP char *path in
A path to the location of the encoding file.
.BE
.SH INTRODUCTION
.PP
These routines convert between Tcl's internal character representation,
UTF-8, and character representations used by various operating systems or
file systems, such as Unicode, ASCII, or Shift-JIS. When operating on
strings, such as such as obtaining the names of files or displaying
characters using international fonts, the strings must be translated into
one or possibly multiple formats that the various system calls can use. For
instance, on a Japanese Unix workstation, a user might obtain a filename
represented in the EUC-JP file encoding and then translate the characters to
the jisx0208 font encoding in order to display the filename in a Tk widget.
The purpose of the encoding package is to help bridge the translation gap.
UTF-8 provides an intermediate staging ground for all the various
encodings. In the example above, text would be translated into UTF-8 from
whatever file encoding the operating system is using. Then it would be
translated from UTF-8 into whatever font encoding the display routines
require.
.PP
Some basic encodings are compiled into Tcl. Others can be defined by the
user or dynamically loaded from encoding files in a
platform-independent manner.
.SH DESCRIPTION
.PP
\fBTcl_GetEncoding\fR finds an encoding given its \fIname\fR. The name may
refer to a builtin Tcl encoding, a user-defined encoding registered by
calling \fBTcl_CreateEncoding\fR, or a dynamically-loadable encoding
file. The return value is a token that represents the encoding and can be
used in subsequent calls to procedures such as \fBTcl_GetEncodingName\fR,
\fBTcl_FreeEncoding\fR, and \fBTcl_UtfToExternal\fR. If the name did not
refer to any known or loadable encoding, NULL is returned and an error
message is returned in \fIinterp\fR.
.PP
The encoding package maintains a database of all encodings currently in use.
The first time \fIname\fR is seen, \fBTcl_GetEncoding\fR returns an
encoding with a reference count of 1. If the same \fIname\fR is requested
further times, then the reference count for that encoding is incremented
without the overhead of allocating a new encoding and all its associated
data structures.
.PP
When an \fIencoding\fR is no longer needed, \fBTcl_FreeEncoding\fR
should be called to release it. When an \fIencoding\fR is no longer in use
anywhere (i.e., it has been freed as many times as it has been gotten)
\fBTcl_FreeEncoding\fR will release all storage the encoding was using
and delete it from the database.
.PP
\fBTcl_ExternalToUtfDString\fR converts a source buffer \fIsrc\fR from the
specified \fIencoding\fR into UTF-8. The converted bytes are stored in
\fIdstPtr\fR, which is then NULL terminated. The caller should eventually
call \fBTcl_DStringFree\fR to free any information stored in \fIdstPtr\fR.
When converting, if any of the characters in the source buffer cannot be
represented in the target encoding, a default fallback character will be
used. The return value is a pointer to the value stored in the DString.
.PP
\fBTcl_ExternalToUtf\fR converts a source buffer \fIsrc\fR from the specified
\fIencoding\fR into UTF-8. Up to \fIsrcLen\fR bytes are converted from the
source buffer and up to \fIdstLen\fR converted bytes are stored in \fIdst\fR.
In all cases, \fI*srcReadPtr\fR is filled with the number of bytes that were
successfully converted from \fIsrc\fR and \fI*dstWrotePtr\fR is filled with
the corresponding number of bytes that were stored in \fIdst\fR. The return
value is one of the following:
.RS
.IP \fBTCL_OK\fR 29
All bytes of \fIsrc\fR were converted.
.IP \fBTCL_CONVERT_NOSPACE\fR 29
The destination buffer was not large enough for all of the converted data; as
many characters as could fit were converted though.
.IP \fBTCL_CONVERT_MULTIBYTE\fR 29
The last fews bytes in the source buffer were the beginning of a multibyte
sequence, but more bytes were needed to complete this sequence. A
subsequent call to the conversion routine should pass a buffer containing
the unconverted bytes that remained in \fIsrc\fR plus some further bytes
from the source stream to properly convert the formerly split-up multibyte
sequence.
.IP \fBTCL_CONVERT_SYNTAX\fR 29
The source buffer contained an invalid character sequence. This may occur
if the input stream has been damaged or if the input encoding method was
misidentified.
.IP \fBTCL_CONVERT_UNKNOWN\fR 29
The source buffer contained a character that could not be represented in
the target encoding and TCL_ENCODING_STOPONERROR was specified.
.RE
.LP
\fBTcl_UtfToExternalDString\fR converts a source buffer \fIsrc\fR from UTF-8
into the specified \fIencoding\fR. The converted bytes are stored in
\fIdstPtr\fR, which is then terminated with the appropriate encoding-specific
NULL. The caller should eventually call \fBTcl_DStringFree\fR to free any
information stored in \fIdstPtr\fR. When converting, if any of the
characters in the source buffer cannot be represented in the target
encoding, a default fallback character will be used. The return value is
a pointer to the value stored in the DString.
.PP
\fBTcl_UtfToExternal\fR converts a source buffer \fIsrc\fR from UTF-8 into
the specified \fIencoding\fR. Up to \fIsrcLen\fR bytes are converted from
the source buffer and up to \fIdstLen\fR converted bytes are stored in
\fIdst\fR. In all cases, \fI*srcReadPtr\fR is filled with the number of
bytes that were successfully converted from \fIsrc\fR and \fI*dstWrotePtr\fR
is filled with the corresponding number of bytes that were stored in
\fIdst\fR. The return values are the same as the return values for
\fBTcl_ExternalToUtf\fR.
.PP
\fBTcl_WinUtfToTChar\fR and \fBTcl_WinTCharToUtf\fR are
Windows-only convenience
functions for converting between UTF-8 and Windows strings. On Windows 95
(as with the Macintosh and Unix operating systems),
all strings exchanged between Tcl and the operating system are "char"
based. On Windows NT, some strings exchanged between Tcl and the
operating system are "char" oriented while others are in Unicode. By
convention, in Windows a TCHAR is a character in the ANSI code page
on Windows 95 and a Unicode character on Windows NT.
.PP
If you planned to use the same "char" based interfaces on both Windows
95 and Windows NT, you could use \fBTcl_UtfToExternal\fR and
\fBTcl_ExternalToUtf\fR (or their \fBTcl_DString\fR equivalents) with an
encoding of NULL (the current system encoding). On the other hand,
if you planned to use the Unicode interface when running on Windows NT
and the "char" interfaces when running on Windows 95, you would have
to perform the following type of test over and over in your program
(as represented in psuedo-code):
.CS
if (running NT) {
encoding <- Tcl_GetEncoding("unicode");
nativeBuffer <- Tcl_UtfToExternal(encoding, utfBuffer);
Tcl_FreeEncoding(encoding);
} else {
nativeBuffer <- Tcl_UtfToExternal(NULL, utfBuffer);
.CE
\fBTcl_WinUtfToTChar\fR and \fBTcl_WinTCharToUtf\fR automatically
handle this test and use the proper encoding based on the current
operating system. \fBTcl_WinUtfToTChar\fR returns a pointer to
a TCHAR string, and \fBTcl_WinTCharToUtf\fR expects a TCHAR string
pointer as the \fIsrc\fR string. Otherwise, these functions
behave identically to \fBTcl_UtfToExternalDString\fR and
\fBTcl_ExternalToUtfDString\fR.
.PP
\fBTcl_GetEncodingName\fR is roughly the inverse of \fBTcl_GetEncoding\fR.
Given an \fIencoding\fR, the return value is the \fIname\fR argument that
was used to create the encoding. The string returned by
\fBTcl_GetEncodingName\fR is only guaranteed to persist until the
\fIencoding\fR is deleted. The caller must not modify this string.
.PP
\fBTcl_SetSystemEncoding\fR sets the default encoding that should be used
whenever the user passes a NULL value for the \fIencoding\fR argument to
any of the other encoding functions. If \fIname\fR is NULL, the system
encoding is reset to the default system encoding, \fBbinary\fR. If the
name did not refer to any known or loadable encoding, TCL_ERROR is
returned and an error message is left in \fIinterp\fR. Otherwise, this
procedure increments the reference count of the new system encoding,
decrements the reference count of the old system encoding, and returns
TCL_OK.
.PP
\fBTcl_GetEncodingNames\fR sets the \fIinterp\fR result to a list
consisting of the names of all the encodings that are currently defined
or can be dynamically loaded, searching the encoding path specified by
\fBTcl_SetDefaultEncodingDir\fR. This procedure does not ensure that the
dynamically-loadable encoding files contain valid data, but merely that they
exist.
.PP
\fBTcl_CreateEncoding\fR defines a new encoding and registers the C
procedures that are called back to convert between the encoding and
UTF-8. Encodings created by \fBTcl_CreateEncoding\fR are thereafter
visible in the database used by \fBTcl_GetEncoding\fR. Just as with the
\fBTcl_GetEncoding\fR procedure, the return value is a token that
represents the encoding and can be used in subsequent calls to other
encoding functions. \fBTcl_CreateEncoding\fR returns an encoding with a
reference count of 1. If an encoding with the specified \fIname\fR
already exists, then its entry in the database is replaced with the new
encoding; the token for the old encoding will remain valid and continue
to behave as before, but users of the new token will now call the new
encoding procedures.
.PP
The \fItypePtr\fR argument to \fBTcl_CreateEncoding\fR contains information
about the name of the encoding and the procedures that will be called to
convert between this encoding and UTF-8. It is defined as follows:
.PP
.CS
typedef struct Tcl_EncodingType {
CONST char *\fIencodingName\fR;
Tcl_EncodingConvertProc *\fItoUtfProc\fR;
Tcl_EncodingConvertProc *\fIfromUtfProc\fR;
Tcl_EncodingFreeProc *\fIfreeProc\fR;
ClientData \fIclientData\fR;
int \fInullSize\fR;
} Tcl_EncodingType;
.CE
.PP
The \fIencodingName\fR provides a string name for the encoding, by
which it can be referred in other procedures such as
\fBTcl_GetEncoding\fR. The \fItoUtfProc\fR refers to a callback
procedure to invoke to convert text from this encoding into UTF-8.
The \fIfromUtfProc\fR refers to a callback procedure to invoke to
convert text from UTF-8 into this encoding. The \fIfreeProc\fR refers
to a callback procedure to invoke when this encoding is deleted. The
\fIfreeProc\fR field may be NULL. The \fIclientData\fR contains an
arbitrary one-word value passed to \fItoUtfProc\fR, \fIfromUtfProc\fR,
and \fIfreeProc\fR whenever they are called. Typically, this is a
pointer to a data structure containing encoding-specific information
that can be used by the callback procedures. For instance, two very
similar encodings such as \fBascii\fR and \fBmacRoman\fR may use the
same callback procedure, but use different values of \fIclientData\fR
to control its behavior. The \fInullSize\fR specifies the number of
zero bytes that signify end-of-string in this encoding. It must be
\fB1\fR (for single-byte or multi-byte encodings like ASCII or
Shift-JIS) or \fB2\fR (for double-byte encodings like Unicode).
Constant-sized encodings with 3 or more bytes per character (such as
CNS11643) are not accepted.
.PP
The callback procedures \fItoUtfProc\fR and \fIfromUtfProc\fR should match the
type \fBTcl_EncodingConvertProc\fR:
.PP
.CS
typedef int Tcl_EncodingConvertProc(
ClientData \fIclientData\fR,
CONST char *\fIsrc\fR,
int \fIsrcLen\fR,
int \fIflags\fR,
Tcl_Encoding *\fIstatePtr\fR,
char *\fIdst\fR,
int \fIdstLen\fR,
int *\fIsrcReadPtr\fR,
int *\fIdstWrotePtr\fR,
int *\fIdstCharsPtr\fR);
.CE
.PP
The \fItoUtfProc\fR and \fIfromUtfProc\fR procedures are called by the
\fBTcl_ExternalToUtf\fR or \fBTcl_UtfToExternal\fR family of functions to
perform the actual conversion. The \fIclientData\fR parameter to these
procedures is the same as the \fIclientData\fR field specified to
\fBTcl_CreateEncoding\fR when the encoding was created. The remaining
arguments to the callback procedures are the same as the arguments,
documented at the top, to \fBTcl_ExternalToUtf\fR or
\fBTcl_UtfToExternal\fR, with the following exceptions. If the
\fIsrcLen\fR argument to one of those high-level functions is negative,
the value passed to the callback procedure will be the appropriate
encoding-specific string length of \fIsrc\fR. If any of the \fIsrcReadPtr\fR,
\fIdstWrotePtr\fR, or \fIdstCharsPtr\fR arguments to one of the high-level
functions is NULL, the corresponding value passed to the callback
procedure will be a non-NULL location.
.PP
The callback procedure \fIfreeProc\fR, if non-NULL, should match the type
\fBTcl_EncodingFreeProc\fR:
.CS
typedef void Tcl_EncodingFreeProc(
ClientData \fIclientData\fR);
.CE
.PP
This \fIfreeProc\fR function is called when the encoding is deleted. The
\fIclientData\fR parameter is the same as the \fIclientData\fR field
specified to \fBTcl_CreateEncoding\fR when the encoding was created.
.PP
\fBTcl_GetDefaultEncodingDir\fR and \fBTcl_SetDefaultEncodingDir\fR
access and set the directory to use when locating the default encoding
files. If this value is not NULL, the \fBTclpInitLibraryPath\fR routine
appends the path to the head of the search path, and uses this path as
the first place to look into when trying to locate the encoding file.
.SH "ENCODING FILES"
Space would prohibit precompiling into Tcl every possible encoding
algorithm, so many encodings are stored on disk as dynamically-loadable
encoding files. This behavior also allows the user to create additional
encoding files that can be loaded using the same mechanism. These
encoding files contain information about the tables and/or escape
sequences used to map between an external encoding and Unicode. The
external encoding may consist of single-byte, multi-byte, or double-byte
characters.
.PP
Each dynamically-loadable encoding is represented as a text file. The
initial line of the file, beginning with a ``#'' symbol, is a comment
that provides a human-readable description of the file. The next line
identifies the type of encoding file. It can be one of the following
letters:
.IP "[1] \fBS\fR"
A single-byte encoding, where one character is always one byte long in the
encoding. An example is \fBiso8859-1\fR, used by many European languages.
.IP "[2] \fBD\fR"
A double-byte encoding, where one character is always two bytes long in the
encoding. An example is \fBbig5\fR, used for Chinese text.
.IP "[3] \fBM\fR"
A multi-byte encoding, where one character may be either one or two bytes long.
Certain bytes are a lead bytes, indicating that another byte must follow
and that together the two bytes represent one character. Other bytes are not
lead bytes and represent themselves. An example is \fBshiftjis\fR, used by
many Japanese computers.
.IP "[4] \fBE\fR"
An escape-sequence encoding, specifying that certain sequences of bytes
do not represent characters, but commands that describe how following bytes
should be interpreted.
.PP
The rest of the lines in the file depend on the type.
.PP
Cases [1], [2], and [3] are collectively referred to as table-based encoding
files. The lines in a table-based encoding file are in the same
format as this example taken from the \fBshiftjis\fR encoding (this is not
the complete file):
.CS
# Encoding file: shiftjis, multi-byte
M
003F 0 40
00
0000000100020003000400050006000700080009000A000B000C000D000E000F
0010001100120013001400150016001700180019001A001B001C001D001E001F
0020002100220023002400250026002700280029002A002B002C002D002E002F
0030003100320033003400350036003700380039003A003B003C003D003E003F
0040004100420043004400450046004700480049004A004B004C004D004E004F
0050005100520053005400550056005700580059005A005B005C005D005E005F
0060006100620063006400650066006700680069006A006B006C006D006E006F
0070007100720073007400750076007700780079007A007B007C007D203E007F
0080000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000FF61FF62FF63FF64FF65FF66FF67FF68FF69FF6AFF6BFF6CFF6DFF6EFF6F
FF70FF71FF72FF73FF74FF75FF76FF77FF78FF79FF7AFF7BFF7CFF7DFF7EFF7F
FF80FF81FF82FF83FF84FF85FF86FF87FF88FF89FF8AFF8BFF8CFF8DFF8EFF8F
FF90FF91FF92FF93FF94FF95FF96FF97FF98FF99FF9AFF9BFF9CFF9DFF9EFF9F
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
81
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
300030013002FF0CFF0E30FBFF1AFF1BFF1FFF01309B309C00B4FF4000A8FF3E
FFE3FF3F30FD30FE309D309E30034EDD30053006300730FC20152010FF0F005C
301C2016FF5C2026202520182019201C201DFF08FF0930143015FF3BFF3DFF5B
FF5D30083009300A300B300C300D300E300F30103011FF0B221200B100D70000
00F7FF1D2260FF1CFF1E22662267221E22342642264000B0203220332103FFE5
FF0400A200A3FF05FF03FF06FF0AFF2000A72606260525CB25CF25CE25C725C6
25A125A025B325B225BD25BC203B301221922190219121933013000000000000
000000000000000000000000000000002208220B2286228722822283222A2229
000000000000000000000000000000002227222800AC21D221D4220022030000
0000000000000000000000000000000000000000222022A52312220222072261
2252226A226B221A223D221D2235222B222C0000000000000000000000000000
212B2030266F266D266A2020202100B6000000000000000025EF000000000000
.CE
.PP
The third line of the file is three numbers. The first number is the
fallback character (in base 16) to use when converting from UTF-8 to this
encoding. The second number is a \fB1\fR if this file represents the
encoding for a symbol font, or \fB0\fR otherwise. The last number (in base
10) is how many pages of data follow.
.PP
Subsequent lines in the example above are pages that describe how to map
from the encoding into 2-byte Unicode. The first line in a page identifies
the page number. Following it are 256 double-byte numbers, arranged as 16
rows of 16 numbers. Given a character in the encoding, the high byte of
that character is used to select which page, and the low byte of that
character is used as an index to select one of the double-byte numbers in
that page \- the value obtained being the corresponding Unicode character.
By examination of the example above, one can see that the characters 0x7E
and 0x8163 in \fBshiftjis\fR map to 203E and 2026 in Unicode, respectively.
.PP
Following the first page will be all the other pages, each in the same
format as the first: one number identifying the page followed by 256
double-byte Unicode characters. If a character in the encoding maps to the
Unicode character 0000, it means that the character doesn't actually exist.
If all characters on a page would map to 0000, that page can be omitted.
.PP
Case [4] is the escape-sequence encoding file. The lines in an this type of
file are in the same format as this example taken from the \fBiso2022-jp\fR
encoding:
.CS
.ta 1.5i
# Encoding file: iso2022-jp, escape-driven
E
init {}
final {}
iso8859-1 \\x1b(B
jis0201 \\x1b(J
jis0208 \\x1b$@
jis0208 \\x1b$B
jis0212 \\x1b$(D
gb2312 \\x1b$A
ksc5601 \\x1b$(C
.CE
.PP
In the file, the first column represents an option and the second column
is the associated value. \fBinit\fR is a string to emit or expect before
the first character is converted, while \fBfinal\fR is a string to emit
or expect after the last character. All other options are names of
table-based encodings; the associated value is the escape-sequence that
marks that encoding. Tcl syntax is used for the values; in the above
example, for instance, ``\fB{}\fR'' represents the empty string and
``\fB\\x1b\fR'' represents character 27.
.PP
When \fBTcl_GetEncoding\fR encounters an encoding \fIname\fR that has not
been loaded, it attempts to load an encoding file called \fIname\fB.enc\fR
from the \fBencoding\fR subdirectory of each directory specified in the
library path \fB$tcl_libPath\fR. If the encoding file exists, but is
malformed, an error message will be left in \fIinterp\fR.
.SH KEYWORDS
utf, encoding, convert
+137 -55
View File
@@ -5,88 +5,173 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" SCCS: @(#) Eval.3 1.21 97/01/22 14:22:03
'\" RCS: @(#) $Id: Eval.3,v 1.5 1999/08/19 02:58:34 hobbs Exp $
'\"
.so man.macros
.TH Tcl_Eval 3 7.0 Tcl "Tcl Library Procedures"
.TH Tcl_Eval 3 8.1 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_Eval, Tcl_VarEval, Tcl_EvalFile, Tcl_GlobalEval \- execute Tcl commands
Tcl_EvalObjEx, Tcl_EvalFile, Tcl_EvalObjv, Tcl_Eval, Tcl_EvalEx, Tcl_GlobalEval, Tcl_GlobalEvalObj, Tcl_VarEval, Tcl_VarEvalVA \- execute Tcl scripts
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
.sp
.VS
int
\fBTcl_Eval\fR(\fIinterp, cmd\fR)
.sp
int
\fBTcl_VarEval\fR(\fIinterp, string, string, ... \fB(char *) NULL\fR)
\fBTcl_EvalObjEx\fR(\fIinterp, objPtr, flags\fR)
.sp
int
\fBTcl_EvalFile\fR(\fIinterp, fileName\fR)
.sp
int
\fBTcl_GlobalEval\fR(\fIinterp, cmd\fR)
\fBTcl_EvalObjv\fR(\fIinterp, objc, objv, flags\fR)
.sp
int
\fBTcl_Eval\fR(\fIinterp, script\fR)
.sp
int
\fBTcl_EvalEx\fR(\fIinterp, script, numBytes, flags\fR)
.sp
int
\fBTcl_GlobalEval\fR(\fIinterp, script\fR)
.sp
int
\fBTcl_GlobalEvalObj\fR(\fIinterp, objPtr, flags\fR)
.sp
int
\fBTcl_VarEval\fR(\fIinterp, string, string, ... \fB(char *) NULL\fR)
.sp
int
\fBTcl_VarEvalVA\fR(\fIinterp, argList\fR)
.SH ARGUMENTS
.AS Tcl_Interp **termPtr;
.AP Tcl_Interp *interp in
Interpreter in which to execute the command.
A string result will be stored in \fIinterp->result\fR.
.AP char *cmd in
Command (or sequence of commands) to execute. Must be in writable
memory (\fBTcl_Eval\fR makes temporary modifications to the command).
.AP char *string in
String forming part of Tcl command.
Interpreter in which to execute the script. The interpreter's result is
modified to hold the result or error message from the script.
.AP Tcl_Obj *objPtr in
A Tcl object containing the script to execute.
.AP int flags in
ORed combination of flag bits that specify additional options.
\fBTCL_EVAL_GLOBAL\fR and \fBTCL_EVAL_DIRECT\fR are currently supported.
.AP char *fileName in
Name of file containing Tcl command string.
Name of a file containing a Tcl script.
.AP int objc in
The number of objects in the array pointed to by \fIobjPtr\fR;
this is also the number of words in the command.
.AP Tcl_Obj **objv in
Points to an array of pointers to objects; each object holds the
value of a single word in the command to execute.
.AP int numBytes in
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.
.AP char *string in
String forming part of a Tcl script.
.AP va_list argList in
An argument list which must have been initialised using
\fBTCL_VARARGS_START\fR, and cleared using \fBva_end\fR.
.BE
.SH DESCRIPTION
.PP
All four of these procedures execute Tcl commands.
\fBTcl_Eval\fR is the core procedure and is used by all the others.
It executes the commands in the script held by \fIcmd\fR
until either an error occurs or it reaches the end of the script.
The procedures described here are invoked to execute Tcl scripts in
various forms.
\fBTcl_EvalObjEx\fR is the core procedure and is used by many of the others.
It executes the commands in the script stored in \fIobjPtr\fR
until either an error occurs or the end of the script is reached.
If this is the first time \fIobjPtr\fR has been executed,
its commands are compiled into bytecode instructions
which are then executed. The
bytecodes are saved in \fIobjPtr\fR so that the compilation step
can be skipped if the object is evaluated again in the future.
.PP
Note that \fBTcl_Eval\fR and \fBTcl_GlobalEval\fR
have been largely replaced by the
object-based procedures \fBTcl_EvalObj\fR and \fBTcl_GlobalEvalObj\fR.
Those object-based procedures evaluate a script held in a Tcl object
instead of a string.
The object argument can retain the bytecode instructions for the script
and so avoid reparsing the script each time it is executed.
\fBTcl_Eval\fR is implemented using \fBTcl_EvalObj\fR
but is slower because it must reparse the script each time
since there is no object to retain the bytecode instructions.
The return value from \fBTcl_EvalObjEx\fR (and all the other procedures
described here) is a Tcl completion code with
one of the values \fBTCL_OK\fR, \fBTCL_ERROR\fR, \fBTCL_RETURN\fR,
\fBTCL_BREAK\fR, or \fBTCL_CONTINUE\fR.
In addition, a result value or error message is left in \fIinterp\fR's
result; it can be retrieved using \fBTcl_GetObjResult\fR.
.PP
The return value from \fBTcl_Eval\fR is one of the Tcl return codes
\fBTCL_OK\fR, \fBTCL_ERROR\fR, \fBTCL_RETURN\fR, \fBTCL_BREAK\fR, or
\fBTCL_CONTINUE\fR, and \fIinterp->result\fR will point to
a string with additional information (a result value or error message).
If an error occurs during compilation, this return information
describes the error.
Otherwise, this return information corresponds to the last command
executed from \fIcmd\fR.
\fBTcl_EvalFile\fR reads the file given by \fIfileName\fR and evaluates
its contents as a Tcl script. It returns the same information as
\fBTcl_EvalObjEx\fR.
If the file couldn't be read then a Tcl error is returned to describe
why the file couldn't be read.
.PP
\fBTcl_EvalObjv\fR executes a single pre-parsed command instead of a
script. The \fIobjc\fR and \fIobjv\fR arguments contain the values
of the words for the Tcl command, one word in each object in
\fIobjv\fR. \fBTcl_EvalObjv\fR evaluates the command and returns
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 \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
where it can be accessed directly. This makes \fBTcl_Eval\fR somewhat
slower than \fBTcl_EvalEx\fR, which doesn't do the copy.
.PP
\fBTcl_EvalEx\fR is an extended version of \fBTcl_Eval\fR that takes
additional arguments \fInumBytes\fR and \fIflags\fR. For the
efficiency reason given above, \fBTcl_EvalEx\fR is generally preferred
over \fBTcl_Eval\fR.
.PP
\fBTcl_GlobalEval\fR and \fBTcl_GlobalEvalObj\fR are older procedures
that are now deprecated. They are similar to \fBTcl_EvalEx\fR and
\fBTcl_EvalObjEx\fR except that the script is evaluated in the global
namespace and its variable context consists of global variables only
(it ignores any Tcl procedures that are active). These functions are
equivalent to using the \fBTCL_EVAL_GLOBAL\fR flag (see below).
.PP
\fBTcl_VarEval\fR takes any number of string arguments
of any length, concatenates them into a single string,
then calls \fBTcl_Eval\fR to execute that string as a Tcl command.
It returns the result of the command and also modifies
\fIinterp->result\fR in the usual fashion for Tcl commands.
\fIinterp->result\fR in the same way as \fBTcl_Eval\fR.
The last argument to \fBTcl_VarEval\fR must be NULL to indicate the end
of arguments.
of arguments. \fBTcl_VarEval\fR is now deprecated.
.PP
\fBTcl_EvalFile\fR reads the file given by \fIfileName\fR and evaluates
its contents as a Tcl command by calling \fBTcl_Eval\fR. It returns
a standard Tcl result that reflects the result of evaluating the file.
If the file couldn't be read then a Tcl error is returned to describe
why the file couldn't be read.
\fBTcl_VarEvalVA\fR is the same as \fBTcl_VarEval\fR except that
instead of taking a variable number of arguments it takes an argument
list. Like \fBTcl_VarEval\fR, \fBTcl_VarEvalVA\fR is deprecated.
.SH "FLAG BITS"
Any ORed combination of the following values may be used for the
\fIflags\fR argument to procedures such as \fBTcl_EvalObjEx\fR:
.TP 23
\fBTCL_EVAL_DIRECT\fR
This flag is only used by \fBTcl_EvalObjEx\fR; it is ignored by
other procedures. If this flag bit is set, the script is not
compiled to bytecodes; instead it is executed directly
as is done by \fBTcl_EvalEx\fR. The
\fBTCL_EVAL_DIRECT\fR flag is useful in situations where the
contents of an object are going to change immediately, so the
bytecodes won't be reused in a future execution. In this case,
it's faster to execute the script directly.
.TP 23
\fBTCL_EVAL_GLOBAL\fR
If this flag is set, the script is processed at global level. This
means that it is evaluated in the global namespace and its variable
context consists of global variables only (it ignores any Tcl
procedures at are active).
.SH "MISCELLANEOUS DETAILS"
.PP
During the processing of a Tcl command it is legal to make nested
calls to evaluate other commands (this is how procedures and
some control structures are implemented).
If a code other than \fBTCL_OK\fR is returned
from a nested \fBTcl_Eval\fR invocation,
from a nested \fBTcl_EvalObjEx\fR invocation,
then the caller should normally return immediately,
passing that same return code back to its caller,
and so on until the top-level application is reached.
@@ -94,21 +179,18 @@ A few commands, like \fBfor\fR, will check for certain
return codes, like \fBTCL_BREAK\fR and \fBTCL_CONTINUE\fR, and process them
specially without returning.
.PP
\fBTcl_Eval\fR keeps track of how many nested \fBTcl_Eval\fR
\fBTcl_EvalObjEx\fR keeps track of how many nested \fBTcl_EvalObjEx\fR
invocations are in progress for \fIinterp\fR.
If a code of \fBTCL_RETURN\fR, \fBTCL_BREAK\fR, or \fBTCL_CONTINUE\fR is
about to be returned from the topmost \fBTcl_Eval\fR
about to be returned from the topmost \fBTcl_EvalObjEx\fR
invocation for \fIinterp\fR,
it converts the return code to \fBTCL_ERROR\fR
and sets \fIinterp->result\fR
to point to an error message indicating that
and sets \fIinterp\fR's result to an error message indicating that
the \fBreturn\fR, \fBbreak\fR, or \fBcontinue\fR command was
invoked in an inappropriate place.
This means that top-level applications should never see a return code
from \fBTcl_Eval\fR other then \fBTCL_OK\fR or \fBTCL_ERROR\fR.
.SH "SEE ALSO"
Tcl_EvalObj, Tcl_GlobalEvalObj
from \fBTcl_EvalObjEx\fR other then \fBTCL_OK\fR or \fBTCL_ERROR\fR.
.VE
.SH KEYWORDS
command, execute, file, global, object, object result, variable
execute, file, global, object, result, script
-91
View File
@@ -1,91 +0,0 @@
'\"
'\" Copyright (c) 1996-1997 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" SCCS: @(#) EvalObj.3 1.4 97/01/22 15:18:44
'\"
.so man.macros
.TH Tcl_EvalObj 3 8.0 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_EvalObj, Tcl_GlobalEvalObj \- execute Tcl commands
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
.sp
int
\fBTcl_EvalObj\fR(\fIinterp, objPtr\fR)
.sp
int
\fBTcl_GlobalEvalObj\fR(\fIinterp, objPtr\fR)
.SH ARGUMENTS
.AS Tcl_Interp **termPtr;
.AP Tcl_Interp *interp in
Interpreter in which to execute the command.
The command's result will be stored in the interpreter's result object
and can be retrieved using \fBTcl_GetObjResult\fR.
.AP Tcl_Obj *objPtr in
A Tcl object containing a command string
(or sequence of commands in a string) to execute.
.BE
.SH DESCRIPTION
.PP
These two procedures execute Tcl commands.
\fBTcl_EvalObj\fR is the core procedure
and is used by \fBTcl_GlobalEvalObj\fR.
It executes the commands in the script held by \fIobjPtr\fR
until either an error occurs or it reaches the end of the script.
If this is the first time \fIobjPtr\fR has been executed,
its commands are compiled into bytecode instructions
that are then executed if there are no compilation errors.
.PP
The return value from \fBTcl_EvalObj\fR is one of the Tcl return codes
\fBTCL_OK\fR, \fBTCL_ERROR\fR, \fBTCL_RETURN\fR, \fBTCL_BREAK\fR, or
\fBTCL_CONTINUE\fR,
and a result object containing additional information
(a result value or error message)
that can be retrieved using \fBTcl_GetObjResult\fR.
If an error occurs during compilation, this return information
describes the error.
Otherwise, this return information corresponds to the last command
executed from \fIobjPtr\fR.
.PP
\fBTcl_GlobalEvalObj\fR is similar to \fBTcl_EvalObj\fR except that it
processes the command at global level.
This means that the variable context for the command consists of
global variables only (it ignores any Tcl procedure that is active).
This produces an effect similar to the Tcl command ``\fBuplevel 0\fR''.
.PP
During the processing of a Tcl command it is legal to make nested
calls to evaluate other commands (this is how procedures and
some control structures are implemented).
If a code other than \fBTCL_OK\fR is returned
from a nested \fBTcl_EvalObj\fR invocation,
then the caller should normally return immediately,
passing that same return code back to its caller,
and so on until the top-level application is reached.
A few commands, like \fBfor\fR, will check for certain
return codes, like \fBTCL_BREAK\fR and \fBTCL_CONTINUE\fR, and process them
specially without returning.
.PP
\fBTcl_EvalObj\fR keeps track of how many nested \fBTcl_EvalObj\fR
invocations are in progress for \fIinterp\fR.
If a code of \fBTCL_RETURN\fR, \fBTCL_BREAK\fR, or \fBTCL_CONTINUE\fR is
about to be returned from the topmost \fBTcl_EvalObj\fR
invocation for \fIinterp\fR,
it converts the return code to \fBTCL_ERROR\fR
and sets the interpreter's result object
to point to an error message indicating that
the \fBreturn\fR, \fBbreak\fR, or \fBcontinue\fR command was
invoked in an inappropriate place.
This means that top-level applications should never see a return code
from \fBTcl_EvalObj\fR other then \fBTCL_OK\fR or \fBTCL_ERROR\fR.
.SH "SEE ALSO"
Tcl_GetObjResult, Tcl_SetObjResult
.SH KEYWORDS
command, execute, file, global, object, object result, variable
+37 -9
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.
'\"
'\" SCCS: @(#) Exit.3 1.8 96/12/10 07:37:23
'\" RCS: @(#) $Id: Exit.3,v 1.3 1999/04/16 00:46:31 stanton Exp $
'\"
.so man.macros
.TH Tcl_Exit 3 7.7 Tcl "Tcl Library Procedures"
.TH Tcl_Exit 3 8.1 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_Exit, Tcl_Finalize, Tcl_CreateExitHandler, Tcl_DeleteExitHandler \- end the application (and invoke exit handlers)
Tcl_Exit, Tcl_Finalize, Tcl_FinalizeThread, Tcl_CreateExitHandler, Tcl_DeleteExitHandler, Tcl_CreateThreadExitHandler, Tcl_DeleteThreadExitHandler \- end the application or thread (and invoke exit handlers)
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
@@ -22,10 +22,19 @@ Tcl_Exit, Tcl_Finalize, Tcl_CreateExitHandler, Tcl_DeleteExitHandler \- end the
\fBTcl_CreateExitHandler\fR(\fIproc, clientData\fR)
.sp
\fBTcl_DeleteExitHandler\fR(\fIproc, clientData\fR)
.sp
\fBTcl_ExitThread\fR(\fIstatus\fR)
.sp
\fBTcl_FinalizeThread\fR()
.sp
\fBTcl_CreateThreadExitHandler\fR(\fIproc, clientData\fR)
.sp
\fBTcl_DeleteThreadExitHandler\fR(\fIproc, clientData\fR)
.SH ARGUMENTS
.AS Tcl_ExitProc clientData
.AP int status in
Provides information about why application exited. Exact meaning may
Provides information about why the application or thread exited.
Exact meaning may
be platform-specific. 0 usually means a normal exit, any nonzero value
usually means that an error occurred.
.AP Tcl_ExitProc *proc in
@@ -51,7 +60,6 @@ otherwise causes the application to terminate without calling
\fBTcl_Exit\fR internally invokes the \fBexit\fR system call, thus it never
returns control to its caller.
.PP
.VS
\fBTcl_Finalize\fR is similar to \fBTcl_Exit\fR except that it does not
exit from the current process.
It is useful for cleaning up when a process is finished using \fBTcl\fR but
@@ -64,10 +72,20 @@ However, to ensure portability, your code should always invoke
\fBTcl_Finalize\fR when \fBTcl\fR is being unloaded, to ensure that the
code will work on all platforms. \fBTcl_Finalize\fR can be safely called
more than once.
.PP
.VS
\fBTcl_ExitThread\fR is used to terminate the current thread and invoke
per-thread exit handlers. This finalization is done by
\fBTcl_FinalizeThread\fR, which you can call if you just want to clean
up per-thread state and invoke the thread exit handlers.
\fBTcl_Finalize\fR calls \fBTcl_FinalizeThread\fR for the current
thread automatically.
.VE
.PP
\fBTcl_CreateExitHandler\fR arranges for \fIproc\fR to be invoked
by \fBTcl_Finalize\fR and \fBTcl_Exit\fR.
\fBTcl_CreateThreadExitHandler\fR arranges for \fIproc\fR to be invoked
by \fBTcl_FinalizeThread\fR and \fBTcl_ExitThread\fR.
This provides a hook for cleanup operations such as flushing buffers
and freeing global memory.
\fIProc\fR should match the type \fBTcl_ExitProc\fR:
@@ -76,16 +94,18 @@ typedef void Tcl_ExitProc(ClientData \fIclientData\fR);
.CE
The \fIclientData\fR parameter to \fIproc\fR is a
copy of the \fIclientData\fR argument given to
\fBTcl_CreateExitHandler\fR when the callback
\fBTcl_CreateExitHandler\fR or \fBTcl_CreateThreadExitHandler\fR when
the callback
was created. Typically, \fIclientData\fR points to a data
structure containing application-specific information about
what to do in \fIproc\fR.
.PP
\fBTcl_DeleteExitHandler\fR may be called to delete a
\fBTcl_DeleteExitHandler\fR and \fBTcl_DeleteThreadExitHandler\fR may be
called to delete a
previously-created exit handler. It removes the handler
indicated by \fIproc\fR and \fIclientData\fR so that no call
to \fIproc\fR will be made. If no such handler exists then
\fBTcl_DeleteExitHandler\fR does nothing.
\fBTcl_DeleteExitHandler\fR or \fBTcl_DeleteThreadExitHandler\fR does nothing.
.PP
.VS
.PP
@@ -98,6 +118,14 @@ If extension \fBA\fR registers its exit handlers before loading extension
\fBB\fR, this ensures that any exit handlers for \fBB\fR will be executed
before the exit handlers for \fBA\fR.
.VE
.VS
.PP
\fBTcl_Finalize\fR and \fBTcl_Exit\fR call \fBTcl_FinalizeThread\fR
and the thread exit handlers \fIafter\fR
the process-wide exit handlers. This is because thread finalization shuts
down the I/O channel system, so any attempt at I/O by the global exit
handlers will vanish into the bitbucket.
.VE
.SH KEYWORDS
callback, cleanup, dynamic loading, end application, exit, unloading
callback, cleanup, dynamic loading, end application, exit, unloading, thread
+1 -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.
'\"
'\" SCCS: @(#) ExprLong.3 1.26 97/06/26 13:42:47
'\" RCS: @(#) $Id: ExprLong.3,v 1.2 1998/09/14 18:39:48 stanton Exp $
'\"
.so man.macros
.TH Tcl_ExprLong 3 7.0 Tcl "Tcl Library Procedures"
+1 -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.
'\"
'\" SCCS: @(#) ExprLongObj.3 1.6 97/06/26 13:41:12
'\" RCS: @(#) $Id: ExprLongObj.3,v 1.2 1998/09/14 18:39:48 stanton Exp $
'\"
.so man.macros
.TH Tcl_ExprLongObj 3 8.0 Tcl "Tcl Library Procedures"
+15 -5
View File
@@ -4,19 +4,22 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" SCCS: @(#) FindExec.3 1.4 96/10/09 08:29:29
'\" RCS: @(#) $Id: FindExec.3,v 1.3 1998/09/14 18:39:48 stanton Exp $
'\"
.so man.macros
.TH Tcl_FindExecutable 3 7.5 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_FindExecutable \- identify the binary file containing the application
Tcl_FindExecutable, Tcl_GetNameOfExecutable \- identify or return the name of the binary file containing the application
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
.sp
char *
\fBTcl_FindExecutable\fR(\fIargv0\fR)
.sp
CONST char *
\fBTcl_GetNameOfExecutable\fR()
.SH ARGUMENTS
.AS char *argv0 in
.AP char *argv0 in
@@ -26,9 +29,9 @@ application's name.
.SH DESCRIPTION
.PP
This procedure computes the full path name of the executable file
from which the application was invoked and saves it for Tcl's
internal use.
The \fBTcl_FindExecutable\fR procedure computes the full path name of
the executable file from which the application was invoked and saves
it for Tcl's internal use.
The executable's path name is needed for several purposes in
Tcl. For example, it is needed on some platforms in the
implementation of the \fBload\fR command.
@@ -41,6 +44,13 @@ 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
will return an empty string.
.PP
\fBTcl_GetNameOfExecutable\fR simply returns a pointer to the
internal full path name of the executable file as computed by
\fBTcl_FindExecutable\fR. This procedure call is the C API
equivalent to the \fBinfo nameofexecutable\fR command. NULL
is returned if the internal full path name has not been
computed or unknown.
.SH KEYWORDS
binary, executable file
Executable
+54
View File
@@ -0,0 +1,54 @@
'\"
'\" Copyright (c) 1998-1999 Scriptics Corportation
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: GetCwd.3,v 1.2 1999/04/16 00:46:31 stanton Exp $
'\"
.so man.macros
.TH Tcl_GetCwd 3 8.1 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_GetCwd, Tcl_Chdir \- manipulate the current working directory
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
.sp
char *
\fBTcl_GetCwd\fR(\fIinterp\fR, \fIbufferPtr\fR)
.sp
int
\fBTcl_Chdir\fR(\fIpath\fR)
.SH ARGUMENTS
.AS Tcl_DString *bufferPtr
.AP Tcl_Interp *interp in
Interpreter in which to report an error, if any.
.AP Tcl_DString *bufferPtr in/out
This dynamic string is used to store the current working directory.
At the time of the call it should be uninitialized or free. The
caller must eventually call \fBTcl_DStringFree\fR to free up
anything stored here.
.AP char *path in
File path in UTF\-8 format.
.BE
.SH DESCRIPTION
.PP
These procedures may be used to manipulate the current working
directory for the application. They provide C\-level access to
the same functionality as the Tcl \fBpwd\fR command.
.PP
\fBTcl_GetCwd\fR returns a pointer to a string specifying the current
directory, or NULL if the current directory could not be determined.
If NULL is returned, an error message is left in the interp's result.
Storage for the result string is allocated in bufferPtr; the caller
must call \fBTcl_DStringFree()\fR when the result is no longer needed.
The format of the path is UTF\-8.
.PP
\fBTcl_Chdir\fR changes the applications current working directory to
the value specified in \fIpath\fR. The format of the passed in string
must be UTF\-8. The function returns -1 on error or 0 on success.
.SH KEYWORDS
pwd
+28
View File
@@ -0,0 +1,28 @@
'\"
'\" Copyright (c) 1998-2000 by Scriptics Corporation.
'\" All rights reserved.
'\"
'\" RCS: @(#) $Id: GetHostName.3,v 1.1 2000/01/21 18:52:07 ericm Exp $
'\"
.so man.macros
.TH Tcl_GetHostName 3 8.3 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_GetHostName \- get the name of the local host
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
.sp
char *
\fBTcl_GetHostName\fR()
.SH DESCRIPTION
.PP
\fBTcl_GetHostName\fR is a utility procedure used by some of the
Tcl commands. It returns a pointer to a string containing the name
for the current machine, or an empty string if the name cannot be
determined. The string is statically allocated, and the caller must
not modify of free it.
.PP
.SH KEYWORDS
hostname
+29 -4
View File
@@ -4,10 +4,10 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" SCCS: @(#) @(#) GetIndex.3 1.3 97/07/30 16:21:05
'\" RCS: @(#) $Id: GetIndex.3,v 1.5 1999/08/13 19:01:04 welch Exp $
'\"
.so man.macros
.TH Tcl_GetIndexFromObj 3 8.0 Tcl "Tcl Library Procedures"
.TH Tcl_GetIndexFromObj 3 8.1 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_GetIndexFromObj \- lookup string in table of keywords
@@ -16,7 +16,14 @@ Tcl_GetIndexFromObj \- lookup string in table of keywords
\fB#include <tcl.h>\fR
.sp
int
\fBTcl_GetIndexFromObj\fR(\fIinterp, objPtr, tablePtr, msg, flags, indexPtr\fR)
\fBTcl_GetIndexFromObj\fR(\fIinterp, objPtr, tablePtr, msg, flags,
indexPtr\fR)
.VS
.sp
int
\fBTcl_GetIndexFromObjStruct\fR(\fIinterp, objPtr, tablePtr, offset,
msg, flags, indexPtr\fR)
.VE
.SH ARGUMENTS
.AS Tcl_Interp **tablePtr
.AP Tcl_Interp *interp in
@@ -29,6 +36,11 @@ table entry.
.AP char **tablePtr in
An array of null-terminated strings. The end of the array is marked
by a NULL string pointer.
.VS
.AP int offset in
The offset to add to tablePtr to get to the next string in the
list. The end of the array is marked by a NULL string pointer.
.VE
.AP char *msg in
Null-terminated string describing what is being looked up, such as
\fBoption\fR. This string is included in error messages.
@@ -68,7 +80,20 @@ is invoked again with the same \fIobjPtr\fR and \fItablePtr\fR
arguments (e.g. during a reinvocation of a Tcl command), it returns
the matching index immediately without having to redo the lookup
operation. Note: \fBTcl_GetIndexFromObj\fR assumes that the entries
in \fItablePtr\fR are static: they must not change between invocations.
in \fItablePtr\fR are static: they must not change between
invocations. If the value of \fIobjPtr\fR is the empty string,
\fBTcl_GetIndexFromObj\fR will treat it as a non-matching value
and return TCL_ERROR.
.VS
.PP
\fBTcl_GetIndexFromObjStruct\fR works just like
\fBTcl_GetIndexFromObj\fR, except that instead of treating
\fItablePtr\fR as an array of string pointers, it treats it as the
first in a series of string ptrs that are spaced apart by \fIoffset\fR
bytes. This is particularly useful when processing things like
\fBTk_ConfigurationSpec\fR, whose string keys are in the same place in
each of several array elements.
.VE
.SH "SEE ALSO"
Tcl_WrongNumArgs
+1 -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.
'\"
'\" SCCS: @(#) GetInt.3 1.12 96/03/25 20:03:44
'\" RCS: @(#) $Id: GetInt.3,v 1.2 1998/09/14 18:39:48 stanton Exp $
'\"
.so man.macros
.TH Tcl_GetInt 3 "" Tcl "Tcl Library Procedures"
+1 -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.
'\"
'\" SCCS: @(#) GetOpnFl.3 1.3 97/04/23 16:14:43
'\" RCS: @(#) $Id: GetOpnFl.3,v 1.2 1998/09/14 18:39:48 stanton Exp $
.so man.macros
.TH Tcl_GetOpenFile 3 8.0 Tcl "Tcl Library Procedures"
.BS
+1 -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.
'\"
'\" @(#) GetStdChan.3 1.2 96/03/08 13:59:57
'\" RCS: @(#) $Id: GetStdChan.3,v 1.2 1998/09/14 18:39:48 stanton Exp $
'\"
.so man.macros
.TH Tcl_GetStdChannel 3 7.5 Tcl "Tcl Library Procedures"
+49
View File
@@ -0,0 +1,49 @@
'\"
'\" Copyright (c) 1999 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: GetVersion.3,v 1.2 1999/04/16 00:46:32 stanton Exp $
'\"
.so man.macros
.TH Tcl_GetVersion 3 7.5 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_GetVersion \- get the version of the library at runtime
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
.sp
\fBTcl_GetVersion\fR(\fImajor, minor, patchLevel, type\fR)
.SH ARGUMENTS
.AP int *major out
Major version number of the Tcl library.
.AP int *minor out
Minor version number of the Tcl library.
.AP int *patchLevel out
The patch level of the Tcl library (or alpha or beta number).
.AP Tcl_ReleaseType *type out
The type of release, also indicates the type of patch level. Can be
one of \fBTCL_ALPHA_RELEASE\fR, \fBTCL_BETA_RELEASE\fR, or
\fBTCL_FINAL_RELEASE\fR.
.BE
.SH DESCRIPTION
.PP
\fBTcl_GetVersion\fR should be used to query the version number
of the Tcl library at runtime. This is useful when using a
dynamically loaded Tcl library or when writing a stubs-aware
extension. For instance, if you write an extension that is
linked against the Tcl stubs library, it could be loaded into
a program linked to an older version of Tcl than you expected.
Use \fBTcl_GetVersion\fR to verify that fact, and possibly to
change the behavior of your extension.
.PP
If may pass a NULL for any of the arguments. For instance if
you do not care about the \fIpatchLevel\fR of the library, pass
a NULL for the \fIpatchLevel\fR argument.
.SH KEYWORDS
version, patchlevel, major, minor, alpha, beta, release
+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.
'\"
'\" SCCS: @(#) Hash.3 1.15 96/03/25 20:04:01
'\" RCS: @(#) $Id: Hash.3,v 1.3 1999/12/21 23:57:33 hobbs Exp $
'\"
.so man.macros
.TH Tcl_Hash 3 "" Tcl "Tcl Library Procedures"
@@ -193,7 +193,7 @@ overall information about a hash table, such as the number of
entries it contains, the number of buckets in its hash array,
and the utilization of the buckets.
It is the caller's responsibility to free the result string
by passing it to \fBfree\fR.
by passing it to \fBckfree\fR.
.PP
The header file \fBtcl.h\fR defines the actual data structures
used to implement hash tables.
+91
View File
@@ -0,0 +1,91 @@
'\"
'\" Copyright (c) 1999 Scriptics Corportation
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: InitStubs.3,v 1.4 1999/05/06 19:14:40 stanton Exp $
'\"
.so man.macros
.TH Tcl_InitStubs 3 8.1 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_InitStubs \- initialize the Tcl stubs mechanism
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
.sp
char *
\fBTcl_InitStubs\fR(\fIinterp, version, exact\fR)
.SH ARGUMENTS
.AS Tcl_Interp *interp in
.AP Tcl_Interp *interp in
Tcl interpreter handle.
.AP char *version in
A version string consisting of one or more decimal numbers
separated by dots.
.AP int exact in
Non-zero means that only the particular version specified by
\fIversion\fR is acceptable.
Zero means that versions newer than \fIversion\fR are also
acceptable as long as they have the same major version number
as \fIversion\fR.
.BE
.SH INTRODUCTION
.PP
The Tcl stubs mechanism defines a way to dynamically bind
extensions to a particular Tcl implementation at run time.
This provides two significant benefits to Tcl users:
.IP 1) 5
Extensions that use the stubs mechanism can be loaded into
multiple versions of Tcl without being recompiled or
relinked.
.IP 2) 5
Extensions that use the stubs mechanism can be dynamically
loaded into statically-linked Tcl applications.
.PP
The stubs mechanism accomplishes this by exporting function tables
that define an interface to the Tcl API. The extension then accesses
the Tcl API through offsets into the function table, so there are no
direct references to any of the Tcl library's symbols. This
redirection is transparent to the extension, so an extension writer
can continue to use all public Tcl functions as documented.
.PP
The stubs mechanism requires no changes to applications incorporating
Tcl interpreters. Only developers creating C-based Tcl extensions
need to take steps to use the stubs mechanism with their extensions.
.PP
Enabling the stubs mechanism for an extension requires the following
steps:
.IP 1) 5
Call \fBTcl_InitStubs\fR in the extension before calling any other
Tcl functions.
.IP 2) 5
Define the USE_TCL_STUBS symbol. Typically, you would include the
-DUSE_TCL_STUBS flag when compiling the extension.
.IP 3) 5
Link the extension with the Tcl stubs library instead of the standard
Tcl library. On Unix platforms, the library name is
\fIlibtclstub8.1.a\fR; on Windows platforms, the library name is
\fItclstub81.lib\fR.
.PP
If the extension also requires the Tk API, it must also call
\fBTk_InitStubs\fR to initialize the Tk stubs interface and link
with the Tk stubs libraries. See the \fBTk_InitStubs\fR page for
more information.
.SH DESCRIPTION
\fBTcl_InitStubs\fR attempts to initialize the stub table pointers
and ensure that the correct version of Tcl is loaded. In addition
to an interpreter handle, it accepts as arguments a version number
and a Boolean flag indicating whether the extension requires
an exact version match or not. If \fIexact\fR is 0, then the
extension is indicating that newer versions of Tcl are acceptable
as long as they have the same major version number as \fIversion\fR;
non-zero means that only the specified \fIversion\fR is acceptable.
\fBTcl_InitStubs\fR returns a string containing the actual version
of Tcl satisfying the request, or NULL if the Tcl version is not
acceptable, does not support stubs, or any other error condition occurred.
.SH "SEE ALSO"
\fBTk_InitStubs\fR
.SH KEYWORDS
stubs
+1 -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.
'\"
'\" SCCS: @(#) @(#) IntObj.3 1.7 97/05/08 19:49:22
'\" RCS: @(#) $Id: IntObj.3,v 1.2 1998/09/14 18:39:49 stanton Exp $
'\"
.so man.macros
.TH Tcl_IntObj 3 8.0 Tcl "Tcl Library Procedures"
+1 -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.
'\"
'\" SCCS: @(#) Interp.3 1.16 96/06/06 13:48:02
'\" RCS: @(#) $Id: Interp.3,v 1.2 1998/09/14 18:39:49 stanton Exp $
'\"
.so man.macros
.TH Tcl_Interp 3 7.5 Tcl "Tcl Library Procedures"
+1 -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.
'\"
'\" SCCS: @(#) LinkVar.3 1.15 96/09/05 17:16:57
'\" RCS: @(#) $Id: LinkVar.3,v 1.2 1998/09/14 18:39:49 stanton Exp $
'\"
.so man.macros
.TH Tcl_LinkVar 3 7.5 Tcl "Tcl Library Procedures"
+12 -14
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.
'\"
'\" SCCS: @(#) @(#) ListObj.3 1.10 97/10/08 11:36:58
'\" RCS: @(#) $Id: ListObj.3,v 1.4 2000/01/26 03:37:30 hobbs Exp $
'\"
.so man.macros
.TH Tcl_ListObj 3 8.0 Tcl "Tcl Library Procedures"
@@ -74,9 +74,7 @@ and \fBTcl_ListObjReplace\fR will insert into \fIlistPtr\fR.
For \fBTcl_SetListObj\fR,
the number of Tcl objects to insert into \fIobjPtr\fR.
.VS
.TP
Tcl_Obj *CONST \fIobjv\fR[] (in)
.
.AP Tcl_Obj "*CONST\ objv[]" in
An array of pointers to objects.
\fBTcl_NewListObj\fR will insert these objects into a new list object
and \fBTcl_ListObjReplace\fR will insert them into an existing \fIlistPtr\fR.
@@ -151,16 +149,16 @@ of the elements in \fIobjc\fR since the list object now refers to them.
The new list object returned by \fBTcl_NewListObj\fR
has reference count zero.
.PP
\fBTcl_ListObjGetElements\fR returns a count and
a pointer to an array of the elements in a list object.
It returns the count by storing it in the address \fIobjcPtr\fR.
Similarly, it returns the array pointer by storing it
in the address \fIobjvPtr\fR.
If \fIlistPtr\fR is not already a list object,
\fBTcl_ListObjGetElements\fR will attempt to convert it to one;
if the conversion fails, it returns \fBTCL_ERROR\fR
and leaves an error message in the interpreter's result object
if \fIinterp\fR is not NULL.
\fBTcl_ListObjGetElements\fR returns a count and a pointer to an array of
the elements in a list object. It returns the count by storing it in the
address \fIobjcPtr\fR. Similarly, it returns the array pointer by storing
it in the address \fIobjvPtr\fR.
The memory pointed to is managed by Tcl and should not be freed by the
caller.
If \fIlistPtr\fR is not already a list object, \fBTcl_ListObjGetElements\fR
will attempt to convert it to one; if the conversion fails, it returns
\fBTCL_ERROR\fR and leaves an error message in the interpreter's result
object if \fIinterp\fR is not NULL.
Otherwise it returns \fBTCL_OK\fR after storing the count and array pointer.
.PP
\fBTcl_ListObjLength\fR returns the number of elements in the list object
+99 -34
View File
@@ -1,36 +1,59 @@
'\"
'\" Copyright (c) 1998-1999 Scriptics Corporation
'\" Copyright (c) 1995-1997 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" SCCS: @(#) Notifier.3 1.16 97/05/17 17:03:17
'\" RCS: @(#) $Id: Notifier.3,v 1.7 1999/05/06 20:13:22 stanton Exp $
'\"
.so man.macros
.TH Notifier 3 8.0 Tcl "Tcl Library Procedures"
.TH Notifier 3 8.1 Tcl "Tcl Library Procedures"
.BS
.VS
.SH NAME
Tcl_CreateEventSource, Tcl_DeleteEventSource, Tcl_SetMaxBlockTime, Tcl_QueueEvent, Tcl_DeleteEvents, Tcl_WaitForEvent, Tcl_SetTimer, Tcl_ServiceAll, Tcl_ServiceEvent, Tcl_GetServiceMode, Tcl_SetServiceMode \- the event queue and notifier interfaces
Tcl_CreateEventSource, Tcl_DeleteEventSource, Tcl_SetMaxBlockTime, Tcl_QueueEvent, Tcl_ThreadQueueEvent, Tcl_ThreadAlert, Tcl_GetCurrentThread, Tcl_DeleteEvents, Tcl_InitNotifier, Tcl_FinalizeNotifier, Tcl_WaitForEvent, Tcl_AlertNotifier, Tcl_SetTimer, Tcl_ServiceAll, Tcl_ServiceEvent, Tcl_GetServiceMode, Tcl_SetServiceMode \- the event queue and notifier interfaces
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
.sp
\fBTcl_CreateEventSource\fR(\fIsetupProc, checkProc, clientData\fB)\fR
void
\fBTcl_CreateEventSource\fR(\fIsetupProc, checkProc, clientData\fR)
.sp
\fBTcl_DeleteEventSource\fR(\fIsetupProc, checkProc, clientData\fB)\fR
void
\fBTcl_DeleteEventSource\fR(\fIsetupProc, checkProc, clientData\fR)
.sp
\fBTcl_SetMaxBlockTime\fR(\fItimePtr\fB)\fR
void
\fBTcl_SetMaxBlockTime\fR(\fItimePtr\fR)
.sp
void
\fBTcl_QueueEvent\fR(\fIevPtr, position\fR)
.VS
.VS 8.1
.sp
void
\fBTcl_ThreadQueueEvent\fR(\fIthreadId, evPtr, position\fR)
.sp
void
\fBTcl_ThreadAlert\fR(\fIthreadId, clientData\fR)
.sp
Tcl_ThreadId
\fBTcl_GetCurrentThread\fR()
.sp
void
\fBTcl_DeleteEvents\fR(\fIdeleteProc, clientData\fR)
.sp
ClientData
\fBTcl_InitNotifier\fR()
.sp
void
\fBTcl_FinalizeNotifier\fR(\fIclientData\fR)
.sp
int
\fBTcl_WaitForEvent\fR(\fItimePtr\fR)
.sp
void
\fBTcl_AlertNotifier\fR(\fIclientData\fR)
.sp
void
\fBTcl_SetTimer\fR(\fItimePtr\fR)
.sp
int
@@ -48,7 +71,6 @@ int
.SH ARGUMENTS
.AS Tcl_EventDeleteProc milliseconds
.AS Tcl_EventSetupProc *setupProc
.AP Tcl_EventSetupProc *setupProc in
Procedure to invoke to prepare for event wait in \fBTcl_DoOneEvent\fR.
.AP Tcl_EventCheckProc *checkProc in
@@ -70,12 +92,14 @@ have been allocated by the caller using \fBTcl_Alloc\fR or \fBckalloc\fR.
.AP Tcl_QueuePosition position in
Where to add the new event in the queue: \fBTCL_QUEUE_TAIL\fR,
\fBTCL_QUEUE_HEAD\fR, or \fBTCL_QUEUE_MARK\fR.
.AP Tcl_ThreadId threadId in
A unique identifier for a thread.
.AP Tcl_EventDeleteProc *deleteProc in
Procedure to invoke for each queued event in \fBTcl_DeleteEvents\fR.
.AP int flags in
What types of events to service. These flags are the same as those
passed to \fBTcl_DoOneEvent\fR.
.AP Tcl_EventDeleteProc *deleteProc in
Procedure to invoke for each queued event in \fBTcl_DeleteEvents\fR.
.VS
.VS 8.1
.AP int mode in
Inidicates whether events should be serviced by \fBTcl_ServiceAll\fR.
Must be one of \fBTCL_SERVICE_NONE\fR or \fBTCL_SERVICE_ALL\fR.
@@ -84,13 +108,11 @@ Must be one of \fBTCL_SERVICE_NONE\fR or \fBTCL_SERVICE_ALL\fR.
.SH INTRODUCTION
.PP
.VS
The interfaces described here are used to customize the Tcl event
loop. The two most common customizations are to add new sources of
events and to merge Tcl's event loop with some other event loop, such
as one provided by an application in which Tcl is embedded. Each of
these tasks is described in a separate section below.
.VE
.PP
The procedures in this manual entry are the building blocks out of which
the Tcl event notifier is constructed. The event notifier is the lowest
@@ -108,18 +130,24 @@ higher-level software that they have occurred. The procedures
and \fBTcl_SetMaxBlockTime\fR, \fBTcl_QueueEvent\fR, and
\fBTcl_DeleteEvents\fR are used primarily by event sources.
.IP [2]
The event queue: there is a single queue for the whole application,
The event queue: for non-threaded applications,
there is a single queue for the whole application,
containing events that have been detected but not yet serviced. Event
sources place events onto the queue so that they may be processed in
order at appropriate times during the event loop. The event queue
guarantees a fair discipline of event handling, so that no event
source can starve the others. It also allows events to be saved for
servicing at a future time.
.VS
.VS 8.1
Threaded applications work in a
similar manner, except that there is a separate event queue for
each thread containing a Tcl interpreter.
\fBTcl_QueueEvent\fR is used (primarily
by event sources) to add events to the event queue and
\fBTcl_DeleteEvents\fR is used to remove events from the queue without
processing them.
processing them. In a threaded application, \fBTcl_QueueEvent\fR adds
an event to the current thread's queue, and \fBTcl_ThreadQueueEvent\fR
adds an event to a queue in a specific thread.
.IP [3]
The event loop: in order to detect and process events, the application
enters a loop that waits for events to occur, places them on the event
@@ -133,7 +161,9 @@ to be retargeted either for a new platform or to use an external event
loop (such as the Motif event loop, when Tcl is embedded in a Motif
application). The procedures \fBTcl_WaitForEvent\fR and
\fBTcl_SetTimer\fR are normally implemented by Tcl, but may be
replaced with new versions to retarget the notifier (the \fBTcl_Sleep\fR,
replaced with new versions to retarget the notifier (the
\fBTcl_InitNotifier\fR, \fBTcl_AlertNotifier\fR,
\fBTcl_FinalizeNotifier\fR, \fBTcl_Sleep\fR,
\fBTcl_CreateFileHandler\fR, and \fBTcl_DeleteFileHandler\fR must
also be replaced; see CREATING A NEW NOTIFIER below for details).
The procedures \fBTcl_ServiceAll\fR, \fBTcl_ServiceEvent\fR,
@@ -152,7 +182,7 @@ things:
.IP [1]
Check the event queue to see if it contains any events that can
be serviced. If so, service the first possible event, remove it
.VS
.VS 8.1
from the queue, and return. It does this by calling
\fBTcl_ServiceEvent\fR and passing in the \fIflags\fR argument.
.VE
@@ -160,7 +190,7 @@ from the queue, and return. It does this by calling
Prepare to block for an event. To do this, \fBTcl_DoOneEvent\fR
invokes a \fIsetup procedure\fR in each event source.
The event source will perform event-source specific initialization and
.VS
.VS 8.1
possibly call \fBTcl_SetMaxBlockTime\fR to limit how long
.VE
\fBTcl_WaitForEvent\fR will block if no new events occur.
@@ -228,7 +258,7 @@ request notification with a Windows event. For timer-driven event
sources such as timer events or any polled event, the event source
can call \fBTcl_SetMaxBlockTime\fR to force the application to wake
up after a specified time even if no events have occurred.
.VS
.VS 8.1
If no event source calls \fBTcl_SetMaxBlockTime\fR
then \fBTcl_WaitForEvent\fR will wait as long as necessary for an
event to occur; otherwise, it will only wait as long as the shortest
@@ -252,7 +282,7 @@ typedef struct Tcl_Time {
.CE
The \fIusec\fR field should be less than 1000000.
.PP
.VS
.VS 8.1
Information provided to \fBTcl_SetMaxBlockTime\fR
is only used for the next call to \fBTcl_WaitForEvent\fR; it is
discarded after \fBTcl_WaitForEvent\fR returns.
@@ -261,7 +291,7 @@ The next time an event wait is done each of the event sources'
setup procedures will be called again, and they can specify new
information for that event wait.
.PP
.VS
.VS 8.1
If the application uses an external event loop rather than
\fBTcl_DoOneEvent\fR, the event sources may need to call
\fBTcl_SetMaxBlockTime\fR at other times. For example, if a new event
@@ -335,7 +365,7 @@ events at the front of the queue, such as a series of
Enter and Leave events synthesized during a grab or ungrab operation
in Tk.
.PP
.VS
.VS 8.1
When it is time to handle an event from the queue (steps 1 and 4
above) \fBTcl_ServiceEvent\fR will invoke the \fIproc\fR specified
.VE
@@ -350,7 +380,7 @@ The first argument to \fIproc\fR is a pointer to the event, which will
be the same as the first argument to the \fBTcl_QueueEvent\fR call that
added the event to the queue.
The second argument to \fIproc\fR is the \fIflags\fR argument for the
.VS
.VS 8.1
current call to \fBTcl_ServiceEvent\fR; this is used by the event source
.VE
to return immediately if its events are not relevant.
@@ -361,7 +391,7 @@ Once the event source has finished handling the event it returns 1
to indicate that the event can be removed from the queue.
If for some reason the event source decides that the event cannot
be handled at this time, it may return 0 to indicate that the event
.VS
.VS 8.1
should be deferred for processing later; in this case \fBTcl_ServiceEvent\fR
.VE
will go on to the next event in the queue and attempt to service it.
@@ -374,7 +404,7 @@ Another example of deferring events happens in Tk if
\fBTk_RestrictEvents\fR has been invoked to defer certain kinds
of window events.
.PP
.VS
.VS 8.1
When \fIproc\fR returns 1, \fBTcl_ServiceEvent\fR will remove the
event from the event queue and free its storage.
Note that the storage for an event must be allocated by
@@ -382,6 +412,21 @@ the event source (using \fBTcl_Alloc\fR or the Tcl macro \fBckalloc\fR)
before calling \fBTcl_QueueEvent\fR, but it
will be freed by \fBTcl_ServiceEvent\fR, not by the event source.
.PP
Threaded applications work in a
similar manner, except that there is a separate event queue for
each thread containing a Tcl interpreter.
Calling \fBTcl_QueueEvent\fR in a multithreaded application adds
an event to the current thread's queue.
To add an event to another thread's queue, use \fBTcl_ThreadQueueEvent\fR.
\fBTcl_ThreadQueueEvent\fR accepts as an argument a Tcl_ThreadId argument,
which uniquely identifies a thread in a Tcl application. To obtain the
Tcl_ThreadID for the current thread, use the \fBTcl_GetCurrentThread\fR
procedure. (A thread would then need to pass this identifier to other
threads for those threads to be able to add events to its queue.)
After adding an event to another thread's queue, you then typically
need to call \fBTcl_ThreadAlert\fR to "wake up" that thread's notifier to
alert it to the new event.
.PP
\fBTcl_DeleteEvents\fR can be used to explicitly remove one or more
events from the event queue. \fBTcl_DeleteEvents\fR calls \fIproc\fR
for each event in the queue, deleting those for with the procedure
@@ -396,23 +441,35 @@ The \fIclientData\fR argument will be the same as the \fIclientData\fR
argument to \fBTcl_DeleteEvents\fR; it is typically used to point to
private information managed by the event source. The \fIevPtr\fR will
point to the next event in the queue.
.PP
\fBTcl_DeleteEventSource\fR deletes an event source. The \fIsetupProc\fR,
\fIcheckProc\fR, and \fIclientData\fR arguments must exactly match those
provided to the \fBTcl_CreateEventSource\fR for the event source to be deleted.
If no such source exists, \fBTcl_DeleteEventSource\fR has no effect.
.VE
.SH "CREATING A NEW NOTIFIER"
.PP
The notifier consists of all the procedures described in this manual
entry, plus \fBTcl_DoOneEvent\fR and \fBTcl_Sleep\fR, which are
.VS
.VS 8.1
available on all platforms, and \fBTcl_CreateFileHandler\fR and
\fBTcl_DeleteFileHandler\fR, which are Unix-specific. Most of these
procedures are generic, in that they are the same for all notifiers.
However, five of the procedures are notifier-dependent:
However, eight of the procedures are notifier-dependent:
\fBTcl_InitNotifier\fR, \fBTcl_AlertNotifier\fR, \fBTcl_FinalizeNotifier\fR,
\fBTcl_SetTimer\fR, \fBTcl_Sleep\fR, \fBTcl_WaitForEvent\fR,
\fBTcl_CreateFileHandler\fR and \fBTcl_DeleteFileHandler\fR. To
support a new platform or to integrate Tcl with an
application-specific event loop, you must write new versions of these
procedures.
.PP
\fBTcl_InitNotifier\fR initializes the notifier state and returns
a handle to the notifier state. Tcl calls this
procedure when intializing a Tcl interpreter. Similarly,
\fBTcl_FinalizeNotifier\fR shuts down the notifier, and is
called by \fBTcl_Finalize\fR when shutting down a Tcl interpreter.
.PP
\fBTcl_WaitForEvent\fR is the lowest-level procedure in the notifier;
it is responsible for waiting for an ``interesting'' event to occur or
for a given time to elapse. Before \fBTcl_WaitForEvent\fR is invoked,
@@ -448,6 +505,11 @@ under Unix it happens when \fBTcl_WaitForEvent\fR would have waited
forever because there were no active event sources and the timeout was
infinite.
.PP
\fBTcl_AlertNotifier\fR is used in multithreaded applications to allow
any thread to "wake up" the notifier to alert it to new events on its
queue. \fBTcl_AlertNotifier\fR requires as an argument the notifier
handle returned by \fBTcl_InitNotifier\fR.
.PP
If the notifier will be used with an external event loop, then it must
also support the \fBTcl_SetTimer\fR interface. \fBTcl_SetTimer\fR is
invoked by \fBTcl_SetMaxBlockTime\fR whenever the maximum blocking
@@ -462,10 +524,11 @@ notifier will only be used from \fBTcl_DoOneEvent\fR, then
On Unix systems, the file event source also needs support from the
notifier. The file event source consists of the
\fBTcl_CreateFileHandler\fR and \fBTcl_DeleteFileHandler\fR
procedures, which are described elsewhere.
procedures, which are described in the \fBTcl_CreateFileHandler\fR
manual page.
.PP
The \fBTcl_Sleep\fR and \fBTcl_DoOneEvent\fR interfaces are described
elsewhere.
in their respective manual pages.
.PP
The easiest way to create a new notifier is to look at the code
for an existing notifier, such as the files \fBunix/tclUnixNotfy.c\fR
@@ -532,6 +595,8 @@ mode, which should be restored when the recursive loop exits.
\fBTcl_GetServiceMode\fR returns the current value of the service
mode.
.VE
.SH "SEE ALSO"
\fBTcl_CreateFileHandler\fR, \fBTcl_DeleteFileHandler\fR, \fBTcl_Sleep\fR,
\fBTcl_DoOneEvent\fR, \fBThreads.3\fR
.SH KEYWORDS
event, notifier, event queue, event sources, file events, timer, idle, service mode
event, notifier, event queue, event sources, file events, timer, idle, service mode, threads
-162
View File
@@ -1,162 +0,0 @@
'\"
'\" Copyright (c) 1996-1997 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" SCCS: @(#) ObjSetVar.3 1.6 97/05/19 17:35:44
'\"
.so man.macros
.TH Tcl_ObjSetVar2 3 8.0 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_ObjSetVar2, Tcl_ObjGetVar2 \- manipulate Tcl variables
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
.sp
Tcl_Obj *
\fBTcl_ObjSetVar2\fR(\fIinterp, part1Ptr, part2Ptr, newValuePtr, flags\fR)
.sp
Tcl_Obj *
\fBTcl_ObjGetVar2\fR(\fIinterp, part1Ptr, part2Ptr, flags\fR)
.SH ARGUMENTS
.AS Tcl_Interp *newValuePtr
.AP Tcl_Interp *interp in
Interpreter containing variable.
.AP Tcl_Obj *part1Ptr in
Points to a Tcl object containing the variable's name.
The name may include a series of \fB::\fR namespace qualifiers
to specify a variable in a particular namespace.
May refer to a scalar variable or an element of an array variable.
.AP Tcl_Obj *part2Ptr in
If non-NULL, points to an object containing the name of an element
within an array and \fIpart1Ptr\fR must refer to an array variable.
.AP Tcl_Obj *newValuePtr in
Points to a Tcl object containing the new value for the variable.
.AP int flags in
OR-ed combination of bits providing additional information for
operation. See below for valid values.
.BE
.SH DESCRIPTION
.PP
These two procedures may be used to read and modify
Tcl variables from C code.
\fBTcl_ObjSetVar2\fR will create a new variable or modify an existing one.
It sets the specified variable to
the object referenced by \fInewValuePtr\fR
and returns a pointer to the object which is the variable's new value.
The returned object may not be the same one
referenced by \fInewValuePtr\fR;
this might happen because variable traces may modify the variable's value.
The reference count for the variable's old value is decremented
and the reference count for its new value is incremented.
If the new value for the variable
is not the same one referenced by \fInewValuePtr\fR
(perhaps as a result of a variable trace),
then \fInewValuePtr\fR's reference count is left unchanged.
The reference count for the returned object is not incremented
to reflect the returned reference.
If the caller needs to keep a reference to the object,
say in a data structure,
it must increment its reference count using \fBTcl_IncrRefCount\fR.
If an error occurs in setting the variable
(e.g. an array variable is referenced
without giving an index into the array),
then NULL is returned.
.PP
The variable name specified to \fBTcl_ObjSetVar2\fR consists of two parts.
\fIpart1Ptr\fR contains the name of a scalar or array variable.
If \fIpart2Ptr\fR is NULL, the variable must be a scalar.
If \fIpart2Ptr\fR is not NULL,
it contains the name of an element in the array named by \fIpart2Ptr\fR.
As a special case, if the flag TCL_PARSE_PART1 is specified,
\fIpart1Ptr\fR may contain both an array and an element name:
if the name contains an open parenthesis and ends with a
close parenthesis, then the value between the parentheses is
treated as an element name (which can have any string value) and
the characters before the first open
parenthesis are treated as the name of an array variable.
If the flag TCL_PARSE_PART1 is given,
\fIpart2Ptr\fR should be NULL since the array and element names
are taken from \fIpart2Ptr\fR.
.PP
The \fIflags\fR argument may be used to specify any of several
options to the procedures.
It consists of an OR-ed combination of any of the following
bits:
.TP
\fBTCL_GLOBAL_ONLY\fR
Under normal circumstances the procedures look up variables as follows:
If a procedure call is active in \fIinterp\fR,
a variable is looked up at the current level of procedure call.
Otherwise, a variable is looked up first in the current namespace,
then in the global namespace.
However, if this bit is set in \fIflags\fR then the variable
is looked up only in the global namespace
even if there is a procedure call active.
If both \fBTCL_GLOBAL_ONLY\fR and \fBTCL_NAMESPACE_ONLY\fR are given,
\fBTCL_GLOBAL_ONLY\fR is ignored.
.TP
\fBTCL_NAMESPACE_ONLY\fR
Under normal circumstances the procedures look up variables as follows:
If a procedure call is active in \fIinterp\fR,
a variable is looked up at the current level of procedure call.
Otherwise, a variable is looked up first in the current namespace,
then in the global namespace.
However, if this bit is set in \fIflags\fR then the variable
is looked up only in the current namespace
even if there is a procedure call active.
.TP
\fBTCL_LEAVE_ERR_MSG\fR
If an error is returned and this bit is set in \fIflags\fR, then
an error message will be left in the interpreter's result,
where it can be retrieved with \fBTcl_GetObjResult\fR
or \fBTcl_GetStringResult\fR.
If this flag bit isn't set then no error message is left
and the interpreter's result will not be modified.
.TP
\fBTCL_APPEND_VALUE\fR
If this bit is set then \fInewValuePtr\fR is appended to the current
value, instead of replacing it.
If the variable is currently undefined, then this bit is ignored.
.TP
\fBTCL_LIST_ELEMENT\fR
If this bit is set, then \fInewValuePtr\fR is converted to a valid
Tcl list element before setting (or appending to) the variable.
A separator space is appended before the new list element unless
the list element is going to be the first element in a list or
sublist (i.e. the variable's current value is empty, or contains
the single character ``{'', or ends in `` }'').
.TP
\fBTCL_PARSE_PART1\fR
If this bit is set,
then \fBTcl_ObjGetVar2\fR and \fBTcl_ObjSetVar2\fR
will parse \fIpart1Ptr\fR
to obtain both an array name and an element name.
If the name in \fIpart1Ptr\fR contains an open parenthesis
and ends with a close parenthesis,
the name is treated as the name of an element of an array;
otherwise, the name in \fIpart1Ptr\fR
is interpreted as the name of a scalar variable.
When this bit is set,
\fIpart2Ptr\fR is ignored.
.PP
\fBTcl_ObjGetVar2\fR returns the value of the specified variable.
Its arguments are treated the same way as those for \fBTcl_ObjSetVar2\fR.
It returns a pointer to the object which is the variable's value.
The reference count for the returned object is not incremented.
If the caller needs to keep a reference to the object,
say in a data structure,
it must increment the reference count using \fBTcl_IncrRefCount\fR.
If an error occurs in setting the variable
(e.g. an array variable is referenced
without giving an index into the array),
then NULL is returned.
.SH "SEE ALSO"
Tcl_GetObjResult, Tcl_GetStringResult, Tcl_GetVar, Tcl_GetVar2, Tcl_SetVar, Tcl_SetVar2, Tcl_TraceVar, Tcl_UnsetVar, Tcl_UnsetVar2
.SH KEYWORDS
array, interpreter, object, scalar, set, unset, variable
+8 -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.
'\"
'\" SCCS: @(#) @(#) Object.3 1.10 97/07/22 11:40:10
'\" RCS: @(#) $Id: Object.3,v 1.4 1999/08/09 16:30:34 hobbs Exp $
'\"
.so man.macros
.TH Tcl_Obj 3 8.0 Tcl "Tcl Library Procedures"
@@ -85,7 +85,7 @@ Because of this representation invalidation and regeneration,
it is dangerous for extension writers to access
\fBTcl_Obj\fR fields directly.
It is better to access Tcl_Obj information using
procedures like \fBTcl_GetStringFromObj\fR.
procedures like \fBTcl_GetStringFromObj\fR and \fBTcl_GetString\fR.
.PP
Objects are allocated on the heap
and are referenced using a pointer to their \fBTcl_Obj\fR structure.
@@ -138,7 +138,7 @@ The byte array must always have a null after the last byte,
at offset \fIlength\fR;
this allows string representations that do not contain nulls
to be treated as conventional null-terminated C strings.
C programs use \fBTcl_GetStringFromObj\fR to get
C programs use \fBTcl_GetStringFromObj\fR and \fBTcl_GetString\fR to get
an object's string representation.
If \fIbytes\fR is NULL,
the string representation is invalid.
@@ -177,7 +177,8 @@ An object typically starts out containing only a string representation:
it is untyped and has a NULL \fItypePtr\fR.
An object containing an empty string or a copy of a specified string
is created using \fBTcl_NewObj\fR or \fBTcl_NewStringObj\fR respectively.
An object's string value is gotten with \fBTcl_GetStringFromObj\fR
An object's string value is gotten with
\fBTcl_GetStringFromObj\fR or \fBTcl_GetString\fR
and changed with \fBTcl_SetStringObj\fR.
If the object is later passed to a procedure like \fBTcl_GetIntFromObj\fR
that requires a specific internal representation,
@@ -187,7 +188,7 @@ An object's two representations are duals of each other:
changes made to one are reflected in the other.
For example, \fBTcl_ListObjReplace\fR will modify an object's
internal representation and the next call to \fBTcl_GetStringFromObj\fR
will reflect that change.
or \fBTcl_GetString\fR will reflect that change.
.PP
Representations are recomputed lazily for efficiency.
A change to one representation made by a procedure
@@ -208,7 +209,7 @@ free any storage associated with the old string representation.
Objects usually remain one type over their life,
but occasionally an object must be converted from one type to another.
For example, a C program might build up a string in an object
with repeated calls to \fBTcl_StringObjAppend\fR,
with repeated calls to \fBTcl_AppendToObj\fR,
and then call \fBTcl_ListObjIndex\fR to extract a list element from
the object.
The same object holding the same string value
@@ -292,7 +293,7 @@ reference to it from the formal parameter.
When the called procedure returns,
the interpreter calls \fBTcl_DecrRefCount\fR to decrement
each argument's reference count.
When an object's reference count drops to zero,
When an object's reference count drops less than or equal to zero,
\fBTcl_DecrRefCount\fR reclaims its storage.
Most command procedures do not have to be concerned about
reference counting since they use an object's value immediately
+1 -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.
'\"
'\" SCCS: @(#) ObjectType.3 1.8 97/04/30 15:42:29
'\" RCS: @(#) $Id: ObjectType.3,v 1.2 1998/09/14 18:39:49 stanton Exp $
'\"
.so man.macros
.TH Tcl_ObjType 3 8.0 Tcl "Tcl Library Procedures"
+209 -122
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.
'\"
'\" SCCS: @(#) OpenFileChnl.3 1.40 97/09/29 11:22:49
'\" RCS: @(#) $Id: OpenFileChnl.3,v 1.7 1999/08/21 19:40:47 hobbs Exp $
.so man.macros
.TH Tcl_OpenFileChannel 3 8.0 Tcl "Tcl Library Procedures"
.TH Tcl_OpenFileChannel 3 8.3 Tcl "Tcl Library Procedures"
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
Tcl_OpenFileChannel, Tcl_OpenCommandChannel, Tcl_MakeFileChannel, Tcl_GetChannel, Tcl_RegisterChannel, Tcl_UnregisterChannel, Tcl_Close, Tcl_Read, Tcl_Gets, Tcl_Write, Tcl_Flush, Tcl_Seek, Tcl_Tell, Tcl_Eof, Tcl_InputBlocked, Tcl_InputBuffered, Tcl_GetChannelOption, Tcl_SetChannelOption \- buffered I/O facilities using channels
Tcl_OpenFileChannel, Tcl_OpenCommandChannel, Tcl_MakeFileChannel, Tcl_GetChannel, Tcl_GetChannelNames, Tcl_GetChannelNamesEx, Tcl_RegisterChannel, Tcl_UnregisterChannel, Tcl_Close, Tcl_ReadChars, Tcl_Read, Tcl_GetsObj, Tcl_Gets, Tcl_WriteObj, Tcl_WriteChars, Tcl_Write, Tcl_Flush, Tcl_Seek, Tcl_Tell, Tcl_GetChannelOption, Tcl_SetChannelOption, Tcl_Eof, Tcl_InputBlocked, Tcl_InputBuffered \- buffered I/O facilities using channels
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
@@ -22,7 +22,7 @@ Tcl_Channel
.sp
Tcl_Channel
\fBTcl_OpenCommandChannel\fR(\fIinterp, argc, argv, flags\fR)
.VS
.VS 8.0
.sp
Tcl_Channel
\fBTcl_MakeFileChannel\fR(\fIhandle, readOrWrite\fR)
@@ -30,6 +30,14 @@ Tcl_Channel
.sp
Tcl_Channel
\fBTcl_GetChannel\fR(\fIinterp, channelName, modePtr\fR)
.VS 8.3
.sp
int
\fBTcl_GetChannelNames\fR(\fIinterp\fR)
.sp
int
\fBTcl_GetChannelNamesEx\fR(\fIinterp, pattern\fR)
.VE
.sp
void
\fBTcl_RegisterChannel\fR(\fIinterp, channel\fR)
@@ -40,17 +48,28 @@ int
int
\fBTcl_Close\fR(\fIinterp, channel\fR)
.sp
.VS 8.1
int
\fBTcl_Read\fR(\fIchannel, buf, toRead\fR)
\fBTcl_ReadChars\fR(\fIchannel, readObjPtr, charsToRead, appendFlag\fR)
.sp
int
\fBTcl_Gets\fR(\fIchannel, lineRead\fR)
\fBTcl_Read\fR(\fIchannel, byteBuf, bytesToRead\fR)
.sp
int
\fBTcl_GetsObj\fR(\fIchannel, lineObjPtr\fR)
.sp
int
\fBTcl_Write\fR(\fIchannel, buf, toWrite\fR)
\fBTcl_Gets\fR(\fIchannel, lineRead\fR)
.sp
int
\fBTcl_WriteObj\fR(\fIchannel, writeObjPtr\fR)
.sp
int
\fBTcl_WriteChars\fR(\fIchannel, charBuf, bytesToWrite\fR)
.sp
int
\fBTcl_Write\fR(\fIchannel, byteBuf, bytesToWrite\fR)
.VE
.sp
int
\fBTcl_Flush\fR(\fIchannel\fR)
@@ -83,37 +102,36 @@ Used for error reporting and to look up a channel registered in it.
.AP char *fileName in
The name of a local or network file.
.AP char *mode in
Specifies how the file is to be accessed. May have any of the
values allowed for the \fImode\fR argument to the Tcl
\fBopen\fR command.
For \fBTcl_OpenCommandChannel\fR, may be NULL.
Specifies how the file is to be accessed. May have any of the values
allowed for the \fImode\fR argument to the Tcl \fBopen\fR command. For
\fBTcl_OpenCommandChannel\fR, may be NULL.
.AP int permissions in
POSIX-style permission flags such as 0644.
If a new file is created, these permissions will be set on the
created file.
POSIX-style permission flags such as 0644. If a new file is created, these
permissions will be set on the created file.
.AP int argc in
The number of elements in \fIargv\fR.
.AP char **argv in
Arguments for constructing a command pipeline.
These values have the same meaning as the non-switch arguments
to the Tcl \fBexec\fR command.
Arguments for constructing a command pipeline. These values have the same
meaning as the non-switch arguments to the Tcl \fBexec\fR command.
.AP int flags in
Specifies the disposition of the stdio handles in pipeline: OR-ed
combination of \fBTCL_STDIN\fR, \fBTCL_STDOUT\fR, \fBTCL_STDERR\fR,
and \fBTCL_ENFORCE_MODE\fR. If \fBTCL_STDIN\fR is set, stdin for
the first child in the pipe is the pipe channel, otherwise it is the same
as the standard input of the invoking process; likewise for
\fBTCL_STDOUT\fR and \fBTCL_STDERR\fR. If \fBTCL_ENFORCE_MODE\fR is not set,
then the pipe can redirect stdio handles to override the stdio handles for
which \fBTCL_STDIN\fR, \fBTCL_STDOUT\fR and \fBTCL_STDERR\fR have been set.
If it is set, then such redirections cause an error.
.VS
combination of \fBTCL_STDIN\fR, \fBTCL_STDOUT\fR, \fBTCL_STDERR\fR, and
\fBTCL_ENFORCE_MODE\fR. If \fBTCL_STDIN\fR is set, stdin for the first child
in the pipe is the pipe channel, otherwise it is the same as the standard
input of the invoking process; likewise for \fBTCL_STDOUT\fR and
\fBTCL_STDERR\fR. If \fBTCL_ENFORCE_MODE\fR is not set, then the pipe can
redirect stdio handles to override the stdio handles for which
\fBTCL_STDIN\fR, \fBTCL_STDOUT\fR and \fBTCL_STDERR\fR have been set. If it
is set, then such redirections cause an error.
.VS 8.0
.AP ClientData handle in
Operating system specific handle for I/O to a file. For Unix this is a
file descriptor, for Windows it is a HANDLE.
.AP int readOrWrite in
OR-ed combination of \fBTCL_READABLE\fR and \fBTCL_WRITABLE\fR to indicate
what operations are valid on \fIhandle\fR.
.AP char *channelName in
The name of the channel.
.VE
.AP int *modePtr out
Points at an integer variable that will receive an OR-ed combination of
@@ -122,26 +140,40 @@ open for reading and writing.
.AP Tcl_Channel channel in
A Tcl channel for input or output. Must have been the return value
from a procedure such as \fBTcl_OpenFileChannel\fR.
.AP char *buf in
An array of bytes in which to store channel input, or from which
to read channel output.
.AP int len in
The length of the input or output.
.AP int atEnd in
If nonzero, store the input at the end of the input queue, otherwise store
it at the head of the input queue.
.AP int toRead in
The number of bytes to read from the channel.
.AP Tcl_DString *lineRead in
A pointer to a Tcl dynamic string in which to store the line read from the
channel. Must have been initialized by the caller. The line read
will be appended to any data already in the dynamic string.
.AP Tcl_Obj *linePtrObj in
.VS 8.1 br
.AP Tcl_Obj *readObjPtr in/out
A pointer to a Tcl Object in which to store the characters read from the
channel.
.AP int charsToRead in
The number of characters to read from the channel. If the channel's encoding
is \fBbinary\fR, this is equivalent to the number of bytes to read from the
channel.
.AP int appendFlag in
If non-zero, data read from the channel will be appended to the object.
Otherwise, the data will replace the existing contents of the object.
.AP char *readBuf out
A buffer in which to store the bytes read from the channel.
.AP int bytesToRead in
The number of bytes to read from the channel. The buffer \fIreadBuf\fR must
be large enough to hold this many bytes.
.AP Tcl_Obj *lineObjPtr in/out
A pointer to a Tcl object in which to store the line read from the
channel. The line read will be appended to the current value of the
object.
.AP int toWrite in
The number of bytes to read from \fIbuf\fR and output to the channel.
.AP Tcl_DString *lineRead in/out
A pointer to a Tcl dynamic string in which to store the line read from the
channel. Must have been initialized by the caller. The line read will be
appended to any data already in the dynamic string.
.AP Tcl_Obj *writeObjPtr in
A pointer to a Tcl Object whose contents will be output to the channel.
.AP "CONST char" *charBuf in
A buffer containing the characters to output to the channel.
.AP char *byteBuf in
A buffer containing the bytes to output to the channel.
.AP int bytesToWrite in
The number of bytes to consume from \fIcharBuf\fR or \fIbyteBuf\fR and
output to the channel.
.VE
.AP int offset in
How far to move the access point in the channel at which the next input or
output operation will be applied, measured in bytes from the position
@@ -158,6 +190,10 @@ Where to store the value of an option or a list of all options and their
values. Must have been initialized by the caller.
.AP char *newValue in
New value for the option given by \fIoptionName\fR.
.VS 8.3
.AP char *pattern in
The pattern to match on, passed to Tcl_StringMatch, or NULL.
.VE
.BE
.SH DESCRIPTION
@@ -169,7 +205,7 @@ types.
The channel mechanism is extensible to new channel types, by
providing a low level channel driver for the new type; the channel driver
interface is described in the manual entry for \fBTcl_CreateChannel\fR. The
channel mechanism provides a buffering scheme modelled after
channel mechanism provides a buffering scheme modeled after
Unix's standard I/O, and it also allows for nonblocking I/O on
channels.
.PP
@@ -182,7 +218,7 @@ channels, see the manual entry for \fBTcl_CreateChannel\fR.
.PP
\fBTcl_OpenFileChannel\fR opens a file specified by \fIfileName\fR and
returns a channel handle that can be used to perform input and output on
the file. This API is modelled after the \fBfopen\fR procedure of
the file. This API is modeled after the \fBfopen\fR procedure of
the Unix standard I/O library.
The syntax and meaning of all arguments is similar to those
given in the Tcl \fBopen\fR command when opening a file.
@@ -190,7 +226,7 @@ If an error occurs while opening the channel, \fBTcl_OpenFileChannel\fR
returns NULL and records a POSIX error code that can be
retrieved with \fBTcl_GetErrno\fR.
In addition, if \fIinterp\fR is non-NULL, \fBTcl_OpenFileChannel\fR
leaves an error message in \fIinterp->result\fR after any error.
leaves an error message in \fIinterp\fR's result after any error.
.PP
The newly created channel is not registered in the supplied interpreter; to
register it, use \fBTcl_RegisterChannel\fR, described below.
@@ -255,6 +291,14 @@ the procedure returns NULL. If the \fImode\fR argument is not NULL, it
points at an integer variable that will receive an OR-ed combination of
\fBTCL_READABLE\fR and \fBTCL_WRITABLE\fR describing whether the channel is
open for reading and writing.
.PP
\fBTcl_GetChannelNames\fR and \fBTcl_GetChannelNamesEx\fR write the
names of the registered channels to the interpreter's result as a
list object. \fBTcl_GetChannelNamesEx\fR will filter these names
according to the \fIpattern\fR. If \fIpattern\fR is NULL, then it
will not do any filtering. The return value is \fBTCL_OK\fR if no
errors occured writing to the result, otherwise it is \fBTCL_ERROR\fR,
and the error message is left in the interpreter's result.
.SH TCL_REGISTERCHANNEL
.PP
@@ -306,97 +350,140 @@ If an error occurs, \fBTcl_Close\fR returns \fBTCL_ERROR\fR and records a
POSIX error code that can be retrieved with \fBTcl_GetErrno\fR.
If the channel is being closed synchronously and an error occurs during
closing of the channel and \fIinterp\fR is not NULL, an error message is
left in \fIinterp->result\fR.
left in the interpreter's result.
.PP
Note: it is not safe to call \fBTcl_Close\fR on a channel that has been
registered using \fBTcl_RegisterChannel\fR; see the documentation for
\fBTcl_RegisterChannel\fR, above, for details. If the channel has ever been
given as the \fBchan\fR argument in a call to \fBTcl_RegisterChannel\fR,
you should instead use \fBTcl_UnregisterChannel\fR, which will internally
call \fBTcl_Close\fR when all calls to \fBTcl_RegisterChannel\fR have been
matched by corresponding calls to \fBTcl_UnregisterChannel\fR.
\fBTcl_RegisterChannel\fR, above, for details. If the channel has ever
been given as the \fBchan\fR argument in a call to
\fBTcl_RegisterChannel\fR, you should instead use
\fBTcl_UnregisterChannel\fR, which will internally call \fBTcl_Close\fR
when all calls to \fBTcl_RegisterChannel\fR have been matched by
corresponding calls to \fBTcl_UnregisterChannel\fR.
.SH TCL_READ
.VS 8.1 br
.SH "TCL_READCHARS AND TCL_READ"
.PP
\fBTcl_Read\fR consumes up to \fItoRead\fR bytes of data from
\fIchannel\fR and stores it at \fIbuf\fR.
The return value of \fBTcl_Read\fR is the number of characters written
at \fIbuf\fR.
The buffer produced by \fBTcl_Read\fR is not NULL terminated. Its contents
are valid from the zeroth position up to and excluding the position
indicated by the return value.
If an error occurs, the return value is -1 and \fBTcl_Read\fR records
a POSIX error code that can be retrieved with \fBTcl_GetErrno\fR.
\fBTcl_ReadChars\fR consumes bytes from \fIchannel\fR, converting the bytes
to UTF-8 based on the channel's encoding and storing the produced data in
\fIreadObjPtr\fR's string representation. The return value of
\fBTcl_ReadChars\fR is the number of characters, up to \fIcharsToRead\fR,
that were stored in \fIobjPtr\fR. If an error occurs while reading, the
return value is \-1 and \fBTcl_ReadChars\fR records a POSIX error code that
can be retrieved with \fBTcl_GetErrno\fR.
.PP
The return value may be smaller than the value of \fItoRead\fR, indicating
that less data than requested was available, also called a \fIshort
read\fR.
In blocking mode, this can only happen on an end-of-file.
In nonblocking mode, a short read can also occur if there is not
enough input currently available: \fBTcl_Read\fR returns a short
count rather than waiting for more data.
The return value may be smaller than the value to read, indicating that less
data than requested was available. This is called a \fIshort read\fR. In
blocking mode, this can only happen on an end-of-file. In nonblocking mode,
a short read can also occur if there is not enough input currently
available: \fBTcl_ReadChars\fR returns a short count rather than waiting
for more data.
.PP
If the channel is in blocking mode, a return value of zero indicates an end
of file condition. If the channel is in nonblocking mode, a return value of
zero indicates either that no input is currently available or an end of
file condition. Use \fBTcl_Eof\fR and \fBTcl_InputBlocked\fR
to tell which of these conditions actually occurred.
If the channel is in blocking mode, a return value of zero indicates an
end-of-file condition. If the channel is in nonblocking mode, a return
value of zero indicates either that no input is currently available or an
end-of-file condition. Use \fBTcl_Eof\fR and \fBTcl_InputBlocked\fR to tell
which of these conditions actually occurred.
.PP
\fBTcl_Read\fR translates platform-specific end-of-line representations
into the canonical \fB\en\fR internal representation according to the
current end-of-line recognition mode. End-of-line recognition and the
various platform-specific modes are described in the manual entry for the
Tcl \fBfconfigure\fR command.
\fBTcl_ReadChars\fR translates the various end-of-line representations into
the canonical \fB\en\fR internal representation according to the current
end-of-line recognition mode. End-of-line recognition and the various
platform-specific modes are described in the manual entry for the Tcl
\fBfconfigure\fR command.
.PP
As a performance optimization, when reading from a channel with the encoding
\fBbinary\fR, the bytes are not converted to UTF-8 as they are read.
Instead, they are stored in \fIreadObjPtr\fR's internal representation as a
byte-array object. The string representation of this object will only be
constructed if it is needed (e.g., because of a call to
\fBTcl_GetStringFromObj\fR). In this way, byte-oriented data can be read
from a channel, manipulated by calling \fBTcl_GetByteArrayFromObj\fR and
related functions, and then written to a channel without the expense of ever
converting to or from UTF-8.
.PP
\fBTcl_Read\fR is similar to \fBTcl_ReadChars\fR, except that it doesn't do
encoding conversions, regardless of the channel's encoding. It is deprecated
and exists for backwards compatibility with non-internationalized Tcl
extensions. It consumes bytes from \fIchannel\fR and stores them in
\fIbuf\fR, performing end-of-line translations on the way. The return value
of \fBTcl_Read\fR is the number of bytes, up to \fItoRead\fR, written in
\fIbuf\fR. The buffer produced by \fBTcl_Read\fR is not NULL terminated.
Its contents are valid from the zeroth position up to and excluding the
position indicated by the return value.
.SH TCL_GETS AND TCL_GETSOBJ
.SH "TCL_GETSOBJ AND TCL_GETS"
.PP
\fBTcl_Gets\fR reads a line of input from a channel and appends all of
the characters of the line except for the terminating end-of-line character(s)
to the dynamic string given by \fIdsPtr\fR.
The end-of-line character(s) are read and discarded.
\fBTcl_GetsObj\fR consumes bytes from \fIchannel\fR, converting the bytes to
UTF-8 based on the channel's encoding, until a full line of input has been
seen. If the channel's encoding is \fBbinary\fR, each byte read from the
channel is treated as an individual Unicode character. All of the
characters of the line except for the terminating end-of-line character(s)
are appended to \fIlineObjPtr\fR's string representation. The end-of-line
character(s) are read and discarded.
.PP
If a line was successfully read, the return value is greater than or
equal to zero, and it indicates the number of characters stored
in the dynamic string.
If an error occurs, \fBTcl_Gets\fR returns -1 and records a POSIX error
code that can be retrieved with \fBTcl_GetErrno\fR.
\fBTcl_Gets\fR also returns -1 if the end of the file is reached;
the \fBTcl_Eof\fR procedure can be used to distinguish an error
from an end-of-file condition.
If a line was successfully read, the return value is greater than or equal
to zero and indicates the number of bytes stored in \fIlineObjPtr\fR. If an
error occurs, \fBTcl_GetsObj\fR returns \-1 and records a POSIX error code
that can be retrieved with \fBTcl_GetErrno\fR. \fBTcl_GetsObj\fR also
returns \-1 if the end of the file is reached; the \fBTcl_Eof\fR procedure
can be used to distinguish an error from an end-of-file condition.
.PP
If the channel is in nonblocking mode, the return value can also
be -1 if no data was available or the data that was available
did not contain an end-of-line character.
When -1 is returned, the \fBTcl_InputBlocked\fR procedure may be
invoked to determine if the channel is blocked because of input
unavailability.
If the channel is in nonblocking mode, the return value can also be \-1 if
no data was available or the data that was available did not contain an
end-of-line character. When \-1 is returned, the \fBTcl_InputBlocked\fR
procedure may be invoked to determine if the channel is blocked because
of input unavailability.
.PP
\fBTcl_GetsObj\fR is the same as \fBTcl_Gets\fR except the resulting
characters are appended to a Tcl object \fBlineObjPtr\fR rather than a
dynamic string.
.SH TCL_WRITE
\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
\fIdsPtr\fR rather than a Tcl object.
.SH "TCL_WRITECHARS, TCL_WRITEOBJ, AND TCL_WRITE"
.PP
\fBTcl_Write\fR accepts \fItoWrite\fR bytes of data at \fIbuf\fR for output
on \fIchannel\fR. This data may not appear on the output device
immediately. If the data should appear immediately, call \fBTcl_Flush\fR
after the call to \fBTcl_Write\fR, or set the \fB-buffering\fR option on
the channel to \fBnone\fR. If you wish the data to appear as soon as an end
of line is accepted for output, set the \fB\-buffering\fR option on the
channel to \fBline\fR mode.
.PP
The \fItoWrite\fR argument specifies how many bytes of data are provided in
the \fIbuf\fR argument. If it is negative, \fBTcl_Write\fR expects the data
\fBTcl_WriteChars\fR accepts \fIbytesToWrite\fR bytes of character data at
\fIcharBuf\fR. The UTF-8 characters in the buffer are converted to the
channel's encoding and queued for output to \fIchannel\fR. If
\fIbytesToWrite\fR is negative, \fBTcl_WriteChars\fR expects \fIcharBuf\fR
to be NULL terminated and it outputs everything up to the NULL.
.PP
The return value of \fBTcl_Write\fR is a count of how many
characters were accepted for output to the channel. This is either equal to
\fItoWrite\fR or -1 to indicate that an error occurred.
If an error occurs, \fBTcl_Write\fR also records a POSIX error code
that may be retrieved with \fBTcl_GetErrno\fR.
Data queued for output may not appear on the output device immediately, due
to internal buffering. If the data should appear immediately, call
\fBTcl_Flush\fR after the call to \fBTcl_WriteChars\fR, or set the
\fB\-buffering\fR option on the channel to \fBnone\fR. If you wish the data
to appear as soon as a complete line is accepted for output, set the
\fB\-buffering\fR option on the channel to \fBline\fR mode.
.PP
The return value of \fBTcl_WriteChars\fR is a count of how many bytes were
accepted for output to the channel. This is either greater than zero to
indicate success or \-1 to indicate that an error occurred. If an error
occurs, \fBTcl_WriteChars\fR records a POSIX error code that may be
retrieved with \fBTcl_GetErrno\fR.
.PP
Newline characters in the output data are translated to platform-specific
end-of-line sequences according to the \fB\-translation\fR option for
the channel.
end-of-line sequences according to the \fB\-translation\fR option for the
channel. This is done even if the channel has no encoding.
.PP
\fBTcl_WriteObj\fR is similar to \fBTcl_WriteChars\fR except it
accepts a Tcl object whose contents will be output to the channel. The
UTF-8 characters in \fIwriteObjPtr\fR's string representation are converted
to the channel's encoding and queued for output to \fIchannel\fR.
As a performance optimization, when writing to a channel with the encoding
\fBbinary\fR, UTF-8 characters are not converted as they are written.
Instead, the bytes in \fIwriteObjPtr\fR's internal representation as a
byte-array object are written to the channel. The byte-array representation
of the object will be constructed if it is needed. In this way,
byte-oriented data can be read from a channel, manipulated by calling
\fBTcl_GetByteArrayFromObj\fR and related functions, and then written to a
channel without the expense of ever converting to or from UTF-8.
.PP
\fBTcl_Write\fR is similar to \fBTcl_WriteChars\fR except that it doesn't do
encoding conversions, regardless of the channel's encoding. It is
deprecated and exists for backwards compatibility with non-internationalized
Tcl extensions. It accepts \fIbytesToWrite\fR bytes of data at
\fIbyteBuf\fR and queues them for output to \fIchannel\fR. If
\fIbytesToWrite\fR is negative, \fBTcl_Write\fR expects \fIbyteBuf\fR to be
NULL terminated and it outputs everything up to the NULL.
.VE
.SH TCL_FLUSH
.PP
@@ -419,14 +506,14 @@ data will be read or written. Buffered output is flushed to the channel and
buffered input is discarded, prior to the seek operation.
.PP
\fBTcl_Seek\fR normally returns the new access point.
If an error occurs, \fBTcl_Seek\fR returns -1 and records a POSIX error
If an error occurs, \fBTcl_Seek\fR returns \-1 and records a POSIX error
code that can be retrieved with \fBTcl_GetErrno\fR.
After an error, the access point may or may not have been moved.
.SH TCL_TELL
.PP
\fBTcl_Tell\fR returns the current access point for a channel. The returned
value is -1 if the channel does not support seeking.
value is \-1 if the channel does not support seeking.
.SH TCL_GETCHANNELOPTION
.PP
@@ -477,7 +564,7 @@ The call always returns zero if the channel is in blocking mode.
buffered in the internal buffers for a channel. If the channel is not open
for reading, this function always returns zero.
.VS
.VS 8.0
.SH "PLATFORM ISSUES"
.PP
The handles returned from \fBTcl_GetChannelHandle\fR depend on the
+1 -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.
'\"
'\" SCCS: @(#) OpenTcp.3 1.19 97/06/25 14:44:00
'\" RCS: @(#) $Id: OpenTcp.3,v 1.2 1998/09/14 18:39:49 stanton Exp $
.so man.macros
.TH Tcl_OpenTcpClient 3 8.0 Tcl "Tcl Library Procedures"
.BS
+426
View File
@@ -0,0 +1,426 @@
'\"
'\" Copyright (c) 1997 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: ParseCmd.3,v 1.3 1999/08/21 19:40:47 hobbs Exp $
'\"
.so man.macros
.TH Tcl_ParseCommand 3 8.1 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_ParseCommand, Tcl_ParseExpr, Tcl_ParseBraces, Tcl_ParseQuotedString, Tcl_ParseVarName, Tcl_FreeParse, Tcl_EvalTokens \- parse Tcl scripts and expressions
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
.sp
int
\fBTcl_ParseCommand\fR(\fIinterp, string, numBytes, nested, parsePtr\fR)
.sp
int
\fBTcl_ParseExpr\fR(\fIinterp, string, numBytes, parsePtr\fR)
.sp
int
\fBTcl_ParseBraces\fR(\fIinterp, string, numBytes, parsePtr, append, termPtr\fR)
.sp
int
\fBTcl_ParseQuotedString\fR(\fIinterp, string, numBytes, parsePtr, append, termPtr\fR)
.sp
int
\fBTcl_ParseVarName\fR(\fIinterp, string, numBytes, parsePtr, append\fR)
.sp
\fBTcl_FreeParse\fR(\fIusedParsePtr\fR)
.sp
Tcl_Obj *
\fBTcl_EvalTokens\fR(\fIinterp, tokenPtr, numTokens\fR)
.SH ARGUMENTS
.AS Tcl_Interp *usedParsePtr
.AP Tcl_Interp *interp out
For procedures other than \fBTcl_FreeParse\fR and \fBTcl_EvalTokens\fR,
used only for error reporting;
if NULL, then no error messages are left after errors.
For \fBTcl_EvalTokens\fR, determines the context for evaluating the
script and also is used for error reporting; must not be NULL.
.AP char *string in
Pointer to first character in string to parse.
.AP int numBytes in
Number of bytes in \fIstring\fR, not including any terminating null
character. If less than 0 then the script consists of all characters
in \fIstring\fR up to the first null character.
.AP int nested in
Non-zero means that the script is part of a command substitution so an
unquoted close bracket should be treated as a command terminator. If zero,
close brackets have no special meaning.
.AP int append in
Non-zero means that \fI*parsePtr\fR already contains valid tokens; the new
tokens should be appended to those already present. Zero means that
\fI*parsePtr\fR is uninitialized; any information in it is ignored.
This argument is normally 0.
.AP Tcl_Parse *parsePtr out
Points to structure to fill in with information about the parsed
command, expression, variable name, etc.
Any previous information in this structure
is ignored, unless \fIappend\fR is non-zero in a call to
\fBTcl_ParseBraces\fR, \fBTcl_ParseQuotedString\fR,
or \fBTcl_ParseVarName\fR.
.AP char **termPtr out
If not NULL, points to a location where
\fBTcl_ParseBraces\fR and \fBTcl_ParseQuotedString\fR
will store a pointer to the character
just after the terminating close-brace or close-quote (respectively)
if the parse was successful.
.AP Tcl_Parse *usedParsePtr in
Points to structure that was filled in by a previous call to
\fBTcl_ParseCommand\fR, \fBTcl_ParseExpr\fR, \fBTcl_ParseVarName\fR, etc.
.BE
.SH DESCRIPTION
.PP
These procedures parse Tcl commands or portions of Tcl commands such as
expressions or references to variables.
Each procedure takes a pointer to a script (or portion thereof)
and fills in the structure pointed to by \fIparsePtr\fR
with a collection of tokens describing the information that was parsed.
The procedures normally return \fBTCL_OK\fR.
However, if an error occurs then they return \fBTCL_ERROR\fR,
leave an error message in \fIinterp's\fR result
(if \fIinterp\fR is not NULL),
and leave nothing in \fIparsePtr\fR.
.PP
\fBTcl_ParseCommand\fR is a procedure that parses Tcl
scripts. Given a pointer to a script, it
parses the first command from the script. If the command was parsed
successfully, \fBTcl_ParseCommand\fR returns \fBTCL_OK\fR and fills in the
structure pointed to by \fIparsePtr\fR with information about the
structure of the command (see below for details).
If an error occurred in parsing the command then
\fBTCL_ERROR\fR is returned, an error message is left in \fIinterp\fR's
result, and no information is left at \fI*parsePtr\fR.
.PP
\fBTcl_ParseExpr\fR parses Tcl expressions.
Given a pointer to a script containing an expression,
\fBTcl_ParseCommand\fR parses the expression.
If the expression was parsed successfully,
\fBTcl_ParseExpr\fR returns \fBTCL_OK\fR and fills in the
structure pointed to by \fIparsePtr\fR with information about the
structure of the expression (see below for details).
If an error occurred in parsing the command then
\fBTCL_ERROR\fR is returned, an error message is left in \fIinterp\fR's
result, and no information is left at \fI*parsePtr\fR.
.PP
\fBTcl_ParseBraces\fR parses a string or command argument
enclosed in braces such as
\fB{hello}\fR or \fB{string \\t with \\t tabs}\fR
from the beginning of its argument \fIstring\fR.
The first character of \fIstring\fR must be \fB{\fR.
If the braced string was parsed successfully,
\fBTcl_ParseBraces\fR returns \fBTCL_OK\fR,
fills in the structure pointed to by \fIparsePtr\fR
with information about the structure of the string
(see below for details),
and stores a pointer to the character just after the terminating \fB}\fR
in the location given by \fI*termPtr\fR.
If an error occurrs while parsing the string
then \fBTCL_ERROR\fR is returned,
an error message is left in \fIinterp\fR's result,
and no information is left at \fI*parsePtr\fR or \fI*termPtr\fR.
.PP
\fBTcl_ParseQuotedString\fR parses a double-quoted string such as
\fB"sum is [expr $a+$b]"\fR
from the beginning of the argument \fIstring\fR.
The first character of \fIstring\fR must be \fB"\fR.
If the double-quoted string was parsed successfully,
\fBTcl_ParseQuotedString\fR returns \fBTCL_OK\fR,
fills in the structure pointed to by \fIparsePtr\fR
with information about the structure of the string
(see below for details),
and stores a pointer to the character just after the terminating \fB"\fR
in the location given by \fI*termPtr\fR.
If an error occurrs while parsing the string
then \fBTCL_ERROR\fR is returned,
an error message is left in \fIinterp\fR's result,
and no information is left at \fI*parsePtr\fR or \fI*termPtr\fR.
.PP
\fBTcl_ParseVarName\fR parses a Tcl variable reference such as
\fB$abc\fR or \fB$x([expr $index + 1])\fR from the beginning of its
\fIstring\fR argument.
The first character of \fIstring\fR must be \fB$\fR.
If a variable name was parsed successfully, \fBTcl_ParseVarName\fR
returns \fBTCL_OK\fR and fills in the structure pointed to by
\fIparsePtr\fR with information about the structure of the variable name
(see below for details). If an error
occurrs while parsing the command then \fBTCL_ERROR\fR is returned, an
error message is left in \fIinterp\fR's result (if \fIinterp\fR isn't
NULL), and no information is left at \fI*parsePtr\fR.
.PP
The information left at \fI*parsePtr\fR
by \fBTcl_ParseCommand\fR, \fBTcl_ParseExpr\fR, \fBTcl_ParseBraces\fR,
\fBTcl_ParseQuotedString\fR, and \fBTcl_ParseVarName\fR
may include dynamically allocated memory.
If these five parsing procedures return \fBTCL_OK\fR
then the caller must invoke \fBTcl_FreeParse\fR to release
the storage at \fI*parsePtr\fR.
These procedures ignore any existing information in
\fI*parsePtr\fR (unless \fIappend\fR is non-zero),
so if repeated calls are being made to any of them
then \fBTcl_FreeParse\fR must be invoked once after each call.
.PP
\fBTcl_EvalTokens\fR evaluates a sequence of parse tokens from a Tcl_Parse
structure. The tokens typically consist
of all the tokens in a word or all the tokens that make up the index for
a reference to an array variable. \fBTcl_EvalTokens\fR performs the
substitutions requested by the tokens, concatenates the
resulting values, and returns the result in a new Tcl_Obj. The
reference count of the object returned as result has been
incremented, so the caller must
invoke \fBTcl_DecrRefCount\fR when it is finished with the object.
If an error occurs while evaluating the tokens (such as a reference to
a non-existent variable) then the return value is NULL and an error
message is left in \fIinterp\fR's result.
.SH "TCL_PARSE STRUCTURE"
.PP
\fBTcl_ParseCommand\fR, \fBTcl_ParseExpr\fR, \fBTcl_ParseBraces\fR,
\fBTcl_ParseQuotedString\fR, and \fBTcl_ParseVarName\fR
return parse information in two data structures, Tcl_Parse and Tcl_Token:
.CS
typedef struct Tcl_Parse {
char *\fIcommentStart\fR;
int \fIcommentSize\fR;
char *\fIcommandStart\fR;
int \fIcommandSize\fR;
int \fInumWords\fR;
Tcl_Token *\fItokenPtr\fR;
int \fInumTokens\fR;
...
} Tcl_Parse;
typedef struct Tcl_Token {
int \fItype\fR;
char *\fIstart\fR;
int \fIsize\fR;
int \fInumComponents\fR;
} Tcl_Token;
.CE
.PP
The first five fields of a Tcl_Parse structure
are filled in only by \fBTcl_ParseCommand\fR.
These fields are not used by the other parsing procedures.
.PP
\fBTcl_ParseCommand\fR fills in a Tcl_Parse structure
with information that describes one Tcl command and any comments that
precede the command.
If there are comments,
the \fIcommentStart\fR field points to the \fB#\fR character that begins
the first comment and \fIcommentSize\fR indicates the number of bytes
in all of the comments preceding the command, including the newline
character that terminates the last comment.
If the command is not preceded by any comments, \fIcommentSize\fR is 0.
\fBTcl_ParseCommand\fR also sets the \fIcommandStart\fR field
to point to the first character of the first
word in the command (skipping any comments and leading space) and
\fIcommandSize\fR gives the total number of bytes in the command,
including the character pointed to by \fIcommandStart\fR up to and
including the newline, close bracket, or semicolon character that
terminates the command. The \fInumWords\fR field gives the
total number of words in the command.
.PP
All parsing procedures set the remaining fields,
\fItokenPtr\fR and \fInumTokens\fR.
The \fItokenPtr\fR field points to the first in an array of Tcl_Token
structures that describe the components of the entity being parsed.
The \fInumTokens\fR field gives the total number of tokens
present in the array.
Each token contains four fields.
The \fItype\fR field selects one of several token types
that are described below. The \fIstart\fR field
points to the first character in the token and the \fIsize\fR field
gives the total number of characters in the token. Some token types,
such as \fBTCL_TOKEN_WORD\fR and \fBTCL_TOKEN_VARIABLE\fR, consist of
several component tokens, which immediately follow the parent token;
the \fInumComponents\fR field describes how many of these there are.
The \fItype\fR field has one of the following values:
.TP 20
\fBTCL_TOKEN_WORD\fR
This token ordinarily describes one word of a command
but it may also describe a quoted or braced string in an expression.
The token describes a component of the script that is
the result of concatenating together a sequence of subcomponents,
each described by a separate subtoken.
The token starts with the first non-blank
character of the component (which may be a double-quote or open brace)
and includes all characters in the component up to but not including the
space, semicolon, close bracket, close quote, or close brace that
terminates the component. The \fInumComponents\fR field counts the total
number of sub-tokens that make up the word, including sub-tokens
of \fBTCL_TOKEN_VARIABLE\fR and \fBTCL_TOKEN_BS\fR tokens.
.TP
\fBTCL_TOKEN_SIMPLE_WORD\fR
This token has the same meaning as \fBTCL_TOKEN_WORD\fR, except that
the word is guaranteed to consist of a single \fBTCL_TOKEN_TEXT\fR
sub-token. The \fInumComponents\fR field is always 1.
.TP
\fBTCL_TOKEN_TEXT\fR
The token describes a range of literal text that is part of a word.
The \fInumComponents\fR field is always 0.
.TP
\fBTCL_TOKEN_BS\fR
The token describes a backslash sequence such as \fB\en\fR or \fB\e0xa3\fR.
The \fInumComponents\fR field is always 0.
.TP
\fBTCL_TOKEN_COMMAND\fR
The token describes a command whose result result must be substituted into
the word. The token includes the square brackets that surround the
command. The \fInumComponents\fR field is always 0 (the nested command
is not parsed; call \fBTcl_ParseCommand\fR recursively if you want to
see its tokens).
.TP
\fBTCL_TOKEN_VARIABLE\fR
The token describes a variable substitution, including the
\fB$\fR, variable name, and array index (if there is one) up through the
close parenthesis that terminates the index. This token is followed
by one or more additional tokens that describe the variable name and
array index. If \fInumComponents\fR is 1 then the variable is a
scalar and the next token is a \fBTCL_TOKEN_TEXT\fR token that gives the
variable name. If \fInumComponents\fR is greater than 1 then the
variable is an array: the first sub-token is a \fBTCL_TOKEN_TEXT\fR
token giving the array name and the remaining sub-tokens are
\fBTCL_TOKEN_TEXT\fR, \fBTCL_TOKEN_BS\fR, \fBTCL_TOKEN_COMMAND\fR, and
\fBTCL_TOKEN_VARIABLE\fR tokens that must be concatenated to produce the
array index. The \fInumComponents\fR field includes nested sub-tokens
that are part of \fBTCL_TOKEN_VARIABLE\fR tokens in the array index.
.TP
\fBTCL_TOKEN_SUB_EXPR\fR
The token describes one subexpression of an expression
(or an entire expression).
A subexpression may consist of a value
such as an integer literal, variable substitution,
or parenthesized subexpression;
it may also consist of an operator and its operands.
The token starts with the first non-blank character of the subexpression
up to but not including the space, brace, close-paren, or bracket
that terminates the subexpression.
This token is followed by one or more additional tokens
that describe the subexpression.
If the first sub-token after the \fBTCL_TOKEN_SUB_EXPR\fR token
is a \fBTCL_TOKEN_OPERATOR\fR token,
the subexpression consists of an operator and its token operands.
If the operator has no operands, the subexpression consists of
just the \fBTCL_TOKEN_OPERATOR\fR token.
Each operand is described by a \fBTCL_TOKEN_SUB_EXPR\fR token.
Otherwise, the subexpression is a value described by
one of the token types \fBTCL_TOKEN_WORD\fR, \fBTCL_TOKEN_TEXT\fR,
\fBTCL_TOKEN_BS\fR, \fBTCL_TOKEN_COMMAND\fR,
\fBTCL_TOKEN_VARIABLE\fR, and \fBTCL_TOKEN_SUB_EXPR\fR.
The \fInumComponents\fR field
counts the total number of sub-tokens that make up the subexpression;
this includes the sub-tokens for any nested \fBTCL_TOKEN_SUB_EXPR\fR tokens.
.TP
\fBTCL_TOKEN_OPERATOR\fR
The token describes one operator of an expression
such as \fB&&\fR or \fBhypot\fR.
An \fBTCL_TOKEN_OPERATOR\fR token is always preceeded by a
\fBTCL_TOKEN_SUB_EXPR\fR token
that describes the operator and its operands;
the \fBTCL_TOKEN_SUB_EXPR\fR token's \fInumComponents\fR field
can be used to determine the number of operands.
A binary operator such as \fB*\fR
is followed by two \fBTCL_TOKEN_SUB_EXPR\fR tokens
that describe its operands.
A unary operator like \fB-\fR
is followed by a single \fBTCL_TOKEN_SUB_EXPR\fR token
for its operand.
If the operator is a math function such as \fBlog10\fR,
the \fBTCL_TOKEN_OPERATOR\fR token will give its name and
the following \fBTCL_TOKEN_SUB_EXPR\fR tokens will describe
its operands;
if there are no operands (as with \fBrand\fR),
no \fBTCL_TOKEN_SUB_EXPR\fR tokens follow.
There is one trinary operator, \fB?\fR,
that appears in if-then-else subexpressions
such as \fIx\fB?\fIy\fB:\fIz\fR;
in this case, the \fB?\fR \fBTCL_TOKEN_OPERATOR\fR token
is followed by three \fBTCL_TOKEN_SUB_EXPR\fR tokens for the operands
\fIx\fR, \fIy\fR, and \fIz\fR.
The \fInumComponents\fR field for a \fBTCL_TOKEN_OPERATOR\fR token
is always 0.
.PP
After \fBTcl_ParseCommand\fR returns, the first token pointed to by
the \fItokenPtr\fR field of the
Tcl_Parse structure always has type \fBTCL_TOKEN_WORD\fR or
\fBTCL_TOKEN_SIMPLE_WORD\fR. It is followed by the sub-tokens
that must be concatenated to produce the value of that word.
The next token is the \fBTCL_TOKEN_WORD\fR or \fBTCL_TOKEN_SIMPLE_WORD\fR
token for the second word, followed by sub-tokens for that
word, and so on until all \fInumWords\fR have been accounted
for.
.PP
After \fBTcl_ParseExpr\fR returns, the first token pointed to by
the \fItokenPtr\fR field of the
Tcl_Parse structure always has type \fBTCL_TOKEN_SUB_EXPR\fR.
It is followed by the sub-tokens that must be evaluated
to produce the value of the expression.
Only the token information in the Tcl_Parse structure
is modified: the \fIcommentStart\fR, \fIcommentSize\fR,
\fIcommandStart\fR, and \fIcommandSize\fR fields are not modified
by \fBTcl_ParseExpr\fR.
.PP
After \fBTcl_ParseBraces\fR returns,
the array of tokens pointed to by the \fItokenPtr\fR field of the
Tcl_Parse structure will contain a single \fBTCL_TOKEN_TEXT\fR token
if the braced string does not contain any backslash-newlines.
If the string does contain backslash-newlines,
the array of tokens will contain one or more
\fBTCL_TOKEN_TEXT\fR or \fBTCL_TOKEN_BS\fR sub-tokens
that must be concatenated to produce the value of the string.
If the braced string was just \fB{}\fR
(that is, the string was empty),
the single \fBTCL_TOKEN_TEXT\fR token will have a \fIsize\fR field
containing zero;
this ensures that at least one token appears
to describe the braced string.
Only the token information in the Tcl_Parse structure
is modified: the \fIcommentStart\fR, \fIcommentSize\fR,
\fIcommandStart\fR, and \fIcommandSize\fR fields are not modified
by \fBTcl_ParseBraces\fR.
.PP
After \fBTcl_ParseQuotedString\fR returns,
the array of tokens pointed to by the \fItokenPtr\fR field of the
Tcl_Parse structure depends on the contents of the quoted string.
It will consist of one or more \fBTCL_TOKEN_TEXT\fR, \fBTCL_TOKEN_BS\fR,
\fBTCL_TOKEN_COMMAND\fR, and \fBTCL_TOKEN_VARIABLE\fR sub-tokens.
The array always contains at least one token;
for example, if the argument \fIstring\fR is empty,
the array returned consists of a single \fBTCL_TOKEN_TEXT\fR token
with a zero \fIsize\fR field.
Only the token information in the Tcl_Parse structure
is modified: the \fIcommentStart\fR, \fIcommentSize\fR,
\fIcommandStart\fR, and \fIcommandSize\fR fields are not modified.
.PP
After \fBTcl_ParseVarName\fR returns, the first token pointed to by
the \fItokenPtr\fR field of the
Tcl_Parse structure always has type \fBTCL_TOKEN_VARIABLE\fR. It
is followed by the sub-tokens that make up the variable name as
described above. The total length of the variable name is
contained in the \fIsize\fR field of the first token.
As in \fBTcl_ParseExpr\fR,
only the token information in the Tcl_Parse structure
is modified by \fBTcl_ParseVarName\fR:
the \fIcommentStart\fR, \fIcommentSize\fR,
\fIcommandStart\fR, and \fIcommandSize\fR fields are not modified.
.PP
All of the character pointers in the
Tcl_Parse and Tcl_Token structures refer
to characters in the \fIstring\fR argument passed to
\fBTcl_ParseCommand\fR, \fBTcl_ParseExpr\fR, \fBTcl_ParseBraces\fR,
\fBTcl_ParseQuotedString\fR, and \fBTcl_ParseVarName\fR.
.PP
There are additional fields in the Tcl_Parse structure after the
\fInumTokens\fR field, but these are for the private use of
\fBTcl_ParseCommand\fR, \fBTcl_ParseExpr\fR, \fBTcl_ParseBraces\fR,
\fBTcl_ParseQuotedString\fR, and \fBTcl_ParseVarName\fR; they should not be
referenced by code outside of these procedures.
.SH KEYWORDS
backslash substitution, braces, command, expression, parse, token, variable substitution
+37 -9
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.
'\"
'\" SCCS: @(#) PkgRequire.3 1.4 96/02/15 20:03:16
'\" RCS: @(#) $Id: PkgRequire.3,v 1.3 1999/03/10 05:52:45 stanton Exp $
'\"
.so man.macros
.TH Tcl_PkgRequire 3 7.5 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_PkgRequire, Tcl_PkgProvide \- package version control
Tcl_PkgRequire, Tcl_PkgRequireEx, Tcl_PkgPresent, Tcl_PkgPresentEx, Tcl_PkgProvide, Tcl_PkgProvideEx \- package version control
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
@@ -18,10 +18,22 @@ Tcl_PkgRequire, Tcl_PkgProvide \- package version control
char *
\fBTcl_PkgRequire\fR(\fIinterp, name, version, exact\fR)
.sp
char *
\fBTcl_PkgRequireEx\fR(\fIinterp, name, version, exact, clientDataPtr\fR)
.sp
char *
\fBTcl_PkgPresent\fR(\fIinterp, name, version, exact\fR)
.sp
char *
\fBTcl_PkgPresentEx\fR(\fIinterp, name, version, exact, clientDataPtr\fR)
.sp
int
\fBTcl_PkgProvide\fR(\fIinterp, name, version\fR)
.sp
int
\fBTcl_PkgProvideEx\fR(\fIinterp, name, version, clientData\fR)
.SH ARGUMENTS
.AS Tcl_FreeProc clientData
.AS Tcl_FreeProc clientDataPtr
.AP Tcl_Interp *interp in
Interpreter where package is needed or available.
.AP char *name in
@@ -35,25 +47,41 @@ Non-zero means that only the particular version specified by
Zero means that newer versions than \fIversion\fR are also
acceptable as long as they have the same major version number
as \fIversion\fR.
.AP ClientData clientData in
Arbitrary value to be associated with the package.
.AP ClientData *clientDataPtr out
Pointer to place to store the value associated with the matching
package. It is only changed if the pointer is not NULL and the
function completed successfully.
.BE
.SH DESCRIPTION
.PP
These procedures provide C-level interfaces to Tcl's package and
version management facilities.
.PP
\fBTcl_PkgRequire\fR is equivalent to the \fBpackage require\fR
command, \fBTcl_PkgPresent\fR is equivalent to the \fBpackage present\fR
command, and \fBTcl_PkgProvide\fR is equivalent to the
\fBpackage provide\fR command.
.PP
See the documentation for the Tcl commands for details on what these
procedures do.
If \fBTcl_PkgRequire\fR completes successfully it returns a pointer
to the version string for the version of the package that is provided
in the interpreter (which may be different than \fIversion\fR); if
an error occurs it returns NULL and leaves an error message in
\fIinterp->result\fR.
.PP
If \fBTcl_PkgPresent\fR or \fBTcl_PkgRequire\fR complete successfully
they return a pointer to the version string for the version of the package
that is provided in the interpreter (which may be different than
\fIversion\fR); if an error occurs they return NULL and leave an error
message in \fIinterp->result\fR.
.PP
\fBTcl_PkgProvide\fR returns TCL_OK if it completes successfully;
if an error occurs it returns TCL_ERROR and leaves an error message
in \fIinterp->result\fR.
.PP
\fBTcl_PkgProvideEx\fR, \fBTcl_PkgPresentEx\fR and \fBTcl_PkgRequireEx\fR
allow the setting and retrieving of the client data associated with
the package. In all other respects they are equivalent to the matching
functions.
.SH KEYWORDS
package, provide, require, version
package, present, provide, require, version
+1 -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.
'\"
'\" SCCS: @(#) Preserve.3 1.13 96/05/28 09:26:12
'\" RCS: @(#) $Id: Preserve.3,v 1.2 1998/09/14 18:39:49 stanton Exp $
'\"
.so man.macros
.TH Tcl_Preserve 3 7.5 Tcl "Tcl Library Procedures"
+1 -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.
'\"
'\" SCCS: @(#) PrintDbl.3 1.9 97/08/22 13:30:22
'\" RCS: @(#) $Id: PrintDbl.3,v 1.2 1998/09/14 18:39:49 stanton Exp $
'\"
.so man.macros
.TH Tcl_PrintDouble 3 8.0 Tcl "Tcl Library Procedures"
+1 -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.
'\"
'\" SCCS: SCCS: @(#) RecEvalObj.3 1.1 97/07/29 18:31:21
'\" RCS: @(#) $Id: RecEvalObj.3,v 1.2 1998/09/14 18:39:49 stanton Exp $
'\"
.so man.macros
.TH Tcl_RecordAndEvalObj 3 8.0 Tcl "Tcl Library Procedures"
+1 -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.
'\"
'\" SCCS: @(#) RecordEval.3 1.18 97/07/29 18:25:13
'\" RCS: @(#) $Id: RecordEval.3,v 1.2 1998/09/14 18:39:50 stanton Exp $
'\"
.so man.macros
.TH Tcl_RecordAndEval 3 7.4 Tcl "Tcl Library Procedures"
+242 -12
View File
@@ -1,22 +1,26 @@
'\"
'\" Copyright (c) 1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\" Copyright (c) 1998-1999 Scriptics Corportation
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" SCCS: @(#) RegExp.3 1.9 96/08/26 12:59:48
'\" RCS: @(#) $Id: RegExp.3,v 1.6 1999/12/21 23:57:33 hobbs Exp $
'\"
.so man.macros
.TH Tcl_RegExpMatch 3 7.4 Tcl "Tcl Library Procedures"
.TH Tcl_RegExpMatch 3 8.1 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_RegExpMatch, Tcl_RegExpCompile, Tcl_RegExpExec, Tcl_RegExpRange \- Pattern matching with regular expressions
Tcl_RegExpMatch, Tcl_RegExpCompile, Tcl_RegExpExec, Tcl_RegExpRange, Tcl_GetRegExpFromObj, Tcl_RegExpMatchObj, Tcl_GetRegExpInfo \- Pattern matching with regular expressions
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
.sp
int
\fBTcl_RegExpMatchObj\fR(\fIinterp\fR, \fIstrObj\fR, \fIpatObj\fR)
.sp
int
\fBTcl_RegExpMatch\fR(\fIinterp\fR, \fIstring\fR, \fIpattern\fR)
.sp
Tcl_RegExp
@@ -26,17 +30,38 @@ int
\fBTcl_RegExpExec\fR(\fIinterp\fR, \fIregexp\fR, \fIstring\fR, \fIstart\fR)
.sp
\fBTcl_RegExpRange\fR(\fIregexp\fR, \fIindex\fR, \fIstartPtr\fR, \fIendPtr\fR)
.VS 8.1
.sp
Tcl_RegExp
\fBTcl_GetRegExpFromObj\fR(\fIinterp\fR, \fIpatObj\fR, \fIcflags\fR)
.sp
int
\fBTcl_RegExpExecObj\fR(\fIinterp\fR, \fIregexp\fR, \fIobjPtr\fR, \fIoffset\fR, \fInmatches\fR, \fIeflags\fR)
.sp
\fBTcl_GetRegExpInfo\fR(\fIregexp\fR, \fIinfoPtr\fR)
.VE 8.1
.SH ARGUMENTS
.AS Tcl_Interp *interp
.AP Tcl_Interp *interp in
Tcl interpreter to use for error reporting.
Tcl interpreter to use for error reporting. The interpreter may be
NULL if no error reporting is desired.
.VS 8.1
.AP Tcl_Obj *strObj in/out
Refers to the object from which to get the string to search. The
internal representation of the object may be converted to a form that
can be efficiently searched.
.AP Tcl_Obj *patObj in/out
Refers to the object from which to get a regular expression. The
compiled regular expression is cached in the object.
.VE 8.1
.AP char *string in
String to check for a match with a regular expression.
.AP char *pattern in
String in the form of a regular expression pattern.
.AP Tcl_RegExp regexp in
Compiled regular expression. Must have been returned previously
by \fBTcl_RegExpCompile\fR.
by \fBTcl_GetRegExpFromObj\fR or \fBTcl_RegExpCompile\fR.
.AP char *start in
If \fIstring\fR is just a portion of some other string, this argument
identifies the beginning of the larger string.
@@ -52,19 +77,50 @@ NULL if there is no such range.
.AP char **endPtr out
The address of the character just after the last one in the range
is stored here, or NULL if there is no such range.
.VS 8.1
.AP int cflags in
OR-ed combination of compilation flags. See below for more information.
.AP Tcl_Obj *objPtr in/out
An object which contains the string to check for a match with a
regular expression.
.AP int offset in
The character offset into the string where matching should begin.
The value of the offset has no impact on \fB^\fR matches. This
behavior is controlled by \fIeflags\fR.
.AP int nmatches in
The number of matching subexpressions that should be remembered for
later use. If this value is 0, then no subexpression match
information will be computed. If the value is -1, then
all of the matching subexpressions will be remembered. Any other
value will be taken as the maximum number of subexpressions to
remember.
.AP int eflags in
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.
.VE 8.1
.BE
.SH DESCRIPTION
.PP
\fBTcl_RegExpMatch\fR determines whether its \fIpattern\fR argument
matches \fIregexp\fR, where \fIregexp\fR is interpreted
as a regular expression using the same rules as for the
\fBregexp\fR Tcl command.
as a regular expression using the rules in the \fBre_syntax\fR
reference page.
If there is a match then \fBTcl_RegExpMatch\fR returns 1.
If there is no match then \fBTcl_RegExpMatch\fR returns 0.
If an error occurs in the matching process (e.g. \fIpattern\fR
is not a valid regular expression) then \fBTcl_RegExpMatch\fR
returns \-1 and leaves an error message in \fIinterp->result\fR.
returns \-1 and leaves an error message in the interpreter result.
.VS 8.1.2
\fBTcl_RegExpMatchObj\fR is similar to \fBTcl_RegExpMatch\fR except it
operates on the Tcl objects \fIstrObj\fR and \fIpatObj\fR instead of
UTF strings.
\fBTcl_RegExpMatchObj\fR is generally more efficient than
\fBTcl_RegExpMatch\fR, so it is the preferred interface.
.VE 8.1.2
.PP
\fBTcl_RegExpCompile\fR, \fBTcl_RegExpExec\fR, and \fBTcl_RegExpRange\fR
provide lower-level access to the regular expression pattern matcher.
@@ -74,7 +130,7 @@ The return value is a token for this compiled form, which can be
used in subsequent calls to \fBTcl_RegExpExec\fR or \fBTcl_RegExpRange\fR.
If an error occurs while compiling the regular expression then
\fBTcl_RegExpCompile\fR returns NULL and leaves an error message
in \fIinterp->result\fR.
in the interpreter result.
Note: the return value from \fBTcl_RegExpCompile\fR is only valid
up to the next call to \fBTcl_RegExpCompile\fR; it is not safe to
retain these values for long periods of time.
@@ -84,7 +140,7 @@ It returns 1 if \fIstring\fR contains a range of characters that
match \fIregexp\fR, 0 if no match is found, and
\-1 if an error occurs.
In the case of an error, \fBTcl_RegExpExec\fR leaves an error
message in \fIinterp->result\fR.
message in the interpreter result.
When searching a string for multiple matches of a pattern,
it is important to distinguish between the start of the original
string and the start of the current search.
@@ -111,6 +167,180 @@ 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.
.PP
.VS 8.1
\fBTcl_GetRegExpFromObj\fR, \fBTcl_RegExpExecObj\fR, and
\fBTcl_GetRegExpInfo\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
internal regexp functions. These interfaces handle the details of UTF
to Unicode translations as well as providing improved performance
through caching in the pattern and string objects.
.PP
\fBTcl_GetRegExpFromObj\fR attepts to return a compiled regular
expression from the \fIpatObj\fR. If the object does not already
contain a compiled regular expression it will attempt to create one
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
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
long as the internal representation of \fIpatObj\fR refers to the
compiled form. The \fIeflags\fR argument is a bitwise OR of
zero or more of the following flags that control the compilation of
\fIpatObj\fR:
.RS 2
.TP
\fBTCL_REG_ADVANCED\fR
Compile advanced regular expressions (`AREs'). This mode corresponds to
the normal regular expression syntax accepted by the Tcl regexp and
regsub commands.
.TP
\fBTCL_REG_EXTENDED\fR
Compile extended regular expressions (`EREs'). This mode corresponds
to the regular expression syntax recognized by Tcl 8.0 and earlier
versions.
.TP
\fBTCL_REG_BASIC\fR
Compile basic regular expressions (`BREs'). This mode corresponds
to the regular expression syntax recognized by common Unix utilities
like \fBsed\fR and \fBgrep\fR. This is the default if no flags are
specified.
.TP
\fBTCL_REG_EXPANDED\fR
Compile the regular expression (basic, extended, or advanced) using an
expanded syntax that allows comments and whitespace. This mode causes
non-backslashed non-bracket-expression white
space and #-to-end-of-line comments to be ignored.
.TP
\fBTCL_REG_QUOTE\fR
Compile a literal string, with all characters treated as ordinary characters.
.TP
\fBTCL_REG_NOCASE\fR
Compile for matching that ignores upper/lower case distinctions.
.TP
\fBTCL_REG_NEWLINE\fR
Compile for newline-sensitive matching. By default, newline is a
completely ordinary character with no special meaning in either
regular expressions or strings. 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.
\fBREG_NEWLINE\fR is the bitwise OR of \fBREG_NLSTOP\fR and
\fBREG_NLANCH\fR.
.TP
\fBTCL_REG_NLSTOP\fR
Compile for partial newline-sensitive matching,
with the behavior of
`[^' bracket expressions and `.' affected,
but not the behavior of `^' and `$'. In this mode, `[^' bracket
expressions and `.' never match newline.
.TP
\fBTCL_REG_NLANCH\fR
Compile for inverse partial newline-sensitive matching,
with the behavior of
of `^' and `$' (the ``anchors'') affected, but not the behavior of
`[^' bracket expressions and `.'. In this mode `^' 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.
.TP
\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
\fBTcl_RegExpRange\fR will not report any match information.
.TP
\fBTCL_REG_CANMATCH\fR
Compile for matching that reports the potential to complete a partial
match given more text (see below).
.RE
.PP
Only one of
\fBTCL_REG_EXTENDED\fR,
\fBTCL_REG_ADVANCED\fR,
\fBTCL_REG_BASIC\fR, and
\fBTCL_REG_QUOTE\fR may be specified.
.PP
\fBTcl_RegExpExecObj\fR executes the regular expression pattern
matcher. It returns 1 if \fIobjPtr\fR contains a range of characters
that match \fIregexp\fR, 0 if no match is found, and \-1 if an error
occurs. In the case of an error, \fBTcl_RegExpExecObj\fR leaves an
error message in the interpreter result. The \fInmatches\fR value
indicates to the matcher how many subexpressions are of interest. If
\fInmatches\fR is 0, then no subexpression match information is
recorded, which may allow the matcher to make various optimizations.
If the value is -1, then all of the subexpressions in the pattern are
remembered. If the value is a positive integer, then only that number
of subexpressions will be remembered. Matching begins at the
specified Unicode character index given by \fIoffset\fR. Unlike
\fBTcl_RegExpExec\fR, the behavior of anchors is not affected by the
offset value. Instead the behavior of the anchors is explicitly
controlled by the \fIeflags\fR argument, which is a bitwise OR of
zero or more of the following flags:
.RS 2
.TP
\fBTCL_REG_NOTBOL\fR
The starting character will not be treated as the beginning of a
line or the beginning of the string, so `^' will not match there.
Note that this flag has no effect on how `\fB\eA\fR' matches.
.TP
\fBTCL_REG_NOTEOL\fR
The last character in the string will not be treated as the end of a
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
performed with a given regular expression \fIregexp\fR. The
\fIinfoPtr\fR argument contains a pointer to a structure that is
defined as follows:
.PP
.CS
typedef struct Tcl_RegExpInfo {
int \fInsubs\fR;
Tcl_RegExpIndices *\fImatches\fR;
long \fIextendStart\fR;
} Tcl_RegExpInfo;
.CE
.PP
The \fInsubs\fR field contains a count of the number of parenthesized
subexpressions within the regular expression. If the \fBTCL_REG_NOSUB\fR
was used, then this value will be zero. The \fImatches\fR field
points to an array of \fInsubs\fR values that indicate the bounds of each
subexpression matched. The first element in the array refers to the
range matched by the entire regular expression, and subsequent elements
refer to the parenthesized subexpressions in the order that they
appear in the pattern. Each element is a structure that is defined as
follows:
.PP
.CS
typedef struct Tcl_RegExpIndices {
long \fIstart\fR;
long \fIend\fR;
} Tcl_RegExpIndices;
.CE
.PP
The \fIstart\fR and \fIend\fR values are Unicode character indices
relative to the offset location within \fIobjPtr\fR where matching began.
The \fIstart\fR index identifies the first character of the matched
subexpression. The \fIend\fR index identifies the first character
after the matched subexpression. If the subexpression matched the
empty string, then \fIstart\fR and \fIend\fR will be equal. If the
subexpression did not participate in the match, then \fIstart\fR and
\fIend\fR will be set to -1.
.PP
The \fIextendStart\fR field in \fBTcl_RegExpInfo\fR is only set if the
\fBTCL_REG_CANMATCH\fR flag was used. It indicates the first
character in the string where a match could occur. If a match was
found, this will be the same as the beginning of the current match.
If no match was found, then it indicates the earliest point at which a
match might occur if additional text is appended to the string.
.VE 8.1
.SH "SEE ALSO"
re_syntax(n)
.SH KEYWORDS
match, pattern, regular expression, string, subexpression
match, pattern, regular expression, string, subexpression, Tcl_RegExpIndices, Tcl_RegExpInfo
+65
View File
@@ -0,0 +1,65 @@
'\"
'\" Copyright (c) 1997 by 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: SaveResult.3,v 1.2 1999/04/16 00:46:33 stanton Exp $
'\"
.so man.macros
.TH Tcl_SaveResult 3 8.1 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_SaveResult, Tcl_RestoreResult, Tcl_DiscardResult \- save and restore an interpreter's result
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
.sp
\fBTcl_SaveResult(\fIinterp, statePtr\fB)\fR
.sp
\fBTcl_RestoreResult(\fIinterp, statePtr\fB)\fR
.sp
\fBTcl_DiscardResult(\fIstatePtr\fB)\fR
.SH ARGUMENTS
.AS Tcl_SavedResult statePtr
.AP Tcl_Interp *interp in
Interpreter for which state should be saved.
.AP Tcl_SavedResult *statePtr in
Pointer to location where interpreter result should be saved or restored.
.BE
.SH DESCRIPTION
.PP
These routines allows a C procedure to take a snapshot of the current
interpreter result so that it can be restored after a call
to \fBTcl_Eval\fR or some other routine that modifies the interpreter
result. These routines are passed a pointer to a structure that is
used to store enough information to restore the interpreter result
state. This structure can be allocated on the stack of the calling
procedure. These routines do not save the state of any error
information in the interpreter (e.g. the \fBerrorCode\fR or
\fBerrorInfo\fR variables).
.PP
\fBTcl_SaveResult\fR moves the string and object results
of \fIinterp\fR into the location specified by \fIstatePtr\fR.
\fBTcl_SaveResult\fR clears the result for \fIinterp\fR and
leaves the result in its normal empty initialized state.
.PP
\fBTcl_RestoreResult\fR moves the string and object results from
\fIstatePtr\fR back into \fIinterp\fR. Any result or error that was
already in the interpreter will be cleared. The \fIstatePtr\fR is left
in an uninitialized state and cannot be used until another call to
\fBTcl_SaveResult\fR.
.PP
\fBTcl_DiscardResult\fR releases the saved interpreter state
stored at \fBstatePtr\fR. The state structure is left in an
uninitialized state and cannot be used until another call to
\fBTcl_SaveResult\fR.
.PP
Once \fBTcl_SaveResult\fR is called to save the interpreter
result, either \fBTcl_RestoreResult\fR or
\fBTcl_DiscardResult\fR must be called to properly clean up the
memory associated with the saved state.
.SH KEYWORDS
result, state, interp
+16 -3
View File
@@ -4,12 +4,12 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" SCCS: @(#) SetErrno.3 1.5 96/02/15 20:01:31
'\" RCS: @(#) $Id: SetErrno.3,v 1.3 2000/01/26 21:36:35 ericm Exp $
.so man.macros
.TH Tcl_SetErrno 3 7.5 Tcl "Tcl Library Procedures"
.TH Tcl_SetErrno 3 8.3 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_SetErrno, Tcl_GetErrno \- manipulate errno to store and retrieve error codes
Tcl_SetErrno, Tcl_GetErrno, Tcl_ErrnoId, Tcl_ErrnoMsg \- manipulate errno to store and retrieve error codes
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
@@ -20,6 +20,12 @@ void
int
\fBTcl_GetErrno\fR()
.sp
char *
\fBTcl_ErrnoId\fR()
.sp
char *
\fBTcl_ErrnoMsg\fR()
.sp
.SH ARGUMENTS
.AS Tcl_Interp *errorCode in
.AP int errorCode in
@@ -43,6 +49,13 @@ via \fBerrno\fR should call \fBTcl_SetErrno\fR rather than setting
\fBTcl_GetErrno\fR returns the current value of \fBerrno\fR.
Procedures wishing to access \fBerrno\fR should call this procedure
instead of accessing \fBerrno\fR directly.
.PP
\fBTcl_ErrnoId\fR and \fBTcl_ErrnoMsg\fR return a string
representation of the current \fBerrno\fR value. \fBTcl_ErrnoId\fR
returns a machine-readable textual identifier such as
"EACCES". \fBTcl_ErrnoMsg\fR returns a human-readable string such as
"permission denied". The strings returned by these functions are
statically allocated and the caller must not free or modify them.
.SH KEYWORDS
errno, error code, global variables
+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.
'\"
'\" SCCS: @(#) SetRecLmt.3 1.6 96/03/25 20:06:36
'\" RCS: @(#) $Id: SetRecLmt.3,v 1.3 1999/04/16 00:46:33 stanton Exp $
'\"
.so man.macros
.TH Tcl_SetRecursionLimit 3 7.0 Tcl "Tcl Library Procedures"
@@ -41,7 +41,7 @@ allowable nesting depth for an interpreter.
The \fIdepth\fR argument specifies a new limit for \fIinterp\fR,
and \fBTcl_SetRecursionLimit\fR returns the old limit.
To read out the old limit without modifying it, invoke
\fBTcl_SetRecursionDepth\fR with \fIdepth\fR equal to 0.
\fBTcl_SetRecursionLimit\fR with \fIdepth\fR equal to 0.
.PP
The \fBTcl_SetRecursionLimit\fR only sets the size of the Tcl
call stack: it cannot by itself prevent stack overflows on the
+13 -5
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.
'\"
'\" SCCS: @(#) SetResult.3 1.23 97/06/26 14:05:57
'\" RCS: @(#) $Id: SetResult.3,v 1.4 1999/08/21 19:40:47 hobbs Exp $
'\"
.so man.macros
.TH Tcl_SetResult 3 7.5 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_SetObjResult, Tcl_GetObjResult, Tcl_SetResult, Tcl_GetStringResult, Tcl_AppendResult, Tcl_AppendElement, Tcl_ResetResult \- manipulate Tcl result
Tcl_SetObjResult, Tcl_GetObjResult, Tcl_SetResult, Tcl_GetStringResult, Tcl_AppendResult, Tcl_AppendResultVA, Tcl_AppendElement, Tcl_ResetResult \- manipulate Tcl result
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
@@ -28,6 +28,8 @@ char *
.sp
\fBTcl_AppendResult\fR(\fIinterp, string, string, ... , \fB(char *) NULL\fR)
.sp
\fBTcl_AppendResultVA\fR(\fIinterp, argList\fR)
.sp
\fBTcl_AppendElement\fR(\fIinterp, string\fR)
.sp
\fBTcl_ResetResult\fR(\fIinterp\fR)
@@ -46,6 +48,9 @@ appended to the existing result.
Address of procedure to call to release storage at
\fIstring\fR, or \fBTCL_STATIC\fR, \fBTCL_DYNAMIC\fR, or
\fBTCL_VOLATILE\fR.
.AP va_list argList in
An argument list which must have been initialised using
\fBTCL_VARARGS_START\fR, and cleared using \fBva_end\fR.
.BE
.SH DESCRIPTION
@@ -112,7 +117,7 @@ and the result is left as a empty string.
\fBTcl_AddErrorInfo\fR, \fBTcl_AddObjErrorInfo\fR,
and \fBTcl_SetErrorCode\fR.
.SH OLD STRING PROCEDURES
.SH "OLD STRING PROCEDURES"
.PP
Use of the following procedures is deprecated
since they manipulate the Tcl result as a string.
@@ -137,6 +142,9 @@ to a string, if necessary, before appending the argument strings.
Any number of \fIstring\fR arguments may be passed in a single
call; the last argument in the list must be a NULL pointer.
.PP
\fBTcl_AppendResultVA\fR is the same as \fBTcl_AppendResult\fR except that
instead of taking a variable number of arguments it takes an argument list.
.PP
\fBTcl_AppendElement\fR is similar to \fBTcl_AppendResult\fR in
that it allows results to be built up in pieces.
However, \fBTcl_AppendElement\fR takes only a single \fIstring\fR
@@ -162,7 +170,7 @@ change \fIinterp->result\fR or clear error state.
\fBTcl_FreeResult\fR is most commonly used when a procedure
is about to replace one result value with another.
.SH DIRECT ACCESS TO INTERP->RESULT IS DEPRECATED
.SH "DIRECT ACCESS TO INTERP->RESULT IS DEPRECATED"
.PP
It used to be legal for programs to
directly read and write \fIinterp->result\fR
@@ -173,7 +181,7 @@ Programs should always read the result
using the procedures \fBTcl_GetObjResult\fR or \fBTcl_GetStringResult\fR,
and write the result using \fBTcl_SetObjResult\fR or \fBTcl_SetResult\fR.
.SH THE TCL_FREEPROC ARGUMENT TO TCL_SETRESULT
.SH "THE TCL_FREEPROC ARGUMENT TO TCL_SETRESULT"
.PP
\fBTcl_SetResult\fR's \fIfreeProc\fR argument specifies how
the Tcl system is to manage the storage for the \fIstring\fR argument.
+134 -77
View File
@@ -5,93 +5,158 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" SCCS: @(#) SetVar.3 1.30 97/10/10 16:10:36
'\" RCS: @(#) $Id: SetVar.3,v 1.3 1999/04/16 00:46:33 stanton Exp $
'\"
.so man.macros
.TH Tcl_SetVar 3 7.4 Tcl "Tcl Library Procedures"
.TH Tcl_SetVar 3 8.1 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_SetVar, Tcl_SetVar2, Tcl_GetVar, Tcl_GetVar2, Tcl_UnsetVar, Tcl_UnsetVar2 \- manipulate Tcl variables
Tcl_SetVar2Ex, Tcl_SetVar, Tcl_SetVar2, Tcl_ObjSetVar2, Tcl_GetVar2Ex, Tcl_GetVar, Tcl_GetVar2, Tcl_ObjGetVar2, Tcl_UnsetVar, Tcl_UnsetVar2 \- manipulate Tcl variables
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
.sp
.VS 8.1
Tcl_Obj *
\fBTcl_SetVar2Ex\fR(\fIinterp, name1, name2, newValuePtr, flags\fR)
.VE
.sp
char *
\fBTcl_SetVar\fR(\fIinterp, varName, newValue, flags\fR)
.sp
char *
\fBTcl_SetVar2\fR(\fIinterp, name1, name2, newValue, flags\fR)
.sp
Tcl_Obj *
\fBTcl_ObjSetVar2\fR(\fIinterp, part1Ptr, part2Ptr, newValuePtr, flags\fR)
.sp
.VS 8.1
Tcl_Obj *
\fBTcl_GetVar2Ex\fR(\fIinterp, name1, name2, flags\fR)
.VE
.sp
char *
\fBTcl_GetVar\fR(\fIinterp, varName, flags\fR)
.sp
char *
\fBTcl_GetVar2\fR(\fIinterp, name1, name2, flags\fR)
.sp
Tcl_Obj *
\fBTcl_ObjGetVar2\fR(\fIinterp, part1Ptr, part2Ptr, flags\fR)
.sp
int
\fBTcl_UnsetVar\fR(\fIinterp, varName, flags\fR)
.sp
int
\fBTcl_UnsetVar2\fR(\fIinterp, name1, name2, flags\fR)
.SH ARGUMENTS
.AS Tcl_Interp *newValue
.AS Tcl_Interp *newValuePtr
.AP Tcl_Interp *interp in
Interpreter containing variable.
.AP char *name1 in
Contains the name of an array variable (if \fIname2\fR is non-NULL)
or (if \fIname2\fR is NULL) either the name of a scalar variable
or a complete name including both variable name and index.
May include \fB::\fR namespace qualifiers
to specify a variable in a particular namespace.
.AP char *name2 in
If non-NULL, gives name of element within array; in this
case \fIname1\fR must refer to an array variable.
.AP Tcl_Obj *newValuePtr in
.VS 8.1
Points to a Tcl object containing the new value for the variable.
.VE
.AP int flags in
OR-ed combination of bits providing additional information. See below
for valid values.
.AP char *varName in
Name of variable.
May include a series of \fB::\fR namespace qualifiers
May include \fB::\fR namespace qualifiers
to specify a variable in a particular namespace.
May refer to a scalar variable or an element of
an array variable.
If the name references an element of an array, then it
an array.
If the name references an element of an array, then the name
must be in writable memory: Tcl will make temporary modifications
to it while looking up the name.
.AP char *newValue in
New value for variable.
.AP int flags in
OR-ed combination of bits providing additional information for
operation. See below for valid values.
.AP char *name1 in
Name of scalar variable, or name of array variable if \fIname2\fR
is non-NULL.
May include a series of \fB::\fR namespace qualifiers
New value for variable, specified as a NULL-terminated string.
A copy of this value is stored in the variable.
.AP Tcl_Obj *part1Ptr in
Points to a Tcl object containing the variable's name.
The name may include a series of \fB::\fR namespace qualifiers
to specify a variable in a particular namespace.
.AP char *name2 in
If non-NULL, gives name of element within array and \fIname1\fR
must refer to an array variable.
May refer to a scalar variable or an element of an array variable.
.AP Tcl_Obj *part2Ptr in
If non-NULL, points to an object containing the name of an element
within an array and \fIpart1Ptr\fR must refer to an array variable.
.BE
.SH DESCRIPTION
.PP
These procedures may be used to create, modify, read, and delete
These procedures are used to create, modify, read, and delete
Tcl variables from C code.
.PP
Note that \fBTcl_GetVar\fR and \fBTcl_SetVar\fR
have been largely replaced by the
object-based procedures \fBTcl_ObjGetVar2\fR and \fBTcl_ObjSetVar2\fR.
Those object-based procedures read, modify, and create
a variable whose name is held in a Tcl object instead of a string.
They also return a pointer to the object
which is the variable's value instead of returning a string.
Operations on objects can be faster since objects
hold an internal representation that can be manipulated more efficiently.
.PP
\fBTcl_SetVar\fR and \fBTcl_SetVar2\fR
.VS 8.1
\fBTcl_SetVar2Ex\fR, \fBTcl_SetVar\fR, \fBTcl_SetVar2\fR, and
\fBTcl_ObjSetVar2\fR
will create a new variable or modify an existing one.
Both of these procedures set the given variable to the value
given by \fInewValue\fR, and they return a pointer to a
copy of the variable's new value, which is stored in Tcl's
These procedures set the given variable to the value
given by \fInewValuePtr\fR or \fInewValue\fR and return a
pointer to the variable's new value, which is stored in Tcl's
variable structure.
Tcl keeps a private copy of the variable's value, so the caller
may change \fInewValue\fR after these procedures return without
affecting the value of the variable.
\fBTcl_SetVar2Ex\fR and \fBTcl_ObjSetVar2\fR take the new value as a
Tcl_Obj and return
a pointer to a Tcl_Obj. \fBTcl_SetVar\fR and \fBTcl_SetVar2\fR
take the new value as a string and return a string; they are
usually less efficient than \fBTcl_ObjSetVar2\fR. Note that the
return value may be different than the \fInewValuePtr\fR or
.VE
\fInewValue\fR argument, due to modifications made by write traces.
If an error occurs in setting the variable (e.g. an array
variable is referenced without giving an index into the array),
they return NULL.
variable is referenced without giving an index into the array)
NULL is returned and an error message is left in \fIinterp\fR's
result if the \fBTCL_LEAVE_ERR_MSG\fR \fIflag\fR bit is set.
.PP
The name of the variable may be specified to
\fBTcl_SetVar\fR and \fBTcl_SetVar2\fR in either of two ways.
If \fBTcl_SetVar\fR is called, the variable name is given as
.VS 8.1
\fBTcl_GetVar2Ex\fR, \fBTcl_GetVar\fR, \fBTcl_GetVar2\fR, and
\fBTcl_ObjGetVar2\fR
return the current value of a variable.
The arguments to these procedures are treated in the same way
as the arguments to the procedures described above.
Under normal circumstances, the return value is a pointer
to the variable's value. For \fBTcl_GetVar2Ex\fR and
\fBTcl_ObjGetVar2\fR the value is
returned as a pointer to a Tcl_Obj. For \fBTcl_GetVar\fR and
\fBTcl_GetVar2\fR the value is returned as a string; this is
usually less efficient, so \fBTcl_GetVar2Ex\fR or \fBTcl_ObjGetVar2\fR
are preferred.
.VE
If an error occurs while reading the variable (e.g. the variable
doesn't exist or an array element is specified for a scalar
variable), then NULL is returned and an error message is left
in \fIinterp\fR's result if the \fBTCL_LEAVE_ERR_MSG\fR \fIflag\fR
bit is set.
.PP
\fBTcl_UnsetVar\fR and \fBTcl_UnsetVar2\fR may be used to remove
a variable, so that future attempts to read the variable will return
an error.
The arguments to these procedures are treated in the same way
as the arguments to the procedures above.
If the variable is successfully removed then TCL_OK is returned.
If the variable cannot be removed because it doesn't exist then
TCL_ERROR is returned and an error message is left
in \fIinterp\fR's result if the \fBTCL_LEAVE_ERR_MSG\fR \fIflag\fR
bit is set.
If an array element is specified, the given element is removed
but the array remains.
If an array name is specified without an index, then the entire
array is removed.
.PP
The name of a variable may be specified to these procedures in
four ways:
.IP [1]
If \fBTcl_SetVar\fR, \fBTcl_GetVar\fR, or \fBTcl_UnsetVar\fR
is invoked, the variable name is given as
a single string, \fIvarName\fR.
If \fIvarName\fR contains an open parenthesis and ends with a
close parenthesis, then the value between the parentheses is
@@ -100,22 +165,31 @@ the characters before the first open
parenthesis are treated as the name of an array variable.
If \fIvarName\fR doesn't have parentheses as described above, then
the entire string is treated as the name of a scalar variable.
If \fBTcl_SetVar2\fR is called, then the array name and index
have been separated by the caller into two separate strings,
\fIname1\fR and \fIname2\fR respectively; if \fIname2\fR is
zero it means that a scalar variable is being referenced.
.IP [2]
If the \fIname1\fR and \fIname2\fR arguments are provided and
\fIname2\fR is non-NULL, then an array element is specified and
the array name and index have
already been separated by the caller: \fIname1\fR contains the
name and \fIname2\fR contains the index.
.VS 8.1
An error is generated
if \fIname1\fR contains an open parenthesis and ends with a
close parenthesis (array element) and \fIname2\fR is non-NULL.
.IP [3]
If \fIname2\fR is NULL, \fIname1\fR is treated just like
\fIvarName\fR in case [1] above (it can be either a scalar or an array
element variable name).
.VE
.PP
The \fIflags\fR argument may be used to specify any of several
options to the procedures.
It consists of an OR-ed combination of the following bits.
Note that the flag bit TCL_PARSE_PART1 is only meaningful
for the procedures Tcl_SetVar2 and Tcl_GetVar2.
.TP
\fBTCL_GLOBAL_ONLY\fR
Under normal circumstances the procedures look up variables as follows:
Under normal circumstances the procedures look up variables as follows.
If a procedure call is active in \fIinterp\fR,
a variable is looked up at the current level of procedure call.
Otherwise, a variable is looked up first in the current namespace,
the variable is looked up at the current level of procedure call.
Otherwise, the variable is looked up first in the current namespace,
then in the global namespace.
However, if this bit is set in \fIflags\fR then the variable
is looked up only in the global namespace
@@ -124,14 +198,10 @@ If both \fBTCL_GLOBAL_ONLY\fR and \fBTCL_NAMESPACE_ONLY\fR are given,
\fBTCL_GLOBAL_ONLY\fR is ignored.
.TP
\fBTCL_NAMESPACE_ONLY\fR
Under normal circumstances the procedures look up variables as follows:
If a procedure call is active in \fIinterp\fR,
a variable is looked up at the current level of procedure call.
Otherwise, a variable is looked up first in the current namespace,
then in the global namespace.
However, if this bit is set in \fIflags\fR then the variable
is looked up only in the current namespace
even if there is a procedure call active.
If this bit is set in \fIflags\fR then the variable
is looked up only in the current namespace; if a procedure is active
its variables are ignored, and the global namespace is also ignored unless
it is the current namespace.
.TP
\fBTCL_LEAVE_ERR_MSG\fR
If an error is returned and this bit is set in \fIflags\fR, then
@@ -142,9 +212,10 @@ If this flag bit isn't set then no error message is left
and the interpreter's result will not be modified.
.TP
\fBTCL_APPEND_VALUE\fR
If this bit is set then \fInewValue\fR is appended to the current
value, instead of replacing it.
If the variable is currently undefined, then this bit is ignored.
If this bit is set then \fInewValuePtr\fR or \fInewValue\fR is
appended to the current value instead of replacing it.
If the variable is currently undefined, then the bit is ignored.
This bit is only used by the \fBTcl_Set*\fR procedures.
.TP
\fBTCL_LIST_ELEMENT\fR
If this bit is set, then \fInewValue\fR is converted to a valid
@@ -153,18 +224,6 @@ A separator space is appended before the new list element unless
the list element is going to be the first element in a list or
sublist (i.e. the variable's current value is empty, or contains
the single character ``{'', or ends in `` }'').
.TP
\fBTCL_PARSE_PART1\fR
If this bit is set when calling \fITcl_SetVar2\fR and \fITcl_GetVar2\fR,
\fIname1\fR may contain both an array and an element name:
if the name contains an open parenthesis and ends with a
close parenthesis, then the value between the parentheses is
treated as an element name (which can have any string value) and
the characters before the first open
parenthesis are treated as the name of an array variable.
If the flag TCL_PARSE_PART1 is given,
\fIname2\fR should be NULL since the array and element names
are taken from \fIname1\fR.
.PP
\fBTcl_GetVar\fR and \fBTcl_GetVar2\fR
return the current value of a variable.
@@ -178,8 +237,6 @@ or \fBTcl_SetVar2\fR).
and TCL_LEAVE_ERR_MSG, both of
which have
the same meaning as for \fBTcl_SetVar\fR.
In addition, \fBTcl_GetVar2\fR uses the bit TCL_PARSE_PART1,
which has the same meaning as for \fBTcl_SetVar2\fR.
If an error occurs in reading the variable (e.g. the variable
doesn't exist or an array element is specified for a scalar
variable), then NULL is returned.
@@ -198,7 +255,7 @@ If an array name is specified without an index, then the entire
array is removed.
.SH "SEE ALSO"
Tcl_GetObjResult, Tcl_GetStringResult, Tcl_ObjGetVar2, Tcl_ObjSetVar2, Tcl_TraceVar
Tcl_GetObjResult, Tcl_GetStringResult, Tcl_TraceVar
.SH KEYWORDS
array, interpreter, object, scalar, set, unset, variable
array, get variable, interpreter, object, scalar, set, unset, variable
+1 -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.
'\"
'\" SCCS: @(#) Sleep.3 1.3 96/03/25 20:07:21
'\" RCS: @(#) $Id: Sleep.3,v 1.2 1998/09/14 18:39:50 stanton Exp $
'\"
.so man.macros
.TH Tcl_Sleep 3 7.5 Tcl "Tcl Library Procedures"
+1 -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.
'\"
'\" SCCS: @(#) SplitList.3 1.21 97/04/29 14:07:10
'\" RCS: @(#) $Id: SplitList.3,v 1.2 1998/09/14 18:39:50 stanton Exp $
'\"
.so man.macros
.TH Tcl_SplitList 3 7.5 Tcl "Tcl Library Procedures"
+1 -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.
'\"
'\" SCCS: @(#) SplitPath.3 1.4 96/08/19 14:59:35
'\" RCS: @(#) $Id: SplitPath.3,v 1.2 1998/09/14 18:39:50 stanton Exp $
'\"
.so man.macros
.TH Tcl_SplitPath 3 7.5 Tcl "Tcl Library Procedures"
+1 -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.
'\"
'\" SCCS: @(#) StaticPkg.3 1.4 96/09/04 11:21:26
'\" RCS: @(#) $Id: StaticPkg.3,v 1.2 1998/09/14 18:39:50 stanton Exp $
'\"
.so man.macros
.TH Tcl_StaticPackage 3 7.5 Tcl "Tcl Library Procedures"
+19 -3
View File
@@ -5,25 +5,34 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" SCCS: @(#) StrMatch.3 1.11 96/03/25 20:08:06
'\" RCS: @(#) $Id: StrMatch.3,v 1.3 1999/05/22 01:20:11 stanton Exp $
'\"
.so man.macros
.TH Tcl_StringMatch 3 "" Tcl "Tcl Library Procedures"
.TH Tcl_StringMatch 3 8.1 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_StringMatch \- test whether a string matches a pattern
Tcl_StringMatch, Tcl_StringCaseMatch \- test whether a string matches a pattern
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
.sp
int
\fBTcl_StringMatch\fR(\fIstring\fR, \fIpattern\fR)
.VS 8.1
.sp
\fBTcl_StringCaseMatch\fR(\fIstring, pattern, nocase\fR)
.VE 8.1
.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
@@ -34,6 +43,13 @@ a given pattern. If it does, then \fBTcl_StringMatch\fR returns
used for matching is the same algorithm used in the ``string match''
Tcl command and is similar to the algorithm used by the C-shell
for file name matching; see the Tcl manual entry for details.
.VS 8.1
.PP
In \fBTcl_StringCaseMatch\fR, the algorithm is the same, but you have
the option to make the matching case-insensitive. If you choose this
(by passing \fBnocase\fR as 1), then the string and pattern are
essentially matched in the lower case.
.VE 8.1
.SH KEYWORDS
match, pattern, string
+140 -26
View File
@@ -4,35 +4,77 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" SCCS: @(#) @(#) StringObj.3 1.13 97/06/25 13:40:25
'\" RCS: @(#) $Id: StringObj.3,v 1.5 1999/06/15 01:16:21 hershey Exp $
'\"
.so man.macros
.TH Tcl_StringObj 3 8.0 Tcl "Tcl Library Procedures"
.TH Tcl_StringObj 3 8.1 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_NewStringObj, Tcl_SetStringObj, Tcl_GetStringFromObj, Tcl_AppendToObj, Tcl_AppendStringsToObj, Tcl_SetObjLength, TclConcatObj \- manipulate Tcl objects as strings
Tcl_NewStringObj, Tcl_NewUnicodeObj, Tcl_SetStringObj, Tcl_SetUnicodeObj, Tcl_GetStringFromObj, Tcl_GetString, Tcl_GetUnicode, Tcl_GetUniChar, Tcl_GetCharLength, Tcl_GetRange, Tcl_AppendToObj, Tcl_AppendUnicodeToObj, Tcl_AppendStringsToObj, Tcl_AppendStringsToObjVA, Tcl_AppendObjToObj, Tcl_SetObjLength, Tcl_ConcatObj \- manipulate Tcl objects as strings
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
.sp
Tcl_Obj *
\fBTcl_NewStringObj\fR(\fIbytes, length\fR)
.VS 8.1.2
.sp
Tcl_Obj *
\fBTcl_NewUnicodeObj\fR(\fIunicode, numChars\fR)
.VE
.sp
void
\fBTcl_SetStringObj\fR(\fIobjPtr, bytes, length\fR)
.VS 8.1.2
.sp
void
\fBTcl_SetUnicodeObj\fR(\fIobjPtr, unicode, numChars\fR)
.VE
.sp
char *
\fBTcl_GetStringFromObj\fR(\fIobjPtr, lengthPtr\fR)
.sp
\fBTcl_AppendToObj\fR(\fIobjPtr, bytes, length\fR)
char *
\fBTcl_GetString\fR(\fIobjPtr\fR)
.VS 8.1.2
.sp
Tcl_UniChar *
\fBTcl_GetUnicode\fR(\fIobjPtr\fR)
.sp
Tcl_UniChar
\fBTcl_GetUniChar\fR(\fIobjPtr, index\fR)
.sp
int
\fBTcl_GetCharLength\fR(\fIobjPtr\fR)
.sp
Tcl_Obj *
\fBTcl_GetRange\fR(\fIobjPtr, first, last\fR)
.VE
.sp
void
\fBTcl_AppendToObj\fR(\fIobjPtr, bytes, length\fR)
.VS 8.1.2
.sp
void
\fBTcl_AppendUnicodeToObj\fR(\fIobjPtr, unicode, numChars\fR)
.VE
.sp
void
\fBTcl_AppendObjToObj\fR(\fIobjPtr, appendObjPtr\fR)
.sp
void
\fBTcl_AppendStringsToObj\fR(\fIobjPtr, string, string, ... \fB(char *) NULL\fR)
.sp
void
\fBTcl_AppendStringsToObjVA\fR(\fIobjPtr, argList\fR)
.sp
void
\fBTcl_SetObjLength\fR(\fIobjPtr, newLength\fR)
.sp
Tcl_Obj *
\fBTcl_ConcatObj\fR(\fIobjc, objv\fR)
.SH ARGUMENTS
.AS Tcl_Interp *lengthPtr out
.AS Tcl_Interp *appendObjPtr in/out
.AP char *bytes in
Points to the first byte of an array of bytes
used to set or append to a string object.
@@ -42,13 +84,37 @@ unless \fIlength\fR is negative.
The number of bytes to copy from \fIbytes\fR when
initializing, setting, or appending to a string object.
If negative, all bytes up to the first null are used.
.AP Tcl_UniChar *unicode in
Points to the first byte of an array of Unicode characters
used to set or append to a string object.
This byte array may contain embedded null characters
unless \fInumChars\fR is negative.
.VS 8.1.2
.AP int numChars in
The number of Unicode characters to copy from \fIunicode\fR when
initializing, setting, or appending to a string object.
If negative, all characters up to the first null character are used.
.AP int index in
The index of the Unicode character to return.
.AP int first in
The index of the first Unicode character in the Unicode range to be
returned as a new object.
.AP int last in
The index of the last Unicode character in the Unicode range to be
returned as a new object.
.VE
.AP Tcl_Obj *objPtr in/out
Points to an object to manipulate.
.AP Tcl_Obj *appendObjPtr in
The object to append to \fIobjPtr\fR in \fBTcl_AppendObjToObj\fR.
.AP int *lengthPtr out
If non-NULL, the location where \fBTcl_GetStringFromObj\fR will store
the the length of an object's string representation.
.AP char *string in
Null-terminated string value to append to \fIobjPtr\fR.
.AP va_list argList in
An argument list which must have been initialised using
\fBTCL_VARARGS_START\fR, and cleared using \fBva_end\fR.
.AP int newLength in
New length for the string value of \fIobjPtr\fR, not including the
final NULL character.
@@ -66,31 +132,75 @@ of the object to store additional information to make the string
manipulations more efficient. In particular, they make a series of
append operations efficient by allocating extra storage space for the
string so that it doesn't have to be copied for each append.
.VS 8.1.2
Also, indexing and length computations are optimized because the
Unicode string representation is calculated and cached as needed.
.VE
.PP
.VS 8.1.2
\fBTcl_NewStringObj\fR and \fBTcl_SetStringObj\fR create a new object
or modify an existing object to hold a copy of
the string given by \fIbytes\fR and \fIlength\fR.
\fBTcl_NewStringObj\fR returns a pointer to a newly created object
with reference count zero.
Both procedures set the object to hold a copy of the specified string.
\fBTcl_SetStringObj\fR frees any old string representation
as well as any old internal representation of the object.
or modify an existing object to hold a copy of the string given by
\fIbytes\fR and \fIlength\fR. \fBTcl_NewUnicodeObj\fR and
\fBTcl_SetUnicodeObj\fR create a new object or modify an existing
object to hold a copy of the Unicode string given by \fIunicode\fR and
\fInumChars\fR. \fBTcl_NewStringObj\fR and \fBTcl_NewUnicodeObj\fR
return a pointer to a newly created object with reference count zero.
All four procedures set the object to hold a copy of the specified
string. \fBTcl_SetStringObj\fR and \fBTcl_SetUnicodeObj\fR free any
old string representation as well as any old internal representation
of the object.
.VE
.PP
\fBTcl_GetStringFromObj\fR returns an object's string representation.
This is given by the returned byte pointer
and length, which is stored in \fIlengthPtr\fR if it is non-NULL.
If the object's string representation is invalid
(its byte pointer is NULL),
the string representation is regenerated from the
object's internal representation.
The storage referenced by the returned byte pointer
is owned by the object manager and should not be modified by the caller.
\fBTcl_GetStringFromObj\fR and \fBTcl_GetString\fR return an object's
string representation. This is given by the returned byte pointer and
(for \fBTcl_GetStringFromObj\fR) length, which is stored in
\fIlengthPtr\fR if it is non-NULL. If the object's UTF string
representation is invalid (its byte pointer is NULL), the string
representation is regenerated from the object's internal
representation. The storage referenced by the returned byte pointer
is owned by the object manager and should not be modified by the
caller. The procedure \fBTcl_GetString\fR is used in the common case
where the caller does not need the length of the string
representation.
.PP
.VS 8.1.2
\fBTcl_GetUnicode\fR returns an object's value as a Unicode string.
\fBTcl_GetUniChar\fR returns the \fIindex\fR'th character in the
object's Unicode representation.
.PP
\fBTcl_GetRange\fR returns a newly created object comprised of the
characters between \fIfirst\fR and \fIlast\fR (inclusive) in the
object's Unicode representation. If the object's Unicode
representation is invalid, the Unicode representation is regenerated
from the object's string representation.
.PP
\fBTcl_GetCharLength\fR returns the number of characters (as opposed
to bytes) in the string object.
.PP
\fBTcl_AppendToObj\fR appends the data given by \fIbytes\fR and
\fIlength\fR to the object specified by \fIobjPtr\fR. It does this
in a way that handles repeated calls relatively efficiently (it
overallocates the string space to avoid repeated reallocations
and copies of object's string value).
\fIlength\fR to the string representation of the object specified by
\fIobjPtr\fR. If the object has an invalid string representation,
then an attempt is made to convert \fIbytes\fR is to the Unicode
format. If the conversion is successful, then the converted form of
\fIbytes\fR is appended to the object's Unicode representation.
Otherwise, the object's Unicode representation is invalidated and
converted to the UTF format, and \fIbytes\fR is appended to the
object's new string representation.
.PP
\fBTcl_AppendUnicodeToObj\fR appends the Unicode string given by
\fIunicode\fR and \fInumChars\fR to the object specified by
\fIobjPtr\fR. If the object has an invalid Unicode representation,
then \fIunicode\fR is converted to the UTF format and appended to the
object's string representation. Appends are optimized to handle
repeated appends relatively efficiently (it overallocates the string
or Unicode space to avoid repeated reallocations and copies of
object's string value).
.PP
\fBTcl_AppendObjToObj\fR is similar to \fBTcl_AppendToObj\fR, but it
appends the string or Unicode value (whichever exists and is best
suited to be appended to \fIobjPtr\fR) of \fIappendObjPtr\fR to
\fIobjPtr\fR.
.VE
.PP
\fBTcl_AppendStringsToObj\fR is similar to \fBTcl_AppendToObj\fR
except that it can be passed more than one value to append and
@@ -99,6 +209,10 @@ values may contain internal null characters). Any number of
\fIstring\fR arguments may be provided, but the last argument
must be a NULL pointer to indicate the end of the list.
.PP
\fBTcl_AppendStringsToObjVA\fR is the same as \fBTcl_AppendStringsToObj\fR
except that instead of taking a variable number of arguments it takes an
argument list.
.PP
The \fBTcl_SetObjLength\fR procedure changes the length of the
string value of its \fIobjPtr\fR argument. If the \fInewLength\fR
argument is greater than the space allocated for the object's
@@ -129,4 +243,4 @@ Tcl_NewObj, Tcl_IncrRefCount, Tcl_DecrRefCount
.SH KEYWORDS
append, internal representation, object, object type, string object,
string type, string representation, concat, concatenate
string type, string representation, concat, concatenate, unicode

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