Skip to content

Commit

Permalink
Add a few #ifdefs to exclude functions that are not used. (Domnique P…
Browse files Browse the repository at this point in the history
…elle)

--HG--
branch : vim73
  • Loading branch information
brammool committed May 30, 2010
1 parent cc32c43 commit 0ab1925
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
1 change: 0 additions & 1 deletion runtime/doc/todo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1090,7 +1090,6 @@ Vim 7.3:
Ron's version: http://dev.ronware.org/p/vim/finfo?name=gvim.nsi
- Persistent undo bugs / fixes:
- Need to check all values for evil manipulation.
- patch for unused functions. (Dominique Pelle, 2010 May 29)
- Also crypt the undo file.
- Also crypt the swap file, each block separately. Change mf_write() and
mf_read(). How to get b_p_key to these functions?
Expand Down
2 changes: 2 additions & 0 deletions src/gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand All @@ -3922,6 +3923,7 @@ gui_may_update_scrollbars()
}
need_mouse_correct = TRUE;
}
#endif

void
gui_update_scrollbars(force)
Expand Down
4 changes: 3 additions & 1 deletion src/gui_gtk_f.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions src/screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -307,6 +309,7 @@ update_curbuf(type)
redraw_curbuf_later(type);
update_screen(type);
}
#endif

/*
* update_screen()
Expand Down
7 changes: 5 additions & 2 deletions src/term.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 0ab1925

Please sign in to comment.