;;; liece-q-ccl.el --- CTCP binary data quotation in CCL.
;; Copyright (C) 1998-2000 Daiki Ueno
;; Author: Daiki Ueno <firstname.lastname@example.org>
;; Created: 1999-01-31
;; Revised: 1999-01-31
;; Keywords: IRC, liece, CTCP
;; This file is part of Liece.
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; 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.
(require 'poem) ;char-int
(let ((i 0)
(while (< i 256)
(setq table (nconc table (list i))
i (1+ i)))
"Emacs CCL write command does not accept more than 2 arguments."
(write r0 r1 r2)))
(r0 == ?\\)
(r1 == ?\\)
((= r1 (char-int ?a))
((= r1 (char-int ?n))
((= r1 (char-int ?r))
`(write r0 r1)))))
((= r0 (char-int ?\\))
((= r0 (char-int ?\x01))
((= r0 (char-int ?\n))
((= r0 (char-int ?\r))
'liece-quote-ccl-cs ?Q "CTCP Quote Decoder/Encoder"
(defun liece-quote-ccl-decode-string (string-to-decode)
(decode-coding-string string-to-decode 'liece-quote-ccl-cs))
(defun liece-quote-ccl-encode-string (string-to-encode)
(encode-coding-string string-to-encode 'liece-quote-ccl-cs))
(defun liece-quote-ccl-decode-region (min max)
(decode-coding-region min max 'liece-quote-ccl-cs))
(defun liece-quote-ccl-encode-region (min max)
(encode-coding-region min max 'liece-quote-ccl-cs))
(defalias 'liece-quote-decode-string 'liece-quote-ccl-decode-string)
(defalias 'liece-quote-encode-string 'liece-quote-ccl-encode-string)
(defalias 'liece-quote-decode-region 'liece-quote-ccl-decode-region)
(defalias 'liece-quote-encode-region 'liece-quote-ccl-encode-region)
;;; liece-q-ccl.el ends here