commit 940f160269193fc7255563419827ec0cafaeb67f
parent 52e4af4e11a11e836ca2bb628cc9cb03f9b4b2dd
Author: ukai <ukai>
Date: Mon, 21 Jan 2002 15:56:12 +0000
[w3m-dev 02877] some fixes for urimethodmap
* config.h.dist (RC_DIR): remove tailing /
* configure (mailer): if use_w3mmailer = y, don't ask mailer
* configure (RC_DIR): remove tailing /
* fm.h (Mailer): ifndef USE_W3MMAILER
* main.c (MAIN): ifndef USE_W3MMAILER getenv("MAILER")
* rc.c ("mailer"): ifndef USE_W3MMAILER
* regex.c (newRegex0): \ escape kanji chars
* url.c (searchURIMethods): need escape for -
* scripts/w3mmail.cgi.in: move $url, $qurl
* scripts/w3mmail.cgi.in: url_unquote $to
From: Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
Diffstat:
9 files changed, 45 insertions(+), 15 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,17 @@
+2002-01-22 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
+
+ * [w3m-dev 02877] some fixes for urimethodmap
+ * config.h.dist (RC_DIR): remove tailing /
+ * configure (mailer): if use_w3mmailer = y, don't ask mailer
+ * configure (RC_DIR): remove tailing /
+ * fm.h (Mailer): ifndef USE_W3MMAILER
+ * main.c (MAIN): ifndef USE_W3MMAILER getenv("MAILER")
+ * rc.c ("mailer"): ifndef USE_W3MMAILER
+ * regex.c (newRegex0): \ escape kanji chars
+ * url.c (searchURIMethods): need escape for -
+ * scripts/w3mmail.cgi.in: move $url, $qurl
+ * scripts/w3mmail.cgi.in: url_unquote $to
+
2002-01-21 Fumitoshi UKAI <ukai@debian.or.jp>
* [w3m-dev 02876] w3mmail.cgi.in backport from w3mmee
diff --git a/config.h.dist b/config.h.dist
@@ -140,7 +140,7 @@ MODEL=Linux.i686-monster-ja
#define HELP_CGI "w3mhelp"
#define W3MCONFIG "w3mconfig"
-#define RC_DIR "~/.w3m/"
+#define RC_DIR "~/.w3m"
#define BOOKMARK "bookmark.html"
#define CONFIG_FILE "config"
#define KEYMAP_FILE "keymap"
diff --git a/configure b/configure
@@ -744,7 +744,8 @@ readdir "$ded"
editor=$_dir
echo "ded='$editor'" >> config.param
-if [ -z "$dmail" ] ; then
+if [ "$use_w3mmailer" != 'y' ]; then
+ if [ -z "$dmail" ] ; then
if ./which \mailx > /dev/null
then
dmail=`./which \mailx`
@@ -752,14 +753,16 @@ if [ -z "$dmail" ] ; then
dmail=`./which \mail`
fi
if [ -n "`echo $dmail | grep 'no'`" ] ; then dmail=mailx ; fi
+ fi
+ echo "Input your favorite mailer program."
+ Echo "(Default: $dmail) "
+ readdir "$dmail"
+ mailer=$_dir
+else
+ mailer="$dmail"
fi
-echo "Input your favorite mailer program."
-Echo "(Default: $dmail) "
-readdir "$dmail"
-mailer=$_dir
echo "dmail='$mailer'" >> config.param
-
if [ -z "$dbrowser" ] ; then
if ./which netscape > /dev/null
then
@@ -2086,7 +2089,7 @@ $def_use_help_cgi
#define HELP_CGI "w3mhelp"
#define W3MCONFIG "w3mconfig"
-#define RC_DIR "~/.w3m/"
+#define RC_DIR "~/.w3m"
#define BOOKMARK "bookmark.html"
#define CONFIG_FILE "config"
#define KEYMAP_FILE "keymap"
diff --git a/fm.h b/fm.h
@@ -748,7 +748,9 @@ global int retryAsHttp init(TRUE);
global int showLineNum init(FALSE);
global int show_srch_str init(TRUE);
global char *Editor init(DEF_EDITOR);
+#ifndef USE_W3MMAILER
global char *Mailer init(DEF_MAILER);
+#endif
global char *ExtBrowser init(DEF_EXT_BROWSER);
global char *ExtBrowser2 init(NULL);
global char *ExtBrowser3 init(NULL);
diff --git a/main.c b/main.c
@@ -439,8 +439,10 @@ MAIN(int argc, char **argv, char **envp)
if (Editor == NULL && (p = getenv("EDITOR")) != NULL)
Editor = p;
+#ifndef USE_W3MMAILER
if (Mailer == NULL && (p = getenv("MAILER")) != NULL)
Mailer = p;
+#endif
/* argument search 2 */
i = 1;
@@ -4780,7 +4782,7 @@ void
w3m_exit(int i)
{
#ifdef USE_MIGEMO
- init_migemo(); /* close pipe to migemo */
+ init_migemo(); /* close pipe to migemo */
#endif
deleteFiles();
#ifdef USE_SSL
diff --git a/rc.c b/rc.c
@@ -529,7 +529,9 @@ struct param_ptr params6[] = {
CMT_URIMETHODMAP, NULL},
#endif
{"editor", P_STRING, PI_TEXT, (void *)&Editor, CMT_EDITOR, NULL},
+#ifndef USE_W3MMAILER
{"mailer", P_STRING, PI_TEXT, (void *)&Mailer, CMT_MAILER, NULL},
+#endif
{"extbrowser", P_STRING, PI_TEXT, (void *)&ExtBrowser, CMT_EXTBRZ, NULL},
{"extbrowser2", P_STRING, PI_TEXT, (void *)&ExtBrowser2, CMT_EXTBRZ2,
NULL},
diff --git a/regex.c b/regex.c
@@ -152,8 +152,15 @@ newRegex0(char **ex, int igncase, Regex *regex, char **msg, int level)
m = RE_WHICH;
while (*p != ']') {
if (*p == '\\') {
- *(st_ptr++) = *(p + 1);
- p += 2;
+ p++;
+#ifdef JP_CHARSET
+ if (IS_KANJI1(*p)) {
+ *(st_ptr++) = RE_KANJI(p);
+ p += 2;
+ }
+ else
+#endif
+ *(st_ptr++) = (unsigned char)*(p++);
}
else if (*p == '-') {
*(st_ptr++) = RE_WHICH_RANGE;
diff --git a/scripts/w3mmail.cgi.in b/scripts/w3mmail.cgi.in
@@ -6,20 +6,20 @@ $rcsid = q$Id$;
$query = $ENV{'QUERY_STRING'};
$local_cookie = $ENV{'LOCAL_COOKIE'};
-$url = $query;
$SENDMAIL = '/usr/lib/sendmail';
$SENDMAIL = '/usr/sbin/sendmail' if -x '/usr/sbin/sendmail';
$SENDMAIL_OPT = '-oi -t';
-$qurl = &html_quote($url);
-
if ($query =~ s/^\w+://) {
+ $url = $query;
+ $qurl = &html_quote($url);
$to = $query;
$opt = '';
if ($to =~ /^([^?]*)\?(.*)$/) {
$to = $1;
$opt = $2;
}
+ $to = &url_unquote($to);
%opt = &parse_opt($opt);
@to = ($to);
diff --git a/url.c b/url.c
@@ -2081,7 +2081,7 @@ searchURIMethods(ParsedURL *pu)
* escaped = "%" hex hex
*/
-#define URI_PATTERN "[-;/?:@&=+$,a-zA-Z0-9_.!~*'()%]*"
+#define URI_PATTERN "[\\-;/?:@&=+$,a-zA-Z0-9_.!~*'()%]*"
void
chkExternalURIBuffer(Buffer *buf)
{