0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 7.4.1206

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 15:52:46 +01:00
parent 7454a06e26
commit 78c0b7d43e
8 changed files with 1101 additions and 1674 deletions

View File

@@ -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;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -93,7 +93,7 @@ static int cause_abort = FALSE;
* due to a parsing error, aborting() always returns the same value.
*/
int
aborting()
aborting(void)
{
return (did_emsg && force_abort) || got_int || did_throw;
}
@@ -105,7 +105,7 @@ aborting()
* error message has been reached. update_force_abort() should be called then.
*/
void
update_force_abort()
update_force_abort(void)
{
if (cause_abort)
force_abort = TRUE;
@@ -118,8 +118,7 @@ update_force_abort()
* displayed and actually caused the abortion.
*/
int
should_abort(retcode)
int retcode;
should_abort(int retcode)
{
return ((retcode == FAIL && trylevel != 0 && !emsg_silent) || aborting());
}
@@ -131,7 +130,7 @@ should_abort(retcode)
* commands are still reported.
*/
int
aborted_in_try()
aborted_in_try(void)
{
/* This function is only called after an error. In this case, "force_abort"
* determines whether searching for finally clauses is necessary. */
@@ -148,10 +147,10 @@ aborted_in_try()
* set to TRUE, if a later but severer message should be used instead.
*/
int
cause_errthrow(mesg, severe, ignore)
char_u *mesg;
int severe;
int *ignore;
cause_errthrow(
char_u *mesg,
int severe,
int *ignore)
{
struct msglist *elem;
struct msglist **plist;
@@ -305,8 +304,7 @@ cause_errthrow(mesg, severe, ignore)
* Free a "msg_list" and the messages it contains.
*/
static void
free_msglist(l)
struct msglist *l;
free_msglist(struct msglist *l)
{
struct msglist *messages, *next;
@@ -325,7 +323,7 @@ free_msglist(l)
* to NULL.
*/
void
free_global_msglist()
free_global_msglist(void)
{
free_msglist(*msg_list);
*msg_list = NULL;
@@ -337,9 +335,7 @@ free_global_msglist()
* has returned (see do_one_cmd()).
*/
void
do_errthrow(cstack, cmdname)
struct condstack *cstack;
char_u *cmdname;
do_errthrow(struct condstack *cstack, char_u *cmdname)
{
/*
* Ensure that all commands in nested function calls and sourced files
@@ -374,8 +370,7 @@ do_errthrow(cstack, cmdname)
* FALSE otherwise.
*/
int
do_intthrow(cstack)
struct condstack *cstack;
do_intthrow(struct condstack *cstack)
{
/*
* If no interrupt occurred or no try conditional is active and no exception
@@ -425,11 +420,11 @@ do_intthrow(cstack)
* Get an exception message that is to be stored in current_exception->value.
*/
char_u *
get_exception_string(value, type, cmdname, should_free)
void *value;
int type;
char_u *cmdname;
int *should_free;
get_exception_string(
void *value,
int type,
char_u *cmdname,
int *should_free)
{
char_u *ret, *mesg;
int cmdlen;
@@ -508,10 +503,7 @@ get_exception_string(value, type, cmdname, should_free)
* error exception.
*/
static int
throw_exception(value, type, cmdname)
void *value;
int type;
char_u *cmdname;
throw_exception(void *value, int type, char_u *cmdname)
{
except_T *excp;
int should_free;
@@ -597,9 +589,7 @@ fail:
* caught and the catch clause has been ended normally.
*/
static void
discard_exception(excp, was_finished)
except_T *excp;
int was_finished;
discard_exception(except_T *excp, int was_finished)
{
char_u *saved_IObuff;
@@ -648,7 +638,7 @@ discard_exception(excp, was_finished)
* Discard the exception currently being thrown.
*/
void
discard_current_exception()
discard_current_exception(void)
{
discard_exception(current_exception, FALSE);
current_exception = NULL;
@@ -660,8 +650,7 @@ discard_current_exception()
* Put an exception on the caught stack.
*/
static void
catch_exception(excp)
except_T *excp;
catch_exception(except_T *excp)
{
excp->caught = caught_stack;
caught_stack = excp;
@@ -708,8 +697,7 @@ catch_exception(excp)
* Remove an exception from the caught stack.
*/
static void
finish_exception(excp)
except_T *excp;
finish_exception(except_T *excp)
{
if (excp != caught_stack)
EMSG(_(e_internal));
@@ -758,10 +746,7 @@ finish_exception(excp)
* or the exception value for a pending exception.
*/
static void
report_pending(action, pending, value)
int action;
int pending;
void *value;
report_pending(int action, int pending, void *value)
{
char_u *mesg;
char *s;
@@ -841,9 +826,7 @@ report_pending(action, pending, value)
* the 'verbose' option or when debugging.
*/
void
report_make_pending(pending, value)
int pending;
void *value;
report_make_pending(int pending, void *value)
{
if (p_verbose >= 14 || debug_break_level > 0)
{
@@ -860,9 +843,7 @@ report_make_pending(pending, value)
* it if required by the 'verbose' option or when debugging.
*/
void
report_resume_pending(pending, value)
int pending;
void *value;
report_resume_pending(int pending, void *value)
{
if (p_verbose >= 14 || debug_break_level > 0)
{
@@ -879,9 +860,7 @@ report_resume_pending(pending, value)
* by the 'verbose' option or when debugging.
*/
void
report_discard_pending(pending, value)
int pending;
void *value;
report_discard_pending(int pending, void *value)
{
if (p_verbose >= 14 || debug_break_level > 0)
{
@@ -898,8 +877,7 @@ report_discard_pending(pending, value)
* ":if".
*/
void
ex_if(eap)
exarg_T *eap;
ex_if(exarg_T *eap)
{
int error;
int skip;
@@ -937,8 +915,7 @@ ex_if(eap)
* ":endif".
*/
void
ex_endif(eap)
exarg_T *eap;
ex_endif(exarg_T *eap)
{
did_endif = TRUE;
if (eap->cstack->cs_idx < 0
@@ -968,8 +945,7 @@ ex_endif(eap)
* ":else" and ":elseif".
*/
void
ex_else(eap)
exarg_T *eap;
ex_else(exarg_T *eap)
{
int error;
int skip;
@@ -1060,8 +1036,7 @@ ex_else(eap)
* Handle ":while" and ":for".
*/
void
ex_while(eap)
exarg_T *eap;
ex_while(exarg_T *eap)
{
int error;
int skip;
@@ -1160,8 +1135,7 @@ ex_while(eap)
* ":continue"
*/
void
ex_continue(eap)
exarg_T *eap;
ex_continue(exarg_T *eap)
{
int idx;
struct condstack *cstack = eap->cstack;
@@ -1199,8 +1173,7 @@ ex_continue(eap)
* ":break"
*/
void
ex_break(eap)
exarg_T *eap;
ex_break(exarg_T *eap)
{
int idx;
struct condstack *cstack = eap->cstack;
@@ -1226,8 +1199,7 @@ ex_break(eap)
* ":endwhile" and ":endfor"
*/
void
ex_endwhile(eap)
exarg_T *eap;
ex_endwhile(exarg_T *eap)
{
struct condstack *cstack = eap->cstack;
int idx;
@@ -1313,8 +1285,7 @@ ex_endwhile(eap)
* ":throw expr"
*/
void
ex_throw(eap)
exarg_T *eap;
ex_throw(exarg_T *eap)
{
char_u *arg = eap->arg;
char_u *value;
@@ -1344,8 +1315,7 @@ ex_throw(eap)
* used for rethrowing an uncaught exception.
*/
void
do_throw(cstack)
struct condstack *cstack;
do_throw(struct condstack *cstack)
{
int idx;
int inactivate_try = FALSE;
@@ -1426,8 +1396,7 @@ do_throw(cstack)
* ":try"
*/
void
ex_try(eap)
exarg_T *eap;
ex_try(exarg_T *eap)
{
int skip;
struct condstack *cstack = eap->cstack;
@@ -1496,8 +1465,7 @@ ex_try(eap)
* ":catch /{pattern}/" and ":catch"
*/
void
ex_catch(eap)
exarg_T *eap;
ex_catch(exarg_T *eap)
{
int idx = 0;
int give_up = FALSE;
@@ -1657,8 +1625,7 @@ ex_catch(eap)
* ":finally"
*/
void
ex_finally(eap)
exarg_T *eap;
ex_finally(exarg_T *eap)
{
int idx;
int skip = FALSE;
@@ -1785,8 +1752,7 @@ ex_finally(eap)
* ":endtry"
*/
void
ex_endtry(eap)
exarg_T *eap;
ex_endtry(exarg_T *eap)
{
int idx;
int skip;
@@ -1984,8 +1950,7 @@ ex_endtry(eap)
* execution.
*/
void
enter_cleanup(csp)
cleanup_T *csp;
enter_cleanup(cleanup_T *csp)
{
int pending = CSTP_NONE;
@@ -2047,8 +2012,7 @@ enter_cleanup(csp)
* exception state is discarded.
*/
void
leave_cleanup(csp)
cleanup_T *csp;
leave_cleanup(cleanup_T *csp)
{
int pending = csp->pending;
@@ -2133,10 +2097,10 @@ leave_cleanup(csp)
* when such a try conditional is left.
*/
int
cleanup_conditionals(cstack, searched_cond, inclusive)
struct condstack *cstack;
int searched_cond;
int inclusive;
cleanup_conditionals(
struct condstack *cstack,
int searched_cond,
int inclusive)
{
int idx;
int stop = FALSE;
@@ -2256,8 +2220,7 @@ cleanup_conditionals(cstack, searched_cond, inclusive)
* Return an appropriate error message for a missing endwhile/endfor/endif.
*/
static char_u *
get_end_emsg(cstack)
struct condstack *cstack;
get_end_emsg(struct condstack *cstack)
{
if (cstack->cs_flags[cstack->cs_idx] & CSF_WHILE)
return e_endwhile;
@@ -2275,11 +2238,11 @@ get_end_emsg(cstack)
* Also free "for info" structures where needed.
*/
void
rewind_conditionals(cstack, idx, cond_type, cond_level)
struct condstack *cstack;
int idx;
int cond_type;
int *cond_level;
rewind_conditionals(
struct condstack *cstack,
int idx,
int cond_type,
int *cond_level)
{
while (cstack->cs_idx > idx)
{
@@ -2295,8 +2258,7 @@ rewind_conditionals(cstack, idx, cond_type, cond_level)
* ":endfunction" when not after a ":function"
*/
void
ex_endfunction(eap)
exarg_T *eap UNUSED;
ex_endfunction(exarg_T *eap UNUSED)
{
EMSG(_("E193: :endfunction not inside a function"));
}
@@ -2305,8 +2267,7 @@ ex_endfunction(eap)
* Return TRUE if the string "p" looks like a ":while" or ":for" command.
*/
int
has_loop_cmd(p)
char_u *p;
has_loop_cmd(char_u *p)
{
int len;

View File

@@ -156,10 +156,10 @@ sort_func_compare(const void *s1, const void *s2);
* otherwise.
*/
char_u *
getcmdline(firstc, count, indent)
int firstc;
long count UNUSED; /* only used for incremental search */
int indent; /* indent for inside conditionals */
getcmdline(
int firstc,
long count UNUSED, /* only used for incremental search */
int indent) /* indent for inside conditionals */
{
int c;
int i;
@@ -1988,12 +1988,12 @@ returncmd:
* Returns the command line in allocated memory, or NULL.
*/
char_u *
getcmdline_prompt(firstc, prompt, attr, xp_context, xp_arg)
int firstc;
char_u *prompt; /* command line prompt */
int attr; /* attributes for prompt */
int xp_context; /* type of expansion */
char_u *xp_arg; /* user-defined expansion argument */
getcmdline_prompt(
int firstc,
char_u *prompt, /* command line prompt */
int attr, /* attributes for prompt */
int xp_context, /* type of expansion */
char_u *xp_arg) /* user-defined expansion argument */
{
char_u *s;
struct cmdline_info save_ccline;
@@ -2026,7 +2026,7 @@ getcmdline_prompt(firstc, prompt, attr, xp_context, xp_arg)
* 'balloonexpr', etc.
*/
int
text_locked()
text_locked(void)
{
#ifdef FEAT_CMDWIN
if (cmdwin_type != 0)
@@ -2040,7 +2040,7 @@ text_locked()
* window is open or editing the cmdline in another way.
*/
void
text_locked_msg()
text_locked_msg(void)
{
#ifdef FEAT_CMDWIN
if (cmdwin_type != 0)
@@ -2056,7 +2056,7 @@ text_locked_msg()
* and give an error message.
*/
int
curbuf_locked()
curbuf_locked(void)
{
if (curbuf_lock > 0)
{
@@ -2071,7 +2071,7 @@ curbuf_locked()
* message.
*/
int
allbuf_locked()
allbuf_locked(void)
{
if (allbuf_lock > 0)
{
@@ -2083,8 +2083,7 @@ allbuf_locked()
#endif
static int
cmdline_charsize(idx)
int idx;
cmdline_charsize(int idx)
{
#if defined(FEAT_CRYPT) || defined(FEAT_EVAL)
if (cmdline_star > 0) /* showing '*', always 1 position */
@@ -2098,7 +2097,7 @@ cmdline_charsize(idx)
* indent.
*/
static void
set_cmdspos()
set_cmdspos(void)
{
if (ccline.cmdfirstc != NUL)
ccline.cmdspos = 1 + ccline.cmdindent;
@@ -2110,7 +2109,7 @@ set_cmdspos()
* Compute the screen position for the cursor on the command line.
*/
static void
set_cmdspos_cursor()
set_cmdspos_cursor(void)
{
int i, m, c;
@@ -2151,9 +2150,7 @@ set_cmdspos_cursor()
* character that doesn't fit, so that a ">" must be displayed.
*/
static void
correct_cmdspos(idx, cells)
int idx;
int cells;
correct_cmdspos(int idx, int cells)
{
if ((*mb_ptr2len)(ccline.cmdbuff + idx) > 1
&& (*mb_ptr2cells)(ccline.cmdbuff + idx) > 1
@@ -2166,10 +2163,10 @@ correct_cmdspos(idx, cells)
* Get an Ex command line for the ":" command.
*/
char_u *
getexline(c, cookie, indent)
int c; /* normally ':', NUL for ":append" */
void *cookie UNUSED;
int indent; /* indent for inside conditionals */
getexline(
int c, /* normally ':', NUL for ":append" */
void *cookie UNUSED,
int indent) /* indent for inside conditionals */
{
/* When executing a register, remove ':' that's in front of each line. */
if (exec_from_reg && vpeekc() == ':')
@@ -2184,11 +2181,11 @@ getexline(c, cookie, indent)
* Returns a string in allocated memory or NULL.
*/
char_u *
getexmodeline(promptc, cookie, indent)
int promptc; /* normally ':', NUL for ":append" and '?' for
getexmodeline(
int promptc, /* normally ':', NUL for ":append" and '?' for
:s prompt */
void *cookie UNUSED;
int indent; /* indent for inside conditionals */
void *cookie UNUSED,
int indent) /* indent for inside conditionals */
{
garray_T line_ga;
char_u *pend;
@@ -2473,7 +2470,7 @@ redraw:
* Return TRUE if ccline.overstrike is on.
*/
int
cmdline_overstrike()
cmdline_overstrike(void)
{
return ccline.overstrike;
}
@@ -2482,7 +2479,7 @@ cmdline_overstrike()
* Return TRUE if the cursor is at the end of the cmdline.
*/
int
cmdline_at_end()
cmdline_at_end(void)
{
return (ccline.cmdpos >= ccline.cmdlen);
}
@@ -2494,7 +2491,7 @@ cmdline_at_end()
* This is used by the IM code to obtain the start of the preedit string.
*/
colnr_T
cmdline_getvcol_cursor()
cmdline_getvcol_cursor(void)
{
if (ccline.cmdbuff == NULL || ccline.cmdpos > ccline.cmdlen)
return MAXCOL;
@@ -2522,7 +2519,7 @@ cmdline_getvcol_cursor()
* IM feedback attributes. The cursor position is restored after drawing.
*/
static void
redrawcmd_preedit()
redrawcmd_preedit(void)
{
if ((State & CMDLINE)
&& xic != NULL
@@ -2594,8 +2591,7 @@ redrawcmd_preedit()
* Returns the new value of ccline.cmdbuff and ccline.cmdbufflen.
*/
static void
alloc_cmdbuff(len)
int len;
alloc_cmdbuff(int len)
{
/*
* give some extra space to avoid having to allocate all the time
@@ -2614,8 +2610,7 @@ alloc_cmdbuff(len)
* return FAIL for failure, OK otherwise
*/
static int
realloc_cmdbuff(len)
int len;
realloc_cmdbuff(int len)
{
char_u *p;
@@ -2656,7 +2651,7 @@ static char_u *arshape_buf = NULL;
# if defined(EXITFREE) || defined(PROTO)
void
free_cmdline_buf()
free_cmdline_buf(void)
{
vim_free(arshape_buf);
}
@@ -2668,9 +2663,7 @@ free_cmdline_buf()
* when cmdline_star is TRUE.
*/
static void
draw_cmdline(start, len)
int start;
int len;
draw_cmdline(int start, int len)
{
#if defined(FEAT_CRYPT) || defined(FEAT_EVAL)
int i;
@@ -2791,9 +2784,7 @@ draw_cmdline(start, len)
* "c" must be printable (fit in one display cell)!
*/
void
putcmdline(c, shift)
int c;
int shift;
putcmdline(int c, int shift)
{
if (cmd_silent)
return;
@@ -2809,7 +2800,7 @@ putcmdline(c, shift)
* Undo a putcmdline(c, FALSE).
*/
void
unputcmdline()
unputcmdline(void)
{
if (cmd_silent)
return;
@@ -2836,10 +2827,7 @@ unputcmdline()
* called afterwards.
*/
int
put_on_cmdline(str, len, redraw)
char_u *str;
int len;
int redraw;
put_on_cmdline(char_u *str, int len, int redraw)
{
int retval;
int i;
@@ -3009,8 +2997,7 @@ static int prev_ccline_used = FALSE;
* available globally in prev_ccline.
*/
static void
save_cmdline(ccp)
struct cmdline_info *ccp;
save_cmdline(struct cmdline_info *ccp)
{
if (!prev_ccline_used)
{
@@ -3028,8 +3015,7 @@ save_cmdline(ccp)
* Restore ccline after it has been saved with save_cmdline().
*/
static void
restore_cmdline(ccp)
struct cmdline_info *ccp;
restore_cmdline(struct cmdline_info *ccp)
{
ccline = prev_ccline;
prev_ccline = *ccp;
@@ -3042,7 +3028,7 @@ restore_cmdline(ccp)
* Returns NULL when failed.
*/
char_u *
save_cmdline_alloc()
save_cmdline_alloc(void)
{
struct cmdline_info *p;
@@ -3056,8 +3042,7 @@ save_cmdline_alloc()
* Restore the command line from the return value of save_cmdline_alloc().
*/
void
restore_cmdline_alloc(p)
char_u *p;
restore_cmdline_alloc(char_u *p)
{
if (p != NULL)
{
@@ -3076,10 +3061,10 @@ restore_cmdline_alloc(p)
* Return FAIL for failure, OK otherwise.
*/
static int
cmdline_paste(regname, literally, remcr)
int regname;
int literally; /* Insert text literally instead of "as typed" */
int remcr; /* remove trailing CR */
cmdline_paste(
int regname,
int literally, /* Insert text literally instead of "as typed" */
int remcr) /* remove trailing CR */
{
long i;
char_u *arg;
@@ -3165,9 +3150,7 @@ cmdline_paste(regname, literally, remcr)
* line.
*/
void
cmdline_paste_str(s, literally)
char_u *s;
int literally;
cmdline_paste_str(char_u *s, int literally)
{
int c, cv;
@@ -3202,8 +3185,7 @@ cmdline_paste_str(s, literally)
* position.
*/
static void
cmdline_del(from)
int from;
cmdline_del(int from)
{
mch_memmove(ccline.cmdbuff + from, ccline.cmdbuff + ccline.cmdpos,
(size_t)(ccline.cmdlen - ccline.cmdpos + 1));
@@ -3217,7 +3199,7 @@ cmdline_del(from)
* search
*/
void
redrawcmdline()
redrawcmdline(void)
{
if (cmd_silent)
return;
@@ -3228,7 +3210,7 @@ redrawcmdline()
}
static void
redrawcmdprompt()
redrawcmdprompt(void)
{
int i;
@@ -3253,7 +3235,7 @@ redrawcmdprompt()
* Redraw what is currently on the command line.
*/
void
redrawcmd()
redrawcmd(void)
{
if (cmd_silent)
return;
@@ -3289,7 +3271,7 @@ redrawcmd()
}
void
compute_cmdrow()
compute_cmdrow(void)
{
if (exmode_active || msg_scrolled != 0)
cmdline_row = Rows - 1;
@@ -3299,7 +3281,7 @@ compute_cmdrow()
}
static void
cursorcmd()
cursorcmd(void)
{
if (cmd_silent)
return;
@@ -3331,8 +3313,7 @@ cursorcmd()
}
void
gotocmdline(clr)
int clr;
gotocmdline(int clr)
{
msg_start();
#ifdef FEAT_RIGHTLEFT
@@ -3353,8 +3334,7 @@ gotocmdline(clr)
* backspaces and the replacement string is inserted, followed by "c".
*/
static int
ccheck_abbr(c)
int c;
ccheck_abbr(int c)
{
if (p_paste || no_abbr) /* no abbreviations or in paste mode */
return FALSE;
@@ -3367,9 +3347,7 @@ ccheck_abbr(c)
#ifdef __BORLANDC__
_RTLENTRYF
#endif
sort_func_compare(s1, s2)
const void *s1;
const void *s2;
sort_func_compare(const void *s1, const void *s2)
{
char_u *p1 = *(char_u **)s1;
char_u *p2 = *(char_u **)s2;
@@ -3387,11 +3365,11 @@ sort_func_compare(s1, s2)
* normal character (instead of being expanded). This allows :s/^I^D etc.
*/
static int
nextwild(xp, type, options, escape)
expand_T *xp;
int type;
int options; /* extra options for ExpandOne() */
int escape; /* if TRUE, escape the returned matches */
nextwild(
expand_T *xp,
int type,
int options, /* extra options for ExpandOne() */
int escape) /* if TRUE, escape the returned matches */
{
int i, j;
char_u *p1;
@@ -3540,12 +3518,12 @@ nextwild(xp, type, options, escape)
* The variables xp->xp_context and xp->xp_backslash must have been set!
*/
char_u *
ExpandOne(xp, str, orig, options, mode)
expand_T *xp;
char_u *str;
char_u *orig; /* allocated copy of original of expanded string */
int options;
int mode;
ExpandOne(
expand_T *xp,
char_u *str,
char_u *orig, /* allocated copy of original of expanded string */
int options,
int mode)
{
char_u *ss = NULL;
static int findex;
@@ -3771,8 +3749,7 @@ ExpandOne(xp, str, orig, options, mode)
* Prepare an expand structure for use.
*/
void
ExpandInit(xp)
expand_T *xp;
ExpandInit(expand_T *xp)
{
xp->xp_pattern = NULL;
xp->xp_pattern_len = 0;
@@ -3792,8 +3769,7 @@ ExpandInit(xp)
* Cleanup an expand structure after use.
*/
void
ExpandCleanup(xp)
expand_T *xp;
ExpandCleanup(expand_T *xp)
{
if (xp->xp_numfiles >= 0)
{
@@ -3803,12 +3779,12 @@ ExpandCleanup(xp)
}
void
ExpandEscape(xp, str, numfiles, files, options)
expand_T *xp;
char_u *str;
int numfiles;
char_u **files;
int options;
ExpandEscape(
expand_T *xp,
char_u *str,
int numfiles,
char_u **files,
int options)
{
int i;
char_u *p;
@@ -3899,9 +3875,7 @@ ExpandEscape(xp, str, numfiles, files, options)
* Returns the result in allocated memory.
*/
char_u *
vim_strsave_fnameescape(fname, shell)
char_u *fname;
int shell;
vim_strsave_fnameescape(char_u *fname, int shell)
{
char_u *p;
#ifdef BACKSLASH_IN_FILENAME
@@ -3940,8 +3914,7 @@ vim_strsave_fnameescape(fname, shell)
* Put a backslash before the file name in "pp", which is in allocated memory.
*/
static void
escape_fname(pp)
char_u **pp;
escape_fname(char_u **pp)
{
char_u *p;
@@ -3960,10 +3933,10 @@ escape_fname(pp)
* If 'orig_pat' starts with "~/", replace the home directory with "~".
*/
void
tilde_replace(orig_pat, num_files, files)
char_u *orig_pat;
int num_files;
char_u **files;
tilde_replace(
char_u *orig_pat,
int num_files,
char_u **files)
{
int i;
char_u *p;
@@ -3988,9 +3961,7 @@ tilde_replace(orig_pat, num_files, files)
* be inserted like a normal character.
*/
static int
showmatches(xp, wildmenu)
expand_T *xp;
int wildmenu UNUSED;
showmatches(expand_T *xp, int wildmenu UNUSED)
{
#define L_SHOWFILE(m) (showtail ? sm_gettail(files_found[m]) : files_found[m])
int num_files;
@@ -4172,8 +4143,7 @@ showmatches(xp, wildmenu)
* Find tail of file name path, but ignore trailing "/".
*/
char_u *
sm_gettail(s)
char_u *s;
sm_gettail(char_u *s)
{
char_u *p;
char_u *t = s;
@@ -4203,8 +4173,7 @@ sm_gettail(s)
* returned.
*/
static int
expand_showtail(xp)
expand_T *xp;
expand_showtail(expand_T *xp)
{
char_u *s;
char_u *end;
@@ -4239,10 +4208,10 @@ expand_showtail(xp)
* the name into allocated memory and prepend "^".
*/
char_u *
addstar(fname, len, context)
char_u *fname;
int len;
int context; /* EXPAND_FILES etc. */
addstar(
char_u *fname,
int len,
int context) /* EXPAND_FILES etc. */
{
char_u *retval;
int i, j;
@@ -4408,8 +4377,7 @@ addstar(fname, len, context)
* EXPAND_USER Complete user names
*/
static void
set_expand_context(xp)
expand_T *xp;
set_expand_context(expand_T *xp)
{
/* only expansion for ':', '>' and '=' command-lines */
if (ccline.cmdfirstc != ':'
@@ -4426,11 +4394,11 @@ set_expand_context(xp)
}
void
set_cmd_context(xp, str, len, col)
expand_T *xp;
char_u *str; /* start of command line */
int len; /* length of command line (excl. NUL) */
int col; /* position of cursor */
set_cmd_context(
expand_T *xp,
char_u *str, /* start of command line */
int len, /* length of command line (excl. NUL) */
int col) /* position of cursor */
{
int old_char = NUL;
char_u *nextcomm;
@@ -4485,12 +4453,12 @@ set_cmd_context(xp, str, len, col)
* Returns EXPAND_OK otherwise.
*/
int
expand_cmdline(xp, str, col, matchcount, matches)
expand_T *xp;
char_u *str; /* start of command line */
int col; /* position of cursor */
int *matchcount; /* return: nr of matches */
char_u ***matches; /* return: array of pointers to matches */
expand_cmdline(
expand_T *xp,
char_u *str, /* start of command line */
int col, /* position of cursor */
int *matchcount, /* return: nr of matches */
char_u ***matches) /* return: array of pointers to matches */
{
char_u *file_str = NULL;
int options = WILD_ADD_SLASH|WILD_SILENT;
@@ -4533,9 +4501,7 @@ expand_cmdline(xp, str, col, matchcount, matches)
static void cleanup_help_tags(int num_file, char_u **file);
static void
cleanup_help_tags(num_file, file)
int num_file;
char_u **file;
cleanup_help_tags(int num_file, char_u **file)
{
int i, j;
int len;
@@ -4563,12 +4529,12 @@ cleanup_help_tags(num_file, file)
* Do the expansion based on xp->xp_context and "pat".
*/
static int
ExpandFromContext(xp, pat, num_file, file, options)
expand_T *xp;
char_u *pat;
int *num_file;
char_u ***file;
int options; /* EW_ flags */
ExpandFromContext(
expand_T *xp,
char_u *pat,
int *num_file,
char_u ***file,
int options) /* EW_ flags */
{
#ifdef FEAT_CMDL_COMPL
regmatch_T regmatch;
@@ -4799,14 +4765,14 @@ ExpandFromContext(xp, pat, num_file, file, options)
* Returns OK when no problems encountered, FAIL for error (out of memory).
*/
int
ExpandGeneric(xp, regmatch, num_file, file, func, escaped)
expand_T *xp;
regmatch_T *regmatch;
int *num_file;
char_u ***file;
char_u *((*func)(expand_T *, int));
ExpandGeneric(
expand_T *xp,
regmatch_T *regmatch,
int *num_file,
char_u ***file,
char_u *((*func)(expand_T *, int)),
/* returns a string from the list */
int escaped;
int escaped)
{
int i;
int count = 0;
@@ -4891,11 +4857,11 @@ ExpandGeneric(xp, regmatch, num_file, file, func, escaped)
* Returns FAIL or OK;
*/
static int
expand_shellcmd(filepat, num_file, file, flagsarg)
char_u *filepat; /* pattern to match with command names */
int *num_file; /* return: number of matches */
char_u ***file; /* return: array with matches */
int flagsarg; /* EW_ flags */
expand_shellcmd(
char_u *filepat, /* pattern to match with command names */
int *num_file, /* return: number of matches */
char_u ***file, /* return: array with matches */
int flagsarg) /* EW_ flags */
{
char_u *pat;
int i;
@@ -5016,11 +4982,11 @@ static void * call_user_expand_func(void *(*user_expand_func)(char_u *, int, cha
* the result (either a string or a List).
*/
static void *
call_user_expand_func(user_expand_func, xp, num_file, file)
void *(*user_expand_func)(char_u *, int, char_u **, int);
expand_T *xp;
int *num_file;
char_u ***file;
call_user_expand_func(
void *(*user_expand_func)(char_u *, int, char_u **, int),
expand_T *xp,
int *num_file,
char_u ***file)
{
int keep = 0;
char_u num[50];
@@ -5066,11 +5032,11 @@ call_user_expand_func(user_expand_func, xp, num_file, file)
* Expand names with a function defined by the user.
*/
static int
ExpandUserDefined(xp, regmatch, num_file, file)
expand_T *xp;
regmatch_T *regmatch;
int *num_file;
char_u ***file;
ExpandUserDefined(
expand_T *xp,
regmatch_T *regmatch,
int *num_file,
char_u ***file)
{
char_u *retstr;
char_u *s;
@@ -5119,10 +5085,10 @@ ExpandUserDefined(xp, regmatch, num_file, file)
* Expand names with a list returned by a function defined by the user.
*/
static int
ExpandUserList(xp, num_file, file)
expand_T *xp;
int *num_file;
char_u ***file;
ExpandUserList(
expand_T *xp,
int *num_file,
char_u ***file)
{
list_T *retlist;
listitem_T *li;
@@ -5160,11 +5126,11 @@ ExpandUserList(xp, num_file, file)
* "dirnames" is an array with one or more directory names.
*/
static int
ExpandRTDir(pat, num_file, file, dirnames)
char_u *pat;
int *num_file;
char_u ***file;
char *dirnames[];
ExpandRTDir(
char_u *pat,
int *num_file,
char_u ***file,
char *dirnames[])
{
char_u *s;
char_u *e;
@@ -5228,11 +5194,11 @@ ExpandRTDir(pat, num_file, file, dirnames)
* Adds the matches to "ga". Caller must init "ga".
*/
void
globpath(path, file, ga, expand_options)
char_u *path;
char_u *file;
garray_T *ga;
int expand_options;
globpath(
char_u *path,
char_u *file,
garray_T *ga,
int expand_options)
{
expand_T xpc;
char_u *buf;
@@ -5298,8 +5264,7 @@ globpath(path, file, ga, expand_options)
* Translate a history character to the associated type number.
*/
static int
hist_char2type(c)
int c;
hist_char2type(int c)
{
if (c == ':')
return HIST_CMD;
@@ -5334,9 +5299,7 @@ static char *(history_names[]) =
* arguments of the ":history command.
*/
static char_u *
get_history_arg(xp, idx)
expand_T *xp UNUSED;
int idx;
get_history_arg(expand_T *xp UNUSED, int idx)
{
static char_u compl[2] = { NUL, NUL };
char *short_names = ":=@>?/";
@@ -5361,7 +5324,7 @@ get_history_arg(xp, idx)
* Also used to re-allocate the history when the size changes.
*/
void
init_history()
init_history(void)
{
int newlen; /* new length of history table */
histentry_T *temp;
@@ -5439,8 +5402,7 @@ init_history()
}
static void
clear_hist_entry(hisptr)
histentry_T *hisptr;
clear_hist_entry(histentry_T *hisptr)
{
hisptr->hisnum = 0;
hisptr->viminfo = FALSE;
@@ -5452,12 +5414,12 @@ clear_hist_entry(hisptr)
* If 'move_to_front' is TRUE, matching entry is moved to end of history.
*/
static int
in_history(type, str, move_to_front, sep, writing)
int type;
char_u *str;
int move_to_front; /* Move the entry to the front if it exists */
int sep;
int writing; /* ignore entries read from viminfo */
in_history(
int type,
char_u *str,
int move_to_front, /* Move the entry to the front if it exists */
int sep,
int writing) /* ignore entries read from viminfo */
{
int i;
int last_i = -1;
@@ -5511,8 +5473,7 @@ in_history(type, str, move_to_front, sep, writing)
* Returns -1 for unknown history name.
*/
int
get_histtype(name)
char_u *name;
get_histtype(char_u *name)
{
int i;
int len = (int)STRLEN(name);
@@ -5539,11 +5500,11 @@ static int last_maptick = -1; /* last seen maptick */
* values.
*/
void
add_to_history(histype, new_entry, in_map, sep)
int histype;
char_u *new_entry;
int in_map; /* consider maptick when inside a mapping */
int sep; /* separator character used (search hist) */
add_to_history(
int histype,
char_u *new_entry,
int in_map, /* consider maptick when inside a mapping */
int sep) /* separator character used (search hist) */
{
histentry_T *hisptr;
int len;
@@ -5600,8 +5561,7 @@ add_to_history(histype, new_entry, in_map, sep)
* "histype" may be one of the HIST_ values.
*/
int
get_history_idx(histype)
int histype;
get_history_idx(int histype)
{
if (hislen == 0 || histype < 0 || histype >= HIST_COUNT
|| hisidx[histype] < 0)
@@ -5617,7 +5577,7 @@ static struct cmdline_info *get_ccline_ptr(void);
* ccline and put the previous value in prev_ccline.
*/
static struct cmdline_info *
get_ccline_ptr()
get_ccline_ptr(void)
{
if ((State & CMDLINE) == 0)
return NULL;
@@ -5634,7 +5594,7 @@ get_ccline_ptr()
* Returns NULL when something is wrong.
*/
char_u *
get_cmdline_str()
get_cmdline_str(void)
{
struct cmdline_info *p = get_ccline_ptr();
@@ -5650,7 +5610,7 @@ get_cmdline_str()
* Returns -1 when something is wrong.
*/
int
get_cmdline_pos()
get_cmdline_pos(void)
{
struct cmdline_info *p = get_ccline_ptr();
@@ -5665,8 +5625,8 @@ get_cmdline_pos()
* Returns 1 when failed, 0 when OK.
*/
int
set_cmdline_pos(pos)
int pos;
set_cmdline_pos(
int pos)
{
struct cmdline_info *p = get_ccline_ptr();
@@ -5707,9 +5667,7 @@ get_cmdline_type()
* "histype" may be one of the HIST_ values.
*/
static int
calc_hist_idx(histype, num)
int histype;
int num;
calc_hist_idx(int histype, int num)
{
int i;
histentry_T *hist;
@@ -5749,9 +5707,7 @@ calc_hist_idx(histype, num)
* "histype" may be one of the HIST_ values.
*/
char_u *
get_history_entry(histype, idx)
int histype;
int idx;
get_history_entry(int histype, int idx)
{
idx = calc_hist_idx(histype, idx);
if (idx >= 0)
@@ -5765,8 +5721,7 @@ get_history_entry(histype, idx)
* "histype" may be one of the HIST_ values.
*/
int
clr_history(histype)
int histype;
clr_history(int histype)
{
int i;
histentry_T *hisptr;
@@ -5791,9 +5746,7 @@ clr_history(histype)
* "histype" may be one of the HIST_ values.
*/
int
del_history_entry(histype, str)
int histype;
char_u *str;
del_history_entry(int histype, char_u *str)
{
regmatch_T regmatch;
histentry_T *hisptr;
@@ -5849,9 +5802,7 @@ del_history_entry(histype, str)
* "histype" may be one of the HIST_ values.
*/
int
del_history_idx(histype, idx)
int histype;
int idx;
del_history_idx(int histype, int idx)
{
int i, j;
@@ -5888,7 +5839,7 @@ del_history_idx(histype, idx)
* history.
*/
void
remove_key_from_history()
remove_key_from_history(void)
{
char_u *p;
int i;
@@ -5923,10 +5874,7 @@ remove_key_from_history()
* Returns OK if parsed successfully, otherwise FAIL.
*/
int
get_list_range(str, num1, num2)
char_u **str;
int *num1;
int *num2;
get_list_range(char_u **str, int *num1, int *num2)
{
int len;
int first = FALSE;
@@ -5964,8 +5912,7 @@ get_list_range(str, num1, num2)
* :history command - print a history
*/
void
ex_history(eap)
exarg_T *eap;
ex_history(exarg_T *eap)
{
histentry_T *hist;
int histype1 = HIST_CMD;
@@ -6072,9 +6019,9 @@ static int hist_type2char(int type, int use_question);
* Translate a history type number to the associated character.
*/
static int
hist_type2char(type, use_question)
int type;
int use_question; /* use '?' instead of '/' */
hist_type2char(
int type,
int use_question) /* use '?' instead of '/' */
{
if (type == HIST_CMD)
return ':';
@@ -6095,9 +6042,7 @@ hist_type2char(type, use_question)
* This allocates history arrays to store the read history lines.
*/
void
prepare_viminfo_history(asklen, writing)
int asklen;
int writing;
prepare_viminfo_history(int asklen, int writing)
{
int i;
int num;
@@ -6137,9 +6082,7 @@ prepare_viminfo_history(asklen, writing)
* new.
*/
int
read_viminfo_history(virp, writing)
vir_T *virp;
int writing;
read_viminfo_history(vir_T *virp, int writing)
{
int type;
long_u len;
@@ -6189,7 +6132,7 @@ read_viminfo_history(virp, writing)
* Finish reading history lines from viminfo. Not used when writing viminfo.
*/
void
finish_viminfo_history()
finish_viminfo_history(void)
{
int idx;
int i;
@@ -6249,9 +6192,9 @@ finish_viminfo_history()
* When "merge" is FALSE just write all history lines. Used for ":wviminfo!".
*/
void
write_viminfo_history(fp, merge)
FILE *fp;
int merge;
write_viminfo_history(
FILE *fp,
int merge)
{
int i;
int type;
@@ -6348,8 +6291,7 @@ write_viminfo_history(fp, merge)
* It is directly written into the command buffer block.
*/
void
cmd_pchar(c, offset)
int c, offset;
cmd_pchar(int c, int offset)
{
if (ccline.cmdpos + offset >= ccline.cmdlen || ccline.cmdpos + offset < 0)
{
@@ -6361,8 +6303,7 @@ cmd_pchar(c, offset)
}
int
cmd_gchar(offset)
int offset;
cmd_gchar(int offset)
{
if (ccline.cmdpos + offset >= ccline.cmdlen || ccline.cmdpos + offset < 0)
{
@@ -6383,7 +6324,7 @@ cmd_gchar(offset)
* K_IGNORE if editing continues
*/
static int
ex_window()
ex_window(void)
{
struct cmdline_info save_ccline;
buf_T *old_curbuf = curbuf;
@@ -6674,9 +6615,7 @@ ex_window()
* Returns a pointer to allocated memory with {script} or NULL.
*/
char_u *
script_get(eap, cmd)
exarg_T *eap;
char_u *cmd;
script_get(exarg_T *eap, char_u *cmd)
{
char_u *theline;
char *end_pattern = NULL;

View File

@@ -38,8 +38,7 @@ static void lrswapbuf(char_u *buf, int len);
** Convert the given Farsi character into a _X or _X_ type
*/
static int
toF_Xor_X_(c)
int c;
toF_Xor_X_(int c)
{
int tempc;
@@ -132,8 +131,7 @@ toF_Xor_X_(c)
** Convert the given Farsi character into Farsi capital character .
*/
int
toF_TyA(c)
int c ;
toF_TyA(int c )
{
switch (c)
{
@@ -212,8 +210,7 @@ toF_TyA(c)
** Note: the offset is used only for command line buffer.
*/
static int
F_is_TyB_TyC_TyD(src, offset)
int src, offset;
F_is_TyB_TyC_TyD(int src, int offset)
{
int c;
@@ -264,8 +261,7 @@ F_is_TyB_TyC_TyD(src, offset)
** Is the Farsi character one of the terminating only type.
*/
static int
F_is_TyE(c)
int c;
F_is_TyE(int c)
{
switch (c)
{
@@ -288,8 +284,7 @@ F_is_TyE(c)
** Is the Farsi character one of the none leading type.
*/
static int
F_is_TyC_TyD(c)
int c;
F_is_TyC_TyD(int c)
{
switch (c)
{
@@ -313,8 +308,7 @@ F_is_TyC_TyD(c)
** Convert a none leading Farsi char into a leading type.
*/
static int
toF_TyB(c)
int c;
toF_TyB(int c)
{
switch (c)
{
@@ -337,8 +331,7 @@ toF_TyB(c)
** Overwrite the current redo and cursor characters + left adjust
*/
static void
put_curr_and_l_to_X(c)
int c;
put_curr_and_l_to_X(int c)
{
int tempc;
@@ -372,8 +365,7 @@ put_curr_and_l_to_X(c)
}
static void
put_and_redo(c)
int c;
put_and_redo(int c)
{
pchar_cursor(c);
AppendCharToRedobuff(K_BS);
@@ -384,7 +376,7 @@ put_and_redo(c)
** Change the char. under the cursor to a X_ or X type
*/
static void
chg_c_toX_orX()
chg_c_toX_orX(void)
{
int tempc, curc;
@@ -509,7 +501,7 @@ chg_c_toX_orX()
*/
static void
chg_c_to_X_orX_()
chg_c_to_X_orX_(void)
{
int tempc;
@@ -560,7 +552,7 @@ chg_c_to_X_orX_()
** Change the char. under the cursor to a _X_ or _X type
*/
static void
chg_c_to_X_or_X ()
chg_c_to_X_or_X (void)
{
int tempc;
@@ -591,7 +583,7 @@ chg_c_to_X_or_X ()
** Change the character left to the cursor to a _X_ or X_ type
*/
static void
chg_l_to_X_orX_ ()
chg_l_to_X_orX_ (void)
{
int tempc;
@@ -660,7 +652,7 @@ chg_l_to_X_orX_ ()
*/
static void
chg_l_toXor_X ()
chg_l_toXor_X (void)
{
int tempc;
@@ -729,7 +721,7 @@ chg_l_toXor_X ()
*/
static void
chg_r_to_Xor_X_()
chg_r_to_Xor_X_(void)
{
int tempc, c;
@@ -754,8 +746,7 @@ chg_r_to_Xor_X_()
*/
int
fkmap(c)
int c;
fkmap(int c)
{
int tempc;
static int revins;
@@ -1473,8 +1464,7 @@ fkmap(c)
** Convert a none leading Farsi char into a leading type.
*/
static int
toF_leading(c)
int c;
toF_leading(int c)
{
switch (c)
{
@@ -1528,8 +1518,7 @@ toF_leading(c)
** Convert a given Farsi char into right joining type.
*/
static int
toF_Rjoin(c)
int c;
toF_Rjoin(int c)
{
switch (c)
{
@@ -1585,8 +1574,7 @@ toF_Rjoin(c)
** Can a given Farsi character join via its left edj.
*/
static int
canF_Ljoin(c)
int c;
canF_Ljoin(int c)
{
switch (c)
{
@@ -1660,8 +1648,7 @@ canF_Ljoin(c)
** Can a given Farsi character join via its right edj.
*/
static int
canF_Rjoin(c)
int c;
canF_Rjoin(int c)
{
switch (c)
{
@@ -1689,8 +1676,7 @@ canF_Rjoin(c)
** is a given Farsi character a terminating type.
*/
static int
F_isterm(c)
int c;
F_isterm(int c)
{
switch (c)
{
@@ -1717,8 +1703,7 @@ F_isterm(c)
** Convert the given Farsi character into a ending type .
*/
static int
toF_ending(c)
int c;
toF_ending(int c)
{
switch (c)
@@ -1795,7 +1780,7 @@ toF_ending(c)
** Convert the Farsi 3342 standard into Farsi VIM.
*/
void
conv_to_pvim()
conv_to_pvim(void)
{
char_u *ptr;
int lnum, llen, i;
@@ -1844,7 +1829,7 @@ conv_to_pvim()
* Convert the Farsi VIM into Farsi 3342 standard.
*/
void
conv_to_pstd()
conv_to_pstd(void)
{
char_u *ptr;
int lnum, llen, i;
@@ -1877,9 +1862,7 @@ conv_to_pstd()
* left-right swap the characters in buf[len].
*/
static void
lrswapbuf(buf, len)
char_u *buf;
int len;
lrswapbuf(char_u *buf, int len)
{
char_u *s, *e;
int c;
@@ -1901,8 +1884,7 @@ lrswapbuf(buf, len)
* swap all the characters in reverse direction
*/
char_u *
lrswap(ibuf)
char_u *ibuf;
lrswap(char_u *ibuf)
{
if (ibuf != NULL && *ibuf != NUL)
lrswapbuf(ibuf, (int)STRLEN(ibuf));
@@ -1913,9 +1895,7 @@ lrswap(ibuf)
* swap all the Farsi characters in reverse direction
*/
char_u *
lrFswap(cmdbuf, len)
char_u *cmdbuf;
int len;
lrFswap(char_u *cmdbuf, int len)
{
int i, cnt;
@@ -1945,8 +1925,7 @@ lrFswap(cmdbuf, len)
* TODO: handle different separator characters. Use skip_regexp().
*/
char_u *
lrF_sub(ibuf)
char_u *ibuf;
lrF_sub(char_u *ibuf)
{
char_u *p, *ep;
int i, cnt;
@@ -1986,8 +1965,7 @@ lrF_sub(ibuf)
* Map Farsi keyboard when in cmd_fkmap mode.
*/
int
cmdl_fkmap(c)
int c;
cmdl_fkmap(int c)
{
int tempc;
@@ -2246,8 +2224,7 @@ cmdl_fkmap(c)
* F_isalpha returns TRUE if 'c' is a Farsi alphabet
*/
int
F_isalpha(c)
int c;
F_isalpha(int c)
{
return (( c >= TEE_ && c <= _YE)
|| (c >= ALEF_A && c <= YE)
@@ -2258,8 +2235,7 @@ F_isalpha(c)
* F_isdigit returns TRUE if 'c' is a Farsi digit
*/
int
F_isdigit(c)
int c;
F_isdigit(int c)
{
return (c >= FARSI_0 && c <= FARSI_9);
}
@@ -2268,15 +2244,14 @@ F_isdigit(c)
* F_ischar returns TRUE if 'c' is a Farsi character.
*/
int
F_ischar(c)
int c;
F_ischar(int c)
{
return (c >= TEE_ && c <= YE_);
return (c >= TEE_ && c <= YE_);
}
void
farsi_fkey(cap)
cmdarg_T *cap;
farsi_fkey(
cmdarg_T *cap)
{
int c = cap->cmdchar;

File diff suppressed because it is too large Load Diff

View File

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