mirror of
https://github.com/vim/vim
synced 2025-07-16 01:01:58 +00:00
patch 7.4.1215
Problem: Using old style function declarations. Solution: Change to new style function declarations. (script by Hirohito Higashi)
This commit is contained in:
@ -14,9 +14,7 @@
|
||||
#define LINELEN 200
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
char line[LINELEN];
|
||||
char *p1, *p2;
|
||||
|
@ -94,12 +94,12 @@ static int got_x_error = FALSE;
|
||||
*/
|
||||
|
||||
char *
|
||||
sendToVim(dpy, name, cmd, asKeys, code)
|
||||
Display *dpy; /* Where to send. */
|
||||
char *name; /* Where to send. */
|
||||
char *cmd; /* What to send. */
|
||||
int asKeys; /* Interpret as keystrokes or expr ? */
|
||||
int *code; /* Return code. 0 => OK */
|
||||
sendToVim(
|
||||
Display *dpy, /* Where to send. */
|
||||
char *name, /* Where to send. */
|
||||
char *cmd, /* What to send. */
|
||||
int asKeys, /* Interpret as keystrokes or expr ? */
|
||||
int *code) /* Return code. 0 => OK */
|
||||
{
|
||||
Window w;
|
||||
Atom *plist;
|
||||
@ -245,8 +245,7 @@ sendToVim(dpy, name, cmd, asKeys, code)
|
||||
*/
|
||||
|
||||
static int
|
||||
SendInit(dpy)
|
||||
Display *dpy;
|
||||
SendInit(Display *dpy)
|
||||
{
|
||||
XErrorHandler old_handler;
|
||||
|
||||
@ -289,11 +288,11 @@ SendInit(dpy)
|
||||
*/
|
||||
|
||||
static Window
|
||||
LookupName(dpy, name, delete, loose)
|
||||
Display *dpy; /* Display whose registry to check. */
|
||||
char *name; /* Name of an interpreter. */
|
||||
int delete; /* If non-zero, delete info about name. */
|
||||
char **loose; /* Do another search matching -999 if not found
|
||||
LookupName(
|
||||
Display *dpy, /* Display whose registry to check. */
|
||||
char *name, /* Name of an interpreter. */
|
||||
int delete, /* If non-zero, delete info about name. */
|
||||
char **loose) /* Do another search matching -999 if not found
|
||||
Return result here if a match is found */
|
||||
{
|
||||
unsigned char *regProp, *entry;
|
||||
@ -396,11 +395,11 @@ LookupName(dpy, name, delete, loose)
|
||||
}
|
||||
|
||||
static char *
|
||||
SendEventProc(dpy, eventPtr, expected, code)
|
||||
Display *dpy;
|
||||
XEvent *eventPtr; /* Information about event. */
|
||||
int expected; /* The one were waiting for */
|
||||
int *code; /* Return code. 0 => OK */
|
||||
SendEventProc(
|
||||
Display *dpy,
|
||||
XEvent *eventPtr, /* Information about event. */
|
||||
int expected, /* The one were waiting for */
|
||||
int *code) /* Return code. 0 => OK */
|
||||
{
|
||||
unsigned char *propInfo;
|
||||
unsigned char *p;
|
||||
@ -535,13 +534,13 @@ SendEventProc(dpy, eventPtr, expected, code)
|
||||
*/
|
||||
|
||||
static int
|
||||
AppendPropCarefully(dpy, window, property, value, length)
|
||||
Display *dpy; /* Display on which to operate. */
|
||||
Window window; /* Window whose property is to
|
||||
AppendPropCarefully(
|
||||
Display *dpy, /* Display on which to operate. */
|
||||
Window window, /* Window whose property is to
|
||||
* be modified. */
|
||||
Atom property; /* Name of property. */
|
||||
char *value; /* Characters to append to property. */
|
||||
int length; /* How much to append */
|
||||
Atom property, /* Name of property. */
|
||||
char *value, /* Characters to append to property. */
|
||||
int length) /* How much to append */
|
||||
{
|
||||
XErrorHandler old_handler;
|
||||
|
||||
@ -560,9 +559,7 @@ AppendPropCarefully(dpy, window, property, value, length)
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
static int
|
||||
x_error_check(dpy, error_event)
|
||||
Display *dpy;
|
||||
XErrorEvent *error_event;
|
||||
x_error_check(Display *dpy, XErrorEvent *error_event)
|
||||
{
|
||||
got_x_error = TRUE;
|
||||
return 0;
|
||||
@ -573,8 +570,7 @@ x_error_check(dpy, error_event)
|
||||
* Actually just checks if the name ends in a digit.
|
||||
*/
|
||||
static int
|
||||
IsSerialName(str)
|
||||
char *str;
|
||||
IsSerialName(char *str)
|
||||
{
|
||||
int len = strlen(str);
|
||||
|
||||
|
@ -7,9 +7,7 @@
|
||||
#include <string.h>
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
main(int argc, char **argv);
|
||||
{
|
||||
char buffer[BUFSIZ];
|
||||
char *p;
|
||||
|
@ -36,7 +36,7 @@ char longVersion[sizeof(VIM_VERSION_LONG_DATE) + sizeof(__DATE__)
|
||||
+ sizeof(__TIME__) + 3];
|
||||
|
||||
void
|
||||
make_version()
|
||||
make_version(void)
|
||||
{
|
||||
/*
|
||||
* Construct the long version string. Necessary because
|
||||
@ -746,6 +746,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1215,
|
||||
/**/
|
||||
1214,
|
||||
/**/
|
||||
@ -3192,7 +3194,7 @@ static char *(extra_patches[]) =
|
||||
};
|
||||
|
||||
int
|
||||
highest_patch()
|
||||
highest_patch(void)
|
||||
{
|
||||
int i;
|
||||
int h = 0;
|
||||
@ -3208,8 +3210,7 @@ highest_patch()
|
||||
* Return TRUE if patch "n" has been included.
|
||||
*/
|
||||
int
|
||||
has_patch(n)
|
||||
int n;
|
||||
has_patch(int n)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -3221,8 +3222,7 @@ has_patch(n)
|
||||
#endif
|
||||
|
||||
void
|
||||
ex_version(eap)
|
||||
exarg_T *eap;
|
||||
ex_version(exarg_T *eap)
|
||||
{
|
||||
/*
|
||||
* Ignore a ":version 9.99" command.
|
||||
@ -3238,7 +3238,7 @@ ex_version(eap)
|
||||
* List all features aligned in columns, dictionary style.
|
||||
*/
|
||||
static void
|
||||
list_features()
|
||||
list_features(void)
|
||||
{
|
||||
int i;
|
||||
int ncol;
|
||||
@ -3305,7 +3305,7 @@ list_features()
|
||||
}
|
||||
|
||||
void
|
||||
list_version()
|
||||
list_version(void)
|
||||
{
|
||||
int i;
|
||||
int first;
|
||||
@ -3598,8 +3598,7 @@ list_version()
|
||||
* newline, unless the message is too long to fit on the screen anyway.
|
||||
*/
|
||||
static void
|
||||
version_msg(s)
|
||||
char *s;
|
||||
version_msg(char *s)
|
||||
{
|
||||
int len = (int)STRLEN(s);
|
||||
|
||||
@ -3616,7 +3615,7 @@ static void do_intro_line(int row, char_u *mesg, int add_version, int attr);
|
||||
* Show the intro message when not editing a file.
|
||||
*/
|
||||
void
|
||||
maybe_intro_message()
|
||||
maybe_intro_message(void)
|
||||
{
|
||||
if (bufempty()
|
||||
&& curbuf->b_fname == NULL
|
||||
@ -3633,8 +3632,8 @@ maybe_intro_message()
|
||||
* Or with the ":intro" command (for Sven :-).
|
||||
*/
|
||||
void
|
||||
intro_message(colon)
|
||||
int colon; /* TRUE for ":intro" */
|
||||
intro_message(
|
||||
int colon) /* TRUE for ":intro" */
|
||||
{
|
||||
int i;
|
||||
int row;
|
||||
@ -3765,11 +3764,11 @@ intro_message(colon)
|
||||
}
|
||||
|
||||
static void
|
||||
do_intro_line(row, mesg, add_version, attr)
|
||||
int row;
|
||||
char_u *mesg;
|
||||
int add_version;
|
||||
int attr;
|
||||
do_intro_line(
|
||||
int row,
|
||||
char_u *mesg,
|
||||
int add_version,
|
||||
int attr)
|
||||
{
|
||||
char_u vers[20];
|
||||
int col;
|
||||
@ -3842,8 +3841,7 @@ do_intro_line(row, mesg, add_version, attr)
|
||||
* ":intro": clear screen, display intro screen and wait for return.
|
||||
*/
|
||||
void
|
||||
ex_intro(eap)
|
||||
exarg_T *eap UNUSED;
|
||||
ex_intro(exarg_T *eap UNUSED)
|
||||
{
|
||||
screenclear();
|
||||
intro_message(TRUE);
|
||||
|
@ -779,11 +779,11 @@ utf16_to_enc(short_u *str, int *lenp)
|
||||
* The result is in allocated memory: "out[outlen]". With terminating NUL.
|
||||
*/
|
||||
void
|
||||
acp_to_enc(str, str_size, out, outlen)
|
||||
char_u *str;
|
||||
int str_size;
|
||||
char_u **out;
|
||||
int *outlen;
|
||||
acp_to_enc(
|
||||
char_u *str,
|
||||
int str_size,
|
||||
char_u **out,
|
||||
int *outlen)
|
||||
|
||||
{
|
||||
LPWSTR widestr;
|
||||
@ -804,11 +804,11 @@ acp_to_enc(str, str_size, out, outlen)
|
||||
* The result is in allocated memory: "out[outlen]". With terminating NUL.
|
||||
*/
|
||||
void
|
||||
enc_to_acp(str, str_size, out, outlen)
|
||||
char_u *str;
|
||||
int str_size;
|
||||
char_u **out;
|
||||
int *outlen;
|
||||
enc_to_acp(
|
||||
char_u *str,
|
||||
int str_size,
|
||||
char_u **out,
|
||||
int *outlen)
|
||||
|
||||
{
|
||||
LPWSTR widestr;
|
||||
|
593
src/window.c
593
src/window.c
File diff suppressed because it is too large
Load Diff
@ -98,7 +98,7 @@ static char *initialFileCmd; /* save command but defer doing it */
|
||||
|
||||
|
||||
void
|
||||
workshop_init()
|
||||
workshop_init(void)
|
||||
{
|
||||
char_u buf[64];
|
||||
int is_dirty = FALSE;
|
||||
@ -148,7 +148,7 @@ workshop_init()
|
||||
}
|
||||
|
||||
void
|
||||
workshop_postinit()
|
||||
workshop_postinit(void)
|
||||
{
|
||||
do_cmdline_cmd((char_u *)initialFileCmd);
|
||||
ALT_INPUT_LOCK_OFF;
|
||||
@ -170,7 +170,7 @@ ex_wsverb(exarg_T *eap)
|
||||
* of NEdit, for example, when the connection is initiated from the editor.
|
||||
*/
|
||||
char *
|
||||
workshop_get_editor_name()
|
||||
workshop_get_editor_name(void)
|
||||
{
|
||||
return "gvim";
|
||||
}
|
||||
@ -181,7 +181,7 @@ workshop_get_editor_name()
|
||||
* version to the application.
|
||||
*/
|
||||
char *
|
||||
workshop_get_editor_version()
|
||||
workshop_get_editor_version(void)
|
||||
{
|
||||
return Version;
|
||||
}
|
||||
@ -288,7 +288,7 @@ workshop_save_file(
|
||||
}
|
||||
|
||||
void
|
||||
workshop_save_files()
|
||||
workshop_save_files(void)
|
||||
{
|
||||
/* Save the given file */
|
||||
#ifdef WSDEBUG_TRACE
|
||||
@ -300,7 +300,7 @@ workshop_save_files()
|
||||
}
|
||||
|
||||
void
|
||||
workshop_quit()
|
||||
workshop_quit(void)
|
||||
{
|
||||
#ifdef WSDEBUG_TRACE
|
||||
if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
|
||||
@ -311,7 +311,7 @@ workshop_quit()
|
||||
}
|
||||
|
||||
void
|
||||
workshop_minimize()
|
||||
workshop_minimize(void)
|
||||
{
|
||||
#ifdef WSDEBUG_TRACE
|
||||
if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
|
||||
@ -320,7 +320,7 @@ workshop_minimize()
|
||||
workshop_minimize_shell(vimShell);
|
||||
}
|
||||
void
|
||||
workshop_maximize()
|
||||
workshop_maximize(void)
|
||||
{
|
||||
#ifdef WSDEBUG_TRACE
|
||||
if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
|
||||
@ -510,7 +510,7 @@ workshop_moved_marks(char *filename UNUSED)
|
||||
}
|
||||
|
||||
int
|
||||
workshop_get_font_height()
|
||||
workshop_get_font_height(void)
|
||||
{
|
||||
XmFontList fontList; /* fontList made from gui.norm_font */
|
||||
XmString str;
|
||||
@ -623,7 +623,7 @@ workshop_submenu_begin(
|
||||
*/
|
||||
|
||||
void
|
||||
workshop_submenu_end()
|
||||
workshop_submenu_end(void)
|
||||
{
|
||||
char *p;
|
||||
|
||||
@ -720,7 +720,7 @@ workshop_menu_item(
|
||||
*/
|
||||
|
||||
void
|
||||
workshop_menu_end()
|
||||
workshop_menu_end(void)
|
||||
{
|
||||
Boolean using_tearoff; /* set per current option setting */
|
||||
|
||||
@ -734,7 +734,7 @@ workshop_menu_end()
|
||||
}
|
||||
|
||||
void
|
||||
workshop_toolbar_begin()
|
||||
workshop_toolbar_begin(void)
|
||||
{
|
||||
#ifdef WSDEBUG_TRACE
|
||||
if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
|
||||
@ -746,7 +746,7 @@ workshop_toolbar_begin()
|
||||
}
|
||||
|
||||
void
|
||||
workshop_toolbar_end()
|
||||
workshop_toolbar_end(void)
|
||||
{
|
||||
char_u buf[64];
|
||||
|
||||
@ -1405,7 +1405,7 @@ fixup(
|
||||
/* For the NoHands test suite */
|
||||
|
||||
char *
|
||||
workshop_test_getcurrentfile()
|
||||
workshop_test_getcurrentfile(void)
|
||||
{
|
||||
char *filename, *selection;
|
||||
int curLine, curCol, selStartLine, selStartCol, selEndLine;
|
||||
@ -1421,13 +1421,13 @@ workshop_test_getcurrentfile()
|
||||
}
|
||||
|
||||
int
|
||||
workshop_test_getcursorrow()
|
||||
workshop_test_getcursorrow(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
workshop_test_getcursorcol()
|
||||
workshop_test_getcursorcol(void)
|
||||
{
|
||||
char *filename, *selection;
|
||||
int curLine, curCol, selStartLine, selStartCol, selEndLine;
|
||||
@ -1443,13 +1443,13 @@ workshop_test_getcursorcol()
|
||||
}
|
||||
|
||||
char *
|
||||
workshop_test_getcursorrowtext()
|
||||
workshop_test_getcursorrowtext(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
char *
|
||||
workshop_test_getselectedtext()
|
||||
workshop_test_getselectedtext(void)
|
||||
{
|
||||
char *filename, *selection;
|
||||
int curLine, curCol, selStartLine, selStartCol, selEndLine;
|
||||
|
@ -28,10 +28,10 @@
|
||||
* "hShape".
|
||||
*/
|
||||
int
|
||||
LoadXpmImage(filename, hImage, hShape)
|
||||
char *filename;
|
||||
HBITMAP *hImage;
|
||||
HBITMAP *hShape;
|
||||
LoadXpmImage(
|
||||
char *filename,
|
||||
HBITMAP *hImage,
|
||||
HBITMAP *hShape)
|
||||
{
|
||||
XImage *img; /* loaded image */
|
||||
XImage *shp; /* shapeimage */
|
||||
|
@ -234,7 +234,7 @@ char hexxa[] = "0123456789abcdef0123456789ABCDEF", *hexx = hexxa;
|
||||
static char *pname;
|
||||
|
||||
static void
|
||||
exit_with_usage()
|
||||
exit_with_usage(void)
|
||||
{
|
||||
fprintf(stderr, "Usage:\n %s [options] [infile [outfile]]\n", pname);
|
||||
fprintf(stderr, " or\n %s -r [-s [-]offset] [-c cols] [-ps] [infile [outfile]]\n", pname);
|
||||
@ -264,8 +264,7 @@ exit_with_usage()
|
||||
}
|
||||
|
||||
static void
|
||||
die(ret)
|
||||
int ret;
|
||||
die(int ret)
|
||||
{
|
||||
fprintf(stderr, "%s: ", pname);
|
||||
perror(NULL);
|
||||
@ -280,10 +279,13 @@ die(ret)
|
||||
* The name is historic and came from 'undo type opt h'.
|
||||
*/
|
||||
static int
|
||||
huntype(fpi, fpo, fperr, cols, hextype, base_off)
|
||||
FILE *fpi, *fpo, *fperr;
|
||||
int cols, hextype;
|
||||
long base_off;
|
||||
huntype(
|
||||
FILE *fpi,
|
||||
FILE *fpo,
|
||||
FILE *fperr,
|
||||
int cols,
|
||||
int hextype,
|
||||
long base_off)
|
||||
{
|
||||
int c, ign_garb = 1, n1 = -1, n2 = 0, n3, p = cols;
|
||||
long have_off = 0, want_off = 0;
|
||||
@ -409,10 +411,7 @@ huntype(fpi, fpo, fperr, cols, hextype, base_off)
|
||||
* If nz is always positive, lines are never suppressed.
|
||||
*/
|
||||
static void
|
||||
xxdline(fp, l, nz)
|
||||
FILE *fp;
|
||||
char *l;
|
||||
int nz;
|
||||
xxdline(FILE *fp, char *l, int nz)
|
||||
{
|
||||
static char z[LLEN+1];
|
||||
static int zero_seen = 0;
|
||||
@ -472,9 +471,7 @@ static unsigned char etoa64[] =
|
||||
};
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
FILE *fp, *fpo;
|
||||
int c, e, p = 0, relseek = 1, negseek = 0, revert = 0;
|
||||
|
Reference in New Issue
Block a user