4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: Compiler warnings for shadowed variables and uninitialized
13 Solution: Rename variables such as "index", "msg" and "dup". Initialize
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,
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
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));
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));
45 * maybe because alloc() returns NULL, then FAIL is returned.
48 ! ins_compl_add(str, len, icase, fname, cptext, cdir, flags, dup)
53 * maybe because alloc() returns NULL, then FAIL is returned.
56 ! ins_compl_add(str, len, icase, fname, cptext, cdir, flags, adup)
62 char_u **cptext; /* extra text for popup menu or NULL */
65 ! int dup; /* accept duplicate match */
68 int dir = (cdir == 0 ? compl_direction : cdir);
70 char_u **cptext; /* extra text for popup menu or NULL */
73 ! int adup; /* accept duplicate match */
76 int dir = (cdir == 0 ? compl_direction : cdir);
80 * If the same match is already present, don't add it.
82 ! if (compl_first_match != NULL && !dup)
84 match = compl_first_match;
88 * If the same match is already present, don't add it.
90 ! if (compl_first_match != NULL && !adup)
92 match = compl_first_match;
100 char_u *(cptext[CPT_COUNT]);
102 if (tv->v_type == VAR_DICT && tv->vval.v_dict != NULL)
108 char_u *(cptext[CPT_COUNT]);
110 if (tv->v_type == VAR_DICT && tv->vval.v_dict != NULL)
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");
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");
131 if (word == NULL || *word == NUL)
133 ! return ins_compl_add(word, -1, icase, NULL, cptext, dir, 0, dup);
139 if (word == NULL || *word == NUL)
141 ! return ins_compl_add(word, -1, icase, NULL, cptext, dir, 0, adup);
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
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));
154 static void f_add __ARGS((typval_T *argvars, typval_T *rettv));
155 static void f_append __ARGS((typval_T *argvars, typval_T *rettv));
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));
162 static void f_add __ARGS((typval_T *argvars, typval_T *rettv));
163 static void f_append __ARGS((typval_T *argvars, typval_T *rettv));
169 ! char_u *tofree = NULL;
172 p = get_tv_string_chk(tv);
177 ! char_u *ptofree = NULL;
180 p = get_tv_string_chk(tv);
183 s = get_reg_contents(*arg == '@' ? '"' : *arg, TRUE, TRUE);
186 ! p = tofree = concat_str(s, p);
191 s = get_reg_contents(*arg == '@' ? '"' : *arg, TRUE, TRUE);
194 ! p = ptofree = concat_str(s, p);
200 write_reg_contents(*arg == '@' ? '"' : *arg, p, -1, FALSE);
208 write_reg_contents(*arg == '@' ? '"' : *arg, p, -1, FALSE);
217 * Give an error message with a function name. Handle <SNR> things.
220 ! emsg_funcname(msg, name)
226 * Give an error message with a function name. Handle <SNR> things.
229 ! emsg_funcname(ermsg, name)
236 p = concat_str((char_u *)"<SNR>", name + 3);
244 p = concat_str((char_u *)"<SNR>", name + 3);
247 ! EMSG2(_(ermsg), p);
256 ! char_u *msg = map ? (char_u *)"map()" : (char_u *)"filter()";
259 rettv->vval.v_number = 0;
260 if (argvars[0].v_type == VAR_LIST)
262 if ((l = argvars[0].vval.v_list) == NULL
263 ! || (map && tv_check_lock(l->lv_lock, msg)))
266 else if (argvars[0].v_type == VAR_DICT)
268 if ((d = argvars[0].vval.v_dict) == NULL
269 ! || (map && tv_check_lock(d->dv_lock, msg)))
274 ! EMSG2(_(e_listdictarg), msg);
282 ! char_u *ermsg = map ? (char_u *)"map()" : (char_u *)"filter()";
285 rettv->vval.v_number = 0;
286 if (argvars[0].v_type == VAR_LIST)
288 if ((l = argvars[0].vval.v_list) == NULL
289 ! || (map && tv_check_lock(l->lv_lock, ermsg)))
292 else if (argvars[0].v_type == VAR_DICT)
294 if ((d = argvars[0].vval.v_dict) == NULL
295 ! || (map && tv_check_lock(d->dv_lock, ermsg)))
300 ! EMSG2(_(e_listdictarg), ermsg);
309 ! if (tv_check_lock(di->di_tv.v_lock, msg))
311 vimvars[VV_KEY].vv_str = vim_strsave(di->di_key);
312 if (filter_map_one(&di->di_tv, expr, map, &rem) == FAIL
317 ! if (tv_check_lock(di->di_tv.v_lock, ermsg))
319 vimvars[VV_KEY].vv_str = vim_strsave(di->di_key);
320 if (filter_map_one(&di->di_tv, expr, map, &rem) == FAIL
324 for (li = l->lv_first; li != NULL; li = nli)
326 ! if (tv_check_lock(li->li_tv.v_lock, msg))
329 if (filter_map_one(&li->li_tv, expr, map, &rem) == FAIL
332 for (li = l->lv_first; li != NULL; li = nli)
334 ! if (tv_check_lock(li->li_tv.v_lock, ermsg))
337 if (filter_map_one(&li->li_tv, expr, map, &rem) == FAIL
342 char_u buf[MSG_BUF_LEN];
343 ! char_u numbuf[NUMBUFLEN];
346 msg_puts((char_u *)"(");
350 char_u buf[MSG_BUF_LEN];
351 ! char_u numbuf2[NUMBUFLEN];
354 msg_puts((char_u *)"(");
357 msg_outnum((long)argvars[i].vval.v_number);
360 ! trunc_string(tv2string(&argvars[i], &tofree, numbuf, 0),
361 ! buf, MSG_BUF_CLEN);
366 msg_outnum((long)argvars[i].vval.v_number);
369 ! trunc_string(tv2string(&argvars[i], &tofree,
370 ! numbuf2, 0), buf, MSG_BUF_CLEN);
378 char_u buf[MSG_BUF_LEN];
379 ! char_u numbuf[NUMBUFLEN];
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),
387 smsg((char_u *)_("%s returning %s"), sourcing_name, buf);
392 char_u buf[MSG_BUF_LEN];
393 ! char_u numbuf2[NUMBUFLEN];
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),
401 smsg((char_u *)_("%s returning %s"), sourcing_name, buf);
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
411 + has_tab = FALSE; /* avoid uninit warnings */
412 len = linelen(eap->cmdidx == CMD_right ? &has_tab
413 : NULL) - get_indent();
417 ? (st_old.st_mode & 0020)
418 : (st_old.st_mode & 0002))))
422 /* avoid a wait_return for this message, it's annoying */
424 EMSG2(_("E137: Viminfo file is not writable: %s"), fname);
428 ? (st_old.st_mode & 0020)
429 : (st_old.st_mode & 0002))))
431 ! int tt = msg_didany;
433 /* avoid a wait_return for this message, it's annoying */
434 EMSG2(_("E137: Viminfo file is not writable: %s"), fname);
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
441 * Return FALSE when not sourcing a file.
444 ! source_finished(getline, cookie)
445 ! char_u *(*getline) __ARGS((int, void *, int));
448 ! return (getline_equal(getline, cookie, getsourceline)
449 && ((struct source_cookie *)getline_cookie(
450 ! getline, cookie))->finished);
455 * Return FALSE when not sourcing a file.
458 ! source_finished(fgetline, cookie)
459 ! char_u *(*fgetline) __ARGS((int, void *, int));
462 ! return (getline_equal(fgetline, cookie, getsourceline)
463 && ((struct source_cookie *)getline_cookie(
464 ! fgetline, cookie))->finished);
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
475 ! static char_u *do_one_cmd __ARGS((char_u **, int, struct condstack *, char_u *(*getline)(int, void *, int), void *cookie));
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 */
480 static char_u *find_command __ARGS((exarg_T *eap, int *full));
485 ! static char_u *do_one_cmd __ARGS((char_u **, int, struct condstack *, char_u *(*fgetline)(int, void *, int), void *cookie));
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 */
490 static char_u *find_command __ARGS((exarg_T *eap, int *full));
495 * If requested, store and reset the global values controlling the
496 ! * exception handling (used when debugging).
498 if (flags & DOCMD_EXCRESET)
499 save_dbg_stuff(&debug_saved);
501 initial_trylevel = trylevel;
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...
510 if (flags & DOCMD_EXCRESET)
511 save_dbg_stuff(&debug_saved);
513 + memset(&debug_saved, 0, 1);
515 initial_trylevel = trylevel;
522 ! * If "getline" is get_loop_line(), return TRUE if the getline it uses equals
523 ! * "func". * Otherwise return TRUE when "getline" equals "func".
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));
533 char_u *(*gp) __ARGS((int, void *, int));
534 struct loop_cookie *cp;
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
540 cp = (struct loop_cookie *)cookie;
541 while (gp == get_loop_line)
547 ! * If "fgetline" is get_loop_line(), return TRUE if the getline it uses equals
548 ! * "func". * Otherwise return TRUE when "fgetline" equals "func".
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));
558 char_u *(*gp) __ARGS((int, void *, int));
559 struct loop_cookie *cp;
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
565 cp = (struct loop_cookie *)cookie;
566 while (gp == get_loop_line)
573 ! return getline == func;
577 #if defined(FEAT_EVAL) || defined(FEAT_MBYTE) || defined(PROTO)
579 ! * If "getline" is get_loop_line(), return the cookie used by the original
580 * getline function. Otherwise return "cookie".
584 ! getline_cookie(getline, cookie)
585 ! char_u *(*getline) __ARGS((int, void *, int));
586 ! void *cookie; /* argument for getline() */
589 char_u *(*gp) __ARGS((int, void *, int));
590 struct loop_cookie *cp;
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
596 cp = (struct loop_cookie *)cookie;
597 while (gp == get_loop_line)
603 ! return fgetline == func;
607 #if defined(FEAT_EVAL) || defined(FEAT_MBYTE) || defined(PROTO)
609 ! * If "fgetline" is get_loop_line(), return the cookie used by the original
610 * getline function. Otherwise return "cookie".
614 ! getline_cookie(fgetline, cookie)
615 ! char_u *(*fgetline) __ARGS((int, void *, int));
616 ! void *cookie; /* argument for fgetline() */
619 char_u *(*gp) __ARGS((int, void *, int));
620 struct loop_cookie *cp;
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
626 cp = (struct loop_cookie *)cookie;
627 while (gp == get_loop_line)
632 * 6. switch on command name
634 ! * Note: "getline" can be NULL.
636 * This function may be called recursively!
640 * 6. switch on command name
642 ! * Note: "fgetline" can be NULL.
644 * This function may be called recursively!
655 struct condstack *cstack;
657 ! char_u *(*getline) __ARGS((int, void *, int));
658 ! void *cookie; /* argument for getline() */
670 struct condstack *cstack;
672 ! char_u *(*fgetline) __ARGS((int, void *, int));
673 ! void *cookie; /* argument for fgetline() */
681 /* avoid that a function call in 'statusline' does this */
682 ! && !getline_equal(getline, cookie, get_func_line)
689 /* avoid that a function call in 'statusline' does this */
690 ! && !getline_equal(fgetline, cookie, get_func_line)
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)
703 ea.cmd = (char_u *)"+";
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)
712 ea.cmd = (char_u *)"+";
715 /* Count this line for profiling if ea.skip is FALSE. */
716 if (do_profiling == PROF_YES && !ea.skip)
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))
725 /* Count this line for profiling if ea.skip is FALSE. */
726 if (do_profiling == PROF_YES && !ea.skip)
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))
736 * The "ea" structure holds the arguments that can be used.
738 ea.cmdlinep = cmdlinep;
739 ! ea.getline = getline;
744 * The "ea" structure holds the arguments that can be used.
746 ea.cmdlinep = cmdlinep;
747 ! ea.getline = fgetline;
754 else if (check_cstack)
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);
764 else if (check_cstack)
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);
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
776 # define IS_NONPRINTABLE(c) (((c) < 0x20 && (c) != TAB && (c) != NL) \
779 ! set_printable_label_text(GtkLabel *label, char_u *msg)
781 char_u *convbuf = NULL;
784 # define IS_NONPRINTABLE(c) (((c) < 0x20 && (c) != TAB && (c) != NL) \
787 ! set_printable_label_text(GtkLabel *label, char_u *text)
789 char_u *convbuf = NULL;
793 /* Convert to UTF-8 if it isn't already */
794 if (output_conv.vc_type != CONV_NONE)
796 ! convbuf = string_convert(&output_conv, msg, NULL);
801 /* First let's see how much we need to allocate */
803 ! for (p = msg; *p != NUL; p += charlen)
805 if ((*p & 0x80) == 0) /* be quick for ASCII */
808 /* Convert to UTF-8 if it isn't already */
809 if (output_conv.vc_type != CONV_NONE)
811 ! convbuf = string_convert(&output_conv, text, NULL);
816 /* First let's see how much we need to allocate */
818 ! for (p = text; *p != NUL; p += charlen)
820 if ((*p & 0x80) == 0) /* be quick for ASCII */
824 (unsigned long)pixel, &color);
830 /* Be quick for ASCII */
832 (unsigned long)pixel, &color);
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
843 get_menu_position(vimmenu_T *menu)
848 for (node = menu->parent->children; node != menu; node = node->next)
850 g_return_val_if_fail(node != NULL, -1);
856 #endif /* FEAT_TOOLBAR && HAVE_GTK2 */
859 get_menu_position(vimmenu_T *menu)
864 for (node = menu->parent->children; node != menu; node = node->next)
866 g_return_val_if_fail(node != NULL, -1);
872 #endif /* FEAT_TOOLBAR && HAVE_GTK2 */
876 char **ync; /* "yes no cancel" */
881 button_string = vim_strsave(button_string); /* must be writable */
882 if (button_string == NULL)
884 char **ync; /* "yes no cancel" */
889 button_string = vim_strsave(button_string); /* must be writable */
890 if (button_string == NULL)
893 * Well, apparently somebody changed his mind: with GTK 2.2.4 it works the
894 * other way around...
896 ! for (index = 1; index <= n_buttons; ++index)
901 ! label = buttons[index - 1];
903 * Perform some guesswork to find appropriate stock items for the
904 * buttons. We have to compare with a sample of the translated
906 * Well, apparently somebody changed his mind: with GTK 2.2.4 it works the
907 * other way around...
909 ! for (idx = 1; idx <= n_buttons; ++idx)
914 ! label = buttons[idx - 1];
916 * Perform some guesswork to find appropriate stock items for the
917 * buttons. We have to compare with a sample of the translated
920 else if (button_equal(label, "Cancel")) label = GTK_STOCK_CANCEL;
922 label8 = CONVERT_TO_UTF8((char_u *)label);
923 ! gtk_dialog_add_button(dialog, (const gchar *)label8, index);
924 CONVERT_TO_UTF8_FREE(label8);
928 else if (button_equal(label, "Cancel")) label = GTK_STOCK_CANCEL;
930 label8 = CONVERT_TO_UTF8((char_u *)label);
931 ! gtk_dialog_add_button(dialog, (const gchar *)label8, idx);
932 CONVERT_TO_UTF8_FREE(label8);
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
940 GtkNotebook *notebook,
941 GtkNotebookPage *page,
945 if (!ignore_tabline_evt)
947 ! if (send_tabline_event(index + 1) && gtk_main_level() > 0)
953 GtkNotebook *notebook,
954 GtkNotebookPage *page,
958 if (!ignore_tabline_evt)
960 ! if (send_tabline_event(idx + 1) && gtk_main_level() > 0)
969 ! char *name = pango_font_description_to_string(font);
973 ! char_u *s = vim_strsave((char_u *)name);
983 ! char *pangoname = pango_font_description_to_string(font);
985 ! if (pangoname != NULL)
987 ! char_u *s = vim_strsave((char_u *)pangoname);
998 - GdkColor foreground;
999 - GdkColor background;
1001 if (gui.drawarea->window == NULL)
1004 ! foreground.pixel = gui.norm_pixel ^ gui.back_pixel;
1005 ! background.pixel = gui.norm_pixel ^ gui.back_pixel;
1007 ! values.foreground = foreground;
1008 ! values.background = background;
1009 values.function = GDK_XOR;
1010 invert_gc = gdk_gc_new_with_values(gui.drawarea->window,
1015 ! gdk_gc_set_exposures(invert_gc, gui.visibility != GDK_VISIBILITY_UNOBSCURED);
1016 gdk_draw_rectangle(gui.drawarea->window, invert_gc,
1018 FILL_X(c), FILL_Y(r),
1024 if (gui.drawarea->window == NULL)
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,
1035 ! gdk_gc_set_exposures(invert_gc, gui.visibility !=
1036 ! GDK_VISIBILITY_UNOBSCURED);
1037 gdk_draw_rectangle(gui.drawarea->window, invert_gc,
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
1045 prt_resfile_next_line()
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)
1053 ! if (prt_resfile.buffer[index] != PSLF && prt_resfile.buffer[index]
1058 ! prt_resfile.line_start = index;
1060 ! while (index < prt_resfile.len)
1062 ! if (prt_resfile.buffer[index] == PSLF || prt_resfile.buffer[index]
1067 ! prt_resfile.line_end = index;
1069 ! return (index < prt_resfile.len);
1075 prt_resfile_next_line()
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)
1083 ! if (prt_resfile.buffer[idx] != PSLF && prt_resfile.buffer[idx] != PSCR)
1087 ! prt_resfile.line_start = idx;
1089 ! while (idx < prt_resfile.len)
1091 ! if (prt_resfile.buffer[idx] == PSLF || prt_resfile.buffer[idx] == PSCR)
1095 ! prt_resfile.line_end = idx;
1097 ! return (idx < prt_resfile.len);
1103 prt_resfile_skip_nonws(offset)
1108 ! index = prt_resfile.line_start + offset;
1109 ! while (index < prt_resfile.line_end)
1111 ! if (isspace(prt_resfile.buffer[index]))
1112 ! return index - prt_resfile.line_start;
1118 prt_resfile_skip_nonws(offset)
1123 ! idx = prt_resfile.line_start + offset;
1124 ! while (idx < prt_resfile.line_end)
1126 ! if (isspace(prt_resfile.buffer[idx]))
1127 ! return idx - prt_resfile.line_start;
1134 prt_resfile_skip_ws(offset)
1139 ! index = prt_resfile.line_start + offset;
1140 ! while (index < prt_resfile.line_end)
1142 ! if (!isspace(prt_resfile.buffer[index]))
1143 ! return index - prt_resfile.line_start;
1149 prt_resfile_skip_ws(offset)
1154 ! idx = prt_resfile.line_start + offset;
1155 ! while (idx < prt_resfile.line_end)
1157 ! if (!isspace(prt_resfile.buffer[idx]))
1158 ! return idx - prt_resfile.line_start;
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;
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;
1182 if (!(props & ENC_8BIT) && ((*p_pmcs != NUL) || !(props & ENC_UNICODE)))
1184 p_mbenc_first = NULL;
1186 for (cmap = 0; cmap < NUM_ELEMENTS(prt_ps_mbfonts); cmap++)
1187 if (prt_match_encoding((char *)p_encoding, &prt_ps_mbfonts[cmap],
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
1197 ! char **matches, **contexts;
1198 ! int nummatches[CSCOPE_MAX_CONNECTIONS], totmatches, matched;
1199 #ifdef FEAT_QUICKFIX
1206 ! int nummatches[CSCOPE_MAX_CONNECTIONS], totmatches;
1207 #ifdef FEAT_QUICKFIX
1214 #endif /* FEAT_QUICKFIX */
1216 + char **matches = NULL, **contexts = NULL;
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
1247 while (done++ < 1000)
1251 if (parmp->window_layout == WIN_TABS)
1258 while (done++ < 1000)
1262 if (parmp->window_layout == WIN_TABS)
1267 curwin = curwin->w_next;
1271 curbuf = curwin->w_buffer;
1272 if (curbuf->b_ml.ml_mfp == NULL)
1275 curwin = curwin->w_next;
1279 curbuf = curwin->w_buffer;
1280 if (curbuf->b_ml.ml_mfp == NULL)
1283 check_swap_exists_action();
1286 ! rewind = TRUE; /* start again */
1291 check_swap_exists_action();
1294 ! dorewind = TRUE; /* start again */
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
1303 if (preedit_string != NULL && attr_list != NULL)
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);
1311 ! if (preedit_string[index] != '\0')
1313 PangoAttrIterator *iter;
1317 if (preedit_string != NULL && attr_list != NULL)
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);
1325 ! if (preedit_string[idx] != '\0')
1327 PangoAttrIterator *iter;
1332 pango_attr_iterator_range(iter, &start, &end);
1334 ! if (index >= start && index < end)
1335 char_attr |= translate_pango_attributes(iter);
1337 while (pango_attr_iterator_next(iter));
1340 pango_attr_iterator_range(iter, &start, &end);
1342 ! if (idx >= start && idx < end)
1343 char_attr |= translate_pango_attributes(iter);
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
1350 #define ML_FLUSH 0x02 /* flush locked block */
1351 #define ML_SIMPLE(x) (x & 0x10) /* DEL, INS or FIND */
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));
1358 #define ML_FLUSH 0x02 /* flush locked block */
1359 #define ML_SIMPLE(x) (x & 0x10) /* DEL, INS or FIND */
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));
1367 * Update the timestamp or the B0_SAME_DIR flag of the .swp file.
1370 ! ml_upd_block0(buf, setfname)
1377 * Update the timestamp or the B0_SAME_DIR flag of the .swp file.
1380 ! ml_upd_block0(buf, set_fname)
1388 EMSG(_("E304: ml_upd_block0(): Didn't get block 0??"));
1392 set_b0_fname(b0p, buf);
1394 set_b0_dir_flag(b0p, buf);
1396 EMSG(_("E304: ml_upd_block0(): Didn't get block 0??"));
1400 set_b0_fname(b0p, buf);
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
1407 static int inputHandler = -1; /* simply ret.value of WSAAsyncSelect() */
1408 extern HWND s_hwnd; /* Gvim's Window handle */
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
1415 static int inputHandler = -1; /* simply ret.value of WSAAsyncSelect() */
1416 extern HWND s_hwnd; /* Gvim's Window handle */
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
1427 ! cmdno = strtol(q, &q, 10);
1429 q = (char *)skipwhite((char_u *)q);
1431 ! if (nb_do_cmd(bufno, (char_u *)verb, isfunc, cmdno, (char_u *)q) == FAIL)
1439 ! r_cmdno = strtol(q, &q, 10);
1441 q = (char *)skipwhite((char_u *)q);
1443 ! if (nb_do_cmd(bufno, (char_u *)verb, isfunc, r_cmdno, (char_u *)q) == FAIL)
1449 if (netbeansForcedQuit)
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");
1456 ! sprintf(buf, "%d:killed=%d\n", i, cmdno);
1457 nbdebug(("EVT: %s", buf));
1458 /* nb_send(buf, "netbeans_end"); avoid "write failed" messages */
1461 if (netbeansForcedQuit)
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");
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 */
1476 vim_snprintf(buf, sizeof(buf),
1477 ! "0:balloonText=%d \"%s\"\n", cmdno, p);
1480 nbdebug(("EVT: %s", buf));
1484 vim_snprintf(buf, sizeof(buf),
1485 ! "0:balloonText=%d \"%s\"\n", r_cmdno, p);
1488 nbdebug(("EVT: %s", buf));
1494 ! sprintf(buf, "0:disconnect=%d\n", cmdno);
1495 nbdebug(("EVT: %s", buf));
1496 nb_send(buf, "netbeans_disconnect");
1502 ! sprintf(buf, "0:disconnect=%d\n", r_cmdno);
1503 nbdebug(("EVT: %s", buf));
1504 nb_send(buf, "netbeans_disconnect");
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");
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");
1528 ! sprintf(buffer, "%d:killed=%d\n", bufno, cmdno);
1530 nbdebug(("EVT: %s", buffer));
1536 ! sprintf(buffer, "%d:killed=%d\n", bufno, r_cmdno);
1538 nbdebug(("EVT: %s", buffer));
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");
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");
1561 off = pos2off(bufp, &pos);
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");
1569 off = pos2off(bufp, &pos);
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");
1578 nbbuf->modified = 0;
1580 ! sprintf((char *)buf, "%d:unmodified=%d\n", bufno, cmdno);
1581 nbdebug(("EVT: %s", buf));
1582 nb_send((char *)buf, "netbeans_unmodified");
1586 nbbuf->modified = 0;
1588 ! sprintf((char *)buf, "%d:unmodified=%d\n", bufno, r_cmdno);
1589 nbdebug(("EVT: %s", buf));
1590 nb_send((char *)buf, "netbeans_unmodified");
1594 long off = pos2off(curbuf, &curwin->w_cursor);
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]");
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");
1606 long off = pos2off(curbuf, &curwin->w_cursor);
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]");
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");
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");
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");
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");
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");
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");
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");
1666 nbbuf->modified = 0;
1668 ! sprintf((char *)buf, "%d:save=%d\n", bufno, cmdno);
1669 nbdebug(("EVT: %s", buf));
1670 nb_send((char *)buf, "netbeans_save_buffer");
1674 nbbuf->modified = 0;
1676 ! sprintf((char *)buf, "%d:save=%d\n", bufno, r_cmdno);
1677 nbdebug(("EVT: %s", buf));
1678 nb_send((char *)buf, "netbeans_save_buffer");
1682 if (nbbuf->insertDone)
1683 nbbuf->modified = 1;
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"); */
1690 if (nbbuf->insertDone)
1691 nbbuf->modified = 1;
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"); */
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
1706 if ((pat = alloc(len + 7)) == NULL)
1714 if ((pat = alloc(len + 7)) == NULL)
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.
1721 ! if (!locally || !findpar(&incl, BACKWARD, 1L, '{', FALSE))
1723 setpcmark(); /* Set in findpar() otherwise */
1724 curwin->w_cursor.lnum = 1;
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.
1729 ! if (!locally || !findpar(&incll, BACKWARD, 1L, '{', FALSE))
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
1739 int both = (opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0;
1741 ! if (opt_idx == -1) /* use name */
1743 ! opt_idx = findoption(name);
1744 ! if (opt_idx < 0) /* not found (should not happen) */
1746 EMSG2(_(e_intern2), "set_string_option_direct()");
1751 ! if (options[opt_idx].var == NULL) /* can't set hidden option */
1754 s = vim_strsave(val);
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);
1763 /* For buffer/window local option may also set the global value. */
1765 ! set_string_option_global(opt_idx, varp);
1767 ! options[opt_idx].flags |= P_ALLOCED;
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)
1773 free_string_option(*varp);
1774 *varp = empty_option;
1777 if (set_sid != SID_NONE)
1778 ! set_option_scriptID_idx(opt_idx, opt_flags,
1779 set_sid == 0 ? current_SID : set_sid);
1785 int both = (opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0;
1786 + int idx = opt_idx;
1788 ! if (idx == -1) /* use name */
1790 ! idx = findoption(name);
1791 ! if (idx < 0) /* not found (should not happen) */
1793 EMSG2(_(e_intern2), "set_string_option_direct()");
1798 ! if (options[idx].var == NULL) /* can't set hidden option */
1801 s = vim_strsave(val);
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);
1810 /* For buffer/window local option may also set the global value. */
1812 ! set_string_option_global(idx, varp);
1814 ! options[idx].flags |= P_ALLOCED;
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)
1820 free_string_option(*varp);
1821 *varp = empty_option;
1824 if (set_sid != SID_NONE)
1825 ! set_option_scriptID_idx(idx, opt_flags,
1826 set_sid == 0 ? current_SID : set_sid);
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
1834 linenr_T lnum = curbuf->b_op_start.lnum;
1836 ! char_u *p = ml_get(lnum);
1842 linenr_T lnum = curbuf->b_op_start.lnum;
1844 ! char_u *lp = ml_get(lnum);
1850 close(fromshell_fd);
1853 ! l = STRLEN(p + written);
1856 ! else if (p[written] == NL)
1857 /* NL -> NUL translation */
1858 len = write(toshell_fd, "", (size_t)1);
1861 ! s = vim_strchr(p + written, NL);
1862 ! len = write(toshell_fd, (char *)p + written,
1863 ! s == NULL ? l : s - (p + written));
1868 close(fromshell_fd);
1871 ! l = STRLEN(lp + written);
1874 ! else if (lp[written] == NL)
1875 /* NL -> NUL translation */
1876 len = write(toshell_fd, "", (size_t)1);
1879 ! s = vim_strchr(lp + written, NL);
1880 ! len = write(toshell_fd, (char *)lp + written,
1881 ! s == NULL ? l : s - (lp + written));
1898 ! lp = ml_get(lnum);
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
1911 if (tv->v_type == VAR_STRING)
1913 /* Get the next line from the supplied string */
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
1921 colnr_T start2, end2;
1924 getvvcol(wp, &top, &start, NULL, &end);
1925 getvvcol(wp, &bot, &start2, NULL, &end2);
1929 colnr_T start2, end2;
1932 getvvcol(wp, &top, &start, NULL, &end);
1933 getvvcol(wp, &bot, &start2, NULL, &end2);
1937 if (top.col == MAXCOL || bot.col == 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;
1947 if (top.col == MAXCOL || bot.col == 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;
1962 opnd = OPERAND(scan);
1963 /* Safety check (just in case 'encoding' was changed since
1968 ! int opndc = 0, inpc;
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
1978 static int entered = FALSE; /* avoid recursiveness */
1979 ! static int did_outofmem_msg = FALSE; /* did outofmem message */
1982 * Allocation of the screen buffers is done only when the size changes and
1986 static int entered = FALSE; /* avoid recursiveness */
1987 ! static int done_outofmem_msg = FALSE; /* did outofmem message */
1990 * Allocation of the screen buffers is done only when the size changes and
1996 ! if (ScreenLines != NULL || !did_outofmem_msg)
1998 /* guess the size */
1999 do_outofmem_msg((long_u)((Rows + 1) * Columns));
2001 /* Remember we did this to avoid getting outofmem messages over
2002 * and over again. */
2003 ! did_outofmem_msg = TRUE;
2005 vim_free(new_ScreenLines);
2006 new_ScreenLines = NULL;
2011 ! if (ScreenLines != NULL || !done_outofmem_msg)
2013 /* guess the size */
2014 do_outofmem_msg((long_u)((Rows + 1) * Columns));
2016 /* Remember we did this to avoid getting outofmem messages over
2017 * and over again. */
2018 ! done_outofmem_msg = TRUE;
2020 vim_free(new_ScreenLines);
2021 new_ScreenLines = NULL;
2027 ! did_outofmem_msg = FALSE;
2029 for (new_row = 0; new_row < Rows; ++new_row)
2035 ! done_outofmem_msg = FALSE;
2037 for (new_row = 0; new_row < Rows; ++new_row)
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
2044 if ((compl_cont_status & CONT_ADDING) && i == compl_length)
2046 - /* get the next line */
2047 /* IOSIZE > compl_length, so the STRNCPY works */
2048 STRNCPY(IObuff, aux, i);
2050 ! && lnum < end_lnum
2051 ! && (line = ml_get(++lnum)) != NULL)
2053 ! && !vim_fgets(line = file_line,
2054 ! LSIZE, files[depth].fp)))
2057 /* we read a line, set "already" to check this "line" later
2060 if ((compl_cont_status & CONT_ADDING) && i == compl_length)
2062 /* IOSIZE > compl_length, so the STRNCPY works */
2063 STRNCPY(IObuff, aux, i);
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. */
2070 ! if (lnum >= end_lnum)
2071 ! goto exit_matched;
2072 ! line = ml_get(++lnum);
2074 ! else if (vim_fgets(line = file_line,
2075 ! LSIZE, files[depth].fp))
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
2085 int has_syntax = syntax_present(wp->w_buffer);
2094 int has_syntax = syntax_present(wp->w_buffer);
2102 capcol = (int)(skipwhite(line) - line);
2103 else if (curline && wp == curwin)
2105 - int col = (int)(skipwhite(line) - line);
2107 /* For spellbadword(): check if first word needs a capital. */
2108 if (check_need_cap(lnum, col))
2112 capcol = (int)(skipwhite(line) - line);
2113 else if (curline && wp == curwin)
2115 /* For spellbadword(): check if first word needs a capital. */
2116 + col = (int)(skipwhite(line) - line);
2117 if (check_need_cap(lnum, col))
2126 int found_map = FALSE;
2134 int found_map = FALSE;
2139 do_sal = spin->si_sal.ga_len == 0;
2141 /* Only do MAP lines when not done in another .aff file already. */
2142 ! do_map = spin->si_map.ga_len == 0;
2145 * Allocate and init the afffile_T structure.
2147 do_sal = spin->si_sal.ga_len == 0;
2149 /* Only do MAP lines when not done in another .aff file already. */
2150 ! do_mapline = spin->si_map.ga_len == 0;
2153 * Allocate and init the afffile_T structure.
2156 smsg((char_u *)_("Expected MAP count in %s line %d"),
2164 smsg((char_u *)_("Expected MAP count in %s line %d"),
2167 ! else if (do_mapline)
2179 if (!VIM_ISDIGIT(*p))
2187 if (!VIM_ISDIGIT(*p))
2191 if (!VIM_ISDIGIT(*p))
2193 ! inc = (getdigits(&p) * 102) / (SBLOCKSIZE / 10);
2199 if (!VIM_ISDIGIT(*p))
2201 ! incr = (getdigits(&p) * 102) / (SBLOCKSIZE / 10);
2210 ! if (start == 0 || inc == 0 || added == 0 || inc > start)
2213 compress_start = start;
2214 ! compress_inc = inc;
2215 compress_added = added;
2222 ! if (start == 0 || incr == 0 || added == 0 || incr > start)
2225 compress_start = start;
2226 ! compress_inc = incr;
2227 compress_added = added;
2232 * Returns the number of nodes used.
2235 ! put_node(fd, node, index, regionmask, prefixtree)
2236 FILE *fd; /* NULL when only counting */
2240 int prefixtree; /* TRUE for PREFIXTREE */
2242 ! int newindex = index;
2243 int siblingcount = 0;
2247 * Returns the number of nodes used.
2250 ! put_node(fd, node, idx, regionmask, prefixtree)
2251 FILE *fd; /* NULL when only counting */
2255 int prefixtree; /* TRUE for PREFIXTREE */
2257 ! int newindex = idx;
2258 int siblingcount = 0;
2265 /* Store the index where this node is written. */
2266 ! node->wn_u1.index = index;
2268 /* Count the number of siblings. */
2269 for (np = node; np != NULL; np = np->wn_sibling)
2273 /* Store the index where this node is written. */
2274 ! node->wn_u1.index = idx;
2276 /* Count the number of siblings. */
2277 for (np = node; np != NULL; np = np->wn_sibling)
2280 * Add "word[len]" to 'spellfile' as a good or bad word.
2283 ! spell_add_word(word, len, bad, index, undo)
2287 ! int index; /* "zG" and "zW": zero, otherwise index in
2289 int undo; /* TRUE for "zug", "zuG", "zuw" and "zuW" */
2292 * Add "word[len]" to 'spellfile' as a good or bad word.
2295 ! spell_add_word(word, len, bad, idx, undo)
2299 ! int idx; /* "zG" and "zW": zero, otherwise index in
2301 int undo; /* TRUE for "zug", "zuG", "zuw" and "zuW" */
2308 ! if (index == 0) /* use internal wordlist */
2310 if (int_wordlist == NULL)
2316 ! if (idx == 0) /* use internal wordlist */
2318 if (int_wordlist == NULL)
2322 for (spf = curbuf->b_p_spf, i = 1; *spf != NUL; ++i)
2324 copy_option_part(&spf, fnamebuf, MAXPATHL, ",");
2329 ! EMSGN(_("E765: 'spellfile' does not have %ld entries"), index);
2334 for (spf = curbuf->b_p_spf, i = 1; *spf != NUL; ++i)
2336 copy_option_part(&spf, fnamebuf, MAXPATHL, ",");
2341 ! EMSGN(_("E765: 'spellfile' does not have %ld entries"), idx);
2346 *** 13581,13633 ****
2347 * the first "the" to itself. */
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)
2360 ! * Found it. Remember the word with the lowest score.
2362 ! if (stp->st_slang == NULL)
2363 ! stp->st_slang = slang;
2365 ! new_sug.st_score = score;
2366 ! new_sug.st_altscore = altscore;
2367 ! new_sug.st_had_bonus = had_bonus;
2369 ! if (stp->st_had_bonus != had_bonus)
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. */
2378 ! rescore_one(su, stp);
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);
2389 ! if (stp->st_score > new_sug.st_score)
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;
2398 if (i < 0 && ga_grow(gap, 1) == OK)
2400 --- 13580,13637 ----
2401 * the first "the" to itself. */
2404 ! if (gap->ga_len == 0)
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)
2418 ! * Found it. Remember the word with the lowest score.
2420 ! if (stp->st_slang == NULL)
2421 ! stp->st_slang = slang;
2423 ! new_sug.st_score = score;
2424 ! new_sug.st_altscore = altscore;
2425 ! new_sug.st_had_bonus = had_bonus;
2427 ! if (stp->st_had_bonus != had_bonus)
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. */
2436 ! rescore_one(su, stp);
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);
2447 ! if (stp->st_score > new_sug.st_score)
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;
2457 if (i < 0 && ga_grow(gap, 1) == OK)
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
2468 int row1 = clip_star.start.lnum;
2469 int col1 = clip_star.start.col;
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
2486 int did_undo; /* just did an undo */
2487 int absolute; /* used ":undo N" */
2494 int did_undo; /* just did an undo */
2495 int absolute; /* used ":undo N" */
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");
2515 u_oldcount = u_newcount;
2516 if (u_newcount == 1)
2517 ! msg = N_("change");
2519 ! msg = N_("changes");
2522 if (curbuf->b_u_curhead != NULL)
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");
2536 u_oldcount = u_newcount;
2537 if (u_newcount == 1)
2538 ! msgstr = N_("change");
2540 ! msgstr = N_("changes");
2543 if (curbuf->b_u_curhead != NULL)
2547 smsg((char_u *)_("%ld %s; %s #%ld %s"),
2548 u_oldcount < 0 ? -u_oldcount : u_oldcount,
2550 did_undo ? _("before") : _("after"),
2551 uhp == NULL ? 0L : uhp->uh_seq,
2555 smsg((char_u *)_("%ld %s; %s #%ld %s"),
2556 u_oldcount < 0 ? -u_oldcount : u_oldcount,
2558 did_undo ? _("before") : _("after"),
2559 uhp == NULL ? 0L : uhp->uh_seq,
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
2566 tabpage_T *oldtab = curtab;
2568 - win_T *wp = curwin;
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))
2577 tabpage_T *oldtab = curtab;
2580 /* First create a new tab with the window, then go back to
2581 * the old tab and close the window there. */
2583 if (win_new_tabpage((int)Prenum) == OK
2584 && valid_tabpage(oldtab))
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
2591 { /* Add new patch number below this line */
2597 hundred-and-one symptoms of being an internet addict:
2598 267. You get an extra phone line so you can get phone calls.
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 ///