From e94464f12ce3f1b66a7c66a9c323b64de7772d75 Mon Sep 17 00:00:00 2001 From: yoichi Date: Tue, 9 May 2006 14:20:02 +0000 Subject: [PATCH] Synchronized with flim-1_14_8 --- ChangeLog | 243 ++++++++++++++++++++++++++++++++++++++++++++++++++----- Makefile | 2 +- VERSION | 63 ++++++++------- eword-decode.el | 22 ++--- eword-encode.el | 20 ++--- hex-util.el | 4 +- hmac-def.el | 4 +- hmac-md5.el | 4 +- hmac-sha1.el | 4 +- luna.el | 4 +- lunit.el | 7 +- mailcap.el | 4 +- md4.el | 15 +--- md5-dl.el | 4 +- md5.el | 4 +- mel-b-ccl.el | 4 +- mel-b-dl.el | 4 +- mel-b-el.el | 30 ++++--- mel-g.el | 14 +--- mel-q-ccl.el | 4 +- mel-q.el | 23 ++++-- mel-u.el | 75 ++++++++--------- mel.el | 4 +- mime-conf.el | 8 +- mime-def.el | 8 +- mime-en.sgml | 5 +- mime-ja.sgml | 4 - mime-parse.el | 4 +- mime.el | 4 +- mmbuffer.el | 4 +- mmcooked.el | 4 +- mmexternal.el | 4 +- mmgeneric.el | 4 +- ntlm.el | 105 ++++++++++++------------ qmtp.el | 4 +- sasl-cram.el | 4 +- sasl-digest.el | 4 +- sasl-ntlm.el | 4 +- sasl-scram.el | 4 +- sasl.el | 4 +- sasl.texi | 13 +-- sha1-dl.el | 25 +++--- sha1-el.el | 123 ++++++++++++++++------------ sha1.el | 4 +- smtp.el | 136 ++++++++++++++++++++++++++----- smtpmail.el | 4 +- std11.el | 13 ++- 47 files changed, 698 insertions(+), 360 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2926d6d..3375bed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,208 @@ +2005-12-25 MORIOKA Tomohiko + + * FLIM: Version 1.14.8 (Shij-Dò) released.-A + +2005-12-25 MORIOKA Tomohiko + + * mime-def.el (mime-library-product): Update to 1.14.8. + +2005-11-13 Yoichi NAKAYAMA + + * std11.el (std11-addr-to-string): Reconstruct domain literal. + From Yuuichi Teranishi [cf. ] + +2005-07-25 Daiki Ueno + + * smtp.el (smtp-read-response): Signal an error if connection is + closed while reading response. From Hiroya Murata + [cf. ] + +2004-11-20 Daiki Ueno + + * ntlm.el (ntlm-ascii2unicode): Don't apply zerop to a character. + (ntlm-smb-hash): Ditto. + + +2004-10-01 MORIOKA Tomohiko + + * FLIM: Version 1.14.7 (Sanj-Dò) released.-A + +2004-10-01 MORIOKA Tomohiko + + * mime-def.el (mime-library-product): Update to 1.14.7. + +2004-09-27 Katsumi Yamaoka + + * mime-en.sgml, mime-ja.sgml (CVS based development): Remove the + description about developers' pserver access. + +2004-09-02 Katsumi Yamaoka + + * sha1-dl.el: Don't provide the sha1-dl feature twice. + (sha1-region): Allow the optional argument `binary'. + (sha1): Ditto. + +2004-08-11 Katsumi Yamaoka + + * smtp.el (smtp-parse-progress-message-format): Fix regexp usage. + +2004-08-11 Katsumi Yamaoka + + * smtp.el (smtp-progress-message-format): New user option. + (smtp-primitive-data): Show progress message. + (smtp-parse-progress-message-format): New function. + (smtp-show-progress-message): New function. + (smtp-deduce-address-list): Use insert instead of insert-string. + +2004-07-27 Yoichi NAKAYAMA + + * mel-g.el (gzip64-external-encoder): Change default value to + cause more recognizable error. + (gzip64-external-decoder): Ditto. + +2004-06-09 Yoichi NAKAYAMA + + * std11.el (std11-parse-word-or-comment-or-period): Renamed from + `std11-parse-word-or-comment' and allow period. + (std11-parse-phrase): Allow parsing obs-phrase in rfc2822. + +2004-05-24 Len Trigg + + * mime-conf.el (mime-format-mailcap-command): Quote a file name + which may contain spaces using `shell-quote-argument' in order to + pass it to the shell safely. + +2004-05-10 Katsumi Yamaoka + + * eword-encode.el (mime-encode-header-in-buffer): Don't ignore a + space char at the beginning of a field body in order to honor the + 76-column rule which is described in RFC 2047 section 2. + +2004-04-15 MORIOKA Tomohiko + + * eword-decode.el (eword-decode-encoded-text): Fix bug when + `must-unfold' is specified; eliminate CR too when `must-unfold' is + specified. + +2004-04-13 Kenichi Okada + + * mel-u.el (mime-write-decoded-region): Use make-temp-file. + (uuencode-external-decode-region): Ditto. + +2004-04-12 Kenichi Okada + + * mel-u.el (mime-write-decoded-region): Use temporary filename. + +2004-03-05 Jesper Harder + + * sha1-el.el (sha1-maximum-internal-length): Doc fix. + +2004-02-23 TAKAHASHI Kaoru + + * lunit.el (lunit-make-test-suite-from-class): Fix regexp. + Use "^test" instead of "^test-". + +2004-02-19 TAKAHASHI Kaoru + + * lunit.el (lunit-assert): Avoid double-eval `condtion-expr'. + Use ,(not (not condition)) instead of ,condition. + +2004-02-18 TAKAHASHI Kaoru + + * lunit.el (lunit-make-test-suite-from-class): Restrict test + method name to test-*. + +2004-02-17 Daiki Ueno + + * smtp.el (smtp-starttls-program): New user option. + (smtp-starttls-extra-args): New user option. + (smtp-send-buffer): Bind starttls-program and starttls-extra-args. + +2004-01-27 Yuuichi Teranishi + + * mel-q.el (quoted-printable-external-decoder-option-to-specify-file): + Accept nil. + (mime-write-decoded-region): If the value of the variable + `quoted-printable-external-decoder-option-to-specify-file' is nil, + write stdout to the output file. + + * mel-b-el.el (base64-external-decoder-option-to-specify-file): + Accept nil. + (base64-write-decoded-region): If the value of the variable + `base64-external-decoder-option-to-specify-file' is nil, write + stdout to the output file. + +2004-01-12 Daiki Ueno + + * sasl.texi: Texinfo markup fixes. From Jesper Harder + . + +2004-01-07 Katsumi Yamaoka + + * sha1-el.el (sha1-string-external): Use with-temp-buffer. + +2004-01-07 Katsumi Yamaoka + + * sha1-el.el (sha1-string-external): Make it can return a string + in binary form. + (sha1-region-external): Ditto. + (sha1-string-internal): Ditto. + (sha1-region-internal): Ditto. + (sha1-region): Ditto. + (sha1-string): Ditto. + (sha1): Ditto. + +2003-12-16 Simon Josefsson + + * sha1-el.el (autoload): Don't use ignore-errors. + (sha1-use-external): Use condition-case. Suggested by Katsumi + Yamaoka . + +2003-12-15 Simon Josefsson + + * sha1-el.el (autoload): Ignore errors for + executable-find. (XEmacs ecrypto does not require sh-script where + executable.el is located.) + (sha1-use-external): Likewise. + + * sha1-el.el (sha1): Add defgroup. + (sha1-maximum-internal-length, sha1-program, sha1-use-external) + (sha1-program): Use 'sha1sum' from GNU CoreUtils instead of OpenSSL. + (sha1): Autoload. + +2001-12-29 ShengHuo ZHU + + * sha1-el.el (sha1-use-external): New variable. + (sha1-region): Use it. + (sha1-string): Ditto. + +2004-01-05 Katsumi Yamaoka + + * ntlm.el (ntlm-string-as-unibyte): New macro. + (ntlm-build-auth-response): Use it. + +2004-01-05 Simon Josefsson + + * ntlm.el: Fix namespace. Change smb-passwd-hash into + ntlm-smb-passwd-hash, smb-owf-encrypt into ntlm-smb-owf-encrypt, + smb-passwd-hash into ntlm-smb-passwd-hash, smbdes-e-p16 into + ntlm-smb-des-e-p16, smbdes-e-p24 into ntlm-smb-des-e-p24, smbhash + into ntlm-smb-hash, smb-sp8 into ntlm-smb-sp8, smb-str-to-key into + ntlm-smb-str-to-key, smb-dohash into ntlm-smb-dohash, smb-perm1 + into ntlm-smb-perm1, smb-perm2 into ntlm-smb-perm2, smb-perm3 into + ntlm-smb-perm3, smb-perm4 into ntlm-smb-perm4, smb-perm5 into + ntlm-smb-perm5, smb-perm6 into ntlm-smb-perm6, smb-sc into + ntlm-smb-sc, smb-sbox into ntlm-smb-sbox, string-permute into + ntlm-string-permute, string-lshift into ntlm-string-lshift, + string-xor into ntlm-string-xor. Suggested by + Jesper Harder . + + * ntlm.el: Don't include poem. + + * md4.el (print-int32, print-string-hexa): Remove. Suggested by + Jesper Harder . + + 2003-12-20 MORIOKA Tomohiko * FLIM: Version 1.14.6 (Marutamachi) released. @@ -112,7 +317,7 @@ 2002-06-03 MORIOKA Tomohiko - * FLIM: Version 1.14.4 (Kashiharajing.DŽþ-mae) released. + * FLIM: Version 1.14.4 (Kashiharajing-Dþ-mae) released.-A 2002-06-02 Shuhei KOBAYASHI @@ -210,7 +415,7 @@ 2001-06-01 MORIOKA Tomohiko - * FLIM: Version 1.14.3 (UnebigoryŽòmae) released. + * FLIM: Version 1.14.3 (Unebigory-Dòmae) released.-A 2001-06-01 Katsumi Yamaoka @@ -1272,7 +1477,7 @@ 2000-07-12 MORIOKA Tomohiko - * FLIM-Chao: Version 1.14.1 (RokujizŽò) released. + * FLIM-Chao: Version 1.14.1 (Rokujiz-Dò) released.-A 2000-07-10 MORIOKA Tomohiko @@ -1890,7 +2095,7 @@ 1999-05-31 MORIOKA Tomohiko - * FLIM: Version 1.12.7 (YŽþzaki) released. + * FLIM: Version 1.12.7 (Y-Dþzaki) released.-A 1999-05-31 MORIOKA Tomohiko @@ -2065,7 +2270,7 @@ 1999-05-11 MORIOKA Tomohiko - * FLIM: Version 1.12.6 (Family-KŽòenmae) released. + * FLIM: Version 1.12.6 (Family-K-Dòenmae) released.-A 1999-04-27 Shuhei KOBAYASHI @@ -2182,7 +2387,7 @@ 1999-01-23 MORIOKA Tomohiko - * FLIM: Version 1.12.3 (Kintetsu-KŽòriyama) released. + * FLIM: Version 1.12.3 (Kintetsu-K-Dòriyama) released.-A 1999-01-23 MORIOKA Tomohiko @@ -2225,7 +2430,7 @@ 1999-01-21 MORIOKA Tomohiko - * FLIM: Version 1.12.2 (KujŽò) released. + * FLIM: Version 1.12.2 (Kuj-Dò) released.-A 1999-01-16 MORIOKA Tomohiko @@ -2411,7 +2616,7 @@ 1998-12-02 MORIOKA Tomohiko - * FLIM: Version 1.12.1 (NishinokyŽò) released. + * FLIM: Version 1.12.1 (Nishinoky-Dò) released.-A 1998-11-30 MORIOKA Tomohiko @@ -2629,7 +2834,7 @@ 1998-10-26 MORIOKA Tomohiko - * FLIM: Version 1.11.2 (HeijŽò) was released. + * FLIM: Version 1.11.2 (Heij-Dò) was released.-A * NEWS (Abolish variable `mime-temp-directory'): New subsection. @@ -2909,7 +3114,7 @@ 1998-10-12 MORIOKA Tomohiko - * FLIM: Version 1.10.4 (Shin-HŽòsono) was released. + * FLIM: Version 1.10.4 (Shin-H-Dòsono) was released.-A 1998-10-12 Katsumi Yamaoka @@ -3094,7 +3299,7 @@ 1998-09-29 MORIOKA Tomohiko - * FLIM: Version 1.10.0 (KŽòdo) was released. + * FLIM: Version 1.10.0 (K-Dòdo) was released.-A * README.en (What's FLIM): Add mel-ccl.el. @@ -3381,7 +3586,7 @@ 1998-08-31 MORIOKA Tomohiko - * FLIM: Version 1.9.1 (TonoshŽò) was released. + * FLIM: Version 1.9.1 (Tonosh-Dò) was released.-A * mime-en.sgml (mm-backend): Translate a little. @@ -3524,7 +3729,7 @@ 1998-07-07 MORIOKA Tomohiko - * FLIM-Chao: Version 1.8.0 (ShijŽò) was released. + * FLIM-Chao: Version 1.8.0 (Shij-Dò) was released.-A 1998-07-07 MORIOKA Tomohiko @@ -3636,7 +3841,7 @@ 1998-07-01 MORIOKA Tomohiko - * FLIM: Version 1.8.0 (ŽÒkubo) was released. + * FLIM: Version 1.8.0 (-DÒkubo) was released.-A * README.en: Delete `How to use'. @@ -3761,7 +3966,7 @@ 1998-06-28 MORIOKA Tomohiko - * FLIM-Chao: Version 1.7.0 (GojŽò) was released. + * FLIM-Chao: Version 1.7.0 (Goj-Dò) was released.-A 1998-06-26 MORIOKA Tomohiko @@ -4020,7 +4225,7 @@ 1998-06-19 MORIOKA Tomohiko - * FLIM: Version 1.4.1 (Momoyama-GoryŽòmae) was released. + * FLIM: Version 1.4.1 (Momoyama-Gory-Dòmae) was released.-A 1998-06-18 MORIOKA Tomohiko @@ -4140,7 +4345,7 @@ 1998-05-06 MORIOKA Tomohiko - * FLIM: Version 1.2.0 (JŽþjŽò) was released. + * FLIM: Version 1.2.0 (J-Dþjò) was released.-A * README.en (What's FLIM): Delete description about std11-parse.el; add description about mailcap.el. @@ -4191,7 +4396,7 @@ 1998-05-05 MORIOKA Tomohiko - * FLIM: Version 1.1.0 (TŽòji) was released. + * FLIM: Version 1.1.0 (T-Dòji) was released.-A 1998-05-04 MORIOKA Tomohiko @@ -4227,7 +4432,7 @@ 1998-04-17 MORIOKA Tomohiko - * FLIM: Version 1.0.1 (KyŽòto) was released. + * FLIM: Version 1.0.1 (Ky-Dòto) was released.-A * mime-def.el (mime-spadework-module-version-string): New constant. diff --git a/Makefile b/Makefile index 005cb65..046a61a 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ PACKAGE = flim API = 1.14 -RELEASE = 6 +RELEASE = 8 TAR = tar RM = /bin/rm -f diff --git a/VERSION b/VERSION index 879c516..5e6b0ed 100644 --- a/VERSION +++ b/VERSION @@ -4,63 +4,70 @@ ;;------------------------------------------------------------------------- ;; Kinki Nippon Railway $(B6a5&F|K\E4F;(B http://www.kintetsu.co.jp/ -;; Ky.DŽòto Line $(B5~ET@~(B +;; Ky-Dòto Line $(B5~ET@~(B-A ;;------------------------------------------------------------------------- -1.0.1 KyŽòto $(B5~ET(B ; <=> JR, $(B5~ET;T8rDL6I(B -1.1.0 TŽòji $(BEl;{(B -1.2.0 JŽþjŽò $(B==>r(B +1.0.1 Ky-Dòto $(B5~ET(B ; <=> JR, $(B5~ET;T8rDL6I(B-A +1.1.0 T-Dòji $(BEl;{(B-A +1.2.0 J-Dþjò $(B==>r(B-A 1.2.1 Kamitobaguchi $(B>eD;1)8}(B 1.2.2 Takeda $(BC]ED(B ; = $(B5~ET;T8rDL6I(B $(B1(4]@~(B 1.3.0 Fushimi $(BIz8+(B 1.4.0 Kintetsu-Tambabashi $(B6aE4C0GH66(B ; <=> $(B5~:e(B $(BC0GH66(B -1.4.1 Momoyama-GoryŽòmae $(BEm;38fNMA0(B +1.4.1 Momoyama-Gory-Dòmae $(BEm;38fNMA0(B-A 1.5.0 Mukaijima $(B8~Eg(B 1.6.0 Ogura $(B>.AR(B 1.7.0 Iseda $(B0K@*ED(B -1.8.0 ŽÒkubo $(BBg5WJ](B +1.8.0 -DÒkubo $(BBg5WJ](B-A 1.8.1 Kutsukawa $(B5WDE@n(B 1.9.0 Terada $(B;{ED(B -1.9.1 TonoshŽò $(BIYLnAq(B +1.9.1 Tonosh-Dò $(BIYLnAq(B-A 1.9.2 Shin-Tanabe $(B?7EDJU(B -1.10.0 KŽòdo $(B6=8M(B +1.10.0 K-Dòdo $(B6=8M(B-A 1.10.1 Miyamaki $(B;0;3LZ(B 1.10.2 Kintetsu-Miyazu $(B6aE45\DE(B 1.10.3 Komada $(B9}ED(B -1.10.4 Shin-HŽòsono $(B?7=K1`(B ; <=> JR $(BJRD.@~(B $(B=K1`(B +1.10.4 Shin-H-Dòsono $(B?7=K1`(B ; <=> JR $(BJRD.@~(B $(B=K1`(B-A 1.10.5 Kizugawadai $(BLZDE@nBf(B 1.11.0 Yamadagawa $(B;3ED@n(B 1.11.1 Takanohara $(B9b$N86(B -1.11.2 HeijŽò $(BJ?>k(B +1.11.2 Heij-Dò $(BJ?>k(B-A 1.11.3 Saidaiji $(B@>Bg;{(B ; = $(B6aE4(B $(BF`NI@~(B ;;------------------------------------------------------------------------- ;; Kinki Nippon Railway $(B6a5&F|K\E4F;(B http://www.kintetsu.co.jp/ -;; KyŽòto Line $(B3`86@~(B +;; Ky-Dòto Line $(B3`86@~(B-A ;;------------------------------------------------------------------------- (Saidaiji) ($(B@>Bg;{(B) 1.12.0 Amagatsuji $(BFt%vDT(B -1.12.1 NishinokyŽò $(B@>$N5~(B -1.12.2 KujŽò $(B6e>r(B -1.12.3 Kintetsu-KŽòriyama $(B6aE474;3(B +1.12.1 Nishinoky-Dò $(B@>$N5~(B-A +1.12.2 Kuj-Dò $(B6e>r(B-A +1.12.3 Kintetsu-K-Dòriyama $(B6aE474;3(B-A 1.12.4 Tsutsui $(BE{0f(B 1.12.5 Hirahata $(BJ?C<(B ; = $(B6aE4(B $(BE7M}@~(B -1.12.6 Family-KŽòenmae $(B%U%!%_%j!<8x1`A0(B -1.12.7 YŽþzaki $(B7k:j(B +1.12.6 Family-K-Dòenmae $(B%U%!%_%j!<8x1`A0(B-A +1.12.7 Y-Dþzaki $(B7k:j(B-A 1.13.0 Iwami $(B@P8+(B 1.13.1 Tawaramoto $(BED86K\(B ; <=> $(B6aE4(B $(B@>ED86K\(B 1.13.2 Kasanui $(B3^K%(B 1.14.0 Ninokuchi $(B?7%N8}(B 1.14.1 Yagi $(BH,LZ(B ; = $(B6aE4(B $(BBg:e@~(B 1.14.2 Yagi-Nishiguchi $(BH,LZ@>8}(B -1.14.3 UnebigoryŽòmae $(B@&K58fNMA0(B -1.14.4 KashiharajingŽþ-mae $(B3`86?@5\A0(B ; = $(B6aE4(B $(BFnBg:e@~!"5HLn@~(B +1.14.3 Unebigory-Dòmae $(B@&K58fNMA0(B-A +1.14.4 Kashiharajing-Dþ-mae $(B3`86?@5\A0(B ; = $(B6aE4(B $(BFnBg:e@~!"5HLn@~(B-A ;;------------------------------------------------------------------------- ;; Keihan Electric Railway $(B5~:eEE5$E4F;(B http://www.keihan.co.jp/ -;; -DÒtò-A Line $(B3{El@~(B +;; -DÒtò Line $(B3{El@~(B-A ;;------------------------------------------------------------------------- 1.14.5 Demachiyanagi $(B=PD.Lx(B ; <=> $(B1CEE(B 1.14.6 Marutamachi $(B4]B@D.(B +1.14.7 Sanj-Dò $(B;0>r(B ; = $(B5~ET;T8rDL6I(B $(BEl@>@~(B-A +;;------------------------------------------------------------------------- +;; Keihan Electric Railway $(B5~:eEE5$E4F;(B http://www.keihan.co.jp/ +;; Main Line $(BK\@~(B +;;------------------------------------------------------------------------- + (Sanj-Dò) ($(B;0>r(B)-A +1.14.8 Shij-Dò $(B;M>r(B-A [Chao Version names] @@ -73,16 +80,16 @@ ;;------------------------------------------------------------------------- 1.2.0 Takeda $(BC]ED(B ; = $(B6aE4(B $(B5~ET@~(B 1.3.0 Kuinabashi $(B$/$$$J66(B -1.4.0 JŽþjŽò $(B==>r(B -1.6.0 KujŽò $(B6e>r(B -1.6.1 KyŽòto $(B5~ET(B ; <=> JR, $(B6aE4(B -1.7.0 GojŽò $(B8^>r(B -1.8.0 ShijŽò $(B;M>r(B ; <=> $(B:e5^(B $(B5~ET@~(B +1.4.0 J-Dþjò $(B==>r(B-A +1.6.0 Kuj-Dò $(B6e>r(B-A +1.6.1 Ky-Dòto $(B5~ET(B ; <=> JR, $(B6aE4(B-A +1.7.0 Goj-Dò $(B8^>r(B-A +1.8.0 Shij-Dò $(B;M>r(B ; <=> $(B:e5^(B $(B5~ET@~(B-A 1.9.0 Karasuma Oike $(B1(4]8fCS(B ; = $(B5~ET;T8rDL6I(B $(BEl@>@~(B 1.10.0 Marutamach $(B4]B@D.(B 1.11.0 Imadegawa $(B:#=P@n(B 1.11.1 Kuramaguchi $(B0HGO8}(B -1.11.2 KitaŽòji $(BKLBgO)(B +1.11.2 Kita-Dòji $(BKLBgO)(B-A 1.11.3 Kitayama $(BKL;3(B 1.11.4 Matugasaki $(B>>%v:j(B 1.11.5 Kokusaikaikan $(B9q:]2q4[(B @@ -91,10 +98,10 @@ ;; West Japan Railway $(B@>F|K\N95RE4F;(B http://www.westjr.co.jp/ ;; Nara Line $(BF`NI@~(B ;;------------------------------------------------------------------------- -1.12.0 [JR] KyŽòto $(B5~ET(B ; <=> $(B6aE4(B, $(B5~ET;T8rDL6I(B -1.12.1 TŽòfukuji $(BElJ!;{(B ; <=> $(B5~:e(B +1.12.0 [JR] Ky-Dòto $(B5~ET(B ; <=> $(B6aE4(B, $(B5~ET;T8rDL6I(B-A +1.12.1 T-Dòfukuji $(BElJ!;{(B ; <=> $(B5~:e(B-A 1.12.2 Inari $(B0p2Y(B 1.13.0 JR Fujinomori JR $(BF#?9(B 1.14.0 Momoyama $(BEm;3(B -1.14.1 RokujizŽò $(BO;COB"(B +1.14.1 Rokujiz-Dò $(BO;COB"(B-A ------ Kohata $(BLZH((B diff --git a/eword-decode.el b/eword-decode.el index 0b2d19a..fe46018 100644 --- a/eword-decode.el +++ b/eword-decode.el @@ -1,6 +1,6 @@ ;;; eword-decode.el --- RFC 2047 based encoded-word decoder for GNU Emacs -;; Copyright (C) 1995,96,97,98,99,2000,01,03 Free Software Foundation, Inc. +;; Copyright (C) 1995,96,97,98,99,2000,01,03,04 Free Software Foundation, Inc. ;; Author: ENAMI Tsugutomo ;; MORIOKA Tomohiko @@ -27,8 +27,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Code: @@ -578,13 +578,15 @@ as a version of Net$cape)." (when dest (setq dest (decode-mime-charset-string dest charset)) (when must-unfold - (mapconcat - (function - (lambda (chr) - (cond ((eq chr ?\n) "") - ((eq chr ?\t) " ") - (t (char-to-string chr))))) - (std11-unfold-string dest) "")) + (setq dest + (mapconcat + (function + (lambda (chr) + (cond ((eq chr ?\n) "") + ((eq chr ?\r) "") + ((eq chr ?\t) " ") + (t (char-to-string chr))))) + (std11-unfold-string dest) ""))) (when language (put-text-property 0 (length dest) 'mime-language language dest)) dest)))) diff --git a/eword-encode.el b/eword-encode.el index 7eebc51..06f5be5 100644 --- a/eword-encode.el +++ b/eword-encode.el @@ -19,8 +19,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Code: @@ -751,8 +751,7 @@ encoded-word. ASCII token is not encoded." ;;;###autoload (defun mime-encode-header-in-buffer (&optional code-conversion) "Encode header fields to network representation, such as MIME encoded-word. - -It refer variable `mime-field-encoding-method-alist'." +It refers the `mime-field-encoding-method-alist' variable." (interactive "*") (save-excursion (save-restriction @@ -760,11 +759,10 @@ It refer variable `mime-field-encoding-method-alist'." (goto-char (point-min)) (let ((default-cs (mime-charset-to-coding-system default-mime-charset)) bbeg end field-name) - (while (re-search-forward - (concat "\\(" std11-field-head-regexp "\\)" " ?") - nil t) + (while (re-search-forward std11-field-head-regexp nil t) (setq bbeg (match-end 0) - field-name (buffer-substring (match-beginning 0) (1- (match-end 1))) + field-name (buffer-substring-no-properties (match-beginning 0) + (1- bbeg)) end (std11-field-end)) (and (delq 'ascii (find-charset-region bbeg end)) (let ((method (eword-find-field-encoding-method @@ -785,11 +783,7 @@ It refer variable `mime-field-encoding-method-alist'." (or (mime-charset-to-coding-system method) default-cs))) - (encode-coding-region bbeg end cs) - ))) - )) - )) - ))) + (encode-coding-region bbeg end cs))))))))))) (defalias 'eword-encode-header 'mime-encode-header-in-buffer) (make-obsolete 'eword-encode-header 'mime-encode-header-in-buffer) diff --git a/hex-util.el b/hex-util.el index ddf154d..09fca4a 100644 --- a/hex-util.el +++ b/hex-util.el @@ -19,8 +19,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Commentary: diff --git a/hmac-def.el b/hmac-def.el index 264bdac..9b599d5 100644 --- a/hmac-def.el +++ b/hmac-def.el @@ -19,8 +19,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Commentary: diff --git a/hmac-md5.el b/hmac-md5.el index 097a959..037b9f6 100644 --- a/hmac-md5.el +++ b/hmac-md5.el @@ -19,8 +19,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Commentary: diff --git a/hmac-sha1.el b/hmac-sha1.el index 70b665f..2e97b2b 100644 --- a/hmac-sha1.el +++ b/hmac-sha1.el @@ -19,8 +19,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Commentary: diff --git a/luna.el b/luna.el index f33b83f..238fba8 100644 --- a/luna.el +++ b/luna.el @@ -19,8 +19,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Code: diff --git a/lunit.el b/lunit.el index 99132d3..0d5749a 100644 --- a/lunit.el +++ b/lunit.el @@ -19,8 +19,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Commentary: @@ -237,7 +237,7 @@ TESTS holds a number of instances of `lunit-test'." (defmacro lunit-assert (condition-expr) "Verify that CONDITION-EXPR returns non-nil; signal an error if not." (let ((condition (eval condition-expr))) - `(unless ,condition + `(when ,(not condition) (signal 'lunit-failure (list ',condition-expr))))) (luna-define-class lunit-test-printer (lunit-test-listener)) @@ -265,6 +265,7 @@ TESTS holds a number of instances of `lunit-test'." (mapatoms (lambda (symbol) (if (and (fboundp symbol) + (string-match "^test" (symbol-name symbol)) (null (get symbol 'luna-method-qualifier))) (push (lunit-make-test-case class symbol) tests))) (luna-class-obarray (luna-find-class class))) diff --git a/mailcap.el b/mailcap.el index 9bee280..a2c40ae 100644 --- a/mailcap.el +++ b/mailcap.el @@ -22,8 +22,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Code: diff --git a/md4.el b/md4.el index 42cc7ab..43af2ae 100644 --- a/md4.el +++ b/md4.el @@ -1,5 +1,6 @@ ;;; md4.el --- MD4 Message Digest Algorithm. +;; Copyright (C) 2004 Free Software Foundation, Inc. ;; Copyright (C) 2001 Taro Kawagishi ;; Author: Taro Kawagishi ;; Keywords: MD4 @@ -20,24 +21,14 @@ ;; ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Code: ;;; ;;; MD4 hash calculation -(defun print-int32 (int32) - "print 32 bits integer in 4 bytes string as little endian" - (let ((h (car int32)) (l (cdr int32))) - (list (logand l 255) (lsh l -8) (logand h 255) (lsh h -8)))) - -(defun print-string-hexa (str) - "print a string in hexadecimal" - (let (out) - (mapcar (function (lambda (x) (concat out (format "%x" x)))) str))) - (defvar md4-buffer (make-vector 4 '(0 . 0)) "work buffer of four 32-bit integers") diff --git a/md5-dl.el b/md5-dl.el index bcbf897..7006d43 100644 --- a/md5-dl.el +++ b/md5-dl.el @@ -19,8 +19,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Commentary: diff --git a/md5.el b/md5.el index 8c4d7c0..cde5f85 100644 --- a/md5.el +++ b/md5.el @@ -19,8 +19,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Commentary: diff --git a/mel-b-ccl.el b/mel-b-ccl.el index 7e31dfa..4a82772 100644 --- a/mel-b-ccl.el +++ b/mel-b-ccl.el @@ -20,8 +20,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Code: diff --git a/mel-b-dl.el b/mel-b-dl.el index c298b14..76758c0 100644 --- a/mel-b-dl.el +++ b/mel-b-dl.el @@ -19,8 +19,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Code: diff --git a/mel-b-el.el b/mel-b-el.el index f8a13ef..a16b412 100644 --- a/mel-b-el.el +++ b/mel-b-el.el @@ -21,8 +21,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Code: @@ -50,7 +50,8 @@ :type '(cons (file :tag "Command")(repeat :tag "Arguments" string))) (defcustom base64-external-decoder-option-to-specify-file '("-o") - "*list of options of base64 decoder program to specify file." + "*list of options of base64 decoder program to specify file. +If the base64 decoder program does not have such option, set this as nil." :group 'base64 :type '(repeat :tag "Arguments" string)) @@ -368,13 +369,22 @@ START and END are buffer positions." (interactive "*r\nFWrite decoded region to file: ") (if (and base64-internal-decoding-limit (> (- end start) base64-internal-decoding-limit)) - (as-binary-process - (apply (function call-process-region) - start end (car base64-external-decoder) - nil nil nil - (append (cdr base64-external-decoder) - base64-external-decoder-option-to-specify-file - (list filename)))) + (progn + (as-binary-process + (apply (function call-process-region) + start end (car base64-external-decoder) + (null base64-external-decoder-option-to-specify-file) + (unless base64-external-decoder-option-to-specify-file + (list (current-buffer) nil)) + nil + (delq nil + (append + (cdr base64-external-decoder) + base64-external-decoder-option-to-specify-file + (when base64-external-decoder-option-to-specify-file + (list filename)))))) + (unless base64-external-decoder-option-to-specify-file + (write-region-as-binary (point-min) (point-max) filename))) (let ((str (buffer-substring start end))) (with-temp-buffer (insert (base64-internal-decode-string str)) diff --git a/mel-g.el b/mel-g.el index 7f88e19..91088e8 100644 --- a/mel-g.el +++ b/mel-g.el @@ -22,8 +22,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Commentary: @@ -39,16 +39,10 @@ ;;; @ variables ;;; -(defvar gzip64-external-encoder - (let ((file (exec-installed-p "mmencode"))) - (and file - (` ("sh" "-c" (, (concat "gzip -c | " file)))))) +(defvar gzip64-external-encoder '("sh" "-c" "gzip -c | mmencode") "*list of gzip64 encoder program name and its arguments.") -(defvar gzip64-external-decoder - (let ((file (exec-installed-p "mmencode"))) - (and file - (` ("sh" "-c" (, (concat file " -u | gzip -dc")))))) +(defvar gzip64-external-decoder '("sh" "-c" "mmencode -u | gzip -dc") "*list of gzip64 decoder program name and its arguments.") diff --git a/mel-q-ccl.el b/mel-q-ccl.el index cb54a56..3769fb9 100644 --- a/mel-q-ccl.el +++ b/mel-q-ccl.el @@ -20,8 +20,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Code: diff --git a/mel-q.el b/mel-q.el index 4a59b02..953b549 100644 --- a/mel-q.el +++ b/mel-q.el @@ -20,8 +20,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Code: @@ -254,7 +254,8 @@ the program (maybe mmencode included in metamail or XEmacs package)." (defvar quoted-printable-external-decoder-option-to-specify-file '("-o") - "*list of options of quoted-printable decoder program to specify file.") + "*list of options of quoted-printable decoder program to specify file. +If the quoted-printable decoder does not have such option, set this as nil.") (mel-define-method mime-write-decoded-region (start end filename (nil "quoted-printable")) @@ -264,10 +265,18 @@ START and END are buffer positions." (as-binary-process (apply (function call-process-region) start end (car quoted-printable-external-decoder) - nil nil nil - (append (cdr quoted-printable-external-decoder) - quoted-printable-external-decoder-option-to-specify-file - (list filename))))) + (null quoted-printable-external-decoder-option-to-specify-file) + (unless quoted-printable-external-decoder-option-to-specify-file + (list (current-buffer) nil)) + nil + (delq nil + (append + (cdr quoted-printable-external-decoder) + quoted-printable-external-decoder-option-to-specify-file + (when quoted-printable-external-decoder-option-to-specify-file + (list filename)))))) + (unless quoted-printable-external-decoder-option-to-specify-file + (write-region-as-binary (point-min) (point-max) filename))) ;;; @ Q-encoding encode/decode string diff --git a/mel-u.el b/mel-u.el index ead3efb..c5f3fe1 100644 --- a/mel-u.el +++ b/mel-u.el @@ -20,8 +20,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Code: @@ -69,22 +69,21 @@ This function uses external uuencode decoder which is specified by variable `uuencode-external-decoder'." (interactive "*r") (save-excursion - (let ((filename (save-excursion - (save-restriction - (narrow-to-region start end) - (goto-char start) - (if (re-search-forward "^begin [0-9]+ " nil t) - (if (looking-at ".+$") - (buffer-substring (match-beginning 0) - (match-end 0))))))) - (default-directory temporary-file-directory)) - (if filename - (let ((coding-system-for-read 'binary) - (coding-system-for-write 'binary)) - (apply (function call-process-region) - start end (car uuencode-external-decoder) - t nil nil - (cdr uuencode-external-decoder)) + (let ((filename (make-temp-file "x-uue"))) + (save-excursion + (save-restriction + (set-mark end) + (narrow-to-region start end) + (goto-char start) + (when (and (re-search-forward "^begin [0-9]+ " nil t) + (looking-at ".+$")) + (replace-match filename) + (let ((coding-system-for-read 'binary) + (coding-system-for-write 'binary)) + (apply (function call-process-region) + start (mark) (car uuencode-external-decoder) + t nil nil + (cdr uuencode-external-decoder))) (insert-file-contents filename) ;; The previous line causes the buffer to be made read-only, I ;; do not pretend to understand the control flow leading to this @@ -92,7 +91,7 @@ variable `uuencode-external-decoder'." ;; Use `inhibit-read-only' to avoid to force ;; buffer-read-only nil. - tomo. (let ((inhibit-read-only t)) - (delete-file filename))))))) + (delete-file filename)))))))) (mel-define-method-function (mime-encode-region start end (nil "x-uue")) 'uuencode-external-encode-region) @@ -134,24 +133,26 @@ variable `uuencode-external-encoder'." START and END are buffer positions." (interactive "*r\nFWrite decoded region to file: ") (save-excursion - (let ((file (save-excursion - (save-restriction - (narrow-to-region start end) - (goto-char start) - (if (re-search-forward "^begin [0-9]+ " nil t) - (if (looking-at ".+$") - (buffer-substring (match-beginning 0) - (match-end 0))))))) - (default-directory temporary-file-directory)) - (if file - (let ((coding-system-for-read 'binary) - (coding-system-for-write 'binary)) - (apply (function call-process-region) - start end (car uuencode-external-decoder) - nil nil nil - (cdr uuencode-external-decoder)) - (rename-file file filename 'overwrites)))))) - + (let ((clone-buf (clone-buffer " *x-uue*")) + (file (make-temp-file "x-uue"))) + (save-excursion + (save-restriction + (set-buffer clone-buf) + (narrow-to-region start end) + (setq buffer-read-only nil) + (goto-char start) + (when (and (re-search-forward "^begin [0-9]+ " nil t) + (looking-at ".+$")) + (replace-match file) + (let ((coding-system-for-read 'binary) + (coding-system-for-write 'binary)) + (apply (function call-process-region) + (point-min) (point-max) (car uuencode-external-decoder) + nil nil nil + (cdr uuencode-external-decoder)) + (rename-file file filename 'overwrites) + (message (concat "Wrote " filename)))))) + (kill-buffer clone-buf)))) ;;; @ end ;;; diff --git a/mel.el b/mel.el index 6d7de59..44d7a70 100644 --- a/mel.el +++ b/mel.el @@ -20,8 +20,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Code: diff --git a/mime-conf.el b/mime-conf.el index 0550893..67f613b 100644 --- a/mime-conf.el +++ b/mime-conf.el @@ -1,6 +1,6 @@ ;;; mime-conf.el --- mailcap parser and MIME playback configuration -;; Copyright (C) 1997,1998,1999,2000 Free Software Foundation, Inc. +;; Copyright (C) 1997,1998,1999,2000,2004 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko ;; Created: 1997-06-27 @@ -22,8 +22,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Code: @@ -222,7 +222,7 @@ may be: (error "'filename is not specified in situation.") (setq dest (concat dest (substring mtext p (1- i)) - file) + (shell-quote-argument file)) i (1+ i) p i) ))) diff --git a/mime-def.el b/mime-def.el index 4a58ea3..7f00c70 100644 --- a/mime-def.el +++ b/mime-def.el @@ -1,6 +1,6 @@ ;;; mime-def.el --- definition module about MIME -*- coding: iso-8859-4; -*- -;; Copyright (C) 1995,96,97,98,99,2000,2001,2002,2003 +;; Copyright (C) 1995,96,97,98,99,2000,2001,2002,2003,2004 ;; Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko @@ -21,8 +21,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Code: @@ -33,7 +33,7 @@ (eval-when-compile (require 'luna)) ; luna-arglist-to-arguments (eval-and-compile - (defconst mime-library-product ["FLIM" (1 14 6) "Marutamachi"] + (defconst mime-library-product ["FLIM" (1 14 8) "Shijò"] "Product name, version number and code name of MIME-library package.")) (defmacro mime-product-name (product) diff --git a/mime-en.sgml b/mime-en.sgml index 50b57d0..35783df 100644 --- a/mime-en.sgml +++ b/mime-en.sgml @@ -1343,10 +1343,7 @@ If you would like to join CVS based development, please send mail to with your account name and your public key for ssh. cvsroot is :ext:cvs@@cvs.m17n.org:/cvs/root. -

-If you cannot use ssh, you can join development via pserver. -In this case, please send UNIX /etc/passwd style crypted password. -Then cvsroot is :pserver:@cvs.m17n.org:/cvs/root. +

History of FLIM History diff --git a/mime-ja.sgml b/mime-ja.sgml index e68a09e..2067e17 100644 --- a/mime-ja.sgml +++ b/mime-ja.sgml @@ -1343,10 +1343,6 @@ CVS $B$rMQ$$$?3+H/$K;22C$7$?$$J}$O(B $B$^$G!"%"%+%&%s%HL>$H(B ssh $B$N8x3+80$rAw$C$F$/$@$5$$!#(Bssh $B7PM3$G$O!"(B cvsroot $B$O(B :ext:cvs@cvs.m17n.org:/cvs/root $B$H$J$j$^$9!#(B -

-$B$I$&$7$F$b(B ssh $B$,;H$($J$$>l9g!"(Bpserver $B7PM3$G$b3+H/$K;22C$G$-$^$9!#(B -$B$3$N>l9g!"(BUNIX $B$N(B /etc/passwd $BMM<0$G0E9f2=$5$l$?%Q%9%o!<%I$rAw$C$F2<$5$$!#(B -$B$3$N>l9g(B cvsroot $B$O(B :pserver:<$B%"%+%&%s%HL>(B>@cvs.m17n.org:/cvs/root $B$H$J$j$^$9!#(B

$BNr;K(B diff --git a/mime-parse.el b/mime-parse.el index 57d2228..7bae6ff 100644 --- a/mime-parse.el +++ b/mime-parse.el @@ -20,8 +20,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Code: diff --git a/mime.el b/mime.el index 161eb97..9dc2fcc 100644 --- a/mime.el +++ b/mime.el @@ -19,8 +19,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Code: diff --git a/mmbuffer.el b/mmbuffer.el index a034f5a..c605a59 100644 --- a/mmbuffer.el +++ b/mmbuffer.el @@ -19,8 +19,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Code: diff --git a/mmcooked.el b/mmcooked.el index f55a34a..c2b3066 100644 --- a/mmcooked.el +++ b/mmcooked.el @@ -19,8 +19,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Code: diff --git a/mmexternal.el b/mmexternal.el index 9b4b18b..c107e64 100644 --- a/mmexternal.el +++ b/mmexternal.el @@ -19,8 +19,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Code: diff --git a/mmgeneric.el b/mmgeneric.el index 4b632f3..d215dc6 100644 --- a/mmgeneric.el +++ b/mmgeneric.el @@ -19,8 +19,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Code: diff --git a/ntlm.el b/ntlm.el index 33573b2..7d43684 100644 --- a/ntlm.el +++ b/ntlm.el @@ -18,8 +18,8 @@ ;; ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Commentary: @@ -63,7 +63,6 @@ ;;; Code: -(require 'poem) (require 'md4) ;;; @@ -106,13 +105,19 @@ is not given." domain ;bufer field ))) +(eval-when-compile + (defmacro ntlm-string-as-unibyte (string) + (if (fboundp 'string-as-unibyte) + `(string-as-unibyte ,string) + string))) + (defun ntlm-build-auth-response (challenge user password-hashes) "Return the response string to a challenge string CHALLENGE given by the NTLM based server for the user USER and the password hash list PASSWORD-HASHES. NTLM uses two hash values which are represented by PASSWORD-HASHES. PASSWORD-HASHES should be a return value of - (list (smb-passwd-hash password) (ntlm-md4hash password))" - (let* ((rchallenge (string-as-unibyte challenge)) + (list (ntlm-smb-passwd-hash password) (ntlm-md4hash password))" + (let* ((rchallenge (ntlm-string-as-unibyte challenge)) ;; get fields within challenge struct ;;(ident (substring rchallenge 0 8)) ;ident, 8 bytes ;;(msgType (substring rchallenge 8 12)) ;msgType, 4 bytes @@ -140,9 +145,9 @@ by PASSWORD-HASHES. PASSWORD-HASHES should be a return value of ;; generate response data (setq lmRespData - (smb-owf-encrypt (car password-hashes) challengeData)) + (ntlm-smb-owf-encrypt (car password-hashes) challengeData)) (setq ntRespData - (smb-owf-encrypt (cadr password-hashes) challengeData)) + (ntlm-smb-owf-encrypt (cadr password-hashes) challengeData)) ;; get offsets to fields to pack the response struct in a string (setq lu (length user)) @@ -211,7 +216,7 @@ by PASSWORD-HASHES. PASSWORD-HASHES should be a return value of (defun ntlm-get-password-hashes (password) "Return a pair of SMB hash and NT MD4 hash of the given password PASSWORD" - (list (smb-passwd-hash password) + (list (ntlm-smb-passwd-hash password) (ntlm-md4hash password))) (defun ntlm-ascii2unicode (str len) @@ -219,7 +224,7 @@ by PASSWORD-HASHES. PASSWORD-HASHES should be a return value of little-endian utf16." (let ((utf (make-string (* 2 len) 0)) (i 0) val) (while (and (< i len) - (not (zerop (setq val (aref str i))))) + (not (eq (setq val (aref str i)) ?\0))) (aset utf (* 2 i) val) (aset utf (1+ (* 2 i)) 0) (setq i (1+ i))) @@ -234,46 +239,46 @@ little-endian utf16." j (+ 2 j))) buf)) -(defun smb-passwd-hash (passwd) +(defun ntlm-smb-passwd-hash (passwd) "Return the SMB password hash string of 16 bytes long for the given password string PASSWD. PASSWD is truncated to 14 bytes if longer." (let ((len (min (length passwd) 14))) - (smbdes-e-p16 + (ntlm-smb-des-e-p16 (concat (substring (upcase passwd) 0 len) ;fill top 14 bytes with passwd (make-string (- 15 len) 0))))) -(defun smb-owf-encrypt (passwd c8) +(defun ntlm-smb-owf-encrypt (passwd c8) "Return the response string of 24 bytes long for the given password string PASSWD based on the DES encryption. PASSWD is of at most 14 bytes long and the challenge string C8 of 8 bytes long." (let ((len (min (length passwd) 16)) p22) (setq p22 (concat (substring passwd 0 len) ;fill top 16 bytes with passwd (make-string (- 22 len) 0))) - (smbdes-e-p24 p22 c8))) + (ntlm-smb-des-e-p24 p22 c8))) -(defun smbdes-e-p24 (p22 c8) +(defun ntlm-smb-des-e-p24 (p22 c8) "Return a 24 bytes hashed string for a 21 bytes string P22 and a 8 bytes string C8." - (concat (smbhash c8 p22 t) ;hash first 8 bytes of p22 - (smbhash c8 (substring p22 7) t) - (smbhash c8 (substring p22 14) t))) + (concat (ntlm-smb-hash c8 p22 t) ;hash first 8 bytes of p22 + (ntlm-smb-hash c8 (substring p22 7) t) + (ntlm-smb-hash c8 (substring p22 14) t))) -(defconst smb-sp8 [75 71 83 33 64 35 36 37]) +(defconst ntlm-smb-sp8 [75 71 83 33 64 35 36 37]) -(defun smbdes-e-p16 (p15) +(defun ntlm-smb-des-e-p16 (p15) "Return a 16 bytes hashed string for a 15 bytes string P15." - (concat (smbhash smb-sp8 p15 t) ;hash of first 8 bytes of p15 - (smbhash smb-sp8 (substring p15 7) t) ;hash of last 8 bytes of p15 - )) + (concat (ntlm-smb-hash ntlm-smb-sp8 p15 t) ;hash of first 8 bytes of p15 + (ntlm-smb-hash ntlm-smb-sp8 ;hash of last 8 bytes of p15 + (substring p15 7) t))) -(defun smbhash (in key forw) +(defun ntlm-smb-hash (in key forw) "Return the hash string of length 8 for a string IN of length 8 and a string KEY of length 8. FORW is t or nil." (let ((out (make-string 8 0)) outb ;string of length 64 (inb (make-string 64 0)) (keyb (make-string 64 0)) - (key2 (smb-str-to-key key)) + (key2 (ntlm-smb-str-to-key key)) (i 0) aa) (while (< i 64) (unless (zerop (logand (aref in (/ i 8)) (lsh 1 (- 7 (% i 8))))) @@ -281,17 +286,17 @@ a string KEY of length 8. FORW is t or nil." (unless (zerop (logand (aref key2 (/ i 8)) (lsh 1 (- 7 (% i 8))))) (aset keyb i 1)) (setq i (1+ i))) - (setq outb (smb-dohash inb keyb forw)) + (setq outb (ntlm-smb-dohash inb keyb forw)) (setq i 0) (while (< i 64) - (unless (zerop (aref outb i)) + (unless (eq (aref outb i) ?\0) (setq aa (aref out (/ i 8))) (aset out (/ i 8) (logior aa (lsh 1 (- 7 (% i 8)))))) (setq i (1+ i))) out)) -(defun smb-str-to-key (str) +(defun ntlm-smb-str-to-key (str) "Return a string of length 8 for the given string STR of length 7." (let ((key (make-string 8 0)) (i 7)) @@ -320,7 +325,7 @@ a string KEY of length 8. FORW is t or nil." (setq i (1- i))) key)) -(defconst smb-perm1 [57 49 41 33 25 17 9 +(defconst ntlm-smb-perm1 [57 49 41 33 25 17 9 1 58 50 42 34 26 18 10 2 59 51 43 35 27 19 11 3 60 52 44 36 @@ -329,7 +334,7 @@ a string KEY of length 8. FORW is t or nil." 14 6 61 53 45 37 29 21 13 5 28 20 12 4]) -(defconst smb-perm2 [14 17 11 24 1 5 +(defconst ntlm-smb-perm2 [14 17 11 24 1 5 3 28 15 6 21 10 23 19 12 4 26 8 16 7 27 20 13 2 @@ -338,7 +343,7 @@ a string KEY of length 8. FORW is t or nil." 44 49 39 56 34 53 46 42 50 36 29 32]) -(defconst smb-perm3 [58 50 42 34 26 18 10 2 +(defconst ntlm-smb-perm3 [58 50 42 34 26 18 10 2 60 52 44 36 28 20 12 4 62 54 46 38 30 22 14 6 64 56 48 40 32 24 16 8 @@ -347,7 +352,7 @@ a string KEY of length 8. FORW is t or nil." 61 53 45 37 29 21 13 5 63 55 47 39 31 23 15 7]) -(defconst smb-perm4 [32 1 2 3 4 5 +(defconst ntlm-smb-perm4 [32 1 2 3 4 5 4 5 6 7 8 9 8 9 10 11 12 13 12 13 14 15 16 17 @@ -356,7 +361,7 @@ a string KEY of length 8. FORW is t or nil." 24 25 26 27 28 29 28 29 30 31 32 1]) -(defconst smb-perm5 [16 7 20 21 +(defconst ntlm-smb-perm5 [16 7 20 21 29 12 28 17 1 15 23 26 5 18 31 10 @@ -365,7 +370,7 @@ a string KEY of length 8. FORW is t or nil." 19 13 30 6 22 11 4 25]) -(defconst smb-perm6 [40 8 48 16 56 24 64 32 +(defconst ntlm-smb-perm6 [40 8 48 16 56 24 64 32 39 7 47 15 55 23 63 31 38 6 46 14 54 22 62 30 37 5 45 13 53 21 61 29 @@ -374,9 +379,9 @@ a string KEY of length 8. FORW is t or nil." 34 2 42 10 50 18 58 26 33 1 41 9 49 17 57 25]) -(defconst smb-sc [1 1 2 2 2 2 2 2 1 2 2 2 2 2 2 1]) +(defconst ntlm-smb-sc [1 1 2 2 2 2 2 2 1 2 2 2 2 2 2 1]) -(defconst smb-sbox [[[14 4 13 1 2 15 11 8 3 10 6 12 5 9 0 7] +(defconst ntlm-smb-sbox [[[14 4 13 1 2 15 11 8 3 10 6 12 5 9 0 7] [ 0 15 7 4 14 2 13 1 10 6 12 11 9 5 3 8] [ 4 1 14 8 13 6 2 11 15 12 9 7 3 10 5 0] [15 12 8 2 4 9 1 7 5 11 3 14 10 0 6 13]] @@ -409,7 +414,7 @@ a string KEY of length 8. FORW is t or nil." [ 7 11 4 1 9 12 14 2 0 6 10 13 15 3 5 8] [ 2 1 14 7 4 10 8 13 15 12 9 0 3 5 6 11]]]) -(defsubst string-permute (in perm n) +(defsubst ntlm-string-permute (in perm n) "Return a string of length N for a string IN and a permutation vector PERM of size N. The length of IN should be height of PERM." (let ((i 0) (out (make-string n 0))) @@ -418,13 +423,13 @@ PERM of size N. The length of IN should be height of PERM." (setq i (1+ i))) out)) -(defsubst string-lshift (str count len) +(defsubst ntlm-string-lshift (str count len) "Return a string by circularly shifting a string STR by COUNT to the left. length of STR is LEN." (let ((c (% count len))) (concat (substring str c len) (substring str 0 c)))) -(defsubst string-xor (in1 in2 n) +(defsubst ntlm-string-xor (in1 in2 n) "Return exclusive-or of sequences in1 and in2" (let ((w (make-string n 0)) (i 0)) (while (< i n) @@ -432,7 +437,7 @@ length of STR is LEN." (setq i (1+ i))) w)) -(defun smb-dohash (in key forw) +(defun ntlm-smb-dohash (in key forw) "Return the hash value for a string IN and a string KEY. Length of IN and KEY are 64. FORW non nill means forward, nil means backward." @@ -446,19 +451,19 @@ backward." r ;string of length 32 rl ;string of length 64 (i 0) (j 0) (k 0)) - (setq pk1 (string-permute key smb-perm1 56)) + (setq pk1 (ntlm-string-permute key ntlm-smb-perm1 56)) (setq c (substring pk1 0 28)) (setq d (substring pk1 28 56)) (setq i 0) (while (< i 16) - (setq c (string-lshift c (aref smb-sc i) 28)) - (setq d (string-lshift d (aref smb-sc i) 28)) + (setq c (ntlm-string-lshift c (aref ntlm-smb-sc i) 28)) + (setq d (ntlm-string-lshift d (aref ntlm-smb-sc i) 28)) (setq cd (concat (substring c 0 28) (substring d 0 28))) - (aset ki i (string-permute cd smb-perm2 48)) + (aset ki i (ntlm-string-permute cd ntlm-smb-perm2 48)) (setq i (1+ i))) - (setq pd1 (string-permute in smb-perm3 64)) + (setq pd1 (ntlm-string-permute in ntlm-smb-perm3 64)) (setq l (substring pd1 0 32)) (setq r (substring pd1 32 64)) @@ -472,8 +477,8 @@ backward." r2 ;string of length 32 jj m n bj sbox-jmn) (while (< i 16) - (setq er (string-permute r smb-perm4 48)) - (setq erk (string-xor er + (setq er (ntlm-string-permute r ntlm-smb-perm4 48)) + (setq erk (ntlm-string-xor er (aref ki (if forw i (- 15 i))) 48)) (setq j 0) @@ -490,7 +495,7 @@ backward." (lsh (aref bj 3) 1) (aref bj 4))) (setq k 0) - (setq sbox-jmn (aref (aref (aref smb-sbox j) m) n)) + (setq sbox-jmn (aref (aref (aref ntlm-smb-sbox j) m) n)) (while (< k 4) (aset bj k (if (zerop (logand sbox-jmn (lsh 1 (- 3 k)))) @@ -504,13 +509,13 @@ backward." (setq cb (concat cb (substring (aref b j) 0 4))) (setq j (1+ j))) - (setq pcb (string-permute cb smb-perm5 32)) - (setq r2 (string-xor l pcb 32)) + (setq pcb (ntlm-string-permute cb ntlm-smb-perm5 32)) + (setq r2 (ntlm-string-xor l pcb 32)) (setq l r) (setq r r2) (setq i (1+ i)))) (setq rl (concat r l)) - (string-permute rl smb-perm6 64))) + (ntlm-string-permute rl ntlm-smb-perm6 64))) (defun ntlm-md4hash (passwd) "Return the 16 bytes MD4 hash of a string PASSWD after converting it diff --git a/qmtp.el b/qmtp.el index e74f798..b1f1072 100644 --- a/qmtp.el +++ b/qmtp.el @@ -19,8 +19,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Commentary: diff --git a/sasl-cram.el b/sasl-cram.el index 25d1082..caaaa73 100644 --- a/sasl-cram.el +++ b/sasl-cram.el @@ -20,8 +20,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Commentary: diff --git a/sasl-digest.el b/sasl-digest.el index 9e061b7..e7610a1 100644 --- a/sasl-digest.el +++ b/sasl-digest.el @@ -20,8 +20,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;; This program is implemented from draft-leach-digest-sasl-05.txt. ;; diff --git a/sasl-ntlm.el b/sasl-ntlm.el index 67b4c96..7f6d439 100644 --- a/sasl-ntlm.el +++ b/sasl-ntlm.el @@ -19,8 +19,8 @@ ;; ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Commentary: diff --git a/sasl-scram.el b/sasl-scram.el index bcd46a9..20786fa 100644 --- a/sasl-scram.el +++ b/sasl-scram.el @@ -20,8 +20,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Commentary: diff --git a/sasl.el b/sasl.el index 593f46b..de1af88 100644 --- a/sasl.el +++ b/sasl.el @@ -19,8 +19,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Commentary: diff --git a/sasl.texi b/sasl.texi index 4e538d5..8d73326 100644 --- a/sasl.texi +++ b/sasl.texi @@ -4,6 +4,7 @@ @set VERSION 0.2 +@dircategory Emacs @direntry * SASL: (sasl). The Emacs SASL library. @end direntry @@ -118,7 +119,7 @@ A list of mechanism names. @defun sasl-find-mechanism mechanisms Retrieve an apropriate mechanism. -This function compares MECHANISMS and @code{sasl-mechanisms} then +This function compares @var{mechanisms} and @code{sasl-mechanisms} then returns apropriate @code{sasl-mechanism} object. @example @@ -203,19 +204,19 @@ Return the whole property list of client configuration. @section Steps A step (@code{sasl-step} object) is an abstraction of authentication -"step" which holds the response value and the next entry point for the +``step'' which holds the response value and the next entry point for the authentication process (the latter is not accessible). @defun sasl-step-data step -Return the data which STEP holds, a string. +Return the data which @var{step} holds, a string. @end defun @defun sasl-step-set-data step data -Store DATA string to STEP. +Store @var{data} string to @var{step}. @end defun To get the initial response, you should call the function -@code{sasl-next-step} with the second argument nil. +@code{sasl-next-step} with the second argument @code{nil}. @example (setq name (sasl-mechanism-name mechanism)) @@ -237,7 +238,7 @@ To go on with the authentication process, all you have to do is call @defun sasl-next-step client step Perform the authentication step. -At the first time STEP should be set to nil. +At the first time @var{step} should be set to @code{nil}. @end defun @node Backend drivers diff --git a/sha1-dl.el b/sha1-dl.el index 4716d4d..1da5481 100644 --- a/sha1-dl.el +++ b/sha1-dl.el @@ -1,6 +1,6 @@ ;;; sha1-dl.el --- SHA1 Secure Hash Algorithm using DL module. -;; Copyright (C) 1999, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2001, 2004 Free Software Foundation, Inc. ;; Author: Shuhei KOBAYASHI ;; Keywords: SHA1, FIPS 180-1 @@ -19,8 +19,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Commentary: @@ -35,20 +35,23 @@ ;;; sha1-dl-module provides `sha1-string' and `sha1-binary'. (dynamic-call "emacs_sha1_init" sha1-dl-handle) -(defun sha1-region (beg end) - (sha1-string (buffer-substring-no-properties beg end))) +(defun sha1-region (beg end &optional binary) + (if binary + (sha1-binary (buffer-substring-no-properties beg end)) + (sha1-string (buffer-substring-no-properties beg end)))) -(defun sha1 (object &optional beg end) +(defun sha1 (object &optional beg end binary) "Return the SHA1 (Secure Hash Algorithm) of an object. OBJECT is either a string or a buffer. Optional arguments BEG and END denote buffer positions for computing the -hash of a portion of OBJECT." +hash of a portion of OBJECT. +If BINARY is non-nil, return a string in binary form." (if (stringp object) - (sha1-string object) + (if binary + (sha1-binary object) + (sha1-string object)) (save-excursion (set-buffer object) - (sha1-region (or beg (point-min)) (or end (point-max)))))) - -(provide 'sha1-dl) + (sha1-region (or beg (point-min)) (or end (point-max)) binary)))) ;;; sha1-dl.el ends here diff --git a/sha1-el.el b/sha1-el.el index 15c1f5a..82657b8 100644 --- a/sha1-el.el +++ b/sha1-el.el @@ -1,6 +1,6 @@ -;;; sha1-el.el --- SHA1 Secure Hash Algorithm in Emacs-Lisp. +;;; sha1-el.el --- SHA1 Secure Hash Algorithm in Emacs-Lisp -;; Copyright (C) 1999, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2001, 2003, 2004 Free Software Foundation, Inc. ;; Author: Shuhei KOBAYASHI ;; Keywords: SHA1, FIPS 180-1 @@ -19,8 +19,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Commentary: @@ -54,46 +54,59 @@ (require 'hex-util) +(autoload 'executable-find "executable") + ;;; ;;; external SHA1 function. ;;; -(defvar sha1-maximum-internal-length 500 - "*Maximum length of message to use lisp version of SHA1 function. +(defgroup sha1 nil + "Elisp interface for SHA1 hash computation." + :group 'extensions) + +(defcustom sha1-maximum-internal-length 500 + "*Maximum length of message to use Lisp version of SHA1 function. If message is longer than this, `sha1-program' is used instead. -If this variable is set to 0, use extarnal program only. -If this variable is set to nil, use internal function only.") +If this variable is set to 0, use external program only. +If this variable is set to nil, use internal function only." + :type 'integer + :group 'sha1) -(defvar sha1-program '("openssl" "sha1") +(defcustom sha1-program '("sha1sum") "*Name of program to compute SHA1. -It must be a string \(program name\) or list of strings \(name and its args\).") - -(defun sha1-string-external (string) - ;; `with-temp-buffer' is new in v20, so we do not use it. - (save-excursion - (let (buffer) - (unwind-protect - (let (prog args) - (if (consp sha1-program) - (setq prog (car sha1-program) - args (cdr sha1-program)) - (setq prog sha1-program - args nil)) - (setq buffer (set-buffer - (generate-new-buffer " *sha1 external*"))) - (insert string) - (apply (function call-process-region) - (point-min)(point-max) - prog t t nil args) - ;; SHA1 is 40 bytes long in hexadecimal form. - (buffer-substring (point-min)(+ (point-min) 40))) - (and buffer - (buffer-name buffer) - (kill-buffer buffer)))))) - -(defun sha1-region-external (beg end) - (sha1-string-external (buffer-substring-no-properties beg end))) +It must be a string \(program name\) or list of strings \(name and its args\)." + :type '(repeat string) + :group 'sha1) + +(defcustom sha1-use-external (condition-case () + (executable-find (car sha1-program)) + (error)) + "*Use external SHA1 program. +If this variable is set to nil, use internal function only." + :type 'boolean + :group 'sha1) + +(defun sha1-string-external (string &optional binary) + (let (prog args digest default-enable-multibyte-characters) + (if (consp sha1-program) + (setq prog (car sha1-program) + args (cdr sha1-program)) + (setq prog sha1-program + args nil)) + (with-temp-buffer + (insert string) + (apply (function call-process-region) + (point-min)(point-max) + prog t t nil args) + ;; SHA1 is 40 bytes long in hexadecimal form. + (setq digest (buffer-substring (point-min)(+ (point-min) 40)))) + (if binary + (decode-hex-string digest) + digest))) + +(defun sha1-region-external (beg end &optional binary) + (sha1-string-external (buffer-substring-no-properties beg end) binary)) ;;; ;;; internal SHA1 function. @@ -385,38 +398,44 @@ It must be a string \(program name\) or list of strings \(name and its args\).") (fillarray block-high nil) (fillarray block-low nil)))) -(defun sha1-string-internal (string) - (encode-hex-string (sha1-binary string))) +(defun sha1-string-internal (string &optional binary) + (if binary + (sha1-binary string) + (encode-hex-string (sha1-binary string)))) -(defun sha1-region-internal (beg end) - (sha1-string-internal (buffer-substring-no-properties beg end))) +(defun sha1-region-internal (beg end &optional binary) + (sha1-string-internal (buffer-substring-no-properties beg end) binary)) ;;; ;;; application interface. ;;; -(defun sha1-region (beg end) - (if (and sha1-maximum-internal-length +(defun sha1-region (beg end &optional binary) + (if (and sha1-use-external + sha1-maximum-internal-length (> (abs (- end beg)) sha1-maximum-internal-length)) - (sha1-region-external beg end) - (sha1-region-internal beg end))) + (sha1-region-external beg end binary) + (sha1-region-internal beg end binary))) -(defun sha1-string (string) - (if (and sha1-maximum-internal-length +(defun sha1-string (string &optional binary) + (if (and sha1-use-external + sha1-maximum-internal-length (> (length string) sha1-maximum-internal-length)) - (sha1-string-external string) - (sha1-string-internal string))) + (sha1-string-external string binary) + (sha1-string-internal string binary))) -(defun sha1 (object &optional beg end) +;;;###autoload +(defun sha1 (object &optional beg end binary) "Return the SHA1 (Secure Hash Algorithm) of an object. OBJECT is either a string or a buffer. Optional arguments BEG and END denote buffer positions for computing the -hash of a portion of OBJECT." +hash of a portion of OBJECT. +If BINARY is non-nil, return a string in binary form." (if (stringp object) - (sha1-string object) + (sha1-string object binary) (save-excursion (set-buffer object) - (sha1-region (or beg (point-min)) (or end (point-max)))))) + (sha1-region (or beg (point-min)) (or end (point-max)) binary)))) (provide 'sha1-el) diff --git a/sha1.el b/sha1.el index a9e5e9d..6fca525 100644 --- a/sha1.el +++ b/sha1.el @@ -19,8 +19,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Commentary: diff --git a/smtp.el b/smtp.el index ff13f5a..0fcf274 100644 --- a/smtp.el +++ b/smtp.el @@ -1,6 +1,7 @@ ;;; smtp.el --- basic functions to send mail with SMTP server -;; Copyright (C) 1995, 1996, 1998, 1999, 2000 Free Software Foundation, Inc. +;; Copyright (C) 1995, 1996, 1998, 1999, 2000, 2001 ,2002, 2004 +;; Free Software Foundation, Inc. ;; Author: Tomoji Kagatani ;; Simon Leinen (ESMTP support) @@ -22,8 +23,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Commentary: @@ -102,6 +103,14 @@ don't define this value." :type 'boolean :group 'smtp-extensions) +(defcustom smtp-starttls-program "starttls" + "The program to run in a subprocess to open an TLSv1 connection." + :group 'smtp-extensions) + +(defcustom smtp-starttls-extra-args nil + "Extra arguments to `starttls-program'" + :group 'smtp-extensions) + (defcustom smtp-use-sasl nil "If non-nil, use SMTP Authentication (RFC2554) if available." :type 'boolean @@ -122,6 +131,23 @@ don't define this value." :type '(repeat string) :group 'smtp-extensions) +(defcustom smtp-progress-message-format nil + "Format string used to show progress message while sending mails. +It allows the following special format specifiers: + +%b means show the number of bytes which has been sent + and the total bytes of a mail. +%k means show the number of kilobytes which has been sent + and the total kilobytes of a mail. +%l means show the number of lines which has been sent + and the total lines of a mail. + +For instance, the value \"Sending (%k)...\" shows like +\"Sending (45k/123k)...\" in the echo area." + :type '(radio (string :format "%v\n" :size 0 :value "Sending (%k)...") + (const :tag "Don't show progress message" nil)) + :group 'smtp) + (defvar sasl-mechanisms) ;;;###autoload @@ -343,17 +369,19 @@ RECIPIENTS is a list of envelope recipient addresses. BUFFER may be a buffer or a buffer name which contains mail message." (if smtp-send-by-myself (smtp-send-buffer-by-myself sender recipients buffer) - (let ((server - (if (functionp smtp-server) - (funcall smtp-server sender recipients) - (or smtp-server - (error "`smtp-server' not defined")))) - (package - (smtp-make-package sender recipients buffer)) - (smtp-open-connection-function - (if smtp-use-starttls - #'starttls-open-stream - smtp-open-connection-function))) + (let* ((server + (if (functionp smtp-server) + (funcall smtp-server sender recipients) + (or smtp-server + (error "`smtp-server' not defined")))) + (package + (smtp-make-package sender recipients buffer)) + (starttls-program smtp-starttls-program) + (starttls-extra-args smtp-starttls-extra-args) + (smtp-open-connection-function + (if smtp-use-starttls + #'starttls-open-stream + smtp-open-connection-function))) (save-excursion (set-buffer (get-buffer-create @@ -573,18 +601,20 @@ BUFFER may be a buffer or a buffer name which contains mail message." (defun smtp-primitive-data (package) (let* ((connection (smtp-find-connection (current-buffer))) - response) + response def prev) (smtp-send-command connection "DATA") (setq response (smtp-read-response connection)) (if (/= (car response) 354) (smtp-response-error response)) (save-excursion (set-buffer (smtp-package-buffer-internal package)) + (setq def (smtp-parse-progress-message-format)) (goto-char (point-min)) (while (not (eobp)) (smtp-send-data connection (buffer-substring (point) (progn (end-of-line)(point)))) - (beginning-of-line 2))) + (beginning-of-line 2) + (setq prev (smtp-show-progress-message def prev)))) (smtp-send-command connection ".") (setq response (smtp-read-response connection)) (if (/= (car response) 250) @@ -624,6 +654,8 @@ BUFFER may be a buffer or a buffer name which contains mail message." (while response-continue (goto-char smtp-read-point) (while (not (search-forward smtp-end-of-line nil t)) + (unless (smtp-connection-opened connection) + (signal 'smtp-error "Connection closed")) (accept-process-output (smtp-connection-process-internal connection)) (goto-char smtp-read-point)) (if decoder @@ -708,9 +740,7 @@ BUFFER may be a buffer or a buffer name which contains mail message." (mail-strip-quoted-names (buffer-substring this-line this-line-end))))) (erase-buffer) - (insert-string " ") - (insert-string simple-address-list) - (insert-string "\n") + (insert " " simple-address-list "\n") ;; newline --> blank (subst-char-in-region (point-min) (point-max) 10 ? t) ;; comma --> blank @@ -732,6 +762,74 @@ BUFFER may be a buffer or a buffer name which contains mail message." recipient-address-list)) (kill-buffer smtp-address-buffer)))) +;;; @ functions used to show progress message +;;; +(defun smtp-parse-progress-message-format () + "Parse the `smtp-progress-message-format' variable. +Return nil, or a cons of an ordinary format string and a type including +nil, the symbols `b', `k' and `l'." + (when smtp-progress-message-format + (let ((format smtp-progress-message-format) + (index 0) + type) + (while (string-match "%\\([bkl]\\)\\|%\\([^%bkl]\\|\\'\\)" format index) + (if (and (not type) + (match-beginning 1)) + (setq index (match-end 0) + type (intern (match-string 1 format)) + format (replace-match + (cond ((eq type 'b) + (concat "%d/" + (number-to-string (buffer-size)))) + ((eq type 'k) + (if (>= (buffer-size) 512) + (concat "%dk/" + (number-to-string + (/ (+ (buffer-size) 512) 1024)) + "k") + (setq type 'b) + (concat "%d/" + (number-to-string (buffer-size))))) + (t + (concat "%d/" + (number-to-string + (count-lines (point-min) + (point-max)))))) + nil nil format)) + (setq index (1+ (match-end 0)) + format (replace-match "%\\&" nil nil format)))) + (cons format type)))) + +(defun smtp-show-progress-message (def prev) + "Show progress message while sending mails. +DEF is a cons cell which is pre-computed by the +`smtp-parse-progress-message-format' function or nil. +PREV is a number shown last time or nil. +Return a number computed this time." + (when (car def) + (let* ((fmt (car def)) + (type (cdr def)) + (value (cond ((eq type 'b) + (- (point) (point-min))) + ((eq type 'k) + (/ (- (point) (point-min) -512) 1024)) + ((eq type 'l) + (count-lines (point-min) (point))))) + message-log-max) + (unless (and prev + value + (eq type 'k) + (<= value prev)) + (cond ((featurep 'xemacs) + (display-message 'no-log (if value + (format fmt value) + fmt))) + (value + (message fmt value)) + (t + (message "%s" fmt)))) + value))) + (provide 'smtp) ;;; smtp.el ends here diff --git a/smtpmail.el b/smtpmail.el index cdc396c..1adc168 100644 --- a/smtpmail.el +++ b/smtpmail.el @@ -19,8 +19,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Commentary: diff --git a/std11.el b/std11.el index a2ebeec..8c8de62 100644 --- a/std11.el +++ b/std11.el @@ -19,8 +19,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Code: @@ -481,7 +481,7 @@ be the result." (cons (cons 'word elt) rest) ))))) -(defun std11-parse-word-or-comment (lal) +(defun std11-parse-word-or-comment-or-period (lal) (let ((ret (std11-parse-token-or-comment lal))) (if ret (let ((elt (car ret)) @@ -493,12 +493,15 @@ be the result." ) ((assq 'comment elt) (cons (cons 'comment-word elt) rest) + ) + ((string-equal (cdr (assq 'specials elt)) ".") + (cons (cons 'period elt) rest) )) )))) (defun std11-parse-phrase (lal) (let (ret phrase) - (while (setq ret (std11-parse-word-or-comment lal)) + (while (setq ret (std11-parse-word-or-comment-or-period lal)) (setq phrase (append phrase (cdr (car ret)))) (setq lal (cdr ret)) ) @@ -763,6 +766,8 @@ represents addr-spec of RFC 822." ((eq name 'comment) "") ((eq name 'quoted-string) (concat "\"" (cdr token) "\"")) + ((eq name 'domain-literal) + (concat "[" (cdr token) "]")) (t (cdr token))) ))) seq "") -- 1.7.10.4