Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
strptime.c File Reference
#include <ctype.h>
#include <locale.h>
#include <string.h>
#include <time.h>
#include <stdint.h>
+ Include dependency graph for strptime.c:

Macros

#define _ctloc(x)   (_CurrentTimeLocale->x)
 
#define ALT_E   0x01
 
#define ALT_O   0x02
 
#define LEGAL_ALT(x)
 
#define TIME_MAX   INT64_MAX
 

Typedefs

typedef unsigned char u_char
 
typedef unsigned int uint
 
typedef unsigned __int64 uint64_t
 

Functions

static const u_charconv_num (const unsigned char *, int *, uint, uint)
 
static const u_charfind_string (const u_char *, int *, const char *const *, const char *const *, int)
 
char * strptime (const char *buf, const char *fmt, struct tm *tm)
 

Variables

static int TM_YEAR_BASE = 1900
 
static char gmt [] = { "GMT" }
 
static char utc [] = { "UTC" }
 
static const char *const nast [5] = { "EST", "CST", "MST", "PST", "\0\0\0" }
 
static const char *const nadt [5] = { "EDT", "CDT", "MDT", "PDT", "\0\0\0" }
 
static const char *const am_pm [2] = { "am", "pm" }
 
static const char *const day [7] = { "sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday" }
 
static const char *const abday [7] = { "sun", "mon", "tue", "wed", "thu", "fri", "sat" }
 
static const char *const mon [12]
 
static const char *const abmon [12] = { "jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec" }
 

Macro Definition Documentation

◆ _ctloc

#define _ctloc (   x)    (_CurrentTimeLocale->x)

◆ ALT_E

#define ALT_E   0x01

◆ ALT_O

#define ALT_O   0x02

◆ LEGAL_ALT

#define LEGAL_ALT (   x)
Value:
{ \
if(alt_format & ~(x)) return NULL; \
}

◆ TIME_MAX

#define TIME_MAX   INT64_MAX

Typedef Documentation

◆ u_char

typedef unsigned char u_char

◆ uint

typedef unsigned int uint

◆ uint64_t

typedef unsigned __int64 uint64_t

Function Documentation

◆ conv_num()

static const u_char * conv_num ( const unsigned char *  buf,
int *  dest,
uint  llim,
uint  ulim 
)
static

Referenced by strptime().

◆ find_string()

static const u_char * find_string ( const u_char bp,
int *  tgt,
const char *const *  n1,
const char *const *  n2,
int  c 
)
static

Referenced by strptime().

◆ strptime()

char * strptime ( const char *  buf,
const char *  fmt,
struct tm *  tm 
)

Variable Documentation

◆ abday

const char* const abday[7] = { "sun", "mon", "tue", "wed", "thu", "fri", "sat" }
static

Referenced by strptime().

◆ abmon

const char* const abmon[12] = { "jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec" }
static

Referenced by strptime().

◆ am_pm

const char* const am_pm[2] = { "am", "pm" }
static

Referenced by strptime().

◆ day

const char* const day[7] = { "sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday" }
static

◆ gmt

char gmt[] = { "GMT" }
static

Referenced by dt_pdf_finish(), and strptime().

◆ mon

const char* const mon[12]
static
Initial value:
= { "january", "february", "march", "april", "may", "june",
"july", "august", "september", "october", "november", "december" }

Referenced by enter(), and strptime().

◆ nadt

const char* const nadt[5] = { "EDT", "CDT", "MDT", "PDT", "\0\0\0" }
static

Referenced by strptime().

◆ nast

const char* const nast[5] = { "EST", "CST", "MST", "PST", "\0\0\0" }
static

Referenced by strptime().

◆ TM_YEAR_BASE

int TM_YEAR_BASE = 1900
static

Referenced by strptime().

◆ utc

char utc[] = { "UTC" }
static