[mew-win32 04362] Re: 拡張子

INOUE Tomohiro <[email protected]>
Newsgroups gmane.mail.mew.windows
Message-ID <[email protected]>
井上です。

INOUE Tomohiro <[email protected]> wrote:
> Mew 5.0.50 (CVS) で試しながら気になったことをいくつか。
> 
> 1. mewl の -i の動作が拡張子に対応できていないような気がします。
> wdsgrep -m -p $HOME/Mail -s -q query で多数ヒットする場合でも、
> 'k /' した時には何も表示されません。

mewl.c を添付パッチのように修正すれば一応動くようになりました。パッチの
後半部分は incm を .mew 付きで出力するように修正した方が良いような気も
します。先の getline() のパッチとは独立です。

-- 井上 知洋
mewl.c.diff2 (text/plain, 744 B)
Index: mewl.c
===================================================================
RCS file: /cvsmew/mew/bin/mewl.c,v
retrieving revision 1.24
diff -u -r1.24 mewl.c
--- mewl.c	30 Mar 2006 10:40:19 -0000	1.24
+++ mewl.c	1 Apr 2006 13:00:09 -0000
@@ -910,9 +910,17 @@
 		if (isdigit((unsigned char)*p) == 0) continue;
 		*filename = p;
 		while (isdigit((unsigned char)*p)) p++;
+		if (STRCMP(p, Suffix)==0)
+			p = p + Suffix_len;
 		*p = NUL;
 		fp = fopen(*filename, FDREAD);
 		if (fp != NULL) return fp;
+		/* incm? */
+		if (strlen(*filename) + Suffix_len >= sizeof(Buf_filenm))
+			warn_exit("file name is too long.");
+		strncat(p, Suffix, Suffix_len);
+		fp = fopen(*filename, FDREAD);
+		if (fp != NULL) return fp;
 	}
 	return NULL;
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.