neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 0117c97e624ec14da05844f4e6f162b4f4e2a827
parent 72503a7a4596dd4558e31be428b57f2ce3aaeb4f
Author: dundargoc <33953936+dundargoc@users.noreply.github.com>
Date:   Thu, 27 Oct 2022 06:28:16 +0200

refactor(clint): convert short to int16_t (#20815)


Diffstat:
Msrc/nvim/memline.c | 6+++---
Msrc/nvim/regexp.c | 2+-
Msrc/nvim/spellfile.c | 2+-
3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/nvim/memline.c b/src/nvim/memline.c @@ -169,7 +169,7 @@ struct block0 { char_u b0_fname[B0_FNAME_SIZE_ORG]; // name of file being edited long b0_magic_long; // check for byte order of long int b0_magic_int; // check for byte order of int - short b0_magic_short; // check for byte order of short + int16_t b0_magic_short; // check for byte order of short char_u b0_magic_char; // check for last char }; @@ -272,7 +272,7 @@ int ml_open(buf_T *buf) b0p->b0_id[1] = BLOCK0_ID1; b0p->b0_magic_long = B0_MAGIC_LONG; b0p->b0_magic_int = (int)B0_MAGIC_INT; - b0p->b0_magic_short = (short)B0_MAGIC_SHORT; + b0p->b0_magic_short = (int16_t)B0_MAGIC_SHORT; b0p->b0_magic_char = B0_MAGIC_CHAR; xstrlcpy(xstpcpy((char *)b0p->b0_version, "VIM "), Version, 6); long_to_char((long)mfp->mf_page_size, b0p->b0_page_size); @@ -3376,7 +3376,7 @@ static int b0_magic_wrong(ZERO_BL *b0p) { return b0p->b0_magic_long != B0_MAGIC_LONG || b0p->b0_magic_int != (int)B0_MAGIC_INT - || b0p->b0_magic_short != (short)B0_MAGIC_SHORT + || b0p->b0_magic_short != (int16_t)B0_MAGIC_SHORT || b0p->b0_magic_char != B0_MAGIC_CHAR; } diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c @@ -240,7 +240,7 @@ static int get_char_class(char **pp) * Specific version of character class functions. * Using a table to keep this fast. */ -static short class_tab[256]; +static int16_t class_tab[256]; #define RI_DIGIT 0x01 #define RI_HEX 0x02 diff --git a/src/nvim/spellfile.c b/src/nvim/spellfile.c @@ -415,7 +415,7 @@ struct wordnode_S { // "wn_region" the LSW of the wordnr. char_u wn_affixID; // supported/required prefix ID or 0 uint16_t wn_flags; // WF_ flags - short wn_region; // region mask + int16_t wn_region; // region mask #ifdef SPELL_PRINTTREE int wn_nr; // sequence nr for printing