* Nicols Lichtmaier ([EMAIL PROTECTED]) [20010404 09:07]:
That's what 1.7 does.
Yup... I guess I'll port that to 1.6. It's easy to do.
Here's my patch against the WGET_1.6 branch as of today:
src/ChangeLog:
2001-04-04 Philipp Thomas [EMAIL PROTECTED]
* 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.
Index: src/Makefile.in
===
RCS file: /pack/anoncvs/wget/src/Makefile.in,v
retrieving revision 1.2
diff -u -r1.2 Makefile.in
--- src/Makefile.in 2000/11/04 22:49:45 1.2
+++ src/Makefile.in 2001/04/04 13:09:14
@@ -59,7 +59,7 @@
OBJ = $(ALLOCA) cmpt$o connect$o fnmatch$o ftp$o ftp-basic$o \
ftp-ls$o $(OPIE_OBJ) getopt$o headers$o host$o html$o \
http$o init$o log$o main$o $(MD5_OBJ) netrc$o rbuf$o\
- recur$o retr$o snprintf$o url$o utils$o version$o
+ recur$o retr$o snprintf$o url$o utils$o version$o safe-ctype$o
.SUFFIXES:
.SUFFIXES: .c .o ._c ._o
@@ -154,5 +154,6 @@
rbuf$o: config.h wget.h sysdep.h options.h rbuf.h connect.h
recur$o: config.h wget.h sysdep.h options.h url.h recur.h utils.h retr.h rbuf.h ftp.h
fnmatch.h host.h
retr$o: config.h wget.h sysdep.h options.h utils.h retr.h rbuf.h url.h recur.h ftp.h
host.h connect.h
+safe-ctype$o: safe-ctype.h
url$o: config.h wget.h sysdep.h options.h utils.h url.h host.h html.h
utils$o: config.h wget.h sysdep.h options.h utils.h fnmatch.h
Index: src/cmpt.c
===
RCS file: /pack/anoncvs/wget/src/cmpt.c,v
retrieving revision 1.2
diff -u -r1.2 cmpt.c
--- src/cmpt.c 2000/04/12 13:23:34 1.2
+++ src/cmpt.c 2001/04/04 13:09:14
@@ -26,7 +26,6 @@
#else
# include strings.h
#endif /* HAVE_STRING_H */
-#include ctype.h
#include sys/types.h
#ifdef HAVE_UNISTD_H
@@ -657,9 +656,9 @@
{
/* A white space in the format string matches 0 more or white
space in the input string. */
- if (isspace (*fmt))
+ if (ISSPACE (*fmt))
{
- while (isspace (*rp))
+ while (ISSPACE (*rp))
++rp;
++fmt;
continue;
@@ -851,7 +850,7 @@
case 'n':
case 't':
/* Match any white space. */
- while (isspace (*rp))
+ while (ISSPACE (*rp))
++rp;
break;
case 'p':
Index: src/ftp-basic.c
===
RCS file: /pack/anoncvs/wget/src/ftp-basic.c,v
retrieving revision 1.3.2.1
diff -u -r1.3.2.1 ftp-basic.c
--- src/ftp-basic.c 2000/12/17 18:14:29 1.3.2.1
+++ src/ftp-basic.c 2001/04/04 13:09:14
@@ -26,7 +26,6 @@
#else
# include strings.h
#endif
-#include ctype.h
#ifdef HAVE_UNISTD_H
# include unistd.h
#endif
Index: src/ftp-ls.c
===
RCS file: /pack/anoncvs/wget/src/ftp-ls.c,v
retrieving revision 1.2
diff -u -r1.2 ftp-ls.c
--- src/ftp-ls.c2000/11/10 18:01:35 1.2
+++ src/ftp-ls.c2001/04/04 13:09:14
@@ -30,7 +30,6 @@
# include unistd.h
#endif
#include sys/types.h
-#include ctype.h
#include errno.h
#include "wget.h"
Index: src/ftp.c
===
RCS file: /pack/anoncvs/wget/src/ftp.c,v
retrieving revision 1.16.2.5
diff -u -r1.16.2.5 ftp.c
--- src/ftp.c 2000/12/31 03:55:20 1.16.2.5
+++ src/ftp.c 2001/04/04 13:09:14
@@ -26,7 +26,6 @@
#else
# include strings.h
#endif
-#include ctype.h
#ifdef HAVE_UNISTD_H
# include unistd.h
#endif
Index: src/headers.c
===
RCS file: /pack/anoncvs/wget/src/headers.c,v
retrieving revision 1.2
diff -u -r1.2 headers.c
--- src/headers.c 2000/04/12 13:23:34 1.2
+++ src/headers.c 2001/04/04 13:09:14
@@ -26,7 +26,6 @@
#else
# include strings.h
#endif
-#include ctype.h
#include "wget.h"
#include "con