chiark
/
gitweb
/
~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'branchpoint-5.1' into release
[disorder]
/
lib
/
xgetdate.c
diff --git
a/lib/xgetdate.c
b/lib/xgetdate.c
index d3a3862c05725b3d1fd4a609adb40fba70c80bf9..42e2d5cd43ce21514f394deb7411eb8b559fa76c 100644
(file)
--- a/
lib/xgetdate.c
+++ b/
lib/xgetdate.c
@@
-35,6
+35,7
@@
#include <time.h>
#include "dateparse.h"
#include <time.h>
#include "dateparse.h"
+#include "strptime.h"
#define TM_YEAR_BASE 1900
#define TM_YEAR_BASE 1900
@@
-118,14
+119,12
@@
xgetdate_r (const char *string, struct tm *tp,
const char *const *template)
{
const char *line;
const char *const *template)
{
const char *line;
- size_t len;
char *result = NULL;
time_t timer;
struct tm tm;
int mday_ok = 0;
line = NULL;
char *result = NULL;
time_t timer;
struct tm tm;
int mday_ok = 0;
line = NULL;
- len = 0;
while((line = *template++))
{
/* Do the conversion. */
while((line = *template++))
{
/* Do the conversion. */
@@
-134,7
+133,7
@@
xgetdate_r (const char *string, struct tm *tp,
tp->tm_isdst = -1;
tp->tm_gmtoff = 0;
tp->tm_zone = NULL;
tp->tm_isdst = -1;
tp->tm_gmtoff = 0;
tp->tm_zone = NULL;
- result = strptime (string, line, tp);
+ result =
my_
strptime (string, line, tp);
if (result && *result == '\0')
break;
}
if (result && *result == '\0')
break;
}