]> git.pld-linux.org Git - packages/vim.git/blob - 7.0.070
- updated to 1.15
[packages/vim.git] / 7.0.070
1 To: vim-dev@vim.org
2 Subject: Patch 7.0.070
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 7.0.070
11 Problem:    Compiler warnings for shadowed variables and uninitialized
12             variables.
13 Solution:   Rename variables such as "index", "msg" and "dup".  Initialize
14             variables.
15 Files:      src/edit.c, src/eval.c, src/ex_cmds.c, src/ex_cmds2.c,
16             src/ex_docmd.c, src/gui_beval.c, src/gui_gtk.c, src/gui_gtk_x11.c,
17             src/hardcopy.c, src/if_cscope.c, src/main.c, src/mbyte.c,
18             src/memline.c, src/netbeans.c, src/normal.c, src/option.c,
19             src/os_unix.c, src/quickfix.c, src/regexp.c, src/screen.c,
20             src/search.c, src/spell.c, src/ui.c, src/undo.c, src/window.c,
21             src/version.c
22
23
24 *** ../vim-7.0.069/src/edit.c   Tue Aug 29 16:33:23 2006
25 --- src/edit.c  Tue Aug 29 14:57:46 2006
26 ***************
27 *** 129,135 ****
28   
29   static void ins_ctrl_x __ARGS((void));
30   static int  has_compl_option __ARGS((int dict_opt));
31 ! static int ins_compl_add __ARGS((char_u *str, int len, int icase, char_u *fname, char_u **cptext, int cdir, int flags, int dup));
32   static int  ins_compl_equal __ARGS((compl_T *match, char_u *str, int len));
33   static void ins_compl_longest_match __ARGS((compl_T *match));
34   static void ins_compl_add_matches __ARGS((int num_matches, char_u **matches, int icase));
35 --- 129,135 ----
36   
37   static void ins_ctrl_x __ARGS((void));
38   static int  has_compl_option __ARGS((int dict_opt));
39 ! static int ins_compl_add __ARGS((char_u *str, int len, int icase, char_u *fname, char_u **cptext, int cdir, int flags, int adup));
40   static int  ins_compl_equal __ARGS((compl_T *match, char_u *str, int len));
41   static void ins_compl_longest_match __ARGS((compl_T *match));
42   static void ins_compl_add_matches __ARGS((int num_matches, char_u **matches, int icase));
43 ***************
44 *** 2118,2124 ****
45    * maybe because alloc() returns NULL, then FAIL is returned.
46    */
47       static int
48 ! ins_compl_add(str, len, icase, fname, cptext, cdir, flags, dup)
49       char_u    *str;
50       int               len;
51       int               icase;
52 --- 2118,2124 ----
53    * maybe because alloc() returns NULL, then FAIL is returned.
54    */
55       static int
56 ! ins_compl_add(str, len, icase, fname, cptext, cdir, flags, adup)
57       char_u    *str;
58       int               len;
59       int               icase;
60 ***************
61 *** 2126,2132 ****
62       char_u    **cptext;   /* extra text for popup menu or NULL */
63       int               cdir;
64       int               flags;
65 !     int               dup;        /* accept duplicate match */
66   {
67       compl_T   *match;
68       int               dir = (cdir == 0 ? compl_direction : cdir);
69 --- 2126,2132 ----
70       char_u    **cptext;   /* extra text for popup menu or NULL */
71       int               cdir;
72       int               flags;
73 !     int               adup;       /* accept duplicate match */
74   {
75       compl_T   *match;
76       int               dir = (cdir == 0 ? compl_direction : cdir);
77 ***************
78 *** 2140,2146 ****
79       /*
80        * If the same match is already present, don't add it.
81        */
82 !     if (compl_first_match != NULL && !dup)
83       {
84         match = compl_first_match;
85         do
86 --- 2140,2146 ----
87       /*
88        * If the same match is already present, don't add it.
89        */
90 !     if (compl_first_match != NULL && !adup)
91       {
92         match = compl_first_match;
93         do
94 ***************
95 *** 3608,3614 ****
96   {
97       char_u    *word;
98       int               icase = FALSE;
99 !     int               dup = FALSE;
100       char_u    *(cptext[CPT_COUNT]);
101   
102       if (tv->v_type == VAR_DICT && tv->vval.v_dict != NULL)
103 --- 3608,3614 ----
104   {
105       char_u    *word;
106       int               icase = FALSE;
107 !     int               adup = FALSE;
108       char_u    *(cptext[CPT_COUNT]);
109   
110       if (tv->v_type == VAR_DICT && tv->vval.v_dict != NULL)
111 ***************
112 *** 3625,3631 ****
113         if (get_dict_string(tv->vval.v_dict, (char_u *)"icase", FALSE) != NULL)
114             icase = get_dict_number(tv->vval.v_dict, (char_u *)"icase");
115         if (get_dict_string(tv->vval.v_dict, (char_u *)"dup", FALSE) != NULL)
116 !           dup = get_dict_number(tv->vval.v_dict, (char_u *)"dup");
117       }
118       else
119       {
120 --- 3625,3631 ----
121         if (get_dict_string(tv->vval.v_dict, (char_u *)"icase", FALSE) != NULL)
122             icase = get_dict_number(tv->vval.v_dict, (char_u *)"icase");
123         if (get_dict_string(tv->vval.v_dict, (char_u *)"dup", FALSE) != NULL)
124 !           adup = get_dict_number(tv->vval.v_dict, (char_u *)"dup");
125       }
126       else
127       {
128 ***************
129 *** 3634,3640 ****
130       }
131       if (word == NULL || *word == NUL)
132         return FAIL;
133 !     return ins_compl_add(word, -1, icase, NULL, cptext, dir, 0, dup);
134   }
135   #endif
136   
137 --- 3634,3640 ----
138       }
139       if (word == NULL || *word == NUL)
140         return FAIL;
141 !     return ins_compl_add(word, -1, icase, NULL, cptext, dir, 0, adup);
142   }
143   #endif
144   
145 *** ../vim-7.0.069/src/eval.c   Wed Aug 16 22:03:35 2006
146 --- src/eval.c  Thu Aug 24 22:00:09 2006
147 ***************
148 *** 454,460 ****
149   static char_u *deref_func_name __ARGS((char_u *name, int *lenp));
150   static int get_func_tv __ARGS((char_u *name, int len, typval_T *rettv, char_u **arg, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict));
151   static int call_func __ARGS((char_u *name, int len, typval_T *rettv, int argcount, typval_T *argvars, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict));
152 ! static void emsg_funcname __ARGS((char *msg, char_u *name));
153   
154   static void f_add __ARGS((typval_T *argvars, typval_T *rettv));
155   static void f_append __ARGS((typval_T *argvars, typval_T *rettv));
156 --- 454,460 ----
157   static char_u *deref_func_name __ARGS((char_u *name, int *lenp));
158   static int get_func_tv __ARGS((char_u *name, int len, typval_T *rettv, char_u **arg, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict));
159   static int call_func __ARGS((char_u *name, int len, typval_T *rettv, int argcount, typval_T *argvars, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict));
160 ! static void emsg_funcname __ARGS((char *ermsg, char_u *name));
161   
162   static void f_add __ARGS((typval_T *argvars, typval_T *rettv));
163   static void f_append __ARGS((typval_T *argvars, typval_T *rettv));
164 ***************
165 *** 2260,2266 ****
166             EMSG(_(e_letunexp));
167         else
168         {
169 !           char_u      *tofree = NULL;
170             char_u      *s;
171   
172             p = get_tv_string_chk(tv);
173 --- 2260,2266 ----
174             EMSG(_(e_letunexp));
175         else
176         {
177 !           char_u      *ptofree = NULL;
178             char_u      *s;
179   
180             p = get_tv_string_chk(tv);
181 ***************
182 *** 2269,2275 ****
183                 s = get_reg_contents(*arg == '@' ? '"' : *arg, TRUE, TRUE);
184                 if (s != NULL)
185                 {
186 !                   p = tofree = concat_str(s, p);
187                     vim_free(s);
188                 }
189             }
190 --- 2269,2275 ----
191                 s = get_reg_contents(*arg == '@' ? '"' : *arg, TRUE, TRUE);
192                 if (s != NULL)
193                 {
194 !                   p = ptofree = concat_str(s, p);
195                     vim_free(s);
196                 }
197             }
198 ***************
199 *** 2278,2284 ****
200                 write_reg_contents(*arg == '@' ? '"' : *arg, p, -1, FALSE);
201                 arg_end = arg + 1;
202             }
203 !           vim_free(tofree);
204         }
205       }
206   
207 --- 2278,2284 ----
208                 write_reg_contents(*arg == '@' ? '"' : *arg, p, -1, FALSE);
209                 arg_end = arg + 1;
210             }
211 !           vim_free(ptofree);
212         }
213       }
214   
215 ***************
216 *** 7595,7602 ****
217    * Give an error message with a function name.  Handle <SNR> things.
218    */
219       static void
220 ! emsg_funcname(msg, name)
221 !     char      *msg;
222       char_u    *name;
223   {
224       char_u    *p;
225 --- 7595,7602 ----
226    * Give an error message with a function name.  Handle <SNR> things.
227    */
228       static void
229 ! emsg_funcname(ermsg, name)
230 !     char      *ermsg;
231       char_u    *name;
232   {
233       char_u    *p;
234 ***************
235 *** 7605,7611 ****
236         p = concat_str((char_u *)"<SNR>", name + 3);
237       else
238         p = name;
239 !     EMSG2(_(msg), p);
240       if (p != name)
241         vim_free(p);
242   }
243 --- 7605,7611 ----
244         p = concat_str((char_u *)"<SNR>", name + 3);
245       else
246         p = name;
247 !     EMSG2(_(ermsg), p);
248       if (p != name)
249         vim_free(p);
250   }
251 ***************
252 *** 9179,9203 ****
253       typval_T  save_key;
254       int               rem;
255       int               todo;
256 !     char_u    *msg = map ? (char_u *)"map()" : (char_u *)"filter()";
257       int               save_did_emsg;
258   
259       rettv->vval.v_number = 0;
260       if (argvars[0].v_type == VAR_LIST)
261       {
262         if ((l = argvars[0].vval.v_list) == NULL
263 !               || (map && tv_check_lock(l->lv_lock, msg)))
264             return;
265       }
266       else if (argvars[0].v_type == VAR_DICT)
267       {
268         if ((d = argvars[0].vval.v_dict) == NULL
269 !               || (map && tv_check_lock(d->dv_lock, msg)))
270             return;
271       }
272       else
273       {
274 !       EMSG2(_(e_listdictarg), msg);
275         return;
276       }
277   
278 --- 9179,9203 ----
279       typval_T  save_key;
280       int               rem;
281       int               todo;
282 !     char_u    *ermsg = map ? (char_u *)"map()" : (char_u *)"filter()";
283       int               save_did_emsg;
284   
285       rettv->vval.v_number = 0;
286       if (argvars[0].v_type == VAR_LIST)
287       {
288         if ((l = argvars[0].vval.v_list) == NULL
289 !               || (map && tv_check_lock(l->lv_lock, ermsg)))
290             return;
291       }
292       else if (argvars[0].v_type == VAR_DICT)
293       {
294         if ((d = argvars[0].vval.v_dict) == NULL
295 !               || (map && tv_check_lock(d->dv_lock, ermsg)))
296             return;
297       }
298       else
299       {
300 !       EMSG2(_(e_listdictarg), ermsg);
301         return;
302       }
303   
304 ***************
305 *** 9229,9235 ****
306                 {
307                     --todo;
308                     di = HI2DI(hi);
309 !                   if (tv_check_lock(di->di_tv.v_lock, msg))
310                         break;
311                     vimvars[VV_KEY].vv_str = vim_strsave(di->di_key);
312                     if (filter_map_one(&di->di_tv, expr, map, &rem) == FAIL
313 --- 9229,9235 ----
314                 {
315                     --todo;
316                     di = HI2DI(hi);
317 !                   if (tv_check_lock(di->di_tv.v_lock, ermsg))
318                         break;
319                     vimvars[VV_KEY].vv_str = vim_strsave(di->di_key);
320                     if (filter_map_one(&di->di_tv, expr, map, &rem) == FAIL
321 ***************
322 *** 9248,9254 ****
323         {
324             for (li = l->lv_first; li != NULL; li = nli)
325             {
326 !               if (tv_check_lock(li->li_tv.v_lock, msg))
327                     break;
328                 nli = li->li_next;
329                 if (filter_map_one(&li->li_tv, expr, map, &rem) == FAIL
330 --- 9248,9254 ----
331         {
332             for (li = l->lv_first; li != NULL; li = nli)
333             {
334 !               if (tv_check_lock(li->li_tv.v_lock, ermsg))
335                     break;
336                 nli = li->li_next;
337                 if (filter_map_one(&li->li_tv, expr, map, &rem) == FAIL
338 ***************
339 *** 19789,19795 ****
340             if (p_verbose >= 14)
341             {
342                 char_u  buf[MSG_BUF_LEN];
343 !               char_u  numbuf[NUMBUFLEN];
344                 char_u  *tofree;
345   
346                 msg_puts((char_u *)"(");
347 --- 19789,19795 ----
348             if (p_verbose >= 14)
349             {
350                 char_u  buf[MSG_BUF_LEN];
351 !               char_u  numbuf2[NUMBUFLEN];
352                 char_u  *tofree;
353   
354                 msg_puts((char_u *)"(");
355 ***************
356 *** 19801,19808 ****
357                         msg_outnum((long)argvars[i].vval.v_number);
358                     else
359                     {
360 !                       trunc_string(tv2string(&argvars[i], &tofree, numbuf, 0),
361 !                                                           buf, MSG_BUF_CLEN);
362                         msg_puts(buf);
363                         vim_free(tofree);
364                     }
365 --- 19801,19808 ----
366                         msg_outnum((long)argvars[i].vval.v_number);
367                     else
368                     {
369 !                       trunc_string(tv2string(&argvars[i], &tofree,
370 !                                             numbuf2, 0), buf, MSG_BUF_CLEN);
371                         msg_puts(buf);
372                         vim_free(tofree);
373                     }
374 ***************
375 *** 19880,19892 ****
376         else
377         {
378             char_u      buf[MSG_BUF_LEN];
379 !           char_u      numbuf[NUMBUFLEN];
380             char_u      *tofree;
381   
382             /* The value may be very long.  Skip the middle part, so that we
383              * have some idea how it starts and ends. smsg() would always
384              * truncate it at the end. */
385 !           trunc_string(tv2string(fc.rettv, &tofree, numbuf, 0),
386                                                            buf, MSG_BUF_CLEN);
387             smsg((char_u *)_("%s returning %s"), sourcing_name, buf);
388             vim_free(tofree);
389 --- 19880,19892 ----
390         else
391         {
392             char_u      buf[MSG_BUF_LEN];
393 !           char_u      numbuf2[NUMBUFLEN];
394             char_u      *tofree;
395   
396             /* The value may be very long.  Skip the middle part, so that we
397              * have some idea how it starts and ends. smsg() would always
398              * truncate it at the end. */
399 !           trunc_string(tv2string(fc.rettv, &tofree, numbuf2, 0),
400                                                            buf, MSG_BUF_CLEN);
401             smsg((char_u *)_("%s returning %s"), sourcing_name, buf);
402             vim_free(tofree);
403 *** ../vim-7.0.069/src/ex_cmds.c        Sun Apr 23 00:33:23 2006
404 --- src/ex_cmds.c       Mon Aug 28 21:42:29 2006
405 ***************
406 *** 185,190 ****
407 --- 185,191 ----
408             new_indent = indent;
409         else
410         {
411 +           has_tab = FALSE;    /* avoid uninit warnings */
412             len = linelen(eap->cmdidx == CMD_right ? &has_tab
413                                                    : NULL) - get_indent();
414   
415 ***************
416 *** 1772,1781 ****
417                                 ? (st_old.st_mode & 0020)
418                                 : (st_old.st_mode & 0002))))
419         {
420 !           int tt;
421   
422             /* avoid a wait_return for this message, it's annoying */
423 -           tt = msg_didany;
424             EMSG2(_("E137: Viminfo file is not writable: %s"), fname);
425             msg_didany = tt;
426             fclose(fp_in);
427 --- 1773,1781 ----
428                                 ? (st_old.st_mode & 0020)
429                                 : (st_old.st_mode & 0002))))
430         {
431 !           int tt = msg_didany;
432   
433             /* avoid a wait_return for this message, it's annoying */
434             EMSG2(_("E137: Viminfo file is not writable: %s"), fname);
435             msg_didany = tt;
436             fclose(fp_in);
437 *** ../vim-7.0.069/src/ex_cmds2.c       Tue Apr 18 00:10:47 2006
438 --- src/ex_cmds2.c      Thu Aug 24 22:01:44 2006
439 ***************
440 *** 3648,3660 ****
441    * Return FALSE when not sourcing a file.
442    */
443       int
444 ! source_finished(getline, cookie)
445 !     char_u    *(*getline) __ARGS((int, void *, int));
446       void      *cookie;
447   {
448 !     return (getline_equal(getline, cookie, getsourceline)
449             && ((struct source_cookie *)getline_cookie(
450 !                                                getline, cookie))->finished);
451   }
452   #endif
453   
454 --- 3648,3660 ----
455    * Return FALSE when not sourcing a file.
456    */
457       int
458 ! source_finished(fgetline, cookie)
459 !     char_u    *(*fgetline) __ARGS((int, void *, int));
460       void      *cookie;
461   {
462 !     return (getline_equal(fgetline, cookie, getsourceline)
463             && ((struct source_cookie *)getline_cookie(
464 !                                               fgetline, cookie))->finished);
465   }
466   #endif
467   
468 *** ../vim-7.0.069/src/ex_docmd.c       Wed Aug 16 17:06:22 2006
469 --- src/ex_docmd.c      Thu Aug 24 22:03:17 2006
470 ***************
471 *** 58,66 ****
472   #endif
473   
474   #ifdef FEAT_EVAL
475 ! static char_u *do_one_cmd __ARGS((char_u **, int, struct condstack *, char_u *(*getline)(int, void *, int), void *cookie));
476   #else
477 ! static char_u *do_one_cmd __ARGS((char_u **, int, char_u *(*getline)(int, void *, int), void *cookie));
478   static int    if_level = 0;           /* depth in :if */
479   #endif
480   static char_u *find_command __ARGS((exarg_T *eap, int *full));
481 --- 58,66 ----
482   #endif
483   
484   #ifdef FEAT_EVAL
485 ! static char_u *do_one_cmd __ARGS((char_u **, int, struct condstack *, char_u *(*fgetline)(int, void *, int), void *cookie));
486   #else
487 ! static char_u *do_one_cmd __ARGS((char_u **, int, char_u *(*fgetline)(int, void *, int), void *cookie));
488   static int    if_level = 0;           /* depth in :if */
489   #endif
490   static char_u *find_command __ARGS((exarg_T *eap, int *full));
491 ***************
492 *** 831,840 ****
493   
494       /*
495        * If requested, store and reset the global values controlling the
496 !      * exception handling (used when debugging).
497        */
498       if (flags & DOCMD_EXCRESET)
499         save_dbg_stuff(&debug_saved);
500   
501       initial_trylevel = trylevel;
502   
503 --- 831,843 ----
504   
505       /*
506        * If requested, store and reset the global values controlling the
507 !      * exception handling (used when debugging).  Otherwise clear it to avoid
508 !      * a bogus compiler warning when the optimizer uses inline functions...
509        */
510       if (flags & DOCMD_EXCRESET)
511         save_dbg_stuff(&debug_saved);
512 +     else
513 +       memset(&debug_saved, 0, 1);
514   
515       initial_trylevel = trylevel;
516   
517 ***************
518 *** 1574,1597 ****
519   #endif
520   
521   /*
522 !  * If "getline" is get_loop_line(), return TRUE if the getline it uses equals
523 !  * "func".  * Otherwise return TRUE when "getline" equals "func".
524    */
525   /*ARGSUSED*/
526       int
527 ! getline_equal(getline, cookie, func)
528 !     char_u    *(*getline) __ARGS((int, void *, int));
529 !     void      *cookie;                /* argument for getline() */
530       char_u    *(*func) __ARGS((int, void *, int));
531   {
532   #ifdef FEAT_EVAL
533       char_u            *(*gp) __ARGS((int, void *, int));
534       struct loop_cookie *cp;
535   
536 !     /* When "getline" is "get_loop_line()" use the "cookie" to find the
537        * function that's orignally used to obtain the lines.  This may be nested
538        * several levels. */
539 !     gp = getline;
540       cp = (struct loop_cookie *)cookie;
541       while (gp == get_loop_line)
542       {
543 --- 1577,1600 ----
544   #endif
545   
546   /*
547 !  * If "fgetline" is get_loop_line(), return TRUE if the getline it uses equals
548 !  * "func".  * Otherwise return TRUE when "fgetline" equals "func".
549    */
550   /*ARGSUSED*/
551       int
552 ! getline_equal(fgetline, cookie, func)
553 !     char_u    *(*fgetline) __ARGS((int, void *, int));
554 !     void      *cookie;                /* argument for fgetline() */
555       char_u    *(*func) __ARGS((int, void *, int));
556   {
557   #ifdef FEAT_EVAL
558       char_u            *(*gp) __ARGS((int, void *, int));
559       struct loop_cookie *cp;
560   
561 !     /* When "fgetline" is "get_loop_line()" use the "cookie" to find the
562        * function that's orignally used to obtain the lines.  This may be nested
563        * several levels. */
564 !     gp = fgetline;
565       cp = (struct loop_cookie *)cookie;
566       while (gp == get_loop_line)
567       {
568 ***************
569 *** 1600,1628 ****
570       }
571       return gp == func;
572   #else
573 !     return getline == func;
574   #endif
575   }
576   
577   #if defined(FEAT_EVAL) || defined(FEAT_MBYTE) || defined(PROTO)
578   /*
579 !  * If "getline" is get_loop_line(), return the cookie used by the original
580    * getline function.  Otherwise return "cookie".
581    */
582   /*ARGSUSED*/
583       void *
584 ! getline_cookie(getline, cookie)
585 !     char_u    *(*getline) __ARGS((int, void *, int));
586 !     void      *cookie;                /* argument for getline() */
587   {
588   # ifdef FEAT_EVAL
589       char_u            *(*gp) __ARGS((int, void *, int));
590       struct loop_cookie *cp;
591   
592 !     /* When "getline" is "get_loop_line()" use the "cookie" to find the
593        * cookie that's orignally used to obtain the lines.  This may be nested
594        * several levels. */
595 !     gp = getline;
596       cp = (struct loop_cookie *)cookie;
597       while (gp == get_loop_line)
598       {
599 --- 1603,1631 ----
600       }
601       return gp == func;
602   #else
603 !     return fgetline == func;
604   #endif
605   }
606   
607   #if defined(FEAT_EVAL) || defined(FEAT_MBYTE) || defined(PROTO)
608   /*
609 !  * If "fgetline" is get_loop_line(), return the cookie used by the original
610    * getline function.  Otherwise return "cookie".
611    */
612   /*ARGSUSED*/
613       void *
614 ! getline_cookie(fgetline, cookie)
615 !     char_u    *(*fgetline) __ARGS((int, void *, int));
616 !     void      *cookie;                /* argument for fgetline() */
617   {
618   # ifdef FEAT_EVAL
619       char_u            *(*gp) __ARGS((int, void *, int));
620       struct loop_cookie *cp;
621   
622 !     /* When "fgetline" is "get_loop_line()" use the "cookie" to find the
623        * cookie that's orignally used to obtain the lines.  This may be nested
624        * several levels. */
625 !     gp = fgetline;
626       cp = (struct loop_cookie *)cookie;
627       while (gp == get_loop_line)
628       {
629 ***************
630 *** 1648,1654 ****
631    * 5. parse arguments
632    * 6. switch on command name
633    *
634 !  * Note: "getline" can be NULL.
635    *
636    * This function may be called recursively!
637    */
638 --- 1651,1657 ----
639    * 5. parse arguments
640    * 6. switch on command name
641    *
642 !  * Note: "fgetline" can be NULL.
643    *
644    * This function may be called recursively!
645    */
646 ***************
647 *** 1663,1676 ****
648   #ifdef FEAT_EVAL
649                             cstack,
650   #endif
651 !                                   getline, cookie)
652       char_u            **cmdlinep;
653       int                       sourcing;
654   #ifdef FEAT_EVAL
655       struct condstack  *cstack;
656   #endif
657 !     char_u            *(*getline) __ARGS((int, void *, int));
658 !     void              *cookie;                /* argument for getline() */
659   {
660       char_u            *p;
661       linenr_T          lnum;
662 --- 1666,1679 ----
663   #ifdef FEAT_EVAL
664                             cstack,
665   #endif
666 !                                   fgetline, cookie)
667       char_u            **cmdlinep;
668       int                       sourcing;
669   #ifdef FEAT_EVAL
670       struct condstack  *cstack;
671   #endif
672 !     char_u            *(*fgetline) __ARGS((int, void *, int));
673 !     void              *cookie;                /* argument for fgetline() */
674   {
675       char_u            *p;
676       linenr_T          lnum;
677 ***************
678 *** 1698,1704 ****
679       if (quitmore
680   #ifdef FEAT_EVAL
681             /* avoid that a function call in 'statusline' does this */
682 !           && !getline_equal(getline, cookie, get_func_line)
683   #endif
684             )
685         --quitmore;
686 --- 1701,1707 ----
687       if (quitmore
688   #ifdef FEAT_EVAL
689             /* avoid that a function call in 'statusline' does this */
690 !           && !getline_equal(fgetline, cookie, get_func_line)
691   #endif
692             )
693         --quitmore;
694 ***************
695 *** 1728,1735 ****
696   
697         /* in ex mode, an empty line works like :+ */
698         if (*ea.cmd == NUL && exmode_active
699 !                       && (getline_equal(getline, cookie, getexmodeline)
700 !                           || getline_equal(getline, cookie, getexline))
701                         && curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count)
702         {
703             ea.cmd = (char_u *)"+";
704 --- 1731,1738 ----
705   
706         /* in ex mode, an empty line works like :+ */
707         if (*ea.cmd == NUL && exmode_active
708 !                       && (getline_equal(fgetline, cookie, getexmodeline)
709 !                           || getline_equal(fgetline, cookie, getexline))
710                         && curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count)
711         {
712             ea.cmd = (char_u *)"+";
713 ***************
714 *** 1918,1926 ****
715       /* Count this line for profiling if ea.skip is FALSE. */
716       if (do_profiling == PROF_YES && !ea.skip)
717       {
718 !       if (getline_equal(getline, cookie, get_func_line))
719 !           func_line_exec(getline_cookie(getline, cookie));
720 !       else if (getline_equal(getline, cookie, getsourceline))
721             script_line_exec();
722       }
723   #endif
724 --- 1921,1929 ----
725       /* Count this line for profiling if ea.skip is FALSE. */
726       if (do_profiling == PROF_YES && !ea.skip)
727       {
728 !       if (getline_equal(fgetline, cookie, get_func_line))
729 !           func_line_exec(getline_cookie(fgetline, cookie));
730 !       else if (getline_equal(fgetline, cookie, getsourceline))
731             script_line_exec();
732       }
733   #endif
734 ***************
735 *** 2589,2595 ****
736    * The "ea" structure holds the arguments that can be used.
737    */
738       ea.cmdlinep = cmdlinep;
739 !     ea.getline = getline;
740       ea.cookie = cookie;
741   #ifdef FEAT_EVAL
742       ea.cstack = cstack;
743 --- 2592,2598 ----
744    * The "ea" structure holds the arguments that can be used.
745    */
746       ea.cmdlinep = cmdlinep;
747 !     ea.getline = fgetline;
748       ea.cookie = cookie;
749   #ifdef FEAT_EVAL
750       ea.cstack = cstack;
751 ***************
752 *** 2627,2635 ****
753         do_throw(cstack);
754       else if (check_cstack)
755       {
756 !       if (source_finished(getline, cookie))
757             do_finish(&ea, TRUE);
758 !       else if (getline_equal(getline, cookie, get_func_line)
759                                                    && current_func_returned())
760             do_return(&ea, TRUE, FALSE, NULL);
761       }
762 --- 2630,2638 ----
763         do_throw(cstack);
764       else if (check_cstack)
765       {
766 !       if (source_finished(fgetline, cookie))
767             do_finish(&ea, TRUE);
768 !       else if (getline_equal(fgetline, cookie, get_func_line)
769                                                    && current_func_returned())
770             do_return(&ea, TRUE, FALSE, NULL);
771       }
772 *** ../vim-7.0.069/src/gui_beval.c      Thu May  4 23:57:11 2006
773 --- src/gui_beval.c     Thu Aug 24 22:39:50 2006
774 ***************
775 *** 926,932 ****
776   #  define IS_NONPRINTABLE(c) (((c) < 0x20 && (c) != TAB && (c) != NL) \
777                               || (c) == DEL)
778       static void
779 ! set_printable_label_text(GtkLabel *label, char_u *msg)
780   {
781       char_u        *convbuf = NULL;
782       char_u        *buf;
783 --- 926,932 ----
784   #  define IS_NONPRINTABLE(c) (((c) < 0x20 && (c) != TAB && (c) != NL) \
785                               || (c) == DEL)
786       static void
787 ! set_printable_label_text(GtkLabel *label, char_u *text)
788   {
789       char_u        *convbuf = NULL;
790       char_u        *buf;
791 ***************
792 *** 940,953 ****
793       /* Convert to UTF-8 if it isn't already */
794       if (output_conv.vc_type != CONV_NONE)
795       {
796 !       convbuf = string_convert(&output_conv, msg, NULL);
797         if (convbuf != NULL)
798 !           msg = convbuf;
799       }
800   
801       /* First let's see how much we need to allocate */
802       len = 0;
803 !     for (p = msg; *p != NUL; p += charlen)
804       {
805         if ((*p & 0x80) == 0)   /* be quick for ASCII */
806         {
807 --- 940,953 ----
808       /* Convert to UTF-8 if it isn't already */
809       if (output_conv.vc_type != CONV_NONE)
810       {
811 !       convbuf = string_convert(&output_conv, text, NULL);
812         if (convbuf != NULL)
813 !           text = convbuf;
814       }
815   
816       /* First let's see how much we need to allocate */
817       len = 0;
818 !     for (p = text; *p != NUL; p += charlen)
819       {
820         if ((*p & 0x80) == 0)   /* be quick for ASCII */
821         {
822 ***************
823 *** 992,998 ****
824                                      (unsigned long)pixel, &color);
825   
826         pdest = buf;
827 !       p = msg;
828         while (*p != NUL)
829         {
830             /* Be quick for ASCII */
831 --- 992,998 ----
832                                      (unsigned long)pixel, &color);
833   
834         pdest = buf;
835 !       p = text;
836         while (*p != NUL)
837         {
838             /* Be quick for ASCII */
839 *** ../vim-7.0.069/src/gui_gtk.c        Fri May  5 23:13:49 2006
840 --- src/gui_gtk.c       Thu Aug 24 22:34:30 2006
841 ***************
842 *** 957,971 ****
843   get_menu_position(vimmenu_T *menu)
844   {
845       vimmenu_T *node;
846 !     int               index = 0;
847   
848       for (node = menu->parent->children; node != menu; node = node->next)
849       {
850         g_return_val_if_fail(node != NULL, -1);
851 !       ++index;
852       }
853   
854 !     return index;
855   }
856   #endif /* FEAT_TOOLBAR && HAVE_GTK2 */
857   
858 --- 957,971 ----
859   get_menu_position(vimmenu_T *menu)
860   {
861       vimmenu_T *node;
862 !     int               idx = 0;
863   
864       for (node = menu->parent->children; node != menu; node = node->next)
865       {
866         g_return_val_if_fail(node != NULL, -1);
867 !       ++idx;
868       }
869   
870 !     return idx;
871   }
872   #endif /* FEAT_TOOLBAR && HAVE_GTK2 */
873   
874 ***************
875 *** 2127,2133 ****
876       char    **ync;  /* "yes no cancel" */
877       char    **buttons;
878       int           n_buttons = 0;
879 !     int           index;
880   
881       button_string = vim_strsave(button_string); /* must be writable */
882       if (button_string == NULL)
883 --- 2128,2134 ----
884       char    **ync;  /* "yes no cancel" */
885       char    **buttons;
886       int           n_buttons = 0;
887 !     int           idx;
888   
889       button_string = vim_strsave(button_string); /* must be writable */
890       if (button_string == NULL)
891 ***************
892 *** 2161,2172 ****
893        * Well, apparently somebody changed his mind: with GTK 2.2.4 it works the
894        * other way around...
895        */
896 !     for (index = 1; index <= n_buttons; ++index)
897       {
898         char    *label;
899         char_u  *label8;
900   
901 !       label = buttons[index - 1];
902         /*
903          * Perform some guesswork to find appropriate stock items for the
904          * buttons.  We have to compare with a sample of the translated
905 --- 2162,2173 ----
906        * Well, apparently somebody changed his mind: with GTK 2.2.4 it works the
907        * other way around...
908        */
909 !     for (idx = 1; idx <= n_buttons; ++idx)
910       {
911         char    *label;
912         char_u  *label8;
913   
914 !       label = buttons[idx - 1];
915         /*
916          * Perform some guesswork to find appropriate stock items for the
917          * buttons.  We have to compare with a sample of the translated
918 ***************
919 *** 2188,2194 ****
920             else if (button_equal(label, "Cancel")) label = GTK_STOCK_CANCEL;
921         }
922         label8 = CONVERT_TO_UTF8((char_u *)label);
923 !       gtk_dialog_add_button(dialog, (const gchar *)label8, index);
924         CONVERT_TO_UTF8_FREE(label8);
925       }
926   
927 --- 2189,2195 ----
928             else if (button_equal(label, "Cancel")) label = GTK_STOCK_CANCEL;
929         }
930         label8 = CONVERT_TO_UTF8((char_u *)label);
931 !       gtk_dialog_add_button(dialog, (const gchar *)label8, idx);
932         CONVERT_TO_UTF8_FREE(label8);
933       }
934   
935 *** ../vim-7.0.069/src/gui_gtk_x11.c    Fri May  5 23:16:59 2006
936 --- src/gui_gtk_x11.c   Thu Aug 24 22:35:59 2006
937 ***************
938 *** 3233,3244 ****
939   on_select_tab(
940         GtkNotebook     *notebook,
941         GtkNotebookPage *page,
942 !       gint            index,
943         gpointer        data)
944   {
945       if (!ignore_tabline_evt)
946       {
947 !       if (send_tabline_event(index + 1) && gtk_main_level() > 0)
948             gtk_main_quit();
949       }
950   }
951 --- 3233,3244 ----
952   on_select_tab(
953         GtkNotebook     *notebook,
954         GtkNotebookPage *page,
955 !       gint            idx,
956         gpointer        data)
957   {
958       if (!ignore_tabline_evt)
959       {
960 !       if (send_tabline_event(idx + 1) && gtk_main_level() > 0)
961             gtk_main_quit();
962       }
963   }
964 ***************
965 *** 5303,5315 ****
966   # ifdef HAVE_GTK2
967       if (font != NOFONT)
968       {
969 !       char    *name = pango_font_description_to_string(font);
970   
971 !       if (name != NULL)
972         {
973 !           char_u      *s = vim_strsave((char_u *)name);
974   
975 !           g_free(name);
976             return s;
977         }
978       }
979 --- 5303,5315 ----
980   # ifdef HAVE_GTK2
981       if (font != NOFONT)
982       {
983 !       char    *pangoname = pango_font_description_to_string(font);
984   
985 !       if (pangoname != NULL)
986         {
987 !           char_u      *s = vim_strsave((char_u *)pangoname);
988   
989 !           g_free(pangoname);
990             return s;
991         }
992       }
993 ***************
994 *** 6241,6264 ****
995   {
996       GdkGCValues values;
997       GdkGC *invert_gc;
998 -     GdkColor foreground;
999 -     GdkColor background;
1000   
1001       if (gui.drawarea->window == NULL)
1002         return;
1003   
1004 !     foreground.pixel = gui.norm_pixel ^ gui.back_pixel;
1005 !     background.pixel = gui.norm_pixel ^ gui.back_pixel;
1006
1007 !     values.foreground = foreground;
1008 !     values.background = background;
1009       values.function = GDK_XOR;
1010       invert_gc = gdk_gc_new_with_values(gui.drawarea->window,
1011                                        &values,
1012                                        GDK_GC_FOREGROUND |
1013                                        GDK_GC_BACKGROUND |
1014                                        GDK_GC_FUNCTION);
1015 !     gdk_gc_set_exposures(invert_gc, gui.visibility != GDK_VISIBILITY_UNOBSCURED);
1016       gdk_draw_rectangle(gui.drawarea->window, invert_gc,
1017                        TRUE,
1018                        FILL_X(c), FILL_Y(r),
1019 --- 6241,6260 ----
1020   {
1021       GdkGCValues values;
1022       GdkGC *invert_gc;
1023   
1024       if (gui.drawarea->window == NULL)
1025         return;
1026   
1027 !     values.foreground.pixel = gui.norm_pixel ^ gui.back_pixel;
1028 !     values.background.pixel = gui.norm_pixel ^ gui.back_pixel;
1029       values.function = GDK_XOR;
1030       invert_gc = gdk_gc_new_with_values(gui.drawarea->window,
1031                                        &values,
1032                                        GDK_GC_FOREGROUND |
1033                                        GDK_GC_BACKGROUND |
1034                                        GDK_GC_FUNCTION);
1035 !     gdk_gc_set_exposures(invert_gc, gui.visibility !=
1036 !                                                  GDK_VISIBILITY_UNOBSCURED);
1037       gdk_draw_rectangle(gui.drawarea->window, invert_gc,
1038                        TRUE,
1039                        FILL_X(c), FILL_Y(r),
1040 *** ../vim-7.0.069/src/hardcopy.c       Thu May  4 23:53:57 2006
1041 --- src/hardcopy.c      Thu Aug 24 22:04:32 2006
1042 ***************
1043 *** 1794,1822 ****
1044       static int
1045   prt_resfile_next_line()
1046   {
1047 !     int     index;
1048   
1049       /* Move to start of next line and then find end of line */
1050 !     index = prt_resfile.line_end + 1;
1051 !     while (index < prt_resfile.len)
1052       {
1053 !       if (prt_resfile.buffer[index] != PSLF && prt_resfile.buffer[index]
1054 !                                                                       != PSCR)
1055             break;
1056 !       index++;
1057       }
1058 !     prt_resfile.line_start = index;
1059   
1060 !     while (index < prt_resfile.len)
1061       {
1062 !       if (prt_resfile.buffer[index] == PSLF || prt_resfile.buffer[index]
1063 !                                                                       == PSCR)
1064             break;
1065 !       index++;
1066       }
1067 !     prt_resfile.line_end = index;
1068   
1069 !     return (index < prt_resfile.len);
1070   }
1071   
1072       static int
1073 --- 1794,1820 ----
1074       static int
1075   prt_resfile_next_line()
1076   {
1077 !     int     idx;
1078   
1079       /* Move to start of next line and then find end of line */
1080 !     idx = prt_resfile.line_end + 1;
1081 !     while (idx < prt_resfile.len)
1082       {
1083 !       if (prt_resfile.buffer[idx] != PSLF && prt_resfile.buffer[idx] != PSCR)
1084             break;
1085 !       idx++;
1086       }
1087 !     prt_resfile.line_start = idx;
1088   
1089 !     while (idx < prt_resfile.len)
1090       {
1091 !       if (prt_resfile.buffer[idx] == PSLF || prt_resfile.buffer[idx] == PSCR)
1092             break;
1093 !       idx++;
1094       }
1095 !     prt_resfile.line_end = idx;
1096   
1097 !     return (idx < prt_resfile.len);
1098   }
1099   
1100       static int
1101 ***************
1102 *** 1837,1850 ****
1103   prt_resfile_skip_nonws(offset)
1104       int     offset;
1105   {
1106 !     int     index;
1107   
1108 !     index = prt_resfile.line_start + offset;
1109 !     while (index < prt_resfile.line_end)
1110       {
1111 !       if (isspace(prt_resfile.buffer[index]))
1112 !           return index - prt_resfile.line_start;
1113 !       index++;
1114       }
1115       return -1;
1116   }
1117 --- 1835,1848 ----
1118   prt_resfile_skip_nonws(offset)
1119       int     offset;
1120   {
1121 !     int     idx;
1122   
1123 !     idx = prt_resfile.line_start + offset;
1124 !     while (idx < prt_resfile.line_end)
1125       {
1126 !       if (isspace(prt_resfile.buffer[idx]))
1127 !           return idx - prt_resfile.line_start;
1128 !       idx++;
1129       }
1130       return -1;
1131   }
1132 ***************
1133 *** 1853,1866 ****
1134   prt_resfile_skip_ws(offset)
1135       int     offset;
1136   {
1137 !     int     index;
1138   
1139 !     index = prt_resfile.line_start + offset;
1140 !     while (index < prt_resfile.line_end)
1141       {
1142 !       if (!isspace(prt_resfile.buffer[index]))
1143 !           return index - prt_resfile.line_start;
1144 !       index++;
1145       }
1146       return -1;
1147   }
1148 --- 1851,1864 ----
1149   prt_resfile_skip_ws(offset)
1150       int     offset;
1151   {
1152 !     int     idx;
1153   
1154 !     idx = prt_resfile.line_start + offset;
1155 !     while (idx < prt_resfile.line_end)
1156       {
1157 !       if (!isspace(prt_resfile.buffer[idx]))
1158 !           return idx - prt_resfile.line_start;
1159 !       idx++;
1160       }
1161       return -1;
1162   }
1163 ***************
1164 *** 2478,2484 ****
1165       char_u    *p_encoding;
1166       struct prt_ps_encoding_S *p_mbenc;
1167       struct prt_ps_encoding_S *p_mbenc_first;
1168 !     struct prt_ps_charset_S  *p_mbchar;
1169   #endif
1170   
1171   #if 0
1172 --- 2476,2482 ----
1173       char_u    *p_encoding;
1174       struct prt_ps_encoding_S *p_mbenc;
1175       struct prt_ps_encoding_S *p_mbenc_first;
1176 !     struct prt_ps_charset_S  *p_mbchar = NULL;
1177   #endif
1178   
1179   #if 0
1180 ***************
1181 *** 2516,2522 ****
1182       if (!(props & ENC_8BIT) && ((*p_pmcs != NUL) || !(props & ENC_UNICODE)))
1183       {
1184         p_mbenc_first = NULL;
1185 -       p_mbchar = NULL;
1186         for (cmap = 0; cmap < NUM_ELEMENTS(prt_ps_mbfonts); cmap++)
1187             if (prt_match_encoding((char *)p_encoding, &prt_ps_mbfonts[cmap],
1188                                                                     &p_mbenc))
1189 --- 2514,2519 ----
1190 *** ../vim-7.0.069/src/if_cscope.c      Tue Apr 18 23:49:18 2006
1191 --- src/if_cscope.c     Sat Jul  8 22:34:46 2006
1192 ***************
1193 *** 989,996 ****
1194   {
1195       int i;
1196       char *cmd;
1197 !     char **matches, **contexts;
1198 !     int nummatches[CSCOPE_MAX_CONNECTIONS], totmatches, matched;
1199   #ifdef FEAT_QUICKFIX
1200       char cmdletter;
1201       char *qfpos;
1202 --- 989,995 ----
1203   {
1204       int i;
1205       char *cmd;
1206 !     int nummatches[CSCOPE_MAX_CONNECTIONS], totmatches;
1207   #ifdef FEAT_QUICKFIX
1208       char cmdletter;
1209       char *qfpos;
1210 ***************
1211 *** 1141,1146 ****
1212 --- 1140,1148 ----
1213       else
1214   #endif /* FEAT_QUICKFIX */
1215       {
1216 +       char **matches = NULL, **contexts = NULL;
1217 +       int matched = 0;
1218
1219         /* read output */
1220         cs_fill_results((char *)pat, totmatches, nummatches, &matches,
1221                                                          &contexts, &matched);
1222 *** ../vim-7.0.069/src/main.c   Tue Aug 15 21:42:17 2006
1223 --- src/main.c  Thu Aug 24 22:05:09 2006
1224 ***************
1225 *** 2285,2291 ****
1226       mparm_T   *parmp;
1227   {
1228   #ifdef FEAT_WINDOWS
1229 !     int               rewind;
1230       int               done = 0;
1231   
1232       /*
1233 --- 2285,2291 ----
1234       mparm_T   *parmp;
1235   {
1236   #ifdef FEAT_WINDOWS
1237 !     int               dorewind;
1238       int               done = 0;
1239   
1240       /*
1241 ***************
1242 *** 2342,2351 ****
1243         ++autocmd_no_leave;
1244   #endif
1245   #ifdef FEAT_WINDOWS
1246 !       rewind = TRUE;
1247         while (done++ < 1000)
1248         {
1249 !           if (rewind)
1250             {
1251                 if (parmp->window_layout == WIN_TABS)
1252                     goto_tabpage(1);
1253 --- 2342,2351 ----
1254         ++autocmd_no_leave;
1255   #endif
1256   #ifdef FEAT_WINDOWS
1257 !       dorewind = TRUE;
1258         while (done++ < 1000)
1259         {
1260 !           if (dorewind)
1261             {
1262                 if (parmp->window_layout == WIN_TABS)
1263                     goto_tabpage(1);
1264 ***************
1265 *** 2364,2370 ****
1266                     break;
1267                 curwin = curwin->w_next;
1268             }
1269 !           rewind = FALSE;
1270   #endif
1271             curbuf = curwin->w_buffer;
1272             if (curbuf->b_ml.ml_mfp == NULL)
1273 --- 2364,2370 ----
1274                     break;
1275                 curwin = curwin->w_next;
1276             }
1277 !           dorewind = FALSE;
1278   #endif
1279             curbuf = curwin->w_buffer;
1280             if (curbuf->b_ml.ml_mfp == NULL)
1281 ***************
1282 *** 2385,2391 ****
1283                 check_swap_exists_action();
1284   #endif
1285   #ifdef FEAT_AUTOCMD
1286 !               rewind = TRUE;          /* start again */
1287   #endif
1288             }
1289   #ifdef FEAT_WINDOWS
1290 --- 2385,2391 ----
1291                 check_swap_exists_action();
1292   #endif
1293   #ifdef FEAT_AUTOCMD
1294 !               dorewind = TRUE;                /* start again */
1295   #endif
1296             }
1297   #ifdef FEAT_WINDOWS
1298 *** ../vim-7.0.069/src/mbyte.c  Tue Aug 29 16:10:54 2006
1299 --- src/mbyte.c Tue Aug 29 14:41:45 2006
1300 ***************
1301 *** 3861,3873 ****
1302   
1303       if (preedit_string != NULL && attr_list != NULL)
1304       {
1305 !       int index;
1306   
1307         /* Get the byte index as used by PangoAttrIterator */
1308 !       for (index = 0; col > 0 && preedit_string[index] != '\0'; --col)
1309 !           index += utfc_ptr2len((char_u *)preedit_string + index);
1310   
1311 !       if (preedit_string[index] != '\0')
1312         {
1313             PangoAttrIterator   *iter;
1314             int                 start, end;
1315 --- 3861,3873 ----
1316   
1317       if (preedit_string != NULL && attr_list != NULL)
1318       {
1319 !       int idx;
1320   
1321         /* Get the byte index as used by PangoAttrIterator */
1322 !       for (idx = 0; col > 0 && preedit_string[idx] != '\0'; --col)
1323 !           idx += utfc_ptr2len((char_u *)preedit_string + idx);
1324   
1325 !       if (preedit_string[idx] != '\0')
1326         {
1327             PangoAttrIterator   *iter;
1328             int                 start, end;
1329 ***************
1330 *** 3880,3886 ****
1331             {
1332                 pango_attr_iterator_range(iter, &start, &end);
1333   
1334 !               if (index >= start && index < end)
1335                     char_attr |= translate_pango_attributes(iter);
1336             }
1337             while (pango_attr_iterator_next(iter));
1338 --- 3880,3886 ----
1339             {
1340                 pango_attr_iterator_range(iter, &start, &end);
1341   
1342 !               if (idx >= start && idx < end)
1343                     char_attr |= translate_pango_attributes(iter);
1344             }
1345             while (pango_attr_iterator_next(iter));
1346 *** ../vim-7.0.069/src/memline.c        Fri Apr 21 00:16:47 2006
1347 --- src/memline.c       Thu Aug 24 22:06:17 2006
1348 ***************
1349 *** 215,221 ****
1350   #define ML_FLUSH      0x02        /* flush locked block */
1351   #define ML_SIMPLE(x)  (x & 0x10)  /* DEL, INS or FIND */
1352   
1353 ! static void ml_upd_block0 __ARGS((buf_T *buf, int setfname));
1354   static void set_b0_fname __ARGS((ZERO_BL *, buf_T *buf));
1355   static void set_b0_dir_flag __ARGS((ZERO_BL *b0p, buf_T *buf));
1356   #ifdef FEAT_MBYTE
1357 --- 215,221 ----
1358   #define ML_FLUSH      0x02        /* flush locked block */
1359   #define ML_SIMPLE(x)  (x & 0x10)  /* DEL, INS or FIND */
1360   
1361 ! static void ml_upd_block0 __ARGS((buf_T *buf, int set_fname));
1362   static void set_b0_fname __ARGS((ZERO_BL *, buf_T *buf));
1363   static void set_b0_dir_flag __ARGS((ZERO_BL *b0p, buf_T *buf));
1364   #ifdef FEAT_MBYTE
1365 ***************
1366 *** 679,687 ****
1367    * Update the timestamp or the B0_SAME_DIR flag of the .swp file.
1368    */
1369       static void
1370 ! ml_upd_block0(buf, setfname)
1371       buf_T     *buf;
1372 !     int               setfname;
1373   {
1374       memfile_T *mfp;
1375       bhdr_T    *hp;
1376 --- 679,687 ----
1377    * Update the timestamp or the B0_SAME_DIR flag of the .swp file.
1378    */
1379       static void
1380 ! ml_upd_block0(buf, set_fname)
1381       buf_T     *buf;
1382 !     int               set_fname;
1383   {
1384       memfile_T *mfp;
1385       bhdr_T    *hp;
1386 ***************
1387 *** 695,701 ****
1388         EMSG(_("E304: ml_upd_block0(): Didn't get block 0??"));
1389       else
1390       {
1391 !       if (setfname)
1392             set_b0_fname(b0p, buf);
1393         else
1394             set_b0_dir_flag(b0p, buf);
1395 --- 695,701 ----
1396         EMSG(_("E304: ml_upd_block0(): Didn't get block 0??"));
1397       else
1398       {
1399 !       if (set_fname)
1400             set_b0_fname(b0p, buf);
1401         else
1402             set_b0_dir_flag(b0p, buf);
1403 *** ../vim-7.0.069/src/netbeans.c       Tue Aug  8 21:36:15 2006
1404 --- src/netbeans.c      Thu Aug 24 22:42:09 2006
1405 ***************
1406 *** 103,109 ****
1407   static int  inputHandler = -1;                /* simply ret.value of WSAAsyncSelect() */
1408   extern HWND s_hwnd;                   /* Gvim's Window handle */
1409   #endif
1410 ! static int cmdno;                     /* current command number for reply */
1411   static int haveConnection = FALSE;    /* socket is connected and
1412                                            initialization is done */
1413   #ifdef FEAT_GUI_MOTIF
1414 --- 103,109 ----
1415   static int  inputHandler = -1;                /* simply ret.value of WSAAsyncSelect() */
1416   extern HWND s_hwnd;                   /* Gvim's Window handle */
1417   #endif
1418 ! static int r_cmdno;                   /* current command number for reply */
1419   static int haveConnection = FALSE;    /* socket is connected and
1420                                            initialization is done */
1421   #ifdef FEAT_GUI_MOTIF
1422 ***************
1423 *** 832,842 ****
1424         return;
1425       }
1426   
1427 !     cmdno = strtol(q, &q, 10);
1428   
1429       q = (char *)skipwhite((char_u *)q);
1430   
1431 !     if (nb_do_cmd(bufno, (char_u *)verb, isfunc, cmdno, (char_u *)q) == FAIL)
1432       {
1433   #ifdef NBDEBUG
1434         /*
1435 --- 832,842 ----
1436         return;
1437       }
1438   
1439 !     r_cmdno = strtol(q, &q, 10);
1440   
1441       q = (char *)skipwhite((char_u *)q);
1442   
1443 !     if (nb_do_cmd(bufno, (char_u *)verb, isfunc, r_cmdno, (char_u *)q) == FAIL)
1444       {
1445   #ifdef NBDEBUG
1446         /*
1447 ***************
1448 *** 1008,1018 ****
1449         if (netbeansForcedQuit)
1450         {
1451             /* mark as unmodified so NetBeans won't put up dialog on "killed" */
1452 !           sprintf(buf, "%d:unmodified=%d\n", i, cmdno);
1453             nbdebug(("EVT: %s", buf));
1454             nb_send(buf, "netbeans_end");
1455         }
1456 !       sprintf(buf, "%d:killed=%d\n", i, cmdno);
1457         nbdebug(("EVT: %s", buf));
1458   /*    nb_send(buf, "netbeans_end");    avoid "write failed" messages */
1459         if (sd >= 0)
1460 --- 1008,1018 ----
1461         if (netbeansForcedQuit)
1462         {
1463             /* mark as unmodified so NetBeans won't put up dialog on "killed" */
1464 !           sprintf(buf, "%d:unmodified=%d\n", i, r_cmdno);
1465             nbdebug(("EVT: %s", buf));
1466             nb_send(buf, "netbeans_end");
1467         }
1468 !       sprintf(buf, "%d:killed=%d\n", i, r_cmdno);
1469         nbdebug(("EVT: %s", buf));
1470   /*    nb_send(buf, "netbeans_end");    avoid "write failed" messages */
1471         if (sd >= 0)
1472 ***************
1473 *** 2563,2569 ****
1474             if (p != NULL)
1475             {
1476                 vim_snprintf(buf, sizeof(buf),
1477 !                                      "0:balloonText=%d \"%s\"\n", cmdno, p);
1478                 vim_free(p);
1479             }
1480             nbdebug(("EVT: %s", buf));
1481 --- 2563,2569 ----
1482             if (p != NULL)
1483             {
1484                 vim_snprintf(buf, sizeof(buf),
1485 !                                      "0:balloonText=%d \"%s\"\n", r_cmdno, p);
1486                 vim_free(p);
1487             }
1488             nbdebug(("EVT: %s", buf));
1489 ***************
1490 *** 2617,2623 ****
1491   
1492       if (haveConnection)
1493       {
1494 !       sprintf(buf, "0:disconnect=%d\n", cmdno);
1495         nbdebug(("EVT: %s", buf));
1496         nb_send(buf, "netbeans_disconnect");
1497       }
1498 --- 2617,2623 ----
1499   
1500       if (haveConnection)
1501       {
1502 !       sprintf(buf, "0:disconnect=%d\n", r_cmdno);
1503         nbdebug(("EVT: %s", buf));
1504         nb_send(buf, "netbeans_disconnect");
1505       }
1506 ***************
1507 *** 2636,2642 ****
1508         return;
1509   
1510       sprintf(buf, "0:geometry=%d %d %d %d %d\n",
1511 !                   cmdno, (int)Columns, (int)Rows, new_x, new_y);
1512       /*nbdebug(("EVT: %s", buf)); happens too many times during a move */
1513       nb_send(buf, "netbeans_frame_moved");
1514   }
1515 --- 2636,2642 ----
1516         return;
1517   
1518       sprintf(buf, "0:geometry=%d %d %d %d %d\n",
1519 !                   r_cmdno, (int)Columns, (int)Rows, new_x, new_y);
1520       /*nbdebug(("EVT: %s", buf)); happens too many times during a move */
1521       nb_send(buf, "netbeans_frame_moved");
1522   }
1523 ***************
1524 *** 2745,2751 ****
1525       if (bufno <= 0)
1526         return;
1527   
1528 !     sprintf(buffer, "%d:killed=%d\n", bufno, cmdno);
1529   
1530       nbdebug(("EVT: %s", buffer));
1531   
1532 --- 2745,2751 ----
1533       if (bufno <= 0)
1534         return;
1535   
1536 !     sprintf(buffer, "%d:killed=%d\n", bufno, r_cmdno);
1537   
1538       nbdebug(("EVT: %s", buffer));
1539   
1540 ***************
1541 *** 2819,2825 ****
1542       if (p != NULL)
1543       {
1544         buf = alloc(128 + 2*newlen);
1545 !       sprintf((char *)buf, "%d:insert=%d %ld \"%s\"\n", bufno, cmdno, off, p);
1546         nbdebug(("EVT: %s", buf));
1547         nb_send((char *)buf, "netbeans_inserted");
1548         vim_free(p);
1549 --- 2819,2826 ----
1550       if (p != NULL)
1551       {
1552         buf = alloc(128 + 2*newlen);
1553 !       sprintf((char *)buf, "%d:insert=%d %ld \"%s\"\n",
1554 !                                                     bufno, r_cmdno, off, p);
1555         nbdebug(("EVT: %s", buf));
1556         nb_send((char *)buf, "netbeans_inserted");
1557         vim_free(p);
1558 ***************
1559 *** 2861,2867 ****
1560   
1561       off = pos2off(bufp, &pos);
1562   
1563 !     sprintf((char *)buf, "%d:remove=%d %ld %ld\n", bufno, cmdno, off, len);
1564       nbdebug(("EVT: %s", buf));
1565       nb_send((char *)buf, "netbeans_removed");
1566   }
1567 --- 2862,2868 ----
1568   
1569       off = pos2off(bufp, &pos);
1570   
1571 !     sprintf((char *)buf, "%d:remove=%d %ld %ld\n", bufno, r_cmdno, off, len);
1572       nbdebug(("EVT: %s", buf));
1573       nb_send((char *)buf, "netbeans_removed");
1574   }
1575 ***************
1576 *** 2886,2892 ****
1577   
1578       nbbuf->modified = 0;
1579   
1580 !     sprintf((char *)buf, "%d:unmodified=%d\n", bufno, cmdno);
1581       nbdebug(("EVT: %s", buf));
1582       nb_send((char *)buf, "netbeans_unmodified");
1583   #endif
1584 --- 2887,2893 ----
1585   
1586       nbbuf->modified = 0;
1587   
1588 !     sprintf((char *)buf, "%d:unmodified=%d\n", bufno, r_cmdno);
1589       nbdebug(("EVT: %s", buf));
1590       nb_send((char *)buf, "netbeans_unmodified");
1591   #endif
1592 ***************
1593 *** 2910,2920 ****
1594         long off = pos2off(curbuf, &curwin->w_cursor);
1595   
1596         /* sync the cursor position */
1597 !       sprintf(buf, "%d:newDotAndMark=%d %ld %ld\n", bufno, cmdno, off, off);
1598         nbdebug(("EVT: %s", buf));
1599         nb_send(buf, "netbeans_button_release[newDotAndMark]");
1600   
1601 !       sprintf(buf, "%d:buttonRelease=%d %d %ld %d\n", bufno, cmdno,
1602                                     button, (long)curwin->w_cursor.lnum, col);
1603         nbdebug(("EVT: %s", buf));
1604         nb_send(buf, "netbeans_button_release");
1605 --- 2911,2921 ----
1606         long off = pos2off(curbuf, &curwin->w_cursor);
1607   
1608         /* sync the cursor position */
1609 !       sprintf(buf, "%d:newDotAndMark=%d %ld %ld\n", bufno, r_cmdno, off, off);
1610         nbdebug(("EVT: %s", buf));
1611         nb_send(buf, "netbeans_button_release[newDotAndMark]");
1612   
1613 !       sprintf(buf, "%d:buttonRelease=%d %d %ld %d\n", bufno, r_cmdno,
1614                                     button, (long)curwin->w_cursor.lnum, col);
1615         nbdebug(("EVT: %s", buf));
1616         nb_send(buf, "netbeans_button_release");
1617 ***************
1618 *** 2975,2981 ****
1619   
1620       /* sync the cursor position */
1621       off = pos2off(curbuf, &curwin->w_cursor);
1622 !     sprintf(buf, "%d:newDotAndMark=%d %ld %ld\n", bufno, cmdno, off, off);
1623       nbdebug(("EVT: %s", buf));
1624       nb_send(buf, "netbeans_keycommand");
1625   
1626 --- 2976,2982 ----
1627   
1628       /* sync the cursor position */
1629       off = pos2off(curbuf, &curwin->w_cursor);
1630 !     sprintf(buf, "%d:newDotAndMark=%d %ld %ld\n", bufno, r_cmdno, off, off);
1631       nbdebug(("EVT: %s", buf));
1632       nb_send(buf, "netbeans_keycommand");
1633   
1634 ***************
1635 *** 2986,2998 ****
1636   
1637       /* now send keyCommand event */
1638       vim_snprintf(buf, sizeof(buf), "%d:keyCommand=%d \"%s\"\n",
1639 !                                                      bufno, cmdno, keyName);
1640       nbdebug(("EVT: %s", buf));
1641       nb_send(buf, "netbeans_keycommand");
1642   
1643       /* New: do both at once and include the lnum/col. */
1644       vim_snprintf(buf, sizeof(buf), "%d:keyAtPos=%d \"%s\" %ld %ld/%ld\n",
1645 !           bufno, cmdno, keyName,
1646                 off, (long)curwin->w_cursor.lnum, (long)curwin->w_cursor.col);
1647       nbdebug(("EVT: %s", buf));
1648       nb_send(buf, "netbeans_keycommand");
1649 --- 2987,2999 ----
1650   
1651       /* now send keyCommand event */
1652       vim_snprintf(buf, sizeof(buf), "%d:keyCommand=%d \"%s\"\n",
1653 !                                                    bufno, r_cmdno, keyName);
1654       nbdebug(("EVT: %s", buf));
1655       nb_send(buf, "netbeans_keycommand");
1656   
1657       /* New: do both at once and include the lnum/col. */
1658       vim_snprintf(buf, sizeof(buf), "%d:keyAtPos=%d \"%s\" %ld %ld/%ld\n",
1659 !           bufno, r_cmdno, keyName,
1660                 off, (long)curwin->w_cursor.lnum, (long)curwin->w_cursor.col);
1661       nbdebug(("EVT: %s", buf));
1662       nb_send(buf, "netbeans_keycommand");
1663 ***************
1664 *** 3015,3021 ****
1665   
1666       nbbuf->modified = 0;
1667   
1668 !     sprintf((char *)buf, "%d:save=%d\n", bufno, cmdno);
1669       nbdebug(("EVT: %s", buf));
1670       nb_send((char *)buf, "netbeans_save_buffer");
1671   }
1672 --- 3016,3022 ----
1673   
1674       nbbuf->modified = 0;
1675   
1676 !     sprintf((char *)buf, "%d:save=%d\n", bufno, r_cmdno);
1677       nbdebug(("EVT: %s", buf));
1678       nb_send((char *)buf, "netbeans_save_buffer");
1679   }
1680 ***************
1681 *** 3039,3045 ****
1682       if (nbbuf->insertDone)
1683         nbbuf->modified = 1;
1684   
1685 !     sprintf((char *)buf, "%d:remove=%d 0 -1\n", bufno, cmdno);
1686       nbdebug(("EVT(suppressed): %s", buf));
1687   /*     nb_send(buf, "netbeans_deleted_all_lines"); */
1688   }
1689 --- 3040,3046 ----
1690       if (nbbuf->insertDone)
1691         nbbuf->modified = 1;
1692   
1693 !     sprintf((char *)buf, "%d:remove=%d 0 -1\n", bufno, r_cmdno);
1694       nbdebug(("EVT(suppressed): %s", buf));
1695   /*     nb_send(buf, "netbeans_deleted_all_lines"); */
1696   }
1697 *** ../vim-7.0.069/src/normal.c Wed Aug 16 21:42:34 2006
1698 --- src/normal.c        Thu Aug 24 22:17:37 2006
1699 ***************
1700 *** 4127,4133 ****
1701       int               save_p_ws;
1702       int               save_p_scs;
1703       int               retval = OK;
1704 !     int               incl;
1705   
1706       if ((pat = alloc(len + 7)) == NULL)
1707         return FAIL;
1708 --- 4127,4133 ----
1709       int               save_p_ws;
1710       int               save_p_scs;
1711       int               retval = OK;
1712 !     int               incll;
1713   
1714       if ((pat = alloc(len + 7)) == NULL)
1715         return FAIL;
1716 ***************
1717 *** 4147,4153 ****
1718        * With "gd" Search back for the start of the current function, then go
1719        * back until a blank line.  If this fails go to line 1.
1720        */
1721 !     if (!locally || !findpar(&incl, BACKWARD, 1L, '{', FALSE))
1722       {
1723         setpcmark();                    /* Set in findpar() otherwise */
1724         curwin->w_cursor.lnum = 1;
1725 --- 4147,4153 ----
1726        * With "gd" Search back for the start of the current function, then go
1727        * back until a blank line.  If this fails go to line 1.
1728        */
1729 !     if (!locally || !findpar(&incll, BACKWARD, 1L, '{', FALSE))
1730       {
1731         setpcmark();                    /* Set in findpar() otherwise */
1732         curwin->w_cursor.lnum = 1;
1733 *** ../vim-7.0.069/src/option.c Tue Aug  8 16:30:51 2006
1734 --- src/option.c        Wed Aug 16 21:54:45 2006
1735 ***************
1736 *** 5268,5312 ****
1737       char_u    *s;
1738       char_u    **varp;
1739       int               both = (opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0;
1740   
1741 !     if (opt_idx == -1)                /* use name */
1742       {
1743 !       opt_idx = findoption(name);
1744 !       if (opt_idx < 0)        /* not found (should not happen) */
1745         {
1746             EMSG2(_(e_intern2), "set_string_option_direct()");
1747             return;
1748         }
1749       }
1750   
1751 !     if (options[opt_idx].var == NULL) /* can't set hidden option */
1752         return;
1753   
1754       s = vim_strsave(val);
1755       if (s != NULL)
1756       {
1757 !       varp = (char_u **)get_varp_scope(&(options[opt_idx]),
1758                                                both ? OPT_LOCAL : opt_flags);
1759 !       if ((opt_flags & OPT_FREE) && (options[opt_idx].flags & P_ALLOCED))
1760             free_string_option(*varp);
1761         *varp = s;
1762   
1763         /* For buffer/window local option may also set the global value. */
1764         if (both)
1765 !           set_string_option_global(opt_idx, varp);
1766   
1767 !       options[opt_idx].flags |= P_ALLOCED;
1768   
1769         /* When setting both values of a global option with a local value,
1770          * make the local value empty, so that the global value is used. */
1771 !       if (((int)options[opt_idx].indir & PV_BOTH) && both)
1772         {
1773             free_string_option(*varp);
1774             *varp = empty_option;
1775         }
1776   # ifdef FEAT_EVAL
1777         if (set_sid != SID_NONE)
1778 !           set_option_scriptID_idx(opt_idx, opt_flags,
1779                                         set_sid == 0 ? current_SID : set_sid);
1780   # endif
1781       }
1782 --- 5268,5313 ----
1783       char_u    *s;
1784       char_u    **varp;
1785       int               both = (opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0;
1786 +     int               idx = opt_idx;
1787   
1788 !     if (idx == -1)            /* use name */
1789       {
1790 !       idx = findoption(name);
1791 !       if (idx < 0)    /* not found (should not happen) */
1792         {
1793             EMSG2(_(e_intern2), "set_string_option_direct()");
1794             return;
1795         }
1796       }
1797   
1798 !     if (options[idx].var == NULL)     /* can't set hidden option */
1799         return;
1800   
1801       s = vim_strsave(val);
1802       if (s != NULL)
1803       {
1804 !       varp = (char_u **)get_varp_scope(&(options[idx]),
1805                                                both ? OPT_LOCAL : opt_flags);
1806 !       if ((opt_flags & OPT_FREE) && (options[idx].flags & P_ALLOCED))
1807             free_string_option(*varp);
1808         *varp = s;
1809   
1810         /* For buffer/window local option may also set the global value. */
1811         if (both)
1812 !           set_string_option_global(idx, varp);
1813   
1814 !       options[idx].flags |= P_ALLOCED;
1815   
1816         /* When setting both values of a global option with a local value,
1817          * make the local value empty, so that the global value is used. */
1818 !       if (((int)options[idx].indir & PV_BOTH) && both)
1819         {
1820             free_string_option(*varp);
1821             *varp = empty_option;
1822         }
1823   # ifdef FEAT_EVAL
1824         if (set_sid != SID_NONE)
1825 !           set_option_scriptID_idx(idx, opt_flags,
1826                                         set_sid == 0 ? current_SID : set_sid);
1827   # endif
1828       }
1829 *** ../vim-7.0.069/src/os_unix.c        Thu Jun 22 19:47:11 2006
1830 --- src/os_unix.c       Thu Aug 24 22:21:56 2006
1831 ***************
1832 *** 3934,3940 ****
1833                     {
1834                         linenr_T    lnum = curbuf->b_op_start.lnum;
1835                         int         written = 0;
1836 !                       char_u      *p = ml_get(lnum);
1837                         char_u      *s;
1838                         size_t      l;
1839   
1840 --- 3934,3940 ----
1841                     {
1842                         linenr_T    lnum = curbuf->b_op_start.lnum;
1843                         int         written = 0;
1844 !                       char_u      *lp = ml_get(lnum);
1845                         char_u      *s;
1846                         size_t      l;
1847   
1848 ***************
1849 *** 3942,3958 ****
1850                         close(fromshell_fd);
1851                         for (;;)
1852                         {
1853 !                           l = STRLEN(p + written);
1854                             if (l == 0)
1855                                 len = 0;
1856 !                           else if (p[written] == NL)
1857                                 /* NL -> NUL translation */
1858                                 len = write(toshell_fd, "", (size_t)1);
1859                             else
1860                             {
1861 !                               s = vim_strchr(p + written, NL);
1862 !                               len = write(toshell_fd, (char *)p + written,
1863 !                                          s == NULL ? l : s - (p + written));
1864                             }
1865                             if (len == l)
1866                             {
1867 --- 3942,3958 ----
1868                         close(fromshell_fd);
1869                         for (;;)
1870                         {
1871 !                           l = STRLEN(lp + written);
1872                             if (l == 0)
1873                                 len = 0;
1874 !                           else if (lp[written] == NL)
1875                                 /* NL -> NUL translation */
1876                                 len = write(toshell_fd, "", (size_t)1);
1877                             else
1878                             {
1879 !                               s = vim_strchr(lp + written, NL);
1880 !                               len = write(toshell_fd, (char *)lp + written,
1881 !                                          s == NULL ? l : s - (lp + written));
1882                             }
1883                             if (len == l)
1884                             {
1885 ***************
1886 *** 3973,3979 ****
1887                                     toshell_fd = -1;
1888                                     break;
1889                                 }
1890 !                               p = ml_get(lnum);
1891                                 written = 0;
1892                             }
1893                             else if (len > 0)
1894 --- 3973,3979 ----
1895                                     toshell_fd = -1;
1896                                     break;
1897                                 }
1898 !                               lp = ml_get(lnum);
1899                                 written = 0;
1900                             }
1901                             else if (len > 0)
1902 *** ../vim-7.0.069/src/quickfix.c       Wed Aug 16 19:34:59 2006
1903 --- src/quickfix.c      Thu Aug 24 22:23:31 2006
1904 ***************
1905 *** 500,507 ****
1906         {
1907             if (tv != NULL)
1908             {
1909 -               int len;
1910
1911                 if (tv->v_type == VAR_STRING)
1912                 {
1913                     /* Get the next line from the supplied string */
1914 --- 500,505 ----
1915 *** ../vim-7.0.069/src/regexp.c Sun Apr 30 20:38:22 2006
1916 --- src/regexp.c        Thu Aug 24 22:25:15 2006
1917 ***************
1918 *** 3912,3918 ****
1919                 {
1920                     colnr_T         start, end;
1921                     colnr_T         start2, end2;
1922 !                   colnr_T         col;
1923   
1924                     getvvcol(wp, &top, &start, NULL, &end);
1925                     getvvcol(wp, &bot, &start2, NULL, &end2);
1926 --- 3919,3925 ----
1927                 {
1928                     colnr_T         start, end;
1929                     colnr_T         start2, end2;
1930 !                   colnr_T         cols;
1931   
1932                     getvvcol(wp, &top, &start, NULL, &end);
1933                     getvvcol(wp, &bot, &start2, NULL, &end2);
1934 ***************
1935 *** 3922,3930 ****
1936                         end = end2;
1937                     if (top.col == MAXCOL || bot.col == MAXCOL)
1938                         end = MAXCOL;
1939 !                   col = win_linetabsize(wp,
1940                                       regline, (colnr_T)(reginput - regline));
1941 !                   if (col < start || col > end - (*p_sel == 'e'))
1942                         status = RA_NOMATCH;
1943                 }
1944             }
1945 --- 3929,3937 ----
1946                         end = end2;
1947                     if (top.col == MAXCOL || bot.col == MAXCOL)
1948                         end = MAXCOL;
1949 !                   cols = win_linetabsize(wp,
1950                                       regline, (colnr_T)(reginput - regline));
1951 !                   if (cols < start || cols > end - (*p_sel == 'e'))
1952                         status = RA_NOMATCH;
1953                 }
1954             }
1955 ***************
1956 *** 4253,4259 ****
1957             {
1958                 int     i, len;
1959                 char_u  *opnd;
1960 !               int     opndc, inpc;
1961   
1962                 opnd = OPERAND(scan);
1963                 /* Safety check (just in case 'encoding' was changed since
1964 --- 4260,4266 ----
1965             {
1966                 int     i, len;
1967                 char_u  *opnd;
1968 !               int     opndc = 0, inpc;
1969   
1970                 opnd = OPERAND(scan);
1971                 /* Safety check (just in case 'encoding' was changed since
1972 *** ../vim-7.0.069/src/screen.c Tue Jul 11 22:59:04 2006
1973 --- src/screen.c        Thu Aug 24 22:26:16 2006
1974 ***************
1975 *** 7099,7105 ****
1976       tabpage_T     *tp;
1977   #endif
1978       static int            entered = FALSE;            /* avoid recursiveness */
1979 !     static int            did_outofmem_msg = FALSE;   /* did outofmem message */
1980   
1981       /*
1982        * Allocation of the screen buffers is done only when the size changes and
1983 --- 7099,7105 ----
1984       tabpage_T     *tp;
1985   #endif
1986       static int            entered = FALSE;            /* avoid recursiveness */
1987 !     static int            done_outofmem_msg = FALSE;  /* did outofmem message */
1988   
1989       /*
1990        * Allocation of the screen buffers is done only when the size changes and
1991 ***************
1992 *** 7207,7220 ****
1993   #endif
1994             || outofmem)
1995       {
1996 !       if (ScreenLines != NULL || !did_outofmem_msg)
1997         {
1998             /* guess the size */
1999             do_outofmem_msg((long_u)((Rows + 1) * Columns));
2000   
2001             /* Remember we did this to avoid getting outofmem messages over
2002              * and over again. */
2003 !           did_outofmem_msg = TRUE;
2004         }
2005         vim_free(new_ScreenLines);
2006         new_ScreenLines = NULL;
2007 --- 7207,7220 ----
2008   #endif
2009             || outofmem)
2010       {
2011 !       if (ScreenLines != NULL || !done_outofmem_msg)
2012         {
2013             /* guess the size */
2014             do_outofmem_msg((long_u)((Rows + 1) * Columns));
2015   
2016             /* Remember we did this to avoid getting outofmem messages over
2017              * and over again. */
2018 !           done_outofmem_msg = TRUE;
2019         }
2020         vim_free(new_ScreenLines);
2021         new_ScreenLines = NULL;
2022 ***************
2023 *** 7242,7248 ****
2024       }
2025       else
2026       {
2027 !       did_outofmem_msg = FALSE;
2028   
2029         for (new_row = 0; new_row < Rows; ++new_row)
2030         {
2031 --- 7242,7248 ----
2032       }
2033       else
2034       {
2035 !       done_outofmem_msg = FALSE;
2036   
2037         for (new_row = 0; new_row < Rows; ++new_row)
2038         {
2039 *** ../vim-7.0.069/src/search.c Tue Aug 29 16:33:23 2006
2040 --- src/search.c        Tue Aug 29 14:56:15 2006
2041 ***************
2042 *** 4826,4840 ****
2043   
2044                 if ((compl_cont_status & CONT_ADDING) && i == compl_length)
2045                 {
2046 -                   /* get the next line */
2047                     /* IOSIZE > compl_length, so the STRNCPY works */
2048                     STRNCPY(IObuff, aux, i);
2049 !                   if (!(     depth < 0
2050 !                           && lnum < end_lnum
2051 !                           && (line = ml_get(++lnum)) != NULL)
2052 !                       && !(   depth >= 0
2053 !                           && !vim_fgets(line = file_line,
2054 !                                                    LSIZE, files[depth].fp)))
2055                         goto exit_matched;
2056   
2057                     /* we read a line, set "already" to check this "line" later
2058 --- 4826,4845 ----
2059   
2060                 if ((compl_cont_status & CONT_ADDING) && i == compl_length)
2061                 {
2062                     /* IOSIZE > compl_length, so the STRNCPY works */
2063                     STRNCPY(IObuff, aux, i);
2064
2065 !                   /* Get the next line: when "depth" < 0  from the current
2066 !                    * buffer, otherwise from the included file.  Jump to
2067 !                    * exit_matched when past the last line. */
2068 !                   if (depth < 0)
2069 !                   {
2070 !                       if (lnum >= end_lnum)
2071 !                           goto exit_matched;
2072 !                       line = ml_get(++lnum);
2073 !                   }
2074 !                   else if (vim_fgets(line = file_line,
2075 !                                                     LSIZE, files[depth].fp))
2076                         goto exit_matched;
2077   
2078                     /* we read a line, set "already" to check this "line" later
2079 *** ../vim-7.0.069/src/spell.c  Tue Aug 29 16:33:23 2006
2080 --- src/spell.c Tue Aug 29 14:56:26 2006
2081 ***************
2082 *** 2043,2050 ****
2083       int               len;
2084   # ifdef FEAT_SYN_HL
2085       int               has_syntax = syntax_present(wp->w_buffer);
2086 -     int               col;
2087   # endif
2088       int               can_spell;
2089       char_u    *buf = NULL;
2090       int               buflen = 0;
2091 --- 2043,2050 ----
2092       int               len;
2093   # ifdef FEAT_SYN_HL
2094       int               has_syntax = syntax_present(wp->w_buffer);
2095   # endif
2096 +     int               col;
2097       int               can_spell;
2098       char_u    *buf = NULL;
2099       int               buflen = 0;
2100 ***************
2101 *** 2093,2101 ****
2102             capcol = (int)(skipwhite(line) - line);
2103         else if (curline && wp == curwin)
2104         {
2105 -           int     col = (int)(skipwhite(line) - line);
2106
2107             /* For spellbadword(): check if first word needs a capital. */
2108             if (check_need_cap(lnum, col))
2109                 capcol = col;
2110   
2111 --- 2093,2100 ----
2112             capcol = (int)(skipwhite(line) - line);
2113         else if (curline && wp == curwin)
2114         {
2115             /* For spellbadword(): check if first word needs a capital. */
2116 +           col = (int)(skipwhite(line) - line);
2117             if (check_need_cap(lnum, col))
2118                 capcol = col;
2119   
2120 ***************
2121 *** 5061,5067 ****
2122       int               do_rep;
2123       int               do_repsal;
2124       int               do_sal;
2125 !     int               do_map;
2126       int               found_map = FALSE;
2127       hashitem_T        *hi;
2128       int               l;
2129 --- 5060,5066 ----
2130       int               do_rep;
2131       int               do_repsal;
2132       int               do_sal;
2133 !     int               do_mapline;
2134       int               found_map = FALSE;
2135       hashitem_T        *hi;
2136       int               l;
2137 ***************
2138 *** 5099,5105 ****
2139       do_sal = spin->si_sal.ga_len == 0;
2140   
2141       /* Only do MAP lines when not done in another .aff file already. */
2142 !     do_map = spin->si_map.ga_len == 0;
2143   
2144       /*
2145        * Allocate and init the afffile_T structure.
2146 --- 5098,5104 ----
2147       do_sal = spin->si_sal.ga_len == 0;
2148   
2149       /* Only do MAP lines when not done in another .aff file already. */
2150 !     do_mapline = spin->si_map.ga_len == 0;
2151   
2152       /*
2153        * Allocate and init the afffile_T structure.
2154 ***************
2155 *** 5781,5787 ****
2156                         smsg((char_u *)_("Expected MAP count in %s line %d"),
2157                                                                  fname, lnum);
2158                 }
2159 !               else if (do_map)
2160                 {
2161                     int         c;
2162   
2163 --- 5780,5786 ----
2164                         smsg((char_u *)_("Expected MAP count in %s line %d"),
2165                                                                  fname, lnum);
2166                 }
2167 !               else if (do_mapline)
2168                 {
2169                     int         c;
2170   
2171 ***************
2172 *** 7508,7514 ****
2173   {
2174       char_u    *p = p_msm;
2175       long      start = 0;
2176 !     long      inc = 0;
2177       long      added = 0;
2178   
2179       if (!VIM_ISDIGIT(*p))
2180 --- 7507,7513 ----
2181   {
2182       char_u    *p = p_msm;
2183       long      start = 0;
2184 !     long      incr = 0;
2185       long      added = 0;
2186   
2187       if (!VIM_ISDIGIT(*p))
2188 ***************
2189 *** 7520,7526 ****
2190       ++p;
2191       if (!VIM_ISDIGIT(*p))
2192         return FAIL;
2193 !     inc = (getdigits(&p) * 102) / (SBLOCKSIZE / 10);
2194       if (*p != ',')
2195         return FAIL;
2196       ++p;
2197 --- 7519,7525 ----
2198       ++p;
2199       if (!VIM_ISDIGIT(*p))
2200         return FAIL;
2201 !     incr = (getdigits(&p) * 102) / (SBLOCKSIZE / 10);
2202       if (*p != ',')
2203         return FAIL;
2204       ++p;
2205 ***************
2206 *** 7530,7540 ****
2207       if (*p != NUL)
2208         return FAIL;
2209   
2210 !     if (start == 0 || inc == 0 || added == 0 || inc > start)
2211         return FAIL;
2212   
2213       compress_start = start;
2214 !     compress_inc = inc;
2215       compress_added = added;
2216       return OK;
2217   }
2218 --- 7529,7539 ----
2219       if (*p != NUL)
2220         return FAIL;
2221   
2222 !     if (start == 0 || incr == 0 || added == 0 || incr > start)
2223         return FAIL;
2224   
2225       compress_start = start;
2226 !     compress_inc = incr;
2227       compress_added = added;
2228       return OK;
2229   }
2230 ***************
2231 *** 8292,8305 ****
2232    * Returns the number of nodes used.
2233    */
2234       static int
2235 ! put_node(fd, node, index, regionmask, prefixtree)
2236       FILE      *fd;            /* NULL when only counting */
2237       wordnode_T        *node;
2238 !     int               index;
2239       int               regionmask;
2240       int               prefixtree;     /* TRUE for PREFIXTREE */
2241   {
2242 !     int               newindex = index;
2243       int               siblingcount = 0;
2244       wordnode_T        *np;
2245       int               flags;
2246 --- 8291,8304 ----
2247    * Returns the number of nodes used.
2248    */
2249       static int
2250 ! put_node(fd, node, idx, regionmask, prefixtree)
2251       FILE      *fd;            /* NULL when only counting */
2252       wordnode_T        *node;
2253 !     int               idx;
2254       int               regionmask;
2255       int               prefixtree;     /* TRUE for PREFIXTREE */
2256   {
2257 !     int               newindex = idx;
2258       int               siblingcount = 0;
2259       wordnode_T        *np;
2260       int               flags;
2261 ***************
2262 *** 8309,8315 ****
2263         return 0;
2264   
2265       /* Store the index where this node is written. */
2266 !     node->wn_u1.index = index;
2267   
2268       /* Count the number of siblings. */
2269       for (np = node; np != NULL; np = np->wn_sibling)
2270 --- 8308,8314 ----
2271         return 0;
2272   
2273       /* Store the index where this node is written. */
2274 !     node->wn_u1.index = idx;
2275   
2276       /* Count the number of siblings. */
2277       for (np = node; np != NULL; np = np->wn_sibling)
2278 ***************
2279 *** 9244,9254 ****
2280    * Add "word[len]" to 'spellfile' as a good or bad word.
2281    */
2282       void
2283 ! spell_add_word(word, len, bad, index, undo)
2284       char_u    *word;
2285       int               len;
2286       int               bad;
2287 !     int               index;      /* "zG" and "zW": zero, otherwise index in
2288                                'spellfile' */
2289       int               undo;       /* TRUE for "zug", "zuG", "zuw" and "zuW" */
2290   {
2291 --- 9243,9253 ----
2292    * Add "word[len]" to 'spellfile' as a good or bad word.
2293    */
2294       void
2295 ! spell_add_word(word, len, bad, idx, undo)
2296       char_u    *word;
2297       int               len;
2298       int               bad;
2299 !     int               idx;        /* "zG" and "zW": zero, otherwise index in
2300                                'spellfile' */
2301       int               undo;       /* TRUE for "zug", "zuG", "zuw" and "zuW" */
2302   {
2303 ***************
2304 *** 9262,9268 ****
2305       int               i;
2306       char_u    *spf;
2307   
2308 !     if (index == 0)       /* use internal wordlist */
2309       {
2310         if (int_wordlist == NULL)
2311         {
2312 --- 9261,9267 ----
2313       int               i;
2314       char_u    *spf;
2315   
2316 !     if (idx == 0)         /* use internal wordlist */
2317       {
2318         if (int_wordlist == NULL)
2319         {
2320 ***************
2321 *** 9290,9300 ****
2322         for (spf = curbuf->b_p_spf, i = 1; *spf != NUL; ++i)
2323         {
2324             copy_option_part(&spf, fnamebuf, MAXPATHL, ",");
2325 !           if (i == index)
2326                 break;
2327             if (*spf == NUL)
2328             {
2329 !               EMSGN(_("E765: 'spellfile' does not have %ld entries"), index);
2330                 return;
2331             }
2332         }
2333 --- 9289,9299 ----
2334         for (spf = curbuf->b_p_spf, i = 1; *spf != NUL; ++i)
2335         {
2336             copy_option_part(&spf, fnamebuf, MAXPATHL, ",");
2337 !           if (i == idx)
2338                 break;
2339             if (*spf == NUL)
2340             {
2341 !               EMSGN(_("E765: 'spellfile' does not have %ld entries"), idx);
2342                 return;
2343             }
2344         }
2345 ***************
2346 *** 13581,13633 ****
2347          * the first "the" to itself. */
2348         return;
2349   
2350 !     /* Check if the word is already there.  Also check the length that is
2351 !      * being replaced "thes," -> "these" is a different suggestion from
2352 !      * "thes" -> "these". */
2353 !     stp = &SUG(*gap, 0);
2354 !     for (i = gap->ga_len; --i >= 0; ++stp)
2355 !       if (stp->st_wordlen == goodlen
2356 !               && stp->st_orglen == badlen
2357 !               && STRNCMP(stp->st_word, goodword, goodlen) == 0)
2358 !       {
2359 !           /*
2360 !            * Found it.  Remember the word with the lowest score.
2361 !            */
2362 !           if (stp->st_slang == NULL)
2363 !               stp->st_slang = slang;
2364   
2365 !           new_sug.st_score = score;
2366 !           new_sug.st_altscore = altscore;
2367 !           new_sug.st_had_bonus = had_bonus;
2368
2369 !           if (stp->st_had_bonus != had_bonus)
2370 !           {
2371 !               /* Only one of the two had the soundalike score computed.
2372 !                * Need to do that for the other one now, otherwise the
2373 !                * scores can't be compared.  This happens because
2374 !                * suggest_try_change() doesn't compute the soundalike
2375 !                * word to keep it fast, while some special methods set
2376 !                * the soundalike score to zero. */
2377 !               if (had_bonus)
2378 !                   rescore_one(su, stp);
2379 !               else
2380 !               {
2381 !                   new_sug.st_word = stp->st_word;
2382 !                   new_sug.st_wordlen = stp->st_wordlen;
2383 !                   new_sug.st_slang = stp->st_slang;
2384 !                   new_sug.st_orglen = badlen;
2385 !                   rescore_one(su, &new_sug);
2386                 }
2387 -           }
2388   
2389 !           if (stp->st_score > new_sug.st_score)
2390 !           {
2391 !               stp->st_score = new_sug.st_score;
2392 !               stp->st_altscore = new_sug.st_altscore;
2393 !               stp->st_had_bonus = new_sug.st_had_bonus;
2394             }
2395 !           break;
2396 !       }
2397   
2398       if (i < 0 && ga_grow(gap, 1) == OK)
2399       {
2400 --- 13580,13637 ----
2401          * the first "the" to itself. */
2402         return;
2403   
2404 !     if (gap->ga_len == 0)
2405 !       i = -1;
2406 !     else
2407 !     {
2408 !       /* Check if the word is already there.  Also check the length that is
2409 !        * being replaced "thes," -> "these" is a different suggestion from
2410 !        * "thes" -> "these". */
2411 !       stp = &SUG(*gap, 0);
2412 !       for (i = gap->ga_len; --i >= 0; ++stp)
2413 !           if (stp->st_wordlen == goodlen
2414 !                   && stp->st_orglen == badlen
2415 !                   && STRNCMP(stp->st_word, goodword, goodlen) == 0)
2416 !           {
2417 !               /*
2418 !                * Found it.  Remember the word with the lowest score.
2419 !                */
2420 !               if (stp->st_slang == NULL)
2421 !                   stp->st_slang = slang;
2422   
2423 !               new_sug.st_score = score;
2424 !               new_sug.st_altscore = altscore;
2425 !               new_sug.st_had_bonus = had_bonus;
2426
2427 !               if (stp->st_had_bonus != had_bonus)
2428 !               {
2429 !                   /* Only one of the two had the soundalike score computed.
2430 !                    * Need to do that for the other one now, otherwise the
2431 !                    * scores can't be compared.  This happens because
2432 !                    * suggest_try_change() doesn't compute the soundalike
2433 !                    * word to keep it fast, while some special methods set
2434 !                    * the soundalike score to zero. */
2435 !                   if (had_bonus)
2436 !                       rescore_one(su, stp);
2437 !                   else
2438 !                   {
2439 !                       new_sug.st_word = stp->st_word;
2440 !                       new_sug.st_wordlen = stp->st_wordlen;
2441 !                       new_sug.st_slang = stp->st_slang;
2442 !                       new_sug.st_orglen = badlen;
2443 !                       rescore_one(su, &new_sug);
2444 !                   }
2445                 }
2446   
2447 !               if (stp->st_score > new_sug.st_score)
2448 !               {
2449 !                   stp->st_score = new_sug.st_score;
2450 !                   stp->st_altscore = new_sug.st_altscore;
2451 !                   stp->st_had_bonus = new_sug.st_had_bonus;
2452 !               }
2453 !               break;
2454             }
2455 !     }
2456   
2457       if (i < 0 && ga_grow(gap, 1) == OK)
2458       {
2459 *** ../vim-7.0.069/src/ui.c     Mon Mar 27 23:02:40 2006
2460 --- src/ui.c    Thu Aug 24 22:31:38 2006
2461 ***************
2462 *** 1137,1143 ****
2463       int               len;
2464   #ifdef FEAT_MBYTE
2465       char_u    *p;
2466 -     int               i;
2467   #endif
2468       int               row1 = clip_star.start.lnum;
2469       int               col1 = clip_star.start.col;
2470 --- 1137,1142 ----
2471 ***************
2472 *** 1218,1223 ****
2473 --- 1217,1224 ----
2474   #ifdef FEAT_MBYTE
2475             if (enc_dbcs != 0)
2476             {
2477 +               int     i;
2478
2479                 p = ScreenLines + LineOffset[row];
2480                 for (i = start_col; i < end_col; ++i)
2481                     if (enc_dbcs == DBCS_JPNU && p[i] == 0x8e)
2482 *** ../vim-7.0.069/src/undo.c   Wed Jul 12 21:48:56 2006
2483 --- src/undo.c  Thu Aug 24 22:32:41 2006
2484 ***************
2485 *** 1187,1193 ****
2486       int               did_undo;       /* just did an undo */
2487       int               absolute;       /* used ":undo N" */
2488   {
2489 !     char      *msg;
2490       u_header_T        *uhp;
2491       char_u    msgbuf[80];
2492   
2493 --- 1187,1193 ----
2494       int               did_undo;       /* just did an undo */
2495       int               absolute;       /* used ":undo N" */
2496   {
2497 !     char      *msgstr;
2498       u_header_T        *uhp;
2499       char_u    msgbuf[80];
2500   
2501 ***************
2502 *** 1205,1224 ****
2503   
2504       u_oldcount -= u_newcount;
2505       if (u_oldcount == -1)
2506 !       msg = N_("more line");
2507       else if (u_oldcount < 0)
2508 !       msg = N_("more lines");
2509       else if (u_oldcount == 1)
2510 !       msg = N_("line less");
2511       else if (u_oldcount > 1)
2512 !       msg = N_("fewer lines");
2513       else
2514       {
2515         u_oldcount = u_newcount;
2516         if (u_newcount == 1)
2517 !           msg = N_("change");
2518         else
2519 !           msg = N_("changes");
2520       }
2521   
2522       if (curbuf->b_u_curhead != NULL)
2523 --- 1205,1224 ----
2524   
2525       u_oldcount -= u_newcount;
2526       if (u_oldcount == -1)
2527 !       msgstr = N_("more line");
2528       else if (u_oldcount < 0)
2529 !       msgstr = N_("more lines");
2530       else if (u_oldcount == 1)
2531 !       msgstr = N_("line less");
2532       else if (u_oldcount > 1)
2533 !       msgstr = N_("fewer lines");
2534       else
2535       {
2536         u_oldcount = u_newcount;
2537         if (u_newcount == 1)
2538 !           msgstr = N_("change");
2539         else
2540 !           msgstr = N_("changes");
2541       }
2542   
2543       if (curbuf->b_u_curhead != NULL)
2544 ***************
2545 *** 1244,1250 ****
2546   
2547       smsg((char_u *)_("%ld %s; %s #%ld  %s"),
2548             u_oldcount < 0 ? -u_oldcount : u_oldcount,
2549 !           _(msg),
2550             did_undo ? _("before") : _("after"),
2551             uhp == NULL ? 0L : uhp->uh_seq,
2552             msgbuf);
2553 --- 1244,1250 ----
2554   
2555       smsg((char_u *)_("%ld %s; %s #%ld  %s"),
2556             u_oldcount < 0 ? -u_oldcount : u_oldcount,
2557 !           _(msgstr),
2558             did_undo ? _("before") : _("after"),
2559             uhp == NULL ? 0L : uhp->uh_seq,
2560             msgbuf);
2561 *** ../vim-7.0.069/src/window.c Sat May  6 23:37:40 2006
2562 --- src/window.c        Thu Aug 24 22:33:40 2006
2563 ***************
2564 *** 340,349 ****
2565                 {
2566                     tabpage_T   *oldtab = curtab;
2567                     tabpage_T   *newtab;
2568 -                   win_T       *wp = curwin;
2569   
2570                     /* First create a new tab with the window, then go back to
2571                      * the old tab and close the window there. */
2572                     if (win_new_tabpage((int)Prenum) == OK
2573                                                      && valid_tabpage(oldtab))
2574                     {
2575 --- 340,349 ----
2576                 {
2577                     tabpage_T   *oldtab = curtab;
2578                     tabpage_T   *newtab;
2579   
2580                     /* First create a new tab with the window, then go back to
2581                      * the old tab and close the window there. */
2582 +                   wp = curwin;
2583                     if (win_new_tabpage((int)Prenum) == OK
2584                                                      && valid_tabpage(oldtab))
2585                     {
2586 *** ../vim-7.0.069/src/version.c        Tue Aug 29 16:52:01 2006
2587 --- src/version.c       Tue Aug 29 17:02:00 2006
2588 ***************
2589 *** 668,669 ****
2590 --- 668,671 ----
2591   {   /* Add new patch number below this line */
2592 + /**/
2593 +     70,
2594   /**/
2595
2596 -- 
2597 hundred-and-one symptoms of being an internet addict:
2598 267. You get an extra phone line so you can get phone calls.
2599
2600  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
2601 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
2602 \\\        download, build and distribute -- http://www.A-A-P.org        ///
2603  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.368596 seconds and 3 git commands to generate.