0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 7.4.1208

Problem:    Using old style function declarations.
Solution:   Change to new style function declarations. (script by Hirohito
            Higashi)
This commit is contained in:
Bram Moolenaar 2016-01-30 17:24:07 +01:00
parent 66f948e928
commit 68c2f638e6
18 changed files with 687 additions and 981 deletions

View File

@ -1111,9 +1111,7 @@ gui_ph_encoding_changed(int new_encoding)
/****************************************************************************/ /****************************************************************************/
void void
gui_mch_prepare(argc, argv) gui_mch_prepare(int *argc, char **argv)
int *argc;
char **argv;
{ {
PtInit(NULL); PtInit(NULL);
} }
@ -1720,7 +1718,7 @@ gui_mch_iconify(void)
* Bring the Vim window to the foreground. * Bring the Vim window to the foreground.
*/ */
void void
gui_mch_set_foreground() gui_mch_set_foreground(void)
{ {
PhWindowEvent_t event; PhWindowEvent_t event;
@ -1860,8 +1858,7 @@ static int mshape_ids[] =
}; };
void void
mch_set_mouse_shape(shape) mch_set_mouse_shape(int shape)
int shape;
{ {
int id; int id;
@ -2184,7 +2181,7 @@ gui_mch_clear_block(int row1, int col1, int row2, int col2)
} }
void void
gui_mch_clear_all() gui_mch_clear_all(void)
{ {
PhRect_t text_rect = { PhRect_t text_rect = {
{ gui.border_width, gui.border_width }, { gui.border_width, gui.border_width },
@ -3078,9 +3075,7 @@ gui_mch_get_font(char_u *vim_font_name, int report_error)
* Don't know how to get the actual name, thus use the provided name. * Don't know how to get the actual name, thus use the provided name.
*/ */
char_u * char_u *
gui_mch_get_fontname(font, name) gui_mch_get_fontname(GuiFont font, char_u *name)
GuiFont font;
char_u *name;
{ {
if (name == NULL) if (name == NULL)
return NULL; return NULL;

View File

@ -2246,7 +2246,7 @@ im_set_active(int active)
* Get IM status. When IM is on, return not 0. Else return 0. * Get IM status. When IM is on, return not 0. Else return 0.
*/ */
int int
im_get_status() im_get_status(void)
{ {
int status = 0; int status = 0;
HIMC hImc; HIMC hImc;
@ -4525,10 +4525,7 @@ typedef struct _signicon_t
} signicon_t; } signicon_t;
void void
gui_mch_drawsign(row, col, typenr) gui_mch_drawsign(int row, int col, int typenr)
int row;
int col;
int typenr;
{ {
signicon_t *sign; signicon_t *sign;
int x, y, w, h; int x, y, w, h;
@ -4605,8 +4602,7 @@ close_signicon_image(signicon_t *sign)
} }
void * void *
gui_mch_register_sign(signfile) gui_mch_register_sign(char_u *signfile)
char_u *signfile;
{ {
signicon_t sign, *psign; signicon_t sign, *psign;
char_u *ext; char_u *ext;
@ -4661,8 +4657,7 @@ gui_mch_register_sign(signfile)
} }
void void
gui_mch_destroy_sign(sign) gui_mch_destroy_sign(void *sign)
void *sign;
{ {
if (sign) if (sign)
{ {
@ -4766,10 +4761,7 @@ multiline_balloon_available(void)
} }
static void static void
make_tooltip(beval, text, pt) make_tooltip(BalloonEval *beval, char *text, POINT pt)
BalloonEval *beval;
char *text;
POINT pt;
{ {
TOOLINFO *pti; TOOLINFO *pti;
int ToolInfoSize; int ToolInfoSize;
@ -4833,19 +4825,18 @@ make_tooltip(beval, text, pt)
} }
static void static void
delete_tooltip(beval) delete_tooltip(BalloonEval *beval)
BalloonEval *beval;
{ {
PostMessage(beval->balloon, WM_CLOSE, 0, 0); PostMessage(beval->balloon, WM_CLOSE, 0, 0);
} }
/*ARGSUSED*/ /*ARGSUSED*/
static VOID CALLBACK static VOID CALLBACK
BevalTimerProc(hwnd, uMsg, idEvent, dwTime) BevalTimerProc(
HWND hwnd; HWND hwnd,
UINT uMsg; UINT uMsg,
UINT_PTR idEvent; UINT_PTR idEvent,
DWORD dwTime; DWORD dwTime)
{ {
POINT pt; POINT pt;
RECT rect; RECT rect;
@ -4883,8 +4874,7 @@ BevalTimerProc(hwnd, uMsg, idEvent, dwTime)
/*ARGSUSED*/ /*ARGSUSED*/
void void
gui_mch_disable_beval_area(beval) gui_mch_disable_beval_area(BalloonEval *beval)
BalloonEval *beval;
{ {
// TRACE0("gui_mch_disable_beval_area {{{"); // TRACE0("gui_mch_disable_beval_area {{{");
KillTimer(s_textArea, BevalTimerId); KillTimer(s_textArea, BevalTimerId);
@ -4893,8 +4883,7 @@ gui_mch_disable_beval_area(beval)
/*ARGSUSED*/ /*ARGSUSED*/
void void
gui_mch_enable_beval_area(beval) gui_mch_enable_beval_area(BalloonEval *beval)
BalloonEval *beval;
{ {
// TRACE0("gui_mch_enable_beval_area |||"); // TRACE0("gui_mch_enable_beval_area |||");
if (beval == NULL) if (beval == NULL)
@ -4905,9 +4894,7 @@ gui_mch_enable_beval_area(beval)
} }
void void
gui_mch_post_balloon(beval, mesg) gui_mch_post_balloon(BalloonEval *beval, char_u *mesg)
BalloonEval *beval;
char_u *mesg;
{ {
POINT pt; POINT pt;
// TRACE0("gui_mch_post_balloon {{{"); // TRACE0("gui_mch_post_balloon {{{");
@ -4928,11 +4915,11 @@ gui_mch_post_balloon(beval, mesg)
/*ARGSUSED*/ /*ARGSUSED*/
BalloonEval * BalloonEval *
gui_mch_create_beval_area(target, mesg, mesgCB, clientData) gui_mch_create_beval_area(
void *target; /* ignored, always use s_textArea */ void *target, /* ignored, always use s_textArea */
char_u *mesg; char_u *mesg,
void (*mesgCB)(BalloonEval *, int); void (*mesgCB)(BalloonEval *, int),
void *clientData; void *clientData)
{ {
/* partially stolen from gui_beval.c */ /* partially stolen from gui_beval.c */
BalloonEval *beval; BalloonEval *beval;
@ -5010,8 +4997,7 @@ TrackUserActivity(UINT uMsg)
} }
void void
gui_mch_destroy_beval_area(beval) gui_mch_destroy_beval_area(BalloonEval *beval)
BalloonEval *beval;
{ {
vim_free(beval); vim_free(beval);
} }

View File

@ -1144,7 +1144,7 @@ gui_mch_new_colors(void)
* Set the colors to their default values. * Set the colors to their default values.
*/ */
void void
gui_mch_def_colors() gui_mch_def_colors(void)
{ {
gui.norm_pixel = GetSysColor(COLOR_WINDOWTEXT); gui.norm_pixel = GetSysColor(COLOR_WINDOWTEXT);
gui.back_pixel = GetSysColor(COLOR_WINDOW); gui.back_pixel = GetSysColor(COLOR_WINDOW);
@ -1390,9 +1390,7 @@ gui_mch_get_font(
*/ */
/*ARGSUSED*/ /*ARGSUSED*/
char_u * char_u *
gui_mch_get_fontname(font, name) gui_mch_get_fontname(GuiFont font, char_u *name)
GuiFont font;
char_u *name;
{ {
if (name == NULL) if (name == NULL)
return NULL; return NULL;
@ -2623,8 +2621,7 @@ gui_mch_update_tabline(void)
* Set the current tab to "nr". First tab is 1. * Set the current tab to "nr". First tab is 1.
*/ */
void void
gui_mch_set_curtab(nr) gui_mch_set_curtab(int nr)
int nr;
{ {
if (s_tabhwnd == NULL) if (s_tabhwnd == NULL)
return; return;
@ -3258,7 +3255,7 @@ update_im_font(void)
* Handler of gui.wide_font (p_guifontwide) changed notification. * Handler of gui.wide_font (p_guifontwide) changed notification.
*/ */
void void
gui_mch_wide_font_changed() gui_mch_wide_font_changed(void)
{ {
# ifndef MSWIN16_FASTTEXT # ifndef MSWIN16_FASTTEXT
LOGFONT lf; LOGFONT lf;
@ -3385,7 +3382,7 @@ gui_mch_init_font(char_u *font_name, int fontset)
* Return TRUE if the GUI window is maximized, filling the whole screen. * Return TRUE if the GUI window is maximized, filling the whole screen.
*/ */
int int
gui_mch_maximized() gui_mch_maximized(void)
{ {
WINDOWPLACEMENT wp; WINDOWPLACEMENT wp;
@ -3403,7 +3400,7 @@ gui_mch_maximized()
* new Rows and Columns. This is like resizing the window. * new Rows and Columns. This is like resizing the window.
*/ */
void void
gui_mch_newfont() gui_mch_newfont(void)
{ {
RECT rect; RECT rect;

View File

@ -571,19 +571,19 @@ static char **gui_argv = NULL;
*/ */
static void static void
gui_x11_timer_cb(timed_out, interval_id) gui_x11_timer_cb(
XtPointer timed_out; XtPointer timed_out,
XtIntervalId *interval_id UNUSED; XtIntervalId *interval_id UNUSED)
{ {
*((int *)timed_out) = TRUE; *((int *)timed_out) = TRUE;
} }
static void static void
gui_x11_visibility_cb(w, dud, event, dum) gui_x11_visibility_cb(
Widget w UNUSED; Widget w UNUSED,
XtPointer dud UNUSED; XtPointer dud UNUSED,
XEvent *event; XEvent *event,
Boolean *dum UNUSED; Boolean *dum UNUSED)
{ {
if (event->type != VisibilityNotify) if (event->type != VisibilityNotify)
return; return;
@ -602,11 +602,11 @@ gui_x11_visibility_cb(w, dud, event, dum)
} }
static void static void
gui_x11_expose_cb(w, dud, event, dum) gui_x11_expose_cb(
Widget w UNUSED; Widget w UNUSED,
XtPointer dud UNUSED; XtPointer dud UNUSED,
XEvent *event; XEvent *event,
Boolean *dum UNUSED; Boolean *dum UNUSED)
{ {
XExposeEvent *gevent; XExposeEvent *gevent;
int new_x; int new_x;
@ -678,11 +678,11 @@ shellRectangle(Widget shell, XRectangle *r)
#endif #endif
static void static void
gui_x11_resize_window_cb(w, dud, event, dum) gui_x11_resize_window_cb(
Widget w UNUSED; Widget w UNUSED,
XtPointer dud UNUSED; XtPointer dud UNUSED,
XEvent *event; XEvent *event,
Boolean *dum UNUSED; Boolean *dum UNUSED)
{ {
static int lastWidth, lastHeight; static int lastWidth, lastHeight;
@ -724,31 +724,31 @@ gui_x11_resize_window_cb(w, dud, event, dum)
} }
static void static void
gui_x11_focus_change_cb(w, data, event, dum) gui_x11_focus_change_cb(
Widget w UNUSED; Widget w UNUSED,
XtPointer data UNUSED; XtPointer data UNUSED,
XEvent *event; XEvent *event,
Boolean *dum UNUSED; Boolean *dum UNUSED)
{ {
gui_focus_change(event->type == FocusIn); gui_focus_change(event->type == FocusIn);
} }
static void static void
gui_x11_enter_cb(w, data, event, dum) gui_x11_enter_cb(
Widget w UNUSED; Widget w UNUSED,
XtPointer data UNUSED; XtPointer data UNUSED,
XEvent *event UNUSED; XEvent *event UNUSED,
Boolean *dum UNUSED; Boolean *dum UNUSED)
{ {
gui_focus_change(TRUE); gui_focus_change(TRUE);
} }
static void static void
gui_x11_leave_cb(w, data, event, dum) gui_x11_leave_cb(
Widget w UNUSED; Widget w UNUSED,
XtPointer data UNUSED; XtPointer data UNUSED,
XEvent *event UNUSED; XEvent *event UNUSED,
Boolean *dum UNUSED; Boolean *dum UNUSED)
{ {
gui_focus_change(FALSE); gui_focus_change(FALSE);
} }
@ -760,11 +760,11 @@ gui_x11_leave_cb(w, data, event, dum)
#endif #endif
void void
gui_x11_key_hit_cb(w, dud, event, dum) gui_x11_key_hit_cb(
Widget w UNUSED; Widget w UNUSED,
XtPointer dud UNUSED; XtPointer dud UNUSED,
XEvent *event; XEvent *event,
Boolean *dum UNUSED; Boolean *dum UNUSED)
{ {
XKeyPressedEvent *ev_press; XKeyPressedEvent *ev_press;
#ifdef FEAT_XIM #ifdef FEAT_XIM
@ -1071,11 +1071,11 @@ theend:
} }
static void static void
gui_x11_mouse_cb(w, dud, event, dum) gui_x11_mouse_cb(
Widget w UNUSED; Widget w UNUSED,
XtPointer dud UNUSED; XtPointer dud UNUSED,
XEvent *event; XEvent *event,
Boolean *dum UNUSED; Boolean *dum UNUSED)
{ {
static XtIntervalId timer = (XtIntervalId)0; static XtIntervalId timer = (XtIntervalId)0;
static int timed_out = TRUE; static int timed_out = TRUE;
@ -1166,10 +1166,10 @@ gui_x11_mouse_cb(w, dud, event, dum)
#ifdef FEAT_SNIFF #ifdef FEAT_SNIFF
/* ARGSUSED */ /* ARGSUSED */
static void static void
gui_x11_sniff_request_cb(closure, source, id) gui_x11_sniff_request_cb(
XtPointer closure UNUSED; XtPointer closure UNUSED,
int *source UNUSED; int *source UNUSED,
XtInputId *id UNUSED; XtInputId *id UNUSED)
{ {
static char_u bytes[3] = {CSI, (int)KS_EXTRA, (int)KE_SNIFF}; static char_u bytes[3] = {CSI, (int)KS_EXTRA, (int)KE_SNIFF};
@ -1187,9 +1187,7 @@ gui_x11_sniff_request_cb(closure, source, id)
* when vim is started, whether or not the GUI has been started. * when vim is started, whether or not the GUI has been started.
*/ */
void void
gui_mch_prepare(argc, argv) gui_mch_prepare(int *argc, char **argv)
int *argc;
char **argv;
{ {
int arg; int arg;
int i; int i;
@ -1285,7 +1283,7 @@ gui_mch_prepare(argc, argv)
* Return OK or FAIL. * Return OK or FAIL.
*/ */
int int
gui_mch_init_check() gui_mch_init_check(void)
{ {
#ifdef FEAT_XIM #ifdef FEAT_XIM
XtSetLanguageProc(NULL, NULL, NULL); XtSetLanguageProc(NULL, NULL, NULL);
@ -1315,10 +1313,10 @@ static XtInputId _xsmp_xtinputid;
static void local_xsmp_handle_requests(XtPointer c, int *s, XtInputId *i); static void local_xsmp_handle_requests(XtPointer c, int *s, XtInputId *i);
static void static void
local_xsmp_handle_requests(c, s, i) local_xsmp_handle_requests(
XtPointer c UNUSED; XtPointer c UNUSED,
int *s UNUSED; int *s UNUSED,
XtInputId *i UNUSED; XtInputId *i UNUSED)
{ {
if (xsmp_handle_requests() == FAIL) if (xsmp_handle_requests() == FAIL)
XtRemoveInput(_xsmp_xtinputid); XtRemoveInput(_xsmp_xtinputid);
@ -1331,7 +1329,7 @@ local_xsmp_handle_requests(c, s, i)
* Returns OK for success, FAIL when the GUI can't be started. * Returns OK for success, FAIL when the GUI can't be started.
*/ */
int int
gui_mch_init() gui_mch_init(void)
{ {
XtGCMask gc_mask; XtGCMask gc_mask;
XGCValues gc_vals; XGCValues gc_vals;
@ -1575,7 +1573,7 @@ gui_mch_init()
* Called when starting the GUI fails after calling gui_mch_init(). * Called when starting the GUI fails after calling gui_mch_init().
*/ */
void void
gui_mch_uninit() gui_mch_uninit(void)
{ {
gui_x11_destroy_widgets(); gui_x11_destroy_widgets();
XtCloseDisplay(gui.dpy); XtCloseDisplay(gui.dpy);
@ -1589,7 +1587,7 @@ gui_mch_uninit()
* Called when the foreground or background color has been changed. * Called when the foreground or background color has been changed.
*/ */
void void
gui_mch_new_colors() gui_mch_new_colors(void)
{ {
long_u gc_mask; long_u gc_mask;
XGCValues gc_vals; XGCValues gc_vals;
@ -1619,7 +1617,7 @@ gui_mch_new_colors()
* Open the GUI window which was created by a call to gui_mch_init(). * Open the GUI window which was created by a call to gui_mch_init().
*/ */
int int
gui_mch_open() gui_mch_open(void)
{ {
/* Actually open the window */ /* Actually open the window */
XtRealizeWidget(vimShell); XtRealizeWidget(vimShell);
@ -1700,7 +1698,7 @@ gui_mch_open()
* Convert the tooltip fontset name to an XFontSet. * Convert the tooltip fontset name to an XFontSet.
*/ */
void void
gui_init_tooltip_font() gui_init_tooltip_font(void)
{ {
XrmValue from, to; XrmValue from, to;
@ -1719,7 +1717,7 @@ gui_init_tooltip_font()
#if defined(FEAT_MENU) || defined(PROTO) #if defined(FEAT_MENU) || defined(PROTO)
/* Convert the menu font/fontset name to an XFontStruct/XFontset */ /* Convert the menu font/fontset name to an XFontStruct/XFontset */
void void
gui_init_menu_font() gui_init_menu_font(void)
{ {
XrmValue from, to; XrmValue from, to;
@ -1748,8 +1746,7 @@ gui_init_menu_font()
#endif #endif
void void
gui_mch_exit(rc) gui_mch_exit(int rc UNUSED)
int rc UNUSED;
{ {
#if 0 #if 0
/* Lesstif gives an error message here, and so does Solaris. The man page /* Lesstif gives an error message here, and so does Solaris. The man page
@ -1764,8 +1761,7 @@ gui_mch_exit(rc)
* Get the position of the top left corner of the window. * Get the position of the top left corner of the window.
*/ */
int int
gui_mch_get_winpos(x, y) gui_mch_get_winpos(int *x, *y)
int *x, *y;
{ {
Dimension xpos, ypos; Dimension xpos, ypos;
@ -1783,8 +1779,7 @@ gui_mch_get_winpos(x, y)
* coordinates. * coordinates.
*/ */
void void
gui_mch_set_winpos(x, y) gui_mch_set_winpos(int x, y)
int x, y;
{ {
XtVaSetValues(vimShell, XtVaSetValues(vimShell,
XtNx, x, XtNx, x,
@ -1793,15 +1788,14 @@ gui_mch_set_winpos(x, y)
} }
void void
gui_mch_set_shellsize(width, height, min_width, min_height, gui_mch_set_shellsize(
base_width, base_height, direction) int width,
int width; int height,
int height; int min_width,
int min_width; int min_height,
int min_height; int base_width,
int base_width; int base_height,
int base_height; int direction UNUSED)
int direction UNUSED;
{ {
#ifdef FEAT_XIM #ifdef FEAT_XIM
height += xim_get_status_area_height(), height += xim_get_status_area_height(),
@ -1825,9 +1819,9 @@ gui_mch_set_shellsize(width, height, min_width, min_height,
* Is there no way in X to find out how wide the borders really are? * Is there no way in X to find out how wide the borders really are?
*/ */
void void
gui_mch_get_screen_dimensions(screen_w, screen_h) gui_mch_get_screen_dimensions(
int *screen_w; int *screen_w,
int *screen_h; int *screen_h)
{ {
*screen_w = DisplayWidth(gui.dpy, DefaultScreen(gui.dpy)) - 10; *screen_w = DisplayWidth(gui.dpy, DefaultScreen(gui.dpy)) - 10;
*screen_h = DisplayHeight(gui.dpy, DefaultScreen(gui.dpy)) - p_ghr; *screen_h = DisplayHeight(gui.dpy, DefaultScreen(gui.dpy)) - p_ghr;
@ -1840,9 +1834,9 @@ gui_mch_get_screen_dimensions(screen_w, screen_h)
* Return FAIL if the font could not be loaded, OK otherwise. * Return FAIL if the font could not be loaded, OK otherwise.
*/ */
int int
gui_mch_init_font(font_name, do_fontset) gui_mch_init_font(
char_u *font_name; char_u *font_name,
int do_fontset UNUSED; int do_fontset UNUSED)
{ {
XFontStruct *font = NULL; XFontStruct *font = NULL;
@ -1970,9 +1964,7 @@ gui_mch_init_font(font_name, do_fontset)
* Get a font structure for highlighting. * Get a font structure for highlighting.
*/ */
GuiFont GuiFont
gui_mch_get_font(name, giveErrorIfMissing) gui_mch_get_font(char_u *name, int giveErrorIfMissing)
char_u *name;
int giveErrorIfMissing;
{ {
XFontStruct *font; XFontStruct *font;
@ -2021,9 +2013,7 @@ gui_mch_get_font(name, giveErrorIfMissing)
* Don't know how to get the actual name, thus use the provided name. * Don't know how to get the actual name, thus use the provided name.
*/ */
char_u * char_u *
gui_mch_get_fontname(font, name) gui_mch_get_fontname(GuiFont font UNUSED, char_u *name)
GuiFont font UNUSED;
char_u *name;
{ {
if (name == NULL) if (name == NULL)
return NULL; return NULL;
@ -2035,7 +2025,7 @@ gui_mch_get_fontname(font, name)
* Adjust gui.char_height (after 'linespace' was changed). * Adjust gui.char_height (after 'linespace' was changed).
*/ */
int int
gui_mch_adjust_charheight() gui_mch_adjust_charheight(void)
{ {
#ifdef FEAT_XFONTSET #ifdef FEAT_XFONTSET
if (gui.fontset != NOFONTSET) if (gui.fontset != NOFONTSET)
@ -2059,8 +2049,7 @@ gui_mch_adjust_charheight()
* Set the current text font. * Set the current text font.
*/ */
void void
gui_mch_set_font(font) gui_mch_set_font(GuiFont font)
GuiFont font;
{ {
static Font prev_font = (Font)-1; static Font prev_font = (Font)-1;
Font fid = ((XFontStruct *)font)->fid; Font fid = ((XFontStruct *)font)->fid;
@ -2083,8 +2072,7 @@ gui_mch_set_font(font)
* Adjust the ascent, in case it's different. * Adjust the ascent, in case it's different.
*/ */
void void
gui_mch_set_fontset(fontset) gui_mch_set_fontset(GuiFontset fontset)
GuiFontset fontset;
{ {
current_fontset = (XFontSet)fontset; current_fontset = (XFontSet)fontset;
gui.char_ascent = fontset_ascent(current_fontset) + p_linespace / 2; gui.char_ascent = fontset_ascent(current_fontset) + p_linespace / 2;
@ -2095,8 +2083,7 @@ gui_mch_set_fontset(fontset)
* If a font is not going to be used, free its structure. * If a font is not going to be used, free its structure.
*/ */
void void
gui_mch_free_font(font) gui_mch_free_font(GuiFont font)
GuiFont font;
{ {
if (font != NOFONT) if (font != NOFONT)
XFreeFont(gui.dpy, (XFontStruct *)font); XFreeFont(gui.dpy, (XFontStruct *)font);
@ -2107,8 +2094,7 @@ gui_mch_free_font(font)
* If a fontset is not going to be used, free its structure. * If a fontset is not going to be used, free its structure.
*/ */
void void
gui_mch_free_fontset(fontset) gui_mch_free_fontset(GuiFontset fontset)
GuiFontset fontset;
{ {
if (fontset != NOFONTSET) if (fontset != NOFONTSET)
XFreeFontSet(gui.dpy, (XFontSet)fontset); XFreeFontSet(gui.dpy, (XFontSet)fontset);
@ -2119,10 +2105,10 @@ gui_mch_free_fontset(fontset)
* Return a reference to the fontset, or NOFONTSET when failing. * Return a reference to the fontset, or NOFONTSET when failing.
*/ */
GuiFontset GuiFontset
gui_mch_get_fontset(name, giveErrorIfMissing, fixed_width) gui_mch_get_fontset(
char_u *name; char_u *name,
int giveErrorIfMissing; int giveErrorIfMissing,
int fixed_width; int fixed_width)
{ {
XFontSet fontset; XFontSet fontset;
char **missing, *def_str; char **missing, *def_str;
@ -2165,8 +2151,7 @@ gui_mch_get_fontset(name, giveErrorIfMissing, fixed_width)
* Check if fontset "fs" is fixed width. * Check if fontset "fs" is fixed width.
*/ */
static int static int
check_fontset_sanity(fs) check_fontset_sanity(XFontSet fs)
XFontSet fs;
{ {
XFontStruct **xfs; XFontStruct **xfs;
char **font_name; char **font_name;
@ -2216,15 +2201,14 @@ check_fontset_sanity(fs)
} }
static int static int
fontset_width(fs) fontset_width(XFontSet fs)
XFontSet fs;
{ {
return XmbTextEscapement(fs, "Vim", 3) / 3; return XmbTextEscapement(fs, "Vim", 3) / 3;
} }
int int
fontset_height(fs) fontset_height(
XFontSet fs; XFontSet fs)
{ {
XFontSetExtents *extents; XFontSetExtents *extents;
@ -2239,8 +2223,7 @@ fontset_height(fs)
* characters in all fonts of the fontset. * characters in all fonts of the fontset.
*/ */
int int
fontset_height2(fs) fontset_height2(XFontSet fs)
XFontSet fs;
{ {
XFontSetExtents *extents; XFontSetExtents *extents;
@ -2262,8 +2245,7 @@ fontset_descent(fs)
*/ */
static int static int
fontset_ascent(fs) fontset_ascent(XFontSet fs)
XFontSet fs;
{ {
XFontSetExtents *extents; XFontSetExtents *extents;
@ -2278,8 +2260,7 @@ fontset_ascent(fs)
* Return INVALCOLOR for error. * Return INVALCOLOR for error.
*/ */
guicolor_T guicolor_T
gui_mch_get_color(reqname) gui_mch_get_color(char_u *reqname)
char_u *reqname;
{ {
int i; int i;
char_u *name = reqname; char_u *name = reqname;
@ -2382,9 +2363,7 @@ gui_mch_get_color(reqname)
* Return FAIL if not able to find or allocate a color. * Return FAIL if not able to find or allocate a color.
*/ */
static int static int
find_closest_color(colormap, colorPtr) find_closest_color(Colormap colormap, XColor *colorPtr)
Colormap colormap;
XColor *colorPtr;
{ {
double tmp, distance, closestDistance; double tmp, distance, closestDistance;
int i, closest, numFound, cmap_size; int i, closest, numFound, cmap_size;
@ -2452,8 +2431,7 @@ find_closest_color(colormap, colorPtr)
* Set the current text foreground color. * Set the current text foreground color.
*/ */
void void
gui_mch_set_fg_color(color) gui_mch_set_fg_color(guicolor_T color)
guicolor_T color;
{ {
if (color != prev_fg_color) if (color != prev_fg_color)
{ {
@ -2466,8 +2444,7 @@ gui_mch_set_fg_color(color)
* Set the current text background color. * Set the current text background color.
*/ */
void void
gui_mch_set_bg_color(color) gui_mch_set_bg_color(guicolor_T color)
guicolor_T color;
{ {
if (color != prev_bg_color) if (color != prev_bg_color)
{ {
@ -2480,8 +2457,7 @@ gui_mch_set_bg_color(color)
* Set the current text special color. * Set the current text special color.
*/ */
void void
gui_mch_set_sp_color(color) gui_mch_set_sp_color(guicolor_T color)
guicolor_T color;
{ {
prev_sp_color = color; prev_sp_color = color;
} }
@ -2490,7 +2466,7 @@ gui_mch_set_sp_color(color)
* create a mouse pointer that is blank * create a mouse pointer that is blank
*/ */
static Cursor static Cursor
gui_x11_create_blank_mouse() gui_x11_create_blank_mouse(void)
{ {
Pixmap blank_pixmap = XCreatePixmap(gui.dpy, gui.wid, 1, 1, 1); Pixmap blank_pixmap = XCreatePixmap(gui.dpy, gui.wid, 1, 1, 1);
GC gc = XCreateGC(gui.dpy, blank_pixmap, (unsigned long)0, (XGCValues*)0); GC gc = XCreateGC(gui.dpy, blank_pixmap, (unsigned long)0, (XGCValues*)0);
@ -2504,10 +2480,7 @@ gui_x11_create_blank_mouse()
* Draw a curled line at the bottom of the character cell. * Draw a curled line at the bottom of the character cell.
*/ */
static void static void
draw_curl(row, col, cells) draw_curl(int row, int col, int cells)
int row;
int col;
int cells;
{ {
int i; int i;
int offset; int offset;
@ -2524,12 +2497,12 @@ draw_curl(row, col, cells)
} }
void void
gui_mch_draw_string(row, col, s, len, flags) gui_mch_draw_string(
int row; int row,
int col; int col,
char_u *s; char_u *s,
int len; int len,
int flags; int flags)
{ {
int cells = len; int cells = len;
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
@ -2691,8 +2664,7 @@ gui_mch_draw_string(row, col, s, len, flags)
* Return OK if the key with the termcap name "name" is supported. * Return OK if the key with the termcap name "name" is supported.
*/ */
int int
gui_mch_haskey(name) gui_mch_haskey(char_u *name)
char_u *name;
{ {
int i; int i;
@ -2707,9 +2679,7 @@ gui_mch_haskey(name)
* Return the text window-id and display. Only required for X-based GUI's * Return the text window-id and display. Only required for X-based GUI's
*/ */
int int
gui_get_x11_windis(win, dis) gui_get_x11_windis(Window *win, Display **dis)
Window *win;
Display **dis;
{ {
*win = XtWindow(vimShell); *win = XtWindow(vimShell);
*dis = gui.dpy; *dis = gui.dpy;
@ -2717,14 +2687,13 @@ gui_get_x11_windis(win, dis)
} }
void void
gui_mch_beep() gui_mch_beep(void)
{ {
XBell(gui.dpy, 0); XBell(gui.dpy, 0);
} }
void void
gui_mch_flash(msec) gui_mch_flash(int msec)
int msec;
{ {
/* Do a visual beep by reversing the foreground and background colors */ /* Do a visual beep by reversing the foreground and background colors */
XFillRectangle(gui.dpy, gui.wid, gui.invert_gc, 0, 0, XFillRectangle(gui.dpy, gui.wid, gui.invert_gc, 0, 0,
@ -2741,11 +2710,11 @@ gui_mch_flash(msec)
* Invert a rectangle from row r, column c, for nr rows and nc columns. * Invert a rectangle from row r, column c, for nr rows and nc columns.
*/ */
void void
gui_mch_invert_rectangle(r, c, nr, nc) gui_mch_invert_rectangle(
int r; int r,
int c; int c,
int nr; int nr,
int nc; int nc)
{ {
XFillRectangle(gui.dpy, gui.wid, gui.invert_gc, XFillRectangle(gui.dpy, gui.wid, gui.invert_gc,
FILL_X(c), FILL_Y(r), (nc) * gui.char_width, (nr) * gui.char_height); FILL_X(c), FILL_Y(r), (nc) * gui.char_width, (nr) * gui.char_height);
@ -2755,7 +2724,7 @@ gui_mch_invert_rectangle(r, c, nr, nc)
* Iconify the GUI window. * Iconify the GUI window.
*/ */
void void
gui_mch_iconify() gui_mch_iconify(void)
{ {
XIconifyWindow(gui.dpy, XtWindow(vimShell), DefaultScreen(gui.dpy)); XIconifyWindow(gui.dpy, XtWindow(vimShell), DefaultScreen(gui.dpy));
} }
@ -2765,7 +2734,7 @@ gui_mch_iconify()
* Bring the Vim window to the foreground. * Bring the Vim window to the foreground.
*/ */
void void
gui_mch_set_foreground() gui_mch_set_foreground(void)
{ {
XMapRaised(gui.dpy, XtWindow(vimShell)); XMapRaised(gui.dpy, XtWindow(vimShell));
} }
@ -2775,8 +2744,7 @@ gui_mch_set_foreground()
* Draw a cursor without focus. * Draw a cursor without focus.
*/ */
void void
gui_mch_draw_hollow_cursor(color) gui_mch_draw_hollow_cursor(guicolor_T color)
guicolor_T color;
{ {
int w = 1; int w = 1;
@ -2794,10 +2762,7 @@ gui_mch_draw_hollow_cursor(color)
* color "color". * color "color".
*/ */
void void
gui_mch_draw_part_cursor(w, h, color) gui_mch_draw_part_cursor(int w, int h, guicolor_T color)
int w;
int h;
guicolor_T color;
{ {
gui_mch_set_fg_color(color); gui_mch_set_fg_color(color);
@ -2818,7 +2783,7 @@ gui_mch_draw_part_cursor(w, h, color)
* immediately. * immediately.
*/ */
void void
gui_mch_update() gui_mch_update(void)
{ {
XtInputMask mask, desired; XtInputMask mask, desired;
@ -2843,8 +2808,7 @@ gui_mch_update()
* or FAIL otherwise. * or FAIL otherwise.
*/ */
int int
gui_mch_wait_for_chars(wtime) gui_mch_wait_for_chars(long wtime)
long wtime;
{ {
int focus; int focus;
@ -2930,7 +2894,7 @@ gui_mch_wait_for_chars(wtime)
/* Flush any output to the screen */ /* Flush any output to the screen */
void void
gui_mch_flush() gui_mch_flush(void)
{ {
XFlush(gui.dpy); XFlush(gui.dpy);
} }
@ -2940,11 +2904,11 @@ gui_mch_flush()
* (row2, col2) inclusive. * (row2, col2) inclusive.
*/ */
void void
gui_mch_clear_block(row1, col1, row2, col2) gui_mch_clear_block(
int row1; int row1,
int col1; int col1,
int row2; int row2,
int col2; int col2)
{ {
int x; int x;
@ -2958,7 +2922,7 @@ gui_mch_clear_block(row1, col1, row2, col2)
} }
void void
gui_mch_clear_all() gui_mch_clear_all(void)
{ {
XClearArea(gui.dpy, gui.wid, 0, 0, 0, 0, False); XClearArea(gui.dpy, gui.wid, 0, 0, 0, 0, False);
} }
@ -2968,9 +2932,7 @@ gui_mch_clear_all()
* text further down within the scroll region. * text further down within the scroll region.
*/ */
void void
gui_mch_delete_lines(row, num_lines) gui_mch_delete_lines(int row, int num_lines)
int row;
int num_lines;
{ {
if (gui.visibility == VisibilityFullyObscured) if (gui.visibility == VisibilityFullyObscured)
return; /* Can't see the window */ return; /* Can't see the window */
@ -2995,9 +2957,7 @@ gui_mch_delete_lines(row, num_lines)
* following text within the scroll region. * following text within the scroll region.
*/ */
void void
gui_mch_insert_lines(row, num_lines) gui_mch_insert_lines(int row, int num_lines)
int row;
int num_lines;
{ {
if (gui.visibility == VisibilityFullyObscured) if (gui.visibility == VisibilityFullyObscured)
return; /* Can't see the window */ return; /* Can't see the window */
@ -3020,7 +2980,7 @@ gui_mch_insert_lines(row, num_lines)
* Update the region revealed by scrolling up/down. * Update the region revealed by scrolling up/down.
*/ */
static void static void
gui_x11_check_copy_area() gui_x11_check_copy_area(void)
{ {
XEvent event; XEvent event;
XGraphicsExposeEvent *gevent; XGraphicsExposeEvent *gevent;
@ -3052,29 +3012,26 @@ gui_x11_check_copy_area()
*/ */
void void
clip_mch_lose_selection(cbd) clip_mch_lose_selection(VimClipboard *cbd)
VimClipboard *cbd;
{ {
clip_x11_lose_selection(vimShell, cbd); clip_x11_lose_selection(vimShell, cbd);
} }
int int
clip_mch_own_selection(cbd) clip_mch_own_selection(VimClipboard *cbd)
VimClipboard *cbd;
{ {
return clip_x11_own_selection(vimShell, cbd); return clip_x11_own_selection(vimShell, cbd);
} }
void void
clip_mch_request_selection(cbd) clip_mch_request_selection(VimClipboard *cbd)
VimClipboard *cbd;
{ {
clip_x11_request_selection(vimShell, gui.dpy, cbd); clip_x11_request_selection(vimShell, gui.dpy, cbd);
} }
void void
clip_mch_set_selection(cbd) clip_mch_set_selection(
VimClipboard *cbd; VimClipboard *cbd)
{ {
clip_x11_set_selection(cbd); clip_x11_set_selection(cbd);
} }
@ -3088,9 +3045,7 @@ clip_mch_set_selection(cbd)
* Make a menu either grey or not grey. * Make a menu either grey or not grey.
*/ */
void void
gui_mch_menu_grey(menu, grey) gui_mch_menu_grey(vimmenu_T *menu, int grey)
vimmenu_T *menu;
int grey;
{ {
if (menu->id != (Widget)0) if (menu->id != (Widget)0)
{ {
@ -3110,9 +3065,7 @@ gui_mch_menu_grey(menu, grey)
* Make menu item hidden or not hidden * Make menu item hidden or not hidden
*/ */
void void
gui_mch_menu_hidden(menu, hidden) gui_mch_menu_hidden(vimmenu_T *menu, int hidden)
vimmenu_T *menu;
int hidden;
{ {
if (menu->id != (Widget)0) if (menu->id != (Widget)0)
{ {
@ -3127,16 +3080,16 @@ gui_mch_menu_hidden(menu, hidden)
* This is called after setting all the menus to grey/hidden or not. * This is called after setting all the menus to grey/hidden or not.
*/ */
void void
gui_mch_draw_menubar() gui_mch_draw_menubar(void)
{ {
/* Nothing to do in X */ /* Nothing to do in X */
} }
void void
gui_x11_menu_cb(w, client_data, call_data) gui_x11_menu_cb(
Widget w UNUSED; Widget w UNUSED,
XtPointer client_data; XtPointer client_data,
XtPointer call_data UNUSED; XtPointer call_data UNUSED)
{ {
gui_menu_cb((vimmenu_T *)client_data); gui_menu_cb((vimmenu_T *)client_data);
} }
@ -3150,11 +3103,11 @@ gui_x11_menu_cb(w, client_data, call_data)
* Should put up a requester! * Should put up a requester!
*/ */
static void static void
gui_x11_wm_protocol_handler(w, client_data, event, dum) gui_x11_wm_protocol_handler(
Widget w UNUSED; Widget w UNUSED,
XtPointer client_data UNUSED; XtPointer client_data UNUSED,
XEvent *event; XEvent *event,
Boolean *dum UNUSED; Boolean *dum UNUSED)
{ {
/* /*
* Only deal with Client messages. * Only deal with Client messages.
@ -3192,11 +3145,11 @@ gui_x11_wm_protocol_handler(w, client_data, event, dum)
* Function called when property changed. Check for incoming commands * Function called when property changed. Check for incoming commands
*/ */
static void static void
gui_x11_send_event_handler(w, client_data, event, dum) gui_x11_send_event_handler(
Widget w UNUSED; Widget w UNUSED,
XtPointer client_data UNUSED; XtPointer client_data UNUSED,
XEvent *event; XEvent *event,
Boolean *dum UNUSED; Boolean *dum UNUSED)
{ {
XPropertyEvent *e = (XPropertyEvent *) event; XPropertyEvent *e = (XPropertyEvent *) event;
@ -3228,8 +3181,7 @@ static long_u blink_offtime = 250;
static XtIntervalId blink_timer = (XtIntervalId)0; static XtIntervalId blink_timer = (XtIntervalId)0;
void void
gui_mch_set_blinking(waittime, on, off) gui_mch_set_blinking(long waittime, on, off)
long waittime, on, off;
{ {
blink_waittime = waittime; blink_waittime = waittime;
blink_ontime = on; blink_ontime = on;
@ -3240,7 +3192,7 @@ gui_mch_set_blinking(waittime, on, off)
* Stop the cursor blinking. Show the cursor if it wasn't shown. * Stop the cursor blinking. Show the cursor if it wasn't shown.
*/ */
void void
gui_mch_stop_blink() gui_mch_stop_blink(void)
{ {
if (blink_timer != (XtIntervalId)0) if (blink_timer != (XtIntervalId)0)
{ {
@ -3257,7 +3209,7 @@ gui_mch_stop_blink()
* waiting time and shows the cursor. * waiting time and shows the cursor.
*/ */
void void
gui_mch_start_blink() gui_mch_start_blink(void)
{ {
if (blink_timer != (XtIntervalId)0) if (blink_timer != (XtIntervalId)0)
XtRemoveTimeOut(blink_timer); XtRemoveTimeOut(blink_timer);
@ -3272,9 +3224,9 @@ gui_mch_start_blink()
} }
static void static void
gui_x11_blink_cb(timed_out, interval_id) gui_x11_blink_cb(
XtPointer timed_out UNUSED; XtPointer timed_out UNUSED,
XtIntervalId *interval_id UNUSED; XtIntervalId *interval_id UNUSED)
{ {
if (blink_state == BLINK_ON) if (blink_state == BLINK_ON)
{ {
@ -3296,8 +3248,7 @@ gui_x11_blink_cb(timed_out, interval_id)
* Return the RGB value of a pixel as a long. * Return the RGB value of a pixel as a long.
*/ */
long_u long_u
gui_mch_get_rgb(pixel) gui_mch_get_rgb(guicolor_T pixel)
guicolor_T pixel;
{ {
XColor xc; XColor xc;
Colormap colormap; Colormap colormap;
@ -3314,9 +3265,7 @@ gui_mch_get_rgb(pixel)
* Add the callback functions. * Add the callback functions.
*/ */
void void
gui_x11_callbacks(textArea, vimForm) gui_x11_callbacks(Widget textArea, Widget vimForm)
Widget textArea;
Widget vimForm;
{ {
XtAddEventHandler(textArea, VisibilityChangeMask, FALSE, XtAddEventHandler(textArea, VisibilityChangeMask, FALSE,
gui_x11_visibility_cb, (XtPointer)0); gui_x11_visibility_cb, (XtPointer)0);
@ -3379,9 +3328,7 @@ gui_mch_getmouse(int *x, int *y)
} }
void void
gui_mch_setmouse(x, y) gui_mch_setmouse(int x, int y)
int x;
int y;
{ {
if (gui.wid) if (gui.wid)
XWarpPointer(gui.dpy, (Window)0, gui.wid, 0, 0, 0, 0, x, y); XWarpPointer(gui.dpy, (Window)0, gui.wid, 0, 0, 0, 0, x, y);
@ -3389,7 +3336,7 @@ gui_mch_setmouse(x, y)
#if (defined(FEAT_GUI_MOTIF) && defined(FEAT_MENU)) || defined(PROTO) #if (defined(FEAT_GUI_MOTIF) && defined(FEAT_MENU)) || defined(PROTO)
XButtonPressedEvent * XButtonPressedEvent *
gui_x11_get_last_mouse_event() gui_x11_get_last_mouse_event(void)
{ {
return &last_mouse_event; return &last_mouse_event;
} }
@ -3402,10 +3349,7 @@ gui_x11_get_last_mouse_event()
# define SIGN_WIDTH (gui.char_width * 2) # define SIGN_WIDTH (gui.char_width * 2)
void void
gui_mch_drawsign(row, col, typenr) gui_mch_drawsign(int row, int col, int typenr)
int row;
int col;
int typenr;
{ {
XImage *sign; XImage *sign;
@ -3421,8 +3365,7 @@ gui_mch_drawsign(row, col, typenr)
} }
void * void *
gui_mch_register_sign(signfile) gui_mch_register_sign(char_u *signfile)
char_u *signfile;
{ {
XpmAttributes attrs; XpmAttributes attrs;
XImage *sign = NULL; XImage *sign = NULL;
@ -3462,8 +3405,7 @@ gui_mch_register_sign(signfile)
} }
void void
gui_mch_destroy_sign(sign) gui_mch_destroy_sign(void *sign)
void *sign;
{ {
XDestroyImage((XImage*)sign); XDestroyImage((XImage*)sign);
} }
@ -3480,8 +3422,8 @@ static int last_shape = 0;
* Use the blank mouse pointer or not. * Use the blank mouse pointer or not.
*/ */
void void
gui_mch_mousehide(hide) gui_mch_mousehide(
int hide; /* TRUE = use blank ptr, FALSE = use parent ptr */ int hide) /* TRUE = use blank ptr, FALSE = use parent ptr */
{ {
if (gui.pointer_hidden != hide) if (gui.pointer_hidden != hide)
{ {
@ -3523,8 +3465,7 @@ static int mshape_ids[] =
}; };
void void
mch_set_mouse_shape(shape) mch_set_mouse_shape(int shape)
int shape;
{ {
int id; int id;
@ -3560,8 +3501,7 @@ mch_set_mouse_shape(shape)
* passing a normal menu item here. Can't explain that, but better avoid it. * passing a normal menu item here. Can't explain that, but better avoid it.
*/ */
void void
gui_mch_menu_set_tip(menu) gui_mch_menu_set_tip(vimmenu_T *menu)
vimmenu_T *menu;
{ {
if (menu->id != NULL && menu->parent != NULL if (menu->id != NULL && menu->parent != NULL
&& menu_is_toolbar(menu->parent->name)) && menu_is_toolbar(menu->parent->name))

View File

@ -96,9 +96,7 @@ static short_u kind_table_for_3[] =
*/ */
static int static int
comfcon3(v, c) comfcon3(int v, int c)
int v;
int c;
{ {
if (v == 2 && c == 2) if (v == 2 && c == 2)
return 3; return 3;
@ -118,9 +116,7 @@ comfcon3(v, c)
*/ */
static int static int
comvow3(v, c) comvow3(int v, int c)
int v;
int c;
{ {
switch (v) switch (v)
{ {
@ -159,9 +155,7 @@ comvow3(v, c)
*/ */
static int static int
comcon3(k, c) comcon3(int k, int c)
int k;
int c;
{ {
switch (k) switch (k)
{ {
@ -217,8 +211,7 @@ comcon3(k, c)
/**********************************************************************/ /**********************************************************************/
static int static int
kind_table_for_2(c) kind_table_for_2(int c)
int c;
{ {
static char_u table[] = static char_u table[] =
{ {
@ -241,8 +234,7 @@ kind_table_for_2(c)
* : 0 (If it is not initial sound, return 0). * : 0 (If it is not initial sound, return 0).
*/ */
static int static int
fcon(c) fcon(int c)
int c;
{ {
static char_u table[] = static char_u table[] =
{ {
@ -266,8 +258,7 @@ fcon(c)
* : 0 (If it is not medial vowel, return 0). * : 0 (If it is not medial vowel, return 0).
*/ */
static int static int
vow(c) vow(int c)
int c;
{ {
static char_u table[] = static char_u table[] =
{ {
@ -289,8 +280,7 @@ vow(c)
* : 0 (If not prop, return 0) * : 0 (If not prop, return 0)
*/ */
static int static int
lcon(c) lcon(int c)
int c;
{ {
static char_u table[] = static char_u table[] =
{ {
@ -312,9 +302,7 @@ lcon(c)
*/ */
static int static int
comcon2(k, c) comcon2(int k, int c)
int k;
int c;
{ {
switch (k) switch (k)
{ {
@ -369,9 +357,7 @@ comcon2(k, c)
*/ */
static int static int
comvow2(v, c) comvow2(int v, int c)
int v;
int c;
{ {
switch (v) switch (v)
{ {
@ -408,27 +394,26 @@ comvow2(v, c)
} }
int int
hangul_input_state_get() hangul_input_state_get(void)
{ {
return hangul_input_state; return hangul_input_state;
} }
void void
hangul_input_state_set(state) hangul_input_state_set(int state)
int state;
{ {
hangul_input_state = state; hangul_input_state = state;
hangul_input_clear(); hangul_input_clear();
} }
int int
im_get_status() im_get_status(void)
{ {
return hangul_input_state_get(); return hangul_input_state_get();
} }
void void
hangul_input_state_toggle() hangul_input_state_toggle(void)
{ {
if (hangul_input_state_get()) if (hangul_input_state_get())
{ {
@ -452,9 +437,7 @@ hangul_input_state_toggle()
} }
static int static int
hangul_automata2(buf, c) hangul_automata2(char_u *buf, int_u *c)
char_u *buf;
int_u *c;
{ {
int t,t2; int t,t2;
@ -614,9 +597,7 @@ hangul_automata2(buf, c)
} }
static int static int
hangul_automata3(buf, c) hangul_automata3(char_u *buf, int_u *c)
char_u *buf;
int_u *c;
{ {
int t, t2; int t, t2;
@ -725,7 +706,7 @@ hangul_automata3(buf, c)
} }
void void
hangul_keyboard_set() hangul_keyboard_set(void)
{ {
int keyboard; int keyboard;
char *s; char *s;
@ -746,9 +727,7 @@ hangul_keyboard_set()
} }
int int
hangul_input_process(s, len) hangul_input_process(char_u *s, int len)
char_u *s;
int len;
{ {
int n; int n;
unsigned int c; unsigned int c;
@ -831,7 +810,7 @@ hangul_input_process(s, len)
} }
void void
hangul_input_clear() hangul_input_clear(void)
{ {
sp = 0; sp = 0;
f = F_NULL; f = F_NULL;
@ -1503,11 +1482,11 @@ static const char_u johab_lcon_to_wan[] =
}; };
static void static void
convert_ks_to_3(src, fp, mp, lp) convert_ks_to_3(
const char_u *src; const char_u *src,
int *fp; int *fp,
int *mp; int *mp,
int *lp; int *lp)
{ {
int h = *src; int h = *src;
int low = *(src + 1); int low = *(src + 1);
@ -1539,11 +1518,11 @@ convert_ks_to_3(src, fp, mp, lp)
} }
static int static int
convert_3_to_ks(fv, mv, lv, des) convert_3_to_ks(
int fv; int fv,
int mv; int mv,
int lv; int lv,
char_u *des; char_u *des)
{ {
char_u key[3]; char_u key[3];
register int hi, lo, mi = 0, result, found; register int hi, lo, mi = 0, result, found;
@ -1621,9 +1600,7 @@ convert_3_to_ks(fv, mv, lv, des)
} }
char_u * char_u *
hangul_string_convert(buf, p_len) hangul_string_convert(char_u *buf, int *p_len)
char_u *buf;
int *p_len;
{ {
char_u *tmpbuf = NULL; char_u *tmpbuf = NULL;
vimconv_T vc; vimconv_T vc;
@ -1642,8 +1619,7 @@ hangul_string_convert(buf, p_len)
} }
char_u * char_u *
hangul_composing_buffer_get(p_len) hangul_composing_buffer_get(int *p_len)
int *p_len;
{ {
char_u *tmpbuf = NULL; char_u *tmpbuf = NULL;

View File

@ -157,7 +157,7 @@ static void prt_get_attr(int hl_id, prt_text_attr_T* pattr, int modec);
* Returns an error message or NULL; * Returns an error message or NULL;
*/ */
char_u * char_u *
parse_printoptions() parse_printoptions(void)
{ {
return parse_list_options(p_popt, printer_opts, OPT_PRINT_NUM_OPTIONS); return parse_list_options(p_popt, printer_opts, OPT_PRINT_NUM_OPTIONS);
} }
@ -168,7 +168,7 @@ parse_printoptions()
* Returns an error message or NULL; * Returns an error message or NULL;
*/ */
char_u * char_u *
parse_printmbfont() parse_printmbfont(void)
{ {
return parse_list_options(p_pmfn, mbfont_opts, OPT_MBFONT_NUM_OPTIONS); return parse_list_options(p_pmfn, mbfont_opts, OPT_MBFONT_NUM_OPTIONS);
} }
@ -184,10 +184,10 @@ parse_printmbfont()
* Only used for the printer at the moment... * Only used for the printer at the moment...
*/ */
static char_u * static char_u *
parse_list_options(option_str, table, table_size) parse_list_options(
char_u *option_str; char_u *option_str,
option_table_T *table; option_table_T *table,
int table_size; int table_size)
{ {
char_u *stringp; char_u *stringp;
char_u *colonp; char_u *colonp;
@ -250,8 +250,7 @@ parse_list_options(option_str, table, table_size)
* up well on white paper, so reduce their brightness. * up well on white paper, so reduce their brightness.
*/ */
static long_u static long_u
darken_rgb(rgb) darken_rgb(long_u rgb)
long_u rgb;
{ {
return ((rgb >> 17) << 16) return ((rgb >> 17) << 16)
+ (((rgb & 0xff00) >> 9) << 8) + (((rgb & 0xff00) >> 9) << 8)
@ -259,8 +258,7 @@ darken_rgb(rgb)
} }
static long_u static long_u
prt_get_term_color(colorindex) prt_get_term_color(int colorindex)
int colorindex;
{ {
/* TODO: Should check for xterm with 88 or 256 colors. */ /* TODO: Should check for xterm with 88 or 256 colors. */
if (t_colors > 8) if (t_colors > 8)
@ -269,10 +267,10 @@ prt_get_term_color(colorindex)
} }
static void static void
prt_get_attr(hl_id, pattr, modec) prt_get_attr(
int hl_id; int hl_id,
prt_text_attr_T *pattr; prt_text_attr_T *pattr,
int modec; int modec)
{ {
int colorindex; int colorindex;
long_u fg_color; long_u fg_color;
@ -321,8 +319,7 @@ prt_get_attr(hl_id, pattr, modec)
#endif /* FEAT_SYN_HL */ #endif /* FEAT_SYN_HL */
static void static void
prt_set_fg(fg) prt_set_fg(long_u fg)
long_u fg;
{ {
if (fg != curr_fg) if (fg != curr_fg)
{ {
@ -332,8 +329,7 @@ prt_set_fg(fg)
} }
static void static void
prt_set_bg(bg) prt_set_bg(long_u bg)
long_u bg;
{ {
if (bg != curr_bg) if (bg != curr_bg)
{ {
@ -343,10 +339,7 @@ prt_set_bg(bg)
} }
static void static void
prt_set_font(bold, italic, underline) prt_set_font(int bold, int italic, int underline)
int bold;
int italic;
int underline;
{ {
if (curr_bold != bold if (curr_bold != bold
|| curr_italic != italic || curr_italic != italic
@ -363,10 +356,10 @@ prt_set_font(bold, italic, underline)
* Print the line number in the left margin. * Print the line number in the left margin.
*/ */
static void static void
prt_line_number(psettings, page_line, lnum) prt_line_number(
prt_settings_T *psettings; prt_settings_T *psettings,
int page_line; int page_line,
linenr_T lnum; linenr_T lnum)
{ {
int i; int i;
char_u tbuf[20]; char_u tbuf[20];
@ -400,7 +393,7 @@ prt_line_number(psettings, page_line, lnum)
* Get the currently effective header height. * Get the currently effective header height.
*/ */
int int
prt_header_height() prt_header_height(void)
{ {
if (printer_opts[OPT_PRINT_HEADERHEIGHT].present) if (printer_opts[OPT_PRINT_HEADERHEIGHT].present)
return printer_opts[OPT_PRINT_HEADERHEIGHT].number; return printer_opts[OPT_PRINT_HEADERHEIGHT].number;
@ -411,7 +404,7 @@ prt_header_height()
* Return TRUE if using a line number for printing. * Return TRUE if using a line number for printing.
*/ */
int int
prt_use_number() prt_use_number(void)
{ {
return (printer_opts[OPT_PRINT_NUMBER].present return (printer_opts[OPT_PRINT_NUMBER].present
&& TOLOWER_ASC(printer_opts[OPT_PRINT_NUMBER].string[0]) == 'y'); && TOLOWER_ASC(printer_opts[OPT_PRINT_NUMBER].string[0]) == 'y');
@ -422,8 +415,7 @@ prt_use_number()
* Returns PRT_UNIT_NONE if not recognized. * Returns PRT_UNIT_NONE if not recognized.
*/ */
int int
prt_get_unit(idx) prt_get_unit(int idx)
int idx;
{ {
int u = PRT_UNIT_NONE; int u = PRT_UNIT_NONE;
int i; int i;
@ -443,10 +435,10 @@ prt_get_unit(idx)
* Print the page header. * Print the page header.
*/ */
static void static void
prt_header(psettings, pagenum, lnum) prt_header(
prt_settings_T *psettings; prt_settings_T *psettings,
int pagenum; int pagenum,
linenr_T lnum UNUSED; linenr_T lnum UNUSED)
{ {
int width = psettings->chars_per_line; int width = psettings->chars_per_line;
int page_line; int page_line;
@ -549,8 +541,7 @@ prt_header(psettings, pagenum, lnum)
* Display a print status message. * Display a print status message.
*/ */
static void static void
prt_message(s) prt_message(char_u *s)
char_u *s;
{ {
screen_fill((int)Rows - 1, (int)Rows, 0, (int)Columns, ' ', ' ', 0); screen_fill((int)Rows - 1, (int)Rows, 0, (int)Columns, ' ', ' ', 0);
screen_puts(s, (int)Rows - 1, 0, hl_attr(HLF_R)); screen_puts(s, (int)Rows - 1, 0, hl_attr(HLF_R));
@ -558,8 +549,7 @@ prt_message(s)
} }
void void
ex_hardcopy(eap) ex_hardcopy(exarg_T *eap)
exarg_T *eap;
{ {
linenr_T lnum; linenr_T lnum;
int collated_copies, uncollated_copies; int collated_copies, uncollated_copies;
@ -825,10 +815,10 @@ print_fail_no_begin:
* Return the next column to print, or zero if the line is finished. * Return the next column to print, or zero if the line is finished.
*/ */
static colnr_T static colnr_T
hardcopy_line(psettings, page_line, ppos) hardcopy_line(
prt_settings_T *psettings; prt_settings_T *psettings,
int page_line; int page_line,
prt_pos_T *ppos; prt_pos_T *ppos)
{ {
colnr_T col; colnr_T col;
char_u *line; char_u *line;
@ -1458,9 +1448,7 @@ static char_u prt_hexchar[] = "0123456789abcdef";
# endif # endif
static void static void
prt_write_file_raw_len(buffer, bytes) prt_write_file_raw_len(char_u *buffer, int bytes)
char_u *buffer;
int bytes;
{ {
if (!prt_file_error if (!prt_file_error
&& fwrite(buffer, sizeof(char_u), bytes, prt_ps_fd) && fwrite(buffer, sizeof(char_u), bytes, prt_ps_fd)
@ -1472,16 +1460,13 @@ prt_write_file_raw_len(buffer, bytes)
} }
static void static void
prt_write_file(buffer) prt_write_file(char_u *buffer)
char_u *buffer;
{ {
prt_write_file_len(buffer, (int)STRLEN(buffer)); prt_write_file_len(buffer, (int)STRLEN(buffer));
} }
static void static void
prt_write_file_len(buffer, bytes) prt_write_file_len(char_u *buffer, int bytes)
char_u *buffer;
int bytes;
{ {
#ifdef EBCDIC #ifdef EBCDIC
ebcdic2ascii(buffer, bytes); ebcdic2ascii(buffer, bytes);
@ -1493,8 +1478,7 @@ prt_write_file_len(buffer, bytes)
* Write a string. * Write a string.
*/ */
static void static void
prt_write_string(s) prt_write_string(char *s)
char *s;
{ {
vim_snprintf((char *)prt_line_buffer, sizeof(prt_line_buffer), "%s", s); vim_snprintf((char *)prt_line_buffer, sizeof(prt_line_buffer), "%s", s);
prt_write_file(prt_line_buffer); prt_write_file(prt_line_buffer);
@ -1504,8 +1488,7 @@ prt_write_string(s)
* Write an int and a space. * Write an int and a space.
*/ */
static void static void
prt_write_int(i) prt_write_int(int i)
int i;
{ {
sprintf((char *)prt_line_buffer, "%d ", i); sprintf((char *)prt_line_buffer, "%d ", i);
prt_write_file(prt_line_buffer); prt_write_file(prt_line_buffer);
@ -1515,8 +1498,7 @@ prt_write_int(i)
* Write a boolean and a space. * Write a boolean and a space.
*/ */
static void static void
prt_write_boolean(b) prt_write_boolean(int b)
int b;
{ {
sprintf((char *)prt_line_buffer, "%s ", (b ? "T" : "F")); sprintf((char *)prt_line_buffer, "%s ", (b ? "T" : "F"));
prt_write_file(prt_line_buffer); prt_write_file(prt_line_buffer);
@ -1526,11 +1508,11 @@ prt_write_boolean(b)
* Write PostScript to re-encode and define the font. * Write PostScript to re-encode and define the font.
*/ */
static void static void
prt_def_font(new_name, encoding, height, font) prt_def_font(
char *new_name; char *new_name,
char *encoding; char *encoding,
int height; int height,
char *font; char *font)
{ {
vim_snprintf((char *)prt_line_buffer, sizeof(prt_line_buffer), vim_snprintf((char *)prt_line_buffer, sizeof(prt_line_buffer),
"/_%s /VIM-%s /%s ref\n", new_name, encoding, font); "/_%s /VIM-%s /%s ref\n", new_name, encoding, font);
@ -1551,10 +1533,7 @@ prt_def_font(new_name, encoding, height, font)
* Write a line to define the CID font. * Write a line to define the CID font.
*/ */
static void static void
prt_def_cidfont(new_name, height, cidfont) prt_def_cidfont(char *new_name, int height, char *cidfont)
char *new_name;
int height;
char *cidfont;
{ {
vim_snprintf((char *)prt_line_buffer, sizeof(prt_line_buffer), vim_snprintf((char *)prt_line_buffer, sizeof(prt_line_buffer),
"/_%s /%s[/%s] vim_composefont\n", new_name, prt_cmap, cidfont); "/_%s /%s[/%s] vim_composefont\n", new_name, prt_cmap, cidfont);
@ -1568,9 +1547,7 @@ prt_def_cidfont(new_name, height, cidfont)
* Write a line to define a duplicate of a CID font * Write a line to define a duplicate of a CID font
*/ */
static void static void
prt_dup_cidfont(original_name, new_name) prt_dup_cidfont(char *original_name, char *new_name)
char *original_name;
char *new_name;
{ {
vim_snprintf((char *)prt_line_buffer, sizeof(prt_line_buffer), vim_snprintf((char *)prt_line_buffer, sizeof(prt_line_buffer),
"/%s %s d\n", new_name, original_name); "/%s %s d\n", new_name, original_name);
@ -1584,11 +1561,11 @@ prt_dup_cidfont(original_name, new_name)
* is also rounded based on the precision + 1'th fractional digit. * is also rounded based on the precision + 1'th fractional digit.
*/ */
static void static void
prt_real_bits(real, precision, pinteger, pfraction) prt_real_bits(
double real; double real,
int precision; int precision,
int *pinteger; int *pinteger,
int *pfraction; int *pfraction)
{ {
int i; int i;
int integer; int integer;
@ -1611,9 +1588,7 @@ prt_real_bits(real, precision, pinteger, pfraction)
* what decimal point character to use, but PS always requires a '.'. * what decimal point character to use, but PS always requires a '.'.
*/ */
static void static void
prt_write_real(val, prec) prt_write_real(double val, int prec)
double val;
int prec;
{ {
int integer; int integer;
int fraction; int fraction;
@ -1643,10 +1618,7 @@ prt_write_real(val, prec)
* Write a line to define a numeric variable. * Write a line to define a numeric variable.
*/ */
static void static void
prt_def_var(name, value, prec) prt_def_var(char *name, double value, int prec)
char *name;
double value;
int prec;
{ {
vim_snprintf((char *)prt_line_buffer, sizeof(prt_line_buffer), vim_snprintf((char *)prt_line_buffer, sizeof(prt_line_buffer),
"/%s ", name); "/%s ", name);
@ -1660,7 +1632,7 @@ prt_def_var(name, value, prec)
#define PRT_PS_FONT_TO_USER(scale, size) ((size) * ((scale)/1000.0)) #define PRT_PS_FONT_TO_USER(scale, size) ((size) * ((scale)/1000.0))
static void static void
prt_flush_buffer() prt_flush_buffer(void)
{ {
if (prt_ps_buffer.ga_len > 0) if (prt_ps_buffer.ga_len > 0)
{ {
@ -1742,9 +1714,7 @@ prt_flush_buffer()
static void static void
prt_resource_name(filename, cookie) prt_resource_name(char_u *filename, void *cookie)
char_u *filename;
void *cookie;
{ {
char_u *resource_filename = cookie; char_u *resource_filename = cookie;
@ -1755,9 +1725,7 @@ prt_resource_name(filename, cookie)
} }
static int static int
prt_find_resource(name, resource) prt_find_resource(char *name, struct prt_ps_resource_S *resource)
char *name;
struct prt_ps_resource_S *resource;
{ {
char_u *buffer; char_u *buffer;
int retval; int retval;
@ -1798,7 +1766,7 @@ struct prt_resfile_buffer_S
static struct prt_resfile_buffer_S prt_resfile; static struct prt_resfile_buffer_S prt_resfile;
static int static int
prt_resfile_next_line() prt_resfile_next_line(void)
{ {
int idx; int idx;
@ -1824,10 +1792,7 @@ prt_resfile_next_line()
} }
static int static int
prt_resfile_strncmp(offset, string, len) prt_resfile_strncmp(int offset, char *string, int len)
int offset;
char *string;
int len;
{ {
/* Force not equal if string is longer than remainder of line */ /* Force not equal if string is longer than remainder of line */
if (len > (prt_resfile.line_end - (prt_resfile.line_start + offset))) if (len > (prt_resfile.line_end - (prt_resfile.line_start + offset)))
@ -1838,8 +1803,7 @@ prt_resfile_strncmp(offset, string, len)
} }
static int static int
prt_resfile_skip_nonws(offset) prt_resfile_skip_nonws(int offset)
int offset;
{ {
int idx; int idx;
@ -1854,8 +1818,7 @@ prt_resfile_skip_nonws(offset)
} }
static int static int
prt_resfile_skip_ws(offset) prt_resfile_skip_ws(int offset)
int offset;
{ {
int idx; int idx;
@ -1872,8 +1835,7 @@ prt_resfile_skip_ws(offset)
/* prt_next_dsc() - returns detail on next DSC comment line found. Returns true /* prt_next_dsc() - returns detail on next DSC comment line found. Returns true
* if a DSC comment is found, else false */ * if a DSC comment is found, else false */
static int static int
prt_next_dsc(p_dsc_line) prt_next_dsc(struct prt_dsc_line_S *p_dsc_line)
struct prt_dsc_line_S *p_dsc_line;
{ {
int comment; int comment;
int offset; int offset;
@ -1922,8 +1884,7 @@ prt_next_dsc(p_dsc_line)
* PS resource file so the file details can be added to the DSC header comments. * PS resource file so the file details can be added to the DSC header comments.
*/ */
static int static int
prt_open_resource(resource) prt_open_resource(struct prt_ps_resource_S *resource)
struct prt_ps_resource_S *resource;
{ {
int offset; int offset;
int seen_all; int seen_all;
@ -2048,9 +2009,7 @@ prt_open_resource(resource)
} }
static int static int
prt_check_resource(resource, version) prt_check_resource(struct prt_ps_resource_S *resource, char_u *version)
struct prt_ps_resource_S *resource;
char_u *version;
{ {
/* Version number m.n should match, the revision number does not matter */ /* Version number m.n should match, the revision number does not matter */
if (STRNCMP(resource->version, version, STRLEN(version))) if (STRNCMP(resource->version, version, STRLEN(version)))
@ -2065,14 +2024,13 @@ prt_check_resource(resource, version)
} }
static void static void
prt_dsc_start() prt_dsc_start(void)
{ {
prt_write_string("%!PS-Adobe-3.0\n"); prt_write_string("%!PS-Adobe-3.0\n");
} }
static void static void
prt_dsc_noarg(comment) prt_dsc_noarg(char *comment)
char *comment;
{ {
vim_snprintf((char *)prt_line_buffer, sizeof(prt_line_buffer), vim_snprintf((char *)prt_line_buffer, sizeof(prt_line_buffer),
"%%%%%s\n", comment); "%%%%%s\n", comment);
@ -2080,9 +2038,7 @@ prt_dsc_noarg(comment)
} }
static void static void
prt_dsc_textline(comment, text) prt_dsc_textline(char *comment, char *text)
char *comment;
char *text;
{ {
vim_snprintf((char *)prt_line_buffer, sizeof(prt_line_buffer), vim_snprintf((char *)prt_line_buffer, sizeof(prt_line_buffer),
"%%%%%s: %s\n", comment, text); "%%%%%s: %s\n", comment, text);
@ -2090,9 +2046,7 @@ prt_dsc_textline(comment, text)
} }
static void static void
prt_dsc_text(comment, text) prt_dsc_text(char *comment, char *text)
char *comment;
char *text;
{ {
/* TODO - should scan 'text' for any chars needing escaping! */ /* TODO - should scan 'text' for any chars needing escaping! */
vim_snprintf((char *)prt_line_buffer, sizeof(prt_line_buffer), vim_snprintf((char *)prt_line_buffer, sizeof(prt_line_buffer),
@ -2103,10 +2057,7 @@ prt_dsc_text(comment, text)
#define prt_dsc_atend(c) prt_dsc_text((c), "atend") #define prt_dsc_atend(c) prt_dsc_text((c), "atend")
static void static void
prt_dsc_ints(comment, count, ints) prt_dsc_ints(char *comment, int count, int *ints)
char *comment;
int count;
int *ints;
{ {
int i; int i;
@ -2124,10 +2075,10 @@ prt_dsc_ints(comment, count, ints)
} }
static void static void
prt_dsc_resources(comment, type, string) prt_dsc_resources(
char *comment; /* if NULL add to previous */ char *comment, /* if NULL add to previous */
char *type; char *type,
char *string; char *string)
{ {
if (comment != NULL) if (comment != NULL)
vim_snprintf((char *)prt_line_buffer, sizeof(prt_line_buffer), vim_snprintf((char *)prt_line_buffer, sizeof(prt_line_buffer),
@ -2143,9 +2094,7 @@ prt_dsc_resources(comment, type, string)
} }
static void static void
prt_dsc_font_resource(resource, ps_font) prt_dsc_font_resource(char *resource, struct prt_ps_font_S *ps_font)
char *resource;
struct prt_ps_font_S *ps_font;
{ {
int i; int i;
@ -2157,12 +2106,12 @@ prt_dsc_font_resource(resource, ps_font)
} }
static void static void
prt_dsc_requirements(duplex, tumble, collate, color, num_copies) prt_dsc_requirements(
int duplex; int duplex,
int tumble; int tumble,
int collate; int collate,
int color; int color,
int num_copies; int num_copies)
{ {
/* Only output the comment if we need to. /* Only output the comment if we need to.
* Note: tumble is ignored if we are not duplexing * Note: tumble is ignored if we are not duplexing
@ -2195,13 +2144,13 @@ prt_dsc_requirements(duplex, tumble, collate, color, num_copies)
} }
static void static void
prt_dsc_docmedia(paper_name, width, height, weight, colour, type) prt_dsc_docmedia(
char *paper_name; char *paper_name,
double width; double width,
double height; double height,
double weight; double weight,
char *colour; char *colour,
char *type; char *type)
{ {
vim_snprintf((char *)prt_line_buffer, sizeof(prt_line_buffer), vim_snprintf((char *)prt_line_buffer, sizeof(prt_line_buffer),
"%%%%DocumentMedia: %s ", paper_name); "%%%%DocumentMedia: %s ", paper_name);
@ -2222,7 +2171,7 @@ prt_dsc_docmedia(paper_name, width, height, weight, colour, type)
} }
void void
mch_print_cleanup() mch_print_cleanup(void)
{ {
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
if (prt_out_mbyte) if (prt_out_mbyte)
@ -2261,10 +2210,7 @@ mch_print_cleanup()
} }
static float static float
to_device_units(idx, physsize, def_number) to_device_units(int idx, double physsize, int def_number)
int idx;
double physsize;
int def_number;
{ {
float ret; float ret;
int u; int u;
@ -2303,13 +2249,13 @@ to_device_units(idx, physsize, def_number)
* Calculate margins for given width and height from printoptions settings. * Calculate margins for given width and height from printoptions settings.
*/ */
static void static void
prt_page_margins(width, height, left, right, top, bottom) prt_page_margins(
double width; double width,
double height; double height,
double *left; double *left,
double *right; double *right,
double *top; double *top,
double *bottom; double *bottom)
{ {
*left = to_device_units(OPT_PRINT_LEFT, width, 10); *left = to_device_units(OPT_PRINT_LEFT, width, 10);
*right = width - to_device_units(OPT_PRINT_RIGHT, width, 5); *right = width - to_device_units(OPT_PRINT_RIGHT, width, 5);
@ -2318,8 +2264,7 @@ prt_page_margins(width, height, left, right, top, bottom)
} }
static void static void
prt_font_metrics(font_scale) prt_font_metrics(int font_scale)
int font_scale;
{ {
prt_line_height = (float)font_scale; prt_line_height = (float)font_scale;
prt_char_width = (float)PRT_PS_FONT_TO_USER(font_scale, prt_ps_font->wx); prt_char_width = (float)PRT_PS_FONT_TO_USER(font_scale, prt_ps_font->wx);
@ -2327,7 +2272,7 @@ prt_font_metrics(font_scale)
static int static int
prt_get_cpl() prt_get_cpl(void)
{ {
if (prt_use_number()) if (prt_use_number())
{ {
@ -2349,10 +2294,7 @@ prt_get_cpl()
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
static int static int
prt_build_cid_fontname(font, name, name_len) prt_build_cid_fontname(int font, char_u *name, int name_len)
int font;
char_u *name;
int name_len;
{ {
char *fontname; char *fontname;
@ -2370,7 +2312,7 @@ prt_build_cid_fontname(font, name, name_len)
* Get number of lines of text that fit on a page (excluding the header). * Get number of lines of text that fit on a page (excluding the header).
*/ */
static int static int
prt_get_lpp() prt_get_lpp(void)
{ {
int lpp; int lpp;
@ -2402,10 +2344,10 @@ prt_get_lpp()
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
static int static int
prt_match_encoding(p_encoding, p_cmap, pp_mbenc) prt_match_encoding(
char *p_encoding; char *p_encoding,
struct prt_ps_mbfont_S *p_cmap; struct prt_ps_mbfont_S *p_cmap,
struct prt_ps_encoding_S **pp_mbenc; struct prt_ps_encoding_S **pp_mbenc)
{ {
int mbenc; int mbenc;
int enc_len; int enc_len;
@ -2428,10 +2370,10 @@ prt_match_encoding(p_encoding, p_cmap, pp_mbenc)
} }
static int static int
prt_match_charset(p_charset, p_cmap, pp_mbchar) prt_match_charset(
char *p_charset; char *p_charset,
struct prt_ps_mbfont_S *p_cmap; struct prt_ps_mbfont_S *p_cmap,
struct prt_ps_charset_S **pp_mbchar; struct prt_ps_charset_S **pp_mbchar)
{ {
int mbchar; int mbchar;
int char_len; int char_len;
@ -2456,10 +2398,10 @@ prt_match_charset(p_charset, p_cmap, pp_mbchar)
#endif #endif
int int
mch_print_init(psettings, jobname, forceit) mch_print_init(
prt_settings_T *psettings; prt_settings_T *psettings,
char_u *jobname; char_u *jobname,
int forceit UNUSED; int forceit UNUSED)
{ {
int i; int i;
char *paper_name; char *paper_name;
@ -2805,8 +2747,7 @@ mch_print_init(psettings, jobname, forceit)
} }
static int static int
prt_add_resource(resource) prt_add_resource(struct prt_ps_resource_S *resource)
struct prt_ps_resource_S *resource;
{ {
FILE* fd_resource; FILE* fd_resource;
char_u resource_buffer[512]; char_u resource_buffer[512];
@ -2853,8 +2794,7 @@ prt_add_resource(resource)
} }
int int
mch_print_begin(psettings) mch_print_begin(prt_settings_T *psettings)
prt_settings_T *psettings;
{ {
time_t now; time_t now;
int bbox[4]; int bbox[4];
@ -3295,8 +3235,7 @@ theend:
} }
void void
mch_print_end(psettings) mch_print_end(prt_settings_T *psettings)
prt_settings_T *psettings;
{ {
prt_dsc_noarg("Trailer"); prt_dsc_noarg("Trailer");
@ -3333,7 +3272,7 @@ mch_print_end(psettings)
} }
int int
mch_print_end_page() mch_print_end_page(void)
{ {
prt_flush_buffer(); prt_flush_buffer();
@ -3345,8 +3284,7 @@ mch_print_end_page()
} }
int int
mch_print_begin_page(str) mch_print_begin_page(char_u *str UNUSED)
char_u *str UNUSED;
{ {
int page_num[2]; int page_num[2];
@ -3387,7 +3325,7 @@ mch_print_begin_page(str)
} }
int int
mch_print_blank_page() mch_print_blank_page(void)
{ {
return (mch_print_begin_page(NULL) ? (mch_print_end_page()) : FALSE); return (mch_print_begin_page(NULL) ? (mch_print_end_page()) : FALSE);
} }
@ -3396,9 +3334,7 @@ static float prt_pos_x = 0;
static float prt_pos_y = 0; static float prt_pos_y = 0;
void void
mch_print_start_line(margin, page_line) mch_print_start_line(int margin, int page_line)
int margin;
int page_line;
{ {
prt_pos_x = prt_left_margin; prt_pos_x = prt_left_margin;
if (margin) if (margin)
@ -3415,9 +3351,7 @@ mch_print_start_line(margin, page_line)
} }
int int
mch_print_text_out(p, len) mch_print_text_out(char_u *p, int len UNUSED)
char_u *p;
int len UNUSED;
{ {
int need_break; int need_break;
char_u ch; char_u ch;
@ -3638,10 +3572,7 @@ mch_print_text_out(p, len)
} }
void void
mch_print_set_font(iBold, iItalic, iUnderline) mch_print_set_font(int iBold, int iItalic, int iUnderline)
int iBold;
int iItalic;
int iUnderline;
{ {
int font = 0; int font = 0;
@ -3665,8 +3596,7 @@ mch_print_set_font(iBold, iItalic, iUnderline)
} }
void void
mch_print_set_bg(bgcol) mch_print_set_bg(long_u bgcol)
long_u bgcol;
{ {
prt_bgcol = (int)bgcol; prt_bgcol = (int)bgcol;
prt_attribute_change = TRUE; prt_attribute_change = TRUE;
@ -3674,8 +3604,7 @@ mch_print_set_bg(bgcol)
} }
void void
mch_print_set_fg(fgcol) mch_print_set_fg(long_u fgcol)
long_u fgcol;
{ {
if (fgcol != (long_u)prt_fgcol) if (fgcol != (long_u)prt_fgcol)
{ {

View File

@ -49,7 +49,7 @@ static int hash_may_resize(hashtab_T *ht, int minitems);
* Returns NULL when out of memory. * Returns NULL when out of memory.
*/ */
hashtab_T * hashtab_T *
hash_create() hash_create(void)
{ {
hashtab_T *ht; hashtab_T *ht;
@ -64,8 +64,7 @@ hash_create()
* Initialize an empty hash table. * Initialize an empty hash table.
*/ */
void void
hash_init(ht) hash_init(hashtab_T *ht)
hashtab_T *ht;
{ {
/* This zeroes all "ht_" entries and all the "hi_key" in "ht_smallarray". */ /* This zeroes all "ht_" entries and all the "hi_key" in "ht_smallarray". */
vim_memset(ht, 0, sizeof(hashtab_T)); vim_memset(ht, 0, sizeof(hashtab_T));
@ -78,8 +77,7 @@ hash_init(ht)
* If "ht" is not freed then you should call hash_init() next! * If "ht" is not freed then you should call hash_init() next!
*/ */
void void
hash_clear(ht) hash_clear(hashtab_T *ht)
hashtab_T *ht;
{ {
if (ht->ht_array != ht->ht_smallarray) if (ht->ht_array != ht->ht_smallarray)
vim_free(ht->ht_array); vim_free(ht->ht_array);
@ -91,9 +89,7 @@ hash_clear(ht)
* memory to the location of the key (it's always positive). * memory to the location of the key (it's always positive).
*/ */
void void
hash_clear_all(ht, off) hash_clear_all(hashtab_T *ht, int off)
hashtab_T *ht;
int off;
{ {
long todo; long todo;
hashitem_T *hi; hashitem_T *hi;
@ -119,9 +115,7 @@ hash_clear_all(ht, off)
* (adding, setting or removing an item)! * (adding, setting or removing an item)!
*/ */
hashitem_T * hashitem_T *
hash_find(ht, key) hash_find(hashtab_T *ht, char_u *key)
hashtab_T *ht;
char_u *key;
{ {
return hash_lookup(ht, key, hash_hash(key)); return hash_lookup(ht, key, hash_hash(key));
} }
@ -130,10 +124,7 @@ hash_find(ht, key)
* Like hash_find(), but caller computes "hash". * Like hash_find(), but caller computes "hash".
*/ */
hashitem_T * hashitem_T *
hash_lookup(ht, key, hash) hash_lookup(hashtab_T *ht, char_u *key, hash_T hash)
hashtab_T *ht;
char_u *key;
hash_T hash;
{ {
hash_T perturb; hash_T perturb;
hashitem_T *freeitem; hashitem_T *freeitem;
@ -195,7 +186,7 @@ hash_lookup(ht, key, hash)
* Called when exiting. * Called when exiting.
*/ */
void void
hash_debug_results() hash_debug_results(void)
{ {
#ifdef HT_DEBUG #ifdef HT_DEBUG
fprintf(stderr, "\r\n\r\n\r\n\r\n"); fprintf(stderr, "\r\n\r\n\r\n\r\n");
@ -211,9 +202,7 @@ hash_debug_results()
* Returns FAIL when out of memory or the key is already present. * Returns FAIL when out of memory or the key is already present.
*/ */
int int
hash_add(ht, key) hash_add(hashtab_T *ht, char_u *key)
hashtab_T *ht;
char_u *key;
{ {
hash_T hash = hash_hash(key); hash_T hash = hash_hash(key);
hashitem_T *hi; hashitem_T *hi;
@ -234,11 +223,11 @@ hash_add(ht, key)
* Returns OK or FAIL (out of memory). * Returns OK or FAIL (out of memory).
*/ */
int int
hash_add_item(ht, hi, key, hash) hash_add_item(
hashtab_T *ht; hashtab_T *ht,
hashitem_T *hi; hashitem_T *hi,
char_u *key; char_u *key,
hash_T hash; hash_T hash)
{ {
/* If resizing failed before and it fails again we can't add an item. */ /* If resizing failed before and it fails again we can't add an item. */
if (ht->ht_error && hash_may_resize(ht, 0) == FAIL) if (ht->ht_error && hash_may_resize(ht, 0) == FAIL)
@ -265,9 +254,7 @@ hash_add_item(ht, hi, key, hash)
* "hi" is invalid after this! * "hi" is invalid after this!
*/ */
void void
hash_set(hi, key) hash_set(hashitem_T *hi, char_u *key)
hashitem_T *hi;
char_u *key;
{ {
hi->hi_key = key; hi->hi_key = key;
} }
@ -279,9 +266,7 @@ hash_set(hi, key)
* The caller must take care of freeing the item itself. * The caller must take care of freeing the item itself.
*/ */
void void
hash_remove(ht, hi) hash_remove(hashtab_T *ht, hashitem_T *hi)
hashtab_T *ht;
hashitem_T *hi;
{ {
--ht->ht_used; --ht->ht_used;
hi->hi_key = HI_KEY_REMOVED; hi->hi_key = HI_KEY_REMOVED;
@ -294,8 +279,7 @@ hash_remove(ht, hi)
* Must call hash_unlock() later. * Must call hash_unlock() later.
*/ */
void void
hash_lock(ht) hash_lock(hashtab_T *ht)
hashtab_T *ht;
{ {
++ht->ht_locked; ++ht->ht_locked;
} }
@ -307,9 +291,7 @@ hash_lock(ht)
* Must call hash_unlock() later. * Must call hash_unlock() later.
*/ */
void void
hash_lock_size(ht, size) hash_lock_size(hashtab_T *ht, int size)
hashtab_T *ht;
int size;
{ {
(void)hash_may_resize(ht, size); (void)hash_may_resize(ht, size);
++ht->ht_locked; ++ht->ht_locked;
@ -322,8 +304,7 @@ hash_lock_size(ht, size)
* This must balance a call to hash_lock(). * This must balance a call to hash_lock().
*/ */
void void
hash_unlock(ht) hash_unlock(hashtab_T *ht)
hashtab_T *ht;
{ {
--ht->ht_locked; --ht->ht_locked;
(void)hash_may_resize(ht, 0); (void)hash_may_resize(ht, 0);
@ -335,9 +316,9 @@ hash_unlock(ht)
* Returns OK or FAIL (out of memory). * Returns OK or FAIL (out of memory).
*/ */
static int static int
hash_may_resize(ht, minitems) hash_may_resize(
hashtab_T *ht; hashtab_T *ht,
int minitems; /* minimal number of items */ int minitems) /* minimal number of items */
{ {
hashitem_T temparray[HT_INIT_SIZE]; hashitem_T temparray[HT_INIT_SIZE];
hashitem_T *oldarray, *newarray; hashitem_T *oldarray, *newarray;
@ -481,8 +462,7 @@ hash_may_resize(ht, minitems)
* lower the percentage the better. * lower the percentage the better.
*/ */
hash_T hash_T
hash_hash(key) hash_hash(char_u *key)
char_u *key;
{ {
hash_T hash; hash_T hash;
char_u *p; char_u *p;

View File

@ -83,8 +83,7 @@ static cscmd_T cs_cmds[] =
}; };
static void static void
cs_usage_msg(x) cs_usage_msg(csid_e x)
csid_e x;
{ {
(void)EMSG2(_("E560: Usage: cs[cope] %s"), cs_cmds[(int)x].usage); (void)EMSG2(_("E560: Usage: cs[cope] %s"), cs_cmds[(int)x].usage);
} }
@ -104,9 +103,7 @@ static enum
* expansion. * expansion.
*/ */
char_u * char_u *
get_cscope_name(xp, idx) get_cscope_name(expand_T *xp UNUSED, int idx)
expand_T *xp UNUSED;
int idx;
{ {
int current_idx; int current_idx;
int i; int i;
@ -167,10 +164,10 @@ get_cscope_name(xp, idx)
* Handle command line completion for :cscope command. * Handle command line completion for :cscope command.
*/ */
void void
set_context_in_cscope_cmd(xp, arg, cmdidx) set_context_in_cscope_cmd(
expand_T *xp; expand_T *xp,
char_u *arg; char_u *arg,
cmdidx_T cmdidx; cmdidx_T cmdidx)
{ {
char_u *p; char_u *p;
@ -210,9 +207,9 @@ set_context_in_cscope_cmd(xp, arg, cmdidx)
* command function. * command function.
*/ */
static void static void
do_cscope_general(eap, make_split) do_cscope_general(
exarg_T *eap; exarg_T *eap,
int make_split; /* whether to split window */ int make_split) /* whether to split window */
{ {
cscmd_T *cmdp; cscmd_T *cmdp;
@ -248,8 +245,7 @@ do_cscope_general(eap, make_split)
* PUBLIC: do_cscope * PUBLIC: do_cscope
*/ */
void void
do_cscope(eap) do_cscope(exarg_T *eap)
exarg_T *eap;
{ {
do_cscope_general(eap, FALSE); do_cscope_general(eap, FALSE);
} }
@ -260,8 +256,7 @@ do_cscope(eap)
* same as do_cscope, but splits window, too. * same as do_cscope, but splits window, too.
*/ */
void void
do_scscope(eap) do_scscope(exarg_T *eap)
exarg_T *eap;
{ {
do_cscope_general(eap, TRUE); do_cscope_general(eap, TRUE);
} }
@ -271,8 +266,7 @@ do_scscope(eap)
* *
*/ */
void void
do_cstag(eap) do_cstag(exarg_T *eap)
exarg_T *eap;
{ {
int ret = FALSE; int ret = FALSE;
@ -354,9 +348,7 @@ do_cstag(eap)
* returns TRUE if eof, FALSE otherwise * returns TRUE if eof, FALSE otherwise
*/ */
int int
cs_fgets(buf, size) cs_fgets(char_u *buf, int size)
char_u *buf;
int size;
{ {
char *p; char *p;
@ -374,7 +366,7 @@ cs_fgets(buf, size)
* called only from do_tag(), when popping the tag stack * called only from do_tag(), when popping the tag stack
*/ */
void void
cs_free_tags() cs_free_tags(void)
{ {
cs_manage_matches(NULL, NULL, -1, Free); cs_manage_matches(NULL, NULL, -1, Free);
} }
@ -386,7 +378,7 @@ cs_free_tags()
* called from do_tag() * called from do_tag()
*/ */
void void
cs_print_tags() cs_print_tags(void)
{ {
cs_manage_matches(NULL, NULL, -1, Print); cs_manage_matches(NULL, NULL, -1, Print);
} }
@ -421,10 +413,7 @@ cs_print_tags()
*/ */
#if defined(FEAT_EVAL) || defined(PROTO) #if defined(FEAT_EVAL) || defined(PROTO)
int int
cs_connection(num, dbpath, ppath) cs_connection(int num, char_u *dbpath, char_u *ppath)
int num;
char_u *dbpath;
char_u *ppath;
{ {
int i; int i;
@ -486,8 +475,7 @@ cs_connection(num, dbpath, ppath)
* MAXPATHL 256 * MAXPATHL 256
*/ */
static int static int
cs_add(eap) cs_add(exarg_T *eap UNUSED)
exarg_T *eap UNUSED;
{ {
char *fname, *ppath, *flags = NULL; char *fname, *ppath, *flags = NULL;
@ -503,8 +491,7 @@ cs_add(eap)
} }
static void static void
cs_stat_emsg(fname) cs_stat_emsg(char *fname)
char *fname;
{ {
char *stat_emsg = _("E563: stat(%s) error: %d"); char *stat_emsg = _("E563: stat(%s) error: %d");
char *buf = (char *)alloc((unsigned)strlen(stat_emsg) + MAXPATHL + 10); char *buf = (char *)alloc((unsigned)strlen(stat_emsg) + MAXPATHL + 10);
@ -528,10 +515,10 @@ cs_stat_emsg(fname)
* routine uses a number of goto statements. * routine uses a number of goto statements.
*/ */
static int static int
cs_add_common(arg1, arg2, flags) cs_add_common(
char *arg1; /* filename - may contain environment variables */ char *arg1, /* filename - may contain environment variables */
char *arg2; /* prepend path - may contain environment variables */ char *arg2, /* prepend path - may contain environment variables */
char *flags; char *flags)
{ {
struct stat statbuf; struct stat statbuf;
int ret; int ret;
@ -665,14 +652,14 @@ add_err:
static int static int
cs_check_for_connections() cs_check_for_connections(void)
{ {
return (cs_cnt_connections() > 0); return (cs_cnt_connections() > 0);
} /* cs_check_for_connections */ } /* cs_check_for_connections */
static int static int
cs_check_for_tags() cs_check_for_tags(void)
{ {
return (p_tags[0] != NUL && curbuf->b_p_tags != NULL); return (p_tags[0] != NUL && curbuf->b_p_tags != NULL);
} /* cs_check_for_tags */ } /* cs_check_for_tags */
@ -684,7 +671,7 @@ cs_check_for_tags()
* count the number of cscope connections * count the number of cscope connections
*/ */
static int static int
cs_cnt_connections() cs_cnt_connections(void)
{ {
short i; short i;
short cnt = 0; short cnt = 0;
@ -698,8 +685,8 @@ cs_cnt_connections()
} /* cs_cnt_connections */ } /* cs_cnt_connections */
static void static void
cs_reading_emsg(idx) cs_reading_emsg(
int idx; /* connection index */ int idx) /* connection index */
{ {
EMSGN(_("E262: error reading cscope connection %ld"), idx); EMSGN(_("E262: error reading cscope connection %ld"), idx);
} }
@ -711,8 +698,7 @@ cs_reading_emsg(idx)
* count the number of matches for a given cscope connection. * count the number of matches for a given cscope connection.
*/ */
static int static int
cs_cnt_matches(idx) cs_cnt_matches(int idx)
int idx;
{ {
char *stok; char *stok;
char *buf; char *buf;
@ -773,9 +759,7 @@ cs_cnt_matches(idx)
* Creates the actual cscope command query from what the user entered. * Creates the actual cscope command query from what the user entered.
*/ */
static char * static char *
cs_create_cmd(csoption, pattern) cs_create_cmd(char *csoption, char *pattern)
char *csoption;
char *pattern;
{ {
char *cmd; char *cmd;
short search; short search;
@ -836,8 +820,7 @@ cs_create_cmd(csoption, pattern)
* the BSD license notice? * the BSD license notice?
*/ */
static int static int
cs_create_connection(i) cs_create_connection(int i)
int i;
{ {
#ifdef UNIX #ifdef UNIX
int to_cs[2], from_cs[2]; int to_cs[2], from_cs[2];
@ -1082,8 +1065,7 @@ err_closing:
* returns TRUE if we jump to a tag or abort, FALSE if not. * returns TRUE if we jump to a tag or abort, FALSE if not.
*/ */
static int static int
cs_find(eap) cs_find(exarg_T *eap)
exarg_T *eap;
{ {
char *opt, *pat; char *opt, *pat;
int i; int i;
@ -1126,13 +1108,13 @@ cs_find(eap)
* common code for cscope find, shared by cs_find() and do_cstag() * common code for cscope find, shared by cs_find() and do_cstag()
*/ */
static int static int
cs_find_common(opt, pat, forceit, verbose, use_ll, cmdline) cs_find_common(
char *opt; char *opt,
char *pat; char *pat,
int forceit; int forceit,
int verbose; int verbose,
int use_ll UNUSED; int use_ll UNUSED,
char_u *cmdline UNUSED; char_u *cmdline UNUSED)
{ {
int i; int i;
char *cmd; char *cmd;
@ -1344,8 +1326,7 @@ cs_find_common(opt, pat, forceit, verbose, use_ll, cmdline)
* print help * print help
*/ */
static int static int
cs_help(eap) cs_help(exarg_T *eap UNUSED)
exarg_T *eap UNUSED;
{ {
cscmd_T *cmdp = cs_cmds; cscmd_T *cmdp = cs_cmds;
@ -1382,8 +1363,7 @@ cs_help(eap)
static void static void
clear_csinfo(i) clear_csinfo(int i)
int i;
{ {
csinfo[i].fname = NULL; csinfo[i].fname = NULL;
csinfo[i].ppath = NULL; csinfo[i].ppath = NULL;
@ -1408,7 +1388,7 @@ clear_csinfo(i)
static char *GetWin32Error(void); static char *GetWin32Error(void);
static char * static char *
GetWin32Error() GetWin32Error(void)
{ {
char *msg = NULL; char *msg = NULL;
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM, FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM,
@ -1430,11 +1410,11 @@ GetWin32Error()
* insert a new cscope database filename into the filelist * insert a new cscope database filename into the filelist
*/ */
static int static int
cs_insert_filelist(fname, ppath, flags, sb) cs_insert_filelist(
char *fname; char *fname,
char *ppath; char *ppath,
char *flags; char *flags,
struct stat *sb UNUSED; struct stat *sb UNUSED)
{ {
short i, j; short i, j;
#ifndef UNIX #ifndef UNIX
@ -1577,8 +1557,7 @@ cs_insert_filelist(fname, ppath, flags, sb)
* find cscope command in command table * find cscope command in command table
*/ */
static cscmd_T * static cscmd_T *
cs_lookup_cmd(eap) cs_lookup_cmd(exarg_T *eap)
exarg_T *eap;
{ {
cscmd_T *cmdp; cscmd_T *cmdp;
char *stok; char *stok;
@ -1609,8 +1588,7 @@ cs_lookup_cmd(eap)
* nuke em * nuke em
*/ */
static int static int
cs_kill(eap) cs_kill(exarg_T *eap UNUSED)
exarg_T *eap UNUSED;
{ {
char *stok; char *stok;
short i; short i;
@ -1667,9 +1645,9 @@ cs_kill(eap)
* Actually kills a specific cscope connection. * Actually kills a specific cscope connection.
*/ */
static void static void
cs_kill_execute(i, cname) cs_kill_execute(
int i; /* cscope table index */ int i, /* cscope table index */
char *cname; /* cscope database name */ char *cname) /* cscope database name */
{ {
if (p_csverbose) if (p_csverbose)
{ {
@ -1702,11 +1680,11 @@ cs_kill_execute(i, cname)
* characters to comply with ctags formatting. * characters to comply with ctags formatting.
*/ */
static char * static char *
cs_make_vim_style_matches(fname, slno, search, tagstr) cs_make_vim_style_matches(
char *fname; char *fname,
char *slno; char *slno,
char *search; char *search,
char *tagstr; char *tagstr)
{ {
/* vim style is ctags: /* vim style is ctags:
* *
@ -1762,11 +1740,11 @@ cs_make_vim_style_matches(fname, slno, search, tagstr)
* Print: prints the tags * Print: prints the tags
*/ */
static char * static char *
cs_manage_matches(matches, contexts, totmatches, cmd) cs_manage_matches(
char **matches; char **matches,
char **contexts; char **contexts,
int totmatches; int totmatches,
mcmd_e cmd; mcmd_e cmd)
{ {
static char **mp = NULL; static char **mp = NULL;
static char **cp = NULL; static char **cp = NULL;
@ -1829,13 +1807,13 @@ cs_manage_matches(matches, contexts, totmatches, cmd)
* parse cscope output * parse cscope output
*/ */
static char * static char *
cs_parse_results(cnumber, buf, bufsize, context, linenumber, search) cs_parse_results(
int cnumber; int cnumber,
char *buf; char *buf,
int bufsize; int bufsize,
char **context; char **context,
char **linenumber; char **linenumber,
char **search; char **search)
{ {
int ch; int ch;
char *p; char *p;
@ -1892,9 +1870,7 @@ cs_parse_results(cnumber, buf, bufsize, context, linenumber, search)
* write cscope find results to file * write cscope find results to file
*/ */
static void static void
cs_file_results(f, nummatches_a) cs_file_results(FILE *f, int *nummatches_a)
FILE *f;
int *nummatches_a;
{ {
int i, j; int i, j;
char *buf; char *buf;
@ -1951,13 +1927,13 @@ cs_file_results(f, nummatches_a)
* When there are no matches sets "*matches_p" to NULL. * When there are no matches sets "*matches_p" to NULL.
*/ */
static void static void
cs_fill_results(tagstr, totmatches, nummatches_a, matches_p, cntxts_p, matched) cs_fill_results(
char *tagstr; char *tagstr,
int totmatches; int totmatches,
int *nummatches_a; int *nummatches_a,
char ***matches_p; char ***matches_p,
char ***cntxts_p; char ***cntxts_p,
int *matched; int *matched)
{ {
int i, j; int i, j;
char *buf; char *buf;
@ -2031,8 +2007,7 @@ parse_out:
/* get the requested path components */ /* get the requested path components */
static char * static char *
cs_pathcomponents(path) cs_pathcomponents(char *path)
char *path;
{ {
int i; int i;
char *s; char *s;
@ -2063,10 +2038,7 @@ cs_pathcomponents(path)
* called from cs_manage_matches() * called from cs_manage_matches()
*/ */
static void static void
cs_print_tags_priv(matches, cntxts, num_matches) cs_print_tags_priv(char **matches, char **cntxts, int num_matches)
char **matches;
char **cntxts;
int num_matches;
{ {
char *buf = NULL; char *buf = NULL;
char *t_buf; char *t_buf;
@ -2212,8 +2184,7 @@ cs_print_tags_priv(matches, cntxts, num_matches)
* read a cscope prompt (basically, skip over the ">> ") * read a cscope prompt (basically, skip over the ">> ")
*/ */
static int static int
cs_read_prompt(i) cs_read_prompt(int i)
int i;
{ {
int ch; int ch;
char *buf = NULL; /* buffer for possible error message from cscope */ char *buf = NULL; /* buffer for possible error message from cscope */
@ -2312,9 +2283,7 @@ sig_handler SIGDEFARG(sigarg)
* or not to free the filename. Called by cs_kill and cs_reset. * or not to free the filename. Called by cs_kill and cs_reset.
*/ */
static void static void
cs_release_csp(i, freefnpp) cs_release_csp(int i, int freefnpp)
int i;
int freefnpp;
{ {
/* /*
* Trying to exit normally (not sure whether it is fit to UNIX cscope * Trying to exit normally (not sure whether it is fit to UNIX cscope
@ -2441,8 +2410,7 @@ cs_release_csp(i, freefnpp)
* calls cs_kill on all cscope connections then reinits * calls cs_kill on all cscope connections then reinits
*/ */
static int static int
cs_reset(eap) cs_reset(exarg_T *eap UNUSED)
exarg_T *eap UNUSED;
{ {
char **dblist = NULL, **pplist = NULL, **fllist = NULL; char **dblist = NULL, **pplist = NULL, **fllist = NULL;
int i; int i;
@ -2514,9 +2482,7 @@ cs_reset(eap)
* Contrast this with my development system (Digital Unix), which does. * Contrast this with my development system (Digital Unix), which does.
*/ */
static char * static char *
cs_resolve_file(i, name) cs_resolve_file(int i, char *name)
int i;
char *name;
{ {
char *fullname; char *fullname;
int len; int len;
@ -2580,8 +2546,7 @@ cs_resolve_file(i, name)
* show all cscope connections * show all cscope connections
*/ */
static int static int
cs_show(eap) cs_show(exarg_T *eap UNUSED)
exarg_T *eap UNUSED;
{ {
short i; short i;
if (cs_cnt_connections() == 0) if (cs_cnt_connections() == 0)
@ -2616,7 +2581,7 @@ cs_show(eap)
* Only called when VIM exits to quit any cscope sessions. * Only called when VIM exits to quit any cscope sessions.
*/ */
void void
cs_end() cs_end(void)
{ {
int i; int i;

View File

@ -3749,7 +3749,7 @@ get_vim_curr_window(void)
} }
static void static void
make_modules() make_modules(void)
{ {
int i; int i;
Scheme_Env *mod = NULL; Scheme_Env *mod = NULL;

View File

@ -25,11 +25,11 @@
#define NIL(type) ((type)0) #define NIL(type) ((type)0)
static int static int
sfvimwrite(f, buf, n, disc) sfvimwrite(
Sfio_t *f; /* stream involved */ Sfio_t *f, /* stream involved */
char *buf; /* buffer to read from */ char *buf, /* buffer to read from */
int n; /* number of bytes to write */ int n, /* number of bytes to write */
Sfdisc_t *disc; /* discipline */ Sfdisc_t *disc) /* discipline */
{ {
char_u *str; char_u *str;
@ -47,7 +47,7 @@ sfvimwrite(f, buf, n, disc)
* Create Vim discipline * Create Vim discipline
*/ */
Sfdisc_t * Sfdisc_t *
sfdcnewvim() sfdcnewvim(void)
{ {
Sfdisc_t *disc; Sfdisc_t *disc;

View File

@ -861,7 +861,7 @@ Python_RestoreThread(void)
#endif #endif
void void
python_end() python_end(void)
{ {
static int recurse = 0; static int recurse = 0;
@ -899,7 +899,7 @@ python_end()
#if (defined(DYNAMIC_PYTHON) && defined(FEAT_PYTHON3)) || defined(PROTO) #if (defined(DYNAMIC_PYTHON) && defined(FEAT_PYTHON3)) || defined(PROTO)
int int
python_loaded() python_loaded(void)
{ {
return (hinstPython != 0); return (hinstPython != 0);
} }

View File

@ -695,7 +695,7 @@ python3_enabled(int verbose)
static void get_py3_exceptions(void); static void get_py3_exceptions(void);
static void static void
get_py3_exceptions() get_py3_exceptions(void)
{ {
PyObject *exmod = PyImport_ImportModule("builtins"); PyObject *exmod = PyImport_ImportModule("builtins");
PyObject *exdict = PyModule_GetDict(exmod); PyObject *exdict = PyModule_GetDict(exmod);
@ -800,7 +800,7 @@ static PyObject *Py3Init_vim(void);
*/ */
void void
python3_end() python3_end(void)
{ {
static int recurse = 0; static int recurse = 0;
@ -830,7 +830,7 @@ python3_end()
#if (defined(DYNAMIC_PYTHON3) && defined(DYNAMIC_PYTHON) && defined(FEAT_PYTHON) && defined(UNIX)) || defined(PROTO) #if (defined(DYNAMIC_PYTHON3) && defined(DYNAMIC_PYTHON) && defined(FEAT_PYTHON) && defined(UNIX)) || defined(PROTO)
int int
python3_loaded() python3_loaded(void)
{ {
return (hinstPy3 != 0); return (hinstPy3 != 0);
} }

View File

@ -625,7 +625,7 @@ static struct
* Free ruby.dll * Free ruby.dll
*/ */
static void static void
end_dynamic_ruby() end_dynamic_ruby(void)
{ {
if (hinstRuby) if (hinstRuby)
{ {
@ -674,15 +674,14 @@ ruby_runtime_link_init(char *libname, int verbose)
* else FALSE. * else FALSE.
*/ */
int int
ruby_enabled(verbose) ruby_enabled(int verbose)
int verbose;
{ {
return ruby_runtime_link_init((char *)p_rubydll, verbose) == OK; return ruby_runtime_link_init((char *)p_rubydll, verbose) == OK;
} }
#endif /* defined(DYNAMIC_RUBY) || defined(PROTO) */ #endif /* defined(DYNAMIC_RUBY) || defined(PROTO) */
void void
ruby_end() ruby_end(void)
{ {
#ifdef DYNAMIC_RUBY #ifdef DYNAMIC_RUBY
end_dynamic_ruby(); end_dynamic_ruby();
@ -1115,12 +1114,12 @@ static buf_T *get_buf(VALUE obj)
return buf; return buf;
} }
static VALUE buffer_s_current() static VALUE buffer_s_current(void)
{ {
return buffer_new(curbuf); return buffer_new(curbuf);
} }
static VALUE buffer_s_count() static VALUE buffer_s_count(void)
{ {
buf_T *b; buf_T *b;
int n = 0; int n = 0;
@ -1357,7 +1356,7 @@ static win_T *get_win(VALUE obj)
return win; return win;
} }
static VALUE window_s_current() static VALUE window_s_current(void)
{ {
return window_new(curwin); return window_new(curwin);
} }
@ -1366,7 +1365,7 @@ static VALUE window_s_current()
* Added line manipulation functions * Added line manipulation functions
* SegPhault - 03/07/05 * SegPhault - 03/07/05
*/ */
static VALUE line_s_current() static VALUE line_s_current(void)
{ {
return get_buffer_line(curbuf, curwin->w_cursor.lnum); return get_buffer_line(curbuf, curwin->w_cursor.lnum);
} }
@ -1376,14 +1375,14 @@ static VALUE set_current_line(VALUE self UNUSED, VALUE str)
return set_buffer_line(curbuf, curwin->w_cursor.lnum, str); return set_buffer_line(curbuf, curwin->w_cursor.lnum, str);
} }
static VALUE current_line_number() static VALUE current_line_number(void)
{ {
return INT2FIX((int)curwin->w_cursor.lnum); return INT2FIX((int)curwin->w_cursor.lnum);
} }
static VALUE window_s_count() static VALUE window_s_count(void)
{ {
#ifdef FEAT_WINDOWS #ifdef FEAT_WINDOWS
win_T *w; win_T *w;

View File

@ -404,7 +404,7 @@ SniffEmacsReadThread(void *dummy)
* to process the waiting sniff requests * to process the waiting sniff requests
*/ */
void void
ProcessSniffRequests() ProcessSniffRequests(void)
{ {
static char buf[MAX_REQUEST_LEN]; static char buf[MAX_REQUEST_LEN];
int len; int len;
@ -433,8 +433,7 @@ ProcessSniffRequests()
} }
static struct sn_cmd * static struct sn_cmd *
find_sniff_cmd(cmd) find_sniff_cmd(char *cmd)
char *cmd;
{ {
struct sn_cmd *sniff_cmd = NULL; struct sn_cmd *sniff_cmd = NULL;
int i; int i;
@ -463,10 +462,7 @@ find_sniff_cmd(cmd)
} }
static int static int
add_sniff_cmd(cmd, def, msg) add_sniff_cmd(char *cmd, char *def, char *msg)
char *cmd;
char *def;
char *msg;
{ {
int rc = 0; int rc = 0;
if (def != NULL && def[0] != NUL && find_sniff_cmd(cmd) == NULL) if (def != NULL && def[0] != NUL && find_sniff_cmd(cmd) == NULL)
@ -526,8 +522,7 @@ add_sniff_cmd(cmd, def, msg)
* Handle ":sniff" command * Handle ":sniff" command
*/ */
void void
ex_sniff(eap) ex_sniff(exarg_T *eap)
exarg_T *eap;
{ {
char_u *arg = eap->arg; char_u *arg = eap->arg;
char_u *symbol = NULL; char_u *symbol = NULL;
@ -593,7 +588,7 @@ ex_sniff(eap)
static void static void
sniff_connect() sniff_connect(void)
{ {
if (sniff_connected) if (sniff_connected)
return; return;
@ -609,8 +604,7 @@ sniff_connect()
} }
void void
sniff_disconnect(immediately) sniff_disconnect(int immediately)
int immediately;
{ {
if (!sniff_connected) if (!sniff_connected)
return; return;
@ -674,7 +668,7 @@ sniff_disconnect(immediately)
* Connect to Sniff: returns 1 on error * Connect to Sniff: returns 1 on error
*/ */
static int static int
ConnectToSniffEmacs() ConnectToSniffEmacs(void)
{ {
#ifdef WIN32 /* Windows Version of the Code */ #ifdef WIN32 /* Windows Version of the Code */
HANDLE ToSniffEmacs[2], FromSniffEmacs[2]; HANDLE ToSniffEmacs[2], FromSniffEmacs[2];
@ -773,8 +767,7 @@ ConnectToSniffEmacs()
* Handle one request from SNiFF+ * Handle one request from SNiFF+
*/ */
static void static void
HandleSniffRequest(buffer) HandleSniffRequest(char *buffer)
char *buffer;
{ {
char VICommand[MAX_REQUEST_LEN]; char VICommand[MAX_REQUEST_LEN];
char command; char command;
@ -942,10 +935,7 @@ HandleSniffRequest(buffer)
* <0 on error * <0 on error
*/ */
static int static int
get_request(fd, buf, maxlen) get_request(int fd, char *buf, int maxlen)
int fd;
char *buf;
int maxlen;
{ {
static char inbuf[1024]; static char inbuf[1024];
static int pos = 0, bytes = 0; static int pos = 0, bytes = 0;
@ -997,9 +987,7 @@ get_request(fd, buf, maxlen)
static void static void
SendRequest(command, symbol) SendRequest(struct sn_cmd *command, char *symbol)
struct sn_cmd *command;
char *symbol;
{ {
int cmd_type = command->cmd_type; int cmd_type = command->cmd_type;
static char cmdstr[MAX_REQUEST_LEN]; static char cmdstr[MAX_REQUEST_LEN];
@ -1074,8 +1062,7 @@ SendRequest(command, symbol)
static void static void
WriteToSniff(str) WriteToSniff(char *str)
char *str;
{ {
int bytes; int bytes;
#ifdef WIN32 #ifdef WIN32
@ -1097,24 +1084,21 @@ WriteToSniff(str)
/*-------- vim helping functions --------------------------------*/ /*-------- vim helping functions --------------------------------*/
static void static void
vi_msg(str) vi_msg(char *str)
char *str;
{ {
if (str != NULL && *str != NUL) if (str != NULL && *str != NUL)
MSG((char_u *)str); MSG((char_u *)str);
} }
static void static void
vi_error_msg(str) vi_error_msg(char *str)
char *str;
{ {
if (str != NULL && *str != NUL) if (str != NULL && *str != NUL)
EMSG((char_u *)str); EMSG((char_u *)str);
} }
static void static void
vi_open_file(fname) vi_open_file(char *fname)
char *fname;
{ {
++no_wait_return; ++no_wait_return;
do_ecmd(0, (char_u *)fname, NULL, NULL, ECMD_ONE, ECMD_HIDE+ECMD_OLDBUF, do_ecmd(0, (char_u *)fname, NULL, NULL, ECMD_ONE, ECMD_HIDE+ECMD_OLDBUF,
@ -1124,8 +1108,7 @@ vi_open_file(fname)
} }
static buf_T * static buf_T *
vi_find_buffer(fname) vi_find_buffer(char *fname)
char *fname;
{ /* derived from buflist_findname() [buffer.c] */ { /* derived from buflist_findname() [buffer.c] */
buf_T *buf; buf_T *buf;
@ -1137,7 +1120,7 @@ vi_find_buffer(fname)
static char * static char *
vi_symbol_under_cursor() vi_symbol_under_cursor(void)
{ {
int len; int len;
char *symbolp; char *symbolp;
@ -1156,14 +1139,13 @@ vi_symbol_under_cursor()
static char * static char *
vi_buffer_name() vi_buffer_name(void)
{ {
return (char *)curbuf->b_sfname; return (char *)curbuf->b_sfname;
} }
static void static void
vi_exec_cmd(vicmd) vi_exec_cmd(char *vicmd)
char *vicmd;
{ {
do_cmdline_cmd((char_u *)vicmd); /* [ex_docmd.c] */ do_cmdline_cmd((char_u *)vicmd); /* [ex_docmd.c] */
} }
@ -1173,8 +1155,7 @@ vi_exec_cmd(vicmd)
* derived from cursor_pos_info() [buffer.c] * derived from cursor_pos_info() [buffer.c]
*/ */
static void static void
vi_set_cursor_pos(char_pos) vi_set_cursor_pos(long char_pos)
long char_pos;
{ {
linenr_T lnum; linenr_T lnum;
long char_count = 1; /* first position = 1 */ long char_count = 1; /* first position = 1 */
@ -1200,7 +1181,7 @@ vi_set_cursor_pos(char_pos)
} }
static long static long
vi_cursor_pos() vi_cursor_pos(void)
{ {
linenr_T lnum; linenr_T lnum;
long char_count=1; /* sniff starts with pos 1 */ long char_count=1; /* sniff starts with pos 1 */

View File

@ -237,8 +237,7 @@ static char *find_executable_arg = NULL;
#endif #endif
void void
vim_tcl_init(arg) vim_tcl_init(char *arg)
char *arg;
{ {
#ifndef DYNAMIC_TCL #ifndef DYNAMIC_TCL
Tcl_FindExecutable(arg); Tcl_FindExecutable(arg);
@ -255,8 +254,7 @@ static int stubs_initialized = FALSE;
* Return TRUE if the TCL interface can be used. * Return TRUE if the TCL interface can be used.
*/ */
int int
tcl_enabled(verbose) tcl_enabled(int verbose)
int verbose;
{ {
if (!stubs_initialized && find_executable_arg != NULL if (!stubs_initialized && find_executable_arg != NULL
&& tcl_runtime_link_init((char *)p_tcldll, verbose) == OK) && tcl_runtime_link_init((char *)p_tcldll, verbose) == OK)
@ -280,7 +278,7 @@ tcl_enabled(verbose)
#endif #endif
void void
tcl_end() tcl_end(void)
{ {
#ifdef DYNAMIC_TCL #ifdef DYNAMIC_TCL
if (hTclLib) if (hTclLib)
@ -310,11 +308,11 @@ tcl_end()
* useless for this routine to return the exit code via Tcl_SetResult(). * useless for this routine to return the exit code via Tcl_SetResult().
*/ */
static int static int
exitcmd(dummy, interp, objc, objv) exitcmd(
ClientData dummy UNUSED; ClientData dummy UNUSED,
Tcl_Interp *interp; Tcl_Interp *interp,
int objc; int objc,
Tcl_Obj *CONST objv[]; Tcl_Obj *CONST objv[])
{ {
int value = 0; int value = 0;
@ -339,11 +337,11 @@ exitcmd(dummy, interp, objc, objv)
* "::vim::beep" - what Vi[m] does best :-) * "::vim::beep" - what Vi[m] does best :-)
*/ */
static int static int
beepcmd(dummy, interp, objc, objv) beepcmd(
ClientData dummy UNUSED; ClientData dummy UNUSED,
Tcl_Interp *interp; Tcl_Interp *interp,
int objc; int objc,
Tcl_Obj *CONST objv[]; Tcl_Obj *CONST objv[])
{ {
if (objc != 1) if (objc != 1)
{ {
@ -361,11 +359,11 @@ beepcmd(dummy, interp, objc, objv)
* "::vim::buffer new" - create a new buffer (not implemented) * "::vim::buffer new" - create a new buffer (not implemented)
*/ */
static int static int
buffercmd(dummy, interp, objc, objv) buffercmd(
ClientData dummy UNUSED; ClientData dummy UNUSED,
Tcl_Interp *interp; Tcl_Interp *interp,
int objc; int objc,
Tcl_Obj *CONST objv[]; Tcl_Obj *CONST objv[])
{ {
char *name; char *name;
buf_T *buf; buf_T *buf;
@ -457,11 +455,11 @@ buffercmd(dummy, interp, objc, objv)
* "::vim::window list" - create list of window commands. * "::vim::window list" - create list of window commands.
*/ */
static int static int
windowcmd(dummy, interp, objc, objv) windowcmd(
ClientData dummy UNUSED; ClientData dummy UNUSED,
Tcl_Interp *interp; Tcl_Interp *interp,
int objc; int objc,
Tcl_Obj *CONST objv[]; Tcl_Obj *CONST objv[])
{ {
char *what, *string; char *what, *string;
win_T *win; win_T *win;
@ -498,11 +496,11 @@ windowcmd(dummy, interp, objc, objv)
* This function implements the buffer commands. * This function implements the buffer commands.
*/ */
static int static int
bufselfcmd(ref, interp, objc, objv) bufselfcmd(
ClientData ref; ClientData ref,
Tcl_Interp *interp; Tcl_Interp *interp,
int objc; int objc,
Tcl_Obj *CONST objv[]; Tcl_Obj *CONST objv[])
{ {
int opt, err, idx, flags; int opt, err, idx, flags;
int val1, val2, n, i; int val1, val2, n, i;
@ -937,11 +935,11 @@ bufselfcmd(ref, interp, objc, objv)
* This function implements the window commands. * This function implements the window commands.
*/ */
static int static int
winselfcmd(ref, interp, objc, objv) winselfcmd(
ClientData ref; ClientData ref,
Tcl_Interp *interp; Tcl_Interp *interp,
int objc; int objc,
Tcl_Obj *CONST objv[]; Tcl_Obj *CONST objv[])
{ {
int err, idx, flags; int err, idx, flags;
int val1, val2; int val1, val2;
@ -1111,11 +1109,11 @@ winselfcmd(ref, interp, objc, objv)
static int static int
commandcmd(dummy, interp, objc, objv) commandcmd(
ClientData dummy UNUSED; ClientData dummy UNUSED,
Tcl_Interp *interp; Tcl_Interp *interp,
int objc; int objc,
Tcl_Obj *CONST objv[]; Tcl_Obj *CONST objv[])
{ {
int err; int err;
@ -1125,11 +1123,11 @@ commandcmd(dummy, interp, objc, objv)
} }
static int static int
optioncmd(dummy, interp, objc, objv) optioncmd(
ClientData dummy UNUSED; ClientData dummy UNUSED,
Tcl_Interp *interp; Tcl_Interp *interp,
int objc; int objc,
Tcl_Obj *CONST objv[]; Tcl_Obj *CONST objv[])
{ {
int err; int err;
@ -1139,11 +1137,11 @@ optioncmd(dummy, interp, objc, objv)
} }
static int static int
exprcmd(dummy, interp, objc, objv) exprcmd(
ClientData dummy UNUSED; ClientData dummy UNUSED,
Tcl_Interp *interp; Tcl_Interp *interp,
int objc; int objc,
Tcl_Obj *CONST objv[]; Tcl_Obj *CONST objv[])
{ {
return tclvimexpr(interp, objc, objv, 1); return tclvimexpr(interp, objc, objv, 1);
} }
@ -1156,11 +1154,11 @@ exprcmd(dummy, interp, objc, objv)
* Get a line number from 'obj' and convert it to vim's range. * Get a line number from 'obj' and convert it to vim's range.
*/ */
static int static int
tclgetlinenum(interp, obj, valueP, buf) tclgetlinenum(
Tcl_Interp *interp; Tcl_Interp *interp,
Tcl_Obj *obj; Tcl_Obj *obj,
int *valueP; int *valueP,
buf_T *buf; buf_T *buf)
{ {
int err, i; int err, i;
@ -1209,8 +1207,7 @@ tclgetlinenum(interp, obj, valueP, buf)
* Find the first window in the window list that displays the buffer. * Find the first window in the window list that displays the buffer.
*/ */
static win_T * static win_T *
tclfindwin(buf) tclfindwin(buf_T *buf)
buf_T *buf;
{ {
win_T *win; win_T *win;
@ -1226,11 +1223,11 @@ tclfindwin(buf)
* Do-it-all function for "::vim::command", "$buf command" and "$win command". * Do-it-all function for "::vim::command", "$buf command" and "$win command".
*/ */
static int static int
tcldoexcommand(interp, objc, objv, objn) tcldoexcommand(
Tcl_Interp *interp; Tcl_Interp *interp,
int objc; int objc,
Tcl_Obj *CONST objv[]; Tcl_Obj *CONST objv[],
int objn; int objn)
{ {
tcl_info saveinfo; tcl_info saveinfo;
int err, flag, nobjs; int err, flag, nobjs;
@ -1284,11 +1281,11 @@ tcldoexcommand(interp, objc, objv, objn)
* Do-it-all function for "::vim::option", "$buf option" and "$win option". * Do-it-all function for "::vim::option", "$buf option" and "$win option".
*/ */
static int static int
tclsetoption(interp, objc, objv, objn) tclsetoption(
Tcl_Interp *interp; Tcl_Interp *interp,
int objc; int objc,
Tcl_Obj *CONST objv[]; Tcl_Obj *CONST objv[],
int objn; int objn)
{ {
int err, nobjs, idx; int err, nobjs, idx;
char_u *option; char_u *option;
@ -1365,11 +1362,11 @@ tclsetoption(interp, objc, objv, objn)
* Do-it-all function for "::vim::expr", "$buf expr" and "$win expr". * Do-it-all function for "::vim::expr", "$buf expr" and "$win expr".
*/ */
static int static int
tclvimexpr(interp, objc, objv, objn) tclvimexpr(
Tcl_Interp *interp; Tcl_Interp *interp,
int objc; int objc,
Tcl_Obj *CONST objv[]; Tcl_Obj *CONST objv[],
int objn; int objn)
{ {
#ifdef FEAT_EVAL #ifdef FEAT_EVAL
char *expr, *str; char *expr, *str;
@ -1402,8 +1399,7 @@ tclvimexpr(interp, objc, objv, objn)
* Check for internal vim errors. * Check for internal vim errors.
*/ */
static int static int
vimerror(interp) vimerror(Tcl_Interp *interp)
Tcl_Interp *interp;
{ {
if (got_int) if (got_int)
{ {
@ -1427,8 +1423,7 @@ vimerror(interp)
* tclsetdelcmd() - add Tcl callback command to a vim object * tclsetdelcmd() - add Tcl callback command to a vim object
*/ */
static void static void
delref(cref) delref(ClientData cref)
ClientData cref;
{ {
struct ref *ref = (struct ref *)cref; struct ref *ref = (struct ref *)cref;
@ -1441,13 +1436,13 @@ delref(cref)
} }
static char * static char *
tclgetref(interp, refstartP, prefix, vimobj, proc) tclgetref(
Tcl_Interp *interp; Tcl_Interp *interp,
void **refstartP; /* ptr to w_tcl_ref/b_tcl-ref member of void **refstartP, /* ptr to w_tcl_ref/b_tcl-ref member of
win_T/buf_T struct */ win_T/buf_T struct */
char *prefix; /* "win" or "buf" */ char *prefix, /* "win" or "buf" */
void *vimobj; /* win_T* or buf_T* */ void *vimobj, /* win_T* or buf_T* */
Tcl_ObjCmdProc *proc; /* winselfcmd or bufselfcmd */ Tcl_ObjCmdProc *proc) /* winselfcmd or bufselfcmd */
{ {
struct ref *ref, *unused = NULL; struct ref *ref, *unused = NULL;
static char name[VARNAME_SIZE]; static char name[VARNAME_SIZE];
@ -1501,27 +1496,23 @@ tclgetref(interp, refstartP, prefix, vimobj, proc)
} }
static char * static char *
tclgetwindow(interp, win) tclgetwindow(Tcl_Interp *interp, win_T *win)
Tcl_Interp *interp;
win_T *win;
{ {
return tclgetref(interp, &(win->w_tcl_ref), "win", (void *)win, winselfcmd); return tclgetref(interp, &(win->w_tcl_ref), "win", (void *)win, winselfcmd);
} }
static char * static char *
tclgetbuffer(interp, buf) tclgetbuffer(Tcl_Interp *interp, buf_T *buf)
Tcl_Interp *interp;
buf_T *buf;
{ {
return tclgetref(interp, &(buf->b_tcl_ref), "buf", (void *)buf, bufselfcmd); return tclgetref(interp, &(buf->b_tcl_ref), "buf", (void *)buf, bufselfcmd);
} }
static int static int
tclsetdelcmd(interp, reflist, vimobj, delcmd) tclsetdelcmd(
Tcl_Interp *interp; Tcl_Interp *interp,
struct ref *reflist; struct ref *reflist,
void *vimobj; void *vimobj,
Tcl_Obj *delcmd; Tcl_Obj *delcmd)
{ {
if (reflist == &refsdeleted) if (reflist == &refsdeleted)
{ {
@ -1555,9 +1546,7 @@ tclsetdelcmd(interp, reflist, vimobj, delcmd)
********************************************/ ********************************************/
static int static int
tcl_channel_close(instance, interp) tcl_channel_close(ClientData instance, Tcl_Interp *interp UNUSED)
ClientData instance;
Tcl_Interp *interp UNUSED;
{ {
int err = 0; int err = 0;
@ -1572,11 +1561,11 @@ tcl_channel_close(instance, interp)
} }
static int static int
tcl_channel_input(instance, buf, bufsiz, errptr) tcl_channel_input(
ClientData instance UNUSED; ClientData instance UNUSED,
char *buf UNUSED; char *buf UNUSED,
int bufsiz UNUSED; int bufsiz UNUSED,
int *errptr; int *errptr)
{ {
/* input is currently not supported */ /* input is currently not supported */
@ -1588,11 +1577,11 @@ tcl_channel_input(instance, buf, bufsiz, errptr)
} }
static int static int
tcl_channel_output(instance, buf, bufsiz, errptr) tcl_channel_output(
ClientData instance; ClientData instance,
char *buf; const char *buf,
int bufsiz; int bufsiz,
int *errptr; int *errptr)
{ {
char_u *str; char_u *str;
int result; int result;
@ -1628,18 +1617,16 @@ tcl_channel_output(instance, buf, bufsiz, errptr)
} }
static void static void
tcl_channel_watch(instance, mask) tcl_channel_watch(ClientData instance UNUSED, int mask UNUSED)
ClientData instance UNUSED;
int mask UNUSED;
{ {
Tcl_SetErrno(EINVAL); Tcl_SetErrno(EINVAL);
} }
static int static int
tcl_channel_gethandle(instance, direction, handleptr) tcl_channel_gethandle(
ClientData instance UNUSED; ClientData instance UNUSED,
int direction UNUSED; int direction UNUSED,
ClientData *handleptr UNUSED; ClientData *handleptr UNUSED)
{ {
Tcl_SetErrno(EINVAL); Tcl_SetErrno(EINVAL);
return EINVAL; return EINVAL;
@ -1682,7 +1669,7 @@ static Tcl_ChannelType tcl_channel_type =
**********************************/ **********************************/
static void static void
tclupdatevars() tclupdatevars(void)
{ {
char varname[VARNAME_SIZE]; /* must be writeable */ char varname[VARNAME_SIZE]; /* must be writeable */
char *name; char *name;
@ -1710,8 +1697,7 @@ tclupdatevars()
static int static int
tclinit(eap) tclinit(exarg_T *eap)
exarg_T *eap;
{ {
char varname[VARNAME_SIZE]; /* Tcl_LinkVar requires writeable varname */ char varname[VARNAME_SIZE]; /* Tcl_LinkVar requires writeable varname */
char *name; char *name;
@ -1820,8 +1806,7 @@ tclinit(eap)
} }
static void static void
tclerrmsg(text) tclerrmsg(char *text)
char *text;
{ {
char *next; char *next;
@ -1836,8 +1821,7 @@ tclerrmsg(text)
} }
static void static void
tclmsg(text) tclmsg(char *text)
char *text;
{ {
char *next; char *next;
@ -1852,7 +1836,7 @@ tclmsg(text)
} }
static void static void
tcldelthisinterp() tcldelthisinterp(void)
{ {
if (!Tcl_InterpDeleted(tclinfo.interp)) if (!Tcl_InterpDeleted(tclinfo.interp))
Tcl_DeleteInterp(tclinfo.interp); Tcl_DeleteInterp(tclinfo.interp);
@ -1874,8 +1858,7 @@ tcldelthisinterp()
} }
static int static int
tclexit(error) tclexit(int error)
int error;
{ {
int newerr = OK; int newerr = OK;
@ -1923,8 +1906,7 @@ tclexit(error)
* ":tcl" * ":tcl"
*/ */
void void
ex_tcl(eap) ex_tcl(exarg_T *eap)
exarg_T *eap;
{ {
char_u *script; char_u *script;
int err; int err;
@ -1950,8 +1932,7 @@ ex_tcl(eap)
* ":tclfile" * ":tclfile"
*/ */
void void
ex_tclfile(eap) ex_tclfile(exarg_T *eap)
exarg_T *eap;
{ {
char *file = (char *)eap->arg; char *file = (char *)eap->arg;
int err; int err;
@ -1969,8 +1950,7 @@ ex_tclfile(eap)
* ":tcldo" * ":tcldo"
*/ */
void void
ex_tcldo(eap) ex_tcldo(exarg_T *eap)
exarg_T *eap;
{ {
char *script, *line; char *script, *line;
int err, rs, re, lnum; int err, rs, re, lnum;
@ -2045,8 +2025,7 @@ ex_tcldo(eap)
} }
static void static void
tcldelallrefs(ref) tcldelallrefs(struct ref *ref)
struct ref *ref;
{ {
struct ref *next; struct ref *next;
int err; int err;
@ -2083,8 +2062,7 @@ tcldelallrefs(ref)
} }
void void
tcl_buffer_free(buf) tcl_buffer_free(buf_T *buf)
buf_T *buf;
{ {
struct ref *reflist; struct ref *reflist;
@ -2104,8 +2082,7 @@ tcl_buffer_free(buf)
#if defined(FEAT_WINDOWS) || defined(PROTO) #if defined(FEAT_WINDOWS) || defined(PROTO)
void void
tcl_window_free(win) tcl_window_free(win_T *win)
win_T *win;
{ {
struct ref *reflist; struct ref *reflist;

View File

@ -214,9 +214,9 @@ static char_u *empty_prop = (char_u *)""; /* empty GetRegProp() result */
* Returns FAIL or OK. * Returns FAIL or OK.
*/ */
int int
serverRegisterName(dpy, name) serverRegisterName(
Display *dpy; /* display to register with */ Display *dpy, /* display to register with */
char_u *name; /* the name that will be used as a base */ char_u *name) /* the name that will be used as a base */
{ {
int i; int i;
int res; int res;
@ -252,9 +252,7 @@ serverRegisterName(dpy, name)
} }
static int static int
DoRegisterName(dpy, name) DoRegisterName(Display *dpy, char_u *name)
Display *dpy;
char_u *name;
{ {
Window w; Window w;
XErrorHandler old_handler; XErrorHandler old_handler;
@ -332,9 +330,9 @@ DoRegisterName(dpy, name)
* Change any registered window ID. * Change any registered window ID.
*/ */
void void
serverChangeRegisteredWindow(dpy, newwin) serverChangeRegisteredWindow(
Display *dpy; /* Display to register with */ Display *dpy, /* Display to register with */
Window newwin; /* Re-register to this ID */ Window newwin) /* Re-register to this ID */
{ {
char_u propInfo[MAX_NAME_LENGTH + 20]; char_u propInfo[MAX_NAME_LENGTH + 20];
@ -368,15 +366,15 @@ serverChangeRegisteredWindow(dpy, newwin)
* Returns 0 for OK, negative for an error. * Returns 0 for OK, negative for an error.
*/ */
int int
serverSendToVim(dpy, name, cmd, result, server, asExpr, localLoop, silent) serverSendToVim(
Display *dpy; /* Where to send. */ Display *dpy, /* Where to send. */
char_u *name; /* Where to send. */ char_u *name, /* Where to send. */
char_u *cmd; /* What to send. */ char_u *cmd, /* What to send. */
char_u **result; /* Result of eval'ed expression */ char_u **result, /* Result of eval'ed expression */
Window *server; /* Actual ID of receiving app */ Window *server, /* Actual ID of receiving app */
Bool asExpr; /* Interpret as keystrokes or expr ? */ Bool asExpr, /* Interpret as keystrokes or expr ? */
Bool localLoop; /* Throw away everything but result */ Bool localLoop, /* Throw away everything but result */
int silent; /* don't complain about no server */ int silent) /* don't complain about no server */
{ {
Window w; Window w;
char_u *property; char_u *property;
@ -535,8 +533,7 @@ serverSendToVim(dpy, name, cmd, result, server, asExpr, localLoop, silent)
} }
static int static int
WaitForPend(p) WaitForPend(void *p)
void *p;
{ {
PendingCommand *pending = (PendingCommand *) p; PendingCommand *pending = (PendingCommand *) p;
return pending->result != NULL; return pending->result != NULL;
@ -546,9 +543,7 @@ WaitForPend(p)
* Return TRUE if window "w" exists and has a "Vim" property on it. * Return TRUE if window "w" exists and has a "Vim" property on it.
*/ */
static int static int
WindowValid(dpy, w) WindowValid(Display *dpy, Window w)
Display *dpy;
Window w;
{ {
XErrorHandler old_handler; XErrorHandler old_handler;
Atom *plist; Atom *plist;
@ -577,13 +572,13 @@ WindowValid(dpy, w)
* Enter a loop processing X events & polling chars until we see a result * Enter a loop processing X events & polling chars until we see a result
*/ */
static void static void
ServerWait(dpy, w, endCond, endData, localLoop, seconds) ServerWait(
Display *dpy; Display *dpy,
Window w; Window w,
EndCond endCond; EndCond endCond,
void *endData; void *endData,
int localLoop; int localLoop,
int seconds; int seconds)
{ {
time_t start; time_t start;
time_t now; time_t now;
@ -649,8 +644,7 @@ ServerWait(dpy, w, endCond, endData, localLoop, seconds)
* Returns a newline separated list in allocated memory or NULL. * Returns a newline separated list in allocated memory or NULL.
*/ */
char_u * char_u *
serverGetVimNames(dpy) serverGetVimNames(Display *dpy)
Display *dpy;
{ {
char_u *regProp; char_u *regProp;
char_u *entry; char_u *entry;
@ -704,9 +698,7 @@ serverGetVimNames(dpy)
*/ */
static struct ServerReply * static struct ServerReply *
ServerReplyFind(w, op) ServerReplyFind(Window w, enum ServerReplyOp op)
Window w;
enum ServerReplyOp op;
{ {
struct ServerReply *p; struct ServerReply *p;
struct ServerReply e; struct ServerReply e;
@ -748,8 +740,7 @@ ServerReplyFind(w, op)
* Issue an error if the id is invalid. * Issue an error if the id is invalid.
*/ */
Window Window
serverStrToWin(str) serverStrToWin(char_u *str)
char_u *str;
{ {
unsigned id = None; unsigned id = None;
@ -765,9 +756,7 @@ serverStrToWin(str)
* Return -1 if the window is invalid. * Return -1 if the window is invalid.
*/ */
int int
serverSendReply(name, str) serverSendReply(char_u *name, char_u *str)
char_u *name;
char_u *str;
{ {
char_u *property; char_u *property;
int length; int length;
@ -807,8 +796,7 @@ serverSendReply(name, str)
} }
static int static int
WaitForReply(p) WaitForReply(void *p)
void *p;
{ {
Window *w = (Window *) p; Window *w = (Window *) p;
return ServerReplyFind(*w, SROP_Find) != NULL; return ServerReplyFind(*w, SROP_Find) != NULL;
@ -820,11 +808,11 @@ WaitForReply(p)
* Return -1 if the window becomes invalid while waiting. * Return -1 if the window becomes invalid while waiting.
*/ */
int int
serverReadReply(dpy, win, str, localLoop) serverReadReply(
Display *dpy; Display *dpy,
Window win; Window win,
char_u **str; char_u **str,
int localLoop; int localLoop)
{ {
int len; int len;
char_u *s; char_u *s;
@ -858,10 +846,7 @@ serverReadReply(dpy, win, str, localLoop)
* Return TRUE and a non-malloc'ed string if there is. Else return FALSE. * Return TRUE and a non-malloc'ed string if there is. Else return FALSE.
*/ */
int int
serverPeekReply(dpy, win, str) serverPeekReply(Display *dpy, Window win, char_u **str)
Display *dpy;
Window win;
char_u **str;
{ {
struct ServerReply *p; struct ServerReply *p;
@ -882,8 +867,7 @@ serverPeekReply(dpy, win, str)
* results. * results.
*/ */
static int static int
SendInit(dpy) SendInit(Display *dpy)
Display *dpy;
{ {
XErrorHandler old_handler; XErrorHandler old_handler;
@ -939,11 +923,11 @@ SendInit(dpy)
* removed from the registry property. * removed from the registry property.
*/ */
static Window static Window
LookupName(dpy, name, delete, loose) LookupName(
Display *dpy; /* Display whose registry to check. */ Display *dpy, /* Display whose registry to check. */
char_u *name; /* Name of a server. */ char_u *name, /* Name of a server. */
int delete; /* If non-zero, delete info about name. */ int delete, /* If non-zero, delete info about name. */
char_u **loose; /* Do another search matching -999 if not found char_u **loose) /* Do another search matching -999 if not found
Return result here if a match is found */ Return result here if a match is found */
{ {
char_u *regProp, *entry; char_u *regProp, *entry;
@ -1033,9 +1017,9 @@ LookupName(dpy, name, delete, loose)
* 3. The window will mistakenly be regarded valid because of own commWindow * 3. The window will mistakenly be regarded valid because of own commWindow
*/ */
static void static void
DeleteAnyLingerer(dpy, win) DeleteAnyLingerer(
Display *dpy; /* Display whose registry to check. */ Display *dpy, /* Display whose registry to check. */
Window win; /* Window to remove */ Window win) /* Window to remove */
{ {
char_u *regProp, *entry = NULL; char_u *regProp, *entry = NULL;
char_u *p; char_u *p;
@ -1095,11 +1079,11 @@ DeleteAnyLingerer(dpy, win)
* Return OK when successful. * Return OK when successful.
*/ */
static int static int
GetRegProp(dpy, regPropp, numItemsp, domsg) GetRegProp(
Display *dpy; Display *dpy,
char_u **regPropp; char_u **regPropp,
long_u *numItemsp; long_u *numItemsp,
int domsg; /* When TRUE give error message. */ int domsg) /* When TRUE give error message. */
{ {
int result, actualFormat; int result, actualFormat;
long_u bytesAfter; long_u bytesAfter;
@ -1152,10 +1136,10 @@ GetRegProp(dpy, regPropp, numItemsp, domsg)
* response. * response.
*/ */
void void
serverEventProc(dpy, eventPtr, immediate) serverEventProc(
Display *dpy; Display *dpy,
XEvent *eventPtr; /* Information about event. */ XEvent *eventPtr, /* Information about event. */
int immediate; /* Run event immediately. Should mostly be 0. */ int immediate) /* Run event immediately. Should mostly be 0. */
{ {
char_u *propInfo; char_u *propInfo;
int result, actualFormat; int result, actualFormat;
@ -1197,9 +1181,7 @@ serverEventProc(dpy, eventPtr, immediate)
* vim is idle. * vim is idle.
*/ */
static void static void
save_in_queue(propInfo, len) save_in_queue(char_u *propInfo, long_u len)
char_u *propInfo;
long_u len;
{ {
x_queue_T *node; x_queue_T *node;
@ -1226,7 +1208,7 @@ save_in_queue(propInfo, len)
* Parses queued clientserver messages. * Parses queued clientserver messages.
*/ */
void void
server_parse_messages() server_parse_messages(void)
{ {
x_queue_T *node; x_queue_T *node;
@ -1247,7 +1229,7 @@ server_parse_messages()
* int the queue. * int the queue.
*/ */
int int
server_waiting() server_waiting(void)
{ {
return head.next != NULL && head.next != &head; return head.next != NULL && head.next != &head;
} }
@ -1258,10 +1240,10 @@ server_waiting()
* "propInfo" will be freed. * "propInfo" will be freed.
*/ */
static void static void
server_parse_message(dpy, propInfo, numItems) server_parse_message(
Display *dpy; Display *dpy,
char_u *propInfo; /* A string containing 0 or more X commands */ char_u *propInfo, /* A string containing 0 or more X commands */
long_u numItems; /* The size of propInfo in bytes. */ long_u numItems) /* The size of propInfo in bytes. */
{ {
char_u *p; char_u *p;
int code; int code;
@ -1539,12 +1521,12 @@ server_parse_message(dpy, propInfo, numItems)
* Return: 0 for OK, -1 for error * Return: 0 for OK, -1 for error
*/ */
static int static int
AppendPropCarefully(dpy, window, property, value, length) AppendPropCarefully(
Display *dpy; /* Display on which to operate. */ Display *dpy, /* Display on which to operate. */
Window window; /* Window whose property is to be modified. */ Window window, /* Window whose property is to be modified. */
Atom property; /* Name of property. */ Atom property, /* Name of property. */
char_u *value; /* Characters to append to property. */ char_u *value, /* Characters to append to property. */
int length; /* How much to append */ int length) /* How much to append */
{ {
XErrorHandler old_handler; XErrorHandler old_handler;
@ -1562,9 +1544,7 @@ AppendPropCarefully(dpy, window, property, value, length)
* Another X Error handler, just used to check for errors. * Another X Error handler, just used to check for errors.
*/ */
static int static int
x_error_check(dpy, error_event) x_error_check(Display *dpy UNUSED, XErrorEvent *error_event UNUSED)
Display *dpy UNUSED;
XErrorEvent *error_event UNUSED;
{ {
got_x_error = TRUE; got_x_error = TRUE;
return 0; return 0;
@ -1575,8 +1555,7 @@ x_error_check(dpy, error_event)
* Actually just checks if the name ends in a digit. * Actually just checks if the name ends in a digit.
*/ */
static int static int
IsSerialName(str) IsSerialName(char_u *str)
char_u *str;
{ {
int len = STRLEN(str); int len = STRLEN(str);

View File

@ -621,7 +621,7 @@ adjust_sign_name(char *filename)
or in WorkShop mode. For example, in standalone mode you may not want to or in WorkShop mode. For example, in standalone mode you may not want to
add a footer/message area or a sign gutter. */ add a footer/message area or a sign gutter. */
int int
workshop_invoked() workshop_invoked(void)
{ {
static int result = -1; static int result = -1;
if (result == -1) { if (result == -1) {
@ -735,7 +735,7 @@ void workshop_connect(XtAppContext context)
dummy = write(sd, buf, strlen(buf)); dummy = write(sd, buf, strlen(buf));
} }
void workshop_disconnect() void workshop_disconnect(void)
{ {
/* Probably need to send some message here */ /* Probably need to send some message here */

View File

@ -746,6 +746,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1208,
/**/ /**/
1207, 1207,
/**/ /**/