├── bin ├── hs │ ├── Setup.hs │ ├── Makefile │ ├── README.md │ ├── Param.hs │ ├── Msg.hs │ ├── Util.hs │ ├── mew.cabal │ ├── smew.hs │ ├── cmew.hs │ ├── Search.hs │ ├── Mail.hs │ └── Sql.hs ├── mew-pinentry.1 ├── mewest.1 ├── cmew.1 ├── smew.1 ├── configure.ac ├── Makefile.w32 ├── mew-pinentry.in ├── w32 │ ├── dirent.h │ ├── config.h │ ├── dirent.c │ └── w32.h ├── mewencode.1 ├── Makefile.in ├── mewl.1 ├── incm.1 ├── mew.h ├── utils.c ├── smew ├── config.h.in └── mewest ├── etc ├── Mew.png ├── Mew.xpm ├── mew-sep.xpm ├── mew-lock.xpm ├── mew-cite.xpm ├── mew-next.xpm ├── mew-prev.xpm ├── mew-send.xpm ├── mew-show.xpm ├── mew-yank.xpm ├── mew-attach.xpm ├── mew-queue.xpm ├── mew-refile.xpm ├── mew-reply.xpm ├── mew-write.xpm ├── mew-forward.xpm ├── mew-pgp-enc.xpm ├── mew-pgp-sign.xpm ├── mew-pgp-sigenc.xpm ├── mew-inc.xpm ├── mew-Blank.xpm ├── mew-Text.xpm ├── mew-Folder.xpm ├── mew-Unknown.xpm ├── mew-Audio.xpm ├── mew-External.xpm ├── mew-Postscript.xpm ├── mew-Rfc822.xpm ├── mew-Image.xpm ├── mew-Video.xpm └── mew-Octet-Stream.xpm ├── elisp ├── mew-lang-kr.el ├── mew-env0.el ├── mew-lang-latin.el ├── mew-blvs.el ├── mew-auth.el ├── mew-fib.el ├── mew-demo.el ├── mew-darwin.el ├── Makefile ├── mew-unix.el └── mew-mule.el ├── .gitignore ├── CHANGES ├── v6.5.md ├── v6.7.md ├── v6.8.md ├── v6.3.md ├── gitlog2mewchanges ├── v6.4.md ├── v5.2.md ├── v6.2.md ├── v6.9.md └── v4.2.md ├── LICENSE.ja ├── README.md ├── INSTALL.md ├── conf ├── dot.emacs └── dot.theme ├── LICENSE ├── info └── Makefile ├── configure.ac ├── Makefile.in └── API.md /bin/hs/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /etc/Mew.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kazu-yamamoto/Mew/HEAD/etc/Mew.png -------------------------------------------------------------------------------- /etc/Mew.xpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kazu-yamamoto/Mew/HEAD/etc/Mew.xpm -------------------------------------------------------------------------------- /elisp/mew-lang-kr.el: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kazu-yamamoto/Mew/HEAD/elisp/mew-lang-kr.el -------------------------------------------------------------------------------- /bin/hs/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | cabal configure 3 | cabal build 4 | 5 | install: 6 | cabal install $(OPT) 7 | 8 | clean: 9 | rm -rf dist 10 | -------------------------------------------------------------------------------- /bin/hs/README.md: -------------------------------------------------------------------------------- 1 | # `cmew` and `smew` in Haskell 2 | 3 | ## Installation 4 | 5 | ### Install "stack" 6 | 7 | https://docs.haskellstack.org/en/stable/README/ 8 | 9 | ### Compile 10 | 11 | ``` 12 | % stack init 13 | % stack build 14 | % stack --local-bin-path . install 15 | ``` 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.elc 2 | *.o 3 | *.log 4 | *.hi 5 | config.h 6 | config.status 7 | temp.el 8 | Makefile 9 | bin/Makefile 10 | bin/incm 11 | bin/incm.exe 12 | bin/mew-pinentry 13 | bin/mewcat 14 | bin/mewcat.exe 15 | bin/mewdecode 16 | bin/mewdecode.exe 17 | bin/mewencode 18 | bin/mewencode.exe 19 | bin/mewl 20 | bin/mewl.exe 21 | bin/hs/smew 22 | bin/hs/smew.exe 23 | bin/hs/cmew 24 | bin/hs/cmew.exe 25 | bin/hs/dist 26 | TAGS 27 | info/dir 28 | -------------------------------------------------------------------------------- /bin/hs/Param.hs: -------------------------------------------------------------------------------- 1 | module Param where 2 | 3 | type Regexp = String 4 | 5 | defaultDB :: FilePath 6 | defaultDB = "~/Mail/id.db" 7 | 8 | defaultMailDir :: FilePath 9 | defaultMailDir = "~/Mail" 10 | 11 | defaultIgnoreRegex :: Regexp 12 | defaultIgnoreRegex = "^casket" -- including casket_replica 13 | 14 | defaultMessageRegex :: Regexp 15 | defaultMessageRegex = "^[0-9]+(\\.mew)?$" 16 | 17 | defaultDirModFile :: FilePath 18 | defaultDirModFile = ".mew-mtime" 19 | 20 | defaultTarget :: Maybe FilePath 21 | defaultTarget = Nothing 22 | -------------------------------------------------------------------------------- /bin/mew-pinentry.1: -------------------------------------------------------------------------------- 1 | .\" Unlimited permission is granted to use, copy, distribute and/or modify 2 | .\" this file. There is NO WARRANTY. 3 | .TH MEW-PINENTRY 1 "October 18, 2006" 4 | .SH NAME 5 | mew-pinentry - simple pinentry for gpg-agent 6 | .\" 7 | .SH SYNOPSIS 8 | mew-pinentry 9 | .\" 10 | .SH DESCRIPTION 11 | The 12 | .B mew-pinentry 13 | utility is a simple pinentry for gpg-agent. 14 | It is a front end to ask a passphrase to a user. 15 | .PP 16 | You may configure "~/.gnupg/gpg-agent.conf" to tell "gpg-agent" the path. 17 | .\" 18 | -------------------------------------------------------------------------------- /etc/mew-sep.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | /* 3 | * Copyright (C) 1997 Kazu Yamamoto 4 | * Copyright notice is the same as Mew's one. 5 | */ 6 | static char * mew_sep_xpm[] = { 7 | "2 28 1 1", 8 | " s backgroundToolBarColor c None", 9 | " ", 10 | " ", 11 | " ", 12 | " ", 13 | " ", 14 | " ", 15 | " ", 16 | " ", 17 | " ", 18 | " ", 19 | " ", 20 | " ", 21 | " ", 22 | " ", 23 | " ", 24 | " ", 25 | " ", 26 | " ", 27 | " ", 28 | " ", 29 | " ", 30 | " ", 31 | " ", 32 | " ", 33 | " ", 34 | " ", 35 | " ", 36 | " "}; 37 | -------------------------------------------------------------------------------- /CHANGES/v6.5.md: -------------------------------------------------------------------------------- 1 | Mew 6.5 stable release (2012/04/16) 2 | 3 | Mew 6.5rc2 (2012/04/05) 4 | 5 | * Checking libwrap for stunnel. 6 | * Supporting stunnel 4.53. 7 | TAKANO Yuji 8 | * Disabling libwrap. 9 | ARAI Shun-ichi 10 | 11 | Mew 6.5rc1 (2012/03/28) 12 | 13 | * Workaround of cmew for Ruby 1.9. 14 | Tatsuya Kinoshita 15 | * mew-make-temp-name allows non-ASCII characters 16 | Yoshinari Nomura 17 | 18 | Mew 6.4.50 (2012/03/07) 19 | 20 | * Supporting stunnel 4.51. 21 | Seiji Ariga 22 | * Hilighting HTML produced by w3m. 23 | * Fixing regex of mew-regex-ignore-scan-body-list. 24 | Tatsuya Kinoshita 25 | * Fixing cmew bugs. 26 | -------------------------------------------------------------------------------- /bin/mewest.1: -------------------------------------------------------------------------------- 1 | .\" Unlimited permission is granted to use, copy, distribute and/or modify 2 | .\" this file. There is NO WARRANTY. 3 | .TH MEWEST 1 "July 25, 2006" 4 | .SH NAME 5 | mewest - register messages into an index for Hyper Estraier 6 | .\" 7 | .SH SYNOPSIS 8 | mewest 9 | .RI [ options ] 10 | .RI [ directory ] 11 | .\" 12 | .SH DESCRIPTION 13 | The 14 | .B mewest 15 | utility registers messages into an index for Hyper Estraier. 16 | ${HOME}/Mail directory is used by default. 17 | This command requires the estcmd command. 18 | .PP 19 | The options are as follows: 20 | .TP 8 21 | .B \-s 22 | Suffix for mail file. Default value is '.mew'. 23 | .TP 8 24 | .B \-v 25 | Verbose mode. 26 | .TP 8 27 | .B \-h 28 | Display help message. 29 | .\" 30 | -------------------------------------------------------------------------------- /elisp/mew-env0.el: -------------------------------------------------------------------------------- 1 | ;;; -*- lexical-binding: nil; -*- 2 | (cond 3 | ((>= emacs-major-version 24) 4 | ;; this must be macro. If implemented as a function, its behavior 5 | ;; is changed. 6 | (defmacro mew-called-interactively-p () 7 | '(called-interactively-p 'interactive))) 8 | (t 9 | (defalias 'mew-called-interactively-p 'called-interactively-p))) 10 | 11 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 12 | ;;; 13 | ;;; Suppressing warnings at compile 14 | ;;; 15 | 16 | (defmacro mew-no-warning-defvar (var-name) 17 | `(unless (boundp ',var-name) (defvar ,var-name nil))) 18 | 19 | (defmacro mew-no-warning-defun (func-name) 20 | `(unless (fboundp ',func-name) (defun ,func-name(&rest _args) nil))) 21 | 22 | (provide 'mew-env0) 23 | -------------------------------------------------------------------------------- /etc/mew-lock.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | /* 3 | * Copyright (C) 2003 Yuuichi Teranishi 4 | * Copyright (C) 2003 Kazu Yamamoto 5 | * Copyright (C) 2004 Yoshifumi Nishida 6 | * Copyright notice is the same as Mew's one. 7 | */ 8 | static char * yellow3_xpm[] = { 9 | "14 14 7 1", 10 | " c None", 11 | ". c #B07403", 12 | "+ c #EFEE38", 13 | "@ c #603300", 14 | "# c #D0A607", 15 | "$ c #FAFC90", 16 | "% c #241100", 17 | " .++++@ ", 18 | " .+@...+@ ", 19 | " .+@ .+@ ", 20 | " .+@ .+@ ", 21 | " .+@ .+@ ", 22 | "++########@@@@", 23 | "+$$++++++++#@@", 24 | "+$++++%@+++#@@", 25 | "+$+++%%%@++#@@", 26 | "+$+++%%%@++#@@", 27 | "+$++++%@+++#@@", 28 | "+$++++%@+++#@@", 29 | "+$+++++++++#@@", 30 | "++@@@@@@@@@@@@"}; 31 | -------------------------------------------------------------------------------- /bin/hs/Msg.hs: -------------------------------------------------------------------------------- 1 | module Msg where 2 | 3 | import Database.HDBC 4 | 5 | type ID = String 6 | 7 | data Msg = Msg { myid :: ID 8 | , path :: FilePath 9 | , paid :: ID 10 | , date :: String 11 | } deriving (Eq, Show) 12 | 13 | toMsg :: [SqlValue] -> Msg 14 | toMsg [a,b,c,d] = Msg { myid = fromSQL a 15 | , path = fromSQL b 16 | , paid = fromSQL c 17 | , date = fromSQL d 18 | } 19 | where 20 | fromSQL SqlNull = "" 21 | fromSQL x = fromSql x 22 | 23 | toMsg _ = error "toMsg" 24 | 25 | fromMsg :: Msg -> [SqlValue] 26 | fromMsg msg = [ toSql (myid msg) 27 | , toSql (path msg) 28 | , toSql (paid msg) 29 | , toSql (date msg) 30 | ] 31 | -------------------------------------------------------------------------------- /LICENSE.ja: -------------------------------------------------------------------------------- 1 | (注) 以下は日本語の方が分かりやすい人のために、英語の著作権表示を訳し 2 | た文章である。正式な著作権は、英語の原本に従う。 3 | 4 | Copyright (C) 1994-2025 Mew developing team. 5 | All rights reserved. 6 | 7 | 変更の有無にかかわらず、ソースおよびバイナリ形式の再配布および利用は、 8 | 以下の条件を満たしていれば、これを許可する。 9 | 10 | 1. ソース・コードの再配布は、上記の著作権表示、この条件項目、および、 11 | 以下の免責事項を保存しなければならない。 12 | 13 | 2. バイナリ形式の再配布は、上記の著作権表示、この条件項目、および、以 14 | 下の免責事項を、その配布に付随する説明書、あるいはその他の資料のいずれ 15 | かに明記しなければならない。 16 | 17 | 3. 前もって特別に許諾を得ない限り、このソフトウェアから派生した製品の 18 | 推奨や販売促進のために、このチーム名と貢献者達の名前を利用してはならな 19 | い。 20 | 21 | このソフトウェアは「このままの形で」提供され、明示的あるいは言外の保証 22 | は、商用利用および特定目的への適合に対する言外の保証も含み、またこれら 23 | だけに限らず、存在しない。たとえ以下のような損害の可能性を示唆されてい 24 | たとしても、どのような形にしろこのソフトウェアの利用から発生した問題に 25 | おいて、このチームと貢献者達は、(代替製品やサービスの調達; 利用権、デー 26 | タ、あるいは利益の損失; あるいは営業の中断を含む、またこれらだけに限ら 27 | ず)直接的に、間接的に、偶然に、特別に、懲罰上、あるいは、必然的に生じ 28 | てしまった損害に対し責任はなく、いかなる責任理論上でも契約の有無に係わ 29 | らず厳密な責任はなく、また(過失あるいはその他を含む)不法行為に対しても 30 | 責任はない。 31 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Mew (Messaging in the Emacs World) 2 | 3 | Mew is a mail-reader on Emacs, which is free to use and whose source code is open. 4 | 5 | ## Privacy policy 6 | 7 | Users need to configure their e-mail addresses and e-mail servers but such information is not sent anywhere. Users are not tracked at all. 8 | 9 | ## Information 10 | 11 | - Home page: [http://www.mew.org/](http://www.mew.org/) 12 | 13 | - Installation: The github version is available via [MELPA](http://melpa.milkbox.net/) and the latest stable release is available via [MELPA Stable](http://melpa-stable.milkbox.net). 14 | 15 | - Installation by hand: [INSTALL.md](INSTALL.md) 16 | 17 | - Developers: if you want to use Mew cloned from this repository, put the followings to your ".emacs". 18 | 19 | ```elisp 20 | (setq mew-icon-directory (expand-file-name "SHOMEWHERE/mew/etc")) 21 | (add-to-list 'image-load-path (expand-file-name "SHOMEWHERE/mew/etc")) 22 | ``` 23 | 24 | -------------------------------------------------------------------------------- /bin/cmew.1: -------------------------------------------------------------------------------- 1 | .\" Unlimited permission is granted to use, copy, distribute and/or modify 2 | .\" this file. There is NO WARRANTY. 3 | .TH CMEW 1 "February 17, 2008" 4 | .SH NAME 5 | cmew - create Mew's database file 6 | .\" 7 | .SH SYNOPSIS 8 | cmew 9 | .RI [ -f ] 10 | .RI [ db_file 11 | .RI [ maildir 12 | .RI [ ignore_regex 13 | .RI [ target_folder ]]]] 14 | .\" 15 | .SH DESCRIPTION 16 | The 17 | .B cmew 18 | utility creates a Message-ID database file with SQLite 3 for Mew. 19 | .PP 20 | .I db_file 21 | is a database file name. (default: "~/Mail/id.db") 22 | .PP 23 | .I maildir 24 | is a mail directory name. (default: "~/Mail") 25 | .PP 26 | .I ignore_regex 27 | is a regular expression for the mail directory names to not create the database. (default: "^\\./casket$|^\\./casket/|/\\.") 28 | .PP 29 | .I target_folder 30 | is a target folder. Information about messages contained in this 31 | folder only are updated. 32 | .\" 33 | .PP 34 | The options are as follows: 35 | .TP 8 36 | .B \-f 37 | Full update. Unless this option is specified, incremental update is used. 38 | -------------------------------------------------------------------------------- /bin/smew.1: -------------------------------------------------------------------------------- 1 | .\" Unlimited permission is granted to use, copy, distribute and/or modify 2 | .\" this file. There is NO WARRANTY. 3 | .TH SMEW 1 "February 17, 2008" 4 | .SH NAME 5 | smew - search related messages from Mew's database file 6 | .\" 7 | .SH SYNOPSIS 8 | smew 9 | .RI myid 10 | .RI [ mydb 11 | .RI [ mydir ]] 12 | .\" 13 | .SH DESCRIPTION 14 | The 15 | .B smew 16 | utility searches related messages from a Message-ID database file with SQLite 3 for Mew. 17 | .PP 18 | .I myid 19 | is a Message-ID of the message to search. 20 | .PP 21 | .I mydb 22 | is a database file name. (default: "~/Mail/id.db") 23 | .PP 24 | .I mydir 25 | is a directory part of the message in the database. Note that messages are contained as a relative path from "~/Mail". If multiple messages are found by 26 | .I myid 27 | , the first found one is preferred. However, the message whose directory is 28 | .I mydir 29 | is preferred to the first one. 30 | .\" 31 | .PP 32 | The options are as follows: 33 | .TP 8 34 | .B \-c 35 | Search a parent message only. 36 | .TP 8 37 | .B \-p 38 | Search a child message only. 39 | 40 | -------------------------------------------------------------------------------- /etc/mew-cite.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | /* 3 | * Copyright (C) 1997 Yuuichi Teranishi 4 | * Copyright (C) 1997 Kazu Yamamoto 5 | * Copyright notice is the same as Mew's one. 6 | */ 7 | static char * mew_cite_xpm[] = { 8 | "24 24 4 1", 9 | " s backgroundToolBarColor c None", 10 | ". c black", 11 | "X c white", 12 | "o c Gray60", 13 | " ", 14 | " ", 15 | "................... ", 16 | ".XXXXXXXXXXXXXXXXX. ", 17 | ".XXXXXXXXXXXX...XX. ", 18 | ".XXXXXXXXXXXX.o.XX. ", 19 | ".XXX.......XX...XX..... ", 20 | ".XXXXXXXXXXXXXXXXX.XXX. ", 21 | ".XXX.......XXX.XXX.XXX. ", 22 | ".XXXXXXXXXXXX.X.XX.XXX. ", 23 | ".X.XXXXXXXXXXX.XXX.XXX.o", 24 | ".X.XXXXXXXXXXXXXXX.XXX.o", 25 | "...................XXX.o", 26 | " o.oo.XXXXXXXXXXXXXXXX.o", 27 | " . .X.XXXo X....XXXX.o", 28 | " . .X..XXXXXXXXXXXXX.o", 29 | " ........Xo X....XXXX.o", 30 | " .X..XXXXXXXXXX....o", 31 | " .X.XXXo X....X.X.o ", 32 | " .XXXXXXXXXXXXX..o ", 33 | " ...............o ", 34 | " oooooooooooooo ", 35 | " ", 36 | " "}; 37 | -------------------------------------------------------------------------------- /etc/mew-next.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | /* 3 | * Copyright (C) 1997 Yuuichi Teranishi 4 | * Copyright (C) 1997 Kazu Yamamoto 5 | * Copyright notice is the same as Mew's one. 6 | */ 7 | static char * mew_next_xpm[] = { 8 | "24 24 4 1", 9 | " s backgroundToolBarColor c None", 10 | ". c black", 11 | "X c white", 12 | "o c Gray60", 13 | " ", 14 | " ", 15 | " ", 16 | " ", 17 | " ........ ", 18 | " .XXXXX.. ", 19 | " .Xoooo.. ", 20 | " .Xoooo.. ", 21 | " .Xoooo.. ", 22 | " .Xoooo.. ", 23 | " .Xoooo.. ", 24 | " .Xoooo.. ", 25 | " .Xoooo.. ", 26 | " ...Xoooo.... ", 27 | " .XXooooo.. ", 28 | " .XXooo.. ", 29 | " .XXo.. ", 30 | " .X.. ", 31 | " .. ", 32 | " ", 33 | " ", 34 | " ", 35 | " ", 36 | " "}; 37 | -------------------------------------------------------------------------------- /etc/mew-prev.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | /* 3 | * Copyright (C) 1997 Yuuichi Teranishi 4 | * Copyright (C) 1997 Kazu Yamamoto 5 | * Copyright notice is the same as Mew's one. 6 | */ 7 | static char * mew_prev_xpm[] = { 8 | "24 24 4 1", 9 | " s backgroundToolBarColor c None", 10 | ". c black", 11 | "X c white", 12 | "o c Gray60", 13 | " ", 14 | " ", 15 | " ", 16 | " ", 17 | " .. ", 18 | " .X.. ", 19 | " .XXo.. ", 20 | " .XXooo.. ", 21 | " .XXooooo.. ", 22 | " ...Xoooo.... ", 23 | " .Xoooo.. ", 24 | " .Xoooo.. ", 25 | " .Xoooo.. ", 26 | " .Xoooo.. ", 27 | " .Xoooo.. ", 28 | " .Xoooo.. ", 29 | " .Xoooo.. ", 30 | " .XXXXX.. ", 31 | " ........ ", 32 | " ", 33 | " ", 34 | " ", 35 | " ", 36 | " "}; 37 | -------------------------------------------------------------------------------- /etc/mew-send.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | /* 3 | * Copyright (C) 1997 Yuuichi Teranishi 4 | * Copyright (C) 1997 Kazu Yamamoto 5 | * Copyright notice is the same as Mew's one. 6 | */ 7 | static char * mew_send_xpm[] = { 8 | "24 24 4 1", 9 | " s backgroundToolBarColor c None", 10 | ". c black", 11 | "X c white", 12 | "o c Gray60", 13 | " ", 14 | " ", 15 | " ", 16 | " ", 17 | " ", 18 | " ", 19 | " ................", 20 | " .XXXXXXXXXXXXXXX.", 21 | " .XXXXXXXXXXoooXX. ", 22 | " .XXXXXXXXXXoooXX. ", 23 | " .XX.......XXXXXX. ", 24 | " .XXXXXXXXXXXXXXX. ", 25 | " .XX.......XXXXXX.ooooo", 26 | " .XXXXXXXXXXXXXXX.ooooo ", 27 | " ................ooooo ", 28 | " ooooooooooooooooo ", 29 | " ooooooooooooooooo ", 30 | " ooooooooooooooooo ", 31 | " ", 32 | " ", 33 | " ", 34 | " ", 35 | " ", 36 | " "}; 37 | -------------------------------------------------------------------------------- /etc/mew-show.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | /* 3 | * Copyright (C) 1997 Yuuichi Teranishi 4 | * Copyright (C) 1997 Kazu Yamamoto 5 | * Copyright notice is the same as Mew's one. 6 | */ 7 | static char * mew_show_xpm[] = { 8 | "24 24 4 1", 9 | " s backgroundToolBarColor c None", 10 | ". c black", 11 | "X c Gray60", 12 | "o c white", 13 | " ", 14 | " ", 15 | " ............. ", 16 | " ..Xoooooooooo.X ", 17 | " .o.Xoooooooooo.X ", 18 | " .oo.Xoooooooooo.X ", 19 | " .............ooo.X ", 20 | " .XXXXXoooooooooo.X ", 21 | " .ooooooooooooooo.X ", 22 | " .oo..........ooo.X ", 23 | " .ooooooooooooooo.X ", 24 | " .ooooooooooooooo.X ", 25 | " .oo..........ooo.X ", 26 | " .ooooooooooooooo.X ", 27 | " .ooooooooooooooo.X ", 28 | " .oo..........ooo.X ", 29 | " .ooooooooooooooo.X ", 30 | " .ooooooooooooooo.X ", 31 | " .ooooooooooooooo.X ", 32 | " .ooooooooooooooo.X ", 33 | " .................X ", 34 | " XXXXXXXXXXXXXXXXX ", 35 | " ", 36 | " "}; 37 | -------------------------------------------------------------------------------- /etc/mew-yank.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | /* 3 | * Copyright (C) 1997 Yuuichi Teranishi 4 | * Copyright (C) 1997 Kazu Yamamoto 5 | * Copyright notice is the same as Mew's one. 6 | */ 7 | static char * mew_yank_xpm[] = { 8 | "24 24 4 1", 9 | " s backgroundToolBarColor c None", 10 | ". c black", 11 | "X c white", 12 | "o c Gray60", 13 | " ", 14 | " ", 15 | "................... ", 16 | ".XXXXXXXXXXXXXXXXX. ", 17 | ".XXXXXXXXXXXX...XX. ", 18 | ".XXXXXXXXXXXX.o.XX. ", 19 | ".XXX.......XX...XX..... ", 20 | ".XXXXXXXXXXXXXXXXX.XXX. ", 21 | ".XXX.......XXX.XXX.XXX. ", 22 | ".XXXXXXXXXXXX.X.XX.XXX. ", 23 | ".X.XXXXXXXXXXX.XXX.XXX.o", 24 | ".X.XXXXXXXXXXXXXXX.XXX.o", 25 | "...................XXX.o", 26 | " o.oo.XXXXXXXXXXXXXXXX.o", 27 | " . .X.XXXXX......XXX.o", 28 | " . .X..XXXXXXXXXXXXX.o", 29 | " ........XXX......XXX.o", 30 | " .X..XXXXXXXXXX....o", 31 | " .X.XXXXX.......X.o ", 32 | " .XXXXXXXXXXXXX..o ", 33 | " ...............o ", 34 | " oooooooooooooo ", 35 | " ", 36 | " "}; 37 | -------------------------------------------------------------------------------- /etc/mew-attach.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | /* 3 | * Copyright (C) 1997 Yuuichi Teranishi 4 | * Copyright (C) 1997 Kazu Yamamoto 5 | * Copyright notice is the same as Mew's one. 6 | */ 7 | static char * mew_attach_xpm[] = { 8 | "24 24 4 1", 9 | " s backgroundToolBarColor c None", 10 | ". c black", 11 | "X c white", 12 | "o c Gray60", 13 | " ", 14 | ".............. ", 15 | ".XXXXXXXXXXXX. ", 16 | ".XXXXXXXXXXXX. ", 17 | ".XX.. . . ..X. ", 18 | ".XXXXXXXXXXXX. ", 19 | ".XX.. .............. ", 20 | ".XXXXX. . ", 21 | ".XX.. . o . ", 22 | ".XXXXX. o X. .. . ", 23 | ".XXXXX. XooX. .XX. . ", 24 | "....... Xoo.............", 25 | " ooooo. Xoo.oo.ooooo.oo.", 26 | " . ....oo..ooo..oo.", 27 | " . .oo.X...X.oo.", 28 | " . .oo.XXXXX.oo.", 29 | " ......oo.X.X.X.oo.", 30 | " .o.XX.X.XX.o.", 31 | " .oo.XX.XX.oo.", 32 | " .ooo.....ooo.", 33 | " .oo.XXXXX.oo.", 34 | " .............", 35 | " ", 36 | " "}; 37 | -------------------------------------------------------------------------------- /etc/mew-queue.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | /* 3 | * Copyright (C) 1997 Yuuichi Teranishi 4 | * Copyright (C) 1997 Kazu Yamamoto 5 | * Copyright notice is the same as Mew's one. 6 | */ 7 | static char * mew_comp_xpm[] = { 8 | "24 24 4 1", 9 | " s backgroundToolBarColor c None", 10 | ". c black", 11 | "X c white", 12 | "o c Gray60", 13 | " ", 14 | " ", 15 | " . ", 16 | " .X.o ", 17 | " .XXX.o ", 18 | " .XXXXX.o ", 19 | " .XXXoXXX.o ", 20 | " .XXXoXX XX. ", 21 | " ..XXXoXXoXX.oo ", 22 | " ...XXXoXXoXX.oo ", 23 | " ..X.XXXoXXoXX.oo ", 24 | " ..XX.XXXoXXoXX..o ", 25 | " ..XXXX.XXXXoXX. .. ", 26 | " .X.XXXX.XX XX. .X.o ", 27 | " .XX..XXX.XXX...XX.o ", 28 | " .XXXX..XX.X..XXXX.o ", 29 | " .XXXXXX....XXXXXX.o ", 30 | " .XXXXX XX XXXXX.o ", 31 | " .XXX XXXXXX XXX.o ", 32 | " .X XXXXXXXXXX X.o ", 33 | " ................oo ", 34 | " oooooooooooooooo ", 35 | " ", 36 | " "}; 37 | -------------------------------------------------------------------------------- /etc/mew-refile.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | /* 3 | * Copyright (C) 1997 Yuuichi Teranishi 4 | * Copyright (C) 1997 Kazu Yamamoto 5 | * Copyright notice is the same as Mew's one. 6 | */ 7 | static char * mew_refile_xpm[] = { 8 | "24 24 4 1", 9 | " s backgroundToolBarColor c None", 10 | ". c black", 11 | "X c white", 12 | "o c Gray60", 13 | " ", 14 | " .. ", 15 | " .XX. ", 16 | " o.XXXX. ", 17 | " .XXXXXX. ", 18 | " .XXXX.XX. ", 19 | " .XXXX.XX. ", 20 | " .XXXX.XX. ", 21 | " .... .X XXXX. ", 22 | " .XXXX.. .XXXX. ", 23 | " .XooooX.......... ", 24 | " .XoooooXXXXXXXX.. ", 25 | " .Xooooooooooooo.. ", 26 | " .Xooooooooooooo.. ", 27 | " .Xooooooooooooo.. ", 28 | " .Xooooooooooooo.. ", 29 | " .Xooooooooooooo.. ", 30 | " .Xooooooooooooo.. ", 31 | " .Xooooooooooooo.. ", 32 | " .X............... ", 33 | " ................. ", 34 | " ", 35 | " ", 36 | " "}; 37 | -------------------------------------------------------------------------------- /etc/mew-reply.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | /* 3 | * Copyright (C) 1997 Yuuichi Teranishi 4 | * Copyright (C) 1997 Kazu Yamamoto 5 | * Copyright notice is the same as Mew's one. 6 | */ 7 | static char * mew_reply_xpm[] = { 8 | "24 24 4 1", 9 | " s backgroundToolBarColor c None", 10 | ". c black", 11 | "X c white", 12 | "o c Gray60", 13 | " .. ", 14 | " .X. ", 15 | "............... ..XX. ", 16 | ".XXXXXXXXXXXXX. .XXXX. ", 17 | ".XXXXXXXXXXXXX..XXXX. ", 18 | ".XXXXX.........XXXXX. ", 19 | ".XXXXX.XXXXXX.XXXXX. ", 20 | ".XX....XXXXX.XXX.X..o ", 21 | ".XXXXX.XXXXX.XX.XX..o ", 22 | ".XXXXX.XXXX.XX.XX.X.o ", 23 | ".XX....XXX..X.XX.XX.o ", 24 | ".XXXXX.XXX.X.XX.XXX.o ", 25 | ".XXXXX.XXX..X..XXXX.o ", 26 | ".XX....XXX...XXXXXX.o ", 27 | ".XXXXX.XXX.XXXXXXXX.o ", 28 | ".XXXXX.XX.XX .oo ", 29 | ".XXXXX.X. .oooo", 30 | ".XXXXX.XXXXX .oo ", 31 | ".......XXXXXXXXXXXX.o ", 32 | " .XXXXXXXXXXXX.o ", 33 | " ..............o ", 34 | " ", 35 | " ", 36 | " "}; 37 | -------------------------------------------------------------------------------- /etc/mew-write.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | /* 3 | * Copyright (C) 1997 Yuuichi Teranishi 4 | * Copyright (C) 1997 Kazu Yamamoto 5 | * Copyright notice is the same as Mew's one. 6 | */ 7 | static char * mew_write_xpm[] = { 8 | "24 24 4 1", 9 | " s backgroundToolBarColor c None", 10 | ". c black", 11 | "X c white", 12 | "o c Gray60", 13 | " ", 14 | " ................... ", 15 | " .XXXXXXXXXX..XXX. ", 16 | " .XXXXXXXXX.XXXX. ", 17 | " .XXXXXXXX.XXXX.. ", 18 | " .XXXXXXX.XX.XX.. ", 19 | " .XXXXXX.XX.XX. . ", 20 | " .XXXXX.X.XX. X. ", 21 | " .XXXXX.X... XX. ", 22 | " .XXXXX... XXX. ", 23 | " .XXXXX.. XXXXX. ", 24 | " .XXXXX.. XXXXXX. ", 25 | " .XXXX. XXXXXXX. ", 26 | " .X.......XXXXXX. ", 27 | " .X.X oo..XXXXXX. ", 28 | " .X.......XXXXXX. ", 29 | " .XX.oo..XXXXXXX. ", 30 | " .XX.XX o..XXXXX. ", 31 | " ....oXX oo....... ", 32 | " .. oo.. ", 33 | " ..ooo.. ", 34 | " ..... ", 35 | " ", 36 | " "}; 37 | -------------------------------------------------------------------------------- /INSTALL.md: -------------------------------------------------------------------------------- 1 | # Installing Mew 6.9 2 | 3 | ## Platforms 4 | 5 | Mew now supports Emacs 26.1 or later only. 6 | 7 | ## Installation 8 | 9 | * Type `./configure`. 10 | 11 | * Type `make`. 12 | 13 | * Mew's info is formatted by Emacs 26.3. So, the info could not be 14 | visible with other Emacsen. In this case, type `make info` to format 15 | the info. 16 | 17 | * If you want to format the Japanese info, type `make jinfo`. 18 | 19 | *. Type `make install`. If you have the "install-info" command, the 20 | following line will be automatically added to the "dir" file. 21 | Otherwise, add it by yourself. 22 | 23 | ``` 24 | * Mew: (mew.info). Messaging in the Emacs World 25 | ``` 26 | 27 | * If you want the Japanese info, type `make install-jinfo`. If you 28 | have the "install-info" command, the following line will be 29 | automatically added to the "dir" file. Otherwise, add it by yourself. 30 | 31 | ``` 32 | * Mew-J: (mew.ja.info). Messaging in the Emacs World 33 | ``` 34 | 35 | * See info for configuring a site file/.emacs/.mew.el. 36 | See also ["conf/dot.emacs"](conf/dot.emacs) and 37 | ["conf/dot.mew"](conf/dot.mew). 38 | -------------------------------------------------------------------------------- /etc/mew-forward.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | /* 3 | * Copyright (C) 1997 Yuuichi Teranishi 4 | * Copyright (C) 1997 Kazu Yamamoto 5 | * Copyright notice is the same as Mew's one. 6 | */ 7 | static char * mew_forward_xpm[] = { 8 | "24 24 4 1", 9 | " s backgroundToolBarColor c None", 10 | ". c black", 11 | "X c white", 12 | "o c Gray60", 13 | " ", 14 | ".................. ", 15 | ".XXXXXXXXXXXXXXXX.o ", 16 | ".XXXXXXXXXXX...XX.o . ", 17 | ".XXXXXXXXXXX.o.XX.o.. ", 18 | ".XX.......XX...XX...... ", 19 | ".XXXXXXXXXXXXXXXX.o.. . ", 20 | ".XX.......XXXXXXX.o . . ", 21 | ".XXXXXXXXXXXXXXXX.o . ", 22 | ".XXXXXXXXXXXXXXXX.o . ", 23 | ".XXXXX..................", 24 | "......XXXXXXXXXXXXXXXX.o", 25 | " oooo.XXXXXXXXXXX...XX.o", 26 | " .XXXXXXXXXXX.o.XX.o", 27 | " .XX.......XX...XX.o", 28 | " .XXXXXXXXXXXXXXXX.o", 29 | " .XX.......XXX.XXX.o", 30 | " .XXXXXXXXXXX.X.XX.o", 31 | " .XXXXXXXXXXXX.XXX.o", 32 | " .XXXXXXXXXXXXXXXX.o", 33 | " ..................o", 34 | " oooooooooooooooooo", 35 | " ", 36 | " ",}; 37 | -------------------------------------------------------------------------------- /etc/mew-pgp-enc.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | /* 3 | * Copyright (C) 1997 Yuuichi Teranishi 4 | * Copyright (C) 1997 Kazu Yamamoto 5 | * Copyright notice is the same as Mew's one. 6 | */ 7 | static char * mew_pgp_enc_xpm[] = { 8 | "24 24 4 1", 9 | " s backgroundToolBarColor c None", 10 | ". c black", 11 | "X c white", 12 | "o c Gray60", 13 | " ", 14 | "............... ", 15 | ".XXXXXXXXXXXXX. ", 16 | ".X...X...X...X. ", 17 | ".X.X.X.X.X.X.X. ", 18 | ".X...X...X...X. ", 19 | ".X.XXXXX.X.XXX. ", 20 | ".X.XXX...X.XXX. XXXXX ", 21 | ".XXXXXXXXXXXXX.Xooooo ", 22 | "..............Xo....Xo. ", 23 | " Xo. Xo. ", 24 | " ooo Xo. Xo. ", 25 | "o...o XXXXXXXXXX.", 26 | "o. ooooooooo X oooooo..", 27 | "o. o....o... X oooooo..", 28 | "oooo. .. . X oooooo..", 29 | " ... X oooooo..", 30 | " X oooooo..", 31 | " X oooooo..", 32 | " ...........", 33 | " ", 34 | " ", 35 | " ", 36 | " "}; 37 | -------------------------------------------------------------------------------- /etc/mew-pgp-sign.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | /* 3 | * Copyright (C) 1997 Yuuichi Teranishi 4 | * Copyright (C) 1997 Kazu Yamamoto 5 | * Copyright notice is the same as Mew's one. 6 | */ 7 | static char * mew_pgp_sign_xpm[] = { 8 | "24 24 4 1", 9 | " s backgroundToolBarColor c None", 10 | ". c black", 11 | "X c white", 12 | "o c Gray60", 13 | " ", 14 | "............... .", 15 | ".XXXXXXXXXXXXX. .", 16 | ".X...X...X...X. ..", 17 | ".X.X.X.X.X.X.X. .X.", 18 | ".X...X...X...X. .XX.", 19 | ".X.XXXXX.X.XXX......XXX.", 20 | ".X.XXX...X.XXX.XXX.XXX. ", 21 | ".XXXXXXXXXXXXX.XX.XXXX. ", 22 | "...............X.XX. . ", 23 | " .XXXXXXXXXXXXXX.X. X. ", 24 | " .XXXXXXXXXXXXXX.. X.o ", 25 | " .XXXXXXXXXXXXXX.....o ", 26 | " .XXXXXXXXXXXXX. .o ", 27 | " .XX..XXXXXXXXX .ooo", 28 | " .X.X....XX..X.XX X..ooo", 29 | " ..XX.X.X.....X.X..X.o ", 30 | " .XX.X.X.X.XX.X..X.X.o ", 31 | " .XX.X.X.X...XX.X.XX.o ", 32 | " .XXXXXXXXXXXXXXXXXX.o ", 33 | " ....................o ", 34 | " oooooooooooooooooooo ", 35 | " ", 36 | " "}; 37 | -------------------------------------------------------------------------------- /etc/mew-pgp-sigenc.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | /* 3 | * Copyright (C) 1997 Yuuichi Teranishi 4 | * Copyright (C) 1997 Kazu Yamamoto 5 | * Copyright notice is the same as Mew's one. 6 | */ 7 | static char * mew_pgp_sigenc_xpm[] = { 8 | "24 24 4 1", 9 | " s backgroundToolBarColor c None", 10 | ". c black", 11 | "X c white", 12 | "o c Gray60", 13 | " ", 14 | "............... ", 15 | ".XXXXXXXXXXXXX. ", 16 | ".X...X...X...X. ", 17 | ".X.X.X.X.X.X.X. ", 18 | ".X...X...X...X. ", 19 | ".X.XXXXX.X.XXX. ", 20 | ".X.XXX...X.XXX. ", 21 | ".XXXXXXXXXXXX.. XXXXX ", 22 | "............. Xooooo ", 23 | " .X. Xo....Xo. ", 24 | " .XX. Xo. Xo. ", 25 | " .......XXX. Xo. Xo. ", 26 | " XXXXX.XX X. XXXXXXXXXX.", 27 | " XXXX.XX. . X oooooo..", 28 | " XXX.XX. X. X oooooo..", 29 | " XXX.X. X.X X oooooo..", 30 | " XXX.. X.o X oooooo..", 31 | " XXX.....ooooX oooooo..", 32 | " XX. .ooo X oooooo..", 33 | " X.XXXXX. ...........", 34 | " ", 35 | " ", 36 | " "}; 37 | -------------------------------------------------------------------------------- /conf/dot.emacs: -------------------------------------------------------------------------------- 1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2 | ;;; 3 | ;;; A sample file of .emacs or a site configuration file 4 | ;;; 5 | ; 6 | ; This is just a sample. You should customize as you like... 7 | ; 8 | 9 | (autoload 'mew "mew" nil t) 10 | (autoload 'mew-send "mew" nil t) 11 | 12 | ;; Optional setup (Read Mail menu): 13 | ;(setq read-mail-command 'mew) 14 | 15 | ;; Optional setup (e.g. C-xm for sending a message): 16 | ;(autoload 'mew-user-agent-compose "mew" nil t) 17 | ;(if (boundp 'mail-user-agent) 18 | ; (setq mail-user-agent 'mew-user-agent)) 19 | ;(if (fboundp 'define-mail-user-agent) 20 | ; (define-mail-user-agent 21 | ; 'mew-user-agent 22 | ; 'mew-user-agent-compose 23 | ; 'mew-draft-send-message 24 | ; 'mew-draft-kill 25 | ; 'mew-send-hook)) 26 | 27 | ;; If you are using Emacs with the --unibyte option or the 28 | ;; EMACS_UNIBYTE environment variable for Latin-1, put the following 29 | ;; into your "~/.emacs". 30 | ;(set-language-environment "Latin-1") 31 | ;(set-input-method "latin-1-prefix") ;; or "latin-1-postfix" 32 | ;; You MUST remove (standard-display-european 1) from your .emacs. 33 | 34 | ;;; 35 | ;;; End 36 | ;;; 37 | -------------------------------------------------------------------------------- /etc/mew-inc.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | /* 3 | * Copyright (C) 1997 Yoshiaki Kasahara 4 | * Copyright (C) 1997 Yuuichi Teranishi 5 | * Copyright (C) 1997 Kazu Yamamoto 6 | * Copyright notice is the same as Mew's one. 7 | */ 8 | static char * mew_inc_xpm[] = { 9 | "24 24 4 1", 10 | " s backgroundToolBarColor c None", 11 | ". c black", 12 | "X c Gray60", 13 | "o c white", 14 | " ", 15 | " ", 16 | " .............. ", 17 | " .XXX..X..oooooo. ", 18 | " .XXXXXX.XX.oooooo. ", 19 | " .XXXXXXX.XXX.ooooo. ", 20 | " .XXXXXX.X....oooooo.", 21 | " .XXXXXXX.X. .o...o.", 22 | " .XXXXXXX.X.....ooooo.", 23 | " .XXXXXXX.XXX.o.o...o.", 24 | " .XXXXXXX.XX.oo.oo.oo.", 25 | " .XXXXXXX.X.ooo.oo.oo.", 26 | " .XXXXXXX..ooo..oo.oo.", 27 | " .XXXXXXX.ooo.o.ooooo.", 28 | " .XXXXXX.oo..o..ooooo.", 29 | " .XXXXX.o..oooo.ooooo.", 30 | " .XXXX.o.oooooo.oooo..", 31 | " .XXXX..........oo.. ", 32 | " ................. ", 33 | " .ooooooooooooo. ", 34 | " .ooooooooooooo. ", 35 | " ", 36 | " ", 37 | " "}; 38 | -------------------------------------------------------------------------------- /bin/hs/Util.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ScopedTypeVariables #-} 2 | 3 | module Util where 4 | 5 | import Control.Exception as E 6 | import Data.List 7 | import Param 8 | import System.EasyFile 9 | import System.Environment 10 | import System.IO 11 | 12 | -- symbolic link to real link 13 | 14 | normalizePath :: FilePath -> IO FilePath 15 | normalizePath path = dropTrailingPathSeparator <$> (expandHome path >>= realPath) 16 | where 17 | realPath sym = canonicalizePath sym `E.catch` \(_::SomeException) -> return sym 18 | expandHome "" = expandHome defaultMailDir 19 | expandHome ('~':cs) = do 20 | mhome <- getHomeDirectory2 21 | case mhome of 22 | Just home -> return $ home ++ cs 23 | Nothing -> (++ cs) <$> getHomeDirectory 24 | expandHome dir 25 | | isRelative dir = expandHome (defaultMailDir dir) 26 | | otherwise = return dir 27 | 28 | help :: String -> IO () 29 | help message = getProgName >>= hPutStrLn stderr . (\prog -> "Usage: " ++ prog ++ " " ++ message) 30 | 31 | splitArgOpt :: [String] -> ([String],[String]) 32 | splitArgOpt as = (filter isArg as, filter isOpt as) 33 | where 34 | isArg = not . isOpt 35 | isOpt = ("-" `isPrefixOf`) 36 | -------------------------------------------------------------------------------- /CHANGES/v6.7.md: -------------------------------------------------------------------------------- 1 | Mew 6.7 (2015/08/04) 2 | 3 | * supporting GnuPG 2.1 for master password. 4 | * ver bumps up. 5 | * s/2014/2015/. 6 | * stop using discard-input. 7 | * Fix mew-scan-body() chips the last byte of the base64 decoded body 8 | Tatsuya Kinoshita 9 | * Match exactly on an email address to specify a user ID to GnuPG 10 | Tatsuya Kinoshita 11 | * Do not use exit|return with negative status code to fix bashism 12 | Tatsuya Kinoshita 13 | * Remove the trailing whitespace of w3m 14 | This whitespace was causing lines to wrap even when the text itself 15 | was correctly wrapped to the window width. 16 | Christophe Troestler 17 | * Drag and drop improvement in Windows environment 18 | UNC path files can be attached to draft mode by drag and drop. 19 | Masamichi Hosoda 20 | * updating auxiliary.el 21 | * Typo fix 22 | Tatsuya Kinoshita 23 | * Mention MELPA Stable 24 | Bozhidar Batsov 25 | * Choose last preferred part in multipart/alternative 26 | Tatsuya Kinoshita 27 | * Increase mew-header-reasonable-size to 10000 28 | Tatsuya Kinoshita 29 | * mew-summary-refile-report: Show warning when mew-header-reasonable-size does not cover the header 30 | of the selected message. 31 | Koichi Inoue 32 | -------------------------------------------------------------------------------- /bin/hs/mew.cabal: -------------------------------------------------------------------------------- 1 | cabal-version: >=1.8 2 | name: mew 3 | version: 0.1 4 | license: BSD3 5 | maintainer: Kazu Yamamoto 6 | author: Kazu Yamamoto 7 | homepage: http://www.mew.org/ 8 | synopsis: Sub-commands for Mew 9 | description: "smew" and "cmew" 10 | category: Mail 11 | build-type: Simple 12 | 13 | executable smew 14 | main-is: smew.hs 15 | other-modules: 16 | Msg 17 | Param 18 | Search 19 | Sql 20 | Util 21 | 22 | ghc-options: -Wall 23 | build-depends: 24 | base >=4 && <5, 25 | HDBC, 26 | HDBC-sqlite3, 27 | containers, 28 | easy-file, 29 | parsec 30 | 31 | executable cmew 32 | main-is: cmew.hs 33 | other-modules: 34 | Index 35 | Mail 36 | Msg 37 | Param 38 | Sql 39 | Util 40 | 41 | ghc-options: -Wall 42 | build-depends: 43 | base >=4 && <5, 44 | HDBC, 45 | HDBC-sqlite3, 46 | bytestring, 47 | containers, 48 | easy-file, 49 | parsec, 50 | regex-posix, 51 | time 52 | 53 | if os(windows) 54 | build-depends: Win32 55 | 56 | else 57 | build-depends: unix 58 | -------------------------------------------------------------------------------- /etc/mew-Blank.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | /* 3 | * Copyright (C) 1997 Yoshiaki Kasahara 4 | * Copyright (C) 1997 Kazu Yamamoto 5 | * Copyright notice is the same as Mew's one. 6 | */ 7 | static char * mew_Blank_xpm[] = { 8 | "28 28 4 1", 9 | " s backgroundToolBarColor c None", 10 | ". c black", 11 | "X c lightcyan", 12 | "o c gray50", 13 | " ", 14 | " ........................ ", 15 | " .XXXXXXXXXXXXXXXXXXXXXX. ", 16 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 17 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 18 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 19 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 20 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 21 | " .X .. XXXXXXXXXXXXX.XXX... ", 22 | " .X.XX.X.XX.XXXXXXXX.XXX... ", 23 | " .X.XX. .. .. . X . .. X... ", 24 | " .X.XX.X.XX.XXX.X.XX.X.X... ", 25 | " .X....X.XX.Xo..X.XX.X.X... ", 26 | " .X.XX.X.XX.X.X.X.XX.X.X... ", 27 | " .X.XX.X.XX.Xo... . .X.X... ", 28 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 29 | " .XXXXXXX.XXXXXXXXXXXXXX... ", 30 | " .XXXXXXX.XXXXXXXXXXXXXX... ", 31 | " .XXXXXXX.. X . X. . . X... ", 32 | " .XXXXXXX.X.X.X.X..X.X.X... ", 33 | " .XXXXXXX.X.X...X.XX...X... ", 34 | " .XXXXXXX.X.X.XXX.XX.XXX... ", 35 | " .XXXXXXX.X.X ..X.XX ..X... ", 36 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 37 | " .......................... ", 38 | " ........................ ", 39 | " ........................ ", 40 | " "}; 41 | -------------------------------------------------------------------------------- /etc/mew-Text.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | /* 3 | * Copyright (C) 1997 Yoshiaki Kasahara 4 | * Copyright (C) 1997 Kazu Yamamoto 5 | * Copyright notice is the same as Mew's one. 6 | */ 7 | static char * mew_Text_xpm[] = { 8 | "28 28 4 1", 9 | " s backgroundToolBarColor c None", 10 | ". c black", 11 | "X c lightcyan", 12 | "o c gray50", 13 | " ", 14 | " ........................ ", 15 | " .XXXXXXXXXXXXXXXXXXXXXX. ", 16 | " .XXXX XXXXXXXXXXXXXXXXX... ", 17 | " .XXXX.XXXXXXXXXXXXXXXXX... ", 18 | " .XXX . XXX..X.......XXX... ", 19 | " .XXXo oXXXXXXXXXXXXXXXX... ", 20 | " .XXX.X.XXX.....X..X..XX... ", 21 | " .XX ... XXXXXXXXXXXXXXX... ", 22 | " .XX. X .XX...X.X.....XX... ", 23 | " .X...X...XXXXXXXXXXXXXX... ", 24 | " .XXXXXXXXX....X.XXXXXXX... ", 25 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 26 | " .XXX.......X...X.X...XX... ", 27 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 28 | " .XX...X..X...X......XXX... ", 29 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 30 | " .XX.......X.X...X....XX... ", 31 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 32 | " .XXX...X..X.XXXXXXXXXXX... ", 33 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 34 | " .XXX.........X..X....XX... ", 35 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 36 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 37 | " .......................... ", 38 | " ........................ ", 39 | " ........................ ", 40 | " "}; 41 | -------------------------------------------------------------------------------- /etc/mew-Folder.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | /* 3 | * Copyright (C) 1997 Yuuichi Teranishi 4 | * Copyright (C) 1997 Kazu Yamamoto 5 | * Copyright notice is the same as Mew's one. 6 | */ 7 | static char * mew_Folder_xpm[] = { 8 | "28 28 5 1", 9 | " s backgroundToolBarColor c None", 10 | ". c black", 11 | "X c lightcyan", 12 | "o c gray60", 13 | "# c white", 14 | " ", 15 | " ........................ ", 16 | " .XXXXXXXXXXXXXXXXXXXXXX. ", 17 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 18 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 19 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 20 | " .XXXXX....XXXXXXXXXXXXX... ", 21 | " .XXXX.####..XXXXXXXXXXX... ", 22 | " .XXX.#oooo#..........XX... ", 23 | " .XXX.#ooooo########..XX... ", 24 | " .XXX.#ooooooooooooo..XX... ", 25 | " .XXX.#ooooooooooooo..XX... ", 26 | " .XXX.#ooooooooooooo..XX... ", 27 | " .XXX.#ooooooooooooo..XX... ", 28 | " .XXX.#ooooooooooooo..XX... ", 29 | " .XXX.#ooooooooooooo..XX... ", 30 | " .XXX.#ooooooooooooo..XX... ", 31 | " .XXX.#...............XX... ", 32 | " .XXX.................XX... ", 33 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 34 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 35 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 36 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 37 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 38 | " .......................... ", 39 | " ........................ ", 40 | " ........................ ", 41 | " "}; 42 | -------------------------------------------------------------------------------- /etc/mew-Unknown.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | /* 3 | * Copyright (C) 1997 Yoshiaki Kasahara 4 | * Copyright (C) 1997 Kazu Yamamoto 5 | * Copyright notice is the same as Mew's one. 6 | */ 7 | static char * mew_Unknown_xpm[] = { 8 | "28 28 5 1", 9 | " s backgroundToolBarColor c None", 10 | ". c black", 11 | "X c lightcyan", 12 | "o c gray50", 13 | "O c gray90", 14 | " ", 15 | " ........................ ", 16 | " .XXXXXXXXXXXXXXXXXXXXXX. ", 17 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 18 | " .XXXXXXXX ....o XXXXXXX... ", 19 | " .XXXXoXXo.OXXO .oXXooXX... ", 20 | " .XXXXXXo.OXXXXXo. XXXXX... ", 21 | " .XXooXX..XXoooXX.oXooXX... ", 22 | " .XXXXXX..oXXXXXX.oXXXXX... ", 23 | " .XXoooXo.oXoXoX . XoXXX... ", 24 | " .XXXXXXXoXXXXXXooXXXXXX... ", 25 | " .XXoXoXXXXooXXo. XXXXXX... ", 26 | " .XXXXXXXXXXXX .OXXXXXXX... ", 27 | " .XXXXooooXoXO.OXXoXXXXX... ", 28 | " .XXXXXXXXXXXooXXXXXXXXX... ", 29 | " .XXoooXooooX.XXooooXoXX... ", 30 | " .XXXXXXXXXXX XXXXXXXXXX... ", 31 | " .XXooooXoXoXXXoooXoooXX... ", 32 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 33 | " .XXXooooXoX . XoooXXXXX... ", 34 | " .XXXXXXXXXX...XXXXXXXXX... ", 35 | " .XXooXoooXX . XoooooXXX... ", 36 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 37 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 38 | " .......................... ", 39 | " ........................ ", 40 | " ........................ ", 41 | " "}; 42 | -------------------------------------------------------------------------------- /etc/mew-Audio.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | /* 3 | * Copyright (C) 1997 Yoshiaki Kasahara 4 | * Copyright (C) 1997 Kazu Yamamoto 5 | * Copyright notice is the same as Mew's one. 6 | */ 7 | static char * mew_Audio_xpm[] = { 8 | "28 28 6 1", 9 | " s backgroundToolBarColor c None", 10 | ". c black", 11 | "X c lightcyan", 12 | "o c gray90", 13 | "O c gray25", 14 | "+ c gray50", 15 | " ", 16 | " ........................ ", 17 | " .XXXXXXXXXXXXXXXXXXXXXX. ", 18 | " .XXXXooooooooooooooXXXX... ", 19 | " .XXXXo OXXXX... ", 20 | " .XXXXo OXXXX... ", 21 | " .XXXXo +. +.+ OXXXX... ", 22 | " .XXXXo .. .+. OXXXX... ", 23 | " .XXXXo +.+ OXXXX... ", 24 | " XXXXXo OXXXXX+. ", 25 | "o.OXXXo OXXXO.X. ", 26 | " X .XXo ... OXX. X+. ", 27 | " .XX.Xo ..... OX.XX... ", 28 | " .XXXXo ....... OXXXX... ", 29 | " .XXXXo ....+..+. OXXXXX+. ", 30 | " XXXXXo ...+O..O. OX....X. ", 31 | "o....Xo ......O+. OXXXXX+. ", 32 | " XXXXXo ....O+. OXXXX... ", 33 | " .XXXXo .+O+. OXXXX... ", 34 | " .XX.Xo ... OX.XX... ", 35 | " X .XXo OXX. X+. ", 36 | "o.OXXXo OXXXO.X. ", 37 | " XXXXXoOOOOOOOOOOOOOXXXXX+. ", 38 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 39 | " .......................... ", 40 | " ........................ ", 41 | " ........................ ", 42 | " "}; 43 | -------------------------------------------------------------------------------- /etc/mew-External.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | /* 3 | * Copyright (C) 1997 Yoshiaki Kasahara 4 | * Copyright (C) 1997 Kazu Yamamoto 5 | * Copyright notice is the same as Mew's one. 6 | */ 7 | static char * mew_External_xpm[] = { 8 | "28 28 6 1", 9 | " s backgroundToolBarColor c None", 10 | ". c black", 11 | "X c lightcyan", 12 | "o c gray50", 13 | "O c gray90", 14 | "+ c red", 15 | " ", 16 | " ........................ ", 17 | " .XXXXXXXXXXXXXXXXXXXXXXoOOO", 18 | " .XXXXXXXXXXXXXXXXXXXXX+++++", 19 | " .XXXXXXXXXXXXXXXXXXXX++++++", 20 | " .XXXXXXXXXXXXXXXXXXX+++++++", 21 | " .XXXXXXXXXXXXXXXXXXX+++++++", 22 | " .XXXXXXXXXXXXXXXXXX++++++++", 23 | " .XXXXXXXXXXXXXXXXXX+++XoooO", 24 | " .XXXXXXXXXXX+XXXXX+++XX... ", 25 | " .XXXXXXXXXX++XXXX+++XXX... ", 26 | " .XXXXXXXXX+++XX+++++XXX... ", 27 | " .XXXXXXXX++++++++++oooo... ", 28 | " .XXXXXXX+++++++++++oooo... ", 29 | " .XXXXXX+++++++++++ooooo...o", 30 | " .XXXXXXX+++++++++oooooo...o", 31 | " .XXXXXXXX++++++oooooooo...o", 32 | " .XXXXXXXXX+++XXXXXXXXXX...o", 33 | " .XXXXXXXXXX++XXXXXXXXXX...o", 34 | " .XXXXXXXXXXX+XXXXXXXXXX... ", 35 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 36 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 37 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 38 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 39 | " .......................... ", 40 | " ........................ ", 41 | " ........................ ", 42 | " "}; 43 | -------------------------------------------------------------------------------- /etc/mew-Postscript.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | /* 3 | * Copyright (C) 1997 Yoshiaki Kasahara 4 | * Copyright (C) 1997 Kazu Yamamoto 5 | * Copyright notice is the same as Mew's one. 6 | */ 7 | static char * mew_Postscript_xpm[] = { 8 | "28 28 6 1", 9 | " s backgroundToolBarColor c None", 10 | ". c black", 11 | "X c lightcyan", 12 | "o c pink", 13 | "O c gray50", 14 | "+ c red", 15 | " ", 16 | " ........................ ", 17 | " .XXXXXXXXXXXXXXXXXXXXXX. ", 18 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 19 | " .XX... X .. XXXXXXXXXXX... ", 20 | " .XX.XX.X.XX.XXXXXXXXXXX... ", 21 | " .XX.XX.X.XXXXXXXXXXXXXX... ", 22 | " .XX... X .. XXXXXXXXXXX... ", 23 | " .XX.XXXXXXX.XXXXXXXXXXX... ", 24 | " .XX.XXXX.XX.XXXXXXXXXXX... ", 25 | " .XX.XXXX .. XXXXXXXXoooOOO ", 26 | " .XXXXXXXXXXXXXXXo+++++++++ ", 27 | " .XXXXXXXXXXXXXo++oooXXXOOO+", 28 | " .XXXXXXXXXXXo++oXXXXXXX... ", 29 | " .XXXXXXXXXXo+oXXXXX OO... ", 30 | " .XXXXXXXXXX+oXXXX OOO ... ", 31 | " .XXXXXXXXXo+XXX OO XXXX...O", 32 | " .XXXXXXXXX+oXX O XXXXXX... ", 33 | " .XXXXXXXXo+XXXO XXXXXXX... ", 34 | " .XXXXXXXX+oXX OXXXXXXXX... ", 35 | " .XXXXXXXX+oXXO XXXXXXXX... ", 36 | " .XXXXXXXX+oX OXXXXXXXXX... ", 37 | " .XXXXXXXo+XX OXXXXXXXXX... ", 38 | " .XXXXXXXo+XXO XXXXXXXXX... ", 39 | " ........O+O............... ", 40 | " ......O+O............... ", 41 | " ......O+O............... ", 42 | " + O "}; 43 | -------------------------------------------------------------------------------- /etc/mew-Rfc822.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | /* 3 | * Copyright (C) 1997 Yoshiaki Kasahara 4 | * Copyright (C) 1997 Kazu Yamamoto 5 | * Copyright notice is the same as Mew's one. 6 | */ 7 | static char * mew_Rfc822_xpm[] = { 8 | "28 28 7 1", 9 | " s backgroundToolBarColor c None", 10 | ". c black", 11 | "X c lightcyan", 12 | "o c gray50", 13 | "O c white", 14 | "+ c brown", 15 | "@ c gray25", 16 | " ", 17 | " ........................ ", 18 | " .XXXXXXXXXXXXXXXXXXXXXX. ", 19 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 20 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 21 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 22 | " o.....................X... ", 23 | " o.OOOOOOOOOOOOOOOOOOO.X... ", 24 | " o.OOOOOOOOOOOOOOO+++O.o@.. ", 25 | " o.OOOOOOOOOOOOOOO.++O.o@.. ", 26 | " o.OO...........OO.@+O.o@.. ", 27 | " o.OOOOOOOOOOOOOOOOOOO.o@.. ", 28 | " o.OO.........OOOOOOOO.o@.. ", 29 | " o.OOOOOOOOOOOOOOOOOOO.o@.. ", 30 | " o.OOOOOOOOOOOOOOOOOOO.o@.. ", 31 | " o.OO......O....OOOOOO.o@.. ", 32 | " o.OOOOOOOOOOOOOOOOOOO.o@.. ", 33 | " o.OOOOOOOOOOOOOOOOOOO.o@.. ", 34 | " o.....................o@.. ", 35 | " .XXoooooooooooooooooooo@.. ", 36 | " .XXoooooooooooooooooooo@.. ", 37 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 38 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 39 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 40 | " .......................... ", 41 | " ........................ ", 42 | " ........................ ", 43 | " "}; 44 | -------------------------------------------------------------------------------- /CHANGES/v6.8.md: -------------------------------------------------------------------------------- 1 | Mew 6.8 (2018/06/07) 2 | 3 | * Using "gpg" for GnuPG 2 (GnuPG 2.1.23 or later). 4 | * Enable GB 18030 character set decoding. 5 | Add entry to mew-cs-database-for-decoding. 6 | Thomas Danckaert 7 | * Don't specify obsolete sslVersion 8 | Tatsuya Kinoshita 9 | * Supporting stunnel 5.45 10 | Tatsuya Kinoshita 11 | * Hiding anti-spam fields. 12 | * mewl.c: Expand MAX_HEADER size to 64k 13 | Yoshiaki Kasahara 14 | * IMAP to support Gmail extension 15 | Yoshinari Nomura 16 | * Change the default program to open office documents on Unix 17 | from "ooffice" to "soffice". 18 | * Add debug forms 19 | Michael Ernst 20 | * Support GnuPG 2.1.14 and 1.4.21 for old PGP 21 | Tatsuya Kinoshita 22 | * Supporting GnuPG 2. 23 | * Confirm to mkdir on mew-summary-save with nonexistent directory 24 | Yoshinari Nomura 25 | * Rearrange lines to make files more consistent. 26 | Michael Ernst 27 | * Add instructions for using Emacs's built-in HTML renderer as well as w3m 28 | Michael Ernst 29 | * Update documents for stunnel 5 30 | Tatsuya Kinoshita 31 | * Do not fail when MIME-Version is empty on decoding 32 | Tatsuya Kinoshita 33 | * Add documentation string for mew-subject-simplify-ml 34 | Michael Ernst 35 | * How to set mew-prog-ssl-arg for stunnel v5 36 | Michael Ernst 37 | * Update mailing list URLs 38 | Michael Ernst 39 | -------------------------------------------------------------------------------- /etc/mew-Image.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | /* 3 | * Copyright (C) 1997 Yoshiaki Kasahara 4 | * Copyright (C) 1997 Kazu Yamamoto 5 | * Copyright notice is the same as Mew's one. 6 | */ 7 | static char * mew_Image_xpm[] = { 8 | "28 28 8 1", 9 | " s backgroundToolBarColor c None", 10 | ". c black", 11 | "X c lightcyan", 12 | "o c white", 13 | "O c gray25", 14 | "+ c gray50", 15 | "@ c Yellow", 16 | "# c yellow4", 17 | " ", 18 | " ........................ ", 19 | " .XXXXXXXXXXXXXXXXXXXXXX. ", 20 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 21 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 22 | " .XXoooooooooooooooooXXX... ", 23 | " .XXo...............oXXX... ", 24 | " .XXo.o....OOO......o++X... ", 25 | " .XXo....OOOOOO@..o.o++X... ", 26 | " .XXo...OOOOOOO#@...o++X... ", 27 | " .XXo...OOOOOOOO@...o++X... ", 28 | " .XXo..OOOOOOOO#@#..o++X... ", 29 | " .XXo..OOOOOOOO@@@..o++X... ", 30 | " .XXo..OOOOOOO#@@#..o++X... ", 31 | " .XXo...OOOOO#@@@..@o++X... ", 32 | " .XXo...@#O#@@@@#...o++X... ", 33 | " .XXo....@@@@@@#....o++X... ", 34 | " .XXo......#@#....o.o++X... ", 35 | " .XXo...............o++X... ", 36 | " .XXooooooooooooooooo++X... ", 37 | " .XXXX+++++++++++++++++X... ", 38 | " .XXXX+++++++++++++++++X... ", 39 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 40 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 41 | " .......................... ", 42 | " ........................ ", 43 | " ........................ ", 44 | " "}; 45 | -------------------------------------------------------------------------------- /etc/mew-Video.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | /* 3 | * Copyright (C) 1997 Yoshiaki Kasahara 4 | * Copyright (C) 1997 Kazu Yamamoto 5 | * Copyright notice is the same as Mew's one. 6 | */ 7 | static char * mew_Video_xpm[] = { 8 | "28 28 8 1", 9 | " s backgroundToolBarColor c None", 10 | ". c black", 11 | "X c lightcyan", 12 | "o c brown", 13 | "O c gray50", 14 | "+ c white", 15 | "@ c gray25", 16 | "# c lightblue", 17 | " ", 18 | " ........................ ", 19 | " .XXXXXXXXXXXXXXXXXXXXXX. ", 20 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 21 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 22 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 23 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 24 | " .XooooooooooooooooooXXX... ", 25 | " .Xo................oXXX... ", 26 | " .X..................OOX... ", 27 | " .X..+@..######..@+..OOX... ", 28 | " .X.+@.O.######.O.@+.OOX... ", 29 | " .X.+@.O.######.O.@+.OOX... ", 30 | " .X..+@..######..@+..OOX... ", 31 | " .X..................OOX... ", 32 | " .X..................OOX... ", 33 | " .X..................OOX... ", 34 | " .XXXOOOOOOOOOOOOOOOOOOX... ", 35 | " .XXXOOOOOOOOOOOOOOOOOOX... ", 36 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 37 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 38 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 39 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 40 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 41 | " .......................... ", 42 | " ........................ ", 43 | " ........................ ", 44 | " "}; 45 | -------------------------------------------------------------------------------- /etc/mew-Octet-Stream.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | /* 3 | * Copyright (C) 1997 Yoshiaki Kasahara 4 | * Copyright (C) 1997 Kazu Yamamoto 5 | * Copyright notice is the same as Mew's one. 6 | */ 7 | static char * mew_OctetStream_xpm[] = { 8 | "28 28 8 1", 9 | " s backgroundToolBarColor c None", 10 | ". c black", 11 | "X c lightcyan", 12 | "o c gray90", 13 | "O c gray25", 14 | "+ c gray50", 15 | "@ c gold", 16 | "# c white", 17 | " ", 18 | " ........................ ", 19 | " .XXXXXXXXXXXXXXXXXXXXXX. ", 20 | " .XXXXXXXooooooooXXXXXXX... ", 21 | " .XX..O..++++++++..oXXXX... ", 22 | " .XX..O..+++++..+...oXXX... ", 23 | " .XX..O..+++++..+.@..oXX... ", 24 | " .XX..O..+++++..+....+oX... ", 25 | " .XX..O..+++++..+.@@.++X... ", 26 | " .XX..OOO++++++++....++X... ", 27 | " .XX.................++X... ", 28 | " .XX.................++X... ", 29 | " .XX..#############..++X... ", 30 | " .XX..#############..++X... ", 31 | " .XX..#############..++X... ", 32 | " .XX..#############..++X... ", 33 | " .XX..#############..++X... ", 34 | " .XX..#############..++X... ", 35 | " .XX..#############..++X... ", 36 | " .XX..#############..++X... ", 37 | " .XX..#############..++X... ", 38 | " .XXXX+++++++++++++++++X... ", 39 | " .XXXX+++++++++++++++++X... ", 40 | " .XXXXXXXXXXXXXXXXXXXXXX... ", 41 | " .......................... ", 42 | " ........................ ", 43 | " ........................ ", 44 | " "}; 45 | -------------------------------------------------------------------------------- /bin/configure.ac: -------------------------------------------------------------------------------- 1 | AC_INIT 2 | AC_CONFIG_SRCDIR([mewl.c]) 3 | 4 | AC_PROG_CC 5 | AC_PROG_INSTALL 6 | 7 | AC_C_CONST 8 | AC_TYPE_UID_T 9 | AC_TYPE_PID_T 10 | AC_TYPE_SIZE_T 11 | AC_CHECK_TYPE(useconds_t, int) 12 | AC_CHECK_TYPE(ssize_t, int) 13 | 14 | AC_EXEEXT 15 | AC_OBJEXT 16 | 17 | AC_CONFIG_HEADERS([config.h]) 18 | AC_HEADER_DIRENT 19 | AC_CHECK_HEADERS(dir.h unistd.h pwd.h fcntl.h io.h sys/time.h sys/file.h) 20 | AC_CHECK_LIB(z, main) 21 | AC_CHECK_FUNCS(strncasecmp strnicmp memmove fgetln fork getpwuid getlogin usleep Sleep setmode _setmode chdir _chdir2 chmod poll futimes fchmod flock lockf snprintf utimes) 22 | AH_TEMPLATE([HAVE_SIGALRM],[Define to 1 if SIGALRM is defined]) 23 | AC_MSG_CHECKING(if SIGALRM is defined) 24 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[int i = SIGALRM;]])],[mew_cv_sigalrm=yes],[mew_cv_sigalrm=no]) 25 | AC_MSG_RESULT($mew_cv_sigalrm) 26 | if test x$mew_cv_sigalrm = xyes; then 27 | AC_DEFINE(HAVE_SIGALRM) 28 | fi 29 | AH_TEMPLATE([HAVE_SIGHUP],[Define to 1 if SIGHUP is defined]) 30 | AC_MSG_CHECKING(if SIGHUP is defined) 31 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[int i = SIGHUP;]])],[mew_cv_sighup=yes],[mew_cv_sighup=no]) 32 | AC_MSG_RESULT($mew_cv_sighup) 33 | if test x$mew_cv_sighup = xyes; then 34 | AC_DEFINE(HAVE_SIGHUP) 35 | fi 36 | 37 | if test "$GCC" = "yes"; then 38 | CFLAGS="$CFLAGS -Wall" 39 | fi 40 | 41 | AC_CONFIG_FILES([Makefile]) 42 | AC_OUTPUT 43 | AC_CONFIG_FILES([mew-pinentry]) 44 | AC_OUTPUT 45 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 1994-2025 Mew developing team. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions 6 | are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 3. Neither the name of the team nor the names of its contributors 14 | may be used to endorse or promote products derived from this software 15 | without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND 18 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 20 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE 21 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 24 | BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 26 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 27 | IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /bin/hs/smew.hs: -------------------------------------------------------------------------------- 1 | ---------------------------------------------------------------- 2 | -- 3 | -- smew.hs 4 | -- 5 | 6 | module Main where 7 | 8 | import Data.List 9 | import Msg 10 | import Param 11 | import Search 12 | import System.Environment 13 | import Util 14 | 15 | -- ./smew '<20100105.154842.110627375.kazu@iij.ad.jp>' ~/Mail/id.db #imap/kazu@localhost#imap/work.mew-dist 16 | 17 | ---------------------------------------------------------------- 18 | 19 | helpMessage :: String 20 | helpMessage = "[-p|-c] id [db [dir]]" 21 | 22 | options :: [String] 23 | options = ["-p","-c"] 24 | 25 | ---------------------------------------------------------------- 26 | 27 | parseOpts :: [String] -> Maybe (Search [Msg]) 28 | parseOpts opts 29 | | opts == [] = Just searchFamily 30 | | unknown = Nothing 31 | | "-p" `elem` opts = Just searchMe -- to find a parent, specify pid 32 | | "-c" `elem` opts = Just searchChild 33 | | otherwise = Nothing 34 | where 35 | unknown = (opts `union` options) \\ options /= [] 36 | 37 | parseArgs :: [String] -> Maybe (ID,FilePath,FilePath) 38 | parseArgs [] = Nothing 39 | parseArgs [mid] = Just (mid, defaultDB, "") 40 | parseArgs [mid,db] = Just (mid, db, "") 41 | parseArgs [mid,db,dir] = Just (mid, db, dir) 42 | parseArgs _ = Nothing 43 | 44 | ---------------------------------------------------------------- 45 | 46 | main :: IO () 47 | main = do 48 | (args,opts) <- splitArgOpt <$> getArgs 49 | let mtri = parseArgs args 50 | mcmd = parseOpts opts 51 | exec mcmd mtri 52 | where 53 | exec (Just cmd) (Just (mid,db,dir)) = do 54 | db' <- normalizePath db 55 | dir' <- normalizePath dir 56 | withDB db' (cmd mid dir') >>= printResults 57 | exec _ _ = help helpMessage 58 | printResults = mapM_ (putStrLn . path) 59 | -------------------------------------------------------------------------------- /CHANGES/v6.3.md: -------------------------------------------------------------------------------- 1 | Mew 6.3 (2009/11/20) 2 | 3 | * mew-find-cs-region for iso-8859-1 and iso-8859-15. 4 | * mew-pgp-signer for old PGP. 5 | Tatsuya Kinoshita 6 | 7 | Mew 6.3 release candidate 2 (2009/11/02) 8 | 9 | * Maintaining backward compatibility of mew-find-cs-region on Emacs 23. 10 | * A patch for writefln() of d/smew. 11 | Masamichi HOSODA 12 | 13 | Mew 6.3 release candidate 1 (2009/10/16) 14 | 15 | * Flush in cmew. 16 | Hideyuki SHIRAI 17 | * Reducing stat() in cmew. 18 | Takahiro Kambe 19 | * Using last-command-event instead of last-command-char. 20 | Hideyuki SHIRAI 21 | * Binding large-file-warning-threshold to nil in 22 | mew-find-file-noselect2. 23 | Hideyuki SHIRAI 24 | 25 | Mew 6.2.52 (2009/08/12) 26 | 27 | * A patch for mew-warn-addresses. 28 | Yu-ji Hosokawa 29 | * Unibite buffer for image. 30 | Hideyuki SHIRAI 31 | * mode-id hack. 32 | Hideyuki SHIRAI 33 | * UTF-8 hack for Emacs 23. 34 | Hideyuki SHIRAI 35 | * A patch for warning. 36 | Hayashi Masahiro 37 | 38 | Mew 6.2.51 (2009/02/16) 39 | 40 | * Supporting NTEmacs. 41 | Hayashi Masahiro 42 | * A patch for mew-fill-match-adaptive-prefix. 43 | Takashi Masuda 44 | * Rescuing non-balanced parenthesis of addresses. 45 | * A patch for mew-input-folder-search-setup2 46 | KOIE Hidetaka 47 | * A patch for Makefile. 48 | Kazuyoshi Furutaka 49 | * Refile uses mew-case instead of mew-case-default. 50 | Hideyuki SHIRAI 51 | 52 | Mew 6.2.50 (2009/01/21) 53 | 54 | * Set IMAP's \Seen flag onto refiled messages. 55 | * Changing the timing of longlines-mode off. 56 | * A bug fix for mew-cite-prefix-username. 57 | * A patch for join. 58 | Hideyuki SHIRAI 59 | * chapter -> section in info. 60 | * Defining mew-fill-match-adaptive-prefix to save Emacs 21.4. 61 | 62 | -------------------------------------------------------------------------------- /bin/hs/cmew.hs: -------------------------------------------------------------------------------- 1 | ---------------------------------------------------------------- 2 | -- 3 | -- cmew.hs 4 | -- 5 | 6 | module Main where 7 | 8 | import Data.List 9 | import Index 10 | import Param 11 | import System.Environment 12 | import Util 13 | 14 | ---------------------------------------------------------------- 15 | 16 | helpMessage :: String 17 | helpMessage = "[-n] [-f] [db [dir [dignore_regex [target_folder]]]]" 18 | 19 | options :: [String] 20 | options = ["-n","-f"] 21 | 22 | parseOpts :: [String] -> Maybe (Bool,Bool) 23 | parseOpts opts 24 | | unknown = Nothing 25 | | otherwise = Just (dryRun, fullUpdate) 26 | where 27 | unknown = (opts `union` options) \\ options /= [] 28 | dryRun = "-n" `elem` opts 29 | fullUpdate = "-f" `elem` opts 30 | 31 | parseArgs :: [String] -> Maybe (FilePath,FilePath,Regexp,Maybe FilePath) 32 | parseArgs [] = Just (defaultDB,defaultMailDir,defaultIgnoreRegex,defaultTarget) 33 | parseArgs [db] = Just (db,defaultMailDir,defaultIgnoreRegex,defaultTarget) 34 | parseArgs [db,dir] = Just (db,dir,defaultIgnoreRegex,defaultTarget) 35 | parseArgs [db,dir,re] = Just (db,dir,re,defaultTarget) 36 | parseArgs [db,dir,re,subdir] = Just (db,dir,re,Just subdir) 37 | parseArgs _ = Nothing 38 | 39 | ---------------------------------------------------------------- 40 | 41 | main :: IO () 42 | main = do 43 | (args,opts) <- splitArgOpt <$> getArgs 44 | let mtri = parseArgs args 45 | mopt = parseOpts opts 46 | exec mopt mtri 47 | where 48 | exec (Just (dryRun,fullUpdate)) (Just (db,dir,re,target)) = do 49 | db' <- normalizePath db 50 | dir' <- normalizePath dir 51 | makeIndex dryRun fullUpdate db' dir' re target >>= printResults 52 | exec _ _ = help helpMessage 53 | printResults (reg,del) = putStrLn $ "Registered: " ++ show reg ++ ", deleted: " ++ show del 54 | -------------------------------------------------------------------------------- /bin/Makefile.w32: -------------------------------------------------------------------------------- 1 | # -*- Mode: makefile; -*- 2 | 3 | # 4 | # Makefile for mewl.exe/mewencode.exe 5 | # for Visual C++ / Borland C++ Compiler 6 | # 7 | 8 | # Note: 9 | # 1. If you want to use Cygwin, read ../00readme and follow its 10 | # instructionx. 11 | # 2. You need pre-compiled and original zlib packages. 12 | # Please download original tarball from 13 | # http://www.gzip.org/zlib/, 14 | # and put 15 | # zconf.h, zlib.h, zlib.lib 16 | # to suitable directory. 17 | # 2. If you want to use Borland C++ Compiler, you need import library. 18 | # > implib -a 19 | 20 | # **** Please modify **** 21 | ZLIBINC = C:/usr/local/zlib 22 | ZLIBLIB = C:/usr/local/zlib/zlib.lib 23 | 24 | # for Visual C++ 25 | CC = cl 26 | CFLAGS = -nologo -O2 -W3 -MT -Iw32 -I$(ZLIBINC) \ 27 | -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS 28 | EXEFLAG = -Fe 29 | 30 | # for Borland C++ 31 | #CC = bcc32 32 | #CFLAGS = -O2 -w -Iw32 -I$(ZLIBINC) 33 | #EXEFLAG = -e 34 | 35 | 36 | ################################################################ 37 | 38 | TARGET = mewencode.exe mewl.exe 39 | 40 | MEWENCODEOBJS = mewencode.obj utils.obj 41 | MEWLOBJS = mewl.obj utils.obj pattern.obj dirent.obj 42 | 43 | all : $(TARGET) 44 | 45 | config.h : w32\config.h 46 | copy w32\config.h config.h 47 | 48 | mewencode.exe : $(MEWENCODEOBJS) 49 | $(CC) $(CFLAGS) $(EXEFLAG)mewencode.exe $(MEWENCODEOBJS) $(ZLIBLIB) 50 | mewl.exe : $(MEWLOBJS) 51 | $(CC) $(CFLAGS) $(EXEFLAG)mewl.exe $(MEWLOBJS) 52 | 53 | mewencode.obj : mewencode.c mew.h config.h 54 | $(CC) $(CFLAGS) -c mewencode.c 55 | mewl.obj : mewl.c mew.h config.h 56 | $(CC) $(CFLAGS) -c mewl.c 57 | utils.obj : utils.c mew.h config.h 58 | $(CC) $(CFLAGS) -c utils.c 59 | pattern.obj : pattern.c mew.h config.h 60 | $(CC) $(CFLAGS) -c pattern.c 61 | dirent.obj : w32\dirent.c w32\dirent.h w32\w32.h 62 | $(CC) $(CFLAGS) -c w32\dirent.c 63 | -------------------------------------------------------------------------------- /bin/mew-pinentry.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # mew-pinentry:: a simple pinentry 4 | # 5 | # Author: Mew developing team 6 | # Created: Jul 24, 2006 7 | # Revised: May 15, 2007 8 | 9 | PROMPT="Enter passphrase:" 10 | TTY=`tty` 11 | 12 | echo "OK" 13 | while read cmd arg; do 14 | case $cmd in 15 | "OPTION") 16 | key=${arg%%=*} 17 | val=${arg#*=} 18 | if [ "X$key" = "Xttyname" ]; then 19 | TTY=$val 20 | fi 21 | ;; 22 | # "SETPROMPT") 23 | # PROMPT=$arg 24 | # ;; 25 | "GETPIN") 26 | echo @ECHO_N@ "$PROMPT @ECHO_C@" > $TTY 27 | stty -echo < $TTY 28 | read passwd < $TTY 29 | stty echo < $TTY 30 | echo "" > $TTY 31 | echo "D $passwd" 32 | ;; 33 | "BYE") 34 | # echo "OK" 35 | exit 0 36 | ;; 37 | "SETERROR") 38 | echo $arg > $TTY 39 | ;; 40 | esac 41 | echo "OK" 42 | done 43 | exit 0 44 | 45 | # Copyright (C) 2006-2007 Mew developing team. 46 | # All rights reserved. 47 | # 48 | # Redistribution and use in source and binary forms, with or without 49 | # modification, are permitted provided that the following conditions 50 | # are met: 51 | # 52 | # 1. Redistributions of source code must retain the above copyright 53 | # notice, this list of conditions and the following disclaimer. 54 | # 2. Redistributions in binary form must reproduce the above copyright 55 | # notice, this list of conditions and the following disclaimer in the 56 | # documentation and/or other materials provided with the distribution. 57 | # 3. Neither the name of the team nor the names of its contributors 58 | # may be used to endorse or promote products derived from this software 59 | # without specific prior written permission. 60 | # 61 | # THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND 62 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 63 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 64 | # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE 65 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 66 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 67 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 68 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 69 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 70 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 71 | # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 72 | -------------------------------------------------------------------------------- /bin/w32/dirent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * dirent.h 3 | * 4 | * Author: Shuichi Kitaguchi 5 | * Created: Jun 17, 2001 6 | * Revised: 7 | * 8 | * Code: 9 | */ 10 | 11 | #ifndef __DIRENT_H__ 12 | #define __DIRENT_H__ 13 | 14 | 15 | /* 16 | * Structures 17 | */ 18 | 19 | #define d_ino d_fileno 20 | 21 | struct dirent { 22 | DWORD d_fileno; 23 | BYTE d_namlen; 24 | char d_name[MAX_PATH + 1]; 25 | }; 26 | 27 | typedef struct _DIR { 28 | struct dirent dir; 29 | HANDLE hFind; 30 | char dd_filename[MAX_PATH+1]; 31 | } DIR; 32 | 33 | 34 | /* 35 | * Functions 36 | */ 37 | 38 | DIR *opendir(const char *); 39 | struct dirent *readdir(DIR *); 40 | int closedir(DIR *); 41 | 42 | 43 | #endif /* __DIRENT_H__ */ 44 | 45 | /* 46 | * Copyright (C) 2001-2003 Mew developing team. 47 | * All rights reserved. 48 | * 49 | * Redistribution and use in source and binary forms, with or without 50 | * modification, are permitted provided that the following conditions 51 | * are met: 52 | * 53 | * 1. Redistributions of source code must retain the above copyright 54 | * notice, this list of conditions and the following disclaimer. 55 | * 2. Redistributions in binary form must reproduce the above copyright 56 | * notice, this list of conditions and the following disclaimer in the 57 | * documentation and/or other materials provided with the distribution. 58 | * 3. Neither the name of the team nor the names of its contributors 59 | * may be used to endorse or promote products derived from this software 60 | * without specific prior written permission. 61 | * 62 | * THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND 63 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 64 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 65 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE 66 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 67 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 68 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 69 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 70 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 71 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 72 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 73 | */ 74 | 75 | /* 76 | * dirent.h ends here 77 | */ 78 | -------------------------------------------------------------------------------- /bin/w32/config.h: -------------------------------------------------------------------------------- 1 | #ifndef __CONFIG_H__ 2 | #define __CONFIG_H__ 3 | 4 | /* Define to empty if the keyword does not work. */ 5 | /* #undef const */ 6 | 7 | /* Define if you have the header file. */ 8 | #define HAVE_FCNTL_H 1 9 | 10 | /* Define if you have the header file. */ 11 | #define HAVE_DIRENT_H 1 12 | 13 | /* Define if you have the header file. */ 14 | #ifdef __BORLANDC__ 15 | #define HAVE_DIR_H 1 16 | #endif 17 | 18 | /* Define if you have the header file. */ 19 | #ifdef _MSC_VER 20 | #define HAVE_DIRECT_H 21 | #endif 22 | 23 | /* Define if you have the header file. */ 24 | /* #undef HAVE_NDIR_H */ 25 | 26 | /* Define if you have the header file. */ 27 | /* #undef HAVE_SYS_DIR_H */ 28 | 29 | /* Define if you have the header file. */ 30 | /* #undef HAVE_SYS_NDIR_H */ 31 | 32 | /* Define if you have the header file. */ 33 | /* #define HAVE_UNISTD_H 1 */ 34 | 35 | /* Define if you have the header file. */ 36 | /* #define HAVE_PWD_H 1 */ 37 | 38 | /* Define if you have the header file. */ 39 | #define HAVE_IO_H 1 40 | 41 | /* Define if you have the strncasecmp function. */ 42 | /* #define HAVE_STRNCASECMP 1 */ 43 | 44 | /* Define if you have the strnicmp function. */ 45 | #define HAVE_STRNICMP 1 46 | 47 | /* Define if you have the fork function. */ 48 | /* #define HAVE_FORK 1 */ 49 | 50 | /* Define if you have the vfork function. */ 51 | /* #define HAVE_VFORK 1 */ 52 | 53 | /* Define if you have the getpwuid function. */ 54 | /* #define HAVE_GETPWUID 1 */ 55 | 56 | /* Define if you have the usleep function. */ 57 | /* #define HAVE_USLEEP 1 */ 58 | 59 | /* Define if you have the Sleep function. */ 60 | #define HAVE_SLEEP 1 61 | 62 | /* Define if you have the memmove function. */ 63 | #define HAVE_MEMMOVE 1 64 | 65 | /* Define if you have the poll function. */ 66 | /* #undef HAVE_POLL */ 67 | 68 | /* Define if you have the setmode function. */ 69 | #define HAVE_SETMODE 1 70 | 71 | /* Define if you have the _setmode function. */ 72 | /* #undef HAVE__SETMODE */ 73 | 74 | /* Define if you have the chdir function. */ 75 | #define HAVE_CHDIR 1 76 | 77 | /* Define if you have the _chdir2 function. */ 78 | /* #undef HAVE__CHDIR2 */ 79 | 80 | /* Define useconds_t as int if you don't have useconds_t */ 81 | #define useconds_t int 82 | 83 | /* Define if you have the z library (-lz). */ 84 | #define HAVE_LIBZ 1 85 | 86 | /* generic windows header */ 87 | #include 88 | 89 | /* windows specific definitions */ 90 | #include 91 | 92 | #endif /* !__CONFIG_H__ */ 93 | -------------------------------------------------------------------------------- /info/Makefile: -------------------------------------------------------------------------------- 1 | ### 2 | ### Makefile for info 3 | ### 4 | ### Author: Kazu Yamamoto 5 | ### Created: Aug 22, 1999 6 | ### Revised: Sep 17, 2025 7 | 8 | ### 9 | ### (1) make EMACS=xemacs 10 | ### (2) make install 11 | ### 12 | 13 | ################################################################ 14 | ## 15 | ## EDIT THE FOLLOWINGS 16 | ## 17 | 18 | prefix=/usr/local 19 | infodir=$(prefix)/info 20 | 21 | EMACS=emacs 22 | 23 | INSTALLINFO = `which install-info` 24 | #INSTALLINFO = /usr/local/bin/install-info 25 | 26 | #INSTALLINFO_OPTIONS = --section Emacs Emacs 27 | #INSTALLINFO_JOPTIONS = 28 | #infodir = 29 | INSTALLINFO_ARGS = --info-dir=$(infodir) mew.info 30 | #INSTALLINFO_ARGS = mew.info 31 | INSTALLINFO_JARGS = --info-dir=$(infodir) mew.ja.info 32 | 33 | 34 | RM = rm -f 35 | MKDIR = mkdir -p 36 | TOUCH = touch 37 | # To save Emacses on Windows 38 | PWD = 39 | 40 | ################################################################ 41 | ## 42 | ## DO NOT EDIT THE FOLLOWINGS 43 | ## 44 | 45 | # This Makefile doesn't get remade. 46 | .PHONY: Makefile 47 | 48 | DESTDIR = 49 | 50 | .PHONY: all 51 | all: info 52 | 53 | .PHONY: info 54 | info: mew.info 55 | 56 | .PHONY: jinfo 57 | jinfo: mew.ja.info 58 | 59 | tmp.texi: mew.texi 60 | sed -e 's/@setfilename mew.ja.info/@setfilename mew.info/' \ 61 | -e 's/@set ja/@set en/' $? > $@ 62 | $(RM) mew.info* 63 | 64 | mew.info: tmp.texi 65 | $(EMACS) -batch -q -no-site-file \ 66 | --eval "(set-default-coding-systems 'utf-8-unix)" \ 67 | -l texinfmt -f batch-texinfo-format $? 68 | 69 | tmpj.texi: mew.texi 70 | sed -e 's/@setfilename mew.info/@setfilename mew.ja.info/' \ 71 | -e 's/@set en/@set ja/' $? > $@ 72 | $(RM) mew.ja.info* 73 | 74 | mew.ja.info: tmpj.texi 75 | $(EMACS) -batch -q -no-site-file \ 76 | --eval "(set-default-coding-systems 'utf-8-unix)" \ 77 | -l texinfmt -f batch-texinfo-format $? 78 | 79 | .PHONY: install install-info 80 | install: install-info 81 | install-info: 82 | -@if [ ! -d $(DESTDIR)$(infodir) ]; then \ 83 | $(MKDIR) $(DESTDIR)$(infodir); \ 84 | fi; \ 85 | cp mew.info* $(DESTDIR)$(infodir) 86 | -@if [ -z "$(DESTDIR)" ] && [ -x "$(INSTALLINFO)" ]; then \ 87 | $(INSTALLINFO) $(INSTALLINFO_OPTIONS) $(INSTALLINFO_ARGS); \ 88 | else \ 89 | echo "Don't forget to edit $(infodir)/dir for Mew."; \ 90 | fi 91 | 92 | .PHONY: install-jinfo 93 | install-jinfo: 94 | -@if [ ! -d $(DESTDIR)$(infodir) ]; then \ 95 | $(MKDIR) $(DESTDIR)$(infodir); \ 96 | fi; \ 97 | cp mew.ja.info* $(DESTDIR)$(infodir) 98 | -@if [ -z "$(DESTDIR)" ] && [ -x "$(INSTALLINFO)" ]; then \ 99 | $(INSTALLINFO) $(INSTALLINFO_JOPTIONS) $(INSTALLINFO_JARGS); \ 100 | else \ 101 | echo "Don't forget to edit $(infodir)/dir for Mew."; \ 102 | fi 103 | ## 104 | ## End of Makefile 105 | ## 106 | -------------------------------------------------------------------------------- /CHANGES/gitlog2mewchanges: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | =head1 NAME 4 | 5 | gitlog2mewchanges - tiny tool to convert Git commit logs to Mew's 00changes 6 | 7 | =head1 SYNOPSIS 8 | 9 | git log | gitlog2mewchanges > 00changes 10 | 11 | git log --no-merges --decorate | gitlog2mewchanges > 00changes 12 | 13 | (Use --no-merges to ignore merge commits. 14 | Use --decorate to show version tags.) 15 | 16 | =head1 SEE ALSO 17 | 18 | Mew: 19 | 20 | 21 | 22 | =head1 COPYRIGHT 23 | 24 | Copyright (c) 2013 Tatsuya Kinoshita 25 | 26 | Redistribution and use in source and binary forms, with or without 27 | modification, are permitted without restriction, with NO WARRANTY. 28 | You may regard this as a work that is placed in the public domain. 29 | 30 | =cut 31 | 32 | use strict; 33 | use warnings; 34 | 35 | my $PRODUCT = "Mew"; 36 | my $OWNER = "Kazu Yamamoto "; 37 | 38 | my $author = ""; my $date = ""; my $comment = ""; 39 | my $version = "x.x"; my $pre_version = ""; 40 | 41 | sub print_entry { 42 | print "* "; 43 | 44 | $comment =~ s/\n([ \t]*\n.*)+/\n/g; 45 | $comment =~ s/\n+$//; 46 | $comment =~ s/^[-*] //mg; 47 | $comment =~ s/\n/\n /g; 48 | $comment =~ s/\.( |\n).*/./s; 49 | print "$comment\n"; 50 | 51 | my $name = $author; 52 | $name =~ s/<([^@]+)@[^>]+>/<$1>/; 53 | if ($name ne $OWNER) { 54 | print "\t$name\n"; 55 | } 56 | 57 | $author = ""; $date = ""; $comment = ""; 58 | } 59 | 60 | while (<>) { 61 | if (/^Author:[ \t]+([^\n]+)/) { 62 | $author = $1; 63 | } elsif (/^Date:[ \t]+(Sun|Mon|Tue|Wed|Thu|Fri|Sat) +(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) +(\d+) +\d+:\d+:\d+ +(\d+)/) { # Assume git log --date=default or --date=local 64 | my $mm = $2; 65 | my $dd = $3; 66 | my $yyyy = $4; 67 | $mm =~ s/Jan/01/; $mm =~ s/Feb/02/; $mm =~ s/Mar/03/; $mm =~ s/Apr/04/; 68 | $mm =~ s/May/05/; $mm =~ s/Jun/06/; $mm =~ s/Jul/07/; $mm =~ s/Aug/08/; 69 | $mm =~ s/Sep/09/; $mm =~ s/Oct/10/; $mm =~ s/Nov/11/; $mm =~ s/Dec/12/; 70 | $dd =~ s/^(\d)$/0$1/; 71 | $date = "$yyyy/$mm/$dd"; 72 | } elsif (/^Date:[ \t]+(\d+-\d+-\d+)/) { # Assume git log --date=short or --date=iso 73 | $date = $1; 74 | $date =~ s!-!/!g; 75 | } elsif (/^Date:[ \t]+(.+)$/) { 76 | $date = $1; 77 | } elsif (/^ Credit:[ \t]+([^\n]+)/) { 78 | $author = $1; 79 | } elsif (/^ [ \t]*(.*)$/) { 80 | $comment .= "$1\n"; 81 | } elsif (/^commit /) { 82 | if ($author && $date) { 83 | &print_entry; 84 | } 85 | if (/\((tag: v\d[^\)]+)\)$/) { 86 | $version = $1; 87 | $version =~ s/tag: v//g; 88 | } 89 | } 90 | if ($version ne $pre_version && $date ne "") { 91 | print "\n" if $pre_version ne ""; 92 | print "$PRODUCT " if $PRODUCT ne ""; 93 | print "$version ($date)\n\n"; 94 | $pre_version = $version; 95 | } 96 | } 97 | if ($author && $date) { 98 | &print_entry; 99 | } 100 | -------------------------------------------------------------------------------- /conf/dot.theme: -------------------------------------------------------------------------------- 1 | ;;; 2 | ;;; Copy this contents to "~/.mew.el". 3 | ;;; 4 | ;;; Or, copy this file to a file, say "~/.mew-theme.el" and 5 | ;;; put the following to "~/.mew.el". 6 | ;;; (setq mew-theme-file "~/.mew-theme.el") 7 | 8 | ;;;; COPY FROM HERE 9 | 10 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 11 | ;;; 12 | ;;; Highlight header 13 | ;;; 14 | 15 | (mew-setface-bold header-subject 16 | :tty "red" :light "Firebrick" :dark "OrangeRed") 17 | 18 | (mew-setface-bold header-from 19 | :tty "yellow" :light "DarkOrange4" :dark "Gold") 20 | 21 | (mew-setface-bold header-date 22 | :tty "green" :light "ForestGreen" :dark "LimeGreen") 23 | 24 | (mew-setface-bold header-to 25 | :tty "magenta" :light "DarkViolet" :dark "violet") 26 | 27 | (mew-setface-bold header-key 28 | :tty "green" :light "ForestGreen" :dark "LimeGreen") 29 | 30 | (mew-setface-bold header-private) 31 | 32 | (mew-setface-bold header-important 33 | :tty "cyan" :light "MediumBlue" :dark "SkyBlue") 34 | 35 | (mew-setface-bold header-marginal 36 | :light "gray50" :dark "gray50") 37 | 38 | (mew-setface-bold header-warning 39 | :tty "red" :light "red" :dark "red") 40 | 41 | (mew-setface-bold header-xmew 42 | :tty "yellow" :light "chocolate" :dark"chocolate") 43 | 44 | (mew-setface-bold header-xmew-bad 45 | :tty "red" :light "red" :dark "red") 46 | 47 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 48 | ;;; 49 | ;;; Highlight body 50 | ;;; 51 | 52 | (mew-setface body-url 53 | :tty "red" :light "Firebrick" :dark "OrangeRed") 54 | 55 | (mew-setface body-comment 56 | :tty "blue" :light "gray50" :dark "gray50") 57 | 58 | (mew-setface body-cite1 59 | :tty "green" :light "ForestGreen" :dark "LimeGreen") 60 | 61 | (mew-setface body-cite2 62 | :tty "cyan" :light "MediumBlue" :dark "SkyBlue") 63 | 64 | (mew-setface body-cite3 65 | :tty "magenta" :light "DarkViolet" :dark "violet") 66 | 67 | (mew-setface body-cite4 68 | :tty "yellow" :light "DarkOrange4" :dark "Gold") 69 | 70 | (mew-setface body-cite5 71 | :tty "red" :light "Firebrick" :dark "OrangeRed") 72 | 73 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 74 | ;;; 75 | ;;; Highlight mark 76 | ;;; 77 | 78 | (mew-setface mark-review 79 | :tty "cyan" :light "MediumBlue" :dark "SkyBlue") 80 | 81 | (mew-setface mark-escape 82 | :tty "magenta" :light "DarkViolet" :dark "violet") 83 | 84 | (mew-setface mark-delete 85 | :tty "red" :light "Firebrick" :dark "OrangeRed") 86 | 87 | (mew-setface mark-unlink 88 | :tty "yellow" :light "DarkOrange4" :dark "Gold") 89 | 90 | (mew-setface mark-refile 91 | :tty "green" :light "ForestGreen" :dark "LimeGreen") 92 | 93 | (mew-setface mark-unread) 94 | 95 | 96 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 97 | ;;; 98 | ;;; Highlight eof 99 | ;;; 100 | 101 | (mew-setface-bold eof-message 102 | :tty "green" :light "ForestGreen" :dark "LimeGreen") 103 | 104 | (mew-setface-bold eof-part 105 | :tty "yellow" :light "DarkOrange4" :dark "Gold") 106 | 107 | ;;;; COPY TO HERE 108 | -------------------------------------------------------------------------------- /bin/hs/Search.hs: -------------------------------------------------------------------------------- 1 | module Search (Search, withDB, searchMe, searchChild, searchFamily) where 2 | 3 | import Data.List 4 | import Data.Map (Map) 5 | import qualified Data.Map as Map hiding (Map) 6 | import Data.Ord 7 | import Database.HDBC.Sqlite3 8 | import Msg 9 | import Sql 10 | import System.EasyFile 11 | 12 | ---------------------------------------------------------------- 13 | 14 | type Search a = ID -> FilePath -> Connection -> IO a 15 | 16 | ---------------------------------------------------------------- 17 | 18 | searchMe :: Search [Msg] 19 | searchMe mid dir conn = chooseOne dir <$> getByID conn mid 20 | 21 | ---------------------------------------------------------------- 22 | 23 | searchChild :: Search [Msg] 24 | searchChild mid dir conn = chooseOne dir <$> getByPaID conn [mid] 25 | 26 | ---------------------------------------------------------------- 27 | 28 | searchFamily :: Search [Msg] 29 | searchFamily mid dir conn = sortBy (comparing date) <$> findFamily 30 | where 31 | findFamily = findRoot conn mid mid >>= findDescendants conn dir 32 | 33 | data ParentError = NoEntry | NoPid 34 | 35 | getPaid :: Connection -> ID -> IO (Either ParentError ID) 36 | getPaid conn mid = getPid <$> getByID conn mid 37 | where 38 | getPid [] = Left NoEntry 39 | getPid (e:_) 40 | | pid == "" = Left NoPid 41 | | otherwise = Right pid 42 | where 43 | pid = paid e 44 | 45 | findRoot :: Connection -> ID -> ID -> IO ID 46 | findRoot conn previd mid = 47 | getPaid conn mid >>= either terminate (findRoot conn mid) 48 | where 49 | terminate NoEntry = return previd 50 | terminate NoPid = return mid 51 | 52 | type Hash = Map ID Msg 53 | 54 | findDescendants :: Connection -> FilePath -> ID -> IO [Msg] 55 | findDescendants conn dir rtid = do 56 | root <- head . chooseOne dir <$> getByID conn rtid 57 | let mmap = Map.insert rtid root Map.empty 58 | findChildren ([rtid],mmap) 59 | where 60 | findChildren :: ([ID],Hash) -> IO [Msg] 61 | findChildren (ids,hash) = getByPaID conn ids >>= findChildren' 62 | where 63 | findChildren' [] = return (Map.elems hash) 64 | findChildren' msgs = findChildren $ pushChildren hash msgs [] 65 | 66 | pushChildren :: Hash -> [Msg] -> [ID] -> ([ID],Hash) 67 | pushChildren hash [] ids = (ids, hash) 68 | pushChildren hash (m:ms) ids 69 | | Map.notMember mid hash = pushChildren hash' ms (mid:ids) 70 | | mdir == dir = pushChildren hash' ms ids 71 | -- insert overwrites the value 72 | | otherwise = pushChildren hash ms ids 73 | where 74 | hash' = Map.insert mid m hash 75 | mdir = (takeDirectory.path) m 76 | mid = myid m 77 | 78 | ---------------------------------------------------------------- 79 | -- to express failure, the empty list is used 80 | 81 | chooseOne :: FilePath -> [Msg] -> [Msg] 82 | chooseOne _ [] = [] -- failure 83 | chooseOne "" (m:_) = [m] 84 | chooseOne dir msgs@(m:_) 85 | | null sames = [m] 86 | | otherwise = [head sames] 87 | where 88 | sames = filter sameDir msgs 89 | sameDir x = (takeDirectory.path) x == dir 90 | -------------------------------------------------------------------------------- /CHANGES/v6.4.md: -------------------------------------------------------------------------------- 1 | Mew 6.4 stable release (2011/10/19) 2 | 3 | * cmew falls back to getModificationTime on Windows. 4 | Masamichi HOSODA 5 | * Supporting Ruby 1.9. 6 | Takahiro Kambe 7 | 8 | Mew 6.4 release candidate 1 (2011/09/06) 9 | 10 | * A bug of rescan is fixed finally! 11 | * mewl avoids causing error if a folder does not exist. 12 | Masamichi HOSODA 13 | * Catching up to stunnel 4.39. 14 | Ryo ONODERA 15 | * Supporting text/csv. 16 | Tetsuya Toda 17 | 18 | Mew 6.3.51 (2011/06/29) 19 | 20 | * A hack for calling browser on Unix. 21 | "Diogo F. S. Ramos" and Tatsuya Kinoshita 22 | * Bug fixes for hankaku. 23 | and Tatsuya Kinoshita 24 | * Avoiding broken end-of-line for quoted-printable. 25 | * Multibyte hack for Emacs 23 and 24. 26 | * Supporting GBK. 27 | * Fixing excel and powerpoint on Unix. 28 | Kan Sasaki 29 | * pdftotext support for Windows. 30 | Shuichi KITAGUCHI 31 | * &rest to mew-user-agent-compose for Emacs 24. 32 | Harald Hanche-Olsen 33 | * More gentle for broken Multipart/Signed. 34 | Eisaku YAMAGUCHI 35 | * Improving the documentation of mew-draft-use-format-flowed. 36 | Christophe TROESTLER 37 | * varsx hack. 38 | * Fixing regex of time. 39 | Christophe TROESTLER 40 | * Fixing major mode hooks. 41 | Hayashi Masahiro 42 | * Inline display of PDF with "pdftotext". 43 | Hideyuki SHIRAI 44 | Harumitsu YOSHITAKE 45 | * Text/Pdf for Thunderbird 46 | Christophe TROESTLER 47 | * Removing warnings for Emacs 23.3 48 | Yu-ji Hosokawa 49 | * Killing stunnel with -KILL since the spec of stunnel changed. 50 | * The -b option for mewest. 51 | "Diogo F. S. Ramos" 52 | 53 | Mew 6.3.50 (2010/08/31) 54 | 55 | * Defining mew-draft-use-format-flowed. 56 | Christophe TROESTLER 57 | * Making use of mew-save-dir. 58 | * Fixing the hash-vs-array problem of cmew. 59 | Masamichi HOSODA 60 | * Making cmew safer in the case where mewest works at the same time. 61 | Masamichi HOSODA 62 | * Hack for mew-time-rfc-to-sortkey. 63 | Hideyuki SHIRAI 64 | * A patch for unzip. 65 | Yu-ji Hosokawa 66 | * Supporting unzip. 67 | * Bug fix for PGP/MIME of binary encryption. 68 | Shoichi Kurosaka 69 | * Both cmew and smew in Haskell works well finally! 70 | Shuichi KITAGUCHI 71 | * Fixing info/Makefile. 72 | Yasuhiro KIMURA 73 | * Guarding mew-addrbook-clean-up. 74 | Hideyuki SHIRAI 75 | * A bug fix of mew-mime-content-type. 76 | Yu-ji Hosokawa 77 | * Setting split-width-threshold to nil in mew-summary-reply. 78 | * "b" in Summary saves the buffer of Message mode to a file. 79 | * header-only now can work for M-x mew. 80 | * Bold of font can be specified on Emacs 23. 81 | * Deleting " " from global-mode-string. 82 | Christophe TROESTLER 83 | * Correcting the -P option of stunnel3. 84 | Kendall Shaw 85 | * Define mew-sumsym-encode-folder and mew-sumsym-decode-folder. 86 | * set-buffer -> with-current-buffer. 87 | * Making mew-mime-image() safer. 88 | Hideyuki SHIRAI 89 | -------------------------------------------------------------------------------- /bin/mewencode.1: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) 2001-2003 Mew developing team. 2 | .\" All rights reserved. 3 | .\" 4 | .\" Redistribution and use in source and binary forms, with or without 5 | .\" modification, are permitted provided that the following conditions 6 | .\" are met: 7 | .\" 8 | .\" 1. Redistributions of source code must retain the above copyright 9 | .\" notice, this list of conditions and the following disclaimer. 10 | .\" 2. Redistributions in binary form must reproduce the above copyright 11 | .\" notice, this list of conditions and the following disclaimer in the 12 | .\" documentation and/or other materials provided with the distribution. 13 | .\" 3. Neither the name of the team nor the names of its contributors 14 | .\" may be used to endorse or promote products derived from this software 15 | .\" without specific prior written permission. 16 | .\" 17 | .\" THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND 18 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 20 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE 21 | .\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 24 | .\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | .\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 26 | .\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 27 | .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | .TH MEWENCODE 1 "March 17, 2001" 29 | .UC 4 30 | .SH NAME 31 | .BR mewencode , 32 | .BR mewdecode , 33 | .B mewcat 34 | - MIME encoder/decoder 35 | .\" 36 | .SH SYNOPSIS 37 | .PD 0 38 | .B mewencode 39 | .RB [ -options ] 40 | .RI [ infile 41 | .RI [ outfile ]] 42 | .PP 43 | .B mewdecode 44 | .RB [ -options ] 45 | .RI [ infile 46 | .RI [ outfile ]] 47 | .PP 48 | .B mewcat 49 | .RB [ -options ] 50 | .RI [ infile ] 51 | .PD 1 52 | .\" 53 | .SH DESCRIPTION 54 | The 55 | .B mewencode 56 | utility encode/decode MIME objects. 57 | .PP 58 | The options are as follows: 59 | .TP 8 60 | .B \-e 61 | Encoding. 62 | .TP 63 | .B \-d 64 | Decoding. 65 | .TP 66 | .B \-8 67 | See if any 8bit characters are contained. 68 | .TP 69 | .B \-b 70 | MIME base64 en/decoding. 71 | .TP 72 | .B \-q 73 | MIME quoted-printable en/decoding. 74 | .TP 75 | .B \-g 76 | MIME gzip64 en/decoding(not yet specified in RFC). 77 | .TP 78 | .B \-z 79 | The same as -g. 80 | .TP 81 | .B \-u 82 | Uudecoding. 83 | .TP 84 | .BI \-l " length" 85 | Line 86 | .I length 87 | into which base64/quoted-printable/gzip64 encoding truncate. 88 | .TP 89 | .B \-t 90 | On base64/gzip64 encoding, local newline is treated as CRLF. 91 | On base/gzip64 decoding, any newline is translated 92 | into local newline. 93 | Specify this option only when the input is a line 94 | based object(e.g. Content-Type: is text/plain or 95 | application/postscript). 96 | .TP 97 | .B \-h 98 | Display this help message. 99 | .TP 100 | .B \-v 101 | Display the version. 102 | .\" 103 | -------------------------------------------------------------------------------- /CHANGES/v5.2.md: -------------------------------------------------------------------------------- 1 | Mew 5.2 stable release (2007/01/10) 2 | 3 | * A bug fix for "I" on NetNews. 4 | Hideyuki SHIRAI 5 | * A bug fix for "mlc". 6 | 7 | Mew 5.2 release candidate 3 (2007/01/04) 8 | 9 | * Using the "--output" option of "gpgsm". 10 | * The same logic for Spotlight/Google. 11 | * WDS bug fix and hack. 12 | INOUE Tomohiro 13 | * mewest makes indexes for [0-9]* or [0-9]*.mew only. 14 | Tatsuya Kinoshita 15 | 16 | Mew 5.2 release candidate 2 (2006/12/21) 17 | 18 | * case-fold-search fix for mew-refile.el. 19 | 20 | Mew 5.2 release candidate 1 (2006/12/19) 21 | 22 | * Win32 patch for mewest. 23 | KIMURA Yasuhiro 24 | 25 | Mew 5.1.52 (2006/12/11) 26 | 27 | * A bug fix for Addrbook. 28 | Unknown. 29 | * Let mewest work on Solaris. 30 | Takashi Masuda 31 | * A bug fix for M-p. 32 | Takashi Masuda 33 | * A bug fix for "/". 34 | Tsutomu OKADA 35 | * A patch for mark vs case-sensitive. 36 | Hideyuki SHIRAI 37 | * Using shift_jis for EST on Windows. 38 | * A bug fix for "join". 39 | Hideyuki SHIRAI 40 | * Allowing an empty pattern for EST pattern of "k/". 41 | Tatsuya Kinoshita 42 | * Allowing an empty pattern for EST pattern of "k?". 43 | * Allowing "to,cc" for EST filter. 44 | * Fixing the problem of Smtplog vs message-id. 45 | * Error handling of EST filter. 46 | 47 | Mew 5.1.51 (2006/10/24) 48 | 49 | * Enchanting the filter of Hyper Estraier. 50 | Tatsuya Kinoshita 51 | * Implementing filter of Hyper Estraier. 52 | * Enhancing body filter. 53 | Tatsuya Kinoshita 54 | * bin/mew-pinentry will be removed with "make distclean" 55 | instead of "make clean". 56 | MLB33828 57 | * Bug fix of "Resent-Fcc:" in the Header mode. 58 | * Killing subprocess when typing "D". 59 | Hideyuki SHIRAI 60 | * Asking master password only when it is required. 61 | Hideyuki SHIRAI 62 | * Adding bin/mew-pinentry.1. 63 | Tatsuya Kinoshita 64 | * mew-pinentry works on Solaris and Linux. 65 | * A bug fix for mew-summary-clean-trash. 66 | * Obsoleting the support of Emacs 20.7. 67 | * Supporting the content types of OpenOffice.org 2.0. 68 | * mew-prog-msword-ext etc can be set in ".mew". 69 | * Adding IMAP proxy. 70 | Tatsuya Kinoshita 71 | * Fixing the problem of "i" on threads. 72 | KOIE Hidetaka 73 | * Loosing the mark restriction for POP. 74 | Hideyuki SHIRAI 75 | * Making image scaling faster on Emacs 21. 76 | * A patch for mew-mime-image. 77 | Hideyuki SHIRAI 78 | * A patch for Namazu. 79 | Hideyuki SHIRAI 80 | 81 | Mew 5.1.50 (2006/08/16) 82 | 83 | * Resizing hack. 84 | Tetsuya Toda 85 | * Resizing PNG images with "netpbm" if too large. 86 | * Supporting smime-type=signed-data. 87 | * Preventing redundant MIME encoding for encryption/signature. 88 | * Resizing JPEG images with "netpbm" if too large. 89 | * Workaround for anti-virus softwares. 90 | * "C-n" and "C-p" keeps the current column. 91 | Hideyuki SHIRAI 92 | * Obsoleting pack ("O"). If you really want to use pack, type "C-uO". 93 | You should understand that pack breaks indexes of Hyper Estraier. 94 | * A bug fix for mewl. 95 | * A bug fix for mew-nmz.el. 96 | Hideyuki SHIRAI 97 | * Yet another bug fix for SSL. 98 | * S/MIME support can ask passphrase now! 99 | * Supporting Hyper Estraier. 100 | -------------------------------------------------------------------------------- /elisp/mew-lang-latin.el: -------------------------------------------------------------------------------- 1 | ;;; -*- lexical-binding: nil; -*- 2 | ;;; mew-lang-latin.el --- Latin specific stuff for Mew 3 | 4 | ;; Author: Mew developing team 5 | ;; Created: Dec 11, 2002 6 | 7 | ;;; Code: 8 | 9 | (require 'mew) 10 | 11 | (defvar mew-latin01-list '(36 38 40 52 56 60 61 62)) 12 | 13 | (defvar mew-charset-latin-alist 14 | '(("iso-8859-1" latin-iso8859-1 latin-iso8859-15) 15 | ("iso-8859-15" latin-iso8859-15 latin-iso8859-1))) 16 | 17 | (defun mew-latin-make-regex (lc lst) 18 | (mapconcat (lambda (x) (char-to-string (make-char lc x))) lst "\\|")) 19 | 20 | (defvar mew-latin0-regex 21 | (mew-latin-make-regex 'latin-iso8859-15 mew-latin01-list)) 22 | 23 | (defvar mew-latin1-regex 24 | (mew-latin-make-regex 'latin-iso8859-1 mew-latin01-list)) 25 | 26 | (defun mew-latin0-region (beg end) 27 | (let* (charset ent to from ch lc conflict0 conflict1) 28 | (save-restriction 29 | (narrow-to-region beg end) 30 | (setq conflict0 31 | (save-excursion 32 | (goto-char (point-min)) 33 | (re-search-forward mew-latin0-regex nil t))) 34 | (setq conflict1 35 | (save-excursion 36 | (goto-char (point-min)) 37 | (re-search-forward mew-latin1-regex nil t))) 38 | (unless (and conflict0 conflict1) ;; mew-charset-m17n 39 | (cond 40 | (conflict0 41 | (setq charset "iso-8859-15")) 42 | (conflict1 43 | (setq charset "iso-8859-1")) 44 | (t 45 | (setq charset mew-charset-latin))) 46 | (setq ent (assoc charset mew-charset-latin-alist)) 47 | (mew-set '(nil to from) ent) 48 | (save-excursion 49 | (goto-char (point-min)) 50 | (while (re-search-forward "\\cl" nil t) 51 | (setq ch (split-char (preceding-char))) 52 | (setq lc (car ch)) 53 | (when (eq lc from) 54 | (delete-char -1) 55 | (insert (make-char to (nth 1 ch)))))))))) 56 | 57 | (provide 'mew-lang-latin) 58 | 59 | ;;; Copyright Notice: 60 | 61 | ;; Copyright (C) 2002-2023 Mew developing team. 62 | ;; All rights reserved. 63 | 64 | ;; Redistribution and use in source and binary forms, with or without 65 | ;; modification, are permitted provided that the following conditions 66 | ;; are met: 67 | ;; 68 | ;; 1. Redistributions of source code must retain the above copyright 69 | ;; notice, this list of conditions and the following disclaimer. 70 | ;; 2. Redistributions in binary form must reproduce the above copyright 71 | ;; notice, this list of conditions and the following disclaimer in the 72 | ;; documentation and/or other materials provided with the distribution. 73 | ;; 3. Neither the name of the team nor the names of its contributors 74 | ;; may be used to endorse or promote products derived from this software 75 | ;; without specific prior written permission. 76 | ;; 77 | ;; THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND 78 | ;; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 79 | ;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 80 | ;; PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE 81 | ;; LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 82 | ;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 83 | ;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 84 | ;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 85 | ;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 86 | ;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 87 | ;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 88 | 89 | ;;; mew-lang-latin.el ends here 90 | -------------------------------------------------------------------------------- /elisp/mew-blvs.el: -------------------------------------------------------------------------------- 1 | ;;; -*- lexical-binding: nil; -*- 2 | ;;; mew-blvs.el 3 | 4 | ;; Author: Mew developing team 5 | ;; Created: Feb 1, 1999 6 | 7 | ;;; Code: 8 | 9 | (require 'mew) 10 | 11 | ;;; 12 | ;;; Buffer local variables 13 | ;;; 14 | 15 | ;; All buffer local variables which Mew defines should be here. 16 | ;; They are made buffer local by make-variable-buffer-local. 17 | ;; They are used internal purpose only (i.e. not user options). 18 | ;; When Mew makes a buffer local variable which another package 19 | ;; defines, make-local-variable should be used. 20 | 21 | ;; Inevitable due to mode-line. 22 | (defvar mew-summary-buffer-process nil) 23 | (defvar mew-summary-buffer-process-status nil) 24 | (defvar mew-summary-buffer-process-error nil) 25 | (defvar mew-summary-buffer-secure-process nil) 26 | (defvar mew-summary-buffer-left-msgs nil) 27 | (defvar mew-summary-buffer-raw nil) 28 | 29 | (defvar mew-decode-syntax nil) ;; just for convenience 30 | (defvar mew-encode-syntax nil) ;; just for convenience 31 | 32 | (defvar mew-ainfo nil) ;; Any buffers 33 | (defvar mew-cinfo nil) ;; Cache 34 | (defvar mew-dinfo nil) ;; Decode 35 | (defvar mew-minfo nil) ;; Message mode 36 | (defvar mew-sinfo nil) ;; Summary mode 37 | (defvar mew-tinfo nil) ;; Draft mode 38 | (defvar mew-vinfo nil) ;; Virtual mode 39 | (defvar mew-xinfo nil) ;; Analyzed 40 | 41 | (mapc 'make-variable-buffer-local 42 | (list 'mew-summary-buffer-process 43 | 'mew-summary-buffer-process-status 44 | 'mew-summary-buffer-process-error 45 | 'mew-summary-buffer-secure-process 46 | 'mew-summary-buffer-left-msgs 47 | 'mew-summary-buffer-raw 48 | 'mew-decode-syntax 49 | 'mew-encode-syntax 50 | 'mew-ainfo 51 | 'mew-cinfo 52 | 'mew-dinfo 53 | 'mew-minfo 54 | 'mew-sinfo 55 | 'mew-tinfo 56 | 'mew-vinfo 57 | 'mew-xinfo)) 58 | 59 | (provide 'mew-blvs) 60 | 61 | ;;; Copyright Notice: 62 | 63 | ;; Copyright (C) 2000-2023 Mew developing team. 64 | ;; All rights reserved. 65 | 66 | ;; Redistribution and use in source and binary forms, with or without 67 | ;; modification, are permitted provided that the following conditions 68 | ;; are met: 69 | ;; 70 | ;; 1. Redistributions of source code must retain the above copyright 71 | ;; notice, this list of conditions and the following disclaimer. 72 | ;; 2. Redistributions in binary form must reproduce the above copyright 73 | ;; notice, this list of conditions and the following disclaimer in the 74 | ;; documentation and/or other materials provided with the distribution. 75 | ;; 3. Neither the name of the team nor the names of its contributors 76 | ;; may be used to endorse or promote products derived from this software 77 | ;; without specific prior written permission. 78 | ;; 79 | ;; THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND 80 | ;; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 81 | ;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 82 | ;; PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE 83 | ;; LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 84 | ;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 85 | ;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 86 | ;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 87 | ;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 88 | ;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 89 | ;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 90 | 91 | ;;; mew-blvs.el ends here 92 | -------------------------------------------------------------------------------- /configure.ac: -------------------------------------------------------------------------------- 1 | AC_INIT 2 | AC_CONFIG_SRCDIR([elisp/mew.el]) 3 | AC_CONFIG_SUBDIRS([bin]) 4 | AC_ARG_WITH(emacs, 5 | [ --with-emacs=EMACS use EMACS], 6 | emacsbin="${withval}") 7 | AC_SUBST(emacsbin) 8 | AC_ARG_WITH(elispdir, 9 | [ --with-elispdir=DIR where elisp files should go], 10 | elispdir="${withval}") 11 | AC_SUBST(elispdir) 12 | AC_ARG_WITH(etcdir, 13 | [ --with-etcdir=DIR where etc files should go], 14 | etcdir="${withval}") 15 | AC_SUBST(etcdir) 16 | 17 | if test -z "${emacsbin}"; then 18 | AC_PATH_PROGS(emacsbin, emacs, no) 19 | if test "${emacsbin}" = no; then 20 | AC_MSG_ERROR([Emacs is not found]) 21 | fi 22 | fi 23 | chk_prefix= 24 | if test "${datadir}" = "\${prefix}/share" && \ 25 | test -z "${elispdir}" -o -z "${etcdir}"; then 26 | chk_prefix=yes 27 | fi 28 | 29 | if test ! -x "${emacsbin}"; then 30 | chk_prefix= 31 | fi 32 | if test "${chk_prefix}"; then 33 | AC_MSG_CHECKING(for prefix of ${emacsbin}) 34 | AC_CACHE_VAL(emacsbin_cv_emacs_prefix,[ 35 | OUTPUT=./conftest-$$ 36 | echo ${emacsbin}' -q -no-site-file -batch -eval '\''(write-region (princ (expand-file-name ".." invocation-directory)) nil "'${OUTPUT}'" nil 5)'\' >& AS_MESSAGE_LOG_FD 2>&1 37 | eval ${emacsbin}' -q -no-site-file -batch -eval '\''(write-region (princ (expand-file-name ".." invocation-directory)) nil "'${OUTPUT}'" nil 5)'\' >& AS_MESSAGE_LOG_FD 2>&1 38 | retval="`cat ${OUTPUT}`" 39 | rm -f ${OUTPUT} 40 | emacsbin_cv_emacs_prefix="${retval}"]) 41 | emacs_prefix=${emacsbin_cv_emacs_prefix} 42 | AC_MSG_RESULT(${emacs_prefix}) 43 | fi 44 | 45 | if test "${chk_prefix}" -a -z "${elispdir}"; then 46 | AC_MSG_CHECKING([where lisp files should go]) 47 | if test -d "${emacs_prefix}/share/emacs/site-lisp"; then 48 | elispdir="${emacs_prefix}/share/emacs/site-lisp/mew" 49 | fi 50 | if test "${elispdir}"; then 51 | AC_MSG_RESULT(${elispdir}) 52 | else 53 | AC_MSG_RESULT([none (fall back to the default value)]) 54 | fi 55 | fi 56 | if test -z "${elispdir}"; then 57 | elispdir="\${datadir}/emacs/site-lisp/mew" 58 | fi 59 | 60 | if test "${chk_prefix}" -a -z "${etcdir}"; then 61 | AC_MSG_CHECKING([where etc files should go]) 62 | if test -d "${emacs_prefix}/share/emacs/site-lisp"; then 63 | etcdir="${emacs_prefix}/share/emacs/site-lisp/mew/etc" 64 | fi 65 | if test "${etcdir}"; then 66 | AC_MSG_RESULT(${etcdir}) 67 | else 68 | AC_MSG_RESULT([none (fall back to the default value)]) 69 | fi 70 | fi 71 | if test -z "${etcdir}"; then 72 | etcdir="\${datadir}/emacs/site-lisp/mew/etc" 73 | fi 74 | 75 | AC_CONFIG_FILES([Makefile]) 76 | AC_OUTPUT 77 | 78 | echo_value () { 79 | case "$1" in 80 | *\$*) 81 | eval "echo_value \"$1\"" 82 | ;; 83 | *) 84 | echo "$1" 85 | ;; 86 | esac 87 | } 88 | 89 | echo 90 | echo "***************************" 91 | echo " Mew configuration results" 92 | echo "***************************" 93 | echo 94 | echo $ECHO_N "use emacs : $ECHO_C"; echo_value "${emacsbin}" 95 | echo $ECHO_N "elisp files should go : $ECHO_C"; echo_value "${elispdir}" 96 | echo $ECHO_N "etc files should go : $ECHO_C"; echo_value "${etcdir}" 97 | echo $ECHO_N "exec files should go : $ECHO_C"; echo_value "${bindir}" 98 | echo $ECHO_N "info files should go : $ECHO_C"; echo_value "${infodir}" 99 | echo $ECHO_N "man files should go : $ECHO_C"; echo_value "${mandir}/man1" 100 | echo 101 | echo "Then type 'make' and 'make install'." 102 | echo "For Japanese environment, also 'make install-jinfo'." 103 | echo 104 | -------------------------------------------------------------------------------- /bin/Makefile.in: -------------------------------------------------------------------------------- 1 | ### 2 | ### Makefile 3 | ### 4 | ### Author: Mew developing team 5 | ### Created: Jul 7, 2000 6 | ### Revised: Sep. 17, 2025 7 | 8 | ### 9 | ### make 10 | ### make install 11 | ### 12 | 13 | srcdir = @srcdir@ 14 | VPATH = @srcdir@ 15 | 16 | prefix = @prefix@ 17 | exec_prefix = @exec_prefix@ 18 | bindir = @bindir@ 19 | mandir = @mandir@/man1 20 | 21 | CC = @CC@ 22 | CFLAGS = @CFLAGS@ 23 | CPPFLAGS = @CPPFLAGS@ 24 | LDFLAGS = @LDFLAGS@ 25 | COFLAG = -o $@ 26 | LIBS = @LIBS@ 27 | 28 | INSTALL = @INSTALL@ 29 | LN = ln 30 | RM = rm -f 31 | MKDIR = mkdir -p 32 | 33 | #INSTALL = copy 34 | #LN = copy 35 | #RM = del 36 | #MKDIR = md 37 | 38 | EXEEXT=@EXEEXT@ 39 | OBJEXT=.@OBJEXT@ 40 | 41 | SRC1 = mewencode.c utils.c 42 | OBJ1 = mewencode$(OBJEXT) utils$(OBJEXT) 43 | PRG1 = mewencode$(EXEEXT) 44 | ALT = mewdecode$(EXEEXT) mewcat$(EXEEXT) 45 | SRC2 = mewl.c utils.c pattern.c 46 | OBJ2 = mewl$(OBJEXT) utils$(OBJEXT) pattern$(OBJEXT) 47 | PRG2 = mewl$(EXEEXT) 48 | SRC3 = incm.c 49 | OBJ3 = incm$(OBJEXT) utils$(OBJEXT) 50 | PRG3 = incm$(EXEEXT) 51 | PRG4 = mewest 52 | PRG5 = mew-pinentry 53 | PRG6 = cmew 54 | PRG7 = smew 55 | 56 | DO1 = utils$(OBJEXT) 57 | SR2 = pattern.c 58 | DO2 = pat$(OBJEXT) 59 | DBG = pattern 60 | 61 | MAN1 = mewencode.1 62 | MALT = mewdecode.1 mewcat.1 63 | MAN2 = mewl.1 64 | MAN3 = incm.1 65 | MAN4 = mewest.1 66 | MAN5 = mew-pinentry.1 67 | MAN6 = cmew.1 68 | MAN7 = smew.1 69 | 70 | CNF = config.h config.status config.cache config.log configure.lineno 71 | MK = Makefile 72 | 73 | DESTDIR = 74 | 75 | .c$(OBJEXT): 76 | $(CC) -c $(DEFS) $(CFLAGS) $(CPPFLAGS) $< 77 | 78 | .PHONY: all 79 | all: $(PRG1) $(PRG2) $(PRG3) 80 | 81 | $(PRG1): $(OBJ1) 82 | $(CC) $(COFLAG) $(LDFLAGS) $(OBJ1) $(LIBS) 83 | $(RM) $(ALT) 84 | for f in $(ALT); do \ 85 | $(LN) $(PRG1) $${f}; done 86 | 87 | $(PRG2): $(OBJ2) 88 | $(CC) $(COFLAG) $(LDFLAGS) $(OBJ2) 89 | 90 | $(PRG3): $(OBJ3) 91 | $(CC) $(COFLAG) $(LDFLAGS) $(OBJ3) 92 | 93 | $(DO2): $(SR2) 94 | $(CC) -DDEBUG -c $(CFLAG) -o $(DO2) $(SR2) 95 | 96 | $(DBG): $(DO1) $(DO2) 97 | $(CC) $(CFLAGS) $(COFLAG) $(DO1) $(DO2) 98 | 99 | .PHONY: clean 100 | clean: 101 | $(RM) $(OBJ1) $(PRG1) $(ALT) $(OBJ2) $(PRG2) $(OBJ3) $(PRG3) $(DBG) $(DO2) 102 | 103 | .PHONY: distclean 104 | distclean: clean 105 | $(RM) $(CNF) $(MK) $(PRG5) 106 | 107 | .PHONY: install 108 | install: all 109 | -@if [ ! -d $(DESTDIR)$(bindir) ]; then \ 110 | $(MKDIR) $(DESTDIR)$(bindir); \ 111 | fi 112 | $(INSTALL) -m 555 $(PRG1) $(DESTDIR)$(bindir) 113 | for f in $(ALT); do \ 114 | $(RM) $(DESTDIR)$(bindir)/$${f}; \ 115 | $(LN) $(DESTDIR)$(bindir)/$(PRG1) $(DESTDIR)$(bindir)/$${f}; \ 116 | done 117 | $(INSTALL) -m 555 $(PRG2) $(DESTDIR)$(bindir) 118 | $(INSTALL) -m 555 $(PRG3) $(DESTDIR)$(bindir) 119 | $(INSTALL) -m 555 $(PRG4) $(DESTDIR)$(bindir) 120 | $(INSTALL) -m 555 $(PRG5) $(DESTDIR)$(bindir) 121 | $(INSTALL) -m 555 $(PRG6) $(DESTDIR)$(bindir) 122 | $(INSTALL) -m 555 $(PRG7) $(DESTDIR)$(bindir) 123 | -@if [ ! -d $(DESTDIR)$(mandir) ]; then \ 124 | $(MKDIR) $(DESTDIR)$(mandir); \ 125 | fi 126 | $(INSTALL) -m 444 $(MAN1) $(DESTDIR)$(mandir) 127 | for f in $(MALT); do \ 128 | $(RM) $(DESTDIR)$(mandir)/$${f}; \ 129 | $(LN) $(DESTDIR)$(mandir)/$(MAN1) $(DESTDIR)$(mandir)/$${f}; \ 130 | done 131 | $(INSTALL) -m 444 $(MAN2) $(DESTDIR)$(mandir) 132 | $(INSTALL) -m 444 $(MAN3) $(DESTDIR)$(mandir) 133 | $(INSTALL) -m 444 $(MAN4) $(DESTDIR)$(mandir) 134 | $(INSTALL) -m 444 $(MAN5) $(DESTDIR)$(mandir) 135 | $(INSTALL) -m 444 $(MAN6) $(DESTDIR)$(mandir) 136 | $(INSTALL) -m 444 $(MAN7) $(DESTDIR)$(mandir) 137 | 138 | ## 139 | ## End of Makefile 140 | ## 141 | -------------------------------------------------------------------------------- /bin/hs/Mail.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE CPP #-} 2 | 3 | module Mail (fileMsg) where 4 | 5 | import Data.Char 6 | import Data.Maybe 7 | import Data.Time 8 | import Msg 9 | import System.IO 10 | import Text.Parsec 11 | import Text.Parsec.String 12 | 13 | ---------------------------------------------------------------- 14 | 15 | type Key = String 16 | newtype Value = Value { foldedLines :: [String] } deriving Show 17 | type Header = [(Key,Value)] 18 | 19 | getValue :: Key -> [(Key,Value)] -> Maybe String 20 | getValue key fs = concat . foldedLines <$> lookup key fs 21 | 22 | ---------------------------------------------------------------- 23 | 24 | fileMsg :: FilePath -> String -> IO (Maybe Msg) 25 | fileMsg file folder = makeMsg folder . header <$> readFileU8 file 26 | where 27 | readFileU8 fl = do 28 | h <- openFile fl ReadMode 29 | #if __GLASGOW_HASKELL__ >= 611 30 | hSetEncoding h latin1 31 | #endif 32 | hGetContents h 33 | 34 | header :: String -> Header 35 | header = unfold . takeWhile (/= "") . lines 36 | 37 | unfold :: [String] -> Header 38 | unfold [] = [] 39 | unfold (l:ls) = unfold' $ break (== ':') l 40 | where 41 | unfold' (_,[]) = unfold ls' 42 | unfold' (k,_:v') = (key, Value (v:vs)) : unfold ls' 43 | where 44 | key = map toLower k 45 | v = dropWhile isSpace v' 46 | vs = takeWhile (isSpace . head) ls 47 | ls' = dropWhile (isSpace . head) ls 48 | 49 | makeMsg :: FilePath -> Header -> Maybe Msg 50 | makeMsg folder hdr = messageID hdr >>= \vmyid -> 51 | Just Msg { 52 | myid = vmyid 53 | , path = folder 54 | , paid = messagePaID hdr 55 | , date = messageDate hdr 56 | } 57 | 58 | ---------------------------------------------------------------- 59 | 60 | messageID :: Header -> Maybe ID 61 | messageID hdr = getValue "message-id" hdr >>= parseMaybe msgid 62 | 63 | {- 64 | (1) The In-Reply-To contains one ID, use it. 65 | (2) The References contains one or more IDs, use the last one. 66 | (3) The In-Reply-To contains two or more IDs, use the first one. 67 | -} 68 | 69 | messagePaID :: Header -> ID 70 | messagePaID hdr 71 | | ilen == 1 = head is 72 | | rlen /= 0 = last rs 73 | | ilen /= 0 = head is 74 | | otherwise = "" 75 | where 76 | ilen = length is 77 | rlen = length rs 78 | is = fromMaybe [] inReplyTo 79 | rs = fromMaybe [] references 80 | inReplyTo = getValue "in-reply-to" hdr >>= parseMaybe msgids 81 | references = getValue "references" hdr >>= parseMaybe msgids 82 | 83 | messageDate :: Header -> String 84 | messageDate hdr = maybe "19700101000000" toStr (getValue "date" hdr >>= parseDate) 85 | where 86 | toStr :: UTCTime -> String 87 | toStr = formatTime defaultTimeLocale "%Y%m%d%H%M%S" 88 | 89 | parseDate :: String -> Maybe UTCTime 90 | parseDate cs = parseTimeM True defaultTimeLocale "%a, %e %b %Y %T %z" xs 91 | where 92 | (xs,_) = break (=='(') cs 93 | 94 | ---------------------------------------------------------------- 95 | 96 | parseMaybe :: Parser a -> String -> Maybe a 97 | parseMaybe p cs = either (const Nothing) Just (parse p "" cs) 98 | 99 | ---------------------------------------------------------------- 100 | 101 | msgid :: Parser String 102 | msgid = do 103 | _ <- char '<' 104 | left <- many1 (oneOf dotAtom) 105 | _ <- char '@' 106 | right <- many1 (oneOf dotAtom) 107 | _ <- char '>' 108 | spaces 109 | return $ "<" ++ left ++ "@" ++ right ++ ">" 110 | where 111 | dotAtom = ['a'..'z'] ++ ['A'..'Z'] ++ ['0'..'9'] 112 | ++ "!#$%&'*+-/=?^_`{|}~." 113 | 114 | msgids :: Parser [String] 115 | msgids = many1 msgid 116 | -------------------------------------------------------------------------------- /bin/w32/dirent.c: -------------------------------------------------------------------------------- 1 | /* 2 | * dirent.c 3 | * 4 | * Author: Shuichi Kitaguchi 5 | * Created: Jun 17, 2001 6 | * Revised: 7 | * 8 | * Code: 9 | */ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | #include 16 | #include 17 | 18 | 19 | /* 20 | * XXX: these functions may return invalid errno. 21 | */ 22 | 23 | DIR * 24 | opendir(const char *filename) 25 | { 26 | DIR *dir; 27 | size_t len = strlen(filename); 28 | char *pt; 29 | 30 | dir = malloc(sizeof(DIR)); 31 | if (dir == NULL) return NULL; 32 | 33 | /* initialize DIR strucure */ 34 | memset(dir, 0, sizeof(DIR)); 35 | dir->hFind = INVALID_HANDLE_VALUE; 36 | 37 | if (strlen(filename) == 0){ 38 | strcpy(dir->dd_filename, "*.*"); 39 | } else { 40 | while ((pt=_mbschr(dir->dd_filename, '/')) != NULL ) 41 | *pt = '\\'; 42 | if (filename[len-1] == '\\') 43 | _snprintf(dir->dd_filename, sizeof(dir->dd_filename), 44 | "%s*.*", filename); 45 | else 46 | _snprintf(dir->dd_filename, sizeof(dir->dd_filename), 47 | "%s\\*.*", filename); 48 | } 49 | 50 | return dir; 51 | } 52 | 53 | struct dirent * 54 | readdir(DIR *dir) 55 | { 56 | WIN32_FIND_DATA wfd; 57 | 58 | if (dir->hFind == INVALID_HANDLE_VALUE){ 59 | dir->hFind = FindFirstFile(dir->dd_filename, &wfd); 60 | if (dir->hFind == INVALID_HANDLE_VALUE) return NULL; 61 | } else { 62 | if (!FindNextFile(dir->hFind, &wfd)) return NULL; 63 | } 64 | 65 | /* store file attributes */ 66 | dir->dir.d_ino++; /* XXX fake */ 67 | dir->dir.d_namlen = strlen(wfd.cFileName); 68 | strcpy(dir->dir.d_name, wfd.cFileName); 69 | 70 | return &dir->dir; 71 | } 72 | 73 | int 74 | closedir(DIR *dir) 75 | { 76 | if (dir->hFind != INVALID_HANDLE_VALUE) 77 | FindClose(dir->hFind); 78 | free(dir); 79 | 80 | return 0; 81 | } 82 | 83 | /* 84 | * Copyright (C) 2001-2003 Mew developing team. 85 | * All rights reserved. 86 | * 87 | * Redistribution and use in source and binary forms, with or without 88 | * modification, are permitted provided that the following conditions 89 | * are met: 90 | * 91 | * 1. Redistributions of source code must retain the above copyright 92 | * notice, this list of conditions and the following disclaimer. 93 | * 2. Redistributions in binary form must reproduce the above copyright 94 | * notice, this list of conditions and the following disclaimer in the 95 | * documentation and/or other materials provided with the distribution. 96 | * 3. Neither the name of the team nor the names of its contributors 97 | * may be used to endorse or promote products derived from this software 98 | * without specific prior written permission. 99 | * 100 | * THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND 101 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 102 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 103 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE 104 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 105 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 106 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 107 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 108 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 109 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 110 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 111 | */ 112 | 113 | /* 114 | * dirent.c ends here 115 | */ 116 | -------------------------------------------------------------------------------- /bin/hs/Sql.hs: -------------------------------------------------------------------------------- 1 | module Sql where 2 | 3 | import Data.List 4 | import Database.HDBC 5 | import Database.HDBC.Sqlite3 6 | import Msg 7 | 8 | ---------------------------------------------------------------- 9 | 10 | withDB :: FilePath -> (Connection -> IO a) -> IO a 11 | withDB db cmd = handleSqlError $ do 12 | conn <- connectSqlite3 db 13 | res <- withTransaction conn cmd 14 | disconnect conn 15 | return res 16 | 17 | ---------------------------------------------------------------- 18 | 19 | createDB :: Connection -> IO () 20 | createDB conn = () <$ run conn format [] 21 | where 22 | format = "CREATE TABLE IF NOT EXISTS mew (id TEXT, path TEXT, parid TEXT, date TEXT);" 23 | 24 | indexDB :: Connection -> IO () 25 | indexDB conn = do 26 | _ <- run conn "CREATE INDEX IF NOT EXISTS mew_id ON mew (id);" [] 27 | _ <- run conn "REINDEX mew_id;" [] 28 | _ <- run conn "CREATE INDEX IF NOT EXISTS mew_parid ON mew (parid);" [] 29 | _ <- run conn "REINDEX mew_parid;" [] 30 | return () 31 | 32 | ---------------------------------------------------------------- 33 | 34 | getByID :: Connection -> ID -> IO [Msg] 35 | getByID conn mid = map toMsg <$> quickQuery' conn format params 36 | where 37 | format = "SELECT * FROM mew WHERE (id = ?);" 38 | params = [toSql mid] 39 | 40 | getByPaID :: Connection -> [ID] -> IO [Msg] 41 | getByPaID conn ids = map toMsg <$> quickQuery' conn format params 42 | where 43 | fmt = replicate (length ids) "parid = ?" 44 | fmt' = intersperse " OR " fmt 45 | fmt'' = concat fmt' 46 | format = "SELECT * FROM mew WHERE (" ++ fmt'' ++ ");" 47 | params = map toSql ids 48 | 49 | delByID :: Connection -> ID -> IO () 50 | delByID conn mid = () <$ run conn format params 51 | where 52 | format = "DELETE FROM mew WHERE (id = ?);" 53 | params = [toSql mid] 54 | 55 | addByID :: Connection -> ID -> String -> IO () 56 | addByID conn mid dat = () <$ run conn format params 57 | where 58 | format = "INSERT INTO mew VALUES (?, ?, ?, ?);" 59 | params = [toSql mid, toSql "", toSql "", toSql dat] 60 | 61 | ---------------------------------------------------------------- 62 | 63 | idForModtime :: String 64 | idForModtime = "" 65 | 66 | dbModtime :: Connection -> IO (Maybe Integer) 67 | dbModtime conn = do 68 | msgs <- getByID conn idForModtime 69 | if null msgs 70 | then return Nothing 71 | else return $ toI msgs 72 | where 73 | toI = Just . read . date . head 74 | 75 | setDBModtime :: Connection -> Integer -> IO () 76 | setDBModtime conn mt = do 77 | let mts = show mt 78 | mint <- dbModtime conn 79 | case mint of 80 | Nothing -> return () 81 | Just _ -> delByID conn idForModtime 82 | addByID conn idForModtime mts 83 | 84 | ---------------------------------------------------------------- 85 | 86 | prepareGet :: Connection -> IO Statement 87 | prepareGet conn = prepare conn "SELECT * FROM mew WHERE (id = ?);" 88 | 89 | prepareDel :: Connection -> IO Statement 90 | prepareDel conn = prepare conn "DELETE FROM mew WHERE (id = ?) AND (path = ?);" 91 | 92 | prepareAdd :: Connection -> IO Statement 93 | prepareAdd conn = prepare conn "INSERT INTO mew VALUES (?, ?, ?, ?);" 94 | 95 | getMsg :: Statement -> Msg -> IO [Msg] 96 | getMsg stmt msg = map toMsg <$> (execute stmt params *> fetchAllRows' stmt) 97 | where 98 | params = [toSql (myid msg)] 99 | 100 | delMsg :: Statement -> Msg -> IO () 101 | delMsg stmt msg = () <$ execute stmt params 102 | where 103 | params = [toSql (myid msg), toSql (path msg)] 104 | 105 | addMsg :: Statement -> Msg -> IO () 106 | addMsg stmt msg = () <$ execute stmt params 107 | where 108 | params = fromMsg msg 109 | -------------------------------------------------------------------------------- /bin/mewl.1: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) 2001-2003 Mew developing team. 2 | .\" All rights reserved. 3 | .\" 4 | .\" Redistribution and use in source and binary forms, with or without 5 | .\" modification, are permitted provided that the following conditions 6 | .\" are met: 7 | .\" 8 | .\" 1. Redistributions of source code must retain the above copyright 9 | .\" notice, this list of conditions and the following disclaimer. 10 | .\" 2. Redistributions in binary form must reproduce the above copyright 11 | .\" notice, this list of conditions and the following disclaimer in the 12 | .\" documentation and/or other materials provided with the distribution. 13 | .\" 3. Neither the name of the team nor the names of its contributors 14 | .\" may be used to endorse or promote products derived from this software 15 | .\" without specific prior written permission. 16 | .\" 17 | .\" THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND 18 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 20 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE 21 | .\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 24 | .\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | .\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 26 | .\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 27 | .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | .TH MEWL 1 "March 5, 2003" 29 | .SH NAME 30 | mewl - Message scanner for Mew 4 or later 31 | .\" 32 | .SH SYNOPSIS 33 | mewl 34 | .RI [ options ] 35 | .RI [ folder 36 | .RI [ range ]] 37 | .\" 38 | .SH DESCRIPTION 39 | The 40 | .B mewl 41 | utility extracts necessary fields from messages stored in folders. 42 | This command is necessary for Mew to implement the asynchronous feature. 43 | .PP 44 | The options are as follows: 45 | .TP 8 46 | .B \-a 47 | Print all necessary fields when picking. 48 | .TP 8 49 | .BI \-b " dir" 50 | Set the Mail home to 51 | .IR dir . 52 | .TP 8 53 | .BI \-c " bodylen" 54 | Set the max body length to be extracted to 55 | .IR bodylen . 56 | .TP 8 57 | .BI \-d " field" 58 | Set the field to be extracted to 59 | .IR field . 60 | .TP 8 61 | .BI \-e " command" 62 | Specify an external 63 | .I command 64 | to fetch mailbox. 65 | .TP 8 66 | .BI \-m " options" 67 | Specify 68 | .I options 69 | for 70 | .IR command . 71 | .TP 8 72 | .BI \-f " fields" 73 | Specify 74 | .I fields 75 | to display. 76 | .TP 8 77 | .B \-h 78 | Display this help message. 79 | .TP 8 80 | .BI \-i " file" 81 | Set the input stream to 82 | .IR file . 83 | .TP 8 84 | .BI \-l " length" 85 | Set the max field length to be extracted to 86 | .IR length . 87 | The default value is 3. 0 means no limit. 88 | .TP 8 89 | .B \-n 90 | Don't use fstat(). 91 | .TP 8 92 | .BI \-p " pattern" 93 | Specify the pick 94 | .IR pattern . 95 | .TP 8 96 | .BI \-s " src" 97 | Set message source to 98 | .I src 99 | : '+folder range'. 100 | .TP 8 101 | .B \-w 102 | Wait for stdio input to synchronize. 103 | .TP 8 104 | .B \-v 105 | Display the version. 106 | .TP 8 107 | .BI \-x " suffix" 108 | Use this 109 | .IR suffix . 110 | 111 | Definitions of the symbols above are as follows: 112 | .TP 8 113 | .I range 114 | N | [start]-[end] | last:N 115 | .TP 8 116 | .I pattern 117 | \'key=val' | 'key!=val' | '!' | '()' 118 | | '&' | '|' 119 | 120 | .\" 121 | .SH BUGS 122 | If a field is long, only the beginning three lines are extracted 123 | by default. 124 | .\" 125 | -------------------------------------------------------------------------------- /CHANGES/v6.2.md: -------------------------------------------------------------------------------- 1 | Mew 6.2 release (2008/12/24) 2 | 3 | * Brushing up defcustom. 4 | Tatsuya Kinoshita 5 | * Defining mew-cite-default-prefix. 6 | 7 | Mew 6.2 release candidate 2 (2008/12/18) 8 | 9 | * Defining mew-flowed-broken-list. 10 | * Workaround for infinite loop of regexp. 11 | * A patch for "_". 12 | Hideyuki SHIRAI 13 | * C-cC-o sets use-flowed in a draft. 14 | * C-uC-cC-f toggles whether or not a body will be encoded with 15 | format=flowed. 16 | * Status of lines is displayed in mode-line of Message mode. 17 | * Implementing mew-flowed-auto-wrap. 18 | * A patch for incm. 19 | Yasunari Momoi 20 | * mew-use-format-flowed defaults to nil. Use C-cC-f in Draft mode. 21 | * Defining mew-flowed-unfold-regex. 22 | * Bug fixes for mew-encode-flowed and mew-decode-flowed. 23 | 24 | Mew 6.2 release candidate 1 (2008/12/02) 25 | 26 | * Catching up Authentication-Results: ID 17. 27 | * A bug fix of "E" vs flowed. 28 | * A bug fix for mew-encode-flowed-line. 29 | * A bug fix of IMAP mark sync. 30 | * Refactoring mew-decode-multipart. 31 | 32 | Mew 6.1.52 (2008/11/27) 33 | 34 | * Recovering duplicate boundary. 35 | * Turning off longlines-mode on the encoding of format=flowed. 36 | Harald Hanche-Olsen 37 | * Implementing encoding of format=flowed. 38 | * Brushing up mew-decode-flowed. 39 | * "lx" supports IMAP mark sync. 40 | * A bug fix for format=flowed. 41 | * A bug fix for mew-refile-guess-by-alist. 42 | Hideyuki SHIRAI 43 | * Removing different "proto" candidates on refile. 44 | * A bug fix of "I" for IMAP in the case where the message 45 | does not exist. 46 | * Supporting Application/Zip. 47 | * Supporting MS Office 2007. 48 | Tomoharu Suzuki 49 | * The Seen and Flagged flag of IMAP is now supported. 50 | * A bug fix for "E" and "M-e" in the case where text/html is directly 51 | embedded in the body. 52 | * Implementing Edit mode (M-e). 53 | * A bug fix for mew-smime-encrypt. 54 | Christian Gerhardt 55 | 56 | Mew 6.1.51 (2008/10/15) 57 | 58 | * Backporting of "A bug fix of quote for smew" and 59 | "Generation search algorithm for smew" since searching by parid 60 | is quite fast. 61 | KOIE Hidetaka 62 | * An important bug fix on indices of "cmew". 63 | You MUST re-create the DB with "cmew -f". 64 | * mewest replicates casket when updating. 65 | HORIE Tetsuya 66 | * Emacs 22.2 on Windows has a bug on "%Z" of format-time-string. So, 67 | Mew does not append symbolic timezone on it. 68 | Yu-ji Hosokawa 69 | * Pacifying a worning of incm. 70 | KOIE Hidetaka 71 | * A bug fix of quote for smew. 72 | KOIE Hidetaka 73 | * A bug fix for "C-n". 74 | 75 | Mew 6.1.50 (2008/08/29) 76 | 77 | * Removing the key biding of "M-<" and "M->". 78 | * Supporting Text/X-Patch. "C-cC-e" opens a new frame and displays it 79 | with diff-mode. 80 | * A bug fix for static literal list. 81 | * mew-header-parse-address-list2 allows SPCs in folder names but 82 | removes preceding SPCs. 83 | * Defining "Text/Calendar" and "Text/X-Patch". 84 | * A bug fix for error recovery of message composing. 85 | * S/MIME filter now uses the result of status-fd. 86 | * Separating mew-inherit-encode-signer to 87 | mew-inherit-encode-pgp-signer and mew-inherit-encode-smime-signer. 88 | * No warnings hack for Emacs 23. 89 | * No warnings hack for unix-sync and mac-set-file-type. 90 | * No warnings hack when compiling. 91 | * Bug fix for mew-face-make-spec. 92 | * Bug fix for mew-header-color-base. 93 | * Bug fix the new alist format for nil. 94 | * Broken MIME messages without the MIME-Version: header are treated 95 | as MIME messages if the Content-* fields exist. 96 | * Excluding ",.:" at the end of URL. 97 | Christophe TROESTLER 98 | * syslog=no for stunnel. 99 | Yu-ji Hosokawa 100 | 101 | -------------------------------------------------------------------------------- /elisp/mew-auth.el: -------------------------------------------------------------------------------- 1 | ;;; -*- lexical-binding: nil; -*- 2 | ;;; mew-auth.el 3 | 4 | ;; Author: Mew developing team 5 | ;; Created: Aug 17, 1999 6 | 7 | ;;; Code: 8 | 9 | (require 'mew) 10 | 11 | (defun mew-auth-select (grt lst) 12 | (mew-auth-select2 (mew-split grt mew-sp) lst)) 13 | 14 | (defun mew-auth-select2 (auths lst) 15 | (let (n preference strongest) 16 | (dolist (auth auths) 17 | (setq n (mew-member-case-equal auth lst)) 18 | (cond 19 | ((null n) ()) 20 | ((null preference) 21 | (setq preference n) 22 | (setq strongest auth)) 23 | ((< n preference) 24 | (setq preference n) 25 | (setq strongest auth)))) 26 | strongest)) 27 | 28 | (defun mew-md5-raw (str) 29 | (let* ((md5str (mew-md5 str)) 30 | (len (length md5str)) 31 | (md5raw (make-string (/ len 2) 0)) 32 | (i 0) (j 0)) 33 | (while (< i len) 34 | (aset md5raw j (+ (* (mew-hexchar-to-int (aref md5str i)) 16) 35 | (mew-hexchar-to-int (aref md5str (1+ i))))) 36 | (setq i (+ i 2)) 37 | (setq j (1+ j))) 38 | md5raw)) 39 | 40 | ;; (mew-hmac-md5 "what do ya want for nothing?" "Jefe") 41 | ;; -> 0x750c783e6ab0b503eaa86e310a5db738 42 | 43 | (defun mew-hmac-md5 (message key) 44 | "HMAC-MD5 defined in RFC 2104" 45 | (let* ((keylen (length key)) 46 | (ipad 54) ;; 0x36 47 | (opad 92) ;; 0x5c 48 | (ikey (make-string 64 0)) 49 | okey digest) 50 | (when (< keylen 64) 51 | (dotimes (i keylen) 52 | (aset ikey i (aref key i)))) 53 | (setq okey (copy-sequence ikey)) 54 | (dotimes (i 64) 55 | (aset ikey i (logxor (aref ikey i) ipad)) 56 | (aset okey i (logxor (aref okey i) opad))) 57 | (setq digest (mew-md5-raw (concat ikey message))) 58 | (mew-md5 (concat okey digest)))) 59 | 60 | (defun mew-cram-md5 (user passwd b64-challenge) 61 | "CRAM-MD5 defined in RFC 2195" 62 | (let* ((challenge (mew-base64-decode-string b64-challenge)) 63 | (response (mew-hmac-md5 challenge passwd))) 64 | (mew-base64-encode-string (format "%s %s" user response)))) 65 | 66 | ;; 67 | 68 | (defun mew-keyed-md5 (key passwd) 69 | (mew-md5 (concat key passwd))) 70 | 71 | (provide 'mew-auth) 72 | 73 | ;;; Copyright Notice: 74 | 75 | ;; Copyright (C) 2000-2023 Mew developing team. 76 | ;; All rights reserved. 77 | 78 | ;; Redistribution and use in source and binary forms, with or without 79 | ;; modification, are permitted provided that the following conditions 80 | ;; are met: 81 | ;; 82 | ;; 1. Redistributions of source code must retain the above copyright 83 | ;; notice, this list of conditions and the following disclaimer. 84 | ;; 2. Redistributions in binary form must reproduce the above copyright 85 | ;; notice, this list of conditions and the following disclaimer in the 86 | ;; documentation and/or other materials provided with the distribution. 87 | ;; 3. Neither the name of the team nor the names of its contributors 88 | ;; may be used to endorse or promote products derived from this software 89 | ;; without specific prior written permission. 90 | ;; 91 | ;; THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND 92 | ;; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 93 | ;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 94 | ;; PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE 95 | ;; LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 96 | ;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 97 | ;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 98 | ;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 99 | ;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 100 | ;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 101 | ;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 102 | 103 | ;;; mew-auth.el ends here 104 | -------------------------------------------------------------------------------- /CHANGES/v6.9.md: -------------------------------------------------------------------------------- 1 | Mew 6.9 (2023/02/10) 2 | 3 | * renaming files 4 | * moving files to sub directories 5 | * s/Message-ID:/Message-Id:/ 6 | * adding mew-header-single-fields 7 | * Update documentation for mew-prog-ssl-arg 8 | Tatsuya Kinoshita 9 | * Define mew-prog-ssl-arg for mew-config-alist 10 | Tatsuya Kinoshita 11 | * Add dependencies for async native compilation 12 | Tatsuya Kinoshita 13 | * mew-vars3.el: require mew-env so mew-face-spec-func is defined. 14 | Thomas Danckaert 15 | * Avoid non-lexbind dotimes for Emacs 29 16 | Tatsuya Kinoshita 17 | * don't use local-write-file-hooks anymore 18 | * using fork() instead of vfork(). 19 | * removing warnings 20 | * Make sure macros are defined during native compilation. 21 | Thomas Danckaert 22 | * Fix misuse of decode-syntax in mew-summary-folder-cache-save 23 | Tatsuya Kinoshita 24 | * make sure that mew-home exists 25 | Naoya Yamashita 26 | * Check LF for IMAP FETCH to prevent redundant blank line in the header 27 | Tatsuya Kinoshita 28 | * Use mew-smtp-ssl-port when mew-smtp-ssl for passtag and log 29 | Tatsuya Kinoshita 30 | * Use ssl-p instead of ssl-process for mew-smtp-log() 31 | Tatsuya Kinoshita 32 | * supporting Emacs 26.1 or later only. 33 | * Simply use emacs-version for mew-x-mailer 34 | Tatsuya Kinoshita 35 | * Improve gitlog2mewchanges to remove item marks 36 | Tatsuya Kinoshita 37 | * Fix an issue in parallel build. 38 | Hiroki Sato 39 | * Avoid set-coding-priority for Emacs 28 40 | Tatsuya Kinoshita 41 | * Stop using `message-box` on Windows to report that password is wrong. 42 | Yasuhiro KIMURA 43 | * Make mew-suffix customizable 44 | Yoshinari Nomura 45 | * Fix prompt of mew-folder-new-message 46 | Yoshinari Nomura 47 | * Fix bug that mew-passwd-gpg-version doesn't work as is expected on Windows 48 | Yasuhiro KIMURA 49 | * Support checkHost for stunnel 5.15 50 | Tatsuya Kinoshita 51 | * Fix 'no info dir entry' warning when installing info files with MSYS2 52 | Yasuhiro KIMURA 53 | * Pick a subject sentence for gitlog2mewchanges 54 | Tatsuya Kinoshita 55 | * Prevent incorrect mew-jpeg-size 56 | Murata Takashi 57 | * Accept progressive JPEG for mew-jpeg-size 58 | Koichi Arakawa 59 | * Simplify comments for gitlog2mewchanges 60 | Tatsuya Kinoshita 61 | * Support the Credit: line for gitlog2mewchanges 62 | Tatsuya Kinoshita 63 | * added the function to close the unnecessary queue buffer 64 | Wada Keiji 65 | * added the function to close the unnecessary queue buffer 66 | Wada Keiji 67 | * fixing a bug of #121 (#122). 68 | * Add support for unix domain socket. 69 | Hiroki Sato 70 | * Don't add destination folder to mew-refile-{msgid,from}-alist if it is mew-imap-spam-folder. 71 | Yasuhiro KIMURA 72 | * Match exactly on an email address for mew-attach-pgp-public-key 73 | Tatsuya Kinoshita 74 | * lock_mbox(): no deletion of lockfile which is put by other application 75 | after retry 76 | zinn-yama 77 | * generating configure by autoconf. 78 | * Fix build with MSYS2. 79 | Yasuhiro KIMURA 80 | * Fix comparison between pointer and zero character constant in mewl.c 81 | Yasuhiro KIMURA 82 | * Fix mew-attach-pgp-public-key fails with gpg2 83 | Tatsuya Kinoshita 84 | * Add patterns for Windows binaries to .gitignore 85 | Yasuhiro KIMURA 86 | * increasing the header limit due to many long-header messages recently. 87 | * use mew-temp-file on windows platform. 88 | Shuichi KITAGUCHI 89 | * hiding the Autocrypt: header. 90 | * If stunnel supports foreground option, assume this is Unix-like system. 91 | Shuichi KITAGUCHI 92 | * fixing doc and adding example. 93 | KIRIHARA Masaharu 94 | * do not specify Unix-only option on Windows. 95 | Shuichi KITAGUCHI 96 | * removing d stuff. 97 | * updating 00readme for Haskell. 98 | * updating doc. 99 | -------------------------------------------------------------------------------- /Makefile.in: -------------------------------------------------------------------------------- 1 | ### 2 | ### Makefile.in for byte-compile 3 | ### 4 | ### Author: Mew developing team 5 | ### Created: Nov 18, 1994 6 | ### Revised: Feb 10, 2023 7 | 8 | ### 9 | ### (1) Set the following variables as you like. 10 | ### (2) make 11 | ### (2.1) make info 12 | ### (2.2) make jinfo 13 | ### (3) make install 14 | ### (3.1) make install-jinfo 15 | ### 16 | 17 | ################################################################ 18 | ## 19 | ## EDIT THE FOLLOWINGS 20 | ## 21 | 22 | prefix=@prefix@ 23 | exec_prefix=@exec_prefix@ 24 | libdir=@libdir@ 25 | datadir=@datadir@ 26 | infodir=@infodir@ 27 | 28 | ## 29 | ## Compile engines 30 | ## 31 | 32 | EMACS = @emacsbin@ 33 | 34 | ## 35 | ## A directory where mew*.el[c] will be installed. 36 | ## 37 | 38 | elispdir = @elispdir@ 39 | #elispdir = $(prefix)/share/emacs/site-lisp/mew 40 | #elispdir = $(prefix)/lib/emacs 41 | 42 | ## 43 | ## A directory where etc file will be installed. 44 | ## 45 | 46 | etcdir = @etcdir@ 47 | #etcdir = $(prefix)/share/emacs/site-lisp/mew/etc 48 | 49 | DETECT = emacs 50 | 51 | CP = cp 52 | RM = rm -f 53 | MKDIR = mkdir -p 54 | # To save Emacses on Windows 55 | PWD = 56 | 57 | CNF = config.h config.status config.cache config.log configure.lineno 58 | MK = Makefile 59 | 60 | DESTDIR = 61 | 62 | ################################################################ 63 | 64 | .PHONY: all 65 | all: elisp bin 66 | 67 | .PHONY: install 68 | install: install-elisp install-bin install-info install-etc 69 | 70 | ################################################################ 71 | 72 | .PHONY: elisp 73 | elisp: 74 | cd elisp; $(MAKE) EMACS=$(EMACS) 75 | 76 | .PHONY: install-elisp 77 | install-elisp: 78 | cd elisp; $(MAKE) install EMACS=$(EMACS) elispdir=$(elispdir) DESTDIR=$(DESTDIR) 79 | 80 | ################################################################ 81 | 82 | .PHONY: detect 83 | detect: 84 | cd elisp; $(MAKE) detect EMACS=$(EMACS) 85 | 86 | ################################################################ 87 | 88 | .PHONY: bin 89 | bin: 90 | cd bin; $(MAKE) 91 | 92 | .PHONY: install-bin 93 | install-bin: 94 | cd bin; $(MAKE) install DESTDIR=$(DESTDIR) 95 | 96 | ################################################################ 97 | 98 | .PHONY: info 99 | info: 100 | cd info; $(MAKE) info EMACS=$(EMACS) 101 | 102 | .PHONY: install-info 103 | install-info: 104 | cd info; $(MAKE) install-info infodir=$(infodir) DESTDIR=$(DESTDIR) 105 | 106 | ################################################################ 107 | 108 | .PHONY: jinfo 109 | jinfo: 110 | cd info; $(MAKE) jinfo EMACS=$(EMACS) 111 | 112 | .PHONY: install-jinfo 113 | install-jinfo: 114 | cd info; $(MAKE) install-jinfo infodir=$(infodir) DESTDIR=$(DESTDIR) 115 | 116 | ################################################################ 117 | 118 | .PHONY: install-etc 119 | install-etc: 120 | -@if [ ! -d $(DESTDIR)$(etcdir) ]; then \ 121 | $(MKDIR) $(DESTDIR)$(etcdir); \ 122 | fi 123 | cd etc; $(CP) -r * $(DESTDIR)$(etcdir)/ 124 | 125 | ################################################################ 126 | 127 | .PHONY: clean 128 | clean: 129 | -@if [ -f elisp/Makefile ]; then \ 130 | cd elisp; $(MAKE) clean; \ 131 | fi 132 | -@if [ -f bin/Makefile ]; then \ 133 | cd bin; $(MAKE) clean; \ 134 | fi 135 | 136 | .PHONY: distclean 137 | distclean: 138 | $(RM) $(CNF) $(MK) 139 | -@if [ -f elisp/Makefile ]; then \ 140 | cd elisp; $(MAKE) distclean; \ 141 | fi 142 | -@if [ -f bin/Makefile ]; then \ 143 | cd bin; $(MAKE) distclean; \ 144 | fi 145 | 146 | ################################################################ 147 | ## 148 | ## For github users 149 | ## 150 | 151 | # git fetch 152 | # make log to see logs of updates 153 | # make diff to see the updates 154 | # git pull 155 | 156 | .PHONY: log 157 | log: 158 | git log HEAD..FETCH_HEAD 159 | 160 | .PHONY: diff 161 | diff: 162 | git diff HEAD..FETCH_HEAD 163 | 164 | VERSION = `git tag --sort=authordate | tail -1 | sed -e 's/v//'` 165 | 166 | .PHONY: archive 167 | archive: 168 | git archive master -o ~/mew-$(VERSION).tar --prefix=mew-$(VERSION)/ 169 | gzip ~/mew-$(VERSION).tar 170 | 171 | ## 172 | ## End of Makefile 173 | ## 174 | -------------------------------------------------------------------------------- /API.md: -------------------------------------------------------------------------------- 1 | # API 2 | 3 | ## `"` 4 | 5 | A command specified by `"` is called with _Grep pattern_ and file 6 | names of the messages in the directory of a target folder. 7 | _Grep pattern_ is encoded according to `mew-cs-database-for-arg`. 8 | 9 | The command must produce output whose lines start with a file name of 10 | matched messages. It's OK if the same file name appears multiple 11 | times. 12 | 13 | ``` 14 | 10: xxx pattern xxx 15 | 10: yyy pattern yyy 16 | 21: zzz pattern zzz 17 | ``` 18 | 19 | ## `mew-scan-form-*` 20 | 21 | A symbol, say `symb`, in `mew-scan-form` means to call the function 22 | `mew-scan-form-symb`. Read the document of `mew-scan-form` for more 23 | information. This function MUST return a string. 24 | 25 | `mew-scan-form-*` can use some functions 26 | `(MEW-FOO)` and variables (`TOTAL`, `WIDTH)`. 27 | 28 | Users customizable variables are `mew-scan-fields` and 29 | `mew-scan-fields-alias`. 30 | 31 | `mew-scan-fields` MUST start with `("Folder:" "Filename:")`. 32 | `(nthcdr 2 mew-scan-fields)` passed to "mewl" and `mew-vec`, which contains each 33 | value of field in `mew-scan-fields`, is created. 34 | 35 | Each element of `mew-scan-fields-alias` is corresponding to an element 36 | of `mew-scan-fields`, respectively. Functions called `MEW-FOO` is 37 | defined according to `mew-scan-fields-alias`. 38 | 39 | `(MEW-SUBJ)` returns the value of Subject:. 40 | `MEW-SUBJ` is defined as `(aref mew-vec 3)` 41 | 42 | Pre-defined functions are: 43 | 44 | - `MEW-FLD` - Folder: 45 | - `MEW-NUM` - Filename: 46 | - `MEW-SUBJ` - Subject: 47 | - `MEW-DATE` - Date: 48 | - `MEW-FROM` - From: 49 | - `MEW-TO` - To: 50 | - `MEW-CT` - Content-Type: 51 | - `MEW-ID` - Message-ID: 52 | - `MEW-UIDL` - X-Mew-UIDL: 53 | 54 | To get a size in X-Mew-UIDL:, call `(mew-scan-get-size (MEW-UIDL))`. 55 | To get a uidl in X-Mew-UIDL:, call `(mew-scan-get-uidl (MEW-UIDL))`. 56 | 57 | Also, two local variables are available: 58 | 59 | - `TOTAL` - the current total width 60 | - `WIDTH` - the width 61 | 62 | After you change both `mew-scan-fields` and `mew-scan-fields-alias`, 63 | call `mew-status-update` (`Z` in Summary mode). 64 | 65 | ## Local mailbox 66 | 67 | Mew uses POP to retrieve messages. If you want to retrieve them from a 68 | local mailbox, set `mew-mailbox-type` to `mbox`. 69 | 70 | ``` elisp 71 | (setq mew-mailbox-type 'mbox) 72 | ``` 73 | 74 | In this case, Mew executes "mewl" with `mew-mbox-command` and 75 | `mew-mbox-command-arg`. 76 | 77 | ``` 78 | mewl -e mew-mbox-command -m mew-mbox-command-arg +folder 79 | ``` 80 | 81 | "mewl" then executes `mew-mbox-command` like this: 82 | 83 | ``` 84 | mew-mbox-command mew-mbox-command-arg +folder 85 | ``` 86 | 87 | Note that `mew-mbox-command` is executed in the destination directory 88 | (e.g. +folder). So, `mew-mbox-command` need not to expand/analysis the 89 | destination folder string. 90 | 91 | Note also that you can specifies a source of messages (i.e. local 92 | mailbox) in `mew-mbox-command-arg`. (The source need not to be the 93 | folder format. Just a path is enough.) 94 | 95 | `mew-mbox-command` MUST be move a message to the destination, then 96 | print its file name (a message number) to stdout. Repeat this cycle 97 | until the mailbox becomes empty. 98 | 99 | "mewl" reads stdin, extracts a message number, opens the message, 100 | then prints necessary fields. The extraction of a message number is 101 | performed like `"^[\t]*\\([0-9]+=\\)"`. 102 | 103 | It is emphasized that `mew-mbox-command` MUST print a resulting 104 | message number just after it moves the corresponding file so that 105 | "mewl" prints necessary fields immediately. It is a quite bad idea 106 | that `mew-mbox-command` moves all files first, then prints all message 107 | numbers. 108 | 109 | An example: 110 | 111 | ```elisp 112 | (setq mew-mbox-command "inc") 113 | (setq mew-mbox-command-arg "-truncate -file /var/mail/user") 114 | ``` 115 | 116 | The image of this example is as follows: 117 | 118 | ``` 119 | mewl -e inc -m '-truncate -file /var/mail/user' +inbox 120 | v 121 | (fork) 122 | v 123 | inc -truncate -file /var/mail/user +inbox | mewl 124 | ``` 125 | -------------------------------------------------------------------------------- /bin/incm.1: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) 2001-2003 Mew developing team. 2 | .\" All rights reserved. 3 | .\" 4 | .\" Redistribution and use in source and binary forms, with or without 5 | .\" modification, are permitted provided that the following conditions 6 | .\" are met: 7 | .\" 8 | .\" 1. Redistributions of source code must retain the above copyright 9 | .\" notice, this list of conditions and the following disclaimer. 10 | .\" 2. Redistributions in binary form must reproduce the above copyright 11 | .\" notice, this list of conditions and the following disclaimer in the 12 | .\" documentation and/or other materials provided with the distribution. 13 | .\" 3. Neither the name of the team nor the names of its contributors 14 | .\" may be used to endorse or promote products derived from this software 15 | .\" without specific prior written permission. 16 | .\" 17 | .\" THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND 18 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 20 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE 21 | .\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 24 | .\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | .\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 26 | .\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 27 | .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | .TH INCM 1 "December 25, 2001" 29 | .SH NAME 30 | incm - Incorporating new mails for Mew 31 | .\" 32 | .SH SYNOPSIS 33 | incm 34 | .RI [ options ] 35 | .\" 36 | .SH DESCRIPTION 37 | The 38 | .B incm 39 | utility incorporates new mails from the mbox or the maildir to 40 | Mew's inbox folder. 41 | .PP 42 | The options are as follows: 43 | .TP 8 44 | .B \-a 45 | Retrieve all mails from maildir/{cur,new} for maildir. 46 | .TP 8 47 | .B \-b 48 | Backup mails. 49 | mbox: No truncate mbox file. 50 | maildir: To maildir/cur directory. 51 | .TP 8 52 | .BI \-c 53 | Use the Content-Length: field, instead of the "From " line, 54 | as a mail separator for mbox. 55 | .TP 8 56 | .BI \-d " path" 57 | Path to mbox/maildir. 58 | If 59 | .IR path 60 | is a file, mbox is assumed. If 61 | .IR path 62 | is a directory, maildir is assumed. 63 | .TP 8 64 | .BI \-m " path" 65 | The same as the 66 | .B \-d 67 | option. 68 | .TP 8 69 | .BI \-s 70 | Read one mail from stdin instead of mbox/maildir. 71 | .TP 8 72 | .BI \-i " inboxdir" 73 | A path to the inbox directory. 74 | .TP 8 75 | .B \-u 76 | Don't touch ".mew-mtime". 77 | .TP 8 78 | .B \-f 79 | Preserve Unix From (Envelope Sender) line in mbox case. 80 | .TP 8 81 | .BI \-p " mode" 82 | Specify file mode that creates in mbox case. 83 | .TP 8 84 | .B \-o 85 | Use the suffix when creating messages. 86 | .TP 8 87 | .BI \-x " suffix" 88 | Use this 89 | .IR suffix . 90 | .TP 8 91 | .B \-h 92 | Display this help message. 93 | .TP 8 94 | .B \-v 95 | Display the version. 96 | .PP 97 | .SS mbox 98 | For mbox, the mail separator is "From " in the beginning of lines. 99 | The 100 | .B incm 101 | utility does not convert ">From " to "From " in the beginning of lines 102 | in the body. 103 | On Solaris, Content-Length: should be used with the 104 | .BI \-c 105 | option to tell the end of mail. 106 | .PP 107 | To lock mbox, a lock file(".lock"), 108 | flock() or lockf(), and open(O_EXLOCK) are used. 109 | .PP 110 | .SS maildir 111 | For maildir, no lock and no separator are necessary. 112 | .PP 113 | Consider the following situation: 114 | .nf 115 | cur/{1,2} 116 | new/{3,4} 117 | .fi 118 | .PP 119 | Executing 120 | .B incm 121 | without the options results in: 122 | .nf 123 | cur/{1,2} 124 | new/{} 125 | to inbox: {3,4} 126 | .fi 127 | .PP 128 | Executing 129 | .B incm 130 | with the 131 | .B \-a 132 | option results in: 133 | .nf 134 | cur/{} 135 | new/{} 136 | to inbox: {1,2,3,4} 137 | .fi 138 | .PP 139 | Executing 140 | .B incm 141 | with the 142 | .B \-b 143 | option results in: 144 | .nf 145 | cur/{1,2,3,4} 146 | new/{} 147 | to inbox: {3,4} 148 | .fi 149 | .PP 150 | Executing 151 | .B incm 152 | with the 153 | .B \-a 154 | option and the 155 | .B \-b 156 | option results in: 157 | .nf 158 | cur/{1,2,3,4} 159 | new/{} 160 | to inbox: {1,2,3,4} 161 | .fi 162 | So, if both options are specified, 163 | messages are retrieved multiple times. 164 | .\" 165 | -------------------------------------------------------------------------------- /bin/mew.h: -------------------------------------------------------------------------------- 1 | /* 2 | * mew.h 3 | * 4 | * Author: Mew developing team 5 | * Created: Jul 7, 2000 6 | * Revised: Jul 10, 2001 7 | * 8 | * Code: 9 | */ 10 | 11 | #ifndef _MEW_H_ 12 | #define _MEW_H_ 13 | 14 | #include "config.h" 15 | #include 16 | 17 | /* 18 | * Common symbol 19 | */ 20 | 21 | #define TRUE 1 22 | #define FALSE 0 23 | 24 | #define YES 1 25 | #define NO 0 26 | 27 | /* 28 | * File descriptor 29 | */ 30 | 31 | #define READ 0 32 | #define WRITE 1 33 | #define SYNC 3 34 | 35 | /* 36 | * File mode: "b" is ignored on UNIX. 37 | */ 38 | 39 | #define FDREAD "rb" 40 | #define FDWRITE "wb" 41 | 42 | /* 43 | * Control characters 44 | */ 45 | 46 | #define NUL '\0' 47 | #define CR '\r' 48 | #define LF '\n' 49 | #define EQ '=' 50 | #define TAB '\t' 51 | #define SP ' ' 52 | #define DOT '.' 53 | #define DEL 127 54 | 55 | /* 56 | * .mew-mtime filename 57 | */ 58 | 59 | #define MEW_MTIME_FILE ".mew-mtime" 60 | #define MEW_MTIME_PHRASE "touched by mewl." 61 | 62 | /* 63 | * Suffix 64 | */ 65 | 66 | #define SUFFIX ".mew" 67 | 68 | /* 69 | * 70 | */ 71 | 72 | #define FILESEP '/' 73 | 74 | #define STRCMP(str1, str2) strncmp(str1, str2, sizeof(str2) - 1) 75 | #define STRCPY(dst, src) do {strncpy(dst, src, sizeof(dst) - 1); dst[sizeof(dst) -1] = NUL;} while (0); 76 | #define STRDUP(dst, src) if (((dst) = strdup((src))) == NULL) warn_exit("memory fault.") 77 | #define MALLOC(p, siz) if (((p) = malloc((siz))) == NULL) warn_exit("memory fault.") 78 | #define REALLOC(p, siz) if (((p) = realloc((p), (siz))) == NULL) warn_exit("memory fault.") 79 | 80 | #ifndef HAVE_STRNCASECMP 81 | # ifdef HAVE_STRNICMP 82 | # define strncasecmp strnicmp 83 | # endif 84 | #endif 85 | 86 | #ifndef HAVE_CHDIR 87 | # ifdef HAVE__CHDIR2 88 | # define chdir _chdir2 89 | # endif 90 | #endif 91 | 92 | #ifdef HAVE_FCNTL_H 93 | # include 94 | # ifdef HAVE_IO_H 95 | # include 96 | # endif 97 | # ifdef O_BINARY 98 | # ifndef HAVE_SETMODE 99 | # ifdef HAVE__SETMODE 100 | # define setmode _setmode 101 | # endif 102 | # endif 103 | # ifndef HAVE_FILENO 104 | # ifdef HAVE__FILENO 105 | # define fileno _fileno 106 | # endif 107 | # endif 108 | # define SET_BINARY_MODE(fd) setmode(fileno((fd)), O_BINARY) 109 | # else /* O_BINARY */ 110 | # define SET_BINARY_MODE(fd) {} 111 | # endif /* O_BINARY */ 112 | #endif /* HAVE_FCNTL_H */ 113 | 114 | #ifndef HAVE_USLEEP 115 | # ifdef HAVE_SLEEP 116 | # define usleep(x) Sleep(x / 1000) 117 | # elif defined(HAVE_POLL) 118 | # define usleep(x) poll(0, 0, (x)/1000) 119 | # endif 120 | #endif 121 | 122 | /* 123 | * External functions and variables 124 | */ 125 | 126 | #define public extern 127 | #define private static 128 | 129 | public char *getprognm(char *); 130 | public void warning(const char *, ...); 131 | public void warn_exit(const char *, ...); 132 | public int search_string(char *, char *, int); 133 | public void pattern_init(char *); 134 | public int pattern_match(void); 135 | public char *Getline(FILE *); 136 | public int Getopt(int, char **, const char *); 137 | 138 | extern char *warn_prog; 139 | extern int Optind; 140 | extern char *Optarg; 141 | 142 | #endif /* _MEW_H_ */ 143 | 144 | /* 145 | * Copyright (C) 2000-2003 Mew developing team. 146 | * All rights reserved. 147 | * 148 | * Redistribution and use in source and binary forms, with or without 149 | * modification, are permitted provided that the following conditions 150 | * are met: 151 | * 152 | * 1. Redistributions of source code must retain the above copyright 153 | * notice, this list of conditions and the following disclaimer. 154 | * 2. Redistributions in binary form must reproduce the above copyright 155 | * notice, this list of conditions and the following disclaimer in the 156 | * documentation and/or other materials provided with the distribution. 157 | * 3. Neither the name of the team nor the names of its contributors 158 | * may be used to endorse or promote products derived from this software 159 | * without specific prior written permission. 160 | * 161 | * THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND 162 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 163 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 164 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE 165 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 166 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 167 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 168 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 169 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 170 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 171 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 172 | */ 173 | 174 | /* 175 | * mew.h ends here 176 | */ 177 | -------------------------------------------------------------------------------- /elisp/mew-fib.el: -------------------------------------------------------------------------------- 1 | ;;; -*- lexical-binding: nil; -*- 2 | ;;; mew-fib.el --- Filling blanks for Mew 3 | 4 | ;; Author: Mew developing team 5 | ;; Created: Nov 29, 1994 6 | 7 | ;;; Code: 8 | 9 | (require 'mew-func) 10 | 11 | (defvar mew-fib-item-alist nil) 12 | 13 | (defun mew-fib-split (str) 14 | (let (ret match) 15 | (while (string-match "[\t \n]*\\([^,]+\\)" str) 16 | (setq match (substring str (match-beginning 1) (match-end 1))) 17 | (setq str (substring str (match-end 0))) 18 | (setq match (if (string-match "[\t \n]+$" match) 19 | (substring match 0 (match-beginning 0)) 20 | match)) 21 | (setq ret (cons match ret))) 22 | (nreverse ret))) 23 | 24 | (defun mew-fib-make-alist () 25 | (let ((fib-file (expand-file-name mew-fib-item-file)) 26 | item val ret tmp-val) 27 | (setq mew-fib-item-alist nil) 28 | (with-temp-buffer 29 | (if (file-exists-p fib-file) 30 | (mew-insert-file-contents fib-file)) 31 | (goto-char (point-min)) 32 | (delete-matching-lines "^[ \t]*[;#%]") 33 | (while (re-search-forward "^\\([^:]+\\):[ \t]*\\(.*\\)$" nil t) 34 | (setq item (mew-buffer-substring (match-beginning 1) (match-end 1)) 35 | tmp-val (mew-buffer-substring (match-beginning 2) (match-end 2)) 36 | val (if (string= tmp-val "") val tmp-val) 37 | ret (append ret (mapcar (lambda (arg) (cons (downcase arg) val)) 38 | (mew-fib-split item)))))) 39 | ret)) 40 | 41 | (defun mew-fib-fill-default () 42 | "Fill |>item<| according to the information from .mew-fib" 43 | (interactive) 44 | (save-excursion 45 | (let (begin end str) 46 | (setq mew-fib-item-alist (mew-fib-make-alist)) 47 | (goto-char (point-min)) 48 | (while (re-search-forward "|>\\([^<]+\\)<|" nil t) 49 | (setq begin (match-beginning 1) 50 | end (match-end 1) 51 | str (mew-buffer-substring begin end)) 52 | (delete-region begin end) 53 | (backward-char 2) 54 | (insert (or (cdr (assoc (downcase str) mew-fib-item-alist)) str)))))) 55 | 56 | (defun mew-fib-delete-frame () 57 | "Delete all quotations, '|>' and '<|'. This is the finishing stroke." 58 | (interactive) 59 | (save-excursion 60 | (goto-char (point-min)) 61 | (while (re-search-forward "|>\\|<|" nil t) 62 | (replace-match "" nil t)))) 63 | 64 | (defun mew-fib-flush-input () 65 | "Flush the fib item on the current point." 66 | (interactive) 67 | (save-excursion 68 | (let ((ptr (point))) 69 | (if (and (search-backward "|>" nil t) 70 | (looking-at "|>\\([^<]+\\)<|") 71 | (>= ptr (match-beginning 1)) 72 | (<= ptr (match-end 1))) 73 | (delete-region (match-beginning 1) 74 | (match-end 1)))))) 75 | 76 | (defun mew-fib-next-item () 77 | "Jump to the next fib item." 78 | (interactive) 79 | (if (re-search-forward "|>\\([^<]+\\)<|" nil t) 80 | (backward-char 2) 81 | (goto-char (point-min)) 82 | (re-search-forward "|>\\([^<]+\\)<|" nil t))) 83 | 84 | (defun mew-fib-previous-item () 85 | "Jump to the previous fib item." 86 | (interactive) 87 | (if (re-search-backward "|>\\([^<]+\\)<|" nil t) 88 | (forward-char 2) 89 | (goto-char (point-max)) 90 | (re-search-backward "|>\\([^<]+\\)<|" nil t))) 91 | 92 | (provide 'mew-fib) 93 | 94 | ;;; Copyright Notice: 95 | 96 | ;; Copyright (C) 1994-2023 Mew developing team. 97 | ;; All rights reserved. 98 | 99 | ;; Redistribution and use in source and binary forms, with or without 100 | ;; modification, are permitted provided that the following conditions 101 | ;; are met: 102 | ;; 103 | ;; 1. Redistributions of source code must retain the above copyright 104 | ;; notice, this list of conditions and the following disclaimer. 105 | ;; 2. Redistributions in binary form must reproduce the above copyright 106 | ;; notice, this list of conditions and the following disclaimer in the 107 | ;; documentation and/or other materials provided with the distribution. 108 | ;; 3. Neither the name of the team nor the names of its contributors 109 | ;; may be used to endorse or promote products derived from this software 110 | ;; without specific prior written permission. 111 | ;; 112 | ;; THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND 113 | ;; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 114 | ;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 115 | ;; PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE 116 | ;; LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 117 | ;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 118 | ;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 119 | ;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 120 | ;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 121 | ;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 122 | ;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 123 | 124 | ;;; mew-fib.el ends here 125 | -------------------------------------------------------------------------------- /bin/utils.c: -------------------------------------------------------------------------------- 1 | /* 2 | * utils.c 3 | * 4 | * Author: Mew developing team 5 | * Created: Sep 29, 2000 6 | * 7 | * Code: 8 | */ 9 | 10 | #include "mew.h" 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #if !HAVE_MEMMOVE 19 | #define memmove(d, s, n) bcopy((s), (d), (n)) 20 | #endif 21 | 22 | char *warn_prog; 23 | 24 | public char * 25 | getprognm(char *filename) 26 | { 27 | char *p, *q; 28 | 29 | if ((p = strrchr(filename, FILESEP)) != NULL) 30 | p++; 31 | else 32 | p = filename; 33 | 34 | for (q = p; *q; q++) { 35 | *q = tolower(*q & 0xff); 36 | } 37 | return p; 38 | } 39 | 40 | public void 41 | warning(const char *fmt, ...) 42 | { 43 | va_list ap; 44 | 45 | if (warn_prog != NULL) 46 | fprintf(stderr, "%s: ", warn_prog); 47 | va_start(ap, fmt); 48 | if (fmt != NULL) 49 | vfprintf(stderr, fmt, ap); 50 | va_end(ap); 51 | fprintf(stderr, "\n"); 52 | } 53 | 54 | public void 55 | warn_exit(const char *fmt, ...) 56 | { 57 | va_list ap; 58 | 59 | if (warn_prog != NULL) 60 | fprintf(stderr, "%s: ", warn_prog); 61 | va_start(ap, fmt); 62 | if (fmt != NULL) 63 | vfprintf(stderr, fmt, ap); 64 | va_end(ap); 65 | fprintf(stderr, "\n"); 66 | 67 | exit(EXIT_FAILURE); 68 | } 69 | 70 | #ifndef HAVE_SNPRINTF 71 | public int 72 | snprintf(char *buf, int len, const char *fmt, ...) 73 | { 74 | int ret; 75 | va_list ap; 76 | 77 | va_start(ap, fmt); 78 | ret = vsprintf(buf, fmt, ap); 79 | va_end(ap); 80 | return ret; 81 | } 82 | #endif 83 | 84 | #ifndef HAVE_FGETLN 85 | private char* 86 | fgetln(FILE *fp, size_t *len) 87 | { 88 | static size_t bufsize = 0; 89 | static char *buf = NULL; 90 | char tmp[BUFSIZ]; 91 | size_t readlen; 92 | 93 | if (buf == NULL) { 94 | bufsize = BUFSIZ; 95 | MALLOC(buf, bufsize); 96 | } 97 | 98 | *len = 0; 99 | while (1) { 100 | if (fgets(tmp, BUFSIZ, fp) == NULL) 101 | return NULL; 102 | readlen = strlen(tmp); 103 | 104 | if (*len + readlen > bufsize) { 105 | bufsize += BUFSIZ; 106 | REALLOC(buf, bufsize); 107 | } 108 | memmove(&buf[*len], tmp, readlen); 109 | *len += readlen; 110 | if (readlen < BUFSIZ - 1 || tmp[BUFSIZ - 2] == '\n') 111 | break; 112 | } 113 | return buf; 114 | } 115 | #endif 116 | 117 | char* 118 | Getline(FILE* fp) 119 | { 120 | char *s, *t; 121 | size_t len; 122 | if ((t = fgetln(fp, &len)) == NULL) 123 | return NULL; 124 | MALLOC(s, len+1); 125 | memmove(s, t, len); 126 | s[len] = '\0'; 127 | return s; 128 | } 129 | 130 | int Optind = 1; 131 | char *Optarg = NULL; 132 | 133 | public int 134 | Getopt(int argc, char *argv[], const char *fmt) 135 | { 136 | char *p, *q, c; 137 | 138 | Optarg = NULL; 139 | if (Optind >= argc) 140 | return EOF; 141 | p = argv[Optind]; 142 | 143 | if (*p++ != '-') 144 | return EOF; 145 | c = *p; 146 | if (c == NUL) 147 | return EOF; 148 | if (*(p + 1) != NUL) 149 | warn_exit("unknown long option '-%s'.", p); 150 | if ((q = strchr(fmt, c)) == NULL) 151 | warn_exit("unknown option '-%c'.", c); 152 | if (++q != NULL && *q == ':') { 153 | if (++Optind >= argc) 154 | warn_exit("no parameter for '-%c'.", c); 155 | Optarg = argv[Optind]; 156 | } 157 | Optind++; 158 | return c; 159 | } 160 | 161 | /* 162 | * Copyright (C) 2000-2005 Mew developing team. 163 | * All rights reserved. 164 | * 165 | * Redistribution and use in source and binary forms, with or without 166 | * modification, are permitted provided that the following conditions 167 | * are met: 168 | * 169 | * 1. Redistributions of source code must retain the above copyright 170 | * notice, this list of conditions and the following disclaimer. 171 | * 2. Redistributions in binary form must reproduce the above copyright 172 | * notice, this list of conditions and the following disclaimer in the 173 | * documentation and/or other materials provided with the distribution. 174 | * 3. Neither the name of the team nor the names of its contributors 175 | * may be used to endorse or promote products derived from this software 176 | * without specific prior written permission. 177 | * 178 | * THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND 179 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 180 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 181 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE 182 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 183 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 184 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 185 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 186 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 187 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 188 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 189 | */ 190 | 191 | /* 192 | * utils.c ends here 193 | */ 194 | -------------------------------------------------------------------------------- /bin/smew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # 3 | # smew.rb: Lookuping Message-ID: DB with Sqlite3 4 | # 5 | 6 | begin 7 | require 'rubygems' 8 | gem 'sqlite3-ruby' 9 | rescue LoadError 10 | end 11 | require 'sqlite3' 12 | 13 | ################################################################ 14 | ## 15 | ## DB search 16 | ## 17 | 18 | def select_by_id(hash, db, id, mydir) 19 | ret = nil 20 | db.execute("SELECT * FROM mew WHERE (mew.id = ?);", id) do |ent| 21 | if push_results(hash, ent, mydir) 22 | ret = ent 23 | end 24 | end 25 | return ret 26 | end 27 | 28 | def select_by_parid(hash, db, id, mydir) 29 | ret = [] 30 | db.execute("SELECT * FROM mew WHERE (mew.parid = ?);", id) do |ent| 31 | if push_results(hash, ent, mydir) 32 | ret.push(ent) 33 | end 34 | end 35 | return ret 36 | end 37 | 38 | ################################################################ 39 | ## 40 | ## Results 41 | ## 42 | 43 | def push_results(hash, ent, mydir) 44 | if hash.key?(ent['id']) 45 | if File.dirname(ent['path']) == mydir 46 | hash.delete(ent['id']) 47 | hash[ent['id']] = ent 48 | end 49 | return nil 50 | else 51 | hash[ent['id']] = ent 52 | return true 53 | end 54 | end 55 | 56 | def print_results(hash) 57 | fin = hash.to_a.sort!{|a,b| a[1]['date'] <=> b[1]['date']} 58 | fin.each do |a| 59 | puts a[1]['path'] 60 | end 61 | end 62 | 63 | ################################################################ 64 | ## 65 | ## Search 66 | ## 67 | 68 | def search_me(hash, db, myid, mydir) 69 | ent = select_by_id(hash, db, myid, mydir) 70 | exit unless ent 71 | return ent 72 | end 73 | 74 | def search_ancestors(hash, db, parid, mydir) 75 | until parid == '' 76 | ent = select_by_id(hash, db, parid, mydir) 77 | break unless ent 78 | parid = ent['parid'] 79 | end 80 | end 81 | 82 | def search_descendants(hash, db, myid, mydir) 83 | parents = select_by_parid(hash, db, myid, mydir) 84 | while parents != [] 85 | children = [] 86 | parents.each do |ent| 87 | children += select_by_parid(hash, db, ent['id'], mydir) 88 | end 89 | parents = children 90 | end 91 | end 92 | 93 | def search_child(hash, db, myid, mydir) 94 | parents = select_by_parid(hash, db, [myid], mydir) 95 | exit unless parents != [] 96 | return parents[0] 97 | end 98 | 99 | ################################################################ 100 | ## 101 | ## Main 102 | ## 103 | 104 | require 'optparse' 105 | 106 | opts = {} 107 | OptionParser.new {|opt| 108 | begin 109 | opt.on('-p', 'search a parent message only') {|v| opts[:p] = v } 110 | opt.on('-c', 'search a child message only') {|v| opts[:c] = v } 111 | opt.parse!(ARGV) 112 | rescue OptionParser::ParseError => e 113 | puts opt 114 | exit 115 | end 116 | } 117 | 118 | myid = ARGV[0] 119 | mydb = ARGV[1] || File.expand_path('~/Mail/id.db') 120 | mydir = ARGV[2] 121 | db = SQLite3::Database.new(mydb) 122 | db.results_as_hash = true 123 | 124 | hash = {} 125 | 126 | begin 127 | if opts[:p] 128 | my = search_me(hash, db, myid, mydir) 129 | puts my['path']; 130 | elsif opts[:c] 131 | my = search_child(hash, db, myid, mydir) 132 | puts my['path']; 133 | else 134 | my = search_me(hash, db, myid, mydir) 135 | search_ancestors(hash, db, my['parid'], mydir) 136 | search_descendants(hash, db, myid, mydir) 137 | print_results(hash) 138 | end 139 | ensure 140 | db.close 141 | end 142 | 143 | # Copyright (C) 2008 Mew developing team. 144 | # All rights reserved. 145 | # 146 | # Redistribution and use in source and binary forms, with or without 147 | # modification, are permitted provided that the following conditions 148 | # are met: 149 | # 150 | # 1. Redistributions of source code must retain the above copyright 151 | # notice, this list of conditions and the following disclaimer. 152 | # 2. Redistributions in binary form must reproduce the above copyright 153 | # notice, this list of conditions and the following disclaimer in the 154 | # documentation and/or other materials provided with the distribution. 155 | # 3. Neither the name of the team nor the names of its contributors 156 | # may be used to endorse or promote products derived from this software 157 | # without specific prior written permission. 158 | # 159 | # THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND 160 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 161 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 162 | # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE 163 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 164 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 165 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 166 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 167 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 168 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 169 | # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 170 | -------------------------------------------------------------------------------- /CHANGES/v4.2.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | Mew 4.2 release (2005/02/11) 4 | 5 | Mew 4.2 release candidate 3 (2005/02/03) 6 | 7 | * A bug fix for mew-summary-exchange-marks. 8 | Hideyuki SHIRAI 9 | * A bug fix for mew-win32.el. 10 | Takashi Masuda 11 | * mew-which-exec hack and a fix for mew-namazu.el. 12 | Hideyuki SHIRAI 13 | 14 | Mew 4.2 release candidate 2 (2005/01/27) 15 | 16 | * Fixes for defcustom. 17 | Hideyuki SHIRAI 18 | * Bug fixes for "Rr". 19 | Hideyuki SHIRAI 20 | * The suffixes of OpenOffice are supported. 21 | * A bug fix for mark exchange. 22 | 23 | Mew 4.2 release candidate 1 (2005/01/13) 24 | 25 | * Wording check for minibuffer messages. 26 | Tatsuya Kinoshita 27 | * A patch for mew-nmz.el. 28 | Hideyuki SHIRAI 29 | * A patch for Application/Rtf. 30 | Hideyuki SHIRAI 31 | 32 | Mew 4.1.55 (2005/01/08) 33 | 34 | * The "-p" option is specified only for "incm". 35 | * The lang augment for mknmz. 36 | * Supporting Application/Rtf. 37 | SAKAI Kiyotaka 38 | * Yet another patch for mew-nmz.el. 39 | Hideyuki SHIRAI 40 | 41 | Mew 4.1.54 (2005/01/07) 42 | 43 | * snprintf() patch for incm. 44 | Yasunari Momoi 45 | * A patch for mew-nmz.el. 46 | Hideyuki SHIRAI 47 | * Using the same toolbar and menu as much as possible. 48 | SAKAI Kiyotaka 49 | * A wrapper for snprintf(). 50 | Murata Takashi 51 | * A patch to bin/w32/config.h. 52 | Shuichi KITAGUCHI 53 | 54 | Mew 4.1.53 (2004/12/28) 55 | 56 | * Marks on invalid messages are preserved when scanning. 57 | * A bug fix for mew-addrbook-clean-up. 58 | * mew-summary-cache-prefetch checks marks. 59 | * ";" now can handle an attached message. 60 | * "C-uw" now can handle an attached message. 61 | * Yet another patch for mew-nmz.el. 62 | Hideyuki SHIRAI 63 | * Hacking mew-cs-utf-16be. 64 | Hideyuki SHIRAI 65 | * :type fixes. 66 | Hideyuki SHIRAI 67 | * --info-dir for install-info. 68 | KIMURA Yasuhiro 69 | * A patch for mew-summary-folder-dir-newp. 70 | Hideyuki SHIRAI 71 | * Using null-device. 72 | Shuichi KITAGUCHI 73 | * Yet another patch for mew-nmz.el. 74 | Hideyuki SHIRAI 75 | 76 | Mew 4.1.52 (2004/12/22) 77 | 78 | * Yet another patch for mew-nmz.el. 79 | Hideyuki SHIRAI 80 | * Yet another patch for mew-nmz.el. 81 | Hideyuki SHIRAI 82 | * Introducing configure. 83 | KOIE Hidetaka 84 | * A patch for mew-nmz.el. 85 | Hideyuki SHIRAI 86 | * Importing mew-nmz.el. The key prefix is "k". 87 | Hideyuki SHIRAI 88 | * The etc directory is now "/usr/local/share/emacs/site-lisp/mew/etc" 89 | and it is automatically set. 90 | * Implementing mew-summary-write ("C-uw"). 91 | * Defining mew-summary-physical-folder. 92 | * "zi" toggles search-invisible. 93 | * A bug fix for mew-imap-expand-folder. 94 | * A bug fix for mew-convert-to-home-dir. 95 | * A bug fix for the mark recover. 96 | * Mew now makes use of the "-p" option for "incm". 97 | * The "-p" option for incm. 98 | Yasunari Momoi 99 | * Lock check for mew-{smtp,nntp2}-flush-queue. 100 | * A bug fix for refile override on scanning. 101 | * A bug fix for refile log. 102 | * Supporting POP PLAIN. 103 | * The invisible area is hidden when C-uC-cC-k. 104 | * Invalid cache messages of IMAP is first changed into invisible. 105 | Then the sentinel removes then invisible ones. 106 | * Security fix: a bug of format string on incm has been fixed. 107 | Ulf Harnhammar 108 | * Making line-move-ignore-invisible buffer-local. 109 | 110 | Mew 4.1.51 (2004/11/25) 111 | 112 | * "e" can be used in Virtual mode. 113 | Hideyuki SHIRAI 114 | * A bug fix for mew-in-decode-syntax-p(). 115 | SAITO Takuya 116 | * S/MIME support with gpgsm. 117 | * C-g works for mew-temp-minibuffer-message(). 118 | SAITO Takuya 119 | * A buf fix for mew-summary-goto-folder(). 120 | * NNTP hack for mew-summary-goto-folder(). 121 | Hideyuki SHIRAI 122 | * Replace the value of mew-sp for XEmacs: 32 => "?\ ". 123 | * Removing an unintended variable from mew-summary-goto-folder(). 124 | SAITO Takuya 125 | * A patch for contrib/mew-nmz.el. 126 | Hideyuki SHIRAI 127 | * A patch for contrib/mew-browse.el. 128 | Hideyuki SHIRAI 129 | * A new command "e" in Summary to exchange marks. 130 | * Removing a refile log entry when undo. 131 | * A bug fix for the problem of toggle-msg vs refile. 132 | 133 | Mew 4.1.50 (2004/10/29) 134 | 135 | * Removing CRs in mew-imap-debug(). 136 | * Removing mew-timing() from the SSL code. 137 | * Defining mew-cs-utf-16be. 138 | Hideyuki SHIRAI 139 | * Implementing IMAP UTF-7. 140 | * Yet another error handling for base64. 141 | Murata Takashi 142 | * Kill the buffer inserted with C-cC-i when quiting. 143 | KOIE Hidetaka 144 | * TLS support with stunnel. 145 | * Taking care of 'move on DnD. 146 | Hideyuki SHIRAI 147 | * Supporting Drag & Drop in Draft mode. 148 | * mew-set-file-modes for "lc". 149 | Nobuhiro IMAI 150 | * A bug fix for NNTP error handling. 151 | * A bug fix for SMTP error handling. 152 | * Hacking contrib/mew-browse.el. 153 | Hideyuki SHIRAI 154 | -------------------------------------------------------------------------------- /elisp/mew-demo.el: -------------------------------------------------------------------------------- 1 | ;;; -*- lexical-binding: nil; -*- 2 | ;;; mew-demo.el --- Startup demo for Mew 3 | 4 | ;; Author: Mew developing team 5 | ;; Created: Oct 2, 1996 6 | 7 | ;;; Code: 8 | 9 | (require 'mew-vars) 10 | 11 | (defvar mew-logo nil) 12 | 13 | (defconst mew-icon-mew "Mew.png") 14 | 15 | (defconst mew-hello-message 16 | " 17 | 18 | Welcome to Mew world. 19 | 20 | Mew -- Messaging in the Emacs World 21 | 22 | %s 23 | 24 | Copyright (C) 1994-2023 Mew developing team 25 | 26 | " 27 | ) 28 | 29 | (defconst mew-demo-string 30 | '( 31 | "/\\\\ - \\\\/" 32 | 33 | "-\\\\ - \\\\/" "\\\\\\ - \\\\/" "|\\\\ - \\\\/" "/\\\\ - \\\\/" 34 | "-\\\\ - \\\\/" "\\\\\\ - \\\\/" "|\\\\ - \\\\/" "/\\\\ - \\\\/" 35 | 36 | "/|\\ - \\\\/" "//\\ - \\\\/" "/-\\ - \\\\/" "/\\\\ - \\\\/" 37 | "/|\\ - \\\\/" "//\\ - \\\\/" "/-\\ - \\\\/" "/\\\\ - \\\\/" 38 | 39 | "/\\| - \\\\/" "/\\/ - \\\\/" "/\\- - \\\\/" "/\\\\ - \\\\/" 40 | "/\\| - \\\\/" "/\\/ - \\\\/" "/\\- - \\\\/" "/\\\\ - \\\\/" 41 | 42 | "/\\\\ - |\\/" "/\\\\ - /\\/" "/\\\\ - -\\/" "/\\\\ - \\\\/" 43 | "/\\\\ - |\\/" "/\\\\ - /\\/" "/\\\\ - -\\/" "/\\\\ - \\\\/" 44 | 45 | "/\\\\ - \\|/" "/\\\\ - \\//" "/\\\\ - \\-/" "/\\\\ - \\\\/" 46 | "/\\\\ - \\|/" "/\\\\ - \\//" "/\\\\ - \\-/" "/\\\\ - \\\\/" 47 | 48 | "/\\\\ - \\\\-" "/\\\\ - \\\\\\" "/\\\\ - \\\\|" "/\\\\ - \\\\/" 49 | "/\\\\ - \\\\-" "/\\\\ - \\\\\\" "/\\\\ - \\\\|" "/\\\\ - \\\\/" 50 | ) 51 | ) 52 | 53 | (defun mew-hello () 54 | (let ((time mew-demo-sit-for) 55 | (left-margin 0) 56 | (fill-column (window-width)) 57 | indent) 58 | (if (not (integerp time)) (setq time 0)) 59 | (insert (format mew-hello-message mew-version)) 60 | (center-region (point-min) (point-max)) 61 | (if (null mew-demo-picture) 62 | (mew-hello-text time) 63 | (cond 64 | ((and window-system 65 | (fboundp 'image-type-available-p) 66 | (image-type-available-p 'png)) 67 | (let ((ifile (expand-file-name mew-icon-mew mew-icon-directory))) 68 | (goto-char (point-max)) 69 | (when (file-readable-p ifile) 70 | (setq mew-logo (mew-create-image ifile)) 71 | (setq indent (/ (- (window-width) 72 | (truncate (car (image-size mew-logo)))) 2)) 73 | (setq indent (max 0 indent)) 74 | (insert (make-string indent mew-sp)) 75 | (insert-image mew-logo) 76 | (goto-char (point-min)))) 77 | (mew-redraw time)) 78 | (t 79 | (mew-hello-text time))) 80 | (set-buffer-modified-p nil)))) 81 | 82 | (defun mew-hello-text (time) 83 | (insert "/\\\\ - \\\\/") 84 | (center-line) 85 | (end-of-line) 86 | (insert (make-string (1- (- (window-width) (current-column))) mew-sp)) 87 | (end-of-line) 88 | (mew-redraw time) 89 | (if (and mew-demo window-system) (mew-demo))) 90 | 91 | (defun mew-demo (&optional string) 92 | (let* ((strs (or string mew-demo-string)) 93 | (wl (window-width)) 94 | (ul (length (regexp-quote "/\\ - \\/"))) 95 | (pl (/ (- wl ul) 2)) 96 | (pre (make-string pl mew-sp)) 97 | (suf (make-string (1- (- (- wl pl) ul)) mew-sp))) 98 | (save-window-excursion 99 | (dolist (str strs) 100 | (mew-demo-print str pre suf) 101 | (mew-demo-loop))))) 102 | 103 | (defun mew-demo-print (string prefix suffix) 104 | (goto-char (point-max)) 105 | (let ((end (point))) 106 | (beginning-of-line) 107 | (delete-region (point) end)) 108 | (insert prefix string suffix)) 109 | 110 | (defun mew-demo-loop () 111 | (mew-redraw 0.02)) 112 | 113 | (provide 'mew-demo) 114 | 115 | ;;; Copyright Notice: 116 | 117 | ;; Copyright (C) 1996-2023 Mew developing team. 118 | ;; All rights reserved. 119 | 120 | ;; Redistribution and use in source and binary forms, with or without 121 | ;; modification, are permitted provided that the following conditions 122 | ;; are met: 123 | ;; 124 | ;; 1. Redistributions of source code must retain the above copyright 125 | ;; notice, this list of conditions and the following disclaimer. 126 | ;; 2. Redistributions in binary form must reproduce the above copyright 127 | ;; notice, this list of conditions and the following disclaimer in the 128 | ;; documentation and/or other materials provided with the distribution. 129 | ;; 3. Neither the name of the team nor the names of its contributors 130 | ;; may be used to endorse or promote products derived from this software 131 | ;; without specific prior written permission. 132 | ;; 133 | ;; THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND 134 | ;; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 135 | ;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 136 | ;; PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE 137 | ;; LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 138 | ;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 139 | ;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 140 | ;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 141 | ;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 142 | ;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 143 | ;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 144 | 145 | ;;; mew-demo.el ends here 146 | -------------------------------------------------------------------------------- /elisp/mew-darwin.el: -------------------------------------------------------------------------------- 1 | ;;; -*- lexical-binding: nil; -*- 2 | ;;; mew-darwin.el --- Settings for Mew on Darwin 3 | 4 | ;; Author: Mew developing team 5 | ;; Created: Oct 30, 2002 6 | 7 | ;;; Code: 8 | 9 | ;;; 10 | ;;; MIME setting 11 | ;;; 12 | 13 | (defvar mew-darwin-exec "open") 14 | (defvar mew-default-external-program mew-darwin-exec) 15 | 16 | (defvar mew-prog-plain 'mew-mime-text/plain) 17 | (defvar mew-prog-html '(mew-mime-text/html mew-mime-text/html-ext)) 18 | (defvar mew-prog-xml '(mew-mime-text/xml mew-mime-text/xml-ext)) 19 | (defvar mew-prog-patch '(mew-mime-text/plain mew-mime-text/patch-ext)) 20 | (defvar mew-prog-enriched 'mew-mime-text/enriched) 21 | (defvar mew-prog-text 'mew-mime-text/plain) 22 | (defvar mew-prog-audio mew-darwin-exec) 23 | (defvar mew-prog-audio2 mew-darwin-exec) ;; dummy 24 | (defvar mew-prog-image '(mew-mime-image/* mew-mime-image/*-ext)) 25 | (defvar mew-prog-iges mew-darwin-exec) 26 | (defvar mew-prog-vrml mew-darwin-exec) 27 | (defvar mew-prog-mesh mew-darwin-exec) 28 | (defvar mew-prog-video mew-darwin-exec) 29 | (defvar mew-prog-rfc822 'mew-mime-message/rfc822) 30 | (defvar mew-prog-rfc822-headers 'mew-mime-text/rfc822-headers) 31 | (defvar mew-prog-external-body '(mew-mime-external-body mew-mime-external-body-ext)) 32 | (defvar mew-prog-delivery-status 'mew-mime-text/plain) 33 | (defvar mew-prog-oasys mew-darwin-exec) 34 | (defvar mew-prog-octet-stream mew-darwin-exec) 35 | (defvar mew-prog-postscript mew-darwin-exec) 36 | (defvar mew-prog-application/pdf "pdftotext") 37 | (defvar mew-prog-pdf-ext mew-darwin-exec) 38 | (defvar mew-prog-pdf `(mew-mime-application/pdf ,mew-prog-pdf-ext)) 39 | (defvar mew-prog-pgp-keys '(mew-mime-pgp-keys mew-mime-pgp-keys-ext)) 40 | 41 | (defvar mew-prog-application/rtf nil) 42 | (defvar mew-prog-rtf mew-darwin-exec) 43 | 44 | (defvar mew-prog-xml2 '(mew-mime-application/xml 45 | mew-mime-application/xml-ext)) 46 | (defvar mew-prog-unzip mew-darwin-exec) 47 | 48 | ;;; 49 | ;;; Text/Html, Application/Xml 50 | ;;; 51 | 52 | (defvar mew-format-html "%s.html") 53 | (defvar mew-format-xml "%s.xml") 54 | 55 | (defvar mew-prog-text/html 56 | (if (and (fboundp 'shr-render-region) 57 | (fboundp 'libxml-parse-html-region)) 58 | 'shr-render-region 59 | 'mew-mime-text/html-w3m)) ;; See w3m.el 60 | (defvar mew-prog-text/html-ext mew-darwin-exec) 61 | 62 | (defvar mew-prog-text/xml 63 | (if (and (fboundp 'shr-render-region) 64 | (fboundp 'libxml-parse-html-region)) 65 | 'shr-render-region 66 | 'mew-mime-text/html-w3m)) ;; See w3m.el 67 | (defvar mew-prog-text/xml-ext mew-darwin-exec) 68 | 69 | (defvar mew-prog-application/xml nil) 70 | (defvar mew-prog-application/xml-ext mew-darwin-exec) 71 | 72 | 73 | ;;; 74 | ;;; Image 75 | ;;; 76 | 77 | (defvar mew-prog-image/* 'mew-mime-image/*) 78 | (defvar mew-prog-image/*-ext mew-darwin-exec) 79 | 80 | 81 | ;;; 82 | ;;; Office 83 | ;;; 84 | 85 | (defvar mew-prog-ooffice mew-darwin-exec) 86 | 87 | (defvar mew-prog-application/msword nil) 88 | (defvar mew-prog-msword mew-darwin-exec) 89 | 90 | (defvar mew-prog-application/msexcel nil) 91 | (defvar mew-prog-msexcel mew-darwin-exec) 92 | 93 | (defvar mew-prog-application/mspowerpoint nil) 94 | (defvar mew-prog-mspowerpoint mew-darwin-exec) 95 | 96 | (defvar mew-prog-visio mew-darwin-exec) 97 | 98 | 99 | ;;; 100 | ;;; Misc 101 | ;;; 102 | 103 | (setq mew-delete-temp-file nil) 104 | (defvar mew-dir-list-function 'mew-dir-list-with-link-count) 105 | 106 | (provide 'mew-darwin) 107 | 108 | ;;; Copyright Notice: 109 | 110 | ;; Copyright (C) 2002-2023 Mew developing team. 111 | ;; All rights reserved. 112 | 113 | ;; Redistribution and use in source and binary forms, with or without 114 | ;; modification, are permitted provided that the following conditions 115 | ;; are met: 116 | ;; 117 | ;; 1. Redistributions of source code must retain the above copyright 118 | ;; notice, this list of conditions and the following disclaimer. 119 | ;; 2. Redistributions in binary form must reproduce the above copyright 120 | ;; notice, this list of conditions and the following disclaimer in the 121 | ;; documentation and/or other materials provided with the distribution. 122 | ;; 3. Neither the name of the team nor the names of its contributors 123 | ;; may be used to endorse or promote products derived from this software 124 | ;; without specific prior written permission. 125 | ;; 126 | ;; THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND 127 | ;; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 128 | ;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 129 | ;; PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE 130 | ;; LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 131 | ;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 132 | ;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 133 | ;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 134 | ;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 135 | ;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 136 | ;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 137 | 138 | ;;; mew-darwin.el ends here 139 | -------------------------------------------------------------------------------- /bin/config.h.in: -------------------------------------------------------------------------------- 1 | /* config.h.in. Generated from configure.in by autoheader. */ 2 | 3 | /* Define to 1 if you have the `chdir' function. */ 4 | #undef HAVE_CHDIR 5 | 6 | /* Define to 1 if you have the `chmod' function. */ 7 | #undef HAVE_CHMOD 8 | 9 | /* Define to 1 if you have the header file, and it defines `DIR'. 10 | */ 11 | #undef HAVE_DIRENT_H 12 | 13 | /* Define to 1 if you have the header file. */ 14 | #undef HAVE_DIR_H 15 | 16 | /* Define to 1 if you have the `fchmod' function. */ 17 | #undef HAVE_FCHMOD 18 | 19 | /* Define to 1 if you have the header file. */ 20 | #undef HAVE_FCNTL_H 21 | 22 | /* Define to 1 if you have the `fgetln' function. */ 23 | #undef HAVE_FGETLN 24 | 25 | /* Define to 1 if you have the `flock' function. */ 26 | #undef HAVE_FLOCK 27 | 28 | /* Define to 1 if you have the `fork' function. */ 29 | #undef HAVE_FORK 30 | 31 | /* Define to 1 if you have the `futimes' function. */ 32 | #undef HAVE_FUTIMES 33 | 34 | /* Define to 1 if you have the `getlogin' function. */ 35 | #undef HAVE_GETLOGIN 36 | 37 | /* Define to 1 if you have the `getpwuid' function. */ 38 | #undef HAVE_GETPWUID 39 | 40 | /* Define to 1 if you have the header file. */ 41 | #undef HAVE_INTTYPES_H 42 | 43 | /* Define to 1 if you have the header file. */ 44 | #undef HAVE_IO_H 45 | 46 | /* Define to 1 if you have the `z' library (-lz). */ 47 | #undef HAVE_LIBZ 48 | 49 | /* Define to 1 if you have the `lockf' function. */ 50 | #undef HAVE_LOCKF 51 | 52 | /* Define to 1 if you have the `memmove' function. */ 53 | #undef HAVE_MEMMOVE 54 | 55 | /* Define to 1 if you have the header file, and it defines `DIR'. */ 56 | #undef HAVE_NDIR_H 57 | 58 | /* Define to 1 if you have the `poll' function. */ 59 | #undef HAVE_POLL 60 | 61 | /* Define to 1 if you have the header file. */ 62 | #undef HAVE_PWD_H 63 | 64 | /* Define to 1 if you have the `setmode' function. */ 65 | #undef HAVE_SETMODE 66 | 67 | /* Define to 1 if SIGALRM is defined */ 68 | #undef HAVE_SIGALRM 69 | 70 | /* Define to 1 if SIGHUP is defined */ 71 | #undef HAVE_SIGHUP 72 | 73 | /* Define to 1 if you have the `Sleep' function. */ 74 | #undef HAVE_SLEEP 75 | 76 | /* Define to 1 if you have the `snprintf' function. */ 77 | #undef HAVE_SNPRINTF 78 | 79 | /* Define to 1 if you have the header file. */ 80 | #undef HAVE_STDINT_H 81 | 82 | /* Define to 1 if you have the header file. */ 83 | #undef HAVE_STDIO_H 84 | 85 | /* Define to 1 if you have the header file. */ 86 | #undef HAVE_STDLIB_H 87 | 88 | /* Define to 1 if you have the header file. */ 89 | #undef HAVE_STRINGS_H 90 | 91 | /* Define to 1 if you have the header file. */ 92 | #undef HAVE_STRING_H 93 | 94 | /* Define to 1 if you have the `strncasecmp' function. */ 95 | #undef HAVE_STRNCASECMP 96 | 97 | /* Define to 1 if you have the `strnicmp' function. */ 98 | #undef HAVE_STRNICMP 99 | 100 | /* Define to 1 if you have the header file, and it defines `DIR'. 101 | */ 102 | #undef HAVE_SYS_DIR_H 103 | 104 | /* Define to 1 if you have the header file. */ 105 | #undef HAVE_SYS_FILE_H 106 | 107 | /* Define to 1 if you have the header file, and it defines `DIR'. 108 | */ 109 | #undef HAVE_SYS_NDIR_H 110 | 111 | /* Define to 1 if you have the header file. */ 112 | #undef HAVE_SYS_STAT_H 113 | 114 | /* Define to 1 if you have the header file. */ 115 | #undef HAVE_SYS_TIME_H 116 | 117 | /* Define to 1 if you have the header file. */ 118 | #undef HAVE_SYS_TYPES_H 119 | 120 | /* Define to 1 if you have the header file. */ 121 | #undef HAVE_UNISTD_H 122 | 123 | /* Define to 1 if you have the `usleep' function. */ 124 | #undef HAVE_USLEEP 125 | 126 | /* Define to 1 if you have the `utimes' function. */ 127 | #undef HAVE_UTIMES 128 | 129 | /* Define to 1 if you have the `_chdir2' function. */ 130 | #undef HAVE__CHDIR2 131 | 132 | /* Define to 1 if you have the `_setmode' function. */ 133 | #undef HAVE__SETMODE 134 | 135 | /* Define to the address where bug reports for this package should be sent. */ 136 | #undef PACKAGE_BUGREPORT 137 | 138 | /* Define to the full name of this package. */ 139 | #undef PACKAGE_NAME 140 | 141 | /* Define to the full name and version of this package. */ 142 | #undef PACKAGE_STRING 143 | 144 | /* Define to the one symbol short name of this package. */ 145 | #undef PACKAGE_TARNAME 146 | 147 | /* Define to the home page for this package. */ 148 | #undef PACKAGE_URL 149 | 150 | /* Define to the version of this package. */ 151 | #undef PACKAGE_VERSION 152 | 153 | /* Define to 1 if all of the C90 standard headers exist (not just the ones 154 | required in a freestanding environment). This macro is provided for 155 | backward compatibility; new code need not use it. */ 156 | #undef STDC_HEADERS 157 | 158 | /* Define to empty if `const' does not conform to ANSI C. */ 159 | #undef const 160 | 161 | /* Define to `int' if doesn't define. */ 162 | #undef gid_t 163 | 164 | /* Define as a signed integer type capable of holding a process identifier. */ 165 | #undef pid_t 166 | 167 | /* Define to `unsigned int' if does not define. */ 168 | #undef size_t 169 | 170 | /* Define to `int' if does not define. */ 171 | #undef ssize_t 172 | 173 | /* Define to `int' if doesn't define. */ 174 | #undef uid_t 175 | 176 | /* Define to `int' if does not define. */ 177 | #undef useconds_t 178 | -------------------------------------------------------------------------------- /bin/w32/w32.h: -------------------------------------------------------------------------------- 1 | /* 2 | * w32.h 3 | * 4 | * Author: Shuichi Kitaguchi 5 | * Created: Jun 17, 2001 6 | * Revised: 7 | * 8 | * Code: 9 | */ 10 | 11 | 12 | /* 13 | * Typedefs, definitions and functions for Win32 environment. 14 | */ 15 | 16 | #ifndef __W32_H__ 17 | #define __W32_H__ 18 | 19 | 20 | /* includes */ 21 | #include /* for chdir()/mkdir()/... */ 22 | 23 | /* additional types for sys/types.h */ 24 | 25 | #ifndef _POSIX_SOURCE 26 | typedef unsigned char u_char; 27 | typedef unsigned short u_short; 28 | typedef unsigned int u_int; 29 | typedef unsigned long u_long; 30 | typedef unsigned short ushort; /* Sys V compatibility */ 31 | typedef unsigned int uint; /* Sys V compatibility */ 32 | #endif 33 | 34 | typedef unsigned char u_int8_t; 35 | typedef unsigned short u_int16_t; 36 | typedef unsigned long u_int32_t; 37 | typedef unsigned __int64 u_int64_t; 38 | typedef signed char int8_t; 39 | typedef signed short int16_t; 40 | typedef signed long int32_t; 41 | typedef signed __int64 int64_t; 42 | 43 | typedef u_int32_t pid_t; /* process ID */ 44 | 45 | /* Borland C++ has uid_t and gid_t. Why? */ 46 | #ifndef __BORLANDC__ 47 | typedef u_int32_t uid_t; /* user ID */ 48 | typedef u_int32_t gid_t; /* group ID */ 49 | #endif 50 | 51 | /* definitions */ 52 | 53 | #ifndef inline 54 | #define inline __inline 55 | #endif 56 | 57 | /* POSIX macros */ 58 | 59 | #include 60 | 61 | #ifndef S_IFLNK 62 | #define S_IFLNK 0120000 /* symbolic link */ 63 | #endif 64 | #ifndef S_ISUID 65 | #define S_ISUID 0004000 /* set user id on execution */ 66 | #endif 67 | #ifndef S_ISGID 68 | #define S_ISGID 0002000 /* set group id on execution */ 69 | #endif 70 | #ifndef S_IRWXU 71 | #define S_IRWXU 0000700 /* RWX for owner */ 72 | #endif 73 | #ifndef S_IRUSR 74 | #define S_IRUSR 0000400 /* R for owner */ 75 | #endif 76 | #ifndef S_IWUSR 77 | #define S_IWUSR 0000200 /* W for owner */ 78 | #endif 79 | #ifndef S_IXUSR 80 | #define S_IXUSR 0000100 /* E for owner */ 81 | #endif 82 | #ifndef S_IRWXG 83 | #define S_IRWXG 0000070 /* RWX for group */ 84 | #endif 85 | #ifndef S_IRGRP 86 | #define S_IRGRP 0000040 /* R for group */ 87 | #endif 88 | #ifndef S_IWGRP 89 | #define S_IWGRP 0000020 /* W for group */ 90 | #endif 91 | #ifndef S_IXGRP 92 | #define S_IXGRP 0000010 /* X for group */ 93 | #endif 94 | #ifndef S_IRWXO 95 | #define S_IRWXO 0000007 /* RWX for other */ 96 | #endif 97 | #ifndef S_IROTH 98 | #define S_IROTH 0000004 /* R for other */ 99 | #endif 100 | #ifndef S_IWOTH 101 | #define S_IWOTH 0000002 /* W for other */ 102 | #endif 103 | #ifndef S_IXOTH 104 | #define S_IXOTH 0000001 /* E for other */ 105 | #endif 106 | 107 | #ifndef S_ISDIR 108 | #define S_ISDIR(mode) (((mode)&(_S_IFMT))==(_S_IFDIR)) 109 | #endif 110 | #ifndef S_ISREG 111 | #define S_ISREG(mode) (((mode)&(_S_IFMT))==(_S_IFREG)) 112 | #endif 113 | 114 | 115 | /* supplements for string.h */ 116 | 117 | #define strcasecmp stricmp 118 | #define strncasecmp strnicmp 119 | #define snprintf _snprintf 120 | #if _MSC_VER < 1500 121 | #define vsnprintf _vsnprintf 122 | #endif 123 | #define lstat stat 124 | 125 | size_t strlcpy(char *, const char*, size_t); 126 | size_t strlcat(char *, const char*, size_t); 127 | 128 | char *realpath(const char *, char*); 129 | 130 | #ifdef INET6 131 | #include 132 | #else 133 | #include 134 | #endif 135 | 136 | int wsa_socketpair(SOCKET *); 137 | void wsa_create_terminal(SOCKET); 138 | char *wsa_strerror(int); 139 | void wsa_perror(char *); 140 | #define wsa_lasterror() WSAGetLastError() 141 | 142 | 143 | /* On Win32 environment, uid/gid does not exist. */ 144 | #define _W32_USER_ID 0 145 | #define _W32_GROUP_ID 0 146 | 147 | 148 | 149 | #endif /* __W32_H__ */ 150 | 151 | /* 152 | * Copyright (C) 2001-2003 Mew developing team. 153 | * All rights reserved. 154 | * 155 | * Redistribution and use in source and binary forms, with or without 156 | * modification, are permitted provided that the following conditions 157 | * are met: 158 | * 159 | * 1. Redistributions of source code must retain the above copyright 160 | * notice, this list of conditions and the following disclaimer. 161 | * 2. Redistributions in binary form must reproduce the above copyright 162 | * notice, this list of conditions and the following disclaimer in the 163 | * documentation and/or other materials provided with the distribution. 164 | * 3. Neither the name of the team nor the names of its contributors 165 | * may be used to endorse or promote products derived from this software 166 | * without specific prior written permission. 167 | * 168 | * THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND 169 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 170 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 171 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE 172 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 173 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 174 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 175 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 176 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 177 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 178 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 179 | */ 180 | 181 | /* 182 | * w32.h ends here 183 | */ 184 | -------------------------------------------------------------------------------- /elisp/Makefile: -------------------------------------------------------------------------------- 1 | ## 2 | ### Makefile.in for byte-compile 3 | ### 4 | ### Author: Mew developing team 5 | ### Created: Nov 18, 1994 6 | ### Revised: Sep 17, 2025 7 | 8 | EMACS = emacs 9 | prefix = /usr/local 10 | elispdir = $(prefix)/share/emacs/site-lisp/mew 11 | 12 | ################################################################ 13 | ## 14 | ## DO NOT EDIT THE FOLLOWINGS 15 | ## 16 | 17 | # This Makefile doesn't get remade. 18 | .PHONY: Makefile 19 | 20 | # Too bad we cannot simply say 21 | # 22 | # OBJS = $(SRC:%el=%elc) 23 | # 24 | # because this GNU `make` extension has only been added to the POSIX 25 | # standard in 2024, which is too recent to have broad support. 26 | OBJS = mew-addrbook.elc mew-attach.elc mew-auth.elc \ 27 | mew-blvs.elc mew-bq.elc mew-cache.elc \ 28 | mew-complete.elc mew-config.elc mew-const.elc \ 29 | mew-decode.elc mew-demo.elc mew-draft.elc \ 30 | mew-edit.elc mew-encode.elc \ 31 | mew-env.elc mew-env0.elc \ 32 | mew-ext.elc mew-fib.elc mew-func.elc \ 33 | mew-gemacs.elc mew-header.elc mew-highlight.elc \ 34 | mew-imap.elc mew-imap2.elc mew-key.elc \ 35 | mew-lang-jp.elc mew-lang-kr.elc mew-lang-latin.elc \ 36 | mew-local.elc mew-mark.elc \ 37 | mew-message.elc mew-mime.elc mew-minibuf.elc \ 38 | mew-mule.elc mew-mule3.elc \ 39 | mew-net.elc mew-nntp.elc mew-nntp2.elc \ 40 | mew-oauth2.elc \ 41 | mew-pgp.elc mew-pick.elc mew-pop.elc \ 42 | mew-refile.elc mew-scan.elc mew-smime.elc \ 43 | mew-search.elc mew-smtp.elc mew-sort.elc \ 44 | mew-ssh.elc mew-ssl.elc mew-passwd.elc \ 45 | mew-summary.elc mew-summary2.elc mew-summary3.elc \ 46 | mew-summary4.elc mew-syntax.elc \ 47 | mew-thread.elc mew-unix.elc \ 48 | mew-vars.elc mew-vars2.elc mew-vars3.elc \ 49 | mew-varsx.elc mew-virtual.elc \ 50 | mew-win32.elc mew-exec.elc \ 51 | mew-darwin.elc mew.elc 52 | 53 | SRCS = mew-addrbook.el mew-attach.el mew-auth.el \ 54 | mew-blvs.el mew-bq.el mew-cache.el \ 55 | mew-complete.el mew-config.el mew-const.el \ 56 | mew-decode.el mew-demo.el mew-draft.el \ 57 | mew-edit.el mew-encode.el \ 58 | mew-env.el mew-env0.el \ 59 | mew-ext.el mew-fib.el mew-func.el \ 60 | mew-gemacs.el mew-header.el mew-highlight.el \ 61 | mew-imap.el mew-imap2.el mew-key.el \ 62 | mew-lang-jp.el mew-lang-kr.el mew-lang-latin.el \ 63 | mew-local.el mew-mark.el \ 64 | mew-message.el mew-mime.el mew-minibuf.el \ 65 | mew-mule.el mew-mule3.el \ 66 | mew-net.el mew-nntp.el mew-nntp2.el \ 67 | mew-oauth2.el \ 68 | mew-pgp.el mew-pick.el mew-pop.el \ 69 | mew-refile.el mew-scan.el mew-smime.el \ 70 | mew-search.el mew-smtp.el mew-sort.el \ 71 | mew-ssh.el mew-ssl.el mew-passwd.el \ 72 | mew-summary.el mew-summary2.el mew-summary3.el \ 73 | mew-summary4.el mew-syntax.el \ 74 | mew-thread.el mew-unix.el \ 75 | mew-vars.el mew-vars2.el mew-vars3.el \ 76 | mew-varsx.el mew-virtual.el \ 77 | mew-win32.el mew-exec.el \ 78 | mew-darwin.el mew.el 79 | 80 | TEMPFILE = temp.el 81 | TEMPFILE2 = temp2.el 82 | TEMPFILE3 = temp3.el 83 | DETECT = emacs 84 | 85 | CP = cp 86 | RM = rm -f 87 | MKDIR = mkdir -p 88 | # To save Emacses on Windows 89 | PWD = 90 | 91 | CNF = config.h config.status config.cache config.log configure.lineno 92 | MK = Makefile 93 | 94 | DESTDIR = 95 | 96 | ################################################################ 97 | 98 | .PHONY: all 99 | all: $(OBJS) 100 | 101 | .PHONY: install 102 | install: install-elisp 103 | 104 | ################################################################ 105 | 106 | .PHONY: el 107 | el: $(OBJS) 108 | 109 | $(OBJS): $(TEMPFILE) 110 | @echo 'Compiling EL files of Mew ... ' 111 | @echo 'PLEASE IGNORE WARNINGS IF DISPLAYED. TAKE IT EASY!' 112 | $(EMACS) -batch -q -no-site-file -l ./$(TEMPFILE) -f mew-compile 113 | @echo 'Compiling EL files of Mew ... done' 114 | 115 | $(TEMPFILE): $(SRCS) 116 | @echo '(setq mew-compiling t)' > $(TEMPFILE) 117 | @echo '(setq load-path (cons "." load-path))' >> $(TEMPFILE) 118 | @echo "(defun mew-compile () (mapcar (lambda (x) (byte-compile-file (symbol-name x))) '($(SRCS))))" >> $(TEMPFILE) 119 | 120 | .PHONY: install-elisp 121 | install-elisp: $(OBJS) 122 | -@if [ ! -d $(DESTDIR)$(elispdir) ]; then \ 123 | $(MKDIR) $(DESTDIR)$(elispdir); \ 124 | fi 125 | $(CP) $(SRCS) $(DESTDIR)$(elispdir) 126 | $(CP) $(OBJS) $(DESTDIR)$(elispdir) 127 | 128 | ################################################################ 129 | 130 | .PHONY: detect 131 | detect: $(TEMPFILE2) mew.el 132 | @echo 'Compiling EL files of Mew ... ' 133 | $(DETECT) -batch -q -no-site-file -l ./$(TEMPFILE2) -f mew-compile 134 | @echo 'Compiling EL files of Mew ... done' 135 | 136 | $(TEMPFILE2): 137 | @echo '(setq mew-compiling t)' > $(TEMPFILE2) 138 | @echo '(setq load-path (cons "." load-path))' >> $(TEMPFILE2) 139 | @echo '(setq hack-local-variables-hook (lambda () (setq lexical-binding t)))' >> $(TEMPFILE2) 140 | @echo "(defun mew-compile () (mapcar (lambda (x) (byte-compile-file (symbol-name x))) '($(SRCS))))" >> $(TEMPFILE2) 141 | 142 | ################################################################ 143 | 144 | .PHONY: format 145 | format: $(TEMPFILE3) mew.el 146 | @echo 'Formatting EL files of Mew ... ' 147 | $(EMACS) -batch -q -no-site-file -l ./$(TEMPFILE3) -f format-files 148 | @echo 'Formatting EL files of Mew ... done' 149 | 150 | $(TEMPFILE3): 151 | @echo '(setq load-path (cons "." load-path))' > $(TEMPFILE3) 152 | @echo "(require 'mew)" >> $(TEMPFILE3) 153 | @echo '(defun indent-file (file) (save-excursion (find-file (expand-file-name file)) (indent-region (point-min) (point-max)) (save-buffer)))' >> $(TEMPFILE3) 154 | @echo "(defun format-files () (mapcar (lambda (x) (indent-file (symbol-name x))) '($(SRCS))))" >> $(TEMPFILE3) 155 | 156 | ################################################################ 157 | 158 | .PHONY: clean 159 | clean: 160 | $(RM) *.elc $(TEMPFILE) $(TEMPFILE2) $(TEMPFILE3) 161 | 162 | .PHONY: distclean 163 | distclean: 164 | $(RM) *.elc $(TEMPFILE) $(TEMPFILE2) $(TEMPFILE3) 165 | 166 | ## 167 | ## End of Makefile 168 | ## 169 | -------------------------------------------------------------------------------- /bin/mewest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # mewest: Updating indexes of Hyper Estraier 4 | # 5 | # Author: Mew developing team 6 | # Created: Jul 20, 2006 7 | # Revised: Jul 25, 2006 8 | 9 | ESTCMD=estcmd 10 | FIND=find 11 | RM=rm 12 | MKDIR=mkdir 13 | BASEDIR=${HOME}/Mail 14 | INDEXDIR_ORG=casket 15 | INDEXDIR_REPLICA=casket_replica 16 | INDEXDIR=${INDEXDIR_ORG} 17 | OUTPUT=${OUTPUT:-/dev/null} 18 | LOCK=${BASEDIR}/.mewest.lock 19 | CYGWINENV=no 20 | SUFFIX=${SUFFIX:-.mew} 21 | 22 | usage () { 23 | PROG=`basename $0` 24 | cat <<__HDT__ 25 | USAGE: ${PROG} [directory] 26 | -s specify suffix 27 | -h help 28 | -v verbose mode 29 | -b base dir 30 | __HDT__ 31 | exit 1 32 | } 33 | 34 | cleanup () { 35 | ${RM} -fr "${LOCK}" 36 | clean_up_replica 37 | } 38 | 39 | cleanup_trap () { 40 | cleanup 41 | exit 4 42 | } 43 | 44 | cleanup_exit () { 45 | echo $1 46 | cleanup 47 | exit 4 48 | } 49 | 50 | clean_up_replica () { 51 | if [ -d "${BASEDIR}/${INDEXDIR_REPLICA}" ]; then 52 | rm -fr "${BASEDIR}/${INDEXDIR_REPLICA}" 53 | fi 54 | } 55 | 56 | # Check if environment is Cygwin. 57 | check_cygwin () { 58 | if type uname > /dev/null 59 | then 60 | true 61 | else 62 | return 255 63 | fi 64 | case `uname -s` in 65 | CYGWIN*) 66 | if type cygpath > /dev/null 67 | then 68 | return 1 69 | else 70 | return 255 71 | fi 72 | ;; 73 | *) 74 | return 0 75 | ;; 76 | esac 77 | } 78 | 79 | # Convert path style from Unix to Windows if environment is Cygwin. 80 | # Otherwise same path is simply echoed. 81 | path_conv() { 82 | if [ $CYGWINENV = "yes" ]; 83 | then 84 | cygpath -w "$1" 85 | else 86 | echo "$1" 87 | fi 88 | } 89 | 90 | check_cygwin 91 | case $? in 92 | 0) 93 | CYGWINENV=no 94 | ;; 95 | 1) 96 | CYGWINENV=yes 97 | # There is native find.exe in Windows but it is incompatible 98 | # with Unix's one. So make sure Cygwin's find.exe is used. 99 | PATH=/usr/bin:/bin:$PATH 100 | ;; 101 | *) 102 | echo Environment check failed 103 | exit 255 104 | ;; 105 | esac 106 | 107 | while getopts "b:hvs:" OPTION 108 | do 109 | case ${OPTION} in 110 | b) 111 | BASEDIR=${OPTARG} 112 | ;; 113 | h) 114 | usage 115 | ;; 116 | v) 117 | OUTPUT=/dev/stdout 118 | ;; 119 | s) 120 | SUFFIX=${OPTARG} 121 | ;; 122 | *) 123 | usage 124 | ;; 125 | esac 126 | done 127 | shift `expr $OPTIND - 1` 128 | TGTDIR=${1:-${BASEDIR}} 129 | 130 | trap cleanup_trap 1 2 3 9 15 131 | 132 | # create and check lock 133 | if ${MKDIR} "${LOCK}" > /dev/null 2>&1 ; then 134 | true 135 | else 136 | echo "${LOCK} exists" 137 | exit 5 138 | fi 139 | 140 | # Directory exist? 141 | if [ ! -d "${TGTDIR}" ]; then 142 | cleanup_exit "${TGTDIR} not found" 143 | fi 144 | 145 | if [ -d "${BASEDIR}/${INDEXDIR}" ]; then 146 | echo "Replicating index..." 147 | clean_up_replica 148 | cp -R "${BASEDIR}/${INDEXDIR}" "${BASEDIR}/${INDEXDIR_REPLICA}" 149 | INDEXDIR=${INDEXDIR_REPLICA} 150 | echo "Replicating index...done" 151 | echo "Purging old messages..." 152 | ${ESTCMD} purge "`path_conv \"${BASEDIR}/${INDEXDIR}\"`" "`path_conv \"${TGTDIR}\"`" > ${OUTPUT} ||\ 153 | cleanup_exit "Purging old messages...failed" 154 | echo "Purging old messages...done" 155 | fi 156 | 157 | echo "Indexing new messages..." 158 | # "find"'s regular expression is NOT portable, sigh... 159 | # "[0-9]*" matches both "123" and "234.mew". 160 | 161 | ${FIND} "`path_conv \"${TGTDIR}\"`" \ 162 | -type d -name "trash" -prune -o \ 163 | -type d -name ${INDEXDIR_ORG} -prune -o \ 164 | -type d -name ${INDEXDIR_REPLICA} -prune -o \ 165 | -type f \( -name "[0-9]" -o -name "[0-9]*[0-9]" -o -name "[0-9]*${SUFFIX}" \) -print |\ 166 | ${ESTCMD} gather -cl -fm -cm -sd -xh "`path_conv \"${BASEDIR}/${INDEXDIR}\"`" - > ${OUTPUT} ||\ 167 | cleanup_exit "Indexing new messages...failed" 168 | 169 | echo "Indexing new messages...done" 170 | if [ "${BASEDIR}/${INDEXDIR}" = "${BASEDIR}/${INDEXDIR_REPLICA}" ]; then 171 | echo "Replacing old index with new one..." 172 | rm -fr "${BASEDIR}/${INDEXDIR_ORG}" 173 | mv "${BASEDIR}/${INDEXDIR_REPLICA}" "${BASEDIR}/${INDEXDIR_ORG}" 174 | echo "Replacing old index with new one...done" 175 | fi 176 | 177 | cleanup 178 | exit 0 179 | 180 | # Copyright (C) 2006-2007 Mew developing team. 181 | # All rights reserved. 182 | # 183 | # Redistribution and use in source and binary forms, with or without 184 | # modification, are permitted provided that the following conditions 185 | # are met: 186 | # 187 | # 1. Redistributions of source code must retain the above copyright 188 | # notice, this list of conditions and the following disclaimer. 189 | # 2. Redistributions in binary form must reproduce the above copyright 190 | # notice, this list of conditions and the following disclaimer in the 191 | # documentation and/or other materials provided with the distribution. 192 | # 3. Neither the name of the team nor the names of its contributors 193 | # may be used to endorse or promote products derived from this software 194 | # without specific prior written permission. 195 | # 196 | # THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND 197 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 198 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 199 | # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE 200 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 201 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 202 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 203 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 204 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 205 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 206 | # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 207 | -------------------------------------------------------------------------------- /elisp/mew-unix.el: -------------------------------------------------------------------------------- 1 | ;;; -*- lexical-binding: nil; -*- 2 | ;;; mew-unix.el -- Settings for Mew on Unix 3 | 4 | ;; Author: Mew developing team 5 | ;; Created: Dec 4, 1997 6 | 7 | ;;; Code: 8 | 9 | ;;; 10 | ;;; MIME setting 11 | ;;; 12 | 13 | (defvar mew-prog-plain 'mew-mime-text/plain) 14 | (defvar mew-prog-html '(mew-mime-text/html mew-mime-text/html-ext)) 15 | (defvar mew-prog-xml '(mew-mime-text/xml mew-mime-text/xml-ext)) 16 | (defvar mew-prog-patch '(mew-mime-text/plain mew-mime-text/patch-ext)) 17 | (defvar mew-prog-enriched 'mew-mime-text/enriched) 18 | (defvar mew-prog-text 'mew-mime-text/plain) 19 | (defvar mew-prog-audio 20 | `(,shell-file-name (,shell-command-switch "cat - > /dev/audio") nil)) 21 | (defvar mew-prog-audio2 22 | `(,shell-file-name (,shell-command-switch "cat < /dev/audio") nil)) 23 | (defvar mew-prog-image '(mew-mime-image/* mew-mime-image/*-ext)) 24 | (defvar mew-prog-iges nil) 25 | (defvar mew-prog-vrml nil) 26 | (defvar mew-prog-mesh nil) 27 | (defvar mew-prog-video '("xine" ("--auto-play") t)) 28 | (defvar mew-prog-rfc822 'mew-mime-message/rfc822) 29 | (defvar mew-prog-rfc822-headers 'mew-mime-text/rfc822-headers) 30 | (defvar mew-prog-external-body '(mew-mime-external-body mew-mime-external-body-ext)) 31 | (defvar mew-prog-delivery-status 'mew-mime-text/plain) 32 | 33 | (defvar mew-prog-application/pdf "pdftotext") 34 | (defvar mew-prog-pdf-ext '("xpdf" ("-geometry" "+0+0") t)) 35 | (defvar mew-prog-pdf `(mew-mime-application/pdf ,mew-prog-pdf-ext)) 36 | 37 | (defvar mew-prog-postscript '("gv" ("-geometry" "+0+0") t)) 38 | (defvar mew-prog-oasys nil) 39 | (defvar mew-prog-octet-stream 'mew-mime-application/octet-stream) 40 | (defvar mew-prog-pgp-keys '(mew-mime-pgp-keys mew-mime-pgp-keys-ext)) 41 | 42 | (defvar mew-prog-application/rtf "rtf2html") 43 | (defvar mew-prog-rtf '(mew-mime-application/rtf 44 | mew-mime-application/rtf-ext)) 45 | 46 | (defvar mew-prog-xml2 '(mew-mime-application/xml 47 | mew-mime-application/xml-ext)) 48 | (defvar mew-prog-unzip 'mew-mime-application/octet-stream) 49 | 50 | ;;; 51 | ;;; Text/Html, Application/Xml 52 | ;;; 53 | 54 | (defvar mew-format-html "%s.html") 55 | (defvar mew-format-xml "%s.xml") 56 | 57 | (defvar mew-unix-browser "firefox") 58 | (defvar mew-unix-browser-arg '("%s")) 59 | (defvar mew-unix-browser-form `(,mew-unix-browser ,mew-unix-browser-arg t)) 60 | 61 | (defvar mew-prog-text/html 62 | (if (and (fboundp 'shr-render-region) 63 | (fboundp 'libxml-parse-html-region)) 64 | 'shr-render-region 65 | 'mew-mime-text/html-w3m)) ;; See w3m.el 66 | (defvar mew-prog-text/html-ext mew-unix-browser-form) 67 | 68 | (defvar mew-prog-text/xml 69 | (if (and (fboundp 'shr-render-region) 70 | (fboundp 'libxml-parse-html-region)) 71 | 'shr-render-region 72 | 'mew-mime-text/html-w3m)) ;; See w3m.el 73 | (defvar mew-prog-text/xml-ext mew-unix-browser-form) 74 | 75 | (defvar mew-prog-application/xml nil) 76 | (defvar mew-prog-application/xml-ext mew-unix-browser-form) 77 | 78 | 79 | ;;; 80 | ;;; Image 81 | ;;; 82 | 83 | (defvar mew-prog-image/* 'mew-mime-image/*) 84 | (defvar mew-prog-image/*-ext '("display" ("-geometry" "+0+0"))) 85 | 86 | 87 | ;;; 88 | ;;; Office 89 | ;;; 90 | 91 | (defvar mew-prog-ooffice "soffice") 92 | 93 | (defvar mew-prog-application/msword "wvHtml") 94 | (defvar mew-prog-msword-ext mew-prog-ooffice) 95 | (defvar mew-prog-msword `(mew-mime-application/msword ,mew-prog-msword-ext)) 96 | 97 | (defvar mew-prog-application/msexcel "xlhtml") 98 | (defvar mew-prog-msexcel-ext mew-prog-ooffice) 99 | (defvar mew-prog-msexcel `(mew-mime-application/msexcel ,mew-prog-msexcel-ext)) 100 | 101 | (defvar mew-prog-application/mspowerpoint "ppthtml") 102 | (defvar mew-prog-mspowerpoint-ext mew-prog-ooffice) 103 | (defvar mew-prog-mspowerpoint `(mew-mime-application/mspowerpoint ,mew-prog-mspowerpoint-ext)) 104 | 105 | (defvar mew-prog-visio 'mew-mime-application/octet-stream) 106 | (defvar mew-prog-mstnef '(mew-mime-application-ms-tnef 107 | mew-mime-application-ms-tnef-ext)) 108 | 109 | ;;; 110 | ;;; Misc 111 | ;;; 112 | 113 | (defvar mew-default-external-program nil) 114 | (defvar mew-dir-list-function 'mew-dir-list-with-link-count) 115 | 116 | (provide 'mew-unix) 117 | 118 | ;;; Copyright Notice: 119 | 120 | ;; Copyright (C) 1996-2023 Mew developing team. 121 | ;; All rights reserved. 122 | 123 | ;; Redistribution and use in source and binary forms, with or without 124 | ;; modification, are permitted provided that the following conditions 125 | ;; are met: 126 | ;; 127 | ;; 1. Redistributions of source code must retain the above copyright 128 | ;; notice, this list of conditions and the following disclaimer. 129 | ;; 2. Redistributions in binary form must reproduce the above copyright 130 | ;; notice, this list of conditions and the following disclaimer in the 131 | ;; documentation and/or other materials provided with the distribution. 132 | ;; 3. Neither the name of the team nor the names of its contributors 133 | ;; may be used to endorse or promote products derived from this software 134 | ;; without specific prior written permission. 135 | ;; 136 | ;; THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND 137 | ;; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 138 | ;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 139 | ;; PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE 140 | ;; LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 141 | ;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 142 | ;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 143 | ;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 144 | ;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 145 | ;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 146 | ;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 147 | 148 | ;;; mew-unix.el ends here 149 | -------------------------------------------------------------------------------- /elisp/mew-mule.el: -------------------------------------------------------------------------------- 1 | ;;; -*- lexical-binding: nil; -*- 2 | ;;; mew-mule.el --- Environment of Mule common for Mew 3 | 4 | ;; Author: Mew developing team 5 | ;; Created: Jul 15, 1998 6 | 7 | ;;; Code: 8 | 9 | (eval-when-compile 10 | (require 'mew-env0)) 11 | 12 | ;; 13 | ;; Charset 14 | ;; 15 | 16 | (defun mew-charset-m17n () 17 | (if (string= mew-charset-m17n mew-utf-8) 18 | (if mew-internal-utf-8p 19 | mew-utf-8 20 | (if (condition-case nil (require 'un-define) (file-error nil)) 21 | mew-utf-8 22 | mew-iso-2022-jp-2)) 23 | mew-iso-2022-jp-2)) 24 | 25 | (defun mew-charset-guess-string (str) 26 | (let ((ecsdb (mew-ecsdb-guess-string str))) 27 | (if ecsdb 28 | (mew-cs-to-charset (mew-ecsdb-get-cs ecsdb)) ;; not hcs, take care 29 | (mew-charset-m17n)))) 30 | 31 | (defun mew-ecsdb-guess-string (str) 32 | (with-temp-buffer 33 | (insert str) 34 | (mew-ecsdb-guess-region (point-min) (point-max)))) 35 | 36 | (defun mew-charset-guess-region (beg end) 37 | "Guess charset for the region." 38 | (interactive "r") 39 | (let ((ecsdb (mew-ecsdb-guess-region beg end)) 40 | ret) 41 | (if (null ecsdb) 42 | (setq ret (mew-charset-m17n)) 43 | (setq ret (mew-cs-to-charset (mew-ecsdb-get-cs ecsdb)))) ;; not hcs 44 | (if (mew-called-interactively-p) (message "%s" ret)) ;; for debug 45 | ret)) 46 | 47 | (defun mew-ecsdb-guess-region (beg end) 48 | (let* ((tcsl (mew-find-cs-region beg end)) 49 | (N (length tcsl)) 50 | (alst mew-cs-database-for-encoding) 51 | acsl csl ret) 52 | (dolist (ecsdb alst) 53 | (setq acsl (mew-ecsdb-get-lcs ecsdb)) 54 | (catch 'loop 55 | (dotimes (i N) 56 | (unless (member (nth i tcsl) acsl) 57 | (setq ecsdb nil) 58 | (setq acsl nil) 59 | (throw 'loop nil)))) 60 | (if (null ret) 61 | (setq ret ecsdb) 62 | (if (and acsl (< (length acsl) (length csl))) 63 | (setq ret ecsdb csl acsl)))) 64 | ret)) 65 | 66 | (autoload 'mew-zenkaku-katakana-region "mew-lang-jp" nil) 67 | (autoload 'mew-latin0-region "mew-lang-latin" nil) 68 | 69 | (defun mew-charset-sanity-check (beg end) 70 | "Eliminate invalid characters" 71 | (interactive "r") 72 | (let ((lcs (mew-find-cs-region beg end))) 73 | (cond 74 | ((member mew-lc-kana lcs) 75 | (mew-zenkaku-katakana-region beg end)) 76 | ((and (not (fboundp 'set-charset-priority)) 77 | (memq 'latin-iso8859-1 lcs) (memq 'latin-iso8859-15 lcs)) ;; xxx 78 | (mew-latin0-region beg end))))) 79 | 80 | ;;; 81 | ;;; 82 | ;;; 83 | 84 | (defun mew-file-guess-coding-system (file) 85 | (with-temp-buffer 86 | (kill-local-variable 'find-file-literally) 87 | (set-buffer-multibyte t) 88 | (insert-file-contents file nil 0 1024) 89 | buffer-file-coding-system)) 90 | 91 | (defun mew-cs-strip-lineinfo (cs) 92 | (let ((str (symbol-name cs))) 93 | (if (string-match "-\\(unix\\|mac\\|dos\\)$" str) 94 | (intern (substring str 0 (match-beginning 0))) 95 | cs))) 96 | 97 | ;;; 98 | ;;; 99 | ;;; 100 | 101 | (defun mew-coding-system-equal (cs1 cs2) 102 | ;; Emacs 22 causes an error if cs is not defined. 103 | (condition-case nil 104 | (coding-system-equal cs1 cs2) 105 | (error nil))) 106 | 107 | (defun mew-cs-to-charset (cs) 108 | (let ((dcsdb (mew-assoc-equal cs mew-cs-database-for-decoding 1 'mew-coding-system-equal))) 109 | (if (null dcsdb) 110 | (mew-charset-m17n) 111 | (mew-dcsdb-get-charset dcsdb)))) 112 | 113 | (defun mew-charset-to-cs (charset) 114 | (when charset 115 | (let ((dcsdb (assoc (downcase charset) mew-cs-database-for-decoding))) 116 | (if (null dcsdb) 117 | mew-cs-unknown 118 | (mew-dcsdb-get-cs dcsdb))))) 119 | 120 | (defun mew-charset-to-ecsdb (charset) 121 | (mew-assoc-equal (mew-charset-to-cs charset) mew-cs-database-for-encoding 1)) 122 | 123 | (defun mew-charset-to-cte (charset) 124 | (mew-ecsdb-get-cte (mew-charset-to-ecsdb charset))) 125 | 126 | (defun mew-charset-to-delsp (charset) 127 | (mew-ecsdb-get-delsp (mew-charset-to-ecsdb charset))) 128 | 129 | ;; 130 | 131 | (defvar mew-charset-list 132 | (mapcar 'mew-dcsdb-get-charset mew-cs-database-for-decoding)) 133 | 134 | ;; 135 | 136 | (defun mew-cs-encode-arg (arg) 137 | (let ((cs (mew-ecsdb-cs-for-arg (mew-ecsdb-guess-string arg)))) 138 | (if (mew-coding-system-p cs) 139 | (mew-cs-encode-string arg cs) 140 | arg))) 141 | 142 | (provide 'mew-mule) 143 | 144 | ;;; Copyright Notice: 145 | 146 | ;; Copyright (C) 1998-2023 Mew developing team. 147 | ;; All rights reserved. 148 | 149 | ;; Redistribution and use in source and binary forms, with or without 150 | ;; modification, are permitted provided that the following conditions 151 | ;; are met: 152 | ;; 153 | ;; 1. Redistributions of source code must retain the above copyright 154 | ;; notice, this list of conditions and the following disclaimer. 155 | ;; 2. Redistributions in binary form must reproduce the above copyright 156 | ;; notice, this list of conditions and the following disclaimer in the 157 | ;; documentation and/or other materials provided with the distribution. 158 | ;; 3. Neither the name of the team nor the names of its contributors 159 | ;; may be used to endorse or promote products derived from this software 160 | ;; without specific prior written permission. 161 | ;; 162 | ;; THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND 163 | ;; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 164 | ;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 165 | ;; PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE 166 | ;; LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 167 | ;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 168 | ;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 169 | ;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 170 | ;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 171 | ;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 172 | ;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 173 | 174 | ;;; mew-mule.el ends here 175 | --------------------------------------------------------------------------------