rfc1123.c File Reference
#include "squid.h"
#include "rfc1123.h"
Include dependency graph for rfc1123.c:

Go to the source code of this file.

Macros

#define RFC850_STRFTIME   "%A, %d-%b-%y %H:%M:%S GMT"
 
#define RFC1123_STRFTIME   "%a, %d %b %Y %H:%M:%S GMT"
 

Functions

static int make_month (const char *s)
 
static int make_num (const char *s)
 
static int tmSaneValues (struct tm *tm)
 
static struct tm * parse_date_elements (const char *day, const char *month, const char *year, const char *aTime, const char *zone)
 
static struct tm * parse_date (const char *str)
 
time_t parse_rfc1123 (const char *str)
 
const char * mkrfc1123 (time_t t)
 

Variables

static const char * month_names [12]
 

Macro Definition Documentation

#define RFC1123_STRFTIME   "%a, %d %b %Y %H:%M:%S GMT"

Definition at line 27 of file rfc1123.c.

Referenced by mkrfc1123().

#define RFC850_STRFTIME   "%A, %d-%b-%y %H:%M:%S GMT"

Definition at line 26 of file rfc1123.c.

Function Documentation

static int make_month ( const char *  s)
static

Definition at line 47 of file rfc1123.c.

References i, month_names, xtolower, and xtoupper.

Referenced by parse_date_elements().

static int make_num ( const char *  s)
static

Definition at line 38 of file rfc1123.c.

Referenced by parse_date_elements().

static struct tm* parse_date ( const char *  str)
static

Definition at line 111 of file rfc1123.c.

References NULL, parse_date_elements(), xisdigit, and xstrncpy().

Referenced by parse_rfc1123().

static struct tm* parse_date_elements ( const char *  day,
const char *  month,
const char *  year,
const char *  aTime,
const char *  zone 
)
static

Definition at line 79 of file rfc1123.c.

References make_month(), make_num(), NULL, and tmSaneValues().

Referenced by parse_date().

time_t parse_rfc1123 ( const char *  str)
static int tmSaneValues ( struct tm *  tm)
static

Definition at line 63 of file rfc1123.c.

Referenced by parse_date_elements().

Variable Documentation

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

Definition at line 32 of file rfc1123.c.

Referenced by make_month().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors