Navigation

Operators and Keywords

Function List:

C++ API

strptime.c File Reference

#include <config.h>
#include <time.h>
#include <assert.h>
#include <ctype.h>
#include <limits.h>
#include <string.h>
#include <stdbool.h>
Include dependency graph for strptime.c:

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 tmtm
enum ptime_locale_statusdecided
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 Documentation

#define __isleap (   year  )     ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))
#define get_alt_number (   from,
  to,
  n 
)
Value:
/* We don't have the alternate representation.  */                          \
  get_number(from, to, n)
#define get_number (   from,
  to,
  n 
)
Value:
do {                                                                        \
    int __n = n;                                                              \
    val = 0;                                                                  \
    while (*rp == ' ')                                                        \
      ++rp;                                                                   \
    if (*rp < '0' || *rp > '9')                                               \
      return NULL;                                                            \
    do {                                                                      \
      val *= 10;                                                              \
      val += *rp++ - '0';                                                     \
    } while (--__n > 0 && val * 10 <= to && *rp >= '0' && *rp <= '9');        \
    if (val < from || val > to)                                               \
      return NULL;                                                            \
  } while (0)
#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  ) 
Value:
(*(new_fmt) != '\0'                                                         \
   && (rp = __strptime_internal (rp, (new_fmt), tm,                           \
                                 decided, era_cnt LOCALE_ARG)) != NULL)

Enumeration Type Documentation

Enumerator:
not 
loc 
raw 

Function Documentation

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 *   ) 

Variable Documentation

century = -1
int cnt
era = NULL
int era_cnt
const char* fmt
have_I = is_pm = 0
int have_mday
int have_mon
int have_yday
int is_pm
size_t num_eras
LOCALE_PARAM_DECL const char* rp_backup
struct tm* tm
size_t val
want_era = 0
int want_xday
week_no = 0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines