* Sync up to flim-1_12_5 from flim-1_12_1.
[elisp/flim.git] / ew-bq.el
index 467918a..ec0e8fe 100644 (file)
--- a/ew-bq.el
+++ b/ew-bq.el
@@ -1,25 +1,14 @@
 (require 'emu)
 (require 'mel)
 
-(defvar ew-bq-use-mel (not (fboundp 'make-ccl-coding-system)))
+(defun ew-decode-q (string)
+  (if (equal string "")
+    ""
+    (encoded-text-decode-string string "Q")))
 
-(cond
- (ew-bq-use-mel
-  (defalias 'ew-decode-q 'q-encoding-decode-string)
-  (defalias 'ew-decode-b 'base64-decode-string))
- (t
-  (require 'ew-ccl)
-  (defun ew-decode-q (str)
-    (string-as-unibyte (decode-coding-string str 'ew-ccl-uq)))
-  (if base64-dl-module
-      (defalias 'ew-decode-b 'base64-decode-string)
-    (defun ew-decode-b (str)
-      (string-as-unibyte (decode-coding-string str 'ew-ccl-b))))))
+(defun ew-decode-b (string)
+  (if (equal string "")
+    ""
+    (encoded-text-decode-string string "B")))
 
 (provide 'ew-bq)
-
-;;;
-(defvar ew-bq-use-mel nil)
-
-(defun ew-encode-uq (str)
-  (encode-coding-string (string-as-unibyte str) 'ew-ccl-uq))