]> granicus.if.org Git - vim/commitdiff
patch 8.1.0785: depending on the configuration some functions are unused v8.1.0785
authorBram Moolenaar <Bram@vim.org>
Sun, 20 Jan 2019 14:30:40 +0000 (15:30 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 20 Jan 2019 14:30:40 +0000 (15:30 +0100)
Problem:    Depending on the configuration some functions are unused.
Solution:   Add more #ifdefs, remove unused functions. (Dominique Pelle,
            closes #3822)

28 files changed:
src/buffer.c
src/channel.c
src/ex_cmds2.c
src/ex_docmd.c
src/fileio.c
src/getchar.c
src/gui_gtk_x11.c
src/hashtab.c
src/json.c
src/mbyte.c
src/message.c
src/misc1.c
src/misc2.c
src/ops.c
src/option.c
src/os_unix.c
src/proto/os_unix.pro
src/proto/regexp.pro
src/proto/terminal.pro
src/regexp.c
src/screen.c
src/search.c
src/syntax.c
src/term.c
src/terminal.c
src/ui.c
src/userfunc.c
src/version.c

index 18e08ad18e4699ac1dcbc52641265fa73233fd3c..33df710674775e73cdaeb7ee2a63a5ecb92e370f 100644 (file)
@@ -5660,6 +5660,7 @@ bt_normal(buf_T *buf)
     return buf != NULL && buf->b_p_bt[0] == NUL;
 }
 
+#if defined(FEAT_QUICKFIX) || defined(PROTO)
 /*
  * Return TRUE if "buf" is the quickfix buffer.
  */
@@ -5668,7 +5669,9 @@ bt_quickfix(buf_T *buf)
 {
     return buf != NULL && buf->b_p_bt[0] == 'q';
 }
+#endif
 
+#if defined(FEAT_TERMINAL) || defined(PROTO)
 /*
  * Return TRUE if "buf" is a terminal buffer.
  */
@@ -5677,6 +5680,7 @@ bt_terminal(buf_T *buf)
 {
     return buf != NULL && buf->b_p_bt[0] == 't';
 }
+#endif
 
 /*
  * Return TRUE if "buf" is a help buffer.
@@ -5721,6 +5725,7 @@ bt_dontwrite(buf_T *buf)
                 || buf->b_p_bt[0] == 'p');
 }
 
+#if defined(FEAT_QUICKFIX) || defined(PROTO)
     int
 bt_dontwrite_msg(buf_T *buf)
 {
@@ -5731,6 +5736,7 @@ bt_dontwrite_msg(buf_T *buf)
     }
     return FALSE;
 }
+#endif
 
 /*
  * Return TRUE if the buffer should be hidden, according to 'hidden', ":hide"
index f6ffcd67d2a1b32066c439d2a5dbb484abc3634a..41d19f51ed777c3ba47a491f16a0688a4afba5ca 100644 (file)
@@ -2750,6 +2750,7 @@ may_invoke_callback(channel_T *channel, ch_part_T part)
     return TRUE;
 }
 
+#if defined(FEAT_NETBEANS_INTG) || defined(PROTO)
 /*
  * Return TRUE when channel "channel" is open for writing to.
  * Also returns FALSE or invalid "channel".
@@ -2760,6 +2761,7 @@ channel_can_write_to(channel_T *channel)
     return channel != NULL && (channel->CH_SOCK_FD != INVALID_FD
                          || channel->CH_IN_FD != INVALID_FD);
 }
+#endif
 
 /*
  * Return TRUE when channel "channel" is open for reading or writing.
index 72d28c52d1d5b3534339c04d307618653d426089..9fe22a39c8c02d3d83b354ce610ae25baf9bd075 100644 (file)
@@ -1578,7 +1578,7 @@ timer_free_all()
 #  endif
 # endif
 
-#if defined(FEAT_SYN_HL) && defined(FEAT_RELTIME) && defined(FEAT_FLOAT)
+#if defined(FEAT_SYN_HL) && defined(FEAT_RELTIME) && defined(FEAT_FLOAT) && defined(FEAT_PROFILE)
 # if defined(HAVE_MATH_H)
 #  include <math.h>
 # endif
index 8a9b2f4bf9f410e78ccd92720e5a3b6d7d985b00..4722eddb79f77d458c6d859e774874815e9fe071 100644 (file)
@@ -12314,6 +12314,7 @@ get_messages_arg(expand_T *xp UNUSED, int idx)
 }
 #endif
 
+#if defined(FEAT_CMDL_COMPL) || defined(PROTO)
     char_u *
 get_mapclear_arg(expand_T *xp UNUSED, int idx)
 {
@@ -12321,6 +12322,7 @@ get_mapclear_arg(expand_T *xp UNUSED, int idx)
        return (char_u *)"<buffer>";
     return NULL;
 }
+#endif
 
 static int filetype_detect = FALSE;
 static int filetype_plugin = FALSE;
index 168c26ed361e31d6b34fdd22950e5d1998bf128d..dfe1ef962ae8072ccaad15a8676e214c6fa05abb 100644 (file)
@@ -9303,6 +9303,7 @@ has_cursormoved(void)
     return (first_autopat[(int)EVENT_CURSORMOVED] != NULL);
 }
 
+#if defined(FEAT_CONCEAL) || defined(PROTO)
 /*
  * Return TRUE when there is a CursorMovedI autocommand defined.
  */
