home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / unix / emacs / src / fileio.dif < prev    next >
Encoding:
Text File  |  1992-05-16  |  2.7 KB  |  83 lines

  1. 
  2. From emx-list@mail.physics.utah.edu Tue May 12 20:31:28 1992
  3. Received: from tuminfo2.informatik.tu-muenchen.de ([131.159.0.81])
  4.      by hphalle0.informatik.tu-muenchen.de
  5.      with SMTP id <133699>; Tue, 12 May 92 20:31:24 +0100
  6. Received: from mail.physics.utah.edu ([128.110.200.44])
  7.      by tuminfo2.informatik.tu-muenchen.de
  8.      with SMTP id <16919>; Tue, 12 May 92 20:30:56 +0200
  9. Received: from localhost by mail.physics.utah.edu (AIX 3.1/UCB 5.61/4.03)
  10.           id AA07225; Tue, 12 May 92 12:29:11 -0600
  11. Date:    Tue, 12 May 92 20:29:11 +0100
  12. Message-Id: <9204281046.AA19919@azu.informatik.uni-stuttgart.de>
  13. Comment: 
  14. Originator: emx-list@mail.physics.utah.edu
  15. Errors-To: gchunt@mail.physics.utah.edu
  16. Reply-To: <emx-list@mail.physics.utah.edu>
  17. Sender: emx-list@mail.physics.utah.edu
  18. Version: 5.41 -- Copyright (c) 1991/92, Anastasios Kotsikonas
  19. From:    Eberhard Mattes <mattes@azu.informatik.uni-stuttgart.de>
  20. To:    rommel@informatik.tu-muenchen.de
  21. Subject: Bug in my Emacs patches
  22. Status: RO
  23.  
  24. There's a bug in the GNU Emacs patches I put into the
  25. soft/incoming/pc/emacs-em directory of rusinfo.rus.uni-stuttgart.de.
  26. The bug causes CR/LF pairs which are on a 64 KB boundary in an input
  27. file to be translated to CR instead of LF. Here's a patch:
  28.  
  29. *** fileio.c~    Sun Apr 19 17:47:06 1992
  30. --- fileio.c    Sat Apr 25 11:02:46 1992
  31. ***************
  32. *** 1752,1773 ****
  33.         break;
  34.       }
  35.   #ifdef OS2
  36. !       else            /* cr/lf -> lf */
  37. !     {
  38. !       crlf_ptr = &FETCH_CHAR (point + inserted - 1) + 1;
  39. !       crlf_dst = crlf_src = 0;
  40. !       if (this > 0 && cr_flag && crlf_ptr[0] == '\n')
  41. !         ++crlf_src;
  42. !       while (crlf_src < this)
  43. !         {
  44. !           if (crlf_ptr[crlf_src] == '\r' && crlf_src + 1 < this
  45. !           && crlf_ptr[crlf_src + 1] == '\n')
  46. !         ++crlf_src;
  47. !           crlf_ptr[crlf_dst++] = crlf_ptr[crlf_src++];
  48. !         }
  49. !       cr_flag =  (crlf_ptr[this-1] == '\r');
  50. !       this -= crlf_src - crlf_dst;
  51. !     }
  52.   #endif
  53.   
  54.         GPT += this;
  55. --- 1752,1774 ----
  56.         break;
  57.       }
  58.   #ifdef OS2
  59. !       /* CR/LF -> LF */
  60. !       crlf_ptr = &FETCH_CHAR (point + inserted - 1) + 1;
  61. !       crlf_dst = crlf_src = 0;
  62. !       if (cr_flag && crlf_ptr[0] == '\n')
  63. !           {
  64. !           ++crlf_src;
  65. !           crlf_ptr[-1] = '\n';  /* replace CR with LF */
  66. !           }
  67. !       while (crlf_src < this)
  68. !           {
  69. !           if (crlf_ptr[crlf_src] == '\r' && crlf_src + 1 < this
  70. !               && crlf_ptr[crlf_src + 1] == '\n')
  71. !               ++crlf_src;
  72. !           crlf_ptr[crlf_dst++] = crlf_ptr[crlf_src++];
  73. !           }
  74. !       cr_flag =  (crlf_ptr[this-1] == '\r');
  75. !       this -= crlf_src - crlf_dst;
  76.   #endif
  77.   
  78.         GPT += this;
  79.  
  80. Eberhard Mattes (mattes@azu.informatik.uni-stuttgart.de)
  81.  
  82.  
  83.