mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
Gnter Knauf fixed getdate.y to remove a few warnings. I removed the
ifdef'ed test we never ever use anyway.
This commit is contained in:
parent
53189fb2d7
commit
7659747e6f
@ -724,7 +724,8 @@ ToHour (int Hours, MERIDIAN Meridian)
|
|||||||
default:
|
default:
|
||||||
abort ();
|
abort ();
|
||||||
}
|
}
|
||||||
/* NOTREACHED */
|
/* NOTREACHED - but make gcc happy! */
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -1078,31 +1079,3 @@ curl_getdate (const char *p, const time_t *now)
|
|||||||
|
|
||||||
return Start;
|
return Start;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined (TEST)
|
|
||||||
|
|
||||||
/* ARGSUSED */
|
|
||||||
int
|
|
||||||
main (int ac, char *av[])
|
|
||||||
{
|
|
||||||
char buff[MAX_BUFF_LEN + 1];
|
|
||||||
time_t d;
|
|
||||||
|
|
||||||
(void) printf ("Enter date, or blank line to exit.\n\t> ");
|
|
||||||
(void) fflush (stdout);
|
|
||||||
|
|
||||||
buff[MAX_BUFF_LEN] = 0;
|
|
||||||
while (fgets (buff, MAX_BUFF_LEN, stdin) && buff[0])
|
|
||||||
{
|
|
||||||
d = curl_getdate (buff, (time_t *) NULL);
|
|
||||||
if (d == -1)
|
|
||||||
(void) printf ("Bad format - couldn't convert.\n");
|
|
||||||
else
|
|
||||||
(void) printf ("%s", ctime (&d));
|
|
||||||
(void) printf ("\t> ");
|
|
||||||
(void) fflush (stdout);
|
|
||||||
}
|
|
||||||
exit (0);
|
|
||||||
/* NOTREACHED */
|
|
||||||
}
|
|
||||||
#endif /* defined (TEST) */
|
|
||||||
|
Loading…
Reference in New Issue
Block a user