@@ -9311,6 +9312,7 @@ has_cursormovedI(void)
 {
     return (first_autopat[(int)EVENT_CURSORMOVEDI] != NULL);
 }
+#endif
 
 /*
  * Return TRUE when there is a TextChanged autocommand defined.
@@ -9330,6 +9332,7 @@ has_textchangedI(void)
     return (first_autopat[(int)EVENT_TEXTCHANGEDI] != NULL);
 }
 
+#if defined(FEAT_INS_EXPAND) || defined(PROTO)
 /*
  * Return TRUE when there is a TextChangedP autocommand defined.
  */
@@ -9338,6 +9341,7 @@ has_textchangedP(void)
 {
     return (first_autopat[(int)EVENT_TEXTCHANGEDP] != NULL);
 }
+#endif
 
 /*
  * Return TRUE when there is an InsertCharPre autocommand defined.
@@ -9366,6 +9370,7 @@ has_funcundefined(void)
     return (first_autopat[(int)EVENT_FUNCUNDEFINED] != NULL);
 }
 
+#if defined(FEAT_EVAL) || defined(PROTO)
 /*
  * Return TRUE when there is a TextYankPost autocommand defined.
  */
@@ -9374,6 +9379,7 @@ has_textyankpost(void)
 {
     return (first_autopat[(int)EVENT_TEXTYANKPOST] != NULL);
 }
+#endif
 
 /*
  * Execute autocommands for "event" and file name "fname".
@@ -9823,11 +9829,14 @@ unblock_autocmds(void)
 # endif
 }
 
+#if defined(FEAT_EVAL) && (defined(FEAT_XIM) || defined(IME_WITHOUT_XIM)) \
+       || defined(PROTO)
     int
 is_autocmd_blocked(void)
 {
     return autocmd_blocked != 0;
 }
+#endif
 
 /*
  * Find next autocommand pattern that matches.
@@ -10088,6 +10097,7 @@ get_event_name(expand_T *xp UNUSED, int idx)
 
 #endif /* FEAT_CMDL_COMPL */
 
+#if defined(FEAT_EVAL) || defined(PROTO)
 /*
  * Return TRUE if autocmd is supported.
  */
@@ -10196,6 +10206,7 @@ theend:
     vim_free(arg_save);
     return retval;
 }
