summaryrefslogtreecommitdiff
path: root/src/ex_cmds.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-01-30 15:52:46 +0100
committerBram Moolenaar <Bram@vim.org>2016-01-30 15:52:46 +0100
commit78c0b7d43e5048fd71d12816659667834170c76d (patch)
treef2b1c0d69cb07d050087eb1695f5c4457248d94c /src/ex_cmds.c
parent7454a06e2642d2b37afad1c5e71cec68081ca4ff (diff)
downloadvim-git-78c0b7d43e5048fd71d12816659667834170c76d.tar.gz
patch 7.4.1206v7.4.1206
Problem: Using old style function declarations. Solution: Change to new style function declarations. (script by Hirohito Higashi)
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r--src/ex_cmds.c358
1 files changed, 145 insertions, 213 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index e9630ee07..9b2a1932f 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -44,8 +44,7 @@ static void prepare_help_buffer(void);
* ":ascii" and "ga".
*/
void
-do_ascii(eap)
- exarg_T *eap UNUSED;
+do_ascii(exarg_T *eap UNUSED)
{
int c;
int cval;
@@ -144,8 +143,7 @@ do_ascii(eap)
* ":left", ":center" and ":right": align text.
*/
void
-ex_align(eap)
- exarg_T *eap;
+ex_align(exarg_T *eap)
{
pos_T save_curpos;
int len;
@@ -247,8 +245,7 @@ ex_align(eap)
* Get the length of the current line, excluding trailing white space.
*/
static int
-linelen(has_tab)
- int *has_tab;
+linelen(int *has_tab)
{
char_u *line;
char_u *first;
@@ -315,9 +312,7 @@ sort_compare(const void *s1, const void *s2);
#ifdef __BORLANDC__
_RTLENTRYF
#endif
-sort_compare(s1, s2)
- const void *s1;
- const void *s2;
+sort_compare(const void *s1, const void *s2)
{
sorti_T l1 = *(sorti_T *)s1;
sorti_T l2 = *(sorti_T *)s2;
@@ -368,8 +363,7 @@ sort_compare(s1, s2)
* ":sort".
*/
void
-ex_sort(eap)
- exarg_T *eap;
+ex_sort(exarg_T *eap)
{
regmatch_T regmatch;
int len;
@@ -648,8 +642,7 @@ sortend:
* ":retab".
*/
void
-ex_retab(eap)
- exarg_T *eap;
+ex_retab(exarg_T *eap)
{
linenr_T lnum;
int got_tab = FALSE;
@@ -798,10 +791,7 @@ ex_retab(eap)
* return FAIL for failure, OK otherwise
*/
int
-do_move(line1, line2, dest)
- linenr_T line1;
- linenr_T line2;
- linenr_T dest;
+do_move(linenr_T line1, linenr_T line2, linenr_T dest)
{
char_u *str;
linenr_T l;
@@ -929,10 +919,7 @@ do_move(line1, line2, dest)
* ":copy"
*/
void
-ex_copy(line1, line2, n)
- linenr_T line1;
- linenr_T line2;
- linenr_T n;
+ex_copy(linenr_T line1, linenr_T line2, linenr_T n)
{
linenr_T count;
char_u *p;
@@ -987,7 +974,7 @@ static char_u *prevcmd = NULL; /* the previous command */
#if defined(EXITFREE) || defined(PROTO)
void
-free_prev_shellcmd()
+free_prev_shellcmd(void)
{
vim_free(prevcmd);
}
@@ -999,11 +986,12 @@ free_prev_shellcmd()
* Remember the argument.
*/
void
-do_bang(addr_count, eap, forceit, do_in, do_out)
- int addr_count;
- exarg_T *eap;
- int forceit;
- int do_in, do_out;
+do_bang(
+ int addr_count,
+ exarg_T *eap,
+ int forceit,
+ int do_in,
+ int do_out)
{
char_u *arg = eap->arg; /* command */
linenr_T line1 = eap->line1; /* start of range */
@@ -1165,11 +1153,13 @@ do_bang(addr_count, eap, forceit, do_in, do_out)
* We use output redirection if do_out is TRUE.
*/
static void
-do_filter(line1, line2, eap, cmd, do_in, do_out)
- linenr_T line1, line2;
- exarg_T *eap; /* for forced 'ff' and 'fenc' */
- char_u *cmd;
- int do_in, do_out;
+do_filter(
+ linenr_T line1,
+ linenr_T line2,
+ exarg_T *eap, /* for forced 'ff' and 'fenc' */
+ char_u *cmd,
+ int do_in,
+ int do_out)
{
char_u *itmp = NULL;
char_u *otmp = NULL;
@@ -1445,9 +1435,9 @@ filterend:
* When "cmd" is NULL start an interactive shell.
*/
void
-do_shell(cmd, flags)
- char_u *cmd;
- int flags; /* may be SHELL_DOOUT when output is redirected */
+do_shell(
+ char_u *cmd,
+ int flags) /* may be SHELL_DOOUT when output is redirected */
{
buf_T *buf;
#ifndef FEAT_GUI_MSWIN
@@ -1628,10 +1618,10 @@ do_shell(cmd, flags)
* Returns an allocated string with the shell command, or NULL for failure.
*/
char_u *
-make_filter_cmd(cmd, itmp, otmp)
- char_u *cmd; /* command */
- char_u *itmp; /* NULL or name of input file */
- char_u *otmp; /* NULL or name of output file */
+make_filter_cmd(
+ char_u *cmd, /* command */
+ char_u *itmp, /* NULL or name of input file */
+ char_u *otmp) /* NULL or name of output file */
{
char_u *buf;
long_u len;
@@ -1723,11 +1713,11 @@ make_filter_cmd(cmd, itmp, otmp)
* STRLEN(opt) + STRLEN(fname) + 3
*/
void
-append_redir(buf, buflen, opt, fname)
- char_u *buf;
- int buflen;
- char_u *opt;
- char_u *fname;
+append_redir(
+ char_u *buf,
+ int buflen,
+ char_u *opt,
+ char_u *fname)
{
char_u *p;
char_u *end;
@@ -1764,7 +1754,7 @@ static void write_viminfo_barlines(vir_T *virp, FILE *fp_out);
static int viminfo_errcnt;
static int
-no_viminfo()
+no_viminfo(void)
{
/* "vim -i NONE" does not read or write a viminfo file */
return (use_viminfo != NULL && STRCMP(use_viminfo, "NONE") == 0);
@@ -1775,10 +1765,7 @@ no_viminfo()
* Count the number of errors. When there are more than 10, return TRUE.
*/
int
-viminfo_error(errnum, message, line)
- char *errnum;
- char *message;
- char_u *line;
+viminfo_error(char *errnum, char *message, char_u *line)
{
vim_snprintf((char *)IObuff, IOSIZE, _("%sviminfo: %s in line: "),
errnum, message);
@@ -1799,9 +1786,9 @@ viminfo_error(errnum, message, line)
* set are not over-written unless "flags" includes VIF_FORCEIT. -- webb
*/
int
-read_viminfo(file, flags)
- char_u *file; /* file name or NULL to use default name */
- int flags; /* VIF_WANT_INFO et al. */
+read_viminfo(
+ char_u *file, /* file name or NULL to use default name */
+ int flags) /* VIF_WANT_INFO et al. */
{
FILE *fp;
char_u *fname;
@@ -1845,9 +1832,7 @@ read_viminfo(file, flags)
* info is written to the file.
*/
void
-write_viminfo(file, forceit)
- char_u *file;
- int forceit;
+write_viminfo(char_u *file, int forceit)
{
char_u *fname;
FILE *fp_in = NULL; /* input viminfo file, if any */
@@ -2120,8 +2105,7 @@ end:
* Returns an allocated string. NULL when out of memory.
*/
static char_u *
-viminfo_filename(file)
- char_u *file;
+viminfo_filename(char_u *file)
{
if (file == NULL || *file == NUL)
{
@@ -2158,10 +2142,7 @@ viminfo_filename(file)
* do_viminfo() -- Should only be called from read_viminfo() & write_viminfo().
*/
static void
-do_viminfo(fp_in, fp_out, flags)
- FILE *fp_in;
- FILE *fp_out;
- int flags;
+do_viminfo(FILE *fp_in, FILE *fp_out, int flags)
{
int count = 0;
int eof = FALSE;
@@ -2232,10 +2213,10 @@ do_viminfo(fp_in, fp_out, flags)
* are local to a file. Returns TRUE when end-of-file is reached. -- webb
*/
static int
-read_viminfo_up_to_marks(virp, forceit, writing)
- vir_T *virp;
- int forceit;
- int writing;
+read_viminfo_up_to_marks(
+ vir_T *virp,
+ int forceit,
+ int writing)
{
int eof;
buf_T *buf;
@@ -2331,8 +2312,7 @@ read_viminfo_up_to_marks(virp, forceit, writing)
* conversion of text with iconv() in viminfo_readstring().
*/
static int
-viminfo_encoding(virp)
- vir_T *virp;
+viminfo_encoding(vir_T *virp)
{
#ifdef FEAT_MBYTE
char_u *p;
@@ -2361,8 +2341,7 @@ viminfo_encoding(virp)
* Returns TRUE for end-of-file;
*/
int
-viminfo_readline(virp)
- vir_T *virp;
+viminfo_readline(vir_T *virp)
{
return vim_fgets(virp->vir_line, LSIZE, virp->vir_fd);
}
@@ -2378,10 +2357,10 @@ viminfo_readline(virp)
* Return the string in allocated memory (NULL when out of memory).
*/
char_u *
-viminfo_readstring(virp, off, convert)
- vir_T *virp;
- int off; /* offset for virp->vir_line */
- int convert UNUSED; /* convert the string */
+viminfo_readstring(
+ vir_T *virp,
+ int off, /* offset for virp->vir_line */
+ int convert UNUSED) /* convert the string */
{
char_u *retval;
char_u *s, *d;
@@ -2451,9 +2430,7 @@ viminfo_readstring(virp, off, convert)
* - write " < <string> \n " in second line
*/
void
-viminfo_writestring(fd, p)
- FILE *fd;
- char_u *p;
+viminfo_writestring(FILE *fd, char_u *p)
{
int c;
char_u *s;
@@ -2509,8 +2486,7 @@ write_viminfo_barlines(vir_T *virp, FILE *fp_out)
* not ^? ^?
*/
void
-do_fixdel(eap)
- exarg_T *eap UNUSED;
+do_fixdel(exarg_T *eap UNUSED)
{
char_u *p;
@@ -2520,10 +2496,10 @@ do_fixdel(eap)
}
void
-print_line_no_prefix(lnum, use_number, list)
- linenr_T lnum;
- int use_number;
- int list;
+print_line_no_prefix(
+ linenr_T lnum,
+ int use_number,
+ int list)
{
char_u numbuf[30];
@@ -2540,10 +2516,7 @@ print_line_no_prefix(lnum, use_number, list)
* Print a text line. Also in silent mode ("ex -s").
*/
void
-print_line(lnum, use_number, list)
- linenr_T lnum;
- int use_number;
- int list;
+print_line(linenr_T lnum, int use_number, int list)
{
int save_silent = silent_mode;
@@ -2562,8 +2535,7 @@ print_line(lnum, use_number, list)
}
int
-rename_buffer(new_fname)
- char_u *new_fname;
+rename_buffer(char_u *new_fname)
{
char_u *fname, *sfname, *xfname;
buf_T *buf;
@@ -2618,8 +2590,7 @@ rename_buffer(new_fname)
* ":file[!] [fname]".
*/
void
-ex_file(eap)
- exarg_T *eap;
+ex_file(exarg_T *eap)
{
/* ":0file" removes the file name. Check for illegal uses ":3file",
* "0file name", etc. */
@@ -2645,8 +2616,7 @@ ex_file(eap)
* ":update".
*/
void
-ex_update(eap)
- exarg_T *eap;
+ex_update(exarg_T *eap)
{
if (curbufIsChanged())
(void)do_write(eap);
@@ -2656,8 +2626,7 @@ ex_update(eap)
* ":write" and ":saveas".
*/
void
-ex_write(eap)
- exarg_T *eap;
+ex_write(exarg_T *eap)
{
if (eap->usefilter) /* input lines to shell command */
do_bang(1, eap, FALSE, TRUE, FALSE);
@@ -2674,8 +2643,7 @@ ex_write(eap)
* return FAIL for failure, OK otherwise
*/
int
-do_write(eap)
- exarg_T *eap;
+do_write(exarg_T *eap)
{
int other;
char_u *fname = NULL; /* init to shut up gcc */
@@ -2886,13 +2854,13 @@ theend:
* Return OK if it's OK, FAIL if it is not.
*/
int
-check_overwrite(eap, buf, fname, ffname, other)
- exarg_T *eap;
- buf_T *buf;
- char_u *fname; /* file name to be used (can differ from
+check_overwrite(
+ exarg_T *eap,
+ buf_T *buf,
+ char_u *fname, /* file name to be used (can differ from
buf->ffname) */
- char_u *ffname; /* full path version of fname */
- int other; /* writing under other name */
+ char_u *ffname, /* full path version of fname */
+ int other) /* writing under other name */
{
/*
* write to other file or b_flags set or not writing the whole file:
@@ -3005,8 +2973,7 @@ check_overwrite(eap, buf, fname, ffname, other)
* Handle ":wnext", ":wNext" and ":wprevious" commands.
*/
void
-ex_wnext(eap)
- exarg_T *eap;
+ex_wnext(exarg_T *eap)
{
int i;
@@ -3024,8 +2991,7 @@ ex_wnext(eap)
* ":wall", ":wqall" and ":xall": Write all changed files (and exit).
*/
void
-do_wqall(eap)
- exarg_T *eap;
+do_wqall(exarg_T *eap)
{
buf_T *buf;
int error = 0;
@@ -3092,7 +3058,7 @@ do_wqall(eap)
* Return TRUE and give a message when it's not st.
*/
int
-not_writing()
+not_writing(void)
{
if (p_write)
return FALSE;
@@ -3106,9 +3072,7 @@ not_writing()
* message when the buffer is readonly.
*/
static int
-check_readonly(forceit, buf)
- int *forceit;
- buf_T *buf;
+check_readonly(int *forceit, buf_T *buf)
{
struct stat st;
@@ -3163,13 +3127,13 @@ check_readonly(forceit, buf)
* 'lnum' is the line number for the cursor in the new file (if non-zero).
*/
int
-getfile(fnum, ffname, sfname, setpm, lnum, forceit)
- int fnum;
- char_u *ffname;
- char_u *sfname;
- int setpm;
- linenr_T lnum;
- int forceit;
+getfile(
+ int fnum,
+ char_u *ffname,
+ char_u *sfname,
+ int setpm,
+ linenr_T lnum,
+ int forceit)
{
int other;
int retval;
@@ -3264,14 +3228,14 @@ theend:
* return FAIL for failure, OK otherwise
*/
int
-do_ecmd(fnum, ffname, sfname, eap, newlnum, flags, oldwin)
- int fnum;
- char_u *ffname;
- char_u *sfname;
- exarg_T *eap; /* can be NULL! */
- linenr_T newlnum;
- int flags;
- win_T *oldwin;
+do_ecmd(
+ int fnum,
+ char_u *ffname,
+ char_u *sfname,
+ exarg_T *eap, /* can be NULL! */
+ linenr_T newlnum,
+ int flags,
+ win_T *oldwin)
{
int other_file; /* TRUE if editing another file */
int oldbuf; /* TRUE if using existing buffer */
@@ -3982,8 +3946,7 @@ theend:
#ifdef FEAT_AUTOCMD
static void
-delbuf_msg(name)
- char_u *name;
+delbuf_msg(char_u *name)
{
EMSG2(_("E143: Autocommands unexpectedly deleted new buffer %s"),
name == NULL ? (char_u *)"" : name);
@@ -3998,8 +3961,7 @@ static int append_indent = 0; /* autoindent for first line */
* ":insert" and ":append", also used by ":change"
*/
void
-ex_append(eap)
- exarg_T *eap;
+ex_append(exarg_T *eap)
{
char_u *theline;
int did_undo = FALSE;
@@ -4143,8 +4105,7 @@ ex_append(eap)
* ":change"
*/
void
-ex_change(eap)
- exarg_T *eap;
+ex_change(exarg_T *eap)
{
linenr_T lnum;
@@ -4173,8 +4134,7 @@ ex_change(eap)
}
void
-ex_z(eap)
- exarg_T *eap;
+ex_z(exarg_T *eap)
{
char_u *x;
int bigness;
@@ -4304,7 +4264,7 @@ ex_z(eap)
* Otherwise, return FALSE.
*/
int
-check_restricted()
+check_restricted(void)
{
if (restricted)
{
@@ -4320,7 +4280,7 @@ check_restricted()
* Otherwise, return FALSE.
*/
int
-check_secure()
+check_secure(void)
{
if (secure)
{
@@ -4355,8 +4315,7 @@ static int global_need_beginline; /* call beginline() after ":g" */
* The usual escapes are supported as described in the regexp docs.
*/
void
-do_sub(eap)
- exarg_T *eap;
+do_sub(exarg_T *eap)
{
linenr_T lnum;
long i = 0;
@@ -5434,8 +5393,8 @@ outofmem:
* Return TRUE if a message was given.
*/
int
-do_sub_msg(count_only)
- int count_only; /* used 'n' flag for ":s" */
+do_sub_msg(
+ int count_only) /* used 'n' flag for ":s" */
{
/*
* Only report substitutions when:
@@ -5494,8 +5453,7 @@ do_sub_msg(count_only)
* lines we do not know where to search for the next match.
*/
void
-ex_global(eap)
- exarg_T *eap;
+ex_global(exarg_T *eap)
{
linenr_T lnum; /* line number according to old situation */
int ndone = 0;
@@ -5615,8 +5573,7 @@ ex_global(eap)
* Execute "cmd" on lines marked with ml_setmarked().
*/
void
-global_exe(cmd)
- char_u *cmd;
+global_exe(char_u *cmd)
{
linenr_T old_lcount; /* b_ml.ml_line_count before the command */
buf_T *old_buf = curbuf; /* remember what buffer we started in */
@@ -5673,9 +5630,7 @@ global_exe(cmd)
#ifdef FEAT_VIMINFO
int
-read_viminfo_sub_string(virp, force)
- vir_T *virp;
- int force;
+read_viminfo_sub_string(vir_T *virp, int force)
{
if (force)
vim_free(old_sub);
@@ -5685,8 +5640,7 @@ read_viminfo_sub_string(virp, force)
}
void
-write_viminfo_sub_string(fp)
- FILE *fp;
+write_viminfo_sub_string(FILE *fp)
{
if (get_viminfo_parameter('/') != 0 && old_sub != NULL)
{
@@ -5698,7 +5652,7 @@ write_viminfo_sub_string(fp)
#if defined(EXITFREE) || defined(PROTO)
void
-free_old_sub()
+free_old_sub(void)
{
vim_free(old_sub);
}
@@ -5710,8 +5664,8 @@ free_old_sub()
* Return TRUE when it was created.
*/
int
-prepare_tagpreview(undo_sync)
- int undo_sync; /* sync undo when leaving the window */
+prepare_tagpreview(
+ int undo_sync) /* sync undo when leaving the window */
{
win_T *wp;
@@ -5760,8 +5714,7 @@ prepare_tagpreview(undo_sync)
* ":help": open a read-only window on a help file
*/
void
-ex_help(eap)
- exarg_T *eap;
+ex_help(exarg_T *eap)
{
char_u *arg;
char_u *tag;
@@ -5978,8 +5931,7 @@ erret:
* ":helpclose": Close one help window
*/
void
-ex_helpclose(eap)
- exarg_T *eap UNUSED;
+ex_helpclose(exarg_T *eap UNUSED)
{
#if defined(FEAT_WINDOWS)
win_T *win;
@@ -6002,8 +5954,7 @@ ex_helpclose(eap)
* Returns NULL if not found.
*/
char_u *
-check_help_lang(arg)
- char_u *arg;
+check_help_lang(char_u *arg)
{
int len = (int)STRLEN(arg);
@@ -6029,10 +5980,10 @@ check_help_lang(arg)
* match some string for which help is requested. webb.
*/
int
-help_heuristic(matched_string, offset, wrong_case)
- char_u *matched_string;
- int offset; /* offset for match */
- int wrong_case; /* no matching case */
+help_heuristic(
+ char_u *matched_string,
+ int offset, /* offset for match */
+ int wrong_case) /* no matching case */
{
int num_letters;
char_u *p;
@@ -6073,9 +6024,7 @@ help_heuristic(matched_string, offset, wrong_case)
#ifdef __BORLANDC__
_RTLENTRYF
#endif
-help_compare(s1, s2)
- const void *s1;
- const void *s2;
+help_compare(const void *s1, const void *s2)
{
char *p1;
char *p2;
@@ -6092,11 +6041,11 @@ help_compare(s1, s2)
* When "keep_lang" is TRUE try keeping the language of the current buffer.
*/
int
-find_help_tags(arg, num_matches, matches, keep_lang)
- char_u *arg;
- int *num_matches;
- char_u ***matches;
- int keep_lang;
+find_help_tags(
+ char_u *arg,
+ int *num_matches,
+ char_u ***matches,
+ int keep_lang)
{
char_u *s, *d;
int i;
@@ -6300,7 +6249,7 @@ find_help_tags(arg, num_matches, matches, keep_lang)
* Called when starting to edit a buffer for a help file.
*/
static void
-prepare_help_buffer()
+prepare_help_buffer(void)
{
char_u *p;
@@ -6368,7 +6317,7 @@ prepare_help_buffer()
* highlighting is not used.
*/
void
-fix_help_buffer()
+fix_help_buffer(void)
{
linenr_T lnum;
char_u *line;
@@ -6610,8 +6559,7 @@ fix_help_buffer()
* ":exusage"
*/
void
-ex_exusage(eap)
- exarg_T *eap UNUSED;
+ex_exusage(exarg_T *eap UNUSED)
{
do_cmdline_cmd((char_u *)"help ex-cmd-index");
}
@@ -6620,8 +6568,7 @@ ex_exusage(eap)
* ":viusage"
*/
void
-ex_viusage(eap)
- exarg_T *eap UNUSED;
+ex_viusage(exarg_T *eap UNUSED)
{
do_cmdline_cmd((char_u *)"help normal-index");
}
@@ -6633,8 +6580,7 @@ static void helptags_one(char_u *dir, char_u *ext, char_u *lang, int add_help_ta
* ":helptags"
*/
void
-ex_helptags(eap)
- exarg_T *eap;
+ex_helptags(exarg_T *eap)
{
garray_T ga;
int i, j;
@@ -6758,11 +6704,11 @@ ex_helptags(eap)
}
static void
-helptags_one(dir, ext, tagfname, add_help_tags)
- char_u *dir; /* doc directory */
- char_u *ext; /* suffix, ".txt", ".itx", ".frx", etc. */
- char_u *tagfname; /* "tags" for English, "tags-fr" for French. */
- int add_help_tags; /* add "help-tags" tag */
+helptags_one(
+ char_u *dir, /* doc directory */
+ char_u *ext, /* suffix, ".txt", ".itx", ".frx", etc. */
+ char_u *tagfname, /* "tags" for English, "tags-fr" for French. */
+ int add_help_tags) /* add "help-tags" tag */
{
FILE *fd_tags;
FILE *fd;
@@ -7064,9 +7010,9 @@ static char *cmds[] = {
* "*end_cmd" must be writable.
*/
static int
-sign_cmd_idx(begin_cmd, end_cmd)
- char_u *begin_cmd; /* begin of sign subcmd */
- char_u *end_cmd; /* just after sign subcmd */
+sign_cmd_idx(
+ char_u *begin_cmd, /* begin of sign subcmd */
+ char_u *end_cmd) /* just after sign subcmd */
{
int idx;
char save = *end_cmd;
@@ -7083,8 +7029,7 @@ sign_cmd_idx(begin_cmd, end_cmd)
* ":sign" command
*/
void
-ex_sign(eap)
- exarg_T *eap;
+ex_sign(exarg_T *eap)
{
char_u *arg = eap->arg;
char_u *p;
@@ -7490,7 +7435,7 @@ ex_sign(eap)
* signs before it starts.
*/
void
-sign_gui_started()
+sign_gui_started(void)
{
sign_T *sp;
@@ -7504,8 +7449,7 @@ sign_gui_started()
* List one sign.
*/
static void
-sign_list_defined(sp)
- sign_T *sp;
+sign_list_defined(sign_T *sp)
{
char_u *p;
@@ -7550,9 +7494,7 @@ sign_list_defined(sp)
* Undefine a sign and free its memory.
*/
static void
-sign_undefine(sp, sp_prev)
- sign_T *sp;
- sign_T *sp_prev;
+sign_undefine(sign_T *sp, sign_T *sp_prev)
{
vim_free(sp->sn_name);
vim_free(sp->sn_icon);
@@ -7576,9 +7518,7 @@ sign_undefine(sp, sp_prev)
* If "line" is TRUE: line highl, if FALSE: text highl.
*/
int
-sign_get_attr(typenr, line)
- int typenr;
- int line;
+sign_get_attr(int typenr, int line)
{
sign_T *sp;
@@ -7605,8 +7545,7 @@ sign_get_attr(typenr, line)
* Returns NULL if there isn't one.
*/
char_u *
-sign_get_text(typenr)
- int typenr;
+sign_get_text(int typenr)
{
sign_T *sp;
@@ -7618,8 +7557,8 @@ sign_get_text(typenr)
# if defined(FEAT_SIGN_ICONS) || defined(PROTO)
void *
-sign_get_image(typenr)
- int typenr; /* the attribute which may have a sign */
+sign_get_image(
+ int typenr) /* the attribute which may have a sign */
{
sign_T *sp;
@@ -7634,8 +7573,7 @@ sign_get_image(typenr)
* Get the name of a sign by its typenr.
*/
char_u *
-sign_typenr2name(typenr)
- int typenr;
+sign_typenr2name(int typenr)
{
sign_T *sp;
@@ -7650,7 +7588,7 @@ sign_typenr2name(typenr)
* Undefine/free all signs.
*/
void
-free_signs()
+free_signs(void)
{
while (first_sign != NULL)
sign_undefine(first_sign, NULL);
@@ -7672,9 +7610,7 @@ static enum
* expansion.
*/
char_u *
-get_sign_name(xp, idx)
- expand_T *xp UNUSED;
- int idx;
+get_sign_name(expand_T *xp UNUSED, int idx)
{
sign_T *sp;
int current_idx;
@@ -7720,9 +7656,7 @@ get_sign_name(xp, idx)
* Handle command line completion for :sign command.
*/
void
-set_context_in_sign_cmd(xp, arg)
- expand_T *xp;
- char_u *arg;
+set_context_in_sign_cmd(expand_T *xp, char_u *arg)
{
char_u *p;
char_u *end_subcmd;
@@ -7842,8 +7776,7 @@ set_context_in_sign_cmd(xp, arg)
* Make the user happy.
*/
void
-ex_smile(eap)
- exarg_T *eap UNUSED;
+ex_smile(exarg_T *eap UNUSED)
{
static char *code = "\34 \4o\14$\4ox\30 \2o\30$\1ox\25 \2o\36$\1o\11 \1o\1$\3 \2$\1 \1o\1$x\5 \1o\1 \1$\1 \2o\10 \1o\44$\1o\7 \2$\1 \2$\1 \2$\1o\1$x\2 \2o\1 \1$\1 \1$\1 \1\"\1$\6 \1o\11$\4 \15$\4 \11$\1o\7 \3$\1o\2$\1o\1$x\2 \1\"\6$\1o\1$\5 \1o\11$\6 \13$\6 \12$\1o\4 \10$x\4 \7$\4 \13$\6 \13$\6 \27$x\4 \27$\4 \15$\4 \16$\2 \3\"\3$x\5 \1\"\3$\4\"\61$\5 \1\"\3$x\6 \3$\3 \1o\62$\5 \1\"\3$\1ox\5 \1o\2$\1\"\3 \63$\7 \3$\1ox\5 \3$\4 \55$\1\"\1 \1\"\6$\5o\4$\1ox\4 \1o\3$\4o\5$\2 \45$\3 \1o\21$x\4 \10$\1\"\4$\3 \42$\5 \4$\10\"x\3 \4\"\7 \4$\4 \1\"\34$\1\"\6 \1o\3$x\16 \1\"\3$\1o\5 \3\"\22$\1\"\2$\1\"\11 \3$x\20 \3$\1o\12 \1\"\2$\2\"\6$\4\"\13 \1o\3$x\21 \4$\1o\40 \1o\3$\1\"x\22 \1\"\4$\1o\6 \1o\6$\1o\1\"\4$\1o\10 \1o\4$x\24 \1\"\5$\2o\5 \2\"\4$\1o\5$\1o\3 \1o\4$\2\"x\27 \2\"\5$\4o\2 \1\"\3$\1o\11$\3\"x\32 \2\"\7$\2o\1 \12$x\42 \4\"\13$x\46 \14$x\47 \12$\1\"x\50 \1\"\3$\4\"x";
char *p;
@@ -7870,8 +7803,7 @@ ex_smile(eap)
* the argument list is redefined.
*/
void
-ex_drop(eap)
- exarg_T *eap;
+ex_drop(exarg_T *eap)
{
int split = FALSE;
win_T *wp;