Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Comment: | merge trunk; FIXME: symbols=mem build broken |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | mig-no280 |
Files: | files | file ages | folders |
SHA1: |
5e6ff3418b1037b9f84325a17f44123f |
User & Date: | mig 2011-08-02 11:18:47 |
2011-09-28
| ||
01:39 | merge trunk check-in: 0f1d9f3a48 user: mig tags: mig-no280 | |
2011-08-02
| ||
11:18 | merge trunk; FIXME: symbols=mem build broken check-in: 5e6ff3418b user: mig tags: mig-no280 | |
09:07 | [Bug 3384007]: Fix some panic messages. check-in: 783c413131 user: dkf tags: trunk | |
2011-07-06
| ||
18:25 | merge trunk onto devel branch check-in: 7268fb6531 user: mig tags: mig-no280 | |
Changes to ChangeLog.
1 2 3 4 5 6 7 | 2011-07-03 Donal K. Fellows <[email protected]> * doc/FileSystem.3: Corrected statements about ctime field of 'struct stat'; that was always the time of the last metadata change, not the time of creation. 2011-07-02 Kevin B. Kenny <[email protected]> | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | 2011-08-02 Donal K. Fellows <[email protected]> * generic/tclObj.c (Tcl_DbIncrRefCount, Tcl_DbDecrRefCount) (Tcl_DbIsShared): [Bug 3384007]: Fix the panic messages so they share what should be shared and have the right number of spaces. 2011-08-01 Miguel Sofer <[email protected]> * generic/tclProc.c (TclProcCompileProc): [Bug 3383616]: Fix for leak of resolveInfo when recompiling procs. Thanks go to Gustaf Neumann for detecting the bug and providing the fix. 2011-08-01 Donal K. Fellows <[email protected]> * doc/tclvars.n (EXAMPLES): Added some examples of how some of the standard global variables can be used, following prompting by a request by Robert Hicks. * tools/tcltk-man2html.tcl (plus-pkgs): [Bug 3382474]: Added code to determine the version number of contributed packages from their directory names so that HTML documentation builds are less confusing. 2011-07-29 Donal K. Fellows <[email protected]> * tools/tcltk-man2html.tcl (ensemble_commands, remap_link_target): Small enhancements to improve cross-linking with contributed packages. * tools/tcltk-man2html-utils.tcl (insert-cross-references): Enhance to cope with contributed packages' C API. 2011-07-28 Reinhard Max <[email protected]> * unix/tcl.m4 (SC_TCL_IPV6): Fix AC_DEFINE invocation for NEED_FAKE_RFC2553. * unix/configure: autoconf-2.59 2011-07-28 Don Porter <[email protected]> * changes: Updates for 8.6b2 release. * library/tzdata/Asia/Anadyr: Update to Olson's tzdata2011h * library/tzdata/Asia/Irkutsk: * library/tzdata/Asia/Kamchatka: * library/tzdata/Asia/Krasnoyarsk: * library/tzdata/Asia/Magadan: * library/tzdata/Asia/Novokuznetsk: * library/tzdata/Asia/Novosibirsk: * library/tzdata/Asia/Omsk: * library/tzdata/Asia/Sakhalin: * library/tzdata/Asia/Vladivostok: * library/tzdata/Asia/Yakutsk: * library/tzdata/Asia/Yekaterinburg: * library/tzdata/Europe/Kaliningrad: * library/tzdata/Europe/Moscow: * library/tzdata/Europe/Samara: * library/tzdata/Europe/Volgograd: * library/tzdata/America/Kralendijk: (new) * library/tzdata/America/Lower_Princes: (new) 2011-07-26 Donal K. Fellows <[email protected]> * generic/tclOO.c (initScript): Ensure that TclOO is properly found by all the various package mechanisms (by adding a dummy ifneeded script) and not just some of them. 2011-07-21 Jan Nijtmans <[email protected]> * win/tclWinPort.h: [Bug 3372130]: Fix hypot math function with MSVC10 2011-07-19 Don Porter <[email protected]> * generic/tclUtil.c: [Bug 3371644]: Repair failure to properly handle * tests/util.test: (length == -1) scanning in TclConvertElement(). Thanks to Thomas Sader and Alexandre Ferrieux. 2011-07-19 Donal K. Fellows <[email protected]> * doc/*.3, doc/*.n: Many small fixes to documentation as part of project to improve quality of generated HTML docs. * tools/tcltk-man2html.tcl (remap_link_target): More complete set of definitions of link targets, especially for major C API types. * tools/tcltk-man2html-utils.tcl (output-IP-list, cross-reference): Update to generation to produce proper HTML bulleted and enumerated lists. 2011-07-19 Alexandre Ferrieux <[email protected]> * doc/upvar.n: Undocument long gone limitation of [upvar]. 2011-07-15 Don Porter <[email protected]> * generic/tclCompile.c: Avoid segfaults when RecordByteCodeStats() is called in a deleted interp. * generic/tclCompile.c: [Bug 467523, 3357771]: Prevent circular references in values with ByteCode intreps. They can lead to memory leaks. 2011-07-14 Donal K. Fellows <[email protected]> * generic/tclOOCall.c (TclOORenderCallChain): [Bug 3365156]: Remove stray refcount bump that caused a memory leak. 2011-07-12 Don Porter <[email protected]> * generic/tclUnixSock.c: [Bug 3364777]: Stop segfault caused by reading from struct after it had been freed. 2011-07-11 Joe Mistachkin <[email protected]> * generic/tclExecute.c: [Bug 3339502]: Correct cast for CURR_DEPTH to silence compiler warning. 2011-07-08 Donal K. Fellows <[email protected]> * doc/http.n: [FRQ 3358415]: State what RFC defines HTTP/1.1. 2011-07-07 Miguel Sofer <[email protected]> * generic/tclBasic.c: add missing INT2PTR 2011-07-03 Donal K. Fellows <[email protected]> * doc/FileSystem.3: Corrected statements about ctime field of 'struct stat'; that was always the time of the last metadata change, not the time of creation. 2011-07-02 Kevin B. Kenny <[email protected]> |
︙ | ︙ |
Changes to changes.
︙ | ︙ | |||
7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 | 2010-11-04 improved testing of sockets (max) 2010-11-05 (frq)[491789] setargv/unicode cmdline for MSVC (nijtmans) 2010-11-09 (bug fix)[3105999] fixed memleak in OO var resolver (fellows) 2010-11-15 (TIP 378)[3081184] improved TIP 280 performance (kupries) 2010-11-18 (bug fix)[3111059] leak in [namespace delete] w coroutines (sofer) 2010-11-28 [3120139,3105247] Tcl_PrintDouble improvements (kenny) 2010-11-29 (new cmd) [tcl::unsupported::inject] (ferrieux,sofer) 2010-11-30 (enhancement) Restore TclFormatInt for performance (hobbs) 2010-12-09 (new feature) [file] is now a [namespace ensemble] (fellows) 2010-12-12 (platform) OpenBSD build improvements (cassoff) 2010-12-17 (platform) Revisions to support rpm 4.4.2 (cassoff) 2010-12-30 (bug fix)[3142026] GrowEvaluationStack OBOE (harder,sofer) 2011-01-18 (bug fix)[3001438] [info frame -1] crash (mccormack,fellows) 2011-03-01 (performance)[3168398] optimize [interp cancel] (mistachkin) | > > > > > > | 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 | 2010-11-04 improved testing of sockets (max) 2010-11-05 (frq)[491789] setargv/unicode cmdline for MSVC (nijtmans) 2010-11-09 (bug fix)[3105999] fixed memleak in OO var resolver (fellows) 2010-11-15 (TIP 378)[3081184] improved TIP 280 performance (kupries) 2010-11-16 (platform) VS 2005 SP1 MSVC compiler (nijtmans) 2010-11-18 (bug fix)[3111059] leak in [namespace delete] w coroutines (sofer) 2010-11-28 [3120139,3105247] Tcl_PrintDouble improvements (kenny) 2010-11-29 (new cmd) [tcl::unsupported::inject] (ferrieux,sofer) 2010-11-30 (enhancement) Restore TclFormatInt for performance (hobbs) 2010-12-09 (new feature) [file] is now a [namespace ensemble] (fellows) 2010-12-19 (bug fix) [fcopy -size 1 -command] asynchronous (ferrieux) 2010-12-12 (platform) OpenBSD build improvements (cassoff) 2010-12-17 (platform) Revisions to support rpm 4.4.2 (cassoff) 2010-12-27 (bug fix) crash in [lsort] w multiple -index options (fellows) 2010-12-30 (bug fix)[3142026] GrowEvaluationStack OBOE (harder,sofer) 2011-01-18 (bug fix)[3001438] [info frame -1] crash (mccormack,fellows) 2011-03-01 (performance)[3168398] optimize [interp cancel] (mistachkin) |
︙ | ︙ | |||
7924 7925 7926 7927 7928 7929 7930 | 2011-05-05 (enhancement) dict->list w/o string rep generation (porter) 2011-05-10 (bug fix)[3173086] Crash parsing long lists (rogers,porter) 2011-05-24 (enhancement) msgcat internal improvements (fellows) => msgcat 1.4.4 | < < > > > > | | 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 | 2011-05-05 (enhancement) dict->list w/o string rep generation (porter) 2011-05-10 (bug fix)[3173086] Crash parsing long lists (rogers,porter) 2011-05-24 (enhancement) msgcat internal improvements (fellows) => msgcat 1.4.4 2011-05-25 (TIP 381) [info object|class call] [self call] [nextto] (fellows) 2011-05-31 (bug fix)[3293874] let lists grow all the way to the limit (porter) 2011-06-02 (bug fix)[3185407] cmd resolution epoch flaw (nadkarni,fellows) 2011-06-13 (bug fix)[3315098] mem leak generating double string rep (neumann) 2011-06-22 (new feature) DEB_HOST_MULTIARCH support (kupries) => platform 1.0.10 2011-07-15 (bug fix)[3357771] Prevent circular refs in bytecode (porter) 2011-07-28 tzdata updated to Olson's tzdata2011h (porter) Many more Tcl built-in command errors now set an -errorcode. --- Released 8.6b2, August 3, 2011 --- See ChangeLog for details --- |
Changes to doc/Class.3.
1 2 3 4 5 6 7 8 9 10 11 | '\" '\" Copyright (c) 2007 Donal K. Fellows '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" .so man.macros .TH Tcl_Class 3 0.1 TclOO "TclOO Library Functions" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | '\" '\" Copyright (c) 2007 Donal K. Fellows '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" .so man.macros .TH Tcl_Class 3 0.1 TclOO "TclOO Library Functions" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME Tcl_ClassGetMetadata, Tcl_ClassSetMetadata, Tcl_CopyObjectInstance, Tcl_GetClassAsObject, Tcl_GetObjectAsClass, Tcl_GetObjectCommand, Tcl_GetObjectFromObj, Tcl_GetObjectName, Tcl_GetObjectNamespace, Tcl_NewObjectInstance, Tcl_ObjectDeleted, Tcl_ObjectGetMetadata, Tcl_ObjectGetMethodNameMapper, Tcl_ObjectSetMetadata, Tcl_ObjectSetMethodNameMapper \- manipulate objects and classes .SH SYNOPSIS .nf \fB#include <tclOO.h>\fR .sp Tcl_Object \fBTcl_GetObjectFromObj\fR(\fIinterp, objPtr\fR) .sp |
︙ | ︙ |
Changes to doc/CrtInterp.3.
1 2 3 4 5 6 7 8 9 10 11 | '\" '\" Copyright (c) 1989-1993 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" .so man.macros .TH Tcl_CreateInterp 3 7.5 Tcl "Tcl Library Procedures" .BS .SH NAME | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | '\" '\" Copyright (c) 1989-1993 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" .so man.macros .TH Tcl_CreateInterp 3 7.5 Tcl "Tcl Library Procedures" .BS .SH NAME Tcl_CreateInterp, Tcl_DeleteInterp, Tcl_InterpActive, Tcl_InterpDeleted \- create and delete Tcl command interpreters .SH SYNOPSIS .nf \fB#include <tcl.h>\fR .sp Tcl_Interp * \fBTcl_CreateInterp\fR() .sp |
︙ | ︙ |
Changes to doc/Ensemble.3.
1 2 3 4 5 6 7 8 9 10 11 12 | '\" '\" Copyright (c) 2005 Donal K. Fellows '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" '\" This documents the C API introduced in TIP#235 '\" .so man.macros .TH Tcl_Ensemble 3 8.5 Tcl "Tcl Library Procedures" .BS .SH NAME | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | '\" '\" Copyright (c) 2005 Donal K. Fellows '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" '\" This documents the C API introduced in TIP#235 '\" .so man.macros .TH Tcl_Ensemble 3 8.5 Tcl "Tcl Library Procedures" .BS .SH NAME Tcl_CreateEnsemble, Tcl_FindEnsemble, Tcl_GetEnsembleFlags, Tcl_GetEnsembleMappingDict, Tcl_GetEnsembleNamespace, Tcl_GetEnsembleParameterList, Tcl_GetEnsembleUnknownHandler, Tcl_GetEnsembleSubcommandList, Tcl_IsEnsemble, Tcl_SetEnsembleFlags, Tcl_SetEnsembleMappingDict, Tcl_SetEnsembleParameterList, Tcl_SetEnsembleSubcommandList, Tcl_SetEnsembleUnknownHandler \- manipulate ensemble commands .SH SYNOPSIS .nf \fB#include <tcl.h>\fR .sp Tcl_Command \fBTcl_CreateEnsemble\fR(\fIinterp, name, namespacePtr, ensFlags\fR) .sp |
︙ | ︙ |
Changes to doc/FileSystem.3.
︙ | ︙ | |||
714 715 716 717 718 719 720 | .QW ~ or .QW ~user sequences (these have been expanded to their current representation in the filesystem). The object returned is owned by the caller, which must store it or call Tcl_DecrRefCount to ensure memory is freed. This function is of little practical use, and | | | | 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 | .QW ~ or .QW ~user sequences (these have been expanded to their current representation in the filesystem). The object returned is owned by the caller, which must store it or call Tcl_DecrRefCount to ensure memory is freed. This function is of little practical use, and \fBTcl_FSGetNormalizedPath\fR or \fBTcl_FSGetNativePath\fR are usually better functions to use for most purposes. .PP \fBTcl_FSGetTranslatedStringPath\fR does the same as \fBTcl_FSGetTranslatedPath\fR, but returns a character string or NULL. The string returned is dynamically allocated and owned by the caller, which must store it or call \fBckfree\fR to ensure it is freed. Again, \fBTcl_FSGetNormalizedPath\fR or \fBTcl_FSGetNativePath\fR are usually better functions to use for most purposes. .PP \fBTcl_FSNewNativePath\fR performs something like the reverse of the usual obj->path->nativerep conversions. If some code retrieves a path in native form (from, e.g.\ \fBreadlink\fR or a native dialog), and that path is to be used at the Tcl level, then calling this function is an efficient way of creating the appropriate path object type. |
︙ | ︙ | |||
788 789 790 791 792 793 794 | .PP It returns one of \fBTCL_PATH_ABSOLUTE\fR, \fBTCL_PATH_RELATIVE\fR, or \fBTCL_PATH_VOLUME_RELATIVE\fR .SS "PORTABLE STAT RESULT API" .PP \fBTcl_AllocStatBuf\fR allocates a \fITcl_StatBuf\fR on the system heap (which may be deallocated by being passed to \fBckfree\fR). This allows extensions to | | | 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 | .PP It returns one of \fBTCL_PATH_ABSOLUTE\fR, \fBTCL_PATH_RELATIVE\fR, or \fBTCL_PATH_VOLUME_RELATIVE\fR .SS "PORTABLE STAT RESULT API" .PP \fBTcl_AllocStatBuf\fR allocates a \fITcl_StatBuf\fR on the system heap (which may be deallocated by being passed to \fBckfree\fR). This allows extensions to invoke \fBTcl_FSStat\fR and \fBTcl_FSLstat\fR without being dependent on the size of the buffer. That in turn depends on the flags used to build Tcl. .PP .VS 8.6 The portable fields of a \fITcl_StatBuf\fR may be read using the following functions, each of which returns the value of the corresponding field listed in the table below. Note that on some platforms there may be other fields in the \fITcl_StatBuf\fR as it is an alias for a suitable system structure, but |
︙ | ︙ |
Changes to doc/Method.3.
1 2 3 4 5 6 7 8 9 10 11 | '\" '\" Copyright (c) 2007 Donal K. Fellows '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" .so man.macros .TH Tcl_Method 3 0.1 TclOO "TclOO Library Functions" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | '\" '\" Copyright (c) 2007 Donal K. Fellows '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" .so man.macros .TH Tcl_Method 3 0.1 TclOO "TclOO Library Functions" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME Tcl_ClassSetConstructor, Tcl_ClassSetDestructor, Tcl_MethodDeclarerClass, Tcl_MethodDeclarerObject, Tcl_MethodIsPublic, Tcl_MethodIsType, Tcl_MethodName, Tcl_NewInstanceMethod, Tcl_NewMethod, Tcl_ObjectContextInvokeNext, Tcl_ObjectContextIsFiltering, Tcl_ObjectContextMethod, Tcl_ObjectContextObject, Tcl_ObjectContextSkippedArgs \- manipulate methods and method-call contexts .SH SYNOPSIS .nf \fB#include <tclOO.h>\fR .sp Tcl_Method \fBTcl_NewMethod\fR(\fIinterp, class, nameObj, isPublic, methodTypePtr, clientData\fR) |
︙ | ︙ |
Changes to doc/NRE.3.
︙ | ︙ | |||
137 138 139 140 141 142 143 | invoke a single Tcl command whose words have already been separated and substituted. The \fIobjc\fR and \fIobjv\fR parameters give the words of the command to be evaluated when execution reaches the trampoline. .PP \fBTcl_NRCmdSwap\fR allows for trampoline evaluation of a command whose resolution is already known. The \fIcmd\fR parameter gives a | | | 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | invoke a single Tcl command whose words have already been separated and substituted. The \fIobjc\fR and \fIobjv\fR parameters give the words of the command to be evaluated when execution reaches the trampoline. .PP \fBTcl_NRCmdSwap\fR allows for trampoline evaluation of a command whose resolution is already known. The \fIcmd\fR parameter gives a \fBTcl_Command\fR object (returned from \fBTcl_CreateObjCommand\fR or \fBTcl_GetCommandFromObj\fR) identifying the command to be invoked in the trampoline; this command must match the word in \fIobjv[0]\fR. The remaining arguments are as for \fBTcl_NREvalObj\fR. .PP \fBTcl_NREvalObj\fR, \fBTcl_NREvalObjv\fR and \fBTcl_NRCmdSwap\fR all accept a \fIflags\fR parameter, which is an OR-ed-together set of bits to control evaluation. At the present time, the only supported flag |
︙ | ︙ |
Changes to doc/Namespace.3.
︙ | ︙ | |||
156 157 158 159 160 161 162 | \fBTcl_GetNamespaceUnknownHandler\fR returns the unknown command handler for the namespace, or NULL if none is set. .PP \fBTcl_SetNamespaceUnknownHandler\fR sets the unknown command handler for the namespace. If \fIhandlerPtr\fR is NULL, then the handler is reset to its default. .SH "SEE ALSO" | | | 156 157 158 159 160 161 162 163 164 165 | \fBTcl_GetNamespaceUnknownHandler\fR returns the unknown command handler for the namespace, or NULL if none is set. .PP \fBTcl_SetNamespaceUnknownHandler\fR sets the unknown command handler for the namespace. If \fIhandlerPtr\fR is NULL, then the handler is reset to its default. .SH "SEE ALSO" Tcl_CreateCommand(3), Tcl_ListObjAppendList(3), Tcl_SetVar(3) .SH KEYWORDS namespace, command |
Changes to doc/Notifier.3.
︙ | ︙ | |||
407 408 409 410 411 412 413 | 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 | | | 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 | 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 .QW "wake up" that thread's notifier to alert it to the new event. .PP |
︙ | ︙ |
Changes to doc/SplitList.3.
︙ | ︙ | |||
178 179 180 181 182 183 184 185 186 | hash character by OR-ing the flag value returned by \fBTcl_ScanElement\fR with \fBTCL_DONT_QUOTE_HASH\fR. .PP \fBTcl_ScanCountedElement\fR and \fBTcl_ConvertCountedElement\fR are the same as \fBTcl_ScanElement\fR and \fBTcl_ConvertElement\fR, except the length of string \fIsrc\fR is specified by the \fIlength\fR argument, and the string may contain embedded nulls. .SH KEYWORDS backslash, convert, element, list, merge, split, strings | > > < < | 178 179 180 181 182 183 184 185 186 187 188 | hash character by OR-ing the flag value returned by \fBTcl_ScanElement\fR with \fBTCL_DONT_QUOTE_HASH\fR. .PP \fBTcl_ScanCountedElement\fR and \fBTcl_ConvertCountedElement\fR are the same as \fBTcl_ScanElement\fR and \fBTcl_ConvertElement\fR, except the length of string \fIsrc\fR is specified by the \fIlength\fR argument, and the string may contain embedded nulls. .SH "SEE ALSO" Tcl_ListObjGetElements(3) .SH KEYWORDS backslash, convert, element, list, merge, split, strings |
Changes to doc/Translate.3.
︙ | ︙ | |||
25 26 27 28 29 30 31 | .QW ~ . .AP Tcl_DString *bufferPtr in/out If needed, this dynamic string is used to store the new file name. 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. .BE | < | | | | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | .QW ~ . .AP Tcl_DString *bufferPtr in/out If needed, this dynamic string is used to store the new file name. 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. .BE .SH DESCRIPTION .PP This utility procedure translates a file name to a platform-specific form which, after being converted to the appropriate encoding, is suitable for passing to the local operating system. In particular, it converts network names into native form and does tilde substitution. .PP However, with the advent of the newer \fBTcl_FSGetNormalizedPath\fR and \fBTcl_FSGetNativePath\fR, there is no longer any need to use this procedure. In particular, \fBTcl_FSGetNativePath\fR performs all the necessary translation and encoding conversion, is virtual-filesystem aware, and caches the native result for faster repeated calls. Finally \fBTcl_FSGetNativePath\fR does not require you to free anything afterwards. .PP If \fBTcl_TranslateFileName\fR has to do tilde substitution or translate the name then it uses the dynamic string at \fI*bufferPtr\fR to hold the new string it generates. |
︙ | ︙ | |||
62 63 64 65 66 67 68 | in the interpreter's result. When an error occurs, \fBTcl_TranslateFileName\fR frees the dynamic string itself so that the caller need not call \fBTcl_DStringFree\fR. .PP The caller is responsible for making sure that the interpreter's result has its default empty value when \fBTcl_TranslateFileName\fR is invoked. | < | < | 61 62 63 64 65 66 67 68 69 70 71 | in the interpreter's result. When an error occurs, \fBTcl_TranslateFileName\fR frees the dynamic string itself so that the caller need not call \fBTcl_DStringFree\fR. .PP The caller is responsible for making sure that the interpreter's result has its default empty value when \fBTcl_TranslateFileName\fR is invoked. .SH "SEE ALSO" filename(n) .SH KEYWORDS file name, home directory, tilde, translate, user |
Changes to doc/after.n.
︙ | ︙ | |||
45 46 47 48 49 50 51 | The command will be executed exactly once, at the given time. The delayed command is formed by concatenating all the \fIscript\fR arguments in the same fashion as the \fBconcat\fR command. The command will be executed at global level (outside the context of any Tcl procedure). If an error occurs while executing the delayed command then the background error will be reported by the command | | | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | The command will be executed exactly once, at the given time. The delayed command is formed by concatenating all the \fIscript\fR arguments in the same fashion as the \fBconcat\fR command. The command will be executed at global level (outside the context of any Tcl procedure). If an error occurs while executing the delayed command then the background error will be reported by the command registered with \fBinterp bgerror\fR. The \fBafter\fR command returns an identifier that can be used to cancel the delayed command using \fBafter cancel\fR. .TP \fBafter cancel \fIid\fR . Cancels the execution of a delayed command that was previously scheduled. |
︙ | ︙ | |||
78 79 80 81 82 83 84 | for the resulting script to be evaluated later as an idle callback. The script will be run exactly once, the next time the event loop is entered and there are no events to process. The command returns an identifier that can be used to cancel the delayed command using \fBafter cancel\fR. If an error occurs while executing the script then the background error will be reported by the command | | | 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | for the resulting script to be evaluated later as an idle callback. The script will be run exactly once, the next time the event loop is entered and there are no events to process. The command returns an identifier that can be used to cancel the delayed command using \fBafter cancel\fR. If an error occurs while executing the script then the background error will be reported by the command registered with \fBinterp bgerror\fR. .TP \fBafter info \fR?\fIid\fR? . This command returns information about existing event handlers. If no \fIid\fR argument is supplied, the command returns a list of the identifiers for all existing event handlers created by the \fBafter\fR command for this |
︙ | ︙ |
Changes to doc/binary.n.
︙ | ︙ | |||
9 10 11 12 13 14 15 | .TH binary n 8.0 Tcl "Tcl Built-In Commands" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME binary \- Insert and extract fields from binary strings .SH SYNOPSIS .VS 8.6 | | | | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | .TH binary n 8.0 Tcl "Tcl Built-In Commands" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME binary \- Insert and extract fields from binary strings .SH SYNOPSIS .VS 8.6 \fBbinary decode \fIformat\fR ?\fI\-option value ...\fR? \fIdata\fR .br \fBbinary encode \fIformat\fR ?\fI\-option value ...\fR? \fIdata\fR .br .VE 8.6 \fBbinary format \fIformatString \fR?\fIarg arg ...\fR? .br \fBbinary scan \fIstring formatString \fR?\fIvarName varName ...\fR? .BE .SH DESCRIPTION |
︙ | ︙ |
Changes to doc/break.n.
︙ | ︙ | |||
14 15 16 17 18 19 20 | .SH SYNOPSIS \fBbreak\fR .BE .SH DESCRIPTION .PP This command is typically invoked inside the body of a looping command such as \fBfor\fR or \fBforeach\fR or \fBwhile\fR. | | | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | .SH SYNOPSIS \fBbreak\fR .BE .SH DESCRIPTION .PP This command is typically invoked inside the body of a looping command such as \fBfor\fR or \fBforeach\fR or \fBwhile\fR. It returns a 3 (\fBTCL_BREAK\fR) result code, which causes a break exception to occur. The exception causes the current script to be aborted out to the innermost containing loop command, which then aborts its execution and returns normally. Break exceptions are also handled in a few other situations, such as the \fBcatch\fR command, Tk event bindings, and the outermost scripts of procedure bodies. |
︙ | ︙ |
Changes to doc/catch.n.
︙ | ︙ | |||
74 75 76 77 78 79 80 | .QW \fBCALL\fR , in which case the parameter is a list made of the proc name and arguments at the corresponding level; or it may be .QW \fBUP\fR , in which case the parameter is the relative level (as in \fBuplevel\fR) of the previous \fBCALL\fR. The salient differences wrt \fB\-errorinfo\fR are that: | | | | | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | .QW \fBCALL\fR , in which case the parameter is a list made of the proc name and arguments at the corresponding level; or it may be .QW \fBUP\fR , in which case the parameter is the relative level (as in \fBuplevel\fR) of the previous \fBCALL\fR. The salient differences wrt \fB\-errorinfo\fR are that: .IP [1] it is a machine-readable form that is amenable to processing with [\fBforeach\fR {tok prm} ...], .IP [2] it contains the true (substituted) values passed to the functions, instead of the static text of the calling sites, and .IP [3] it is coarser-grained, with only one element per stack frame (like procs; no separate elements for \fBforeach\fR constructs for example). .VE 8.6 .PP The values of the \fB\-errorinfo\fR and \fB\-errorcode\fR entries of the most recent error are also available as values of the global variables \fB::errorInfo\fR and \fB::errorCode\fR respectively. |
︙ | ︙ |
Changes to doc/clock.n.
︙ | ︙ | |||
38 39 40 41 42 43 44 | \fBclock clicks\fR ?\fI\-option\fR? If no \fI\-option\fR argument is supplied, returns a high-resolution time value as a system-dependent integer value. The unit of the value is system-dependent but should be the highest resolution clock available on the system such as a CPU cycle counter. See \fBHIGH RESOLUTION TIMERS\fR for a full description. .RS .PP | | | | 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | \fBclock clicks\fR ?\fI\-option\fR? If no \fI\-option\fR argument is supplied, returns a high-resolution time value as a system-dependent integer value. The unit of the value is system-dependent but should be the highest resolution clock available on the system such as a CPU cycle counter. See \fBHIGH RESOLUTION TIMERS\fR for a full description. .RS .PP If the \fI\-option\fR argument is \fB\-milliseconds\fR, then the command is synonymous with \fBclock milliseconds\fR (see below). This usage is obsolete, and \fBclock milliseconds\fR is to be considered the preferred way of obtaining a count of milliseconds. .PP If the \fI\-option\fR argument is \fB\-microseconds\fR, then the command is synonymous with \fBclock microseconds\fR (see below). This usage is obsolete, and \fBclock microseconds\fR is to be considered the preferred way of obtaining a count of microseconds. .RE .TP \fBclock format\fR \fItimeVal\fR ?\fI\-option value\fR...? Formats a time that is expressed as an integer number of seconds into a format |
︙ | ︙ | |||
112 113 114 115 116 117 118 | .PP On \fBclock format\fR, the default format is .PP .CS %a %b %d %H:%M:%S %z %Y .CE .PP | | | 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | .PP On \fBclock format\fR, the default format is .PP .CS %a %b %d %H:%M:%S %z %Y .CE .PP On \fBclock scan\fR, the lack of a \fB\-format\fR option indicates that a .QW "free format scan" is requested; see \fBFREE FORM SCAN\fR for a description of what happens. .RE .TP \fB\-gmt\fR boolean If \fIboolean\fR is true, specifies that a time specified to \fBclock add\fR, \fBclock format\fR or \fBclock scan\fR should be processed in |
︙ | ︙ | |||
900 901 902 903 904 905 906 | .QW T , .QW "\fICCyymmdd hhmmss\fR" , or .QW \fICCyymmdd\fBT\fIhh:mm:ss\fR . Note that only these three formats are accepted. The command does \fInot\fR accept the full range of point-in-time specifications specified in ISO8601. Other formats can be recognized by | | | 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 | .QW T , .QW "\fICCyymmdd hhmmss\fR" , or .QW \fICCyymmdd\fBT\fIhh:mm:ss\fR . Note that only these three formats are accepted. The command does \fInot\fR accept the full range of point-in-time specifications specified in ISO8601. Other formats can be recognized by giving an explicit \fB\-format\fR option to the \fBclock scan\fR command. .TP \fIrelative time\fR A specification relative to the current time. The format is \fBnumber unit\fR. Acceptable units are \fByear\fR, \fBfortnight\fR, \fBmonth\fR, \fBweek\fR, \fBday\fR, \fBhour\fR, \fBminute\fR (or \fBmin\fR), and \fBsecond\fR (or \fBsec\fR). The unit can be specified as a singular or plural, as in \fB3 weeks\fR. |
︙ | ︙ |
Changes to doc/continue.n.
︙ | ︙ | |||
14 15 16 17 18 19 20 | .SH SYNOPSIS \fBcontinue\fR .BE .SH DESCRIPTION .PP This command is typically invoked inside the body of a looping command such as \fBfor\fR or \fBforeach\fR or \fBwhile\fR. | | | | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | .SH SYNOPSIS \fBcontinue\fR .BE .SH DESCRIPTION .PP This command is typically invoked inside the body of a looping command such as \fBfor\fR or \fBforeach\fR or \fBwhile\fR. It returns a 4 (\fBTCL_CONTINUE\fR) result code, which causes a continue exception to occur. The exception causes the current script to be aborted out to the innermost containing loop command, which then continues with the next iteration of the loop. Catch exceptions are also handled in a few other situations, such as the \fBcatch\fR command and the outermost scripts of procedure bodies. .SH EXAMPLE |
︙ | ︙ |
Changes to doc/coroutine.n.
︙ | ︙ | |||
107 108 109 110 111 112 113 | for {set i 1} {$i <= 20} {incr i} { puts "prime#$i = [\fIeratosthenes\fR]" } .CE .SS "DETAILED SEMANTICS" .PP This example demonstrates that coroutines start from the global namespace, and | | | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | for {set i 1} {$i <= 20} {incr i} { puts "prime#$i = [\fIeratosthenes\fR]" } .CE .SS "DETAILED SEMANTICS" .PP This example demonstrates that coroutines start from the global namespace, and that \fIcommand\fR resolution happens before the coroutine stack is created. .PP .CS proc report {where level} { # Where was the caller called from? set ns [uplevel 2 {namespace current}] \fByield\fR "made $where $level context=$ns name=[info coroutine]" } |
︙ | ︙ |
Changes to doc/error.n.
︙ | ︙ | |||
35 36 37 38 39 40 41 | Historically, this feature had been most useful in conjunction with the \fBcatch\fR command: if a caught error cannot be handled successfully, \fIinfo\fR can be used to return a stack trace reflecting the original point of occurrence of the error: .PP .CS | | | | | | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | Historically, this feature had been most useful in conjunction with the \fBcatch\fR command: if a caught error cannot be handled successfully, \fIinfo\fR can be used to return a stack trace reflecting the original point of occurrence of the error: .PP .CS catch {...} errMsg set savedInfo $::errorInfo \&... \fBerror\fR $errMsg $savedInfo .CE .PP When working with Tcl 8.5 or later, the following code should be used instead: .PP .CS catch {...} errMsg options \&... return -options $options $errMsg .CE .PP If the \fIcode\fR argument is present, then its value is stored in the \fB\-errorcode\fR return option. The \fB\-errorcode\fR return option is intended to hold a machine-readable description of the error in cases where such information is available; see the \fBreturn\fR manual page for information on the proper format |
︙ | ︙ | |||
69 70 71 72 73 74 75 | \fBerror\fR "something is very wrong with addition" } .CE .SH "SEE ALSO" catch(n), return(n) .SH KEYWORDS error, exception | > > > | 69 70 71 72 73 74 75 76 77 78 | \fBerror\fR "something is very wrong with addition" } .CE .SH "SEE ALSO" catch(n), return(n) .SH KEYWORDS error, exception '\" Local Variables: '\" mode: nroff '\" End: |
Changes to doc/exec.n.
︙ | ︙ | |||
235 236 237 238 239 240 241 | .PP Additionally, when calling a 16-bit DOS or Windows 3.X application, all path names must use the short, cryptic, path format (e.g., using .QW applba~1.def instead of .QW applbakery.default ), which can be obtained with the | | | 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | .PP Additionally, when calling a 16-bit DOS or Windows 3.X application, all path names must use the short, cryptic, path format (e.g., using .QW applba~1.def instead of .QW applbakery.default ), which can be obtained with the .QW "\fBfile attributes\fI fileName \fB\-shortname\fR" command. .PP Two or more forward or backward slashes in a row in a path refer to a network path. For example, a simple concatenation of the root directory \fBc:/\fR with a subdirectory \fB/windows/system\fR will yield \fBc://windows/system\fR (two slashes together), which refers to the mount point called \fBsystem\fR on the machine called \fBwindows\fR (and the |
︙ | ︙ |
Changes to doc/expr.n.
︙ | ︙ | |||
24 25 26 27 28 29 30 | common to both Tcl and C, Tcl applies the same meaning and precedence as the corresponding C operators. Expressions almost always yield numeric results (integer or floating-point values). For example, the expression .PP .CS | | | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | common to both Tcl and C, Tcl applies the same meaning and precedence as the corresponding C operators. Expressions almost always yield numeric results (integer or floating-point values). For example, the expression .PP .CS \fBexpr\fR 8.2 + 6 .CE .PP evaluates to 14.2. Tcl expressions differ from C expressions in the way that operands are specified. Also, Tcl expressions support non-numeric operands and string comparisons, as well as some additional operators not found in C. |
︙ | ︙ | |||
64 65 66 67 68 69 70 | braces or with double quotes), then an operand is left as a string (and only a limited set of operators may be applied to it). .PP Operands may be specified in any of the following ways: .IP [1] As a numeric value, either integer or floating-point. .IP [2] | | > | 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | braces or with double quotes), then an operand is left as a string (and only a limited set of operators may be applied to it). .PP Operands may be specified in any of the following ways: .IP [1] As a numeric value, either integer or floating-point. .IP [2] As a boolean value, using any form understood by \fBstring is\fR \fBboolean\fR. .IP [3] As a Tcl variable, using standard \fB$\fR notation. The variable's value will be used as the operand. .IP [4] As a string enclosed in double-quotes. The expression parser will perform backslash, variable, and command substitutions on the information between the quotes, |
︙ | ︙ | |||
221 222 223 224 225 226 227 | .PP The \fB&&\fR, \fB||\fR, and \fB?:\fR operators have .QW "lazy evaluation" , just as in C, which means that operands are not evaluated if they are not needed to determine the outcome. For example, in the command .PP .CS | | | 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 | .PP The \fB&&\fR, \fB||\fR, and \fB?:\fR operators have .QW "lazy evaluation" , just as in C, which means that operands are not evaluated if they are not needed to determine the outcome. For example, in the command .PP .CS \fBexpr\fR {$v ? [a] : [b]} .CE .PP only one of .QW \fB[a]\fR or .QW \fB[b]\fR will actually be evaluated, |
︙ | ︙ | |||
244 245 246 247 248 249 250 | .PP When the expression parser encounters a mathematical function such as \fBsin($x)\fR, it replaces it with a call to an ordinary Tcl function in the \fBtcl::mathfunc\fR namespace. The processing of an expression such as: .PP .CS | | | | | 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | .PP When the expression parser encounters a mathematical function such as \fBsin($x)\fR, it replaces it with a call to an ordinary Tcl function in the \fBtcl::mathfunc\fR namespace. The processing of an expression such as: .PP .CS \fBexpr\fR {sin($x+$y)} .CE .PP is the same in every way as the processing of: .PP .CS \fBexpr\fR {[tcl::mathfunc::sin [\fBexpr\fR {$x+$y}]]} .CE .PP which in turn is the same as the processing of: .PP .CS tcl::mathfunc::sin [\fBexpr\fR {$x+$y}] .CE .PP The executor will search for \fBtcl::mathfunc::sin\fR using the usual rules for resolving functions in namespaces. Either \fB::tcl::mathfunc::sin\fR or \fB[namespace current]::tcl::mathfunc::sin\fR will satisfy the request, and others may as well (depending on the current \fBnamespace path\fR setting). |
︙ | ︙ | |||
331 332 333 334 335 336 337 | operand value is generated to compare with the string operand. Canonical string representation for integer values is a decimal string format. Canonical string representation for floating-point values is that produced by the \fB%g\fR format specifier of Tcl's \fBformat\fR command. For example, the commands .PP .CS | | | | 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 | operand value is generated to compare with the string operand. Canonical string representation for integer values is a decimal string format. Canonical string representation for floating-point values is that produced by the \fB%g\fR format specifier of Tcl's \fBformat\fR command. For example, the commands .PP .CS \fBexpr\fR {"0x03" > "2"} \fBexpr\fR {"0y" < "0x12"} .CE .PP both return 1. The first comparison is done using integer comparison, and the second is done using string comparison after the second operand is converted to the string \fB18\fR. Because of Tcl's tendency to treat values as numbers whenever possible, it is not generally a good idea to use operators like \fB==\fR |
︙ | ︙ | |||
354 355 356 357 358 359 360 | This allows the Tcl bytecode compiler to generate the best code. .PP As mentioned above, expressions are substituted twice: once by the Tcl parser and once by the \fBexpr\fR command. For example, the commands .PP .CS | | | | | 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 | This allows the Tcl bytecode compiler to generate the best code. .PP As mentioned above, expressions are substituted twice: once by the Tcl parser and once by the \fBexpr\fR command. For example, the commands .PP .CS set a 3 set b {$a + 2} \fBexpr\fR $b*4 .CE .PP return 11, not a multiple of 4. This is because the Tcl parser will first substitute \fB$a + 2\fR for the variable \fBb\fR, then the \fBexpr\fR command will evaluate the expression \fB$a + 2*4\fR. .PP |
︙ | ︙ | |||
440 441 442 443 444 445 446 | arithmetic, boolean, compare, expression, fuzzy comparison .SH COPYRIGHT .nf Copyright (c) 1993 The Regents of the University of California. Copyright (c) 1994-2000 Sun Microsystems Incorporated. Copyright (c) 2005 by Kevin B. Kenny <[email protected]>. All rights reserved. .fi | > > > | 441 442 443 444 445 446 447 448 449 450 | arithmetic, boolean, compare, expression, fuzzy comparison .SH COPYRIGHT .nf Copyright (c) 1993 The Regents of the University of California. Copyright (c) 1994-2000 Sun Microsystems Incorporated. Copyright (c) 2005 by Kevin B. Kenny <[email protected]>. All rights reserved. .fi '\" Local Variables: '\" mode: nroff '\" End: |
Changes to doc/file.n.
︙ | ︙ | |||
100 101 102 103 104 105 106 | overwritten unless the \fB\-force\fR option is specified (when Tcl will also attempt to adjust permissions on the destination file or directory if that is necessary to allow the copy to proceed). When copying within a single filesystem, \fIfile copy\fR will copy soft links (i.e. the links themselves are copied, not the things they point to). Trying to overwrite a non-empty directory, overwrite a directory with a file, or overwrite a file with a directory will all result in errors even if | | | 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | overwritten unless the \fB\-force\fR option is specified (when Tcl will also attempt to adjust permissions on the destination file or directory if that is necessary to allow the copy to proceed). When copying within a single filesystem, \fIfile copy\fR will copy soft links (i.e. the links themselves are copied, not the things they point to). Trying to overwrite a non-empty directory, overwrite a directory with a file, or overwrite a file with a directory will all result in errors even if \fB\-force\fR was specified. Arguments are processed in the order specified, halting at the first error, if any. A \fB\-\|\-\fR marks the end of switches; the argument following the \fB\-\|\-\fR will be treated as a \fIsource\fR even if it starts with a \fB\-\fR. .TP \fBfile delete \fR?\fB\-force\fR? ?\fB\-\|\-\fR? ?\fIpathname\fR ... ? . Removes the file or directory specified by each \fIpathname\fR |
︙ | ︙ | |||
134 135 136 137 138 139 140 | only contains one path element, then returns .QW \fB.\fR . If \fIname\fR refers to a root directory, then the root directory is returned. For example, .RS .PP .CS | | | | | 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | only contains one path element, then returns .QW \fB.\fR . If \fIname\fR refers to a root directory, then the root directory is returned. For example, .RS .PP .CS \fBfile dirname\fR c:/ .CE .PP returns \fBc:/\fR. .PP Note that tilde substitution will only be performed if it is necessary to complete the command. For example, .PP .CS \fBfile dirname\fR ~/src/foo.c .CE .PP returns \fB~/src\fR, whereas .PP .CS \fBfile dirname\fR ~ .CE .PP returns \fB/home\fR (or something similar). .RE .TP \fBfile executable \fIname\fR . |
︙ | ︙ | |||
189 190 191 192 193 194 195 | separator for the current platform. If a particular \fIname\fR is relative, then it will be joined to the previous file name argument. Otherwise, any earlier arguments will be discarded, and joining will proceed from the current argument. For example, .RS .PP .CS | | | 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 | separator for the current platform. If a particular \fIname\fR is relative, then it will be joined to the previous file name argument. Otherwise, any earlier arguments will be discarded, and joining will proceed from the current argument. For example, .RS .PP .CS \fBfile join\fR a b /foo bar .CE .PP returns \fB/foo/bar\fR. .PP Note that any of the names can contain separators, and that the result is always canonical for the current platform: \fB/\fR for Unix and Windows. |
︙ | ︙ | |||
223 224 225 226 227 228 229 | create a link in a cross-platform way, and does not care what type of link is created. .PP If the user wishes to make a link of a specific type only, (and signal an error if for some reason that is not possible), then the optional \fI\-linktype\fR argument should be given. Accepted values for \fI\-linktype\fR are | | | | 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 | create a link in a cross-platform way, and does not care what type of link is created. .PP If the user wishes to make a link of a specific type only, (and signal an error if for some reason that is not possible), then the optional \fI\-linktype\fR argument should be given. Accepted values for \fI\-linktype\fR are .QW \fB\-symbolic\fR and .QW \fB\-hard\fR . .PP On Unix, symbolic links can be made to relative paths, and those paths must be relative to the actual \fIlinkName\fR's location (not to the cwd), but on all other platforms where relative links are not supported, target paths will always be converted to absolute, normalized form before the link is created (and therefore relative paths are interpreted as relative to the cwd). Furthermore, |
︙ | ︙ | |||
376 377 378 379 380 381 382 | first element of the list will have the same path type as \fIname\fR. All other elements will be relative. Path separators will be discarded unless they are needed to ensure that an element is unambiguously relative. For example, under Unix .RS .PP .CS | | | 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 | first element of the list will have the same path type as \fIname\fR. All other elements will be relative. Path separators will be discarded unless they are needed to ensure that an element is unambiguously relative. For example, under Unix .RS .PP .CS \fBfile split\fR /foo/~bar/baz .CE .PP returns .QW \fB/\0\0foo\0\0./~bar\0\0baz\fR to ensure that later commands that use the third component do not attempt to perform tilde substitution. |
︙ | ︙ |
Changes to doc/fileevent.n.
︙ | ︙ | |||
119 120 121 122 123 124 125 | puts "[string length $data] $data" if {[eof $chan]} { fileevent $chan readable {} } } fconfigure $chan -blocking 0 -encoding binary | | | | 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | puts "[string length $data] $data" if {[eof $chan]} { fileevent $chan readable {} } } fconfigure $chan -blocking 0 -encoding binary \fBfileevent\fR $chan readable [list GetData $chan] .CE .PP The next example demonstrates use of \fBgets\fR to read line-oriented data. .PP .CS proc GetData {chan} { if {[gets $chan line] >= 0} { puts $line } if {[eof $chan]} { close $chan } } fconfigure $chan -blocking 0 -buffering line -translation crlf \fBfileevent\fR $chan readable [list GetData $chan] .CE .SH CREDITS .PP \fBfileevent\fR is based on the \fBaddinput\fR command created by Mark Diekhans. .SH "SEE ALSO" fconfigure(n), gets(n), interp(n), puts(n), read(n), Tcl_StandardChannels(3) .SH KEYWORDS asynchronous I/O, blocking, channel, event handler, nonblocking, readable, script, writable. |
Changes to doc/filename.n.
︙ | ︙ | |||
34 35 36 37 38 39 40 | qualified, either giving the path relative to the root directory on the current volume, or relative to the current directory of the specified volume. The \fBfile pathtype\fR command can be used to determine the type of a given path. .SH "PATH SYNTAX" .PP The rules for native names depend on the value reported in the Tcl | | | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | qualified, either giving the path relative to the root directory on the current volume, or relative to the current directory of the specified volume. The \fBfile pathtype\fR command can be used to determine the type of a given path. .SH "PATH SYNTAX" .PP The rules for native names depend on the value reported in the Tcl \fBplatform\fR element of the \fBtcl_platform\fR array: .TP 10 \fBUnix\fR On Unix and Apple MacOS X platforms, Tcl uses path names where the components are separated by slashes. Path names may be relative or absolute, and file names may contain any character other than slash. The file names \fB\&.\fR and \fB\&..\fR are special and refer to the current directory and the parent of the current directory respectively. |
︙ | ︙ |
Changes to doc/format.n.
︙ | ︙ | |||
137 138 139 140 141 142 143 | truncated to a 16-bit range before converting. This option is rarely useful. If it is \fBl\fR it specifies that the integer value is truncated to the same range as that produced by the \fBwide()\fR function of the \fBexpr\fR command (at least a 64-bit range). If neither \fBh\fR nor \fBl\fR are present, the integer value is truncated to the same range as that produced by the \fBint()\fR function of the \fBexpr\fR command (at least a 32-bit range, but | | > | 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | truncated to a 16-bit range before converting. This option is rarely useful. If it is \fBl\fR it specifies that the integer value is truncated to the same range as that produced by the \fBwide()\fR function of the \fBexpr\fR command (at least a 64-bit range). If neither \fBh\fR nor \fBl\fR are present, the integer value is truncated to the same range as that produced by the \fBint()\fR function of the \fBexpr\fR command (at least a 32-bit range, but determined by the value of the \fBwordSize\fR element of the \fBtcl_platform\fR array). .SS "MANDATORY CONVERSION TYPE" .PP The last thing in a conversion specifier is an alphabetic character that determines what kind of conversion to perform. The following conversion characters are currently supported: .TP 10 \fBd\fR |
︙ | ︙ |
Changes to doc/glob.n.
︙ | ︙ | |||
226 227 228 229 230 231 232 | .QW \fI\e*\fR will match the single character .QW \fI*\fR and will not be interpreted as a wildcard character. One solution to this problem is to use the Unix style forward slash as a path separator. Windows style paths can be converted to Unix style paths with the command | | | | 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 | .QW \fI\e*\fR will match the single character .QW \fI*\fR and will not be interpreted as a wildcard character. One solution to this problem is to use the Unix style forward slash as a path separator. Windows style paths can be converted to Unix style paths with the command .QW "\fBfile join\fR \fB$path\fR" or .QW "\fBfile normalize\fR \fB$path\fR" . .SH EXAMPLES .PP Find all the Tcl files in the current directory: .PP .CS \fBglob\fR *.tcl .CE |
︙ | ︙ |
Changes to doc/http.n.
︙ | ︙ | |||
12 13 14 15 16 17 18 | '\" Note: do not modify the .SH NAME line immediately below! .SH NAME http \- Client-side implementation of the HTTP/1.1 protocol .SH SYNOPSIS \fBpackage require http ?2.7?\fR .\" See Also -useragent option documentation in body! .sp | | | | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | '\" Note: do not modify the .SH NAME line immediately below! .SH NAME http \- Client-side implementation of the HTTP/1.1 protocol .SH SYNOPSIS \fBpackage require http ?2.7?\fR .\" See Also -useragent option documentation in body! .sp \fB::http::config ?\fI\-option value\fR ...? .sp \fB::http::geturl \fIurl\fR ?\fI\-option value\fR ...? .sp \fB::http::formatQuery\fR \fIkey value\fR ?\fIkey value\fR ...? .sp \fB::http::reset\fR \fItoken\fR ?\fIwhy\fR? .sp \fB::http::wait \fItoken\fR .sp |
︙ | ︙ | |||
45 46 47 48 49 50 51 | \fB::http::register \fIproto port command\fR .sp \fB::http::unregister \fIproto\fR .BE .SH DESCRIPTION .PP The \fBhttp\fR package provides the client side of the HTTP/1.1 | > | | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | \fB::http::register \fIproto port command\fR .sp \fB::http::unregister \fIproto\fR .BE .SH DESCRIPTION .PP The \fBhttp\fR package provides the client side of the HTTP/1.1 protocol, as defined in RFC 2616. The package implements the GET, POST, and HEAD operations of HTTP/1.1. It allows configuration of a proxy host to get through firewalls. The package is compatible with the \fBSafesock\fR security policy, so it can be used by untrusted applets to do URL fetching from a restricted set of hosts. This package can be extended to support additional HTTP transport protocols, such as HTTPS, by providing a custom \fBsocket\fR command, via \fB::http::register\fR. .PP |
︙ | ︙ |
Changes to doc/info.n.
︙ | ︙ | |||
503 504 505 506 507 508 509 | class named \fIclass\fR. .VE 8.6 .TP \fBinfo class subclasses\fI class\fR ?\fIpattern\fR? .VS 8.6 This subcommand returns a list of direct subclasses of class \fIclass\fR. If the optional \fIpattern\fR argument is present, it constrains the list of | | | | 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 | class named \fIclass\fR. .VE 8.6 .TP \fBinfo class subclasses\fI class\fR ?\fIpattern\fR? .VS 8.6 This subcommand returns a list of direct subclasses of class \fIclass\fR. If the optional \fIpattern\fR argument is present, it constrains the list of returned classes to those that match it according to the rules of \fBstring match\fR. .VE 8.6 .TP \fBinfo class superclasses\fI class\fR .VS 8.6 This subcommand returns a list of direct superclasses of class \fIclass\fR in inheritance precedence order. .VE 8.6 |
︙ | ︙ |
Changes to doc/interp.n.
︙ | ︙ | |||
57 58 59 60 61 62 63 | kernel call) between a slave interpreter and its master. See \fBALIAS INVOCATION\fR, below, for more details on how the alias mechanism works. .PP A qualified interpreter name is a proper Tcl lists containing a subset of its ancestors in the interpreter hierarchy, terminated by the string naming the interpreter in its immediate master. Interpreter names are relative to the | | > | > > > | > > > > | | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | kernel call) between a slave interpreter and its master. See \fBALIAS INVOCATION\fR, below, for more details on how the alias mechanism works. .PP A qualified interpreter name is a proper Tcl lists containing a subset of its ancestors in the interpreter hierarchy, terminated by the string naming the interpreter in its immediate master. Interpreter names are relative to the interpreter in which they are used. For example, if .QW \fBa\fR is a slave of the current interpreter and it has a slave .QW \fBa1\fR , which in turn has a slave .QW \fBa11\fR , the qualified name of .QW \fBa11\fR in .QW \fBa\fR is the list .QW "\fBa1 a11\fR" . .PP The \fBinterp\fR command, described below, accepts qualified interpreter names as arguments; the interpreter in which the command is being evaluated can always be referred to as \fB{}\fR (the empty list or string). Note that it is impossible to refer to a master (ancestor) interpreter by name in a slave interpreter except through aliases. Also, there is no global name by which one can refer to the first interpreter created in an application. |
︙ | ︙ | |||
104 105 106 107 108 109 110 | may be anywhere in the hierarchy of interpreters under the interpreter invoking the command. \fISrcPath\fR and \fIsrcCmd\fR identify the source of the alias. \fISrcPath\fR is a Tcl list whose elements select a particular interpreter. For example, .QW "\fBa b\fR" identifies an interpreter | > | > | | | | 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | may be anywhere in the hierarchy of interpreters under the interpreter invoking the command. \fISrcPath\fR and \fIsrcCmd\fR identify the source of the alias. \fISrcPath\fR is a Tcl list whose elements select a particular interpreter. For example, .QW "\fBa b\fR" identifies an interpreter .QW \fBb\fR , which is a slave of interpreter .QW \fBa\fR , which is a slave of the invoking interpreter. An empty list specifies the interpreter invoking the command. \fIsrcCmd\fR gives the name of a new command, which will be created in the source interpreter. \fITargetPath\fR and \fItargetCmd\fR specify a target interpreter and command, and the \fIarg\fR arguments, if any, specify additional arguments to \fItargetCmd\fR which are prepended to any arguments specified in the invocation of \fIsrcCmd\fR. \fITargetCmd\fR may be undefined at the time of this call, or it may already exist; it is not created by this command. The alias arranges for the given target command to be invoked |
︙ | ︙ | |||
180 181 182 183 184 185 186 | value such as \fB\-safe\fR. The result of the command is the name of the new interpreter. The name of a slave interpreter must be unique among all the slaves for its master; an error occurs if a slave interpreter by the given name already exists in this master. The initial recursion limit of the slave interpreter is set to the current recursion limit of its parent interpreter. .TP | | | < > | 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | value such as \fB\-safe\fR. The result of the command is the name of the new interpreter. The name of a slave interpreter must be unique among all the slaves for its master; an error occurs if a slave interpreter by the given name already exists in this master. The initial recursion limit of the slave interpreter is set to the current recursion limit of its parent interpreter. .TP \fBinterp\fR \fBdebug \fIpath\fR ?\fB\-frame\fR ?\fIbool\fR?? . Controls whether frame-level stack information is captured in the slave interpreter identified by \fIpath\fR. If no arguments are given, option and current setting are returned. If \fB\-frame\fR is given, the debug setting is set to the given boolean if provided and the current setting is returned. This only effects the output of \fBinfo frame\fR, in that exact frame-level information for command invocation at the bytecode level is only captured with this setting on. .RS .PP For example, with code like .PP .CS \fBproc\fR mycontrol {... script} { ... \fBuplevel\fR 1 $script ... |
︙ | ︙ | |||
328 329 330 331 332 333 334 | already trusted. .TP \fBinterp\fR \fBrecursionlimit\fR \fIpath\fR ?\fInewlimit\fR? . Returns the maximum allowable nesting depth for the interpreter specified by \fIpath\fR. If \fInewlimit\fR is specified, the interpreter recursion limit will be set so that nesting | | | 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 | already trusted. .TP \fBinterp\fR \fBrecursionlimit\fR \fIpath\fR ?\fInewlimit\fR? . Returns the maximum allowable nesting depth for the interpreter specified by \fIpath\fR. If \fInewlimit\fR is specified, the interpreter recursion limit will be set so that nesting of more than \fInewlimit\fR calls to \fBTcl_Eval\fR and related procedures in that interpreter will return an error. The \fInewlimit\fR value is also returned. The \fInewlimit\fR value must be a positive integer between 1 and the maximum value of a non-long integer on the platform. .RS .PP The command sets the maximum size of the Tcl call stack only. It cannot |
︙ | ︙ |
Changes to doc/lassign.n.
︙ | ︙ | |||
24 25 26 27 28 29 30 | unassigned elements is returned. .SH EXAMPLES .PP An illustration of how multiple assignment works, and what happens when there are either too few or too many elements. .PP .CS | | | | | | | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | unassigned elements is returned. .SH EXAMPLES .PP An illustration of how multiple assignment works, and what happens when there are either too few or too many elements. .PP .CS \fBlassign\fR {a b c} x y z ;# Empty return puts $x ;# Prints "a" puts $y ;# Prints "b" puts $z ;# Prints "c" \fBlassign\fR {d e} x y z ;# Empty return puts $x ;# Prints "d" puts $y ;# Prints "e" puts $z ;# Prints "" \fBlassign\fR {f g h i} x y ;# Returns "h i" puts $x ;# Prints "f" puts $y ;# Prints "g" .CE .PP The \fBlassign\fR command has other uses. It can be used to create the analogue of the .QW shift command in many shell languages like this: .PP .CS set ::argv [\fBlassign\fR $::argv argumentToReadOff] .CE .SH "SEE ALSO" lindex(n), list(n), lrange(n), lset(n), set(n) .SH KEYWORDS assign, element, list, multiple, set, variable '\"Local Variables: '\"mode: nroff '\"End: |
Changes to doc/lindex.n.
︙ | ︙ | |||
22 23 24 25 26 27 28 | the list. The indices may be presented either consecutively on the command line, or grouped in a Tcl list and presented as a single argument. .PP If no indices are presented, the command takes the form: .PP .CS | | | | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | the list. The indices may be presented either consecutively on the command line, or grouped in a Tcl list and presented as a single argument. .PP If no indices are presented, the command takes the form: .PP .CS \fBlindex \fIlist\fR .CE .PP or .PP .CS \fBlindex \fIlist\fR {} .CE .PP In this case, the return value of \fBlindex\fR is simply the value of the \fIlist\fR parameter. .PP When presented with a single index, the \fBlindex\fR command treats \fIlist\fR as a Tcl list and returns the |
︙ | ︙ | |||
53 54 55 56 57 58 59 | arithmetic and indices relative to the end of the list. .PP If additional \fIindex\fR arguments are supplied, then each argument is used in turn to select an element from the previous indexing operation, allowing the script to select elements from sublists. The command, .PP .CS | | | | | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | arithmetic and indices relative to the end of the list. .PP If additional \fIindex\fR arguments are supplied, then each argument is used in turn to select an element from the previous indexing operation, allowing the script to select elements from sublists. The command, .PP .CS \fBlindex\fR $a 1 2 3 .CE .PP or .PP .CS \fBlindex\fR $a {1 2 3} .CE .PP is synonymous with .PP .CS \fBlindex\fR [\fBlindex\fR [\fBlindex\fR $a 1] 2] 3 .CE .SH EXAMPLES .PP Lists can be indexed into from either end: .PP .CS \fBlindex\fR {a b c} 0 |
︙ | ︙ |
Changes to doc/lsearch.n.
︙ | ︙ | |||
157 158 159 160 161 162 163 | .TP \fB\-subindices\fR . If this option is given, the index result from this command (or every index result when \fB\-all\fR is also specified) will be a complete path (suitable for use with \fBlindex\fR or \fBlset\fR) within the overall list to the term found. This option has no effect unless the | | | 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | .TP \fB\-subindices\fR . If this option is given, the index result from this command (or every index result when \fB\-all\fR is also specified) will be a complete path (suitable for use with \fBlindex\fR or \fBlset\fR) within the overall list to the term found. This option has no effect unless the \fB\-index\fR is also specified, and is just a convenience short-cut. .SH EXAMPLES .PP Basic searching: .PP .CS \fBlsearch\fR {a b c d e} c \fI\(-> 2\fR |
︙ | ︙ |
Changes to doc/lset.n.
︙ | ︙ | |||
22 23 24 25 26 27 28 | command line, or grouped in a Tcl list and presented as a single argument. Finally, it accepts a new value for an element of \fIvarName\fR. .PP If no indices are presented, the command takes the form: .PP .CS | | | | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | command line, or grouped in a Tcl list and presented as a single argument. Finally, it accepts a new value for an element of \fIvarName\fR. .PP If no indices are presented, the command takes the form: .PP .CS \fBlset\fR varName newValue .CE .PP or .PP .CS \fBlset\fR varName {} newValue .CE .PP In this case, \fInewValue\fR replaces the old value of the variable \fIvarName\fR. .PP When presented with a single index, the \fBlset\fR command treats the content of the \fIvarName\fR variable as a Tcl list. |
︙ | ︙ | |||
64 65 66 67 68 69 70 | If additional \fIindex\fR arguments are supplied, then each argument is used in turn to address an element within a sublist designated by the previous indexing operation, allowing the script to alter elements in sublists (or append elements to sublists). The command, .PP .CS | | | | 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | If additional \fIindex\fR arguments are supplied, then each argument is used in turn to address an element within a sublist designated by the previous indexing operation, allowing the script to alter elements in sublists (or append elements to sublists). The command, .PP .CS \fBlset\fR a 1 2 newValue .CE .PP or .PP .CS \fBlset\fR a {1 2} newValue .CE .PP replaces element 2 of sublist 1 with \fInewValue\fR. .PP The integer appearing in each \fIindex\fR argument must be greater than or equal to zero. The integer appearing in each \fIindex\fR argument must be less than or equal to the length of the corresponding |
︙ | ︙ |
Changes to doc/lsort.n.
︙ | ︙ | |||
75 76 77 78 79 80 81 | . Return a list of indices into \fIlist\fR in sorted order instead of the values themselves. .TP \fB\-index\0\fIindexList\fR . If this option is specified, each of the elements of \fIlist\fR must | | | | | | 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | . Return a list of indices into \fIlist\fR in sorted order instead of the values themselves. .TP \fB\-index\0\fIindexList\fR . If this option is specified, each of the elements of \fIlist\fR must itself be a proper Tcl sublist (unless \fB\-stride\fR is used). Instead of sorting based on whole sublists, \fBlsort\fR will extract the \fIindexList\fR'th element from each sublist (as if the overall element and the \fIindexList\fR were passed to \fBlindex\fR) and sort based on the given element. For example, .RS .PP .CS \fBlsort\fR -integer -index 1 \e {{First 24} {Second 18} {Third 30}} .CE .PP returns \fB{Second 18} {First 24} {Third 30}\fR, .PP '\" '\" This example is from the test suite! '\" .CS \fBlsort\fR -index end-1 \e {{a 1 e i} {b 2 3 f g} {c 4 5 6 d h}} .CE .PP returns \fB{c 4 5 6 d h} {a 1 e i} {b 2 3 f g}\fR, and .PP .CS \fBlsort\fR -index {0 1} { {{b i g} 12345} {{d e m o} 34512} {{c o d e} 54321} } .CE .PP returns \fB{{d e m o} 34512} {{b i g} 12345} {{c o d e} 54321}\fR |
︙ | ︙ | |||
131 132 133 134 135 136 137 | .PP The list length must be an integer multiple of \fIstrideLength\fR, which in turn must be at least 2. .PP For example, .PP .CS | | | | | 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | .PP The list length must be an integer multiple of \fIstrideLength\fR, which in turn must be at least 2. .PP For example, .PP .CS \fBlsort\fR \-stride 2 {carrot 10 apple 50 banana 25} .CE .PP returns .QW "apple 50 banana 25 carrot 10" , and .PP .CS \fBlsort\fR \-stride 2 \-index 1 \-integer {carrot 10 apple 50 banana 25} .CE .PP returns .QW "carrot 10 banana 25 apple 50" . .RE .TP \fB\-nocase\fR . Causes comparisons to be handled in a case-insensitive manner. Has no effect if combined with the \fB\-dictionary\fR, \fB\-integer\fR, or \fB\-real\fR options. .TP \fB\-unique\fR . If this option is specified, then only the last set of duplicate elements found in the list will be retained. Note that duplicates are determined relative to the comparison used in the sort. Thus if \fB\-index 0\fR is used, \fB{1 a}\fR and \fB{1 b}\fR would be considered duplicates and only the second element, \fB{1 b}\fR, would be retained. .SH "NOTES" .PP The options to \fBlsort\fR only control what sort of comparison is used, and do not necessarily constrain what the values themselves actually are. This distinction is only noticeable when the list to be |
︙ | ︙ |
Changes to doc/mathfunc.n.
︙ | ︙ | |||
191 192 193 194 195 196 197 | \fBfmod \fIx y\fR . Returns the floating-point remainder of the division of \fIx\fR by \fIy\fR. If \fIy\fR is 0, an error is returned. .TP \fBhypot \fIx y\fR . | | > | > > | | | 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 | \fBfmod \fIx y\fR . Returns the floating-point remainder of the division of \fIx\fR by \fIy\fR. If \fIy\fR is 0, an error is returned. .TP \fBhypot \fIx y\fR . Computes the length of the hypotenuse of a right-angled triangle, approximately .QW "\fBsqrt\fR [\fBexpr\fR {\fIx\fB*\fIx\fB+\fIy\fB*\fIy\fR}]" except for being more numerically stable when the two arguments have substantially different magnitudes. .TP \fBint \fIarg\fR . The argument may be any numeric value. The integer part of \fIarg\fR is determined, and then the low order bits of that integer value up to the machine word size are returned as an integer value. For reference, the number of bytes in the machine word are stored in the \fBwordSize\fR element of the \fBtcl_platform\fR array. .TP \fBisqrt \fIarg\fR . Computes the integer part of the square root of \fIarg\fR. \fIArg\fR must be a positive value, either an integer or a floating point number. Unlike \fBsqrt\fR, which is limited to the precision of a floating point number, \fIisqrt\fR will return a result of arbitrary precision. |
︙ | ︙ |
Changes to doc/mathop.n.
︙ | ︙ | |||
129 130 131 132 133 134 135 | Returns the integral modulus of the first argument with respect to the second. Each \fInumber\fR must have an integral value. Note that Tcl defines this operation exactly even for negative numbers, so that the following equality holds true: .RS .PP .CS | | | 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | Returns the integral modulus of the first argument with respect to the second. Each \fInumber\fR must have an integral value. Note that Tcl defines this operation exactly even for negative numbers, so that the following equality holds true: .RS .PP .CS (\fIx \fB/ \fIy\fR) \fB* \fIy \fB== \fIx \fB\-\fR (\fIx \fB% \fIy\fR) .CE .RE .TP \fB**\fR ?\fInumber\fR ...? . Returns the result of raising each value to the power of the result of recursively operating on the result of processing the following arguments, so |
︙ | ︙ |
Changes to doc/next.n.
︙ | ︙ | |||
30 31 32 33 34 35 36 | of the next method in the method chain; if there are no further methods in the method chain, the result of \fBnext\fR will be an error. The arguments, \fIarg\fR, to \fBnext\fR are the arguments to pass to the next method in the chain. .PP The \fBnextto\fR command is the same as the \fBnext\fR command, except that it takes an additional \fIclass\fR argument that identifies a class whose | | | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | of the next method in the method chain; if there are no further methods in the method chain, the result of \fBnext\fR will be an error. The arguments, \fIarg\fR, to \fBnext\fR are the arguments to pass to the next method in the chain. .PP The \fBnextto\fR command is the same as the \fBnext\fR command, except that it takes an additional \fIclass\fR argument that identifies a class whose implementation of the current method chain (see \fBinfo object\fR \fBcall\fR) should be used; the method implementation selected will be the one provided by the given class, and it must refer to an existing non-filter invocation that lies further along the chain than the current implementation. .SH "THE METHOD CHAIN" .PP When a method of an object is invoked, things happen in several stages: .IP [1] |
︙ | ︙ |
Changes to doc/open.n.
︙ | ︙ | |||
63 64 65 66 67 68 69 | . Open the file for reading and writing. If the file does not exist, create a new empty file. Set the initial access position to the end of the file. .PP All of the legal \fIaccess\fR values above may have the character \fBb\fR added as the second or third character in the value to | | | | 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | . Open the file for reading and writing. If the file does not exist, create a new empty file. Set the initial access position to the end of the file. .PP All of the legal \fIaccess\fR values above may have the character \fBb\fR added as the second or third character in the value to indicate that the opened channel should be configured as if with the \fBfconfigure\fR \fB\-translation binary\fR option, making the channel suitable for reading or writing of binary data. .PP In the second form, \fIaccess\fR consists of a list of any of the following flags, all of which have the standard POSIX meanings. One of the flags must be either \fBRDONLY\fR, \fBWRONLY\fR or \fBRDWR\fR. .TP 15 \fBRDONLY\fR |
︙ | ︙ | |||
127 128 129 130 131 132 133 | If a new file is created as part of opening it, \fIpermissions\fR (an integer) is used to set the permissions for the new file in conjunction with the process's file mode creation mask. \fIPermissions\fR defaults to 0666. .SH "COMMAND PIPELINES" .PP If the first character of \fIfileName\fR is | | | > | | > | 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | If a new file is created as part of opening it, \fIpermissions\fR (an integer) is used to set the permissions for the new file in conjunction with the process's file mode creation mask. \fIPermissions\fR defaults to 0666. .SH "COMMAND PIPELINES" .PP If the first character of \fIfileName\fR is .QW \fB|\fR then the remaining characters of \fIfileName\fR are treated as a list of arguments that describe a command pipeline to invoke, in the same style as the arguments for \fBexec\fR. In this case, the channel identifier returned by \fBopen\fR may be used to write to the command's input pipe or read from its output pipe, depending on the value of \fIaccess\fR. If write-only access is used (e.g. \fIaccess\fR is .QW \fBw\fR ), then standard output for the pipeline is directed to the current standard output unless overridden by the command. If read-only access is used (e.g. \fIaccess\fR is .QW \fBr\fR ), standard input for the pipeline is taken from the current standard input unless overridden by the command. The id of the spawned process is accessible through the \fBpid\fR command, using the channel id returned by \fBopen\fR as argument. .PP If the command (or one of the commands) executed in the command pipeline returns an error (according to the definition in \fBexec\fR), |
︙ | ︙ | |||
267 268 269 270 271 272 273 | in the second form both input and output buffers are defined. .TP \fB\-lasterror\fR . (Windows only). This option is query only. In case of a serial communication error, \fBread\fR or \fBputs\fR returns a general Tcl file I/O error. | | | | | | | | | | | | | | | 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 | in the second form both input and output buffers are defined. .TP \fB\-lasterror\fR . (Windows only). This option is query only. In case of a serial communication error, \fBread\fR or \fBputs\fR returns a general Tcl file I/O error. \fBfconfigure\fR \fB\-lasterror\fR can be called to get a list of error details. See below for an explanation of the various error codes. .SH "SERIAL PORT SIGNALS" .PP RS-232 is the most commonly used standard electrical interface for serial communications. A negative voltage (-3V..-12V) define a mark (on=1) bit and a positive voltage (+3..+12V) define a space (off=0) bit (RS-232C). The following signals are specified for incoming and outgoing data, status lines and handshaking. Here we are using the terms \fIworkstation\fR for your computer and \fImodem\fR for the external device, because some signal names (DCD, RI) come from modems. Of course your external device may use these signal lines for other purposes. .IP \fBTXD\fR(output) \fBTransmitted Data:\fR Outgoing serial data. .IP \fBRXD\fR(input) \fBReceived Data:\fRIncoming serial data. .IP \fBRTS\fR(output) \fBRequest To Send:\fR This hardware handshake line informs the modem that your workstation is ready to receive data. Your workstation may automatically reset this signal to indicate that the input buffer is full. .IP \fBCTS\fR(input) \fBClear To Send:\fR The complement to RTS. Indicates that the modem is ready to receive data. .IP \fBDTR\fR(output) \fBData Terminal Ready:\fR This signal tells the modem that the workstation is ready to establish a link. DTR is often enabled automatically whenever a serial port is opened. .IP \fBDSR\fR(input) \fBData Set Ready:\fR The complement to DTR. Tells the workstation that the modem is ready to establish a link. .IP \fBDCD\fR(input) \fBData Carrier Detect:\fR This line becomes active when a modem detects a .QW Carrier signal. .IP \fBRI\fR(input) \fBRing Indicator:\fR Goes active when the modem detects an incoming call. .IP \fBBREAK\fR A BREAK condition is not a hardware signal line, but a logical zero on the TXD or RXD lines for a long period of time, usually 250 to 500 milliseconds. Normally a receive or transmit data signal stays at the mark (on=1) voltage until the next character is transferred. A BREAK is sometimes used to reset the communications line or change the operating mode of communications hardware. .SH "ERROR CODES (Windows only)" .PP A lot of different errors may occur during serial read operations or during event polling in background. The external device may have been switched off, the data lines may be noisy, system buffers may overrun or your mode settings may be wrong. That is why a reliable software should always \fBcatch\fR serial read operations. In cases of an error Tcl returns a general file I/O error. Then \fBfconfigure\fR \fB\-lasterror\fR may help to locate the problem. The following error codes may be returned. .TP 10 \fBRXOVER\fR . Windows input buffer overrun. The data comes faster than your scripts reads it or your system is overloaded. Use \fBfconfigure\fR \fB\-sysbuffer\fR to avoid a temporary bottleneck and/or make your script faster. .TP 10 \fBTXFULL\fR . Windows output buffer overrun. Complement to RXOVER. This error should practically not happen, because Tcl cares about the output buffer status. .TP 10 \fBOVERRUN\fR . UART buffer overrun (hardware) with data lost. The data comes faster than the system driver receives it. Check your advanced serial port settings to enable the FIFO (16550) buffer and/or setup a lower(1) interrupt threshold value. .TP 10 \fBRXPARITY\fR . A parity error has been detected by your UART. Wrong parity settings with \fBfconfigure\fR \fB\-mode\fR or a noisy data line (RXD) may cause this error. .TP 10 \fBFRAME\fR . A stop-bit error has been detected by your UART. Wrong mode settings with \fBfconfigure\fR \fB\-mode\fR or a noisy data line (RXD) may cause this error. .TP 10 \fBBREAK\fR . A BREAK condition has been detected by your UART (see above). .SH "PORTABILITY ISSUES" .TP |
︙ | ︙ | |||
454 455 456 457 458 459 460 | .CE .SH "SEE ALSO" file(n), close(n), filename(n), fconfigure(n), gets(n), read(n), puts(n), exec(n), pid(n), fopen(3) .SH KEYWORDS access mode, append, create, file, non-blocking, open, permissions, pipeline, process, serial | > > > | 456 457 458 459 460 461 462 463 464 465 | .CE .SH "SEE ALSO" file(n), close(n), filename(n), fconfigure(n), gets(n), read(n), puts(n), exec(n), pid(n), fopen(3) .SH KEYWORDS access mode, append, create, file, non-blocking, open, permissions, pipeline, process, serial '\"Local Variables: '\"mode: nroff '\"End: |
Changes to doc/package.n.
︙ | ︙ | |||
8 9 10 11 12 13 14 | .TH package n 7.5 Tcl "Tcl Built-In Commands" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME package \- Facilities for package loading and version control .SH SYNOPSIS .nf | | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | .TH package n 7.5 Tcl "Tcl Built-In Commands" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME package \- Facilities for package loading and version control .SH SYNOPSIS .nf \fBpackage forget\fR ?\fIpackage package ...\fR? \fBpackage ifneeded \fIpackage version\fR ?\fIscript\fR? \fBpackage names\fR \fBpackage present \fIpackage \fR?\fIrequirement...\fR? \fBpackage present \-exact \fIpackage version\fR \fBpackage provide \fIpackage \fR?\fIversion\fR? \fBpackage require \fIpackage \fR?\fIrequirement...\fR? \fBpackage require \-exact \fIpackage version\fR |
︙ | ︙ | |||
39 40 41 42 43 44 45 | Typically, only the \fBpackage require\fR and \fBpackage provide\fR commands are invoked in normal Tcl scripts; the other commands are used primarily by system scripts that maintain the package database. .PP The behavior of the \fBpackage\fR command is determined by its first argument. The following forms are permitted: .TP | | | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | Typically, only the \fBpackage require\fR and \fBpackage provide\fR commands are invoked in normal Tcl scripts; the other commands are used primarily by system scripts that maintain the package database. .PP The behavior of the \fBpackage\fR command is determined by its first argument. The following forms are permitted: .TP \fBpackage forget\fR ?\fIpackage package ...\fR? . Removes all information about each specified package from this interpreter, including information provided by both \fBpackage ifneeded\fR and \fBpackage provide\fR. .TP \fBpackage ifneeded \fIpackage version\fR ?\fIscript\fR? . |
︙ | ︙ | |||
171 172 173 174 175 176 177 | If \fIcommand\fR is specified as an empty string, then the current \fBpackage unknown\fR script is removed, if there is one. .TP \fBpackage vcompare \fIversion1 version2\fR . Compares the two version numbers given by \fIversion1\fR and \fIversion2\fR. Returns -1 if \fIversion1\fR is an earlier version than \fIversion2\fR, | | | 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 | If \fIcommand\fR is specified as an empty string, then the current \fBpackage unknown\fR script is removed, if there is one. .TP \fBpackage vcompare \fIversion1 version2\fR . Compares the two version numbers given by \fIversion1\fR and \fIversion2\fR. Returns -1 if \fIversion1\fR is an earlier version than \fIversion2\fR, 0 if they are equal, and 1 if \fIversion1\fR is later than \fIversion2\fR. .TP \fBpackage versions \fIpackage\fR . Returns a list of all the version numbers of \fIpackage\fR for which information has been provided by \fBpackage ifneeded\fR commands. .TP |
︙ | ︙ |
Changes to doc/packagens.n.
1 2 3 4 5 6 7 8 9 10 11 | '\" '\" Copyright (c) 1998-2000 by Scriptics Corporation. '\" All rights reserved. '\" .so man.macros .TH pkg::create n 8.3 Tcl "Tcl Built-In Commands" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME pkg::create \- Construct an appropriate 'package ifneeded' command for a given package specification .SH SYNOPSIS | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | '\" '\" Copyright (c) 1998-2000 by Scriptics Corporation. '\" All rights reserved. '\" .so man.macros .TH pkg::create n 8.3 Tcl "Tcl Built-In Commands" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME pkg::create \- Construct an appropriate 'package ifneeded' command for a given package specification .SH SYNOPSIS \fB::pkg::create\fR \fB\-name \fIpackageName \fB\-version \fIpackageVersion\fR ?\fB\-load \fIfilespec\fR? ... ?\fB\-source \fIfilespec\fR? ... .BE .SH DESCRIPTION .PP \fB::pkg::create\fR is a utility procedure that is part of the standard Tcl library. It is used to create an appropriate \fBpackage ifneeded\fR command for a given package specification. It can be used to construct a \fBpkgIndex.tcl\fR file for use with the \fBpackage\fR mechanism. .SH OPTIONS The parameters supported are: .TP \fB\-name \fIpackageName\fR This parameter specifies the name of the package. It is required. .TP \fB\-version \fIpackageVersion\fR This parameter specifies the version of the package. It is required. .TP \fB\-load \fIfilespec\fR This parameter specifies a binary library that must be loaded with the \fBload\fR command. \fIfilespec\fR is a list with two elements. The first element is the name of the file to load. The second, optional element is a list of commands supplied by loading that file. If the list of procedures is empty or omitted, \fB::pkg::create\fR will set up the library for direct loading (see \fBpkg_mkIndex\fR). Any number of \fB\-load\fR parameters may be specified. .TP \fB\-source \fIfilespec\fR This parameter is similar to the \fB\-load\fR parameter, except that it specifies a Tcl library that must be loaded with the \fBsource\fR command. Any number of \fB\-source\fR parameters may be specified. .PP At least one \fB\-load\fR or \fB\-source\fR parameter must be given. .SH "SEE ALSO" |
︙ | ︙ |
Changes to doc/pkgMkIndex.n.
︙ | ︙ | |||
8 9 10 11 12 13 14 | .TH pkg_mkIndex n 8.3 Tcl "Tcl Built-In Commands" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME pkg_mkIndex \- Build an index for automatic loading of packages .SH SYNOPSIS .nf | | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | .TH pkg_mkIndex n 8.3 Tcl "Tcl Built-In Commands" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME pkg_mkIndex \- Build an index for automatic loading of packages .SH SYNOPSIS .nf \fBpkg_mkIndex\fR ?\fIoptions...\fR? \fIdir\fR ?\fIpattern pattern ...\fR? .fi .BE .SH DESCRIPTION .PP \fBPkg_mkIndex\fR is a utility procedure that is part of the standard Tcl library. It is used to create index files that allow packages to be loaded |
︙ | ︙ | |||
149 150 151 152 153 154 155 | evaluates all of the \fBpkgIndex.tcl\fR files in the \fBauto_path\fR. The \fBpkgIndex.tcl\fR files contain \fBpackage ifneeded\fR commands for each version of each available package; these commands invoke \fBpackage provide\fR commands to announce the availability of the package, and they setup auto-loader information to load the files of the package. | | | | 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | evaluates all of the \fBpkgIndex.tcl\fR files in the \fBauto_path\fR. The \fBpkgIndex.tcl\fR files contain \fBpackage ifneeded\fR commands for each version of each available package; these commands invoke \fBpackage provide\fR commands to announce the availability of the package, and they setup auto-loader information to load the files of the package. If the \fB\-lazy\fR flag was provided when the \fBpkgIndex.tcl\fR was generated, a given file of a given version of a given package is not actually loaded until the first time one of its commands is invoked. Thus, after invoking \fBpackage require\fR you may not see the package's commands in the interpreter, but you will be able to invoke the commands and they will be auto-loaded. .SH "DIRECT LOADING" .PP Some packages, for instance packages which use namespaces and export commands or those which require special initialization, might select that their package files be loaded immediately upon \fBpackage require\fR instead of delaying the actual loading to the first use of one of the package's command. This is the default mode when generating the package index. It can be overridden by specifying the \fB\-lazy\fR argument. .SH "COMPLEX CASES" Most complex cases of dependencies among scripts and binary files, and packages being split among scripts and binary files are handled OK. However, you may have to adjust the order in which files are processed by \fBpkg_mkIndex\fR. These issues are described in detail below. .PP |
︙ | ︙ | |||
224 225 226 227 228 229 230 | If you must use \fB\-load\fR, then you must specify the scripts first; otherwise the package loaded from the binary file may mask the package defined by the scripts. .SH "SEE ALSO" package(n) .SH KEYWORDS auto-load, index, package, version | > > > | 224 225 226 227 228 229 230 231 232 233 | If you must use \fB\-load\fR, then you must specify the scripts first; otherwise the package loaded from the binary file may mask the package defined by the scripts. .SH "SEE ALSO" package(n) .SH KEYWORDS auto-load, index, package, version '\"Local Variables: '\"mode: nroff '\"End: |
Changes to doc/read.n.
︙ | ︙ | |||
50 51 52 53 54 55 56 | for the channel. See the \fBfconfigure\fR manual entry for a discussion on ways in which \fBfconfigure\fR will alter input. .SH "USE WITH SERIAL PORTS" '\" Note: this advice actually applies to many versions of Tcl .PP For most applications a channel connected to a serial port should be | | | > > > | 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | for the channel. See the \fBfconfigure\fR manual entry for a discussion on ways in which \fBfconfigure\fR will alter input. .SH "USE WITH SERIAL PORTS" '\" Note: this advice actually applies to many versions of Tcl .PP For most applications a channel connected to a serial port should be configured to be nonblocking: \fBfconfigure\fI channelId \fB\-blocking \fI0\fR. Then \fBread\fR behaves much like described above. Care must be taken when using \fBread\fR on blocking serial ports: .TP \fBread \fIchannelId numChars\fR . In this form \fBread\fR blocks until \fInumChars\fR have been received from the serial port. .TP \fBread \fIchannelId\fR . In this form \fBread\fR blocks until the reception of the end-of-file character, see \fBfconfigure\fR \fB\-eofchar\fR. If there no end-of-file character has been configured for the channel, then \fBread\fR will block forever. .SH "EXAMPLE" .PP This example code reads a file all at once, and splits it into a list, with each line in the file corresponding to an element in the list: .PP .CS set fl [open /proc/meminfo] set data [\fBread\fR $fl] close $fl set lines [split $data \en] .CE .SH "SEE ALSO" file(n), eof(n), fblocked(n), fconfigure(n), Tcl_StandardChannels(3) .SH KEYWORDS blocking, channel, end of line, end of file, nonblocking, read, translation, encoding '\"Local Variables: '\"mode: nroff '\"End: |
Changes to doc/refchan.n.
︙ | ︙ | |||
13 14 15 16 17 18 19 | .SH SYNOPSIS \fBcmdPrefix \fIoption\fR ?\fIarg arg ...\fR? .BE .SH DESCRIPTION .PP The Tcl-level handler for a reflected channel has to be a command with subcommands (termed an \fIensemble\fR, as it is a command such as that | | | | | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | .SH SYNOPSIS \fBcmdPrefix \fIoption\fR ?\fIarg arg ...\fR? .BE .SH DESCRIPTION .PP The Tcl-level handler for a reflected channel has to be a command with subcommands (termed an \fIensemble\fR, as it is a command such as that created by \fBnamespace ensemble\fR \fBcreate\fR, though the implementation of handlers for reflected channel \fIis not\fR tied to \fBnamespace ensemble\fRs in any way; see \fBEXAMPLE\fR below for how to build an \fBoo::class\fR that supports the API). Note that \fIcmdPrefix\fR is whatever was specified in the call to \fBchan create\fR, and may consist of multiple arguments; this will be expanded to multiple words in place of the prefix. .PP Of all the possible subcommands, the handler \fImust\fR support \fBinitialize\fR, \fBfinalize\fR, and \fBwatch\fR. Support for the other subcommands is optional. |
︙ | ︙ |
Changes to doc/registry.n.
︙ | ︙ | |||
99 100 101 102 103 104 105 | data, see \fBSUPPORTED TYPES\fR, below. .TP \fBregistry keys \fIkeyName\fR ?\fIpattern\fR? . If \fIpattern\fR is not specified, returns a list of names of all the subkeys of \fIkeyName\fR. If \fIpattern\fR is specified, only those names matching \fIpattern\fR are returned. Matching is determined | | | 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | data, see \fBSUPPORTED TYPES\fR, below. .TP \fBregistry keys \fIkeyName\fR ?\fIpattern\fR? . If \fIpattern\fR is not specified, returns a list of names of all the subkeys of \fIkeyName\fR. If \fIpattern\fR is specified, only those names matching \fIpattern\fR are returned. Matching is determined using the same rules as for \fBstring match\fR. If the specified \fIkeyName\fR does not exist, then an error is generated. .TP \fBregistry set \fIkeyName\fR ?\fIvalueName data \fR?\fItype\fR?? . If \fIvalueName\fR is not specified, creates the key \fIkeyName\fR if it does not already exist. If \fIvalueName\fR is specified, creates the key \fIkeyName\fR and value \fIvalueName\fR if necessary. The |
︙ | ︙ | |||
123 124 125 126 127 128 129 | \fBSUPPORTED TYPES\fR, below. .TP \fBregistry values \fIkeyName\fR ?\fIpattern\fR? . If \fIpattern\fR is not specified, returns a list of names of all the values of \fIkeyName\fR. If \fIpattern\fR is specified, only those names matching \fIpattern\fR are returned. Matching is determined | | | 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | \fBSUPPORTED TYPES\fR, below. .TP \fBregistry values \fIkeyName\fR ?\fIpattern\fR? . If \fIpattern\fR is not specified, returns a list of names of all the values of \fIkeyName\fR. If \fIpattern\fR is specified, only those names matching \fIpattern\fR are returned. Matching is determined using the same rules as for \fBstring match\fR. .SH "SUPPORTED TYPES" Each value under a key in the registry contains some data of a particular type in a type-specific representation. The \fBregistry\fR command converts between this internal representation and one that can be manipulated by Tcl scripts. In most cases, the data is simply returned as a Tcl string. The type indicates the intended use for the data, but does not actually change the representation. For some |
︙ | ︙ |
Changes to doc/return.n.
︙ | ︙ | |||
313 314 315 316 317 318 319 | } set options [dict merge {-level 1} $args] dict incr options -level \fBreturn\fR -options $options $result } .CE .SH "SEE ALSO" | | > | 313 314 315 316 317 318 319 320 321 322 323 324 325 326 | } set options [dict merge {-level 1} $args] dict incr options -level \fBreturn\fR -options $options $result } .CE .SH "SEE ALSO" break(n), catch(n), continue(n), dict(n), error(n), proc(n), source(n), tclvars(n), throw(n), try(n) .SH KEYWORDS break, catch, continue, error, exception, procedure, result, return .\" Local Variables: .\" mode: nroff .\" End: |
Changes to doc/safe.n.
︙ | ︙ | |||
72 73 74 75 76 77 78 | optional arguments. If the \fIslave\fR argument is omitted, a name will be generated. \fB::safe::interpCreate\fR always returns the interpreter name. .TP \fB::safe::interpInit\fR \fIslave\fR ?\fIoptions...\fR? This command is similar to \fBinterpCreate\fR except it that does not create the safe interpreter. \fIslave\fR must have been created by some | | | 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | optional arguments. If the \fIslave\fR argument is omitted, a name will be generated. \fB::safe::interpCreate\fR always returns the interpreter name. .TP \fB::safe::interpInit\fR \fIslave\fR ?\fIoptions...\fR? This command is similar to \fBinterpCreate\fR except it that does not create the safe interpreter. \fIslave\fR must have been created by some other means, like \fBinterp create\fR \fB\-safe\fR. .TP \fB::safe::interpConfigure\fR \fIslave\fR ?\fIoptions...\fR? If no \fIoptions\fR are given, returns the settings for all options for the named safe interpreter as a list of options and their current values for that \fIslave\fR. If a single additional argument is provided, it will return a list of 2 elements \fIname\fR and \fIvalue\fR where |
︙ | ︙ | |||
350 351 352 353 354 355 356 | an \fBauto_reset\fR is automatically evaluated in the safe interpreter to synchronize its \fBauto_index\fR with the new token list. .SH "SEE ALSO" interp(n), library(n), load(n), package(n), source(n), unknown(n) .SH KEYWORDS alias, auto\-loading, auto_mkindex, load, master interpreter, safe interpreter, slave interpreter, source | > > > | 350 351 352 353 354 355 356 357 358 359 | an \fBauto_reset\fR is automatically evaluated in the safe interpreter to synchronize its \fBauto_index\fR with the new token list. .SH "SEE ALSO" interp(n), library(n), load(n), package(n), source(n), unknown(n) .SH KEYWORDS alias, auto\-loading, auto_mkindex, load, master interpreter, safe interpreter, slave interpreter, source '\" Local Variables: '\" mode: nroff '\" End: |
Changes to doc/self.n.
︙ | ︙ | |||
25 26 27 28 29 30 31 | actually desired; if omitted the result will be the same as if \fBself object\fR was invoked. The supported subcommands are: .TP \fBself call\fR . This returns a two-element list describing the method implementations used to implement the current call chain. The first element is the same as would be | | | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | actually desired; if omitted the result will be the same as if \fBself object\fR was invoked. The supported subcommands are: .TP \fBself call\fR . This returns a two-element list describing the method implementations used to implement the current call chain. The first element is the same as would be reported by \fBinfo object\fR \fBcall\fR for the current method (except that this also reports useful values from within constructors and destructors, whose names are reported as \fB<constructor>\fR and \fB<destructor>\fR respectively), and the second element is an index into the first element's list that indicates which actual implementation is currently executing (the first implementation to execute is always at index 0). .TP \fBself caller\fR |
︙ | ︙ |
Changes to doc/socket.n.
︙ | ︙ | |||
84 85 86 87 88 89 90 | mode using: .RS .PP .CS \fBchan configure \fIchan \fB\-blocking 0\fR .CE .PP | | | 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | mode using: .RS .PP .CS \fBchan configure \fIchan \fB\-blocking 0\fR .CE .PP See the \fBchan configure\fR command for more details. The Tcl event loop should be running while an asynchronous connection is in progress, because it may have to do several connection attempts in the background. Runnig the event loop also allows you to set up a writable channel event on the socket to get notified when the asyncronous connection has succeeded or failed. See the \fBvwait\fR and the \fBchan\fR comands for more details on the event loop and |
︙ | ︙ | |||
165 166 167 168 169 170 171 | three elements, the address, the host name and the port number for the socket. If the host name cannot be computed, the second element is identical to the address, the first element of the list. For server sockets this option returns a list of a multiple of three elements each group of which have the same meaning as described above. The list contains more than one group when the server socket | | | | 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 | three elements, the address, the host name and the port number for the socket. If the host name cannot be computed, the second element is identical to the address, the first element of the list. For server sockets this option returns a list of a multiple of three elements each group of which have the same meaning as described above. The list contains more than one group when the server socket was created without \fB\-myaddr\fR or with the argument to \fB\-myaddr\fR being a domain name that resolves multiple IP addresses that are local to the invoking host. .TP \fB\-peername\fR . This option is not supported by server sockets. For client and accepted sockets, this option returns a list of three elements; these are the |
︙ | ︙ |
Changes to doc/tcltest.n.
︙ | ︙ | |||
28 29 30 31 32 33 34 | \fBtcltest::removeFile \fIname\fR ?\fIdirectory\fR? \fBtcltest::viewFile \fIname\fR ?\fIdirectory\fR? \fBtcltest::cleanupTests \fR?\fIrunningMultipleTests\fR? \fBtcltest::runAllTests\fR \fBtcltest::configure\fR \fBtcltest::configure \fI\-option\fR | | | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | \fBtcltest::removeFile \fIname\fR ?\fIdirectory\fR? \fBtcltest::viewFile \fIname\fR ?\fIdirectory\fR? \fBtcltest::cleanupTests \fR?\fIrunningMultipleTests\fR? \fBtcltest::runAllTests\fR \fBtcltest::configure\fR \fBtcltest::configure \fI\-option\fR \fBtcltest::configure \fI\-option value\fR ?\fI\-option value ...\fR? \fBtcltest::customMatch \fImode command\fR \fBtcltest::testConstraint \fIconstraint\fR ?\fIvalue\fR? \fBtcltest::outputChannel \fR?\fIchannelID\fR? \fBtcltest::errorChannel \fR?\fIchannelID\fR? \fBtcltest::interpreter \fR?\fIinterp\fR? \fBtcltest::debug \fR?\fIlevel\fR? |
︙ | ︙ | |||
86 87 88 89 90 91 92 | test suites. .PP See \fBCREATING TEST SUITES WITH TCLTEST\fR below for an extended example of how to use the commands of \fBtcltest\fR to produce test suites for your Tcl-enabled code. .SH COMMANDS .TP | | | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | test suites. .PP See \fBCREATING TEST SUITES WITH TCLTEST\fR below for an extended example of how to use the commands of \fBtcltest\fR to produce test suites for your Tcl-enabled code. .SH COMMANDS .TP \fBtest\fR \fIname description\fR ?\fI\-option value ...\fR? . Defines and possibly runs a test with the name \fIname\fR and description \fIdescription\fR. The name and description of a test are used in messages reported by \fBtest\fR during the test, as configured by the options of \fBtcltest\fR. The remaining \fIoption value\fR arguments to \fBtest\fR define the test, including the scripts to run, the conditions |
︙ | ︙ |
Changes to doc/tclvars.n.
︙ | ︙ | |||
98 99 100 101 102 103 104 | Tcl format, using .QW / as the path separator, regardless of platform. This variable is only used when initializing the \fBauto_path\fR variable. .TP \fBenv(TCL_INTERP_DEBUG_FRAME)\fR . | | > | 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | Tcl format, using .QW / as the path separator, regardless of platform. This variable is only used when initializing the \fBauto_path\fR variable. .TP \fBenv(TCL_INTERP_DEBUG_FRAME)\fR . If existing, it has the same effect as running \fBinterp debug\fR \fB{} -frame 1\fR as the very first command of each new Tcl interpreter. .RE .TP \fBerrorCode\fR . This variable holds the value of the \fB\-errorcode\fR return option set by the most recent error that occurred in this interpreter. |
︙ | ︙ | |||
480 481 482 483 484 485 486 487 488 489 490 491 492 493 | hold the version number for this version of Tcl in the form \fIx.y\fR. Changes to \fIx\fR represent major changes with probable incompatibilities and changes to \fIy\fR represent small enhancements and bug fixes that retain backward compatibility. The value of this variable is returned by the \fBinfo tclversion\fR command. .SH "OTHER GLOBAL VARIABLES" The following variables are only guaranteed to exist in \fBtclsh\fR and \fBwish\fR executables; the Tcl library does not define them itself but many Tcl environments do. .TP 6 \fBargc\fR . The number of arguments to \fBtclsh\fR or \fBwish\fR. | > | 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 | hold the version number for this version of Tcl in the form \fIx.y\fR. Changes to \fIx\fR represent major changes with probable incompatibilities and changes to \fIy\fR represent small enhancements and bug fixes that retain backward compatibility. The value of this variable is returned by the \fBinfo tclversion\fR command. .SH "OTHER GLOBAL VARIABLES" .PP The following variables are only guaranteed to exist in \fBtclsh\fR and \fBwish\fR executables; the Tcl library does not define them itself but many Tcl environments do. .TP 6 \fBargc\fR . The number of arguments to \fBtclsh\fR or \fBwish\fR. |
︙ | ︙ | |||
503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 | was invoked. .TP 6 \fBtcl_interactive\fR . Contains 1 if \fBtclsh\fR or \fBwish\fR is running interactively (no script was specified and standard input is a terminal-like device), 0 otherwise. .SH "SEE ALSO" eval(n), library(n), tclsh(1), tkvars(n), wish(1) .SH KEYWORDS arithmetic, bytecode, compiler, error, environment, POSIX, precision, subprocess, user, variables '\" Local Variables: '\" mode: nroff '\" End: | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 | was invoked. .TP 6 \fBtcl_interactive\fR . Contains 1 if \fBtclsh\fR or \fBwish\fR is running interactively (no script was specified and standard input is a terminal-like device), 0 otherwise. .SH EXAMPLES .PP To add a directory to the collection of locations searched by \fBpackage require\fR, e.g., because of some application-specific packages that are used, the \fBauto_path\fR variable needs to be updated: .PP .CS lappend ::\fBauto_path\fR [file join [pwd] "theLibDir"] .CE .PP A simple though not very robust way to handle command line arguments of the form .QW "\-foo 1 \-bar 2" is to load them into an array having first loaded in the default settings: .CS array set arguments {-foo 0 -bar 0 -grill 0} array set arguments $::\fBargv\fR puts "foo is $arguments(-foo)" puts "bar is $arguments(-bar)" puts "grill is $arguments(-grill)" .CE .PP The \fBargv0\fR global variable can be used (in conjunction with the \fBinfo script\fR command) to determine whether the current script is being executed as the main script or loaded as a library. This is useful because it allows a single script to be used as both a library and a demonstration of that library: .PP .CS if {$::\fBargv0\fR eq [info script]} { # running as: tclsh example.tcl } else { package provide Example 1.0 } .CE .SH "SEE ALSO" eval(n), library(n), tclsh(1), tkvars(n), wish(1) .SH KEYWORDS arithmetic, bytecode, compiler, error, environment, POSIX, precision, subprocess, user, variables '\" Local Variables: '\" mode: nroff '\" End: |
Changes to doc/throw.n.
︙ | ︙ | |||
36 37 38 39 40 41 42 | The following produces an error that is identical to that produced by \fBexpr\fR when trying to divide a value by zero. .PP .CS \fBthrow\fR {ARITH DIVZERO {divide by zero}} {divide by zero} .CE .SH "SEE ALSO" | | | 36 37 38 39 40 41 42 43 44 45 46 47 48 | The following produces an error that is identical to that produced by \fBexpr\fR when trying to divide a value by zero. .PP .CS \fBthrow\fR {ARITH DIVZERO {divide by zero}} {divide by zero} .CE .SH "SEE ALSO" catch(n), error(n), return(n), tclvars(n), try(n) .SH "KEYWORDS" error, exception '\" Local Variables: '\" mode: nroff '\" End: |
Changes to doc/transchan.n.
︙ | ︙ | |||
50 51 52 53 54 55 56 | if the interpreter is deleted. .TP \fIcmdPrefix \fBinitialize \fIhandle mode\fR . This mandatory subcommand is called first, and then never again (for the given \fIhandle\fR). Its responsibility is to initialize all parts of the transformation at the Tcl level. The \fImode\fR is a list containing any of | | | | 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | if the interpreter is deleted. .TP \fIcmdPrefix \fBinitialize \fIhandle mode\fR . This mandatory subcommand is called first, and then never again (for the given \fIhandle\fR). Its responsibility is to initialize all parts of the transformation at the Tcl level. The \fImode\fR is a list containing any of \fBread \fRand \fBwrite\fR. .RS .TP \fBwrite\fR . implies that the channel is writable. .TP \fBread\fR . implies that the channel is readable. .PP The return value of the subcommand should be a list containing the names of all subcommands supported by this handler. Any error thrown by the subcommand will prevent the creation of the transformation. The thrown error will appear as error thrown by \fBchan push\fR. .RE .SS "READ-RELATED SUBCOMMANDS" .PP These subcommands are used for handling transformations applied to readable channels; though strictly \fBread \fRis optional, it must be supported if any of the others is or the channel will be made non-readable. .TP \fIcmdPrefix \fBdrain \fIhandle\fR . This optional subcommand is called whenever data in the transformation input (i.e. read) buffer has to be forced upward, i.e. towards the user or script. The result returned by the method is taken as the \fIbinary\fR data to push |
︙ | ︙ |
Changes to doc/unset.n.
︙ | ︙ | |||
9 10 11 12 13 14 15 | .so man.macros .TH unset n 8.4 Tcl "Tcl Built-In Commands" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME unset \- Delete variables .SH SYNOPSIS | | | | | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | .so man.macros .TH unset n 8.4 Tcl "Tcl Built-In Commands" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME unset \- Delete variables .SH SYNOPSIS \fBunset \fR?\fB\-nocomplain\fR? ?\fB\-\-\fR? ?\fIname name name ...\fR? .BE .SH DESCRIPTION .PP This command removes one or more variables. Each \fIname\fR is a variable name, specified in any of the ways acceptable to the \fBset\fR command. If a \fIname\fR refers to an element of an array then that element is removed without affecting the rest of the array. If a \fIname\fR consists of an array name with no parenthesized index, then the entire array is deleted. The \fBunset\fR command returns an empty string as result. If \fB\-nocomplain\fR is specified as the first argument, any possible errors are suppressed. The option may not be abbreviated, in order to disambiguate it from possible variable names. The option \fB\-\-\fR indicates the end of the options, and should be used if you wish to remove a variable with the same name as any of the options. If an error occurs during variable deletion, any variables after the named one causing the error are not deleted. An error can occur when the named variable does not exist, or the name refers to an array element but the variable is a scalar, or the name refers to a variable in a non-existent namespace. |
︙ | ︙ |
Changes to doc/upvar.n.
︙ | ︙ | |||
17 18 19 20 21 22 23 | .SH DESCRIPTION .PP This command arranges for one or more local variables in the current procedure to refer to variables in an enclosing procedure call or to global variables. \fILevel\fR may have any of the forms permitted for the \fBuplevel\fR | | < | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | .SH DESCRIPTION .PP This command arranges for one or more local variables in the current procedure to refer to variables in an enclosing procedure call or to global variables. \fILevel\fR may have any of the forms permitted for the \fBuplevel\fR command, and may be omitted (it defaults to \fB1\fR). For each \fIotherVar\fR argument, \fBupvar\fR makes the variable by that name in the procedure frame given by \fIlevel\fR (or at global level, if \fIlevel\fR is \fB#0\fR) accessible in the current procedure by the name given in the corresponding \fImyVar\fR argument. The variable named by \fIotherVar\fR need not exist at the time of the call; it will be created the first time \fImyVar\fR is referenced, just like |
︙ | ︙ |
Changes to generic/tclAssembly.c.
︙ | ︙ | |||
1043 1044 1045 1046 1047 1048 1049 | if (parsePtr->numWords > 0) { /* * If tracing, show each line assembled as it happens. */ #ifdef TCL_COMPILE_DEBUG if ((tclTraceCompile >= 2) && (envPtr->procPtr == NULL)) { | | | | 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 | if (parsePtr->numWords > 0) { /* * If tracing, show each line assembled as it happens. */ #ifdef TCL_COMPILE_DEBUG if ((tclTraceCompile >= 2) && (envPtr->procPtr == NULL)) { printf(" %4ld Assembling: ", (long)(envPtr->codeNext - envPtr->codeStart)); TclPrintSource(stdout, parsePtr->commandStart, TclMin(instLen, 55)); printf("\n"); } #endif if (AssembleOneLine(assemEnvPtr) != TCL_OK) { if (flags & TCL_EVAL_DIRECT) { |
︙ | ︙ |
Changes to generic/tclBasic.c.
︙ | ︙ | |||
4051 4052 4053 4054 4055 4056 4057 | * * data[1] stores a marker for use by tailcalls; it will be set to 1 by * command redirectors (imports, alias, ensembles) so that tailcalls * finishes the source command and not just the target. */ if (iPtr->evalFlags & TCL_EVAL_REDIRECT) { | | | 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 | * * data[1] stores a marker for use by tailcalls; it will be set to 1 by * command redirectors (imports, alias, ensembles) so that tailcalls * finishes the source command and not just the target. */ if (iPtr->evalFlags & TCL_EVAL_REDIRECT) { TclNRAddCallback(interp, NRCommand, NULL, INT2PTR(1), INT2PTR(objc), objv); iPtr->evalFlags &= ~TCL_EVAL_REDIRECT; } else { TclNRAddCallback(interp, NRCommand, NULL, NULL, INT2PTR(objc), objv); } cmdPtrPtr = (Command **) &(TOP_CB(interp)->data[0]); TclNRSpliceDeferred(interp); |
︙ | ︙ |
Changes to generic/tclCkalloc.c.
︙ | ︙ | |||
181 182 183 184 185 186 187 | "current packets allocated %10d\n" "current bytes allocated %10lu\n" "maximum packets allocated %10d\n" "maximum bytes allocated %10lu\n", total_mallocs, total_frees, current_malloc_packets, | | | | 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | "current packets allocated %10d\n" "current bytes allocated %10lu\n" "maximum packets allocated %10d\n" "maximum bytes allocated %10lu\n", total_mallocs, total_frees, current_malloc_packets, (unsigned long)current_bytes_malloced, maximum_malloc_packets, (unsigned long)maximum_bytes_malloced); if (flags == 0) { fprintf((FILE *)clientData, "%s", buf); } else { /* Assume objPtr to append to */ Tcl_AppendToObj((Tcl_Obj *) clientData, buf, -1); } return 1; |
︙ | ︙ | |||
848 849 850 851 852 853 854 | return TCL_OK; } if (strcmp(argv[1],"info") == 0) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "%-25s %10d\n%-25s %10d\n%-25s %10d\n%-25s %10lu\n%-25s %10d\n%-25s %10lu\n", "total mallocs", total_mallocs, "total frees", total_frees, "current packets allocated", current_malloc_packets, | | | | 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 | return TCL_OK; } if (strcmp(argv[1],"info") == 0) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "%-25s %10d\n%-25s %10d\n%-25s %10d\n%-25s %10lu\n%-25s %10d\n%-25s %10lu\n", "total mallocs", total_mallocs, "total frees", total_frees, "current packets allocated", current_malloc_packets, "current bytes allocated", (unsigned long)current_bytes_malloced, "maximum packets allocated", maximum_malloc_packets, "maximum bytes allocated", (unsigned long)maximum_bytes_malloced)); return TCL_OK; } if (strcmp(argv[1],"init") == 0) { if (argc != 3) { goto bad_suboption; } init_malloced_bodies = (strcmp(argv[2],"on") == 0); |
︙ | ︙ |
Changes to generic/tclCompile.c.
︙ | ︙ | |||
599 600 601 602 603 604 605 | entryPtr = compEnv.literalArrayPtr; for (i = 0; i < compEnv.literalArrayNext; i++) { TclReleaseLiteral(interp, entryPtr->objPtr); entryPtr++; } #ifdef TCL_COMPILE_DEBUG | | | 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 | entryPtr = compEnv.literalArrayPtr; for (i = 0; i < compEnv.literalArrayNext; i++) { TclReleaseLiteral(interp, entryPtr->objPtr); entryPtr++; } #ifdef TCL_COMPILE_DEBUG TclVerifyGlobalLiteralTable((Interp *)interp); #endif /*TCL_COMPILE_DEBUG*/ auxDataPtr = compEnv.auxDataArrayPtr; for (i = 0; i < compEnv.auxDataArrayNext; i++) { if (auxDataPtr->type->freeProc != NULL) { auxDataPtr->type->freeProc(auxDataPtr->clientData); } |
︙ | ︙ | |||
749 750 751 752 753 754 755 | #ifdef TCL_COMPILE_STATS if (interp != NULL) { ByteCodeStats *statsPtr; Tcl_Time destroyTime; int lifetimeSec, lifetimeMicroSec, log2; | | | 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 | #ifdef TCL_COMPILE_STATS if (interp != NULL) { ByteCodeStats *statsPtr; Tcl_Time destroyTime; int lifetimeSec, lifetimeMicroSec, log2; statsPtr = &((Interp *)interp)->stats; statsPtr->numByteCodesFreed++; statsPtr->currentSrcBytes -= (double) codePtr->numSrcBytes; statsPtr->currentByteCodeBytes -= (double) codePtr->structureSize; statsPtr->currentInstBytes -= (double) codePtr->numCodeBytes; statsPtr->currentLitBytes -= (double) |
︙ | ︙ | |||
2070 2071 2072 2073 2074 2075 2076 | p += sizeof(ByteCode); codePtr->codeStart = p; memcpy(p, envPtr->codeStart, (size_t) codeBytes); p += TCL_ALIGN(codeBytes); /* align object array */ codePtr->objArrayPtr = (Tcl_Obj **) p; for (i = 0; i < numLitObjects; i++) { | > > > > > > > > > > > | > | 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 | p += sizeof(ByteCode); codePtr->codeStart = p; memcpy(p, envPtr->codeStart, (size_t) codeBytes); p += TCL_ALIGN(codeBytes); /* align object array */ codePtr->objArrayPtr = (Tcl_Obj **) p; for (i = 0; i < numLitObjects; i++) { if (objPtr == envPtr->literalArrayPtr[i].objPtr) { /* * Prevent circular reference where the bytecode intrep of * a value contains a literal which is that same value. * If this is allowed to happen, refcount decrements may not * reach zero, and memory may leak. Bugs 467523, 3357771 */ codePtr->objArrayPtr[i] = Tcl_DuplicateObj(objPtr); Tcl_IncrRefCount(codePtr->objArrayPtr[i]); Tcl_DecrRefCount(objPtr); } else { codePtr->objArrayPtr[i] = envPtr->literalArrayPtr[i].objPtr; } } p += TCL_ALIGN(objArrayBytes); /* align exception range array */ if (exceptArrayBytes > 0) { codePtr->exceptArrayPtr = (ExceptionRange *) p; memcpy(p, envPtr->exceptArrayPtr, (size_t) exceptArrayBytes); } else { |
︙ | ︙ | |||
2095 2096 2097 2098 2099 2100 2101 | p += auxDataArrayBytes; #ifndef TCL_COMPILE_DEBUG EncodeCmdLocMap(envPtr, codePtr, (unsigned char *) p); #else nextPtr = EncodeCmdLocMap(envPtr, codePtr, (unsigned char *) p); if (((size_t)(nextPtr - p)) != cmdLocBytes) { | | | 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 | p += auxDataArrayBytes; #ifndef TCL_COMPILE_DEBUG EncodeCmdLocMap(envPtr, codePtr, (unsigned char *) p); #else nextPtr = EncodeCmdLocMap(envPtr, codePtr, (unsigned char *) p); if (((size_t)(nextPtr - p)) != cmdLocBytes) { Tcl_Panic("TclInitByteCodeObj: encoded cmd location bytes %lu != expected size %lu", (unsigned long)(nextPtr - p), (unsigned long)cmdLocBytes); } #endif /* * Record various compilation-related statistics about the new ByteCode * structure. Don't include overhead for statistics-related fields. */ |
︙ | ︙ | |||
4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 | void RecordByteCodeStats( ByteCode *codePtr) /* Points to ByteCode structure with info * to add to accumulated statistics. */ { Interp *iPtr = (Interp *) *codePtr->interpHandle; register ByteCodeStats *statsPtr = &iPtr->stats; statsPtr->numCompilations++; statsPtr->totalSrcBytes += (double) codePtr->numSrcBytes; statsPtr->totalByteCodeBytes += (double) codePtr->structureSize; statsPtr->currentSrcBytes += (double) codePtr->numSrcBytes; statsPtr->currentByteCodeBytes += (double) codePtr->structureSize; | > > > > > | 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 | void RecordByteCodeStats( ByteCode *codePtr) /* Points to ByteCode structure with info * to add to accumulated statistics. */ { Interp *iPtr = (Interp *) *codePtr->interpHandle; register ByteCodeStats *statsPtr = &iPtr->stats; if (iPtr == NULL) { /* Avoid segfaulting in case we're called in a deleted interp */ return; } statsPtr->numCompilations++; statsPtr->totalSrcBytes += (double) codePtr->numSrcBytes; statsPtr->totalByteCodeBytes += (double) codePtr->structureSize; statsPtr->currentSrcBytes += (double) codePtr->numSrcBytes; statsPtr->currentByteCodeBytes += (double) codePtr->structureSize; |
︙ | ︙ |
Changes to generic/tclExecute.c.
︙ | ︙ | |||
330 331 332 333 334 335 336 | #define OBJ_AT_TOS *tosPtr #define OBJ_UNDER_TOS *(tosPtr-1) #define OBJ_AT_DEPTH(n) *(tosPtr-(n)) | | | 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 | #define OBJ_AT_TOS *tosPtr #define OBJ_UNDER_TOS *(tosPtr-1) #define OBJ_AT_DEPTH(n) *(tosPtr-(n)) #define CURR_DEPTH ((ptrdiff_t) (tosPtr - initTosPtr)) /* * Macros used to trace instruction execution. The macros TRACE, * TRACE_WITH_OBJ, and O2S are only used inside TclNRExecuteByteCode. O2S is * only used in TRACE* calls to get a string from an object. */ |
︙ | ︙ | |||
8254 8255 8256 8257 8258 8259 8260 | /* * Summary statistics, total and current source and ByteCode sizes. */ Tcl_AppendPrintfToObj(objPtr, "\n----------------------------------------------------------------\n"); Tcl_AppendPrintfToObj(objPtr, "Compilation and execution statistics for interpreter %#lx\n", | | | 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 | /* * Summary statistics, total and current source and ByteCode sizes. */ Tcl_AppendPrintfToObj(objPtr, "\n----------------------------------------------------------------\n"); Tcl_AppendPrintfToObj(objPtr, "Compilation and execution statistics for interpreter %#lx\n", (long int)iPtr); Tcl_AppendPrintfToObj(objPtr, "\nNumber ByteCodes executed\t%ld\n", statsPtr->numExecutions); Tcl_AppendPrintfToObj(objPtr, "Number ByteCodes compiled\t%ld\n", statsPtr->numCompilations); Tcl_AppendPrintfToObj(objPtr, " Mean executions/compile\t%.1f\n", statsPtr->numExecutions / (float)statsPtr->numCompilations); |
︙ | ︙ |
Changes to generic/tclIndexObj.c.
︙ | ︙ | |||
950 951 952 953 954 955 956 | } else { elementStr = TclGetStringFromObj(origObjv[i], &elemLen); } flags = 0; len = TclScanElement(elementStr, elemLen, &flags); if (MAY_QUOTE_WORD && len != elemLen) { | | > | 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 | } else { elementStr = TclGetStringFromObj(origObjv[i], &elemLen); } flags = 0; len = TclScanElement(elementStr, elemLen, &flags); if (MAY_QUOTE_WORD && len != elemLen) { char *quotedElementStr = TclStackAlloc(interp, (unsigned)len + 1); len = TclConvertElement(elementStr, elemLen, quotedElementStr, flags); Tcl_AppendToObj(objPtr, quotedElementStr, len); TclStackFree(interp, quotedElementStr); } else { Tcl_AppendToObj(objPtr, elementStr, elemLen); |
︙ | ︙ | |||
1005 1006 1007 1008 1009 1010 1011 | */ elementStr = TclGetStringFromObj(objv[i], &elemLen); flags = 0; len = TclScanElement(elementStr, elemLen, &flags); if (MAY_QUOTE_WORD && len != elemLen) { | | > | 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 | */ elementStr = TclGetStringFromObj(objv[i], &elemLen); flags = 0; len = TclScanElement(elementStr, elemLen, &flags); if (MAY_QUOTE_WORD && len != elemLen) { char *quotedElementStr = TclStackAlloc(interp, (unsigned) len + 1); len = TclConvertElement(elementStr, elemLen, quotedElementStr, flags); Tcl_AppendToObj(objPtr, quotedElementStr, len); TclStackFree(interp, quotedElementStr); } else { Tcl_AppendToObj(objPtr, elementStr, elemLen); |
︙ | ︙ |
Changes to generic/tclOO.c.
︙ | ︙ | |||
126 127 128 129 130 131 132 133 134 135 136 137 138 139 | DCM("create", 1, TclOO_Class_Create), DCM("new", 1, TclOO_Class_New), DCM("createWithNamespace", 0, TclOO_Class_CreateNs), {NULL, 0, {0, NULL, NULL, NULL, NULL}} }; static char initScript[] = "namespace eval ::oo { variable version " TCLOO_VERSION " };" "namespace eval ::oo { variable patchlevel " TCLOO_PATCHLEVEL " };"; /* "tcl_findLibrary tcloo $oo::version $oo::version" */ /* " tcloo.tcl OO_LIBRARY oo::library;"; */ MODULE_SCOPE const TclOOStubs tclOOStubs; | > | 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | DCM("create", 1, TclOO_Class_Create), DCM("new", 1, TclOO_Class_New), DCM("createWithNamespace", 0, TclOO_Class_CreateNs), {NULL, 0, {0, NULL, NULL, NULL, NULL}} }; static char initScript[] = "package ifneeded TclOO " TCLOO_PATCHLEVEL " {# Already present, OK?};" "namespace eval ::oo { variable version " TCLOO_VERSION " };" "namespace eval ::oo { variable patchlevel " TCLOO_PATCHLEVEL " };"; /* "tcl_findLibrary tcloo $oo::version $oo::version" */ /* " tcloo.tcl OO_LIBRARY oo::library;"; */ MODULE_SCOPE const TclOOStubs tclOOStubs; |
︙ | ︙ |
Changes to generic/tclOOCall.c.
︙ | ︙ | |||
1449 1450 1451 1452 1453 1454 1455 | descObjs[2] = miPtr->mPtr->declaringClassPtr ? Tcl_GetObjectName(interp, (Tcl_Object) miPtr->mPtr->declaringClassPtr->thisPtr) : objectLiteral; descObjs[3] = Tcl_NewStringObj(miPtr->mPtr->typePtr->name, -1); objv[i] = Tcl_NewListObj(4, descObjs); | < | 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 | descObjs[2] = miPtr->mPtr->declaringClassPtr ? Tcl_GetObjectName(interp, (Tcl_Object) miPtr->mPtr->declaringClassPtr->thisPtr) : objectLiteral; descObjs[3] = Tcl_NewStringObj(miPtr->mPtr->typePtr->name, -1); objv[i] = Tcl_NewListObj(4, descObjs); } /* * Drop the local references to the literals; if they're actually used, * they'll live on the description itself. */ |
︙ | ︙ |
Changes to generic/tclObj.c.
︙ | ︙ | |||
974 975 976 977 978 979 980 | /* * This macro declares a variable, so must come here... */ ObjInitDeletionContext(context); if (objPtr->refCount < -1) { | | | 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 | /* * This macro declares a variable, so must come here... */ ObjInitDeletionContext(context); if (objPtr->refCount < -1) { Tcl_Panic("Reference count for %p was negative", objPtr); } /* * Invalidate the string rep first so we can use the bytes value for our * pointer chain, and signal an obj deletion (as opposed to shimmering) * with 'length == -1'. */ |
︙ | ︙ | |||
3313 3314 3315 3316 3317 3318 3319 | /* * Check to make sure that the Tcl_Obj was allocated by the current * thread. Don't do this check when shutting down since thread local * storage can be finalized before the last Tcl_Obj is freed. */ if (!TclInExit()) { | > | < < | | < | | | 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 | /* * Check to make sure that the Tcl_Obj was allocated by the current * thread. Don't do this check when shutting down since thread local * storage can be finalized before the last Tcl_Obj is freed. */ if (!TclInExit()) { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); Tcl_HashTable *tablePtr = tsdPtr->objThreadMap; Tcl_HashEntry *hPtr; if (!tablePtr) { Tcl_Panic("object table not initialized"); } hPtr = Tcl_FindHashEntry(tablePtr, objPtr); if (!hPtr) { Tcl_Panic("Trying to %s of Tcl_Obj allocated in another thread", "incr ref count"); } } # endif /* TCL_THREADS */ #endif /* TCL_MEM_DEBUG */ ++(objPtr)->refCount; } /* *---------------------------------------------------------------------- * * Tcl_DbDecrRefCount -- |
︙ | ︙ | |||
3378 3379 3380 3381 3382 3383 3384 | /* * Check to make sure that the Tcl_Obj was allocated by the current * thread. Don't do this check when shutting down since thread local * storage can be finalized before the last Tcl_Obj is freed. */ if (!TclInExit()) { | > | < < | | < | | > | 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 | /* * Check to make sure that the Tcl_Obj was allocated by the current * thread. Don't do this check when shutting down since thread local * storage can be finalized before the last Tcl_Obj is freed. */ if (!TclInExit()) { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); Tcl_HashTable *tablePtr = tsdPtr->objThreadMap; Tcl_HashEntry *hPtr; if (!tablePtr) { Tcl_Panic("object table not initialized"); } hPtr = Tcl_FindHashEntry(tablePtr, objPtr); if (!hPtr) { Tcl_Panic("Trying to %s of Tcl_Obj allocated in another thread", "decr ref count"); } /* * If the Tcl_Obj is going to be deleted, remove the entry. */ if ((objPtr->refCount - 1) <= 0) { ObjData *objData = Tcl_GetHashValue(hPtr); if (objData != NULL) { ckfree(objData); } Tcl_DeleteHashEntry(hPtr); } } # endif /* TCL_THREADS */ #endif /* TCL_MEM_DEBUG */ if (--(objPtr)->refCount <= 0) { TclFreeObj(objPtr); } } /* *---------------------------------------------------------------------- |
︙ | ︙ | |||
3458 3459 3460 3461 3462 3463 3464 | /* * Check to make sure that the Tcl_Obj was allocated by the current * thread. Don't do this check when shutting down since thread local * storage can be finalized before the last Tcl_Obj is freed. */ if (!TclInExit()) { | > | | < | | < | | | | 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 | /* * Check to make sure that the Tcl_Obj was allocated by the current * thread. Don't do this check when shutting down since thread local * storage can be finalized before the last Tcl_Obj is freed. */ if (!TclInExit()) { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); Tcl_HashTable *tablePtr = tsdPtr->objThreadMap; Tcl_HashEntry *hPtr; if (!tablePtr) { Tcl_Panic("object table not initialized"); } hPtr = Tcl_FindHashEntry(tablePtr, objPtr); if (!hPtr) { Tcl_Panic("Trying to %s of Tcl_Obj allocated in another thread", "check shared status"); } } # endif /* TCL_THREADS */ #endif /* TCL_MEM_DEBUG */ #ifdef TCL_COMPILE_STATS Tcl_MutexLock(&tclObjMutex); if ((objPtr)->refCount <= 1) { tclObjsShared[1]++; } else if ((objPtr)->refCount < TCL_MAX_SHARED_OBJ_STATS) { tclObjsShared[(objPtr)->refCount]++; } else { tclObjsShared[0]++; } Tcl_MutexUnlock(&tclObjMutex); #endif /* TCL_COMPILE_STATS */ return ((objPtr)->refCount > 1); } /* *---------------------------------------------------------------------- * |
︙ | ︙ |
Changes to generic/tclPreserve.c.
︙ | ︙ | |||
364 365 366 367 368 369 370 | * dereferencing it will give NULL. */ { HandleStruct *handlePtr; handlePtr = (HandleStruct *) handle; #ifdef TCL_MEM_DEBUG if (handlePtr->refCount == 0x61616161) { | | | | 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 | * dereferencing it will give NULL. */ { HandleStruct *handlePtr; handlePtr = (HandleStruct *) handle; #ifdef TCL_MEM_DEBUG if (handlePtr->refCount == 0x61616161) { Tcl_Panic("using previously disposed TclHandle %p", handlePtr); } if (handlePtr->ptr2 != handlePtr->ptr) { Tcl_Panic("someone has changed the block referenced by the handle %p\nfrom %p to %p", handlePtr, handlePtr->ptr2, handlePtr->ptr); } #endif handlePtr->ptr = NULL; if (handlePtr->refCount == 0) { ckfree(handlePtr); } |
︙ | ︙ | |||
407 408 409 410 411 412 413 | * referenced by this handle. */ { HandleStruct *handlePtr; handlePtr = (HandleStruct *) handle; #ifdef TCL_MEM_DEBUG if (handlePtr->refCount == 0x61616161) { | | | | 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 | * referenced by this handle. */ { HandleStruct *handlePtr; handlePtr = (HandleStruct *) handle; #ifdef TCL_MEM_DEBUG if (handlePtr->refCount == 0x61616161) { Tcl_Panic("using previously disposed TclHandle %p", handlePtr); } if ((handlePtr->ptr != NULL) && (handlePtr->ptr != handlePtr->ptr2)) { Tcl_Panic("someone has changed the block referenced by the handle %p\nfrom %p to %p", handlePtr, handlePtr->ptr2, handlePtr->ptr); } #endif handlePtr->refCount++; return handle; } |
︙ | ︙ | |||
448 449 450 451 452 453 454 | * referenced by this handle. */ { HandleStruct *handlePtr; handlePtr = (HandleStruct *) handle; #ifdef TCL_MEM_DEBUG if (handlePtr->refCount == 0x61616161) { | | | | 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 | * referenced by this handle. */ { HandleStruct *handlePtr; handlePtr = (HandleStruct *) handle; #ifdef TCL_MEM_DEBUG if (handlePtr->refCount == 0x61616161) { Tcl_Panic("using previously disposed TclHandle %p", handlePtr); } if ((handlePtr->ptr != NULL) && (handlePtr->ptr != handlePtr->ptr2)) { Tcl_Panic("someone has changed the block referenced by the handle %p\nfrom %p to %p", handlePtr, handlePtr->ptr2, handlePtr->ptr); } #endif handlePtr->refCount--; if ((handlePtr->refCount == 0) && (handlePtr->ptr == NULL)) { ckfree(handlePtr); } |
︙ | ︙ |
Changes to generic/tclProc.c.
︙ | ︙ | |||
1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 | procPtr->firstLocalPtr = NULL; } procPtr->lastLocalPtr = lastPtr; while (clPtr) { CompiledLocal *toFree = clPtr; clPtr = clPtr->nextPtr; ckfree(toFree); } procPtr->numCompiledLocals = procPtr->numArgs; } TclPushStackFrame(interp, &framePtr, (Tcl_Namespace *) nsPtr, /* isProcCallFrame */ 0); | > > > > > > > | 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 | procPtr->firstLocalPtr = NULL; } procPtr->lastLocalPtr = lastPtr; while (clPtr) { CompiledLocal *toFree = clPtr; clPtr = clPtr->nextPtr; if (toFree->resolveInfo) { if (toFree->resolveInfo->deleteProc) { toFree->resolveInfo->deleteProc(toFree->resolveInfo); } else { ckfree(toFree->resolveInfo); } } ckfree(toFree); } procPtr->numCompiledLocals = procPtr->numArgs; } TclPushStackFrame(interp, &framePtr, (Tcl_Namespace *) nsPtr, /* isProcCallFrame */ 0); |
︙ | ︙ |
Changes to generic/tclUtil.c.
︙ | ︙ | |||
1257 1258 1259 1260 1261 1262 1263 | /* Escape leading hash as needed and requested. */ if ((*src == '#') && !(flags & TCL_DONT_QUOTE_HASH)) { if (conversion == CONVERT_ESCAPE) { p[0] = '\\'; p[1] = '#'; p += 2; src++; | | | 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 | /* Escape leading hash as needed and requested. */ if ((*src == '#') && !(flags & TCL_DONT_QUOTE_HASH)) { if (conversion == CONVERT_ESCAPE) { p[0] = '\\'; p[1] = '#'; p += 2; src++; length -= (length > 0); } else { conversion = CONVERT_BRACE; } } /* No escape or quoting needed. Copy the literal string value. */ if (conversion == CONVERT_NONE) { |
︙ | ︙ |
Added library/tzdata/America/Kralendijk.
> > > > > | 1 2 3 4 5 | # created by tools/tclZIC.tcl - do not edit if {![info exists TZData(America/Curacao)]} { LoadTimeZoneFile America/Curacao } set TZData(:America/Kralendijk) $TZData(:America/Curacao) |
Added library/tzdata/America/Lower_Princes.
> > > > > | 1 2 3 4 5 | # created by tools/tclZIC.tcl - do not edit if {![info exists TZData(America/Curacao)]} { LoadTimeZoneFile America/Curacao } set TZData(:America/Lower_Princes) $TZData(:America/Curacao) |
Changes to library/tzdata/Asia/Anadyr.
︙ | ︙ | |||
64 65 66 67 68 69 70 | {1206799200 46800 1 ANAST} {1224943200 43200 0 ANAT} {1238248800 46800 1 ANAST} {1256392800 43200 0 ANAT} {1269698400 39600 0 ANAMMTT} {1269702000 43200 1 ANAST} {1288450800 39600 0 ANAT} | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 64 65 66 67 68 69 70 71 72 | {1206799200 46800 1 ANAST} {1224943200 43200 0 ANAT} {1238248800 46800 1 ANAST} {1256392800 43200 0 ANAT} {1269698400 39600 0 ANAMMTT} {1269702000 43200 1 ANAST} {1288450800 39600 0 ANAT} {1301151600 43200 0 ANAT} } |
Changes to library/tzdata/Asia/Irkutsk.
︙ | ︙ | |||
63 64 65 66 67 68 69 | {1193508000 28800 0 IRKT} {1206813600 32400 1 IRKST} {1224957600 28800 0 IRKT} {1238263200 32400 1 IRKST} {1256407200 28800 0 IRKT} {1269712800 32400 1 IRKST} {1288461600 28800 0 IRKT} | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 63 64 65 66 67 68 69 70 71 | {1193508000 28800 0 IRKT} {1206813600 32400 1 IRKST} {1224957600 28800 0 IRKT} {1238263200 32400 1 IRKST} {1256407200 28800 0 IRKT} {1269712800 32400 1 IRKST} {1288461600 28800 0 IRKT} {1301162400 32400 0 IRKT} } |
Changes to library/tzdata/Asia/Kamchatka.
︙ | ︙ | |||
63 64 65 66 67 68 69 | {1206799200 46800 1 PETST} {1224943200 43200 0 PETT} {1238248800 46800 1 PETST} {1256392800 43200 0 PETT} {1269698400 39600 0 PETMMTT} {1269702000 43200 1 PETST} {1288450800 39600 0 PETT} | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 63 64 65 66 67 68 69 70 71 | {1206799200 46800 1 PETST} {1224943200 43200 0 PETT} {1238248800 46800 1 PETST} {1256392800 43200 0 PETT} {1269698400 39600 0 PETMMTT} {1269702000 43200 1 PETST} {1288450800 39600 0 PETT} {1301151600 43200 0 PETT} } |
Changes to library/tzdata/Asia/Krasnoyarsk.
︙ | ︙ | |||
62 63 64 65 66 67 68 | {1193511600 25200 0 KRAT} {1206817200 28800 1 KRAST} {1224961200 25200 0 KRAT} {1238266800 28800 1 KRAST} {1256410800 25200 0 KRAT} {1269716400 28800 1 KRAST} {1288465200 25200 0 KRAT} | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 62 63 64 65 66 67 68 69 70 | {1193511600 25200 0 KRAT} {1206817200 28800 1 KRAST} {1224961200 25200 0 KRAT} {1238266800 28800 1 KRAST} {1256410800 25200 0 KRAT} {1269716400 28800 1 KRAST} {1288465200 25200 0 KRAT} {1301166000 28800 0 KRAT} } |
Changes to library/tzdata/Asia/Magadan.
︙ | ︙ | |||
62 63 64 65 66 67 68 | {1193497200 39600 0 MAGT} {1206802800 43200 1 MAGST} {1224946800 39600 0 MAGT} {1238252400 43200 1 MAGST} {1256396400 39600 0 MAGT} {1269702000 43200 1 MAGST} {1288450800 39600 0 MAGT} | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 62 63 64 65 66 67 68 69 70 | {1193497200 39600 0 MAGT} {1206802800 43200 1 MAGST} {1224946800 39600 0 MAGT} {1238252400 43200 1 MAGST} {1256396400 39600 0 MAGT} {1269702000 43200 1 MAGST} {1288450800 39600 0 MAGT} {1301151600 43200 0 MAGT} } |
Changes to library/tzdata/Asia/Novokuznetsk.
︙ | ︙ | |||
63 64 65 66 67 68 69 | {1206817200 28800 1 KRAST} {1224961200 25200 0 KRAT} {1238266800 28800 1 KRAST} {1256410800 25200 0 KRAT} {1269716400 21600 0 NOVMMTT} {1269720000 25200 1 NOVST} {1288468800 21600 0 NOVT} | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 63 64 65 66 67 68 69 70 71 | {1206817200 28800 1 KRAST} {1224961200 25200 0 KRAT} {1238266800 28800 1 KRAST} {1256410800 25200 0 KRAT} {1269716400 21600 0 NOVMMTT} {1269720000 25200 1 NOVST} {1288468800 21600 0 NOVT} {1301169600 25200 0 NOVT} } |
Changes to library/tzdata/Asia/Novosibirsk.
︙ | ︙ | |||
63 64 65 66 67 68 69 | {1193515200 21600 0 NOVT} {1206820800 25200 1 NOVST} {1224964800 21600 0 NOVT} {1238270400 25200 1 NOVST} {1256414400 21600 0 NOVT} {1269720000 25200 1 NOVST} {1288468800 21600 0 NOVT} | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 63 64 65 66 67 68 69 70 71 | {1193515200 21600 0 NOVT} {1206820800 25200 1 NOVST} {1224964800 21600 0 NOVT} {1238270400 25200 1 NOVST} {1256414400 21600 0 NOVT} {1269720000 25200 1 NOVST} {1288468800 21600 0 NOVT} {1301169600 25200 0 NOVT} } |
Changes to library/tzdata/Asia/Omsk.
︙ | ︙ | |||
62 63 64 65 66 67 68 | {1193515200 21600 0 OMST} {1206820800 25200 1 OMSST} {1224964800 21600 0 OMST} {1238270400 25200 1 OMSST} {1256414400 21600 0 OMST} {1269720000 25200 1 OMSST} {1288468800 21600 0 OMST} | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 62 63 64 65 66 67 68 69 70 | {1193515200 21600 0 OMST} {1206820800 25200 1 OMSST} {1224964800 21600 0 OMST} {1238270400 25200 1 OMSST} {1256414400 21600 0 OMST} {1269720000 25200 1 OMSST} {1288468800 21600 0 OMST} {1301169600 25200 0 OMST} } |
Changes to library/tzdata/Asia/Sakhalin.
︙ | ︙ | |||
64 65 66 67 68 69 70 | {1193500800 36000 0 SAKT} {1206806400 39600 1 SAKST} {1224950400 36000 0 SAKT} {1238256000 39600 1 SAKST} {1256400000 36000 0 SAKT} {1269705600 39600 1 SAKST} {1288454400 36000 0 SAKT} | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 64 65 66 67 68 69 70 71 72 | {1193500800 36000 0 SAKT} {1206806400 39600 1 SAKST} {1224950400 36000 0 SAKT} {1238256000 39600 1 SAKST} {1256400000 36000 0 SAKT} {1269705600 39600 1 SAKST} {1288454400 36000 0 SAKT} {1301155200 39600 0 SAKT} } |
Changes to library/tzdata/Asia/Vladivostok.
︙ | ︙ | |||
62 63 64 65 66 67 68 | {1193500800 36000 0 VLAT} {1206806400 39600 1 VLAST} {1224950400 36000 0 VLAT} {1238256000 39600 1 VLAST} {1256400000 36000 0 VLAT} {1269705600 39600 1 VLAST} {1288454400 36000 0 VLAT} | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 62 63 64 65 66 67 68 69 70 | {1193500800 36000 0 VLAT} {1206806400 39600 1 VLAST} {1224950400 36000 0 VLAT} {1238256000 39600 1 VLAST} {1256400000 36000 0 VLAT} {1269705600 39600 1 VLAST} {1288454400 36000 0 VLAT} {1301155200 39600 0 VLAT} } |
Changes to library/tzdata/Asia/Yakutsk.
︙ | ︙ | |||
62 63 64 65 66 67 68 | {1193504400 32400 0 YAKT} {1206810000 36000 1 YAKST} {1224954000 32400 0 YAKT} {1238259600 36000 1 YAKST} {1256403600 32400 0 YAKT} {1269709200 36000 1 YAKST} {1288458000 32400 0 YAKT} | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 62 63 64 65 66 67 68 69 70 | {1193504400 32400 0 YAKT} {1206810000 36000 1 YAKST} {1224954000 32400 0 YAKT} {1238259600 36000 1 YAKST} {1256403600 32400 0 YAKT} {1269709200 36000 1 YAKST} {1288458000 32400 0 YAKT} {1301158800 36000 0 YAKT} } |
Changes to library/tzdata/Asia/Yekaterinburg.
︙ | ︙ | |||
62 63 64 65 66 67 68 | {1193518800 18000 0 YEKT} {1206824400 21600 1 YEKST} {1224968400 18000 0 YEKT} {1238274000 21600 1 YEKST} {1256418000 18000 0 YEKT} {1269723600 21600 1 YEKST} {1288472400 18000 0 YEKT} | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 62 63 64 65 66 67 68 69 70 | {1193518800 18000 0 YEKT} {1206824400 21600 1 YEKST} {1224968400 18000 0 YEKT} {1238274000 21600 1 YEKST} {1256418000 18000 0 YEKT} {1269723600 21600 1 YEKST} {1288472400 18000 0 YEKT} {1301173200 21600 0 YEKT} } |
Changes to library/tzdata/Europe/Kaliningrad.
︙ | ︙ | |||
76 77 78 79 80 81 82 | {1193529600 7200 0 EET} {1206835200 10800 1 EEST} {1224979200 7200 0 EET} {1238284800 10800 1 EEST} {1256428800 7200 0 EET} {1269734400 10800 1 EEST} {1288483200 7200 0 EET} | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 76 77 78 79 80 81 82 83 84 | {1193529600 7200 0 EET} {1206835200 10800 1 EEST} {1224979200 7200 0 EET} {1238284800 10800 1 EEST} {1256428800 7200 0 EET} {1269734400 10800 1 EEST} {1288483200 7200 0 EET} {1301184000 10800 0 EET} } |
Changes to library/tzdata/Europe/Moscow.
︙ | ︙ | |||
75 76 77 78 79 80 81 | {1193526000 10800 0 MSK} {1206831600 14400 1 MSD} {1224975600 10800 0 MSK} {1238281200 14400 1 MSD} {1256425200 10800 0 MSK} {1269730800 14400 1 MSD} {1288479600 10800 0 MSK} | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 75 76 77 78 79 80 81 82 83 | {1193526000 10800 0 MSK} {1206831600 14400 1 MSD} {1224975600 10800 0 MSK} {1238281200 14400 1 MSD} {1256425200 10800 0 MSK} {1269730800 14400 1 MSD} {1288479600 10800 0 MSK} {1301180400 14400 0 MSK} } |
Changes to library/tzdata/Europe/Samara.
︙ | ︙ | |||
65 66 67 68 69 70 71 | {1206828000 18000 1 SAMST} {1224972000 14400 0 SAMT} {1238277600 18000 1 SAMST} {1256421600 14400 0 SAMT} {1269727200 10800 0 SAMMMTT} {1269730800 14400 1 SAMST} {1288479600 10800 0 SAMT} | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 65 66 67 68 69 70 71 72 73 | {1206828000 18000 1 SAMST} {1224972000 14400 0 SAMT} {1238277600 18000 1 SAMST} {1256421600 14400 0 SAMT} {1269727200 10800 0 SAMMMTT} {1269730800 14400 1 SAMST} {1288479600 10800 0 SAMT} {1301180400 14400 0 SAMT} } |
Changes to library/tzdata/Europe/Volgograd.
︙ | ︙ | |||
62 63 64 65 66 67 68 | {1193526000 10800 0 VOLT} {1206831600 14400 1 VOLST} {1224975600 10800 0 VOLT} {1238281200 14400 1 VOLST} {1256425200 10800 0 VOLT} {1269730800 14400 1 VOLST} {1288479600 10800 0 VOLT} | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 62 63 64 65 66 67 68 69 70 | {1193526000 10800 0 VOLT} {1206831600 14400 1 VOLST} {1224975600 10800 0 VOLT} {1238281200 14400 1 VOLST} {1256425200 10800 0 VOLT} {1269730800 14400 1 VOLST} {1288479600 10800 0 VOLT} {1301180400 14400 0 VOLT} } |
Changes to tests/assemble.test.
︙ | ︙ | |||
763 764 765 766 767 768 769 | assemble { push NaN; uplus } } -returnCodes error -result {can't use non-numeric floating-point value as operand of "+"} } | | | 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 | assemble { push NaN; uplus } } -returnCodes error -result {can't use non-numeric floating-point value as operand of "+"} } test assemble-7.43.1 {tryCvtToNumeric} { -body { assemble { push NaN; tryCvtToNumeric } } -returnCodes error -result {domain error: argument not in valid range} |
︙ | ︙ | |||
1558 1559 1560 1561 1562 1563 1564 | } test assemble-15.6 {listIndexImm} { -body { assemble {push {a b c}; listIndexImm end-1} } -result b } | | | 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 | } test assemble-15.6 {listIndexImm} { -body { assemble {push {a b c}; listIndexImm end-1} } -result b } test assemble-15.7 {listIndexImm} { -body { assemble {push {a b c}; listIndexImm end} } -result c } # assemble-16 - invokeStk |
︙ | ︙ |
Changes to tests/chanio.test.
︙ | ︙ | |||
7716 7717 7718 7719 7720 7721 7722 | chan close [lreplace [list a] 0 end] } -returnCodes error -match glob -result * # ### ### ### ######### ######### ######### # cleanup foreach file [list fooBar longfile script output test1 pipe my_script \ | | | 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 | chan close [lreplace [list a] 0 end] } -returnCodes error -match glob -result * # ### ### ### ######### ######### ######### # cleanup foreach file [list fooBar longfile script output test1 pipe my_script \ test2 test3 cat kyrillic.txt utf8-fcopy.txt utf8-rp.txt] { removeFile $file } cleanupTests } namespace delete ::tcl::test::io |
Changes to tests/coroutine.test.
︙ | ︙ | |||
452 453 454 455 456 457 458 459 460 461 462 463 464 465 | coroutine D eval {yield X$x;yield Y$x} } } -body { set ::x 15 set ::x [f 12] D } -cleanup { unset ::x rename f {} } -result YX15 test coroutine-5.1 {right numLevels on coro return} -constraints {testnrelevels} \ -setup { proc nestedYield {{val {}}} { | > | 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 | coroutine D eval {yield X$x;yield Y$x} } } -body { set ::x 15 set ::x [f 12] D } -cleanup { D unset ::x rename f {} } -result YX15 test coroutine-5.1 {right numLevels on coro return} -constraints {testnrelevels} \ -setup { proc nestedYield {{val {}}} { |
︙ | ︙ |
Changes to tests/encoding.test.
1 | # This file contains a collection of tests for tclEncoding.c | | | | | < > | | < > > > > < | | | > > < | | > | > < | | > | > < | | < < > > > > > < | | > | > < | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | # This file contains a collection of tests for tclEncoding.c # Sourcing this file into Tcl runs the tests and generates output for errors. # No output means no errors were found. # # Copyright (c) 1997 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. package require tcltest 2 namespace eval ::tcl::test::encoding { variable x namespace import -force ::tcltest::* proc toutf {args} { variable x lappend x "toutf $args" } proc fromutf {args} { variable x lappend x "fromutf $args" } proc runtests {} { variable x # Some tests require the testencoding command testConstraint testencoding [llength [info commands testencoding]] testConstraint exec [llength [info commands exec]] testConstraint testgetdefenc [llength [info commands testgetdefenc]] # TclInitEncodingSubsystem is tested by the rest of this file # TclFinalizeEncodingSubsystem is not currently tested test encoding-1.1 {Tcl_GetEncoding: system encoding} -setup { set old [encoding system] } -constraints {testencoding} -body { testencoding create foo [namespace origin toutf] [namespace origin fromutf] encoding system foo set x {} encoding convertto abcd return $x } -cleanup { encoding system $old testencoding delete foo } -result {{fromutf }} test encoding-1.2 {Tcl_GetEncoding: existing encoding} {testencoding} { testencoding create foo [namespace origin toutf] [namespace origin fromutf] set x {} encoding convertto foo abcd testencoding delete foo return $x } {{fromutf }} test encoding-1.3 {Tcl_GetEncoding: load encoding} { list [encoding convertto jis0208 \u4e4e] \ [encoding convertfrom jis0208 8C] } "8C \u4e4e" test encoding-2.1 {Tcl_FreeEncoding: refcount == 0} { encoding convertto jis0208 \u4e4e } {8C} test encoding-2.2 {Tcl_FreeEncoding: refcount != 0} -setup { set system [encoding system] set path [encoding dirs] } -constraints {testencoding} -body { encoding system shiftjis ;# incr ref count encoding dirs [list [pwd]] set x [encoding convertto shiftjis \u4e4e] ;# old one found encoding system identity llength shiftjis ;# Shimmer away any cache of Tcl_Encoding lappend x [catch {encoding convertto shiftjis \u4e4e} msg] $msg } -cleanup { encoding system identity encoding dirs $path encoding system $system } -result "\u008c\u00c1 1 {unknown encoding \"shiftjis\"}" test encoding-3.1 {Tcl_GetEncodingName, NULL} -setup { set old [encoding system] } -body { encoding system shiftjis encoding system } -cleanup { encoding system $old } -result {shiftjis} test encoding-3.2 {Tcl_GetEncodingName, non-null} -setup { set old [fconfigure stdout -encoding] } -body { fconfigure stdout -encoding jis0208 fconfigure stdout -encoding } -cleanup { fconfigure stdout -encoding $old } -result {jis0208} test encoding-4.1 {Tcl_GetEncodingNames} -constraints {testencoding} -setup { cd [makeDirectory tmp] makeDirectory [file join tmp encoding] set path [encoding dirs] encoding dirs {} catch {unset encodings} catch {unset x} } -body { foreach encoding [encoding names] { set encodings($encoding) 1 } makeFile {} [file join tmp encoding junk.enc] makeFile {} [file join tmp encoding junk2.enc] encoding dirs [list [file join [pwd] encoding]] foreach encoding [encoding names] { if {![info exists encodings($encoding)]} { lappend x $encoding } } lsort $x } -cleanup { encoding dirs $path cd [workingDirectory] removeFile [file join tmp encoding junk2.enc] removeFile [file join tmp encoding junk.enc] removeDirectory [file join tmp encoding] removeDirectory tmp } -result {junk junk2} test encoding-5.1 {Tcl_SetSystemEncoding} -setup { set old [encoding system] } -body { encoding system jis0208 encoding convertto \u4e4e } -cleanup { encoding system identity encoding system $old } -result {8C} test encoding-5.2 {Tcl_SetSystemEncoding: test ref count} { set old [encoding system] encoding system $old string compare $old [encoding system] } {0} test encoding-6.1 {Tcl_CreateEncoding: new} {testencoding} { testencoding create foo [namespace code {toutf 1}] \ [namespace code {fromutf 2}] set x {} encoding convertfrom foo abcd encoding convertto foo abcd testencoding delete foo return $x } {{toutf 1} {fromutf 2}} test encoding-6.2 {Tcl_CreateEncoding: replace encoding} {testencoding} { testencoding create foo [namespace code {toutf a}] \ [namespace code {fromutf b}] set x {} encoding convertfrom foo abcd encoding convertto foo abcd testencoding delete foo return $x } {{toutf a} {fromutf b}} test encoding-7.1 {Tcl_ExternalToUtfDString: small buffer} { encoding convertfrom jis0208 8c8c8c8c } "\u543e\u543e\u543e\u543e" test encoding-7.2 {Tcl_UtfToExternalDString: big buffer} { set a 8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C |
︙ | ︙ | |||
169 170 171 172 173 174 175 | puts -nonewline $f "ab\x8c\xc1g" close $f set f [open [file join [temporaryDirectory] dummy] r] fconfigure $f -translation binary -encoding shiftjis set x [read $f] close $f file delete [file join [temporaryDirectory] dummy] | | | 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 | puts -nonewline $f "ab\x8c\xc1g" close $f set f [open [file join [temporaryDirectory] dummy] r] fconfigure $f -translation binary -encoding shiftjis set x [read $f] close $f file delete [file join [temporaryDirectory] dummy] return $x } "ab\u4e4eg" test encoding-9.1 {Tcl_UtfToExternalDString: small buffer} { encoding convertto jis0208 "\u543e\u543e\u543e\u543e" } {8c8c8c8c} test encoding-9.2 {Tcl_UtfToExternalDString: big buffer} { set a \u4e4e\u4e4e\u4e4e\u4e4e\u4e4e\u4e4e\u4e4e\u4e4e |
︙ | ︙ | |||
197 198 199 200 201 202 203 | puts -nonewline $f "ab\u4e4eg" close $f set f [open [file join [temporaryDirectory] dummy] r] fconfigure $f -translation binary -encoding iso8859-1 set x [read $f] close $f file delete [file join [temporaryDirectory] dummy] | | | 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 | puts -nonewline $f "ab\u4e4eg" close $f set f [open [file join [temporaryDirectory] dummy] r] fconfigure $f -translation binary -encoding iso8859-1 set x [read $f] close $f file delete [file join [temporaryDirectory] dummy] return $x } "ab\x8c\xc1g" proc viewable {str} { set res "" foreach c [split $str {}] { if {[string is print $c] && [string is ascii $c]} { append res $c |
︙ | ︙ | |||
238 239 240 241 242 243 244 | } "\u4e4e" test encoding-11.5 {LoadEncodingFile: escape file} { viewable [encoding convertto iso2022 \u4e4e] } [viewable "\x1b\$B8C\x1b(B"] test encoding-11.5.1 {LoadEncodingFile: escape file} { viewable [encoding convertto iso2022-jp \u4e4e] } [viewable "\x1b\$B8C\x1b(B"] | | > | > < | | 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 | } "\u4e4e" test encoding-11.5 {LoadEncodingFile: escape file} { viewable [encoding convertto iso2022 \u4e4e] } [viewable "\x1b\$B8C\x1b(B"] test encoding-11.5.1 {LoadEncodingFile: escape file} { viewable [encoding convertto iso2022-jp \u4e4e] } [viewable "\x1b\$B8C\x1b(B"] test encoding-11.6 {LoadEncodingFile: invalid file} -constraints {testencoding} -setup { set system [encoding system] set path [encoding dirs] encoding system identity } -body { cd [temporaryDirectory] encoding dirs [file join tmp encoding] makeDirectory tmp makeDirectory [file join tmp encoding] set f [open [file join tmp encoding splat.enc] w] fconfigure $f -translation binary puts $f "abcdefghijklmnop" close $f encoding convertto splat \u4e4e } -returnCodes error -cleanup { file delete [file join [temporaryDirectory] tmp encoding splat.enc] removeDirectory [file join tmp encoding] removeDirectory tmp cd [workingDirectory] encoding dirs $path encoding system $system } -result {invalid encoding file "splat"} # OpenEncodingFile is fully tested by the rest of the tests in this file. test encoding-12.1 {LoadTableEncoding: normal encoding} { set x [encoding convertto iso8859-3 \u120] append x [encoding convertto iso8859-3 \ud5] append x [encoding convertfrom iso8859-3 \xd5] |
︙ | ︙ | |||
296 297 298 299 300 301 302 | test encoding-14.1 {BinaryProc} { encoding convertto identity \x12\x34\x56\xff\x69 } "\x12\x34\x56\xc3\xbf\x69" test encoding-15.1 {UtfToUtfProc} { encoding convertto utf-8 \xa3 } "\xc2\xa3" | < < | 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 | test encoding-14.1 {BinaryProc} { encoding convertto identity \x12\x34\x56\xff\x69 } "\x12\x34\x56\xc3\xbf\x69" test encoding-15.1 {UtfToUtfProc} { encoding convertto utf-8 \xa3 } "\xc2\xa3" test encoding-15.2 {UtfToUtfProc null character output} { set x \u0000 set y [encoding convertto utf-8 \u0000] set y [encoding convertfrom identity $y] binary scan $y H* z list [string bytelength $x] [string bytelength $y] $z } {2 1 00} test encoding-15.3 {UtfToUtfProc null character input} { set x [encoding convertfrom identity \x00] set y [encoding convertfrom utf-8 $x] binary scan [encoding convertto identity $y] H* z list [string bytelength $x] [string bytelength $y] $z } {1 2 c080} |
︙ | ︙ | |||
384 385 386 387 388 389 390 | } [list [string length $iso2022uniData] $iso2022uniData] test encoding-23.3 {iso2022-jp escape encoding test} { # read $fis <size> reads size in chars, not raw bytes. set fid [open iso2022.txt r] fconfigure $fid -encoding iso2022-jp set data [read $fid 50] close $fid | | > > > > > > > > > > > | | < < < < < < < < < | > | < < | < | < < < | < | | | 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 | } [list [string length $iso2022uniData] $iso2022uniData] test encoding-23.3 {iso2022-jp escape encoding test} { # read $fis <size> reads size in chars, not raw bytes. set fid [open iso2022.txt r] fconfigure $fid -encoding iso2022-jp set data [read $fid 50] close $fid return $data } [string range $iso2022uniData 0 49] ; # 0 .. 49 inclusive == 50 cd [workingDirectory] # Code to make the next few tests more intelligible; the code being tested # should be in the body of the test! proc runInSubprocess {contents {filename iso2022.tcl}} { set theFile [makeFile $contents $filename] try { exec [interpreter] $theFile } finally { removeFile $theFile } } test encoding-24.1 {EscapeFreeProc on open channels} exec { runInSubprocess { set f [open [file join [file dirname [info script]] iso2022.txt]] fconfigure $f -encoding iso2022-jp gets $f } } {} test encoding-24.2 {EscapeFreeProc on open channels} exec { # Bug #524674 output viewable [runInSubprocess { encoding system cp1252; # Bug #2891556 crash revelator fconfigure stdout -encoding iso2022-jp puts ab\u4e4e\u68d9g testfinexit }] } "ab\x1b\$B8C\x1b\$(DD%\x1b(Bg (ab\\u001b\$B8C\\u001b\$(DD%\\u001b(Bg)" test encoding-24.3 {EscapeFreeProc on open channels} {stdio} { # Bug #219314 - if we don't free escape encodings correctly on channel # closure, we go boom set file [makeFile { encoding system iso2022-jp set a "\u4e4e\u4e5e\u4e5f"; # 3 Japanese Kanji letters puts $a } iso2022.tcl] set f [open "|[list [interpreter] $file]"] fconfigure $f -encoding iso2022-jp |
︙ | ︙ | |||
465 466 467 468 469 470 471 | {4F21 4F53} {50 21 73 7E} {7421 7426} } { if {[llength $range] == 2} { # for adhoc range. simple {first last}. inclusive. | < | | < < < | 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 | {4F21 4F53} {50 21 73 7E} {7421 7426} } { if {[llength $range] == 2} { # for adhoc range. simple {first last}. inclusive. scan $range %x%x first last for {set i $first} {$i <= $last} {incr i} { set code $i uplevel 1 $command } } elseif {[llength $range] == 4} { # for uniform range. scan $range %x%x%x%x h0 l0 hend lend for {set hi $h0} {$hi <= $hend} {incr hi} { for {set lo $l0} {$lo <= $lend} {incr lo} { set code [expr {$hi << 8 | ($lo & 0xff)}] uplevel 1 $command } } } else { |
︙ | ︙ | |||
520 521 522 523 524 525 526 | # For more readable (easy to analyze) output. set code [lindex $la 0] binary scan [lindex $la 1] H* expected binary scan [lindex $lb 1] H* got lappend diff [list $code $expected $got] } | | | > < | < | < | > > | < < < < < | | | | | | | > > > > > | 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 | # For more readable (easy to analyze) output. set code [lindex $la 0] binary scan [lindex $la 1] H* expected binary scan [lindex $lb 1] H* got lappend diff [list $code $expected $got] } return $diff } # Create char tables. cd [temporaryDirectory] foreach enc {cp932 euc-jp iso2022-jp} { set f [open $enc.chars w] fconfigure $f -encoding binary foreach-jisx0208 code { puts $f [format "%04X %s" $code [gen-jisx0208-$enc $code]] } close $f } # shiftjis == cp932 for jisx0208. file copy -force cp932.chars shiftjis.chars set NUM 0 foreach from {cp932 shiftjis euc-jp iso2022-jp} { foreach to {cp932 shiftjis euc-jp iso2022-jp} { test encoding-25.[incr NUM] "jisx0208 $from => $to" -setup { cd [temporaryDirectory] } -body { set f [open $from.chars] fconfigure $f -encoding $from set out [open $from.$to.tcltestout w] fconfigure $out -encoding $to puts -nonewline $out [read $f] close $out close $f # then compare $to.chars <=> $from.to.tcltestout as binary. set fa [open $to.chars rb] set fb [open $from.$to.tcltestout rb] channel-diff $fa $fb # Difference should be empty. } -cleanup { close $fa close $fb } -result {} } } test encoding-26.0 {Tcl_GetDefaultEncodingDir} -constraints { testgetdefenc } -setup { set origDir [testgetdefenc] testsetdefenc slappy } -body { testgetdefenc } -cleanup { testsetdefenc $origDir } -result slappy file delete {*}[glob -directory [temporaryDirectory] *.chars *.tcltestout] # ===> Cut here <=== # EscapeFreeProc, GetTableEncoding, unilen are fully tested by the rest of # this file. } runtests } # cleanup namespace delete ::tcl::test::encoding ::tcltest::cleanupTests return # Local Variables: # mode: tcl # End: |
Changes to tests/ioTrans.test.
︙ | ︙ | |||
1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 | test iortrans.tf-11.0 {origin thread of moved transform gone} -setup { #puts <<$tcltest::mainThread>>main set tida [testthread create]; #puts <<$tida>> set tidb [testthread create]; #puts <<$tidb>> } -constraints {testchannel testthread} -match glob -body { # Set up channel in thread testthread send $tida $helperscript set chan [testthread send $tida { proc foo {args} { handle.initialize clear drain flush limit? read write handle.finalize lappend ::res $args return } | > | 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 | test iortrans.tf-11.0 {origin thread of moved transform gone} -setup { #puts <<$tcltest::mainThread>>main set tida [testthread create]; #puts <<$tida>> set tidb [testthread create]; #puts <<$tidb>> } -constraints {testchannel testthread} -match glob -body { # Set up channel in thread testthread send $tida $helperscript testthread send $tidb $helperscript set chan [testthread send $tida { proc foo {args} { handle.initialize clear drain flush limit? read write handle.finalize lappend ::res $args return } |
︙ | ︙ | |||
1812 1813 1814 1815 1816 1817 1818 1819 | lappend res [catch {testthread send $tidb [list tell $chan]} msg] $msg lappend res [catch {testthread send $tidb [list seek $chan 1]} msg] $msg lappend res [catch {testthread send $tidb [list gets $chan]} msg] $msg lappend res [catch {testthread send $tidb [list close $chan]} msg] $msg # The 'tell' is ok, as it passed through the transform to the base # channel without invoking the transform handler. } -cleanup { tcltest::threadReap | > < | > | 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 | lappend res [catch {testthread send $tidb [list tell $chan]} msg] $msg lappend res [catch {testthread send $tidb [list seek $chan 1]} msg] $msg lappend res [catch {testthread send $tidb [list gets $chan]} msg] $msg lappend res [catch {testthread send $tidb [list close $chan]} msg] $msg # The 'tell' is ok, as it passed through the transform to the base # channel without invoking the transform handler. } -cleanup { testthread send $tidb tempdone tcltest::threadReap } -result {1 {Owner lost} 0 0 1 {Owner lost} 1 {Owner lost} 1 {Owner lost}} test iortrans.tf-11.1 {origin thread of moved transform destroyed during access} -setup { #puts <<$tcltest::mainThread>>main set tida [testthread create]; #puts <<$tida>> set tidb [testthread create]; #puts <<$tidb>> } -constraints {testchannel testthread} -match glob -body { # Set up channel in thread testthread send $tida $helperscript testthread send $tidb $helperscript set chan [testthread send $tida { proc foo {args} { handle.initialize clear drain flush limit? read write handle.finalize lappend ::res $args # destroy thread during channel access testthread exit |
︙ | ︙ | |||
1853 1854 1855 1856 1857 1858 1859 1860 | catch { puts $chan shoo } res catch { close $chan } testthread send -async $mid [list set ::res $res] } vwait ::res return $res } -cleanup { tcltest::threadReap | > < | 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 | catch { puts $chan shoo } res catch { close $chan } testthread send -async $mid [list set ::res $res] } vwait ::res return $res } -cleanup { testthread send $tidb tempdone tcltest::threadReap } -result {Owner lost} # ### ### ### ######### ######### ######### cleanupTests return |
Changes to tests/oo.test.
1 2 3 4 | # This file contains a collection of tests for Tcl's built-in object system. # Sourcing this file into Tcl runs the tests and generates output for errors. # No output means no errors were found. # | | | 1 2 3 4 5 6 7 8 9 10 11 12 | # This file contains a collection of tests for Tcl's built-in object system. # Sourcing this file into Tcl runs the tests and generates output for errors. # No output means no errors were found. # # Copyright (c) 2006-2011 Donal K. Fellows # # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. package require -exact TclOO 0.6.3 ;# Must match value in generic/tclOO.h package require tcltest 2 if {"::tcltest" in [namespace children]} { |
︙ | ︙ | |||
27 28 29 30 31 32 33 | uplevel 1 $script set tmp $end set end [getbytes] } return [expr {$end - $tmp}] } } | < < < < < < < > | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | uplevel 1 $script set tmp $end set end [getbytes] } return [expr {$end - $tmp}] } } test oo-0.1 {basic test of OO's ability to clean up its initial state} { interp create t t eval { package require TclOO } interp delete t } {} test oo-0.2 {basic test of OO's ability to clean up its initial state} { set i [interp create] interp eval $i { package require TclOO namespace delete :: } interp delete $i } {} test oo-0.3 {basic test of OO's ability to clean up its initial state} -body { leaktest { [oo::object new] destroy } } -constraints memory -result 0 test oo-0.4 {basic test of OO's ability to clean up its initial state} -body { |
︙ | ︙ | |||
70 71 72 73 74 75 76 | interp create foo foo eval {oo::object new} interp delete foo } } 0 test oo-0.6 {cleaning the core class pair; way #1} -setup { interp create t | < < | 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | interp create foo foo eval {oo::object new} interp delete foo } } 0 test oo-0.6 {cleaning the core class pair; way #1} -setup { interp create t } -body { t eval { package require TclOO namespace path oo list [catch {class destroy} m] $m [catch {object destroy} m] $m } } -cleanup { interp delete t } -result {0 {} 1 {invalid command name "object"}} test oo-0.7 {cleaning the core class pair; way #2} -setup { interp create t } -body { t eval { package require TclOO namespace path oo list [catch {object destroy} m] $m [catch {class destroy} m] $m } } -cleanup { |
︙ | ︙ | |||
104 105 106 107 108 109 110 111 112 113 114 115 116 117 | variable v 0 } } leaktest {[foo new] destroy} } -cleanup { foo destroy } -result 0 test oo-1.1 {basic test of OO functionality: no classes} { set result {} lappend result [oo::object create foo] lappend result [oo::objdefine foo { method bar args { global result | > > > > | 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | variable v 0 } } leaktest {[foo new] destroy} } -cleanup { foo destroy } -result 0 test oo-0.9 {various types of presence of the TclOO package} { list [lsearch -nocase -all -inline [package names] tcloo] \ [package present TclOO] [package versions TclOO] } [list TclOO $::oo::version $::oo::version] test oo-1.1 {basic test of OO functionality: no classes} { set result {} lappend result [oo::object create foo] lappend result [oo::objdefine foo { method bar args { global result |
︙ | ︙ | |||
270 271 272 273 274 275 276 | info commands ::AGlobalName } -result {} test oo-2.1 {basic test of OO functionality: constructor} -setup { # This is a bit complex because it needs to run in a sub-interp as # we're modifying the root object class's constructor interp create subinterp | < | 266 267 268 269 270 271 272 273 274 275 276 277 278 279 | info commands ::AGlobalName } -result {} test oo-2.1 {basic test of OO functionality: constructor} -setup { # This is a bit complex because it needs to run in a sub-interp as # we're modifying the root object class's constructor interp create subinterp subinterp eval { package require TclOO } } -body { subinterp eval { oo::define oo::object constructor {} { lappend ::result [info level 0] |
︙ | ︙ | |||
338 339 340 341 342 343 344 | foo destroy } -result good test oo-3.1 {basic test of OO functionality: destructor} -setup { # This is a bit complex because it needs to run in a sub-interp as we're # modifying the root object class's constructor interp create subinterp | < < | 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 | foo destroy } -result good test oo-3.1 {basic test of OO functionality: destructor} -setup { # This is a bit complex because it needs to run in a sub-interp as we're # modifying the root object class's constructor interp create subinterp subinterp eval { package require TclOO } } -body { subinterp eval { oo::define oo::object destructor { lappend ::result died } lappend result 1 [oo::object create foo] lappend result 2 [rename foo {}] oo::define oo::object destructor {} return $result } } -cleanup { interp delete subinterp } -result {1 ::foo died 2 {}} test oo-3.2 {basic test of OO functionality: destructor} -setup { # This is a bit complex because it needs to run in a sub-interp as # we're modifying the root object class's constructor interp create subinterp subinterp eval { package require TclOO } } -body { subinterp eval { oo::define oo::object destructor { lappend ::result died |
︙ | ︙ |
Changes to tests/ooNext2.test.
︙ | ︙ | |||
667 668 669 670 671 672 673 | } -returnCodes error -result {wrong # args: should be "info class call className methodName"} test oo-call-2.10 {class call introspection - errors} -body { info class call a b c } -returnCodes error -result {wrong # args: should be "info class call className methodName"} test oo-call-2.11 {class call introspection - errors} -body { info class call notaclass x } -returnCodes error -result {notaclass does not refer to an object} | | | 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 | } -returnCodes error -result {wrong # args: should be "info class call className methodName"} test oo-call-2.10 {class call introspection - errors} -body { info class call a b c } -returnCodes error -result {wrong # args: should be "info class call className methodName"} test oo-call-2.11 {class call introspection - errors} -body { info class call notaclass x } -returnCodes error -result {notaclass does not refer to an object} test oo-call-2.12 {class call introspection - errors} -setup { oo::class create root } -body { root create notaclass info class call notaclass x } -returnCodes error -cleanup { root destroy } -result {"notaclass" is not a class} |
︙ | ︙ |
Changes to tests/package.test.
︙ | ︙ | |||
1035 1036 1037 1038 1039 1040 1041 | } $vs test package-10.$n {package vcompare} { package vcompare $r $p } $vc incr n } | | | 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 | } $vs test package-10.$n {package vcompare} { package vcompare $r $p } $vc incr n } test package-11.0.0 {package vcompare at 32bit boundary} { package vcompare [expr {1<<31}] [expr {(1<<31)-1}] } 1 # Note: It is correct that the result of the very first test, i.e. "5.0 5.0a0" # is 1, i.e. that version 5.0a0 satisfies a 5.0 requirement. # The requirement "5.0" internally translates first to "5.0-6", and then to |
︙ | ︙ |
Changes to tests/proc.test.
︙ | ︙ | |||
182 183 184 185 186 187 188 189 190 191 192 193 194 195 | proc p {x} {info commands 3m} p } -returnCodes error -result {wrong # args: should be "p x"} test proc-3.6 {TclObjInterpProc, proper quoting of proc name, Bug 942757} -body { proc {a b c} {x} {info commands 3m} {a b c} } -returnCodes error -result {wrong # args: should be "{a b c} x"} catch {namespace delete {*}[namespace children :: test_ns_*]} catch {rename p ""} catch {rename {} ""} catch {rename {a b c} {}} catch {unset msg} | > > > > > | 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | proc p {x} {info commands 3m} p } -returnCodes error -result {wrong # args: should be "p x"} test proc-3.6 {TclObjInterpProc, proper quoting of proc name, Bug 942757} -body { proc {a b c} {x} {info commands 3m} {a b c} } -returnCodes error -result {wrong # args: should be "{a b c} x"} test proc-3.7 {TclObjInterpProc, wrong num args, Bug 3366265} { proc {} {x} {} list [catch {{}} msg] $msg } {1 {wrong # args: should be "{} x"}} catch {namespace delete {*}[namespace children :: test_ns_*]} catch {rename p ""} catch {rename {} ""} catch {rename {a b c} {}} catch {unset msg} |
︙ | ︙ |
Changes to tests/util.test.
︙ | ︙ | |||
171 172 173 174 175 176 177 178 179 180 181 182 183 184 | proc #\{ {} {return #} set cmd [list #\{] append cmd "" ;# force string rep generation set result [eval $cmd] rename #\{ {} set result } {#} test util-4.1 {Tcl_ConcatObj - backslash-space at end of argument} { concat a {b\ } c } {a b\ c} test util-4.2 {Tcl_ConcatObj - backslash-space at end of argument} { concat a {b\ } c } {a b\ c} | > > > > > > | 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | proc #\{ {} {return #} set cmd [list #\{] append cmd "" ;# force string rep generation set result [eval $cmd] rename #\{ {} set result } {#} test util-3.6 {Tcl_ConvertElement, Bug 3371644} { interp create #\\ interp alias {} x #\\ concat interp target {} x ;# Crash if bug not fixed interp delete #\\ } {} test util-4.1 {Tcl_ConcatObj - backslash-space at end of argument} { concat a {b\ } c } {a b\ c} test util-4.2 {Tcl_ConcatObj - backslash-space at end of argument} { concat a {b\ } c } {a b\ c} |
︙ | ︙ |
Changes to tools/tcltk-man2html-utils.tcl.
1 2 3 4 5 6 | ## ## Utility functions for Man->HTML converter. Note that these ## functions are specifically intended to work with the format as used ## by Tcl and Tk; they do not cope with arbitrary nroff markup. ## ## Copyright (c) 1995-1997 Roger E. Critchlow Jr | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## ## Utility functions for Man->HTML converter. Note that these ## functions are specifically intended to work with the format as used ## by Tcl and Tk; they do not cope with arbitrary nroff markup. ## ## Copyright (c) 1995-1997 Roger E. Critchlow Jr ## Copyright (c) 2004-2011 Donal K. Fellows set ::manual(report-level) 1 proc manerror {msg} { global manual set name {} set subj {} |
︙ | ︙ | |||
485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 | man-puts </DL> } else { # labelled list, make contents if {$context ne ".SH" && $context ne ".SS"} { man-puts <P> } set dl "<DL class=\"[string tolower $manual(section)]\">" man-puts $dl lappend manual(section-toc) $dl backup-text 1 set accept_RE 0 set para {} while {[more-text]} { set line [next-text] if {[is-a-directive $line]} { split-directive $line code rest switch -exact -- $code { .IP { if {$accept_RE} { output-IP-list .IP $code $rest continue } | > > > > > > > > > > | < > > > > | | 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 | man-puts </DL> } else { # labelled list, make contents if {$context ne ".SH" && $context ne ".SS"} { man-puts <P> } set dl "<DL class=\"[string tolower $manual(section)]\">" set enddl "</DL>" if {$code eq ".IP"} { if {[regexp {^\[[\da-f]+\]|\(?[\da-f]+\)$} $rest]} { set dl "<OL class=\"[string tolower $manual(section)]\">" set enddl "</OL>" } elseif {"•" eq $rest} { set dl "<UL class=\"[string tolower $manual(section)]\">" set enddl "</UL>" } } man-puts $dl lappend manual(section-toc) $dl backup-text 1 set accept_RE 0 set para {} while {[more-text]} { set line [next-text] if {[is-a-directive $line]} { split-directive $line code rest switch -exact -- $code { .IP { if {$accept_RE} { output-IP-list .IP $code $rest continue } if {$manual(section) eq "ARGUMENTS"} { man-puts "$para<DT>$rest<DD>" } elseif {[regexp {^\[([\da-f]+)\]$} $rest -> value]} { man-puts "$para<LI value=\"$value\">" } elseif {[regexp {^\(?([\da-f]+)\)$} $rest -> value]} { man-puts "$para<LI value=\"$value\">" } elseif {"•" eq $rest} { man-puts "$para<LI>" } else { man-puts "$para<DT>[long-toc $rest]<DD>" } } .sp - .br - .DS - .CS { output-directive $line } |
︙ | ︙ | |||
538 539 540 541 542 543 544 | # yet another nroff kludge as above man-puts "$para<DT>[long-toc $rest1]" man-puts "<DT>[long-toc $rest2]<DD>" incr accept_RE 1 } elseif {[match-text @rest .RE]} { # gad, this is getting ridiculous if {!$accept_RE} { | | < > | | < | 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | # yet another nroff kludge as above man-puts "$para<DT>[long-toc $rest1]" man-puts "<DT>[long-toc $rest2]<DD>" incr accept_RE 1 } elseif {[match-text @rest .RE]} { # gad, this is getting ridiculous if {!$accept_RE} { man-puts "$enddl<P>$rest$dl" backup-text 1 set para {} break } man-puts "<P>$rest" incr accept_RE -1 } elseif {$accept_RE} { output-directive $line } else { backup-text 1 break } } |
︙ | ︙ | |||
570 571 572 573 574 575 576 | } } } else { man-puts $line } set para <P> } | | | | 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 | } } } else { man-puts $line } set para <P> } man-puts "$para$enddl" lappend manual(section-toc) $enddl if {$accept_RE} { manerror "missing .RE in output-IP-list" } } } ## ## handle the NAME section lines |
︙ | ︙ | |||
607 608 609 610 611 612 613 | } ## ## build a cross-reference link if appropriate ## proc cross-reference {ref} { global manual remap_link_target global ensemble_commands exclude_refs_map exclude_when_followed_by_map | | > | > > > > > | > | | | > | | | | | > > | | | > > > > | | | | < < < > > > | > | | | | | | | > > > | | | | | | | | | | | | | | | < | < | | | > > > | | < < > | < < > | | | | | | | | | | | | | | | | | | | | | | | | > | < > | | | | | | | | < < < | | | | | | | | > | | < | | | | < > | | | | | | | | | | | < < < | | > | | | | | > | > | | | | | | > > > | | | < | | | > > | < | < > | > | | > | | < < < | > | | < | | | | | > > > | | < < | > | 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 | } ## ## build a cross-reference link if appropriate ## proc cross-reference {ref} { global manual remap_link_target global ensemble_commands exclude_refs_map exclude_when_followed_by_map set manname $manual(name) set mantail $manual(tail) if {[string match "Tcl_*" $ref] || [string match "Tk_*" $ref] || [string match "Ttk_*" $ref] || [string match "Itcl_*" $ref] || [string match "Tdbc_*" $ref]} { regexp {^\w+} $ref lref ## ## apply a link remapping if available ## if {[info exists remap_link_target($lref)]} { set lref $remap_link_target($lref) } } elseif {$ref eq "Tcl"} { set lref $ref } elseif { [regexp {^[A-Z0-9 ?!]+$} $ref] && [info exists manual($manname-id-$ref)] } { return "<A HREF=\"#$manual($manname-id-$ref)\">$ref</A>" } else { set lref [string tolower $ref] ## ## apply a link remapping if available ## if {[info exists remap_link_target($lref)]} { set lref $remap_link_target($lref) } } ## ## nothing to reference ## if {![info exists manual(name-$lref)]} { foreach name $ensemble_commands { if { [regexp "^$name \[a-z0-9]*\$" $lref] && [info exists manual(name-$name)] && $mantail ne "$name.n" && (![info exists exclude_refs_map($mantail)] || $manual(name-$name) ni $exclude_refs_map($mantail)) } { return "<A HREF=\"../$manual(name-$name).htm\">$ref</A>" } } if {$lref in {end}} { # no good place to send this tcl token? } return $ref } set manref $manual(name-$lref) ## ## would be a self reference ## foreach name $manref { if {"$manual(wing-file)/$manname" in $name} { return $ref } } ## ## multiple choices for reference ## if {[llength $manref] > 1} { set tcl_i [lsearch -glob $manref *TclCmd*] if {$tcl_i >= 0 && $manual(wing-file) eq "TclCmd" || $manual(wing-file) eq "TclLib"} { set tcl_ref [lindex $manref $tcl_i] return "<A HREF=\"../$tcl_ref.htm\">$ref</A>" } set tk_i [lsearch -glob $manref *TkCmd*] if {$tk_i >= 0 && $manual(wing-file) eq "TkCmd" || $manual(wing-file) eq "TkLib"} { set tk_ref [lindex $manref $tk_i] return "<A HREF=\"../$tk_ref.htm\">$ref</A>" } if {$lref eq "exit" && $mantail eq "tclsh.1" && $tcl_i >= 0} { set tcl_ref [lindex $manref $tcl_i] return "<A HREF=\"../$tcl_ref.htm\">$ref</A>" } puts stderr "multiple cross reference to $ref in $manref from $manual(wing-file)/$mantail" return $ref } ## ## exceptions, sigh, to the rule ## if {[info exists exclude_when_followed_by_map($mantail)]} { upvar 1 text tail set following_word [lindex [regexp -inline {\S+} $tail] 0] foreach {this that} $exclude_when_followed_by_map($mantail) { # only a ref if $this is not followed by $that if {$lref eq $this && [string match $that* $following_word]} { return $ref } } } if { [info exists exclude_refs_map($mantail)] && $lref in $exclude_refs_map($mantail) } { return $ref } ## ## return the cross reference ## return "<A HREF=\"../$manref.htm\">$ref</A>" } ## ## reference generation errors ## proc reference-error {msg text} { global manual puts stderr "$manual(tail): $msg: {$text}" return $text } ## ## insert as many cross references into this text string as are appropriate ## proc insert-cross-references {text} { global manual set result "" while 1 { ## ## we identify cross references by: ## ``quotation'' ## <B>emboldening</B> ## Tcl_ prefix ## Tk_ prefix ## [a-zA-Z0-9]+ manual entry ## and we avoid messing with already anchored text ## ## ## find where each item lives - EXPENSIVE - and accumulate a list ## unset -nocomplain offsets foreach {name pattern} { anchor {<A } end-anchor {</A>} quote {``} end-quote {''} bold {<B>} end-bold {</B>} c.tcl {Tcl_} c.tk {Tk_} c.ttk {Ttk_} c.tdbc {Tdbc_} c.itcl {Itcl_} Tcl1 {Tcl manual entry} Tcl2 {Tcl overview manual entry} url {http://} } { set o [string first $pattern $text] if {[set offset($name) $o] >= 0} { set invert($o) $name lappend offsets $o } } ## ## if nothing, then we're done. ## if {![info exists offsets]} { return [append result $text] } ## ## sort the offsets ## set offsets [lsort -integer $offsets] ## ## see which we want to use ## switch -exact -- $invert([lindex $offsets 0]) { anchor { if {$offset(end-anchor) < 0} { return [reference-error {Missing end anchor} $text] } append result [string range $text 0 $offset(end-anchor)] set text [string range $text[set text ""] \ [expr {$offset(end-anchor)+1}] end] continue } quote { if {$offset(end-quote) < 0} { return [reference-error "Missing end quote" $text] } if {$invert([lindex $offsets 1]) in {tcl tk ttk}} { set offsets [lreplace $offsets 1 1] } switch -exact -- $invert([lindex $offsets 1]) { end-quote { append result [string range $text 0 [expr {$offset(quote)-1}]] set body [string range $text [expr {$offset(quote)+2}] \ [expr {$offset(end-quote)-1}]] set text [string range $text[set text ""] \ [expr {$offset(end-quote)+2}] end] append result `` [cross-reference $body] '' continue } bold - anchor { append result [string range $text \ 0 [expr {$offset(end-quote)+1}]] set text [string range $text[set text ""] \ [expr {$offset(end-quote)+2}] end] continue } } return [reference-error "Uncaught quote case" $text] } bold { if {$offset(end-bold) < 0} { return [append result $text] } if {[string match "c.*" $invert([lindex $offsets 1])]} { set offsets [lreplace $offsets 1 1] } switch -exact -- $invert([lindex $offsets 1]) { url - end-bold { append result \ [string range $text 0 [expr {$offset(bold)-1}]] set body [string range $text [expr {$offset(bold)+3}] \ [expr {$offset(end-bold)-1}]] set text [string range $text[set text ""] \ [expr {$offset(end-bold)+4}] end] regsub {http://[\w/.]+} $body {<A HREF="&">&</A>} body append result <B> [cross-reference $body] </B> continue } anchor { append result \ [string range $text 0 [expr {$offset(end-bold)+3}]] set text [string range $text[set text ""] \ [expr {$offset(end-bold)+4}] end] continue } default { return [reference-error "Uncaught bold case" $text] } } } c.tk - c.ttk - c.tcl - c.tdbc - c.itcl { append result [string range $text 0 \ [expr {[lindex $offsets 0]-1}]] regexp -indices -start [lindex $offsets 0] {\w+} $text range set body [string range $text {*}$range] set text [string range $text[set text ""] \ [expr {[lindex $range 1]+1}] end] append result [cross-reference $body] continue } Tcl1 - Tcl2 { set off [lindex $offsets 0] append result [string range $text 0 [expr {$off-1}]] set text [string range $text[set text ""] [expr {$off+3}] end] append result [cross-reference Tcl] continue } url { set off [lindex $offsets 0] append result [string range $text 0 [expr {$off-1}]] regexp -indices -start $off {http://[\w/.]+} $text range set url [string range $text {*}$range] append result "<A HREF=\"$url\">" $url "</A>" set text [string range $text[set text ""] \ [expr {[lindex $range 1]+1}] end] continue } end-anchor - end-bold - end-quote { return [reference-error "Out of place $invert([lindex $offsets 0])" $text] } } } } ## ## process formatting directives ## proc output-directive {line} { |
︙ | ︙ |
Changes to tools/tcltk-man2html.tcl.
︙ | ︙ | |||
762 763 764 765 766 767 768 | global build_tcl tcltkdir tcldir if {$type ni {n 3}} { error "unknown type \"$type\": must be 3 or n" } if {!$build_tcl} return set result {} foreach {dir name} $args { | | | > > > > > > > > | 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 | global build_tcl tcltkdir tcldir if {$type ni {n 3}} { error "unknown type \"$type\": must be 3 or n" } if {!$build_tcl} return set result {} foreach {dir name} $args { set globpat $tcltkdir/$tcldir/pkgs/$dir*/doc/*.$type if {![llength [glob -nocomplain $globpat]]} { # Fallback for manpages generated using doctools set globpat $tcltkdir/$tcldir/pkgs/$dir*/doc/man/*.$type if {![llength [glob -nocomplain $globpat]]} { continue } } regexp "pkgs/$dir(.*)/doc$" [glob $tcltkdir/$tcldir/pkgs/$dir*/doc] \ -> version switch $type { n { set title "$name Package Commands" if {$version ne ""} { append title ", version $version" } set dir [string totitle $dir]Cmd set desc \ "The additional commands provided by the $name package." } 3 { set title "$name Package Library" if {$version ne ""} { append title ", version $version" } set dir [string totitle $dir]Lib set desc \ "The additional C functions provided by the $name package." } } lappend result [list $globpat $title $dir $desc] } |
︙ | ︙ | |||
800 801 802 803 804 805 806 | set excluded_pages {case menubar pack-old} set forced_index_pages {GetDash} set process_first_patterns {*/ttk_widget.n */options.n} set ensemble_commands { after array binary chan clock dde dict encoding file history info interp memory namespace package registry self string trace update zlib clipboard console font grab grid image option pack place selection tk | | < > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | | 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 | set excluded_pages {case menubar pack-old} set forced_index_pages {GetDash} set process_first_patterns {*/ttk_widget.n */options.n} set ensemble_commands { after array binary chan clock dde dict encoding file history info interp memory namespace package registry self string trace update zlib clipboard console font grab grid image option pack place selection tk tkwait ttk::style winfo wm itcl::delete itcl::find itcl::is } array set remap_link_target { stdin Tcl_GetStdChannel stdout Tcl_GetStdChannel stderr Tcl_GetStdChannel style ttk::style {style map} ttk::style {tk busy} busy library auto_execok safe-tcl safe tclvars env tcl_break catch tcl_continue catch tcl_error catch tcl_ok catch tcl_return catch int() mathfunc wide() mathfunc packagens pkg::create pkgMkIndex pkg_mkIndex pkg_mkIndex pkg_mkIndex Tcl_Obj Tcl_NewObj Tcl_ObjType Tcl_RegisterObjType Tcl_OpenFileChannelProc Tcl_FSOpenFileChannel errorinfo env errorcode env tcl_pkgpath env Tcl_Command Tcl_CreateObjCommand Tcl_CmdProc Tcl_CreateObjCommand Tcl_CmdDeleteProc Tcl_CreateObjCommand Tcl_ObjCmdProc Tcl_CreateObjCommand Tcl_Channel Tcl_OpenFileChannel Tcl_WideInt Tcl_NewIntObj Tcl_ChannelType Tcl_CreateChannel Tcl_DString Tcl_DStringInit Tcl_Namespace Tcl_AppendExportList Tcl_Object Tcl_NewObjectInstance Tcl_Class Tcl_GetObjectAsClass Tcl_Event Tcl_QueueEvent Tcl_Time Tcl_GetTime Tcl_ThreadId Tcl_CreateThread Tk_Window Tk_WindowId Tk_3DBorder Tk_Get3DBorder Tk_Anchor Tk_GetAnchor Tk_Cursor Tk_GetCursor Tk_Dash Tk_GetDash Tk_Font Tk_GetFont Tk_Image Tk_GetImage Tk_ImageMaster Tk_GetImage Tk_ItemType Tk_CreateItemType Tk_Justify Tk_GetJustify Ttk_Theme Ttk_GetTheme } array set exclude_refs_map { bind.n {button destroy option} clock.n {next} history.n {exec} next.n {unknown} zlib.n {binary close filename text} canvas.n {bitmap text} console.n {eval} checkbutton.n {image} clipboard.n {string} entry.n {string} event.n {return} font.n {menu} getOpenFile.n {file open text} grab.n {global} interp.n {time} menu.n {checkbutton radiobutton} messageBox.n {error info} options.n {bitmap image set} radiobutton.n {image} safe.n {join split} scale.n {label variable} scrollbar.n {set} selection.n {string} tcltest.n {error} tkvars.n {tk} tkwait.n {variable} tm.n {exec} ttk_checkbutton.n {variable} ttk_combobox.n {selection} ttk_entry.n {focus variable} ttk_intro.n {focus text} ttk_label.n {font text} ttk_labelframe.n {text} ttk_menubutton.n {flush} ttk_notebook.n {image text} ttk_progressbar.n {variable} ttk_radiobutton.n {variable} ttk_scale.n {variable} |
︙ | ︙ | |||
857 858 859 860 861 862 863 864 865 866 867 868 869 870 | selection.n { clipboard selection clipboard ; } ttk_image.n { image imageSpec } } try { # Parse what the user told us to do parse_command_line # Some strings depend on what options are specified | > > > | 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 | selection.n { clipboard selection clipboard ; } ttk_image.n { image imageSpec } fontchooser.n { tk fontchooser } } try { # Parse what the user told us to do parse_command_line # Some strings depend on what options are specified |
︙ | ︙ | |||
881 882 883 884 885 886 887 | } if {$build_tk} { append tcltkdesc "Tk" append cmdesc "Tk" append appdir "$tkdir" } | | | | 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 | } if {$build_tk} { append tcltkdesc "Tk" append cmdesc "Tk" append appdir "$tkdir" } # Get the list of packages to try, and what their human-readable names # are. Note that the package directory list should be version-less. try { set packageDirNameMap {} if {$build_tcl} { set f [open $tcltkdir/$tcldir/pkgs/package.list.txt] try { foreach line [split [read $f] \n] { if {[string trim $line] eq ""} continue |
︙ | ︙ |
Changes to unix/configure.
︙ | ︙ | |||
11377 11378 11379 11380 11381 11382 11383 | else NEED_FAKE_RFC2553=1 fi if test "x$NEED_FAKE_RFC2553" = "x1"; then | > | | 11377 11378 11379 11380 11381 11382 11383 11384 11385 11386 11387 11388 11389 11390 11391 11392 | else NEED_FAKE_RFC2553=1 fi if test "x$NEED_FAKE_RFC2553" = "x1"; then cat >>confdefs.h <<\_ACEOF #define NEED_FAKE_RFC2553 1 _ACEOF case $LIBOBJS in "fake-rfc2553.$ac_objext" | \ *" fake-rfc2553.$ac_objext" | \ "fake-rfc2553.$ac_objext "* | \ |
︙ | ︙ |
Changes to unix/tcl.m4.
︙ | ︙ | |||
3257 3258 3259 3260 3261 3262 3263 | struct sockaddr_storage],,[NEED_FAKE_RFC2553=1],[[ #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> ]]) if test "x$NEED_FAKE_RFC2553" = "x1"; then | | > | 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 | struct sockaddr_storage],,[NEED_FAKE_RFC2553=1],[[ #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> ]]) if test "x$NEED_FAKE_RFC2553" = "x1"; then AC_DEFINE([NEED_FAKE_RFC2553], 1, [Use compat implementation of getaddrinfo() and friends]) AC_LIBOBJ([fake-rfc2553]) AC_CHECK_FUNC(strlcpy) fi ]) # Local Variables: # mode: autoconf # End: |
Changes to unix/tclUnixSock.c.
︙ | ︙ | |||
540 541 542 543 544 545 546 | for (fds = &statePtr->fds; fds != NULL; fds = fds->next) { Tcl_DeleteFileHandler(fds->fd); if (close(fds->fd) < 0) { errorCode = errno; } } | | > > > | 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 | for (fds = &statePtr->fds; fds != NULL; fds = fds->next) { Tcl_DeleteFileHandler(fds->fd); if (close(fds->fd) < 0) { errorCode = errno; } } fds = statePtr->fds.next; while (fds != NULL) { TcpFdList *next = fds->next; ckfree(fds); fds = next; } if (statePtr->addrlist != NULL) { freeaddrinfo(statePtr->addrlist); } if (statePtr->myaddrlist != NULL) { freeaddrinfo(statePtr->myaddrlist); } |
︙ | ︙ |
Changes to win/tclWinPipe.c.
︙ | ︙ | |||
471 472 473 474 475 476 477 | */ static int TempFileName( TCHAR name[MAX_PATH]) /* Buffer in which name for temporary file * gets stored. */ { | | | 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 | */ static int TempFileName( TCHAR name[MAX_PATH]) /* Buffer in which name for temporary file * gets stored. */ { const TCHAR *prefix = TEXT("TCL"); if (GetTempPath(MAX_PATH, name) != 0) { if (GetTempFileName(name, prefix, 0, name) != 0) { return 1; } } name[0] = '.'; name[1] = '\0'; |
︙ | ︙ | |||
3097 3098 3099 3100 3101 3102 3103 | const char *string = Tcl_GetStringFromObj(basenameObj, &length); Tcl_WinUtfToTChar(string, length, &buf); memcpy(namePtr, Tcl_DStringValue(&buf), Tcl_DStringLength(&buf)); namePtr += Tcl_DStringLength(&buf); Tcl_DStringFree(&buf); } else { | | | 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 | const char *string = Tcl_GetStringFromObj(basenameObj, &length); Tcl_WinUtfToTChar(string, length, &buf); memcpy(namePtr, Tcl_DStringValue(&buf), Tcl_DStringLength(&buf)); namePtr += Tcl_DStringLength(&buf); Tcl_DStringFree(&buf); } else { const TCHAR *baseStr = TEXT("TCL"); int length = 3 * sizeof(TCHAR); memcpy(namePtr, baseStr, length); namePtr += length; } counter = TclpGetClicks() % 65533; counter2 = 1024; /* Only try this many times! Prevents |
︙ | ︙ |
Changes to win/tclWinPort.h.
︙ | ︙ | |||
450 451 452 453 454 455 456 | * Visual C++ has some odd names for common functions, so we need to * define a few macros to handle them. Also, it defines EDEADLOCK and * EDEADLK as the same value, which confuses Tcl_ErrnoId(). */ #if defined(_MSC_VER) || defined(__MINGW32__) # define environ _environ | > | > | 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 | * Visual C++ has some odd names for common functions, so we need to * define a few macros to handle them. Also, it defines EDEADLOCK and * EDEADLK as the same value, which confuses Tcl_ErrnoId(). */ #if defined(_MSC_VER) || defined(__MINGW32__) # define environ _environ # if defined(_MSC_VER) && (_MSC_VER < 1600) # define hypot _hypot # endif # define exception _exception # undef EDEADLOCK # if defined(__MINGW32__) && !defined(__MSVCRT__) # define timezone _timezone # endif #endif /* _MSC_VER || __MINGW32__ */ |
︙ | ︙ |