diff options
35 files changed, 186 insertions, 187 deletions
diff --git a/compat/fake-rfc2553.c b/compat/fake-rfc2553.c index cfe4c39..066f83f 100644 --- a/compat/fake-rfc2553.c +++ b/compat/fake-rfc2553.c @@ -43,32 +43,32 @@ TCL_DECLARE_MUTEX(netdbMutex) static size_t strlcpy(char *dst, const char *src, size_t siz) { - char *d = dst; - const char *s = src; - size_t n = siz; + char *d = dst; + const char *s = src; + size_t n = siz; - /* Copy as many bytes as will fit */ - if (n != 0 && --n != 0) { - do { - if ((*d++ = *s++) == 0) - break; - } while (--n != 0); - } + /* Copy as many bytes as will fit */ + if (n != 0 && --n != 0) { + do { + if ((*d++ = *s++) == 0) + break; + } while (--n != 0); + } - /* Not enough room in dst, add NUL and traverse rest of src */ - if (n == 0) { - if (siz != 0) - *d = '\0'; /* NUL-terminate dst */ - while (*s++) - ; - } + /* Not enough room in dst, add NUL and traverse rest of src */ + if (n == 0) { + if (siz != 0) + *d = '\0'; /* NUL-terminate dst */ + while (*s++) + ; + } - return(s - src - 1); /* count does not include NUL */ + return(s - src - 1); /* count does not include NUL */ } #endif int fake_getnameinfo(const struct sockaddr *sa, size_t salen, char *host, - size_t hostlen, char *serv, size_t servlen, int flags) + size_t hostlen, char *serv, size_t servlen, int flags) { struct sockaddr_in *sin = (struct sockaddr_in *)sa; struct hostent *hp; diff --git a/generic/regc_color.c b/generic/regc_color.c index f1e25d2..ccb1826 100644 --- a/generic/regc_color.c +++ b/generic/regc_color.c @@ -430,7 +430,7 @@ newsub( /* - subrange - allocate new subcolors to this range of chrs, fill in arcs ^ static void subrange(struct vars *, pchr, pchr, struct state *, - ^ struct state *); + ^ struct state *); */ static void subrange( @@ -689,7 +689,7 @@ uncolorchain( /* - rainbow - add arcs of all full colors (but one) between specified states ^ static void rainbow(struct nfa *, struct colormap *, int, pcolor, - ^ struct state *, struct state *); + ^ struct state *, struct state *); */ static void rainbow( @@ -716,7 +716,7 @@ rainbow( - colorcomplement - add arcs of complementary colors * The calling sequence ought to be reconciled with cloneouts(). ^ static void colorcomplement(struct nfa *, struct colormap *, int, - ^ struct state *, struct state *, struct state *); + ^ struct state *, struct state *, struct state *); */ static void colorcomplement( diff --git a/generic/regc_locale.c b/generic/regc_locale.c index b6687f3..6613e69 100644 --- a/generic/regc_locale.c +++ b/generic/regc_locale.c @@ -1187,24 +1187,24 @@ cclass( } break; case CC_PRINT: - cv = getcvec(v, NUM_SPACE_CHAR + NUM_GRAPH_CHAR, NUM_SPACE_RANGE + NUM_GRAPH_RANGE - 1); - if (cv) { - for (i=1 ; i<NUM_SPACE_RANGE ; i++) { - addrange(cv, spaceRangeTable[i].start, - spaceRangeTable[i].end); - } - for (i=0 ; i<NUM_SPACE_CHAR ; i++) { - addchr(cv, spaceCharTable[i]); - } - for (i=0 ; i<NUM_GRAPH_RANGE ; i++) { - addrange(cv, graphRangeTable[i].start, - graphRangeTable[i].end); - } - for (i=0 ; i<NUM_GRAPH_CHAR ; i++) { - addchr(cv, graphCharTable[i]); - } - } - break; + cv = getcvec(v, NUM_SPACE_CHAR + NUM_GRAPH_CHAR, NUM_SPACE_RANGE + NUM_GRAPH_RANGE - 1); + if (cv) { + for (i=1 ; i<NUM_SPACE_RANGE ; i++) { + addrange(cv, spaceRangeTable[i].start, + spaceRangeTable[i].end); + } + for (i=0 ; i<NUM_SPACE_CHAR ; i++) { + addchr(cv, spaceCharTable[i]); + } + for (i=0 ; i<NUM_GRAPH_RANGE ; i++) { + addrange(cv, graphRangeTable[i].start, + graphRangeTable[i].end); + } + for (i=0 ; i<NUM_GRAPH_CHAR ; i++) { + addchr(cv, graphCharTable[i]); + } + } + break; case CC_GRAPH: cv = getcvec(v, NUM_GRAPH_CHAR, NUM_GRAPH_RANGE); if (cv) { diff --git a/generic/regc_nfa.c b/generic/regc_nfa.c index 5357571..abeb359 100644 --- a/generic/regc_nfa.c +++ b/generic/regc_nfa.c @@ -570,7 +570,7 @@ findarc( /* - cparc - allocate a new arc within an NFA, copying details from old one ^ static void cparc(struct nfa *, struct arc *, struct state *, - ^ struct state *); + ^ struct state *); */ static void cparc( @@ -641,19 +641,19 @@ sortins_cmp( return -1; } if (aa->from->no > bb->from->no) { - return 1; + return 1; } if (aa->co < bb->co) { - return -1; + return -1; } if (aa->co > bb->co) { - return 1; + return 1; } if (aa->type < bb->type) { - return -1; + return -1; } if (aa->type > bb->type) { - return 1; + return 1; } return 0; } @@ -1118,7 +1118,7 @@ copyouts( cparc(nfa, a, newState, a->to); } } else { - /* + /* * With many arcs, use a sort-merge approach. Note that createarc() * will put new arcs onto the front of newState's chain, so it does * not break our walk through the sorted part of the chain. @@ -1177,7 +1177,7 @@ copyouts( /* - cloneouts - copy out arcs of a state to another state pair, modifying type ^ static void cloneouts(struct nfa *, struct state *, struct state *, - ^ struct state *, int); + ^ struct state *, int); */ static void cloneouts( @@ -1267,7 +1267,7 @@ deltraverse( * well as mark already-seen states. (You knew there was a reason why it's a * state pointer, didn't you? :-)) ^ static void dupnfa(struct nfa *, struct state *, struct state *, - ^ struct state *, struct state *); + ^ struct state *, struct state *); */ static void dupnfa( @@ -1599,10 +1599,10 @@ pull( s->tmp = *intermediates; *intermediates = s; } - cparc(nfa, con, a->from, s); + cparc(nfa, con, a->from, s); cparc(nfa, a, s, to); - freearc(nfa, a); - break; + freearc(nfa, a); + break; default: assert(NOTREACHED); break; @@ -1779,9 +1779,9 @@ push( *intermediates = s; } cparc(nfa, con, s, a->to); - cparc(nfa, a, from, s); - freearc(nfa, a); - break; + cparc(nfa, a, from, s); + freearc(nfa, a); + break; default: assert(NOTREACHED); break; @@ -2021,11 +2021,11 @@ fixempties( } } - /* Reset the tmp fields as we walk back */ - nexts = s2->tmp; - s2->tmp = NULL; - } - s->tmp = NULL; + /* Reset the tmp fields as we walk back */ + nexts = s2->tmp; + s2->tmp = NULL; + } + s->tmp = NULL; assert(arccount <= totalinarcs); /* Remember how many original inarcs this state has */ @@ -2185,12 +2185,12 @@ fixconstraintloops( freearc(nfa, a); } else { hasconstraints = 1; - } + } } } - /* If we removed all the outarcs, the state is useless. */ - if (s->nouts == 0 && !s->flag) { - dropstate(nfa, s); + /* If we removed all the outarcs, the state is useless. */ + if (s->nouts == 0 && !s->flag) { + dropstate(nfa, s); } } @@ -2235,7 +2235,7 @@ fixconstraintloops( } if (f != NULL) { - dumpnfa(nfa, f); + dumpnfa(nfa, f); } } @@ -2725,7 +2725,7 @@ cleanup( /* - markreachable - recursive marking of reachable states ^ static void markreachable(struct nfa *, struct state *, struct state *, - ^ struct state *); + ^ struct state *); */ static void markreachable( @@ -2749,7 +2749,7 @@ markreachable( /* - markcanreach - recursive marking of states which can reach here ^ static void markcanreach(struct nfa *, struct state *, struct state *, - ^ struct state *); + ^ struct state *); */ static void markcanreach( diff --git a/generic/regcomp.c b/generic/regcomp.c index 012e37c..949f397 100644 --- a/generic/regcomp.c +++ b/generic/regcomp.c @@ -644,7 +644,7 @@ makesearch( * together with '|'. They appear in the tree as the left children of a chain * of '|' subres. ^ static struct subre *parse(struct vars *, int, int, struct state *, - ^ struct state *); + ^ struct state *); */ static struct subre * parse( @@ -726,7 +726,7 @@ parse( * Concatenated things are bundled up as much as possible, with separate * ',' nodes introduced only when necessary due to substructure. ^ static struct subre *parsebranch(struct vars *, int, int, struct state *, - ^ struct state *, int); + ^ struct state *, int); */ static struct subre * parsebranch( @@ -775,7 +775,7 @@ parsebranch( * particular, it contains a recursion that can involve parsing the rest of * the branch, making this function's name somewhat inaccurate. ^ static void parseqatom(struct vars *, int, int, struct state *, - ^ struct state *, struct subre *); + ^ struct state *, struct subre *); */ static void parseqatom( @@ -1649,7 +1649,7 @@ onechr( /* - dovec - fill in arcs for each element of a cvec ^ static void dovec(struct vars *, struct cvec *, struct state *, - ^ struct state *); + ^ struct state *); */ static void dovec( diff --git a/generic/rege_dfa.c b/generic/rege_dfa.c index 5d49aa5..c8c74f0 100644 --- a/generic/rege_dfa.c +++ b/generic/rege_dfa.c @@ -159,7 +159,7 @@ longest( /* - shortest - shortest-preferred matching engine ^ static chr *shortest(struct vars *, struct dfa *, chr *, chr *, chr *, - ^ chr **, int *); + ^ chr **, int *); */ static chr * /* endpoint, or NULL */ shortest( @@ -308,7 +308,7 @@ lastCold( /* - newDFA - set up a fresh DFA ^ static struct dfa *newDFA(struct vars *, struct cnfa *, - ^ struct colormap *, struct smalldfa *); + ^ struct colormap *, struct smalldfa *); */ static struct dfa * newDFA( @@ -477,7 +477,7 @@ initialize( /* - miss - handle a cache miss ^ static struct sset *miss(struct vars *, struct dfa *, struct sset *, - ^ pcolor, chr *, chr *); + ^ pcolor, chr *, chr *); */ static struct sset * /* NULL if goes to empty set */ miss( diff --git a/generic/tclDate.c b/generic/tclDate.c index a22168f..312a000 100644 --- a/generic/tclDate.c +++ b/generic/tclDate.c @@ -2649,7 +2649,7 @@ TclClockFreeScan( /* parse */ status = yyparse(info); if (status == 1) { - const char *msg = NULL; + const char *msg = NULL; if (info->errFlags & CLF_HAVEDATE) { msg = "more than one date in string"; } else if (info->errFlags & CLF_TIME) { diff --git a/generic/tclGetDate.y b/generic/tclGetDate.y index 3b04de4..301bf9d 100644 --- a/generic/tclGetDate.y +++ b/generic/tclGetDate.y @@ -1025,7 +1025,7 @@ TclClockFreeScan( /* parse */ status = yyparse(info); if (status == 1) { - const char *msg = NULL; + const char *msg = NULL; if (info->errFlags & CLF_HAVEDATE) { msg = "more than one date in string"; } else if (info->errFlags & CLF_TIME) { diff --git a/generic/tclScan.c b/generic/tclScan.c index 9a9e773..4ffe177 100644 --- a/generic/tclScan.c +++ b/generic/tclScan.c @@ -368,7 +368,7 @@ ValidateFormat( ull, (Tcl_Size)TCL_SIZE_MAX-1)); Tcl_SetErrorCode( - interp, "TCL", "FORMAT", "WIDTHLIMIT", (void *)NULL); + interp, "TCL", "FORMAT", "WIDTHLIMIT", (char *)NULL); goto error; } flags |= SCAN_WIDTH; diff --git a/generic/tclTest.c b/generic/tclTest.c index 795310d..0bb09f6 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -2070,7 +2070,7 @@ static void SpecialFree( * these functions (i/o command cannot test all combinations) * The arguments at the script level are roughly those of the above * functions: - * encodingname srcbytes flags state dstlen ?srcreadvar? ?dstwrotevar? ?dstcharsvar? + * encodingname srcbytes flags state dstlen ?srcreadvar? ?dstwrotevar? ?dstcharsvar? * * Results: * TCL_OK or TCL_ERROR. This any errors running the test, NOT the @@ -3754,7 +3754,7 @@ TestlinkarrayCmd( i++; } if (Tcl_GetIndexFromObj(interp, objv[i++], LinkType, "type", 0, - &typeIndex) != TCL_OK) { + &typeIndex) != TCL_OK) { return TCL_ERROR; } if (Tcl_GetIntFromObj(interp, objv[i++], &size) == TCL_ERROR) { @@ -3769,7 +3769,7 @@ TestlinkarrayCmd( if (i < objc) { if (Tcl_GetWideIntFromObj(interp, objv[i], &addr) == TCL_ERROR) { - Tcl_SetObjResult(interp, Tcl_NewStringObj( + Tcl_SetObjResult(interp, Tcl_NewStringObj( "wrong address value", -1)); return TCL_ERROR; } @@ -8531,15 +8531,15 @@ InterpCompiledVarResolver( Tcl_ResolvedVarInfo **rPtr) { if (*name == 'T') { - MyResolvedVarInfo *resVarInfo = (MyResolvedVarInfo *)Tcl_Alloc(sizeof(MyResolvedVarInfo)); - - resVarInfo->vInfo.fetchProc = MyCompiledVarFetch; - resVarInfo->vInfo.deleteProc = MyCompiledVarFree; - resVarInfo->var = NULL; - resVarInfo->nameObj = Tcl_NewStringObj(name, -1); - Tcl_IncrRefCount(resVarInfo->nameObj); - *rPtr = &resVarInfo->vInfo; - return TCL_OK; + MyResolvedVarInfo *resVarInfo = (MyResolvedVarInfo *)Tcl_Alloc(sizeof(MyResolvedVarInfo)); + + resVarInfo->vInfo.fetchProc = MyCompiledVarFetch; + resVarInfo->vInfo.deleteProc = MyCompiledVarFree; + resVarInfo->var = NULL; + resVarInfo->nameObj = Tcl_NewStringObj(name, -1); + Tcl_IncrRefCount(resVarInfo->nameObj); + *rPtr = &resVarInfo->vInfo; + return TCL_OK; } return TCL_CONTINUE; } @@ -8656,8 +8656,7 @@ int TestApplyLambdaObjCmd ( * - The body of the lambda (lambdaObjs[1]) ALREADY has internal * representation of ByteCode and thus will not be compiled again */ - evalObjs[1] = lambdaObj; /* lambdaObj already has a ref count so - no need for IncrRef */ + evalObjs[1] = lambdaObj; /* lambdaObj already has a ref count so no need for IncrRef */ result = Tcl_EvalObjv(interp, 2, evalObjs, TCL_EVAL_GLOBAL); Tcl_DecrRefCount(evalObjs[0]); Tcl_DecrRefCount(lambdaObj); diff --git a/generic/tclThreadTest.c b/generic/tclThreadTest.c index e4a9312..49d9cf2 100644 --- a/generic/tclThreadTest.c +++ b/generic/tclThreadTest.c @@ -985,7 +985,7 @@ ThreadCancel( Tcl_MutexUnlock(&threadMutex); Tcl_ResetResult(interp); return Tcl_CancelEval(tsdPtr->interp, - (result != NULL) ? Tcl_NewStringObj(result, -1) : NULL, 0, flags); + (result != NULL) ? Tcl_NewStringObj(result, -1) : NULL, 0, flags); } /* diff --git a/library/auto.tcl b/library/auto.tcl index 824cdac..cc779cf 100644 --- a/library/auto.tcl +++ b/library/auto.tcl @@ -45,7 +45,7 @@ proc auto_reset {} { # initialization script and set a global library variable. # # Arguments: -# basename Prefix of the directory name, (e.g., "tk") +# basename Prefix of the directory name, (e.g., "tk") # version Version number of the package, (e.g., "8.0") # patch Patchlevel of the package, (e.g., "8.0.3") # initScript Initialization script to source (e.g., tk.tcl) @@ -130,7 +130,7 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} { } else { catch {zipfs unmount $mountpoint} } - } + } } } } @@ -480,9 +480,9 @@ proc auto_mkindex_parser::childhook {cmd} { # "tclIndex" file for auto-loading. # # Arguments: -# name Name of command recognized in Tcl files. +# name Name of command recognized in Tcl files. # arglist Argument list for command. -# body Implementation of command to handle indexing. +# body Implementation of command to handle indexing. proc auto_mkindex_parser::command {name arglist body} { hook [list auto_mkindex_parser::commandInit $name $arglist $body] @@ -494,9 +494,9 @@ proc auto_mkindex_parser::command {name arglist body} { # called when the interpreter used by the parser is created. # # Arguments: -# name Name of command recognized in Tcl files. +# name Name of command recognized in Tcl files. # arglist Argument list for command. -# body Implementation of command to handle indexing. +# body Implementation of command to handle indexing. proc auto_mkindex_parser::commandInit {name arglist body} { variable parser diff --git a/library/clock.tcl b/library/clock.tcl index ef82372..83c6e61 100644 --- a/library/clock.tcl +++ b/library/clock.tcl @@ -140,9 +140,9 @@ proc ::tcl::clock::Initialize {} { Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec } MONTHS_FULL { - January February March - April May June - July August September + January February March + April May June + July August September October November December } PM {pm} @@ -292,7 +292,7 @@ proc ::tcl::clock::Initialize {} { # The keys are long lists of values obtained from the time zone # information in the Registry. In order, the list elements are: - # Bias StandardBias DaylightBias + # Bias StandardBias DaylightBias # StandardDate.wYear StandardDate.wMonth StandardDate.wDayOfWeek # StandardDate.wDay StandardDate.wHour StandardDate.wMinute # StandardDate.wSecond StandardDate.wMilliseconds @@ -339,7 +339,7 @@ proc ::tcl::clock::Initialize {} { {3600 0 3600 0 10 0 5 3 0 0 0 0 3 0 5 2 0 0 0} :CET {7200 0 3600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} :Africa/Harare {7200 0 3600 0 9 4 5 23 59 59 0 0 4 4 5 23 59 59 0} - :Africa/Cairo + :Africa/Cairo {7200 0 3600 0 10 0 5 4 0 0 0 0 3 0 5 3 0 0 0} :Europe/Helsinki {7200 0 3600 0 9 0 3 2 0 0 0 0 3 5 5 2 0 0 0} :Asia/Jerusalem {7200 0 3600 0 9 0 5 1 0 0 0 0 3 0 5 0 0 0 0} :Europe/Bucharest @@ -480,9 +480,9 @@ proc ::tcl::clock::Initialize {} { variable LocFmtMap [dict create]; # Dictionary with localized format maps variable TimeZoneBad [dict create]; # Dictionary whose keys are time zone - # names and whose values are 1 if + # names and whose values are 1 if # the time zone is unknown and 0 - # if it is known. + # if it is known. variable TZData; # Array whose keys are time zone names # and whose values are lists of quads # comprising start time, UTC offset, @@ -518,7 +518,7 @@ proc ::tcl::clock::mcget {loc} { set loc [mclocale] } if {$loc ne {}} { - set loc [string tolower $loc] + set loc [string tolower $loc] } # try to retrieve now if already available: @@ -651,7 +651,7 @@ proc ::tcl::clock::GetSystemLocale {} { proc ::tcl::clock::EnterLocale { locale } { switch -- $locale system { - set locale [GetSystemLocale] + set locale [GetSystemLocale] } current { set locale [mclocale] } @@ -1001,7 +1001,7 @@ proc ::tcl::clock::SetupTimeZone { timezone {alias {}} } { LoadZoneinfoFile [string range $timezone 1 end] }] } then { - dict set TimeZoneBad $timezone 1 + dict set TimeZoneBad $timezone 1 return -code error \ -errorcode [list CLOCK badTimeZone $timezone] \ "time zone \"$timezone\" not found" diff --git a/library/history.tcl b/library/history.tcl index e3d3fe4..ec59ac7 100644 --- a/library/history.tcl +++ b/library/history.tcl @@ -89,7 +89,7 @@ trace add command ::history delete [list apply {{oldName newName op} { # exec (optional) a substring of "exec" causes the command to # be evaled. # Results: -# If executing, then the results of the command are returned +# If executing, then the results of the command are returned # # Side Effects: # Adds to the history list diff --git a/library/http/http.tcl b/library/http/http.tcl index d53ecef..63c2403 100644 --- a/library/http/http.tcl +++ b/library/http/http.tcl @@ -2449,7 +2449,7 @@ proc http::Connected {token proto phost srvurl} { if {[info exists state(reusing)] && $state(reusing)} { # The socket was closed at the server end, and closed at # this end by http::CheckEof. - if {[TestForReplay $token write $err a]} { + if {[TestForReplay $token write $err a]} { return } else { Finish $token {failed to re-use socket} @@ -3396,7 +3396,7 @@ proc http::cleanup {token} { # # Side Effects # Sets the status of the connection, which unblocks -# the waiting geturl call +# the waiting geturl call proc http::Connect {token proto phost srvurl} { variable $token @@ -4925,7 +4925,7 @@ proc http::ReceiveChunked {chan command} { } # http::SplitCommaSeparatedFieldValue -- -# Return the individual values of a comma-separated field value. +# Return the individual values of a comma-separated field value. # # Arguments: # fieldValue Comma-separated header field value. @@ -4942,7 +4942,7 @@ proc http::SplitCommaSeparatedFieldValue {fieldValue} { # http::GetFieldValue -- -# Return the value of a header field. +# Return the value of a header field. # # Arguments: # headers Headers key-value list diff --git a/library/opt/optparse.tcl b/library/opt/optparse.tcl index 0a6cdfa..d8883fe 100644 --- a/library/opt/optparse.tcl +++ b/library/opt/optparse.tcl @@ -811,7 +811,7 @@ proc ::tcl::OptCheckType {arg type {typeArgs ""}} { # Auto magic lazy type determination proc OptGuessType {arg} { - if { $arg == "true" || $arg == "false" } { + if { $arg == "true" || $arg == "false" } { return boolean } if {[string is integer -strict $arg]} { diff --git a/library/package.tcl b/library/package.tcl index 17ace66..118beef 100644 --- a/library/package.tcl +++ b/library/package.tcl @@ -504,7 +504,7 @@ proc tclPkgUnknown {name args} { # In case of version conflict, silently ignore continue } - tclLog "error reading package index file $file: $msg" + tclLog "error reading package index file $file: $msg" } on ok {} { set procdDirs($dir) 1 } @@ -612,7 +612,7 @@ proc tcl::MacOSXPkgUnknown {original name args} { continue } on error msg { if {[regexp {version conflict for package} $msg]} { - # In case of version conflict, silently ignore + # In case of version conflict, silently ignore continue } tclLog "error reading package index file $file: $msg" diff --git a/library/platform/shell.tcl b/library/platform/shell.tcl index 60d5b37..a91849c 100644 --- a/library/platform/shell.tcl +++ b/library/platform/shell.tcl @@ -163,34 +163,34 @@ proc ::platform::shell::TEMP {} { set checked_dir_writable 0 set mypid [pid] for {set i 0} {$i < $maxtries} {incr i} { - set newname $prefix - for {set j 0} {$j < $nrand_chars} {incr j} { - append newname [string index $chars \ + set newname $prefix + for {set j 0} {$j < $nrand_chars} {incr j} { + append newname [string index $chars \ [expr {int(rand()*62)}]] - } + } set newname [file join $tmpdir $newname] - if {[file exists $newname]} { - after 1 - } else { - if {[catch {open $newname $access $permission} channel]} { - if {!$checked_dir_writable} { - set dirname [file dirname $newname] - if {![file writable $dirname]} { - return -code error "Directory $dirname is not writable" - } - set checked_dir_writable 1 - } - } else { - # Success + if {[file exists $newname]} { + after 1 + } else { + if {[catch {open $newname $access $permission} channel]} { + if {!$checked_dir_writable} { + set dirname [file dirname $newname] + if {![file writable $dirname]} { + return -code error "Directory $dirname is not writable" + } + set checked_dir_writable 1 + } + } else { + # Success close $channel - return [file normalize $newname] - } - } + return [file normalize $newname] + } + } } if {$channel ne ""} { - return -code error "Failed to open a temporary file: $channel" + return -code error "Failed to open a temporary file: $channel" } else { - return -code error "Failed to find an unused temporary file name" + return -code error "Failed to find an unused temporary file name" } } diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl index 2fc5838..3cb5e2d 100644 --- a/library/tcltest/tcltest.tcl +++ b/library/tcltest/tcltest.tcl @@ -515,7 +515,7 @@ namespace eval tcltest { unset $varName } namespace eval [namespace current] \ - [list upvar 0 Option($option) $varName] + [list upvar 0 Option($option) $varName] # Workaround for Bug (now Feature Request) 572889. Grrrr.... # Track all the variables tied to options lappend OptionControlledVariables $varName @@ -1914,7 +1914,7 @@ proc tcltest::SubstArguments {argList} { # Arguments: # name - Name of test, in the form foo-1.2. # description - Short textual description of the test, to -# help humans understand what it does. +# help humans understand what it does. # # Results: # None. @@ -2128,7 +2128,7 @@ proc tcltest::test {name description args} { # check if the answer matched the expected answer # Only check if we ran the body of the test (no setup failure) if {!$processTest} { - set scriptFailure 0 + set scriptFailure 0 } elseif {$setupFailure || $codeFailure} { set scriptFailure 0 } elseif {[set scriptCompare [catch { diff --git a/tools/index.tcl b/tools/index.tcl index 07f5868..5426ee6 100644 --- a/tools/index.tcl +++ b/tools/index.tcl @@ -14,12 +14,12 @@ # state - state variable that controls action of text proc. # # topics - array indexed by (package,section,topic) with value -# of topic ID. +# of topic ID. # # keywords - array indexed by keyword string with value of topic ID. # -# curID - current topic ID, starts at 0 and is incremented for -# each new topic file. +# curID - current topic ID, starts at 0 and is incremented for +# each new topic file. # # curPkg - current package name (e.g. Tcl). # diff --git a/tools/makeTestCases.tcl b/tools/makeTestCases.tcl index 1eae645..d1221b8 100755 --- a/tools/makeTestCases.tcl +++ b/tools/makeTestCases.tcl @@ -215,7 +215,7 @@ proc testcases2 { f2 } { # Define the roman numerals set roman { - ? i ii iii iv v vi vii viii ix + ? i ii iii iv v vi vii viii ix x xi xii xiii xiv xv xvi xvii xviii xix xx xxi xxii xxiii xxiv xxv xxvi xxvii xxviii xxix xxx xxxi xxxii xxxiii xxxiv xxxv xxxvi xxxvii xxxviii xxxix @@ -228,7 +228,7 @@ proc testcases2 { f2 } { c } set romanc { - ? c cc ccc cd d dc dcc dccc cm + ? c cc ccc cd d dc dcc dccc cm m mc mcc mccc mcd md mdc mdcc mdccc mcm mm mmc mmcc mmccc mmcd mmd mmdc mmdcc mmdccc mmcm mmm mmmc mmmcc mmmccc mmmcd mmmd mmmdc mmmdcc mmmdccc mmmcm diff --git a/tools/tclOOScript.tcl b/tools/tclOOScript.tcl index 0b75882..0cbe5b7 100644 --- a/tools/tclOOScript.tcl +++ b/tools/tclOOScript.tcl @@ -1,8 +1,8 @@ # tclOOScript.h -- # -# This file contains support scripts for TclOO. They are defined here so -# that the code can be definitely run even in safe interpreters; TclOO's -# core setup is safe. +# This file contains support scripts for TclOO. They are defined here so +# that the code can be definitely run even in safe interpreters; TclOO's +# core setup is safe. # # Copyright © 2012-2019 Donal K. Fellows # Copyright © 2013 Andreas Kupries diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl index 7b3558d..01478aa 100755 --- a/tools/tcltk-man2html.tcl +++ b/tools/tcltk-man2html.tcl @@ -610,8 +610,8 @@ array set remap_link_target { Tcl_Obj Tcl_NewObj Tcl_ObjType Tcl_RegisterObjType Tcl_OpenFileChannelProc Tcl_FSOpenFileChannel - errorinfo env - errorcode env + errorinfo env + errorcode env tcl_pkgpath env Tcl_Command Tcl_CreateObjCommand Tcl_CmdProc Tcl_CreateObjCommand diff --git a/unix/Makefile.in b/unix/Makefile.in index 093edf8..29d3228 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. -VERSION = @TCL_VERSION@ +VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ MINOR_VERSION = @TCL_MINOR_VERSION@ PATCH_LEVEL = @TCL_PATCH_LEVEL@ diff --git a/unix/configure b/unix/configure index b470e3c..2ef18ad 100755 --- a/unix/configure +++ b/unix/configure @@ -5796,7 +5796,7 @@ then : ;; *) # Make sure only first arg gets _r - CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'` + CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'` ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using $CC for compiling with threads" >&5 @@ -10016,7 +10016,7 @@ int main (void) { - socklen_t foo; + socklen_t foo; ; return 0; diff --git a/unix/configure.ac b/unix/configure.ac index 766392e..f2a1b58 100644 --- a/unix/configure.ac +++ b/unix/configure.ac @@ -404,7 +404,7 @@ AC_CACHE_CHECK([for socklen_t], tcl_cv_type_socklen_t, [ #include <sys/types.h> #include <sys/socket.h> ]], [[ - socklen_t foo; + socklen_t foo; ]])],[tcl_cv_type_socklen_t=yes],[tcl_cv_type_socklen_t=no])]) if test $tcl_cv_type_socklen_t = no; then AC_DEFINE(socklen_t, int, [Define as int if socklen_t is not available]) diff --git a/unix/dltest/embtest.c b/unix/dltest/embtest.c index ff58cc4..33f77a0 100644 --- a/unix/dltest/embtest.c +++ b/unix/dltest/embtest.c @@ -34,7 +34,7 @@ int main(int argc, char **argv) { exitcode = 1; } if (!exitcode) { - printf("All OK!\n"); + printf("All OK!\n"); } return exitcode; } diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 7b84923..2b2299e 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -990,7 +990,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ ;; *) # Make sure only first arg gets _r - CC=`echo "$CC" | sed -e 's/^\([[^ ]]*\)/\1_r/'` + CC=`echo "$CC" | sed -e 's/^\([[^ ]]*\)/\1_r/'` ;; esac AC_MSG_RESULT([Using $CC for compiling with threads]) diff --git a/unix/tclUnixTest.c b/unix/tclUnixTest.c index b204c77..26c590d 100644 --- a/unix/tclUnixTest.c +++ b/unix/tclUnixTest.c @@ -549,7 +549,7 @@ TestalarmCmd( * None. * * Side effects: - * Calls the Tcl Async handler. + * Calls the Tcl Async handler. * *---------------------------------------------------------------------- */ @@ -566,7 +566,7 @@ AlarmHandler( * * TestgotsigCmd -- * - * Verify the signal was handled after the testalarm command. + * Verify the signal was handled after the testalarm command. * * Results: * None. diff --git a/win/Makefile.in b/win/Makefile.in index 18ce10d..0773bce 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -79,10 +79,10 @@ CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@ # To change the compiler switches, for example to change from optimization to # debugging symbols, change the following line: -#CFLAGS = $(CFLAGS_DEBUG) -#CFLAGS = $(CFLAGS_OPTIMIZE) -#CFLAGS = $(CFLAGS_DEBUG) $(CFLAGS_OPTIMIZE) -CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@ -DMP_FIXED_CUTOFFS -D__USE_MINGW_ANSI_STDIO=0 +#CFLAGS = $(CFLAGS_DEBUG) +#CFLAGS = $(CFLAGS_OPTIMIZE) +#CFLAGS = $(CFLAGS_DEBUG) $(CFLAGS_OPTIMIZE) +CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@ -DMP_FIXED_CUTOFFS -D__USE_MINGW_ANSI_STDIO=0 # To compile without backward compatibility and deprecated code uncomment the # following @@ -162,7 +162,7 @@ TEST_LOAD_FACILITIES = package ifneeded tcl::test ${VERSION}@TCL_PATCH_LEVEL@ [l ZLIB_DLL_FILE = zlib1.dll TOMMATH_DLL_FILE = libtommath.dll -SHARED_LIBRARIES = $(TCL_DLL_FILE) @ZLIB_DLL_FILE@ @TOMMATH_DLL_FILE@ +SHARED_LIBRARIES = $(TCL_DLL_FILE) @ZLIB_DLL_FILE@ @TOMMATH_DLL_FILE@ STATIC_LIBRARIES = $(TCL_LIB_FILE) TCLSH = tclsh$(VER)${EXESUFFIX} diff --git a/win/makefile.vc b/win/makefile.vc index 2a35668..d2826ea 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -57,7 +57,7 @@ # Any combination of the above may be used (comma separated).
# 'none' will over-ride everything to nothing.
#
-# noembed = Without this option, the Tcl core library scripts
+# noembed = Without this option, the Tcl core library scripts
# are embedded into the executable if "static" is
# specified in OPTS, or into the DLL otherwise. If
# "noembed" is specified, the scripts are not embedded
diff --git a/win/rules.vc b/win/rules.vc index 143ea9e..f1bcf4c 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -1248,7 +1248,7 @@ TKSTUBLIBNAME = tkstub.lib !endif
!if $(DOING_TK)
-WISH = $(OUT_DIR)\$(WISHNAME)
+WISH = $(OUT_DIR)\$(WISHNAME)
TKSTUBLIB = $(OUT_DIR)\$(TKSTUBLIBNAME)
TKIMPLIB = $(OUT_DIR)\$(TKIMPLIBNAME)
TKLIB = $(OUT_DIR)\$(TKLIBNAME)
@@ -19,17 +19,17 @@ LANGUAGE 0x9, 0x1 /* LANG_ENGLISH, SUBLANG_DEFAULT */ VS_VERSION_INFO VERSIONINFO - FILEVERSION TCL_MAJOR_VERSION,TCL_MINOR_VERSION,TCL_RELEASE_LEVEL,TCL_RELEASE_SERIAL + FILEVERSION TCL_MAJOR_VERSION,TCL_MINOR_VERSION,TCL_RELEASE_LEVEL,TCL_RELEASE_SERIAL PRODUCTVERSION TCL_MAJOR_VERSION,TCL_MINOR_VERSION,TCL_RELEASE_LEVEL,TCL_RELEASE_SERIAL - FILEFLAGSMASK 0x3fL + FILEFLAGSMASK 0x3fL #ifdef DEBUG - FILEFLAGS VS_FF_DEBUG + FILEFLAGS VS_FF_DEBUG #else - FILEFLAGS 0x0L + FILEFLAGS 0x0L #endif - FILEOS VOS__WINDOWS32 - FILETYPE VFT_DLL - FILESUBTYPE 0x0L + FILEOS VOS__WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN diff --git a/win/tclsh.rc b/win/tclsh.rc index f439d08..77d2d73 100644 --- a/win/tclsh.rc +++ b/win/tclsh.rc @@ -26,17 +26,17 @@ LANGUAGE 0x9, 0x1 /* LANG_ENGLISH, SUBLANG_DEFAULT */ VS_VERSION_INFO VERSIONINFO - FILEVERSION TCL_MAJOR_VERSION,TCL_MINOR_VERSION,TCL_RELEASE_LEVEL,TCL_RELEASE_SERIAL + FILEVERSION TCL_MAJOR_VERSION,TCL_MINOR_VERSION,TCL_RELEASE_LEVEL,TCL_RELEASE_SERIAL PRODUCTVERSION TCL_MAJOR_VERSION,TCL_MINOR_VERSION,TCL_RELEASE_LEVEL,TCL_RELEASE_SERIAL - FILEFLAGSMASK 0x3fL + FILEFLAGSMASK 0x3fL #ifdef DEBUG - FILEFLAGS VS_FF_DEBUG + FILEFLAGS VS_FF_DEBUG #else - FILEFLAGS 0x0L + FILEFLAGS 0x0L #endif - FILEOS VOS__WINDOWS32 - FILETYPE VFT_APP - FILESUBTYPE 0x0L + FILEOS VOS__WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN diff --git a/win/tcltest.rc b/win/tcltest.rc index 847a250..ea55a62 100644 --- a/win/tcltest.rc +++ b/win/tcltest.rc @@ -26,17 +26,17 @@ LANGUAGE 0x9, 0x1 /* LANG_ENGLISH, SUBLANG_DEFAULT */ VS_VERSION_INFO VERSIONINFO - FILEVERSION TCL_MAJOR_VERSION,TCL_MINOR_VERSION,TCL_RELEASE_LEVEL,TCL_RELEASE_SERIAL + FILEVERSION TCL_MAJOR_VERSION,TCL_MINOR_VERSION,TCL_RELEASE_LEVEL,TCL_RELEASE_SERIAL PRODUCTVERSION TCL_MAJOR_VERSION,TCL_MINOR_VERSION,TCL_RELEASE_LEVEL,TCL_RELEASE_SERIAL - FILEFLAGSMASK 0x3fL + FILEFLAGSMASK 0x3fL #ifdef DEBUG - FILEFLAGS VS_FF_DEBUG + FILEFLAGS VS_FF_DEBUG #else - FILEFLAGS 0x0L + FILEFLAGS 0x0L #endif - FILEOS VOS__WINDOWS32 - FILETYPE VFT_APP - FILESUBTYPE 0x0L + FILEOS VOS__WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN |