dhcpd-pools
3.0
ISC dhcpd lease usage analyser
|
#include <config.h>
#include "strftime.h"
#include "time-internal.h"
#include <ctype.h>
#include <time.h>
#include <limits.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
Macros | |
#define | MULTIBYTE_IS_FORMAT_SAFE 1 |
#define | DO_MULTIBYTE (! MULTIBYTE_IS_FORMAT_SAFE) |
#define | FALLTHROUGH ((void) 0) |
#define | CHAR_T char |
#define | UCHAR_T unsigned char |
#define | L_(Str) Str |
#define | NLW(Sym) Sym |
#define | MEMCPY(d, s, n) memcpy (d, s, n) |
#define | STRLEN(s) strlen (s) |
#define | SHR(a, b) |
#define | INT_STRLEN_BOUND(t) ((sizeof (t) * CHAR_BIT - 1) * 146 / 485 + 2) |
#define | TM_YEAR_BASE 1900 |
#define | __isleap(year) ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) |
#define | FPRINTFTIME 0 |
#define | STREAM_OR_CHAR_T CHAR_T |
#define | STRFTIME_ARG(x) x, |
#define | memset_space(P, Len) (memset (P, ' ', Len), (P) += (Len)) |
#define | memset_zero(P, Len) (memset (P, '0', Len), (P) += (Len)) |
#define | advance(P, N) ((P) += (N)) |
#define | add(n, f) |
#define | add1(C) add (1, *p = C) |
#define | cpy(n, s) |
#define | LOCALE_PARAM |
#define | LOCALE_ARG |
#define | HELPER_LOCALE_ARG |
#define | TOUPPER(Ch, L) toupper (Ch) |
#define | TOLOWER(Ch, L) tolower (Ch) |
#define | ISDIGIT(Ch) ((unsigned int) (Ch) - L_('0') <= 9) |
#define | tm_diff ftime_tm_diff |
#define | ISO_WEEK_START_WDAY 1 /* Monday */ |
#define | ISO_WEEK1_WDAY 4 /* Thursday */ |
#define | YDAY_MINIMUM (-366) |
#define | my_strftime strftime |
#define | nl_get_alt_digit _nl_get_alt_digit |
#define | extra_args |
#define | extra_args_spec |
#define | tz 1 |
#define | ns 0 |
#define | DO_NUMBER(d, v) |
#define | DO_SIGNED_NUMBER(d, negative, v) |
#define | DO_TZ_OFFSET(d, mask, v) |
#define | DO_NUMBER_SPACEPAD(d, v) |
Functions | |
static CHAR_T * | memcpy_lowcase (CHAR_T *dest, const CHAR_T *src, size_t len LOCALE_PARAM) |
static CHAR_T * | memcpy_uppcase (CHAR_T *dest, const CHAR_T *src, size_t len LOCALE_PARAM) |
static int | tm_diff (const struct tm *, const struct tm *) |
static int | iso_week_days (int, int) |
static size_t | __strftime_internal (STREAM_OR_CHAR_T *, STRFTIME_ARG(size_t) const CHAR_T *, const struct tm *, bool, bool *extra_args_spec LOCALE_PARAM) |
size_t | my_strftime (STREAM_OR_CHAR_T *s, STRFTIME_ARG(size_t maxsize) const CHAR_T *format, const struct tm *tp extra_args_spec LOCALE_PARAM) |
static size_t | __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG(size_t maxsize) const CHAR_T *format, const struct tm *tp, bool upcase, bool *tzset_called extra_args_spec LOCALE_PARAM) |
#define __isleap | ( | year | ) | ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) |
Referenced by __strftime_internal().
#define add | ( | n, | |
f | |||
) |
Referenced by __strftime_internal().
#define add1 | ( | C | ) | add (1, *p = C) |
Referenced by __strftime_internal().
#define advance | ( | P, | |
N | |||
) | ((P) += (N)) |
#define CHAR_T char |
Referenced by __strftime_internal(), and memcpy_lowcase().
#define cpy | ( | n, | |
s | |||
) |
Referenced by __strftime_internal().
#define DO_MULTIBYTE (! MULTIBYTE_IS_FORMAT_SAFE) |
#define DO_NUMBER | ( | d, | |
v | |||
) |
Referenced by __strftime_internal().
#define DO_NUMBER_SPACEPAD | ( | d, | |
v | |||
) |
Referenced by __strftime_internal().
#define DO_SIGNED_NUMBER | ( | d, | |
negative, | |||
v | |||
) |
Referenced by __strftime_internal().
#define DO_TZ_OFFSET | ( | d, | |
mask, | |||
v | |||
) |
Referenced by __strftime_internal().
#define extra_args |
Referenced by __strftime_internal(), and my_strftime().
#define extra_args_spec |
#define FALLTHROUGH ((void) 0) |
Referenced by __strftime_internal().
#define FPRINTFTIME 0 |
#define HELPER_LOCALE_ARG |
Referenced by __strftime_internal().
#define INT_STRLEN_BOUND | ( | t | ) | ((sizeof (t) * CHAR_BIT - 1) * 146 / 485 + 2) |
Referenced by __strftime_internal().
#define ISDIGIT | ( | Ch | ) | ((unsigned int) (Ch) - L_('0') <= 9) |
Referenced by __strftime_internal().
#define ISO_WEEK1_WDAY 4 /* Thursday */ |
Referenced by iso_week_days().
#define ISO_WEEK_START_WDAY 1 /* Monday */ |
Referenced by iso_week_days().
#define L_ | ( | Str | ) | Str |
Referenced by __strftime_internal().
#define LOCALE_ARG |
Referenced by __strftime_internal(), and my_strftime().
#define LOCALE_PARAM |
Referenced by memcpy_lowcase().
#define MEMCPY | ( | d, | |
s, | |||
n | |||
) | memcpy (d, s, n) |
#define memset_space | ( | P, | |
Len | |||
) | (memset (P, ' ', Len), (P) += (Len)) |
Referenced by __strftime_internal().
#define memset_zero | ( | P, | |
Len | |||
) | (memset (P, '0', Len), (P) += (Len)) |
Referenced by __strftime_internal().
#define MULTIBYTE_IS_FORMAT_SAFE 1 |
#define my_strftime strftime |
Referenced by my_strftime().
#define nl_get_alt_digit _nl_get_alt_digit |
Referenced by __strftime_internal().
#define NLW | ( | Sym | ) | Sym |
Referenced by __strftime_internal().
#define ns 0 |
Referenced by __strftime_internal().
#define SHR | ( | a, | |
b | |||
) |
Referenced by tm_diff().
#define STREAM_OR_CHAR_T CHAR_T |
Referenced by __strftime_internal().
#define STRFTIME_ARG | ( | x | ) | x, |
Referenced by __strftime_internal(), and my_strftime().
#define STRLEN | ( | s | ) | strlen (s) |
Referenced by __strftime_internal().
#define tm_diff ftime_tm_diff |
Referenced by __strftime_internal().
#define TM_YEAR_BASE 1900 |
Referenced by __strftime_internal(), and tm_diff().
#define TOLOWER | ( | Ch, | |
L | |||
) | tolower (Ch) |
Referenced by memcpy_lowcase().
#define TOUPPER | ( | Ch, | |
L | |||
) | toupper (Ch) |
Referenced by memcpy_uppcase().
#define tz 1 |
Referenced by __strftime_internal(), tzalloc(), and tzset().
#define UCHAR_T unsigned char |
Referenced by memcpy_lowcase(), and memcpy_uppcase().
#define YDAY_MINIMUM (-366) |
Referenced by iso_week_days().
|
static |
Referenced by __strftime_internal(), and my_strftime().
|
static |
|
static |
Referenced by __strftime_internal().
|
static |
|
static |
Referenced by memcpy_lowcase().
size_t my_strftime | ( | STREAM_OR_CHAR_T * | s, |
STRFTIME_ARG(size_t maxsize) const CHAR_T * | format, | ||
const struct tm *tp extra_args_spec | LOCALE_PARAM | ||
) |
|
static |