[w3m-dev 03377] sync_with_option
* etc.c (loadPassword): reset passwords * form.c (loadPreForm): reset PreForm * main.c (option_assigned): deleted (parse_proxy): deleted (MAIN): move initCookie(), setLocalCookie() after sync_with_option() delete parseURL for *_proxy s/WrapSearch/WrapDefault/ move initKeymap(), initMenu() after setupscreen() sync_with_option() after init_rc() * rc.c (pre_form_file): move in params9 (network settting) (sync_with_option): initKeymap(), initMenu() is done if fmInitialized (init_rc): delete sync_with_option() From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
This commit is contained in:
@@ -1,3 +1,21 @@
|
|||||||
|
2002-11-06 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
|
||||||
|
|
||||||
|
* [w3m-dev 03377] sync_with_option
|
||||||
|
* etc.c (loadPassword): reset passwords
|
||||||
|
* form.c (loadPreForm): reset PreForm
|
||||||
|
* main.c (option_assigned): deleted
|
||||||
|
(parse_proxy): deleted
|
||||||
|
(MAIN): move initCookie(), setLocalCookie()
|
||||||
|
after sync_with_option()
|
||||||
|
delete parseURL for *_proxy
|
||||||
|
s/WrapSearch/WrapDefault/
|
||||||
|
move initKeymap(), initMenu() after setupscreen()
|
||||||
|
sync_with_option() after init_rc()
|
||||||
|
* rc.c (pre_form_file): move in params9 (network settting)
|
||||||
|
(sync_with_option): initKeymap(), initMenu() is done
|
||||||
|
if fmInitialized
|
||||||
|
(init_rc): delete sync_with_option()
|
||||||
|
|
||||||
2002-11-06 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
|
2002-11-06 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
|
||||||
|
|
||||||
* [w3m-dev 03375] NULL check of CurrentTab
|
* [w3m-dev 03375] NULL check of CurrentTab
|
||||||
@@ -4312,4 +4330,4 @@ a * [w3m-dev 03276] compile error on EWS4800
|
|||||||
* release-0-2-1
|
* release-0-2-1
|
||||||
* import w3m-0.2.1
|
* import w3m-0.2.1
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.478 2002/11/06 03:19:30 ukai Exp $
|
$Id: ChangeLog,v 1.479 2002/11/06 03:26:56 ukai Exp $
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: etc.c,v 1.33 2002/11/05 17:54:39 ukai Exp $ */
|
/* $Id: etc.c,v 1.34 2002/11/06 03:27:04 ukai Exp $ */
|
||||||
#include "fm.h"
|
#include "fm.h"
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include "myctype.h"
|
#include "myctype.h"
|
||||||
@@ -1076,6 +1076,8 @@ void
|
|||||||
loadPasswd(void)
|
loadPasswd(void)
|
||||||
{
|
{
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
|
|
||||||
|
passwords = NULL;
|
||||||
fp = openSecretFile(passwd_file);
|
fp = openSecretFile(passwd_file);
|
||||||
if (fp != NULL) {
|
if (fp != NULL) {
|
||||||
parsePasswd(fp, 0);
|
parsePasswd(fp, 0);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: form.c,v 1.17 2002/11/05 16:43:09 ukai Exp $ */
|
/* $Id: form.c,v 1.18 2002/11/06 03:27:04 ukai Exp $ */
|
||||||
/*
|
/*
|
||||||
* HTML forms
|
* HTML forms
|
||||||
*/
|
*/
|
||||||
@@ -735,11 +735,10 @@ loadPreForm(void)
|
|||||||
struct pre_form *pf = NULL;
|
struct pre_form *pf = NULL;
|
||||||
struct pre_form_item *pi = NULL;
|
struct pre_form_item *pi = NULL;
|
||||||
|
|
||||||
|
PreForm = NULL;
|
||||||
fp = openSecretFile(pre_form_file);
|
fp = openSecretFile(pre_form_file);
|
||||||
if (fp == NULL) {
|
if (fp == NULL)
|
||||||
PreForm = NULL;
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
while (1) {
|
while (1) {
|
||||||
int type = 0;
|
int type = 0;
|
||||||
char *p, *s, *arg;
|
char *p, *s, *arg;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: main.c,v 1.119 2002/11/05 17:12:02 ukai Exp $ */
|
/* $Id: main.c,v 1.120 2002/11/06 03:27:04 ukai Exp $ */
|
||||||
#define MAINPROGRAM
|
#define MAINPROGRAM
|
||||||
#include "fm.h"
|
#include "fm.h"
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
@@ -248,9 +248,6 @@ fusage(FILE * f, int err)
|
|||||||
exit(err);
|
exit(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int option_assigned = 0;
|
|
||||||
extern void parse_proxy(void);
|
|
||||||
|
|
||||||
static GC_warn_proc orig_GC_warn_proc = NULL;
|
static GC_warn_proc orig_GC_warn_proc = NULL;
|
||||||
#define GC_WARN_KEEP_MAX (20)
|
#define GC_WARN_KEEP_MAX (20)
|
||||||
|
|
||||||
@@ -407,10 +404,6 @@ MAIN(int argc, char **argv, char **envp)
|
|||||||
|
|
||||||
/* initializations */
|
/* initializations */
|
||||||
init_rc(config_filename);
|
init_rc(config_filename);
|
||||||
#ifdef USE_COOKIE
|
|
||||||
initCookie();
|
|
||||||
#endif /* USE_COOKIE */
|
|
||||||
setLocalCookie(); /* setup cookie for local CGI */
|
|
||||||
|
|
||||||
LoadHist = newHist();
|
LoadHist = newHist();
|
||||||
SaveHist = newHist();
|
SaveHist = newHist();
|
||||||
@@ -423,30 +416,22 @@ MAIN(int argc, char **argv, char **envp)
|
|||||||
|
|
||||||
if (!non_null(HTTP_proxy) &&
|
if (!non_null(HTTP_proxy) &&
|
||||||
((p = getenv("HTTP_PROXY")) ||
|
((p = getenv("HTTP_PROXY")) ||
|
||||||
(p = getenv("http_proxy")) || (p = getenv("HTTP_proxy")))) {
|
(p = getenv("http_proxy")) || (p = getenv("HTTP_proxy"))))
|
||||||
HTTP_proxy = p;
|
HTTP_proxy = p;
|
||||||
parseURL(p, &HTTP_proxy_parsed, NULL);
|
|
||||||
}
|
|
||||||
#ifdef USE_GOPHER
|
#ifdef USE_GOPHER
|
||||||
if (!non_null(GOPHER_proxy) &&
|
if (!non_null(GOPHER_proxy) &&
|
||||||
((p = getenv("GOPHER_PROXY")) ||
|
((p = getenv("GOPHER_PROXY")) ||
|
||||||
(p = getenv("gopher_proxy")) || (p = getenv("GOPHER_proxy")))) {
|
(p = getenv("gopher_proxy")) || (p = getenv("GOPHER_proxy"))))
|
||||||
GOPHER_proxy = p;
|
GOPHER_proxy = p;
|
||||||
parseURL(p, &GOPHER_proxy_parsed, NULL);
|
|
||||||
}
|
|
||||||
#endif /* USE_GOPHER */
|
#endif /* USE_GOPHER */
|
||||||
if (!non_null(FTP_proxy) &&
|
if (!non_null(FTP_proxy) &&
|
||||||
((p = getenv("FTP_PROXY")) ||
|
((p = getenv("FTP_PROXY")) ||
|
||||||
(p = getenv("ftp_proxy")) || (p = getenv("FTP_proxy")))) {
|
(p = getenv("ftp_proxy")) || (p = getenv("FTP_proxy"))))
|
||||||
FTP_proxy = p;
|
FTP_proxy = p;
|
||||||
parseURL(p, &FTP_proxy_parsed, NULL);
|
|
||||||
}
|
|
||||||
if (!non_null(NO_proxy) &&
|
if (!non_null(NO_proxy) &&
|
||||||
((p = getenv("NO_PROXY")) ||
|
((p = getenv("NO_PROXY")) ||
|
||||||
(p = getenv("no_proxy")) || (p = getenv("NO_proxy")))) {
|
(p = getenv("no_proxy")) || (p = getenv("NO_proxy"))))
|
||||||
NO_proxy = p;
|
NO_proxy = p;
|
||||||
set_no_proxy(p);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!non_null(Editor) && (p = getenv("EDITOR")) != NULL)
|
if (!non_null(Editor) && (p = getenv("EDITOR")) != NULL)
|
||||||
Editor = p;
|
Editor = p;
|
||||||
@@ -545,12 +530,10 @@ MAIN(int argc, char **argv, char **envp)
|
|||||||
else if (!strcmp("-F", argv[i]))
|
else if (!strcmp("-F", argv[i]))
|
||||||
RenderFrame = TRUE;
|
RenderFrame = TRUE;
|
||||||
else if (!strcmp("-W", argv[i])) {
|
else if (!strcmp("-W", argv[i])) {
|
||||||
if (WrapSearch) {
|
if (WrapDefault)
|
||||||
WrapSearch = FALSE;
|
WrapDefault = FALSE;
|
||||||
}
|
else
|
||||||
else {
|
WrapDefault = TRUE;
|
||||||
WrapSearch = TRUE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (!strcmp("-dump", argv[i]))
|
else if (!strcmp("-dump", argv[i]))
|
||||||
w3m_dump = DUMP_BUFFER;
|
w3m_dump = DUMP_BUFFER;
|
||||||
@@ -682,7 +665,6 @@ MAIN(int argc, char **argv, char **envp)
|
|||||||
show_params_p = 1;
|
show_params_p = 1;
|
||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
option_assigned = 1;
|
|
||||||
}
|
}
|
||||||
else if (!strcmp("-dummy", argv[i])) {
|
else if (!strcmp("-dummy", argv[i])) {
|
||||||
/* do nothing */
|
/* do nothing */
|
||||||
@@ -702,8 +684,11 @@ MAIN(int argc, char **argv, char **envp)
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (option_assigned)
|
sync_with_option();
|
||||||
sync_with_option();
|
#ifdef USE_COOKIE
|
||||||
|
initCookie();
|
||||||
|
#endif /* USE_COOKIE */
|
||||||
|
setLocalCookie(); /* setup cookie for local CGI */
|
||||||
|
|
||||||
#ifdef __WATT32__
|
#ifdef __WATT32__
|
||||||
if (w3m_debug)
|
if (w3m_debug)
|
||||||
@@ -734,10 +719,6 @@ MAIN(int argc, char **argv, char **envp)
|
|||||||
if (w3m_backend)
|
if (w3m_backend)
|
||||||
backend();
|
backend();
|
||||||
if (!w3m_dump) {
|
if (!w3m_dump) {
|
||||||
initKeymap(TRUE);
|
|
||||||
#ifdef USE_MENU
|
|
||||||
initMenu();
|
|
||||||
#endif /* MENU */
|
|
||||||
fmInit();
|
fmInit();
|
||||||
#ifdef SIGWINCH
|
#ifdef SIGWINCH
|
||||||
signal(SIGWINCH, resize_hook);
|
signal(SIGWINCH, resize_hook);
|
||||||
@@ -745,6 +726,10 @@ MAIN(int argc, char **argv, char **envp)
|
|||||||
setlinescols();
|
setlinescols();
|
||||||
setupscreen();
|
setupscreen();
|
||||||
#endif /* not SIGWINCH */
|
#endif /* not SIGWINCH */
|
||||||
|
initKeymap(TRUE);
|
||||||
|
#ifdef USE_MENU
|
||||||
|
initMenu();
|
||||||
|
#endif /* MENU */
|
||||||
}
|
}
|
||||||
#ifdef USE_IMAGE
|
#ifdef USE_IMAGE
|
||||||
else if (w3m_halfdump && displayImage)
|
else if (w3m_halfdump && displayImage)
|
||||||
@@ -5310,6 +5295,7 @@ reinit()
|
|||||||
|
|
||||||
if (resource == NULL) {
|
if (resource == NULL) {
|
||||||
init_rc(config_filename);
|
init_rc(config_filename);
|
||||||
|
sync_with_option();
|
||||||
#ifdef USE_COOKIE
|
#ifdef USE_COOKIE
|
||||||
initCookie();
|
initCookie();
|
||||||
#endif
|
#endif
|
||||||
@@ -5322,6 +5308,7 @@ reinit()
|
|||||||
|
|
||||||
if (!strcasecmp(resource, "CONFIG") || !strcasecmp(resource, "RC")) {
|
if (!strcasecmp(resource, "CONFIG") || !strcasecmp(resource, "RC")) {
|
||||||
init_rc(config_filename);
|
init_rc(config_filename);
|
||||||
|
sync_with_option();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: rc.c,v 1.58 2002/11/05 17:54:39 ukai Exp $ */
|
/* $Id: rc.c,v 1.59 2002/11/06 03:27:04 ukai Exp $ */
|
||||||
/*
|
/*
|
||||||
* Initialization file etc.
|
* Initialization file etc.
|
||||||
*/
|
*/
|
||||||
@@ -78,7 +78,6 @@ static char *config_file = NULL;
|
|||||||
#endif
|
#endif
|
||||||
#define CMT_MULTICOL "ファイル名のマルチカラム表示"
|
#define CMT_MULTICOL "ファイル名のマルチカラム表示"
|
||||||
#define CMT_ALT_ENTITY "エンティティを ASCII の代替表現で表す"
|
#define CMT_ALT_ENTITY "エンティティを ASCII の代替表現で表す"
|
||||||
#define CMT_PRE_FORM_FILE "pre_formファイル"
|
|
||||||
#define CMT_FOLD_TEXTAREA "TEXTAREA の行を折り返して表示"
|
#define CMT_FOLD_TEXTAREA "TEXTAREA の行を折り返して表示"
|
||||||
#define CMT_COLOR "カラー表示"
|
#define CMT_COLOR "カラー表示"
|
||||||
#define CMT_B_COLOR "文字の色"
|
#define CMT_B_COLOR "文字の色"
|
||||||
@@ -132,6 +131,7 @@ static char *config_file = NULL;
|
|||||||
#define CMT_EXTBRZ3 "外部ブラウザその3"
|
#define CMT_EXTBRZ3 "外部ブラウザその3"
|
||||||
#define CMT_DISABLE_SECRET_SECURITY_CHECK "パスワードファイルのパーミッションをチェックしない"
|
#define CMT_DISABLE_SECRET_SECURITY_CHECK "パスワードファイルのパーミッションをチェックしない"
|
||||||
#define CMT_PASSWDFILE "パスワードファイル"
|
#define CMT_PASSWDFILE "パスワードファイル"
|
||||||
|
#define CMT_PRE_FORM_FILE "文書読込時のフォーム設定用ファイル"
|
||||||
#define CMT_FTPPASS "FTPのパスワード(普通は自分のmail addressを使う)"
|
#define CMT_FTPPASS "FTPのパスワード(普通は自分のmail addressを使う)"
|
||||||
#ifdef FTPPASS_HOSTNAMEGEN
|
#ifdef FTPPASS_HOSTNAMEGEN
|
||||||
#define CMT_FTPPASS_HOSTNAMEGEN "FTPのパスワードのドメイン名を自動生成する"
|
#define CMT_FTPPASS_HOSTNAMEGEN "FTPのパスワードのドメイン名を自動生成する"
|
||||||
@@ -224,7 +224,6 @@ static char *config_file = NULL;
|
|||||||
#endif
|
#endif
|
||||||
#define CMT_MULTICOL "Display file names in multi-column format"
|
#define CMT_MULTICOL "Display file names in multi-column format"
|
||||||
#define CMT_ALT_ENTITY "Use ASCII equivalents to display entities"
|
#define CMT_ALT_ENTITY "Use ASCII equivalents to display entities"
|
||||||
#define CMT_PRE_FORM_FILE "pre_form file"
|
|
||||||
#define CMT_FOLD_TEXTAREA "Fold lines in TEXTAREA"
|
#define CMT_FOLD_TEXTAREA "Fold lines in TEXTAREA"
|
||||||
#define CMT_COLOR "Display with color"
|
#define CMT_COLOR "Display with color"
|
||||||
#define CMT_B_COLOR "Color of normal character"
|
#define CMT_B_COLOR "Color of normal character"
|
||||||
@@ -278,6 +277,7 @@ static char *config_file = NULL;
|
|||||||
#define CMT_EXTBRZ3 "Third External Browser"
|
#define CMT_EXTBRZ3 "Third External Browser"
|
||||||
#define CMT_DISABLE_SECRET_SECURITY_CHECK "Disable secret file security check"
|
#define CMT_DISABLE_SECRET_SECURITY_CHECK "Disable secret file security check"
|
||||||
#define CMT_PASSWDFILE "Password file"
|
#define CMT_PASSWDFILE "Password file"
|
||||||
|
#define CMT_PRE_FORM_FILE "File for setting form on loading"
|
||||||
#define CMT_FTPPASS "Password for anonymous FTP (your mail address)"
|
#define CMT_FTPPASS "Password for anonymous FTP (your mail address)"
|
||||||
#ifdef FTPPASS_HOSTNAMEGEN
|
#ifdef FTPPASS_HOSTNAMEGEN
|
||||||
#define CMT_FTPPASS_HOSTNAMEGEN "Generate domain part of password for FTP"
|
#define CMT_FTPPASS_HOSTNAMEGEN "Generate domain part of password for FTP"
|
||||||
@@ -490,8 +490,6 @@ struct param_ptr params1[] = {
|
|||||||
{"multicol", P_INT, PI_ONOFF, (void *)&multicolList, CMT_MULTICOL, NULL},
|
{"multicol", P_INT, PI_ONOFF, (void *)&multicolList, CMT_MULTICOL, NULL},
|
||||||
{"alt_entity", P_CHARINT, PI_ONOFF, (void *)&UseAltEntity, CMT_ALT_ENTITY,
|
{"alt_entity", P_CHARINT, PI_ONOFF, (void *)&UseAltEntity, CMT_ALT_ENTITY,
|
||||||
NULL},
|
NULL},
|
||||||
{"pre_form_file", P_STRING, PI_TEXT, (void *)&pre_form_file,
|
|
||||||
CMT_PRE_FORM_FILE, NULL},
|
|
||||||
{"fold_textarea", P_CHARINT, PI_ONOFF, (void *)&FoldTextarea,
|
{"fold_textarea", P_CHARINT, PI_ONOFF, (void *)&FoldTextarea,
|
||||||
CMT_FOLD_TEXTAREA, NULL},
|
CMT_FOLD_TEXTAREA, NULL},
|
||||||
{"ignore_null_img_alt", P_INT, PI_ONOFF, (void *)&ignore_null_img_alt,
|
{"ignore_null_img_alt", P_INT, PI_ONOFF, (void *)&ignore_null_img_alt,
|
||||||
@@ -694,6 +692,8 @@ struct param_ptr params9[] = {
|
|||||||
{"ftppass_hostnamegen", P_INT, PI_ONOFF, (void *)&ftppass_hostnamegen,
|
{"ftppass_hostnamegen", P_INT, PI_ONOFF, (void *)&ftppass_hostnamegen,
|
||||||
CMT_FTPPASS_HOSTNAMEGEN, NULL},
|
CMT_FTPPASS_HOSTNAMEGEN, NULL},
|
||||||
#endif
|
#endif
|
||||||
|
{"pre_form_file", P_STRING, PI_TEXT, (void *)&pre_form_file,
|
||||||
|
CMT_PRE_FORM_FILE, NULL},
|
||||||
{"user_agent", P_STRING, PI_TEXT, (void *)&UserAgent, CMT_USERAGENT, NULL},
|
{"user_agent", P_STRING, PI_TEXT, (void *)&UserAgent, CMT_USERAGENT, NULL},
|
||||||
{"no_referer", P_INT, PI_ONOFF, (void *)&NoSendReferer, CMT_NOSENDREFERER,
|
{"no_referer", P_INT, PI_ONOFF, (void *)&NoSendReferer, CMT_NOSENDREFERER,
|
||||||
NULL},
|
NULL},
|
||||||
@@ -1270,7 +1270,12 @@ sync_with_option(void)
|
|||||||
AcceptEncoding = acceptableEncoding();
|
AcceptEncoding = acceptableEncoding();
|
||||||
if (AcceptMedia == NULL || *AcceptMedia == '\0')
|
if (AcceptMedia == NULL || *AcceptMedia == '\0')
|
||||||
AcceptMedia = acceptableMimeTypes();
|
AcceptMedia = acceptableMimeTypes();
|
||||||
initKeymap(FALSE);
|
if (fmInitialized) {
|
||||||
|
initKeymap(FALSE);
|
||||||
|
#ifdef USE_MENU
|
||||||
|
initMenu();
|
||||||
|
#endif /* MENU */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -1324,7 +1329,6 @@ init_rc(char *config_filename)
|
|||||||
interpret_rc(f);
|
interpret_rc(f);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
}
|
}
|
||||||
sync_with_option();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user