+#endif
 
 
 /*
index c0cfd92d67ddabbb56e1d5016934420779f80dd9..0f8197944a2f7776c6e18353e97e98356781192c 100644 (file)
@@ -413,6 +413,7 @@ stuff_empty(void)
         && readbuf2.bh_first.b_next == NULL);
 }
 
+#if defined(FEAT_EVAL) || defined(PROTO)
 /*
  * Return TRUE if readbuf1 is empty.  There may still be redo characters in
  * redbuf2.
@@ -422,6 +423,7 @@ readbuf1_empty(void)
 {
     return (readbuf1.bh_first.b_next == NULL);
 }
+#endif
 
 /*
  * Set a typeahead character that won't be flushed.
index beec291ad0c7674b552cc0f240afa2336f7b106d..6882733696990efcabaae1fb2dcfb86d1614836a 100644 (file)
@@ -6737,11 +6737,13 @@ clip_mch_set_selection(VimClipboard *cbd UNUSED)
 {
 }
 
+#if (defined(FEAT_XCLIPBOARD) && defined(USE_SYSTEM)) || defined(PROTO)
     int
 clip_gtk_owner_exists(VimClipboard *cbd)
 {
     return gdk_selection_owner_get(cbd->gtk_sel_atom) != NULL;
 }
+#endif
 
 
 #if defined(FEAT_MENU) || defined(PROTO)
index bc86a0786da83162f15e3329172f7b12967d7b21..6f2c2ca7b50c45697bd68b04e39de8ae05cbf01d 100644 (file)
@@ -81,6 +81,7 @@ hash_clear(hashtab_T *ht)
        vim_free(ht->ht_array);
 }
 
+#if defined(FEAT_SPELL) || defined(PROTO)
 /*
  * Free the array of a hash table and all the keys it contains.  The keys must
  * have been allocated.  "off" is the offset from the start of the allocate
@@ -103,6 +104,7 @@ hash_clear_all(hashtab_T *ht, int off)
     }
     hash_clear(ht);
 }
+#endif
 
 /*
  * Find "key" in hashtable "ht".  "key" must not be NULL.
@@ -178,6 +180,7 @@ hash_lookup(hashtab_T *ht, char_u *key, hash_T hash)
     }
 }
 
+#if defined(FEAT_EVAL) || defined(FEAT_SYN_HL) || defined(PROTO)
 /*
  * Print the efficiency of hashtable lookups.
  * Useful when trying different hash algorithms.
@@ -194,6 +197,7 @@ hash_debug_results(void)
                                hash_count_perturb * 100 / hash_count_lookup);
 #endif
 }
+#endif
 
 /*
  * Add item with key "key" to hashtable "ht".
index ff66411261f69dd46a74ea0a50f954964255f5d1..6ed11ad42e9b413ac7615265d799cf85b0b0929b 100644 (file)
@@ -54,6 +54,7 @@ json_encode(typval_T *val, int options)
     return ga.ga_data;
 }
 
+#if defined(FEAT_JOB_CHANNEL) || defined(PROTO)
 /*
  * Encode ["nr", "val"] into a JSON format string in allocated memory.
  * "options" can contain JSON_JS, JSON_NO_NONE and JSON_NL.
@@ -83,6 +84,7 @@ json_encode_nr_expr(int nr, typval_T *val, int options)
     list_unref(listtv.vval.v_list);
     return ga.ga_data;
 }
+#endif
 
     static void
 write_string(garray_T *gap, char_u *str)
@@ -1082,6 +1084,7 @@ json_decode_all(js_read_T *reader, typval_T *res, int options)
     return OK;
 }
 
+#if defined(FEAT_JOB_CHANNEL) || defined(PROTO)
 /*
  * Decode the JSON from "reader" and store the result in "res".
  * "options" can be JSON_JS or zero;
@@ -1102,6 +1105,7 @@ json_decode(js_read_T *reader, typval_T *res, int options)
 
     return ret;
 }
+#endif
 
 /*
  * Decode the JSON from "reader" to find the end of the message.
index b6758a1c12f6c62581834d216789667294e57301..f33841c334d24292dba6dba59a92867902c32590 100644 (file)
@@ -844,6 +844,7 @@ bomb_size(void)
     return n;
 }
 
+#if defined(FEAT_QUICKFIX) || defined(PROTO)
 /*
  * Remove all BOM from "s" by moving remaining text.
  */
@@ -863,6 +864,7 @@ remove_bom(char_u *s)
        }
     }
 }
