From 004f4abe6e6e139f94aea16c6569ecada95f4fb8 Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Mon, 21 Jan 2002 15:56:12 +0000 Subject: [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 --- ChangeLog | 16 +++++++++++++++- config.h.dist | 2 +- configure | 19 +++++++++++-------- fm.h | 4 +++- main.c | 6 ++++-- rc.c | 4 +++- regex.c | 13 ++++++++++--- scripts/w3mmail.cgi.in | 8 ++++---- url.c | 4 ++-- 9 files changed, 53 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index a76c9d0..252919f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2002-01-22 Hironori Sakamoto + + * [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 * [w3m-dev 02876] w3mmail.cgi.in backport from w3mmee @@ -2149,4 +2163,4 @@ * release-0-2-1 * import w3m-0.2.1 -$Id: ChangeLog,v 1.244 2002/01/20 17:06:42 ukai Exp $ +$Id: ChangeLog,v 1.245 2002/01/21 15:56:12 ukai Exp $ diff --git a/config.h.dist b/config.h.dist index 49c06a9..b7cc222 100644 --- 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 index ee0308b..1dfcd68 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: configure,v 1.54 2002/01/18 13:06:14 ukai Exp $ +# $Id: configure,v 1.55 2002/01/21 15:56:13 ukai Exp $ # Configuration. # @@ -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 index 1bbdbb9..652c7ba 100644 --- a/fm.h +++ b/fm.h @@ -1,4 +1,4 @@ -/* $Id: fm.h,v 1.40 2002/01/16 16:49:54 ukai Exp $ */ +/* $Id: fm.h,v 1.41 2002/01/21 15:56:13 ukai Exp $ */ /* * w3m: WWW wo Miru utility * @@ -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 index d44750d..a05cb99 100644 --- a/main.c +++ b/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.66 2002/01/17 15:05:43 ukai Exp $ */ +/* $Id: main.c,v 1.67 2002/01/21 15:56:13 ukai Exp $ */ #define MAINPROGRAM #include "fm.h" #include @@ -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 index 6a1e3b3..d5db499 100644 --- a/rc.c +++ b/rc.c @@ -1,4 +1,4 @@ -/* $Id: rc.c,v 1.31 2002/01/16 16:49:54 ukai Exp $ */ +/* $Id: rc.c,v 1.32 2002/01/21 15:56:13 ukai Exp $ */ /* * Initialization file etc. */ @@ -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 index f26d9b8..7311eab 100644 --- a/regex.c +++ b/regex.c @@ -1,4 +1,4 @@ -/* $Id: regex.c,v 1.13 2002/01/16 04:38:06 ukai Exp $ */ +/* $Id: regex.c,v 1.14 2002/01/21 15:56:13 ukai Exp $ */ /* * regex: Regular expression pattern match library * @@ -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 index 30d098e..5602ee5 100755 --- a/scripts/w3mmail.cgi.in +++ b/scripts/w3mmail.cgi.in @@ -1,25 +1,25 @@ #!@PERL@ -$rcsid = q$Id: w3mmail.cgi.in,v 1.4 2002/01/20 17:06:42 ukai Exp $; +$rcsid = q$Id: w3mmail.cgi.in,v 1.5 2002/01/21 15:56:13 ukai Exp $; ($id = $rcsid) =~ s/^.*,v ([\d\.]*).*/$1/; ($prog=$0) =~ s/.*\///; $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 index e9fecd5..940aac3 100644 --- a/url.c +++ b/url.c @@ -1,4 +1,4 @@ -/* $Id: url.c,v 1.35 2002/01/17 11:06:45 ukai Exp $ */ +/* $Id: url.c,v 1.36 2002/01/21 15:56:13 ukai Exp $ */ #include "fm.h" #include #include @@ -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) { -- cgit v1.2.3