Commit 308739b3 308739b3b18e764bbb582058d2eb37007820297c by Sergey Poznyakoff

Patches by Sam:

Rename the confusing functions:
	 util_parse_header_date -> util_parse_822_date
	 util_parse_rfc822_date -> util_parse_ctime_date
include <ctype.h>
1 parent 75ec12f1
......@@ -55,6 +55,7 @@
#include <arpa/inet.h>
#include <netdb.h>
#include "getopt.h"
#include <ctype.h>
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
......@@ -210,8 +211,8 @@ extern struct imap4d_command *util_getcommand __P ((char *,
struct imap4d_command []));
extern int util_parse_internal_date0 __P((char *date, time_t *timep, char **endp));
extern int util_parse_internal_date __P((char *date, time_t *timep));
extern int util_parse_header_date __P((char *date, time_t *timep));
extern int util_parse_rfc822_date __P((char *date, time_t *timep));
extern int util_parse_822_date __P((char *date, time_t *timep));
extern int util_parse_ctime_date __P((char *date, time_t *timep));
extern char *util_strcasestr __P((const char *haystack, const char *needle));
#ifdef __cplusplus
......
......@@ -683,7 +683,7 @@ _header_date (struct parsebuf *pb, time_t *timep)
message_get_header (pb->msg, &header);
if (!header_get_value (header, "Date", buffer, sizeof(buffer), NULL)
&& util_parse_header_date (buffer, timep))
&& util_parse_822_date (buffer, timep))
return 0;
return 1;
}
......@@ -797,7 +797,7 @@ cond_before (struct parsebuf *pb)
message_get_envelope (pb->msg, &env);
envelope_date (env, buffer, sizeof (buffer), NULL);
util_parse_rfc822_date (buffer, &mesg_time);
util_parse_ctime_date (buffer, &mesg_time);
_search_push (pb, mesg_time < t);
}
......@@ -882,7 +882,7 @@ cond_on (struct parsebuf *pb)
message_get_envelope (pb->msg, &env);
envelope_date (env, buffer, sizeof (buffer), NULL);
util_parse_rfc822_date (buffer, &mesg_time);
util_parse_ctime_date (buffer, &mesg_time);
_search_push (pb, t <= mesg_time && mesg_time <= t + 86400);
}
......@@ -927,7 +927,7 @@ cond_since (struct parsebuf *pb)
message_get_envelope (pb->msg, &env);
envelope_date (env, buffer, sizeof (buffer), NULL);
util_parse_rfc822_date (buffer, &mesg_time);
util_parse_ctime_date (buffer, &mesg_time);
_search_push (pb, mesg_time >= t);
}
......