+#endif
 
 /*
  * Get class of pointer:
index 0c3b5324dc0909771ed35b395baafe2ea5208061..1a7ec280ad56f40fe8020388d8258d261f630b3e 100644 (file)
@@ -3507,12 +3507,14 @@ give_warning(char_u *message, int hl)
     --no_wait_return;
 }
 
+#if defined(FEAT_EVAL) || defined(PROTO)
     void
 give_warning2(char_u *message, char_u *a1, int hl)
 {
     vim_snprintf((char *)IObuff, IOSIZE, (char *)message, a1);
     give_warning(IObuff, hl);
 }
+#endif
 
 /*
  * Advance msg cursor to column "col".
index 4c9bd2fed85166cf2f9824bf2ce97aa94b78df1c..f75ea81d757a87c804c48dcaa4c3bdbfe5c63ce5 100644 (file)
@@ -4672,6 +4672,7 @@ remove_tail(char_u *p, char_u *pend, char_u *name)
     return pend;
 }
 
+#if defined(FEAT_EVAL) || defined(PROTO)
     void
 vim_unsetenv(char_u *var)
 {
@@ -4681,6 +4682,7 @@ vim_unsetenv(char_u *var)
     vim_setenv(var, (char_u *)"");
 #endif
 }
+#endif
 
 
 /*
index 214a3a2bd573c2c11bfea45db147aa133d5f6c21..b1cf8b5e909191bf380066556adb55df82f43d9a 100644 (file)
@@ -1033,6 +1033,7 @@ theend:
 /*
  * lalloc() with an ID for alloc_fail().
  */
+#if defined(FEAT_SIGNS) || defined(PROTO)
     char_u *
 lalloc_id(long_u size, int message, alloc_id_T id UNUSED)
 {
@@ -1042,6 +1043,7 @@ lalloc_id(long_u size, int message, alloc_id_T id UNUSED)
 #endif
     return (lalloc((long_u)size, message));
 }
+#endif
 
 #if defined(MEM_PROFILE) || defined(PROTO)
 /*
@@ -2135,6 +2137,7 @@ ga_grow(garray_T *gap, int n)
     return OK;
 }
 
+#if defined(FEAT_EVAL) || defined(FEAT_SEARCHPATH) || defined(PROTO)
 /*
  * For a growing array that contains a list of strings: concatenate all the
  * strings with a separating "sep".
@@ -2170,6 +2173,7 @@ ga_concat_strings(garray_T *gap, char *sep)
     }
     return s;
 }
+#endif
 
 #if defined(FEAT_VIMINFO) || defined(FEAT_EVAL) || defined(PROTO)
 /*
index 9ee233950dae8ff1c601337b76d340e9059cd95e..4b1040f329f432a4ba3d94fc01624302a3aec863 100644 (file)
--- a/src/ops.c
+++ b/src/ops.c
@@ -201,6 +201,7 @@ op_on_lines(int op)
     return opchars[op][2] & OPF_LINES;
 }
 
+#if defined(FEAT_JOB_CHANNEL) || defined(PROTO)
 /*
  * Return TRUE if operator "op" changes text.
  */
@@ -209,6 +210,7 @@ op_is_change(int op)
 {
     return opchars[op][2] & OPF_CHANGE;
 }
+#endif
 
 /*
  * Get first operator command character.
@@ -1050,6 +1052,8 @@ put_register(int name, void *reg)
 #endif
 }
 
+#if (defined(FEAT_CLIPBOARD) && defined(FEAT_X11) && defined(USE_SYSTEM)) \
+       || defined(PROTO)
     void
 free_register(void *reg)
 {
@@ -1061,6 +1065,7 @@ free_register(void *reg)
     vim_free(reg);
     *y_current = tmp;
 }
+#endif
 
 #if defined(FEAT_MOUSE) || defined(PROTO)
 /*
index 3be4447dd3d8e18544fa5a49035e183abe75077f..8deac536a8cdaece45fa401dd1501ff37b40a461 100644 (file)
@@ -10699,6 +10699,7 @@ comp_col(void)
 #endif
 }
 
+#if defined(FEAT_PYTHON) || defined(FEAT_PYTHON3) || defined(PROTO)
 /*
  * Unset local option value, similar to ":set opt<".
  */
@@ -10800,6 +10801,7 @@ unset_global_local_option(char_u *name, void *from)
 #endif
     }
 }
+#endif
 
 /*
  * Get pointer to option variable, depending on local or global scope.
@@ -13122,6 +13124,7 @@ tabstop_eq(int *ts1, int *ts2)
     return TRUE;
 }
 
+#if defined(FEAT_BEVAL) || defined(PROTO)
 /*
  * Copy a tabstop array, allocating space for the new array.
  */
@@ -13140,6 +13143,7 @@ tabstop_copy(int *oldts)
 
     return newts;
 }
