Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
a763fd43
提交
a763fd43
authored
7月 25, 2010
作者:
cypromis
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
more windows endings .....
上级
a5a6d6a6
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
90 行增加
和
90 行删除
+90
-90
timezone.h
libs/spandsp/src/spandsp/private/timezone.h
+90
-90
没有找到文件。
libs/spandsp/src/spandsp/private/timezone.h
浏览文件 @
a763fd43
/*
* SpanDSP - a series of DSP components for telephony
*
* private/timezone.h - Timezone handling for time interpretation
*
* Written by Steve Underwood <steveu@coppice.org>
*
* Copyright (C) 2010 Steve Underwood
*
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 2.1,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#if !defined(_SPANDSP_PRIVATE_TIMEZONE_H_)
#define _SPANDSP_PRIVATE_TIMEZONE_H_
#define TZ_MAX_CHARS 50
/* Maximum number of abbreviation characters */
#define TZ_MAX_LEAPS 50
/* Maximum number of leap second corrections */
#define TZNAME_MAX 255
/* The TZ_MAX_TIMES value below is enough to handle a bit more than a
* year's worth of solar time (corrected daily to the nearest second) or
* 138 years of Pacific Presidential Election time
* (where there are three time zone transitions every fourth year). */
#define TZ_MAX_TIMES 370
#if !defined(NOSOLAR)
#define TZ_MAX_TYPES 256
/* Limited by what (unsigned char)'s can hold */
#else
/* Must be at least 14 for Europe/Riga as of Jan 12 1995,
* as noted by Earl Chew <earl@hpato.aus.hp.com>. */
#define TZ_MAX_TYPES 20
/* Maximum number of local time types */
#endif
#define TZ_BIGGEST(a, b) (((a) > (b)) ? (a) : (b))
/* Time type information */
struct
tz_ttinfo_s
{
int32_t
gmtoff
;
/* UTC offset in seconds */
int
isdst
;
/* Used to set tm_isdst */
int
abbrind
;
/* Abbreviation list index */
int
ttisstd
;
/* TRUE if transition is std time */
int
ttisgmt
;
/* TRUE if transition is UTC */
};
/* Leap second information */
struct
tz_lsinfo_s
{
time_t
trans
;
/* Transition time */
int32_t
corr
;
/* Correction to apply */
};
struct
tz_state_s
{
int
leapcnt
;
int
timecnt
;
int
typecnt
;
int
charcnt
;
time_t
ats
[
TZ_MAX_TIMES
];
uint8_t
types
[
TZ_MAX_TIMES
];
struct
tz_ttinfo_s
ttis
[
TZ_MAX_TYPES
];
char
chars
[
TZ_BIGGEST
(
TZ_MAX_CHARS
+
1
,
(
2
*
(
TZNAME_MAX
+
1
)))];
struct
tz_lsinfo_s
lsis
[
TZ_MAX_LEAPS
];
};
struct
tz_s
{
struct
tz_state_s
state
;
char
lcl_tzname
[
TZNAME_MAX
+
1
];
int
lcl_is_set
;
const
char
*
tzname
[
2
];
};
#endif
/*- End of file ------------------------------------------------------------*/
/*
* SpanDSP - a series of DSP components for telephony
*
* private/timezone.h - Timezone handling for time interpretation
*
* Written by Steve Underwood <steveu@coppice.org>
*
* Copyright (C) 2010 Steve Underwood
*
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 2.1,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#if !defined(_SPANDSP_PRIVATE_TIMEZONE_H_)
#define _SPANDSP_PRIVATE_TIMEZONE_H_
#define TZ_MAX_CHARS 50
/* Maximum number of abbreviation characters */
#define TZ_MAX_LEAPS 50
/* Maximum number of leap second corrections */
#define TZNAME_MAX 255
/* The TZ_MAX_TIMES value below is enough to handle a bit more than a
* year's worth of solar time (corrected daily to the nearest second) or
* 138 years of Pacific Presidential Election time
* (where there are three time zone transitions every fourth year). */
#define TZ_MAX_TIMES 370
#if !defined(NOSOLAR)
#define TZ_MAX_TYPES 256
/* Limited by what (unsigned char)'s can hold */
#else
/* Must be at least 14 for Europe/Riga as of Jan 12 1995,
* as noted by Earl Chew <earl@hpato.aus.hp.com>. */
#define TZ_MAX_TYPES 20
/* Maximum number of local time types */
#endif
#define TZ_BIGGEST(a, b) (((a) > (b)) ? (a) : (b))
/* Time type information */
struct
tz_ttinfo_s
{
int32_t
gmtoff
;
/* UTC offset in seconds */
int
isdst
;
/* Used to set tm_isdst */
int
abbrind
;
/* Abbreviation list index */
int
ttisstd
;
/* TRUE if transition is std time */
int
ttisgmt
;
/* TRUE if transition is UTC */
};
/* Leap second information */
struct
tz_lsinfo_s
{
time_t
trans
;
/* Transition time */
int32_t
corr
;
/* Correction to apply */
};
struct
tz_state_s
{
int
leapcnt
;
int
timecnt
;
int
typecnt
;
int
charcnt
;
time_t
ats
[
TZ_MAX_TIMES
];
uint8_t
types
[
TZ_MAX_TIMES
];
struct
tz_ttinfo_s
ttis
[
TZ_MAX_TYPES
];
char
chars
[
TZ_BIGGEST
(
TZ_MAX_CHARS
+
1
,
(
2
*
(
TZNAME_MAX
+
1
)))];
struct
tz_lsinfo_s
lsis
[
TZ_MAX_LEAPS
];
};
struct
tz_s
{
struct
tz_state_s
state
;
char
lcl_tzname
[
TZNAME_MAX
+
1
];
int
lcl_is_set
;
const
char
*
tzname
[
2
];
};
#endif
/*- End of file ------------------------------------------------------------*/
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论