mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] ChangeLog: Removed an excess conflict marker. Reformatted the entry by
Philipp Thomas from 2001-03-09. ftp-ls.c (ftp_parse_winnt_ls): Ensure that adjusted PM hours lay between 0 and 23. Elminate unused variable `sec'.
This commit is contained in:
parent
26547d3987
commit
55587bdee2
@ -1,3 +1,11 @@
|
||||
2001-04-08 Jan Prikryl <prikryl@cg.tuwien.ac.at>
|
||||
|
||||
* ChangeLog: Removed an excess conflict marker. Reformatted the
|
||||
entry by Philipp Thomas from 2001-03-09.
|
||||
|
||||
* ftp-ls.c (ftp_parse_winnt_ls): Ensure that adjusted PM hours lay
|
||||
between 0 and 23. Elminate unused variable `sec'.
|
||||
|
||||
2001-04-08 Hrvoje Niksic <hniksic@arsdigita.com>
|
||||
|
||||
* hash.c (hash_table_count): New function.
|
||||
@ -38,7 +46,6 @@
|
||||
username was present, but the URL did not contain a slash, e.g.
|
||||
http://foo:bar@myhost.
|
||||
|
||||
>>>>>>> 1.148
|
||||
2001-04-03 KOJIMA Hajime <kjm@rins.ryukoku.ac.jp>
|
||||
|
||||
* http.c (http_atotm): Use %A instead of %a to match full
|
||||
@ -134,33 +141,54 @@
|
||||
|
||||
2001-03-09 Philipp Thomas <pthomas@suse.de>
|
||||
|
||||
* safe-ctype.h: New file. Locale independent ctype.h
|
||||
replacement taken from libiberty.
|
||||
safe-ctype.c: New file. Tables for above.
|
||||
Makefile.in: Add safe-ctype$o to OBJS.
|
||||
Add dependencies for safe-ctype$o.
|
||||
cmpt.c: Remove include of ctype.h. Use ISSPACE instead
|
||||
of isspace.
|
||||
ftp-basic.c: Don't include ctype.h.
|
||||
ftp-ls.c: Likewise.
|
||||
ftp.c: Likewise.
|
||||
headers.c: Likewise.
|
||||
host.c: Likewise.
|
||||
html-parse.c: Likewise.
|
||||
html-url.c: Likewise.
|
||||
http.c: Likewise.
|
||||
init.c: Likewise.
|
||||
main.c: Likewise. Set LC_CTYPE along with LC_MESSAGES.
|
||||
netrc.c: Likewise.
|
||||
recur.c: Likewise.
|
||||
retr.c: Likewise.
|
||||
snprintf.c: Replace ctype.h with safe-ctype.h. Use
|
||||
ISDIGIT instead of isdigit.
|
||||
sysdep.h: Remove defines of ctype macros as they aren't
|
||||
needed for safe-ctype-h.
|
||||
url.c: Don't include ctype.h.
|
||||
utils.c: Likewise.
|
||||
wget.h: Include safe-ctype.h.
|
||||
* safe-ctype.h: New file. Locale independent ctype.h replacement
|
||||
taken from libiberty.
|
||||
|
||||
* safe-ctype.c: New file. Tables for above.
|
||||
|
||||
* Makefile.in: Add safe-ctype$o to OBJS. Add dependencies for
|
||||
safe-ctype$o.
|
||||
|
||||
* cmpt.c: Remove include of ctype.h. Use ISSPACE instead of
|
||||
isspace.
|
||||
|
||||
* ftp-basic.c: Don't include ctype.h.
|
||||
|
||||
* ftp-ls.c: Likewise.
|
||||
|
||||
* ftp.c: Likewise.
|
||||
|
||||
* headers.c: Likewise.
|
||||
|
||||
* host.c: Likewise.
|
||||
|
||||
* html-parse.c: Likewise.
|
||||
|
||||
* html-url.c: Likewise.
|
||||
|
||||
* http.c: Likewise.
|
||||
|
||||
* init.c: Likewise.
|
||||
|
||||
* main.c: Likewise. Set LC_CTYPE along with LC_MESSAGES.
|
||||
|
||||
* netrc.c: Likewise.
|
||||
|
||||
* recur.c: Likewise.
|
||||
|
||||
* retr.c: Likewise.
|
||||
|
||||
* snprintf.c: Replace ctype.h with safe-ctype.h. Use ISDIGIT
|
||||
instead of isdigit.
|
||||
|
||||
* sysdep.h: Remove defines of ctype macros as they aren't needed
|
||||
for safe-ctype-h.
|
||||
|
||||
* url.c: Don't include ctype.h.
|
||||
|
||||
* utils.c: Likewise.
|
||||
|
||||
* wget.h: Include safe-ctype.h.
|
||||
|
||||
2001-03-27 Dan Harkless <wget@harkless.org>
|
||||
|
||||
|
11
src/ftp-ls.c
11
src/ftp-ls.c
@ -410,7 +410,7 @@ ftp_parse_winnt_ls (const char *file)
|
||||
FILE *fp;
|
||||
int len;
|
||||
int year, month, day; /* for time analysis */
|
||||
int hour, min, sec;
|
||||
int hour, min;
|
||||
struct tm timestruct;
|
||||
|
||||
char *line, *tok; /* tokenizer */
|
||||
@ -450,22 +450,21 @@ ftp_parse_winnt_ls (const char *file)
|
||||
/* Assuming the epoch starting at 1.1.1970 */
|
||||
if (year <= 70) year += 100;
|
||||
|
||||
/* Second column: hh:mm[AP]M */
|
||||
/* Second column: hh:mm[AP]M, listing does not contain value for
|
||||
seconds */
|
||||
tok = strtok(NULL, ":");
|
||||
hour = atoi(tok);
|
||||
tok = strtok(NULL, "M");
|
||||
min = atoi(tok);
|
||||
/* Adjust hour from AM/PM */
|
||||
tok+=2;
|
||||
if (*tok == 'P') hour += 12;
|
||||
/* Listing does not contain value for seconds */
|
||||
sec = 0;
|
||||
if (*tok == 'P') hour = (hour + 12) % 24;
|
||||
|
||||
DEBUGP(("YYYY/MM/DD HH:MM - %d/%02d/%02d %02d:%02d\n",
|
||||
year+1900, month, day, hour, min));
|
||||
|
||||
/* Build the time-stamp (copy & paste from above) */
|
||||
timestruct.tm_sec = sec;
|
||||
timestruct.tm_sec = 0;
|
||||
timestruct.tm_min = min;
|
||||
timestruct.tm_hour = hour;
|
||||
timestruct.tm_mday = day;
|
||||
|
Loading…
Reference in New Issue
Block a user