- Switch to the version maintained by the developers of Wanderlust.
- Update to the snapshot on 2019-05-26.
This commit is contained in:
parent
83ec852b1c
commit
6f7e57bfc8
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=508740
13 changed files with 29 additions and 474 deletions
|
@ -2,11 +2,9 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= flim
|
||||
PORTVERSION= 1.14.9
|
||||
PORTREVISION= 21
|
||||
PORTVERSION= 1.14.9.${SNAPDATE}
|
||||
PORTEPOCH= 1
|
||||
CATEGORIES= editors elisp
|
||||
MASTER_SITES= http://git.chise.org/elisp/dist/${PORTNAME}/${PORTNAME}-${DISTVERSION:R}/
|
||||
PKGNAMESUFFIX= ${EMACS_PKGNAMESUFFIX}
|
||||
|
||||
MAINTAINER= nobutaka@FreeBSD.org
|
||||
|
@ -14,12 +12,15 @@ COMMENT= Message representation or encoding elisp library for emacs
|
|||
|
||||
LICENSE= GPLv2
|
||||
|
||||
BUILD_DEPENDS= apel${EMACS_PKGNAMESUFFIX}>0:editors/apel@${EMACS_FLAVOR} \
|
||||
nkf:japanese/nkf
|
||||
BUILD_DEPENDS= apel${EMACS_PKGNAMESUFFIX}>0:editors/apel@${EMACS_FLAVOR}
|
||||
RUN_DEPENDS= apel${EMACS_PKGNAMESUFFIX}>0:editors/apel@${EMACS_FLAVOR}
|
||||
|
||||
USES= cpe emacs makeinfo
|
||||
USES= cpe emacs iconv makeinfo
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= wanderlust
|
||||
GH_TAGNAME= e4bd54f
|
||||
|
||||
SNAPDATE= 20190526
|
||||
CPE_VENDOR= gnu
|
||||
NO_ARCH= yes
|
||||
|
||||
|
@ -36,8 +37,8 @@ OPTIONS_DEFINE= DOCS
|
|||
post-build:
|
||||
@(cd ${WRKSRC} ; \
|
||||
for i in mime-en.texi mime-ja.texi; do \
|
||||
${CAT} $${i} | nkf -e > $${i}.jis ; \
|
||||
${MAKEINFO} --no-split --no-validate $${i}.jis ; \
|
||||
${ICONV_CMD} -f ISO-2022-JP -t UTF-8 $${i} > $${i}.utf8 ; \
|
||||
${MAKEINFO} --no-split --no-validate $${i}.utf8 ; \
|
||||
done)
|
||||
|
||||
post-install:
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
SHA256 (flim-1.14.9.tar.gz) = bbd5a8729ea27457c7c2ffdcb1be6219ad38fdfa323341f4fad2d298780070ec
|
||||
SIZE (flim-1.14.9.tar.gz) = 182065
|
||||
TIMESTAMP = 1565575779
|
||||
SHA256 (wanderlust-flim-1.14.9.20190526-e4bd54f_GH0.tar.gz) = ff232c895fa447388d2a14f2588a75d3ea2356c84d4299b781a70e041e4d55e5
|
||||
SIZE (wanderlust-flim-1.14.9.20190526-e4bd54f_GH0.tar.gz) = 173153
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
--- FLIM-CFG.orig 2006-12-20 17:40:42 UTC
|
||||
+++ FLIM-CFG
|
||||
@@ -8,6 +8,8 @@
|
||||
|
||||
(add-to-list 'load-path
|
||||
(expand-file-name "../../site-lisp/apel" data-directory))
|
||||
+(add-to-list 'load-path
|
||||
+ (expand-file-name "../site-lisp/emu" data-directory))
|
||||
|
||||
(if (boundp 'LISPDIR)
|
||||
(progn
|
|
@ -1,78 +0,0 @@
|
|||
Index: eword-encode.el
|
||||
===================================================================
|
||||
--- eword-encode.el.orig 2007-09-06 07:48:50 UTC
|
||||
+++ eword-encode.el
|
||||
@@ -162,15 +162,15 @@ MODE is allows `text', `comment', `phras
|
||||
;;;
|
||||
|
||||
(defmacro make-ew-rword (text charset encoding type)
|
||||
- (` (list (, text)(, charset)(, encoding)(, type))))
|
||||
+ `(list ,text ,charset ,encoding ,type))
|
||||
(defmacro ew-rword-text (rword)
|
||||
- (` (car (, rword))))
|
||||
+ `(car ,rword))
|
||||
(defmacro ew-rword-charset (rword)
|
||||
- (` (car (cdr (, rword)))))
|
||||
+ `(car (cdr ,rword)))
|
||||
(defmacro ew-rword-encoding (rword)
|
||||
- (` (car (cdr (cdr (, rword))))))
|
||||
+ `(car (cdr (cdr ,rword))))
|
||||
(defmacro ew-rword-type (rword)
|
||||
- (` (car (cdr (cdr (cdr (, rword)))))))
|
||||
+ `(car (cdr (cdr (cdr ,rword)))))
|
||||
|
||||
(defun ew-find-charset-rule (charsets)
|
||||
(if charsets
|
||||
@@ -184,30 +184,30 @@ MODE is allows `text', `comment', `phras
|
||||
;; which is not depended on the Mule model. We should redesign
|
||||
;; `eword-encode-split-string' to avoid to depend on the Mule model.
|
||||
(if (featurep 'utf-2000)
|
||||
-;; for CHISE Architecture
|
||||
-(defun tm-eword::words-to-ruled-words (wl &optional mode)
|
||||
- (let (mcs)
|
||||
+ ;; for CHISE Architecture
|
||||
+ (defun tm-eword::words-to-ruled-words (wl &optional mode)
|
||||
+ (let (mcs)
|
||||
+ (mapcar (function
|
||||
+ (lambda (word)
|
||||
+ (setq mcs (detect-mime-charset-string (cdr word)))
|
||||
+ (make-ew-rword
|
||||
+ (cdr word)
|
||||
+ mcs
|
||||
+ (cdr (or (assq mcs mime-header-charset-encoding-alist)
|
||||
+ (cons mcs mime-header-default-charset-encoding)))
|
||||
+ mode)
|
||||
+ ))
|
||||
+ wl)))
|
||||
+
|
||||
+ ;; for legacy Mule
|
||||
+ (defun tm-eword::words-to-ruled-words (wl &optional mode)
|
||||
(mapcar (function
|
||||
(lambda (word)
|
||||
- (setq mcs (detect-mime-charset-string (cdr word)))
|
||||
- (make-ew-rword
|
||||
- (cdr word)
|
||||
- mcs
|
||||
- (cdr (or (assq mcs mime-header-charset-encoding-alist)
|
||||
- (cons mcs mime-header-default-charset-encoding)))
|
||||
- mode)
|
||||
- ))
|
||||
- wl)))
|
||||
-
|
||||
-;; for legacy Mule
|
||||
-(defun tm-eword::words-to-ruled-words (wl &optional mode)
|
||||
- (mapcar (function
|
||||
- (lambda (word)
|
||||
- (let ((ret (ew-find-charset-rule (car word))))
|
||||
- (make-ew-rword (cdr word) (car ret)(nth 1 ret) mode)
|
||||
- )))
|
||||
- wl))
|
||||
-)
|
||||
+ (let ((ret (ew-find-charset-rule (car word))))
|
||||
+ (make-ew-rword (cdr word) (car ret)(nth 1 ret) mode)
|
||||
+ )))
|
||||
+ wl))
|
||||
+ )
|
||||
|
||||
(defun ew-space-process (seq)
|
||||
(let (prev a ac b c cc)
|
|
@ -1,26 +0,0 @@
|
|||
Index: hex-util.el
|
||||
===================================================================
|
||||
--- hex-util.el.orig 2007-09-05 23:39:48 UTC
|
||||
+++ hex-util.el
|
||||
@@ -28,14 +28,14 @@
|
||||
|
||||
(eval-when-compile
|
||||
(defmacro hex-char-to-num (chr)
|
||||
- (` (let ((chr (, chr)))
|
||||
- (cond
|
||||
- ((and (<= ?a chr)(<= chr ?f)) (+ (- chr ?a) 10))
|
||||
- ((and (<= ?A chr)(<= chr ?F)) (+ (- chr ?A) 10))
|
||||
- ((and (<= ?0 chr)(<= chr ?9)) (- chr ?0))
|
||||
- (t (error "Invalid hexadecimal digit `%c'" chr))))))
|
||||
+ `(let ((chr ,chr))
|
||||
+ (cond
|
||||
+ ((and (<= ?a chr)(<= chr ?f)) (+ (- chr ?a) 10))
|
||||
+ ((and (<= ?A chr)(<= chr ?F)) (+ (- chr ?A) 10))
|
||||
+ ((and (<= ?0 chr)(<= chr ?9)) (- chr ?0))
|
||||
+ (t (error "Invalid hexadecimal digit `%c'" chr)))))
|
||||
(defmacro num-to-hex-char (num)
|
||||
- (` (aref "0123456789abcdef" (, num)))))
|
||||
+ `(aref "0123456789abcdef" ,num)))
|
||||
|
||||
(defun decode-hex-string (string)
|
||||
"Decode hexadecimal STRING to octet string."
|
|
@ -1,89 +0,0 @@
|
|||
--- hmac-def.el.orig 2007-09-05 23:39:48 UTC
|
||||
+++ hmac-def.el
|
||||
@@ -39,46 +39,46 @@ a string and return a digest of it (in b
|
||||
B is a byte-length of a block size of H. (B=64 for both SHA1 and MD5.)
|
||||
L is a byte-length of hash outputs. (L=16 for MD5, L=20 for SHA1.)
|
||||
If BIT is non-nil, truncate output to specified bits."
|
||||
- (` (defun (, name) (text key)
|
||||
- (, (concat "Compute "
|
||||
- (upcase (symbol-name name))
|
||||
- " over TEXT with KEY."))
|
||||
- (let ((key-xor-ipad (make-string (, B) ?\x36))
|
||||
- (key-xor-opad (make-string (, B) ?\x5C))
|
||||
- (len (length key))
|
||||
- (pos 0))
|
||||
- (unwind-protect
|
||||
- (progn
|
||||
- ;; if `key' is longer than the block size, apply hash function
|
||||
- ;; to `key' and use the result as a real `key'.
|
||||
- (if (> len (, B))
|
||||
- (setq key ((, H) key)
|
||||
- len (, L)))
|
||||
- (while (< pos len)
|
||||
- (aset key-xor-ipad pos (logxor (aref key pos) ?\x36))
|
||||
- (aset key-xor-opad pos (logxor (aref key pos) ?\x5C))
|
||||
- (setq pos (1+ pos)))
|
||||
- (setq key-xor-ipad (unwind-protect
|
||||
- (concat key-xor-ipad text)
|
||||
- (fillarray key-xor-ipad 0))
|
||||
- key-xor-ipad (unwind-protect
|
||||
- ((, H) key-xor-ipad)
|
||||
- (fillarray key-xor-ipad 0))
|
||||
- key-xor-opad (unwind-protect
|
||||
- (concat key-xor-opad key-xor-ipad)
|
||||
- (fillarray key-xor-opad 0))
|
||||
- key-xor-opad (unwind-protect
|
||||
- ((, H) key-xor-opad)
|
||||
- (fillarray key-xor-opad 0)))
|
||||
- ;; now `key-xor-opad' contains
|
||||
- ;; H(KEY XOR opad, H(KEY XOR ipad, TEXT)).
|
||||
- (, (if (and bit (< (/ bit 8) L))
|
||||
- (` (substring key-xor-opad 0 (, (/ bit 8))))
|
||||
- ;; return a copy of `key-xor-opad'.
|
||||
- (` (concat key-xor-opad)))))
|
||||
- ;; cleanup.
|
||||
- (fillarray key-xor-ipad 0)
|
||||
- (fillarray key-xor-opad 0))))))
|
||||
+ `(defun ,name (text key)
|
||||
+ ,(concat "Compute "
|
||||
+ (upcase (symbol-name name))
|
||||
+ " over TEXT with KEY.")
|
||||
+ (let ((key-xor-ipad (make-string ,B ?\x36))
|
||||
+ (key-xor-opad (make-string ,B ?\x5C))
|
||||
+ (len (length key))
|
||||
+ (pos 0))
|
||||
+ (unwind-protect
|
||||
+ (progn
|
||||
+ ;; if `key' is longer than the block size, apply hash function
|
||||
+ ;; to `key' and use the result as a real `key'.
|
||||
+ (if (> len ,B)
|
||||
+ (setq key (,H key)
|
||||
+ len ,L))
|
||||
+ (while (< pos len)
|
||||
+ (aset key-xor-ipad pos (logxor (aref key pos) ?\x36))
|
||||
+ (aset key-xor-opad pos (logxor (aref key pos) ?\x5C))
|
||||
+ (setq pos (1+ pos)))
|
||||
+ (setq key-xor-ipad (unwind-protect
|
||||
+ (concat key-xor-ipad text)
|
||||
+ (fillarray key-xor-ipad 0))
|
||||
+ key-xor-ipad (unwind-protect
|
||||
+ (,H key-xor-ipad)
|
||||
+ (fillarray key-xor-ipad 0))
|
||||
+ key-xor-opad (unwind-protect
|
||||
+ (concat key-xor-opad key-xor-ipad)
|
||||
+ (fillarray key-xor-opad 0))
|
||||
+ key-xor-opad (unwind-protect
|
||||
+ (,H key-xor-opad)
|
||||
+ (fillarray key-xor-opad 0)))
|
||||
+ ;; now `key-xor-opad' contains
|
||||
+ ;; H(KEY XOR opad, H(KEY XOR ipad, TEXT)).
|
||||
+ ,(if (and bit (< (/ bit 8) L))
|
||||
+ `(substring key-xor-opad 0 ,(/ bit 8))
|
||||
+ ;; return a copy of `key-xor-opad'.
|
||||
+ `(concat key-xor-opad)))
|
||||
+ ;; cleanup.
|
||||
+ (fillarray key-xor-ipad 0)
|
||||
+ (fillarray key-xor-opad 0)))))
|
||||
|
||||
(provide 'hmac-def)
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
Index: md4.el
|
||||
===================================================================
|
||||
--- md4.el.orig 2007-09-05 23:39:48 UTC
|
||||
+++ md4.el
|
||||
@@ -78,21 +78,20 @@ bytes long. N is required to handle str
|
||||
(setq m (md4-copy64 (substring buf 64)))
|
||||
(md4-64 m)))
|
||||
|
||||
- (concat (md4-pack-int32 (aref md4-buffer 0))
|
||||
- (md4-pack-int32 (aref md4-buffer 1))
|
||||
- (md4-pack-int32 (aref md4-buffer 2))
|
||||
- (md4-pack-int32 (aref md4-buffer 3))))
|
||||
+ (concat (md4-pack-int32 (aref md4-buffer 0))
|
||||
+ (md4-pack-int32 (aref md4-buffer 1))
|
||||
+ (md4-pack-int32 (aref md4-buffer 2))
|
||||
+ (md4-pack-int32 (aref md4-buffer 3))))
|
||||
|
||||
(defsubst md4-F (x y z) (logior (logand x y) (logand (lognot x) z)))
|
||||
(defsubst md4-G (x y z) (logior (logand x y) (logand x z) (logand y z)))
|
||||
(defsubst md4-H (x y z) (logxor x y z))
|
||||
|
||||
(defmacro md4-make-step (name func)
|
||||
- (`
|
||||
- (defun (, name) (a b c d xk s ac)
|
||||
+ `(defun ,name (a b c d xk s ac)
|
||||
(let*
|
||||
- ((h1 (+ (car a) ((, func) (car b) (car c) (car d)) (car xk) (car ac)))
|
||||
- (l1 (+ (cdr a) ((, func) (cdr b) (cdr c) (cdr d)) (cdr xk) (cdr ac)))
|
||||
+ ((h1 (+ (car a) (,func (car b) (car c) (car d)) (car xk) (car ac)))
|
||||
+ (l1 (+ (cdr a) (,func (cdr b) (cdr c) (cdr d)) (cdr xk) (cdr ac)))
|
||||
(h2 (logand 65535 (+ h1 (lsh l1 -16))))
|
||||
(l2 (logand 65535 l1))
|
||||
;; cyclic shift of 32 bits integer
|
||||
@@ -102,7 +101,7 @@ bytes long. N is required to handle str
|
||||
(l3 (logand 65535 (if (> s 15)
|
||||
(+ (lsh l2 (- s 32)) (lsh h2 (- s 16)))
|
||||
(+ (lsh l2 s) (lsh h2 (- s 16)))))))
|
||||
- (cons h3 l3)))))
|
||||
+ (cons h3 l3))))
|
||||
|
||||
(md4-make-step md4-round1 md4-F)
|
||||
(md4-make-step md4-round2 md4-G)
|
|
@ -1,26 +0,0 @@
|
|||
--- md5-el.el.orig 2000-11-06 13:03:19 UTC
|
||||
+++ md5-el.el
|
||||
@@ -169,11 +169,10 @@ Returns a vector of 16 bytes containing
|
||||
(defsubst md5-I (x y z) (logxor y (logior x (logand 65535 (lognot z)))))
|
||||
|
||||
(defmacro md5-make-step (name func)
|
||||
- (`
|
||||
- (defun (, name) (a b c d x s ac)
|
||||
+ `(defun ,name (a b c d x s ac)
|
||||
(let*
|
||||
- ((m1 (+ (car a) ((, func) (car b) (car c) (car d)) (car x) (car ac)))
|
||||
- (l1 (+ (cdr a) ((, func) (cdr b) (cdr c) (cdr d)) (cdr x) (cdr ac)))
|
||||
+ ((m1 (+ (car a) (,func (car b) (car c) (car d)) (car x) (car ac)))
|
||||
+ (l1 (+ (cdr a) (,func (cdr b) (cdr c) (cdr d)) (cdr x) (cdr ac)))
|
||||
(m2 (logand 65535 (+ m1 (lsh l1 -16))))
|
||||
(l2 (logand 65535 l1))
|
||||
(m3 (logand 65535 (if (> s 15)
|
||||
@@ -182,7 +181,7 @@ Returns a vector of 16 bytes containing
|
||||
(l3 (logand 65535 (if (> s 15)
|
||||
(+ (lsh l2 (- s 32)) (lsh m2 (- s 16)))
|
||||
(+ (lsh l2 s) (lsh m2 (- s 16)))))))
|
||||
- (md5-add (cons m3 l3) b)))))
|
||||
+ (md5-add (cons m3 l3) b))))
|
||||
|
||||
(md5-make-step md5-FF md5-F)
|
||||
(md5-make-step md5-GG md5-G)
|
|
@ -1,15 +1,11 @@
|
|||
--- mime-en.texi.orig 2002-10-08 15:50:05 UTC
|
||||
--- mime-en.texi.orig 2019-05-26 10:34:29 UTC
|
||||
+++ mime-en.texi
|
||||
@@ -1,7 +1,11 @@
|
||||
\input texinfo.tex
|
||||
@@ -2,7 +2,7 @@
|
||||
@c Generated automatically from mime-en.sgml by sinfo 3.7.
|
||||
@setfilename mime-en.info
|
||||
-@settitle{FLIM 1.14 Reference Manual about MIME Features}
|
||||
+@settitle FLIM 1.14 Reference Manual about MIME Features
|
||||
+@dircategory The Emacs editor and associated tools
|
||||
+@direntry
|
||||
+* mime-en: (mime-en). MIME features for GNU Emacs. (English)
|
||||
+@end direntry
|
||||
@titlepage
|
||||
@title FLIM 1.14 Reference Manual about MIME Features
|
||||
@author MORIOKA Tomohiko <morioka@@jaist.ac.jp>
|
||||
@settitle FLIM 1.14 Reference Manual about MIME Features
|
||||
-@documentencoding iso-2022-jp
|
||||
+@documentencoding utf-8
|
||||
@documentlanguage en
|
||||
@dircategory GNU Emacs Lisp
|
||||
@direntry
|
||||
|
|
|
@ -1,15 +1,11 @@
|
|||
--- mime-ja.texi.orig 2002-10-08 15:50:05 UTC
|
||||
--- mime-ja.texi.orig 2019-05-26 10:34:29 UTC
|
||||
+++ mime-ja.texi
|
||||
@@ -1,7 +1,11 @@
|
||||
\input texinfo.tex
|
||||
@@ -2,7 +2,7 @@
|
||||
@c Generated automatically from mime-ja.sgml by sinfo 3.7.
|
||||
@setfilename mime-ja.info
|
||||
-@settitle{FLIM 1.14 MIME $B5!G=@bL@=q(B}
|
||||
+@settitle FLIM 1.14 MIME $B5!G=@bL@=q(B
|
||||
+@dircategory The Emacs editor and associated tools
|
||||
+@direntry
|
||||
+* mime-ja: (mime-ja). MIME features for GNU Emacs. (Japanese)
|
||||
+@end direntry
|
||||
@titlepage
|
||||
@title FLIM 1.14 MIME $B5!G=@bL@=q(B
|
||||
@author $B<i2,(B $BCNI'(B <morioka@@jaist.ac.jp>
|
||||
@documentlanguage ja
|
||||
-@documentencoding iso-2022-jp
|
||||
+@documentencoding utf-8
|
||||
@settitle FLIM 1.14 MIME $B5!G=@bL@=q(B
|
||||
@dircategory GNU Emacs Lisp
|
||||
@direntry
|
||||
|
|
|
@ -1,165 +0,0 @@
|
|||
Index: sha1-el.el
|
||||
===================================================================
|
||||
--- sha1-el.el.orig 2007-09-05 23:39:48 UTC
|
||||
+++ sha1-el.el
|
||||
@@ -125,91 +125,91 @@ If this variable is set to nil, use inte
|
||||
|
||||
;;; original definition of sha1-F0.
|
||||
;;; (defmacro sha1-F0 (B C D)
|
||||
-;;; (` (logior (logand (, B) (, C))
|
||||
-;;; (logand (lognot (, B)) (, D)))))
|
||||
+;;; `(logior (logand ,B ,C)
|
||||
+;;; (logand (lognot ,B) ,D)))
|
||||
;;; a little optimization from GnuPG/cipher/sha1.c.
|
||||
(defmacro sha1-F0 (B C D)
|
||||
- (` (logxor (, D) (logand (, B) (logxor (, C) (, D))))))
|
||||
+ `(logxor ,D (logand ,B (logxor ,C ,D))))
|
||||
(defmacro sha1-F1 (B C D)
|
||||
- (` (logxor (, B) (, C) (, D))))
|
||||
+ `(logxor ,B ,C ,D))
|
||||
;;; original definition of sha1-F2.
|
||||
;;; (defmacro sha1-F2 (B C D)
|
||||
-;;; (` (logior (logand (, B) (, C))
|
||||
-;;; (logand (, B) (, D))
|
||||
-;;; (logand (, C) (, D)))))
|
||||
+;;; `(logior (logand ,B ,C)
|
||||
+;;; (logand ,B ,D)
|
||||
+;;; (logand ,C ,D)))
|
||||
;;; a little optimization from GnuPG/cipher/sha1.c.
|
||||
(defmacro sha1-F2 (B C D)
|
||||
- (` (logior (logand (, B) (, C))
|
||||
- (logand (, D) (logior (, B) (, C))))))
|
||||
+ `(logior (logand ,B ,C)
|
||||
+ (logand ,D (logior ,B ,C))))
|
||||
(defmacro sha1-F3 (B C D)
|
||||
- (` (logxor (, B) (, C) (, D))))
|
||||
+ `(logxor ,B ,C ,D))
|
||||
|
||||
(defmacro sha1-S1 (W-high W-low)
|
||||
- (` (let ((W-high (, W-high))
|
||||
- (W-low (, W-low)))
|
||||
- (setq S1W-high (+ (% (* W-high 2) 65536)
|
||||
- (/ W-low (, (/ 65536 2)))))
|
||||
- (setq S1W-low (+ (/ W-high (, (/ 65536 2)))
|
||||
- (% (* W-low 2) 65536))))))
|
||||
+ `(let ((W-high ,W-high)
|
||||
+ (W-low ,W-low))
|
||||
+ (setq S1W-high (+ (% (* W-high 2) 65536)
|
||||
+ (/ W-low ,(/ 65536 2))))
|
||||
+ (setq S1W-low (+ (/ W-high ,(/ 65536 2))
|
||||
+ (% (* W-low 2) 65536)))))
|
||||
(defmacro sha1-S5 (A-high A-low)
|
||||
- (` (progn
|
||||
- (setq S5A-high (+ (% (* (, A-high) 32) 65536)
|
||||
- (/ (, A-low) (, (/ 65536 32)))))
|
||||
- (setq S5A-low (+ (/ (, A-high) (, (/ 65536 32)))
|
||||
- (% (* (, A-low) 32) 65536))))))
|
||||
+ `(progn
|
||||
+ (setq S5A-high (+ (% (* ,A-high 32) 65536)
|
||||
+ (/ ,A-low ,(/ 65536 32))))
|
||||
+ (setq S5A-low (+ (/ ,A-high , (/ 65536 32))
|
||||
+ (% (* ,A-low 32) 65536)))))
|
||||
(defmacro sha1-S30 (B-high B-low)
|
||||
- (` (progn
|
||||
- (setq S30B-high (+ (/ (, B-high) 4)
|
||||
- (* (% (, B-low) 4) (, (/ 65536 4)))))
|
||||
- (setq S30B-low (+ (/ (, B-low) 4)
|
||||
- (* (% (, B-high) 4) (, (/ 65536 4))))))))
|
||||
+ `(progn
|
||||
+ (setq S30B-high (+ (/ ,B-high 4)
|
||||
+ (* (% ,B-low 4) ,(/ 65536 4))))
|
||||
+ (setq S30B-low (+ (/ ,B-low 4)
|
||||
+ (* (% ,B-high 4) ,(/ 65536 4))))))
|
||||
|
||||
(defmacro sha1-OP (round)
|
||||
- (` (progn
|
||||
- (sha1-S5 sha1-A-high sha1-A-low)
|
||||
- (sha1-S30 sha1-B-high sha1-B-low)
|
||||
- (setq sha1-A-low (+ ((, (intern (format "sha1-F%d" round)))
|
||||
- sha1-B-low sha1-C-low sha1-D-low)
|
||||
- sha1-E-low
|
||||
- (, (symbol-value
|
||||
- (intern (format "sha1-K%d-low" round))))
|
||||
- (aref block-low idx)
|
||||
- (progn
|
||||
- (setq sha1-E-low sha1-D-low)
|
||||
- (setq sha1-D-low sha1-C-low)
|
||||
- (setq sha1-C-low S30B-low)
|
||||
- (setq sha1-B-low sha1-A-low)
|
||||
- S5A-low)))
|
||||
- (setq carry (/ sha1-A-low 65536))
|
||||
- (setq sha1-A-low (% sha1-A-low 65536))
|
||||
- (setq sha1-A-high (% (+ ((, (intern (format "sha1-F%d" round)))
|
||||
- sha1-B-high sha1-C-high sha1-D-high)
|
||||
- sha1-E-high
|
||||
- (, (symbol-value
|
||||
- (intern (format "sha1-K%d-high" round))))
|
||||
- (aref block-high idx)
|
||||
- (progn
|
||||
- (setq sha1-E-high sha1-D-high)
|
||||
- (setq sha1-D-high sha1-C-high)
|
||||
- (setq sha1-C-high S30B-high)
|
||||
- (setq sha1-B-high sha1-A-high)
|
||||
- S5A-high)
|
||||
- carry)
|
||||
- 65536)))))
|
||||
+ `(progn
|
||||
+ (sha1-S5 sha1-A-high sha1-A-low)
|
||||
+ (sha1-S30 sha1-B-high sha1-B-low)
|
||||
+ (setq sha1-A-low (+ (,(intern (format "sha1-F%d" round))
|
||||
+ sha1-B-low sha1-C-low sha1-D-low)
|
||||
+ sha1-E-low
|
||||
+ ,(symbol-value
|
||||
+ (intern (format "sha1-K%d-low" round)))
|
||||
+ (aref block-low idx)
|
||||
+ (progn
|
||||
+ (setq sha1-E-low sha1-D-low)
|
||||
+ (setq sha1-D-low sha1-C-low)
|
||||
+ (setq sha1-C-low S30B-low)
|
||||
+ (setq sha1-B-low sha1-A-low)
|
||||
+ S5A-low)))
|
||||
+ (setq carry (/ sha1-A-low 65536))
|
||||
+ (setq sha1-A-low (% sha1-A-low 65536))
|
||||
+ (setq sha1-A-high (% (+ (,(intern (format "sha1-F%d" round))
|
||||
+ sha1-B-high sha1-C-high sha1-D-high)
|
||||
+ sha1-E-high
|
||||
+ ,(symbol-value
|
||||
+ (intern (format "sha1-K%d-high" round)))
|
||||
+ (aref block-high idx)
|
||||
+ (progn
|
||||
+ (setq sha1-E-high sha1-D-high)
|
||||
+ (setq sha1-D-high sha1-C-high)
|
||||
+ (setq sha1-C-high S30B-high)
|
||||
+ (setq sha1-B-high sha1-A-high)
|
||||
+ S5A-high)
|
||||
+ carry)
|
||||
+ 65536))))
|
||||
|
||||
(defmacro sha1-add-to-H (H X)
|
||||
- (` (progn
|
||||
- (setq (, (intern (format "sha1-%s-low" H)))
|
||||
- (+ (, (intern (format "sha1-%s-low" H)))
|
||||
- (, (intern (format "sha1-%s-low" X)))))
|
||||
- (setq carry (/ (, (intern (format "sha1-%s-low" H))) 65536))
|
||||
- (setq (, (intern (format "sha1-%s-low" H)))
|
||||
- (% (, (intern (format "sha1-%s-low" H))) 65536))
|
||||
- (setq (, (intern (format "sha1-%s-high" H)))
|
||||
- (% (+ (, (intern (format "sha1-%s-high" H)))
|
||||
- (, (intern (format "sha1-%s-high" X)))
|
||||
- carry)
|
||||
- 65536)))))
|
||||
+ `(progn
|
||||
+ (setq ,(intern (format "sha1-%s-low" H))
|
||||
+ (+ ,(intern (format "sha1-%s-low" H))
|
||||
+ ,(intern (format "sha1-%s-low" X))))
|
||||
+ (setq carry (/ ,(intern (format "sha1-%s-low" H)) 65536))
|
||||
+ (setq ,(intern (format "sha1-%s-low" H))
|
||||
+ (% ,(intern (format "sha1-%s-low" H)) 65536))
|
||||
+ (setq ,(intern (format "sha1-%s-high" H))
|
||||
+ (% (+ ,(intern (format "sha1-%s-high" H))
|
||||
+ ,(intern (format "sha1-%s-high" X))
|
||||
+ carry)
|
||||
+ 65536))))
|
||||
)
|
||||
|
||||
;;; buffers (H0 H1 H2 H3 H4).
|
|
@ -9,4 +9,4 @@ FLIM, message representation or encoding emacs lisp library for emacs20.
|
|||
|
||||
Ported by shige@FreeBSD.ORG
|
||||
|
||||
WWW: http://git.chise.org/elisp/flim/ (in Japanese)
|
||||
WWW: https://github.com/wanderlust/flim
|
||||
|
|
|
@ -62,8 +62,6 @@
|
|||
%%EMACS_VERSION_SITE_LISPDIR%%/flim/sasl-scram.elc
|
||||
%%EMACS_VERSION_SITE_LISPDIR%%/flim/sasl.el
|
||||
%%EMACS_VERSION_SITE_LISPDIR%%/flim/sasl.elc
|
||||
%%EMACS_VERSION_SITE_LISPDIR%%/flim/sha1-el.el
|
||||
%%EMACS_VERSION_SITE_LISPDIR%%/flim/sha1-el.elc
|
||||
%%EMACS_VERSION_SITE_LISPDIR%%/flim/sha1.el
|
||||
%%EMACS_VERSION_SITE_LISPDIR%%/flim/sha1.elc
|
||||
%%EMACS_VERSION_SITE_LISPDIR%%/flim/smtp.el
|
||||
|
|
Loading…
Reference in a new issue