4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: The macros equal() and CR conflict with a Carbon header file.
12 Solution: Rename equal() to equalpos(). Rename CR to CAR.
13 Do this in the non-extra files only.
14 Files: src/ascii.h, src/buffer.c, src/charset.c, src/edit.c, src/eval.c,
15 src/ex_cmds.c, src/ex_cmds2.c, src/ex_getln.c, src/fileio.c,
16 src/getchar.c, src/gui.c, src/gui_athena.c,
17 src/gui_gtk_x11.c, src/gui_motif.c, src/macros.h,
18 src/mark.c, src/message.c, src/misc1.c, src/misc2.c,
19 src/normal.c, src/ops.c, src/os_unix.c, src/regexp.c,
20 src/search.c, src/ui.c, src/workshop.c
23 *** ../vim-6.2.101/src/ascii.h Sun Oct 6 20:29:01 2002
24 --- src/ascii.h Sun Sep 7 23:16:15 2003
28 #define NL_STR (char_u *)"\012"
32 #define ESC_STR (char_u *)"\033"
33 #define ESC_STR_nc "\033"
36 #define NL_STR (char_u *)"\012"
38 ! #define CAR '\015' /* CR is used by Mac OS X */
40 #define ESC_STR (char_u *)"\033"
41 #define ESC_STR_nc "\033"
45 #define NL_STR (char_u *)"\x15"
49 #define ESC_STR (char_u *)"\x27"
50 #define ESC_STR_nc "\x27"
53 #define NL_STR (char_u *)"\x15"
57 #define ESC_STR (char_u *)"\x27"
58 #define ESC_STR_nc "\x27"
59 *** ../vim-6.2.101/src/buffer.c Fri Sep 12 20:23:50 2003
60 --- src/buffer.c Sun Sep 7 23:17:03 2003
66 ! else if (num == CR && get_fileformat(wp->w_buffer) == EOL_MAC)
74 ! else if (num == CAR && get_fileformat(wp->w_buffer) == EOL_MAC)
78 *** ../vim-6.2.101/src/charset.c Tue Jun 3 22:29:09 2003
79 --- src/charset.c Sun Sep 7 23:17:11 2003
84 c = NUL; /* we use newline in place of a NUL */
85 ! else if (c == CR && get_fileformat(curbuf) == EOL_MAC)
86 c = NL; /* we use CR in place of NL in this case */
88 if (dy_flags & DY_UHEX) /* 'display' has "uhex" */
92 c = NUL; /* we use newline in place of a NUL */
93 ! else if (c == CAR && get_fileformat(curbuf) == EOL_MAC)
94 c = NL; /* we use CR in place of NL in this case */
96 if (dy_flags & DY_UHEX) /* 'display' has "uhex" */
97 *** ../vim-6.2.101/src/edit.c Tue Sep 16 14:15:52 2003
98 --- src/edit.c Sat Sep 13 13:43:36 2003
108 #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
109 /* In a quickfix window a <CR> jumps to the error under the
111 ! if (bt_quickfix(curbuf) && c == CR)
113 do_cmdline_cmd((char_u *)".cc");
123 #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
124 /* In a quickfix window a <CR> jumps to the error under the
126 ! if (bt_quickfix(curbuf) && c == CAR)
128 do_cmdline_cmd((char_u *)".cc");
132 if (cmdwin_type != 0)
134 /* Execute the command in the cmdline window. */
135 ! cmdwin_result = CR;
140 if (cmdwin_type != 0)
142 /* Execute the command in the cmdline window. */
143 ! cmdwin_result = CAR;
149 curbuf = curwin->w_buffer;
152 ! if (!equal(curwin->w_cursor, tpos))
157 curbuf = curwin->w_buffer;
160 ! if (!equalpos(curwin->w_cursor, tpos))
164 *** ../vim-6.2.101/src/eval.c Wed Sep 10 21:40:26 2003
165 --- src/eval.c Wed Sep 17 21:53:22 2003
168 case 'e': name[i++] = ESC; break;
169 case 'f': name[i++] = FF; break;
170 case 'n': name[i++] = NL; break;
171 ! case 'r': name[i++] = CR; break;
172 case 't': name[i++] = TAB; break;
174 case 'X': /* hex: "\x1", "\x12" */
176 case 'e': name[i++] = ESC; break;
177 case 'f': name[i++] = FF; break;
178 case 'n': name[i++] = NL; break;
179 ! case 'r': name[i++] = CAR; break;
180 case 't': name[i++] = TAB; break;
182 case 'X': /* hex: "\x1", "\x12" */
186 n = searchit(curwin, curbuf, &pos, dir, pat, 1L,
187 SEARCH_KEEP, RE_SEARCH);
188 ! if (n == FAIL || (firstpos.lnum != 0 && equal(pos, firstpos)))
189 /* didn't find it or found the first match again: FAIL */
194 n = searchit(curwin, curbuf, &pos, dir, pat, 1L,
195 SEARCH_KEEP, RE_SEARCH);
196 ! if (n == FAIL || (firstpos.lnum != 0 && equalpos(pos, firstpos)))
197 /* didn't find it or found the first match again: FAIL */
222 ! if (s[0] == CR && s[1] == NL)
230 ! if (s[0] == CAR && s[1] == NL)
234 *** ../vim-6.2.101/src/ex_cmds.c Fri Sep 12 20:07:18 2003
235 --- src/ex_cmds.c Tue Sep 9 22:03:12 2003
239 if (p1[0] == '\\' && p1[1] != NUL) /* remove backslash */
240 mch_memmove(p1, p1 + 1, STRLEN(p1));
241 ! else if (*p1 == CR)
243 if (u_inssub(lnum) == OK) /* prepare for undo */
247 if (p1[0] == '\\' && p1[1] != NUL) /* remove backslash */
248 mch_memmove(p1, p1 + 1, STRLEN(p1));
249 ! else if (*p1 == CAR)
251 if (u_inssub(lnum) == OK) /* prepare for undo */
253 *** ../vim-6.2.101/src/ex_cmds2.c Thu Sep 11 21:25:44 2003
254 --- src/ex_cmds2.c Sun Sep 7 23:19:35 2003
257 case TAB: ga_append(&prt_ps_buffer, IF_EB('t', 0164)); break;
258 case NL: ga_append(&prt_ps_buffer, IF_EB('n', 0156)); break;
259 case FF: ga_append(&prt_ps_buffer, IF_EB('f', 0146)); break;
260 ! case CR: ga_append(&prt_ps_buffer, IF_EB('r', 0162)); break;
261 case '(': ga_append(&prt_ps_buffer, IF_EB('(', 0050)); break;
262 case ')': ga_append(&prt_ps_buffer, IF_EB(')', 0051)); break;
263 case '\\': ga_append(&prt_ps_buffer, IF_EB('\\', 0134)); break;
265 case TAB: ga_append(&prt_ps_buffer, IF_EB('t', 0164)); break;
266 case NL: ga_append(&prt_ps_buffer, IF_EB('n', 0156)); break;
267 case FF: ga_append(&prt_ps_buffer, IF_EB('f', 0146)); break;
268 ! case CAR: ga_append(&prt_ps_buffer, IF_EB('r', 0162)); break;
269 case '(': ga_append(&prt_ps_buffer, IF_EB('(', 0050)); break;
270 case ')': ga_append(&prt_ps_buffer, IF_EB(')', 0051)); break;
271 case '\\': ga_append(&prt_ps_buffer, IF_EB('\\', 0134)); break;
272 *** ../vim-6.2.101/src/ex_getln.c Sun Aug 10 22:24:37 2003
273 --- src/ex_getln.c Sun Sep 7 23:20:11 2003
276 if (cmdwin_result == K_XF1) /* :qa! typed */
278 ccline.cmdbuff = vim_strsave((char_u *)"qa!");
279 ! cmdwin_result = CR;
281 else if (cmdwin_result == K_XF2) /* :qa typed */
283 ccline.cmdbuff = vim_strsave((char_u *)"qa");
284 ! cmdwin_result = CR;
287 ccline.cmdbuff = vim_strsave(ml_get_curline());
289 if (cmdwin_result == K_XF1) /* :qa! typed */
291 ccline.cmdbuff = vim_strsave((char_u *)"qa!");
292 ! cmdwin_result = CAR;
294 else if (cmdwin_result == K_XF2) /* :qa typed */
296 ccline.cmdbuff = vim_strsave((char_u *)"qa");
297 ! cmdwin_result = CAR;
300 ccline.cmdbuff = vim_strsave(ml_get_curline());
301 *** ../vim-6.2.101/src/fileio.c Sun Jul 27 14:19:17 2003
302 --- src/fileio.c Wed Sep 17 22:01:56 2003
308 ! || (try_dos && p > ptr && p[-1] == CR))
309 fileformat = EOL_DOS;
311 fileformat = EOL_UNIX;
316 ! || (try_dos && p > ptr && p[-1] == CAR))
317 fileformat = EOL_DOS;
319 fileformat = EOL_UNIX;
322 /* Need to reset the counters when retrying fenc. */
325 ! for (; p >= ptr && *p != CR; p--)
330 /* Need to reset the counters when retrying fenc. */
333 ! for (; p >= ptr && *p != CAR; p--)
345 if (try_mac > try_unix)
350 ! else if (*p == CAR)
353 if (try_mac > try_unix)
356 while (++ptr, --size >= 0)
358 /* catch most common case first */
359 ! if ((c = *ptr) != NUL && c != CR && c != NL)
362 *ptr = NL; /* NULs are replaced by newlines! */
364 ! *ptr = CR; /* NLs are replaced by CRs! */
369 while (++ptr, --size >= 0)
371 /* catch most common case first */
372 ! if ((c = *ptr) != NUL && c != CAR && c != NL)
375 *ptr = NL; /* NULs are replaced by newlines! */
377 ! *ptr = CAR; /* NLs are replaced by CRs! */
383 len = (colnr_T)(ptr - line_start + 1);
384 if (fileformat == EOL_DOS)
386 ! if (ptr[-1] == CR) /* remove CR */
391 len = (colnr_T)(ptr - line_start + 1);
392 if (fileformat == EOL_DOS)
394 ! if (ptr[-1] == CAR) /* remove CR */
402 *s = NUL; /* replace newlines with NULs */
403 ! else if (c == CR && fileformat == EOL_MAC)
404 *s = NL; /* Mac: replace CRs with NLs */
410 *s = NUL; /* replace newlines with NULs */
411 ! else if (c == CAR && fileformat == EOL_MAC)
412 *s = NL; /* Mac: replace CRs with NLs */
420 ! *s++ = CR; /* EOL_MAC or EOL_DOS: write CR */
421 if (fileformat == EOL_DOS) /* write CR-NL */
423 if (++len == bufsize)
428 ! *s++ = CAR; /* EOL_MAC or EOL_DOS: write CR */
429 if (fileformat == EOL_DOS) /* write CR-NL */
431 if (++len == bufsize)
432 *** ../vim-6.2.101/src/getchar.c Tue May 20 21:33:40 2003
433 --- src/getchar.c Sun Sep 7 23:21:09 2003
436 case K_KMINUS: c = '-'; break;
437 case K_KDIVIDE: c = '/'; break;
438 case K_KMULTIPLY: c = '*'; break;
439 ! case K_KENTER: c = CR; break;
440 case K_KPOINT: c = '.'; break;
441 case K_K0: c = '0'; break;
442 case K_K1: c = '1'; break;
444 case K_KMINUS: c = '-'; break;
445 case K_KDIVIDE: c = '/'; break;
446 case K_KMULTIPLY: c = '*'; break;
447 ! case K_KENTER: c = CAR; break;
448 case K_KPOINT: c = '.'; break;
449 case K_K0: c = '0'; break;
450 case K_K1: c = '1'; break;
453 && typebuf.tb_noremap[typebuf.tb_off]
455 && !(p_paste && (State & (INSERT + CMDLINE)))
456 ! && !(State == HITRETURN && (c1 == CR || c1 == ' '))
459 #ifdef FEAT_INS_EXPAND
461 && typebuf.tb_noremap[typebuf.tb_off]
463 && !(p_paste && (State & (INSERT + CMDLINE)))
464 ! && !(State == HITRETURN && (c1 == CAR || c1 == ' '))
467 #ifdef FEAT_INS_EXPAND
468 *** ../vim-6.2.101/src/gui.c Sat May 17 21:46:27 2003
469 --- src/gui.c Sun Sep 7 22:45:17 2003
472 updateWindow(wp); /* update window, status line, and cmdline */
475 ! return (wp == curwin && !equal(curwin->w_cursor, old_cursor));
480 updateWindow(wp); /* update window, status line, and cmdline */
483 ! return (wp == curwin && !equalpos(curwin->w_cursor, old_cursor));
487 *** ../vim-6.2.101/src/gui_athena.c Sun May 25 19:43:14 2003
488 --- src/gui_athena.c Sun Sep 7 23:21:28 2003
492 if (XLookupString(&(event->xkey), buf, 2, NULL, NULL) == 1)
496 else if (*buf == ESC)
500 if (XLookupString(&(event->xkey), buf, 2, NULL, NULL) == 1)
504 else if (*buf == ESC)
506 *** ../vim-6.2.101/src/gui_gtk_x11.c Mon Jun 2 22:16:24 2003
507 --- src/gui_gtk_x11.c Sun Sep 7 23:21:49 2003
512 case GDK_Return: case GDK_ISO_Enter: case GDK_3270_Enter:
520 case GDK_Return: case GDK_ISO_Enter: case GDK_3270_Enter:
525 *** ../vim-6.2.101/src/gui_motif.c Sat May 24 19:30:02 2003
526 --- src/gui_motif.c Sun Sep 7 23:22:40 2003
530 if (XLookupString(&(event->xkey), buf, 2, &key_sym, NULL) == 1)
534 else if (*buf == ESC)
538 if (XLookupString(&(event->xkey), buf, 2, &key_sym, NULL) == 1)
542 else if (*buf == ESC)
544 *** ../vim-6.2.101/src/macros.h Sat May 3 15:51:27 2003
545 --- src/macros.h Sun Sep 7 22:45:38 2003
548 : (a)->col != (b)->col \
549 ? (a)->col < (b)->col \
550 : (a)->coladd < (b)->coladd)
551 ! # define equal(a, b) (((a).lnum == (b).lnum) && ((a).col == (b).col) && ((a).coladd == (b).coladd))
553 # define lt(a, b) (((a).lnum != (b).lnum) \
554 ? ((a).lnum < (b).lnum) : ((a).col < (b).col))
555 # define ltp(a, b) (((a)->lnum != (b)->lnum) \
556 ? ((a)->lnum < (b)->lnum) : ((a)->col < (b)->col))
557 ! # define equal(a, b) (((a).lnum == (b).lnum) && ((a).col == (b).col))
560 ! #define ltoreq(a, b) (lt(a, b) || equal(a, b))
563 * lineempty() - return TRUE if the line is empty
565 : (a)->col != (b)->col \
566 ? (a)->col < (b)->col \
567 : (a)->coladd < (b)->coladd)
568 ! # define equalpos(a, b) (((a).lnum == (b).lnum) && ((a).col == (b).col) && ((a).coladd == (b).coladd))
570 # define lt(a, b) (((a).lnum != (b).lnum) \
571 ? ((a).lnum < (b).lnum) : ((a).col < (b).col))
572 # define ltp(a, b) (((a)->lnum != (b)->lnum) \
573 ? ((a)->lnum < (b)->lnum) : ((a)->col < (b)->col))
574 ! # define equalpos(a, b) (((a).lnum == (b).lnum) && ((a).col == (b).col))
577 ! #define ltoreq(a, b) (lt(a, b) || equalpos(a, b))
580 * lineempty() - return TRUE if the line is empty
581 *** ../vim-6.2.101/src/mark.c Sun Jul 27 14:22:19 2003
582 --- src/mark.c Sun Sep 7 22:45:54 2003
587 if (curwin->w_prev_pcmark.lnum != 0
588 ! && (equal(curwin->w_pcmark, curwin->w_cursor)
589 || curwin->w_pcmark.lnum == 0))
591 curwin->w_pcmark = curwin->w_prev_pcmark;
595 if (curwin->w_prev_pcmark.lnum != 0
596 ! && (equalpos(curwin->w_pcmark, curwin->w_cursor)
597 || curwin->w_pcmark.lnum == 0))
599 curwin->w_pcmark = curwin->w_prev_pcmark;
600 *** ../vim-6.2.101/src/message.c Sun Aug 10 22:39:59 2003
601 --- src/message.c Sun Sep 7 23:25:22 2003
607 ! redir_off = TRUE; /* don't redirect this message */
611 ! c = CR; /* just pretend CR was hit */
615 else if (exmode_active)
617 ! MSG_PUTS(" "); /* make sure the cursor is on the right line */
618 ! c = CR; /* no need for a return in ex mode */
626 ! redir_off = TRUE; /* don't redirect this message */
630 ! c = CAR; /* just pretend CR was hit */
634 else if (exmode_active)
636 ! MSG_PUTS(" "); /* make sure the cursor is on the right line */
637 ! c = CAR; /* no need for a return in ex mode */
646 ! case CR: /* one extra line */
654 ! case CAR: /* one extra line */
663 ! case CR: /* User accepts default option */
671 ! case CAR: /* User accepts default option */
675 *** ../vim-6.2.101/src/misc1.c Sun Aug 10 22:24:37 2003
676 --- src/misc1.c Fri Sep 26 22:09:58 2003
682 ! else if (c == CR || c == NL || c == Ctrl_C || c == ESC)
690 ! else if (c == CAR || c == NL || c == Ctrl_C || c == ESC)
694 *** ../vim-6.2.101/src/misc2.c Fri Sep 12 20:20:20 2003
695 --- src/misc2.c Sun Sep 7 23:25:58 2003
698 {NL, (char_u *)"NewLine"}, /* Alternative name */
699 {NL, (char_u *)"LineFeed"}, /* Alternative name */
700 {NL, (char_u *)"LF"}, /* Alternative name */
701 ! {CR, (char_u *)"CR"},
702 ! {CR, (char_u *)"Return"}, /* Alternative name */
703 ! {CR, (char_u *)"Enter"}, /* Alternative name */
704 {K_BS, (char_u *)"BS"},
705 {K_BS, (char_u *)"BackSpace"}, /* Alternative name */
706 {ESC, (char_u *)"Esc"},
708 {NL, (char_u *)"NewLine"}, /* Alternative name */
709 {NL, (char_u *)"LineFeed"}, /* Alternative name */
710 {NL, (char_u *)"LF"}, /* Alternative name */
711 ! {CAR, (char_u *)"CR"},
712 ! {CAR, (char_u *)"Return"}, /* Alternative name */
713 ! {CAR, (char_u *)"Enter"}, /* Alternative name */
714 {K_BS, (char_u *)"BS"},
715 {K_BS, (char_u *)"BackSpace"}, /* Alternative name */
716 {ESC, (char_u *)"Esc"},
717 *** ../vim-6.2.101/src/normal.c Thu Sep 11 21:21:21 2003
718 --- src/normal.c Sun Sep 7 23:26:22 2003
721 {NL, nv_down, 0, FALSE},
722 {Ctrl_K, nv_error, 0, 0},
723 {Ctrl_L, nv_clear, 0, 0},
724 ! {CR, nv_down, 0, TRUE},
725 {Ctrl_N, nv_down, NV_STS, FALSE},
726 {Ctrl_O, nv_ctrlo, 0, 0},
727 {Ctrl_P, nv_up, NV_STS, FALSE},
729 {NL, nv_down, 0, FALSE},
730 {Ctrl_K, nv_error, 0, 0},
731 {Ctrl_L, nv_clear, 0, 0},
732 ! {CAR, nv_down, 0, TRUE},
733 {Ctrl_N, nv_down, NV_STS, FALSE},
734 {Ctrl_O, nv_ctrlo, 0, 0},
735 {Ctrl_P, nv_up, NV_STS, FALSE},
741 ! && (vim_isprintc(c) || c == NL || c == CR || c == K_KENTER))
744 char_u buf[MB_MAXBYTES + 1];
749 ! && (vim_isprintc(c) || c == NL || c == CAR || c == K_KENTER))
752 char_u buf[MB_MAXBYTES + 1];
756 || (oap->op_type == OP_YANK
757 && gchar_pos(&oap->end) == NUL))
758 ! && equal(oap->start, oap->end)
759 #ifdef FEAT_VIRTUALEDIT
760 && !(virtual_op && oap->start.coladd != oap->end.coladd)
764 || (oap->op_type == OP_YANK
765 && gchar_pos(&oap->end) == NUL))
766 ! && equalpos(oap->start, oap->end)
767 #ifdef FEAT_VIRTUALEDIT
768 && !(virtual_op && oap->start.coladd != oap->end.coladd)
773 && VIsual_mode == 'v'
774 && !vim_iswordc(gchar_pos(&end_visual))
775 ! && equal(curwin->w_cursor, VIsual)
776 && (pos = findmatch(oap, NUL)) != NULL)
778 curwin->w_cursor = *pos;
781 && VIsual_mode == 'v'
782 && !vim_iswordc(gchar_pos(&end_visual))
783 ! && equalpos(curwin->w_cursor, VIsual)
784 && (pos = findmatch(oap, NUL)) != NULL)
786 curwin->w_cursor = *pos;
790 else if (vim_isdigit(nchar))
791 n = n * 10 + (nchar - '0');
792 ! else if (nchar == CR)
795 need_mouse_correct = TRUE;
798 else if (vim_isdigit(nchar))
799 n = n * 10 + (nchar - '0');
800 ! else if (nchar == CAR)
803 need_mouse_correct = TRUE;
811 beginline(BL_WHITE | BL_FIX);
819 beginline(BL_WHITE | BL_FIX);
824 /* In the cmdline window a <CR> executes the command. */
825 if (cmdwin_type != 0 && cap->cmdchar == '\r')
826 ! cmdwin_result = CR;
832 /* In the cmdline window a <CR> executes the command. */
833 if (cmdwin_type != 0 && cap->cmdchar == '\r')
834 ! cmdwin_result = CAR;
843 ! if (*p_sel == 'e' && !equal(VIsual, curwin->w_cursor))
845 if (lt(VIsual, curwin->w_cursor))
846 pp = &curwin->w_cursor;
851 ! if (*p_sel == 'e' && !equalpos(VIsual, curwin->w_cursor))
853 if (lt(VIsual, curwin->w_cursor))
854 pp = &curwin->w_cursor;
855 *** ../vim-6.2.101/src/ops.c Fri Sep 12 20:29:23 2003
856 --- src/ops.c Wed Sep 17 21:59:01 2003
862 ! if (cv == Ctrl_V || c == ESC || c == Ctrl_C || c == CR || c == NL
870 ! if (cv == Ctrl_V || c == ESC || c == Ctrl_C || c == CAR || c == NL
874 *** ../vim-6.2.101/src/os_unix.c Wed Sep 10 22:51:29 2003
875 --- src/os_unix.c Sun Sep 7 23:27:25 2003
878 /* Translate <CR><NL> into <NL>. Caution, buffer may contain NUL. */
880 for (i = 0; i < len; ++i)
881 ! if (!(buffer[i] == CR && buffer[i + 1] == NL))
886 /* Translate <CR><NL> into <NL>. Caution, buffer may contain NUL. */
888 for (i = 0; i < len; ++i)
889 ! if (!(buffer[i] == CAR && buffer[i + 1] == NL))
893 *** ../vim-6.2.101/src/regexp.c Sun Jul 27 14:49:17 2003
894 --- src/regexp.c Sun Sep 7 23:28:09 2003
900 ! case 'r': return CR;
901 case 't': return TAB;
902 case 'e': return ESC;
908 ! case 'r': return CAR;
909 case 't': return TAB;
910 case 'e': return ESC;
914 /* Change NL to CR, so that it becomes a line break.
915 * Skip over a backslashed character. */
918 else if (*s == '\\' && s[1] != NUL)
922 /* Change NL to CR, so that it becomes a line break.
923 * Skip over a backslashed character. */
926 else if (*s == '\\' && s[1] != NUL)
931 /* Check for abbreviations -- webb */
934 ! case 'r': c = CR; ++src; break;
935 case 'n': c = NL; ++src; break;
936 case 't': c = TAB; ++src; break;
937 /* Oh no! \e already has meaning in subst pat :-( */
939 /* Check for abbreviations -- webb */
942 ! case 'r': c = CAR; ++src; break;
943 case 'n': c = NL; ++src; break;
944 case 't': c = TAB; ++src; break;
945 /* Oh no! \e already has meaning in subst pat :-( */
948 if (reg_mmatch->endpos[no].lnum == clnum)
953 s = reg_getline(++clnum);
954 if (reg_mmatch->endpos[no].lnum == clnum)
956 if (reg_mmatch->endpos[no].lnum == clnum)
961 s = reg_getline(++clnum);
962 if (reg_mmatch->endpos[no].lnum == clnum)
968 ! if (backslash && (*s == CR || *s == '\\'))
971 * Insert a backslash in front of a CR, otherwise
976 ! if (backslash && (*s == CAR || *s == '\\'))
979 * Insert a backslash in front of a CR, otherwise
980 *** ../vim-6.2.101/src/search.c Thu Sep 11 21:42:32 2003
981 --- src/search.c Sun Sep 7 22:47:43 2003
984 * When Visual mode is not active, or when the VIsual area is only one
985 * character, select the word and/or white space under the cursor.
987 ! if (!VIsual_active || equal(curwin->w_cursor, VIsual))
992 * When Visual mode is not active, or when the VIsual area is only one
993 * character, select the word and/or white space under the cursor.
995 ! if (!VIsual_active || equalpos(curwin->w_cursor, VIsual))
1002 * When visual area is bigger than one character: Extend it.
1004 ! if (VIsual_active && !equal(start_pos, VIsual))
1007 if (lt(start_pos, VIsual))
1010 * When visual area is bigger than one character: Extend it.
1012 ! if (VIsual_active && !equalpos(start_pos, VIsual))
1015 if (lt(start_pos, VIsual))
1020 findsent(BACKWARD, 1L);
1021 ! if (equal(curwin->w_cursor, start_pos))
1022 at_start_sent = TRUE; /* exactly at start of sentence */
1024 /* inside a sentence, go to its end (start of next) */
1028 findsent(BACKWARD, 1L);
1029 ! if (equalpos(curwin->w_cursor, start_pos))
1030 at_start_sent = TRUE; /* exactly at start of sentence */
1032 /* inside a sentence, go to its end (start of next) */
1037 at_start_sent = TRUE;
1038 ! if (!equal(pos, curwin->w_cursor)) /* not just before a sentence */
1040 at_start_sent = FALSE;
1041 while (lt(pos, curwin->w_cursor))
1045 at_start_sent = TRUE;
1046 ! if (!equalpos(pos, curwin->w_cursor)) /* not just before a sentence */
1048 at_start_sent = FALSE;
1049 while (lt(pos, curwin->w_cursor))
1053 while (c = gchar_pos(&pos), vim_iswhite(c)) /* vim_iswhite() is a macro */
1055 ! if (equal(pos, curwin->w_cursor))
1058 find_first_blank(&start_pos); /* go back to first blank */
1061 while (c = gchar_pos(&pos), vim_iswhite(c)) /* vim_iswhite() is a macro */
1063 ! if (equalpos(pos, curwin->w_cursor))
1066 find_first_blank(&start_pos); /* go back to first blank */
1071 /* avoid getting stuck with "is" on a single space before a sent. */
1072 ! if (equal(start_pos, curwin->w_cursor))
1075 ++curwin->w_cursor.col;
1079 /* avoid getting stuck with "is" on a single space before a sent. */
1080 ! if (equalpos(start_pos, curwin->w_cursor))
1083 ++curwin->w_cursor.col;
1086 * If we start on '(', '{', ')', '}', etc., use the whole block inclusive.
1089 ! if (!VIsual_active || equal(VIsual, curwin->w_cursor))
1094 * If we start on '(', '{', ')', '}', etc., use the whole block inclusive.
1097 ! if (!VIsual_active || equalpos(VIsual, curwin->w_cursor))
1101 *** ../vim-6.2.101/src/ui.c Sat May 17 16:12:34 2003
1102 --- src/ui.c Sun Sep 7 23:28:45 2003
1106 if (wtime == -1 && ++count == 1000)
1114 if (wtime == -1 && ++count == 1000)
1122 start = curwin->w_cursor;
1125 ! if (!equal(clip_star.start, start) || !equal(clip_star.end, end)
1126 ! || clip_star.vmode != VIsual_mode)
1128 clip_clear_selection();
1129 clip_star.start = start;
1131 start = curwin->w_cursor;
1134 ! if (!equalpos(clip_star.start, start)
1135 ! || !equalpos(clip_star.end, end)
1136 ! || clip_star.vmode != VIsual_mode)
1138 clip_clear_selection();
1139 clip_star.start = start;
1140 *** ../vim-6.2.101/src/workshop.c Mon Mar 10 20:04:17 2003
1141 --- src/workshop.c Sat Sep 13 16:09:50 2003
1144 *curCol = curwin->w_cursor.col;
1146 if (curbuf->b_visual_mode == 'v' &&
1147 ! equal(curwin->w_cursor, curbuf->b_visual_end))
1149 *selStartLine = curbuf->b_visual_start.lnum;
1150 *selStartCol = curbuf->b_visual_start.col;
1152 *curCol = curwin->w_cursor.col;
1154 if (curbuf->b_visual_mode == 'v' &&
1155 ! equalpos(curwin->w_cursor, curbuf->b_visual_end))
1157 *selStartLine = curbuf->b_visual_start.lnum;
1158 *selStartCol = curbuf->b_visual_start.col;
1159 *** ../vim-6.2.101/src/version.c Sat Sep 27 19:26:33 2003
1160 --- src/version.c Sat Sep 27 19:31:42 2003
1164 { /* Add new patch number below this line */
1170 hundred-and-one symptoms of being an internet addict:
1171 34. You laugh at people with 14400 baud modems.
1173 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
1174 /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
1175 \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
1176 \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///