Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
strptime.cc File Reference
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <signal.h>
#include <time.h>
+ Include dependency graph for strptime.cc:

Go to the source code of this file.

Macros

#define __STRPTIME_C__
 

Functions

static int match_string (const char **buf, const char **strs)
 
static int is_leap_year (int year)
 
static int first_day (int year)
 
static void set_week_number_sun (struct tm *timeptr, int wnum)
 
static void set_week_number_mon (struct tm *timeptr, int wnum)
 
static void set_week_number_mon4 (struct tm *timeptr, int wnum)
 
char * strptime (const char *buf, const char *format, struct tm *timeptr)
 

Variables

static const char * abb_weekdays []
 
static const char * full_weekdays []
 
static const char * abb_month []
 
static const char * full_month []
 
static const char * ampm []
 
const int tm_year_base = 1900
 

Macro Definition Documentation

#define __STRPTIME_C__

Definition at line 2 of file strptime.cc.

View newest version in sPHENIX GitHub at line 2 of file strptime.cc

Function Documentation

static int first_day ( int  year)
static

Definition at line 153 of file strptime.cc.

View newest version in sPHENIX GitHub at line 153 of file strptime.cc

References is_leap_year().

Referenced by set_week_number_mon(), set_week_number_mon4(), and set_week_number_sun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int is_leap_year ( int  year)
static

Definition at line 143 of file strptime.cc.

View newest version in sPHENIX GitHub at line 143 of file strptime.cc

Referenced by first_day().

+ Here is the caller graph for this function:

static int match_string ( const char **  buf,
const char **  strs 
)
static

Definition at line 118 of file strptime.cc.

View newest version in sPHENIX GitHub at line 118 of file strptime.cc

References i.

Referenced by strptime().

+ Here is the caller graph for this function:

static void set_week_number_mon ( struct tm *  timeptr,
int  wnum 
)
static

Definition at line 183 of file strptime.cc.

View newest version in sPHENIX GitHub at line 183 of file strptime.cc

References first_day().

Referenced by strptime().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void set_week_number_mon4 ( struct tm *  timeptr,
int  wnum 
)
static

Definition at line 199 of file strptime.cc.

View newest version in sPHENIX GitHub at line 199 of file strptime.cc

References first_day(), if(), and offset.

Referenced by strptime().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void set_week_number_sun ( struct tm *  timeptr,
int  wnum 
)
static

Definition at line 167 of file strptime.cc.

View newest version in sPHENIX GitHub at line 167 of file strptime.cc

References first_day().

Referenced by strptime().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

char* strptime ( const char *  buf,
const char *  format,
struct tm *  timeptr 
)

Definition at line 219 of file strptime.cc.

View newest version in sPHENIX GitHub at line 219 of file strptime.cc

References Acts::PhysicalConstants::c, material_mapping_optimisation::format, match_string(), physmon_simulation::s, set_week_number_mon(), set_week_number_mon4(), set_week_number_sun(), and tm_year_base.

Referenced by PHTimeStamp::set().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

const char* abb_month[]
static
Initial value:
= {
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec",
NULL
}

Definition at line 74 of file strptime.cc.

View newest version in sPHENIX GitHub at line 74 of file strptime.cc

const char* abb_weekdays[]
static
Initial value:
= {
"Sun",
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat",
NULL
}

Definition at line 52 of file strptime.cc.

View newest version in sPHENIX GitHub at line 52 of file strptime.cc

const char* ampm[]
static
Initial value:
= {
"am",
"pm",
NULL
}

Definition at line 106 of file strptime.cc.

View newest version in sPHENIX GitHub at line 106 of file strptime.cc

const char* full_month[]
static
Initial value:
= {
"January",
"February",
"Mars",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December",
NULL,
}

Definition at line 90 of file strptime.cc.

View newest version in sPHENIX GitHub at line 90 of file strptime.cc

const char* full_weekdays[]
static
Initial value:
= {
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
NULL
}

Definition at line 63 of file strptime.cc.

View newest version in sPHENIX GitHub at line 63 of file strptime.cc

const int tm_year_base = 1900

Definition at line 136 of file strptime.cc.

View newest version in sPHENIX GitHub at line 136 of file strptime.cc

Referenced by strptime().