4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: Repeating insert of CTRL-K 1 S doesn't work. The superscript 1 is
12 considered to be a digit. (Juergen Kraemer)
13 Solution: In vim_isdigit() only accept '0' to '9'. Use VIM_ISDIGIT() for
14 speed where possible. Also add vim_isxdigit().
15 Files: src/buffer.c, src/charset.c, src/diff.c, src/digraph.c,
16 src/edit.c, src/eval.c,, src/ex_cmds.c, src/ex_cmds2.c,
17 src/ex_docmd.c, src/ex_eval.c, src/ex_getln.c,
18 src/if_xcmdsrv.c, src/farsi.c, src/fileio.c, src/fold.c,
19 src/getchar.c, src/gui.c, src/if_cscope.c, src/macros.h,
20 src/main.c, src/mark.c, src/mbyte.c, src/menu.c, src/misc1.c,
21 src/misc2.c, src/normal.c, src/ops.c, src/option.c,
22 src/proto/charset.pro, src/regexp.c, src/screen.c, src/search.c,
23 src/syntax.c, src/tag.c, src/term.c, src/termlib.c
26 *** ../vim-6.2.481/src/buffer.c Sun Apr 4 12:06:41 2004
27 --- src/buffer.c Mon Apr 19 19:00:31 2004
35 p = skiptowhite_esc(arg);
36 bnr = buflist_findpat(arg, p, command == DOBUF_WIPE, FALSE);
41 ! if (!VIM_ISDIGIT(*arg))
43 p = skiptowhite_esc(arg);
44 bnr = buflist_findpat(arg, p, command == DOBUF_WIPE, FALSE);
52 minwid = (int)getdigits(&s);
53 if (minwid < 0) /* overflow */
58 ! if (VIM_ISDIGIT(*s))
60 minwid = (int)getdigits(&s);
61 if (minwid < 0) /* overflow */
69 maxwid = (int)getdigits(&s);
70 if (maxwid <= 0) /* overflow */
75 ! if (VIM_ISDIGIT(*s))
77 maxwid = (int)getdigits(&s);
78 if (maxwid <= 0) /* overflow */
81 for (; l < minwid && p + 1 < out + outlen; l++)
83 /* Don't put a "-" in front of a digit. */
84 ! if (l + 1 == minwid && fillchar == '-' && isdigit(*t))
89 for (; l < minwid && p + 1 < out + outlen; l++)
91 /* Don't put a "-" in front of a digit. */
92 ! if (l + 1 == minwid && fillchar == '-' && VIM_ISDIGIT(*t))
98 /* Change a space by fillchar, unless fillchar is '-' and a
100 if (fillable && p[-1] == ' '
101 ! && (!isdigit(*t) || fillchar != '-'))
104 for (; l < minwid && p + 1 < out + outlen; l++)
106 /* Change a space by fillchar, unless fillchar is '-' and a
108 if (fillable && p[-1] == ' '
109 ! && (!VIM_ISDIGIT(*t) || fillchar != '-'))
112 for (; l < minwid && p + 1 < out + outlen; l++)
113 *** ../vim-6.2.481/src/charset.c Tue Mar 23 23:11:09 2004
114 --- src/charset.c Mon Apr 19 19:00:38 2004
128 ! if (VIM_ISDIGIT(*p))
134 if (*p == '-' && p[1] != NUL)
142 if (*p == '-' && p[1] != NUL)
145 ! if (VIM_ISDIGIT(*p))
154 ! while (isdigit(*p)) /* skip to next non-digit */
160 ! * vim_isdigit: version of isdigit() that can handle characters > 0x100.
166 ! return (c > 0 && c < 0x100 && isdigit(c));
174 ! while (VIM_ISDIGIT(*p)) /* skip to next non-digit */
180 ! * Variant of isdigit() that can handle characters > 0x100.
181 ! * We don't use isdigit() here, because on some systems it also considers
182 ! * superscript 1 to be a digit.
183 ! * Use the VIM_ISDIGIT() macro for simple arguments.
189 ! return (c >= '0' && c <= '9');
193 ! * Variant of isxdigit() that can handle characters > 0x100.
194 ! * We don't use isxdigit() here, because on some systems it also considers
195 ! * superscript 1 to be a digit.
201 ! return (c >= '0' && c <= '9')
202 ! || (c >= 'a' && c <= 'f')
203 ! || (c >= 'A' && c <= 'F');
209 if (ptr[0] == '0') /* could be hex or octal */
212 ! if (dohex && (hex == 'X' || hex == 'x') && isxdigit(ptr[2]))
213 ptr += 2; /* hexadecimal */
216 ! if (dooct && isdigit(hex))
217 hex = '0'; /* octal */
219 hex = 0; /* 0 by itself is decimal */
221 if (ptr[0] == '0') /* could be hex or octal */
224 ! if (dohex && (hex == 'X' || hex == 'x') && vim_isxdigit(ptr[2]))
225 ptr += 2; /* hexadecimal */
228 ! if (dooct && VIM_ISDIGIT(hex))
229 hex = '0'; /* octal */
231 hex = 0; /* 0 by itself is decimal */
237 ! while (isxdigit(*ptr))
239 n = 16 * n + (long)hex2nr(*ptr);
240 un = 16 * un + (unsigned long)hex2nr(*ptr);
245 ! while (vim_isxdigit(*ptr))
247 n = 16 * n + (long)hex2nr(*ptr);
248 un = 16 * un + (unsigned long)hex2nr(*ptr);
254 ! while (isdigit(*ptr))
256 n = 10 * n + (long)(*ptr - '0');
257 un = 10 * un + (unsigned long)(*ptr - '0');
262 ! while (VIM_ISDIGIT(*ptr))
264 n = 10 * n + (long)(*ptr - '0');
265 un = 10 * un + (unsigned long)(*ptr - '0');
271 ! if (!isxdigit(p[0]) || !isxdigit(p[1]))
273 return (hex2nr(p[0]) << 4) + hex2nr(p[1]);
279 ! if (!vim_isxdigit(p[0]) || !vim_isxdigit(p[1]))
281 return (hex2nr(p[0]) << 4) + hex2nr(p[1]);
283 *** ../vim-6.2.481/src/diff.c Wed Mar 3 21:08:15 2004
284 --- src/diff.c Mon Apr 19 19:00:42 2004
288 diff_flags_new |= DIFF_FILLER;
290 ! else if (STRNCMP(p, "context:", 8) == 0 && isdigit(p[8]))
293 diff_context_new = getdigits(&p);
296 diff_flags_new |= DIFF_FILLER;
298 ! else if (STRNCMP(p, "context:", 8) == 0 && VIM_ISDIGIT(p[8]))
301 diff_context_new = getdigits(&p);
304 p = eap->arg + STRLEN(eap->arg);
305 while (p > eap->arg && vim_iswhite(p[-1]))
307 ! for (i = 0; isdigit(eap->arg[i]) && eap->arg + i < p; ++i)
309 if (eap->arg + i == p) /* digits only */
310 i = atol((char *)eap->arg);
312 p = eap->arg + STRLEN(eap->arg);
313 while (p > eap->arg && vim_iswhite(p[-1]))
315 ! for (i = 0; vim_isdigit(eap->arg[i]) && eap->arg + i < p; ++i)
317 if (eap->arg + i == p) /* digits only */
318 i = atol((char *)eap->arg);
319 *** ../vim-6.2.481/src/digraph.c Sun Mar 14 20:12:26 2004
320 --- src/digraph.c Mon Apr 19 19:00:45 2004
325 str = skipwhite(str);
326 ! if (!isdigit(*str))
328 EMSG(_(e_number_exp));
333 str = skipwhite(str);
334 ! if (!VIM_ISDIGIT(*str))
336 EMSG(_(e_number_exp));
338 *** ../vim-6.2.481/src/edit.c Sat Apr 3 17:00:08 2004
339 --- src/edit.c Mon Apr 19 19:00:48 2004
345 ! /* Careful: isxdigit() on Win32 can handle only 0-255 */
346 ! if (nc < 0 || nc > 255 || (!vim_isdigit(nc) && !isxdigit(nc)))
348 cc = cc * 16 + hex2nr(nc);
352 ! if (!vim_isdigit(nc) || (nc > '7'))
354 cc = cc * 8 + nc - '0';
358 ! if (!vim_isdigit(nc))
360 cc = cc * 10 + nc - '0';
366 ! if (!vim_isxdigit(nc))
368 cc = cc * 16 + hex2nr(nc);
372 ! if (nc < '0' || nc > '7')
374 cc = cc * 8 + nc - '0';
378 ! if (!VIM_ISDIGIT(nc))
380 cc = cc * 10 + nc - '0';
385 /* Only digits need special treatment. Translate them into a string of
387 ! if (vim_isdigit(c))
389 sprintf((char *)buf, "%03d", c);
390 AppendToRedobuff(buf);
393 /* Only digits need special treatment. Translate them into a string of
395 ! if (VIM_ISDIGIT(c))
397 sprintf((char *)buf, "%03d", c);
398 AppendToRedobuff(buf);
399 diff: src/eval.c,: No such file or directory
400 *** ../vim-6.2.481/src/ex_cmds.c Wed Apr 14 22:39:35 2004
401 --- src/ex_cmds.c Mon Apr 19 19:00:57 2004
407 ! if (virp->vir_line[off] == Ctrl_V && isdigit(virp->vir_line[off + 1]))
409 len = atol((char *)virp->vir_line + off + 1);
410 retval = lalloc(len, TRUE);
415 ! if (virp->vir_line[off] == Ctrl_V && vim_isdigit(virp->vir_line[off + 1]))
417 len = atol((char *)virp->vir_line + off + 1);
418 retval = lalloc(len, TRUE);
426 EMSG(_("E144: non-numeric argument to :z"));
432 ! if (!VIM_ISDIGIT(*x))
434 EMSG(_("E144: non-numeric argument to :z"));
438 * check for a trailing count
440 cmd = skipwhite(cmd);
444 if (i <= 0 && !eap->skip && do_error)
446 * check for a trailing count
448 cmd = skipwhite(cmd);
449 ! if (VIM_ISDIGIT(*cmd))
452 if (i <= 0 && !eap->skip && do_error)
456 /* If the name is a number use that for the typenr,
457 * otherwise use a negative number. */
459 sp->sn_typenr = atoi((char *)arg);
464 /* If the name is a number use that for the typenr,
465 * otherwise use a negative number. */
466 ! if (VIM_ISDIGIT(*arg))
467 sp->sn_typenr = atoi((char *)arg);
473 /* first arg could be placed sign id */
477 id = getdigits(&arg);
478 if (!vim_iswhite(*arg) && *arg != NUL)
481 /* first arg could be placed sign id */
483 ! if (VIM_ISDIGIT(*arg))
485 id = getdigits(&arg);
486 if (!vim_iswhite(*arg) && *arg != NUL)
487 *** ../vim-6.2.481/src/ex_cmds2.c Fri Apr 2 22:25:53 2004
488 --- src/ex_cmds2.c Mon Apr 19 19:01:02 2004
491 p = skipwhite(p + 4);
493 /* Find optional line number. */
496 bp->dbg_lnum = getdigits(&p);
499 p = skipwhite(p + 4);
501 /* Find optional line number. */
502 ! if (VIM_ISDIGIT(*p))
504 bp->dbg_lnum = getdigits(&p);
509 linenr_T best_lnum = 0;
511 ! if (isdigit(*eap->arg))
513 /* ":breakdel {nr}" */
514 nr = atol((char *)eap->arg);
517 linenr_T best_lnum = 0;
519 ! if (vim_isdigit(*eap->arg))
521 /* ":breakdel {nr}" */
522 nr = atol((char *)eap->arg);
526 fontsize = PRT_PS_DEFAULT_FONTSIZE;
527 for (p = p_pfn; (p = vim_strchr(p, ':')) != NULL; ++p)
528 ! if (p[1] == 'h' && isdigit(p[2]))
529 fontsize = atoi((char *)p + 2);
530 prt_font_metrics(fontsize);
534 fontsize = PRT_PS_DEFAULT_FONTSIZE;
535 for (p = p_pfn; (p = vim_strchr(p, ':')) != NULL; ++p)
536 ! if (p[1] == 'h' && VIM_ISDIGIT(p[2]))
537 fontsize = atoi((char *)p + 2);
538 prt_font_metrics(fontsize);
540 *** ../vim-6.2.481/src/ex_docmd.c Fri Apr 16 11:14:51 2004
541 --- src/ex_docmd.c Mon Apr 19 19:01:12 2004
544 * 2. handle command modifiers.
547 ! if (isdigit(*ea.cmd))
548 p = skipwhite(skipdigits(ea.cmd));
552 * 2. handle command modifiers.
555 ! if (VIM_ISDIGIT(*ea.cmd))
556 p = skipwhite(skipdigits(ea.cmd));
562 && valid_yank_reg(*ea.arg, ea.cmdidx != CMD_put)
564 ! && !((ea.argt & COUNT) && isdigit(*ea.arg)))
566 ea.regname = *ea.arg++;
570 && valid_yank_reg(*ea.arg, ea.cmdidx != CMD_put)
572 ! && !((ea.argt & COUNT) && VIM_ISDIGIT(*ea.arg)))
574 ea.regname = *ea.arg++;
578 * Check for a count. When accepting a BUFNAME, don't use "123foo" as a
579 * count, it's a buffer name.
581 ! if ((ea.argt & COUNT) && isdigit(*ea.arg)
582 && (!(ea.argt & BUFNAME) || *(p = skipdigits(ea.arg)) == NUL
586 * Check for a count. When accepting a BUFNAME, don't use "123foo" as a
587 * count, it's a buffer name.
589 ! if ((ea.argt & COUNT) && VIM_ISDIGIT(*ea.arg)
590 && (!(ea.argt & BUFNAME) || *(p = skipdigits(ea.arg)) == NUL
596 while (k < len && *np != NUL && *cp++ == *np++)
598 ! if (k == len || (*np == NUL && isdigit(eap->cmd[k])))
600 /* If finding a second match, the command is
601 * ambiguous. But not if a buffer-local command
604 while (k < len && *np != NUL && *cp++ == *np++)
606 ! if (k == len || (*np == NUL && vim_isdigit(eap->cmd[k])))
608 /* If finding a second match, the command is
609 * ambiguous. But not if a buffer-local command
613 while (k < i && *np != NUL && *cp++ == *np++)
615 ! if (k == i || (*np == NUL && isdigit(cmd[k])))
621 while (k < i && *np != NUL && *cp++ == *np++)
623 ! if (k == i || (*np == NUL && VIM_ISDIGIT(cmd[k])))
632 ! while (*cmd != NUL && (vim_isspace(*cmd) || isdigit(*cmd) ||
633 vim_strchr((char_u *)".$%'/?-+,;", *cmd) != NULL))
640 ! while (*cmd != NUL && (vim_isspace(*cmd) || VIM_ISDIGIT(*cmd) ||
641 vim_strchr((char_u *)".$%'/?-+,;", *cmd) != NULL))
649 ! if (isdigit(*cmd)) /* absolute line number */
650 lnum = getdigits(&cmd);
655 cmd = skipwhite(cmd);
656 ! if (*cmd != '-' && *cmd != '+' && !isdigit(*cmd))
660 lnum = curwin->w_cursor.lnum; /* "+1" is same as ".+1" */
662 i = '+'; /* "number" is same as "+number" */
665 ! if (!isdigit(*cmd)) /* '+' is '+1', but '+0' is not '+1' */
673 ! if (VIM_ISDIGIT(*cmd)) /* absolute line number */
674 lnum = getdigits(&cmd);
679 cmd = skipwhite(cmd);
680 ! if (*cmd != '-' && *cmd != '+' && !VIM_ISDIGIT(*cmd))
684 lnum = curwin->w_cursor.lnum; /* "+1" is same as ".+1" */
685 ! if (VIM_ISDIGIT(*cmd))
686 i = '+'; /* "number" is same as "+number" */
689 ! if (!VIM_ISDIGIT(*cmd)) /* '+' is '+1', but '+0' is not '+1' */
695 /* ":mkview" or ":mkview 9": generate file name with 'viewdir' */
696 if (eap->cmdidx == CMD_mkview
698 ! || (isdigit(*eap->arg) && eap->arg[1] == NUL)))
701 fname = get_view_file(*eap->arg);
703 /* ":mkview" or ":mkview 9": generate file name with 'viewdir' */
704 if (eap->cmdidx == CMD_mkview
706 ! || (vim_isdigit(*eap->arg) && eap->arg[1] == NUL)))
709 fname = get_view_file(*eap->arg);
715 ! if (isdigit(*eap->arg)) /* get count */
717 n = getdigits(&eap->arg);
718 eap->arg = skipwhite(eap->arg);
723 ! if (vim_isdigit(*eap->arg)) /* get count */
725 n = getdigits(&eap->arg);
726 eap->arg = skipwhite(eap->arg);
727 *** ../vim-6.2.481/src/ex_eval.c Wed Apr 14 11:08:53 2004
728 --- src/ex_eval.c Mon Apr 19 19:01:17 2004
732 /* Skip the extra "Vim " prefix for message "E458". */
734 ! if (STRNCMP(tmsg, "Vim E", 5) == 0 && isdigit(tmsg[5])
735 ! && isdigit(tmsg[6]) && isdigit(tmsg[7])
736 ! && tmsg[8] == ':' && tmsg[9] == ' ')
737 (*msg_list)->throw_msg = &tmsg[4];
739 (*msg_list)->throw_msg = tmsg;
742 /* Skip the extra "Vim " prefix for message "E458". */
744 ! if (STRNCMP(tmsg, "Vim E", 5) == 0
745 ! && VIM_ISDIGIT(tmsg[5])
746 ! && VIM_ISDIGIT(tmsg[6])
747 ! && VIM_ISDIGIT(tmsg[7])
750 (*msg_list)->throw_msg = &tmsg[4];
752 (*msg_list)->throw_msg = tmsg;
755 * parentheses and move it to the end. */
756 for (p = mesg; ; p++)
758 ! if (*p == NUL || (*p == 'E' &&
760 ! (p[2] == ':' || (isdigit(p[2]) &&
761 ! (p[3] == ':' || (isdigit(p[3]) &&
764 if (*p == NUL || p == mesg) /* 'E123' missing or at beginning */
767 * parentheses and move it to the end. */
768 for (p = mesg; ; p++)
772 ! && VIM_ISDIGIT(p[1])
774 ! || (VIM_ISDIGIT(p[2])
776 ! || (VIM_ISDIGIT(p[3])
777 ! && p[4] == ':'))))))
779 if (*p == NUL || p == mesg) /* 'E123' missing or at beginning */
781 *** ../vim-6.2.481/src/ex_getln.c Fri Apr 16 11:14:51 2004
782 --- src/ex_getln.c Mon Apr 19 19:01:20 2004
787 *str = skipwhite(*str);
788 ! if (**str == '-' || isdigit(**str)) /* parse "from" part of range */
790 vim_str2nr(*str, NULL, &len, FALSE, FALSE, &num, NULL);
795 *str = skipwhite(*str);
796 ! if (**str == '-' || vim_isdigit(**str)) /* parse "from" part of range */
798 vim_str2nr(*str, NULL, &len, FALSE, FALSE, &num, NULL);
805 ! if (!(isdigit(*arg) || *arg == '-' || *arg == ','))
808 while (ASCII_ISALPHA(*end)
813 ! if (!(VIM_ISDIGIT(*arg) || *arg == '-' || *arg == ','))
816 while (ASCII_ISALPHA(*end)
817 *** ../vim-6.2.481/src/if_xcmdsrv.c Thu Mar 25 19:25:28 2004
818 --- src/if_xcmdsrv.c Mon Apr 19 17:50:30 2004
822 end = skipwhite(p + 2);
824 ! while (isxdigit(*end))
826 resWindow = 16 * resWindow + (long_u)hex2nr(*end);
830 end = skipwhite(p + 2);
832 ! while (vim_isxdigit(*end))
834 resWindow = 16 * resWindow + (long_u)hex2nr(*end);
839 int len = STRLEN(str);
841 ! return (len > 1 && isdigit(str[len - 1]));
843 #endif /* FEAT_CLIENTSERVER */
846 int len = STRLEN(str);
848 ! return (len > 1 && vim_isdigit(str[len - 1]));
850 #endif /* FEAT_CLIENTSERVER */
851 *** ../vim-6.2.481/src/farsi.c Fri Feb 22 20:10:20 2002
852 --- src/farsi.c Mon Apr 19 19:01:22 2004
858 ! if (vim_isdigit(c) || ((c == '.' || c == '+' || c == '-' ||
859 c == '^' || c == '%' || c == '#' || c == '=') && revins))
866 ! if (VIM_ISDIGIT(c) || ((c == '.' || c == '+' || c == '-' ||
867 c == '^' || c == '%' || c == '#' || c == '=') && revins))
870 *** ../vim-6.2.481/src/fileio.c Mon Apr 19 17:00:44 2004
871 --- src/fileio.c Mon Apr 19 19:01:43 2004
874 get_win_fio_flags(ptr)
877 ! if (ptr[0] == 'c' && ptr[1] == 'p' && isdigit(ptr[2]))
878 return FIO_PUT_CP(atoi(ptr + 2)) | FIO_CODEPAGE;
882 get_win_fio_flags(ptr)
885 ! if (ptr[0] == 'c' && ptr[1] == 'p' && VIM_ISDIGIT(ptr[2]))
886 return FIO_PUT_CP(atoi(ptr + 2)) | FIO_CODEPAGE;
889 *** ../vim-6.2.481/src/fold.c Wed Apr 14 11:08:53 2004
890 --- src/fold.c Mon Apr 19 19:01:50 2004
894 /* Found the marker, include a digit if it's there. */
896 ! if (isdigit(p[len]))
902 /* Found the marker, include a digit if it's there. */
904 ! if (VIM_ISDIGIT(p[len]))
910 if (STRNCMP(s, curwin->w_p_fmr, foldstartmarkerlen) == 0)
912 len = foldstartmarkerlen;
913 ! if (isdigit(s[len]))
916 else if (STRNCMP(s, foldendmarker, foldendmarkerlen) == 0)
918 len = foldendmarkerlen;
919 ! if (isdigit(s[len]))
922 else if (cms_end != NULL)
924 if (STRNCMP(s, curwin->w_p_fmr, foldstartmarkerlen) == 0)
926 len = foldstartmarkerlen;
927 ! if (VIM_ISDIGIT(s[len]))
930 else if (STRNCMP(s, foldendmarker, foldendmarkerlen) == 0)
932 len = foldendmarkerlen;
933 ! if (VIM_ISDIGIT(s[len]))
936 else if (cms_end != NULL)
940 /* found startmarker: set flp->lvl */
941 s += foldstartmarkerlen;
948 /* found startmarker: set flp->lvl */
949 s += foldstartmarkerlen;
950 ! if (VIM_ISDIGIT(*s))
957 /* found endmarker: set flp->lvl_next */
958 s += foldendmarkerlen;
965 /* found endmarker: set flp->lvl_next */
966 s += foldendmarkerlen;
967 ! if (VIM_ISDIGIT(*s))
971 *** ../vim-6.2.481/src/getchar.c Sun Apr 4 12:10:13 2004
972 --- src/getchar.c Mon Apr 19 19:01:57 2004
975 /* try to enter the count (in place of a previous count) */
978 ! while (isdigit(c)) /* skip "old" count */
979 c = read_redo(FALSE, old_redo);
980 add_num_buff(&stuffbuff, count);
983 /* try to enter the count (in place of a previous count) */
986 ! while (VIM_ISDIGIT(c)) /* skip "old" count */
987 c = read_redo(FALSE, old_redo);
988 add_num_buff(&stuffbuff, count);
992 for (s = typebuf.tb_buf + typebuf.tb_off + 1;
993 s < typebuf.tb_buf + typebuf.tb_off
995 ! && (isdigit(*s) || *s == ';' || *s == ' ');
998 if (*s == 'r' || *s == '|') /* found one */
1000 for (s = typebuf.tb_buf + typebuf.tb_off + 1;
1001 s < typebuf.tb_buf + typebuf.tb_off
1003 ! && (VIM_ISDIGIT(*s) || *s == ';'
1007 if (*s == 'r' || *s == '|') /* found one */
1008 *** ../vim-6.2.481/src/gui.c Mon Apr 12 15:41:18 2004
1009 --- src/gui.c Mon Apr 19 19:02:02 2004
1012 if (s[0] == ESC && s[1] == '|')
1017 arg1 = getdigits(&p);
1020 if (s[0] == ESC && s[1] == '|')
1023 ! if (VIM_ISDIGIT(*p))
1025 arg1 = getdigits(&p);
1027 *** ../vim-6.2.481/src/if_cscope.c Wed Apr 14 11:08:53 2004
1028 --- src/if_cscope.c Mon Apr 19 19:02:28 2004
1033 /* only single digit positive and negative integers are allowed */
1034 ! if ((strlen(stok) < 2 && isdigit((int)(stok[0])))
1035 ! || (strlen(stok) < 3 && stok[0] == '-' && isdigit((int)(stok[1]))))
1042 /* only single digit positive and negative integers are allowed */
1043 ! if ((strlen(stok) < 2 && VIM_ISDIGIT((int)(stok[0])))
1044 ! || (strlen(stok) < 3 && stok[0] == '-'
1045 ! && VIM_ISDIGIT((int)(stok[1]))))
1049 *** ../vim-6.2.481/src/macros.h Tue Apr 6 21:31:48 2004
1050 --- src/macros.h Mon Apr 19 20:10:12 2004
1054 # define ASCII_ISUPPER(c) ((c) < 0x7f && isupper(c))
1057 + /* Use our own isdigit() replacement, because on MS-Windows isdigit() returns
1058 + * non-zero for superscript 1. Also avoids that isdigit() crashes for numbers
1059 + * below 0 and above 255. For complicated arguments and in/decrement use
1060 + * vim_isdigit() instead. */
1061 + #define VIM_ISDIGIT(c) ((c) >= '0' && (c) <= '9')
1063 /* macro version of chartab().
1064 * Only works with values 0-255!
1065 * Doesn't work for UTF-8 mode with chars >= 0x80. */
1066 *** ../vim-6.2.481/src/main.c Fri Apr 16 22:03:45 2004
1067 --- src/main.c Mon Apr 19 17:50:59 2004
1071 case 'w': /* "-w{number}" set window height */
1072 /* "-w {scriptout}" write to script */
1073 ! if (isdigit(((char_u *)argv[0])[argv_idx]))
1076 break; /* not implemented, ignored */
1079 case 'w': /* "-w{number}" set window height */
1080 /* "-w {scriptout}" write to script */
1081 ! if (vim_isdigit(((char_u *)argv[0])[argv_idx]))
1084 break; /* not implemented, ignored */
1087 int *idx; /* index in argument, is incremented */
1088 int def; /* default value */
1090 ! if (isdigit(p[*idx]))
1092 def = atoi((char *)&(p[*idx]));
1093 ! while (isdigit(p[*idx]))
1098 int *idx; /* index in argument, is incremented */
1099 int def; /* default value */
1101 ! if (vim_isdigit(p[*idx]))
1103 def = atoi((char *)&(p[*idx]));
1104 ! while (vim_isdigit(p[*idx]))
1108 *** ../vim-6.2.481/src/mark.c Tue Mar 30 22:19:53 2004
1109 --- src/mark.c Mon Apr 19 19:02:37 2004
1113 posp = &(curbuf->b_namedm[c - 'a']);
1115 ! else if (ASCII_ISUPPER(c) || vim_isdigit(c)) /* named file mark */
1117 ! if (vim_isdigit(c))
1118 c = c - '0' + NMARKS;
1123 posp = &(curbuf->b_namedm[c - 'a']);
1125 ! else if (ASCII_ISUPPER(c) || VIM_ISDIGIT(c)) /* named file mark */
1127 ! if (VIM_ISDIGIT(c))
1128 c = c - '0' + NMARKS;
1136 ! ((*virp->vir_line == '\'' && (isdigit(*str) || isupper(*str)))
1137 || (*virp->vir_line == '-' && *str == '\'')))
1144 ! ((*virp->vir_line == '\'' && (VIM_ISDIGIT(*str) || isupper(*str)))
1145 || (*virp->vir_line == '-' && *str == '\'')))
1153 ! else if (isdigit(*str))
1154 fm = &namedfm[*str - '0' + NMARKS];
1156 fm = &namedfm[*str - 'A'];
1161 ! else if (VIM_ISDIGIT(*str))
1162 fm = &namedfm[*str - '0' + NMARKS];
1164 fm = &namedfm[*str - 'A'];
1165 *** ../vim-6.2.481/src/mbyte.c Wed Apr 7 10:52:49 2004
1166 --- src/mbyte.c Mon Apr 19 19:02:40 2004
1170 return enc_canon_table[i].prop;
1172 ! if (name[0] == 'c' && name[1] == 'p' && isdigit(name[2]))
1178 return enc_canon_table[i].prop;
1180 ! if (name[0] == 'c' && name[1] == 'p' && VIM_ISDIGIT(name[2]))
1189 ! if (p_enc[0] == 'c' && p_enc[1] == 'p' && isdigit(p_enc[2]))
1197 ! if (p_enc[0] == 'c' && p_enc[1] == 'p' && VIM_ISDIGIT(p_enc[2]))
1201 *** ../vim-6.2.481/src/menu.c Mon Mar 22 20:54:36 2004
1202 --- src/menu.c Mon Apr 19 19:02:44 2004
1205 * Fill in the priority table.
1207 for (p = arg; *p; ++p)
1208 ! if (!isdigit(*p) && *p != '.')
1210 if (vim_iswhite(*p))
1213 * Fill in the priority table.
1215 for (p = arg; *p; ++p)
1216 ! if (!VIM_ISDIGIT(*p) && *p != '.')
1218 if (vim_iswhite(*p))
1223 /* Check for priority numbers, enable and disable */
1224 for (p = arg; *p; ++p)
1225 ! if (!isdigit(*p) && *p != '.')
1228 if (!vim_iswhite(*p))
1231 /* Check for priority numbers, enable and disable */
1232 for (p = arg; *p; ++p)
1233 ! if (!VIM_ISDIGIT(*p) && *p != '.')
1236 if (!vim_iswhite(*p))
1237 *** ../vim-6.2.481/src/misc1.c Mon Apr 5 20:28:39 2004
1238 --- src/misc1.c Mon Apr 19 19:02:56 2004
1242 line = ml_get(lnum);
1243 p = skipwhite(line);
1247 if (vim_strchr((char_u *)":.)]}\t ", *p) == NULL)
1250 line = ml_get(lnum);
1251 p = skipwhite(line);
1252 ! if (!VIM_ISDIGIT(*p))
1255 if (vim_strchr((char_u *)":.)]}\t ", *p) == NULL)
1259 if (*p == COM_RIGHT || *p == COM_LEFT)
1261 ! else if (isdigit(*p) || *p == '-')
1262 off = getdigits(&p);
1264 if (c == COM_RIGHT) /* right adjusted leader */
1267 if (*p == COM_RIGHT || *p == COM_LEFT)
1269 ! else if (VIM_ISDIGIT(*p) || *p == '-')
1270 off = getdigits(&p);
1272 if (c == COM_RIGHT) /* right adjusted leader */
1276 windgoto(msg_row, msg_col);
1278 ! if (vim_isdigit(c))
1280 n = n * 10 + c - '0';
1284 windgoto(msg_row, msg_col);
1286 ! if (VIM_ISDIGIT(c))
1288 n = n * 10 + c - '0';
1292 if (p[1] == '\\') /* '\n' or '\000' */
1295 ! while (isdigit(p[i - 1])) /* '\000' */
1298 if (p[i] == '\'') /* check for trailing ' */
1300 if (p[1] == '\\') /* '\n' or '\000' */
1303 ! while (vim_isdigit(p[i - 1])) /* '\000' */
1306 if (p[i] == '\'') /* check for trailing ' */
1309 if (*options == '.') /* ".5s" means a fraction */
1311 fraction = atol((char *)++options);
1312 ! while (isdigit(*options))
1317 if (*options == '.') /* ".5s" means a fraction */
1319 fraction = atol((char *)++options);
1320 ! while (VIM_ISDIGIT(*options))
1327 else if (*p == COM_LEFT || *p == COM_RIGHT)
1329 ! else if (isdigit(*p) || *p == '-')
1330 off = getdigits(&p);
1335 else if (*p == COM_LEFT || *p == COM_RIGHT)
1337 ! else if (VIM_ISDIGIT(*p) || *p == '-')
1338 off = getdigits(&p);
1341 *** ../vim-6.2.481/src/misc2.c Fri Apr 16 21:10:08 2004
1342 --- src/misc2.c Mon Apr 19 19:03:02 2004
1346 end_of_name = bp + 1;
1348 ! if (STRNICMP(src + 1, "char-", 5) == 0 && isdigit(src[6]))
1350 /* <Char-123> or <Char-033> or <Char-0x33> */
1351 vim_str2nr(src + 6, NULL, NULL, TRUE, TRUE, NULL, &n);
1354 end_of_name = bp + 1;
1356 ! if (STRNICMP(src + 1, "char-", 5) == 0 && VIM_ISDIGIT(src[6]))
1358 /* <Char-123> or <Char-033> or <Char-0x33> */
1359 vim_str2nr(src + 6, NULL, NULL, TRUE, TRUE, NULL, &n);
1363 if (mshape_names[i] == NULL)
1366 return (char_u *)N_("E547: Illegal mouseshape");
1368 shape_table[idx].mshape =
1371 if (mshape_names[i] == NULL)
1373 ! if (!VIM_ISDIGIT(*p))
1374 return (char_u *)N_("E547: Illegal mouseshape");
1376 shape_table[idx].mshape =
1383 return (char_u *)N_("E548: digit expected");
1385 if (len == 3) /* "ver" or "hor" */
1390 ! if (!VIM_ISDIGIT(*p))
1391 return (char_u *)N_("E548: digit expected");
1393 if (len == 3) /* "ver" or "hor" */
1397 if (table[idx].hasnum)
1400 return (char_u *)N_("E552: digit expected");
1402 table[idx].number = getdigits(&p); /*advances p*/
1405 if (table[idx].hasnum)
1407 ! if (!VIM_ISDIGIT(*p))
1408 return (char_u *)N_("E552: digit expected");
1410 table[idx].number = getdigits(&p); /*advances p*/
1411 *** ../vim-6.2.481/src/normal.c Thu Apr 8 12:29:56 2004
1412 --- src/normal.c Mon Apr 19 19:03:06 2004
1415 int old_fen = curwin->w_p_fen;
1418 ! if (vim_isdigit(nchar))
1420 if (checkclearop(cap->oap))
1424 int old_fen = curwin->w_p_fen;
1427 ! if (VIM_ISDIGIT(nchar))
1430 + * "z123{nchar}": edit the count before obtaining {nchar}
1432 if (checkclearop(cap->oap))
1438 if (nchar == K_DEL || nchar == K_KDEL)
1440 ! else if (vim_isdigit(nchar))
1441 n = n * 10 + (nchar - '0');
1442 else if (nchar == CAR)
1446 if (nchar == K_DEL || nchar == K_KDEL)
1448 ! else if (VIM_ISDIGIT(nchar))
1449 n = n * 10 + (nchar - '0');
1450 else if (nchar == CAR)
1454 # ifdef FEAT_CLIPBOARD
1455 adjust_clip_reg(®name);
1457 ! if (regname == 0 || isdigit(regname)
1458 # ifdef FEAT_CLIPBOARD
1459 || (clip_unnamed && (regname == '*' || regname == '+'))
1462 # ifdef FEAT_CLIPBOARD
1463 adjust_clip_reg(®name);
1465 ! if (regname == 0 || VIM_ISDIGIT(regname)
1466 # ifdef FEAT_CLIPBOARD
1467 || (clip_unnamed && (regname == '*' || regname == '+'))
1469 *** ../vim-6.2.481/src/ops.c Sun Apr 4 12:34:29 2004
1470 --- src/ops.c Mon Apr 19 19:03:09 2004
1478 else if (ASCII_ISLOWER(i))
1479 i = CharOrdLow(i) + 10;
1484 ! if (VIM_ISDIGIT(i))
1486 else if (ASCII_ISLOWER(i))
1487 i = CharOrdLow(i) + 10;
1491 bdp->endspaces = incr - bdp->endspaces;
1499 bdp->endspaces = incr - bdp->endspaces;
1508 col = curwin->w_cursor.col;
1510 ! while (col > 0 && isxdigit(ptr[col]))
1516 && ptr[col - 1] == '0'
1517 ! && isxdigit(ptr[col + 1]))
1520 * Found hexadecimal number, move to its start.
1523 col = curwin->w_cursor.col;
1525 ! while (col > 0 && vim_isxdigit(ptr[col]))
1531 && ptr[col - 1] == '0'
1532 ! && vim_isxdigit(ptr[col + 1]))
1535 * Found hexadecimal number, move to its start.
1538 col = curwin->w_cursor.col;
1540 while (ptr[col] != NUL
1541 ! && !isdigit(ptr[col])
1542 && !(doalp && ASCII_ISALPHA(ptr[col])))
1546 ! && isdigit(ptr[col - 1])
1547 && !(doalp && ASCII_ISALPHA(ptr[col])))
1551 col = curwin->w_cursor.col;
1553 while (ptr[col] != NUL
1554 ! && !vim_isdigit(ptr[col])
1555 && !(doalp && ASCII_ISALPHA(ptr[col])))
1559 ! && vim_isdigit(ptr[col - 1])
1560 && !(doalp && ASCII_ISALPHA(ptr[col])))
1566 firstdigit = ptr[col];
1568 ! if ((!isdigit(firstdigit) && !(doalp && ASCII_ISALPHA(firstdigit)))
1569 || u_save_cursor() != OK)
1574 firstdigit = ptr[col];
1576 ! if ((!VIM_ISDIGIT(firstdigit) && !(doalp && ASCII_ISALPHA(firstdigit)))
1577 || u_save_cursor() != OK)
1580 *** ../vim-6.2.481/src/option.c Mon Apr 19 17:00:44 2004
1581 --- src/option.c Mon Apr 19 19:03:26 2004
1586 || ((!arg[1] || vim_iswhite(arg[1]))
1587 ! && !isdigit(*arg))))
1589 value = string_to_key(arg);
1590 if (value == 0 && (long *)varp != &p_wcm)
1594 || ((!arg[1] || vim_iswhite(arg[1]))
1595 ! && !VIM_ISDIGIT(*arg))))
1597 value = string_to_key(arg);
1598 if (value == 0 && (long *)varp != &p_wcm)
1603 /* allow negative numbers (for 'undolevels') */
1604 ! else if (*arg == '-' || isdigit(*arg))
1611 /* allow negative numbers (for 'undolevels') */
1612 ! else if (*arg == '-' || VIM_ISDIGIT(*arg))
1619 value = atol((char *)arg);
1621 ! while (isdigit(arg[i]))
1623 if (arg[i] != NUL && !vim_iswhite(arg[i]))
1627 value = atol((char *)arg);
1629 ! while (VIM_ISDIGIT(arg[i]))
1631 if (arg[i] != NUL && !vim_iswhite(arg[i]))
1635 * backwards compatibility with Vim 3.0.
1636 * Misuse errbuf[] for the resulting string.
1638 ! else if (varp == (char_u *)&p_ww && isdigit(*arg))
1641 i = getdigits(&arg);
1643 * backwards compatibility with Vim 3.0.
1644 * Misuse errbuf[] for the resulting string.
1646 ! else if (varp == (char_u *)&p_ww
1647 ! && VIM_ISDIGIT(*arg))
1650 i = getdigits(&arg);
1655 p = find_viminfo_parameter(type);
1656 ! if (p != NULL && isdigit(*p))
1657 return atoi((char *)p);
1663 p = find_viminfo_parameter(type);
1664 ! if (p != NULL && VIM_ISDIGIT(*p))
1665 return atoi((char *)p);
1670 while (*s && *s != ':')
1672 if (vim_strchr((char_u *)COM_ALL, *s) == NULL
1673 ! && !isdigit(*s) && *s != '-')
1675 errmsg = illegal_char(errbuf, *s);
1678 while (*s && *s != ':')
1680 if (vim_strchr((char_u *)COM_ALL, *s) == NULL
1681 ! && !VIM_ISDIGIT(*s) && *s != '-')
1683 errmsg = illegal_char(errbuf, *s);
1687 ++s; /* no extra chars */
1688 else /* must have a number */
1690 ! while (isdigit(*++s))
1693 ! if (!isdigit(*(s - 1)))
1698 ++s; /* no extra chars */
1699 else /* must have a number */
1701 ! while (vim_isdigit(*++s))
1704 ! if (!VIM_ISDIGIT(*(s - 1)))
1711 else if (varp == &p_bs)
1713 ! if (isdigit(*p_bs))
1715 if (*p_bs >'2' || p_bs[1] != NUL)
1719 else if (varp == &p_bs)
1721 ! if (VIM_ISDIGIT(*p_bs))
1723 if (*p_bs >'2' || p_bs[1] != NUL)
1730 ! while (isdigit(*s))
1732 if (*s == STL_HIGHLIGHT)
1737 ! while (*s && isdigit(*s))
1745 ! while (VIM_ISDIGIT(*s))
1747 if (*s == STL_HIGHLIGHT)
1752 ! while (*s && VIM_ISDIGIT(*s))
1756 *** ../vim-6.2.481/src/proto/charset.pro Sun Jun 1 12:26:05 2003
1757 --- src/proto/charset.pro Mon Apr 19 19:00:00 2004
1761 char_u *skipwhite __ARGS((char_u *p));
1762 char_u *skipdigits __ARGS((char_u *p));
1763 int vim_isdigit __ARGS((int c));
1764 + int vim_isxdigit __ARGS((int c));
1765 char_u *skiptowhite __ARGS((char_u *p));
1766 char_u *skiptowhite_esc __ARGS((char_u *p));
1767 long getdigits __ARGS((char_u **pp));
1768 *** ../vim-6.2.481/src/regexp.c Wed Apr 14 11:08:53 2004
1769 --- src/regexp.c Mon Apr 19 19:04:33 2004
1775 ! if (isdigit(c) || c == '<' || c == '>')
1783 ! if (VIM_ISDIGIT(c) || c == '<' || c == '>')
1790 if (cmp == '<' || cmp == '>')
1792 ! while (isdigit(c))
1794 n = n * 10 + (c - '0');
1798 if (cmp == '<' || cmp == '>')
1800 ! while (VIM_ISDIGIT(c))
1802 n = n * 10 + (c - '0');
1808 for (cu = 1; cu <= 255; cu++)
1816 for (cu = 1; cu <= 255; cu++)
1817 ! if (VIM_ISDIGIT(cu))
1825 for (cu = 1; cu <= 255; cu++)
1833 for (cu = 1; cu <= 255; cu++)
1834 ! if (vim_isxdigit(cu))
1840 *minval = getdigits(®parse);
1841 if (*regparse == ',') /* There is a comma */
1843 ! if (isdigit(*++regparse))
1844 *maxval = getdigits(®parse);
1846 *maxval = MAX_LIMIT;
1848 ! else if (isdigit(*first_char))
1849 *maxval = *minval; /* It was \{n} or \{-n} */
1851 *maxval = MAX_LIMIT; /* It was \{} or \{-} */
1853 *minval = getdigits(®parse);
1854 if (*regparse == ',') /* There is a comma */
1856 ! if (vim_isdigit(*++regparse))
1857 *maxval = getdigits(®parse);
1859 *maxval = MAX_LIMIT;
1861 ! else if (VIM_ISDIGIT(*first_char))
1862 *maxval = *minval; /* It was \{n} or \{-n} */
1864 *maxval = MAX_LIMIT; /* It was \{} or \{-} */
1870 ! if (isdigit(*reginput) || !vim_isIDc(c))
1878 ! if (VIM_ISDIGIT(*reginput) || !vim_isIDc(c))
1887 ! if (isdigit(*reginput) || !vim_iswordp(reginput))
1895 ! if (VIM_ISDIGIT(*reginput) || !vim_iswordp(reginput))
1904 ! if (isdigit(*reginput) || !vim_isfilec(c))
1912 ! if (VIM_ISDIGIT(*reginput) || !vim_isfilec(c))
1921 ! if (isdigit(*reginput) || ptr2cells(reginput) != 1)
1929 ! if (VIM_ISDIGIT(*reginput) || ptr2cells(reginput) != 1)
1935 case SIDENT + ADD_NL:
1936 while (count < maxcount)
1938 ! if (vim_isIDc(*scan) && (testval || !isdigit(*scan)))
1943 case SIDENT + ADD_NL:
1944 while (count < maxcount)
1946 ! if (vim_isIDc(*scan) && (testval || !VIM_ISDIGIT(*scan)))
1952 case SKWORD + ADD_NL:
1953 while (count < maxcount)
1955 ! if (vim_iswordp(scan) && (testval || !isdigit(*scan)))
1960 case SKWORD + ADD_NL:
1961 while (count < maxcount)
1963 ! if (vim_iswordp(scan) && (testval || !VIM_ISDIGIT(*scan)))
1969 case SFNAME + ADD_NL:
1970 while (count < maxcount)
1972 ! if (vim_isfilec(*scan) && (testval || !isdigit(*scan)))
1977 case SFNAME + ADD_NL:
1978 while (count < maxcount)
1980 ! if (vim_isfilec(*scan) && (testval || !VIM_ISDIGIT(*scan)))
1989 ! else if (ptr2cells(scan) == 1 && (testval || !isdigit(*scan)))
1997 ! else if (ptr2cells(scan) == 1 && (testval || !VIM_ISDIGIT(*scan)))
2001 *** ../vim-6.2.481/src/screen.c Mon Apr 5 21:24:08 2004
2002 --- src/screen.c Mon Apr 19 19:04:36 2004
2007 if (atoi((char *) p))
2008 ! while (isdigit(*p))
2015 if (atoi((char *) p))
2016 ! while (VIM_ISDIGIT(*p))
2020 *** ../vim-6.2.481/src/search.c Fri Apr 9 19:30:09 2004
2021 --- src/search.c Mon Apr 19 19:04:47 2004
2024 * offset, because it is meaningless and the 's' could be a
2025 * substitute command.
2027 ! if (*p == '+' || *p == '-' || isdigit(*p))
2028 spats[0].off.line = TRUE;
2029 else if ((options & SEARCH_OPT) &&
2030 (*p == 'e' || *p == 's' || *p == 'b'))
2032 * offset, because it is meaningless and the 's' could be a
2033 * substitute command.
2035 ! if (*p == '+' || *p == '-' || VIM_ISDIGIT(*p))
2036 spats[0].off.line = TRUE;
2037 else if ((options & SEARCH_OPT) &&
2038 (*p == 'e' || *p == 's' || *p == 'b'))
2041 spats[0].off.end = SEARCH_END;
2044 ! if (isdigit(*p) || *p == '+' || *p == '-') /* got an offset */
2046 /* 'nr' or '+nr' or '-nr' */
2047 ! if (isdigit(*p) || isdigit(*(p + 1)))
2048 spats[0].off.off = atol((char *)p);
2049 else if (*p == '-') /* single '-' */
2050 spats[0].off.off = -1;
2051 else /* single '+' */
2052 spats[0].off.off = 1;
2054 ! while (isdigit(*p)) /* skip number */
2059 spats[0].off.end = SEARCH_END;
2062 ! if (VIM_ISDIGIT(*p) || *p == '+' || *p == '-') /* got an offset */
2064 /* 'nr' or '+nr' or '-nr' */
2065 ! if (VIM_ISDIGIT(*p) || VIM_ISDIGIT(*(p + 1)))
2066 spats[0].off.off = atol((char *)p);
2067 else if (*p == '-') /* single '-' */
2068 spats[0].off.off = -1;
2069 else /* single '+' */
2070 spats[0].off.off = 1;
2072 ! while (VIM_ISDIGIT(*p)) /* skip number */
2076 *** ../vim-6.2.481/src/syntax.c Thu Apr 1 15:42:48 2004
2077 --- src/syntax.c Mon Apr 19 19:04:54 2004
2083 ! if (arg_end[-1] != '=' || !isdigit(*arg_end))
2091 ! if (arg_end[-1] != '=' || !VIM_ISDIGIT(*arg_end))
2097 HL_TABLE()[idx].sg_cterm_bold = FALSE;
2100 ! if (isdigit(*arg))
2101 color = atoi((char *)arg);
2102 else if (STRICMP(arg, "fg") == 0)
2105 HL_TABLE()[idx].sg_cterm_bold = FALSE;
2108 ! if (VIM_ISDIGIT(*arg))
2109 color = atoi((char *)arg);
2110 else if (STRICMP(arg, "fg") == 0)
2112 *** ../vim-6.2.481/src/tag.c Thu Apr 15 20:45:41 2004
2113 --- src/tag.c Mon Apr 19 19:05:04 2004
2119 ! if (!isdigit(*p)) /* check for start of line number */
2127 ! if (!VIM_ISDIGIT(*p)) /* check for start of line number */
2133 /* Repeat for addresses separated with ';' */
2136 ! if (isdigit(*str))
2137 str = skipdigits(str);
2138 else if (*str == '/' || *str == '?')
2141 /* Repeat for addresses separated with ';' */
2144 ! if (VIM_ISDIGIT(*str))
2145 str = skipdigits(str);
2146 else if (*str == '/' || *str == '?')
2152 if (str == NULL || *str != ';'
2153 ! || !(isdigit(str[1]) || str[1] == '/' || str[1] == '?'))
2155 ++str; /* skip ';' */
2160 if (str == NULL || *str != ';'
2161 ! || !(VIM_ISDIGIT(str[1]) || str[1] == '/' || str[1] == '?'))
2163 ++str; /* skip ';' */
2165 *** ../vim-6.2.481/src/term.c Tue Mar 30 21:49:18 2004
2166 --- src/term.c Mon Apr 19 19:05:20 2004
2171 if (termcodes[idx].name[0] == 'K'
2172 ! && isdigit(termcodes[idx].name[1]))
2174 for (j = idx + 1; j < tc_len; ++j)
2175 if (termcodes[j].len == slen &&
2179 if (termcodes[idx].name[0] == 'K'
2180 ! && VIM_ISDIGIT(termcodes[idx].name[1]))
2182 for (j = idx + 1; j < tc_len; ++j)
2183 if (termcodes[j].len == slen &&
2188 for (i = 2 + (tp[0] != CSI);
2189 ! i < len && (isdigit(tp[i])
2190 || tp[i] == ';' || tp[i] == '.'); ++i)
2191 if (tp[i] == ';' && ++j == 1)
2192 extra = atoi((char *)tp + i + 1);
2196 for (i = 2 + (tp[0] != CSI);
2197 ! i < len && (VIM_ISDIGIT(tp[i])
2198 || tp[i] == ';' || tp[i] == '.'); ++i)
2199 if (tp[i] == ';' && ++j == 1)
2200 extra = atoi((char *)tp + i + 1);
2204 * Check for #n at start only: function key n
2206 ! if (from_part && src[0] == '#' && isdigit(src[1])) /* function key */
2208 result[dlen++] = K_SPECIAL;
2209 result[dlen++] = 'k';
2212 * Check for #n at start only: function key n
2214 ! if (from_part && src[0] == '#' && VIM_ISDIGIT(src[1])) /* function key */
2216 result[dlen++] = K_SPECIAL;
2217 result[dlen++] = 'k';
2218 *** ../vim-6.2.481/src/termlib.c Sat Jul 26 21:25:27 2003
2219 --- src/termlib.c Mon Apr 19 19:05:31 2004
2224 /* get up to three digits */
2225 ! for (i = 0; i < 3 && isdigit(*tmp); ++i)
2226 **buf = **buf * 8 + *tmp++ - '0';
2232 /* get up to three digits */
2233 ! for (i = 0; i < 3 && VIM_ISDIGIT(*tmp); ++i)
2234 **buf = **buf * 8 + *tmp++ - '0';
2239 if (addup) /* add upline */
2242 ! while (isdigit(*ptr) || *ptr == '.')
2247 if (addup) /* add upline */
2250 ! while (VIM_ISDIGIT(*ptr) || *ptr == '.')
2256 if (addbak) /* add backspace */
2259 ! while (isdigit(*ptr) || *ptr == '.')
2264 if (addbak) /* add backspace */
2267 ! while (VIM_ISDIGIT(*ptr) || *ptr == '.')
2273 counter, /* digits */
2274 atol __ARGS((const char *));
2276 ! if (isdigit(*cp)) {
2279 ! while (isdigit(*cp))
2280 counter = counter * 10L + (long)(*cp++ - '0');
2282 ! while (isdigit(*++cp)) {
2283 counter = counter * 10L + (long)(*cp++ - '0');
2287 counter, /* digits */
2288 atol __ARGS((const char *));
2290 ! if (VIM_ISDIGIT(*cp)) {
2293 ! while (VIM_ISDIGIT(*cp))
2294 counter = counter * 10L + (long)(*cp++ - '0');
2296 ! while (VIM_ISDIGIT(*++cp)) {
2297 counter = counter * 10L + (long)(*cp++ - '0');
2300 *** ../vim-6.2.481/src/version.c Mon Apr 19 17:00:44 2004
2301 --- src/version.c Mon Apr 19 20:14:42 2004
2305 { /* Add new patch number below this line */
2311 If corn oil comes from corn, where does baby oil come from?
2313 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
2314 /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
2315 \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
2316 \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///