Mercurial > vim
comparison src/fileio.c @ 15555:d89c5b339c2a v8.1.0785
patch 8.1.0785: depending on the configuration some functions are unused
commit https://github.com/vim/vim/commit/113e10721f42fc2500b63fe95193f8665658a90c
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jan 20 15:30:40 2019 +0100
patch 8.1.0785: depending on the configuration some functions are unused
Problem: Depending on the configuration some functions are unused.
Solution: Add more #ifdefs, remove unused functions. (Dominique Pelle,
closes #3822)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 20 Jan 2019 15:45:07 +0100 |
parents | dd725a8ab112 |
children | 1ec942f1b648 |
comparison
equal
deleted
inserted
replaced
15554:496f146a0836 | 15555:d89c5b339c2a |
---|---|
9301 has_cursormoved(void) | 9301 has_cursormoved(void) |
9302 { | 9302 { |
9303 return (first_autopat[(int)EVENT_CURSORMOVED] != NULL); | 9303 return (first_autopat[(int)EVENT_CURSORMOVED] != NULL); |
9304 } | 9304 } |
9305 | 9305 |
9306 #if defined(FEAT_CONCEAL) || defined(PROTO) | |
9306 /* | 9307 /* |
9307 * Return TRUE when there is a CursorMovedI autocommand defined. | 9308 * Return TRUE when there is a CursorMovedI autocommand defined. |
9308 */ | 9309 */ |
9309 int | 9310 int |
9310 has_cursormovedI(void) | 9311 has_cursormovedI(void) |
9311 { | 9312 { |
9312 return (first_autopat[(int)EVENT_CURSORMOVEDI] != NULL); | 9313 return (first_autopat[(int)EVENT_CURSORMOVEDI] != NULL); |
9313 } | 9314 } |
9315 #endif | |
9314 | 9316 |
9315 /* | 9317 /* |
9316 * Return TRUE when there is a TextChanged autocommand defined. | 9318 * Return TRUE when there is a TextChanged autocommand defined. |
9317 */ | 9319 */ |
9318 int | 9320 int |
9328 has_textchangedI(void) | 9330 has_textchangedI(void) |
9329 { | 9331 { |
9330 return (first_autopat[(int)EVENT_TEXTCHANGEDI] != NULL); | 9332 return (first_autopat[(int)EVENT_TEXTCHANGEDI] != NULL); |
9331 } | 9333 } |
9332 | 9334 |
9335 #if defined(FEAT_INS_EXPAND) || defined(PROTO) | |
9333 /* | 9336 /* |
9334 * Return TRUE when there is a TextChangedP autocommand defined. | 9337 * Return TRUE when there is a TextChangedP autocommand defined. |
9335 */ | 9338 */ |
9336 int | 9339 int |
9337 has_textchangedP(void) | 9340 has_textchangedP(void) |
9338 { | 9341 { |
9339 return (first_autopat[(int)EVENT_TEXTCHANGEDP] != NULL); | 9342 return (first_autopat[(int)EVENT_TEXTCHANGEDP] != NULL); |
9340 } | 9343 } |
9344 #endif | |
9341 | 9345 |
9342 /* | 9346 /* |
9343 * Return TRUE when there is an InsertCharPre autocommand defined. | 9347 * Return TRUE when there is an InsertCharPre autocommand defined. |
9344 */ | 9348 */ |
9345 int | 9349 int |
9364 has_funcundefined(void) | 9368 has_funcundefined(void) |
9365 { | 9369 { |
9366 return (first_autopat[(int)EVENT_FUNCUNDEFINED] != NULL); | 9370 return (first_autopat[(int)EVENT_FUNCUNDEFINED] != NULL); |
9367 } | 9371 } |
9368 | 9372 |
9373 #if defined(FEAT_EVAL) || defined(PROTO) | |
9369 /* | 9374 /* |
9370 * Return TRUE when there is a TextYankPost autocommand defined. | 9375 * Return TRUE when there is a TextYankPost autocommand defined. |
9371 */ | 9376 */ |
9372 int | 9377 int |
9373 has_textyankpost(void) | 9378 has_textyankpost(void) |
9374 { | 9379 { |
9375 return (first_autopat[(int)EVENT_TEXTYANKPOST] != NULL); | 9380 return (first_autopat[(int)EVENT_TEXTYANKPOST] != NULL); |
9376 } | 9381 } |
9382 #endif | |
9377 | 9383 |
9378 /* | 9384 /* |
9379 * Execute autocommands for "event" and file name "fname". | 9385 * Execute autocommands for "event" and file name "fname". |
9380 * Return TRUE if some commands were executed. | 9386 * Return TRUE if some commands were executed. |
9381 */ | 9387 */ |
9821 && get_vim_var_str(VV_TERMRESPONSE) != old_termresponse) | 9827 && get_vim_var_str(VV_TERMRESPONSE) != old_termresponse) |
9822 apply_autocmds(EVENT_TERMRESPONSE, NULL, NULL, FALSE, curbuf); | 9828 apply_autocmds(EVENT_TERMRESPONSE, NULL, NULL, FALSE, curbuf); |
9823 # endif | 9829 # endif |
9824 } | 9830 } |
9825 | 9831 |
9832 #if defined(FEAT_EVAL) && (defined(FEAT_XIM) || defined(IME_WITHOUT_XIM)) \ | |
9833 || defined(PROTO) | |
9826 int | 9834 int |
9827 is_autocmd_blocked(void) | 9835 is_autocmd_blocked(void) |
9828 { | 9836 { |
9829 return autocmd_blocked != 0; | 9837 return autocmd_blocked != 0; |
9830 } | 9838 } |
9839 #endif | |
9831 | 9840 |
9832 /* | 9841 /* |
9833 * Find next autocommand pattern that matches. | 9842 * Find next autocommand pattern that matches. |
9834 */ | 9843 */ |
9835 static void | 9844 static void |
10086 return (char_u *)event_names[idx - augroups.ga_len].name; | 10095 return (char_u *)event_names[idx - augroups.ga_len].name; |
10087 } | 10096 } |
10088 | 10097 |
10089 #endif /* FEAT_CMDL_COMPL */ | 10098 #endif /* FEAT_CMDL_COMPL */ |
10090 | 10099 |
10100 #if defined(FEAT_EVAL) || defined(PROTO) | |
10091 /* | 10101 /* |
10092 * Return TRUE if autocmd is supported. | 10102 * Return TRUE if autocmd is supported. |
10093 */ | 10103 */ |
10094 int | 10104 int |
10095 autocmd_supported(char_u *name) | 10105 autocmd_supported(char_u *name) |
10194 | 10204 |
10195 theend: | 10205 theend: |
10196 vim_free(arg_save); | 10206 vim_free(arg_save); |
10197 return retval; | 10207 return retval; |
10198 } | 10208 } |
10209 #endif | |
10199 | 10210 |
10200 | 10211 |
10201 /* | 10212 /* |
10202 * Try matching a filename with a "pattern" ("prog" is NULL), or use the | 10213 * Try matching a filename with a "pattern" ("prog" is NULL), or use the |
10203 * precompiled regprog "prog" ("pattern" is NULL). That avoids calling | 10214 * precompiled regprog "prog" ("pattern" is NULL). That avoids calling |