aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--anchor.c3
-rw-r--r--buffer.c8
-rw-r--r--cookie.c3
-rw-r--r--display.c5
-rw-r--r--etc.c3
-rw-r--r--file.c34
-rw-r--r--form.c4
-rw-r--r--frame.c6
-rw-r--r--func.c6
-rw-r--r--history.c5
-rw-r--r--istream.c15
-rw-r--r--linein.c5
-rw-r--r--local.c3
-rw-r--r--main.c59
-rw-r--r--url.c4
15 files changed, 145 insertions, 18 deletions
diff --git a/anchor.c b/anchor.c
index 4244d47..5211048 100644
--- a/anchor.c
+++ b/anchor.c
@@ -1,4 +1,4 @@
-/* $Id: anchor.c,v 1.29 2003/09/24 18:48:58 ukai Exp $ */
+/* $Id: anchor.c,v 1.30 2003/09/26 17:59:51 ukai Exp $ */
#include "fm.h"
#include "myctype.h"
#include "regex.h"
@@ -736,6 +736,7 @@ link_list_panel(Buffer *buf)
int i;
char *t, *u, *p;
ParsedURL pu;
+ /* FIXME: gettextize? */
Str tmp = Strnew_charp("<title>Link List</title>\
<h1 align=center>Link List</h1>\n");
diff --git a/buffer.c b/buffer.c
index c2540e0..f258dd6 100644
--- a/buffer.c
+++ b/buffer.c
@@ -1,4 +1,4 @@
-/* $Id: buffer.c,v 1.28 2003/09/22 21:02:16 ukai Exp $ */
+/* $Id: buffer.c,v 1.29 2003/09/26 17:59:51 ukai Exp $ */
#include "fm.h"
#ifdef USE_MOUSE
@@ -207,6 +207,7 @@ writeBufferName(Buffer *buf, int n)
if (all == 0 && buf->lastLine != NULL)
all = buf->lastLine->linenumber;
move(n, 0);
+ /* FIXME: gettextize? */
msg = Sprintf("<%s> [%d lines]", buf->buffername, all);
if (buf->filename != NULL) {
switch (buf->currentURL.scheme) {
@@ -248,6 +249,7 @@ gotoLine(Buffer *buf, int n)
(getNextPage(buf, 1) != NULL)) ;
}
if (l->linenumber > n) {
+ /* FIXME: gettextize? */
sprintf(msg, "First line is #%ld", l->linenumber);
set_delayed_message(msg);
buf->topLine = buf->currentLine = l;
@@ -255,6 +257,7 @@ gotoLine(Buffer *buf, int n)
}
if (buf->lastLine->linenumber < n) {
l = buf->lastLine;
+ /* FIXME: gettextize? */
sprintf(msg, "Last line is #%ld", buf->lastLine->linenumber);
set_delayed_message(msg);
buf->currentLine = l;
@@ -291,6 +294,7 @@ gotoRealLine(Buffer *buf, int n)
(getNextPage(buf, 1) != NULL)) ;
}
if (l->real_linenumber > n) {
+ /* FIXME: gettextize? */
sprintf(msg, "First line is #%ld", l->real_linenumber);
set_delayed_message(msg);
buf->topLine = buf->currentLine = l;
@@ -298,6 +302,7 @@ gotoRealLine(Buffer *buf, int n)
}
if (buf->lastLine->real_linenumber < n) {
l = buf->lastLine;
+ /* FIXME: gettextize? */
sprintf(msg, "Last line is #%ld", buf->lastLine->real_linenumber);
set_delayed_message(msg);
buf->currentLine = l;
@@ -355,6 +360,7 @@ listBuffer(Buffer *top, Buffer *current)
buf = buf->nextBuffer;
}
standout();
+ /* FIXME: gettextize? */
message("Buffer selection mode: SPC for select / D for delete buffer", 0,
0);
standend();
diff --git a/cookie.c b/cookie.c
index 4c8bb47..a273d78 100644
--- a/cookie.c
+++ b/cookie.c
@@ -1,4 +1,4 @@
-/* $Id: cookie.c,v 1.8 2003/01/15 17:13:21 ukai Exp $ */
+/* $Id: cookie.c,v 1.9 2003/09/26 17:59:51 ukai Exp $ */
/*
* References for version 0 cookie:
@@ -537,6 +537,7 @@ initCookie(void)
Buffer *
cookie_list_panel(void)
{
+ /* FIXME: gettextize? */
Str src = Strnew_charp("<html><head><title>Cookies</title></head>"
"<body><center><b>Cookies</b></center>"
"<p><form method=internal action=cookie>");
diff --git a/display.c b/display.c
index 457ebc6..507f22b 100644
--- a/display.c
+++ b/display.c
@@ -1,4 +1,4 @@
-/* $Id: display.c,v 1.67 2003/09/24 18:48:59 ukai Exp $ */
+/* $Id: display.c,v 1.68 2003/09/26 17:59:51 ukai Exp $ */
#include <signal.h>
#include "fm.h"
@@ -334,6 +334,7 @@ make_lastline_message(Buffer *buf)
Strcat(msg, Sprintf("%d/%d (%d%%)", cl, ll, r));
}
else
+ /* FIXME: gettextize? */
Strcat_charp(msg, "Viewing");
#ifdef USE_SSL
if (buf->ssl_certificate)
@@ -475,6 +476,7 @@ displayBuffer(Buffer *buf, int mode)
msg = make_lastline_message(buf);
if (buf->firstLine == NULL) {
+ /* FIXME: gettextize? */
Strcat_charp(msg, "\tNo Line");
}
if (delayed_msg != NULL) {
@@ -1194,6 +1196,7 @@ message_list_panel(void)
Str tmp = Strnew_size(LINES * COLS);
ListItem *p;
+ /* FIXME: gettextize? */
Strcat_charp(tmp,
"<html><head><title>List of error messages</title></head><body>"
"<h1>List of error messages</h1><table cellpadding=0>\n");
diff --git a/etc.c b/etc.c
index 7b56ffa..7adbe6e 100644
--- a/etc.c
+++ b/etc.c
@@ -1,4 +1,4 @@
-/* $Id: etc.c,v 1.73 2003/09/24 18:48:59 ukai Exp $ */
+/* $Id: etc.c,v 1.74 2003/09/26 17:59:51 ukai Exp $ */
#include "fm.h"
#include <pwd.h>
#include "myctype.h"
@@ -1101,6 +1101,7 @@ parsePasswd(FILE * fp, int netrc)
add_auth_pass_entry(&ent, netrc);
}
+/* FIXME: gettextize? */
#define FILE_IS_READABLE_MSG "SECURITY NOTE: file %s must not be accessible by others"
FILE *
diff --git a/file.c b/file.c
index eccd616..7f78558 100644
--- a/file.c
+++ b/file.c
@@ -1,4 +1,4 @@
-/* $Id: file.c,v 1.228 2003/09/24 18:48:59 ukai Exp $ */
+/* $Id: file.c,v 1.229 2003/09/26 17:59:51 ukai Exp $ */
#include "fm.h"
#include <sys/types.h>
#include "myctype.h"
@@ -134,6 +134,7 @@ static int cur_iseq;
#ifdef USE_COOKIE
/* This array should be somewhere else */
+/* FIXME: gettextize? */
char *violations[COO_EMAX] = {
"internal error",
"tail match failed",
@@ -1440,6 +1441,7 @@ getAuthCookie(struct http_auth *hauth, char *auth_header,
if (fmInitialized) {
char *pp;
term_raw();
+ /* FIXME: gettextize? */
if ((pp =
inputStr(Sprintf("Username for %s: ", realm)->ptr,
NULL)) == NULL)
@@ -1461,11 +1463,13 @@ getAuthCookie(struct http_auth *hauth, char *auth_header,
* (This is same behavior as lwp-request.)
*/
if (feof(stdin) || ferror(stdin)) {
+ /* FIXME: gettextize? */
fprintf(stderr, "w3m: Authorization required for %s\n",
realm);
exit(1);
}
+ /* FIXME: gettextize? */
printf(proxy ? "Proxy Username for %s: " : "Username for %s: ",
realm);
fflush(stdout);
@@ -1516,6 +1520,7 @@ checkRedirection(ParsedURL *pu)
return TRUE;
}
if (nredir >= FollowRedirection) {
+ /* FIXME: gettextize? */
tmp = Sprintf("Number of redirections exceeded %d at %s",
FollowRedirection, parsedURL2Str(pu)->ptr);
disp_err_message(tmp->ptr, FALSE);
@@ -1525,6 +1530,7 @@ checkRedirection(ParsedURL *pu)
(same_url_p(pu, &puv[(nredir - 1) % nredir_size]) ||
(!(nredir % 2)
&& same_url_p(pu, &puv[(nredir / 2) % nredir_size])))) {
+ /* FIXME: gettextize? */
tmp = Sprintf("Redirection loop detected (%s)",
parsedURL2Str(pu)->ptr);
disp_err_message(tmp->ptr, FALSE);
@@ -1634,6 +1640,7 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer,
return b;
}
#endif
+ /* FIXME: gettextize? */
disp_err_message(Sprintf("Unknown URI: %s",
parsedURL2Str(&pu)->ptr)->ptr, FALSE);
break;
@@ -1681,6 +1688,7 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer,
if (fmInitialized) {
term_cbreak();
+ /* FIXME: gettextize? */
message(Sprintf("%s contacted. Waiting for reply...", pu.host)->
ptr, 0, 0);
refresh();
@@ -2528,6 +2536,7 @@ flushline(struct html_feed_environ *h_env, struct readbuffer *obuf, int indent,
char *hidden_anchor = NULL, *hidden_img = NULL, *hidden_bold = NULL,
*hidden_under = NULL, *hidden = NULL;
+#ifdef DEBUG
if (w3m_debug) {
FILE *df = fopen("zzzproc1", "a");
fprintf(df, "flushline(%s,%d,%d,%d)\n", obuf->line->ptr, indent, force,
@@ -2540,6 +2549,7 @@ flushline(struct html_feed_environ *h_env, struct readbuffer *obuf, int indent,
}
fclose(df);
}
+#endif
if (!(obuf->flag & (RB_SPECIAL & ~RB_NOBR)) && Strlastchar(line) == ' ') {
Strshrink(line, 1);
@@ -4910,7 +4920,9 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit)
Lineprop mode, effect;
int pos;
int nlines;
+#ifdef DEBUG
FILE *debug = NULL;
+#endif
struct frameset *frameset_s[FRAMESTACK_SIZE];
int frameset_sp = -1;
union frameset_element *idFrame = NULL;
@@ -4946,16 +4958,20 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit)
}
#endif
+#ifdef DEBUG
if (w3m_debug)
debug = fopen("zzzerr", "a");
+#endif
effect = 0;
nlines = 0;
while ((line = feed()) != NULL) {
+#ifdef DEBUG
if (w3m_debug) {
Strfputs(line, debug);
fputc('\n', debug);
}
+#endif
if (n_textarea >= 0 && *(line->ptr) != '<') { /* halfload */
Strcat(textarea_str[n_textarea], line);
continue;
@@ -5516,8 +5532,10 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit)
goto proc_again;
}
}
+#ifdef DEBUG
if (w3m_debug)
fclose(debug);
+#endif
for (form_id = 1; form_id <= form_max; form_id++)
forms[form_id]->next = forms[form_id - 1];
buf->formlist = (form_max >= 0) ? forms[form_max] : NULL;
@@ -5682,6 +5700,7 @@ HTMLlineproc0(char *line, struct html_feed_environ *h_env, int internal)
int is_hangul, prev_is_hangul = 0;
#endif
+#ifdef DEBUG
if (w3m_debug) {
FILE *f = fopen("zzzproc1", "a");
fprintf(f, "%c%c%c%c",
@@ -5693,6 +5712,7 @@ HTMLlineproc0(char *line, struct html_feed_environ *h_env, int internal)
(unsigned long)h_env);
fclose(f);
}
+#endif
tokbuf = Strnew();
@@ -7519,6 +7539,7 @@ _doFileCopy(char *tmpf, char *defstr, int download)
if (fmInitialized) {
p = searchKeyData();
if (p == NULL || *p == '\0') {
+ /* FIXME: gettextize? */
q = inputLineHist("(Download)Save file to: ",
defstr, IN_COMMAND, SaveHist);
if (q == NULL || *q == '\0')
@@ -7537,6 +7558,7 @@ _doFileCopy(char *tmpf, char *defstr, int download)
return -1;
}
if (checkCopyFile(tmpf, p) < 0) {
+ /* FIXME: gettextize? */
msg = Sprintf("Can't copy. %s and %s are identical.",
conv_from_system(tmpf), conv_from_system(p));
disp_err_message(msg->ptr, FALSE);
@@ -7544,6 +7566,7 @@ _doFileCopy(char *tmpf, char *defstr, int download)
}
if (!download) {
if (_MoveFile(tmpf, p) < 0) {
+ /* FIXME: gettextize? */
msg = Sprintf("Can't save to %s", conv_from_system(p));
disp_err_message(msg->ptr, FALSE);
}
@@ -7574,6 +7597,7 @@ _doFileCopy(char *tmpf, char *defstr, int download)
else {
q = searchKeyData();
if (q == NULL || *q == '\0') {
+ /* FIXME: gettextize? */
printf("(Download)Save file to: ");
fflush(stdout);
filen = Strfgets(stdin);
@@ -7594,10 +7618,12 @@ _doFileCopy(char *tmpf, char *defstr, int download)
return -1;
}
if (checkCopyFile(tmpf, p) < 0) {
+ /* FIXME: gettextize? */
printf("Can't copy. %s and %s are identical.", tmpf, p);
return -1;
}
if (_MoveFile(tmpf, p) < 0) {
+ /* FIXME: gettextize? */
printf("Can't save to %s\n", p);
return -1;
}
@@ -7630,6 +7656,7 @@ doFileSave(URLFile uf, char *defstr)
if (fmInitialized) {
p = searchKeyData();
if (p == NULL || *p == '\0') {
+ /* FIXME: gettextize? */
p = inputLineHist("(Download)Save file to: ",
defstr, IN_FILENAME, SaveHist);
if (p == NULL || *p == '\0')
@@ -7639,6 +7666,7 @@ doFileSave(URLFile uf, char *defstr)
if (checkOverWrite(p) < 0)
return -1;
if (checkSaveFile(uf.stream, p) < 0) {
+ /* FIXME: gettextize? */
msg = Sprintf("Can't save. Load file and %s are identical.",
conv_from_system(p));
disp_err_message(msg->ptr, FALSE);
@@ -7673,6 +7701,7 @@ doFileSave(URLFile uf, char *defstr)
else {
q = searchKeyData();
if (q == NULL || *q == '\0') {
+ /* FIXME: gettextize? */
printf("(Download)Save file to: ");
fflush(stdout);
filen = Strfgets(stdin);
@@ -7688,10 +7717,12 @@ doFileSave(URLFile uf, char *defstr)
if (checkOverWrite(p) < 0)
return -1;
if (checkSaveFile(uf.stream, p) < 0) {
+ /* FIXME: gettextize? */
printf("Can't save. Load file and %s are identical.", p);
return -1;
}
if (save2tmp(uf, p) < 0) {
+ /* FIXME: gettextize? */
printf("Can't save to %s\n", p);
return -1;
}
@@ -7738,6 +7769,7 @@ checkOverWrite(char *path)
if (stat(path, &st) < 0)
return 0;
+ /* FIXME: gettextize? */
ans = inputAnswer("File exists. Overwrite? (y/n)");
if (ans && TOLOWER(*ans) == 'y')
return 0;
diff --git a/form.c b/form.c
index 21fbaef..bfb57cc 100644
--- a/form.c
+++ b/form.c
@@ -1,4 +1,4 @@
-/* $Id: form.c,v 1.32 2003/09/22 21:02:18 ukai Exp $ */
+/* $Id: form.c,v 1.33 2003/09/26 17:59:51 ukai Exp $ */
/*
* HTML forms
*/
@@ -572,6 +572,7 @@ input_textarea(FormItemList *fi)
f = fopen(tmpf, "w");
if (f == NULL) {
+ /* FIXME: gettextize? */
disp_err_message("Can't open temporary file", FALSE);
return;
}
@@ -587,6 +588,7 @@ input_textarea(FormItemList *fi)
goto input_end;
f = fopen(tmpf, "r");
if (f == NULL) {
+ /* FIXME: gettextize? */
disp_err_message("Can't open temporary file", FALSE);
goto input_end;
}
diff --git a/frame.c b/frame.c
index 7636525..b431437 100644
--- a/frame.c
+++ b/frame.c
@@ -1,4 +1,4 @@
-/* $Id: frame.c,v 1.33 2003/09/22 21:02:18 ukai Exp $ */
+/* $Id: frame.c,v 1.34 2003/09/26 17:59:51 ukai Exp $ */
#include "fm.h"
#include "parsetagx.h"
#include "myctype.h"
@@ -472,6 +472,7 @@ createFrameFile(struct frameset *f, FILE * f1, Buffer *current, int level,
}
switch (frame.element->attr) {
default:
+ /* FIXME: gettextize? */
fprintf(f1, "Frameset \"%s\" frame %d: type unrecognized",
html_quote(f->name), i + 1);
break;
@@ -498,12 +499,15 @@ createFrameFile(struct frameset *f, FILE * f1, Buffer *current, int level,
if (f2.stream == NULL) {
frame.body->attr = F_UNLOADED;
if (frame.body->flags & FB_NO_BUFFER)
+ /* FIXME: gettextize? */
fprintf(f1, "Open %s with other method",
html_quote(frame.body->url));
else if (frame.body->url)
+ /* FIXME: gettextize? */
fprintf(f1, "Can't open %s",
html_quote(frame.body->url));
else
+ /* FIXME: gettextize? */
fprintf(f1,
"This frame (%s) contains no src attribute",
frame.body->name ? html_quote(frame.body->name)
diff --git a/func.c b/func.c
index 9e948bd..f389e00 100644
--- a/func.c
+++ b/func.c
@@ -1,4 +1,4 @@
-/* $Id: func.c,v 1.26 2003/09/24 18:48:59 ukai Exp $ */
+/* $Id: func.c,v 1.27 2003/09/26 17:59:51 ukai Exp $ */
/*
* w3m func.c
*/
@@ -29,8 +29,10 @@ setKeymap(char *p, int lineno, int verbose)
c = getKey(s);
if (c < 0) { /* error */
if (lineno > 0)
+ /* FIXME: gettextize? */
emsg = Sprintf("line %d: unknown key '%s'", lineno, s)->ptr;
else
+ /* FIXME: gettextize? */
emsg = Sprintf("defkey: unknown key '%s'", s)->ptr;
record_err_message(emsg);
if (verbose)
@@ -41,8 +43,10 @@ setKeymap(char *p, int lineno, int verbose)
f = getFuncList(s);
if (f < 0) {
if (lineno > 0)
+ /* FIXME: gettextize? */
emsg = Sprintf("line %d: invalid command '%s'", lineno, s)->ptr;
else
+ /* FIXME: gettextize? */
emsg = Sprintf("defkey: invalid command '%s'", s)->ptr;
record_err_message(emsg);
if (verbose)
diff --git a/history.c b/history.c
index b2ef573..951ef83 100644
--- a/history.c
+++ b/history.c
@@ -1,4 +1,4 @@
-/* $Id: history.c,v 1.10 2003/07/22 17:29:48 ukai Exp $ */
+/* $Id: history.c,v 1.11 2003/09/26 17:59:51 ukai Exp $ */
#include "fm.h"
#ifdef USE_HISTORY
@@ -9,6 +9,7 @@ historyBuffer(Hist *hist)
HistItem *item;
char *p, *q;
+ /* FIXME: gettextize? */
Strcat_charp(src, "<html>\n<head><title>History Page</title></head>\n");
Strcat_charp(src, "<body>\n<h1>History Page</h1>\n<hr>\n");
Strcat_charp(src, "<ol>\n");
@@ -64,6 +65,7 @@ saveHistory(Hist *hist, size_t size)
return;
tmpf = tmpfname(TMPF_DFL, NULL)->ptr;
if ((f = fopen(tmpf, "w")) == NULL) {
+ /* FIXME: gettextize? */
disp_err_message("Can't open history", FALSE);
return;
}
@@ -73,6 +75,7 @@ saveHistory(Hist *hist, size_t size)
for (; item; item = item->next)
fprintf(f, "%s\n", (char *)item->ptr);
if (fclose(f) == EOF) {
+ /* FIXME: gettextize? */
disp_err_message("Can't save history", FALSE);
return;
}
diff --git a/istream.c b/istream.c
index 91766e5..cbcb620 100644
--- a/istream.c
+++ b/istream.c
@@ -1,4 +1,4 @@
-/* $Id: istream.c,v 1.21 2003/02/18 15:43:25 ukai Exp $ */
+/* $Id: istream.c,v 1.22 2003/09/26 17:59:51 ukai Exp $ */
#include "fm.h"
#include "myctype.h"
#include "istream.h"
@@ -454,6 +454,7 @@ ssl_check_cert_ident(X509 * x, char *hostname)
if (i < n) /* Found a match */
match_ident = TRUE;
else if (seen_dnsname)
+ /* FIXME: gettextize? */
ret = Sprintf("Bad cert ident from %s: dNSName=%s", hostname,
seen_dnsname->ptr);
}
@@ -467,8 +468,10 @@ ssl_check_cert_ident(X509 * x, char *hostname)
if (X509_NAME_get_text_by_NID(xn, NID_commonName,
buf, sizeof(buf)) == -1)
+ /* FIXME: gettextize? */
ret = Strnew_charp("Unable to get common name from peer cert");
else if (!ssl_match_cert_ident(buf, strlen(buf), hostname))
+ /* FIXME: gettextize? */
ret = Sprintf("Bad cert ident %s from %s", buf, hostname);
else
match_ident = TRUE;
@@ -498,13 +501,16 @@ ssl_get_certificate(SSL * ssl, char *hostname)
&& strcasecmp(accept_this_site->ptr, hostname) == 0)
ans = "y";
else {
+ /* FIXME: gettextize? */
emsg = Strnew_charp("No SSL peer certificate: accept? (y/n)");
ans = inputAnswer(emsg->ptr);
}
if (ans && TOLOWER(*ans) == 'y')
+ /* FIXME: gettextize? */
amsg = Strnew_charp
("Accept SSL session without any peer certificate");
else {
+ /* FIXME: gettextize? */
char *e = "This SSL session was rejected "
"to prevent security violation: no peer certificate";
disp_err_message(e, FALSE);
@@ -514,6 +520,7 @@ ssl_get_certificate(SSL * ssl, char *hostname)
if (amsg)
disp_err_message(amsg->ptr, FALSE);
ssl_accept_this_site(hostname);
+ /* FIXME: gettextize? */
s = amsg ? amsg : Strnew_charp("valid certificate");
return s;
}
@@ -531,14 +538,17 @@ ssl_get_certificate(SSL * ssl, char *hostname)
&& strcasecmp(accept_this_site->ptr, hostname) == 0)
ans = "y";
else {
+ /* FIXME: gettextize? */
emsg = Sprintf("%s: accept? (y/n)", em);
ans = inputAnswer(emsg->ptr);
}
if (ans && TOLOWER(*ans) == 'y') {
+ /* FIXME: gettextize? */
amsg = Sprintf("Accept unsecure SSL session: "
"unverified: %s", em);
}
else {
+ /* FIXME: gettextize? */
char *e =
Sprintf("This SSL session was rejected: %s", em)->ptr;
disp_err_message(e, FALSE);
@@ -561,10 +571,12 @@ ssl_get_certificate(SSL * ssl, char *hostname)
ans = inputAnswer(ep->ptr);
}
if (ans && TOLOWER(*ans) == 'y') {
+ /* FIXME: gettextize? */
amsg = Strnew_charp("Accept unsecure SSL session:");
Strcat(amsg, emsg);
}
else {
+ /* FIXME: gettextize? */
char *e = "This SSL session was rejected "
"to prevent security violation";
disp_err_message(e, FALSE);
@@ -575,6 +587,7 @@ ssl_get_certificate(SSL * ssl, char *hostname)
if (amsg)
disp_err_message(amsg->ptr, FALSE);
ssl_accept_this_site(hostname);
+ /* FIXME: gettextize? */
s = amsg ? amsg : Strnew_charp("valid certificate");
Strcat_charp(s, "\n");
xn = X509_get_subject_name(x);
diff --git a/linein.c b/linein.c
index 013325c..03c14d1 100644
--- a/linein.c
+++ b/linein.c
@@ -1,4 +1,4 @@
-/* $Id: linein.c,v 1.33 2003/09/24 18:48:59 ukai Exp $ */
+/* $Id: linein.c,v 1.34 2003/09/26 17:59:51 ukai Exp $ */
#include "fm.h"
#include "local.h"
#include "myctype.h"
@@ -810,6 +810,7 @@ next_dcompl(int next)
move(y, 0);
clrtoeolx();
bold();
+ /* FIXME: gettextize? */
addstr("----- Completion list -----");
boldend();
y++;
@@ -834,8 +835,10 @@ next_dcompl(int next)
clrtoeolx();
bold();
if (emacs_like_lineedit)
+ /* FIXME: gettextize? */
addstr("----- Press TAB to continue -----");
else
+ /* FIXME: gettextize? */
addstr("----- Press CTRL-D to continue -----");
boldend();
}
diff --git a/local.c b/local.c
index f7d49e5..b1e388d 100644
--- a/local.c
+++ b/local.c
@@ -1,4 +1,4 @@
-/* $Id: local.c,v 1.30 2003/05/12 16:34:12 ukai Exp $ */
+/* $Id: local.c,v 1.31 2003/09/26 17:59:51 ukai Exp $ */
#include "fm.h"
#include <string.h>
#include <stdio.h>
@@ -84,6 +84,7 @@ loadLocalDir(char *dname)
if (Strlastchar(dirname) != '/')
Strcat_char(dirname, '/');
qdir = html_quote(Str_conv_from_system(dirname)->ptr);
+ /* FIXME: gettextize? */
tmp = Strnew_m_charp("<HTML>\n<HEAD>\n<BASE HREF=\"file://", qdir,
"\">\n<TITLE>Directory list of ", qdir,
"</TITLE>\n</HEAD>\n<BODY>\n<H1>Directory list of ",
diff --git a/main.c b/main.c
index 7407533..91ff928 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.234 2003/09/25 03:38:14 ukai Exp $ */
+/* $Id: main.c,v 1.235 2003/09/26 17:59:51 ukai Exp $ */
#define MAINPROGRAM
#include "fm.h"
#include <signal.h>
@@ -177,6 +177,7 @@ static void
fusage(FILE * f, int err)
{
fversion(f);
+ /* FIXME: gettextize? */
fprintf(f, "usage: w3m [options] [URL or filename]\noptions:\n");
fprintf(f, " -t tab set tab width\n");
fprintf(f, " -r ignore backspace effect\n");
@@ -708,6 +709,7 @@ main(int argc, char **argv, char **envp)
}
if (!set_param_option(argv[i])) {
/* option set failed */
+ /* FIXME: gettextize? */
fprintf(stderr, "%s: bad option\n", argv[i]);
show_params_p = 1;
usage();
@@ -783,7 +785,8 @@ main(int argc, char **argv, char **envp)
#ifdef USE_M17N
wtf_init(DocumentCharset, DisplayCharset);
/* if (w3m_dump)
- * WcOption.pre_conv = WC_TRUE; */
+ * WcOption.pre_conv = WC_TRUE;
+ */
#endif
if (w3m_backend)
@@ -813,6 +816,7 @@ main(int argc, char **argv, char **envp)
Strcat_charp(err_msg, "w3m: Can't load bookmark.\n");
}
else if (visual_start) {
+ /* FIXME: gettextize? */
Str s_page;
s_page =
Strnew_charp
@@ -880,6 +884,7 @@ main(int argc, char **argv, char **envp)
else
fp = fopen(post_file, "r");
if (fp == NULL) {
+ /* FIXME: gettextize? */
Strcat(err_msg,
Sprintf("w3m: Can't open %s.\n", post_file));
continue;
@@ -902,6 +907,7 @@ main(int argc, char **argv, char **envp)
request);
}
if (newbuf == NULL) {
+ /* FIXME: gettextize? */
Strcat(err_msg,
Sprintf("w3m: Can't load %s.\n", load_argv[i]));
continue;
@@ -982,6 +988,7 @@ main(int argc, char **argv, char **envp)
if (!FirstTab || !Firstbuf || Firstbuf == NO_BUFFER) {
if (newbuf == NO_BUFFER) {
if (fmInitialized)
+ /* FIXME: gettextize? */
inputChar("Hit any key to quit w3m:");
}
if (fmInitialized)
@@ -1804,6 +1811,7 @@ srch_nxtprv(int reverse)
/* *INDENT-ON* */
if (searchRoutine == NULL) {
+ /* FIXME: gettextize? */
disp_message("No previous regular expression", TRUE);
return;
}
@@ -1949,6 +1957,7 @@ pipeBuf(void)
CurrentKeyData = NULL; /* not allowed in w3m-control: */
cmd = searchKeyData();
if (cmd == NULL || *cmd == '\0') {
+ /* FIXME: gettextize? */
cmd = inputLineHist("Pipe buffer to: ", "", IN_COMMAND, ShellHist);
}
if (cmd != NULL)
@@ -1960,6 +1969,7 @@ pipeBuf(void)
tmpf = tmpfname(TMPF_DFL, NULL)->ptr;
f = fopen(tmpf, "w");
if (f == NULL) {
+ /* FIXME: gettextize? */
disp_message(Sprintf("Can't save buffer to %s", cmd)->ptr, TRUE);
return;
}
@@ -2039,6 +2049,7 @@ readsh(void)
mySignal(SIGINT, prevtrap);
term_raw();
if (buf == NULL) {
+ /* FIXME: gettextize? */
disp_message("Execution failed", TRUE);
return;
}
@@ -2068,6 +2079,7 @@ execsh(void)
fmTerm();
printf("\n");
system(cmd);
+ /* FIXME: gettextize? */
printf("\n[Hit any key]");
fflush(stdout);
fmInit();
@@ -2084,6 +2096,7 @@ ldfile(void)
fn = searchKeyData();
if (fn == NULL || *fn == '\0') {
+ /* FIXME: gettextize? */
fn = inputFilenameHist("(Load)Filename? ", NULL, LoadHist);
}
if (fn != NULL)
@@ -2122,6 +2135,7 @@ cmd_loadfile(char *fn)
buf = loadGeneralFile(file_to_url(fn), NULL, NO_REFERER, 0, NULL);
if (buf == NULL) {
+ /* FIXME: gettextize? */
char *emsg = Sprintf("%s not found", conv_from_system(fn))->ptr;
disp_err_message(emsg, FALSE);
}
@@ -2232,8 +2246,8 @@ movR1(void)
/* movLW, movRW */
/*
* From: Takashi Nishimoto <g96p0935@mse.waseda.ac.jp> Date: Mon, 14 Jun
- * 1999 09:29:56 +0900 */
-
+ * 1999 09:29:56 +0900
+ */
#define IS_WORD_CHAR(c,p) (IS_ALNUM(c) && CharType(p) == PC_ASCII)
static int
@@ -2370,9 +2384,11 @@ _quitfm(int confirm)
char *ans = "y";
if (checkDownloadList())
+ /* FIXME: gettextize? */
ans = inputChar("Download process retains. "
"Do you want to exit w3m? (y/n)");
else if (confirm)
+ /* FIXME: gettextize? */
ans = inputChar("Do you want to exit w3m? (y/n)");
if (!(ans && TOLOWER(*ans) == 'y')) {
displayBuffer(Currentbuf, B_NORMAL);
@@ -2518,6 +2534,7 @@ goLine(void)
else if (str)
_goLine(str);
else
+ /* FIXME: gettextize? */
_goLine(inputStr("Goto line: ", ""));
}
@@ -2614,6 +2631,7 @@ editScr(void)
tmpf = tmpfname(TMPF_DFL, NULL)->ptr;
f = fopen(tmpf, "w");
if (f == NULL) {
+ /* FIXME: gettextize? */
disp_err_message(Sprintf("Can't open %s", tmpf)->ptr, TRUE);
return;
}
@@ -2673,6 +2691,7 @@ nextMk(void)
l = l->next;
i = 0;
}
+ /* FIXME: gettextize? */
disp_message("No mark exist after here", TRUE);
}
@@ -2708,6 +2727,7 @@ prevMk(void)
if (l != NULL)
i = l->len - 1;
}
+ /* FIXME: gettextize? */
disp_message("No mark exist before here", TRUE);
}
@@ -2866,6 +2886,7 @@ gotoLabel(char *label)
al = searchURLLabel(Currentbuf, label);
if (al == NULL) {
+ /* FIXME: gettextize? */
disp_message(Sprintf("%s is not found", label)->ptr, TRUE);
return;
}
@@ -2949,6 +2970,7 @@ followA(void)
#ifndef USE_W3MMAILER
char *pos;
if (!non_null(Mailer)) {
+ /* FIXME: gettextize? */
disp_err_message("no mailer is specified", TRUE);
return;
}
@@ -2966,6 +2988,7 @@ followA(void)
#if 0
else if (!strncasecmp(a->url, "news:", 5) && strchr(a->url, '@') == NULL) {
/* news:newsgroup is not supported */
+ /* FIXME: gettextize? */
disp_err_message("news:newsgroup_name is not supported", TRUE);
return;
}
@@ -3018,10 +3041,12 @@ followI(void)
a = retrieveCurrentImg(Currentbuf);
if (a == NULL)
return;
+ /* FIXME: gettextize? */
message(Sprintf("loading %s", a->url)->ptr, 0, 0);
refresh();
buf = loadGeneralFile(a->url, baseURL(Currentbuf), NULL, 0, NULL);
if (buf == NULL) {
+ /* FIXME: gettextize? */
char *emsg = Sprintf("Can't load %s", a->url)->ptr;
disp_err_message(emsg, FALSE);
}
@@ -3282,7 +3307,9 @@ _followForm(int submit)
if (submit)
goto do_submit;
if (fi->readonly)
+ /* FIXME: gettextize? */
disp_message_nsec("Read only field!", FALSE, 1, TRUE, FALSE);
+ /* FIXME: gettextize? */
p = inputStrHist("TEXT:", fi->value ? fi->value->ptr : NULL, TextHist);
if (p == NULL || fi->readonly)
break;
@@ -3295,7 +3322,9 @@ _followForm(int submit)
if (submit)
goto do_submit;
if (fi->readonly)
+ /* FIXME: gettextize? */
disp_message_nsec("Read only field!", FALSE, 1, TRUE, FALSE);
+ /* FIXME: gettextize? */
p = inputFilenameHist("Filename:", fi->value ? fi->value->ptr : NULL,
NULL);
if (p == NULL || fi->readonly)
@@ -3309,9 +3338,11 @@ _followForm(int submit)
if (submit)
goto do_submit;
if (fi->readonly) {
+ /* FIXME: gettextize? */
disp_message_nsec("Read only field!", FALSE, 1, TRUE, FALSE);
break;
}
+ /* FIXME: gettextize? */
p = inputLine("Password:", fi->value ? fi->value->ptr : NULL,
IN_PASSWORD);
if (p == NULL)
@@ -3325,6 +3356,7 @@ _followForm(int submit)
if (submit)
goto do_submit;
if (fi->readonly)
+ /* FIXME: gettextize? */
disp_message_nsec("Read only field!", FALSE, 1, TRUE, FALSE);
input_textarea(fi);
formUpdateBuffer(a, Currentbuf, fi);
@@ -3333,6 +3365,7 @@ _followForm(int submit)
if (submit)
goto do_submit;
if (fi->readonly) {
+ /* FIXME: gettextize? */
disp_message_nsec("Read only field!", FALSE, 1, TRUE, FALSE);
break;
}
@@ -3342,6 +3375,7 @@ _followForm(int submit)
if (submit)
goto do_submit;
if (fi->readonly) {
+ /* FIXME: gettextize? */
disp_message_nsec("Read only field!", FALSE, 1, TRUE, FALSE);
break;
}
@@ -3928,6 +3962,7 @@ backBf(void)
displayBuffer(Currentbuf, B_FORCE_REDRAW);
}
else
+ /* FIXME: gettextize? */
disp_message("Can't back...", TRUE);
return;
}
@@ -3989,6 +4024,7 @@ cmd_loadURL(char *url, ParsedURL *current, char *referer, FormList *request)
#ifndef USE_W3MMAILER
char *pos;
if (!non_null(Mailer)) {
+ /* FIXME: gettextize? */
disp_err_message("no mailer is specified", TRUE);
return;
}
@@ -4006,6 +4042,7 @@ cmd_loadURL(char *url, ParsedURL *current, char *referer, FormList *request)
#if 0
if (!strncasecmp(url, "news:", 5) && strchr(url, '@') == NULL) {
/* news:newsgroup is not supported */
+ /* FIXME: gettextize? */
disp_err_message("news:newsgroup_name is not supported", TRUE);
return;
}
@@ -4014,6 +4051,7 @@ cmd_loadURL(char *url, ParsedURL *current, char *referer, FormList *request)
refresh();
buf = loadGeneralFile(url, current, referer, 0, request);
if (buf == NULL) {
+ /* FIXME: gettextize? */
char *emsg = Sprintf("Can't load %s", conv_from_system(url))->ptr;
disp_err_message(emsg, FALSE);
}
@@ -4409,6 +4447,7 @@ svBuf(void)
CurrentKeyData = NULL; /* not allowed in w3m-control: */
file = searchKeyData();
if (file == NULL || *file == '\0') {
+ /* FIXME: gettextize? */
qfile = inputLineHist("Save buffer to: ", NULL, IN_COMMAND, SaveHist);
if (qfile == NULL || *qfile == '\0') {
displayBuffer(Currentbuf, B_NORMAL);
@@ -4434,6 +4473,7 @@ svBuf(void)
is_pipe = FALSE;
}
if (f == NULL) {
+ /* FIXME: gettextize? */
char *emsg = Sprintf("Can't open %s", conv_from_system(file))->ptr;
disp_err_message(emsg, TRUE);
return;
@@ -4698,12 +4738,14 @@ reload(void)
ldDL();
return;
}
+ /* FIXME: gettextize? */
disp_err_message("Can't reload...", TRUE);
return;
}
if (Currentbuf->currentURL.scheme == SCM_LOCAL &&
!strcmp(Currentbuf->currentURL.file, "-")) {
/* file is std input */
+ /* FIXME: gettextize? */
disp_err_message("Can't reload stdin", TRUE);
return;
}
@@ -4754,6 +4796,7 @@ reload(void)
request = NULL;
}
url = parsedURL2Str(&Currentbuf->currentURL);
+ /* FIXME: gettextize? */
message("Reloading...", 0, 0);
refresh();
#ifdef USE_M17N
@@ -4773,6 +4816,7 @@ reload(void)
if (multipart)
unlink(request->body);
if (buf == NULL) {
+ /* FIXME: gettextize? */
disp_err_message("Can't reload...", TRUE);
return;
}
@@ -4851,6 +4895,7 @@ docCSet(void)
cs = searchKeyData();
if (cs == NULL || *cs == '\0')
+ /* FIXME: gettextize? */
cs = inputStr("Document charset: ",
wc_ces_to_charset(Currentbuf->document_charset));
charset = wc_guess_charset_short(cs, 0);
@@ -4869,6 +4914,7 @@ defCSet(void)
cs = searchKeyData();
if (cs == NULL || *cs == '\0')
+ /* FIXME: gettextize? */
cs = inputStr("Default document charset: ",
wc_ces_to_charset(DocumentCharset));
charset = wc_guess_charset_short(cs, 0);
@@ -5043,12 +5089,14 @@ void
extbrz()
{
if (Currentbuf->bufferprop & BP_INTERNAL) {
+ /* FIXME: gettextize? */
disp_err_message("Can't browse...", TRUE);
return;
}
if (Currentbuf->currentURL.scheme == SCM_LOCAL &&
!strcmp(Currentbuf->currentURL.file, "-")) {
/* file is std input */
+ /* FIXME: gettextize? */
disp_err_message("Can't browse stdin", TRUE);
return;
}
@@ -5534,10 +5582,12 @@ wrapToggle(void)
{
if (WrapSearch) {
WrapSearch = FALSE;
+ /* FIXME: gettextize? */
disp_message("Wrap search off", TRUE);
}
else {
WrapSearch = TRUE;
+ /* FIXME: gettextize? */
disp_message("Wrap search on", TRUE);
}
}
@@ -6433,6 +6483,7 @@ DownloadListBuffer(void)
if (!FirstDL)
return NULL;
cur_time = time(0);
+ /* FIXME: gettextize? */
src = Strnew_charp("<html><head><title>" DOWNLOAD_LIST_TITLE
"</title></head>\n<body><h1 align=center>"
DOWNLOAD_LIST_TITLE "</h1>\n"
diff --git a/url.c b/url.c
index 28fd8e9..14aa63c 100644
--- a/url.c
+++ b/url.c
@@ -1,4 +1,4 @@
-/* $Id: url.c,v 1.82 2003/09/22 17:37:41 ukai Exp $ */
+/* $Id: url.c,v 1.83 2003/09/26 17:59:51 ukai Exp $ */
#include "fm.h"
#include <sys/types.h>
#include <sys/socket.h>
@@ -378,6 +378,7 @@ openSSLHandle(int sock, char *hostname, char **p_cert)
close(sock);
if (handle)
SSL_free(handle);
+ /* FIXME: gettextize? */
disp_err_message(Sprintf
("SSL error: %s",
ERR_error_string(ERR_get_error(), NULL))->ptr, FALSE);
@@ -454,6 +455,7 @@ openSocket(char *const hostname,
MySignalHandler(*volatile prevtrap) (SIGNAL_ARG) = NULL;
if (fmInitialized) {
+ /* FIXME: gettextize? */
message(Sprintf("Opening socket...")->ptr, 0, 0);
refresh();
}