]> git.pld-linux.org Git - packages/vim.git/blob - 6.2.150
- removed conflict with 6.2.259
[packages/vim.git] / 6.2.150
1 To: vim-dev@vim.org
2 Subject: Patch 6.2.150
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 6.2.150
11 Problem:    When doing "vim - < file" lines are broken at NUL chars.
12             (Daniel Goujot)
13 Solution:   Change NL characters back to NUL when reading from the temp
14             buffer.
15 Files:      src/fileio.c
16
17
18 *** ../vim-6.2.149/src/fileio.c Sun Nov  9 20:20:26 2003
19 --- src/fileio.c        Mon Nov 10 10:14:19 2003
20 ***************
21 *** 1091,1097 ****
22                         size = 0;
23                     else
24                     {
25 !                       int     n;
26                         long    tlen;
27   
28                         tlen = 0;
29 --- 1091,1097 ----
30                         size = 0;
31                     else
32                     {
33 !                       int     n, ni;
34                         long    tlen;
35   
36                         tlen = 0;
37 ***************
38 *** 1101,1117 ****
39                             n = (int)STRLEN(p);
40                             if ((int)tlen + n + 1 > size)
41                             {
42 !                               /* Filled up to "size", append partial line. */
43                                 n = size - tlen;
44 !                               mch_memmove(ptr + tlen, p, (size_t)n);
45                                 read_buf_col += n;
46                                 break;
47                             }
48                             else
49                             {
50 !                               /* Append whole line and new-line. */
51 !                               mch_memmove(ptr + tlen, p, (size_t)n);
52 !                               tlen += n;
53                                 ptr[tlen++] = NL;
54                                 read_buf_col = 0;
55                                 if (++read_buf_lnum > from)
56 --- 1101,1131 ----
57                             n = (int)STRLEN(p);
58                             if ((int)tlen + n + 1 > size)
59                             {
60 !                               /* Filled up to "size", append partial line.
61 !                                * Change NL to NUL to reverse the effect done
62 !                                * below. */
63                                 n = size - tlen;
64 !                               for (ni = 0; ni < n; ++ni)
65 !                               {
66 !                                   if (p[ni] == NL)
67 !                                       ptr[tlen++] = NUL;
68 !                                   else
69 !                                       ptr[tlen++] = p[ni];
70 !                               }
71                                 read_buf_col += n;
72                                 break;
73                             }
74                             else
75                             {
76 !                               /* Append whole line and new-line.  Change NL
77 !                                * to NUL to reverse the effect done below. */
78 !                               for (ni = 0; ni < n; ++ni)
79 !                               {
80 !                                   if (p[ni] == NL)
81 !                                       ptr[tlen++] = NUL;
82 !                                   else
83 !                                       ptr[tlen++] = p[ni];
84 !                               }
85                                 ptr[tlen++] = NL;
86                                 read_buf_col = 0;
87                                 if (++read_buf_lnum > from)
88 *** ../vim-6.2.149/src/version.c        Sun Nov  9 20:35:08 2003
89 --- src/version.c       Wed Nov 12 20:38:53 2003
90 ***************
91 *** 639,640 ****
92 --- 639,642 ----
93   {   /* Add new patch number below this line */
94 + /**/
95 +     150,
96   /**/
97
98 -- 
99 hundred-and-one symptoms of being an internet addict:
100 6. You refuse to go to a vacation spot with no electricity and no phone lines.
101
102  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
103 ///          Creator of Vim - Vi IMproved -- http://www.Vim.org          \\\
104 \\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
105  \\\  Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html  ///
This page took 0.035495 seconds and 3 git commands to generate.