mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Make seconds optional in VMS time specification.
Published in <sxs8zl62u9p.fsf@florida.arsdigita.de>.
This commit is contained in:
parent
7d7f01eaa9
commit
a98337f827
@ -1,3 +1,8 @@
|
|||||||
|
2001-04-12 Hrvoje Niksic <hniksic@arsdigita.com>
|
||||||
|
|
||||||
|
* ftp-ls.c (ftp_parse_vms_ls): Make seconds optional in time
|
||||||
|
specification.
|
||||||
|
|
||||||
2001-04-11 Hrvoje Niksic <hniksic@arsdigita.com>
|
2001-04-11 Hrvoje Niksic <hniksic@arsdigita.com>
|
||||||
|
|
||||||
* url.c (parseurl): Don't strip trailing slash when u->dir is "/"
|
* url.c (parseurl): Don't strip trailing slash when u->dir is "/"
|
||||||
|
17
src/ftp-ls.c
17
src/ftp-ls.c
@ -584,6 +584,7 @@ ftp_parse_vms_ls (const char *file)
|
|||||||
/* Line loop to end of file: */
|
/* Line loop to end of file: */
|
||||||
while ((line = read_whole_line (fp)))
|
while ((line = read_whole_line (fp)))
|
||||||
{
|
{
|
||||||
|
char *p;
|
||||||
i = clean_line (line);
|
i = clean_line (line);
|
||||||
if (!i) break;
|
if (!i) break;
|
||||||
|
|
||||||
@ -670,13 +671,17 @@ ftp_parse_vms_ls (const char *file)
|
|||||||
year = atoi(tok)-1900;
|
year = atoi(tok)-1900;
|
||||||
DEBUGP(("date parsed\n"));
|
DEBUGP(("date parsed\n"));
|
||||||
|
|
||||||
/* Fourth/Third column: Time hh:mm:ss */
|
/* Fourth/Third column: Time hh:mm[:ss] */
|
||||||
tok = strtok(NULL, ":");
|
|
||||||
hour = atoi(tok);
|
|
||||||
tok = strtok(NULL, ":");
|
|
||||||
min = atoi(tok);
|
|
||||||
tok = strtok (NULL, " ");
|
tok = strtok (NULL, " ");
|
||||||
sec = atoi(tok);
|
hour = min = sec = 0;
|
||||||
|
p = tok;
|
||||||
|
hour = atoi (p);
|
||||||
|
for (; *p && *p != ':'; ++p);
|
||||||
|
if (*p)
|
||||||
|
min = atoi (++p);
|
||||||
|
for (; *p && *p != ':'; ++p);
|
||||||
|
if (*p)
|
||||||
|
sec = atoi (++p);
|
||||||
|
|
||||||
DEBUGP(("YYYY/MM/DD HH:MM:SS - %d/%02d/%02d %02d:%02d:%02d\n",
|
DEBUGP(("YYYY/MM/DD HH:MM:SS - %d/%02d/%02d %02d:%02d:%02d\n",
|
||||||
year+1900, month, day, hour, min, sec));
|
year+1900, month, day, hour, min, sec));
|
||||||
|
Loading…
Reference in New Issue
Block a user