From: yamaoka Date: Thu, 4 Feb 1999 04:56:36 +0000 (+0000) Subject: * poem-om.el (poem-ccl-decode-raw-text): Rewrite for fixing a bug that the last X-Git-Tag: apel-mcs-2-9_12_1~1 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=9f05c05e37ffee1c470895758074598434c98a9b;p=elisp%2Fapel.git * 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'. --- diff --git a/ChangeLog b/ChangeLog index 56faf26..fda6293 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'. + 1999-01-26 MORIOKA Tomohiko * mcs-20.el (mime-charset-to-coding-system-default-method): New 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.")