0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 8.1.2378: using old C style comments

Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
This commit is contained in:
Bram Moolenaar 2019-12-01 21:11:22 +01:00
parent fa5612c7d8
commit 5d18efecfd
9 changed files with 2006 additions and 2012 deletions

View File

@ -15,10 +15,10 @@
#if defined(FEAT_EVAL) || defined(PROTO) #if defined(FEAT_EVAL) || defined(PROTO)
/* List head for garbage collection. Although there can be a reference loop // List head for garbage collection. Although there can be a reference loop
* from partial to dict to partial, we don't need to keep track of the partial, // from partial to dict to partial, we don't need to keep track of the partial,
* since it will get freed when the dict is unused and gets freed. */ // since it will get freed when the dict is unused and gets freed.
static dict_T *first_dict = NULL; /* list of all dicts */ static dict_T *first_dict = NULL;
/* /*
* Allocate an empty header for a dictionary. * Allocate an empty header for a dictionary.
@ -31,7 +31,7 @@ dict_alloc(void)
d = ALLOC_CLEAR_ONE(dict_T); d = ALLOC_CLEAR_ONE(dict_T);
if (d != NULL) if (d != NULL)
{ {
/* Add the dict to the list of dicts for garbage collection. */ // Add the dict to the list of dicts for garbage collection.
if (first_dict != NULL) if (first_dict != NULL)
first_dict->dv_used_prev = d; first_dict->dv_used_prev = d;
d->dv_used_next = first_dict; d->dv_used_next = first_dict;
@ -109,15 +109,15 @@ dict_free_contents(dict_T *d)
hashitem_T *hi; hashitem_T *hi;
dictitem_T *di; dictitem_T *di;
/* Lock the hashtab, we don't want it to resize while freeing items. */ // Lock the hashtab, we don't want it to resize while freeing items.
hash_lock(&d->dv_hashtab); hash_lock(&d->dv_hashtab);
todo = (int)d->dv_hashtab.ht_used; todo = (int)d->dv_hashtab.ht_used;
for (hi = d->dv_hashtab.ht_array; todo > 0; ++hi) for (hi = d->dv_hashtab.ht_array; todo > 0; ++hi)
{ {
if (!HASHITEM_EMPTY(hi)) if (!HASHITEM_EMPTY(hi))
{ {
/* Remove the item before deleting it, just in case there is // Remove the item before deleting it, just in case there is
* something recursive causing trouble. */ // something recursive causing trouble.
di = HI2DI(hi); di = HI2DI(hi);
hash_remove(&d->dv_hashtab, hi); hash_remove(&d->dv_hashtab, hi);
dictitem_free(di); dictitem_free(di);
@ -125,14 +125,14 @@ dict_free_contents(dict_T *d)
} }
} }
/* The hashtab is still locked, it has to be re-initialized anyway */ // The hashtab is still locked, it has to be re-initialized anyway
hash_clear(&d->dv_hashtab); hash_clear(&d->dv_hashtab);
} }
static void static void
dict_free_dict(dict_T *d) dict_free_dict(dict_T *d)
{ {
/* Remove the dict from the list of dicts for garbage collection. */ // Remove the dict from the list of dicts for garbage collection.
if (d->dv_used_prev == NULL) if (d->dv_used_prev == NULL)
first_dict = d->dv_used_next; first_dict = d->dv_used_next;
else else
@ -176,9 +176,9 @@ dict_free_nonref(int copyID)
for (dd = first_dict; dd != NULL; dd = dd->dv_used_next) for (dd = first_dict; dd != NULL; dd = dd->dv_used_next)
if ((dd->dv_copyID & COPYID_MASK) != (copyID & COPYID_MASK)) if ((dd->dv_copyID & COPYID_MASK) != (copyID & COPYID_MASK))
{ {
/* Free the Dictionary and ordinary items it contains, but don't // Free the Dictionary and ordinary items it contains, but don't
* recurse into Lists and Dictionaries, they will be in the list // recurse into Lists and Dictionaries, they will be in the list
* of dicts or list of lists. */ // of dicts or list of lists.
dict_free_contents(dd); dict_free_contents(dd);
did_free = TRUE; did_free = TRUE;
} }
@ -577,7 +577,7 @@ dict_find(dict_T *d, char_u *key, int len)
} }
else else
{ {
/* Avoid a malloc/free by using buf[]. */ // Avoid a malloc/free by using buf[].
vim_strncpy(buf, key, len); vim_strncpy(buf, key, len);
akey = buf; akey = buf;
} }
@ -764,7 +764,7 @@ dict_get_tv(char_u **arg, typval_T *rettv, int evaluate, int literal)
*/ */
if (*start != '}') if (*start != '}')
{ {
if (eval1(&start, &tv, FALSE) == FAIL) /* recursive! */ if (eval1(&start, &tv, FALSE) == FAIL) // recursive!
return FAIL; return FAIL;
if (*start == '}') if (*start == '}')
return NOTDONE; return NOTDONE;
@ -798,14 +798,14 @@ dict_get_tv(char_u **arg, typval_T *rettv, int evaluate, int literal)
key = tv_get_string_buf_chk(&tvkey, buf); key = tv_get_string_buf_chk(&tvkey, buf);
if (key == NULL) if (key == NULL)
{ {
/* "key" is NULL when tv_get_string_buf_chk() gave an errmsg */ // "key" is NULL when tv_get_string_buf_chk() gave an errmsg
clear_tv(&tvkey); clear_tv(&tvkey);
goto failret; goto failret;
} }
} }
*arg = skipwhite(*arg + 1); *arg = skipwhite(*arg + 1);
if (eval1(arg, &tv, evaluate) == FAIL) /* recursive! */ if (eval1(arg, &tv, evaluate) == FAIL) // recursive!
{ {
if (evaluate) if (evaluate)
clear_tv(&tvkey); clear_tv(&tvkey);
@ -881,8 +881,8 @@ dict_extend(dict_T *d1, dict_T *d2, char_u *action)
di1 = dict_find(d1, hi2->hi_key, -1); di1 = dict_find(d1, hi2->hi_key, -1);
if (d1->dv_scope != 0) if (d1->dv_scope != 0)
{ {
/* Disallow replacing a builtin function in l: and g:. // Disallow replacing a builtin function in l: and g:.
* Check the key to be valid when adding to any scope. */ // Check the key to be valid when adding to any scope.
if (d1->dv_scope == VAR_DEF_SCOPE if (d1->dv_scope == VAR_DEF_SCOPE
&& HI2DI(hi2)->di_tv.v_type == VAR_FUNC && HI2DI(hi2)->di_tv.v_type == VAR_FUNC
&& var_check_func_name(hi2->hi_key, di1 == NULL)) && var_check_func_name(hi2->hi_key, di1 == NULL))
@ -929,8 +929,8 @@ dict_lookup(hashitem_T *hi)
dict_equal( dict_equal(
dict_T *d1, dict_T *d1,
dict_T *d2, dict_T *d2,
int ic, /* ignore case for strings */ int ic, // ignore case for strings
int recursive) /* TRUE when used recursively */ int recursive) // TRUE when used recursively
{ {
hashitem_T *hi; hashitem_T *hi;
dictitem_T *item2; dictitem_T *item2;
@ -1004,19 +1004,19 @@ dict_list(typval_T *argvars, typval_T *rettv, int what)
if (what == 0) if (what == 0)
{ {
/* keys() */ // keys()
li->li_tv.v_type = VAR_STRING; li->li_tv.v_type = VAR_STRING;
li->li_tv.v_lock = 0; li->li_tv.v_lock = 0;
li->li_tv.vval.v_string = vim_strsave(di->di_key); li->li_tv.vval.v_string = vim_strsave(di->di_key);
} }
else if (what == 1) else if (what == 1)
{ {
/* values() */ // values()
copy_tv(&di->di_tv, &li->li_tv); copy_tv(&di->di_tv, &li->li_tv);
} }
else else
{ {
/* items() */ // items()
l2 = list_alloc(); l2 = list_alloc();
li->li_tv.v_type = VAR_LIST; li->li_tv.v_type = VAR_LIST;
li->li_tv.v_lock = 0; li->li_tv.v_lock = 0;
@ -1079,7 +1079,7 @@ dict_set_items_ro(dict_T *di)
int todo = (int)di->dv_hashtab.ht_used; int todo = (int)di->dv_hashtab.ht_used;
hashitem_T *hi; hashitem_T *hi;
/* Set readonly */ // Set readonly
for (hi = di->dv_hashtab.ht_array; todo > 0 ; ++hi) for (hi = di->dv_hashtab.ht_array; todo > 0 ; ++hi)
{ {
if (HASHITEM_EMPTY(hi)) if (HASHITEM_EMPTY(hi))
@ -1139,4 +1139,4 @@ dict_remove(typval_T *argvars, typval_T *rettv, char_u *arg_errmsg)
} }
} }
#endif /* defined(FEAT_EVAL) */ #endif // defined(FEAT_EVAL)

File diff suppressed because it is too large Load Diff

View File

@ -26,7 +26,7 @@ typedef struct digraph
static void printdigraph(digr_T *dp, result_T *previous); static void printdigraph(digr_T *dp, result_T *previous);
/* digraphs added by the user */ // digraphs added by the user
static garray_T user_digraphs = {0, 0, (int)sizeof(digr_T), 10, NULL}; static garray_T user_digraphs = {0, 0, (int)sizeof(digr_T), 10, NULL};
/* /*
@ -39,171 +39,171 @@ static digr_T digraphdefault[] =
/* /*
* ATARI digraphs * ATARI digraphs
*/ */
{{'C', ',', 128}, /* ~@ XX */ {{'C', ',', 128}, // ~@ XX
{'u', '"', 129}, /*  */ {'u', '"', 129}, // 
{'e', '\'', 130}, /* ‚ */ {'e', '\'', 130}, // ‚
{'a', '^', 131}, /* ƒ */ {'a', '^', 131}, // ƒ
{'a', '"', 132}, /* „ */ {'a', '"', 132}, // „
{'a', '`', 133}, /* … */ {'a', '`', 133}, // …
{'a', '@', 134}, /* † */ {'a', '@', 134}, // †
{'c', ',', 135}, /* ~G XX */ {'c', ',', 135}, // ~G XX
{'e', '^', 136}, /* ~H XX */ {'e', '^', 136}, // ~H XX
{'e', '"', 137}, /* ‰ */ {'e', '"', 137}, // ‰
{'e', '`', 138}, /* Š */ {'e', '`', 138}, // Š
{'i', '"', 139}, /* ‹ */ {'i', '"', 139}, // ‹
{'i', '^', 140}, /* Œ */ {'i', '^', 140}, // Œ
{'i', '`', 141}, /*  */ {'i', '`', 141}, // 
{'A', '"', 142}, /* Ž */ {'A', '"', 142}, // Ž
{'A', '@', 143}, /*  */ {'A', '@', 143}, // 
{'E', '\'', 144}, /*  */ {'E', '\'', 144}, // 
{'a', 'e', 145}, /* ‘ */ {'a', 'e', 145}, // ‘
{'A', 'E', 146}, /* ’ */ {'A', 'E', 146}, // ’
{'o', '^', 147}, /* “ */ {'o', '^', 147}, // “
{'o', '"', 148}, /* ” */ {'o', '"', 148}, // ”
{'o', '`', 149}, /* • */ {'o', '`', 149}, // •
{'u', '^', 150}, /* – */ {'u', '^', 150}, // –
{'u', '`', 151}, /* — */ {'u', '`', 151}, // —
{'y', '"', 152}, /* ˜ */ {'y', '"', 152}, // ˜
{'O', '"', 153}, /* ™ */ {'O', '"', 153}, // ™
{'U', '"', 154}, /* š */ {'U', '"', 154}, // š
{'c', '|', 155}, /* › */ {'c', '|', 155}, // ›
{'$', '$', 156}, /* œ */ {'$', '$', 156}, // œ
{'Y', '-', 157}, /* ~] XX */ {'Y', '-', 157}, // ~] XX
{'s', 's', 158}, /* ž */ {'s', 's', 158}, // ž
{'f', 'f', 159}, /* Ÿ */ {'f', 'f', 159}, // Ÿ
{'a', '\'', 160}, /*   */ {'a', '\'', 160}, //  
{'i', '\'', 161}, /* ¡ */ {'i', '\'', 161}, // ¡
{'o', '\'', 162}, /* ¢ */ {'o', '\'', 162}, // ¢
{'u', '\'', 163}, /* £ */ {'u', '\'', 163}, // £
{'n', '~', 164}, /* ¤ */ {'n', '~', 164}, // ¤
{'N', '~', 165}, /* ¥ */ {'N', '~', 165}, // ¥
{'a', 'a', 166}, /* ¦ */ {'a', 'a', 166}, // ¦
{'o', 'o', 167}, /* § */ {'o', 'o', 167}, // §
{'~', '?', 168}, /* ¨ */ {'~', '?', 168}, // ¨
{'-', 'a', 169}, /* © */ {'-', 'a', 169}, // ©
{'a', '-', 170}, /* ª */ {'a', '-', 170}, // ª
{'1', '2', 171}, /* « */ {'1', '2', 171}, // «
{'1', '4', 172}, /* ¬ */ {'1', '4', 172}, // ¬
{'~', '!', 173}, /* ­ */ {'~', '!', 173}, // ­
{'<', '<', 174}, /* ® */ {'<', '<', 174}, // ®
{'>', '>', 175}, /* ¯ */ {'>', '>', 175}, // ¯
{'j', 'u', 230}, /* æ */ {'j', 'u', 230}, // æ
{'o', '/', 237}, /* í */ {'o', '/', 237}, // í
{'+', '-', 241}, /* ñ */ {'+', '-', 241}, // ñ
{'>', '=', 242}, /* ò */ {'>', '=', 242}, // ò
{'<', '=', 243}, /* ó */ {'<', '=', 243}, // ó
{':', '-', 246}, /* ö */ {':', '-', 246}, // ö
{'~', '~', 247}, /* ÷ */ {'~', '~', 247}, // ÷
{'~', 'o', 248}, /* ø */ {'~', 'o', 248}, // ø
{'2', '2', 253}, /* ý */ {'2', '2', 253}, // ý
{NUL, NUL, NUL} {NUL, NUL, NUL}
}; };
#else /* !__MINT__ */ #else // !__MINT__
# ifdef HPUX_DIGRAPHS # ifdef HPUX_DIGRAPHS
/* /*
* different HPUX digraphs * different HPUX digraphs
*/ */
{{'A', '`', 161}, /* ¡ */ {{'A', '`', 161}, // ¡
{'A', '^', 162}, /* ¢ */ {'A', '^', 162}, // ¢
{'E', '`', 163}, /* £ */ {'E', '`', 163}, // £
{'E', '^', 164}, /* ¤ */ {'E', '^', 164}, // ¤
{'E', '"', 165}, /* ¥ */ {'E', '"', 165}, // ¥
{'I', '^', 166}, /* ¦ */ {'I', '^', 166}, // ¦
{'I', '"', 167}, /* § */ {'I', '"', 167}, // §
{'\'', '\'', 168}, /* ¨ */ {'\'', '\'', 168}, // ¨
{'`', '`', 169}, /* © */ {'`', '`', 169}, // ©
{'^', '^', 170}, /* ª */ {'^', '^', 170}, // ª
{'"', '"', 171}, /* « */ {'"', '"', 171}, // «
{'~', '~', 172}, /* ¬ */ {'~', '~', 172}, // ¬
{'U', '`', 173}, /* ­ */ {'U', '`', 173}, // ­
{'U', '^', 174}, /* ® */ {'U', '^', 174}, // ®
{'L', '=', 175}, /* ¯ */ {'L', '=', 175}, // ¯
{'~', '_', 176}, /* ° */ {'~', '_', 176}, // °
{'Y', '\'', 177}, /* ± */ {'Y', '\'', 177}, // ±
{'y', '\'', 178}, /* ² */ {'y', '\'', 178}, // ²
{'~', 'o', 179}, /* ³ */ {'~', 'o', 179}, // ³
{'C', ',', 180}, /* ´ */ {'C', ',', 180}, // ´
{'c', ',', 181}, /* µ */ {'c', ',', 181}, // µ
{'N', '~', 182}, /* ¶ */ {'N', '~', 182}, // ¶
{'n', '~', 183}, /* · */ {'n', '~', 183}, // ·
{'~', '!', 184}, /* ¸ */ {'~', '!', 184}, // ¸
{'~', '?', 185}, /* ¹ */ {'~', '?', 185}, // ¹
{'o', 'x', 186}, /* º */ {'o', 'x', 186}, // º
{'L', '-', 187}, /* » */ {'L', '-', 187}, // »
{'Y', '=', 188}, /* ¼ */ {'Y', '=', 188}, // ¼
{'p', 'p', 189}, /* ½ */ {'p', 'p', 189}, // ½
{'f', 'l', 190}, /* ¾ */ {'f', 'l', 190}, // ¾
{'c', '|', 191}, /* ¿ */ {'c', '|', 191}, // ¿
{'a', '^', 192}, /* À */ {'a', '^', 192}, // À
{'e', '^', 193}, /* Á */ {'e', '^', 193}, // Á
{'o', '^', 194}, /* Â */ {'o', '^', 194}, // Â
{'u', '^', 195}, /* Ã */ {'u', '^', 195}, // Ã
{'a', '\'', 196}, /* Ä */ {'a', '\'', 196}, // Ä
{'e', '\'', 197}, /* Å */ {'e', '\'', 197}, // Å
{'o', '\'', 198}, /* Æ */ {'o', '\'', 198}, // Æ
{'u', '\'', 199}, /* Ç */ {'u', '\'', 199}, // Ç
{'a', '`', 200}, /* È */ {'a', '`', 200}, // È
{'e', '`', 201}, /* É */ {'e', '`', 201}, // É
{'o', '`', 202}, /* Ê */ {'o', '`', 202}, // Ê
{'u', '`', 203}, /* Ë */ {'u', '`', 203}, // Ë
{'a', '"', 204}, /* Ì */ {'a', '"', 204}, // Ì
{'e', '"', 205}, /* Í */ {'e', '"', 205}, // Í
{'o', '"', 206}, /* Î */ {'o', '"', 206}, // Î
{'u', '"', 207}, /* Ï */ {'u', '"', 207}, // Ï
{'A', 'o', 208}, /* Ð */ {'A', 'o', 208}, // Ð
{'i', '^', 209}, /* Ñ */ {'i', '^', 209}, // Ñ
{'O', '/', 210}, /* Ò */ {'O', '/', 210}, // Ò
{'A', 'E', 211}, /* Ó */ {'A', 'E', 211}, // Ó
{'a', 'o', 212}, /* Ô */ {'a', 'o', 212}, // Ô
{'i', '\'', 213}, /* Õ */ {'i', '\'', 213}, // Õ
{'o', '/', 214}, /* Ö */ {'o', '/', 214}, // Ö
{'a', 'e', 215}, /* × */ {'a', 'e', 215}, // ×
{'A', '"', 216}, /* Ø */ {'A', '"', 216}, // Ø
{'i', '`', 217}, /* Ù */ {'i', '`', 217}, // Ù
{'O', '"', 218}, /* Ú */ {'O', '"', 218}, // Ú
{'U', '"', 219}, /* Û */ {'U', '"', 219}, // Û
{'E', '\'', 220}, /* Ü */ {'E', '\'', 220}, // Ü
{'i', '"', 221}, /* Ý */ {'i', '"', 221}, // Ý
{'s', 's', 222}, /* Þ */ {'s', 's', 222}, // Þ
{'O', '^', 223}, /* ß */ {'O', '^', 223}, // ß
{'A', '\'', 224}, /* à */ {'A', '\'', 224}, // à
{'A', '~', 225}, /* á */ {'A', '~', 225}, // á
{'a', '~', 226}, /* â */ {'a', '~', 226}, // â
{'D', '-', 227}, /* ã */ {'D', '-', 227}, // ã
{'d', '-', 228}, /* ä */ {'d', '-', 228}, // ä
{'I', '\'', 229}, /* å */ {'I', '\'', 229}, // å
{'I', '`', 230}, /* æ */ {'I', '`', 230}, // æ
{'O', '\'', 231}, /* ç */ {'O', '\'', 231}, // ç
{'O', '`', 232}, /* è */ {'O', '`', 232}, // è
{'O', '~', 233}, /* é */ {'O', '~', 233}, // é
{'o', '~', 234}, /* ê */ {'o', '~', 234}, // ê
{'S', '~', 235}, /* ë */ {'S', '~', 235}, // ë
{'s', '~', 236}, /* ì */ {'s', '~', 236}, // ì
{'U', '\'', 237}, /* í */ {'U', '\'', 237}, // í
{'Y', '"', 238}, /* î */ {'Y', '"', 238}, // î
{'y', '"', 239}, /* ï */ {'y', '"', 239}, // ï
{'p', '-', 240}, /* ð */ {'p', '-', 240}, // ð
{'p', '~', 241}, /* ñ */ {'p', '~', 241}, // ñ
{'~', '.', 242}, /* ò */ {'~', '.', 242}, // ò
{'j', 'u', 243}, /* ó */ {'j', 'u', 243}, // ó
{'P', 'p', 244}, /* ô */ {'P', 'p', 244}, // ô
{'3', '4', 245}, /* õ */ {'3', '4', 245}, // õ
{'-', '-', 246}, /* ö */ {'-', '-', 246}, // ö
{'1', '4', 247}, /* ÷ */ {'1', '4', 247}, // ÷
{'1', '2', 248}, /* ø */ {'1', '2', 248}, // ø
{'a', '_', 249}, /* ù */ {'a', '_', 249}, // ù
{'o', '_', 250}, /* ú */ {'o', '_', 250}, // ú
{'<', '<', 251}, /* û */ {'<', '<', 251}, // û
{'x', 'x', 252}, /* ü */ {'x', 'x', 252}, // ü
{'>', '>', 253}, /* ý */ {'>', '>', 253}, // ý
{'+', '-', 254}, /* þ */ {'+', '-', 254}, // þ
{'n', 'u', 255}, /* x XX */ {'n', 'u', 255}, // x XX
{NUL, NUL, NUL} {NUL, NUL, NUL}
}; };
# else /* !HPUX_DIGRAPHS */ # else // !HPUX_DIGRAPHS
# ifdef EBCDIC # ifdef EBCDIC
@ -211,107 +211,107 @@ static digr_T digraphdefault[] =
* EBCDIC - ISO digraphs * EBCDIC - ISO digraphs
* TODO: EBCDIC Table is Code-Page 1047 * TODO: EBCDIC Table is Code-Page 1047
*/ */
{{'a', '^', 66}, /* â */ {{'a', '^', 66}, // â
{'a', '"', 67}, /* ä */ {'a', '"', 67}, // ä
{'a', '`', 68}, /* à */ {'a', '`', 68}, // à
{'a', '\'', 69}, /* á */ {'a', '\'', 69}, // á
{'a', '~', 70}, /* ã */ {'a', '~', 70}, // ã
{'a', '@', 71}, /* å */ {'a', '@', 71}, // å
{'a', 'a', 71}, /* å */ {'a', 'a', 71}, // å
{'c', ',', 72}, /* ç */ {'c', ',', 72}, // ç
{'n', '~', 73}, /* ñ */ {'n', '~', 73}, // ñ
{'c', '|', 74}, /* ¢ */ {'c', '|', 74}, // ¢
{'e', '\'', 81}, /* é */ {'e', '\'', 81}, // é
{'e', '^', 82}, /* ê */ {'e', '^', 82}, // ê
{'e', '"', 83}, /* ë */ {'e', '"', 83}, // ë
{'e', '`', 84}, /* è */ {'e', '`', 84}, // è
{'i', '\'', 85}, /* í */ {'i', '\'', 85}, // í
{'i', '^', 86}, /* î */ {'i', '^', 86}, // î
{'i', '"', 87}, /* ï */ {'i', '"', 87}, // ï
{'i', '`', 88}, /* ì */ {'i', '`', 88}, // ì
{'s', 's', 89}, /* ß */ {'s', 's', 89}, // ß
{'A', '^', 98}, /* Â */ {'A', '^', 98}, // Â
{'A', '"', 99}, /* Ä */ {'A', '"', 99}, // Ä
{'A', '`', 100}, /* À */ {'A', '`', 100}, // À
{'A', '\'', 101}, /* Á */ {'A', '\'', 101}, // Á
{'A', '~', 102}, /* Ã */ {'A', '~', 102}, // Ã
{'A', '@', 103}, /* Å */ {'A', '@', 103}, // Å
{'A', 'A', 103}, /* Å */ {'A', 'A', 103}, // Å
{'C', ',', 104}, /* Ç */ {'C', ',', 104}, // Ç
{'N', '~', 105}, /* Ñ */ {'N', '~', 105}, // Ñ
{'|', '|', 106}, /* ¦ */ {'|', '|', 106}, // ¦
{'o', '/', 112}, /* ø */ {'o', '/', 112}, // ø
{'E', '\'', 113}, /* É */ {'E', '\'', 113}, // É
{'E', '^', 114}, /* Ê */ {'E', '^', 114}, // Ê
{'E', '"', 115}, /* Ë */ {'E', '"', 115}, // Ë
{'E', '`', 116}, /* È */ {'E', '`', 116}, // È
{'I', '\'', 117}, /* Í */ {'I', '\'', 117}, // Í
{'I', '^', 118}, /* Î */ {'I', '^', 118}, // Î
{'I', '"', 119}, /* Ï */ {'I', '"', 119}, // Ï
{'I', '`', 120}, /* Ì */ {'I', '`', 120}, // Ì
{'O', '/', 128}, /* 0/ XX */ {'O', '/', 128}, // 0/ XX
{'<', '<', 138}, /* « */ {'<', '<', 138}, // «
{'>', '>', 139}, /* » */ {'>', '>', 139}, // »
{'d', '-', 140}, /* ð */ {'d', '-', 140}, // ð
{'y', '\'', 141}, /* ý */ {'y', '\'', 141}, // ý
{'i', 'p', 142}, /* þ */ {'i', 'p', 142}, // þ
{'+', '-', 143}, /* ± */ {'+', '-', 143}, // ±
{'~', 'o', 144}, /* ° */ {'~', 'o', 144}, // °
{'a', '-', 154}, /* ª */ {'a', '-', 154}, // ª
{'o', '-', 155}, /* º */ {'o', '-', 155}, // º
{'a', 'e', 156}, /* æ */ {'a', 'e', 156}, // æ
{',', ',', 157}, /* , XX */ {',', ',', 157}, // , XX
{'A', 'E', 158}, /* Æ */ {'A', 'E', 158}, // Æ
{'o', 'x', 159}, /* ¤ - currency symbol in ISO 8859-1 */ {'o', 'x', 159}, // ¤ - currency symbol in ISO 8859-1
{'e', '=', 159}, /* ¤ - euro symbol in ISO 8859-15 */ {'e', '=', 159}, // ¤ - euro symbol in ISO 8859-15
{'E', 'u', 159}, /* ¤ - euro symbol in ISO 8859-15 */ {'E', 'u', 159}, // ¤ - euro symbol in ISO 8859-15
{'j', 'u', 160}, /* µ */ {'j', 'u', 160}, // µ
{'y', '"', 167}, /* x XX */ {'y', '"', 167}, // x XX
{'~', '!', 170}, /* ¡ */ {'~', '!', 170}, // ¡
{'~', '?', 171}, /* ¿ */ {'~', '?', 171}, // ¿
{'D', '-', 172}, /* Ð */ {'D', '-', 172}, // Ð
{'I', 'p', 174}, /* Þ */ {'I', 'p', 174}, // Þ
{'r', 'O', 175}, /* ® */ {'r', 'O', 175}, // ®
{'-', ',', 176}, /* ¬ */ {'-', ',', 176}, // ¬
{'$', '$', 177}, /* £ */ {'$', '$', 177}, // £
{'Y', '-', 178}, /* ¥ */ {'Y', '-', 178}, // ¥
{'~', '.', 179}, /* · */ {'~', '.', 179}, // ·
{'c', 'O', 180}, /* © */ {'c', 'O', 180}, // ©
{'p', 'a', 181}, /* § */ {'p', 'a', 181}, // §
{'p', 'p', 182}, /* ¶ */ {'p', 'p', 182}, // ¶
{'1', '4', 183}, /* ¼ */ {'1', '4', 183}, // ¼
{'1', '2', 184}, /* ½ */ {'1', '2', 184}, // ½
{'3', '4', 185}, /* ¾ */ {'3', '4', 185}, // ¾
{'Y', '\'', 186}, /* Ý */ {'Y', '\'', 186}, // Ý
{'"', '"', 187}, /* ¨ */ {'"', '"', 187}, // ¨
{'-', '=', 188}, /* ¯ */ {'-', '=', 188}, // ¯
{'\'', '\'', 190}, /* ´ */ {'\'', '\'', 190}, // ´
{'O', 'E', 191}, /* × - OE in ISO 8859-15 */ {'O', 'E', 191}, // × - OE in ISO 8859-15
{'/', '\\', 191}, /* × - multiplication symbol in ISO 8859-1 */ {'/', '\\', 191}, // × - multiplication symbol in ISO 8859-1
{'-', '-', 202}, /* ­ */ {'-', '-', 202}, // ­
{'o', '^', 203}, /* ô */ {'o', '^', 203}, // ô
{'o', '"', 204}, /* ö */ {'o', '"', 204}, // ö
{'o', '`', 205}, /* ò */ {'o', '`', 205}, // ò
{'o', '\'', 206}, /* ó */ {'o', '\'', 206}, // ó
{'o', '~', 207}, /* õ */ {'o', '~', 207}, // õ
{'1', '1', 218}, /* ¹ */ {'1', '1', 218}, // ¹
{'u', '^', 219}, /* û */ {'u', '^', 219}, // û
{'u', '"', 220}, /* ü */ {'u', '"', 220}, // ü
{'u', '`', 221}, /* ù */ {'u', '`', 221}, // ù
{'u', '\'', 222}, /* ú */ {'u', '\'', 222}, // ú
{':', '-', 225}, /* ÷ - division symbol in ISO 8859-1 */ {':', '-', 225}, // ÷ - division symbol in ISO 8859-1
{'o', 'e', 225}, /* ÷ - oe in ISO 8859-15 */ {'o', 'e', 225}, // ÷ - oe in ISO 8859-15
{'2', '2', 234}, /* ² */ {'2', '2', 234}, // ²
{'O', '^', 235}, /* Ô */ {'O', '^', 235}, // Ô
{'O', '"', 236}, /* Ö */ {'O', '"', 236}, // Ö
{'O', '`', 237}, /* Ò */ {'O', '`', 237}, // Ò
{'O', '\'', 238}, /* Ó */ {'O', '\'', 238}, // Ó
{'O', '~', 239}, /* Õ */ {'O', '~', 239}, // Õ
{'3', '3', 250}, /* ³ */ {'3', '3', 250}, // ³
{'U', '^', 251}, /* Û */ {'U', '^', 251}, // Û
{'U', '"', 252}, /* Ü */ {'U', '"', 252}, // Ü
{'U', '`', 253}, /* Ù */ {'U', '`', 253}, // Ù
{'U', '\'', 254}, /* Ú */ {'U', '\'', 254}, // Ú
{NUL, NUL, NUL} {NUL, NUL, NUL}
}; };
@ -321,116 +321,116 @@ static digr_T digraphdefault[] =
/* /*
* digraphs compatible with Vim 5.x * digraphs compatible with Vim 5.x
*/ */
{{'~', '!', 161}, /* ¡ */ {{'~', '!', 161}, // ¡
{'c', '|', 162}, /* ¢ */ {'c', '|', 162}, // ¢
{'$', '$', 163}, /* £ */ {'$', '$', 163}, // £
{'o', 'x', 164}, /* ¤ - currency symbol in ISO 8859-1 */ {'o', 'x', 164}, // ¤ - currency symbol in ISO 8859-1
{'e', '=', 164}, /* ¤ - euro symbol in ISO 8859-15 */ {'e', '=', 164}, // ¤ - euro symbol in ISO 8859-15
{'Y', '-', 165}, /* ¥ */ {'Y', '-', 165}, // ¥
{'|', '|', 166}, /* ¦ */ {'|', '|', 166}, // ¦
{'p', 'a', 167}, /* § */ {'p', 'a', 167}, // §
{'"', '"', 168}, /* ¨ */ {'"', '"', 168}, // ¨
{'c', 'O', 169}, /* © */ {'c', 'O', 169}, // ©
{'a', '-', 170}, /* ª */ {'a', '-', 170}, // ª
{'<', '<', 171}, /* « */ {'<', '<', 171}, // «
{'-', ',', 172}, /* ¬ */ {'-', ',', 172}, // ¬
{'-', '-', 173}, /* ­ */ {'-', '-', 173}, // ­
{'r', 'O', 174}, /* ® */ {'r', 'O', 174}, // ®
{'-', '=', 175}, /* ¯ */ {'-', '=', 175}, // ¯
{'~', 'o', 176}, /* ° */ {'~', 'o', 176}, // °
{'+', '-', 177}, /* ± */ {'+', '-', 177}, // ±
{'2', '2', 178}, /* ² */ {'2', '2', 178}, // ²
{'3', '3', 179}, /* ³ */ {'3', '3', 179}, // ³
{'\'', '\'', 180}, /* ´ */ {'\'', '\'', 180}, // ´
{'j', 'u', 181}, /* µ */ {'j', 'u', 181}, // µ
{'p', 'p', 182}, /* ¶ */ {'p', 'p', 182}, // ¶
{'~', '.', 183}, /* · */ {'~', '.', 183}, // ·
{',', ',', 184}, /* ¸ */ {',', ',', 184}, // ¸
{'1', '1', 185}, /* ¹ */ {'1', '1', 185}, // ¹
{'o', '-', 186}, /* º */ {'o', '-', 186}, // º
{'>', '>', 187}, /* » */ {'>', '>', 187}, // »
{'1', '4', 188}, /* ¼ */ {'1', '4', 188}, // ¼
{'1', '2', 189}, /* ½ */ {'1', '2', 189}, // ½
{'3', '4', 190}, /* ¾ */ {'3', '4', 190}, // ¾
{'~', '?', 191}, /* ¿ */ {'~', '?', 191}, // ¿
{'A', '`', 192}, /* À */ {'A', '`', 192}, // À
{'A', '\'', 193}, /* Á */ {'A', '\'', 193}, // Á
{'A', '^', 194}, /* Â */ {'A', '^', 194}, // Â
{'A', '~', 195}, /* Ã */ {'A', '~', 195}, // Ã
{'A', '"', 196}, /* Ä */ {'A', '"', 196}, // Ä
{'A', '@', 197}, /* Å */ {'A', '@', 197}, // Å
{'A', 'A', 197}, /* Å */ {'A', 'A', 197}, // Å
{'A', 'E', 198}, /* Æ */ {'A', 'E', 198}, // Æ
{'C', ',', 199}, /* Ç */ {'C', ',', 199}, // Ç
{'E', '`', 200}, /* È */ {'E', '`', 200}, // È
{'E', '\'', 201}, /* É */ {'E', '\'', 201}, // É
{'E', '^', 202}, /* Ê */ {'E', '^', 202}, // Ê
{'E', '"', 203}, /* Ë */ {'E', '"', 203}, // Ë
{'I', '`', 204}, /* Ì */ {'I', '`', 204}, // Ì
{'I', '\'', 205}, /* Í */ {'I', '\'', 205}, // Í
{'I', '^', 206}, /* Î */ {'I', '^', 206}, // Î
{'I', '"', 207}, /* Ï */ {'I', '"', 207}, // Ï
{'D', '-', 208}, /* Ð */ {'D', '-', 208}, // Ð
{'N', '~', 209}, /* Ñ */ {'N', '~', 209}, // Ñ
{'O', '`', 210}, /* Ò */ {'O', '`', 210}, // Ò
{'O', '\'', 211}, /* Ó */ {'O', '\'', 211}, // Ó
{'O', '^', 212}, /* Ô */ {'O', '^', 212}, // Ô
{'O', '~', 213}, /* Õ */ {'O', '~', 213}, // Õ
{'O', '"', 214}, /* Ö */ {'O', '"', 214}, // Ö
{'/', '\\', 215}, /* × - multiplication symbol in ISO 8859-1 */ {'/', '\\', 215}, // × - multiplication symbol in ISO 8859-1
{'O', 'E', 215}, /* × - OE in ISO 8859-15 */ {'O', 'E', 215}, // × - OE in ISO 8859-15
{'O', '/', 216}, /* Ø */ {'O', '/', 216}, // Ø
{'U', '`', 217}, /* Ù */ {'U', '`', 217}, // Ù
{'U', '\'', 218}, /* Ú */ {'U', '\'', 218}, // Ú
{'U', '^', 219}, /* Û */ {'U', '^', 219}, // Û
{'U', '"', 220}, /* Ü */ {'U', '"', 220}, // Ü
{'Y', '\'', 221}, /* Ý */ {'Y', '\'', 221}, // Ý
{'I', 'p', 222}, /* Þ */ {'I', 'p', 222}, // Þ
{'s', 's', 223}, /* ß */ {'s', 's', 223}, // ß
{'a', '`', 224}, /* à */ {'a', '`', 224}, // à
{'a', '\'', 225}, /* á */ {'a', '\'', 225}, // á
{'a', '^', 226}, /* â */ {'a', '^', 226}, // â
{'a', '~', 227}, /* ã */ {'a', '~', 227}, // ã
{'a', '"', 228}, /* ä */ {'a', '"', 228}, // ä
{'a', '@', 229}, /* å */ {'a', '@', 229}, // å
{'a', 'a', 229}, /* å */ {'a', 'a', 229}, // å
{'a', 'e', 230}, /* æ */ {'a', 'e', 230}, // æ
{'c', ',', 231}, /* ç */ {'c', ',', 231}, // ç
{'e', '`', 232}, /* è */ {'e', '`', 232}, // è
{'e', '\'', 233}, /* é */ {'e', '\'', 233}, // é
{'e', '^', 234}, /* ê */ {'e', '^', 234}, // ê
{'e', '"', 235}, /* ë */ {'e', '"', 235}, // ë
{'i', '`', 236}, /* ì */ {'i', '`', 236}, // ì
{'i', '\'', 237}, /* í */ {'i', '\'', 237}, // í
{'i', '^', 238}, /* î */ {'i', '^', 238}, // î
{'i', '"', 239}, /* ï */ {'i', '"', 239}, // ï
{'d', '-', 240}, /* ð */ {'d', '-', 240}, // ð
{'n', '~', 241}, /* ñ */ {'n', '~', 241}, // ñ
{'o', '`', 242}, /* ò */ {'o', '`', 242}, // ò
{'o', '\'', 243}, /* ó */ {'o', '\'', 243}, // ó
{'o', '^', 244}, /* ô */ {'o', '^', 244}, // ô
{'o', '~', 245}, /* õ */ {'o', '~', 245}, // õ
{'o', '"', 246}, /* ö */ {'o', '"', 246}, // ö
{':', '-', 247}, /* ÷ - division symbol in ISO 8859-1 */ {':', '-', 247}, // ÷ - division symbol in ISO 8859-1
{'o', 'e', 247}, /* ÷ - oe in ISO 8859-15 */ {'o', 'e', 247}, // ÷ - oe in ISO 8859-15
{'o', '/', 248}, /* ø */ {'o', '/', 248}, // ø
{'u', '`', 249}, /* ù */ {'u', '`', 249}, // ù
{'u', '\'', 250}, /* ú */ {'u', '\'', 250}, // ú
{'u', '^', 251}, /* û */ {'u', '^', 251}, // û
{'u', '"', 252}, /* ü */ {'u', '"', 252}, // ü
{'y', '\'', 253}, /* ý */ {'y', '\'', 253}, // ý
{'i', 'p', 254}, /* þ */ {'i', 'p', 254}, // þ
{'y', '"', 255}, /* x XX */ {'y', '"', 255}, // x XX
{NUL, NUL, NUL} {NUL, NUL, NUL}
}; };
# else /* OLD_DIGRAPHS */ # else // OLD_DIGRAPHS
/* /*
* digraphs for Unicode from RFC1345 * digraphs for Unicode from RFC1345
* (also work for ISO-8859-1 aka latin1) * (also work for ISO-8859-1 aka latin1)
*/ */
{ {
{'N', 'U', 0x0a}, /* LF for NUL */ {'N', 'U', 0x0a}, // LF for NUL
{'S', 'H', 0x01}, {'S', 'H', 0x01},
{'S', 'X', 0x02}, {'S', 'X', 0x02},
{'E', 'X', 0x03}, {'E', 'X', 0x03},
@ -1287,10 +1287,10 @@ static digr_T digraphdefault[] =
{'L', 'i', 0x20a4}, {'L', 'i', 0x20a4},
{'P', 't', 0x20a7}, {'P', 't', 0x20a7},
{'W', '=', 0x20a9}, {'W', '=', 0x20a9},
{'=', 'e', 0x20ac}, /* euro */ {'=', 'e', 0x20ac}, // euro
{'E', 'u', 0x20ac}, /* euro */ {'E', 'u', 0x20ac}, // euro
{'=', 'R', 0x20bd}, /* rouble */ {'=', 'R', 0x20bd}, // rouble
{'=', 'P', 0x20bd}, /* rouble */ {'=', 'P', 0x20bd}, // rouble
#define DG_START_OTHER1 0x2103 #define DG_START_OTHER1 0x2103
{'o', 'C', 0x2103}, {'o', 'C', 0x2103},
{'c', 'o', 0x2105}, {'c', 'o', 0x2105},
@ -1815,8 +1815,8 @@ static digr_T digraphdefault[] =
{'7', 'c', 0x3226}, {'7', 'c', 0x3226},
{'8', 'c', 0x3227}, {'8', 'c', 0x3227},
{'9', 'c', 0x3228}, {'9', 'c', 0x3228},
/* code points 0xe000 - 0xefff excluded, they have no assigned // code points 0xe000 - 0xefff excluded, they have no assigned
* characters, only used in proposals. */ // characters, only used in proposals.
{'f', 'f', 0xfb00}, {'f', 'f', 0xfb00},
{'f', 'i', 0xfb01}, {'f', 'i', 0xfb01},
{'f', 'l', 0xfb02}, {'f', 'l', 0xfb02},
@ -1826,10 +1826,10 @@ static digr_T digraphdefault[] =
{NUL, NUL, NUL} {NUL, NUL, NUL}
}; };
# endif /* OLD_DIGRAPHS */ # endif // OLD_DIGRAPHS
# endif /* EBCDIC */ # endif // EBCDIC
# endif /* !HPUX_DIGRAPHS */ # endif // !HPUX_DIGRAPHS
#endif /* !__MINT__ */ #endif // !__MINT__
/* /*
* handle digraphs after typing a character * handle digraphs after typing a character
@ -1837,10 +1837,10 @@ static digr_T digraphdefault[] =
int int
do_digraph(int c) do_digraph(int c)
{ {
static int backspaced; /* character before K_BS */ static int backspaced; // character before K_BS
static int lastchar; /* last typed character */ static int lastchar; // last typed character
if (c == -1) /* init values */ if (c == -1) // init values
{ {
backspaced = -1; backspaced = -1;
} }
@ -1921,7 +1921,7 @@ get_digraph_for_char(int val_arg)
*/ */
int int
get_digraph( get_digraph(
int cmdline) /* TRUE when called from the cmdline */ int cmdline) // TRUE when called from the cmdline
{ {
int c, cc; int c, cc;
@ -1930,9 +1930,9 @@ get_digraph(
c = plain_vgetc(); c = plain_vgetc();
--no_mapping; --no_mapping;
--allow_keys; --allow_keys;
if (c != ESC) /* ESC cancels CTRL-K */ if (c != ESC) // ESC cancels CTRL-K
{ {
if (IS_SPECIAL(c)) /* insert special key code */ if (IS_SPECIAL(c)) // insert special key code
return c; return c;
if (cmdline) if (cmdline)
{ {
@ -1952,7 +1952,7 @@ get_digraph(
cc = plain_vgetc(); cc = plain_vgetc();
--no_mapping; --no_mapping;
--allow_keys; --allow_keys;
if (cc != ESC) /* ESC cancels CTRL-K */ if (cc != ESC) // ESC cancels CTRL-K
return getdigraph(c, cc, TRUE); return getdigraph(c, cc, TRUE);
} }
return NUL; return NUL;
@ -2029,13 +2029,13 @@ getexactdigraph(int char1, int char2, int meta_char)
} }
#endif #endif
/* Ignore multi-byte characters when not in multi-byte mode. */ // Ignore multi-byte characters when not in multi-byte mode.
if (!has_mbyte && retval > 0xff) if (!has_mbyte && retval > 0xff)
retval = 0; retval = 0;
if (retval == 0) /* digraph deleted or not found */ if (retval == 0) // digraph deleted or not found
{ {
if (char1 == ' ' && meta_char) /* <space> <char> --> meta-char */ if (char1 == ' ' && meta_char) // <space> <char> --> meta-char
return (char2 | 0x80); return (char2 | 0x80);
return char2; return char2;
} }
@ -2094,7 +2094,7 @@ putdigraph(char_u *str)
} }
n = getdigits(&str); n = getdigits(&str);
/* If the digraph already exists, replace the result. */ // If the digraph already exists, replace the result.
dp = (digr_T *)user_digraphs.ga_data; dp = (digr_T *)user_digraphs.ga_data;
for (i = 0; i < user_digraphs.ga_len; ++i) for (i = 0; i < user_digraphs.ga_len; ++i)
{ {
@ -2106,7 +2106,7 @@ putdigraph(char_u *str)
++dp; ++dp;
} }
/* Add a new digraph to the table. */ // Add a new digraph to the table.
if (i == user_digraphs.ga_len) if (i == user_digraphs.ga_len)
{ {
if (ga_grow(&user_digraphs, 1) == OK) if (ga_grow(&user_digraphs, 1) == OK)
@ -2147,7 +2147,7 @@ listdigraphs(int use_headers)
#if defined(USE_UNICODE_DIGRAPHS) #if defined(USE_UNICODE_DIGRAPHS)
digr_T tmp; digr_T tmp;
/* May need to convert the result to 'encoding'. */ // May need to convert the result to 'encoding'.
tmp.char1 = dp->char1; tmp.char1 = dp->char1;
tmp.char2 = dp->char2; tmp.char2 = dp->char2;
tmp.result = getexactdigraph(tmp.char1, tmp.char2, FALSE); tmp.result = getexactdigraph(tmp.char1, tmp.char2, FALSE);
@ -2176,8 +2176,8 @@ listdigraphs(int use_headers)
ui_breakcheck(); ui_breakcheck();
++dp; ++dp;
} }
must_redraw = CLEAR; /* clear screen, because some digraphs may be must_redraw = CLEAR; // clear screen, because some digraphs may be
wrong, in which case we messed up ScreenLines */ // wrong, in which case we messed up ScreenLines
} }
static struct dg_header_entry { static struct dg_header_entry {
@ -2259,7 +2259,7 @@ printdigraph(digr_T *dp, result_T *previous)
p = buf; p = buf;
if (has_mbyte) if (has_mbyte)
{ {
/* add a space to draw a composing char on */ // add a space to draw a composing char on
if (enc_utf8 && utf_iscomposing(dp->result)) if (enc_utf8 && utf_iscomposing(dp->result))
*p++ = ' '; *p++ = ' ';
p += (*mb_char2bytes)(dp->result, p); p += (*mb_char2bytes)(dp->result, p);
@ -2276,18 +2276,18 @@ printdigraph(digr_T *dp, result_T *previous)
} }
} }
#endif /* FEAT_DIGRAPHS */ #endif // FEAT_DIGRAPHS
#if defined(FEAT_KEYMAP) || defined(PROTO) #if defined(FEAT_KEYMAP) || defined(PROTO)
/* structure used for b_kmap_ga.ga_data */ // structure used for b_kmap_ga.ga_data
typedef struct typedef struct
{ {
char_u *from; char_u *from;
char_u *to; char_u *to;
} kmap_T; } kmap_T;
#define KMAP_MAXLEN 20 /* maximum length of "from" or "to" */ #define KMAP_MAXLEN 20 // maximum length of "from" or "to"
static void keymap_unload(void); static void keymap_unload(void);
@ -2304,8 +2304,8 @@ keymap_init(void)
if (*curbuf->b_p_keymap == NUL) if (*curbuf->b_p_keymap == NUL)
{ {
/* Stop any active keymap and clear the table. Also remove // Stop any active keymap and clear the table. Also remove
* b:keymap_name, as no keymap is active now. */ // b:keymap_name, as no keymap is active now.
keymap_unload(); keymap_unload();
do_cmdline_cmd((char_u *)"unlet! b:keymap_name"); do_cmdline_cmd((char_u *)"unlet! b:keymap_name");
} }
@ -2314,19 +2314,19 @@ keymap_init(void)
char_u *buf; char_u *buf;
size_t buflen; size_t buflen;
/* Source the keymap file. It will contain a ":loadkeymap" command // Source the keymap file. It will contain a ":loadkeymap" command
* which will call ex_loadkeymap() below. */ // which will call ex_loadkeymap() below.
buflen = STRLEN(curbuf->b_p_keymap) + STRLEN(p_enc) + 14; buflen = STRLEN(curbuf->b_p_keymap) + STRLEN(p_enc) + 14;
buf = alloc(buflen); buf = alloc(buflen);
if (buf == NULL) if (buf == NULL)
return e_outofmem; return e_outofmem;
/* try finding "keymap/'keymap'_'encoding'.vim" in 'runtimepath' */ // try finding "keymap/'keymap'_'encoding'.vim" in 'runtimepath'
vim_snprintf((char *)buf, buflen, "keymap/%s_%s.vim", vim_snprintf((char *)buf, buflen, "keymap/%s_%s.vim",
curbuf->b_p_keymap, p_enc); curbuf->b_p_keymap, p_enc);
if (source_runtime(buf, 0) == FAIL) if (source_runtime(buf, 0) == FAIL)
{ {
/* try finding "keymap/'keymap'.vim" in 'runtimepath' */ // try finding "keymap/'keymap'.vim" in 'runtimepath'
vim_snprintf((char *)buf, buflen, "keymap/%s.vim", vim_snprintf((char *)buf, buflen, "keymap/%s.vim",
curbuf->b_p_keymap); curbuf->b_p_keymap);
if (source_runtime(buf, 0) == FAIL) if (source_runtime(buf, 0) == FAIL)
@ -2351,7 +2351,7 @@ ex_loadkeymap(exarg_T *eap)
char_u *p; char_u *p;
char_u *s; char_u *s;
kmap_T *kp; kmap_T *kp;
#define KMAP_LLEN 200 /* max length of "to" and "from" together */ #define KMAP_LLEN 200 // max length of "to" and "from" together
char_u buf[KMAP_LLEN + 11]; char_u buf[KMAP_LLEN + 11];
int i; int i;
char_u *save_cpo = p_cpo; char_u *save_cpo = p_cpo;
@ -2370,7 +2370,7 @@ ex_loadkeymap(exarg_T *eap)
curbuf->b_kmap_state = 0; curbuf->b_kmap_state = 0;
ga_init2(&curbuf->b_kmap_ga, (int)sizeof(kmap_T), 20); ga_init2(&curbuf->b_kmap_ga, (int)sizeof(kmap_T), 20);
/* Set 'cpoptions' to "C" to avoid line continuation. */ // Set 'cpoptions' to "C" to avoid line continuation.
p_cpo = (char_u *)"C"; p_cpo = (char_u *)"C";
/* /*
@ -2438,10 +2438,10 @@ keymap_unload(void)
if (!(curbuf->b_kmap_state & KEYMAP_LOADED)) if (!(curbuf->b_kmap_state & KEYMAP_LOADED))
return; return;
/* Set 'cpoptions' to "C" to avoid line continuation. */ // Set 'cpoptions' to "C" to avoid line continuation.
p_cpo = (char_u *)"C"; p_cpo = (char_u *)"C";
/* clear the ":lmap"s */ // clear the ":lmap"s
kp = (kmap_T *)curbuf->b_kmap_ga.ga_data; kp = (kmap_T *)curbuf->b_kmap_ga.ga_data;
for (i = 0; i < curbuf->b_kmap_ga.ga_len; ++i) for (i = 0; i < curbuf->b_kmap_ga.ga_len; ++i)
{ {
@ -2469,4 +2469,4 @@ keymap_clear(garray_T *kmap)
vim_free(kp[i].to); vim_free(kp[i].to);
} }
} }
#endif /* FEAT_KEYMAP */ #endif // FEAT_KEYMAP

File diff suppressed because it is too large Load Diff

1199
src/edit.c

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -825,7 +825,7 @@ switch_buffer(bufref_T *save_curbuf, buf_T *buf)
restore_buffer(bufref_T *save_curbuf) restore_buffer(bufref_T *save_curbuf)
{ {
unblock_autocmds(); unblock_autocmds();
/* Check for valid buffer, just in case. */ // Check for valid buffer, just in case.
if (bufref_valid(save_curbuf)) if (bufref_valid(save_curbuf))
{ {
--curbuf->b_nwindows; --curbuf->b_nwindows;

File diff suppressed because it is too large Load Diff

View File

@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
2378,
/**/ /**/
2377, 2377,
/**/ /**/