projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
- better inline docs, part #2 and #3
[m6w6/ext-http]
/
http_date_api.c
diff --git
a/http_date_api.c
b/http_date_api.c
index fc67a89f57b525163aa2b8e9a5a36aa3d7cae2c1..6770c0270edb2dc5efb34fb324b99d0547d89fe1 100644
(file)
--- a/
http_date_api.c
+++ b/
http_date_api.c
@@
-18,13
+18,13
@@
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
-
-#include <ctype.h>
-
#include "php.h"
#include "php.h"
+
#include "php_http.h"
#include "php_http_std_defs.h"
#include "php_http.h"
#include "php_http_std_defs.h"
+#include <ctype.h>
+
static int check_day(char *day, size_t len);
static int check_month(char *month);
static int check_tzone(char *tzone);
static int check_day(char *day, size_t len);
static int check_month(char *month);
static int check_tzone(char *tzone);
@@
-42,7
+42,7
@@
static const char *weekdays[] = {
};
static const char *months[] = {
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
};
static const char *months[] = {
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
- "Jul", "Aug", "Sep", "O
k
t", "Nov", "Dec"
+ "Jul", "Aug", "Sep", "O
c
t", "Nov", "Dec"
};
enum assume_next {
DATE_MDAY,
};
enum assume_next {
DATE_MDAY,
@@
-132,7
+132,7
@@
static int check_month(char *month)
static int check_tzone(char *tzone)
{
static int check_tzone(char *tzone)
{
-
int
i;
+
unsigned
i;
const struct time_zone *check = time_zones;
for (i = 0; i < sizeof(time_zones) / sizeof(time_zones[0]); i++) {
if (!strcmp(tzone, check->name)) {
const struct time_zone *check = time_zones;
for (i = 0; i < sizeof(time_zones) / sizeof(time_zones[0]); i++) {
if (!strcmp(tzone, check->name)) {
@@
-175,7
+175,7
@@
PHP_HTTP_API time_t _http_parse_date(const char *date)
enum assume_next dignext = DATE_MDAY;
const char *indate = date;
enum assume_next dignext = DATE_MDAY;
const char *indate = date;
- int
found = 0,
part = 0; /* max 6 parts */
+ int part = 0; /* max 6 parts */
while (*date && (part < 6)) {
int found = 0;
while (*date && (part < 6)) {
int found = 0;