Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch mistake Through [b285990627] Excluding Merge-Ins
This is equivalent to a diff from 29b72b7167 to b285990627
|
2018-03-14
| ||
| 23:43 | Merge in 8.7 changes not already here. check-in: fccf41ff4a user: dgp tags: memleak-87 | |
| 22:58 | keep on truckin check-in: e46133afc3 user: dgp tags: mistake | |
| 22:56 | another range check-in: b285990627 user: dgp tags: mistake | |
| 22:52 | cherry pick over ranges of 8.7 only changes. check-in: 38ef030047 user: dgp tags: mistake | |
| 22:39 | Rebase the memleak work. check-in: 29b72b7167 user: dgp tags: memleak-87 | |
| 20:59 | A few test hygiene fixes. check-in: 62043ae854 user: dgp tags: memleak | |
|
2018-03-13
| ||
| 16:29 | close fork check-in: 35a6b8673b user: dgp tags: core-8-branch | |
|
2018-03-11
| ||
| 12:22 | merge 8.6 check-in: f27bd866ac user: dgp tags: core-8-branch | |
Changes to changes.
| ︙ | |||
8875 8876 8877 8878 8879 8880 8881 | 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 | + + + + + | 2017-06-23 (TIP 472) Support 0d as prefix of decimal numbers (iyer,griffin) 2017-08-31 (bug)[2a9465] http state 100 continue handling broken (oehlmann) 2017-09-02 (bug)[0e4d88] replace command, delete trace kills namespace (porter) --- Released 8.7a1, September 8, 2017 --- http://core.tcl.tk/tcl/ for details 2018-03-12 (TIP 490) add oo support for msgcat => msgcat 1.7.0 (oehlmann) 2018-03-12 (TIP 499) custom locale preference list (oehlmann) => msgcat 1.7.0 |
Changes to doc/msgcat.n.
1 2 3 4 5 6 7 8 9 10 11 12 13 | 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 | - + - + + + + + + - + + | '\" '\" Copyright (c) 1998 Mark Harrison. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" .TH "msgcat" n 1.5 msgcat "Tcl Bundled Packages" .so man.macros .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME msgcat \- Tcl message catalog .SH SYNOPSIS |
| ︙ | |||
46 47 48 49 50 51 52 53 54 55 56 57 58 59 | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | + + + + | .VS "TIP 412" \fB::msgcat::mcpackagelocale subcommand\fR ?\fIlocale\fR? .sp \fB::msgcat::mcpackageconfig subcommand\fR \fIoption\fR ?\fIvalue\fR? .sp \fB::msgcat::mcforgetpackage\fR .VE "TIP 412" .sp .VS "TIP 499" \fB::msgcat::mcutil subcommand\fR ?\fIlocale\fR? .VS "TIP 499" .BE .SH DESCRIPTION .PP The \fBmsgcat\fR package provides a set of functions that can be used to manage multi-lingual user interfaces. Text strings are defined in a .QW "message catalog" |
| ︙ | |||
67 68 69 70 71 72 73 74 75 76 77 78 79 80 | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | + + + + + | Each package has its own message catalog and configuration settings in \fBmsgcat\fR. .PP A \fIlocale\fR is a specification string describing a user language like \fBde_ch\fR for Swiss German. In \fBmsgcat\fR, there is a global locale initialized by the system locale of the current system. Each package may decide to use the global locale or to use a package specific locale. .PP The global locale may be changed on demand, for example by a user initiated language change or within a multi user application like a web server. .PP .VS tip490 Object oriented programming is supported by the use of a package namespace. .VE tip490 .PP .SH COMMANDS .TP \fB::msgcat::mc \fIsrc-string\fR ?\fIarg arg ...\fR? . Returns a translation of \fIsrc-string\fR according to the current locale. If additional arguments past \fIsrc-string\fR are given, the \fBformat\fR command is used to substitute the |
| ︙ | |||
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 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 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 216 217 218 219 220 221 222 223 224 225 226 227 | + + + + + + + + + + + + - + - + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + - - + - - - - - - - + + + + + + + + + + + + + + - + + + + | \fB::msgcat::mc\fR is the main function used to localize an application. Instead of using an English string directly, an application can pass the English string through \fB::msgcat::mc\fR and use the result. If an application is written for a single language in this fashion, then it is easy to add support for additional languages later simply by defining new message catalog entries. .RE .VS "TIP 490" .TP \fB::msgcat::mcn \fInamespace\fR \fIsrc-string\fR ?\fIarg arg ...\fR? . Like \fB::msgcat::mc\fR, but with the message namespace specified as first argument. .PP .RS \fBmcn\fR may be used for cases where the package namespace is not the namespace of the caller. An example is shown within the description of the command \fB::msgcat::mcpackagenamespaceget\fR below. .RE .PP .TP \fB::msgcat::mcmax ?\fIsrc-string src-string ...\fR? . Given several source strings, \fB::msgcat::mcmax\fR returns the length of the longest translated string. This is useful when designing localized GUIs, which may require that all buttons, for example, be a fixed width (which will be the width of the widest button). .TP .VS "TIP 412" |
| ︙ | |||
227 228 229 230 231 232 233 234 235 236 237 238 239 240 | 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 | + + + + + + + + + + + + + + + + |
Note that this routine is only called if the concerned package did not set a package locale unknown command name.
.RE
.TP
\fB::msgcat::mcforgetpackage\fR
.
The calling package clears all its state within the \fBmsgcat\fR package including all settings and translations.
.VE "TIP 412"
.PP
.VS "TIP 499"
.TP
\fB::msgcat::mcutil getpreferences\fR \fIlocale\fR
.
Return the preferences list of the given locale as described in section \fBLOCALE SPECIFICATION\fR.
An example is the composition of a preference list for the bilingual region "Biel/Bienne" as a concatenation of swiss german and swiss french:
.CS
% concat [lrange [msgcat::mcutil getpreferences fr_CH] 0 end-1] [msgcat::mcutil getpreferences de_CH]
fr_ch fr de_ch de {}
.CE
.TP
\fB::msgcat::mcutil getsystemlocale\fR
.
The system locale is returned as described by the section \fBLOCALE SPECIFICATION\fR.
.VE "TIP 499"
.PP
.SH "LOCALE SPECIFICATION"
.PP
The locale is specified to \fBmsgcat\fR by a locale string
passed to \fB::msgcat::mclocale\fR.
The locale string consists of
a language code, an optional country code, and an optional
|
| ︙ | |||
433 434 435 436 437 438 439 | 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 | - + |
.PP
.CS
\fBmsgcat::mc\fR {Produced %1$d at %2$s} $num $city
# ... where that key is mapped to one of the
# human-oriented versions by \fBmsgcat::mcset\fR
.CE
.VS "TIP 412"
|
| ︙ | |||
457 458 459 460 461 462 463 | 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 | - + - + + + + + + + + + + + + + | This command may cause the load of locales. .RE .TP \fB::msgcat::mcpackagelocale get\fR . Return the package private locale or the global locale, if no package private locale is set. .TP |
| ︙ | |||
484 485 486 487 488 489 490 | 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 | - + | . Returns true, if the given locale is loaded for the package. .TP \fB::msgcat::mcpackagelocale clear\fR . Clear any loaded locales of the package not present in the package preferences. .PP |
| ︙ | |||
559 560 561 562 563 564 565 | 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 | - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | The called procedure must return the formatted message which will finally be returned by msgcat::mc. .PP A generic unknown handler is used if set to the empty string. This consists in returning the key if no arguments are given. With given arguments, format is used to process the arguments. .PP See section \fBcallback invocation\fR below. The appended arguments are identical to \fB::msgcat::mcunknown\fR. .RE |
| ︙ | |||
639 640 641 642 643 644 645 | 790 791 792 793 794 795 796 797 798 799 800 801 802 | - + - + | } .CE .VE "TIP 412" .SH CREDITS .PP The message catalog code was developed by Mark Harrison. .SH "SEE ALSO" |
Changes to generic/tclBasic.c.
| ︙ | |||
815 816 817 818 819 820 821 822 823 824 825 826 827 828 | 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 | + |
TclInitDictCmd(interp);
TclInitEncodingCmd(interp);
TclInitFileCmd(interp);
TclInitInfoCmd(interp);
TclInitNamespaceCmd(interp);
TclInitStringCmd(interp);
TclInitPrefixCmd(interp);
TclInitProcessCmd(interp);
/*
* Register "clock" subcommands. These *do* go through
* Tcl_CreateObjCommand, since they aren't in the global namespace and
* involve ensembles.
*/
|
| ︙ |
Changes to generic/tclInt.h.
| ︙ | |||
4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 | 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 | + + + + + + + + + + + + + + + + + + + + + + + + |
MODULE_SCOPE int TclCompareObjKeys(void *keyPtr, Tcl_HashEntry *hPtr);
MODULE_SCOPE void TclFreeObjEntry(Tcl_HashEntry *hPtr);
MODULE_SCOPE TCL_HASH_TYPE TclHashObjKey(Tcl_HashTable *tablePtr, void *keyPtr);
MODULE_SCOPE int TclFullFinalizationRequested(void);
/*
* TIP #462.
*/
/*
* The following enum values give the status of a spawned process.
*/
typedef enum TclProcessWaitStatus {
TCL_PROCESS_ERROR = -1, /* Error waiting for process to exit */
TCL_PROCESS_UNCHANGED = 0, /* No change since the last call. */
TCL_PROCESS_EXITED = 1, /* Process has exited. */
TCL_PROCESS_SIGNALED = 2, /* Child killed because of a signal. */
TCL_PROCESS_STOPPED = 3, /* Child suspended because of a signal. */
TCL_PROCESS_UNKNOWN_STATUS = 4
/* Child wait status didn't make sense. */
} TclProcessWaitStatus;
MODULE_SCOPE Tcl_Command TclInitProcessCmd(Tcl_Interp *interp);
MODULE_SCOPE void TclProcessCreated(Tcl_Pid pid);
MODULE_SCOPE TclProcessWaitStatus TclProcessWait(Tcl_Pid pid, int options,
int *codePtr, Tcl_Obj **msgObjPtr,
Tcl_Obj **errorObjPtr);
/*
* Utility routines for encoding index values as integers. Used by both
* some of the command compilers and by [lsort] and [lsearch].
*/
MODULE_SCOPE int TclIndexEncode(Tcl_Interp *interp, Tcl_Obj *objPtr,
int before, int after, int *indexPtr);
|
| ︙ |
Changes to generic/tclPipe.c.
| ︙ | |||
217 218 219 220 221 222 223 | 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 | - + - - - + + + |
*/
void
Tcl_ReapDetachedProcs(void)
{
register Detached *detPtr;
Detached *nextPtr, *prevPtr;
|
| ︙ | |||
273 274 275 276 277 278 279 | 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 | - - - + + + - - - - - - - + - - + - - - - - - - - - + - - - - + - + + - - - + - - + - - + - - - - - - - - - - - + - - + - - - - - - - + - + + |
Tcl_Pid *pidPtr, /* Array of process ids of children. */
Tcl_Channel errorChan) /* Channel for file containing stderr output
* from pipeline. NULL means there isn't any
* stderr output. */
{
int result = TCL_OK;
int i, abnormalExit, anyErrorInfo;
|
| ︙ | |||
932 933 934 935 936 937 938 939 940 941 942 943 944 945 | 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 | + |
if (result != TCL_OK) {
goto error;
}
Tcl_DStringFree(&execBuffer);
pidPtr[numPids] = pid;
numPids++;
TclProcessCreated(pid);
/*
* Close off our copies of file descriptors that were set up for this
* child, then set up the input for the next child.
*/
if ((curInFile != NULL) && (curInFile != inputFile)) {
|
| ︙ |
Added generic/tclProcess.c.