emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/coding.c


From: Kenichi Handa
Subject: [Emacs-diffs] Changes to emacs/src/coding.c
Date: Mon, 07 Oct 2002 20:58:00 -0400

Index: emacs/src/coding.c
diff -c emacs/src/coding.c:1.259 emacs/src/coding.c:1.260
*** emacs/src/coding.c:1.259    Mon Sep 30 02:28:31 2002
--- emacs/src/coding.c  Mon Oct  7 20:57:59 2002
***************
*** 5696,5704 ****
                REQUIRE + LEN_BYTE = LEN_BYTE * (NEW / ORIG)
                REQUIRE = LEN_BYTE * (NEW - ORIG) / ORIG
             Here, we are sure that NEW >= ORIG.  */
!         float ratio = coding->produced - coding->consumed;
!         ratio /= coding->consumed;
!         require = len_byte * ratio;
          first = 0;
        }
        if ((src - dst) < (require + 2000))
--- 5696,5714 ----
                REQUIRE + LEN_BYTE = LEN_BYTE * (NEW / ORIG)
                REQUIRE = LEN_BYTE * (NEW - ORIG) / ORIG
             Here, we are sure that NEW >= ORIG.  */
!         float ratio;
! 
!         if (coding->produced <= coding->consumed)
!           {
!             /* This happens because of CCL-based coding system with
!                eol-type CRLF.  */
!             require = 0;
!           }
!         else
!           {
!             ratio = (coding->produced - coding->consumed) / coding->consumed;
!             require = len_byte * ratio;
!           }
          first = 0;
        }
        if ((src - dst) < (require + 2000))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]