mule-packages/mule-ucs/lisp/ChangeLog addition:
2008-07-16 Aidan Kehoe <kehoea(a)parhasard.net>
* utf.el (utf-16-ccl-decode):
* utf.el (ccl-utf-7-decode):
Don't try to use character syntax for integers above #xFF, use
integer hex syntax instead.
xemacs-packages/ecrypto/ChangeLog addition:
2008-07-16 Aidan Kehoe <kehoea(a)parhasard.net>
* ascii-armor.el:
* ascii-armor.el (ascii-armor-to-vec16):
* md5-old.el (md5-i2):
* md5-old.el (md5<<<):
* md5-old.el (md5+):
* md5-old.el (md5-t):
* md5-old.el (md5-vector):
* rc16.el (rc16-set-key):
* rc16.el (rc16-mixin):
* rc16.el (rc16-short):
* sha1-old.el (sha1):
* sha1-old.el (sha1<<<):
* sha1-old.el (sha1+):
* sha1-old.el (sha1-vector):
Don't try to use character syntax for integers above #xFF, use
integer hex syntax instead.
XEmacs Packages source patch:
Diff command: cvs -q diff -Nu
Files affected: xemacs-packages/ecrypto/sha1-old.el
===================================================================
RCS xemacs-packages/ecrypto/rc16.el
===================================================================
RCS xemacs-packages/ecrypto/md5-old.el
===================================================================
RCS xemacs-packages/ecrypto/ascii-armor.el
===================================================================
RCS mule-packages/mule-ucs/lisp/utf.el
===================================================================
RCS
Index: mule-packages/mule-ucs/lisp/utf.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/mule-packages/mule-ucs/lisp/utf.el,v
retrieving revision 1.2
diff -u -u -r1.2 utf.el
--- mule-packages/mule-ucs/lisp/utf.el 2002/03/18 09:29:02 1.2
+++ mule-packages/mule-ucs/lisp/utf.el 2008/07/16 20:51:54
@@ -158,7 +158,7 @@
((if ,(mucs-ccl-check-internal-state 'utf-16-little-endian-p)
((read r6 r4))
((read r4 r6)))
- (r0 = (((r0 & ?\x3ff) + ?\x40) << 10))
+ (r0 = (((r0 & #x3ff) + ?\x40) << 10))
(r6 &= ?\x3f)
(r4 = ((r4 & ?\x3) << 6) | r6)
(r0 |= r4)))))
@@ -452,13 +452,13 @@
(if (r1 >= 0)
((r6 = ((r6 << 6) | r1))
(if (r6 >= ,(cn "0x30000"))
- ((r0 = (r6 & ?\xFFFF))
+ ((r0 = (r6 & #xFFFF))
(r6 = 0))
((read r0)
(r1 = r0 ,ccl-b64-decode-table)
(if (r1 >= 0)
((r6 = ((r6 << 6) | r1))
- (if (r6 >= ?\x800000)
+ (if (r6 >= #x800000)
;; r6 = 1000 XXXX XXXX XXXX XXXX XXXX
((r0 = ((r6 >> 4) & ,(cn "0xFFFF")))
(r6 = ((r6 & ?\xF) | ?\x30)))
Index: xemacs-packages/ecrypto/ascii-armor.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/ecrypto/ascii-armor.el,v
retrieving revision 1.1
diff -u -u -r1.1 ascii-armor.el
--- xemacs-packages/ecrypto/ascii-armor.el 2002/06/13 18:22:04 1.1
+++ xemacs-packages/ecrypto/ascii-armor.el 2008/07/16 20:51:54
@@ -131,7 +131,7 @@
(aset out-vec out-idx (ash buf (- 16 bits-in-buf)))
(decf bits-in-buf 16)
;; turn off the used bits
- (setq buf (logand buf (lognot (ash ?\xffff bits-in-buf)))))
+ (setq buf (logand buf (lognot (ash #xffff bits-in-buf)))))
out-vec))
Index: xemacs-packages/ecrypto/md5-old.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/ecrypto/md5-old.el,v
retrieving revision 1.1
diff -u -u -r1.1 md5-old.el
--- xemacs-packages/ecrypto/md5-old.el 2002/06/13 18:22:07 1.1
+++ xemacs-packages/ecrypto/md5-old.el 2008/07/16 20:51:54
@@ -100,7 +100,7 @@
(logior x
;; this is normally a lognot, but that would set
;; high bits, and there's no logand to clear them.
- (logxor z ?\xffff))))
+ (logxor z #xffff))))
(defsubst md5-f (x y z)
(cons (md5-f2 (car x) (car y) (car z))
@@ -129,86 +129,86 @@
(rotatef a b)
(decf shift 16))
- (cons (logand ?\xffff (logior (ash a shift) (ash b (- shift 16))))
- (logand ?\xffff (logior (ash b shift) (ash a (- shift 16)))))))
+ (cons (logand #xffff (logior (ash a shift) (ash b (- shift 16))))
+ (logand #xffff (logior (ash b shift) (ash a (- shift 16)))))))
(defsubst md5+ (&rest args)
;; enough room to just add without carry checks
(let* ((lo (apply #'+ (mapcar #'cdr args)))
(hi (+ (ash lo -16) (apply #'+ (mapcar #'car args)))))
- (cons (logand ?\xffff hi)
- (logand ?\xffff lo))))
+ (cons (logand #xffff hi)
+ (logand #xffff lo))))
;; array of values for i=[1..64] => floor(2^32 * abs(sin(i)))
(defconst md5-t
- [(?\xd76a . ?\xa478)
- (?\xe8c7 . ?\xb756)
- (?\x2420 . ?\x70db)
- (?\xc1bd . ?\xceee)
- (?\xf57c . ?\x0faf)
- (?\x4787 . ?\xc62a)
- (?\xa830 . ?\x4613)
- (?\xfd46 . ?\x9501)
- (?\x6980 . ?\x98d8)
- (?\x8b44 . ?\xf7af)
- (?\xffff . ?\x5bb1)
- (?\x895c . ?\xd7be)
- (?\x6b90 . ?\x1122)
- (?\xfd98 . ?\x7193)
- (?\xa679 . ?\x438e)
- (?\x49b4 . ?\x0821)
-
- (?\xf61e . ?\x2562)
- (?\xc040 . ?\xb340)
- (?\x265e . ?\x5a51)
- (?\xe9b6 . ?\xc7aa)
- (?\xd62f . ?\x105d)
- (?\x0244 . ?\x1453)
- (?\xd8a1 . ?\xe681)
- (?\xe7d3 . ?\xfbc8)
- (?\x21e1 . ?\xcde6)
- (?\xc337 . ?\x07d6)
- (?\xf4d5 . ?\x0d87)
- (?\x455a . ?\x14ed)
- (?\xa9e3 . ?\xe905)
- (?\xfcef . ?\xa3f8)
- (?\x676f . ?\x02d9)
- (?\x8d2a . ?\x4c8a)
-
- (?\xfffa . ?\x3942)
- (?\x8771 . ?\xf681)
- (?\x6d9d . ?\x6122)
- (?\xfde5 . ?\x380c)
- (?\xa4be . ?\xea44)
- (?\x4bde . ?\xcfa9)
- (?\xf6bb . ?\x4b60)
- (?\xbebf . ?\xbc70)
- (?\x289b . ?\x7ec6)
- (?\xeaa1 . ?\x27fa)
- (?\xd4ef . ?\x3085)
- (?\x0488 . ?\x1d05)
- (?\xd9d4 . ?\xd039)
- (?\xe6db . ?\x99e5)
- (?\x1fa2 . ?\x7cf8)
- (?\xc4ac . ?\x5665)
-
- (?\xf429 . ?\x2244)
- (?\x432a . ?\xff97)
- (?\xab94 . ?\x23a7)
- (?\xfc93 . ?\xa039)
- (?\x655b . ?\x59c3)
- (?\x8f0c . ?\xcc92)
- (?\xffef . ?\xf47d)
- (?\x8584 . ?\x5dd1)
- (?\x6fa8 . ?\x7e4f)
- (?\xfe2c . ?\xe6e0)
- (?\xa301 . ?\x4314)
- (?\x4e08 . ?\x11a1)
- (?\xf753 . ?\x7e82)
- (?\xbd3a . ?\xf235)
- (?\x2ad7 . ?\xd2bb)
- (?\xeb86 . ?\xd391)])
+ [(#xd76a . #xa478)
+ (#xe8c7 . #xb756)
+ (#x2420 . #x70db)
+ (#xc1bd . #xceee)
+ (#xf57c . #x0faf)
+ (#x4787 . #xc62a)
+ (#xa830 . #x4613)
+ (#xfd46 . #x9501)
+ (#x6980 . #x98d8)
+ (#x8b44 . #xf7af)
+ (#xffff . #x5bb1)
+ (#x895c . #xd7be)
+ (#x6b90 . #x1122)
+ (#xfd98 . #x7193)
+ (#xa679 . #x438e)
+ (#x49b4 . #x0821)
+
+ (#xf61e . #x2562)
+ (#xc040 . #xb340)
+ (#x265e . #x5a51)
+ (#xe9b6 . #xc7aa)
+ (#xd62f . #x105d)
+ (#x0244 . #x1453)
+ (#xd8a1 . #xe681)
+ (#xe7d3 . #xfbc8)
+ (#x21e1 . #xcde6)
+ (#xc337 . #x07d6)
+ (#xf4d5 . #x0d87)
+ (#x455a . #x14ed)
+ (#xa9e3 . #xe905)
+ (#xfcef . #xa3f8)
+ (#x676f . #x02d9)
+ (#x8d2a . #x4c8a)
+
+ (#xfffa . #x3942)
+ (#x8771 . #xf681)
+ (#x6d9d . #x6122)
+ (#xfde5 . #x380c)
+ (#xa4be . #xea44)
+ (#x4bde . #xcfa9)
+ (#xf6bb . #x4b60)
+ (#xbebf . #xbc70)
+ (#x289b . #x7ec6)
+ (#xeaa1 . #x27fa)
+ (#xd4ef . #x3085)
+ (#x0488 . #x1d05)
+ (#xd9d4 . #xd039)
+ (#xe6db . #x99e5)
+ (#x1fa2 . #x7cf8)
+ (#xc4ac . #x5665)
+
+ (#xf429 . #x2244)
+ (#x432a . #xff97)
+ (#xab94 . #x23a7)
+ (#xfc93 . #xa039)
+ (#x655b . #x59c3)
+ (#x8f0c . #xcc92)
+ (#xffef . #xf47d)
+ (#x8584 . #x5dd1)
+ (#x6fa8 . #x7e4f)
+ (#xfe2c . #xe6e0)
+ (#xa301 . #x4314)
+ (#x4e08 . #x11a1)
+ (#xf753 . #x7e82)
+ (#xbd3a . #xf235)
+ (#x2ad7 . #xd2bb)
+ (#xeb86 . #xd391)])
(eval-and-compile
(defun md5-rewrite (fun w x y z vec-idx shift)
@@ -227,10 +227,10 @@
(defun md5-vector (vec)
;; initialize the chaining variables
- (let ((a (cons ?\x6745 ?\x2301))
- (b (cons ?\xefcd ?\xab89))
- (c (cons ?\x98ba ?\xdcfe))
- (d (cons ?\x1032 ?\x5476))
+ (let ((a (cons #x6745 #x2301))
+ (b (cons #xefcd #xab89))
+ (c (cons #x98ba #xdcfe))
+ (d (cons #x1032 #x5476))
(v-offset 0))
(dotimes (count (/ (length vec) 16))
@@ -288,7 +288,7 @@
(incf v-offset 16))
;; swap back from LSB-first. i feel ill.
- (mapconcat #'(lambda (x) (format "%02x%02x" (logand ?\xff x) (ash x
-8)))
+ (mapconcat #'(lambda (x) (format "%02x%02x" (logand #xff x) (ash x
-8)))
(list (cdr a) (car a)
(cdr b) (car b)
(cdr c) (car c)
Index: xemacs-packages/ecrypto/rc16.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/ecrypto/rc16.el,v
retrieving revision 1.1
diff -u -u -r1.1 rc16.el
--- xemacs-packages/ecrypto/rc16.el 2002/06/13 18:22:11 1.1
+++ xemacs-packages/ecrypto/rc16.el 2008/07/16 20:51:54
@@ -61,7 +61,7 @@
temp1 temp2)
(while (< counter 65536)
(setq temp1 (aref state counter))
- (setq stateidx (logand ?\xffff (+ stateidx temp1 (aref key keyidx))))
+ (setq stateidx (logand #xffff (+ stateidx temp1 (aref key keyidx))))
(setq temp2 (aref state stateidx))
(aset state stateidx temp1)
(aset state counter temp2)
@@ -73,9 +73,9 @@
;; added by Ray. is this a good thing?
(defun rc16-mixin (context val)
(let* ((state (rc16-context-state context))
- (x (logand ?\xffff (1+ (rc16-context-x context))))
+ (x (logand #xffff (1+ (rc16-context-x context))))
(sx (aref state x))
- (y (logand ?\xffff
+ (y (logand #xffff
(logxor val
(+ sx (rc16-context-y context)))))
(sy (aref state y)))
@@ -88,15 +88,15 @@
;; return a random value
(defun rc16-short (context)
(let* ((state (rc16-context-state context))
- (x (logand ?\xffff (1+ (rc16-context-x context))))
+ (x (logand #xffff (1+ (rc16-context-x context))))
(sx (aref state x))
- (y (logand ?\xffff (+ sx (rc16-context-y context))))
+ (y (logand #xffff (+ sx (rc16-context-y context))))
(sy (aref state y)))
(rc16-context-set-x context x)
(rc16-context-set-y context y)
(aset state y sx)
(aset state x sy)
- (aref state (logand ?\xffff (+ sx sy)))))
+ (aref state (logand #xffff (+ sx sy)))))
(defun rc16-encrypt (context data)
(let* ((cipher (make-string (length data) 0))
Index: xemacs-packages/ecrypto/sha1-old.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/ecrypto/sha1-old.el,v
retrieving revision 1.1
diff -u -u -r1.1 sha1-old.el
--- xemacs-packages/ecrypto/sha1-old.el 2002/06/13 18:22:12 1.1
+++ xemacs-packages/ecrypto/sha1-old.el 2008/07/16 20:51:54
@@ -57,7 +57,7 @@
;; slightly hairier math when writing the length into len-string.
(dotimes (idx 4)
- (aset len-string (+ 4 idx) (logand ?\xff
+ (aset len-string (+ 4 idx) (logand #xff
(ash length (+ -21 (* 8 idx))))))
(sha1-vector
@@ -116,21 +116,21 @@
(let ((a (car val))
(b (cdr val)))
;; only three cases ever occur
- (cond ((= shift 1) (cons (logand ?\xffff (logior (ash a 1) (ash b -15)))
- (logand ?\xffff (logior (ash b 1) (ash a -15)))))
- ((= shift 5) (cons (logand ?\xffff (logior (ash a 5) (ash b -11)))
- (logand ?\xffff (logior (ash b 5) (ash a -11)))))
+ (cond ((= shift 1) (cons (logand #xffff (logior (ash a 1) (ash b -15)))
+ (logand #xffff (logior (ash b 1) (ash a -15)))))
+ ((= shift 5) (cons (logand #xffff (logior (ash a 5) (ash b -11)))
+ (logand #xffff (logior (ash b 5) (ash a -11)))))
;; shift = 30, which is a swap and a shift by 14
- (t (cons (logand ?\xffff (logior (ash b 14) (ash a -2)))
- (logand ?\xffff (logior (ash a 14) (ash b -2))))))))
+ (t (cons (logand #xffff (logior (ash b 14) (ash a -2)))
+ (logand #xffff (logior (ash a 14) (ash b -2))))))))
(defsubst sha1+ (&rest args)
;; since we only use 16 bits, there's enough room to just add
;; without carry checks for each add.
(let* ((lo (apply #'+ (mapcar #'cdr args)))
(hi (+ (ash lo -16) (apply #'+ (mapcar #'car args)))))
- (cons (logand ?\xffff hi)
- (logand ?\xffff lo))))
+ (cons (logand #xffff hi)
+ (logand #xffff lo))))
(defsubst sha1-logxor4 (a b c d)
(cons (logxor (car a) (car b) (car c) (car d))
@@ -156,11 +156,11 @@
(defun sha1-vector (vec)
;; initialize the chaining variables
- (let ((a (cons ?\x6745 ?\x2301))
- (b (cons ?\xefcd ?\xab89))
- (c (cons ?\x98ba ?\xdcfe))
- (d (cons ?\x1032 ?\x5476))
- (e (cons ?\xc3d2 ?\xe1f0))
+ (let ((a (cons #x6745 #x2301))
+ (b (cons #xefcd #xab89))
+ (c (cons #x98ba #xdcfe))
+ (d (cons #x1032 #x5476))
+ (e (cons #xc3d2 #xe1f0))
(w (make-vector 80 0))
(v-offset 0))
@@ -184,16 +184,16 @@
(dotimes (count 20)
;; (insert (format "%s %s %s %s %s\n"
;; a b c d e))
- (sha1-rewrite sha1-f1 '(?\x5a82 . ?\x7999)))
+ (sha1-rewrite sha1-f1 '(#x5a82 . #x7999)))
(dotimes (count 20)
- (sha1-rewrite sha1-f2&4 '(?\x6ed9 . ?\xeba1)))
+ (sha1-rewrite sha1-f2&4 '(#x6ed9 . #xeba1)))
(dotimes (count 20)
- (sha1-rewrite sha1-f3 '(?\x8f1b . ?\xbcdc)))
+ (sha1-rewrite sha1-f3 '(#x8f1b . #xbcdc)))
(dotimes (count 20)
- (sha1-rewrite sha1-f2&4 '(?\xca62 . ?\xc1d6)))
+ (sha1-rewrite sha1-f2&4 '(#xca62 . #xc1d6)))
(setq a (sha1+ AA a)
b (sha1+ BB b)
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghé, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches