Rcpp Version 1.0.9
|
#include <Rcpp.h>
#include <time.h>
#include <Rcpp/exceptions.h>
#include "sys/types.h"
#include "string.h"
#include "limits.h"
#include <errno.h>
#include "stdlib.h"
#include "stdint.h"
#include "stdio.h"
#include "fcntl.h"
#include "float.h"
#include <unistd.h>
Go to the source code of this file.
Classes | |
struct | Rcpp::tzhead |
struct | Rcpp::ttinfo |
struct | Rcpp::lsinfo |
struct | Rcpp::state |
struct | Rcpp::rule |
Namespaces | |
Rcpp | |
Rcpp API. | |
Macros | |
#define | COMPILING_RCPP |
#define | isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0) |
#define | days_in_year(year) (isleap(year) ? 366 : 365) |
#define | _NO_OLDNAMES /* avoid tznames */ |
#define | EOVERFLOW 79 |
#define | TYPE_BIT(type) (sizeof (type) * CHAR_BIT) |
#define | TYPE_SIGNED(type) (((type) -1) < 0) |
#define | TYPE_INTEGRAL(type) (((type) 0.5) != 0.5) |
#define | TWOS_COMPLEMENT(t) ((t) ~ (t) 0 < 0) |
#define | GRANDPARENTED "Local time zone must be set--see zic manual page" |
#define | YEARSPERREPEAT 400 /* years before a Gregorian repeat */ |
#define | AVGSECSPERYEAR 31556952L |
#define | SECSPERREPEAT ((int_fast64_t) YEARSPERREPEAT * (int_fast64_t) AVGSECSPERYEAR) |
#define | SECSPERREPEAT_BITS 34 /* ceil(log2(SECSPERREPEAT)) */ |
#define | is_digit(c) ((unsigned)(c) - '0' <= 9) |
#define | INITIALIZE(x) (x = 0) |
#define | MAXVAL(t, b) |
#define | MINVAL(t, b) ((t) (TYPE_SIGNED(t) ? - TWOS_COMPLEMENT(t) - MAXVAL(t, b) : 0)) |
#define | TZFILE_H |
#define | TZDIR "/usr/local/etc/zoneinfo" /* Time zone object file directory */ |
#define | TZDEFAULT "localtime" |
#define | TZDEFRULES "America/New_York" |
#define | TZ_MAGIC "TZif" |
#define | TZ_MAX_TIMES 1200 |
#define | TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */ |
#define | TZ_MAX_CHARS 100 /* Maximum number of abbreviation characters */ |
#define | TZ_MAX_LEAPS 50 /* Maximum number of leap second corrections */ |
#define | SECSPERMIN 60 |
#define | MINSPERHOUR 60 |
#define | HOURSPERDAY 24 |
#define | DAYSPERWEEK 7 |
#define | DAYSPERNYEAR 365 |
#define | DAYSPERLYEAR 366 |
#define | SECSPERHOUR (SECSPERMIN * MINSPERHOUR) |
#define | SECSPERDAY ((int_fast32_t) SECSPERHOUR * HOURSPERDAY) |
#define | MONSPERYEAR 12 |
#define | TM_SUNDAY 0 |
#define | TM_MONDAY 1 |
#define | TM_TUESDAY 2 |
#define | TM_WEDNESDAY 3 |
#define | TM_THURSDAY 4 |
#define | TM_FRIDAY 5 |
#define | TM_SATURDAY 6 |
#define | TM_JANUARY 0 |
#define | TM_FEBRUARY 1 |
#define | TM_MARCH 2 |
#define | TM_APRIL 3 |
#define | TM_MAY 4 |
#define | TM_JUNE 5 |
#define | TM_JULY 6 |
#define | TM_AUGUST 7 |
#define | TM_SEPTEMBER 8 |
#define | TM_OCTOBER 9 |
#define | TM_NOVEMBER 10 |
#define | TM_DECEMBER 11 |
#define | TM_YEAR_BASE 1900 |
#define | EPOCH_YEAR 1970 |
#define | EPOCH_WDAY TM_THURSDAY |
#define | isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0)) |
#define | isleap_sum(a, b) isleap((a) % 400 + (b) % 400) |
#define | OPEN_MODE O_RDONLY |
#define | TZDEFRULESTRING ",M4.1.0,M10.5.0" |
#define | BIGGEST(a, b) (((a) > (b)) ? (a) : (b)) |
#define | MY_TZNAME_MAX 255 |
#define | JULIAN_DAY 0 /* Jn - Julian day */ |
#define | DAY_OF_YEAR 1 /* n - day of year */ |
#define | MONTH_NTH_DAY_OF_WEEK 2 /* Mm.n.d - month, week, day of week */ |
#define | gmtptr (&gmtmem) |
Functions | |
attribute_hidden double | Rcpp::mktime00 (struct tm &tm) |
static int | Rcpp::tzparse (const char *name, struct state *sp, int lastditch) |
static int | Rcpp::typesequiv (const struct state *sp, int a, int b) |
static const char * | Rcpp::getsecs (const char *strp, int_fast32_t *secsp) |
static const char * | Rcpp::getnum (const char *strp, int *const nump, const int min, const int max) |
static const char * | Rcpp::getrule (const char *strp, struct rule *const rulep) |
static int_fast32_t | Rcpp::transtime (int year, const struct rule *rulep, int_fast32_t offset) |
static struct tm * | Rcpp::timesub (const time_t *timep, int_fast32_t offset, const struct state *sp, struct tm *tmp) |
static int | Rcpp::leaps_thru_end_of (const int y) |
static int | Rcpp::increment_overflow (int *const ip, int j) |
static int | Rcpp::increment_overflow_time (time_t *tp, int_fast32_t j) |
static int_fast32_t | Rcpp::detzcode (const char *const codep) |
static int_fast64_t | Rcpp::detzcode64 (const char *const codep) |
static int | Rcpp::differ_by_repeat (const time_t t1, const time_t t0) |
static const char * | Rcpp::getzname (const char *strp) |
static const char * | Rcpp::getqzname (const char *strp, const int delim) |
static const char * | Rcpp::getoffset (const char *strp, int_fast32_t *const offsetp) |
static int | Rcpp::tzload (const char *name, struct state *const sp, const int doextend) |
static void | Rcpp::gmtload (struct state *const sp) |
static struct tm * | Rcpp::gmtsub (const time_t *const timep, const int_fast32_t offset, struct tm *const tmp) |
attribute_hidden struct tm * | Rcpp::gmtime_ (const time_t *const x) |
Variables | |
static time_t const | Rcpp::time_t_min = MINVAL(time_t, TYPE_BIT(time_t)) |
static time_t const | Rcpp::time_t_max = MAXVAL(time_t, TYPE_BIT(time_t)) |
static const char | Rcpp::gmt [] = "GMT" |
static const int | Rcpp::mon_lengths [2][MONSPERYEAR] |
static const int | Rcpp::year_lengths [2] |
static int | Rcpp::gmt_is_set |
static struct state | Rcpp::gmtmem |
static struct tm | Rcpp::tm |
#define days_in_year | ( | year | ) | (isleap(year) ? 366 : 365) |
#define EPOCH_WDAY TM_THURSDAY |
#define GRANDPARENTED "Local time zone must be set--see zic manual page" |
#define isleap | ( | y | ) | ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0) |
#define isleap | ( | y | ) | (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0)) |
#define MAXVAL | ( | t, | |
b | |||
) |
#define MINVAL | ( | t, | |
b | |||
) | ((t) (TYPE_SIGNED(t) ? - TWOS_COMPLEMENT(t) - MAXVAL(t, b) : 0)) |
#define MONTH_NTH_DAY_OF_WEEK 2 /* Mm.n.d - month, week, day of week */ |
#define SECSPERDAY ((int_fast32_t) SECSPERHOUR * HOURSPERDAY) |
#define SECSPERHOUR (SECSPERMIN * MINSPERHOUR) |
#define SECSPERREPEAT ((int_fast64_t) YEARSPERREPEAT * (int_fast64_t) AVGSECSPERYEAR) |
#define SECSPERREPEAT_BITS 34 /* ceil(log2(SECSPERREPEAT)) */ |
#define TZ_MAX_CHARS 100 /* Maximum number of abbreviation characters */ |
#define TZ_MAX_LEAPS 50 /* Maximum number of leap second corrections */ |
#define TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */ |
#define TZDIR "/usr/local/etc/zoneinfo" /* Time zone object file directory */ |