summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-05-30 19:00:15 +0200
committerBram Moolenaar <Bram@vim.org>2010-05-30 19:00:15 +0200
commitfd3e5dc97f06e54220a2c5b65980dd6adc2c5555 (patch)
tree204e2445390797f1ea8751e7f1f7d242884f154d /src
parenta17d4c1934b008b9aa8a2d7cf085cfe76a690d9a (diff)
downloadvim-fd3e5dc97f06e54220a2c5b65980dd6adc2c5555.zip
Add a few #ifdefs to exclude functions that are not used. (Domnique Pelle)
Diffstat (limited to 'src')
-rw-r--r--src/gui.c2
-rw-r--r--src/gui_gtk_f.c4
-rw-r--r--src/screen.c3
-rw-r--r--src/term.c7
4 files changed, 13 insertions, 3 deletions
diff --git a/src/gui.c b/src/gui.c
index fab312fd3..33f7844e0 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -3908,6 +3908,7 @@ gui_drag_scrollbar(sb, value, still_dragging)
* Scrollbar stuff:
*/
+#if defined(FEAT_AUTOCMD) || defined(FEAT_WINDOWS) || defined(PROTO)
/*
* Called when something in the window layout has changed.
*/
@@ -3922,6 +3923,7 @@ gui_may_update_scrollbars()
}
need_mouse_correct = TRUE;
}
+#endif
void
gui_update_scrollbars(force)
diff --git a/src/gui_gtk_f.c b/src/gui_gtk_f.c
index ccf54ece9..2caded85d 100644
--- a/src/gui_gtk_f.c
+++ b/src/gui_gtk_f.c
@@ -172,12 +172,13 @@ gtk_form_move(GtkForm *form,
}
}
+#if !defined(HAVE_GTK2) || defined(PROTO)
void
gtk_form_set_size(GtkForm *form, guint width, guint height)
{
g_return_if_fail(GTK_IS_FORM(form));
- /* prevent unneccessary calls */
+ /* prevent useless calls */
if (form->width == width && form->height == height)
return;
form->width = width;
@@ -190,6 +191,7 @@ gtk_form_set_size(GtkForm *form, guint width, guint height)
gtk_container_queue_resize(GTK_CONTAINER(GTK_WIDGET(form)->parent));
#endif
}
+#endif
void
gtk_form_freeze(GtkForm *form)
diff --git a/src/screen.c b/src/screen.c
index 38d577ecb..df5489f8b 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -297,6 +297,8 @@ redrawWinline(lnum, invalid)
#endif
}
+#if defined(FEAT_RUBY) || defined(FEAT_VISUAL) || \
+ (defined(FEAT_CLIPBOARD) && defined(FEAT_X11)) || defined(PROTO)
/*
* update all windows that are editing the current buffer
*/
@@ -307,6 +309,7 @@ update_curbuf(type)
redraw_curbuf_later(type);
update_screen(type);
}
+#endif
/*
* update_screen()
diff --git a/src/term.c b/src/term.c
index f607575b1..2e0376ce1 100644
--- a/src/term.c
+++ b/src/term.c
@@ -2609,6 +2609,8 @@ out_char_nf(c)
out_flush();
}
+#if defined(FEAT_TITLE) || defined(FEAT_MOUSE_TTY) || defined(FEAT_GUI) \
+ || defined(FEAT_TERMRESPONSE) || defined(PROTO)
/*
* A never-padding out_str.
* use this whenever you don't want to run the string through tputs.
@@ -2631,6 +2633,7 @@ out_str_nf(s)
if (p_wd)
out_flush();
}
+#endif
/*
* out_str(s): Put a character string a byte at a time into the output buffer.
@@ -4361,7 +4364,7 @@ check_termcode(max_offset, buf, buflen)
* ### Y cursor position padded to 3 digits
* (s-x) SHIFT key pressed - not pressed x not reporting
* (c-x) CTRL key pressed - not pressed x not reporting
- * \033\\ terminateing sequence
+ * \033\\ terminating sequence
*/
p = tp + slen;
@@ -4607,7 +4610,7 @@ check_termcode(max_offset, buf, buflen)
# ifdef FEAT_MOUSE_PTERM
if (key_name[0] == (int)KS_PTERM_MOUSE)
{
- int button, num_clicks, action, mc, mr;
+ int button, num_clicks, action;
p = tp + slen;