+#endif
 
 /*
  * Return a count of the number of tabstops.
index 242d60e1aed47c31eb15584edaac121c6566f594..0a2682949edd5e799d00789f4fcae150309bf9e4 100644 (file)
@@ -1016,7 +1016,7 @@ static volatile sig_atomic_t lc_active INIT(= FALSE);
  * Returns OK for normal return, FAIL when the protected code caused a
  * problem and LONGJMP() was used.
  */
-    void
+    static void
 mch_startjmp(void)
 {
 #ifdef SIGHASARG
@@ -1025,13 +1025,13 @@ mch_startjmp(void)
     lc_active = TRUE;
 }
 
-    void
+    static void
 mch_endjmp(void)
 {
     lc_active = FALSE;
 }
 
-    void
+    static void
 mch_didjmp(void)
 {
 # if defined(HAVE_SIGALTSTACK) || defined(HAVE_SIGSTACK)
index 262a8d54deeb0c512f411ba4f936edc85be6b377..224fe98c4eaa2e631871836ba7e7c850e5df807f 100644 (file)
@@ -7,9 +7,6 @@ int mch_check_messages(void);
 long_u mch_total_mem(int special);
 void mch_delay(long msec, int ignoreinput);
 int mch_stackcheck(char *p);
-void mch_startjmp(void);
-void mch_endjmp(void);
-void mch_didjmp(void);
 void mch_suspend(void);
 void mch_init(void);
 void reset_signals(void);
index a33fdd98953ec40a1474823f35d6ef33ee82915d..490bda4b88ed8fb93a1cc98be87d9ec48f65299f 100644 (file)
@@ -1,6 +1,5 @@
 /* regexp.c */
 int re_multiline(regprog_T *prog);
-int re_lookbehind(regprog_T *prog);
 char_u *skip_regexp(char_u *startp, int dirc, int magic, char_u **newp);
 int vim_regcomp_had_eol(void);
 void free_regexp_stuff(void);
index 1031876c488b1d9fbaf2d2835020052c99ee843e..a318fc87facb1f00ec79e6ebd1b301077be3897f 100644 (file)
@@ -18,7 +18,6 @@ cursorentry_T *term_get_cursor_shape(guicolor_T *fg, guicolor_T *bg);
 int term_use_loop(void);
 void term_win_entered(void);
 int terminal_loop(int blocking);
-void term_job_ended(job_T *job);
 void term_channel_closed(channel_T *ch);
 void term_check_channel_closed_recently(void);
 int term_do_update_window(win_T *wp);
index accd10c50621c43385b61be94f49daf8c95aa326..71bcd6ccabda8165ffa0a998ba0a7d6cde506d9c 100644 (file)
@@ -733,16 +733,6 @@ re_multiline(regprog_T *prog)
     return (prog->regflags & RF_HASNL);
 }
 
-/*
- * Return TRUE if compiled regular expression "prog" looks before the start
- * position (pattern contains "\@<=" or "\@<!").
- */
-    int
-re_lookbehind(regprog_T *prog)
-{
-    return (prog->regflags & RF_LOOKBH);
-}
-
 /*
  * Check for an equivalence class name "[=a=]".  "pp" points to the '['.
  * Returns a character representing the class. Zero means that no item was
@@ -8206,6 +8196,8 @@ report_re_switch(char_u *pat)
 }
 #endif
 
+#if (defined(FEAT_X11) && (defined(FEAT_TITLE) || defined(FEAT_XCLIPBOARD))) \
+       || defined(PROTO)
 /*
  * Return whether "prog" is currently being executed.
  */
@@ -8214,6 +8206,7 @@ regprog_in_use(regprog_T *prog)
 {
     return prog->re_in_use;
 }
