#include <config.h>
#include <time.h>
#include <assert.h>
#include <ctype.h>
#include <limits.h>
#include <string.h>
#include <stdbool.h>
Defines | |
#define | match_char(ch1, ch2) if (ch1 != ch2) return NULL |
#define | match_string(cs1, s2) (strncasecmp ((cs1), (s2), strlen (cs1)) ? 0 : ((s2) += strlen (cs1), 1)) |
#define | get_number(from, to, n) |
#define | get_alt_number(from, to, n) |
#define | recursive(new_fmt) |
#define | HERE_D_T_FMT "%a %b %e %H:%M:%S %Y" |
#define | HERE_D_FMT "%m/%d/%y" |
#define | HERE_AM_STR "AM" |
#define | HERE_PM_STR "PM" |
#define | HERE_T_FMT_AMPM "%I:%M:%S %p" |
#define | HERE_T_FMT "%H:%M:%S" |
#define | LOCALE_PARAM |
#define | LOCALE_ARG |
#define | LOCALE_PARAM_DECL |
#define | LOCALE_PARAM_PROTO |
#define | HELPER_LOCALE_ARG |
#define | ISSPACE(Ch) isspace (Ch) |
#define | __isleap(year) ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) |
Enumerations | |
enum | ptime_locale_status { not, loc, raw } |
Functions | |
if (century!=-1) | |
if (era_cnt!=-1) | |
else | if (want_era) |
if (want_xday &&!have_wday) | |
if ((have_uweek||have_wweek)&&have_wday) | |
return (char *) | |
Variables | |
const char * | fmt |
struct tm * | tm |
enum ptime_locale_status * | decided |
int | era_cnt |
LOCALE_PARAM_DECL const char * | rp_backup |
int | cnt |
size_t | val |
int | have_I = is_pm = 0 |
int | is_pm |
int | century = -1 |
int | want_century = 0 |
int | want_era = 0 |
int | have_wday = want_xday = have_yday = have_mon = have_mday = have_uweek = 0 |
int | want_xday |
int | have_yday |
int | have_mon |
int | have_mday |
int | have_uweek |
int | have_wweek = 0 |
int | week_no = 0 |
size_t | num_eras |
struct era_entry * | era = NULL |
#define __isleap | ( | year | ) | ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) |
#define get_alt_number | ( | from, | ||
to, | ||||
n | ||||
) |
/* We don't have the alternate representation. */ \ get_number(from, to, n)
#define get_number | ( | from, | ||
to, | ||||
n | ||||
) |
#define HELPER_LOCALE_ARG |
#define HERE_AM_STR "AM" |
#define HERE_D_FMT "%m/%d/%y" |
#define HERE_D_T_FMT "%a %b %e %H:%M:%S %Y" |
#define HERE_PM_STR "PM" |
#define HERE_T_FMT "%H:%M:%S" |
#define HERE_T_FMT_AMPM "%I:%M:%S %p" |
#define ISSPACE | ( | Ch | ) | isspace (Ch) |
#define LOCALE_ARG |
#define LOCALE_PARAM |
#define LOCALE_PARAM_DECL |
#define LOCALE_PARAM_PROTO |
#define match_char | ( | ch1, | ||
ch2 | ||||
) | if (ch1 != ch2) return NULL |
#define match_string | ( | cs1, | ||
s2 | ||||
) | (strncasecmp ((cs1), (s2), strlen (cs1)) ? 0 : ((s2) += strlen (cs1), 1)) |
#define recursive | ( | new_fmt | ) |
(*(new_fmt) != '\0' \ && (rp = __strptime_internal (rp, (new_fmt), tm, \ decided, era_cnt LOCALE_ARG)) != NULL)
enum ptime_locale_status |
if | ( | want_xday &&! | have_wday | ) |
if | ( | (have_uweek||have_wweek)&& | have_wday | ) |
if | ( | era_cnt! | = -1 |
) |
if | ( | century! | = -1 |
) |
else if | ( | want_era | ) |
return | ( | char * | ) |
century = -1 |
int cnt |
enum ptime_locale_status* decided |
era = NULL |
int era_cnt |
const char* fmt |
int have_mday |
int have_mon |
int have_uweek |
have_wweek = 0 |
int have_yday |
int is_pm |
size_t num_eras |
LOCALE_PARAM_DECL const char* rp_backup |
size_t val |
want_century = 0 |
want_era = 0 |
int want_xday |
week_no = 0 |