Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Don't depend on Spencer-specific regexp syntax (/u and /U) any more. Bump http package to 2.8.6. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | novem |
Files: | files | file ages | folders |
SHA1: |
5cac37240c01c71ab54da3e96feb0e35 |
User & Date: | jan.nijtmans 2013-01-06 21:09:17 |
Context
2013-01-08
| ||
17:10 | The Tcl*(Scan|Convert)*Element() routines only need chars, not ints, to hold their flags. Reduce wa... check-in: 01b69f70f3 user: dgp tags: novem | |
2013-01-06
| ||
21:09 | Don't depend on Spencer-specific regexp syntax (/u and /U) any more. Bump http package to 2.8.6. check-in: 5cac37240c user: jan.nijtmans tags: novem | |
20:40 | Don't depend on Spencer-specific regexp syntax (/u and /U) any more in unrelated places . Bump http... check-in: f38c7f79f0 user: jan.nijtmans tags: trunk | |
2013-01-05
| ||
00:42 | merge trunk check-in: deb13a6abe user: jan.nijtmans tags: novem | |
Changes
Changes to ChangeLog.
1 2 3 4 5 6 7 | 2013-01-04 Donal K. Fellows <[email protected]> * generic/tclEnsemble.c (CompileBasicNArgCommand): Added very simple compiler (which just compiles to a normal invoke of the implementation command) for many ensemble subcommands where we can prove that there is no way for scripts to detect the difference even through error handling or [info level]/[info frame]. This improves the code produced | > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 2013-01-06 Jan Nijtmans <[email protected]> * library/http/http.tcl: Don't depend on Spencer-specific regexp * tests/env.test: syntax (/u and /U) any more. * tests/exec.test: * tests/reg.test: Bump http package to 2.8.6. 2013-01-04 Donal K. Fellows <[email protected]> * generic/tclEnsemble.c (CompileBasicNArgCommand): Added very simple compiler (which just compiles to a normal invoke of the implementation command) for many ensemble subcommands where we can prove that there is no way for scripts to detect the difference even through error handling or [info level]/[info frame]. This improves the code produced |
︙ | ︙ |
Changes to generic/tclExecute.c.
︙ | ︙ | |||
198 199 200 201 202 203 204 | * and within range. */ /* Verify the stack depth, only when no expansion is in progress */ #if TCL_COMPILE_DEBUG #define CHECK_STACK() \ | > | | 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 | * and within range. */ /* Verify the stack depth, only when no expansion is in progress */ #if TCL_COMPILE_DEBUG #define CHECK_STACK() \ ValidatePcAndStackTop(codePtr, pc, CURR_DEPTH, \ /*checkStack*/ auxObjList == NULL) #else #define CHECK_STACK() #endif #define NEXT_INST_F(pcAdjustment, nCleanup, resultHandling) \ do { \ TCL_CT_ASSERT((nCleanup >= 0) && (nCleanup <= 2)); \ |
︙ | ︙ | |||
635 636 637 638 639 640 641 | #endif /* TCL_COMPILE_STATS */ #ifdef TCL_COMPILE_DEBUG static const char * GetOpcodeName(const unsigned char *pc); static void PrintByteCodeInfo(ByteCode *codePtr); static const char * StringForResultCode(int result); static void ValidatePcAndStackTop(ByteCode *codePtr, const unsigned char *pc, int stackTop, | | | 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 | #endif /* TCL_COMPILE_STATS */ #ifdef TCL_COMPILE_DEBUG static const char * GetOpcodeName(const unsigned char *pc); static void PrintByteCodeInfo(ByteCode *codePtr); static const char * StringForResultCode(int result); static void ValidatePcAndStackTop(ByteCode *codePtr, const unsigned char *pc, int stackTop, int checkStack); #endif /* TCL_COMPILE_DEBUG */ static ByteCode * CompileExprObj(Tcl_Interp *interp, Tcl_Obj *objPtr); static void DeleteExecStack(ExecStack *esPtr); static void DupExprCodeInternalRep(Tcl_Obj *srcPtr, Tcl_Obj *copyPtr); MODULE_SCOPE int TclCompareTwoNumbers(Tcl_Obj *valuePtr, Tcl_Obj *value2Ptr); |
︙ | ︙ | |||
2193 2194 2195 2196 2197 2198 2199 | cleanup0: #ifdef TCL_COMPILE_DEBUG /* * Skip the stack depth check if an expansion is in progress. */ | | < | 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 | cleanup0: #ifdef TCL_COMPILE_DEBUG /* * Skip the stack depth check if an expansion is in progress. */ CHECK_STACK(); if (traceInstructions) { fprintf(stdout, "%2d: %2d ", iPtr->numLevels, (int) CURR_DEPTH); TclPrintInstruction(codePtr, pc); fflush(stdout); } #endif /* TCL_COMPILE_DEBUG */ |
︙ | ︙ | |||
8435 8436 8437 8438 8439 8440 8441 | register ByteCode *codePtr, /* The bytecode whose summary is printed to * stdout. */ const unsigned char *pc, /* Points to first byte of a bytecode * instruction. The program counter. */ int stackTop, /* Current stack top. Must be between * stackLowerBound and stackUpperBound * (inclusive). */ | < | | | | | | 8435 8436 8437 8438 8439 8440 8441 8442 8443 8444 8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 | register ByteCode *codePtr, /* The bytecode whose summary is printed to * stdout. */ const unsigned char *pc, /* Points to first byte of a bytecode * instruction. The program counter. */ int stackTop, /* Current stack top. Must be between * stackLowerBound and stackUpperBound * (inclusive). */ int checkStack) /* 0 if the stack depth check should be * skipped. */ { int stackUpperBound = codePtr->maxStackDepth; /* Greatest legal value for stackTop. */ unsigned relativePc = (unsigned) (pc - codePtr->codeStart); unsigned long codeStart = (unsigned long) codePtr->codeStart; unsigned long codeEnd = (unsigned long) (codePtr->codeStart + codePtr->numCodeBytes); unsigned char opCode = *pc; if (((unsigned long) pc < codeStart) || ((unsigned long) pc > codeEnd)) { fprintf(stderr, "\nBad instruction pc 0x%p in TclNRExecuteByteCode\n", pc); Tcl_Panic("TclNRExecuteByteCode execution failure: bad pc"); } if ((unsigned) opCode > LAST_INST_OPCODE) { fprintf(stderr, "\nBad opcode %d at pc %u in TclNRExecuteByteCode\n", (unsigned) opCode, relativePc); Tcl_Panic("TclNRExecuteByteCode execution failure: bad opcode"); } if (checkStack && ((stackTop < 0) || (stackTop > stackUpperBound))) { int numChars; const char *cmd = GetSrcInfoForPc(pc, codePtr, &numChars, NULL); fprintf(stderr, "\nBad stack top %d at pc %u in TclNRExecuteByteCode (min 0, max %i)", stackTop, relativePc, stackUpperBound); if (cmd != NULL) { Tcl_Obj *message; TclNewLiteralStringObj(message, "\n executing "); Tcl_IncrRefCount(message); Tcl_AppendLimitedToObj(message, cmd, numChars, 100, NULL); fprintf(stderr,"%s\n", Tcl_GetString(message)); |
︙ | ︙ |
Changes to library/http/http.tcl.
1 2 3 4 5 6 7 8 9 10 11 12 13 | # http.tcl -- # # Client-side HTTP for GET, POST, and HEAD commands. These routines can # be used in untrusted code that uses the Safesock security policy. # These procedures use a callback interface to avoid using vwait, which # is not defined in the safe base. # # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. package require Tcl 8.6- # Keep this in sync with pkgIndex.tcl and with the install directories in # Makefiles | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # http.tcl -- # # Client-side HTTP for GET, POST, and HEAD commands. These routines can # be used in untrusted code that uses the Safesock security policy. # These procedures use a callback interface to avoid using vwait, which # is not defined in the safe base. # # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. package require Tcl 8.6- # Keep this in sync with pkgIndex.tcl and with the install directories in # Makefiles package provide http 2.8.6 namespace eval http { # Allow resourcing to not clobber existing data variable http if {![info exists http]} { array set http { |
︙ | ︙ | |||
1375 1376 1377 1378 1379 1380 1381 | if {$http(-urlencoding) ne ""} { set string [encoding convertto $http(-urlencoding) $string] return [string map $formMap $string] } set converted [string map $formMap $string] if {[string match "*\[\u0100-\uffff\]*" $converted]} { | | | 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 | if {$http(-urlencoding) ne ""} { set string [encoding convertto $http(-urlencoding) $string] return [string map $formMap $string] } set converted [string map $formMap $string] if {[string match "*\[\u0100-\uffff\]*" $converted]} { regexp "\[\u0100-\uffff\]" $converted badChar # Return this error message for maximum compatability... :^/ return -code error \ "can't read \"formMap($badChar)\": no such element in array" } return $converted } |
︙ | ︙ |
Changes to library/http/pkgIndex.tcl.
1 | if {![package vsatisfies [package provide Tcl] 8.6-]} {return} | | | 1 2 | if {![package vsatisfies [package provide Tcl] 8.6-]} {return} package ifneeded http 2.8.6 [list tclPkgSetup $dir http 2.8.6 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}] |
Changes to tests/env.test.
︙ | ︙ | |||
66 67 68 69 70 71 72 | if {$i >= 0} { set list [lreplace $list $i $i] } return $list } proc mangle s { regsub -all {\[|\\|\]} $s {\\&} s | | | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | if {$i >= 0} { set list [lreplace $list $i $i] } return $list } proc mangle s { regsub -all {\[|\\|\]} $s {\\&} s regsub -all "\[\u0000-\u001f\u007f-\uffff\]" $s {[manglechar &]} s return [subst -novariables $s] } proc manglechar c { return [format {\u%04x} [scan $c %c]] } set names [lsort [array names env]] |
︙ | ︙ |
Changes to tests/exec.test.
︙ | ︙ | |||
153 154 155 156 157 158 159 | exec [interpreter] $path(cat) "<<Joined to arrows" } {Joined to arrows} test exec-2.6 {redirecting input from immediate source, with UTF} -setup { set sysenc [encoding system] encoding system iso8859-1 proc quotenonascii s { regsub -all {\[|\\|\]} $s {\\&} s | | | 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | exec [interpreter] $path(cat) "<<Joined to arrows" } {Joined to arrows} test exec-2.6 {redirecting input from immediate source, with UTF} -setup { set sysenc [encoding system] encoding system iso8859-1 proc quotenonascii s { regsub -all {\[|\\|\]} $s {\\&} s regsub -all "\[\u007f-\uffff\]" $s \ {[apply {c {format {\u%04x} [scan $c %c]}} &]} s return [subst -novariables $s] } } -constraints {exec} -body { # If this fails, it may give back: "\uC3\uA9\uC3\uA0\uC3\uBC\uC3\uB1" # If it does, this means that the UTF -> external conversion did not occur # before writing out the temp file. |
︙ | ︙ |
Changes to tests/reg.test.
︙ | ︙ | |||
509 510 511 512 513 514 515 | expectMatch 9.37 bE {a[\]]b} "a\\]b" "a\\]b" expectMatch 9.38 eE {a[\]]b} "a\\]b" "a\\]b" expectMatch 9.39 EP {a[\\]b} "a\\b" "a\\b" expectMatch 9.40 eE {a[\\]b} "a\\b" "a\\b" expectMatch 9.41 bE {a[\\]b} "a\\b" "a\\b" expectError 9.42 - {a[\Z]b} EESCAPE expectMatch 9.43 & {a[[b]c} "a\[c" "a\[c" | | | 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 | expectMatch 9.37 bE {a[\]]b} "a\\]b" "a\\]b" expectMatch 9.38 eE {a[\]]b} "a\\]b" "a\\]b" expectMatch 9.39 EP {a[\\]b} "a\\b" "a\\b" expectMatch 9.40 eE {a[\\]b} "a\\b" "a\\b" expectMatch 9.41 bE {a[\\]b} "a\\b" "a\\b" expectError 9.42 - {a[\Z]b} EESCAPE expectMatch 9.43 & {a[[b]c} "a\[c" "a\[c" expectMatch 9.44 M* "a\[\u00fe-\u0507\]\[\u00ff-\u0300\]b" \ "a\u0102\u02ffb" "a\u0102\u02ffb" doing 10 "anchors and newlines" expectMatch 10.1 & ^a a a expectNomatch 10.2 &^ ^a a expectIndices 10.3 &N ^ a {0 -1} |
︙ | ︙ | |||
620 621 622 623 624 625 626 | expectMatch 13.9 MP "a\\chb" "a\bb" "a\bb" expectMatch 13.10 MP "a\\cHb" "a\bb" "a\bb" expectMatch 13.11 LMP "a\\e" "a\033" "a\033" expectMatch 13.12 P "a\\fb" "a\fb" "a\fb" expectMatch 13.13 P "a\\nb" "a\nb" "a\nb" expectMatch 13.14 P "a\\rb" "a\rb" "a\rb" expectMatch 13.15 P "a\\tb" "a\tb" "a\tb" | | < < | | | < | < | < | < | 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 | expectMatch 13.9 MP "a\\chb" "a\bb" "a\bb" expectMatch 13.10 MP "a\\cHb" "a\bb" "a\bb" expectMatch 13.11 LMP "a\\e" "a\033" "a\033" expectMatch 13.12 P "a\\fb" "a\fb" "a\fb" expectMatch 13.13 P "a\\nb" "a\nb" "a\nb" expectMatch 13.14 P "a\\rb" "a\rb" "a\rb" expectMatch 13.15 P "a\\tb" "a\tb" "a\tb" expectMatch 13.16 - "a\u0008x" "a\bx" "a\bx" expectMatch 13.19 - "a\U00000008x" "a\bx" "a\bx" expectMatch 13.20 - "a\U0000008x" "a\bx" "a\bx" expectMatch 13.21 P "a\\vb" "a\vb" "a\vb" expectMatch 13.22 MP "a\\x08x" "a\bx" "a\bx" expectError 13.23 - {a\xq} EESCAPE expectMatch 13.24 MP "a\\x08x" "a\bx" "a\bx" expectError 13.25 - {a\z} EESCAPE expectMatch 13.26 MP "a\\010b" "a\bb" "a\bb" expectMatch 13.27 - "a\U00001234x" "a\u1234x" "a\u1234x" expectMatch 13.29 - "a\U0001234x" "a\u1234x" "a\u1234x" expectMatch 13.31 - "a\U000012345x" "a\u12345x" "a\u12345x" expectMatch 13.33 - "a\U1000000x" "a\ufffd0x" "a\ufffd0x" doing 14 "back references" # ugh expectMatch 14.1 RP {a(b*)c\1} abbcbb abbcbb bb expectMatch 14.2 RP {a(b*)c\1} ac ac "" expectNomatch 14.3 RP {a(b*)c\1} abbcb |
︙ | ︙ |
Changes to unix/Makefile.in.
︙ | ︙ | |||
835 836 837 838 839 840 841 | $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"; \ done; @echo "Installing package http1.0 files to $(SCRIPT_INSTALL_DIR)/http1.0/"; @for i in $(TOP_DIR)/library/http1.0/*.tcl ; \ do \ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/http1.0; \ done; | | | | 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 | $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"; \ done; @echo "Installing package http1.0 files to $(SCRIPT_INSTALL_DIR)/http1.0/"; @for i in $(TOP_DIR)/library/http1.0/*.tcl ; \ do \ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/http1.0; \ done; @echo "Installing package http 2.8.6 as a Tcl Module"; @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.6/http-2.8.6.tm; @echo "Installing package opt0.4 files to $(SCRIPT_INSTALL_DIR)/opt0.4/"; @for i in $(TOP_DIR)/library/opt/*.tcl ; \ do \ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/opt0.4; \ done; @echo "Installing package msgcat 1.5.0 as a Tcl Module"; @$(INSTALL_DATA) $(TOP_DIR)/library/msgcat/msgcat.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/msgcat-1.5.0.tm; |
︙ | ︙ |
Changes to win/Makefile.in.
︙ | ︙ | |||
630 631 632 633 634 635 636 | $(COPY) "$$i" "$(SCRIPT_INSTALL_DIR)"; \ done; @echo "Installing library http1.0 directory"; @for j in $(ROOT_DIR)/library/http1.0/*.tcl; \ do \ $(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/http1.0"; \ done; | | | | 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 | $(COPY) "$$i" "$(SCRIPT_INSTALL_DIR)"; \ done; @echo "Installing library http1.0 directory"; @for j in $(ROOT_DIR)/library/http1.0/*.tcl; \ do \ $(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/http1.0"; \ done; @echo "Installing package http 2.8.6 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.6/http-2.8.6.tm; @echo "Installing library opt0.4 directory"; @for j in $(ROOT_DIR)/library/opt/*.tcl; \ do \ $(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/opt0.4"; \ done; @echo "Installing package msgcat 1.5.0 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/msgcat/msgcat.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/msgcat-1.5.0.tm; |
︙ | ︙ |