mirror of
https://github.com/neovim/neovim.git
synced 2025-09-14 07:18:17 +00:00
refactor: replace char_u variables and functions with char
Work on https://github.com/neovim/neovim/issues/459
This commit is contained in:
@@ -94,11 +94,11 @@ Array mode_style_array(void)
|
||||
/// @returns error message for an illegal option, NULL otherwise.
|
||||
char *parse_shape_opt(int what)
|
||||
{
|
||||
char_u *colonp;
|
||||
char_u *commap;
|
||||
char_u *slashp;
|
||||
char_u *p = NULL;
|
||||
char_u *endp;
|
||||
char *colonp;
|
||||
char *commap;
|
||||
char *slashp;
|
||||
char *p = NULL;
|
||||
char *endp;
|
||||
int idx = 0; // init for GCC
|
||||
int all_idx;
|
||||
int len;
|
||||
@@ -118,10 +118,10 @@ char *parse_shape_opt(int what)
|
||||
}
|
||||
}
|
||||
// Repeat for all comma separated parts.
|
||||
char_u *modep = p_guicursor;
|
||||
char *modep = (char *)p_guicursor;
|
||||
while (modep != NULL && *modep != NUL) {
|
||||
colonp = vim_strchr(modep, ':');
|
||||
commap = vim_strchr(modep, ',');
|
||||
colonp = (char *)vim_strchr((char_u *)modep, ':');
|
||||
commap = (char *)vim_strchr((char_u *)modep, ',');
|
||||
|
||||
if (colonp == NULL || (commap != NULL && commap < colonp)) {
|
||||
return N_("E545: Missing colon");
|
||||
@@ -169,7 +169,7 @@ char *parse_shape_opt(int what)
|
||||
for (p = colonp + 1; *p && *p != ',';) {
|
||||
{
|
||||
// First handle the ones with a number argument.
|
||||
i = *p;
|
||||
i = (uint8_t)(*p);
|
||||
len = 0;
|
||||
if (STRNICMP(p, "ver", 3) == 0) {
|
||||
len = 3;
|
||||
@@ -187,7 +187,7 @@ char *parse_shape_opt(int what)
|
||||
if (!ascii_isdigit(*p)) {
|
||||
return N_("E548: digit expected");
|
||||
}
|
||||
int n = getdigits_int(&p, false, 0);
|
||||
int n = getdigits_int((char_u **)&p, false, 0);
|
||||
if (len == 3) { // "ver" or "hor"
|
||||
if (n == 0) {
|
||||
return N_("E549: Illegal percentage");
|
||||
@@ -215,7 +215,7 @@ char *parse_shape_opt(int what)
|
||||
}
|
||||
p += 5;
|
||||
} else { // must be a highlight group name then
|
||||
endp = vim_strchr(p, '-');
|
||||
endp = (char *)vim_strchr((char_u *)p, '-');
|
||||
if (commap == NULL) { // last part
|
||||
if (endp == NULL) {
|
||||
endp = p + STRLEN(p); // find end of part
|
||||
@@ -223,14 +223,14 @@ char *parse_shape_opt(int what)
|
||||
} else if (endp > commap || endp == NULL) {
|
||||
endp = commap;
|
||||
}
|
||||
slashp = vim_strchr(p, '/');
|
||||
slashp = (char *)vim_strchr((char_u *)p, '/');
|
||||
if (slashp != NULL && slashp < endp) {
|
||||
// "group/langmap_group"
|
||||
i = syn_check_group((char *)p, (size_t)(slashp - p));
|
||||
i = syn_check_group(p, (size_t)(slashp - p));
|
||||
p = slashp + 1;
|
||||
}
|
||||
if (round == 2) {
|
||||
shape_table[idx].id = syn_check_group((char *)p, (size_t)(endp - p));
|
||||
shape_table[idx].id = syn_check_group(p, (size_t)(endp - p));
|
||||
shape_table[idx].id_lm = shape_table[idx].id;
|
||||
if (slashp != NULL && slashp < endp) {
|
||||
shape_table[idx].id = i;
|
||||
|
Reference in New Issue
Block a user