mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 14:38:32 +00:00
refactor: convert macros to all-caps (#17895)
Closes https://github.com/neovim/neovim/issues/6297
This commit is contained in:
@@ -5343,8 +5343,8 @@ void fix_help_buffer(void)
|
||||
* files. This uses the very first line in the help file.
|
||||
*/
|
||||
char_u *const fname = path_tail(curbuf->b_fname);
|
||||
if (fnamecmp(fname, "help.txt") == 0
|
||||
|| (fnamencmp(fname, "help.", 5) == 0
|
||||
if (FNAMECMP(fname, "help.txt") == 0
|
||||
|| (FNAMENCMP(fname, "help.", 5) == 0
|
||||
&& ASCII_ISALPHA(fname[5])
|
||||
&& ASCII_ISALPHA(fname[6])
|
||||
&& TOLOWER_ASC(fname[7]) == 'x'
|
||||
@@ -5402,18 +5402,18 @@ void fix_help_buffer(void)
|
||||
if (e1 == NULL || e2 == NULL) {
|
||||
continue;
|
||||
}
|
||||
if (fnamecmp(e1, ".txt") != 0
|
||||
&& fnamecmp(e1, fname + 4) != 0) {
|
||||
if (FNAMECMP(e1, ".txt") != 0
|
||||
&& FNAMECMP(e1, fname + 4) != 0) {
|
||||
// Not .txt and not .abx, remove it.
|
||||
XFREE_CLEAR(fnames[i1]);
|
||||
continue;
|
||||
}
|
||||
if (e1 - f1 != e2 - f2
|
||||
|| fnamencmp(f1, f2, e1 - f1) != 0) {
|
||||
|| FNAMENCMP(f1, f2, e1 - f1) != 0) {
|
||||
continue;
|
||||
}
|
||||
if (fnamecmp(e1, ".txt") == 0
|
||||
&& fnamecmp(e2, fname + 4) == 0) {
|
||||
if (FNAMECMP(e1, ".txt") == 0
|
||||
&& FNAMECMP(e2, fname + 4) == 0) {
|
||||
// use .abx instead of .txt
|
||||
XFREE_CLEAR(fnames[i1]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user