From 8e29e517d59f0d04dd2d09c6b8760aa1236a1abf Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 9 Jun 2014 13:10:56 +0100 Subject: fix disc cache size option to be unsigned --- utils/nsoption.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'utils') diff --git a/utils/nsoption.h b/utils/nsoption.h index d111729aa..134223aa5 100644 --- a/utils/nsoption.h +++ b/utils/nsoption.h @@ -308,6 +308,9 @@ int nsoption_snoptionf(char *string, size_t size, enum nsoption_e option, const /** set an integer option in the default table */ #define nsoption_set_int(OPTION, VALUE) nsoptions[NSOPTION_##OPTION].value.i = VALUE +/** set an unsigned integer option in the default table */ +#define nsoption_set_uint(OPTION, VALUE) nsoptions[NSOPTION_##OPTION].value.u = VALUE + /** set a colour option in the default table */ #define nsoption_set_colour(OPTION, VALUE) nsoptions[NSOPTION_##OPTION].value.c = VALUE -- cgit v1.2.3 From 4488c8a2e40f27d25e675429ba3ea89b367d5144 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 9 Jun 2014 18:05:36 +0100 Subject: fallback to old url creation behaviour if the IDNA host parse fails --- test/Makefile | 2 +- test/nsurl.c | 1 + utils/nsurl.c | 81 +++++++++++++++++++++++++++++++++++++++++++---------------- 3 files changed, 61 insertions(+), 23 deletions(-) (limited to 'utils') diff --git a/test/Makefile b/test/Makefile index acf9d4e65..cf0f89724 100644 --- a/test/Makefile +++ b/test/Makefile @@ -22,7 +22,7 @@ urldbtest_SRCS := content/urldb.c utils/url.c utils/utils.c utils/log.c \ urldbtest_CFLAGS := $(shell pkg-config --cflags libwapcaplet libdom) -O2 urldbtest_LDFLAGS := $(shell pkg-config --libs libwapcaplet libdom) -nsurl_SRCS := utils/corestrings.c utils/log.c utils/nsurl.c test/nsurl.c +nsurl_SRCS := utils/corestrings.c utils/log.c utils/nsurl.c utils/idna.c utils/utf8proc.c test/nsurl.c nsurl_CFLAGS := $(shell pkg-config --cflags libwapcaplet libdom) nsurl_LDFLAGS := $(shell pkg-config --libs libwapcaplet libdom) diff --git a/test/nsurl.c b/test/nsurl.c index 3e859d994..20774c41f 100644 --- a/test/nsurl.c +++ b/test/nsurl.c @@ -141,6 +141,7 @@ static const struct test_pairs join_tests[] = { { " / ", "http://a/" }, { " ? ", "http://a/b/c/d;p?" }, { " h ", "http://a/b/c/h" }, + { "http://