Norbert Koch <nk(a)viteno.net> writes:
> Why Gnus is using a CCL coding system is something I'd really
like
> to know.
Simon might know something about. He was pretty actively committing
during the time this crash first occurred.
PGG (the OpenPGP interface) uses a CRC-24 function written in CCL when
it parses OpenPGP packets.
(define-ccl-program pgg-parse-crc24
'(1
((loop
(read r0) (r1 ^= r0) (r2 ^= 0)
(r5 = 0)
(loop
(r1 <<= 1)
(r1 += ((r2 >> 15) & 1))
(r2 <<= 1)
(if (r1 & 256)
((r1 ^= 390) (r2 ^= 19707)))
(if (r5 < 7)
((r5 += 1)
(repeat))))
(repeat)))))
(defun pgg-parse-crc24-string (string)
(let ((h (vector nil 183 1230 nil nil nil nil nil nil)))
(ccl-execute-on-string pgg-parse-crc24 h string)
(format "%c%c%c"
(logand (aref h 1) 255)
(logand (lsh (aref h 2) -8) 255)
(logand (aref h 2) 255)))))