From 85dc830e36bdfcac1945c9b9703420fec8c30a29 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Thu, 4 Feb 1999 04:54:55 +0000 Subject: [PATCH] * poem-om.el (poem-ccl-decode-raw-text): Rewrite for fixing a bug that the last datum will be missed if the input data is not ended with `CRLF'. (poem-ccl-encode-raw-text-CRLF): Use `read-if'. --- ChangeLog | 9 ++++++++- poem-om.el | 31 ++++++++++++------------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7c2ae5b..af525af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +1999-02-04 Katsumi Yamaoka + + * poem-om.el (poem-ccl-decode-raw-text): Rewrite for fixing a bug + that the last datum will be missed if the input data is not ended + with `CRLF'. + (poem-ccl-encode-raw-text-CRLF): Use `read-if'. + 1998-12-24 MORIOKA Tomohiko * install.el (install-detect-elisp-directory): Avoid problem if @@ -1260,7 +1267,7 @@ * APEL: Version 8.4 was released. - * EMU-ELS: Don't use HIRAGANA LETTER A ($(B$"(B) to detect character + * EMU-ELS: Don't use HIRAGANA LETTER A ($B$"(B) to detect character indexing (Emacs 20.3 or later). 1998-04-20 MORIOKA Tomohiko diff --git a/poem-om.el b/poem-om.el index 7a6b335..5fcd560 100644 --- a/poem-om.el +++ b/poem-om.el @@ -1,6 +1,6 @@ ;;; poem-om.el --- poem implementation for Mule 1.* and Mule 2.* -;; Copyright (C) 1995,1996,1997,1998 Free Software Foundation, Inc. +;; Copyright (C) 1995-1999 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko ;; Katsumi Yamaoka @@ -51,20 +51,14 @@ (define-ccl-program poem-ccl-decode-raw-text '(1 - ((read r1 r0) - (loop - (r2 = (r1 == ?\x0d)) - (r2 &= (r0 == ?\x0a)) - (if r2 - ((write ?\x0a) - (read r1 r0) - (repeat)) - ((write r1) - (r1 = (r0 + 0)) - (read r0) - (repeat) - )))) - (write r1)) + (loop + (read-if (r0 == ?\x0d) + (read-if (r1 == ?\x0a) + (write r1) + ((write r0) + (write r1))) + (write r0)) + (repeat))) "Convert line-break code from CRLF to LF.") (define-ccl-program poem-ccl-encode-raw-text @@ -76,10 +70,9 @@ (define-ccl-program poem-ccl-encode-raw-text-CRLF '(2 ((loop - (read r0) - (if (r0 == ?\x0a) - (write "\x0d\x0a") - (write r0)) + (read-if (r0 == ?\x0a) + (write "\x0d\x0a") + (write r0)) (repeat)))) "Convert line-break code from LF to CRLF.") -- 1.7.10.4