Skip to content

Commit

Permalink
parsedate: turn private and static
Browse files Browse the repository at this point in the history
I removed the prefix as well accordingly.
  • Loading branch information
bagder committed Jun 3, 2011
1 parent b3740f0 commit a6f14e1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
24 changes: 21 additions & 3 deletions lib/parsedate.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,24 @@ struct tzinfo {
int offset; /* +/- in minutes */
};

/*
* parsedate()
*
* Returns:
*
* PARSEDATE_OK - a fine conversion
* PARSEDATE_FAIL - failed to convert
* PARSEDATE_LATER - time overflow at the far end of time_t
* PARSEDATE_SOONER - time underflow at the low end of time_t
*/

static int parsedate(const char *date, time_t *output);

#define PARSEDATE_OK 0
#define PARSEDATE_FAIL -1
#define PARSEDATE_LATER 1
#define PARSEDATE_SOONER 2

/* Here's a bunch of frequently used time zone names. These were supported
by the old getdate parser. */
#define tDAYZONE -60 /* offset for daylight savings time */
Expand Down Expand Up @@ -302,7 +320,7 @@ static time_t my_timegm(struct my_tm *tm)
}

/*
* Curl_parsedate()
* parsedate()
*
* Returns:
*
Expand All @@ -312,7 +330,7 @@ static time_t my_timegm(struct my_tm *tm)
* PARSEDATE_SOONER - time underflow at the low end of time_t
*/

int Curl_parsedate(const char *date, time_t *output)
static int parsedate(const char *date, time_t *output)
{
time_t t = 0;
int wdaynum=-1; /* day of the week number, 0-6 (mon-sun) */
Expand Down Expand Up @@ -503,7 +521,7 @@ int Curl_parsedate(const char *date, time_t *output)
time_t curl_getdate(const char *p, const time_t *now)
{
time_t parsed;
int rc = Curl_parsedate(p, &parsed);
int rc = parsedate(p, &parsed);
(void)now; /* legacy argument from the past that we ignore */

switch(rc) {
Expand Down
18 changes: 0 additions & 18 deletions lib/parsedate.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,6 @@
extern const char * const Curl_wkday[7];
extern const char * const Curl_month[12];

/*
* Curl_parsedate()
*
* Returns:
*
* PARSEDATE_OK - a fine conversion
* PARSEDATE_FAIL - failed to convert
* PARSEDATE_LATER - time overflow at the far end of time_t
* PARSEDATE_SOONER - time underflow at the low end of time_t
*/

int Curl_parsedate(const char *date, time_t *output);

#define PARSEDATE_OK 0
#define PARSEDATE_FAIL -1
#define PARSEDATE_LATER 1
#define PARSEDATE_SOONER 2

CURLcode Curl_gmtime(time_t intime, struct tm *store);

#endif

0 comments on commit a6f14e1

Please sign in to comment.