diff options
author | Dundar Goc <gocdundar@gmail.com> | 2022-05-09 11:49:32 +0200 |
---|---|---|
committer | Dundar Goc <gocdundar@gmail.com> | 2022-05-16 13:27:06 +0200 |
commit | f0148de7907ec297647816d51c79745be729439e (patch) | |
tree | 1aaaa4bbb1cff930178e05dd8b0f72482db166e6 /src/nvim/digraph.c | |
parent | 7adecbcd29e17b71bf43e50a444724da184c04a7 (diff) | |
download | rneovim-f0148de7907ec297647816d51c79745be729439e.tar.gz rneovim-f0148de7907ec297647816d51c79745be729439e.tar.bz2 rneovim-f0148de7907ec297647816d51c79745be729439e.zip |
refactor: replace char_u variables and functions with char
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/digraph.c')
-rw-r--r-- | src/nvim/digraph.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nvim/digraph.c b/src/nvim/digraph.c index 43ea32fc09..1b536bdde6 100644 --- a/src/nvim/digraph.c +++ b/src/nvim/digraph.c @@ -2069,7 +2069,7 @@ void ex_loadkeymap(exarg_T *eap) #define KMAP_LLEN 200 // max length of "to" and "from" together char_u buf[KMAP_LLEN + 11]; - char_u *save_cpo = p_cpo; + char *save_cpo = p_cpo; if (!getline_equal(eap->getline, eap->cookie, getsourceline)) { emsg(_("E105: Using :loadkeymap not in a sourced file")); @@ -2083,7 +2083,7 @@ void ex_loadkeymap(exarg_T *eap) ga_init(&curbuf->b_kmap_ga, (int)sizeof(kmap_T), 20); // Set 'cpoptions' to "C" to avoid line continuation. - p_cpo = (char_u *)"C"; + p_cpo = "C"; // Get each line of the sourced file, break at the end. for (;;) { @@ -2093,7 +2093,7 @@ void ex_loadkeymap(exarg_T *eap) break; } - char_u *p = (char_u *)skipwhite((char *)line); + char_u *p = (char_u *)skipwhite(line); if ((*p != '"') && (*p != NUL)) { kmap_T *kp = GA_APPEND_VIA_PTR(kmap_T, &curbuf->b_kmap_ga); @@ -2144,22 +2144,22 @@ void keymap_ga_clear(garray_T *kmap_ga) /// Stop using 'keymap'. static void keymap_unload(void) { - char_u buf[KMAP_MAXLEN + 10]; - char_u *save_cpo = p_cpo; + char buf[KMAP_MAXLEN + 10]; + char *save_cpo = p_cpo; if (!(curbuf->b_kmap_state & KEYMAP_LOADED)) { return; } // Set 'cpoptions' to "C" to avoid line continuation. - p_cpo = (char_u *)"C"; + p_cpo = "C"; // clear the ":lmap"s kmap_T *kp = (kmap_T *)curbuf->b_kmap_ga.ga_data; for (int i = 0; i < curbuf->b_kmap_ga.ga_len; i++) { - vim_snprintf((char *)buf, sizeof(buf), "<buffer> %s", kp[i].from); - (void)do_map(1, buf, MODE_LANGMAP, false); + vim_snprintf(buf, sizeof(buf), "<buffer> %s", kp[i].from); + (void)do_map(1, (char_u *)buf, MODE_LANGMAP, false); } keymap_ga_clear(&curbuf->b_kmap_ga); |