Skip to content

Commit 9fd2cae

Browse files
h-eastchrisbra
authored andcommitted
patch 9.1.2083: style: wrong indentation of nested ifdefs
Problem: style: wrong indentation of nested ifdefs Solution: Fix indentation (Hirohito Higashi) related: #19165 Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent 92ff4d6 commit 9fd2cae

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+4129
-4128
lines changed

src/alloc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,10 +297,10 @@ lalloc(size_t size, int message)
297297
void *
298298
lalloc_id(size_t size, int message, alloc_id_T id UNUSED)
299299
{
300-
#ifdef FEAT_EVAL
300+
# ifdef FEAT_EVAL
301301
if (alloc_fail_id == id && alloc_does_fail(size))
302302
return NULL;
303-
#endif
303+
# endif
304304
return (lalloc(size, message));
305305
}
306306
#endif

src/autocmd.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@ check_ei(char_u *ei)
850850
return OK;
851851
}
852852

853-
# if defined(FEAT_SYN_HL)
853+
#if defined(FEAT_SYN_HL)
854854

855855
/*
856856
* Add "what" to 'eventignore' to skip loading syntax highlighting for every
@@ -896,7 +896,7 @@ au_event_restore(char_u *old_ei)
896896
vim_free(old_ei);
897897
}
898898
}
899-
# endif // FEAT_SYN_HL
899+
#endif // FEAT_SYN_HL
900900

901901
/*
902902
* do_autocmd() -- implements the :autocmd command. Can be used in the
@@ -1814,10 +1814,10 @@ aucmd_restbuf(
18141814
&& bufref_valid(&aco->new_curbuf)
18151815
&& aco->new_curbuf.br_buf->b_ml.ml_mfp != NULL)
18161816
{
1817-
# if defined(FEAT_SYN_HL) || defined(FEAT_SPELL)
1817+
#if defined(FEAT_SYN_HL) || defined(FEAT_SPELL)
18181818
if (curwin->w_s == &curbuf->b_s)
18191819
curwin->w_s = &aco->new_curbuf.br_buf->b_s;
1820-
# endif
1820+
#endif
18211821
--curbuf->b_nwindows;
18221822
curbuf = aco->new_curbuf.br_buf;
18231823
curwin->w_buffer = curbuf;
@@ -2530,14 +2530,14 @@ apply_autocmds_group(
25302530
return retval;
25312531
}
25322532

2533-
# ifdef FEAT_EVAL
2533+
#ifdef FEAT_EVAL
25342534
static char_u *old_termresponse = NULL;
25352535
static char_u *old_termu7resp = NULL;
25362536
static char_u *old_termblinkresp = NULL;
25372537
static char_u *old_termrbgresp = NULL;
25382538
static char_u *old_termrfgresp = NULL;
25392539
static char_u *old_termstyleresp = NULL;
2540-
# endif
2540+
#endif
25412541

25422542
/*
25432543
* Block triggering autocommands until unblock_autocmd() is called.
@@ -2546,7 +2546,7 @@ static char_u *old_termstyleresp = NULL;
25462546
void
25472547
block_autocmds(void)
25482548
{
2549-
# ifdef FEAT_EVAL
2549+
#ifdef FEAT_EVAL
25502550
// Remember the value of v:termresponse.
25512551
if (autocmd_blocked == 0)
25522552
{
@@ -2557,7 +2557,7 @@ block_autocmds(void)
25572557
old_termrfgresp = get_vim_var_str(VV_TERMRFGRESP);
25582558
old_termstyleresp = get_vim_var_str(VV_TERMSTYLERESP);
25592559
}
2560-
# endif
2560+
#endif
25612561
++autocmd_blocked;
25622562
}
25632563

@@ -2566,7 +2566,7 @@ unblock_autocmds(void)
25662566
{
25672567
--autocmd_blocked;
25682568

2569-
# ifdef FEAT_EVAL
2569+
#ifdef FEAT_EVAL
25702570
// When v:termresponse, etc, were set while autocommands were blocked,
25712571
// trigger the autocommands now. Esp. useful when executing a shell
25722572
// command during startup (vimdiff).
@@ -2598,7 +2598,7 @@ unblock_autocmds(void)
25982598
apply_autocmds(EVENT_TERMRESPONSEALL, (char_u *)"cursorshape", NULL, FALSE, curbuf);
25992599
}
26002600
}
2601-
# endif
2601+
#endif
26022602
}
26032603

26042604
int

src/beval.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -207,16 +207,16 @@ post_balloon(BalloonEval *beval UNUSED, char_u *mesg, list_T *list UNUSED)
207207
can_use_beval(void)
208208
{
209209
return (0
210-
#ifdef FEAT_BEVAL_GUI
210+
# ifdef FEAT_BEVAL_GUI
211211
|| (gui.in_use && p_beval)
212-
#endif
213-
#ifdef FEAT_BEVAL_TERM
212+
# endif
213+
# ifdef FEAT_BEVAL_TERM
214214
|| (
215-
# ifdef FEAT_GUI
215+
# ifdef FEAT_GUI
216216
!gui.in_use &&
217-
# endif
217+
# endif
218218
p_bevalterm)
219-
#endif
219+
# endif
220220
) && msg_scrolled == 0;
221221
}
222222

@@ -304,13 +304,13 @@ bexpr_eval(
304304
void
305305
general_beval_cb(BalloonEval *beval, int state UNUSED)
306306
{
307-
#ifdef FEAT_EVAL
307+
# ifdef FEAT_EVAL
308308
win_T *wp;
309309
int col;
310310
linenr_T lnum;
311311
char_u *text;
312312
char_u *bexpr;
313-
#endif
313+
# endif
314314
static int recursive = FALSE;
315315

316316
// Don't do anything when 'ballooneval' is off, messages scrolled the
@@ -324,7 +324,7 @@ general_beval_cb(BalloonEval *beval, int state UNUSED)
324324
return;
325325
recursive = TRUE;
326326

327-
#ifdef FEAT_EVAL
327+
# ifdef FEAT_EVAL
328328
if (get_beval_info(beval, TRUE, &wp, &lnum, &text, &col) == OK)
329329
{
330330
bexpr = (*wp->w_buffer->b_p_bexpr == NUL) ? p_bexpr
@@ -336,11 +336,11 @@ general_beval_cb(BalloonEval *beval, int state UNUSED)
336336
return;
337337
}
338338
}
339-
#endif
340-
#ifdef FEAT_NETBEANS_INTG
339+
# endif
340+
# ifdef FEAT_NETBEANS_INTG
341341
if (bevalServers & BEVAL_NETBEANS)
342342
netbeans_beval_cb(beval, state);
343-
#endif
343+
# endif
344344

345345
recursive = FALSE;
346346
}

src/buffer.c

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4292,14 +4292,14 @@ resettitle(void)
42924292
mch_settitle(lasttitle, lasticon);
42934293
}
42944294

4295-
# if defined(EXITFREE)
4295+
#if defined(EXITFREE)
42964296
void
42974297
free_titles(void)
42984298
{
42994299
vim_free(lasttitle);
43004300
vim_free(lasticon);
43014301
}
4302-
# endif
4302+
#endif
43034303

43044304

43054305
#if defined(FEAT_STL_OPT) || defined(FEAT_GUI_TABLINE)
@@ -4363,10 +4363,10 @@ build_stl_str_hl(
43634363
char_u *p;
43644364
char_u *s;
43654365
int byteval;
4366-
#ifdef FEAT_EVAL
4366+
# ifdef FEAT_EVAL
43674367
int use_sandbox;
43684368
int save_VIsual_active;
4369-
#endif
4369+
# endif
43704370
int empty_line;
43714371
long l;
43724372
long n;
@@ -4380,15 +4380,15 @@ build_stl_str_hl(
43804380
int itemcnt;
43814381
int curitem;
43824382
int groupdepth;
4383-
#ifdef FEAT_EVAL
4383+
# ifdef FEAT_EVAL
43844384
int evaldepth;
4385-
#endif
4385+
# endif
43864386
int minwid;
43874387
int maxwid;
43884388
int zeropad;
43894389
char_u base;
43904390
char_u opt;
4391-
#define TMPLEN 70
4391+
# define TMPLEN 70
43924392
char_u buf_tmp[TMPLEN];
43934393
char_u *usefmt = fmt;
43944394
stl_hlrec_T *sp;
@@ -4418,7 +4418,7 @@ build_stl_str_hl(
44184418
stl_separator_locations = ALLOC_MULT(int, stl_items_len);
44194419
}
44204420

4421-
#ifdef FEAT_EVAL
4421+
# ifdef FEAT_EVAL
44224422
// if "fmt" was set insecurely it needs to be evaluated in the sandbox
44234423
use_sandbox = was_set_insecurely(wp, opt_name, opt_scope);
44244424

@@ -4438,7 +4438,7 @@ build_stl_str_hl(
44384438

44394439
do_unlet((char_u *)"g:statusline_winid", TRUE);
44404440
}
4441-
#endif
4441+
# endif
44424442

44434443
if (fillchar == 0)
44444444
fillchar = ' ';
@@ -4472,9 +4472,9 @@ build_stl_str_hl(
44724472
byteval = (*mb_ptr2char)(p + wp->w_cursor.col);
44734473

44744474
groupdepth = 0;
4475-
#ifdef FEAT_EVAL
4475+
# ifdef FEAT_EVAL
44764476
evaldepth = 0;
4477-
#endif
4477+
# endif
44784478
p = out;
44794479
curitem = 0;
44804480
prevchar_isflag = TRUE;
@@ -4751,15 +4751,15 @@ build_stl_str_hl(
47514751
curitem++;
47524752
continue;
47534753
}
4754-
#ifdef FEAT_EVAL
4754+
# ifdef FEAT_EVAL
47554755
// Denotes end of expanded %{} block
47564756
if (*s == '}' && evaldepth > 0)
47574757
{
47584758
s++;
47594759
evaldepth--;
47604760
continue;
47614761
}
4762-
#endif
4762+
# endif
47634763
if (vim_strchr(STL_ALL, *s) == NULL)
47644764
{
47654765
if (*s == NUL) // can happen with "%0"
@@ -4803,9 +4803,9 @@ build_stl_str_hl(
48034803

48044804
case STL_VIM_EXPR: // '{'
48054805
{
4806-
#ifdef FEAT_EVAL
4806+
# ifdef FEAT_EVAL
48074807
char_u *block_start = s - 1;
4808-
#endif
4808+
# endif
48094809
int reevaluate = (*s == '%');
48104810
char_u *t;
48114811
buf_T *save_curbuf;
@@ -4826,7 +4826,7 @@ build_stl_str_hl(
48264826
else
48274827
*p = NUL;
48284828
p = t;
4829-
#ifdef FEAT_EVAL
4829+
# ifdef FEAT_EVAL
48304830
vim_snprintf((char *)buf_tmp, sizeof(buf_tmp),
48314831
"%d", curbuf->b_fnum);
48324832
set_internal_string_var((char_u *)"g:actual_curbuf", buf_tmp);
@@ -4896,7 +4896,7 @@ build_stl_str_hl(
48964896
continue;
48974897
}
48984898
}
4899-
#endif
4899+
# endif
49004900
break;
49014901
}
49024902
case STL_LINE:
@@ -4954,11 +4954,11 @@ build_stl_str_hl(
49544954
str = buf_tmp;
49554955
break;
49564956
case STL_PAGENUM:
4957-
#if defined(FEAT_PRINTER) || defined(FEAT_GUI_TABLINE)
4957+
# if defined(FEAT_PRINTER) || defined(FEAT_GUI_TABLINE)
49584958
num = printer_page_num;
4959-
#else
4959+
# else
49604960
num = 0;
4961-
#endif
4961+
# endif
49624962
break;
49634963

49644964
case STL_BUFNO:
@@ -4969,12 +4969,12 @@ build_stl_str_hl(
49694969
base = 'X';
49704970
// FALLTHROUGH
49714971
case STL_OFFSET:
4972-
#ifdef FEAT_BYTEOFF
4972+
# ifdef FEAT_BYTEOFF
49734973
l = ml_find_line_or_offset(wp->w_buffer, wp->w_cursor.lnum, NULL);
49744974
num = (wp->w_buffer->b_ml.ml_flags & ML_EMPTY) || l < 0
49754975
? 0L : l + 1 + ((State & MODE_INSERT) == 0 && empty_line
49764976
? 0 : (int)wp->w_cursor.col);
4977-
#endif
4977+
# endif
49784978
break;
49794979

49804980
case STL_BYTEVAL_X:
@@ -5028,7 +5028,7 @@ build_stl_str_hl(
50285028
}
50295029
break;
50305030

5031-
#if defined(FEAT_QUICKFIX)
5031+
# if defined(FEAT_QUICKFIX)
50325032
case STL_PREVIEWFLAG:
50335033
case STL_PREVIEWFLAG_ALT:
50345034
itemisflag = TRUE;
@@ -5043,7 +5043,7 @@ build_stl_str_hl(
50435043
? _(msg_loclist)
50445044
: _(msg_qflist));
50455045
break;
5046-
#endif
5046+
# endif
50475047

50485048
case STL_MODIFIED:
50495049
case STL_MODIFIED_ALT:
@@ -5195,10 +5195,10 @@ build_stl_str_hl(
51955195
outputlen = (size_t)(p - out);
51965196
itemcnt = curitem;
51975197

5198-
#ifdef FEAT_EVAL
5198+
# ifdef FEAT_EVAL
51995199
if (usefmt != fmt)
52005200
vim_free(usefmt);
5201-
#endif
5201+
# endif
52025202

52035203
width = vim_strsize(out);
52045204
if (maxwidth > 0 && width > maxwidth)

src/bufwrite.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1783,10 +1783,10 @@ buf_write(
17831783
if (converted && wb_flags == 0
17841784
#ifdef USE_ICONV
17851785
&& write_info.bw_iconv_fd == (iconv_t)-1
1786-
# endif
1787-
# ifdef FEAT_EVAL
1786+
#endif
1787+
#ifdef FEAT_EVAL
17881788
&& wfname == fname
1789-
# endif
1789+
#endif
17901790
)
17911791
{
17921792
if (!forceit)
@@ -2068,7 +2068,7 @@ buf_write(
20682068
&& *buf->b_p_key != NUL && !filtering
20692069
&& *ptr == NUL)
20702070
write_info.bw_finish = TRUE;
2071-
#endif
2071+
#endif
20722072
if (buf_write_bytes(&write_info) == FAIL)
20732073
{
20742074
end = 0; // write error: break loop
@@ -2177,7 +2177,7 @@ buf_write(
21772177
&& (write_info.bw_flags & FIO_ENCRYPTED)
21782178
&& *buf->b_p_key != NUL && !filtering)
21792179
write_info.bw_finish = TRUE;
2180-
#endif
2180+
#endif
21812181
if (buf_write_bytes(&write_info) == FAIL)
21822182
end = 0; // write error
21832183
nchars += len;
@@ -2223,12 +2223,12 @@ buf_write(
22232223
// Probably need to set the security context.
22242224
if (!backup_copy)
22252225
{
2226-
#if defined(HAVE_SELINUX) || defined(HAVE_SMACK)
2226+
# if defined(HAVE_SELINUX) || defined(HAVE_SMACK)
22272227
mch_copy_sec(backup, wfname);
2228-
#endif
2229-
#ifdef FEAT_XATTR
2228+
# endif
2229+
# ifdef FEAT_XATTR
22302230
mch_copy_xattr(backup, wfname);
2231-
#endif
2231+
# endif
22322232
}
22332233
#endif
22342234

0 commit comments

Comments
 (0)