+#endif
 
 /*
  * Match a regexp against a string.
index 4a8fce2c7d20d3bec2c135955dbc08326d51277c..62f9bd10368c9abd154d93fff67d34d5e8316f3c 100644 (file)
@@ -263,6 +263,7 @@ redraw_buf_later(buf_T *buf, int type)
     }
 }
 
+#if defined(FEAT_SIGNS) || defined(PROTO)
     void
 redraw_buf_line_later(buf_T *buf, linenr_T lnum)
 {
@@ -273,7 +274,9 @@ redraw_buf_line_later(buf_T *buf, linenr_T lnum)
                                                  && lnum < wp->w_botline)
            redrawWinline(wp, lnum);
 }
+#endif
 
+#if defined(FEAT_JOB_CHANNEL) || defined(PROTO)
     void
 redraw_buf_and_status_later(buf_T *buf, int type)
 {
@@ -294,7 +297,9 @@ redraw_buf_and_status_later(buf_T *buf, int type)
        }
     }
 }
+#endif
 
+#if defined(FEAT_TERMRESPONSE) || defined(PROTO)
 /*
  * Redraw as soon as possible.  When the command line is not scrolled redraw
  * right away and restore what was on the command line.
@@ -439,6 +444,7 @@ redraw_asap(int type)
 
     return ret;
 }
+#endif
 
 /*
  * Invoked after an asynchronous callback is called.
@@ -929,7 +935,7 @@ conceal_check_cursor_line(void)
 }
 #endif
 
-#if defined(FEAT_SIGNS) || defined(PROTO)
+#if defined(FEAT_NETBEANS_INTG) || defined(PROTO)
     void
 update_debug_sign(buf_T *buf, linenr_T lnum)
 {
@@ -11294,6 +11300,7 @@ number_width(win_T *wp)
 }
 #endif
 
+#if defined(FEAT_EVAL) || defined(PROTO)
 /*
  * Return the current cursor column. This is the actual position on the
  * screen. First column is 0.
@@ -11313,3 +11320,4 @@ screen_screenrow(void)
 {
     return screen_cur_row;
 }
+#endif
index f62858c2fb208c40e811840fc82a266455d46dae..94b1ef1e6bc89b712dadcfc3d4553553060a4377 100644 (file)
@@ -476,6 +476,7 @@ pat_has_uppercase(char_u *pat)
     return FALSE;
 }
 
+#if defined(FEAT_EVAL) || defined(PROTO)
     char_u *
 last_csearch(void)
 {
@@ -510,6 +511,7 @@ set_last_csearch(int c, char_u *s UNUSED, int len UNUSED)
        vim_memset(lastc_bytes, 0, sizeof(lastc_bytes));
 #endif
 }
+#endif
 
     void
 set_csearch_direction(int cdir)
index 4e1d45007fe8f5b9715d28314af77745387c21ba..b48ca007929c40dd49d019db54b87f6777649d7a 100644 (file)
@@ -8887,6 +8887,7 @@ get_attr_entry(garray_T *table, attrentry_T *aep)
     return (table->ga_len - 1 + ATTR_OFF);
 }
 
+#if defined(FEAT_TERMINAL) || defined(PROTO)
 /*
  * Get an attribute index for a cterm entry.
  * Uses an existing entry when possible or adds one when needed.
@@ -8906,8 +8907,9 @@ get_cterm_attr_idx(int attr, int fg, int bg)
     at_en.ae_u.cterm.bg_color = bg;
     return get_attr_entry(&cterm_attr_table, &at_en);
 }
+#endif
 
-#if defined(FEAT_TERMGUICOLORS) || defined(PROTO)
+#if (defined(FEAT_TERMINAL) && defined(FEAT_TERMGUICOLORS)) || defined(PROTO)
 /*
  * Get an attribute index for a 'termguicolors' entry.
  * Uses an existing entry when possible or adds one when needed.
@@ -8935,7 +8937,7 @@ get_tgc_attr_idx(int attr, guicolor_T fg, guicolor_T bg)
 }
 #endif
 
-#if defined(FEAT_GUI) || defined(PROTO)
+#if (defined(FEAT_TERMINAL) && defined(FEAT_GUI)) || defined(PROTO)
 /*
  * Get an attribute index for a cterm entry.
  * Uses an existing entry when possible or adds one when needed.
index e48b16e4e0eda6dcb01e052d9532b593d751a463..518086853fa4f50ff3dc04a0bd7a7ae05837ac41 100644 (file)
@@ -2838,6 +2838,7 @@ static int winpos_x = -1;
 static int winpos_y = -1;
 static int did_request_winpos = 0;
 
+#  if (defined(FEAT_EVAL) && defined(HAVE_TGETENT)) || defined(PROTO)
 /*
  * Try getting the Vim window position from the terminal.
  * Returns OK or FAIL.
@@ -2885,6 +2886,7 @@ term_get_winpos(int *x, int *y, varnumber_T timeout)
 
     return FALSE;
 }
+#  endif
 # endif
 
     void
index 09b60726991ba4e3cbd5d6299664f3fb022443cf..d485b745f3dc1834e7dcc188586e2b833d75436e 100644 (file)
@@ -2307,35 +2307,6 @@ theend:
     return ret;
 }
 
-/*
- * Called when a job has finished.
- * This updates the title and status, but does not close the vterm, because
- * there might still be pending output in the channel.
- */
-    void
-term_job_ended(job_T *job)
-{
-    term_T *term;
-    int            did_one = FALSE;
-
-    for (term = first_term; term != NULL; term = term->tl_next)
-       if (term->tl_job == job)
-       {
-           VIM_CLEAR(term->tl_title);
-           VIM_CLEAR(term->tl_status_text);
-           redraw_buf_and_status_later(term->tl_buffer, VALID);
-           did_one = TRUE;
-       }
-    if (did_one)
-       redraw_statuslines();
-    if (curbuf->b_term != NULL)
-    {
-       if (curbuf->b_term->tl_job == job)
-           maketitle();
-       update_cursor(curbuf->b_term, TRUE);
-    }
-}
-
     static void
 may_toggle_cursor(term_T *term)
 {
@@ -3072,7 +3043,7 @@ update_system_term(term_T *term)
 
        p_more = FALSE;
        msg_row = Rows - 1;
-       msg_puts((char_u *)"\n");
+       msg_puts("\n");
        p_more = save_p_more;
        --term->tl_toprow;
     }
