Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 24a1897

Browse files
committed
Sync our copy of the timezone library with IANA release tzcode2017c.
This is a trivial update containing only cosmetic changes. The point is just to get back to being synced with an official release of tzcode, rather than some ad-hoc point in their commit history, which is where commit 47f849a left it.
1 parent f3ea3e3 commit 24a1897

File tree

5 files changed

+20
-19
lines changed

5 files changed

+20
-19
lines changed

src/timezone/README

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ match properly on the old version.
5050
Time Zone code
5151
==============
5252

53-
The code in this directory is currently synced with tzcode release 2017b.
53+
The code in this directory is currently synced with tzcode release 2017c.
5454
There are many cosmetic (and not so cosmetic) differences from the
5555
original tzcode library, but diffs in the upstream version should usually
5656
be propagated to our version. Here are some notes about that.

src/timezone/localtime.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -802,8 +802,8 @@ transtime(int year, const struct rule *rulep,
802802
{
803803
bool leapyear;
804804
int32 value;
805-
int i,
806-
d,
805+
int i;
806+
int d,
807807
m1,
808808
yy0,
809809
yy1,

src/timezone/strftime.c

+7-8
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,7 @@ static char *_yconv(int, int, bool, bool, char *, const char *);
119119

120120

121121
size_t
122-
pg_strftime(char *s, size_t maxsize, const char *format,
123-
const struct pg_tm *t)
122+
pg_strftime(char *s, size_t maxsize, const char *format, const struct pg_tm *t)
124123
{
125124
char *p;
126125
enum warn warn = IN_NONE;
@@ -228,9 +227,9 @@ _fmt(const char *format, const struct pg_tm *t, char *pt,
228227
case 'k':
229228

230229
/*
231-
* This used to be... _conv(t->tm_hour % 12 ? t->tm_hour
232-
* % 12 : 12, 2, ' '); ...and has been changed to the
233-
* below to match SunOS 4.1.1 and Arnold Robbins' strftime
230+
* This used to be... _conv(t->tm_hour % 12 ? t->tm_hour %
231+
* 12 : 12, 2, ' '); ...and has been changed to the below
232+
* to match SunOS 4.1.1 and Arnold Robbins' strftime
234233
* version 3.0. That is, "%k" and "%l" have been swapped.
235234
* (ado, 1993-05-24)
236235
*/
@@ -248,7 +247,7 @@ _fmt(const char *format, const struct pg_tm *t, char *pt,
248247
case 'l':
249248

250249
/*
251-
* This used to be... _conv(t->tm_hour, 2, ' '); ...and
250+
* This used to be... _conv(t->tm_hour, 2, ' '); ...and
252251
* has been changed to the below to match SunOS 4.1.1 and
253252
* Arnold Robbin's strftime version 3.0. That is, "%k" and
254253
* "%l" have been swapped. (ado, 1993-05-24)
@@ -312,7 +311,7 @@ _fmt(const char *format, const struct pg_tm *t, char *pt,
312311
* (01-53)."
313312
* (ado, 1993-05-24)
314313
*
315-
* From <http://www.ft.uni-erlangen.de/~mskuhn/iso-time.html> by Markus Kuhn:
314+
* From <https://www.cl.cam.ac.uk/~mgk25/iso-time.html> by Markus Kuhn:
316315
* "Week 01 of a year is per definition the first week which has the
317316
* Thursday in this year, which is equivalent to the week which contains
318317
* the fourth day of January. In other words, the first week of a new year
@@ -482,7 +481,7 @@ _fmt(const char *format, const struct pg_tm *t, char *pt,
482481

483482
/*
484483
* X311J/88-090 (4.12.3.5): if conversion char is
485-
* undefined, behavior is undefined. Print out the
484+
* undefined, behavior is undefined. Print out the
486485
* character itself as printf(3) also does.
487486
*/
488487
default:

src/timezone/tzfile.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ struct tzhead
5050
* tzh_timecnt (unsigned char)s types of local time starting at above
5151
* tzh_typecnt repetitions of
5252
* one (char [4]) coded UT offset in seconds
53-
* one (unsigned char) used to set tm_isdst
54-
* one (unsigned char) that's an abbreviation list index
53+
* one (unsigned char) used to set tm_isdst
54+
* one (unsigned char) that's an abbreviation list index
5555
* tzh_charcnt (char)s '\0'-terminated zone abbreviations
5656
* tzh_leapcnt repetitions of
5757
* one (char [4]) coded leap second transition times

src/timezone/zic.c

+8-6
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
#include "private.h"
1818
#include "tzfile.h"
1919

20-
#define ZIC_VERSION_PRE_2013 '2'
21-
#define ZIC_VERSION '3'
20+
#define ZIC_VERSION_PRE_2013 '2'
21+
#define ZIC_VERSION '3'
2222

2323
typedef int64 zic_t;
2424
#define ZIC_MIN PG_INT64_MIN
2525
#define ZIC_MAX PG_INT64_MAX
2626

2727
#ifndef ZIC_MAX_ABBR_LEN_WO_WARN
28-
#define ZIC_MAX_ABBR_LEN_WO_WARN 6
28+
#define ZIC_MAX_ABBR_LEN_WO_WARN 6
2929
#endif /* !defined ZIC_MAX_ABBR_LEN_WO_WARN */
3030

3131
#ifndef WIN32
@@ -473,7 +473,7 @@ static void
473473
verror(const char *string, va_list args)
474474
{
475475
/*
476-
* Match the format of "cc" to allow sh users to zic ... 2>&1 | error -t
476+
* Match the format of "cc" to allow sh users to zic ... 2>&1 | error -t
477477
* "*" -v on BSD systems.
478478
*/
479479
if (filename)
@@ -969,7 +969,7 @@ dolink(char const *fromfield, char const *tofield, bool staysymlink)
969969
}
970970
}
971971

972-
#define TIME_T_BITS_IN_FILE 64
972+
#define TIME_T_BITS_IN_FILE 64
973973

974974
static zic_t const min_time = MINVAL(zic_t, TIME_T_BITS_IN_FILE);
975975
static zic_t const max_time = MAXVAL(zic_t, TIME_T_BITS_IN_FILE);
@@ -984,7 +984,7 @@ static zic_t const max_time = MAXVAL(zic_t, TIME_T_BITS_IN_FILE);
984984
* Ade PAR, Aghanim N, Armitage-Caplan C et al. Planck 2013 results.
985985
* I. Overview of products and scientific results.
986986
* arXiv:1303.5062 2013-03-20 20:10:01 UTC
987-
* <http://arxiv.org/pdf/1303.5062v1> [PDF]
987+
* <https://arxiv.org/pdf/1303.5062v1> [PDF]
988988
*
989989
* Page 36, Table 9, row Age/Gyr, column Planck+WP+highL+BAO 68% limits
990990
* gives the value 13.798 plus-or-minus 0.037 billion years.
@@ -1208,7 +1208,9 @@ infile(const char *name)
12081208
/* nothing to do */
12091209
}
12101210
else if (wantcont)
1211+
{
12111212
wantcont = inzcont(fields, nfields);
1213+
}
12121214
else
12131215
{
12141216
struct lookup const *line_codes

0 commit comments

Comments
 (0)