$B2,ED$G$9!#(B
#undef USE_GOPHER $B$d(B #undef USE_NNTP $B$H$7$?$H$-$K!"4XO"$9$k%3!<%I$,$G(B
$B$-$k$@$1>/$J$/$J$k$h$&$KJQ99$7$F$_$^$7$?!#(B
# $B$A$g$C$H$d$j$9$.$+$J!)(B
-- Tsutomu Okada <okada@furuno.co.jp>--- anchor.c.dist Thu Nov 9 09:42:26 2000 +++ anchor.c Thu Nov 16 17:57:59 2000 @@ -192,6 +192,7 @@ return searchAnchor(buf->name, url); } +#ifdef USE_NNTP static Anchor * _put_anchor_news(Buffer * buf, char *p1, char *p2, int line, int pos) { @@ -205,6 +206,7 @@ } return registerHref(buf, tmp->ptr, NULL, NO_REFERER, line, pos); } +#endif /* USE_GOPHER */ static Anchor * _put_anchor_all(Buffer * buf, char *p1, char *p2, int line, int pos) @@ -334,11 +336,13 @@ return reAnchorAny(buf, re, _put_anchor_all); } +#ifdef USE_NNTP char * reAnchorNews(Buffer * buf, char *re) { return reAnchorAny(buf, re, _put_anchor_news); } +#endif /* USE_NNTP */ #define FIRST_MARKER_SIZE 30 HmarkerList * --- fm.h.dist Thu Nov 9 09:42:31 2000 +++ fm.h Thu Nov 16 17:16:03 2000 @@ -592,10 +592,14 @@ extern KeyList w3mKeyList; global char *HTTP_proxy init(NULL); +#ifdef USE_GOPHER global char *GOPHER_proxy init(NULL); +#endif /* USE_GOPHER */ global char *FTP_proxy init(NULL); global ParsedURL HTTP_proxy_parsed; +#ifdef USE_GOPHER global ParsedURL GOPHER_proxy_parsed; +#endif /* USE_GOPHER */ global ParsedURL FTP_proxy_parsed; global char *NO_proxy init(NULL); global int NOproxy_netaddr init(TRUE); --- main.c.dist Fri Nov 10 15:23:43 2000 +++ main.c Thu Nov 16 17:48:46 2000 @@ -251,6 +251,7 @@ HTTP_proxy = p; parseURL(p, &HTTP_proxy_parsed, NULL); } +#ifdef USE_GOPHER if (!non_null(GOPHER_proxy) && ((p = getenv("GOPHER_PROXY")) || (p = getenv("gopher_proxy")) || @@ -258,6 +259,7 @@ GOPHER_proxy = p; parseURL(p, &GOPHER_proxy_parsed, NULL); } +#endif /* USE_GOPHER */ if (!non_null(FTP_proxy) && ((p = getenv("FTP_PROXY")) || (p = getenv("ftp_proxy")) || @@ -571,8 +573,10 @@ else if (newbuf == NO_BUFFER) continue; switch (newbuf->real_scheme) { +#ifdef USE_NNTP case SCM_NNTP: case SCM_NEWS: +#endif /* USE_NNTP */ case SCM_MAILTO: break; case SCM_LOCAL: --- proto.h.dist Thu Nov 9 09:42:39 2000 +++ proto.h Thu Nov 16 17:57:08 2000 @@ -128,7 +128,9 @@ struct environment *, int, TextList *, int, int); extern void loadHTMLstream(URLFile * f, Buffer * newBuf, FILE * src); extern Buffer *loadHTMLString(char *page); +#ifdef USE_GOPHER extern Buffer *loadGopherDir(URLFile * uf, Buffer * newBuf); +#endif /* USE_GOPHER */ extern Buffer *loadBuffer(URLFile * uf, Buffer * newBuf); extern void saveBuffer(Buffer * buf, FILE * f); extern void saveBufferDelNum(Buffer * buf, FILE * f, int del); @@ -379,7 +381,9 @@ extern Anchor *searchAnchor(AnchorList * al, char *str); extern Anchor *searchURLLabel(Buffer * buf, char *url); extern char *reAnchor(Buffer * buf, char *re); +#ifdef USE_NNTP extern char *reAnchorNews(Buffer * buf, char *re); +#endif /* USE_NNTP */ extern Anchor *closest_next_anchor(AnchorList * a, Anchor * an, int x, int y); extern Anchor *closest_prev_anchor(AnchorList * a, Anchor * an, int x, int y); extern HmarkerList *putHmarker(HmarkerList * ml, int line, int pos, int seq); --- rc.c.dist Thu Nov 9 09:42:39 2000 +++ rc.c Thu Nov 16 17:12:29 2000 @@ -76,7 +76,9 @@ #define CMT_ACTIVE_STYLE "$B8=:_A*Br$5$l$F$$$k%j%s%/$N?'$r;XDj$9$k(B" #define CMT_C_COLOR "$B8=:_A*Br$5$l$F$$$k%j%s%/$N?'(B" #define CMT_HTTP_PROXY "HTTP$B%W%m%-%7(B(URL$B$GF~NO(B)" +#ifdef USE_GOPHER #define CMT_GOPHER_PROXY "GOPHER$B%W%m%-%7(B(URL$B$GF~NO(B)" +#endif /* USE_GOPHER */ #define CMT_FTP_PROXY "FTP$B%W%m%-%7(B(URL$B$GF~NO(B)" #define CMT_NO_PROXY "$B%W%m%-%7$+$i=|30$9$k%I%a%$%s(B" #define CMT_NOPROXY_NETADDR "$B%M%C%H%o!<%/%"%I%l%9$G%W%m%-%7=|30$N%A%'%C%/(B" @@ -157,7 +159,9 @@ #define CMT_C_COLOR "Color of currently active link" #define CMT_BG_COLOR "Color of background" #define CMT_HTTP_PROXY "URL of HTTP proxy host" +#ifdef USE_GOPHER #define CMT_GOPHER_PROXY "URL of GOPHER proxy host" +#endif /* USE_GOPHER */ #define CMT_FTP_PROXY "URL of FTP proxy host" #define CMT_NO_PROXY "Domains for direct access (no proxy)" #define CMT_NOPROXY_NETADDR "Check noproxy by network address" @@ -370,7 +374,9 @@ struct param_ptr params4[] = { {"http_proxy", P_STRING, PI_TEXT, (void *) &HTTP_proxy, CMT_HTTP_PROXY, NULL}, +#ifdef USE_GOPHER {"gopher_proxy", P_STRING, PI_TEXT, (void *) &GOPHER_proxy, CMT_GOPHER_PROXY, NULL}, +#endif /* USE_GOPHER */ {"ftp_proxy", P_STRING, PI_TEXT, (void *) &FTP_proxy, CMT_FTP_PROXY, NULL}, {"no_proxy", P_STRING, PI_TEXT, (void *) &NO_proxy, CMT_NO_PROXY, NULL}, {"noproxy_netaddr", P_INT, PI_ONOFF, (void *) &NOproxy_netaddr, CMT_NOPROXY_NETADDR, NULL}, @@ -869,8 +875,10 @@ { if (non_null(HTTP_proxy)) parseURL(HTTP_proxy, &HTTP_proxy_parsed, NULL); +#ifdef USE_GOPHER if (non_null(GOPHER_proxy)) parseURL(GOPHER_proxy, &GOPHER_proxy_parsed, NULL); +#endif /* USE_GOPHER */ if (non_null(FTP_proxy)) parseURL(FTP_proxy, &FTP_proxy_parsed, NULL); if (non_null(NO_proxy)) --- url.c.dist Thu Nov 9 09:42:44 2000 +++ url.c Thu Nov 16 17:53:45 2000 @@ -148,8 +148,10 @@ case SCM_HTTPS: #endif /* USE_SSL */ return allocStr(HTTP_DEFAULT_FILE, 0); +#ifdef USE_GOPHER case SCM_GOPHER: return allocStr("1", 0); +#endif /* USE_GOPHER */ case SCM_LOCAL: case SCM_LOCAL_CGI: case SCM_FTP: @@ -655,12 +657,14 @@ } q = p; +#ifdef USE_GOPHER if (p_url->scheme == SCM_GOPHER) { if (*q == '/') q++; if (*q && q[0] != '/' && q[1] != '/' && q[2] == '/') q++; } +#endif /* USE_GOPHER */ if (*p == '/') p++; if (*p == '\0') { /* scheme://host[:port]/ */ @@ -668,6 +672,7 @@ p_url->label = NULL; return; } +#ifdef USE_GOPHER if (p_url->scheme == SCM_GOPHER && *p == 'R') { p++; q = tmp; @@ -679,7 +684,9 @@ *q = '\0'; p_url->file = copyPath(tmp, -1, COPYPATH_SPC_IGNORE); } - else { + else +#endif /* USE_GOPHER */ + { char *cgi = strchr(p, '?'); again: while (*p && *p != '#') @@ -780,8 +787,13 @@ pu->host = current->host; } if (pu->file) { - if (pu->scheme != SCM_GOPHER && + if ( +#ifdef USE_GOPHER + pu->scheme != SCM_GOPHER && +#endif /* USE_GOPHER */ +#ifdef USE_NNTP pu->scheme != SCM_NEWS && +#endif /* USE_NNTP */ pu->file[0] != '/' #ifdef __EMX__ && !(pu->scheme == SCM_LOCAL && isalpha(pu->file[0]) && pu->file[1] == ':') @@ -801,11 +813,13 @@ pu->file = allocStr(tmp->ptr, 0); } } +#ifdef USE_GOPHER else if (pu->scheme == SCM_GOPHER && pu->file[0] == '/') { p = pu->file; pu->file = allocStr(p + 1, 0); } +#endif /* USE_GOPHER */ } else if (pu->label) { /* pu has only label */ @@ -839,7 +853,13 @@ pu->file = cleanupName(tmp->ptr); } #endif - else if (pu->scheme != SCM_GOPHER && pu->scheme != SCM_NEWS && + else if ( +#ifdef USE_GOPHER + pu->scheme != SCM_GOPHER && +#endif /* USE_GOPHER */ +#ifdef USE_NNTP + pu->scheme != SCM_NEWS && +#endif /* USE_NNTP */ pu->file[0] == '/') { pu->file = cleanupName(pu->file); } @@ -871,7 +891,10 @@ Strcat_charp(tmp, pu->file); return tmp; } - if (pu->scheme != SCM_NEWS) { +#ifdef USE_NNTP + if (pu->scheme != SCM_NEWS) +#endif /* USE_NNTP */ + { Strcat_charp(tmp, "//"); } if (pu->user) { @@ -887,11 +910,13 @@ Strcat(tmp, Sprintf("%d", pu->port)); } } + if ( +#ifdef USE_NNTP + pu->scheme != SCM_NEWS && +#endif /* USE_NNTP */ #ifdef __EMX__ - if (pu->scheme != SCM_NEWS && (pu->file == NULL || (pu->file[0] != '/' && pu->file[1] != ':'))) #else - if (pu->scheme != SCM_NEWS && (pu->file == NULL || pu->file[0] != '/')) #endif Strcat_char(tmp, '/');
This archive was generated by hypermail 2b29 : Thu Nov 16 2000 - 04:46:35 CST