From 91c91cb5cdc99ce5acf2beda2cc9fd811535e16e Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Wed, 21 Nov 2001 16:29:46 +0000 Subject: [w3m-dev 02479] #ifdef cleanups make -> $(MAKE) --- url.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'url.c') diff --git a/url.c b/url.c index 912235b..68e9d71 100644 --- a/url.c +++ b/url.c @@ -1,4 +1,4 @@ -/* $Id: url.c,v 1.6 2001/11/20 17:49:23 ukai Exp $ */ +/* $Id: url.c,v 1.7 2001/11/21 16:29:47 ukai Exp $ */ #include "fm.h" #include #include @@ -31,8 +31,6 @@ #define write(a,b,c) write_s(a,b,c) #endif /* __WATT32__ */ -#define NOPROXY_NETADDR /* allow IP address for no_proxy */ - #ifdef INET6 /* see rc.c, "dns_order" and dnsorders[] */ int ai_family_order_table[3][3] = @@ -1288,6 +1286,7 @@ openURL(char *url, ParsedURL * pu, ParsedURL * current, char *r; InputStream stream; #endif /* USE_NNTP */ + int extlen = strlen(CGI_EXTENSION); if (ouf) { uf = *ouf; @@ -1362,12 +1361,8 @@ openURL(char *url, ParsedURL * pu, ParsedURL * current, uf.is_cgi = TRUE; uf.scheme = pu->scheme = SCM_LOCAL_CGI; } - else if ((i = strlen(pu->file)) > 4 && -#ifdef __EMX__ - !strncmp(pu->file + i - 4, ".cmd", 4)) -#else - !strncmp(pu->file + i - 4, ".cgi", 4)) -#endif + else if ((i = strlen(pu->file)) > extlen && + !strncmp(pu->file + i - extlen, CGI_EXTENSION, extlen)) { /* lodal CGI: GET */ uf.stream = newFileStream(localcgi_get(pu->real_file, "", @@ -1783,7 +1778,6 @@ check_no_proxy(char *domain) if (domain_match(tl->ptr, domain)) return 1; } -#ifdef NOPROXY_NETADDR if (!NOproxy_netaddr) { return 0; } @@ -1860,7 +1854,6 @@ check_no_proxy(char *domain) } #endif /* INET6 */ } -#endif /* NOPROXY_NETADDR */ return 0; } -- cgit v1.2.3