]> granicus.if.org Git - mutt/commitdiff
- remove the static declaration from parse_date() in parse.c,
authorThomas Roessler <roessler@does-not-exist.org>
Mon, 9 Nov 1998 10:56:29 +0000 (10:56 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Mon, 9 Nov 1998 10:56:29 +0000 (10:56 +0000)
 - rename it to mutt_parse_date()
 - fix a minor bug: the timezone information in an expires-header
   was used to set the timezone of the send time.

(From Byrial Jensen <byrial@post3.tele.dk>.)

parse.c
protos.h

diff --git a/parse.c b/parse.c
index 4c4ed8f67cb6a8cc36cc0e7c33d001e65c2ab329..a76d65bd7a848300217bbefc631aac7bfee628d4 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -644,7 +644,7 @@ TimeZones[] =
  * This routine assumes that `h' has been initialized to 0.  the `timezone'
  * field is optional, defaulting to +0000 if missing.
  */
-static time_t parse_date (char *s, HEADER *h)
+time_t mutt_parse_date (char *s, HEADER *h)
 {
   int count = 0;
   char *t;
@@ -976,14 +976,14 @@ ENVELOPE *mutt_read_rfc822_header (FILE *f, HEADER *hdr, short user_hdrs)
          safe_free((void **)&e->date);
          e->date = safe_strdup(p);
          if (hdr)
-           hdr->date_sent = parse_date (p, hdr);
+           hdr->date_sent = mutt_parse_date (p, hdr);
          matched = 1;
        }
        break;
 
       case 'e':
        if (!strcasecmp ("xpires", line + 1) &&
-           hdr && parse_date (p, hdr) < time (NULL))
+           hdr && mutt_parse_date (p, NULL) < time (NULL))
          hdr->expired = 1;
        break;
 
@@ -1071,7 +1071,7 @@ ENVELOPE *mutt_read_rfc822_header (FILE *f, HEADER *hdr, short user_hdrs)
            char *d = strchr (p, ';');
 
            if (d)
-             hdr->received = parse_date (d + 1, NULL);
+             hdr->received = mutt_parse_date (d + 1, NULL);
          }
        }
        break;
index 72f8c966b94a6ca184c7634b9528c8d38c04ee74..3f33b3ebfd6ec9d7a0aefe711f7b7a1704272bf5 100644 (file)
--- a/protos.h
+++ b/protos.h
@@ -95,6 +95,7 @@ ATTACHPTR **mutt_gen_attach_list (BODY *, ATTACHPTR **, short *, short *, int, i
 time_t mutt_local_tz (void);
 time_t mutt_mktime (struct tm *, int);
 time_t is_from (const char *, char *, size_t);
+time_t mutt_parse_date (char *, HEADER *);
 
 const char *mutt_attach_fmt (
        char *dest,