diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/buffer.c | 8 | ||||
-rw-r--r-- | src/nvim/charset.c | 18 | ||||
-rw-r--r-- | src/nvim/cursor_shape.c | 2 | ||||
-rw-r--r-- | src/nvim/diff.c | 12 | ||||
-rw-r--r-- | src/nvim/digraph.c | 2 | ||||
-rw-r--r-- | src/nvim/eval.c | 4 | ||||
-rw-r--r-- | src/nvim/ex_cmds.c | 8 | ||||
-rw-r--r-- | src/nvim/ex_cmds2.c | 2 | ||||
-rw-r--r-- | src/nvim/ex_docmd.c | 26 | ||||
-rw-r--r-- | src/nvim/hardcopy.c | 2 | ||||
-rw-r--r-- | src/nvim/indent_c.c | 4 | ||||
-rw-r--r-- | src/nvim/mark.c | 4 | ||||
-rw-r--r-- | src/nvim/menu.c | 2 | ||||
-rw-r--r-- | src/nvim/misc1.c | 2 | ||||
-rw-r--r-- | src/nvim/ops.c | 2 | ||||
-rw-r--r-- | src/nvim/option.c | 14 | ||||
-rw-r--r-- | src/nvim/regexp.c | 4 | ||||
-rw-r--r-- | src/nvim/search.c | 2 | ||||
-rw-r--r-- | src/nvim/spell.c | 12 | ||||
-rw-r--r-- | src/nvim/syntax.c | 8 | ||||
-rw-r--r-- | src/nvim/term.c | 22 | ||||
-rw-r--r-- | src/nvim/ui.c | 4 | ||||
-rw-r--r-- | src/nvim/window.c | 2 |
23 files changed, 83 insertions, 83 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 5c1b01130d..58310a22a4 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -750,7 +750,7 @@ do_bufdel ( break; arg = p; } else - bnr = get_int_digits(&arg); + bnr = getdigits_int(&arg); } } if (!got_int && do_current && do_buffer(command, DOBUF_FIRST, @@ -2997,7 +2997,7 @@ build_stl_str_hl ( l = -1; } if (VIM_ISDIGIT(*s)) { - minwid = get_int_digits(&s); + minwid = getdigits_int(&s); if (minwid < 0) /* overflow */ minwid = 0; } @@ -3033,7 +3033,7 @@ build_stl_str_hl ( if (*s == '.') { s++; if (VIM_ISDIGIT(*s)) { - maxwid = get_int_digits(&s); + maxwid = getdigits_int(&s); if (maxwid <= 0) /* overflow */ maxwid = 50; } @@ -4077,7 +4077,7 @@ chk_modeline ( e = s + 4; else e = s + 3; - vers = get_int_digits(&e); + vers = getdigits_int(&e); if (*e == ':' && (s[0] != 'V' || STRNCMP(skipwhite(e + 1), "set", 3) == 0) diff --git a/src/nvim/charset.c b/src/nvim/charset.c index 91d8f221c9..8781e389ed 100644 --- a/src/nvim/charset.c +++ b/src/nvim/charset.c @@ -177,7 +177,7 @@ int buf_init_chartab(buf_T *buf, int global) } if (VIM_ISDIGIT(*p)) { - c = get_int_digits(&p); + c = getdigits_int(&p); } else if (has_mbyte) { c = mb_ptr2char_adv(&p); } else { @@ -189,7 +189,7 @@ int buf_init_chartab(buf_T *buf, int global) ++p; if (VIM_ISDIGIT(*p)) { - c2 = get_int_digits(&p); + c2 = getdigits_int(&p); } else if (has_mbyte) { c2 = mb_ptr2char_adv(&p); } else { @@ -1682,7 +1682,7 @@ char_u* skiptowhite_esc(char_u *p) { /// It will be advanced past the read number. /// /// @return Number read from the string. -intmax_t get_digits(char_u **pp) +intmax_t getdigits(char_u **pp) { intmax_t number = strtoimax((char *)*pp, (char **)pp, 10); assert(errno != ERANGE); @@ -1691,20 +1691,20 @@ intmax_t get_digits(char_u **pp) /// Get an int number from a string. /// -/// A get_digits wrapper restricted to int values. -int get_int_digits(char_u **pp) +/// A getdigits wrapper restricted to int values. +int getdigits_int(char_u **pp) { - intmax_t number = get_digits(pp); + intmax_t number = getdigits(pp); assert(number >= INT_MIN && number <= INT_MAX); return (int)number; } /// Get a long number from a string. /// -/// A get_digits wrapper restricted to long values. -long get_long_digits(char_u **pp) +/// A getdigits wrapper restricted to long values. +long getdigits_long(char_u **pp) { - intmax_t number = get_digits(pp); + intmax_t number = getdigits(pp); assert(number >= LONG_MIN && number <= LONG_MAX); return (long)number; } diff --git a/src/nvim/cursor_shape.c b/src/nvim/cursor_shape.c index 3dab383dcd..2e98b8f512 100644 --- a/src/nvim/cursor_shape.c +++ b/src/nvim/cursor_shape.c @@ -135,7 +135,7 @@ char_u *parse_shape_opt(int what) p += len; if (!VIM_ISDIGIT(*p)) return (char_u *)N_("E548: digit expected"); - int n = get_int_digits(&p); + int n = getdigits_int(&p); if (len == 3) { /* "ver" or "hor" */ if (n == 0) return (char_u *)N_("E549: Illegal percentage"); diff --git a/src/nvim/diff.c b/src/nvim/diff.c index 307ccadf5f..6cc75e948c 100644 --- a/src/nvim/diff.c +++ b/src/nvim/diff.c @@ -1221,11 +1221,11 @@ static void diff_read(int idx_orig, int idx_new, char_u *fname) // {first}a{first}[,{last}] // {first}[,{last}]d{first} p = linebuf; - f1 = get_long_digits(&p); + f1 = getdigits_long(&p); if (*p == ',') { ++p; - l1 = get_long_digits(&p); + l1 = getdigits_long(&p); } else { l1 = f1; } @@ -1235,11 +1235,11 @@ static void diff_read(int idx_orig, int idx_new, char_u *fname) continue; } difftype = *p++; - f2 = get_long_digits(&p); + f2 = getdigits_long(&p); if (*p == ',') { ++p; - l2 = get_long_digits(&p); + l2 = getdigits_long(&p); } else { l2 = f2; } @@ -1783,7 +1783,7 @@ int diffopt_changed(void) diff_flags_new |= DIFF_FILLER; } else if ((STRNCMP(p, "context:", 8) == 0) && VIM_ISDIGIT(p[8])) { p += 8; - diff_context_new = get_int_digits(&p); + diff_context_new = getdigits_int(&p); } else if (STRNCMP(p, "icase", 5) == 0) { p += 5; diff_flags_new |= DIFF_ICASE; @@ -1798,7 +1798,7 @@ int diffopt_changed(void) diff_flags_new |= DIFF_VERTICAL; } else if ((STRNCMP(p, "foldcolumn:", 11) == 0) && VIM_ISDIGIT(p[11])) { p += 11; - diff_foldcolumn_new = get_int_digits(&p); + diff_foldcolumn_new = getdigits_int(&p); } if ((*p != ',') && (*p != NUL)) { diff --git a/src/nvim/digraph.c b/src/nvim/digraph.c index 7a24203594..243468b680 100644 --- a/src/nvim/digraph.c +++ b/src/nvim/digraph.c @@ -1611,7 +1611,7 @@ void putdigraph(char_u *str) EMSG(_(e_number_exp)); return; } - int n = get_int_digits(&str); + int n = getdigits_int(&str); // If the digraph already exists, replace the result. dp = (digr_T *)user_digraphs.ga_data; diff --git a/src/nvim/eval.c b/src/nvim/eval.c index e921f3a1a8..d60ce2de73 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -2750,7 +2750,7 @@ void ex_lockvar(exarg_T *eap) if (eap->forceit) deep = -1; else if (vim_isdigit(*arg)) { - deep = get_int_digits(&arg); + deep = getdigits_int(&arg); arg = skipwhite(arg); } @@ -13370,7 +13370,7 @@ static void f_setreg(typval_T *argvars, typval_T *rettv) yank_type = MBLOCK; if (VIM_ISDIGIT(stropt[1])) { ++stropt; - block_len = get_long_digits(&stropt) - 1; + block_len = getdigits_long(&stropt) - 1; --stropt; } break; diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index 6bd9da0c28..03b45f9d49 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -569,7 +569,7 @@ void ex_retab(exarg_T *eap) save_list = curwin->w_p_list; curwin->w_p_list = 0; /* don't want list mode here */ - new_ts = get_int_digits(&(eap->arg)); + new_ts = getdigits_int(&(eap->arg)); if (new_ts < 0) { EMSG(_(e_positive)); return; @@ -3674,7 +3674,7 @@ void do_sub(exarg_T *eap) */ cmd = skipwhite(cmd); if (VIM_ISDIGIT(*cmd)) { - i = get_long_digits(&cmd); + i = getdigits_long(&cmd); if (i <= 0 && !eap->skip && do_error) { EMSG(_(e_zerocount)); return; @@ -5920,7 +5920,7 @@ void ex_sign(exarg_T *eap) arg1 = arg; if (VIM_ISDIGIT(*arg)) { - id = get_int_digits(&arg); + id = getdigits_int(&arg); if (!vim_iswhite(*arg) && *arg != NUL) { id = -1; @@ -5985,7 +5985,7 @@ void ex_sign(exarg_T *eap) else if (STRNCMP(arg, "buffer=", 7) == 0) { arg += 7; - buf = buflist_findnr(get_int_digits(&arg)); + buf = buflist_findnr(getdigits_int(&arg)); if (*skipwhite(arg) != NUL) EMSG(_(e_trailing)); break; diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c index d4e5f138fc..c796cf6ac7 100644 --- a/src/nvim/ex_cmds2.c +++ b/src/nvim/ex_cmds2.c @@ -471,7 +471,7 @@ dbg_parsearg ( else if ( gap != &prof_ga && VIM_ISDIGIT(*p)) { - bp->dbg_lnum = get_long_digits(&p); + bp->dbg_lnum = getdigits_long(&p); p = skipwhite(p); } else bp->dbg_lnum = 0; diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index abc205a1e8..3661a65b11 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -1733,7 +1733,7 @@ static char_u * do_one_cmd(char_u **cmdlinep, if ((ea.argt & COUNT) && VIM_ISDIGIT(*ea.arg) && (!(ea.argt & BUFNAME) || *(p = skipdigits(ea.arg)) == NUL || vim_iswhite(*p))) { - n = get_long_digits(&ea.arg); + n = getdigits_long(&ea.arg); ea.arg = skipwhite(ea.arg); if (n <= 0 && !ni && (ea.argt & ZEROR) == 0) { errormsg = (char_u *)_(e_zerocount); @@ -3250,7 +3250,7 @@ get_address ( default: if (VIM_ISDIGIT(*cmd)) /* absolute line number */ - lnum = get_long_digits(&cmd); + lnum = getdigits_long(&cmd); } for (;; ) { @@ -3267,7 +3267,7 @@ get_address ( if (!VIM_ISDIGIT(*cmd)) /* '+' is '+1', but '+0' is not '+1' */ n = 1; else - n = get_long_digits(&cmd); + n = getdigits_long(&cmd); if (i == '-') lnum -= n; else @@ -4439,7 +4439,7 @@ two_count: return FAIL; } - *def = get_long_digits(&p); + *def = getdigits_long(&p); *argt |= (ZEROR | NOTADR); if (p != val + vallen || vallen == 0) { @@ -4456,7 +4456,7 @@ invalid_count: if (*def >= 0) goto two_count; - *def = get_long_digits(&p); + *def = getdigits_long(&p); if (p != val + vallen) goto invalid_count; @@ -5819,7 +5819,7 @@ static void ex_tabmove(exarg_T *eap) return; } - tab_number = get_int_digits(&p); + tab_number = getdigits_int(&p); if (relative != 0) tab_number = tab_number * relative + tabpage_index(curtab) - 1; ; } else if (eap->addr_count != 0) @@ -6441,10 +6441,10 @@ static void ex_winsize(exarg_T *eap) char_u *arg = eap->arg; char_u *p; - w = get_int_digits(&arg); + w = getdigits_int(&arg); arg = skipwhite(arg); p = arg; - h = get_int_digits(&arg); + h = getdigits_int(&arg); if (*p != NUL && *arg == NUL) screen_resize(w, h, TRUE); else @@ -6494,10 +6494,10 @@ static void ex_winpos(exarg_T *eap) if (*arg == NUL) { EMSG(_("E188: Obtaining window position not implemented for this platform")); } else { - x = get_int_digits(&arg); + x = getdigits_int(&arg); arg = skipwhite(arg); p = arg; - y = get_int_digits(&arg); + y = getdigits_int(&arg); if (*p == NUL || *arg != NUL) { EMSG(_("E466: :winpos requires two number arguments")); return; @@ -6744,7 +6744,7 @@ static void ex_later(exarg_T *eap) if (*p == NUL) count = 1; else if (isdigit(*p)) { - count = get_long_digits(&p); + count = getdigits_long(&p); switch (*p) { case 's': ++p; sec = TRUE; break; case 'm': ++p; sec = TRUE; count *= 60; break; @@ -7354,7 +7354,7 @@ static void ex_findpat(exarg_T *eap) n = 1; if (vim_isdigit(*eap->arg)) { /* get count */ - n = get_long_digits(&eap->arg); + n = getdigits_long(&eap->arg); eap->arg = skipwhite(eap->arg); } if (*eap->arg == '/') { /* Match regexp, not just whole words */ @@ -7618,7 +7618,7 @@ eval_vars ( s = src + 1; if (*s == '<') /* "#<99" uses v:oldfiles */ ++s; - i = get_int_digits(&s); + i = getdigits_int(&s); *usedlen = (int)(s - src); /* length of what we expand */ if (src[1] == '<') { diff --git a/src/nvim/hardcopy.c b/src/nvim/hardcopy.c index 1f0a0872a5..993ec143bb 100644 --- a/src/nvim/hardcopy.c +++ b/src/nvim/hardcopy.c @@ -320,7 +320,7 @@ static char_u *parse_list_options(char_u *option_str, option_table_T *table, int if (!VIM_ISDIGIT(*p)) return (char_u *)N_("E552: digit expected"); - table[idx].number = get_int_digits(&p); + table[idx].number = getdigits_int(&p); } table[idx].string = p; diff --git a/src/nvim/indent_c.c b/src/nvim/indent_c.c index 94d2a2ffff..56276db3ce 100644 --- a/src/nvim/indent_c.c +++ b/src/nvim/indent_c.c @@ -1463,7 +1463,7 @@ void parse_cino(buf_T *buf) if (*p == '-') ++p; char_u *digits_start = p; /* remember where the digits start */ - int n = get_int_digits(&p); + int n = getdigits_int(&p); divider = 0; if (*p == '.') { /* ".5s" means a fraction */ fraction = atoi((char *)++p); @@ -1676,7 +1676,7 @@ int get_c_indent(void) else if (*p == COM_LEFT || *p == COM_RIGHT) align = *p++; else if (VIM_ISDIGIT(*p) || *p == '-') { - off = get_int_digits(&p); + off = getdigits_int(&p); } else ++p; diff --git a/src/nvim/mark.c b/src/nvim/mark.c index abe05dfb30..cf11be665a 100644 --- a/src/nvim/mark.c +++ b/src/nvim/mark.c @@ -1226,9 +1226,9 @@ int read_viminfo_filemark(vir_T *virp, int force) } if (fm != NULL && (fm->fmark.mark.lnum == 0 || force)) { str = skipwhite(str + 1); - fm->fmark.mark.lnum = get_long_digits(&str); + fm->fmark.mark.lnum = getdigits_long(&str); str = skipwhite(str); - fm->fmark.mark.col = get_int_digits(&str); + fm->fmark.mark.col = getdigits_int(&str); fm->fmark.mark.coladd = 0; fm->fmark.fnum = 0; str = skipwhite(str); diff --git a/src/nvim/menu.c b/src/nvim/menu.c index dffd1f41c5..ea15fd68e3 100644 --- a/src/nvim/menu.c +++ b/src/nvim/menu.c @@ -120,7 +120,7 @@ ex_menu ( break; if (vim_iswhite(*p)) { for (i = 0; i < MENUDEPTH && !vim_iswhite(*arg); ++i) { - pri_tab[i] = get_int_digits(&arg); + pri_tab[i] = getdigits_int(&arg); if (pri_tab[i] == 0) pri_tab[i] = 500; if (*arg == '.') diff --git a/src/nvim/misc1.c b/src/nvim/misc1.c index 912babefb6..c0d2e254ac 100644 --- a/src/nvim/misc1.c +++ b/src/nvim/misc1.c @@ -525,7 +525,7 @@ open_line ( if (*p == COM_RIGHT || *p == COM_LEFT) c = *p++; else if (VIM_ISDIGIT(*p) || *p == '-') - off = get_int_digits(&p); + off = getdigits_int(&p); else ++p; } diff --git a/src/nvim/ops.c b/src/nvim/ops.c index d471453ffd..87a2c2ca05 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -4501,7 +4501,7 @@ int read_viminfo_register(vir_T *virp, int force) y_current->y_type = MLINE; /* get the block width; if it's missing we get a zero, which is OK */ str = skipwhite(skiptowhite(str)); - y_current->y_width = get_int_digits(&str); + y_current->y_width = getdigits_int(&str); } while (!(eof = viminfo_readline(virp)) diff --git a/src/nvim/option.c b/src/nvim/option.c index 2c9bd58d08..6c774937cd 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -2918,7 +2918,7 @@ do_set ( */ else if (varp == (char_u *)&p_bs && VIM_ISDIGIT(**(char_u **)varp)) { - i = get_int_digits((char_u **)varp); + i = getdigits_int((char_u **)varp); switch (i) { case 0: *(char_u **)varp = empty_option; @@ -2943,7 +2943,7 @@ do_set ( else if (varp == (char_u *)&p_ww && VIM_ISDIGIT(*arg)) { *errbuf = NUL; - i = get_int_digits(&arg); + i = getdigits_int(&arg); if (i & 1) STRCAT(errbuf, "b,"); if (i & 2) @@ -4359,7 +4359,7 @@ did_set_string_option ( /* set ru_wid if 'ruf' starts with "%99(" */ if (*++s == '-') /* ignore a '-' */ s++; - wid = get_int_digits(&s); + wid = getdigits_int(&s); if (wid && *s == '(' && (errmsg = check_stl_option(p_ruf)) == NULL) ru_wid = wid; else @@ -4664,14 +4664,14 @@ char_u *check_colorcolumn(win_T *wp) ++s; if (!VIM_ISDIGIT(*s)) return e_invarg; - col = col * get_int_digits(&s); + col = col * getdigits_int(&s); if (wp->w_buffer->b_p_tw == 0) goto skip; /* 'textwidth' not set, skip this item */ col += wp->w_buffer->b_p_tw; if (col < 0) goto skip; } else if (VIM_ISDIGIT(*s)) - col = get_int_digits(&s); + col = getdigits_int(&s); else return e_invarg; color_cols[count++] = col - 1; /* 1-based to 0-based */ @@ -8114,12 +8114,12 @@ static bool briopt_check(win_T *wp) && ((p[6] == '-' && VIM_ISDIGIT(p[7])) || VIM_ISDIGIT(p[6]))) { p += 6; - bri_shift = get_int_digits(&p); + bri_shift = getdigits_int(&p); } else if (STRNCMP(p, "min:", 4) == 0 && VIM_ISDIGIT(p[4])) { p += 4; - bri_min = get_long_digits(&p); + bri_min = getdigits_long(&p); } else if (STRNCMP(p, "sbr", 3) == 0) { diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c index 326640118b..62c01e3798 100644 --- a/src/nvim/regexp.c +++ b/src/nvim/regexp.c @@ -3082,10 +3082,10 @@ static int read_limits(long *minval, long *maxval) reverse = TRUE; } first_char = regparse; - *minval = get_long_digits(®parse); + *minval = getdigits_long(®parse); if (*regparse == ',') { /* There is a comma */ if (vim_isdigit(*++regparse)) - *maxval = get_long_digits(®parse); + *maxval = getdigits_long(®parse); else *maxval = MAX_LIMIT; } else if (VIM_ISDIGIT(*first_char)) diff --git a/src/nvim/search.c b/src/nvim/search.c index bd2a49c2d2..25b8277933 100644 --- a/src/nvim/search.c +++ b/src/nvim/search.c @@ -4611,7 +4611,7 @@ int read_viminfo_search_pattern(vir_T *virp, int force) if (lp[4] == 'E') off_end = SEARCH_END; lp += 5; - off = get_long_digits(&lp); + off = getdigits_long(&lp); } if (lp[0] == '~') { /* use this pattern for last-used pattern */ setlast = TRUE; diff --git a/src/nvim/spell.c b/src/nvim/spell.c index af020198d3..5e69a935ca 100644 --- a/src/nvim/spell.c +++ b/src/nvim/spell.c @@ -5162,7 +5162,7 @@ static unsigned get_affitem(int flagtype, char_u **pp) ++*pp; // always advance, avoid getting stuck return 0; } - res = get_int_digits(pp); + res = getdigits_int(pp); } else { res = mb_ptr2char_adv(pp); if (flagtype == AFT_LONG || (flagtype == AFT_CAPLONG @@ -5283,7 +5283,7 @@ static bool flag_in_afflist(int flagtype, char_u *afflist, unsigned flag) case AFT_NUM: for (p = afflist; *p != NUL; ) { - int digits = get_int_digits(&p); + int digits = getdigits_int(&p); assert(digits >= 0); n = (unsigned int)digits; if (n == flag) @@ -6359,19 +6359,19 @@ int spell_check_msm(void) if (!VIM_ISDIGIT(*p)) return FAIL; // block count = (value * 1024) / SBLOCKSIZE (but avoid overflow) - start = (get_long_digits(&p) * 10) / (SBLOCKSIZE / 102); + start = (getdigits_long(&p) * 10) / (SBLOCKSIZE / 102); if (*p != ',') return FAIL; ++p; if (!VIM_ISDIGIT(*p)) return FAIL; - incr = (get_long_digits(&p) * 102) / (SBLOCKSIZE / 10); + incr = (getdigits_long(&p) * 102) / (SBLOCKSIZE / 10); if (*p != ',') return FAIL; ++p; if (!VIM_ISDIGIT(*p)) return FAIL; - added = get_long_digits(&p) * 1024; + added = getdigits_long(&p) * 1024; if (*p != NUL) return FAIL; @@ -8357,7 +8357,7 @@ int spell_check_sps(void) f = 0; if (VIM_ISDIGIT(*buf)) { s = buf; - sps_limit = get_int_digits(&s); + sps_limit = getdigits_int(&s); if (*s != NUL && !VIM_ISDIGIT(*s)) f = -1; } else if (STRCMP(buf, "best") == 0) diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c index 6975932f2c..4e2be0cd44 100644 --- a/src/nvim/syntax.c +++ b/src/nvim/syntax.c @@ -4900,7 +4900,7 @@ static char_u *get_syn_pattern(char_u *arg, synpat_T *ci) ci->sp_off_flags |= (1 << idx); if (idx == SPO_LC_OFF) { /* lc=99 */ end += 3; - *p = get_int_digits(&end); + *p = getdigits_int(&end); /* "lc=" offset automatically sets "ms=" offset */ if (!(ci->sp_off_flags & (1 << SPO_MS_OFF))) { @@ -4911,10 +4911,10 @@ static char_u *get_syn_pattern(char_u *arg, synpat_T *ci) end += 4; if (*end == '+') { ++end; - *p = get_int_digits(&end); /* positive offset */ + *p = getdigits_int(&end); /* positive offset */ } else if (*end == '-') { ++end; - *p = -get_int_digits(&end); /* negative offset */ + *p = -getdigits_int(&end); /* negative offset */ } } if (*end != ',') @@ -4980,7 +4980,7 @@ static void syn_cmd_sync(exarg_T *eap, int syncing) illegal = TRUE; break; } - n = get_long_digits(&arg_end); + n = getdigits_long(&arg_end); if (!eap->skip) { if (key[4] == 'B') curwin->w_s->b_syn_sync_linebreaks = n; diff --git a/src/nvim/term.c b/src/nvim/term.c index b65e750974..b7c30300b0 100644 --- a/src/nvim/term.c +++ b/src/nvim/term.c @@ -3230,7 +3230,7 @@ int check_termcode(int max_offset, char_u *buf, int bufsize, int *buflen) */ p = tp + slen; - mouse_code = get_int_digits(&p); + mouse_code = getdigits_int(&p); if (*p++ != ';') return -1; @@ -3238,11 +3238,11 @@ int check_termcode(int max_offset, char_u *buf, int bufsize, int *buflen) if (key_name[0] == KS_SGR_MOUSE) mouse_code += 32; - mouse_col = get_int_digits(&p); + mouse_col = getdigits_int(&p); if (*p++ != ';') return -1; - mouse_row = get_int_digits(&p); + mouse_row = getdigits_int(&p); if (key_name[0] == KS_SGR_MOUSE && *p == 'm') mouse_code |= MOUSE_RELEASE; else if (*p != 'M') @@ -3269,7 +3269,7 @@ int check_termcode(int max_offset, char_u *buf, int bufsize, int *buflen) } } p += j; - if (cmd_complete && get_int_digits(&p) == mouse_code) { + if (cmd_complete && getdigits_int(&p) == mouse_code) { slen += j; /* skip the \033[ */ continue; } @@ -3315,10 +3315,10 @@ int check_termcode(int max_offset, char_u *buf, int bufsize, int *buflen) * '6' is the row, 45 is the column */ p = tp + slen; - mr = get_int_digits(&p); + mr = getdigits_int(&p); if (*p++ != ',') return -1; - mc = get_int_digits(&p); + mc = getdigits_int(&p); if (*p++ != '\r') return -1; @@ -3383,27 +3383,27 @@ int check_termcode(int max_offset, char_u *buf, int bufsize, int *buflen) p = tp + slen; /* get event status */ - Pe = get_int_digits(&p); + Pe = getdigits_int(&p); if (*p++ != ';') return -1; /* get button status */ - Pb = get_int_digits(&p); + Pb = getdigits_int(&p); if (*p++ != ';') return -1; /* get row status */ - Pr = get_int_digits(&p); + Pr = getdigits_int(&p); if (*p++ != ';') return -1; /* get column status */ - Pc = get_int_digits(&p); + Pc = getdigits_int(&p); /* the page parameter is optional */ if (*p == ';') { p++; - (void)get_int_digits(&p); + (void)getdigits_int(&p); } if (*p++ != '&') return -1; diff --git a/src/nvim/ui.c b/src/nvim/ui.c index a0b45c1077..25d6a81960 100644 --- a/src/nvim/ui.c +++ b/src/nvim/ui.c @@ -344,14 +344,14 @@ static void parse_abstract_ui_codes(uint8_t *ptr, int len) assert(p != end); if (VIM_ISDIGIT(*p)) { - arg1 = get_int_digits(&p); + arg1 = getdigits_int(&p); if (p >= end) { break; } if (*p == ';') { p++; - arg2 = get_int_digits(&p); + arg2 = getdigits_int(&p); if (p >= end) break; } diff --git a/src/nvim/window.c b/src/nvim/window.c index cfe60c65f3..0e336e8cbe 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -4908,7 +4908,7 @@ file_name_in_line ( ++p; /* skip the separator */ p = skipwhite(p); if (isdigit(*p)) - *file_lnum = get_long_digits(&p); + *file_lnum = getdigits_long(&p); } } |