From 9dc28fda17654fa9733c91fe30226959cf04c813 Mon Sep 17 00:00:00 2001 From: naddy Date: Sat, 29 Sep 2001 14:57:52 +0000 Subject: [PATCH] - Handle URLs with abbreviated scheme correctly. Submitted by d@, actual patch taken from m17n flavor. - Bump package revisions. --- www/w3m/Makefile | 8 ++++---- www/w3m/patches/base-url_c | 23 +++++++++++++++++++++++ 2 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 www/w3m/patches/base-url_c diff --git a/www/w3m/Makefile b/www/w3m/Makefile index 3f81d892fdf..73d2bdb8801 100644 --- a/www/w3m/Makefile +++ b/www/w3m/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.25 2001/09/29 11:41:03 naddy Exp $ +# $OpenBSD: Makefile,v 1.26 2001/09/29 14:57:52 naddy Exp $ ONLY_FOR_ARCHS= i386 sparc m68k @@ -14,7 +14,7 @@ V_IMG= 1.10 V_M17N= 0.19 DISTNAME= w3m-${V_BASE} -PKGNAME= ${DISTNAME}p2 +PKGNAME= ${DISTNAME}p3 CATEGORIES= www NEED_VERSION= 1.427 HOMEPAGE= http://ei5nazha.yz.yamagata-u.ac.jp/~aito/w3m/eng/ @@ -59,11 +59,11 @@ ERRORS+= "Fatal: Flavors 'image' and 'm17n' are mutually exclusive." .if ${FLAVOR:L:Mimage} -PKGNAME= ${DISTNAME}.${V_IMG} +PKGNAME= ${DISTNAME}.${V_IMG}p1 PATCHFILES= ${IMG_PATCH} HOMEPAGE= http://www2u.biglobe.ne.jp/~hsaka/w3m/ DOCS+= README.img -PATCH_LIST+= base-mimehead_c +PATCH_LIST+= base-mimehead_c base-url_c LIB_DEPENDS+= Imlib.19::graphics/imlib .elif ${FLAVOR:L:Mm17n} diff --git a/www/w3m/patches/base-url_c b/www/w3m/patches/base-url_c new file mode 100644 index 00000000000..742cdda3590 --- /dev/null +++ b/www/w3m/patches/base-url_c @@ -0,0 +1,23 @@ +$OpenBSD: base-url_c,v 1.1 2001/09/29 14:57:52 naddy Exp $ +--- url.c.orig Sat Sep 29 16:06:06 2001 ++++ url.c Sat Sep 29 16:07:08 2001 +@@ -605,6 +605,19 @@ parseURL(char *url, ParsedURL * p_url, P + else + p_url->scheme = SCM_LOCAL; + p = url; ++ if (!strncmp(p,"//",2)) { ++ /* URL begins with // */ ++ /* it means that 'scheme:' is abbreviated */ ++#ifdef CYGWIN ++ /* in CYGWIN, '//C/' doesn't means 'http://C/' */ ++ if (IS_ALPHA(p[2]) && p[3] == '/') { ++ p_url->scheme = SCM_LOCAL; ++ goto analyze_file; ++ } ++#endif /* CYGWIN */ ++ p += 2; ++ goto analyze_url; ++ } + goto analyze_file; + } + /* get host and port */