aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/buffer_defs.h4
-rw-r--r--src/memline.c11
-rw-r--r--src/normal.c2
-rw-r--r--src/spell.c6
-rw-r--r--src/syntax_defs.h4
-rw-r--r--src/types.h1
6 files changed, 13 insertions, 15 deletions
diff --git a/src/buffer_defs.h b/src/buffer_defs.h
index fd28368b4d..5c55173022 100644
--- a/src/buffer_defs.h
+++ b/src/buffer_defs.h
@@ -378,7 +378,7 @@ typedef struct {
synstate_T *b_sst_firstfree;
int b_sst_freecount;
linenr_T b_sst_check_lnum;
- short_u b_sst_lasttick; /* last display tick */
+ uint16_t b_sst_lasttick; /* last display tick */
/* for spell checking */
garray_T b_langp; /* list of pointers to slang_T, see spell.c */
@@ -774,7 +774,7 @@ struct tabpage_S {
*/
typedef struct w_line {
linenr_T wl_lnum; /* buffer line number for logical line */
- short_u wl_size; /* height in screen lines */
+ uint16_t wl_size; /* height in screen lines */
char wl_valid; /* TRUE values are valid for text in buffer */
char wl_folded; /* TRUE when this is a range of folded lines */
linenr_T wl_lastlnum; /* last buffer line number for logical line */
diff --git a/src/memline.c b/src/memline.c
index 31f1b525ca..90f286367a 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -100,9 +100,9 @@ struct pointer_entry {
* A pointer block contains a list of branches in the tree.
*/
struct pointer_block {
- short_u pb_id; /* ID for pointer block: PTR_ID */
- short_u pb_count; /* number of pointers in this block */
- short_u pb_count_max; /* maximum value for pb_count */
+ uint16_t pb_id; /* ID for pointer block: PTR_ID */
+ uint16_t pb_count; /* number of pointers in this block */
+ uint16_t pb_count_max; /* maximum value for pb_count */
PTR_EN pb_pointer[1]; /* list of pointers to blocks (actually longer)
* followed by empty space until end of page */
};
@@ -115,7 +115,7 @@ struct pointer_block {
* etc. Thus the order of the lines is the opposite of the line number.
*/
struct data_block {
- short_u db_id; /* ID for data block: DATA_ID */
+ uint16_t db_id; /* ID for data block: DATA_ID */
unsigned db_free; /* free space available */
unsigned db_txt_start; /* byte where text starts */
unsigned db_txt_end; /* byte just after data block */
@@ -3011,8 +3011,7 @@ static bhdr_T *ml_new_ptr(memfile_T *mfp)
pp = (PTR_BL *)(hp->bh_data);
pp->pb_id = PTR_ID;
pp->pb_count = 0;
- pp->pb_count_max = (short_u)((mfp->mf_page_size - sizeof(PTR_BL))
- / sizeof(PTR_EN) + 1);
+ pp->pb_count_max = (mfp->mf_page_size - sizeof(PTR_BL)) / sizeof(PTR_EN) + 1;
return hp;
}
diff --git a/src/normal.c b/src/normal.c
index 0d6410f3a9..7c151bc862 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -218,7 +218,7 @@ typedef void (*nv_func_T)(cmdarg_T *cap);
static const struct nv_cmd {
int cmd_char; /* (first) command character */
nv_func_T cmd_func; /* function for this command */
- short_u cmd_flags; /* NV_ flags */
+ uint16_t cmd_flags; /* NV_ flags */
short cmd_arg; /* value for ca.arg */
} nv_cmds[] =
{
diff --git a/src/spell.c b/src/spell.c
index b948aed530..b2eb178e0d 100644
--- a/src/spell.c
+++ b/src/spell.c
@@ -568,7 +568,7 @@ typedef struct langp_S {
static char_u *int_wordlist = NULL;
typedef struct wordcount_S {
- short_u wc_count; // nr of times word was seen
+ uint16_t wc_count; // nr of times word was seen
char_u wc_word[1]; // word, actually longer
} wordcount_T;
@@ -4252,7 +4252,7 @@ struct wordnode_S {
// In the soundfolded word tree "wn_flags" has the MSW of the wordnr and
// "wn_region" the LSW of the wordnr.
char_u wn_affixID; // supported/required prefix ID or 0
- short_u wn_flags; // WF_ flags
+ uint16_t wn_flags; // WF_ flags
short wn_region; // region mask
#ifdef SPELL_PRINTTREE
@@ -7236,7 +7236,7 @@ put_node (
// associated condition nr (stored in wn_region). The
// byte value is misused to store the "rare" and "not
// combining" flags
- if (np->wn_flags == (short_u)PFX_FLAGS)
+ if (np->wn_flags == (uint16_t)PFX_FLAGS)
putc(BY_NOFLAGS, fd); // <byte>
else {
putc(BY_FLAGS, fd); // <byte>
diff --git a/src/syntax_defs.h b/src/syntax_defs.h
index 6b16d64621..aed2913f81 100644
--- a/src/syntax_defs.h
+++ b/src/syntax_defs.h
@@ -69,8 +69,8 @@ typedef struct attr_entry {
} term;
struct {
/* These colors need to be > 8 bits to hold 256. */
- short_u fg_color; /* foreground color number */
- short_u bg_color; /* background color number */
+ uint16_t fg_color; /* foreground color number */
+ uint16_t bg_color; /* background color number */
} cterm;
} ae_u;
} attrentry_T;
diff --git a/src/types.h b/src/types.h
index e2b9f15ae7..a038e2d5fc 100644
--- a/src/types.h
+++ b/src/types.h
@@ -15,7 +15,6 @@
* already defined, so we use char_u to avoid trouble.
*/
typedef unsigned char char_u;
-typedef unsigned short short_u;
typedef unsigned int int_u;
#endif /* NEOVIM_TYPES_H */