~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to sql/tzfile.h

  • Committer: Monty Taylor
  • Date: 2008-07-05 18:10:38 UTC
  • mto: This revision was merged to the branch mainline in revision 63.
  • Revision ID: monty@inaugust.com-20080705181038-0ih0nnamu5qrut0y
Fixed prototypes. Cleaned define a little bit.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
 
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
 
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems
5
 
 *
6
 
 *  This program is free software; you can redistribute it and/or modify
7
 
 *  it under the terms of the GNU General Public License as published by
8
 
 *  the Free Software Foundation; either version 2 of the License, or
9
 
 *  (at your option) any later version.
10
 
 *
11
 
 *  This program is distributed in the hope that it will be useful,
12
 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 
 *  GNU General Public License for more details.
15
 
 *
16
 
 *  You should have received a copy of the GNU General Public License
17
 
 *  along with this program; if not, write to the Free Software
18
 
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
 
 */
20
 
 
21
 
/*
 
1
/* Copyright (C) 2004 MySQL AB
 
2
 
 
3
   This program is free software; you can redistribute it and/or modify
 
4
   it under the terms of the GNU General Public License as published by
 
5
   the Free Software Foundation; version 2 of the License.
 
6
 
 
7
   This program is distributed in the hope that it will be useful,
 
8
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
9
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
10
   GNU General Public License for more details.
 
11
 
 
12
   You should have received a copy of the GNU General Public License
 
13
   along with this program; if not, write to the Free Software
 
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
15
 
 
16
/* 
22
17
   This file is based on public domain code from ftp://elsie.ncih.nist.gov/
23
18
   Initial source code is in the public domain, so clarified as of
24
 
   1996-06-05 by Arthur David Olson (arthur_david_olson@nih.gov).
 
19
   1996-06-05 by Arthur David Olson (arthur_david_olson@nih.gov). 
25
20
*/
26
21
 
27
22
/*
39
34
#define TZ_MAGIC        "TZif"
40
35
 
41
36
struct tzhead {
42
 
        unsigned char   tzh_magic[4];           /* TZ_MAGIC */
43
 
        unsigned char   tzh_reserved[16];       /* reserved for future use */
44
 
        unsigned char   tzh_ttisgmtcnt[4];      /* coded number of trans. time flags */
45
 
        unsigned char   tzh_ttisstdcnt[4];      /* coded number of trans. time flags */
46
 
        unsigned char   tzh_leapcnt[4];         /* coded number of leap seconds */
47
 
        unsigned char   tzh_timecnt[4];         /* coded number of transition times */
48
 
        unsigned char   tzh_typecnt[4];         /* coded number of local time types */
49
 
        unsigned char   tzh_charcnt[4];         /* coded number of abbr. chars */
 
37
        uchar   tzh_magic[4];           /* TZ_MAGIC */
 
38
        uchar   tzh_reserved[16];       /* reserved for future use */
 
39
        uchar   tzh_ttisgmtcnt[4];      /* coded number of trans. time flags */
 
40
        uchar   tzh_ttisstdcnt[4];      /* coded number of trans. time flags */
 
41
        uchar   tzh_leapcnt[4];         /* coded number of leap seconds */
 
42
        uchar   tzh_timecnt[4];         /* coded number of transition times */
 
43
        uchar   tzh_typecnt[4];         /* coded number of local time types */
 
44
        uchar   tzh_charcnt[4];         /* coded number of abbr. chars */
50
45
};
51
46
 
52
47
/*
62
57
  tzh_leapcnt repetitions of
63
58
    one (char [4])                      coded leap second transition times
64
59
    one (char [4])                      total correction after above
65
 
  tzh_ttisstdcnt (char)s                indexed by type; if true, transition
66
 
                                        time is standard time, if false,
 
60
  tzh_ttisstdcnt (char)s                indexed by type; if TRUE, transition
 
61
                                        time is standard time, if FALSE,
67
62
                                        transition time is wall clock time
68
63
                                        if absent, transition times are
69
64
                                        assumed to be wall clock time
70
 
  tzh_ttisgmtcnt (char)s                indexed by type; if true, transition
71
 
                                        time is UTC, if false,
 
65
  tzh_ttisgmtcnt (char)s                indexed by type; if TRUE, transition
 
66
                                        time is UTC, if FALSE,
72
67
                                        transition time is local time
73
68
                                        if absent, transition times are
74
69
                                        assumed to be local time