From 249f2fa3ff780be2d40f99517a20ddf661416689 Mon Sep 17 00:00:00 2001 From: Tatsuya Kinoshita Date: Wed, 11 Nov 2020 19:30:35 +0900 Subject: Fix compilation errors when USE_GOPHER and not USE_M17N --- file.c | 18 ++++++++++++++---- proto.h | 7 +++++++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/file.c b/file.c index 268e3f8..30a0308 100644 --- a/file.c +++ b/file.c @@ -7407,8 +7407,13 @@ loadHTMLString(Str page) /* * loadGopherDir: get gopher directory */ +#ifdef USE_M17N Str loadGopherDir(URLFile *uf, ParsedURL *pu, wc_ces * charset) +#else +Str +loadGopherDir0(URLFile *uf, ParsedURL *pu) +#endif { Str volatile tmp; Str lbuf, name, file, host, port, type; @@ -7522,22 +7527,27 @@ loadGopherDir(URLFile *uf, ParsedURL *pu, wc_ces * charset) return tmp; } +#ifdef USE_M17N Str loadGopherSearch(URLFile *uf, ParsedURL *pu, wc_ces * charset) +#else +Str +loadGopherSearch0(URLFile *uf, ParsedURL *pu) +#endif { Str tmp; char *volatile p, *volatile q; MySignalHandler(*volatile prevtrap) (SIGNAL_ARG) = NULL; - tmp = parsedURL2Str(pu); - p = html_quote(tmp->ptr); #ifdef USE_M17N wc_ces doc_charset = DocumentCharset; +#endif + + tmp = parsedURL2Str(pu); + p = html_quote(tmp->ptr); tmp = convertLine(NULL, Strnew_charp(file_unquote(tmp->ptr)), RAW_MODE, charset, doc_charset); -#endif q = html_quote(tmp->ptr); - tmp = Strnew_m_charp("\n\n\n", q, "\n\n\n

Search ", q, "

\n
\n
\n" diff --git a/proto.h b/proto.h index 749a3c0..0c6483d 100644 --- a/proto.h +++ b/proto.h @@ -261,8 +261,15 @@ extern void loadHTMLstream(URLFile *f, Buffer *newBuf, FILE * src, int internal); extern Buffer *loadHTMLString(Str page); #ifdef USE_GOPHER +#ifdef USE_M17N extern Str loadGopherDir(URLFile *uf, ParsedURL *pu, wc_ces * charset); extern Str loadGopherSearch(URLFile *uf, ParsedURL *pu, wc_ces * charset); +#else +extern Str loadGopherDir0(URLFile *uf, ParsedURL *pu); +extern Str loadGopherSearch0(URLFile *uf, ParsedURL *pu); +#define loadGopherDir(uf,pu,charset) loadGopherDir0(uf,pu) +#define loadGopherSearch(uf,pu,charset) loadGopherSearch0(uf,pu) +#endif #endif /* USE_GOPHER */ extern Buffer *loadBuffer(URLFile *uf, Buffer *newBuf); #ifdef USE_IMAGE -- cgit v1.2.3