From: akr Date: Wed, 26 Aug 1998 03:24:16 +0000 (+0000) Subject: * ew-bq.el (ew-ccl-untrusted-eof-block): Check by coding system instead X-Git-Tag: doodle-1_9_2~14 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=543a5e40879b374b079af9afe9393749cbcbfe4b;p=elisp%2Fflim.git * ew-bq.el (ew-ccl-untrusted-eof-block): Check by coding system instead of CCL directly. --- diff --git a/ChangeLog b/ChangeLog index 6fc0f56..7956500 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 1998-08-25 Tanaka Akira + * ew-bq.el (ew-ccl-untrusted-eof-block): Check by coding system instead + of CCL directly. + +1998-08-25 Tanaka Akira + * ew-bq.el (ew-ccl-decode-b): Eliminate `>8=' before `write'. 1998-08-25 Tanaka Akira diff --git a/ew-bq.el b/ew-bq.el index 3bd4a79..bf2f3dd 100644 --- a/ew-bq.el +++ b/ew-bq.el @@ -5,35 +5,37 @@ ;;; +(eval-and-compile (defvar ew-ccl-use-symbol (eval-when-compile - (define-ccl-program ew-ccl-identity + (define-ccl-program ew-ccl-identity-program '(1 ((read r0) (loop (write-read-repeat r0))))) (condition-case nil (progn (make-coding-system 'ew-ccl-identity 4 ?I "Identity coding system for byte-compile time checking" - '(ew-ccl-identity . ew-ccl-identity)) + '(ew-ccl-identity-program . ew-ccl-identity-program)) t) (error nil)))) +) -(defvar ew-ccl-untrusted-eof-block - (eval-when-compile - (let ((status (make-vector 9 nil))) - (ccl-execute-on-string - (ccl-compile - '(0 (read r0) (r0 = 1))) - status - "") - (= (aref status 0) 0)))) - +(eval-and-compile (defun ew-make-ccl-coding-system (coding-system mnemonic doc-string decoder encoder) (make-coding-system coding-system 4 mnemonic doc-string (if ew-ccl-use-symbol (cons decoder encoder) (cons (symbol-value decoder) (symbol-value encoder))))) +) + +(defvar ew-ccl-untrusted-eof-block + (eval-when-compile + (define-ccl-program ew-ccl-eof-checker-program '(1 (read r0) (write "[EOF]"))) + (ew-make-ccl-coding-system + 'ew-ccl-eof-checker ?E "coding system for checking CCL_EOF_BLOCK when byte-compile time." + 'ew-ccl-eof-checker-program 'ew-ccl-eof-checker-program) + (not (equal (encode-coding-string "" 'ew-ccl-eof-checker) "[EOF]")))) ;;;