-- cgit v0.12 From f14b27d11940c7ec28136bcd04a21b6f75870ad9 Mon Sep 17 00:00:00 2001 From: kjnash Date: Sun, 14 Jul 2019 09:04:15 +0000 Subject: Bugfix for #f81beca7af. Revert mistaken change to -querychannel -translation in library/http/http.tcl. Bump http version to 2.9.1. Also, give correct major version in doc/http.n and adjust example user-agent string to a 2.9 value. --- doc/http.n | 4 ++-- library/http/http.tcl | 6 ++---- library/http/pkgIndex.tcl | 2 +- unix/Makefile.in | 4 ++-- win/Makefile.in | 4 ++-- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/doc/http.n b/doc/http.n index 7e633b3..e8c8c90 100644 --- a/doc/http.n +++ b/doc/http.n @@ -13,7 +13,7 @@ .SH NAME http \- Client-side implementation of the HTTP/1.1 protocol .SH SYNOPSIS -\fBpackage require http ?2.8?\fR +\fBpackage require http ?2.9?\fR .\" See Also -useragent option documentation in body! .sp \fB::http::config ?\fI\-option value\fR ...? @@ -161,7 +161,7 @@ throwing an error processing non-latin-1 characters. The value of the User-Agent header in the HTTP request. In an unsafe interpreter, the default value depends upon the operating system, and the version numbers of \fBhttp\fR and \fBTcl\fR, and is (for example) -.QW "\fBMozilla/5.0 (Windows; U; Windows NT 10.0) http/2.8.12 Tcl/8.6.8\fR" . +.QW "\fBMozilla/5.0 (Windows; U; Windows NT 10.0) http/2.9.0 Tcl/8.6.9\fR" . A safe interpreter cannot determine its operating system, and so the default in a safe interpreter is to use a Windows 10 value with the current version numbers of \fBhttp\fR and \fBTcl\fR. diff --git a/library/http/http.tcl b/library/http/http.tcl index f82bced..5999a56 100644 --- a/library/http/http.tcl +++ b/library/http/http.tcl @@ -11,7 +11,7 @@ package require Tcl 8.6- # Keep this in sync with pkgIndex.tcl and with the install directories in # Makefiles -package provide http 2.9.0 +package provide http 2.9.1 namespace eval http { # Allow resourcing to not clobber existing data @@ -1332,9 +1332,7 @@ proc http::Connected {token proto phost srvurl} { set how POST # The query channel must be blocking for the async Write to # work properly. - lassign [fconfigure $sock -translation] trRead trWrite - fconfigure $state(-querychannel) -blocking 1 \ - -translation [list $trRead binary] + fconfigure $state(-querychannel) -blocking 1 -translation binary set contDone 0 } if {[info exists state(-method)] && ($state(-method) ne "")} { diff --git a/library/http/pkgIndex.tcl b/library/http/pkgIndex.tcl index 4f74635..f9f1176 100644 --- a/library/http/pkgIndex.tcl +++ b/library/http/pkgIndex.tcl @@ -1,2 +1,2 @@ if {![package vsatisfies [package provide Tcl] 8.6-]} {return} -package ifneeded http 2.9.0 [list tclPkgSetup $dir http 2.9.0 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}] +package ifneeded http 2.9.1 [list tclPkgSetup $dir http 2.9.1 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}] diff --git a/unix/Makefile.in b/unix/Makefile.in index b3f0842..2a79688 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -846,8 +846,8 @@ install-libraries: libraries do \ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/http1.0; \ done; - @echo "Installing package http 2.9.0 as a Tcl Module"; - @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.6/http-2.9.0.tm; + @echo "Installing package http 2.9.1 as a Tcl Module"; + @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.6/http-2.9.1.tm; @echo "Installing package opt0.4 files to $(SCRIPT_INSTALL_DIR)/opt0.4/"; @for i in $(TOP_DIR)/library/opt/*.tcl ; \ do \ diff --git a/win/Makefile.in b/win/Makefile.in index fc0cd2c..fbb0c77 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -695,8 +695,8 @@ install-libraries: libraries install-tzdata install-msgs do \ $(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/http1.0"; \ done; - @echo "Installing package http 2.9.0 as a Tcl Module"; - @$(COPY) $(ROOT_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.6/http-2.9.0.tm; + @echo "Installing package http 2.9.1 as a Tcl Module"; + @$(COPY) $(ROOT_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.6/http-2.9.1.tm; @echo "Installing library opt0.4 directory"; @for j in $(ROOT_DIR)/library/opt/*.tcl; \ do \ -- cgit v0.12 From 14143230c875cfddb154eef9698c9344bbb905d5 Mon Sep 17 00:00:00 2001 From: sebres Date: Thu, 16 Apr 2020 11:54:34 +0000 Subject: added (reworked) patch suggested by aku in [f70ce1fead]: recognize stream is done (and unget the unprocessed data back to input channel) --- generic/tclZlib.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 002c6ae..1ee8919 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -128,6 +128,10 @@ typedef struct { Tcl_Obj *compDictObj; /* Byte-array object containing compression * dictionary (not dictObj!) to use if * necessary. */ + int over; /* Number of bytes we read to far in the + * underlying stream */ + int skip; /* Bytes processed in the last read before + * the overshot */ } ZlibChannelData; /* @@ -137,11 +141,14 @@ typedef struct { * the input compressor. * OUT_HEADER - Whether the outputHeader field has been registered * with the output decompressor. + * STREAM_DONE - Flag to signal stream end up to transform + * input. */ -#define ASYNC 0x1 -#define IN_HEADER 0x2 -#define OUT_HEADER 0x4 +#define ASYNC 0x01 +#define IN_HEADER 0x02 +#define OUT_HEADER 0x04 +#define STREAM_DONE 0x10 /* * Size of buffers allocated by default, and the range it can be set to. The @@ -2949,6 +2956,10 @@ ZlibTransformClose( (void) inflateEnd(&cd->inStream); } + if (cd->over) { + Tcl_Ungets (cd->parent, cd->inBuffer + cd->skip, cd->over, 0); + } + /* * Release all memory. */ @@ -3010,7 +3021,7 @@ ZlibTransformInput( buf += copied; gotBytes += copied; - if (toRead == 0) { + if (toRead == 0 || (cd->flags & STREAM_DONE)) { return gotBytes; } @@ -3830,8 +3841,13 @@ ResultGenerate( * The cases where we're definitely done. */ + if (e == Z_STREAM_END) { + cd->flags |= STREAM_DONE; + cd->over = cd->inStream.avail_in; + cd->skip = n - cd->over; + return TCL_OK; + } if (((flush == Z_SYNC_FLUSH) && (e == Z_BUF_ERROR)) - || (e == Z_STREAM_END) || (e == Z_OK && written == 0)) { return TCL_OK; } -- cgit v0.12 From b7f84c7bc0a87376cd9d151b61beadb68ab18e03 Mon Sep 17 00:00:00 2001 From: sebres Date: Thu, 16 Apr 2020 13:28:49 +0000 Subject: zlib: performance - set default read ahead limit to DEFAULT_BUFFER_SIZE (4K); better fix avoiding BO (replacement for [54605d16b9]) --- generic/tclZlib.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 1ee8919..23472cf 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -2371,7 +2371,7 @@ ZlibPushSubcmd( const char *const *pushOptions = pushDecompressOptions; enum pushOptions {poDictionary, poHeader, poLevel, poLimit}; Tcl_Obj *headerObj = NULL, *compDictObj = NULL; - int limit = 1, dummy; + int limit = DEFAULT_BUFFER_SIZE, dummy; if (objc < 4) { Tcl_WrongNumArgs(interp, 2, objv, "mode channel ?options...?"); @@ -3661,6 +3661,9 @@ ZlibStackChannelTransform( goto error; } cd->inAllocated = DEFAULT_BUFFER_SIZE; + if (cd->inAllocated < cd->readAheadLimit) { + cd->inAllocated = cd->readAheadLimit; + } cd->inBuffer = ckalloc(cd->inAllocated); if (cd->flags & IN_HEADER) { if (inflateGetHeader(&cd->inStream, &cd->inHeader.header) != Z_OK) { -- cgit v0.12 From 3577e36e79a96a06a2d61bb7c773987768fccdbb Mon Sep 17 00:00:00 2001 From: sebres Date: Thu, 16 Apr 2020 13:43:07 +0000 Subject: zlib: optimize ZlibTransformInput, if inflate is done no read and no generate needed anymore --- generic/tclZlib.c | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 23472cf..53949a5 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -3011,20 +3011,13 @@ ZlibTransformInput( gotBytes = 0; while (toRead > 0) { - /* - * Loop until the request is satisfied (or no data available from - * below, possibly EOF). + /* + * If done - no read (and no genearate) needed anymore, check we have + * to copy decompressed data, otherwise return with size (or 0 for Eof) */ - - copied = ResultCopy(cd, buf, toRead); - toRead -= copied; - buf += copied; - gotBytes += copied; - - if (toRead == 0 || (cd->flags & STREAM_DONE)) { - return gotBytes; + if (cd->flags & STREAM_DONE) { + goto copyDecompressed; } - /* * The buffer is exhausted, but the caller wants even more. We now * have to go to the underlying channel, get more bytes and then @@ -3032,10 +3025,6 @@ ZlibTransformInput( * or temporarily out of data). * * Length (cd->decompressed) == 0, toRead > 0 here. - * - * The zlib transform allows us to read at most one character from the - * underlying channel to properly identify Z_STREAM_END without - * reading over the border. */ readBytes = Tcl_ReadRaw(cd->parent, cd->inBuffer, cd->readAheadLimit); @@ -3054,7 +3043,7 @@ ZlibTransformInput( /* See ReflectInput() in tclIORTrans.c */ if (Tcl_InputBlocked(cd->parent) && (gotBytes > 0)) { - return gotBytes; + break; } *errorCodePtr = Tcl_GetErrno(); @@ -3072,14 +3061,6 @@ ZlibTransformInput( return -1; } - if (Tcl_DStringLength(&cd->decompressed) == 0) { - /* - * The drain delivered nothing. Time to deliver what we've - * got. - */ - - return gotBytes; - } } else /* readBytes > 0 */ { /* * Transform the read chunk, which was not empty. Anything we get @@ -3092,6 +3073,25 @@ ZlibTransformInput( return -1; } } + +copyDecompressed: + + if (Tcl_DStringLength(&cd->decompressed) == 0) { + /* + * The drain delivered nothing. Time to deliver what we've + * got. + */ + break; + } + /* + * Loop until the request is satisfied (or no data available from + * above, possibly EOF). + */ + + copied = ResultCopy(cd, buf, toRead); + toRead -= copied; + buf += copied; + gotBytes += copied; } return gotBytes; } -- cgit v0.12 From fb7b5ca9d3d2253238c7a1923dcb211d5cdee7fb Mon Sep 17 00:00:00 2001 From: sebres Date: Thu, 16 Apr 2020 14:05:24 +0000 Subject: small amend combining similar parts --- generic/tclZlib.c | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 53949a5..b3a6ac2 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -3049,29 +3049,19 @@ ZlibTransformInput( *errorCodePtr = Tcl_GetErrno(); return -1; } - if (readBytes == 0) { - /* - * Eof in parent. - * - * Now this is a bit different. The partial data waiting is - * converted and returned. - */ - if (ResultGenerate(cd, 0, Z_SYNC_FLUSH, errorCodePtr) != TCL_OK) { - return -1; - } - - } else /* readBytes > 0 */ { - /* - * Transform the read chunk, which was not empty. Anything we get - * back is a transformation result to be put into our buffers, and - * the next iteration will put it into the result. - */ + /* + * Transform the read chunk, if not empty. Anything we get + * back is a transformation result to be put into our buffers, and + * the next iteration will put it into the result. + * For the case readBytes is 0 which signaling Eof in parent, the + * partial data waiting is converted and returned. + */ - if (ResultGenerate(cd, readBytes, Z_NO_FLUSH, + if (ResultGenerate(cd, readBytes, + (readBytes != 0) ? Z_NO_FLUSH : Z_SYNC_FLUSH, errorCodePtr) != TCL_OK) { - return -1; - } + return -1; } copyDecompressed: -- cgit v0.12 From becf4bcc18eb7b7114f65c271b21d9d7d6c94d2a Mon Sep 17 00:00:00 2001 From: sebres Date: Thu, 16 Apr 2020 14:37:05 +0000 Subject: few documentation changes (limit default and handling is changed) --- doc/zlib.n | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/zlib.n b/doc/zlib.n index fd29e0d..994a063 100644 --- a/doc/zlib.n +++ b/doc/zlib.n @@ -193,10 +193,12 @@ How hard to compress the data. Must be an integer from 0 (uncompressed) to 9 .TP \fB\-limit\fI readaheadLimit\fR . -The maximum number of bytes ahead to read when decompressing. This defaults to -1, which ensures that data is always decompressed correctly, but may be -increased to improve performance. This is more useful when the channel is -non-blocking. +The maximum number of bytes ahead to read when decompressing. This can be set +to 1 to find the border for multi-stream inflate or mixed data, to ensure it +would handle correctly e. g. some operations on following streams after first +caused to due time. +Otherwise Tcl would try to automatically return previously read extra data +to input stream back. .PP Both compressing and decompressing channel transformations add extra configuration options that may be accessed through \fBchan configure\fR. The @@ -238,10 +240,8 @@ off the data stream. \fB\-limit\fI readaheadLimit\fR . This read-write option is used by decompressing channels to control the -maximum number of bytes ahead to read from the underlying data source. This -defaults to 1, which ensures that data is always decompressed correctly, but -may be increased to improve performance. This is more useful when the channel -is non-blocking. +maximum number of bytes ahead to read from the underlying data source. See +above for more information. .RE .SS "STREAMING SUBCOMMAND" .TP -- cgit v0.12 From b0791473e99d375f6f3b65b13f99728e552f2b5a Mon Sep 17 00:00:00 2001 From: sebres Date: Thu, 16 Apr 2020 19:08:57 +0000 Subject: code simplification, no interim copy/move buffers, no decompression d-string, the inflate occurring in single step (ResultDecompress combines ResultGenerate and ResultCopy); better handling in non-blocking mode (also recognizes or distinguish no data/EAGAIN cases) --- generic/tclZlib.c | 230 ++++++++++++++++++++++++------------------------------ 1 file changed, 103 insertions(+), 127 deletions(-) diff --git a/generic/tclZlib.c b/generic/tclZlib.c index b3a6ac2..68bdf92 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -124,14 +124,9 @@ typedef struct { GzipHeader outHeader; /* Header to write to an output stream, when * compressing a gzip stream. */ Tcl_TimerToken timer; /* Timer used for keeping events fresh. */ - Tcl_DString decompressed; /* Buffer for decompression results. */ Tcl_Obj *compDictObj; /* Byte-array object containing compression * dictionary (not dictObj!) to use if * necessary. */ - int over; /* Number of bytes we read to far in the - * underlying stream */ - int skip; /* Bytes processed in the last read before - * the overshot */ } ZlibChannelData; /* @@ -141,13 +136,14 @@ typedef struct { * the input compressor. * OUT_HEADER - Whether the outputHeader field has been registered * with the output decompressor. - * STREAM_DONE - Flag to signal stream end up to transform - * input. + * STREAM_DECOMPRESS - Signal decompress pending data. + * STREAM_DONE - Flag to signal stream end up to transform input. */ #define ASYNC 0x01 #define IN_HEADER 0x02 #define OUT_HEADER 0x04 +#define STREAM_DECOMPRESS 0x08 #define STREAM_DONE 0x10 /* @@ -191,10 +187,8 @@ static int GenerateHeader(Tcl_Interp *interp, Tcl_Obj *dictObj, GzipHeader *headerPtr, int *extraSizePtr); static int ZlibPushSubcmd(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); -static inline int ResultCopy(ZlibChannelData *cd, char *buf, - int toRead); -static int ResultGenerate(ZlibChannelData *cd, int n, int flush, - int *errorCodePtr); +static int ResultDecompress(ZlibChannelData *cd, char *buf, + int toRead, int flush, int *errorCodePtr); static Tcl_Channel ZlibStackChannelTransform(Tcl_Interp *interp, int mode, int format, int level, int limit, Tcl_Channel channel, Tcl_Obj *gzipHeaderDictPtr, @@ -2953,11 +2947,15 @@ ZlibTransformClose( } while (e != Z_STREAM_END); (void) deflateEnd(&cd->outStream); } else { - (void) inflateEnd(&cd->inStream); - } + /* + * If we have rest of read input (overshot by Z_STREAM_END or on possible error), + * unget this part of buffer back to the parent channel. + */ + if (cd->inStream.avail_in) { + Tcl_Ungets (cd->parent, (char *)cd->inStream.next_in, cd->inStream.avail_in, 0); + } - if (cd->over) { - Tcl_Ungets (cd->parent, cd->inBuffer + cd->skip, cd->over, 0); + (void) inflateEnd(&cd->inStream); } /* @@ -2968,7 +2966,6 @@ ZlibTransformClose( Tcl_DecrRefCount(cd->compDictObj); cd->compDictObj = NULL; } - Tcl_DStringFree(&cd->decompressed); if (cd->inBuffer) { ckfree(cd->inBuffer); @@ -3002,7 +2999,7 @@ ZlibTransformInput( ZlibChannelData *cd = instanceData; Tcl_DriverInputProc *inProc = Tcl_ChannelInputProc(Tcl_GetChannelType(cd->parent)); - int readBytes, gotBytes, copied; + int readBytes, gotBytes; if (cd->mode == TCL_ZLIB_STREAM_DEFLATE) { return inProc(Tcl_GetChannelInstanceData(cd->parent), buf, toRead, @@ -3010,12 +3007,20 @@ ZlibTransformInput( } gotBytes = 0; - while (toRead > 0) { + readBytes = cd->inStream.avail_in; /* how many bytes in buffer now */ + while (!(cd->flags & STREAM_DONE) && toRead > 0) { + int n, decBytes; + + /* if starting from scratch or continuation after full decompression */ + if (!cd->inStream.avail_in) { + /* buffer to start, we can read to whole available buffer */ + cd->inStream.next_in = (Bytef *) cd->inBuffer; + } /* - * If done - no read (and no genearate) needed anymore, check we have - * to copy decompressed data, otherwise return with size (or 0 for Eof) + * If done - no read needed anymore, check we have to copy rest of + * decompressed data, otherwise return with size (or 0 for Eof) */ - if (cd->flags & STREAM_DONE) { + if (cd->flags & STREAM_DECOMPRESS) { goto copyDecompressed; } /* @@ -3023,11 +3028,21 @@ ZlibTransformInput( * have to go to the underlying channel, get more bytes and then * transform them for delivery. We may not get what we want (full EOF * or temporarily out of data). - * - * Length (cd->decompressed) == 0, toRead > 0 here. */ - readBytes = Tcl_ReadRaw(cd->parent, cd->inBuffer, cd->readAheadLimit); + /* Check free buffer size and adjust size of next chunk to read. */ + n = cd->inAllocated - ((char *)cd->inStream.next_in - cd->inBuffer); + if (n <= 0) { + /* Normally unreachable: not enough input buffer to uncompress. + * Todo: firstly try to realloc inBuffer upto MAX_BUFFER_SIZE. + */ + *errorCodePtr = ENOBUFS; + return -1; + } + if (n > cd->readAheadLimit) { + n = cd->readAheadLimit; + } + readBytes = Tcl_ReadRaw(cd->parent, (char *)cd->inStream.next_in, n); /* * Three cases here: @@ -3050,6 +3065,11 @@ ZlibTransformInput( return -1; } + /* more bytes (or Eof if readBytes == 0) */ + cd->inStream.avail_in += readBytes; + +copyDecompressed: + /* * Transform the read chunk, if not empty. Anything we get * back is a transformation result to be put into our buffers, and @@ -3058,31 +3078,39 @@ ZlibTransformInput( * partial data waiting is converted and returned. */ - if (ResultGenerate(cd, readBytes, + decBytes = ResultDecompress(cd, buf, toRead, (readBytes != 0) ? Z_NO_FLUSH : Z_SYNC_FLUSH, - errorCodePtr) != TCL_OK) { + errorCodePtr); + if (decBytes == -1) { return -1; } + gotBytes += decBytes; + buf += decBytes; + toRead -= decBytes; -copyDecompressed: - - if (Tcl_DStringLength(&cd->decompressed) == 0) { + if (((decBytes == 0) || (cd->flags & STREAM_DECOMPRESS))) { /* - * The drain delivered nothing. Time to deliver what we've - * got. + * The drain delivered nothing (or buffer too small to decompress). + * Time to deliver what we've got. */ + if (!gotBytes && !(cd->flags & STREAM_DONE)) { + /* if no-data, but not ready - avoid signaling Eof, + * continue in blocking mode, otherwise EAGAIN */ + if (Tcl_InputBlocked(cd->parent)) { + continue; + } + *errorCodePtr = EAGAIN; + return -1; + } break; } + /* * Loop until the request is satisfied (or no data available from * above, possibly EOF). */ - - copied = ResultCopy(cd, buf, toRead); - toRead -= copied; - buf += copied; - gotBytes += copied; } + return gotBytes; } @@ -3465,7 +3493,7 @@ ZlibTransformWatch( watchProc = Tcl_ChannelWatchProc(Tcl_GetChannelType(cd->parent)); watchProc(Tcl_GetChannelInstanceData(cd->parent), mask); - if (!(mask & TCL_READABLE) || Tcl_DStringLength(&cd->decompressed) == 0) { + if (!(mask & TCL_READABLE) || !(cd->flags & STREAM_DECOMPRESS)) { ZlibTransformEventTimerKill(cd); } else if (cd->timer == NULL) { cd->timer = Tcl_CreateTimerHandler(SYNTHETIC_EVENT_TIME, @@ -3684,8 +3712,6 @@ ZlibStackChannelTransform( } } - Tcl_DStringInit(&cd->decompressed); - chan = Tcl_StackChannel(interp, &zlibChannelType, cd, Tcl_GetChannelMode(channel), channel); if (chan == NULL) { @@ -3715,96 +3741,37 @@ ZlibStackChannelTransform( /* *---------------------------------------------------------------------- * - * ResultCopy -- - * - * Copies the requested number of bytes from the buffer into the - * specified array and removes them from the buffer afterward. Copies - * less if there is not enough data in the buffer. - * - * Side effects: - * See above. - * - * Result: - * The number of actually copied bytes, possibly less than 'toRead'. - * - *---------------------------------------------------------------------- - */ - -static inline int -ResultCopy( - ZlibChannelData *cd, /* The location of the buffer to read from. */ - char *buf, /* The buffer to copy into */ - int toRead) /* Number of requested bytes */ -{ - int have = Tcl_DStringLength(&cd->decompressed); - - if (have == 0) { - /* - * Nothing to copy in the case of an empty buffer. - */ - - return 0; - } else if (have > toRead) { - /* - * The internal buffer contains more than requested. Copy the - * requested subset to the caller, shift the remaining bytes down, and - * truncate. - */ - - char *src = Tcl_DStringValue(&cd->decompressed); - - memcpy(buf, src, toRead); - memmove(src, src + toRead, have - toRead); - - Tcl_DStringSetLength(&cd->decompressed, have - toRead); - return toRead; - } else /* have <= toRead */ { - /* - * There is just or not enough in the buffer to fully satisfy the - * caller, so take everything as best effort. - */ - - memcpy(buf, Tcl_DStringValue(&cd->decompressed), have); - TclDStringClear(&cd->decompressed); - return have; - } -} - -/* - *---------------------------------------------------------------------- - * - * ResultGenerate -- + * ResultDecompress -- * * Extract uncompressed bytes from the compression engine and store them - * in our working buffer. + * in our buffer (buf) up to toRead bytes. * * Result: - * TCL_OK/TCL_ERROR (with *errorCodePtr updated with reason). + * Number of bytes decompressed or -1 if error (with *errorCodePtr updated with reason). * * Side effects: - * See above. + * After execution it updates cd->inStream (next_in, avail_in) to reflect + * the data that has been decompressed. * *---------------------------------------------------------------------- */ static int -ResultGenerate( +ResultDecompress( ZlibChannelData *cd, - int n, + char *buf, + int toRead, int flush, int *errorCodePtr) { -#define MAXBUF 1024 - unsigned char buf[MAXBUF]; - int e, written; + int e, written, resBytes = 0; Tcl_Obj *errObj; - cd->inStream.next_in = (Bytef *) cd->inBuffer; - cd->inStream.avail_in = n; - while (1) { - cd->inStream.next_out = (Bytef *) buf; - cd->inStream.avail_out = MAXBUF; + cd->flags &= ~STREAM_DECOMPRESS; + cd->inStream.next_out = (Bytef *) buf; + cd->inStream.avail_out = toRead; + while (cd->inStream.avail_out > 0) { e = inflate(&cd->inStream, flush); if (e == Z_NEED_DICT && cd->compDictObj) { @@ -3813,22 +3780,16 @@ ResultGenerate( /* * A repetition of Z_NEED_DICT is just an error. */ - - cd->inStream.next_out = (Bytef *) buf; - cd->inStream.avail_out = MAXBUF; e = inflate(&cd->inStream, flush); } } /* * avail_out is now the left over space in the output. Therefore - * "MAXBUF - avail_out" is the amount of bytes generated. + * "toRead - avail_out" is the amount of bytes generated. */ - written = MAXBUF - cd->inStream.avail_out; - if (written) { - Tcl_DStringAppend(&cd->decompressed, (char *) buf, written); - } + written = toRead - cd->inStream.avail_out; /* * The cases where we're definitely done. @@ -3836,13 +3797,18 @@ ResultGenerate( if (e == Z_STREAM_END) { cd->flags |= STREAM_DONE; - cd->over = cd->inStream.avail_in; - cd->skip = n - cd->over; - return TCL_OK; + resBytes += written; + break; } - if (((flush == Z_SYNC_FLUSH) && (e == Z_BUF_ERROR)) - || (e == Z_OK && written == 0)) { - return TCL_OK; + if (e == Z_OK) { + if (written == 0) { + break; + } + resBytes += written; + } + + if ((flush == Z_SYNC_FLUSH) && (e == Z_BUF_ERROR)) { + break; } /* @@ -3863,10 +3829,20 @@ ResultGenerate( */ if (cd->inStream.avail_in <= 0 && flush != Z_SYNC_FLUSH) { - return TCL_OK; + break; } } + if (!(cd->flags & STREAM_DONE)) { + /* if we have pending input data, but no available output buffer */ + if (cd->inStream.avail_in && !cd->inStream.avail_out) { + /* next time try to decompress it got readable (new output buffer) */ + cd->flags |= STREAM_DECOMPRESS; + } + } + + return resBytes; + handleError: errObj = Tcl_NewListObj(0, NULL); Tcl_ListObjAppendElement(NULL, errObj, Tcl_NewStringObj("-errorcode",-1)); @@ -3876,7 +3852,7 @@ ResultGenerate( Tcl_NewStringObj(cd->inStream.msg, -1)); Tcl_SetChannelError(cd->parent, errObj); *errorCodePtr = EINVAL; - return TCL_ERROR; + return -1; } /* -- cgit v0.12 From dc1e5ec547a5635acaa9d6c052c696db6bc87849 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 27 May 2020 13:58:09 +0000 Subject: Proposed soution for [a1bd37b719]: clock (free)scan of ISO 8601 timestamp with literal T behaves strange (I like it!) --- doc/clock.n | 5 +- generic/tclDate.c | 132 +++++++++++++++++++++++++++++---------------------- generic/tclGetDate.y | 12 ++++- tests/clock.test | 12 ++++- 4 files changed, 99 insertions(+), 62 deletions(-) diff --git a/doc/clock.n b/doc/clock.n index f0f6c37..8b9982c 100644 --- a/doc/clock.n +++ b/doc/clock.n @@ -913,9 +913,10 @@ An ISO 8601 point-in-time specification, such as where \fBT\fR is the literal .QW T , .QW "\fICCyymmdd hhmmss\fR" , +.QW \fICCyymmdd\fBT\fIhh:mm:ss\fR , or -.QW \fICCyymmdd\fBT\fIhh:mm:ss\fR . -Note that only these three formats are accepted. +.QW \fICCyy-mm-dd\fBT\fIhh:mm:ss\fR. +Note that only these four 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. diff --git a/generic/tclDate.c b/generic/tclDate.c index ea1f0f3..7b32604 100644 --- a/generic/tclDate.c +++ b/generic/tclDate.c @@ -129,6 +129,7 @@ * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. + * */ #include "tclInt.h" @@ -281,7 +282,7 @@ typedef union YYSTYPE time_t Number; enum _MERIDIAN Meridian; } -/* Line 187 of yacc.c. */ +/* Line 193 of yacc.c. */ YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -534,16 +535,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 2 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 79 +#define YYLAST 86 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 26 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 16 /* YYNRULES -- Number of rules. */ -#define YYNRULES 56 +#define YYNRULES 57 /* YYNRULES -- Number of states. */ -#define YYNSTATES 83 +#define YYNSTATES 89 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 @@ -593,9 +594,9 @@ static const yytype_uint8 yyprhs[] = 0, 0, 3, 4, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 28, 33, 39, 46, 54, 57, 59, 61, 63, 66, 69, 73, 76, 80, 86, 88, - 94, 100, 103, 108, 111, 113, 117, 120, 124, 128, - 136, 139, 144, 147, 149, 153, 156, 159, 163, 165, - 167, 169, 171, 173, 175, 177, 178 + 94, 100, 103, 108, 111, 113, 117, 120, 124, 136, + 140, 148, 151, 156, 159, 161, 165, 168, 171, 175, + 177, 179, 181, 183, 185, 187, 189, 190 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ @@ -613,23 +614,25 @@ static const yytype_int8 yyrhs[] = 8, 21, 13, -1, 13, 21, 13, 21, 13, -1, 8, 13, -1, 8, 13, 22, 13, -1, 13, 8, -1, 15, -1, 13, 8, 13, -1, 19, 8, -1, - 19, 13, 8, -1, 17, 14, 17, -1, 17, 14, - 13, 20, 13, 20, 13, -1, 17, 17, -1, 10, - 13, 24, 13, -1, 37, 3, -1, 37, -1, 38, - 13, 39, -1, 13, 39, -1, 19, 39, -1, 19, - 13, 39, -1, 39, -1, 21, -1, 25, -1, 11, - -1, 18, -1, 9, -1, 13, -1, -1, 7, -1 + 19, 13, 8, -1, 13, 21, 13, 21, 13, 14, + 13, 20, 13, 20, 13, -1, 17, 14, 17, -1, + 17, 14, 13, 20, 13, 20, 13, -1, 17, 17, + -1, 10, 13, 24, 13, -1, 37, 3, -1, 37, + -1, 38, 13, 39, -1, 13, 39, -1, 19, 39, + -1, 19, 13, 39, -1, 39, -1, 21, -1, 25, + -1, 11, -1, 18, -1, 9, -1, 13, -1, -1, + 7, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 225, 225, 226, 229, 232, 235, 238, 241, 244, - 247, 251, 256, 259, 265, 271, 279, 285, 296, 300, - 304, 310, 314, 318, 322, 326, 332, 336, 341, 346, - 351, 356, 360, 365, 369, 374, 381, 385, 391, 400, - 409, 419, 433, 438, 441, 444, 447, 450, 453, 458, - 461, 466, 470, 474, 480, 498, 501 + 0, 223, 223, 224, 227, 230, 233, 236, 239, 242, + 245, 249, 254, 257, 263, 269, 277, 283, 294, 298, + 302, 308, 312, 316, 320, 324, 330, 334, 339, 344, + 349, 354, 358, 363, 367, 372, 379, 383, 389, 399, + 408, 417, 427, 441, 446, 449, 452, 455, 458, 461, + 466, 469, 474, 478, 482, 488, 506, 509 }; #endif @@ -666,8 +669,8 @@ static const yytype_uint8 yyr1[] = 28, 28, 28, 29, 29, 29, 29, 29, 30, 30, 30, 31, 31, 31, 31, 31, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 33, 33, 34, 34, - 34, 35, 36, 36, 37, 37, 37, 37, 37, 38, - 38, 39, 39, 39, 40, 41, 41 + 34, 34, 35, 36, 36, 37, 37, 37, 37, 37, + 38, 38, 39, 39, 39, 40, 41, 41 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -676,9 +679,9 @@ static const yytype_uint8 yyr2[] = 0, 2, 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 5, 6, 7, 2, 1, 1, 1, 2, 2, 3, 2, 3, 5, 1, 5, - 5, 2, 4, 2, 1, 3, 2, 3, 3, 7, - 2, 4, 2, 1, 3, 2, 2, 3, 1, 1, - 1, 1, 1, 1, 1, 0, 1 + 5, 2, 4, 2, 1, 3, 2, 3, 11, 3, + 7, 2, 4, 2, 1, 3, 2, 2, 3, 1, + 1, 1, 1, 1, 1, 1, 0, 1 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -686,15 +689,15 @@ static const yytype_uint8 yyr2[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 2, 0, 1, 21, 20, 0, 53, 0, 51, 54, - 19, 34, 28, 52, 0, 49, 50, 3, 4, 5, - 8, 6, 7, 10, 11, 9, 43, 0, 48, 12, - 22, 31, 0, 23, 13, 33, 0, 0, 0, 45, - 18, 0, 40, 25, 36, 0, 46, 42, 0, 0, - 0, 35, 55, 0, 0, 26, 0, 38, 37, 47, - 24, 44, 32, 41, 56, 0, 0, 14, 0, 0, - 0, 0, 55, 15, 29, 30, 27, 0, 0, 16, - 0, 17, 39 + 2, 0, 1, 21, 20, 0, 54, 0, 52, 55, + 19, 34, 28, 53, 0, 50, 51, 3, 4, 5, + 8, 6, 7, 10, 11, 9, 44, 0, 49, 12, + 22, 31, 0, 23, 13, 33, 0, 0, 0, 46, + 18, 0, 41, 25, 36, 0, 47, 43, 0, 0, + 0, 35, 56, 0, 0, 26, 0, 39, 37, 48, + 24, 45, 32, 42, 57, 0, 0, 14, 0, 0, + 0, 0, 56, 15, 29, 30, 27, 0, 0, 16, + 0, 0, 17, 0, 40, 0, 0, 0, 38 }; /* YYDEFGOTO[NTERM-NUM]. */ @@ -716,15 +719,15 @@ static const yytype_int8 yypact[] = -22, 15, -22, -22, -22, 48, -22, -22, 43, 50, 51, -22, 17, 44, 46, 45, 52, -22, -22, -22, -22, -22, -22, -22, -22, 56, 57, -22, 58, 60, - 61, 62, -3, -22, -22, -22, -22, 59, 63, -22, - 64, -22, -22 + 61, 62, -3, -22, -22, 63, -22, 59, 65, -22, + 67, 68, -22, 64, -22, 69, 66, 70, -22 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, - -22, -22, -22, -9, -22, 6 + -22, -22, -22, -9, -22, 4 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If @@ -741,10 +744,11 @@ static const yytype_uint8 yytable[] = 13, 48, 36, 37, 43, 38, 49, 60, 44, 6, 50, 8, 6, 45, 8, 51, 58, 6, 13, 8, 52, 13, 55, 62, 63, 68, 13, 69, 70, 72, - 73, 74, 71, 75, 76, 77, 81, 82, 79, 80 + 73, 74, 71, 75, 76, 77, 79, 80, 82, 81, + 83, 84, 86, 88, 85, 0, 87 }; -static const yytype_uint8 yycheck[] = +static const yytype_int8 yycheck[] = { 9, 22, 0, 8, 7, 14, 4, 5, 13, 13, 8, 9, 10, 11, 13, 13, 14, 15, 21, 17, @@ -753,7 +757,8 @@ static const yytype_uint8 yycheck[] = 18, 13, 20, 21, 4, 23, 22, 4, 8, 9, 24, 11, 9, 13, 11, 13, 8, 9, 18, 11, 13, 18, 13, 13, 13, 21, 18, 21, 23, 13, - 13, 13, 20, 13, 13, 13, 13, 13, 72, 20 + 13, 13, 20, 13, 13, 13, 72, 14, 13, 20, + 13, 13, 13, 13, 20, -1, 20 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -768,7 +773,7 @@ static const yytype_uint8 yystos[] = 24, 13, 13, 8, 13, 13, 13, 17, 8, 39, 4, 39, 13, 13, 7, 20, 21, 41, 21, 21, 23, 20, 13, 13, 13, 13, 13, 13, 21, 41, - 20, 13, 13 + 14, 20, 13, 13, 13, 20, 13, 20, 13 }; #define yyerrok (yyerrstatus = 0) @@ -1894,6 +1899,19 @@ yyreduce: case 38: { + if ((yyvsp[(6) - (11)].Number) != HOUR( 7)) YYABORT; + yyYear = (yyvsp[(1) - (11)].Number); + yyMonth = (yyvsp[(3) - (11)].Number); + yyDay = (yyvsp[(5) - (11)].Number); + yyHour = (yyvsp[(7) - (11)].Number); + yyMinutes = (yyvsp[(9) - (11)].Number); + yySeconds = (yyvsp[(11) - (11)].Number); + ;} + break; + + case 39: + + { if ((yyvsp[(2) - (3)].Number) != HOUR( 7)) YYABORT; yyYear = (yyvsp[(1) - (3)].Number) / 10000; yyMonth = ((yyvsp[(1) - (3)].Number) % 10000)/100; @@ -1904,7 +1922,7 @@ yyreduce: ;} break; - case 39: + case 40: { if ((yyvsp[(2) - (7)].Number) != HOUR( 7)) YYABORT; @@ -1917,7 +1935,7 @@ yyreduce: ;} break; - case 40: + case 41: { yyYear = (yyvsp[(1) - (2)].Number) / 10000; @@ -1929,7 +1947,7 @@ yyreduce: ;} break; - case 41: + case 42: { /* @@ -1945,7 +1963,7 @@ yyreduce: ;} break; - case 42: + case 43: { yyRelSeconds *= -1; @@ -1954,56 +1972,56 @@ yyreduce: ;} break; - case 44: + case 45: { *yyRelPointer += (yyvsp[(1) - (3)].Number) * (yyvsp[(2) - (3)].Number) * (yyvsp[(3) - (3)].Number); ;} break; - case 45: + case 46: { *yyRelPointer += (yyvsp[(1) - (2)].Number) * (yyvsp[(2) - (2)].Number); ;} break; - case 46: + case 47: { *yyRelPointer += (yyvsp[(2) - (2)].Number); ;} break; - case 47: + case 48: { *yyRelPointer += (yyvsp[(2) - (3)].Number) * (yyvsp[(3) - (3)].Number); ;} break; - case 48: + case 49: { *yyRelPointer += (yyvsp[(1) - (1)].Number); ;} break; - case 49: + case 50: { (yyval.Number) = -1; ;} break; - case 50: + case 51: { (yyval.Number) = 1; ;} break; - case 51: + case 52: { (yyval.Number) = (yyvsp[(1) - (1)].Number); @@ -2011,7 +2029,7 @@ yyreduce: ;} break; - case 52: + case 53: { (yyval.Number) = (yyvsp[(1) - (1)].Number); @@ -2019,7 +2037,7 @@ yyreduce: ;} break; - case 53: + case 54: { (yyval.Number) = (yyvsp[(1) - (1)].Number); @@ -2027,7 +2045,7 @@ yyreduce: ;} break; - case 54: + case 55: { if (yyHaveTime && yyHaveDate && !yyHaveRel) { @@ -2047,14 +2065,14 @@ yyreduce: ;} break; - case 55: + case 56: { (yyval.Meridian) = MER24; ;} break; - case 56: + case 57: { (yyval.Meridian) = (yyvsp[(1) - (1)].Meridian); diff --git a/generic/tclGetDate.y b/generic/tclGetDate.y index ce7c2ce..4ef10d8 100644 --- a/generic/tclGetDate.y +++ b/generic/tclGetDate.y @@ -386,7 +386,17 @@ ordMonth: tNEXT tMONTH { } ; -iso : tISOBASE tZONE tISOBASE { +iso : tUNUMBER '-' tUNUMBER '-' tUNUMBER tZONE + tUNUMBER ':' tUNUMBER ':' tUNUMBER { + if ($6 != HOUR( 7)) YYABORT; + yyYear = $1; + yyMonth = $3; + yyDay = $5; + yyHour = $7; + yyMinutes = $9; + yySeconds = $11; + } + | tISOBASE tZONE tISOBASE { if ($2 != HOUR( 7)) YYABORT; yyYear = $1 / 10000; yyMonth = ($1 % 10000)/100; diff --git a/tests/clock.test b/tests/clock.test index 9c59b03..df0315b 100644 --- a/tests/clock.test +++ b/tests/clock.test @@ -35474,7 +35474,7 @@ test clock-33.5 {clock clicks tests, millisecond timing test} { # 60 msecs seems to be the max time slice under Windows 95/98 expr { ($end > $start) && (($end - $start) <= 60) ? - "ok" : + "ok" : "test should have taken 0-60 ms, actually took [expr $end - $start]"} } {ok} test clock-33.5a {clock tests, millisecond timing test} { @@ -35490,7 +35490,7 @@ test clock-33.5a {clock tests, millisecond timing test} { # 60 msecs seems to be the max time slice under Windows 95/98 expr { ($end > $start) && (($end - $start) <= 60) ? - "ok" : + "ok" : "test should have taken 0-60 ms, actually took [expr $end - $start]"} } {ok} test clock-33.6 {clock clicks, milli with too much abbreviation} { @@ -35664,6 +35664,14 @@ test clock-34.18 {clock scan, ISO 8601 point in time format} { set time [clock scan "19921023T000000"] clock format $time -format {%b %d, %Y %H:%M:%S} } "Oct 23, 1992 00:00:00" +test clock-34.19 {clock scan, ISO 8601 point in time format} { + set time [clock scan "19921023T00:00:00"] + clock format $time -format {%b %d, %Y %H:%M:%S} +} "Oct 23, 1992 00:00:00" +test clock-34.20 {clock scan, ISO 8601 point in time format} { + set time [clock scan "1992-10-23T00:00:00"] + clock format $time -format {%b %d, %Y %H:%M:%S} +} "Oct 23, 1992 00:00:00" # CLOCK SCAN REAL TESTS # We use 5am PST, 31-12-1999 as the base for these scans because irrespective -- cgit v0.12 From 2956fdc0e0aee7805920004202230103f98d11a9 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 27 May 2020 21:11:36 +0000 Subject: clock-iso-2.patch --- generic/tclDate.c | 68 +++++++++++++++++++++++++++------------------------- generic/tclGetDate.y | 58 ++++++++++++++++++++++---------------------- tests/clock.test | 16 +++++++++++++ 3 files changed, 81 insertions(+), 61 deletions(-) diff --git a/generic/tclDate.c b/generic/tclDate.c index 7b32604..3a7e46e 100644 --- a/generic/tclDate.c +++ b/generic/tclDate.c @@ -628,11 +628,11 @@ static const yytype_int8 yyrhs[] = static const yytype_uint16 yyrline[] = { 0, 223, 223, 224, 227, 230, 233, 236, 239, 242, - 245, 249, 254, 257, 263, 269, 277, 283, 294, 298, - 302, 308, 312, 316, 320, 324, 330, 334, 339, 344, - 349, 354, 358, 363, 367, 372, 379, 383, 389, 399, - 408, 417, 427, 441, 446, 449, 452, 455, 458, 461, - 466, 469, 474, 478, 482, 488, 506, 509 + 245, 249, 254, 257, 263, 269, 277, 283, 294, 299, + 304, 310, 314, 318, 322, 326, 332, 336, 341, 346, + 351, 356, 360, 365, 369, 374, 381, 385, 391, 401, + 410, 419, 429, 443, 448, 451, 454, 457, 460, 463, + 468, 471, 476, 480, 484, 490, 508, 511 }; #endif @@ -1733,6 +1733,7 @@ yyreduce: { yyTimezone = (yyvsp[(1) - (2)].Number); + if (yyTimezone > HOUR( 12)) yyTimezone -= HOUR(100); yyDSTmode = DSTon; ;} break; @@ -1741,6 +1742,7 @@ yyreduce: { yyTimezone = (yyvsp[(1) - (1)].Number); + if (yyTimezone > HOUR( 12)) yyTimezone -= HOUR(100); yyDSTmode = DSToff; ;} break; @@ -1899,7 +1901,7 @@ yyreduce: case 38: { - if ((yyvsp[(6) - (11)].Number) != HOUR( 7)) YYABORT; + if ((yyvsp[(6) - (11)].Number) != HOUR( 7) + HOUR(100)) YYABORT; yyYear = (yyvsp[(1) - (11)].Number); yyMonth = (yyvsp[(3) - (11)].Number); yyDay = (yyvsp[(5) - (11)].Number); @@ -1912,7 +1914,7 @@ yyreduce: case 39: { - if ((yyvsp[(2) - (3)].Number) != HOUR( 7)) YYABORT; + if ((yyvsp[(2) - (3)].Number) != HOUR( 7) + HOUR(100)) YYABORT; yyYear = (yyvsp[(1) - (3)].Number) / 10000; yyMonth = ((yyvsp[(1) - (3)].Number) % 10000)/100; yyDay = (yyvsp[(1) - (3)].Number) % 100; @@ -1925,7 +1927,7 @@ yyreduce: case 40: { - if ((yyvsp[(2) - (7)].Number) != HOUR( 7)) YYABORT; + if ((yyvsp[(2) - (7)].Number) != HOUR( 7) + HOUR(100)) YYABORT; yyYear = (yyvsp[(1) - (7)].Number) / 10000; yyMonth = ((yyvsp[(1) - (7)].Number) % 10000)/100; yyDay = (yyvsp[(1) - (7)].Number) % 100; @@ -2476,31 +2478,31 @@ static const TABLE TimezoneTable[] = { */ static const TABLE MilitaryTable[] = { - { "a", tZONE, -HOUR( 1) }, - { "b", tZONE, -HOUR( 2) }, - { "c", tZONE, -HOUR( 3) }, - { "d", tZONE, -HOUR( 4) }, - { "e", tZONE, -HOUR( 5) }, - { "f", tZONE, -HOUR( 6) }, - { "g", tZONE, -HOUR( 7) }, - { "h", tZONE, -HOUR( 8) }, - { "i", tZONE, -HOUR( 9) }, - { "k", tZONE, -HOUR(10) }, - { "l", tZONE, -HOUR(11) }, - { "m", tZONE, -HOUR(12) }, - { "n", tZONE, HOUR( 1) }, - { "o", tZONE, HOUR( 2) }, - { "p", tZONE, HOUR( 3) }, - { "q", tZONE, HOUR( 4) }, - { "r", tZONE, HOUR( 5) }, - { "s", tZONE, HOUR( 6) }, - { "t", tZONE, HOUR( 7) }, - { "u", tZONE, HOUR( 8) }, - { "v", tZONE, HOUR( 9) }, - { "w", tZONE, HOUR( 10) }, - { "x", tZONE, HOUR( 11) }, - { "y", tZONE, HOUR( 12) }, - { "z", tZONE, HOUR( 0) }, + { "a", tZONE, -HOUR( 1) + HOUR(100) }, + { "b", tZONE, -HOUR( 2) + HOUR(100) }, + { "c", tZONE, -HOUR( 3) + HOUR(100) }, + { "d", tZONE, -HOUR( 4) + HOUR(100) }, + { "e", tZONE, -HOUR( 5) + HOUR(100) }, + { "f", tZONE, -HOUR( 6) + HOUR(100) }, + { "g", tZONE, -HOUR( 7) + HOUR(100) }, + { "h", tZONE, -HOUR( 8) + HOUR(100) }, + { "i", tZONE, -HOUR( 9) + HOUR(100) }, + { "k", tZONE, -HOUR(10) + HOUR(100) }, + { "l", tZONE, -HOUR(11) + HOUR(100) }, + { "m", tZONE, -HOUR(12) + HOUR(100) }, + { "n", tZONE, HOUR( 1) + HOUR(100) }, + { "o", tZONE, HOUR( 2) + HOUR(100) }, + { "p", tZONE, HOUR( 3) + HOUR(100) }, + { "q", tZONE, HOUR( 4) + HOUR(100) }, + { "r", tZONE, HOUR( 5) + HOUR(100) }, + { "s", tZONE, HOUR( 6) + HOUR(100) }, + { "t", tZONE, HOUR( 7) + HOUR(100) }, + { "u", tZONE, HOUR( 8) + HOUR(100) }, + { "v", tZONE, HOUR( 9) + HOUR(100) }, + { "w", tZONE, HOUR( 10) + HOUR(100) }, + { "x", tZONE, HOUR( 11) + HOUR(100) }, + { "y", tZONE, HOUR( 12) + HOUR(100) }, + { "z", tZONE, HOUR( 0) + HOUR(100) }, { NULL, 0, 0 } }; diff --git a/generic/tclGetDate.y b/generic/tclGetDate.y index 4ef10d8..2bf211b 100644 --- a/generic/tclGetDate.y +++ b/generic/tclGetDate.y @@ -293,10 +293,12 @@ time : tUNUMBER tMERIDIAN { zone : tZONE tDST { yyTimezone = $1; + if (yyTimezone > HOUR( 12)) yyTimezone -= HOUR(100); yyDSTmode = DSTon; } | tZONE { yyTimezone = $1; + if (yyTimezone > HOUR( 12)) yyTimezone -= HOUR(100); yyDSTmode = DSToff; } | tDAYZONE { @@ -388,7 +390,7 @@ ordMonth: tNEXT tMONTH { iso : tUNUMBER '-' tUNUMBER '-' tUNUMBER tZONE tUNUMBER ':' tUNUMBER ':' tUNUMBER { - if ($6 != HOUR( 7)) YYABORT; + if ($6 != HOUR( 7) + HOUR(100)) YYABORT; yyYear = $1; yyMonth = $3; yyDay = $5; @@ -397,7 +399,7 @@ iso : tUNUMBER '-' tUNUMBER '-' tUNUMBER tZONE yySeconds = $11; } | tISOBASE tZONE tISOBASE { - if ($2 != HOUR( 7)) YYABORT; + if ($2 != HOUR( 7) + HOUR(100)) YYABORT; yyYear = $1 / 10000; yyMonth = ($1 % 10000)/100; yyDay = $1 % 100; @@ -406,7 +408,7 @@ iso : tUNUMBER '-' tUNUMBER '-' tUNUMBER tZONE yySeconds = $3 % 100; } | tISOBASE tZONE tUNUMBER ':' tUNUMBER ':' tUNUMBER { - if ($2 != HOUR( 7)) YYABORT; + if ($2 != HOUR( 7) + HOUR(100)) YYABORT; yyYear = $1 / 10000; yyMonth = ($1 % 10000)/100; yyDay = $1 % 100; @@ -685,31 +687,31 @@ static const TABLE TimezoneTable[] = { */ static const TABLE MilitaryTable[] = { - { "a", tZONE, -HOUR( 1) }, - { "b", tZONE, -HOUR( 2) }, - { "c", tZONE, -HOUR( 3) }, - { "d", tZONE, -HOUR( 4) }, - { "e", tZONE, -HOUR( 5) }, - { "f", tZONE, -HOUR( 6) }, - { "g", tZONE, -HOUR( 7) }, - { "h", tZONE, -HOUR( 8) }, - { "i", tZONE, -HOUR( 9) }, - { "k", tZONE, -HOUR(10) }, - { "l", tZONE, -HOUR(11) }, - { "m", tZONE, -HOUR(12) }, - { "n", tZONE, HOUR( 1) }, - { "o", tZONE, HOUR( 2) }, - { "p", tZONE, HOUR( 3) }, - { "q", tZONE, HOUR( 4) }, - { "r", tZONE, HOUR( 5) }, - { "s", tZONE, HOUR( 6) }, - { "t", tZONE, HOUR( 7) }, - { "u", tZONE, HOUR( 8) }, - { "v", tZONE, HOUR( 9) }, - { "w", tZONE, HOUR( 10) }, - { "x", tZONE, HOUR( 11) }, - { "y", tZONE, HOUR( 12) }, - { "z", tZONE, HOUR( 0) }, + { "a", tZONE, -HOUR( 1) + HOUR(100) }, + { "b", tZONE, -HOUR( 2) + HOUR(100) }, + { "c", tZONE, -HOUR( 3) + HOUR(100) }, + { "d", tZONE, -HOUR( 4) + HOUR(100) }, + { "e", tZONE, -HOUR( 5) + HOUR(100) }, + { "f", tZONE, -HOUR( 6) + HOUR(100) }, + { "g", tZONE, -HOUR( 7) + HOUR(100) }, + { "h", tZONE, -HOUR( 8) + HOUR(100) }, + { "i", tZONE, -HOUR( 9) + HOUR(100) }, + { "k", tZONE, -HOUR(10) + HOUR(100) }, + { "l", tZONE, -HOUR(11) + HOUR(100) }, + { "m", tZONE, -HOUR(12) + HOUR(100) }, + { "n", tZONE, HOUR( 1) + HOUR(100) }, + { "o", tZONE, HOUR( 2) + HOUR(100) }, + { "p", tZONE, HOUR( 3) + HOUR(100) }, + { "q", tZONE, HOUR( 4) + HOUR(100) }, + { "r", tZONE, HOUR( 5) + HOUR(100) }, + { "s", tZONE, HOUR( 6) + HOUR(100) }, + { "t", tZONE, HOUR( 7) + HOUR(100) }, + { "u", tZONE, HOUR( 8) + HOUR(100) }, + { "v", tZONE, HOUR( 9) + HOUR(100) }, + { "w", tZONE, HOUR( 10) + HOUR(100) }, + { "x", tZONE, HOUR( 11) + HOUR(100) }, + { "y", tZONE, HOUR( 12) + HOUR(100) }, + { "z", tZONE, HOUR( 0) + HOUR(100) }, { NULL, 0, 0 } }; diff --git a/tests/clock.test b/tests/clock.test index df0315b..f7da08f 100644 --- a/tests/clock.test +++ b/tests/clock.test @@ -35672,6 +35672,22 @@ test clock-34.20 {clock scan, ISO 8601 point in time format} { set time [clock scan "1992-10-23T00:00:00"] clock format $time -format {%b %d, %Y %H:%M:%S} } "Oct 23, 1992 00:00:00" +test clock-34.21 {clock scan, ISO 8601 invalid TZ} -body { + set time [clock scan "19921023MST000000"] + clock format $time -format {%b %d, %Y %H:%M:%S} +} -returnCodes error -match glob -result {unable to convert date-time string*} +test clock-34.22 {clock scan, ISO 8601 invalid TZ} -body { + set time [clock scan "19921023M000000"] + clock format $time -format {%b %d, %Y %H:%M:%S} +} -returnCodes error -match glob -result {unable to convert date-time string*} +test clock-34.23 {clock scan, ISO 8601 invalid TZ} -body { + set time [clock scan "1992-10-23M00:00:00"] + clock format $time -format {%b %d, %Y %H:%M:%S} +} -returnCodes error -match glob -result {unable to convert date-time string*} +test clock-34.24 {clock scan, ISO 8601 invalid TZ} -body { + set time [clock scan "1992-10-23MST00:00:00"] + clock format $time -format {%b %d, %Y %H:%M:%S} +} -returnCodes error -match glob -result {unable to convert date-time string*} # CLOCK SCAN REAL TESTS # We use 5am PST, 31-12-1999 as the base for these scans because irrespective -- cgit v0.12 From 9ee975c8c8e562243af687aedf8cba7797a56b54 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Sat, 6 Jun 2020 21:22:18 +0000 Subject: (cherry-pick): Update TZ info to tzdata2020a. --- library/tzdata/Africa/Casablanca | 24 ++-- library/tzdata/Africa/El_Aaiun | 24 ++-- library/tzdata/America/Dawson | 161 +------------------------ library/tzdata/America/Godthab | 247 +------------------------------------- library/tzdata/America/Nuuk | 246 +++++++++++++++++++++++++++++++++++++ library/tzdata/America/Whitehorse | 161 +------------------------ library/tzdata/Asia/Shanghai | 2 + 7 files changed, 277 insertions(+), 588 deletions(-) create mode 100644 library/tzdata/America/Nuuk diff --git a/library/tzdata/Africa/Casablanca b/library/tzdata/Africa/Casablanca index 99027c9..05ae49f 100644 --- a/library/tzdata/Africa/Casablanca +++ b/library/tzdata/Africa/Casablanca @@ -60,7 +60,7 @@ set TZData(:Africa/Casablanca) { {1557021600 0 1 +01} {1560045600 3600 0 +01} {1587261600 0 1 +01} - {1590285600 3600 0 +01} + {1590890400 3600 0 +01} {1618106400 0 1 +01} {1621130400 3600 0 +01} {1648346400 0 1 +01} @@ -76,7 +76,7 @@ set TZData(:Africa/Casablanca) { {1801965600 0 1 +01} {1804989600 3600 0 +01} {1832205600 0 1 +01} - {1835229600 3600 0 +01} + {1835834400 3600 0 +01} {1863050400 0 1 +01} {1866074400 3600 0 +01} {1893290400 0 1 +01} @@ -92,7 +92,7 @@ set TZData(:Africa/Casablanca) { {2046304800 0 1 +01} {2049933600 3600 0 +01} {2077149600 0 1 +01} - {2080173600 3600 0 +01} + {2080778400 3600 0 +01} {2107994400 0 1 +01} {2111018400 3600 0 +01} {2138234400 0 1 +01} @@ -108,7 +108,7 @@ set TZData(:Africa/Casablanca) { {2291248800 0 1 +01} {2294877600 3600 0 +01} {2322093600 0 1 +01} - {2325117600 3600 0 +01} + {2325722400 3600 0 +01} {2352938400 0 1 +01} {2355962400 3600 0 +01} {2383178400 0 1 +01} @@ -124,7 +124,7 @@ set TZData(:Africa/Casablanca) { {2536192800 0 1 +01} {2539821600 3600 0 +01} {2567037600 0 1 +01} - {2570061600 3600 0 +01} + {2570666400 3600 0 +01} {2597882400 0 1 +01} {2600906400 3600 0 +01} {2628122400 0 1 +01} @@ -140,7 +140,7 @@ set TZData(:Africa/Casablanca) { {2781136800 0 1 +01} {2784765600 3600 0 +01} {2811981600 0 1 +01} - {2815005600 3600 0 +01} + {2815610400 3600 0 +01} {2842826400 0 1 +01} {2845850400 3600 0 +01} {2873066400 0 1 +01} @@ -150,13 +150,13 @@ set TZData(:Africa/Casablanca) { {2934756000 0 1 +01} {2937780000 3600 0 +01} {2964996000 0 1 +01} - {2968020000 3600 0 +01} + {2968624800 3600 0 +01} {2995840800 0 1 +01} {2998864800 3600 0 +01} {3026080800 0 1 +01} {3029709600 3600 0 +01} {3056925600 0 1 +01} - {3059949600 3600 0 +01} + {3060554400 3600 0 +01} {3087770400 0 1 +01} {3090794400 3600 0 +01} {3118010400 0 1 +01} @@ -166,13 +166,13 @@ set TZData(:Africa/Casablanca) { {3179700000 0 1 +01} {3182724000 3600 0 +01} {3209940000 0 1 +01} - {3212964000 3600 0 +01} + {3213568800 3600 0 +01} {3240784800 0 1 +01} {3243808800 3600 0 +01} {3271024800 0 1 +01} {3274653600 3600 0 +01} {3301869600 0 1 +01} - {3304893600 3600 0 +01} + {3305498400 3600 0 +01} {3332714400 0 1 +01} {3335738400 3600 0 +01} {3362954400 0 1 +01} @@ -182,7 +182,7 @@ set TZData(:Africa/Casablanca) { {3424644000 0 1 +01} {3427668000 3600 0 +01} {3454884000 0 1 +01} - {3457908000 3600 0 +01} + {3458512800 3600 0 +01} {3485728800 0 1 +01} {3488752800 3600 0 +01} {3515968800 0 1 +01} @@ -198,5 +198,5 @@ set TZData(:Africa/Casablanca) { {3669588000 0 1 +01} {3672612000 3600 0 +01} {3699828000 0 1 +01} - {3702852000 3600 0 +01} + {3703456800 3600 0 +01} } diff --git a/library/tzdata/Africa/El_Aaiun b/library/tzdata/Africa/El_Aaiun index 9f021a4..8dbbdea 100644 --- a/library/tzdata/Africa/El_Aaiun +++ b/library/tzdata/Africa/El_Aaiun @@ -49,7 +49,7 @@ set TZData(:Africa/El_Aaiun) { {1557021600 0 1 +01} {1560045600 3600 0 +01} {1587261600 0 1 +01} - {1590285600 3600 0 +01} + {1590890400 3600 0 +01} {1618106400 0 1 +01} {1621130400 3600 0 +01} {1648346400 0 1 +01} @@ -65,7 +65,7 @@ set TZData(:Africa/El_Aaiun) { {1801965600 0 1 +01} {1804989600 3600 0 +01} {1832205600 0 1 +01} - {1835229600 3600 0 +01} + {1835834400 3600 0 +01} {1863050400 0 1 +01} {1866074400 3600 0 +01} {1893290400 0 1 +01} @@ -81,7 +81,7 @@ set TZData(:Africa/El_Aaiun) { {2046304800 0 1 +01} {2049933600 3600 0 +01} {2077149600 0 1 +01} - {2080173600 3600 0 +01} + {2080778400 3600 0 +01} {2107994400 0 1 +01} {2111018400 3600 0 +01} {2138234400 0 1 +01} @@ -97,7 +97,7 @@ set TZData(:Africa/El_Aaiun) { {2291248800 0 1 +01} {2294877600 3600 0 +01} {2322093600 0 1 +01} - {2325117600 3600 0 +01} + {2325722400 3600 0 +01} {2352938400 0 1 +01} {2355962400 3600 0 +01} {2383178400 0 1 +01} @@ -113,7 +113,7 @@ set TZData(:Africa/El_Aaiun) { {2536192800 0 1 +01} {2539821600 3600 0 +01} {2567037600 0 1 +01} - {2570061600 3600 0 +01} + {2570666400 3600 0 +01} {2597882400 0 1 +01} {2600906400 3600 0 +01} {2628122400 0 1 +01} @@ -129,7 +129,7 @@ set TZData(:Africa/El_Aaiun) { {2781136800 0 1 +01} {2784765600 3600 0 +01} {2811981600 0 1 +01} - {2815005600 3600 0 +01} + {2815610400 3600 0 +01} {2842826400 0 1 +01} {2845850400 3600 0 +01} {2873066400 0 1 +01} @@ -139,13 +139,13 @@ set TZData(:Africa/El_Aaiun) { {2934756000 0 1 +01} {2937780000 3600 0 +01} {2964996000 0 1 +01} - {2968020000 3600 0 +01} + {2968624800 3600 0 +01} {2995840800 0 1 +01} {2998864800 3600 0 +01} {3026080800 0 1 +01} {3029709600 3600 0 +01} {3056925600 0 1 +01} - {3059949600 3600 0 +01} + {3060554400 3600 0 +01} {3087770400 0 1 +01} {3090794400 3600 0 +01} {3118010400 0 1 +01} @@ -155,13 +155,13 @@ set TZData(:Africa/El_Aaiun) { {3179700000 0 1 +01} {3182724000 3600 0 +01} {3209940000 0 1 +01} - {3212964000 3600 0 +01} + {3213568800 3600 0 +01} {3240784800 0 1 +01} {3243808800 3600 0 +01} {3271024800 0 1 +01} {3274653600 3600 0 +01} {3301869600 0 1 +01} - {3304893600 3600 0 +01} + {3305498400 3600 0 +01} {3332714400 0 1 +01} {3335738400 3600 0 +01} {3362954400 0 1 +01} @@ -171,7 +171,7 @@ set TZData(:Africa/El_Aaiun) { {3424644000 0 1 +01} {3427668000 3600 0 +01} {3454884000 0 1 +01} - {3457908000 3600 0 +01} + {3458512800 3600 0 +01} {3485728800 0 1 +01} {3488752800 3600 0 +01} {3515968800 0 1 +01} @@ -187,5 +187,5 @@ set TZData(:Africa/El_Aaiun) { {3669588000 0 1 +01} {3672612000 3600 0 +01} {3699828000 0 1 +01} - {3702852000 3600 0 +01} + {3703456800 3600 0 +01} } diff --git a/library/tzdata/America/Dawson b/library/tzdata/America/Dawson index 8d2b641..1c827ff 100644 --- a/library/tzdata/America/Dawson +++ b/library/tzdata/America/Dawson @@ -93,164 +93,5 @@ set TZData(:America/Dawson) { {1541322000 -28800 0 PST} {1552212000 -25200 1 PDT} {1572771600 -28800 0 PST} - {1583661600 -25200 1 PDT} - {1604221200 -28800 0 PST} - {1615716000 -25200 1 PDT} - {1636275600 -28800 0 PST} - {1647165600 -25200 1 PDT} - {1667725200 -28800 0 PST} - {1678615200 -25200 1 PDT} - {1699174800 -28800 0 PST} - {1710064800 -25200 1 PDT} - {1730624400 -28800 0 PST} - {1741514400 -25200 1 PDT} - {1762074000 -28800 0 PST} - {1772964000 -25200 1 PDT} - {1793523600 -28800 0 PST} - {1805018400 -25200 1 PDT} - {1825578000 -28800 0 PST} - {1836468000 -25200 1 PDT} - {1857027600 -28800 0 PST} - {1867917600 -25200 1 PDT} - {1888477200 -28800 0 PST} - {1899367200 -25200 1 PDT} - {1919926800 -28800 0 PST} - {1930816800 -25200 1 PDT} - {1951376400 -28800 0 PST} - {1962871200 -25200 1 PDT} - {1983430800 -28800 0 PST} - {1994320800 -25200 1 PDT} - {2014880400 -28800 0 PST} - {2025770400 -25200 1 PDT} - {2046330000 -28800 0 PST} - {2057220000 -25200 1 PDT} - {2077779600 -28800 0 PST} - {2088669600 -25200 1 PDT} - {2109229200 -28800 0 PST} - {2120119200 -25200 1 PDT} - {2140678800 -28800 0 PST} - {2152173600 -25200 1 PDT} - {2172733200 -28800 0 PST} - {2183623200 -25200 1 PDT} - {2204182800 -28800 0 PST} - {2215072800 -25200 1 PDT} - {2235632400 -28800 0 PST} - {2246522400 -25200 1 PDT} - {2267082000 -28800 0 PST} - {2277972000 -25200 1 PDT} - {2298531600 -28800 0 PST} - {2309421600 -25200 1 PDT} - {2329981200 -28800 0 PST} - {2341476000 -25200 1 PDT} - {2362035600 -28800 0 PST} - {2372925600 -25200 1 PDT} - {2393485200 -28800 0 PST} - {2404375200 -25200 1 PDT} - {2424934800 -28800 0 PST} - {2435824800 -25200 1 PDT} - {2456384400 -28800 0 PST} - {2467274400 -25200 1 PDT} - {2487834000 -28800 0 PST} - {2499328800 -25200 1 PDT} - {2519888400 -28800 0 PST} - {2530778400 -25200 1 PDT} - {2551338000 -28800 0 PST} - {2562228000 -25200 1 PDT} - {2582787600 -28800 0 PST} - {2593677600 -25200 1 PDT} - {2614237200 -28800 0 PST} - {2625127200 -25200 1 PDT} - {2645686800 -28800 0 PST} - {2656576800 -25200 1 PDT} - {2677136400 -28800 0 PST} - {2688631200 -25200 1 PDT} - {2709190800 -28800 0 PST} - {2720080800 -25200 1 PDT} - {2740640400 -28800 0 PST} - {2751530400 -25200 1 PDT} - {2772090000 -28800 0 PST} - {2782980000 -25200 1 PDT} - {2803539600 -28800 0 PST} - {2814429600 -25200 1 PDT} - {2834989200 -28800 0 PST} - {2846484000 -25200 1 PDT} - {2867043600 -28800 0 PST} - {2877933600 -25200 1 PDT} - {2898493200 -28800 0 PST} - {2909383200 -25200 1 PDT} - {2929942800 -28800 0 PST} - {2940832800 -25200 1 PDT} - {2961392400 -28800 0 PST} - {2972282400 -25200 1 PDT} - {2992842000 -28800 0 PST} - {3003732000 -25200 1 PDT} - {3024291600 -28800 0 PST} - {3035786400 -25200 1 PDT} - {3056346000 -28800 0 PST} - {3067236000 -25200 1 PDT} - {3087795600 -28800 0 PST} - {3098685600 -25200 1 PDT} - {3119245200 -28800 0 PST} - {3130135200 -25200 1 PDT} - {3150694800 -28800 0 PST} - {3161584800 -25200 1 PDT} - {3182144400 -28800 0 PST} - {3193034400 -25200 1 PDT} - {3213594000 -28800 0 PST} - {3225088800 -25200 1 PDT} - {3245648400 -28800 0 PST} - {3256538400 -25200 1 PDT} - {3277098000 -28800 0 PST} - {3287988000 -25200 1 PDT} - {3308547600 -28800 0 PST} - {3319437600 -25200 1 PDT} - {3339997200 -28800 0 PST} - {3350887200 -25200 1 PDT} - {3371446800 -28800 0 PST} - {3382941600 -25200 1 PDT} - {3403501200 -28800 0 PST} - {3414391200 -25200 1 PDT} - {3434950800 -28800 0 PST} - {3445840800 -25200 1 PDT} - {3466400400 -28800 0 PST} - {3477290400 -25200 1 PDT} - {3497850000 -28800 0 PST} - {3508740000 -25200 1 PDT} - {3529299600 -28800 0 PST} - {3540189600 -25200 1 PDT} - {3560749200 -28800 0 PST} - {3572244000 -25200 1 PDT} - {3592803600 -28800 0 PST} - {3603693600 -25200 1 PDT} - {3624253200 -28800 0 PST} - {3635143200 -25200 1 PDT} - {3655702800 -28800 0 PST} - {3666592800 -25200 1 PDT} - {3687152400 -28800 0 PST} - {3698042400 -25200 1 PDT} - {3718602000 -28800 0 PST} - {3730096800 -25200 1 PDT} - {3750656400 -28800 0 PST} - {3761546400 -25200 1 PDT} - {3782106000 -28800 0 PST} - {3792996000 -25200 1 PDT} - {3813555600 -28800 0 PST} - {3824445600 -25200 1 PDT} - {3845005200 -28800 0 PST} - {3855895200 -25200 1 PDT} - {3876454800 -28800 0 PST} - {3887344800 -25200 1 PDT} - {3907904400 -28800 0 PST} - {3919399200 -25200 1 PDT} - {3939958800 -28800 0 PST} - {3950848800 -25200 1 PDT} - {3971408400 -28800 0 PST} - {3982298400 -25200 1 PDT} - {4002858000 -28800 0 PST} - {4013748000 -25200 1 PDT} - {4034307600 -28800 0 PST} - {4045197600 -25200 1 PDT} - {4065757200 -28800 0 PST} - {4076647200 -25200 1 PDT} - {4097206800 -28800 0 PST} + {1583661600 -25200 0 MST} } diff --git a/library/tzdata/America/Godthab b/library/tzdata/America/Godthab index 3e45f87..8bb7b73 100644 --- a/library/tzdata/America/Godthab +++ b/library/tzdata/America/Godthab @@ -1,246 +1,5 @@ # created by tools/tclZIC.tcl - do not edit - -set TZData(:America/Godthab) { - {-9223372036854775808 -12416 0 LMT} - {-1686083584 -10800 0 -03} - {323845200 -7200 0 -02} - {338950800 -10800 0 -03} - {354675600 -7200 1 -02} - {370400400 -10800 0 -03} - {386125200 -7200 1 -02} - {401850000 -10800 0 -03} - {417574800 -7200 1 -02} - {433299600 -10800 0 -03} - {449024400 -7200 1 -02} - {465354000 -10800 0 -03} - {481078800 -7200 1 -02} - {496803600 -10800 0 -03} - {512528400 -7200 1 -02} - {528253200 -10800 0 -03} - {543978000 -7200 1 -02} - {559702800 -10800 0 -03} - {575427600 -7200 1 -02} - {591152400 -10800 0 -03} - {606877200 -7200 1 -02} - {622602000 -10800 0 -03} - {638326800 -7200 1 -02} - {654656400 -10800 0 -03} - {670381200 -7200 1 -02} - {686106000 -10800 0 -03} - {701830800 -7200 1 -02} - {717555600 -10800 0 -03} - {733280400 -7200 1 -02} - {749005200 -10800 0 -03} - {764730000 -7200 1 -02} - {780454800 -10800 0 -03} - {796179600 -7200 1 -02} - {811904400 -10800 0 -03} - {828234000 -7200 1 -02} - {846378000 -10800 0 -03} - {859683600 -7200 1 -02} - {877827600 -10800 0 -03} - {891133200 -7200 1 -02} - {909277200 -10800 0 -03} - {922582800 -7200 1 -02} - {941331600 -10800 0 -03} - {954032400 -7200 1 -02} - {972781200 -10800 0 -03} - {985482000 -7200 1 -02} - {1004230800 -10800 0 -03} - {1017536400 -7200 1 -02} - {1035680400 -10800 0 -03} - {1048986000 -7200 1 -02} - {1067130000 -10800 0 -03} - {1080435600 -7200 1 -02} - {1099184400 -10800 0 -03} - {1111885200 -7200 1 -02} - {1130634000 -10800 0 -03} - {1143334800 -7200 1 -02} - {1162083600 -10800 0 -03} - {1174784400 -7200 1 -02} - {1193533200 -10800 0 -03} - {1206838800 -7200 1 -02} - {1224982800 -10800 0 -03} - {1238288400 -7200 1 -02} - {1256432400 -10800 0 -03} - {1269738000 -7200 1 -02} - {1288486800 -10800 0 -03} - {1301187600 -7200 1 -02} - {1319936400 -10800 0 -03} - {1332637200 -7200 1 -02} - {1351386000 -10800 0 -03} - {1364691600 -7200 1 -02} - {1382835600 -10800 0 -03} - {1396141200 -7200 1 -02} - {1414285200 -10800 0 -03} - {1427590800 -7200 1 -02} - {1445734800 -10800 0 -03} - {1459040400 -7200 1 -02} - {1477789200 -10800 0 -03} - {1490490000 -7200 1 -02} - {1509238800 -10800 0 -03} - {1521939600 -7200 1 -02} - {1540688400 -10800 0 -03} - {1553994000 -7200 1 -02} - {1572138000 -10800 0 -03} - {1585443600 -7200 1 -02} - {1603587600 -10800 0 -03} - {1616893200 -7200 1 -02} - {1635642000 -10800 0 -03} - {1648342800 -7200 1 -02} - {1667091600 -10800 0 -03} - {1679792400 -7200 1 -02} - {1698541200 -10800 0 -03} - {1711846800 -7200 1 -02} - {1729990800 -10800 0 -03} - {1743296400 -7200 1 -02} - {1761440400 -10800 0 -03} - {1774746000 -7200 1 -02} - {1792890000 -10800 0 -03} - {1806195600 -7200 1 -02} - {1824944400 -10800 0 -03} - {1837645200 -7200 1 -02} - {1856394000 -10800 0 -03} - {1869094800 -7200 1 -02} - {1887843600 -10800 0 -03} - {1901149200 -7200 1 -02} - {1919293200 -10800 0 -03} - {1932598800 -7200 1 -02} - {1950742800 -10800 0 -03} - {1964048400 -7200 1 -02} - {1982797200 -10800 0 -03} - {1995498000 -7200 1 -02} - {2014246800 -10800 0 -03} - {2026947600 -7200 1 -02} - {2045696400 -10800 0 -03} - {2058397200 -7200 1 -02} - {2077146000 -10800 0 -03} - {2090451600 -7200 1 -02} - {2108595600 -10800 0 -03} - {2121901200 -7200 1 -02} - {2140045200 -10800 0 -03} - {2153350800 -7200 1 -02} - {2172099600 -10800 0 -03} - {2184800400 -7200 1 -02} - {2203549200 -10800 0 -03} - {2216250000 -7200 1 -02} - {2234998800 -10800 0 -03} - {2248304400 -7200 1 -02} - {2266448400 -10800 0 -03} - {2279754000 -7200 1 -02} - {2297898000 -10800 0 -03} - {2311203600 -7200 1 -02} - {2329347600 -10800 0 -03} - {2342653200 -7200 1 -02} - {2361402000 -10800 0 -03} - {2374102800 -7200 1 -02} - {2392851600 -10800 0 -03} - {2405552400 -7200 1 -02} - {2424301200 -10800 0 -03} - {2437606800 -7200 1 -02} - {2455750800 -10800 0 -03} - {2469056400 -7200 1 -02} - {2487200400 -10800 0 -03} - {2500506000 -7200 1 -02} - {2519254800 -10800 0 -03} - {2531955600 -7200 1 -02} - {2550704400 -10800 0 -03} - {2563405200 -7200 1 -02} - {2582154000 -10800 0 -03} - {2595459600 -7200 1 -02} - {2613603600 -10800 0 -03} - {2626909200 -7200 1 -02} - {2645053200 -10800 0 -03} - {2658358800 -7200 1 -02} - {2676502800 -10800 0 -03} - {2689808400 -7200 1 -02} - {2708557200 -10800 0 -03} - {2721258000 -7200 1 -02} - {2740006800 -10800 0 -03} - {2752707600 -7200 1 -02} - {2771456400 -10800 0 -03} - {2784762000 -7200 1 -02} - {2802906000 -10800 0 -03} - {2816211600 -7200 1 -02} - {2834355600 -10800 0 -03} - {2847661200 -7200 1 -02} - {2866410000 -10800 0 -03} - {2879110800 -7200 1 -02} - {2897859600 -10800 0 -03} - {2910560400 -7200 1 -02} - {2929309200 -10800 0 -03} - {2942010000 -7200 1 -02} - {2960758800 -10800 0 -03} - {2974064400 -7200 1 -02} - {2992208400 -10800 0 -03} - {3005514000 -7200 1 -02} - {3023658000 -10800 0 -03} - {3036963600 -7200 1 -02} - {3055712400 -10800 0 -03} - {3068413200 -7200 1 -02} - {3087162000 -10800 0 -03} - {3099862800 -7200 1 -02} - {3118611600 -10800 0 -03} - {3131917200 -7200 1 -02} - {3150061200 -10800 0 -03} - {3163366800 -7200 1 -02} - {3181510800 -10800 0 -03} - {3194816400 -7200 1 -02} - {3212960400 -10800 0 -03} - {3226266000 -7200 1 -02} - {3245014800 -10800 0 -03} - {3257715600 -7200 1 -02} - {3276464400 -10800 0 -03} - {3289165200 -7200 1 -02} - {3307914000 -10800 0 -03} - {3321219600 -7200 1 -02} - {3339363600 -10800 0 -03} - {3352669200 -7200 1 -02} - {3370813200 -10800 0 -03} - {3384118800 -7200 1 -02} - {3402867600 -10800 0 -03} - {3415568400 -7200 1 -02} - {3434317200 -10800 0 -03} - {3447018000 -7200 1 -02} - {3465766800 -10800 0 -03} - {3479072400 -7200 1 -02} - {3497216400 -10800 0 -03} - {3510522000 -7200 1 -02} - {3528666000 -10800 0 -03} - {3541971600 -7200 1 -02} - {3560115600 -10800 0 -03} - {3573421200 -7200 1 -02} - {3592170000 -10800 0 -03} - {3604870800 -7200 1 -02} - {3623619600 -10800 0 -03} - {3636320400 -7200 1 -02} - {3655069200 -10800 0 -03} - {3668374800 -7200 1 -02} - {3686518800 -10800 0 -03} - {3699824400 -7200 1 -02} - {3717968400 -10800 0 -03} - {3731274000 -7200 1 -02} - {3750022800 -10800 0 -03} - {3762723600 -7200 1 -02} - {3781472400 -10800 0 -03} - {3794173200 -7200 1 -02} - {3812922000 -10800 0 -03} - {3825622800 -7200 1 -02} - {3844371600 -10800 0 -03} - {3857677200 -7200 1 -02} - {3875821200 -10800 0 -03} - {3889126800 -7200 1 -02} - {3907270800 -10800 0 -03} - {3920576400 -7200 1 -02} - {3939325200 -10800 0 -03} - {3952026000 -7200 1 -02} - {3970774800 -10800 0 -03} - {3983475600 -7200 1 -02} - {4002224400 -10800 0 -03} - {4015530000 -7200 1 -02} - {4033674000 -10800 0 -03} - {4046979600 -7200 1 -02} - {4065123600 -10800 0 -03} - {4078429200 -7200 1 -02} - {4096573200 -10800 0 -03} +if {![info exists TZData(America/Nuuk)]} { + LoadTimeZoneFile America/Nuuk } +set TZData(:America/Godthab) $TZData(:America/Nuuk) diff --git a/library/tzdata/America/Nuuk b/library/tzdata/America/Nuuk new file mode 100644 index 0000000..8d85a81 --- /dev/null +++ b/library/tzdata/America/Nuuk @@ -0,0 +1,246 @@ +# created by tools/tclZIC.tcl - do not edit + +set TZData(:America/Nuuk) { + {-9223372036854775808 -12416 0 LMT} + {-1686083584 -10800 0 -03} + {323845200 -7200 0 -02} + {338950800 -10800 0 -03} + {354675600 -7200 1 -02} + {370400400 -10800 0 -03} + {386125200 -7200 1 -02} + {401850000 -10800 0 -03} + {417574800 -7200 1 -02} + {433299600 -10800 0 -03} + {449024400 -7200 1 -02} + {465354000 -10800 0 -03} + {481078800 -7200 1 -02} + {496803600 -10800 0 -03} + {512528400 -7200 1 -02} + {528253200 -10800 0 -03} + {543978000 -7200 1 -02} + {559702800 -10800 0 -03} + {575427600 -7200 1 -02} + {591152400 -10800 0 -03} + {606877200 -7200 1 -02} + {622602000 -10800 0 -03} + {638326800 -7200 1 -02} + {654656400 -10800 0 -03} + {670381200 -7200 1 -02} + {686106000 -10800 0 -03} + {701830800 -7200 1 -02} + {717555600 -10800 0 -03} + {733280400 -7200 1 -02} + {749005200 -10800 0 -03} + {764730000 -7200 1 -02} + {780454800 -10800 0 -03} + {796179600 -7200 1 -02} + {811904400 -10800 0 -03} + {828234000 -7200 1 -02} + {846378000 -10800 0 -03} + {859683600 -7200 1 -02} + {877827600 -10800 0 -03} + {891133200 -7200 1 -02} + {909277200 -10800 0 -03} + {922582800 -7200 1 -02} + {941331600 -10800 0 -03} + {954032400 -7200 1 -02} + {972781200 -10800 0 -03} + {985482000 -7200 1 -02} + {1004230800 -10800 0 -03} + {1017536400 -7200 1 -02} + {1035680400 -10800 0 -03} + {1048986000 -7200 1 -02} + {1067130000 -10800 0 -03} + {1080435600 -7200 1 -02} + {1099184400 -10800 0 -03} + {1111885200 -7200 1 -02} + {1130634000 -10800 0 -03} + {1143334800 -7200 1 -02} + {1162083600 -10800 0 -03} + {1174784400 -7200 1 -02} + {1193533200 -10800 0 -03} + {1206838800 -7200 1 -02} + {1224982800 -10800 0 -03} + {1238288400 -7200 1 -02} + {1256432400 -10800 0 -03} + {1269738000 -7200 1 -02} + {1288486800 -10800 0 -03} + {1301187600 -7200 1 -02} + {1319936400 -10800 0 -03} + {1332637200 -7200 1 -02} + {1351386000 -10800 0 -03} + {1364691600 -7200 1 -02} + {1382835600 -10800 0 -03} + {1396141200 -7200 1 -02} + {1414285200 -10800 0 -03} + {1427590800 -7200 1 -02} + {1445734800 -10800 0 -03} + {1459040400 -7200 1 -02} + {1477789200 -10800 0 -03} + {1490490000 -7200 1 -02} + {1509238800 -10800 0 -03} + {1521939600 -7200 1 -02} + {1540688400 -10800 0 -03} + {1553994000 -7200 1 -02} + {1572138000 -10800 0 -03} + {1585443600 -7200 1 -02} + {1603587600 -10800 0 -03} + {1616893200 -7200 1 -02} + {1635642000 -10800 0 -03} + {1648342800 -7200 1 -02} + {1667091600 -10800 0 -03} + {1679792400 -7200 1 -02} + {1698541200 -10800 0 -03} + {1711846800 -7200 1 -02} + {1729990800 -10800 0 -03} + {1743296400 -7200 1 -02} + {1761440400 -10800 0 -03} + {1774746000 -7200 1 -02} + {1792890000 -10800 0 -03} + {1806195600 -7200 1 -02} + {1824944400 -10800 0 -03} + {1837645200 -7200 1 -02} + {1856394000 -10800 0 -03} + {1869094800 -7200 1 -02} + {1887843600 -10800 0 -03} + {1901149200 -7200 1 -02} + {1919293200 -10800 0 -03} + {1932598800 -7200 1 -02} + {1950742800 -10800 0 -03} + {1964048400 -7200 1 -02} + {1982797200 -10800 0 -03} + {1995498000 -7200 1 -02} + {2014246800 -10800 0 -03} + {2026947600 -7200 1 -02} + {2045696400 -10800 0 -03} + {2058397200 -7200 1 -02} + {2077146000 -10800 0 -03} + {2090451600 -7200 1 -02} + {2108595600 -10800 0 -03} + {2121901200 -7200 1 -02} + {2140045200 -10800 0 -03} + {2153350800 -7200 1 -02} + {2172099600 -10800 0 -03} + {2184800400 -7200 1 -02} + {2203549200 -10800 0 -03} + {2216250000 -7200 1 -02} + {2234998800 -10800 0 -03} + {2248304400 -7200 1 -02} + {2266448400 -10800 0 -03} + {2279754000 -7200 1 -02} + {2297898000 -10800 0 -03} + {2311203600 -7200 1 -02} + {2329347600 -10800 0 -03} + {2342653200 -7200 1 -02} + {2361402000 -10800 0 -03} + {2374102800 -7200 1 -02} + {2392851600 -10800 0 -03} + {2405552400 -7200 1 -02} + {2424301200 -10800 0 -03} + {2437606800 -7200 1 -02} + {2455750800 -10800 0 -03} + {2469056400 -7200 1 -02} + {2487200400 -10800 0 -03} + {2500506000 -7200 1 -02} + {2519254800 -10800 0 -03} + {2531955600 -7200 1 -02} + {2550704400 -10800 0 -03} + {2563405200 -7200 1 -02} + {2582154000 -10800 0 -03} + {2595459600 -7200 1 -02} + {2613603600 -10800 0 -03} + {2626909200 -7200 1 -02} + {2645053200 -10800 0 -03} + {2658358800 -7200 1 -02} + {2676502800 -10800 0 -03} + {2689808400 -7200 1 -02} + {2708557200 -10800 0 -03} + {2721258000 -7200 1 -02} + {2740006800 -10800 0 -03} + {2752707600 -7200 1 -02} + {2771456400 -10800 0 -03} + {2784762000 -7200 1 -02} + {2802906000 -10800 0 -03} + {2816211600 -7200 1 -02} + {2834355600 -10800 0 -03} + {2847661200 -7200 1 -02} + {2866410000 -10800 0 -03} + {2879110800 -7200 1 -02} + {2897859600 -10800 0 -03} + {2910560400 -7200 1 -02} + {2929309200 -10800 0 -03} + {2942010000 -7200 1 -02} + {2960758800 -10800 0 -03} + {2974064400 -7200 1 -02} + {2992208400 -10800 0 -03} + {3005514000 -7200 1 -02} + {3023658000 -10800 0 -03} + {3036963600 -7200 1 -02} + {3055712400 -10800 0 -03} + {3068413200 -7200 1 -02} + {3087162000 -10800 0 -03} + {3099862800 -7200 1 -02} + {3118611600 -10800 0 -03} + {3131917200 -7200 1 -02} + {3150061200 -10800 0 -03} + {3163366800 -7200 1 -02} + {3181510800 -10800 0 -03} + {3194816400 -7200 1 -02} + {3212960400 -10800 0 -03} + {3226266000 -7200 1 -02} + {3245014800 -10800 0 -03} + {3257715600 -7200 1 -02} + {3276464400 -10800 0 -03} + {3289165200 -7200 1 -02} + {3307914000 -10800 0 -03} + {3321219600 -7200 1 -02} + {3339363600 -10800 0 -03} + {3352669200 -7200 1 -02} + {3370813200 -10800 0 -03} + {3384118800 -7200 1 -02} + {3402867600 -10800 0 -03} + {3415568400 -7200 1 -02} + {3434317200 -10800 0 -03} + {3447018000 -7200 1 -02} + {3465766800 -10800 0 -03} + {3479072400 -7200 1 -02} + {3497216400 -10800 0 -03} + {3510522000 -7200 1 -02} + {3528666000 -10800 0 -03} + {3541971600 -7200 1 -02} + {3560115600 -10800 0 -03} + {3573421200 -7200 1 -02} + {3592170000 -10800 0 -03} + {3604870800 -7200 1 -02} + {3623619600 -10800 0 -03} + {3636320400 -7200 1 -02} + {3655069200 -10800 0 -03} + {3668374800 -7200 1 -02} + {3686518800 -10800 0 -03} + {3699824400 -7200 1 -02} + {3717968400 -10800 0 -03} + {3731274000 -7200 1 -02} + {3750022800 -10800 0 -03} + {3762723600 -7200 1 -02} + {3781472400 -10800 0 -03} + {3794173200 -7200 1 -02} + {3812922000 -10800 0 -03} + {3825622800 -7200 1 -02} + {3844371600 -10800 0 -03} + {3857677200 -7200 1 -02} + {3875821200 -10800 0 -03} + {3889126800 -7200 1 -02} + {3907270800 -10800 0 -03} + {3920576400 -7200 1 -02} + {3939325200 -10800 0 -03} + {3952026000 -7200 1 -02} + {3970774800 -10800 0 -03} + {3983475600 -7200 1 -02} + {4002224400 -10800 0 -03} + {4015530000 -7200 1 -02} + {4033674000 -10800 0 -03} + {4046979600 -7200 1 -02} + {4065123600 -10800 0 -03} + {4078429200 -7200 1 -02} + {4096573200 -10800 0 -03} +} diff --git a/library/tzdata/America/Whitehorse b/library/tzdata/America/Whitehorse index 1d61093..da0c0f0 100644 --- a/library/tzdata/America/Whitehorse +++ b/library/tzdata/America/Whitehorse @@ -93,164 +93,5 @@ set TZData(:America/Whitehorse) { {1541322000 -28800 0 PST} {1552212000 -25200 1 PDT} {1572771600 -28800 0 PST} - {1583661600 -25200 1 PDT} - {1604221200 -28800 0 PST} - {1615716000 -25200 1 PDT} - {1636275600 -28800 0 PST} - {1647165600 -25200 1 PDT} - {1667725200 -28800 0 PST} - {1678615200 -25200 1 PDT} - {1699174800 -28800 0 PST} - {1710064800 -25200 1 PDT} - {1730624400 -28800 0 PST} - {1741514400 -25200 1 PDT} - {1762074000 -28800 0 PST} - {1772964000 -25200 1 PDT} - {1793523600 -28800 0 PST} - {1805018400 -25200 1 PDT} - {1825578000 -28800 0 PST} - {1836468000 -25200 1 PDT} - {1857027600 -28800 0 PST} - {1867917600 -25200 1 PDT} - {1888477200 -28800 0 PST} - {1899367200 -25200 1 PDT} - {1919926800 -28800 0 PST} - {1930816800 -25200 1 PDT} - {1951376400 -28800 0 PST} - {1962871200 -25200 1 PDT} - {1983430800 -28800 0 PST} - {1994320800 -25200 1 PDT} - {2014880400 -28800 0 PST} - {2025770400 -25200 1 PDT} - {2046330000 -28800 0 PST} - {2057220000 -25200 1 PDT} - {2077779600 -28800 0 PST} - {2088669600 -25200 1 PDT} - {2109229200 -28800 0 PST} - {2120119200 -25200 1 PDT} - {2140678800 -28800 0 PST} - {2152173600 -25200 1 PDT} - {2172733200 -28800 0 PST} - {2183623200 -25200 1 PDT} - {2204182800 -28800 0 PST} - {2215072800 -25200 1 PDT} - {2235632400 -28800 0 PST} - {2246522400 -25200 1 PDT} - {2267082000 -28800 0 PST} - {2277972000 -25200 1 PDT} - {2298531600 -28800 0 PST} - {2309421600 -25200 1 PDT} - {2329981200 -28800 0 PST} - {2341476000 -25200 1 PDT} - {2362035600 -28800 0 PST} - {2372925600 -25200 1 PDT} - {2393485200 -28800 0 PST} - {2404375200 -25200 1 PDT} - {2424934800 -28800 0 PST} - {2435824800 -25200 1 PDT} - {2456384400 -28800 0 PST} - {2467274400 -25200 1 PDT} - {2487834000 -28800 0 PST} - {2499328800 -25200 1 PDT} - {2519888400 -28800 0 PST} - {2530778400 -25200 1 PDT} - {2551338000 -28800 0 PST} - {2562228000 -25200 1 PDT} - {2582787600 -28800 0 PST} - {2593677600 -25200 1 PDT} - {2614237200 -28800 0 PST} - {2625127200 -25200 1 PDT} - {2645686800 -28800 0 PST} - {2656576800 -25200 1 PDT} - {2677136400 -28800 0 PST} - {2688631200 -25200 1 PDT} - {2709190800 -28800 0 PST} - {2720080800 -25200 1 PDT} - {2740640400 -28800 0 PST} - {2751530400 -25200 1 PDT} - {2772090000 -28800 0 PST} - {2782980000 -25200 1 PDT} - {2803539600 -28800 0 PST} - {2814429600 -25200 1 PDT} - {2834989200 -28800 0 PST} - {2846484000 -25200 1 PDT} - {2867043600 -28800 0 PST} - {2877933600 -25200 1 PDT} - {2898493200 -28800 0 PST} - {2909383200 -25200 1 PDT} - {2929942800 -28800 0 PST} - {2940832800 -25200 1 PDT} - {2961392400 -28800 0 PST} - {2972282400 -25200 1 PDT} - {2992842000 -28800 0 PST} - {3003732000 -25200 1 PDT} - {3024291600 -28800 0 PST} - {3035786400 -25200 1 PDT} - {3056346000 -28800 0 PST} - {3067236000 -25200 1 PDT} - {3087795600 -28800 0 PST} - {3098685600 -25200 1 PDT} - {3119245200 -28800 0 PST} - {3130135200 -25200 1 PDT} - {3150694800 -28800 0 PST} - {3161584800 -25200 1 PDT} - {3182144400 -28800 0 PST} - {3193034400 -25200 1 PDT} - {3213594000 -28800 0 PST} - {3225088800 -25200 1 PDT} - {3245648400 -28800 0 PST} - {3256538400 -25200 1 PDT} - {3277098000 -28800 0 PST} - {3287988000 -25200 1 PDT} - {3308547600 -28800 0 PST} - {3319437600 -25200 1 PDT} - {3339997200 -28800 0 PST} - {3350887200 -25200 1 PDT} - {3371446800 -28800 0 PST} - {3382941600 -25200 1 PDT} - {3403501200 -28800 0 PST} - {3414391200 -25200 1 PDT} - {3434950800 -28800 0 PST} - {3445840800 -25200 1 PDT} - {3466400400 -28800 0 PST} - {3477290400 -25200 1 PDT} - {3497850000 -28800 0 PST} - {3508740000 -25200 1 PDT} - {3529299600 -28800 0 PST} - {3540189600 -25200 1 PDT} - {3560749200 -28800 0 PST} - {3572244000 -25200 1 PDT} - {3592803600 -28800 0 PST} - {3603693600 -25200 1 PDT} - {3624253200 -28800 0 PST} - {3635143200 -25200 1 PDT} - {3655702800 -28800 0 PST} - {3666592800 -25200 1 PDT} - {3687152400 -28800 0 PST} - {3698042400 -25200 1 PDT} - {3718602000 -28800 0 PST} - {3730096800 -25200 1 PDT} - {3750656400 -28800 0 PST} - {3761546400 -25200 1 PDT} - {3782106000 -28800 0 PST} - {3792996000 -25200 1 PDT} - {3813555600 -28800 0 PST} - {3824445600 -25200 1 PDT} - {3845005200 -28800 0 PST} - {3855895200 -25200 1 PDT} - {3876454800 -28800 0 PST} - {3887344800 -25200 1 PDT} - {3907904400 -28800 0 PST} - {3919399200 -25200 1 PDT} - {3939958800 -28800 0 PST} - {3950848800 -25200 1 PDT} - {3971408400 -28800 0 PST} - {3982298400 -25200 1 PDT} - {4002858000 -28800 0 PST} - {4013748000 -25200 1 PDT} - {4034307600 -28800 0 PST} - {4045197600 -25200 1 PDT} - {4065757200 -28800 0 PST} - {4076647200 -25200 1 PDT} - {4097206800 -28800 0 PST} + {1583661600 -25200 0 MST} } diff --git a/library/tzdata/Asia/Shanghai b/library/tzdata/Asia/Shanghai index 66bc4339..0fcf802 100644 --- a/library/tzdata/Asia/Shanghai +++ b/library/tzdata/Asia/Shanghai @@ -3,6 +3,8 @@ set TZData(:Asia/Shanghai) { {-9223372036854775808 29143 0 LMT} {-2177481943 28800 0 CST} + {-1600675200 32400 1 CDT} + {-1585904400 28800 0 CST} {-933667200 32400 1 CDT} {-922093200 28800 0 CST} {-908870400 32400 1 CDT} -- cgit v0.12 From 258e0ce3235ee5f4735eae0f923fd95e128347cc Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 11 Jun 2020 14:34:21 +0000 Subject: Not really a problem, since SHLIB_CFLAGS is empty on win32 .... still this is wrong... --- win/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win/Makefile.in b/win/Makefile.in index 777a6d8..5943893 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -209,7 +209,7 @@ SHELL = @SHELL@ RM = rm -f COPY = cp -CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${TCL_SHLIB_CFLAGS} \ +CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \ -I"${ZLIB_DIR_NATIVE}" -I"${GENERIC_DIR_NATIVE}" -DTCL_TOMMATH \ -DMP_PREC=4 -I"${TOMMATH_DIR_NATIVE}" -I"${WIN_DIR_NATIVE}" \ ${AC_FLAGS} ${COMPILE_DEBUG_FLAGS} ${NO_DEPRECATED_FLAGS} -- cgit v0.12 From 9e628cd450bd345b32f5a0650dfa765256b18d7b Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 12 Jun 2020 14:44:05 +0000 Subject: rules.vc: No need to redefine values which are already the default. tclWinPort.h: Fix comment --- win/rules.vc | 10 +--------- win/tclWinPort.h | 3 +-- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/win/rules.vc b/win/rules.vc index 490f9c3..d4765b9 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -730,11 +730,8 @@ MSVCRT = 0 !else !if [nmakehlp -f $(OPTS) "msvcrt"] !message *** Doing msvcrt -MSVCRT = 1 -!else -!if !$(STATIC_BUILD) -MSVCRT = 1 !else +!if $(STATIC_BUILD) MSVCRT = 0 !endif !endif @@ -743,17 +740,12 @@ MSVCRT = 0 !if [nmakehlp -f $(OPTS) "staticpkg"] && $(STATIC_BUILD) !message *** Doing staticpkg TCL_USE_STATIC_PACKAGES = 1 -!else -TCL_USE_STATIC_PACKAGES = 0 !endif !if [nmakehlp -f $(OPTS) "nothreads"] !message *** Compile explicitly for non-threaded tcl TCL_THREADS = 0 USE_THREAD_ALLOC= 0 -!else -TCL_THREADS = 1 -USE_THREAD_ALLOC= 1 !endif !if "$(TCL_MAJOR_VERSION)" == "8" diff --git a/win/tclWinPort.h b/win/tclWinPort.h index aaaa9c7..5aa02f0 100644 --- a/win/tclWinPort.h +++ b/win/tclWinPort.h @@ -14,7 +14,6 @@ #ifndef _TCLWINPORT #define _TCLWINPORT - #if !defined(_WIN64) && !defined(__MINGW_USE_VC2005_COMPAT) /* See [Bug 3354324]: file mtime sets wrong time */ # define __MINGW_USE_VC2005_COMPAT @@ -23,7 +22,7 @@ /* * We must specify the lower version we intend to support. * - * WINVER = 0x0500 means Windows 2000 and above + * WINVER = 0x0501 means Windows XP and above */ #ifndef WINVER -- cgit v0.12 From 0a8c9a817e923652ceea7b0c797e5b15e80e0a77 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 19 Jun 2020 10:27:45 +0000 Subject: sync zlib's crypt.h with version in Tcl 8.7 --- compat/zlib/contrib/minizip/crypt.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/compat/zlib/contrib/minizip/crypt.h b/compat/zlib/contrib/minizip/crypt.h index 2c3044b..4da804a 100644 --- a/compat/zlib/contrib/minizip/crypt.h +++ b/compat/zlib/contrib/minizip/crypt.h @@ -29,12 +29,6 @@ #define CRC32(c, b) ((*(pcrc_32_tab+(((int)(c) ^ (b)) & 0xff))) ^ ((c) >> 8)) -#ifdef Z_U4 - typedef Z_U4 z_crc_t; -#else - typedef unsigned long z_crc_t; -#endif - /*********************************************************************** * Return the next byte in the pseudo-random sequence */ @@ -43,6 +37,7 @@ static int decrypt_byte(unsigned long* pkeys, const z_crc_t* pcrc_32_tab) unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an * unpredictable manner on 16-bit systems; not a problem * with any known compiler so far, though */ + (void)pcrc_32_tab; temp = ((unsigned)(*(pkeys+2)) & 0xffff) | 2; return (int)(((temp * (temp ^ 1)) >> 8) & 0xff); -- cgit v0.12 From 448bf94c32c5dbb479535935a6f277e605277a62 Mon Sep 17 00:00:00 2001 From: kjnash Date: Fri, 19 Jun 2020 14:40:58 +0000 Subject: Bump http version to 2.9.2 --- library/http/http.tcl | 2 +- library/http/pkgIndex.tcl | 2 +- unix/Makefile.in | 4 ++-- win/Makefile.in | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/library/http/http.tcl b/library/http/http.tcl index 063b14b..a93e67b 100644 --- a/library/http/http.tcl +++ b/library/http/http.tcl @@ -11,7 +11,7 @@ package require Tcl 8.6- # Keep this in sync with pkgIndex.tcl and with the install directories in # Makefiles -package provide http 2.9.1 +package provide http 2.9.2 namespace eval http { # Allow resourcing to not clobber existing data diff --git a/library/http/pkgIndex.tcl b/library/http/pkgIndex.tcl index f9f1176..4f5eafb 100644 --- a/library/http/pkgIndex.tcl +++ b/library/http/pkgIndex.tcl @@ -1,2 +1,2 @@ if {![package vsatisfies [package provide Tcl] 8.6-]} {return} -package ifneeded http 2.9.1 [list tclPkgSetup $dir http 2.9.1 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}] +package ifneeded http 2.9.2 [list tclPkgSetup $dir http 2.9.2 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}] diff --git a/unix/Makefile.in b/unix/Makefile.in index 2f1bb70..f500366 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -944,8 +944,8 @@ install-libraries: libraries do \ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)/http1.0"; \ done; - @echo "Installing package http 2.9.1 as a Tcl Module"; - @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(MODULE_INSTALL_DIR)/8.6/http-2.9.1.tm"; + @echo "Installing package http 2.9.2 as a Tcl Module"; + @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(MODULE_INSTALL_DIR)/8.6/http-2.9.2.tm"; @echo "Installing package opt0.4 files to $(SCRIPT_INSTALL_DIR)/opt0.4/"; @for i in $(TOP_DIR)/library/opt/*.tcl ; \ do \ diff --git a/win/Makefile.in b/win/Makefile.in index 5943893..651f6b2 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -719,8 +719,8 @@ install-libraries: libraries install-tzdata install-msgs do \ $(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/http1.0"; \ done; - @echo "Installing package http 2.9.1 as a Tcl Module"; - @$(COPY) $(ROOT_DIR)/library/http/http.tcl "$(MODULE_INSTALL_DIR)/8.6/http-2.9.1.tm"; + @echo "Installing package http 2.9.2 as a Tcl Module"; + @$(COPY) $(ROOT_DIR)/library/http/http.tcl "$(MODULE_INSTALL_DIR)/8.6/http-2.9.2.tm"; @echo "Installing library opt0.4 directory"; @for j in $(ROOT_DIR)/library/opt/*.tcl; \ do \ -- cgit v0.12 -- cgit v0.12 From 5f27d2b0e9c21f9e6aee742a1c7fad86cffbf63e Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Sun, 21 Jun 2020 15:42:18 +0000 Subject: Clearify documentation regarding [a7c1c2c7e5] --- doc/lsearch.n | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/lsearch.n b/doc/lsearch.n index c2644b8..efe1792 100644 --- a/doc/lsearch.n +++ b/doc/lsearch.n @@ -22,7 +22,8 @@ This command searches the elements of \fIlist\fR to see if one of them matches \fIpattern\fR. If so, the command returns the index of the first matching element (unless the options \fB\-all\fR or \fB\-inline\fR are specified.) -If not, the command returns \fB\-1\fR. The \fIoption\fR arguments +If not, the command returns \fB\-1\fR or (if options \fB\-all\fR +or \fB\-inline\fR are specified) the empty string. The \fIoption\fR arguments indicates how the elements of the list are to be matched against \fIpattern\fR and must have one of the values below: .SS "MATCHING STYLE OPTIONS" -- cgit v0.12 From 0568c4a5316a6eca44acf18cc8d92aae1cbf6a21 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 22 Jun 2020 11:54:26 +0000 Subject: Make sure that files like _FOSSIL_ or .flsckout are never committed to a GIT repository --- .gitattributes | 1 + .gitignore | 3 +++ library/reg/pkgIndex.tcl | 0 3 files changed, 4 insertions(+) mode change 100755 => 100644 library/reg/pkgIndex.tcl diff --git a/.gitattributes b/.gitattributes index e9a67c8..31b3f10 100644 --- a/.gitattributes +++ b/.gitattributes @@ -35,5 +35,6 @@ *.lib binary *.pdf binary *.png binary +*.sln binary *.xlsx binary *.zip binary diff --git a/.gitignore b/.gitignore index 62a7a5a..acaff0f 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ */config.cache */config.log */config.status +*/config.status.lineno */tclConfig.sh */tclsh* */tcltest* @@ -21,6 +22,8 @@ */version.vc */libtcl.vfs */libtcl_*.zip +.fslckout +_FOSSIL_ html libtommath/bn.ilg libtommath/bn.ind diff --git a/library/reg/pkgIndex.tcl b/library/reg/pkgIndex.tcl old mode 100755 new mode 100644 -- cgit v0.12 From cb1ff2a4d7f517777b25d6d398f3329c99479269 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 22 Jun 2020 11:57:32 +0000 Subject: library/reg/pkgIndex.tcl should not be executable --- library/reg/pkgIndex.tcl | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 library/reg/pkgIndex.tcl diff --git a/library/reg/pkgIndex.tcl b/library/reg/pkgIndex.tcl old mode 100755 new mode 100644 -- cgit v0.12 From c38c4c07b2e9c0530799232f85fec6cc99786bbd Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 22 Jun 2020 12:24:22 +0000 Subject: Change all *.sln to CRLF format, so they are directly usable in Visual Studio projects --- .fossil-settings/crlf-glob | 3 +- .fossil-settings/crnl-glob | 3 +- compat/zlib/contrib/vstudio/vc10/zlibvc.sln | 2 +- compat/zlib/contrib/vstudio/vc11/zlibvc.sln | 2 +- compat/zlib/contrib/vstudio/vc12/zlibvc.sln | 238 ++++++++++++++-------------- compat/zlib/contrib/vstudio/vc14/zlibvc.sln | 238 ++++++++++++++-------------- compat/zlib/contrib/vstudio/vc9/zlibvc.sln | 2 +- libtommath/libtommath_VS2008.sln | 2 +- 8 files changed, 246 insertions(+), 244 deletions(-) diff --git a/.fossil-settings/crlf-glob b/.fossil-settings/crlf-glob index 56f3a03..ebd0093 100644 --- a/.fossil-settings/crlf-glob +++ b/.fossil-settings/crlf-glob @@ -1,6 +1,7 @@ compat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs compat/zlib/contrib/vstudio/readme.txt compat/zlib/contrib/vstudio/*/zlib.rc +compat/zlib/contrib/vstudio/*/*.sln compat/zlib/win32/*.txt compat/zlib/win64/*.txt libtommath/*.dsp @@ -16,4 +17,4 @@ win/rules-ext.vc win/targets.vc win/tcl.dsp win/tcl.dsw -win/tcl.hpj.in \ No newline at end of file +win/tcl.hpj.in diff --git a/.fossil-settings/crnl-glob b/.fossil-settings/crnl-glob index 56f3a03..ebd0093 100644 --- a/.fossil-settings/crnl-glob +++ b/.fossil-settings/crnl-glob @@ -1,6 +1,7 @@ compat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs compat/zlib/contrib/vstudio/readme.txt compat/zlib/contrib/vstudio/*/zlib.rc +compat/zlib/contrib/vstudio/*/*.sln compat/zlib/win32/*.txt compat/zlib/win64/*.txt libtommath/*.dsp @@ -16,4 +17,4 @@ win/rules-ext.vc win/targets.vc win/tcl.dsp win/tcl.dsw -win/tcl.hpj.in \ No newline at end of file +win/tcl.hpj.in diff --git a/compat/zlib/contrib/vstudio/vc10/zlibvc.sln b/compat/zlib/contrib/vstudio/vc10/zlibvc.sln index 6f6ffd5..6953136 100644 --- a/compat/zlib/contrib/vstudio/vc10/zlibvc.sln +++ b/compat/zlib/contrib/vstudio/vc10/zlibvc.sln @@ -1,4 +1,4 @@ - + Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" diff --git a/compat/zlib/contrib/vstudio/vc11/zlibvc.sln b/compat/zlib/contrib/vstudio/vc11/zlibvc.sln index 9fcbafd..7e340e6 100644 --- a/compat/zlib/contrib/vstudio/vc11/zlibvc.sln +++ b/compat/zlib/contrib/vstudio/vc11/zlibvc.sln @@ -1,4 +1,4 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" diff --git a/compat/zlib/contrib/vstudio/vc12/zlibvc.sln b/compat/zlib/contrib/vstudio/vc12/zlibvc.sln index dcda229..93b13c1 100644 --- a/compat/zlib/contrib/vstudio/vc12/zlibvc.sln +++ b/compat/zlib/contrib/vstudio/vc12/zlibvc.sln @@ -1,119 +1,119 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.40629.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcxproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcxproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlibdll", "testzlibdll.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcxproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Itanium = Debug|Itanium - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Itanium = Release|Itanium - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium - ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32 - ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.ActiveCfg = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.ActiveCfg = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.40629.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcxproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcxproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlibdll", "testzlibdll.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcxproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Itanium = Debug|Itanium + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Itanium = Release|Itanium + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium + ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32 + ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.ActiveCfg = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.ActiveCfg = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/compat/zlib/contrib/vstudio/vc14/zlibvc.sln b/compat/zlib/contrib/vstudio/vc14/zlibvc.sln index 6f4a107..0f29237 100644 --- a/compat/zlib/contrib/vstudio/vc14/zlibvc.sln +++ b/compat/zlib/contrib/vstudio/vc14/zlibvc.sln @@ -1,119 +1,119 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcxproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcxproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlibdll", "testzlibdll.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcxproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Itanium = Debug|Itanium - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Itanium = Release|Itanium - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium - ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32 - ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.ActiveCfg = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.ActiveCfg = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcxproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcxproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlibdll", "testzlibdll.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcxproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Itanium = Debug|Itanium + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Itanium = Release|Itanium + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium + ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32 + ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.ActiveCfg = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.ActiveCfg = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/compat/zlib/contrib/vstudio/vc9/zlibvc.sln b/compat/zlib/contrib/vstudio/vc9/zlibvc.sln index b482967..20568fa 100644 --- a/compat/zlib/contrib/vstudio/vc9/zlibvc.sln +++ b/compat/zlib/contrib/vstudio/vc9/zlibvc.sln @@ -1,4 +1,4 @@ - + Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" diff --git a/libtommath/libtommath_VS2008.sln b/libtommath/libtommath_VS2008.sln index 6bfc159..3bd6688 100644 --- a/libtommath/libtommath_VS2008.sln +++ b/libtommath/libtommath_VS2008.sln @@ -1,4 +1,4 @@ - + Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tommath", "libtommath_VS2008.vcproj", "{42109FEE-B0B9-4FCD-9E56-2863BF8C55D2}" -- cgit v0.12 From 710aa4171628c7e68eca08e87cb8f7cc6e733349 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 22 Jun 2020 12:46:31 +0000 Subject: Remove .fossil-settings/crnl-glob, as it is not used in fossil any more. Don't declare .sln files both as binary and as CRLF in git. --- .fossil-settings/crnl-glob | 10 ---------- .gitattributes | 1 - 2 files changed, 11 deletions(-) delete mode 100644 .fossil-settings/crnl-glob diff --git a/.fossil-settings/crnl-glob b/.fossil-settings/crnl-glob deleted file mode 100644 index c014320..0000000 --- a/.fossil-settings/crnl-glob +++ /dev/null @@ -1,10 +0,0 @@ -tools/tcl.hpj.in -tools/tcl.wse.in -win/buildall.vc.bat -win/coffbase.txt -win/makefile.bc -win/makefile.vc -win/rules.vc -win/tcl.dsp -win/tcl.dsw -win/tcl.hpj.in diff --git a/.gitattributes b/.gitattributes index 31b3f10..e9a67c8 100644 --- a/.gitattributes +++ b/.gitattributes @@ -35,6 +35,5 @@ *.lib binary *.pdf binary *.png binary -*.sln binary *.xlsx binary *.zip binary -- cgit v0.12 From a69b65b5a52c90c4f2e2f286cf0b7e3d6649db70 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 23 Jun 2020 06:35:09 +0000 Subject: Backport some changes in tclGetDate.y from 8.7. --- generic/tclDate.c | 1931 +++++++++++++++++++++++++------------------------- generic/tclGetDate.y | 35 +- 2 files changed, 984 insertions(+), 982 deletions(-) diff --git a/generic/tclDate.c b/generic/tclDate.c index ea1f0f3..544517e 100644 --- a/generic/tclDate.c +++ b/generic/tclDate.c @@ -1,14 +1,13 @@ -/* A Bison parser, made by GNU Bison 2.3. */ +/* A Bison parser, made by GNU Bison 3.1. */ -/* Skeleton implementation for Bison's Yacc-like parsers in C +/* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -16,9 +15,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -47,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.3" +#define YYBISON_VERSION "3.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -55,64 +52,19 @@ /* Pure parsers. */ #define YYPURE 1 -/* Using locations. */ -#define YYLSP_NEEDED 1 +/* Push parsers. */ +#define YYPUSH 0 -/* Substitute the variable and function names. */ -#define yyparse TclDateparse -#define yylex TclDatelex -#define yyerror TclDateerror -#define yylval TclDatelval -#define yychar TclDatechar -#define yydebug TclDatedebug -#define yynerrs TclDatenerrs -#define yylloc TclDatelloc - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - tAGO = 258, - tDAY = 259, - tDAYZONE = 260, - tID = 261, - tMERIDIAN = 262, - tMONTH = 263, - tMONTH_UNIT = 264, - tSTARDATE = 265, - tSEC_UNIT = 266, - tSNUMBER = 267, - tUNUMBER = 268, - tZONE = 269, - tEPOCH = 270, - tDST = 271, - tISOBASE = 272, - tDAY_UNIT = 273, - tNEXT = 274 - }; -#endif -/* Tokens. */ -#define tAGO 258 -#define tDAY 259 -#define tDAYZONE 260 -#define tID 261 -#define tMERIDIAN 262 -#define tMONTH 263 -#define tMONTH_UNIT 264 -#define tSTARDATE 265 -#define tSEC_UNIT 266 -#define tSNUMBER 267 -#define tUNUMBER 268 -#define tZONE 269 -#define tEPOCH 270 -#define tDST 271 -#define tISOBASE 272 -#define tDAY_UNIT 273 -#define tNEXT 274 +/* Pull parsers. */ +#define YYPULL 1 +/* Substitute the variable and function names. */ +#define yyparse TclDateparse +#define yylex TclDatelex +#define yyerror TclDateerror +#define yydebug TclDatedebug +#define yynerrs TclDatenerrs /* Copy the first part of user declarations. */ @@ -129,6 +81,7 @@ * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. + * */ #include "tclInt.h" @@ -142,6 +95,17 @@ #endif /* _MSC_VER */ /* + * Meridian: am, pm, or 24-hour style. + */ + +typedef enum _MERIDIAN { + MERam, MERpm, MER24 +} MERIDIAN; + + + + +/* * yyparse will accept a 'struct DateInfo' as its parameter; that's where the * parsed fields will be returned. */ @@ -159,7 +123,7 @@ typedef struct DateInfo { time_t dateHour; time_t dateMinutes; time_t dateSeconds; - int dateMeridian; + MERIDIAN dateMeridian; int dateHaveTime; time_t dateTimezone; @@ -246,20 +210,13 @@ typedef enum _DSTMODE { DSTon, DSToff, DSTmaybe } DSTMODE; -/* - * Meridian: am, pm, or 24-hour style. - */ - -typedef enum _MERIDIAN { - MERam, MERpm, MER24 -} MERIDIAN; - - - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif +# ifndef YY_NULLPTR +# if defined __cplusplus && 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE @@ -269,40 +226,78 @@ typedef enum _MERIDIAN { # define YYERROR_VERBOSE 0 #endif -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 + +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int TclDatedebug; +#endif + +/* Token type. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + enum yytokentype + { + tAGO = 258, + tDAY = 259, + tDAYZONE = 260, + tID = 261, + tMERIDIAN = 262, + tMONTH = 263, + tMONTH_UNIT = 264, + tSTARDATE = 265, + tSEC_UNIT = 266, + tSNUMBER = 267, + tUNUMBER = 268, + tZONE = 269, + tEPOCH = 270, + tDST = 271, + tISOBASE = 272, + tDAY_UNIT = 273, + tNEXT = 274 + }; #endif +/* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE +union YYSTYPE { + + time_t Number; enum _MERIDIAN Meridian; -} -/* Line 187 of yacc.c. */ - YYSTYPE; -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 + +}; + +typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 +# define YYSTYPE_IS_DECLARED 1 #endif +/* Location type. */ #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED -typedef struct YYLTYPE +typedef struct YYLTYPE YYLTYPE; +struct YYLTYPE { int first_line; int first_column; int last_line; int last_column; -} YYLTYPE; -# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ +}; # define YYLTYPE_IS_DECLARED 1 # define YYLTYPE_IS_TRIVIAL 1 #endif + +int TclDateparse (DateInfo* info); + + + /* Copy the second part of user declarations. */ @@ -322,8 +317,6 @@ MODULE_SCOPE int yyparse(DateInfo*); -/* Line 216 of yacc.c. */ - #ifdef short # undef short @@ -337,72 +330,103 @@ typedef unsigned char yytype_uint8; #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; #else -typedef short int yytype_int8; +typedef signed char yytype_int8; #endif #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else -typedef unsigned short int yytype_uint16; +typedef unsigned short yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else -typedef short int yytype_int16; +typedef short yytype_int16; #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ -# else +# elif defined size_t # define YYSIZE_T size_t +# elif ! defined YYSIZE_T +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned # endif #endif #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ -# if YYENABLE_NLS +# if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) # endif # endif # ifndef YY_ -# define YY_(msgid) msgid +# define YY_(Msgid) Msgid +# endif +#endif + +#ifndef YY_ATTRIBUTE +# if (defined __GNUC__ \ + && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ + || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C +# define YY_ATTRIBUTE(Spec) __attribute__(Spec) +# else +# define YY_ATTRIBUTE(Spec) /* empty */ +# endif +#endif + +#ifndef YY_ATTRIBUTE_PURE +# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +#endif + +#if !defined _Noreturn \ + && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) +# if defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) +# define YYUSE(E) ((void) (E)) #else -# define YYUSE(e) /* empty */ +# define YYUSE(E) /* empty */ #endif -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(n) (n) +#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") #else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int i) -#else -static int -YYID (i) - int i; +# define YY_INITIAL_VALUE(Value) Value #endif -{ - return i; -} +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif + #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -420,11 +444,11 @@ YYID (i) # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS # include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 # endif # endif # endif @@ -432,8 +456,8 @@ YYID (i) # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely @@ -447,25 +471,23 @@ YYID (i) # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif -# if (defined __cplusplus && ! defined _STDLIB_H \ +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) + && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined malloc && ! defined EXIT_SUCCESS void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined free && ! defined EXIT_SUCCESS void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif @@ -475,15 +497,15 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ - || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ - && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ + && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss; - YYSTYPE yyvs; - YYLTYPE yyls; + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; + YYLTYPE yyls_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ @@ -495,42 +517,46 @@ union yyalloc ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ + 2 * YYSTACK_GAP_MAXIMUM) -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif +# define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) #endif +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from SRC to DST. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) +# else +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (0) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + /* YYFINAL -- State number of the termination state. */ #define YYFINAL 2 /* YYLAST -- Last index in YYTABLE. */ @@ -542,17 +568,19 @@ union yyalloc #define YYNNTS 16 /* YYNRULES -- Number of rules. */ #define YYNRULES 56 -/* YYNRULES -- Number of states. */ +/* YYNSTATES -- Number of states. */ #define YYNSTATES 83 -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned + by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 274 -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) +#define YYTRANSLATE(YYX) \ + ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, without out-of-bounds checking. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -586,54 +614,19 @@ static const yytype_uint8 yytranslate[] = }; #if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint8 yyprhs[] = -{ - 0, 0, 3, 4, 7, 9, 11, 13, 15, 17, - 19, 21, 23, 25, 28, 33, 39, 46, 54, 57, - 59, 61, 63, 66, 69, 73, 76, 80, 86, 88, - 94, 100, 103, 108, 111, 113, 117, 120, 124, 128, - 136, 139, 144, 147, 149, 153, 156, 159, 163, 165, - 167, 169, 171, 173, 175, 177, 178 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = -{ - 27, 0, -1, -1, 27, 28, -1, 29, -1, 30, - -1, 32, -1, 33, -1, 31, -1, 36, -1, 34, - -1, 35, -1, 40, -1, 13, 7, -1, 13, 20, - 13, 41, -1, 13, 20, 13, 21, 13, -1, 13, - 20, 13, 20, 13, 41, -1, 13, 20, 13, 20, - 13, 21, 13, -1, 14, 16, -1, 14, -1, 5, - -1, 4, -1, 4, 22, -1, 13, 4, -1, 38, - 13, 4, -1, 19, 4, -1, 13, 23, 13, -1, - 13, 23, 13, 23, 13, -1, 17, -1, 13, 21, - 8, 21, 13, -1, 13, 21, 13, 21, 13, -1, - 8, 13, -1, 8, 13, 22, 13, -1, 13, 8, - -1, 15, -1, 13, 8, 13, -1, 19, 8, -1, - 19, 13, 8, -1, 17, 14, 17, -1, 17, 14, - 13, 20, 13, 20, 13, -1, 17, 17, -1, 10, - 13, 24, 13, -1, 37, 3, -1, 37, -1, 38, - 13, 39, -1, 13, 39, -1, 19, 39, -1, 19, - 13, 39, -1, 39, -1, 21, -1, 25, -1, 11, - -1, 18, -1, 9, -1, 13, -1, -1, 7, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 225, 225, 226, 229, 232, 235, 238, 241, 244, - 247, 251, 256, 259, 265, 271, 279, 285, 296, 300, - 304, 310, 314, 318, 322, 326, 332, 336, 341, 346, - 351, 356, 360, 365, 369, 374, 381, 385, 391, 400, - 409, 419, 433, 438, 441, 444, 447, 450, 453, 458, - 461, 466, 470, 474, 480, 498, 501 + 0, 223, 223, 224, 227, 230, 233, 236, 239, 242, + 245, 249, 254, 257, 263, 269, 277, 283, 294, 298, + 302, 308, 312, 316, 320, 324, 330, 334, 339, 344, + 349, 354, 358, 363, 367, 372, 379, 383, 389, 398, + 407, 417, 431, 436, 439, 442, 445, 448, 451, 456, + 459, 464, 468, 472, 478, 496, 499 }; #endif -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +#if YYDEBUG || YYERROR_VERBOSE || 0 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = @@ -644,13 +637,13 @@ static const char *const yytname[] = "tDAY_UNIT", "tNEXT", "':'", "'-'", "','", "'/'", "'.'", "'+'", "$accept", "spec", "item", "time", "zone", "day", "date", "ordMonth", "iso", "trek", "relspec", "relunits", "sign", "unit", "number", - "o_merid", 0 + "o_merid", YY_NULLPTR }; #endif # ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, @@ -659,54 +652,18 @@ static const yytype_uint16 yytoknum[] = }; # endif -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 26, 27, 27, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 29, 29, 29, 29, 29, 30, 30, - 30, 31, 31, 31, 31, 31, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 33, 33, 34, 34, - 34, 35, 36, 36, 37, 37, 37, 37, 37, 38, - 38, 39, 39, 39, 40, 41, 41 -}; +#define YYPACT_NINF -22 -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 0, 2, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 2, 4, 5, 6, 7, 2, 1, - 1, 1, 2, 2, 3, 2, 3, 5, 1, 5, - 5, 2, 4, 2, 1, 3, 2, 3, 3, 7, - 2, 4, 2, 1, 3, 2, 2, 3, 1, 1, - 1, 1, 1, 1, 1, 0, 1 -}; +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-22))) -/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state - STATE-NUM when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 2, 0, 1, 21, 20, 0, 53, 0, 51, 54, - 19, 34, 28, 52, 0, 49, 50, 3, 4, 5, - 8, 6, 7, 10, 11, 9, 43, 0, 48, 12, - 22, 31, 0, 23, 13, 33, 0, 0, 0, 45, - 18, 0, 40, 25, 36, 0, 46, 42, 0, 0, - 0, 35, 55, 0, 0, 26, 0, 38, 37, 47, - 24, 44, 32, 41, 56, 0, 0, 14, 0, 0, - 0, 0, 55, 15, 29, 30, 27, 0, 0, 16, - 0, 17, 39 -}; +#define YYTABLE_NINF -1 -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int8 yydefgoto[] = -{ - -1, 1, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 67 -}; +#define yytable_value_is_error(Yytable_value) \ + 0 -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -22 + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ static const yytype_int8 yypact[] = { -22, 2, -22, -21, -22, -4, -22, 1, -22, 22, @@ -720,18 +677,39 @@ static const yytype_int8 yypact[] = 64, -22, -22 }; -/* YYPGOTO[NTERM-NUM]. */ + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 2, 0, 1, 21, 20, 0, 53, 0, 51, 54, + 19, 34, 28, 52, 0, 49, 50, 3, 4, 5, + 8, 6, 7, 10, 11, 9, 43, 0, 48, 12, + 22, 31, 0, 23, 13, 33, 0, 0, 0, 45, + 18, 0, 40, 25, 36, 0, 46, 42, 0, 0, + 0, 35, 55, 0, 0, 26, 0, 38, 37, 47, + 24, 44, 32, 41, 56, 0, 0, 14, 0, 0, + 0, 0, 55, 15, 29, 30, 27, 0, 0, 16, + 0, 17, 39 +}; + + /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -9, -22, 6 }; -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If zero, do what YYDEFACT says. - If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -1 + /* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int8 yydefgoto[] = +{ + -1, 1, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 67 +}; + + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { 39, 30, 2, 53, 64, 46, 3, 4, 54, 31, @@ -756,8 +734,8 @@ static const yytype_uint8 yycheck[] = 13, 13, 20, 13, 13, 13, 13, 13, 72, 20 }; -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 27, 0, 4, 5, 8, 9, 10, 11, 13, @@ -771,156 +749,179 @@ static const yytype_uint8 yystos[] = 20, 13, 13 }; -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 26, 27, 27, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 29, 29, 29, 29, 29, 30, 30, + 30, 31, 31, 31, 31, 31, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 33, 33, 34, 34, + 34, 35, 36, 36, 37, 37, 37, 37, 37, 38, + 38, 39, 39, 39, 40, 41, 41 +}; + + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 0, 2, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 2, 4, 5, 6, 7, 2, 1, + 1, 1, 2, 2, 3, 2, 3, 5, 1, 5, + 5, 2, 4, 2, 1, 3, 2, 3, 3, 7, + 2, 4, 2, 1, 3, 2, 2, 3, 1, 1, + 1, 1, 1, 1, 1, 0, 1 +}; -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. */ +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab -#define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK (1); \ - goto yybackup; \ - } \ - else \ - { \ +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ yyerror (&yylloc, info, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) - + YYERROR; \ + } \ +while (0) -#define YYTERROR 1 -#define YYERRCODE 256 +/* Error token number */ +#define YYTERROR 1 +#define YYERRCODE 256 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. If N is 0, then set CURRENT to the empty location which ends the previous symbol: RHS[0] (always defined). */ -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (YYID (0)) +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (N) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (0) #endif +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) + + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) + /* YY_LOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT -# if YYLTYPE_IS_TRIVIAL -# define YY_LOCATION_PRINT(File, Loc) \ - fprintf (File, "%d.%d-%d.%d", \ - (Loc).first_line, (Loc).first_column, \ - (Loc).last_line, (Loc).last_column) -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif -#endif - +# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL -/* YYLEX -- calling `yylex' with the right arguments. */ +/* Print *YYLOCP on YYO. Private, do not rely on its existence. */ -#ifdef YYLEX_PARAM -# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) -#else -# define YYLEX yylex (&yylval, &yylloc, info) -#endif +YY_ATTRIBUTE_UNUSED +static unsigned +yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) +{ + unsigned res = 0; + int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; + if (0 <= yylocp->first_line) + { + res += YYFPRINTF (yyo, "%d", yylocp->first_line); + if (0 <= yylocp->first_column) + res += YYFPRINTF (yyo, ".%d", yylocp->first_column); + } + if (0 <= yylocp->last_line) + { + if (yylocp->first_line < yylocp->last_line) + { + res += YYFPRINTF (yyo, "-%d", yylocp->last_line); + if (0 <= end_col) + res += YYFPRINTF (yyo, ".%d", end_col); + } + else if (0 <= end_col && yylocp->first_column < end_col) + res += YYFPRINTF (yyo, "-%d", end_col); + } + return res; + } -/* Enable debugging if requested. */ -#if YYDEBUG +# define YY_LOCATION_PRINT(File, Loc) \ + yy_location_print_ (File, &(Loc)) -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) # endif +#endif -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value, Location, info); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value, Location, info); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ +/*----------------------------------------. +| Print this symbol's value on YYOUTPUT. | +`----------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, DateInfo* info) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, info) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - YYLTYPE const * const yylocationp; - DateInfo* info; -#endif { - if (!yyvaluep) - return; + FILE *yyo = yyoutput; + YYUSE (yyo); YYUSE (yylocationp); YYUSE (info); + if (!yyvaluep) + return; # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); # endif - switch (yytype) - { - default: - break; - } + YYUSE (yytype); } @@ -928,24 +929,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, info) | Print this symbol on YYOUTPUT. | `--------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, DateInfo* info) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, info) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - YYLTYPE const * const yylocationp; - DateInfo* info; -#endif { - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + YYFPRINTF (yyoutput, "%s %s (", + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); YY_LOCATION_PRINT (yyoutput, *yylocationp); YYFPRINTF (yyoutput, ": "); @@ -958,68 +946,54 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, info) | TOP (included). | `------------------------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) -#else static void -yy_stack_print (bottom, top) - yytype_int16 *bottom; - yytype_int16 *top; -#endif +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) { YYFPRINTF (stderr, "Stack now"); - for (; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } YYFPRINTF (stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void -yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, DateInfo* info) -#else -static void -yy_reduce_print (yyvsp, yylsp, yyrule, info) - YYSTYPE *yyvsp; - YYLTYPE *yylsp; - int yyrule; - DateInfo* info; -#endif +yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, DateInfo* info) { + unsigned long yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); + yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { - fprintf (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , &(yylsp[(yyi + 1) - (yynrhs)]) , info); - fprintf (stderr, "\n"); + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, + yystos[yyssp[yyi + 1 - yynrhs]], + &(yyvsp[(yyi + 1) - (yynrhs)]) + , &(yylsp[(yyi + 1) - (yynrhs)]) , info); + YYFPRINTF (stderr, "\n"); } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, yylsp, Rule, info); \ -} while (YYID (0)) +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, yylsp, Rule, info); \ +} while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ @@ -1033,7 +1007,7 @@ int yydebug; /* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH +#ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif @@ -1048,7 +1022,6 @@ int yydebug; # define YYMAXDEPTH 10000 #endif - #if YYERROR_VERBOSE @@ -1057,15 +1030,8 @@ int yydebug; # define yystrlen strlen # else /* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) @@ -1081,16 +1047,8 @@ yystrlen (yystr) # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif { char *yyd = yydest; const char *yys = yysrc; @@ -1120,27 +1078,27 @@ yytnamerr (char *yyres, const char *yystr) char const *yyp = yystr; for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } do_not_strip_quotes: ; } @@ -1151,169 +1109,161 @@ yytnamerr (char *yyres, const char *yystr) } # endif -/* Copy into YYRESULT an error message about the unexpected token - YYCHAR while in state YYSTATE. Return the number of bytes copied, - including the terminating null byte. If YYRESULT is null, do not - copy anything; just return the number of bytes that would be - copied. As a special case, return 0 if an ordinary "syntax error" - message will do. Return YYSIZE_MAXIMUM if overflow occurs during - size calculation. */ -static YYSIZE_T -yysyntax_error (char *yyresult, int yystate, int yychar) +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. + + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) { - int yyn = yypact[yystate]; + YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); + YYSIZE_T yysize = yysize0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = YY_NULLPTR; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per + "expected"). */ + int yycount = 0; + + /* There are many possibilities here to consider: + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yytoken != YYEMPTY) + { + int yyn = yypact[*yyssp]; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + { + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + } + } + } - if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) - return 0; - else + switch (yycount) + { +# define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + default: /* Avoid compiler warnings. */ + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +# undef YYCASE_ + } + + { + YYSIZE_T yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + + if (*yymsg_alloc < yysize) { - int yytype = YYTRANSLATE (yychar); - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - int yysize_overflow = 0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - int yyx; - -# if 0 - /* This is so xgettext sees the translatable formats that are - constructed on the fly. */ - YY_("syntax error, unexpected %s"); - YY_("syntax error, unexpected %s, expecting %s"); - YY_("syntax error, unexpected %s, expecting %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); -# endif - char *yyfmt; - char const *yyf; - static char const yyunexpected[] = "syntax error, unexpected %s"; - static char const yyexpecting[] = ", expecting %s"; - static char const yyor[] = " or %s"; - char yyformat[sizeof yyunexpected - + sizeof yyexpecting - 1 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) - * (sizeof yyor - 1))]; - char const *yyprefix = yyexpecting; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 1; - - yyarg[0] = yytname[yytype]; - yyfmt = yystpcpy (yyformat, yyunexpected); - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - yyformat[sizeof yyunexpected - 1] = '\0'; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - yyfmt = yystpcpy (yyfmt, yyprefix); - yyprefix = yyor; - } - - yyf = YY_(yyformat); - yysize1 = yysize + yystrlen (yyf); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - - if (yysize_overflow) - return YYSIZE_MAXIMUM; - - if (yyresult) - { - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - char *yyp = yyresult; - int yyi = 0; - while ((*yyp = *yyf) != '\0') - { - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyf += 2; - } - else - { - yyp++; - yyf++; - } - } - } - return yysize; + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return 1; } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyformat += 2; + } + else + { + yyp++; + yyformat++; + } + } + return 0; } #endif /* YYERROR_VERBOSE */ - /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, DateInfo* info) -#else -static void -yydestruct (yymsg, yytype, yyvaluep, yylocationp, info) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; - YYLTYPE *yylocationp; - DateInfo* info; -#endif { YYUSE (yyvaluep); YYUSE (yylocationp); YYUSE (info); - if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - switch (yytype) - { - - default: - break; - } + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_END } - - -/* Prevent warnings from -Wmissing-prototypes. */ - -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (DateInfo* info); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - - @@ -1322,112 +1272,96 @@ int yyparse (); | yyparse. | `----------*/ -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) int yyparse (DateInfo* info) -#else -int -yyparse (info) - DateInfo* info; -#endif -#endif { - /* The look-ahead symbol. */ +/* The lookahead symbol. */ int yychar; -/* The semantic value of the look-ahead symbol. */ -YYSTYPE yylval = {0}; -/* Number of syntax errors so far. */ -int yynerrs; -/* Location data for the look-ahead symbol. */ -YYLTYPE yylloc; +/* The semantic value of the lookahead symbol. */ +/* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ +YY_INITIAL_VALUE (static YYSTYPE yyval_default;) +YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); - int yystate; - int yyn; - int yyresult; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - /* Look-ahead token as an internal (translated) token number. */ - int yytoken = 0; -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif +/* Location data for the lookahead symbol. */ +static YYLTYPE yyloc_default +# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL + = { 1, 1, 1, 1 } +# endif +; +YYLTYPE yylloc = yyloc_default; - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. + /* Number of syntax errors so far. */ + int yynerrs; - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss = yyssa; - yytype_int16 *yyssp; + /* The stacks and their tools: + 'yyss': related to states. + 'yyvs': related to semantic values. + 'yyls': related to locations. - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp; + Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ - /* The location stack. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp; - /* The locations where the error started and ended. */ - YYLTYPE yyerror_range[2]; + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; + + /* The location stack. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls; + YYLTYPE *yylsp; + + /* The locations where the error started and ended. */ + YYLTYPE yyerror_range[3]; - YYSIZE_T yystacksize = YYINITDEPTH; + YYSIZE_T yystacksize; + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken = 0; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; YYLTYPE yyloc; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) + /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; + yyssp = yyss = yyssa; + yyvsp = yyvs = yyvsa; + yylsp = yyls = yylsa; + yystacksize = YYINITDEPTH; + YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - - yyssp = yyss; - yyvsp = yyvs; - yylsp = yyls; -#if YYLTYPE_IS_TRIVIAL - /* Initialize the default location before parsing starts. */ - yylloc.first_line = yylloc.last_line = 1; - yylloc.first_column = yylloc.last_column = 0; -#endif - + yychar = YYEMPTY; /* Cause a token to be read. */ + yylsp[0] = yylloc; goto yysetstate; /*------------------------------------------------------------. @@ -1448,25 +1382,26 @@ YYLTYPE yylloc; #ifdef yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - YYLTYPE *yyls1 = yyls; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yyls1, yysize * sizeof (*yylsp), - &yystacksize); - yyls = yyls1; - yyss = yyss1; - yyvs = yyvs1; + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + YYLTYPE *yyls1 = yyls; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yyls1, yysize * sizeof (*yylsp), + &yystacksize); + + yyls = yyls1; + yyss = yyss1; + yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE @@ -1474,23 +1409,23 @@ YYLTYPE yylloc; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; + yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); - YYSTACK_RELOCATE (yyls); + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); + YYSTACK_RELOCATE (yyls_alloc, yyls); # undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ @@ -1500,14 +1435,17 @@ YYLTYPE yylloc; yylsp = yyls + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + (unsigned long) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) - YYABORT; + YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + if (yystate == YYFINAL) + YYACCEPT; + goto yybackup; /*-----------. @@ -1516,20 +1454,20 @@ YYLTYPE yylloc; yybackup: /* Do appropriate processing given the current state. Read a - look-ahead token if we need one and don't already have one. */ + lookahead token if we need one and don't already have one. */ - /* First try to decide what to do without reference to look-ahead token. */ + /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) + if (yypact_value_is_default (yyn)) goto yydefault; - /* Not known => get a look-ahead token if don't already have one. */ + /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; + yychar = yylex (&yylval, &yylloc, info); } if (yychar <= YYEOF) @@ -1551,29 +1489,27 @@ yybackup: yyn = yytable[yyn]; if (yyn <= 0) { - if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; + if (yytable_value_is_error (yyn)) + goto yyerrlab; yyn = -yyn; goto yyreduce; } - if (yyn == YYFINAL) - YYACCEPT; - /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; - /* Shift the look-ahead token. */ + /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - /* Discard the shifted token unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; + /* Discard the shifted token. */ + yychar = YYEMPTY; yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END *++yylsp = yylloc; goto yynewstate; @@ -1596,7 +1532,7 @@ yyreduce: yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. + '$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison @@ -1605,8 +1541,9 @@ yyreduce: GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; - /* Default location. */ + /* Default location. */ YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); + yyerror_range[1] = yyloc; YY_REDUCE_PRINT (yyn); switch (yyn) { @@ -1614,42 +1551,48 @@ yyreduce: { yyHaveTime++; - ;} + } + break; case 5: { yyHaveZone++; - ;} + } + break; case 6: { yyHaveDate++; - ;} + } + break; case 7: { yyHaveOrdinalMonth++; - ;} + } + break; case 8: { yyHaveDay++; - ;} + } + break; case 9: { yyHaveRel++; - ;} + } + break; case 10: @@ -1657,7 +1600,8 @@ yyreduce: { yyHaveTime++; yyHaveDate++; - ;} + } + break; case 11: @@ -1666,195 +1610,217 @@ yyreduce: yyHaveTime++; yyHaveDate++; yyHaveRel++; - ;} + } + break; case 13: { - yyHour = (yyvsp[(1) - (2)].Number); + yyHour = (yyvsp[-1].Number); yyMinutes = 0; yySeconds = 0; - yyMeridian = (yyvsp[(2) - (2)].Meridian); - ;} + yyMeridian = (yyvsp[0].Meridian); + } + break; case 14: { - yyHour = (yyvsp[(1) - (4)].Number); - yyMinutes = (yyvsp[(3) - (4)].Number); + yyHour = (yyvsp[-3].Number); + yyMinutes = (yyvsp[-1].Number); yySeconds = 0; - yyMeridian = (yyvsp[(4) - (4)].Meridian); - ;} + yyMeridian = (yyvsp[0].Meridian); + } + break; case 15: { - yyHour = (yyvsp[(1) - (5)].Number); - yyMinutes = (yyvsp[(3) - (5)].Number); + yyHour = (yyvsp[-4].Number); + yyMinutes = (yyvsp[-2].Number); yyMeridian = MER24; yyDSTmode = DSToff; - yyTimezone = ((yyvsp[(5) - (5)].Number) % 100 + ((yyvsp[(5) - (5)].Number) / 100) * 60); + yyTimezone = ((yyvsp[0].Number) % 100 + ((yyvsp[0].Number) / 100) * 60); ++yyHaveZone; - ;} + } + break; case 16: { - yyHour = (yyvsp[(1) - (6)].Number); - yyMinutes = (yyvsp[(3) - (6)].Number); - yySeconds = (yyvsp[(5) - (6)].Number); - yyMeridian = (yyvsp[(6) - (6)].Meridian); - ;} + yyHour = (yyvsp[-5].Number); + yyMinutes = (yyvsp[-3].Number); + yySeconds = (yyvsp[-1].Number); + yyMeridian = (yyvsp[0].Meridian); + } + break; case 17: { - yyHour = (yyvsp[(1) - (7)].Number); - yyMinutes = (yyvsp[(3) - (7)].Number); - yySeconds = (yyvsp[(5) - (7)].Number); + yyHour = (yyvsp[-6].Number); + yyMinutes = (yyvsp[-4].Number); + yySeconds = (yyvsp[-2].Number); yyMeridian = MER24; yyDSTmode = DSToff; - yyTimezone = ((yyvsp[(7) - (7)].Number) % 100 + ((yyvsp[(7) - (7)].Number) / 100) * 60); + yyTimezone = ((yyvsp[0].Number) % 100 + ((yyvsp[0].Number) / 100) * 60); ++yyHaveZone; - ;} + } + break; case 18: { - yyTimezone = (yyvsp[(1) - (2)].Number); + yyTimezone = (yyvsp[-1].Number); yyDSTmode = DSTon; - ;} + } + break; case 19: { - yyTimezone = (yyvsp[(1) - (1)].Number); + yyTimezone = (yyvsp[0].Number); yyDSTmode = DSToff; - ;} + } + break; case 20: { - yyTimezone = (yyvsp[(1) - (1)].Number); + yyTimezone = (yyvsp[0].Number); yyDSTmode = DSTon; - ;} + } + break; case 21: { yyDayOrdinal = 1; - yyDayNumber = (yyvsp[(1) - (1)].Number); - ;} + yyDayNumber = (yyvsp[0].Number); + } + break; case 22: { yyDayOrdinal = 1; - yyDayNumber = (yyvsp[(1) - (2)].Number); - ;} + yyDayNumber = (yyvsp[-1].Number); + } + break; case 23: { - yyDayOrdinal = (yyvsp[(1) - (2)].Number); - yyDayNumber = (yyvsp[(2) - (2)].Number); - ;} + yyDayOrdinal = (yyvsp[-1].Number); + yyDayNumber = (yyvsp[0].Number); + } + break; case 24: { - yyDayOrdinal = (yyvsp[(1) - (3)].Number) * (yyvsp[(2) - (3)].Number); - yyDayNumber = (yyvsp[(3) - (3)].Number); - ;} + yyDayOrdinal = (yyvsp[-2].Number) * (yyvsp[-1].Number); + yyDayNumber = (yyvsp[0].Number); + } + break; case 25: { yyDayOrdinal = 2; - yyDayNumber = (yyvsp[(2) - (2)].Number); - ;} + yyDayNumber = (yyvsp[0].Number); + } + break; case 26: { - yyMonth = (yyvsp[(1) - (3)].Number); - yyDay = (yyvsp[(3) - (3)].Number); - ;} + yyMonth = (yyvsp[-2].Number); + yyDay = (yyvsp[0].Number); + } + break; case 27: { - yyMonth = (yyvsp[(1) - (5)].Number); - yyDay = (yyvsp[(3) - (5)].Number); - yyYear = (yyvsp[(5) - (5)].Number); - ;} + yyMonth = (yyvsp[-4].Number); + yyDay = (yyvsp[-2].Number); + yyYear = (yyvsp[0].Number); + } + break; case 28: { - yyYear = (yyvsp[(1) - (1)].Number) / 10000; - yyMonth = ((yyvsp[(1) - (1)].Number) % 10000)/100; - yyDay = (yyvsp[(1) - (1)].Number) % 100; - ;} + yyYear = (yyvsp[0].Number) / 10000; + yyMonth = ((yyvsp[0].Number) % 10000)/100; + yyDay = (yyvsp[0].Number) % 100; + } + break; case 29: { - yyDay = (yyvsp[(1) - (5)].Number); - yyMonth = (yyvsp[(3) - (5)].Number); - yyYear = (yyvsp[(5) - (5)].Number); - ;} + yyDay = (yyvsp[-4].Number); + yyMonth = (yyvsp[-2].Number); + yyYear = (yyvsp[0].Number); + } + break; case 30: { - yyMonth = (yyvsp[(3) - (5)].Number); - yyDay = (yyvsp[(5) - (5)].Number); - yyYear = (yyvsp[(1) - (5)].Number); - ;} + yyMonth = (yyvsp[-2].Number); + yyDay = (yyvsp[0].Number); + yyYear = (yyvsp[-4].Number); + } + break; case 31: { - yyMonth = (yyvsp[(1) - (2)].Number); - yyDay = (yyvsp[(2) - (2)].Number); - ;} + yyMonth = (yyvsp[-1].Number); + yyDay = (yyvsp[0].Number); + } + break; case 32: { - yyMonth = (yyvsp[(1) - (4)].Number); - yyDay = (yyvsp[(2) - (4)].Number); - yyYear = (yyvsp[(4) - (4)].Number); - ;} + yyMonth = (yyvsp[-3].Number); + yyDay = (yyvsp[-2].Number); + yyYear = (yyvsp[0].Number); + } + break; case 33: { - yyMonth = (yyvsp[(2) - (2)].Number); - yyDay = (yyvsp[(1) - (2)].Number); - ;} + yyMonth = (yyvsp[0].Number); + yyDay = (yyvsp[-1].Number); + } + break; case 34: @@ -1863,70 +1829,77 @@ yyreduce: yyMonth = 1; yyDay = 1; yyYear = EPOCH; - ;} + } + break; case 35: { - yyMonth = (yyvsp[(2) - (3)].Number); - yyDay = (yyvsp[(1) - (3)].Number); - yyYear = (yyvsp[(3) - (3)].Number); - ;} + yyMonth = (yyvsp[-1].Number); + yyDay = (yyvsp[-2].Number); + yyYear = (yyvsp[0].Number); + } + break; case 36: { yyMonthOrdinal = 1; - yyMonth = (yyvsp[(2) - (2)].Number); - ;} + yyMonth = (yyvsp[0].Number); + } + break; case 37: { - yyMonthOrdinal = (yyvsp[(2) - (3)].Number); - yyMonth = (yyvsp[(3) - (3)].Number); - ;} + yyMonthOrdinal = (yyvsp[-1].Number); + yyMonth = (yyvsp[0].Number); + } + break; case 38: { - if ((yyvsp[(2) - (3)].Number) != HOUR( 7)) YYABORT; - yyYear = (yyvsp[(1) - (3)].Number) / 10000; - yyMonth = ((yyvsp[(1) - (3)].Number) % 10000)/100; - yyDay = (yyvsp[(1) - (3)].Number) % 100; - yyHour = (yyvsp[(3) - (3)].Number) / 10000; - yyMinutes = ((yyvsp[(3) - (3)].Number) % 10000)/100; - yySeconds = (yyvsp[(3) - (3)].Number) % 100; - ;} + if ((yyvsp[-1].Number) != HOUR( 7)) YYABORT; + yyYear = (yyvsp[-2].Number) / 10000; + yyMonth = ((yyvsp[-2].Number) % 10000)/100; + yyDay = (yyvsp[-2].Number) % 100; + yyHour = (yyvsp[0].Number) / 10000; + yyMinutes = ((yyvsp[0].Number) % 10000)/100; + yySeconds = (yyvsp[0].Number) % 100; + } + break; case 39: { - if ((yyvsp[(2) - (7)].Number) != HOUR( 7)) YYABORT; - yyYear = (yyvsp[(1) - (7)].Number) / 10000; - yyMonth = ((yyvsp[(1) - (7)].Number) % 10000)/100; - yyDay = (yyvsp[(1) - (7)].Number) % 100; - yyHour = (yyvsp[(3) - (7)].Number); - yyMinutes = (yyvsp[(5) - (7)].Number); - yySeconds = (yyvsp[(7) - (7)].Number); - ;} + if ((yyvsp[-5].Number) != HOUR( 7)) YYABORT; + yyYear = (yyvsp[-6].Number) / 10000; + yyMonth = ((yyvsp[-6].Number) % 10000)/100; + yyDay = (yyvsp[-6].Number) % 100; + yyHour = (yyvsp[-4].Number); + yyMinutes = (yyvsp[-2].Number); + yySeconds = (yyvsp[0].Number); + } + break; case 40: { - yyYear = (yyvsp[(1) - (2)].Number) / 10000; - yyMonth = ((yyvsp[(1) - (2)].Number) % 10000)/100; - yyDay = (yyvsp[(1) - (2)].Number) % 100; - yyHour = (yyvsp[(2) - (2)].Number) / 10000; - yyMinutes = ((yyvsp[(2) - (2)].Number) % 10000)/100; - yySeconds = (yyvsp[(2) - (2)].Number) % 100; - ;} + yyYear = (yyvsp[-1].Number) / 10000; + yyMonth = ((yyvsp[-1].Number) % 10000)/100; + yyDay = (yyvsp[-1].Number) % 100; + yyHour = (yyvsp[0].Number) / 10000; + yyMinutes = ((yyvsp[0].Number) % 10000)/100; + yySeconds = (yyvsp[0].Number) % 100; + } + break; case 41: @@ -1937,12 +1910,13 @@ yyreduce: * in a range accessible with a 32 bit clock seconds value. */ - yyYear = (yyvsp[(2) - (4)].Number)/1000 + 2323 - 377; + yyYear = (yyvsp[-2].Number)/1000 + 2323 - 377; yyDay = 1; yyMonth = 1; - yyRelDay += (((yyvsp[(2) - (4)].Number)%1000)*(365 + IsLeapYear(yyYear)))/1000; - yyRelSeconds += (yyvsp[(4) - (4)].Number) * 144 * 60; - ;} + yyRelDay += (((yyvsp[-2].Number)%1000)*(365 + IsLeapYear(yyYear)))/1000; + yyRelSeconds += (yyvsp[0].Number) * 144 * 60; + } + break; case 42: @@ -1951,121 +1925,145 @@ yyreduce: yyRelSeconds *= -1; yyRelMonth *= -1; yyRelDay *= -1; - ;} + } + break; case 44: { - *yyRelPointer += (yyvsp[(1) - (3)].Number) * (yyvsp[(2) - (3)].Number) * (yyvsp[(3) - (3)].Number); - ;} + *yyRelPointer += (yyvsp[-2].Number) * (yyvsp[-1].Number) * (yyvsp[0].Number); + } + break; case 45: { - *yyRelPointer += (yyvsp[(1) - (2)].Number) * (yyvsp[(2) - (2)].Number); - ;} + *yyRelPointer += (yyvsp[-1].Number) * (yyvsp[0].Number); + } + break; case 46: { - *yyRelPointer += (yyvsp[(2) - (2)].Number); - ;} + *yyRelPointer += (yyvsp[0].Number); + } + break; case 47: { - *yyRelPointer += (yyvsp[(2) - (3)].Number) * (yyvsp[(3) - (3)].Number); - ;} + *yyRelPointer += (yyvsp[-1].Number) * (yyvsp[0].Number); + } + break; case 48: { - *yyRelPointer += (yyvsp[(1) - (1)].Number); - ;} + *yyRelPointer += (yyvsp[0].Number); + } + break; case 49: { (yyval.Number) = -1; - ;} + } + break; case 50: { (yyval.Number) = 1; - ;} + } + break; case 51: { - (yyval.Number) = (yyvsp[(1) - (1)].Number); + (yyval.Number) = (yyvsp[0].Number); yyRelPointer = &yyRelSeconds; - ;} + } + break; case 52: { - (yyval.Number) = (yyvsp[(1) - (1)].Number); + (yyval.Number) = (yyvsp[0].Number); yyRelPointer = &yyRelDay; - ;} + } + break; case 53: { - (yyval.Number) = (yyvsp[(1) - (1)].Number); + (yyval.Number) = (yyvsp[0].Number); yyRelPointer = &yyRelMonth; - ;} + } + break; case 54: { if (yyHaveTime && yyHaveDate && !yyHaveRel) { - yyYear = (yyvsp[(1) - (1)].Number); + yyYear = (yyvsp[0].Number); } else { yyHaveTime++; if (yyDigitCount <= 2) { - yyHour = (yyvsp[(1) - (1)].Number); + yyHour = (yyvsp[0].Number); yyMinutes = 0; } else { - yyHour = (yyvsp[(1) - (1)].Number) / 100; - yyMinutes = (yyvsp[(1) - (1)].Number) % 100; + yyHour = (yyvsp[0].Number) / 100; + yyMinutes = (yyvsp[0].Number) % 100; } yySeconds = 0; yyMeridian = MER24; } - ;} + } + break; case 55: { (yyval.Meridian) = MER24; - ;} + } + break; case 56: { - (yyval.Meridian) = (yyvsp[(1) - (1)].Meridian); - ;} + (yyval.Meridian) = (yyvsp[0].Meridian); + } + break; -/* Line 1267 of yacc.c. */ default: break; } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); @@ -2075,7 +2073,7 @@ yyreduce: *++yyvsp = yyval; *++yylsp = yyloc; - /* Now `shift' the result of the reduction. Determine what state + /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -2090,10 +2088,14 @@ yyreduce: goto yynewstate; -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ +/*--------------------------------------. +| yyerrlab -- here on detecting error. | +`--------------------------------------*/ yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { @@ -2101,62 +2103,61 @@ yyerrlab: #if ! YYERROR_VERBOSE yyerror (&yylloc, info, YY_("syntax error")); #else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) { - YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); - if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) - { - YYSIZE_T yyalloc = 2 * yysize; - if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) - yyalloc = YYSTACK_ALLOC_MAXIMUM; - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yyalloc); - if (yymsg) - yymsg_alloc = yyalloc; - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - } - } - - if (0 < yysize && yysize <= yymsg_alloc) - { - (void) yysyntax_error (yymsg, yystate, yychar); - yyerror (&yylloc, info, yymsg); - } - else - { - yyerror (&yylloc, info, YY_("syntax error")); - if (yysize != 0) - goto yyexhaustedlab; - } + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = YYSYNTAX_ERROR; + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == 1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); + if (!yymsg) + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = 2; + } + else + { + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; + } + } + yyerror (&yylloc, info, yymsgp); + if (yysyntax_error_status == 2) + goto yyexhaustedlab; } +# undef YYSYNTAX_ERROR #endif } - yyerror_range[0] = yylloc; + yyerror_range[1] = yylloc; if (yyerrstatus == 3) { - /* If just tried and failed to reuse look-ahead token after an - error, discard it. */ + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } else - { - yydestruct ("Error: discarding", - yytoken, &yylval, &yylloc, info); - yychar = YYEMPTY; - } + { + yydestruct ("Error: discarding", + yytoken, &yylval, &yylloc, info); + yychar = YYEMPTY; + } } - /* Else will try to reuse look-ahead token after shifting the error + /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; @@ -2172,8 +2173,7 @@ yyerrorlab: if (/*CONSTCOND*/ 0) goto yyerrorlab; - yyerror_range[0] = yylsp[1-yylen]; - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; @@ -2186,43 +2186,42 @@ yyerrorlab: | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + if (!yypact_value_is_default (yyn)) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) - YYABORT; + YYABORT; - yyerror_range[0] = *yylsp; + yyerror_range[1] = *yylsp; yydestruct ("Error: popping", - yystos[yystate], yyvsp, yylsp, info); + yystos[yystate], yyvsp, yylsp, info); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } - if (yyn == YYFINAL) - YYACCEPT; - + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END - yyerror_range[1] = yylloc; + yyerror_range[2] = yylloc; /* Using YYLLOC is tempting, but would change the location of - the look-ahead. YYLOC is available though. */ - YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2); + the lookahead. YYLOC is available though. */ + YYLLOC_DEFAULT (yyloc, yyerror_range, 2); *++yylsp = yyloc; /* Shift the error token. */ @@ -2246,7 +2245,7 @@ yyabortlab: yyresult = 1; goto yyreturn; -#ifndef yyoverflow +#if !defined yyoverflow || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -2257,17 +2256,22 @@ yyexhaustedlab: #endif yyreturn: - if (yychar != YYEOF && yychar != YYEMPTY) - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, &yylloc, info); - /* Do not reclaim the symbols of the rule which action triggered + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, &yylloc, info); + } + /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, yylsp, info); + yystos[*yyssp], yyvsp, yylsp, info); YYPOPSTACK (1); } #ifndef yyoverflow @@ -2278,13 +2282,10 @@ yyreturn: if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif - /* Make sure YYID is used. */ - return YYID (yyresult); + return yyresult; } - - /* * Month and day table. */ @@ -2548,9 +2549,9 @@ LookupWord( YYSTYPE* yylvalPtr, char *buff) { - register char *p; - register char *q; - register const TABLE *tp; + char *p; + char *q; + const TABLE *tp; int i, abbrev; /* @@ -2673,8 +2674,8 @@ TclDatelex( YYLTYPE* location, DateInfo *info) { - register char c; - register char *p; + char c; + char *p; char buff[20]; int Count; @@ -2743,7 +2744,7 @@ TclDatelex( int TclClockOldscanObjCmd( - ClientData clientData, /* Unused */ + void *dummy, /* Unused */ Tcl_Interp *interp, /* Tcl interpreter */ int objc, /* Count of paraneters */ Tcl_Obj *const *objv) /* Parameters */ @@ -2753,6 +2754,7 @@ TclClockOldscanObjCmd( DateInfo dateInfo; DateInfo* info = &dateInfo; int status; + (void)dummy; if (objc != 5) { Tcl_WrongNumArgs(interp, 1, objv, @@ -2857,7 +2859,7 @@ TclClockOldscanObjCmd( if (yyHaveTime) { Tcl_ListObjAppendElement(interp, result, Tcl_NewIntObj((int) - ToSeconds(yyHour, yyMinutes, yySeconds, yyMeridian))); + ToSeconds(yyHour, yyMinutes, yySeconds, (MERIDIAN)yyMeridian))); } else { Tcl_ListObjAppendElement(interp, result, Tcl_NewObj()); } @@ -2911,4 +2913,3 @@ TclClockOldscanObjCmd( * fill-column: 78 * End: */ - diff --git a/generic/tclGetDate.y b/generic/tclGetDate.y index ce7c2ce..c87d21c 100644 --- a/generic/tclGetDate.y +++ b/generic/tclGetDate.y @@ -46,6 +46,14 @@ #endif /* _MSC_VER */ /* + * Meridian: am, pm, or 24-hour style. + */ + +typedef enum _MERIDIAN { + MERam, MERpm, MER24 +} MERIDIAN; + +/* * yyparse will accept a 'struct DateInfo' as its parameter; that's where the * parsed fields will be returned. */ @@ -63,7 +71,7 @@ typedef struct DateInfo { time_t dateHour; time_t dateMinutes; time_t dateSeconds; - int dateMeridian; + MERIDIAN dateMeridian; int dateHaveTime; time_t dateTimezone; @@ -150,14 +158,6 @@ typedef enum _DSTMODE { DSTon, DSToff, DSTmaybe } DSTMODE; -/* - * Meridian: am, pm, or 24-hour style. - */ - -typedef enum _MERIDIAN { - MERam, MERpm, MER24 -} MERIDIAN; - %} %union { @@ -765,9 +765,9 @@ LookupWord( YYSTYPE* yylvalPtr, char *buff) { - register char *p; - register char *q; - register const TABLE *tp; + char *p; + char *q; + const TABLE *tp; int i, abbrev; /* @@ -890,14 +890,14 @@ TclDatelex( YYLTYPE* location, DateInfo *info) { - register char c; - register char *p; + char c; + char *p; char buff[20]; int Count; location->first_column = yyInput - info->dateStart; for ( ; ; ) { - while (TclIsSpaceProc(*yyInput)) { + while (TclIsSpaceProcM(*yyInput)) { yyInput++; } @@ -960,7 +960,7 @@ TclDatelex( int TclClockOldscanObjCmd( - ClientData clientData, /* Unused */ + void *dummy, /* Unused */ Tcl_Interp *interp, /* Tcl interpreter */ int objc, /* Count of paraneters */ Tcl_Obj *const *objv) /* Parameters */ @@ -970,6 +970,7 @@ TclClockOldscanObjCmd( DateInfo dateInfo; DateInfo* info = &dateInfo; int status; + (void)dummy; if (objc != 5) { Tcl_WrongNumArgs(interp, 1, objv, @@ -1074,7 +1075,7 @@ TclClockOldscanObjCmd( if (yyHaveTime) { Tcl_ListObjAppendElement(interp, result, Tcl_NewIntObj((int) - ToSeconds(yyHour, yyMinutes, yySeconds, yyMeridian))); + ToSeconds(yyHour, yyMinutes, yySeconds, (MERIDIAN)yyMeridian))); } else { Tcl_ListObjAppendElement(interp, result, Tcl_NewObj()); } -- cgit v0.12 From dbc3e640a2807e90bad8ebaef6f4ebb06178a18c Mon Sep 17 00:00:00 2001 From: aku Date: Tue, 23 Jun 2020 06:37:59 +0000 Subject: Added two tests demonstrating that the tickets [8af92dfb66] (bad stream expansion) and [f70ce1fead] (multi-stream decoding without readahead limit shenanigans) are fixed. Verified that the tests fail with commit [4eb66645d6], just before the zlib fixes. Tweaked the zlib manpage paragraphs about -limit. Tweaked some code comments. Fixed typos in description of two unrelated zlib tests. --- doc/zlib.n | 18 ++++++++++----- generic/tclZlib.c | 5 +++-- tests/assets/zlib.bin | Bin 0 -> 591 bytes tests/zlib.test | 60 ++++++++++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 73 insertions(+), 10 deletions(-) create mode 100644 tests/assets/zlib.bin diff --git a/doc/zlib.n b/doc/zlib.n index 994a063..3714fc1 100644 --- a/doc/zlib.n +++ b/doc/zlib.n @@ -193,12 +193,18 @@ How hard to compress the data. Must be an integer from 0 (uncompressed) to 9 .TP \fB\-limit\fI readaheadLimit\fR . -The maximum number of bytes ahead to read when decompressing. This can be set -to 1 to find the border for multi-stream inflate or mixed data, to ensure it -would handle correctly e. g. some operations on following streams after first -caused to due time. -Otherwise Tcl would try to automatically return previously read extra data -to input stream back. +The maximum number of bytes ahead to read when decompressing. +.RS +.PP +This option has become \fBirrelevant\fR. It was originally introduced +to prevent Tcl from reading beyond the end of a compressed stream in +multi-stream channels to ensure that the data after was left alone for +further reading, at the cost of speed. +.PP +Tcl now automatically returns any bytes it has read beyond the end of +a compressed stream back to the channel, making them appear as unread +to further readers. +.RE .PP Both compressing and decompressing channel transformations add extra configuration options that may be accessed through \fBchan configure\fR. The diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 68bdf92..42d7156 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -2948,8 +2948,9 @@ ZlibTransformClose( (void) deflateEnd(&cd->outStream); } else { /* - * If we have rest of read input (overshot by Z_STREAM_END or on possible error), - * unget this part of buffer back to the parent channel. + * If we have unused bytes from the read input (overshot by + * Z_STREAM_END or on possible error), unget them back to the parent + * channel, so that they appear as not being read yet. */ if (cd->inStream.avail_in) { Tcl_Ungets (cd->parent, (char *)cd->inStream.next_in, cd->inStream.avail_in, 0); diff --git a/tests/assets/zlib.bin b/tests/assets/zlib.bin new file mode 100644 index 0000000..dadb639 Binary files /dev/null and b/tests/assets/zlib.bin differ diff --git a/tests/zlib.test b/tests/zlib.test index c2f7825..e7ffcfe 100644 --- a/tests/zlib.test +++ b/tests/zlib.test @@ -920,7 +920,7 @@ test zlib-10.2 "bug #2818131 (mismatch gets)" -constraints { rename zlibRead {} } -result {error {invalid block type}} -test zlib-11.1 "Bug #3390073: mis-appled gzip filtering" -setup { +test zlib-11.1 "Bug #3390073: mis-applied gzip filtering" -setup { set file [makeFile {} test.input] } -constraints zlib -body { set f [open $file wb] @@ -934,7 +934,7 @@ test zlib-11.1 "Bug #3390073: mis-appled gzip filtering" -setup { } -cleanup { removeFile $file } -result {1000 0} -test zlib-11.2 "Bug #3390073: mis-appled gzip filtering" -setup { +test zlib-11.2 "Bug #3390073: mis-applied gzip filtering" -setup { set file [makeFile {} test.input] } -constraints zlib -body { set f [open $file wb] @@ -1005,6 +1005,62 @@ test zlib-12.2 {Patrick Dunnigan's issue} -constraints zlib -setup { removeFile $filesrc removeFile $filedst } -result 56 + +test zlib-13.1 {Ticket 8af92dfb66 - zlib stream mis-expansion} -constraints zlib -setup { + set pathin [file join $::tcltest::testsDirectory assets zlib.bin] + set chanin [open $pathin rb] + set pathout [file join [pwd] zlib.deflated] + set chanout [open $pathout wb] + zlib push inflate $chanin + fcopy $chanin $chanout + close $chanin + close $chanout +} -body { + file size $pathout +} -cleanup { + file delete $pathout + unset chanin pathin chanout pathout +} -result 458752 + +test zlib-13.2 {Ticket f70ce1fead - zlib multi-stream expansion} -constraints zlib -setup { + # Start from the basic asset + set pathin [file join $::tcltest::testsDirectory assets zlib.bin] + set chanin [open $pathin rb] + # Create a multi-stream by copying the asset twice into it. + set pathout [file join [pwd] zlib.multi] + set chanout [open $pathout wb] + fcopy $chanin $chanout + seek $chanin 0 start + fcopy $chanin $chanout + close $chanin + close $chanout + # The multi-stream file shall be our input + set pathin $pathout + set chanin [open $pathin rb] + # And our destinations + set pathout1 [file join [pwd] zlib.1] + set pathout2 [file join [pwd] zlib.2] +} -body { + # Decode first stream + set chanout [open $pathout1 wb] + zlib push inflate $chanin + fcopy $chanin $chanout + chan pop $chanin + close $chanout + # Decode second stream + set chanout [open $pathout2 wb] + zlib push inflate $chanin + fcopy $chanin $chanout + chan pop $chanin + close $chanout + # + list [file size $pathout1] [file size $pathout2] +} -cleanup { + close $chanin + file delete $pathout $pathout1 $pathout2 + unset chanin pathin chanout pathout pathout1 pathout2 +} -result {458752 458752} + ::tcltest::cleanupTests return -- cgit v0.12 From 75376fc361851e388acdc9c4a64c1987446b808f Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 23 Jun 2020 07:13:15 +0000 Subject: re-generate with bison 3.1 --- generic/tclDate.c | 315 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 206 insertions(+), 109 deletions(-) diff --git a/generic/tclDate.c b/generic/tclDate.c index daeb1d9..dcb85e9 100644 --- a/generic/tclDate.c +++ b/generic/tclDate.c @@ -1,9 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.4.2. */ +/* A Bison parser, made by GNU Bison 3.1. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation, - Inc. + Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -41,14 +40,11 @@ define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ -/* Undocumented macros, especially those whose name start with YY_, - are private implementation details. Do not rely on them. */ - /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "3.4.2" +#define YYBISON_VERSION "3.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -71,7 +67,8 @@ #define yynerrs TclDatenerrs -/* First part of user prologue. */ +/* Copy the first part of user declarations. */ + /* * tclDate.c -- @@ -212,15 +209,12 @@ typedef enum _DSTMODE { + # ifndef YY_NULLPTR -# if defined __cplusplus -# if 201103L <= __cplusplus -# define YY_NULLPTR nullptr -# else -# define YY_NULLPTR 0 -# endif +# if defined __cplusplus && 201103L <= __cplusplus +# define YY_NULLPTR nullptr # else -# define YY_NULLPTR ((void*)0) +# define YY_NULLPTR 0 # endif # endif @@ -268,14 +262,17 @@ extern int TclDatedebug; /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED + union YYSTYPE { + time_t Number; enum _MERIDIAN Meridian; }; + typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 @@ -301,7 +298,8 @@ int TclDateparse (DateInfo* info); -/* Second part of user prologue. */ +/* Copy the second part of user declarations. */ + /* @@ -393,6 +391,15 @@ typedef short yytype_int16; # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) #endif +#if !defined _Noreturn \ + && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) +# if defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) +# endif +#endif + /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(E) ((void) (E)) @@ -420,8 +427,6 @@ typedef short yytype_int16; #endif -#define YY_ASSERT(E) ((void) (0 && (E))) - #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -566,16 +571,16 @@ union yyalloc /* YYNSTATES -- Number of states. */ #define YYNSTATES 89 +/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned + by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 274 -/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM - as returned by yylex, with out-of-bounds checking. */ #define YYTRANSLATE(YYX) \ ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM - as returned by yylex. */ + as returned by yylex, without out-of-bounds checking. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -781,22 +786,22 @@ static const yytype_uint8 yyr2[] = #define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(Token, Value) \ - do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (&yylloc, info, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ - while (0) +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (&yylloc, info, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (0) /* Error token number */ #define YYTERROR 1 @@ -855,10 +860,10 @@ do { \ /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ YY_ATTRIBUTE_UNUSED -static int +static unsigned yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) { - int res = 0; + unsigned res = 0; int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; if (0 <= yylocp->first_line) { @@ -901,43 +906,41 @@ do { \ } while (0) -/*-----------------------------------. -| Print this symbol's value on YYO. | -`-----------------------------------*/ +/*----------------------------------------. +| Print this symbol's value on YYOUTPUT. | +`----------------------------------------*/ static void -yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, DateInfo* info) +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, DateInfo* info) { - FILE *yyoutput = yyo; - YYUSE (yyoutput); + FILE *yyo = yyoutput; + YYUSE (yyo); YYUSE (yylocationp); YYUSE (info); if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) - YYPRINT (yyo, yytoknum[yytype], *yyvaluep); + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # endif - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN YYUSE (yytype); - YY_IGNORE_MAYBE_UNINITIALIZED_END } -/*---------------------------. -| Print this symbol on YYO. | -`---------------------------*/ +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ static void -yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, DateInfo* info) +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, DateInfo* info) { - YYFPRINTF (yyo, "%s %s (", + YYFPRINTF (yyoutput, "%s %s (", yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); - YY_LOCATION_PRINT (yyo, *yylocationp); - YYFPRINTF (yyo, ": "); - yy_symbol_value_print (yyo, yytype, yyvaluep, yylocationp, info); - YYFPRINTF (yyo, ")"); + YY_LOCATION_PRINT (yyoutput, *yylocationp); + YYFPRINTF (yyoutput, ": "); + yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, info); + YYFPRINTF (yyoutput, ")"); } /*------------------------------------------------------------------. @@ -982,7 +985,7 @@ yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yystos[yyssp[yyi + 1 - yynrhs]], - &yyvsp[(yyi + 1) - (yynrhs)] + &(yyvsp[(yyi + 1) - (yynrhs)]) , &(yylsp[(yyi + 1) - (yynrhs)]) , info); YYFPRINTF (stderr, "\n"); } @@ -1086,10 +1089,7 @@ yytnamerr (char *yyres, const char *yystr) case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; - else - goto append; - - append: + /* Fall through. */ default: if (yyres) yyres[yyn] = *yyp; @@ -1107,7 +1107,7 @@ yytnamerr (char *yyres, const char *yystr) if (! yyres) return yystrlen (yystr); - return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres); + return yystpcpy (yyres, yystr) - yyres; } # endif @@ -1185,10 +1185,10 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yyarg[yycount++] = yytname[yyx]; { YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; + yysize = yysize1; } } } @@ -1212,10 +1212,9 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, { YYSIZE_T yysize1 = yysize + yystrlen (yyformat); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; + yysize = yysize1; } if (*yymsg_alloc < yysize) @@ -1367,33 +1366,23 @@ YYLTYPE yylloc = yyloc_default; yylsp[0] = yylloc; goto yysetstate; - /*------------------------------------------------------------. -| yynewstate -- push a new state, which is found in yystate. | +| yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ -yynewstate: + yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; - -/*--------------------------------------------------------------------. -| yynewstate -- set current state (the top of the stack) to yystate. | -`--------------------------------------------------------------------*/ -yysetstate: - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - YY_ASSERT (0 <= yystate && yystate < YYNSTATES); - *yyssp = (yytype_int16) yystate; + yysetstate: + *yyssp = yystate; if (yyss + yystacksize - 1 <= yyssp) -#if !defined yyoverflow && !defined YYSTACK_RELOCATE - goto yyexhaustedlab; -#else { /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1); + YYSIZE_T yysize = yyssp - yyss + 1; -# if defined yyoverflow +#ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into @@ -1411,11 +1400,15 @@ yysetstate: &yyvs1, yysize * sizeof (*yyvsp), &yyls1, yysize * sizeof (*yylsp), &yystacksize); + + yyls = yyls1; yyss = yyss1; yyvs = yyvs1; - yyls = yyls1; } -# else /* defined YYSTACK_RELOCATE */ +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; @@ -1432,11 +1425,12 @@ yysetstate: YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); YYSTACK_RELOCATE (yyls_alloc, yyls); -# undef YYSTACK_RELOCATE +# undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif +#endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; @@ -1448,18 +1442,19 @@ yysetstate: if (yyss + yystacksize - 1 <= yyssp) YYABORT; } -#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); if (yystate == YYFINAL) YYACCEPT; goto yybackup; - /*-----------. | yybackup. | `-----------*/ yybackup: + /* Do appropriate processing given the current state. Read a lookahead token if we need one and don't already have one. */ @@ -1532,7 +1527,7 @@ yydefault: /*-----------------------------. -| yyreduce -- do a reduction. | +| yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ @@ -1554,76 +1549,97 @@ yyreduce: YY_REDUCE_PRINT (yyn); switch (yyn) { - case 4: + case 4: + { yyHaveTime++; } + break; case 5: + { yyHaveZone++; } + break; case 6: + { yyHaveDate++; } + break; case 7: + { yyHaveOrdinalMonth++; } + break; case 8: + { yyHaveDay++; } + break; case 9: + { yyHaveRel++; } + break; case 10: + { yyHaveTime++; yyHaveDate++; } + break; case 11: + { yyHaveTime++; yyHaveDate++; yyHaveRel++; } + break; case 13: + { yyHour = (yyvsp[-1].Number); yyMinutes = 0; yySeconds = 0; yyMeridian = (yyvsp[0].Meridian); } + break; case 14: + { yyHour = (yyvsp[-3].Number); yyMinutes = (yyvsp[-1].Number); yySeconds = 0; yyMeridian = (yyvsp[0].Meridian); } + break; case 15: + { yyHour = (yyvsp[-4].Number); yyMinutes = (yyvsp[-2].Number); @@ -1632,18 +1648,22 @@ yyreduce: yyTimezone = ((yyvsp[0].Number) % 100 + ((yyvsp[0].Number) / 100) * 60); ++yyHaveZone; } + break; case 16: + { yyHour = (yyvsp[-5].Number); yyMinutes = (yyvsp[-3].Number); yySeconds = (yyvsp[-1].Number); yyMeridian = (yyvsp[0].Meridian); } + break; case 17: + { yyHour = (yyvsp[-6].Number); yyMinutes = (yyvsp[-4].Number); @@ -1653,158 +1673,200 @@ yyreduce: yyTimezone = ((yyvsp[0].Number) % 100 + ((yyvsp[0].Number) / 100) * 60); ++yyHaveZone; } + break; case 18: + { yyTimezone = (yyvsp[-1].Number); if (yyTimezone > HOUR( 12)) yyTimezone -= HOUR(100); yyDSTmode = DSTon; } + break; case 19: + { yyTimezone = (yyvsp[0].Number); if (yyTimezone > HOUR( 12)) yyTimezone -= HOUR(100); yyDSTmode = DSToff; } + break; case 20: + { yyTimezone = (yyvsp[0].Number); yyDSTmode = DSTon; } + break; case 21: + { yyDayOrdinal = 1; yyDayNumber = (yyvsp[0].Number); } + break; case 22: + { yyDayOrdinal = 1; yyDayNumber = (yyvsp[-1].Number); } + break; case 23: + { yyDayOrdinal = (yyvsp[-1].Number); yyDayNumber = (yyvsp[0].Number); } + break; case 24: + { yyDayOrdinal = (yyvsp[-2].Number) * (yyvsp[-1].Number); yyDayNumber = (yyvsp[0].Number); } + break; case 25: + { yyDayOrdinal = 2; yyDayNumber = (yyvsp[0].Number); } + break; case 26: + { yyMonth = (yyvsp[-2].Number); yyDay = (yyvsp[0].Number); } + break; case 27: + { yyMonth = (yyvsp[-4].Number); yyDay = (yyvsp[-2].Number); yyYear = (yyvsp[0].Number); } + break; case 28: + { yyYear = (yyvsp[0].Number) / 10000; yyMonth = ((yyvsp[0].Number) % 10000)/100; yyDay = (yyvsp[0].Number) % 100; } + break; case 29: + { yyDay = (yyvsp[-4].Number); yyMonth = (yyvsp[-2].Number); yyYear = (yyvsp[0].Number); } + break; case 30: + { yyMonth = (yyvsp[-2].Number); yyDay = (yyvsp[0].Number); yyYear = (yyvsp[-4].Number); } + break; case 31: + { yyMonth = (yyvsp[-1].Number); yyDay = (yyvsp[0].Number); } + break; case 32: + { yyMonth = (yyvsp[-3].Number); yyDay = (yyvsp[-2].Number); yyYear = (yyvsp[0].Number); } + break; case 33: + { yyMonth = (yyvsp[0].Number); yyDay = (yyvsp[-1].Number); } + break; case 34: + { yyMonth = 1; yyDay = 1; yyYear = EPOCH; } + break; case 35: + { yyMonth = (yyvsp[-1].Number); yyDay = (yyvsp[-2].Number); yyYear = (yyvsp[0].Number); } + break; case 36: + { yyMonthOrdinal = 1; yyMonth = (yyvsp[0].Number); } + break; case 37: + { yyMonthOrdinal = (yyvsp[-1].Number); yyMonth = (yyvsp[0].Number); } + break; case 38: + { if ((yyvsp[-5].Number) != HOUR( 7) + HOUR(100)) YYABORT; yyYear = (yyvsp[-10].Number); @@ -1814,9 +1876,11 @@ yyreduce: yyMinutes = (yyvsp[-2].Number); yySeconds = (yyvsp[0].Number); } + break; case 39: + { if ((yyvsp[-1].Number) != HOUR( 7) + HOUR(100)) YYABORT; yyYear = (yyvsp[-2].Number) / 10000; @@ -1826,9 +1890,11 @@ yyreduce: yyMinutes = ((yyvsp[0].Number) % 10000)/100; yySeconds = (yyvsp[0].Number) % 100; } + break; case 40: + { if ((yyvsp[-5].Number) != HOUR( 7) + HOUR(100)) YYABORT; yyYear = (yyvsp[-6].Number) / 10000; @@ -1838,9 +1904,11 @@ yyreduce: yyMinutes = (yyvsp[-2].Number); yySeconds = (yyvsp[0].Number); } + break; case 41: + { yyYear = (yyvsp[-1].Number) / 10000; yyMonth = ((yyvsp[-1].Number) % 10000)/100; @@ -1849,9 +1917,11 @@ yyreduce: yyMinutes = ((yyvsp[0].Number) % 10000)/100; yySeconds = (yyvsp[0].Number) % 100; } + break; case 42: + { /* * Offset computed year by -377 so that the returned years will be @@ -1864,80 +1934,104 @@ yyreduce: yyRelDay += (((yyvsp[-2].Number)%1000)*(365 + IsLeapYear(yyYear)))/1000; yyRelSeconds += (yyvsp[0].Number) * 144 * 60; } + break; case 43: + { yyRelSeconds *= -1; yyRelMonth *= -1; yyRelDay *= -1; } + break; case 45: + { *yyRelPointer += (yyvsp[-2].Number) * (yyvsp[-1].Number) * (yyvsp[0].Number); } + break; case 46: + { *yyRelPointer += (yyvsp[-1].Number) * (yyvsp[0].Number); } + break; case 47: + { *yyRelPointer += (yyvsp[0].Number); } + break; case 48: + { *yyRelPointer += (yyvsp[-1].Number) * (yyvsp[0].Number); } + break; case 49: + { *yyRelPointer += (yyvsp[0].Number); } + break; case 50: + { (yyval.Number) = -1; } + break; case 51: + { (yyval.Number) = 1; } + break; case 52: + { (yyval.Number) = (yyvsp[0].Number); yyRelPointer = &yyRelSeconds; } + break; case 53: + { (yyval.Number) = (yyvsp[0].Number); yyRelPointer = &yyRelDay; } + break; case 54: + { (yyval.Number) = (yyvsp[0].Number); yyRelPointer = &yyRelMonth; } + break; case 55: + { if (yyHaveTime && yyHaveDate && !yyHaveRel) { yyYear = (yyvsp[0].Number); @@ -1954,18 +2048,23 @@ yyreduce: yyMeridian = MER24; } } + break; case 56: + { (yyval.Meridian) = MER24; } + break; case 57: + { (yyval.Meridian) = (yyvsp[0].Meridian); } + break; @@ -1995,13 +2094,14 @@ yyreduce: /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ - { - const int yylhs = yyr1[yyn] - YYNTOKENS; - const int yyi = yypgoto[yylhs] + *yyssp; - yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp - ? yytable[yyi] - : yydefgoto[yylhs]); - } + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; @@ -2084,10 +2184,12 @@ yyerrlab: | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: - /* Pacify compilers when the user code never invokes YYERROR and the - label yyerrorlab therefore never appears in user code. */ - if (0) - YYERROR; + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ @@ -2154,7 +2256,6 @@ yyacceptlab: yyresult = 0; goto yyreturn; - /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ @@ -2162,7 +2263,6 @@ yyabortlab: yyresult = 1; goto yyreturn; - #if !defined yyoverflow || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | @@ -2173,10 +2273,6 @@ yyexhaustedlab: /* Fall through. */ #endif - -/*-----------------------------------------------------. -| yyreturn -- parsing is finished, return the result. | -`-----------------------------------------------------*/ yyreturn: if (yychar != YYEMPTY) { @@ -2207,6 +2303,7 @@ yyreturn: return yyresult; } + /* * Month and day table. */ -- cgit v0.12 From dd905225112e9294cad877b30cf9b893959e4c5b Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 23 Jun 2020 09:28:59 +0000 Subject: avoid %pure-parser deprecation warning from Bison 3.4 --- generic/tclDate.c | 6 +++--- generic/tclGetDate.y | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/generic/tclDate.c b/generic/tclDate.c index 544517e..052e54c 100644 --- a/generic/tclDate.c +++ b/generic/tclDate.c @@ -102,9 +102,6 @@ typedef enum _MERIDIAN { MERam, MERpm, MER24 } MERIDIAN; - - - /* * yyparse will accept a 'struct DateInfo' as its parameter; that's where the * parsed fields will be returned. @@ -210,6 +207,9 @@ typedef enum _DSTMODE { DSTon, DSToff, DSTmaybe } DSTMODE; + + + # ifndef YY_NULLPTR # if defined __cplusplus && 201103L <= __cplusplus # define YY_NULLPTR nullptr diff --git a/generic/tclGetDate.y b/generic/tclGetDate.y index c87d21c..d38235a 100644 --- a/generic/tclGetDate.y +++ b/generic/tclGetDate.y @@ -16,7 +16,7 @@ %parse-param {DateInfo* info} %lex-param {DateInfo* info} -%pure-parser +%define api.pure /* %error-verbose would be nice, but our token names are meaningless */ %locations -- cgit v0.12 From 97499f5ed8cc4ea3177e6fb8544c5cd7aba6e029 Mon Sep 17 00:00:00 2001 From: kjnash Date: Tue, 23 Jun 2020 18:10:33 +0000 Subject: Fix for ticket 41c9857bdd --- library/init.tcl | 45 +++++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/library/init.tcl b/library/init.tcl index 5cc0fee..e6964e0 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -37,41 +37,46 @@ package require -exact Tcl 8.6.10 # tcl_pkgPath, which is set by the platform-specific initialization routines # On UNIX it is compiled in # On Windows, it is not used +# +# (Ticket 41c9857bdd) In a safe interpreter, this file does not set +# ::auto_path (other than to {} if it is undefined). The caller, typically +# a Safe Base command, is responsible for setting ::auto_path. if {![info exists auto_path]} { - if {[info exists env(TCLLIBPATH)]} { + if {[info exists env(TCLLIBPATH)] && (![interp issafe])} { set auto_path $env(TCLLIBPATH) } else { set auto_path "" } } namespace eval tcl { - variable Dir - foreach Dir [list $::tcl_library [file dirname $::tcl_library]] { - if {$Dir ni $::auto_path} { - lappend ::auto_path $Dir - } - } - set Dir [file join [file dirname [file dirname \ - [info nameofexecutable]]] lib] - if {$Dir ni $::auto_path} { - lappend ::auto_path $Dir - } - if {[info exists ::tcl_pkgPath]} { catch { - foreach Dir $::tcl_pkgPath { + if {![interp issafe]} { + variable Dir + foreach Dir [list $::tcl_library [file dirname $::tcl_library]] { if {$Dir ni $::auto_path} { lappend ::auto_path $Dir } } - }} + set Dir [file join [file dirname [file dirname \ + [info nameofexecutable]]] lib] + if {$Dir ni $::auto_path} { + lappend ::auto_path $Dir + } + if {[info exists ::tcl_pkgPath]} { catch { + foreach Dir $::tcl_pkgPath { + if {$Dir ni $::auto_path} { + lappend ::auto_path $Dir + } + } + }} - if {![interp issafe]} { - variable Path [encoding dirs] - set Dir [file join $::tcl_library encoding] - if {$Dir ni $Path} { + variable Path [encoding dirs] + set Dir [file join $::tcl_library encoding] + if {$Dir ni $Path} { lappend Path $Dir encoding dirs $Path - } + } + unset Dir Path } # TIP #255 min and max functions -- cgit v0.12 From 094567e57a4212ad576fa972a418938423e8db0d Mon Sep 17 00:00:00 2001 From: sebres Date: Tue, 23 Jun 2020 20:40:49 +0000 Subject: zlib.test: replaces tests/assets/zlib.bin with inlined version (creating test file on demand), use temp files (instead of current directory) for interim files --- tests/zlib.test | 44 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/tests/zlib.test b/tests/zlib.test index e7ffcfe..d3a6dff 100644 --- a/tests/zlib.test +++ b/tests/zlib.test @@ -1006,10 +1006,26 @@ test zlib-12.2 {Patrick Dunnigan's issue} -constraints zlib -setup { removeFile $filedst } -result 56 -test zlib-13.1 {Ticket 8af92dfb66 - zlib stream mis-expansion} -constraints zlib -setup { - set pathin [file join $::tcltest::testsDirectory assets zlib.bin] +set zlibbinf "" +proc _zlibbinf {} { + # inlined zlib.bin file creator: + variable zlibbinf + if {$zlibbinf eq ""} { + set zlibbinf [makeFile {} test-zlib-13.bin] + set f [open $zlibbinf wb] + puts -nonewline $f [zlib decompress [binary decode base64 { + eJx7e+6s1+EAgYaLjK3ratptGmOck0vT/y/ZujHAd0qJelDBXfUPJ3tfrtLbpX+wOOFHmtn03/tizm + /+tXROXU3d203b79p5X6/0cvUyFzTsqOj4sa9r8SrZI5zT7265e2Xzq595Fb9LbpgffVy7cZaJ/d15 + 4U9L7LLM2vdqut8+aSU/r6q9Ltv6+T9mBhTgIK97bH33m/O1C1eBwf9FDKNgaIDaj9wA+5hToA== + }]] + close $f + } + return $zlibbinf +} +test zlib-13.1 {Ticket [8af92dfb66] - zlib stream mis-expansion} -constraints zlib -setup { + set pathin [_zlibbinf] set chanin [open $pathin rb] - set pathout [file join [pwd] zlib.deflated] + set pathout [makeFile {} test-zlib-13.deflated] set chanout [open $pathout wb] zlib push inflate $chanin fcopy $chanin $chanout @@ -1018,16 +1034,16 @@ test zlib-13.1 {Ticket 8af92dfb66 - zlib stream mis-expansion} -constraints zlib } -body { file size $pathout } -cleanup { - file delete $pathout + removeFile $pathout unset chanin pathin chanout pathout } -result 458752 -test zlib-13.2 {Ticket f70ce1fead - zlib multi-stream expansion} -constraints zlib -setup { +test zlib-13.2 {Ticket [f70ce1fead] - zlib multi-stream expansion} -constraints zlib -setup { # Start from the basic asset - set pathin [file join $::tcltest::testsDirectory assets zlib.bin] + set pathin [_zlibbinf] set chanin [open $pathin rb] # Create a multi-stream by copying the asset twice into it. - set pathout [file join [pwd] zlib.multi] + set pathout [makeFile {} test-zlib-13.multi] set chanout [open $pathout wb] fcopy $chanin $chanout seek $chanin 0 start @@ -1038,8 +1054,8 @@ test zlib-13.2 {Ticket f70ce1fead - zlib multi-stream expansion} -constraints zl set pathin $pathout set chanin [open $pathin rb] # And our destinations - set pathout1 [file join [pwd] zlib.1] - set pathout2 [file join [pwd] zlib.2] + set pathout1 [makeFile {} test-zlib-13.multi-1] + set pathout2 [makeFile {} test-zlib-13.multi-2] } -body { # Decode first stream set chanout [open $pathout1 wb] @@ -1057,10 +1073,18 @@ test zlib-13.2 {Ticket f70ce1fead - zlib multi-stream expansion} -constraints zl list [file size $pathout1] [file size $pathout2] } -cleanup { close $chanin - file delete $pathout $pathout1 $pathout2 + removeFile $pathout + removeFile $pathout1 + removeFile $pathout2 unset chanin pathin chanout pathout pathout1 pathout2 } -result {458752 458752} +if {$zlibbinf ne ""} { + removeFile $zlibbinf +} +unset zlibbinf +rename _zlibbinf {} + ::tcltest::cleanupTests return -- cgit v0.12 From ea3e48843d5f42ebaa1c962a705cc4b1ac8a6c80 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 24 Jun 2020 12:24:28 +0000 Subject: Add "manifest.uuid" to the distribution, so we can see exactly where "make dist" came from. In case of "git", we can see that too --- .fossil-settings/manifest | 1 + .gitignore | 19 +++++++++++-------- unix/Makefile.in | 7 ++++++- unix/tclConfig.h.in | 40 +++++++++++++++++++++++++++++++--------- 4 files changed, 49 insertions(+), 18 deletions(-) create mode 100644 .fossil-settings/manifest diff --git a/.fossil-settings/manifest b/.fossil-settings/manifest new file mode 100644 index 0000000..4ae8ef0 --- /dev/null +++ b/.fossil-settings/manifest @@ -0,0 +1 @@ +u diff --git a/.gitignore b/.gitignore index acaff0f..3f6ce0c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *.a +*.bundle *.dll *.dylib *.exe @@ -10,11 +11,16 @@ *.res *.sl *.so -*/Makefile -*/config.cache -*/config.log -*/config.status -*/config.status.lineno +.fslckout +Makefile +Tcl-Info.plist +config.cache +config.log +config.status +config.status.lineno +html +manifest.uuid +_FOSSIL_ */tclConfig.sh */tclsh* */tcltest* @@ -22,9 +28,6 @@ */version.vc */libtcl.vfs */libtcl_*.zip -.fslckout -_FOSSIL_ -html libtommath/bn.ilg libtommath/bn.ind libtommath/pretty.build diff --git a/unix/Makefile.in b/unix/Makefile.in index f314862..c20ba57 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -1663,9 +1663,14 @@ $(MAC_OSX_DIR)/configure: $(MAC_OSX_DIR)/configure.ac $(UNIX_DIR)/configure $(UNIX_DIR)/tclConfig.h.in: $(MAC_OSX_DIR)/configure cd $(MAC_OSX_DIR); autoheader; touch $@ -dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tclConfig.h.in $(UNIX_DIR)/tcl.pc.in $(MAC_OSX_DIR)/configure genstubs +$(TOP_DIR)/manifest.uuid: + printf "git." >$(TOP_DIR)/manifest.uuid + git rev-parse HEAD >>$(TOP_DIR)/manifest.uuid + +dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tclConfig.h.in $(UNIX_DIR)/tcl.pc.in $(MAC_OSX_DIR)/configure $(TOP_DIR)/manifest.uuid genstubs rm -rf $(DISTDIR) mkdir -p $(DISTDIR)/unix + cp -p $(TOP_DIR)/manifest.uuid $(DISTDIR) cp -p $(UNIX_DIR)/*.[ch] $(DISTDIR)/unix cp $(UNIX_DIR)/Makefile.in $(DISTDIR)/unix chmod 664 $(DISTDIR)/unix/Makefile.in diff --git a/unix/tclConfig.h.in b/unix/tclConfig.h.in index 0879c7a..c02adc5 100644 --- a/unix/tclConfig.h.in +++ b/unix/tclConfig.h.in @@ -4,6 +4,9 @@ #ifndef _TCLCONFIG #define _TCLCONFIG +/* Define if building universal (internal helper macro) */ +#undef AC_APPLE_UNIVERSAL_BUILD + /* Is pthread_attr_get_np() declared in ? */ #undef ATTRGETNP_NOT_DECLARED @@ -37,6 +40,17 @@ /* Is the cpuid instruction usable? */ #undef HAVE_CPUID +/* Define to 1 if you have the declaration of `gethostbyaddr_r', and to 0 if + you don't. */ +#undef HAVE_DECL_GETHOSTBYADDR_R + +/* Define to 1 if you have the declaration of `gethostbyname_r', and to 0 if + you don't. */ +#undef HAVE_DECL_GETHOSTBYNAME_R + +/* Is 'DIR64' in ? */ +#undef HAVE_DIR64 + /* Do we have fts functions? */ #undef HAVE_FTS @@ -193,16 +207,13 @@ /* Is 'struct dirent64' in ? */ #undef HAVE_STRUCT_DIRENT64 -/* Is 'DIR64' in ? */ -#undef HAVE_DIR64 - /* Is 'struct stat64' in ? */ #undef HAVE_STRUCT_STAT64 -/* Define to 1 if `st_blksize' is member of `struct stat'. */ +/* Define to 1 if `st_blksize' is a member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BLKSIZE -/* Define to 1 if `st_blocks' is member of `struct stat'. */ +/* Define to 1 if `st_blocks' is a member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BLOCKS /* Define to 1 if you have the header file. */ @@ -337,6 +348,9 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION @@ -430,9 +444,17 @@ /* Should we use vfork() instead of fork()? */ #undef USE_VFORK -/* Define to 1 if your processor stores words with the most significant byte - first (like Motorola and SPARC, unlike Intel and VAX). */ -#undef WORDS_BIGENDIAN +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +# undef WORDS_BIGENDIAN +# endif +#endif /* Are Darwin SUSv3 extensions available? */ #undef _DARWIN_C_SOURCE @@ -487,7 +509,7 @@ /* Define to `int' if does not define. */ #undef pid_t -/* Define to `unsigned' if does not define. */ +/* Define to `unsigned int' if does not define. */ #undef size_t /* Define as int if socklen_t is not available */ -- cgit v0.12 From 034bd13a3cd5781c916ced37c764a6634e458499 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 24 Jun 2020 13:05:47 +0000 Subject: Fix [9080d6a871]: Build fix for tcl on macOS on Apple Silicon --- .fossil-settings/ignore-glob | 10 ++++++++++ .gitignore | 2 ++ unix/configure | 3 +++ unix/configure.in | 2 ++ unix/tcl.m4 | 6 +++++- unix/tclConfig.h.in | 40 +++++++++------------------------------- 6 files changed, 31 insertions(+), 32 deletions(-) diff --git a/.fossil-settings/ignore-glob b/.fossil-settings/ignore-glob index 62a7a5a..eca9bcd 100644 --- a/.fossil-settings/ignore-glob +++ b/.fossil-settings/ignore-glob @@ -11,6 +11,7 @@ *.sl *.so */Makefile +*/autom4te.cache */config.cache */config.log */config.status @@ -40,10 +41,19 @@ libtommath/etc/* libtommath/demo/* libtommath/*.out libtommath/*.tex +macosx/configure unix/autoMkindex.tcl unix/dltest.marker +unix/dltest/*.bundle +unix/dltest/*.dll +unix/dltest/*.dylib +unix/dltest/*.o +unix/dltest/*.sl +unix/dltest/*.so unix/tcl.pc unix/tclIndex +unix/Tcl-Info.plist +unix/Tclsh-Info.plist unix/pkgs/* win/Debug* win/Release* diff --git a/.gitignore b/.gitignore index 3f6ce0c..701419b 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ .fslckout Makefile Tcl-Info.plist +autom4te.cache config.cache config.log config.status @@ -46,6 +47,7 @@ libtommath/etc/* libtommath/demo/* libtommath/*.out libtommath/*.tex +macosx/configure unix/autoMkindex.tcl unix/dltest.marker unix/tcl.pc diff --git a/unix/configure b/unix/configure index b02525b..a900a70 100755 --- a/unix/configure +++ b/unix/configure @@ -15050,6 +15050,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main() { + #include extern double strtod(); char *term, *string = " +69"; exit(strtod(string,&term) != 69 || term != string+4); @@ -15220,6 +15221,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + #include extern double strtod(); int main() { char *infString="Inf", *nanString="NaN", *spaceString=" "; @@ -16607,6 +16609,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include + #include #define OURVAR "havecopy=yes" int main (int argc, char *argv[]) { diff --git a/unix/configure.in b/unix/configure.in index c110c21..a4ec925 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -298,6 +298,7 @@ SC_TCL_CHECK_BROKEN_FUNC(strtoul, [ #-------------------------------------------------------------------- SC_TCL_CHECK_BROKEN_FUNC(strtod, [ + #include extern double strtod(); char *term, *string = " +69"; exit(strtod(string,&term) != 69 || term != string+4); @@ -453,6 +454,7 @@ fi AC_CACHE_CHECK([for a putenv() that copies the buffer], tcl_cv_putenv_copy, [ AC_TRY_RUN([ #include + #include #define OURVAR "havecopy=yes" int main (int argc, char *argv[]) { diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 0dd4d77..4c96316 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -2596,6 +2596,7 @@ AC_DEFUN([SC_BUGGY_STRTOD], [ if test "$tcl_strtod" = 1; then AC_CACHE_CHECK([for Solaris2.4/Tru64 strtod bugs], tcl_cv_strtod_buggy,[ AC_TRY_RUN([ + #include extern double strtod(); int main() { char *infString="Inf", *nanString="NaN", *spaceString=" "; @@ -2882,7 +2883,10 @@ AC_DEFUN([SC_TCL_CHECK_BROKEN_FUNC],[ AC_CHECK_FUNC($1, tcl_ok=1, tcl_ok=0) if test ["$tcl_ok"] = 1; then AC_CACHE_CHECK([proper ]$1[ implementation], [tcl_cv_]$1[_unbroken], - AC_TRY_RUN([[int main() {]$2[}]],[tcl_cv_]$1[_unbroken]=ok, + AC_TRY_RUN([[ +#include +#include +int main() {]$2[}]],[tcl_cv_]$1[_unbroken]=ok, [tcl_cv_]$1[_unbroken]=broken,[tcl_cv_]$1[_unbroken]=unknown)) if test ["$tcl_cv_]$1[_unbroken"] = "ok"; then tcl_ok=1 diff --git a/unix/tclConfig.h.in b/unix/tclConfig.h.in index c02adc5..0879c7a 100644 --- a/unix/tclConfig.h.in +++ b/unix/tclConfig.h.in @@ -4,9 +4,6 @@ #ifndef _TCLCONFIG #define _TCLCONFIG -/* Define if building universal (internal helper macro) */ -#undef AC_APPLE_UNIVERSAL_BUILD - /* Is pthread_attr_get_np() declared in ? */ #undef ATTRGETNP_NOT_DECLARED @@ -40,17 +37,6 @@ /* Is the cpuid instruction usable? */ #undef HAVE_CPUID -/* Define to 1 if you have the declaration of `gethostbyaddr_r', and to 0 if - you don't. */ -#undef HAVE_DECL_GETHOSTBYADDR_R - -/* Define to 1 if you have the declaration of `gethostbyname_r', and to 0 if - you don't. */ -#undef HAVE_DECL_GETHOSTBYNAME_R - -/* Is 'DIR64' in ? */ -#undef HAVE_DIR64 - /* Do we have fts functions? */ #undef HAVE_FTS @@ -207,13 +193,16 @@ /* Is 'struct dirent64' in ? */ #undef HAVE_STRUCT_DIRENT64 +/* Is 'DIR64' in ? */ +#undef HAVE_DIR64 + /* Is 'struct stat64' in ? */ #undef HAVE_STRUCT_STAT64 -/* Define to 1 if `st_blksize' is a member of `struct stat'. */ +/* Define to 1 if `st_blksize' is member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BLKSIZE -/* Define to 1 if `st_blocks' is a member of `struct stat'. */ +/* Define to 1 if `st_blocks' is member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BLOCKS /* Define to 1 if you have the header file. */ @@ -348,9 +337,6 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME -/* Define to the home page for this package. */ -#undef PACKAGE_URL - /* Define to the version of this package. */ #undef PACKAGE_VERSION @@ -444,17 +430,9 @@ /* Should we use vfork() instead of fork()? */ #undef USE_VFORK -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -# undef WORDS_BIGENDIAN -# endif -#endif +/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ +#undef WORDS_BIGENDIAN /* Are Darwin SUSv3 extensions available? */ #undef _DARWIN_C_SOURCE @@ -509,7 +487,7 @@ /* Define to `int' if does not define. */ #undef pid_t -/* Define to `unsigned int' if does not define. */ +/* Define to `unsigned' if does not define. */ #undef size_t /* Define as int if socklen_t is not available */ -- cgit v0.12 From efc338be246089be082ed7117f418735a2acecdd Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 24 Jun 2020 14:40:17 +0000 Subject: re-generate unix/configure --- unix/configure | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/unix/configure b/unix/configure index a900a70..1562f6c 100755 --- a/unix/configure +++ b/unix/configure @@ -14715,6 +14715,9 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + +#include +#include int main() { extern int strstr(); exit(strstr("\0test", "test") ? 1 : 0); @@ -14882,6 +14885,9 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + +#include +#include int main() { extern int strtoul(); char *term, *string = "0"; @@ -15049,6 +15055,9 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + +#include +#include int main() { #include extern double strtod(); -- cgit v0.12 From 56d2c7e23c1acd887d31a182324a9861cb6e68dd Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 24 Jun 2020 14:56:12 +0000 Subject: One include too much --- unix/configure | 1 - unix/configure.in | 1 - 2 files changed, 2 deletions(-) diff --git a/unix/configure b/unix/configure index 1562f6c..1c0c2be 100755 --- a/unix/configure +++ b/unix/configure @@ -15059,7 +15059,6 @@ cat >>conftest.$ac_ext <<_ACEOF #include #include int main() { - #include extern double strtod(); char *term, *string = " +69"; exit(strtod(string,&term) != 69 || term != string+4); diff --git a/unix/configure.in b/unix/configure.in index a4ec925..2556430 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -298,7 +298,6 @@ SC_TCL_CHECK_BROKEN_FUNC(strtoul, [ #-------------------------------------------------------------------- SC_TCL_CHECK_BROKEN_FUNC(strtod, [ - #include extern double strtod(); char *term, *string = " +69"; exit(strtod(string,&term) != 69 || term != string+4); -- cgit v0.12 From 97d82cb4b15f18701d239609308aa41c3b89d75c Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 25 Jun 2020 12:11:56 +0000 Subject: Clean-up compat functions, not using "register" any more, and fix some signatures (constify) matching nowadays standards. All backported from core-8-branch with modifications. --- compat/fixstrtod.c | 2 +- compat/gettod.c | 5 +++-- compat/memcmp.c | 10 +++++----- compat/opendir.c | 22 +++++++++++----------- compat/strncasecmp.c | 16 ++++++++-------- compat/strstr.c | 12 ++++++------ compat/strtod.c | 14 +++++++------- compat/strtol.c | 7 +++---- compat/strtoul.c | 16 ++++++++-------- compat/waitpid.c | 4 ++-- 10 files changed, 54 insertions(+), 54 deletions(-) diff --git a/compat/fixstrtod.c b/compat/fixstrtod.c index 91f309e..63fb8ef 100644 --- a/compat/fixstrtod.c +++ b/compat/fixstrtod.c @@ -1,4 +1,4 @@ -/* +/* * fixstrtod.c -- * * Source code for the "fixstrtod" procedure. This procedure is diff --git a/compat/gettod.c b/compat/gettod.c index 28e1432..f6651d4 100644 --- a/compat/gettod.c +++ b/compat/gettod.c @@ -1,4 +1,4 @@ -/* +/* * gettod.c -- * * This file provides the gettimeofday function on systems @@ -21,10 +21,11 @@ gettimeofday( struct timezone *tz) { struct timeb t; + (void)tz; ftime(&t); tp->tv_sec = t.time; - tp->tv_usec = t. millitm * 1000; + tp->tv_usec = t.millitm * 1000; return 0; } diff --git a/compat/memcmp.c b/compat/memcmp.c index 5fce528..c4e25a8 100644 --- a/compat/memcmp.c +++ b/compat/memcmp.c @@ -15,7 +15,7 @@ * Here is the prototype just in case it is not included in tclPort.h. */ -int memcmp(CONST VOID *s1, CONST VOID *s2, size_t n); +int memcmp(const void *s1, const void *s2, size_t n); /* *---------------------------------------------------------------------- @@ -38,12 +38,12 @@ int memcmp(CONST VOID *s1, CONST VOID *s2, size_t n); int memcmp( - CONST VOID *s1, /* First string. */ - CONST VOID *s2, /* Second string. */ + const void *s1, /* First string. */ + const void *s2, /* Second string. */ size_t n) /* Length to compare. */ { - CONST unsigned char *ptr1 = (CONST unsigned char *) s1; - CONST unsigned char *ptr2 = (CONST unsigned char *) s2; + const unsigned char *ptr1 = (const unsigned char *) s1; + const unsigned char *ptr2 = (const unsigned char *) s2; for ( ; n-- ; ptr1++, ptr2++) { unsigned char u1 = *ptr1, u2 = *ptr2; diff --git a/compat/opendir.c b/compat/opendir.c index 3fe70c1..25a7ada 100644 --- a/compat/opendir.c +++ b/compat/opendir.c @@ -1,4 +1,4 @@ -/* +/* * opendir.c -- * * This file provides dirent-style directory-reading procedures for V7 @@ -10,7 +10,7 @@ #undef DIRSIZ #define DIRSIZ(dp) \ - ((sizeof (struct dirent) - (MAXNAMLEN+1)) + (((dp)->d_namlen+1 + 3) &~ 3)) + ((sizeof(struct dirent) - (MAXNAMLEN+1)) + (((dp)->d_namlen+1 + 3) &~ 3)) /* * open a directory. @@ -20,9 +20,9 @@ DIR * opendir( char *name) { - register DIR *dirp; - register int fd; - char *myname; + DIR *dirp; + int fd; + const char *myname; myname = ((*name == '\0') ? "." : name); if ((fd = open(myname, 0, 0)) == -1) { @@ -45,14 +45,14 @@ opendir( #ifndef pyr #define ODIRSIZ 14 -struct olddirect { +struct olddirect { ino_t od_ino; char od_name[ODIRSIZ]; }; #else /* a Pyramid in the ATT universe */ #define ODIRSIZ 248 -struct olddirect { +struct olddirect { long od_ino; short od_fill1, od_fill2; char od_name[ODIRSIZ]; @@ -65,9 +65,9 @@ struct olddirect { struct dirent * readdir( - register DIR *dirp) + DIR *dirp) { - register struct olddirect *dp; + struct olddirect *dp; static struct dirent dir; for (;;) { @@ -101,10 +101,10 @@ readdir( void closedir( - register DIR *dirp) + DIR *dirp) { close(dirp->dd_fd); dirp->dd_fd = -1; dirp->dd_loc = 0; - ckfree((char *) dirp); + ckfree(dirp); } diff --git a/compat/strncasecmp.c b/compat/strncasecmp.c index 76cf549..0a69f35 100644 --- a/compat/strncasecmp.c +++ b/compat/strncasecmp.c @@ -1,4 +1,4 @@ -/* +/* * strncasecmp.c -- * * Source code for the "strncasecmp" library routine. @@ -18,7 +18,7 @@ * sequences. */ -static unsigned char charmap[] = { +static const unsigned char charmap[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, @@ -57,8 +57,8 @@ static unsigned char charmap[] = { * Here are the prototypes just in case they are not included in tclPort.h. */ -int strncasecmp(CONST char *s1, CONST char *s2, size_t n); -int strcasecmp(CONST char *s1, CONST char *s2); +int strncasecmp(const char *s1, const char *s2, size_t n); +int strcasecmp(const char *s1, const char *s2); /* *---------------------------------------------------------------------- @@ -79,8 +79,8 @@ int strcasecmp(CONST char *s1, CONST char *s2); int strcasecmp( - CONST char *s1, /* First string. */ - CONST char *s2) /* Second string. */ + const char *s1, /* First string. */ + const char *s2) /* Second string. */ { unsigned char u1, u2; @@ -114,8 +114,8 @@ strcasecmp( int strncasecmp( - CONST char *s1, /* First string. */ - CONST char *s2, /* Second string. */ + const char *s1, /* First string. */ + const char *s2, /* Second string. */ size_t length) /* Maximum number of characters to compare * (stop earlier if the end of either string * is reached). */ diff --git a/compat/strstr.c b/compat/strstr.c index 6698c9f..35386d0 100644 --- a/compat/strstr.c +++ b/compat/strstr.c @@ -1,4 +1,4 @@ -/* +/* * strstr.c -- * * Source code for the "strstr" library routine. @@ -36,10 +36,10 @@ char * strstr( - register char *string, /* String to search. */ - char *substring) /* Substring to try to find in string. */ + const char *string, /* String to search. */ + const char *substring) /* Substring to try to find in string. */ { - register char *a, *b; + const char *a, *b; /* * First scan quickly through the two strings looking for a @@ -49,7 +49,7 @@ strstr( b = substring; if (*b == 0) { - return string; + return (char *)string; } for ( ; *string != 0; string += 1) { if (*string != *b) { @@ -58,7 +58,7 @@ strstr( a = string; while (1) { if (*b == 0) { - return string; + return (char *)string; } if (*a++ != *b++) { break; diff --git a/compat/strtod.c b/compat/strtod.c index 1147825..b3b02d9 100644 --- a/compat/strtod.c +++ b/compat/strtod.c @@ -1,4 +1,4 @@ -/* +/* * strtod.c -- * * Source code for the "strtod" library procedure. @@ -61,7 +61,7 @@ static double powersOf10[] = { /* Table giving binary powers of 10. Entry */ double strtod( - CONST char *string, /* A decimal ASCII floating-point number, + const char *string, /* A decimal ASCII floating-point number, * optionally preceded by white space. Must * have form "-I.FE-X", where I is the integer * part of the mantissa, F is the fractional @@ -77,8 +77,8 @@ strtod( { int sign, expSign = FALSE; double fraction, dblExp, *d; - register CONST char *p; - register int c; + const char *p; + int c; int exp = 0; /* Exponent read from "EX" field. */ int fracExp = 0; /* Exponent that derives from the fractional * part. Under normal circumstatnces, it is @@ -92,7 +92,7 @@ strtod( int mantSize; /* Number of digits in mantissa. */ int decPt; /* Number of mantissa digits BEFORE decimal * point. */ - CONST char *pExp; /* Temporarily holds location of exponent in + const char *pExp; /* Temporarily holds location of exponent in * string. */ /* @@ -137,7 +137,7 @@ strtod( * has more than 18 digits, ignore the extras, since they can't affect the * value anyway. */ - + pExp = p; p -= mantSize; if (decPt < 0) { @@ -217,7 +217,7 @@ strtod( * by processing the exponent one bit at a time to combine many powers of * 2 of 10. Then combine the exponent with the fraction. */ - + if (exp < 0) { expSign = TRUE; exp = -exp; diff --git a/compat/strtol.c b/compat/strtol.c index 793f094..a9866f4 100644 --- a/compat/strtol.c +++ b/compat/strtol.c @@ -1,4 +1,4 @@ -/* +/* * strtol.c -- * * Source code for the "strtol" library procedure. @@ -10,7 +10,6 @@ * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ -#include #include "tclInt.h" /* @@ -34,7 +33,7 @@ long int strtol( - CONST char *string, /* String of ASCII digits, possibly preceded + const char *string, /* String of ASCII digits, possibly preceded * by white space. For bases greater than 10, * either lower- or upper-case digits may be * used. */ @@ -46,7 +45,7 @@ strtol( * hex, "0" means octal, anything else means * decimal. */ { - register CONST char *p; + const char *p; long result; /* diff --git a/compat/strtoul.c b/compat/strtoul.c index 9d3f372..af63036 100644 --- a/compat/strtoul.c +++ b/compat/strtoul.c @@ -1,4 +1,4 @@ -/* +/* * strtoul.c -- * * Source code for the "strtoul" library procedure. @@ -18,7 +18,7 @@ * characters). */ -static char cvtIn[] = { +static const char cvtIn[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, /* '0' - '9' */ 100, 100, 100, 100, 100, 100, 100, /* punctuation */ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, /* 'A' - 'Z' */ @@ -50,7 +50,7 @@ static char cvtIn[] = { unsigned long int strtoul( - CONST char *string, /* String of ASCII digits, possibly preceded + const char *string, /* String of ASCII digits, possibly preceded * by white space. For bases greater than 10, * either lower- or upper-case digits may be * used. */ @@ -62,9 +62,9 @@ strtoul( * hex, "0" means octal, anything else means * decimal. */ { - register CONST char *p; - register unsigned long int result = 0; - register unsigned digit; + const char *p; + unsigned long int result = 0; + unsigned digit; int anyDigits = 0; int negative=0; int overflow=0; @@ -90,7 +90,7 @@ strtoul( * If no base was provided, pick one from the leading characters of the * string. */ - + if (base == 0) { if (*p == '0') { p += 1; @@ -206,7 +206,7 @@ strtoul( if (overflow) { errno = ERANGE; return ULONG_MAX; - } + } if (negative) { return -result; } diff --git a/compat/waitpid.c b/compat/waitpid.c index 8f65799..6f43934 100644 --- a/compat/waitpid.c +++ b/compat/waitpid.c @@ -1,4 +1,4 @@ -/* +/* * waitpid.c -- * * This procedure emulates the POSIX waitpid kernel call on BSD systems @@ -70,7 +70,7 @@ waitpid( int options) /* OR'ed combination of WNOHANG and * WUNTRACED. */ { - register WaitInfo *waitPtr, *prevPtr; + WaitInfo *waitPtr, *prevPtr; pid_t result; WAIT_STATUS_TYPE status; -- cgit v0.12 From e758e349344fca7d9511356a69b89eb7177194e1 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 26 Jun 2020 13:29:41 +0000 Subject: Add "make dist" target to Travis build, as regression test. This should continue to work. --- .travis.yml | 1 + unix/installManPage | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 77e52ea..2f93f24 100644 --- a/.travis.yml +++ b/.travis.yml @@ -372,3 +372,4 @@ script: - make all tcltest - make test - make install + - make dist diff --git a/unix/installManPage b/unix/installManPage index 1af3f6d..00c6cc5 100755 --- a/unix/installManPage +++ b/unix/installManPage @@ -99,7 +99,7 @@ SrcDir=`dirname $ManPage` ### Process Page to Create Target Pages ### -Specials="DString Thread Notifier RegExp library packagens pkgMkIndex safesock" +Specials="DString Thread Notifier RegExp library packagens pkgMkIndex safesock FindPhoto FontId MeasureChar" for n in $Specials; do if [ "$Name" = "$n" ] ; then Names="$n $Names" -- cgit v0.12 From 2c7d6403e8bf45a9d610dd24471c79ffc0efb10f Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Sun, 28 Jun 2020 15:13:31 +0000 Subject: MacOSX: add some type-casts, improving C++ compatibility. Make sure that strstr and strtoul() are not configured as invalid: Mac is more strict in exact function signatures. Backported from 8.7 --- macosx/tclMacOSXBundle.c | 2 +- macosx/tclMacOSXFCmd.c | 8 ++++---- macosx/tclMacOSXNotify.c | 28 +++++++++++++++++++--------- unix/configure | 2 -- unix/configure.in | 2 -- 5 files changed, 24 insertions(+), 18 deletions(-) diff --git a/macosx/tclMacOSXBundle.c b/macosx/tclMacOSXBundle.c index 9fadb7b..beef2ed 100644 --- a/macosx/tclMacOSXBundle.c +++ b/macosx/tclMacOSXBundle.c @@ -106,7 +106,7 @@ OpenResourceMap( if (tclMacOSXDarwinRelease >= 8) #endif { - openresourcemap = dlsym(RTLD_NEXT, + openresourcemap = (short (*)(CFBundleRef))dlsym(RTLD_NEXT, "CFBundleOpenBundleResourceMap"); #ifdef TCL_DEBUG_LOAD if (!openresourcemap) { diff --git a/macosx/tclMacOSXFCmd.c b/macosx/tclMacOSXFCmd.c index f34b280..e462e5e 100644 --- a/macosx/tclMacOSXFCmd.c +++ b/macosx/tclMacOSXFCmd.c @@ -106,7 +106,7 @@ typedef struct finderinfo { u_int32_t extendedFileInfo[4]; } __attribute__ ((__packed__)) finderinfo; -typedef struct fileinfobuf { +typedef struct { u_int32_t info_length; u_int32_t data[8]; } fileinfobuf; @@ -172,7 +172,7 @@ TclMacOSXGetFileAttribute( } else { alist.commonattr = ATTR_CMN_FNDRINFO; } - native = Tcl_FSGetNativePath(fileName); + native = (const char *)Tcl_FSGetNativePath(fileName); result = getattrlist(native, &alist, &finfo, sizeof(fileinfobuf), 0); if (result != 0) { @@ -268,7 +268,7 @@ TclMacOSXSetFileAttribute( } else { alist.commonattr = ATTR_CMN_FNDRINFO; } - native = Tcl_FSGetNativePath(fileName); + native = (const char *)Tcl_FSGetNativePath(fileName); result = getattrlist(native, &alist, &finfo, sizeof(fileinfobuf), 0); if (result != 0) { @@ -347,7 +347,7 @@ TclMacOSXSetFileAttribute( Tcl_DStringAppend(&ds, native, -1); Tcl_DStringAppend(&ds, _PATH_RSRCFORKSPEC, -1); - result = truncate(Tcl_DStringValue(&ds), (off_t)0); + result = truncate(Tcl_DStringValue(&ds), 0); if (result != 0) { /* * truncate() on a valid resource fork path may fail with a diff --git a/macosx/tclMacOSXNotify.c b/macosx/tclMacOSXNotify.c index 9b7bd1a..01581cf 100644 --- a/macosx/tclMacOSXNotify.c +++ b/macosx/tclMacOSXNotify.c @@ -31,6 +31,9 @@ */ #if defined(HAVE_LIBKERN_OSATOMIC_H) && defined(HAVE_OSSPINLOCKLOCK) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#pragma GCC diagnostic ignored "-Wunused-function" /* * Use OSSpinLock API where available (Tiger or later). */ @@ -42,14 +45,17 @@ * Support for weakly importing spinlock API. */ #define WEAK_IMPORT_SPINLOCKLOCK + #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050 #define VOLATILE volatile #else #define VOLATILE #endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 1050 */ + #ifndef bool #define bool int #endif + extern void OSSpinLockLock(VOLATILE OSSpinLock *lock) WEAK_IMPORT_ATTRIBUTE; extern void OSSpinLockUnlock(VOLATILE OSSpinLock *lock) @@ -101,6 +107,7 @@ extern int _spin_lock_try(OSSpinLock *lock); #define SpinLockTry(p) _spin_lock_try(p) #define SPINLOCK_INIT 0 +#pragma GCC diagnostic pop #endif /* HAVE_LIBKERN_OSATOMIC_H && HAVE_OSSPINLOCKLOCK */ /* @@ -217,7 +224,7 @@ typedef struct FileHandler { * handlers are ready to fire. */ -typedef struct FileHandlerEvent { +typedef struct { Tcl_Event header; /* Information that is standard for all * events. */ int fd; /* File descriptor that is ready. Used to find @@ -232,7 +239,7 @@ typedef struct FileHandlerEvent { * writable, and exceptional conditions. */ -typedef struct SelectMasks { +typedef struct { fd_set readable; fd_set writable; fd_set exceptional; @@ -686,7 +693,7 @@ StartNotifierThread(void) void Tcl_FinalizeNotifier( - ClientData clientData) /* Not used. */ + ClientData clientData) { ThreadSpecificData *tsdPtr; @@ -789,7 +796,7 @@ void Tcl_AlertNotifier( ClientData clientData) { - ThreadSpecificData *tsdPtr = clientData; + ThreadSpecificData *tsdPtr = (ThreadSpecificData *)clientData; if (tclNotifierHooks.alertNotifierProc) { tclNotifierHooks.alertNotifierProc(clientData); @@ -967,7 +974,7 @@ Tcl_CreateFileHandler( } } if (filePtr == NULL) { - filePtr = ckalloc(sizeof(FileHandler)); + filePtr = (FileHandler *)ckalloc(sizeof(FileHandler)); filePtr->fd = fd; filePtr->readyMask = 0; filePtr->nextPtr = tsdPtr->firstFileHandlerPtr; @@ -1311,7 +1318,7 @@ QueueFileEvents( { SelectMasks readyMasks; FileHandler *filePtr; - ThreadSpecificData *tsdPtr = info; + ThreadSpecificData *tsdPtr = (ThreadSpecificData *)info; /* * Queue all detected file events. @@ -1350,7 +1357,7 @@ QueueFileEvents( */ if (filePtr->readyMask == 0) { - FileHandlerEvent *fileEvPtr = ckalloc(sizeof(FileHandlerEvent)); + FileHandlerEvent *fileEvPtr = (FileHandlerEvent *)ckalloc(sizeof(FileHandlerEvent)); fileEvPtr->header.proc = FileHandlerEventProc; fileEvPtr->fd = filePtr->fd; @@ -1383,7 +1390,7 @@ UpdateWaitingListAndServiceEvents( CFRunLoopActivity activity, void *info) { - ThreadSpecificData *tsdPtr = info; + ThreadSpecificData *tsdPtr = (ThreadSpecificData *)info; if (tsdPtr->sleeping) { return; @@ -1412,7 +1419,10 @@ UpdateWaitingListAndServiceEvents( (tsdPtr->runLoopNestingLevel > 1 || !tsdPtr->runLoopRunning)) { tsdPtr->runLoopServicingEvents = 1; - /* This call seems to simply force event processing through and prevents hangups that have long been observed with Tk-Cocoa. */ + /* + * This call seems to simply force event processing through and + * prevents hangups that have long been observed with Tk-Cocoa. + */ Tcl_ServiceAll(); tsdPtr->runLoopServicingEvents = 0; } diff --git a/unix/configure b/unix/configure index 73a8eac..7d40237 100755 --- a/unix/configure +++ b/unix/configure @@ -14926,7 +14926,6 @@ cat >>conftest.$ac_ext <<_ACEOF #include #include int main() { - extern int strstr(); exit(strstr("\0test", "test") ? 1 : 0); } _ACEOF @@ -15096,7 +15095,6 @@ cat >>conftest.$ac_ext <<_ACEOF #include #include int main() { - extern int strtoul(); char *term, *string = "0"; exit(strtoul(string,&term,0) != 0 || term != string+1); } diff --git a/unix/configure.in b/unix/configure.in index 9dd9b7f..2a66cb1 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -342,7 +342,6 @@ AC_CHECK_FUNC(memmove, , [ #-------------------------------------------------------------------- SC_TCL_CHECK_BROKEN_FUNC(strstr, [ - extern int strstr(); exit(strstr("\0test", "test") ? 1 : 0); ]) @@ -353,7 +352,6 @@ SC_TCL_CHECK_BROKEN_FUNC(strstr, [ #-------------------------------------------------------------------- SC_TCL_CHECK_BROKEN_FUNC(strtoul, [ - extern int strtoul(); char *term, *string = "0"; exit(strtoul(string,&term,0) != 0 || term != string+1); ]) -- cgit v0.12 From 1aeadf38fa5a0c61196589e1b2f4192200b41d49 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 29 Jun 2020 10:21:58 +0000 Subject: Re-generate unix/tclConfig.h.in --- unix/tclConfig.h.in | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/unix/tclConfig.h.in b/unix/tclConfig.h.in index ce9c8d0..2aa3bb8 100644 --- a/unix/tclConfig.h.in +++ b/unix/tclConfig.h.in @@ -4,6 +4,9 @@ #ifndef _TCLCONFIG #define _TCLCONFIG +/* Define if building universal (internal helper macro) */ +#undef AC_APPLE_UNIVERSAL_BUILD + /* Is gettimeofday() actually declared in ? */ #undef GETTOD_NOT_DECLARED @@ -219,10 +222,10 @@ /* Is 'struct stat64' in ? */ #undef HAVE_STRUCT_STAT64 -/* Define to 1 if `st_blksize' is member of `struct stat'. */ +/* Define to 1 if `st_blksize' is a member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BLKSIZE -/* Define to 1 if `st_blocks' is member of `struct stat'. */ +/* Define to 1 if `st_blocks' is a member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BLOCKS /* Define to 1 if you have the header file. */ @@ -363,6 +366,9 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION @@ -441,9 +447,17 @@ /* Should we use vfork() instead of fork()? */ #undef USE_VFORK -/* Define to 1 if your processor stores words with the most significant byte - first (like Motorola and SPARC, unlike Intel and VAX). */ -#undef WORDS_BIGENDIAN +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +# undef WORDS_BIGENDIAN +# endif +#endif /* Are Darwin SUSv3 extensions available? */ #undef _DARWIN_C_SOURCE @@ -498,7 +512,7 @@ /* Define to `int' if does not define. */ #undef pid_t -/* Define to `unsigned' if does not define. */ +/* Define to `unsigned int' if does not define. */ #undef size_t /* Define as int if socklen_t is not available */ -- cgit v0.12 From 22d9a275de6676c097e323284da1e19ae11a45f5 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 29 Jun 2020 12:41:08 +0000 Subject: A few missing entries in .fossil-settings/ignore-glob and .gitignore --- .fossil-settings/ignore-glob | 1 + .gitignore | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.fossil-settings/ignore-glob b/.fossil-settings/ignore-glob index 51c422e..a58aef5 100644 --- a/.fossil-settings/ignore-glob +++ b/.fossil-settings/ignore-glob @@ -1,6 +1,7 @@ *.a *.dll *.dylib +*.dylib.E *.exe *.exp *.la diff --git a/.gitignore b/.gitignore index 701419b..33579cf 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ *.bundle *.dll *.dylib +*.dylib.E *.exe *.exp *.lib @@ -14,6 +15,7 @@ .fslckout Makefile Tcl-Info.plist +Tclsh-Info.plist autom4te.cache config.cache config.log @@ -59,4 +61,5 @@ win/*.manifest win/pkgs/* win/coffbase.txt win/tcl.hpj +win/nmakehlp.out win/nmhlp-out.txt -- cgit v0.12 From 870670e4d40ffddec9c1fda18e8dabfeaa3d9afe Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 3 Jul 2020 08:39:53 +0000 Subject: In tcl_startOfPreviousWord, don't bother doing a regexp when $start <= 0. --- library/word.tcl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/library/word.tcl b/library/word.tcl index 3e4bc3a..4e57479 100644 --- a/library/word.tcl +++ b/library/word.tcl @@ -146,7 +146,9 @@ proc tcl_startOfNextWord {str start} { proc tcl_startOfPreviousWord {str start} { variable ::tcl::WordBreakRE set word {-1 -1} - regexp -indices -- $WordBreakRE(previous) [string range $str 0 $start-1] \ - result word + if {$start > 0} { + regexp -indices -- $WordBreakRE(previous) [string range $str 0 $start-1] \ + result word + } return [lindex $word 0] } -- cgit v0.12 From 131eb6c30bec526285cbc4dc33869718c17de7f4 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 7 Jul 2020 12:52:24 +0000 Subject: Make sure that in tclConfig.sh for Windows ${DBGX} is expanded before exporting TCL_(SHARED|UNSHARED|EXPORT)_LIB_SUFFIX there. Otherwise extensions removing ${DBGX} from their implementation (see TIP #578) will break on Windows. tclConfig.sh should never contain the macro ${DBGX} any more. (On UNIX this was already correct, on Windows it was forgotten) --- win/configure | 9 ++++----- win/configure.in | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/win/configure b/win/configure index cc5a3fc..2cfd3a9 100755 --- a/win/configure +++ b/win/configure @@ -5064,10 +5064,6 @@ TCL_SHARED_BUILD=${SHARED_BUILD} # Perform final evaluations of variables with possible substitutions. #-------------------------------------------------------------------- -TCL_SHARED_LIB_SUFFIX="\${NODOT_VERSION}${DLLSUFFIX}" -TCL_UNSHARED_LIB_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}" -TCL_EXPORT_FILE_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}" - eval "TCL_SRC_DIR=\"`cd $srcdir/..; $CYGPATH $(pwd)`\"" eval "TCL_DLL_FILE=tcl${VER}${DLLSUFFIX}" @@ -5086,12 +5082,15 @@ eval "TCL_LIB_SPEC=\"-L${libdir} -ltcl${VER}${FLAGSUFFIX}\"" # Install time header dir can be set via --includedir eval "TCL_INCLUDE_SPEC=\"-I${includedir}\"" - eval "DLLSUFFIX=${DLLSUFFIX}" eval "LIBPREFIX=${LIBPREFIX}" eval "LIBSUFFIX=${LIBSUFFIX}" eval "EXESUFFIX=${EXESUFFIX}" +TCL_SHARED_LIB_SUFFIX="\${NODOT_VERSION}${DLLSUFFIX}" +TCL_UNSHARED_LIB_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}" +TCL_EXPORT_FILE_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}" + CFG_TCL_SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX} CFG_TCL_UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX} CFG_TCL_EXPORT_FILE_SUFFIX=${TCL_EXPORT_FILE_SUFFIX} diff --git a/win/configure.in b/win/configure.in index d1b2b20..70553b8 100644 --- a/win/configure.in +++ b/win/configure.in @@ -300,10 +300,6 @@ TCL_SHARED_BUILD=${SHARED_BUILD} # Perform final evaluations of variables with possible substitutions. #-------------------------------------------------------------------- -TCL_SHARED_LIB_SUFFIX="\${NODOT_VERSION}${DLLSUFFIX}" -TCL_UNSHARED_LIB_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}" -TCL_EXPORT_FILE_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}" - eval "TCL_SRC_DIR=\"`cd $srcdir/..; $CYGPATH $(pwd)`\"" eval "TCL_DLL_FILE=tcl${VER}${DLLSUFFIX}" @@ -322,12 +318,15 @@ eval "TCL_LIB_SPEC=\"-L${libdir} -ltcl${VER}${FLAGSUFFIX}\"" # Install time header dir can be set via --includedir eval "TCL_INCLUDE_SPEC=\"-I${includedir}\"" - eval "DLLSUFFIX=${DLLSUFFIX}" eval "LIBPREFIX=${LIBPREFIX}" eval "LIBSUFFIX=${LIBSUFFIX}" eval "EXESUFFIX=${EXESUFFIX}" +TCL_SHARED_LIB_SUFFIX="\${NODOT_VERSION}${DLLSUFFIX}" +TCL_UNSHARED_LIB_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}" +TCL_EXPORT_FILE_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}" + CFG_TCL_SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX} CFG_TCL_UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX} CFG_TCL_EXPORT_FILE_SUFFIX=${TCL_EXPORT_FILE_SUFFIX} -- cgit v0.12 From f77d355196ec60d248464b6b78b6b4f227ee82ae Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 9 Jul 2020 07:57:32 +0000 Subject: Proposed fix for [5019748c73]: FreeScan resp. Oldscan does not recognize positive time zone offset like "31 Jan 14 23:59:59 +0100" --- generic/tclDate.c | 250 ++++++++++++++++++++++++--------------------------- generic/tclGetDate.y | 21 +---- tests/clock.test | 101 +++++++++++++-------- 3 files changed, 184 insertions(+), 188 deletions(-) diff --git a/generic/tclDate.c b/generic/tclDate.c index dcb85e9..5410046 100644 --- a/generic/tclDate.c +++ b/generic/tclDate.c @@ -560,16 +560,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 2 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 86 +#define YYLAST 81 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 26 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 16 /* YYNRULES -- Number of rules. */ -#define YYNRULES 57 +#define YYNRULES 56 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 89 +#define YYNSTATES 85 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned by yylex, with out-of-bounds checking. */ @@ -587,7 +587,7 @@ static const yytype_uint8 yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 25, 22, 21, 24, 23, 2, 2, + 2, 2, 2, 25, 21, 23, 24, 22, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 20, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -618,11 +618,11 @@ static const yytype_uint8 yytranslate[] = static const yytype_uint16 yyrline[] = { 0, 223, 223, 224, 227, 230, 233, 236, 239, 242, - 245, 249, 254, 257, 263, 269, 277, 283, 294, 299, - 304, 310, 314, 318, 322, 326, 332, 336, 341, 346, - 351, 356, 360, 365, 369, 374, 381, 385, 391, 401, - 410, 419, 429, 443, 448, 451, 454, 457, 460, 463, - 468, 471, 476, 480, 484, 490, 508, 511 + 245, 249, 254, 257, 263, 269, 277, 282, 287, 291, + 297, 301, 305, 309, 313, 319, 323, 328, 333, 338, + 343, 347, 352, 356, 361, 368, 372, 378, 388, 397, + 406, 416, 430, 435, 438, 441, 444, 447, 450, 455, + 458, 463, 467, 471, 477, 495, 498 }; #endif @@ -634,7 +634,7 @@ static const char *const yytname[] = "$end", "error", "$undefined", "tAGO", "tDAY", "tDAYZONE", "tID", "tMERIDIAN", "tMONTH", "tMONTH_UNIT", "tSTARDATE", "tSEC_UNIT", "tSNUMBER", "tUNUMBER", "tZONE", "tEPOCH", "tDST", "tISOBASE", - "tDAY_UNIT", "tNEXT", "':'", "'-'", "','", "'/'", "'.'", "'+'", + "tDAY_UNIT", "tNEXT", "':'", "','", "'/'", "'-'", "'.'", "'+'", "$accept", "spec", "item", "time", "zone", "day", "date", "ordMonth", "iso", "trek", "relspec", "relunits", "sign", "unit", "number", "o_merid", YY_NULLPTR @@ -648,14 +648,14 @@ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 58, 45, 44, 47, 46, 43 + 58, 44, 47, 45, 46, 43 }; # endif -#define YYPACT_NINF -22 +#define YYPACT_NINF -18 #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-22))) + (!!((Yystate) == (-18))) #define YYTABLE_NINF -1 @@ -666,15 +666,15 @@ static const yytype_uint16 yytoknum[] = STATE-NUM. */ static const yytype_int8 yypact[] = { - -22, 2, -22, -21, -22, -4, -22, 1, -22, 22, - 18, -22, 8, -22, 40, -22, -22, -22, -22, -22, - -22, -22, -22, -22, -22, -22, 32, 28, -22, -22, - -22, 24, 26, -22, -22, 42, 47, -5, 49, -22, - -22, 15, -22, -22, -22, 48, -22, -22, 43, 50, - 51, -22, 17, 44, 46, 45, 52, -22, -22, -22, - -22, -22, -22, -22, -22, 56, 57, -22, 58, 60, - 61, 62, -3, -22, -22, 63, -22, 59, 65, -22, - 67, 68, -22, 64, -22, 69, 66, 70, -22 + -18, 2, -18, -17, -18, -4, -18, 10, -18, 22, + 8, -18, 18, -18, 39, -18, -18, -18, -18, -18, + -18, -18, -18, -18, -18, -18, 25, 21, -18, -18, + -18, 16, 14, -18, -18, 28, 36, 41, -5, -18, + -18, 5, -18, -18, -18, 47, -18, -18, 42, 46, + 48, -18, -6, 40, 43, 44, 49, -18, -18, -18, + -18, -18, -18, -18, -18, 50, -18, 51, 55, 57, + 58, 65, -18, -18, 59, 54, -18, 62, 63, 60, + -18, 64, 61, 66, -18 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -682,29 +682,29 @@ static const yytype_int8 yypact[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 2, 0, 1, 21, 20, 0, 54, 0, 52, 55, - 19, 34, 28, 53, 0, 50, 51, 3, 4, 5, - 8, 6, 7, 10, 11, 9, 44, 0, 49, 12, - 22, 31, 0, 23, 13, 33, 0, 0, 0, 46, - 18, 0, 41, 25, 36, 0, 47, 43, 0, 0, - 0, 35, 56, 0, 0, 26, 0, 39, 37, 48, - 24, 45, 32, 42, 57, 0, 0, 14, 0, 0, - 0, 0, 56, 15, 29, 30, 27, 0, 0, 16, - 0, 0, 17, 0, 40, 0, 0, 0, 38 + 2, 0, 1, 20, 18, 0, 53, 0, 51, 54, + 17, 33, 27, 52, 0, 49, 50, 3, 4, 5, + 8, 6, 7, 10, 11, 9, 43, 0, 48, 12, + 21, 30, 0, 22, 13, 32, 0, 0, 0, 45, + 16, 0, 40, 24, 35, 0, 46, 42, 19, 0, + 0, 34, 55, 25, 0, 0, 0, 38, 36, 47, + 23, 44, 31, 41, 56, 0, 14, 0, 0, 0, + 0, 55, 26, 28, 29, 0, 15, 0, 0, 0, + 39, 0, 0, 0, 37 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { - -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, - -22, -22, -22, -9, -22, 4 + -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, + -18, -18, -18, -9, -18, 7 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { -1, 1, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 67 + 25, 26, 27, 28, 29, 66 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -712,28 +712,28 @@ static const yytype_int8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 39, 30, 2, 53, 64, 46, 3, 4, 54, 31, - 5, 6, 7, 8, 32, 9, 10, 11, 78, 12, - 13, 14, 41, 15, 64, 42, 33, 16, 56, 34, - 35, 6, 57, 8, 40, 47, 59, 65, 66, 61, - 13, 48, 36, 37, 43, 38, 49, 60, 44, 6, - 50, 8, 6, 45, 8, 51, 58, 6, 13, 8, - 52, 13, 55, 62, 63, 68, 13, 69, 70, 72, - 73, 74, 71, 75, 76, 77, 79, 80, 82, 81, - 83, 84, 86, 88, 85, 0, 87 + 39, 64, 2, 54, 30, 46, 3, 4, 55, 31, + 5, 6, 7, 8, 65, 9, 10, 11, 56, 12, + 13, 14, 57, 32, 40, 15, 33, 16, 47, 34, + 35, 6, 41, 8, 48, 42, 59, 49, 50, 61, + 13, 51, 36, 43, 37, 38, 60, 44, 6, 52, + 8, 6, 45, 8, 53, 58, 6, 13, 8, 62, + 13, 63, 67, 71, 72, 13, 68, 69, 73, 70, + 74, 75, 64, 77, 78, 79, 80, 82, 76, 84, + 81, 83 }; -static const yytype_int8 yycheck[] = +static const yytype_uint8 yycheck[] = { - 9, 22, 0, 8, 7, 14, 4, 5, 13, 13, - 8, 9, 10, 11, 13, 13, 14, 15, 21, 17, - 18, 19, 14, 21, 7, 17, 4, 25, 13, 7, - 8, 9, 17, 11, 16, 3, 45, 20, 21, 48, - 18, 13, 20, 21, 4, 23, 22, 4, 8, 9, - 24, 11, 9, 13, 11, 13, 8, 9, 18, 11, - 13, 18, 13, 13, 13, 21, 18, 21, 23, 13, - 13, 13, 20, 13, 13, 13, 72, 14, 13, 20, - 13, 13, 13, 13, 20, -1, 20 + 9, 7, 0, 8, 21, 14, 4, 5, 13, 13, + 8, 9, 10, 11, 20, 13, 14, 15, 13, 17, + 18, 19, 17, 13, 16, 23, 4, 25, 3, 7, + 8, 9, 14, 11, 13, 17, 45, 21, 24, 48, + 18, 13, 20, 4, 22, 23, 4, 8, 9, 13, + 11, 9, 13, 11, 13, 8, 9, 18, 11, 13, + 18, 13, 22, 13, 13, 18, 23, 23, 13, 20, + 13, 13, 7, 14, 20, 13, 13, 13, 71, 13, + 20, 20 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -741,36 +741,36 @@ static const yytype_int8 yycheck[] = static const yytype_uint8 yystos[] = { 0, 27, 0, 4, 5, 8, 9, 10, 11, 13, - 14, 15, 17, 18, 19, 21, 25, 28, 29, 30, + 14, 15, 17, 18, 19, 23, 25, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 22, 13, 13, 4, 7, 8, 20, 21, 23, 39, - 16, 14, 17, 4, 8, 13, 39, 3, 13, 22, - 24, 13, 13, 8, 13, 13, 13, 17, 8, 39, - 4, 39, 13, 13, 7, 20, 21, 41, 21, 21, - 23, 20, 13, 13, 13, 13, 13, 13, 21, 41, - 14, 20, 13, 13, 13, 20, 13, 20, 13 + 21, 13, 13, 4, 7, 8, 20, 22, 23, 39, + 16, 14, 17, 4, 8, 13, 39, 3, 13, 21, + 24, 13, 13, 13, 8, 13, 13, 17, 8, 39, + 4, 39, 13, 13, 7, 20, 41, 22, 23, 23, + 20, 13, 13, 13, 13, 13, 41, 14, 20, 13, + 13, 20, 13, 20, 13 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { 0, 26, 27, 27, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 29, 29, 29, 29, 29, 30, 30, - 30, 31, 31, 31, 31, 31, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 33, 33, 34, 34, - 34, 34, 35, 36, 36, 37, 37, 37, 37, 37, - 38, 38, 39, 39, 39, 40, 41, 41 + 28, 28, 28, 29, 29, 29, 30, 30, 30, 30, + 31, 31, 31, 31, 31, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 33, 33, 34, 34, 34, + 34, 35, 36, 36, 37, 37, 37, 37, 37, 38, + 38, 39, 39, 39, 40, 41, 41 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 0, 2, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 2, 4, 5, 6, 7, 2, 1, - 1, 1, 2, 2, 3, 2, 3, 5, 1, 5, - 5, 2, 4, 2, 1, 3, 2, 3, 11, 3, - 7, 2, 4, 2, 1, 3, 2, 2, 3, 1, - 1, 1, 1, 1, 1, 1, 0, 1 + 1, 1, 1, 2, 4, 6, 2, 1, 1, 2, + 1, 2, 2, 3, 2, 3, 5, 1, 5, 5, + 2, 4, 2, 1, 3, 2, 3, 11, 3, 7, + 2, 4, 2, 1, 3, 2, 2, 3, 1, 1, + 1, 1, 1, 1, 1, 0, 1 }; @@ -1641,12 +1641,10 @@ yyreduce: case 15: { - yyHour = (yyvsp[-4].Number); - yyMinutes = (yyvsp[-2].Number); - yyMeridian = MER24; - yyDSTmode = DSToff; - yyTimezone = ((yyvsp[0].Number) % 100 + ((yyvsp[0].Number) / 100) * 60); - ++yyHaveZone; + yyHour = (yyvsp[-5].Number); + yyMinutes = (yyvsp[-3].Number); + yySeconds = (yyvsp[-1].Number); + yyMeridian = (yyvsp[0].Meridian); } break; @@ -1654,10 +1652,9 @@ yyreduce: case 16: { - yyHour = (yyvsp[-5].Number); - yyMinutes = (yyvsp[-3].Number); - yySeconds = (yyvsp[-1].Number); - yyMeridian = (yyvsp[0].Meridian); + yyTimezone = (yyvsp[-1].Number); + if (yyTimezone > HOUR( 12)) yyTimezone -= HOUR(100); + yyDSTmode = DSTon; } break; @@ -1665,13 +1662,9 @@ yyreduce: case 17: { - yyHour = (yyvsp[-6].Number); - yyMinutes = (yyvsp[-4].Number); - yySeconds = (yyvsp[-2].Number); - yyMeridian = MER24; + yyTimezone = (yyvsp[0].Number); + if (yyTimezone > HOUR( 12)) yyTimezone -= HOUR(100); yyDSTmode = DSToff; - yyTimezone = ((yyvsp[0].Number) % 100 + ((yyvsp[0].Number) / 100) * 60); - ++yyHaveZone; } break; @@ -1679,8 +1672,7 @@ yyreduce: case 18: { - yyTimezone = (yyvsp[-1].Number); - if (yyTimezone > HOUR( 12)) yyTimezone -= HOUR(100); + yyTimezone = (yyvsp[0].Number); yyDSTmode = DSTon; } @@ -1689,8 +1681,7 @@ yyreduce: case 19: { - yyTimezone = (yyvsp[0].Number); - if (yyTimezone > HOUR( 12)) yyTimezone -= HOUR(100); + yyTimezone = -(yyvsp[-1].Number)*((yyvsp[0].Number) % 100 + ((yyvsp[0].Number) / 100) * 60); yyDSTmode = DSToff; } @@ -1699,22 +1690,13 @@ yyreduce: case 20: { - yyTimezone = (yyvsp[0].Number); - yyDSTmode = DSTon; - } - - break; - - case 21: - - { yyDayOrdinal = 1; yyDayNumber = (yyvsp[0].Number); } break; - case 22: + case 21: { yyDayOrdinal = 1; @@ -1723,7 +1705,7 @@ yyreduce: break; - case 23: + case 22: { yyDayOrdinal = (yyvsp[-1].Number); @@ -1732,7 +1714,7 @@ yyreduce: break; - case 24: + case 23: { yyDayOrdinal = (yyvsp[-2].Number) * (yyvsp[-1].Number); @@ -1741,7 +1723,7 @@ yyreduce: break; - case 25: + case 24: { yyDayOrdinal = 2; @@ -1750,7 +1732,7 @@ yyreduce: break; - case 26: + case 25: { yyMonth = (yyvsp[-2].Number); @@ -1759,7 +1741,7 @@ yyreduce: break; - case 27: + case 26: { yyMonth = (yyvsp[-4].Number); @@ -1769,7 +1751,7 @@ yyreduce: break; - case 28: + case 27: { yyYear = (yyvsp[0].Number) / 10000; @@ -1779,7 +1761,7 @@ yyreduce: break; - case 29: + case 28: { yyDay = (yyvsp[-4].Number); @@ -1789,7 +1771,7 @@ yyreduce: break; - case 30: + case 29: { yyMonth = (yyvsp[-2].Number); @@ -1799,7 +1781,7 @@ yyreduce: break; - case 31: + case 30: { yyMonth = (yyvsp[-1].Number); @@ -1808,7 +1790,7 @@ yyreduce: break; - case 32: + case 31: { yyMonth = (yyvsp[-3].Number); @@ -1818,7 +1800,7 @@ yyreduce: break; - case 33: + case 32: { yyMonth = (yyvsp[0].Number); @@ -1827,7 +1809,7 @@ yyreduce: break; - case 34: + case 33: { yyMonth = 1; @@ -1837,7 +1819,7 @@ yyreduce: break; - case 35: + case 34: { yyMonth = (yyvsp[-1].Number); @@ -1847,7 +1829,7 @@ yyreduce: break; - case 36: + case 35: { yyMonthOrdinal = 1; @@ -1856,7 +1838,7 @@ yyreduce: break; - case 37: + case 36: { yyMonthOrdinal = (yyvsp[-1].Number); @@ -1865,7 +1847,7 @@ yyreduce: break; - case 38: + case 37: { if ((yyvsp[-5].Number) != HOUR( 7) + HOUR(100)) YYABORT; @@ -1879,7 +1861,7 @@ yyreduce: break; - case 39: + case 38: { if ((yyvsp[-1].Number) != HOUR( 7) + HOUR(100)) YYABORT; @@ -1893,7 +1875,7 @@ yyreduce: break; - case 40: + case 39: { if ((yyvsp[-5].Number) != HOUR( 7) + HOUR(100)) YYABORT; @@ -1907,7 +1889,7 @@ yyreduce: break; - case 41: + case 40: { yyYear = (yyvsp[-1].Number) / 10000; @@ -1920,7 +1902,7 @@ yyreduce: break; - case 42: + case 41: { /* @@ -1937,7 +1919,7 @@ yyreduce: break; - case 43: + case 42: { yyRelSeconds *= -1; @@ -1947,7 +1929,7 @@ yyreduce: break; - case 45: + case 44: { *yyRelPointer += (yyvsp[-2].Number) * (yyvsp[-1].Number) * (yyvsp[0].Number); @@ -1955,7 +1937,7 @@ yyreduce: break; - case 46: + case 45: { *yyRelPointer += (yyvsp[-1].Number) * (yyvsp[0].Number); @@ -1963,7 +1945,7 @@ yyreduce: break; - case 47: + case 46: { *yyRelPointer += (yyvsp[0].Number); @@ -1971,7 +1953,7 @@ yyreduce: break; - case 48: + case 47: { *yyRelPointer += (yyvsp[-1].Number) * (yyvsp[0].Number); @@ -1979,7 +1961,7 @@ yyreduce: break; - case 49: + case 48: { *yyRelPointer += (yyvsp[0].Number); @@ -1987,7 +1969,7 @@ yyreduce: break; - case 50: + case 49: { (yyval.Number) = -1; @@ -1995,7 +1977,7 @@ yyreduce: break; - case 51: + case 50: { (yyval.Number) = 1; @@ -2003,7 +1985,7 @@ yyreduce: break; - case 52: + case 51: { (yyval.Number) = (yyvsp[0].Number); @@ -2012,7 +1994,7 @@ yyreduce: break; - case 53: + case 52: { (yyval.Number) = (yyvsp[0].Number); @@ -2021,7 +2003,7 @@ yyreduce: break; - case 54: + case 53: { (yyval.Number) = (yyvsp[0].Number); @@ -2030,7 +2012,7 @@ yyreduce: break; - case 55: + case 54: { if (yyHaveTime && yyHaveDate && !yyHaveRel) { @@ -2051,7 +2033,7 @@ yyreduce: break; - case 56: + case 55: { (yyval.Meridian) = MER24; @@ -2059,7 +2041,7 @@ yyreduce: break; - case 57: + case 56: { (yyval.Meridian) = (yyvsp[0].Meridian); diff --git a/generic/tclGetDate.y b/generic/tclGetDate.y index 578f179..86037d6 100644 --- a/generic/tclGetDate.y +++ b/generic/tclGetDate.y @@ -266,29 +266,12 @@ time : tUNUMBER tMERIDIAN { yySeconds = 0; yyMeridian = $4; } - | tUNUMBER ':' tUNUMBER '-' tUNUMBER { - yyHour = $1; - yyMinutes = $3; - yyMeridian = MER24; - yyDSTmode = DSToff; - yyTimezone = ($5 % 100 + ($5 / 100) * 60); - ++yyHaveZone; - } | tUNUMBER ':' tUNUMBER ':' tUNUMBER o_merid { yyHour = $1; yyMinutes = $3; yySeconds = $5; yyMeridian = $6; } - | tUNUMBER ':' tUNUMBER ':' tUNUMBER '-' tUNUMBER { - yyHour = $1; - yyMinutes = $3; - yySeconds = $5; - yyMeridian = MER24; - yyDSTmode = DSToff; - yyTimezone = ($7 % 100 + ($7 / 100) * 60); - ++yyHaveZone; - } ; zone : tZONE tDST { @@ -305,6 +288,10 @@ zone : tZONE tDST { yyTimezone = $1; yyDSTmode = DSTon; } + | sign tUNUMBER { + yyTimezone = -$1*($2 % 100 + ($2 / 100) * 60); + yyDSTmode = DSToff; + } ; day : tDAY { diff --git a/tests/clock.test b/tests/clock.test index f7da08f..a3498e8 100644 --- a/tests/clock.test +++ b/tests/clock.test @@ -254,7 +254,6 @@ proc ::testClock::registry { cmd path key } { return [dict get $reg $path $key] } - # Test some of the basics of [clock format] test clock-1.0 "clock format - wrong # args" { @@ -35635,7 +35634,6 @@ test clock-34.11 {clock scan tests} { set time [clock scan "1/1/37" -gmt true] clock format $time -format {%b %d,%Y %H:%M GMT} -gmt true } {Jan 01,2037 00:00 GMT} - test clock-34.12 {clock scan, relative times} { set time [clock scan "Oct 23, 1992 -1 day"] clock format $time -format {%b %d, %Y} @@ -35664,30 +35662,6 @@ test clock-34.18 {clock scan, ISO 8601 point in time format} { set time [clock scan "19921023T000000"] clock format $time -format {%b %d, %Y %H:%M:%S} } "Oct 23, 1992 00:00:00" -test clock-34.19 {clock scan, ISO 8601 point in time format} { - set time [clock scan "19921023T00:00:00"] - clock format $time -format {%b %d, %Y %H:%M:%S} -} "Oct 23, 1992 00:00:00" -test clock-34.20 {clock scan, ISO 8601 point in time format} { - set time [clock scan "1992-10-23T00:00:00"] - clock format $time -format {%b %d, %Y %H:%M:%S} -} "Oct 23, 1992 00:00:00" -test clock-34.21 {clock scan, ISO 8601 invalid TZ} -body { - set time [clock scan "19921023MST000000"] - clock format $time -format {%b %d, %Y %H:%M:%S} -} -returnCodes error -match glob -result {unable to convert date-time string*} -test clock-34.22 {clock scan, ISO 8601 invalid TZ} -body { - set time [clock scan "19921023M000000"] - clock format $time -format {%b %d, %Y %H:%M:%S} -} -returnCodes error -match glob -result {unable to convert date-time string*} -test clock-34.23 {clock scan, ISO 8601 invalid TZ} -body { - set time [clock scan "1992-10-23M00:00:00"] - clock format $time -format {%b %d, %Y %H:%M:%S} -} -returnCodes error -match glob -result {unable to convert date-time string*} -test clock-34.24 {clock scan, ISO 8601 invalid TZ} -body { - set time [clock scan "1992-10-23MST00:00:00"] - clock format $time -format {%b %d, %Y %H:%M:%S} -} -returnCodes error -match glob -result {unable to convert date-time string*} # CLOCK SCAN REAL TESTS # We use 5am PST, 31-12-1999 as the base for these scans because irrespective @@ -35811,7 +35785,6 @@ test clock-34.43 {last monday in november} { } set res } {1991-11-25 1992-11-30 1993-11-29 1994-11-28 1995-11-27 1996-11-25} - test clock-34.44 {2nd monday in november} { set res {} foreach i {91 92 93 94 95 96} { @@ -35844,38 +35817,95 @@ test clock-34.47 {ago with multiple relative units} { set res [clock scan "2 days 2 hours ago" -base $base] expr {$base - $res} } 180000 - test clock-34.48 {more than one ToD} {*}{ -body {clock scan {10:00 11:00}} -returnCodes error -result {unable to convert date-time string "10:00 11:00": more than one time of day in string} } - test clock-34.49 {more than one date} {*}{ -body {clock scan {1/1/2001 2/2/2002}} -returnCodes error -result {unable to convert date-time string "1/1/2001 2/2/2002": more than one date in string} } - test clock-34.50 {more than one time zone} {*}{ -body {clock scan {10:00 EST CST}} -returnCodes error -result {unable to convert date-time string "10:00 EST CST": more than one time zone in string} } - test clock-34.51 {more than one weekday} {*}{ -body {clock scan {Monday Tuesday}} -returnCodes error -result {unable to convert date-time string "Monday Tuesday": more than one weekday in string} } - test clock-34.52 {more than one ordinal month} {*}{ -body {clock scan {next January next March}} -returnCodes error -result {unable to convert date-time string "next January next March": more than one ordinal month in string} } - - +test clock-34.53 {clock scan, ISO 8601 point in time format} { + set time [clock scan "19921023T00:00:00"] + clock format $time -format {%b %d, %Y %H:%M:%S} +} "Oct 23, 1992 00:00:00" +test clock-34.54 {clock scan, ISO 8601 point in time format} { + set time [clock scan "1992-10-23T00:00:00"] + clock format $time -format {%b %d, %Y %H:%M:%S} +} "Oct 23, 1992 00:00:00" +test clock-34.55 {clock scan, ISO 8601 invalid TZ} -body { + set time [clock scan "19921023MST000000"] + clock format $time -format {%b %d, %Y %H:%M:%S} +} -returnCodes error -match glob -result {unable to convert date-time string*} +test clock-34.56 {clock scan, ISO 8601 invalid TZ} -body { + set time [clock scan "19921023M000000"] + clock format $time -format {%b %d, %Y %H:%M:%S} +} -returnCodes error -match glob -result {unable to convert date-time string*} +test clock-34.57 {clock scan, ISO 8601 invalid TZ} -body { + set time [clock scan "1992-10-23M00:00:00"] + clock format $time -format {%b %d, %Y %H:%M:%S} +} -returnCodes error -match glob -result {unable to convert date-time string*} +test clock-34.58 {clock scan, ISO 8601 invalid TZ} -body { + set time [clock scan "1992-10-23MST00:00:00"] + clock format $time -format {%b %d, %Y %H:%M:%S} +} -returnCodes error -match glob -result {unable to convert date-time string*} +test clock-34.59 {clock scan tests (-TZ)} { + set time [clock scan "31 Jan 14 23:59:59 -0100"] + clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true +} {Feb 01,2014 00:59:59 GMT} +test clock-34.60 {clock scan tests (+TZ)} { + set time [clock scan "31 Jan 14 23:59:59 +0100"] + clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true +} {Jan 31,2014 22:59:59 GMT} +test clock-34.61 {clock scan tests (-TZ)} { + set time [clock scan "23:59:59 -0100" -base 0] + clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true +} {Jan 02,1970 00:59:59 GMT} +test clock-34.62 {clock scan tests (+TZ)} { + set time [clock scan "23:59:59 +0100" -base 0] + clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true +} {Jan 01,1970 22:59:59 GMT} +test clock-34.63 {clock scan tests (TZ)} { + set time [clock scan "Mon, 30 Jun 2014 23:59:59 CEST"] + clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true +} {Jun 30,2014 21:59:59 GMT} +test clock-34.64 {clock scan tests (TZ)} { + set time [clock scan "Fri, 31 Jan 2014 23:59:59 CET"] + clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true +} {Jan 31,2014 22:59:59 GMT} +test clock-34.65 {clock scan tests (relspec, day unit not TZ)} { + set time [clock scan "23:59:59 +15 day" -base 2000000] + clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true +} {Feb 08,1970 22:59:59 GMT} +test clock-34.66 {clock scan tests (relspec, day unit not TZ)} { + set time [clock scan "23:59:59 -15 day" -base 2000000] + clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true +} {Jan 09,1970 22:59:59 GMT} +test clock-34.67 {clock scan tests (merid and TZ)} { + set time [clock scan "10:59 pm CET" -base 2000000] + clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true +} {Jan 24,1970 21:59:00 GMT} +test clock-34.68 {clock scan tests (merid and TZ)} { + set time [clock scan "10:59 pm +0100" -base 2000000] + clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true +} {Jan 24,1970 21:59:00 GMT} # clock seconds test clock-35.1 {clock seconds tests} { @@ -36975,12 +37005,10 @@ test clock-67.2 {Bug d19a30db57} -body { # error, not segfault tcl::clock::GetJulianDayFromEraYearMonthDay {} 2361222 } -returnCodes error -match glob -result * - test clock-67.3 {Bug d19a30db57} -body { # error, not segfault tcl::clock::GetJulianDayFromEraYearWeekDay {} 2361222 } -returnCodes error -match glob -result * - test clock-67.4 {Change format %x output on global locale change [Bug 4a0c163d24]} -setup { package require msgcat set current [msgcat::mclocale] @@ -36992,7 +37020,6 @@ test clock-67.4 {Change format %x output on global locale change [Bug 4a0c163d24 } -cleanup { msgcat::mclocale $current } -result {1 1} - test clock-67.5 {Change scan %x output on global locale change [Bug 4a0c163d24]} -setup { package require msgcat set current [msgcat::mclocale] -- cgit v0.12 From 0fab7463a3318c4fb204e1d463c34ca2616bf201 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 10 Jul 2020 07:26:55 +0000 Subject: Addendum to [60fab362ce]: "Also don't allow surrogates in \U??????". This change was only meant for builds with TCL_UTF_MAX > 3. --- generic/tclParse.c | 2 ++ tests/utf.test | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/generic/tclParse.c b/generic/tclParse.c index 78f3a9e..7a51dae 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -942,9 +942,11 @@ TclParseBackslash( * No hexdigits -> This is just "U". */ result = 'U'; +#if TCL_UTF_MAX > 3 } else if ((result & ~0x7FF) == 0xD800) { /* Upper or lower surrogate, not allowed in this syntax. */ result = 0xFFFD; +#endif } break; case '\n': diff --git a/tests/utf.test b/tests/utf.test index 14b2198..2f5f7f3 100644 --- a/tests/utf.test +++ b/tests/utf.test @@ -78,8 +78,8 @@ test utf-1.11 {Tcl_UniCharToUtf: 3 byte sequence, low surrogate} testbytestring test utf-1.12 {Tcl_UniCharToUtf: 4 byte sequence, high/low surrogate} {pairsTo4bytes testbytestring} { expr {"\uD842\uDC42" eq [testbytestring \xF0\xA0\xA1\x82]} } 1 -test utf-1.13 {Tcl_UniCharToUtf: Invalid surrogate} {Uesc testbytestring} { - expr {"\UD842" eq [testbytestring \xEF\xBF\xBD]} +test utf-1.13 {Tcl_UniCharToUtf: Invalid surrogate} Uesc { + expr {"\UD842" eq "\uD842"} } 1 test utf-2.1 {Tcl_UtfToUniChar: low ascii} { -- cgit v0.12 From a25f4ac082e9ece00bc80d9471f178ea2832a40a Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 10 Jul 2020 08:52:13 +0000 Subject: Fix utf-1.13 testcase for TCL_UTF_MAX>3 --- tests/utf.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/utf.test b/tests/utf.test index 2f5f7f3..b1fafb6 100644 --- a/tests/utf.test +++ b/tests/utf.test @@ -78,7 +78,7 @@ test utf-1.11 {Tcl_UniCharToUtf: 3 byte sequence, low surrogate} testbytestring test utf-1.12 {Tcl_UniCharToUtf: 4 byte sequence, high/low surrogate} {pairsTo4bytes testbytestring} { expr {"\uD842\uDC42" eq [testbytestring \xF0\xA0\xA1\x82]} } 1 -test utf-1.13 {Tcl_UniCharToUtf: Invalid surrogate} Uesc { +test utf-1.13 {Tcl_UniCharToUtf: Invalid surrogate} {Uesc ucs2} { expr {"\UD842" eq "\uD842"} } 1 -- cgit v0.12 From ae39d915c8de190f44a3b6989665dd1e92b07727 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 10 Jul 2020 10:32:00 +0000 Subject: Fix test-cases clock-34.65 and clock-34.66, they seem to be affected by summertime --- tests/clock.test | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/clock.test b/tests/clock.test index a3498e8..d69dd6c 100644 --- a/tests/clock.test +++ b/tests/clock.test @@ -35891,13 +35891,13 @@ test clock-34.64 {clock scan tests (TZ)} { clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true } {Jan 31,2014 22:59:59 GMT} test clock-34.65 {clock scan tests (relspec, day unit not TZ)} { - set time [clock scan "23:59:59 +15 day" -base 2000000] + set time [clock scan "23:59:59 +15 day" -base 2000000 -gmt true] clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true -} {Feb 08,1970 22:59:59 GMT} +} {Feb 08,1970 23:59:59 GMT} test clock-34.66 {clock scan tests (relspec, day unit not TZ)} { - set time [clock scan "23:59:59 -15 day" -base 2000000] + set time [clock scan "23:59:59 -15 day" -base 2000000 -gmt true] clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true -} {Jan 09,1970 22:59:59 GMT} +} {Jan 09,1970 23:59:59 GMT} test clock-34.67 {clock scan tests (merid and TZ)} { set time [clock scan "10:59 pm CET" -base 2000000] clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true -- cgit v0.12 From 2ead5632823207539bb83b296fb903b63ec595ff Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Sat, 11 Jul 2020 16:01:28 +0000 Subject: Fix 4 test-cases, which fail when running from the western hemisphere --- tests/clock.test | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/clock.test b/tests/clock.test index d69dd6c..0dc5caf 100644 --- a/tests/clock.test +++ b/tests/clock.test @@ -35875,11 +35875,11 @@ test clock-34.60 {clock scan tests (+TZ)} { clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true } {Jan 31,2014 22:59:59 GMT} test clock-34.61 {clock scan tests (-TZ)} { - set time [clock scan "23:59:59 -0100" -base 0] + set time [clock scan "23:59:59 -0100" -base 0 -gmt true] clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true } {Jan 02,1970 00:59:59 GMT} test clock-34.62 {clock scan tests (+TZ)} { - set time [clock scan "23:59:59 +0100" -base 0] + set time [clock scan "23:59:59 +0100" -base 0 -gmt true] clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true } {Jan 01,1970 22:59:59 GMT} test clock-34.63 {clock scan tests (TZ)} { @@ -35899,11 +35899,11 @@ test clock-34.66 {clock scan tests (relspec, day unit not TZ)} { clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true } {Jan 09,1970 23:59:59 GMT} test clock-34.67 {clock scan tests (merid and TZ)} { - set time [clock scan "10:59 pm CET" -base 2000000] + set time [clock scan "10:59 pm CET" -base 2000000 -gmt true] clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true } {Jan 24,1970 21:59:00 GMT} test clock-34.68 {clock scan tests (merid and TZ)} { - set time [clock scan "10:59 pm +0100" -base 2000000] + set time [clock scan "10:59 pm +0100" -base 2000000 -gmt true] clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true } {Jan 24,1970 21:59:00 GMT} -- cgit v0.12