@@ -5408,11 +5379,13 @@ term_send_eof(channel_T *ch)
        }
 }
 
+#if defined(FEAT_GUI) || defined(PROTO)
     job_T *
 term_getjob(term_T *term)
 {
     return term != NULL ? term->tl_job : NULL;
 }
+#endif
 
 # if defined(WIN3264) || defined(PROTO)
 
index 54515702dc466e816f9a78a669d52d8cf28bda01..f931124fac214725ce087d1022ab1757e25beb41 100644 (file)
--- a/src/ui.c
+++ b/src/ui.c
@@ -1589,6 +1589,7 @@ clip_gen_request_selection(VimClipboard *cbd)
 #endif
 }
 
+#if (defined(FEAT_X11) && defined(USE_SYSTEM)) || defined(PROTO)
     int
 clip_gen_owner_exists(VimClipboard *cbd UNUSED)
 {
@@ -1603,6 +1604,7 @@ clip_gen_owner_exists(VimClipboard *cbd UNUSED)
     return TRUE;
 #endif
 }
+#endif
 
 #endif /* FEAT_CLIPBOARD */
 
@@ -2574,12 +2576,15 @@ clip_x11_set_selection(VimClipboard *cbd UNUSED)
 {
 }
 
+#if (defined(FEAT_X11) && defined(FEAT_XCLIPBOARD) && defined(USE_SYSTEM)) \
+       || defined(PROTO)
     int
 clip_x11_owner_exists(VimClipboard *cbd)
 {
     return XGetSelectionOwner(X_DISPLAY, cbd->sel_atom) != None;
 }
 #endif
+#endif
 
 #if defined(FEAT_XCLIPBOARD) || defined(FEAT_GUI_X11) \
     || defined(FEAT_GUI_GTK) || defined(PROTO)
index 49c34c127c294d3c2e15caefaf05608cbbc17672..6887c2c5c6ea4b08f8e3a214ef91f88d67fdf6ba 100644 (file)
@@ -2560,6 +2560,7 @@ function_exists(char_u *name, int no_deref)
     return n;
 }
 
+#if defined(FEAT_PYTHON) || defined(FEAT_PYTHON3) || defined(PROTO)
     char_u *
 get_expanded_name(char_u *name, int check)
 {
@@ -2575,6 +2576,7 @@ get_expanded_name(char_u *name, int check)
     vim_free(p);
     return NULL;
 }
+#endif
 
 #if defined(FEAT_PROFILE) || defined(PROTO)
 /*
index 90f4296247359ac324d4f6eb476687eb53e0c39a..0ef836e9bf896f27be2dfafa8709ff36ff847584 100644 (file)
@@ -791,6 +791,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    785,
 /**/
     784,
 /**/