aboutsummaryrefslogtreecommitdiff
path: root/src/ex_getln.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r--src/ex_getln.c105
1 files changed, 51 insertions, 54 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c
index b4bd842f8e..74672766b2 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -92,52 +92,50 @@ static int hisnum[HIST_COUNT] = {0, 0, 0, 0, 0};
/* identifying (unique) number of newest history entry */
static int hislen = 0; /* actual length of history tables */
-static int hist_char2type __ARGS((int c));
+static int hist_char2type(int c);
-static int in_history __ARGS((int, char_u *, int, int, int));
-static int calc_hist_idx __ARGS((int histype, int num));
+static int in_history(int, char_u *, int, int, int);
+static int calc_hist_idx(int histype, int num);
static int cmd_hkmap = 0; /* Hebrew mapping during command line */
static int cmd_fkmap = 0; /* Farsi mapping during command line */
-static int cmdline_charsize __ARGS((int idx));
-static void set_cmdspos __ARGS((void));
-static void set_cmdspos_cursor __ARGS((void));
-static void correct_cmdspos __ARGS((int idx, int cells));
-static void alloc_cmdbuff __ARGS((int len));
-static int realloc_cmdbuff __ARGS((int len));
-static void draw_cmdline __ARGS((int start, int len));
-static void save_cmdline __ARGS((struct cmdline_info *ccp));
-static void restore_cmdline __ARGS((struct cmdline_info *ccp));
-static int cmdline_paste __ARGS((int regname, int literally, int remcr));
-static void cmdline_del __ARGS((int from));
-static void redrawcmdprompt __ARGS((void));
-static void cursorcmd __ARGS((void));
-static int ccheck_abbr __ARGS((int));
-static int nextwild __ARGS((expand_T *xp, int type, int options, int escape));
-static void escape_fname __ARGS((char_u **pp));
-static int showmatches __ARGS((expand_T *xp, int wildmenu));
-static void set_expand_context __ARGS((expand_T *xp));
-static int ExpandFromContext __ARGS((expand_T *xp, char_u *, int *, char_u ***,
- int));
-static int expand_showtail __ARGS((expand_T *xp));
-static int expand_shellcmd __ARGS((char_u *filepat, int *num_file, char_u *
- **file,
- int flagsarg));
-static int ExpandRTDir __ARGS((char_u *pat, int *num_file, char_u ***file,
- char *dirname[]));
-static char_u *get_history_arg __ARGS((expand_T *xp, int idx));
-static int ExpandUserDefined __ARGS((expand_T *xp, regmatch_T *regmatch,
- int *num_file,
- char_u ***file));
-static int ExpandUserList __ARGS((expand_T *xp, int *num_file, char_u ***file));
-static void clear_hist_entry __ARGS((histentry_T *hisptr));
-
-static int ex_window __ARGS((void));
-
-static int
-sort_func_compare __ARGS((const void *s1, const void *s2));
+static int cmdline_charsize(int idx);
+static void set_cmdspos(void);
+static void set_cmdspos_cursor(void);
+static void correct_cmdspos(int idx, int cells);
+static void alloc_cmdbuff(int len);
+static int realloc_cmdbuff(int len);
+static void draw_cmdline(int start, int len);
+static void save_cmdline(struct cmdline_info *ccp);
+static void restore_cmdline(struct cmdline_info *ccp);
+static int cmdline_paste(int regname, int literally, int remcr);
+static void cmdline_del(int from);
+static void redrawcmdprompt(void);
+static void cursorcmd(void);
+static int ccheck_abbr(int);
+static int nextwild(expand_T *xp, int type, int options, int escape);
+static void escape_fname(char_u **pp);
+static int showmatches(expand_T *xp, int wildmenu);
+static void set_expand_context(expand_T *xp);
+static int ExpandFromContext(expand_T *xp, char_u *, int *, char_u ***, int);
+static int expand_showtail(expand_T *xp);
+static int expand_shellcmd(char_u *filepat, int *num_file,
+ char_u ***file,
+ int flagsarg);
+static int ExpandRTDir(char_u *pat, int *num_file, char_u ***file,
+ char *dirname[]);
+static char_u *get_history_arg(expand_T *xp, int idx);
+static int ExpandUserDefined(expand_T *xp, regmatch_T *regmatch,
+ int *num_file,
+ char_u ***file);
+static int ExpandUserList(expand_T *xp, int *num_file, char_u ***file);
+static void clear_hist_entry(histentry_T *hisptr);
+
+static int ex_window(void);
+
+static int sort_func_compare(const void *s1, const void *s2);
/*
* getcmdline() - accept a command line starting with firstc.
@@ -3621,7 +3619,7 @@ expand_cmdline (
/*
* Cleanup matches for help tags: remove "@en" if "en" is the only language.
*/
-static void cleanup_help_tags __ARGS((int num_file, char_u **file));
+static void cleanup_help_tags(int num_file, char_u **file);
static void cleanup_help_tags(int num_file, char_u **file)
{
@@ -3771,7 +3769,7 @@ ExpandFromContext (
else {
static struct expgen {
int context;
- char_u *((*func)__ARGS((expand_T *, int)));
+ char_u *((*func)(expand_T *, int));
int ic;
int escaped;
} tab[] =
@@ -3839,7 +3837,7 @@ expand_T *xp;
regmatch_T *regmatch;
int *num_file;
char_u ***file;
-char_u *((*func)__ARGS((expand_T *, int)));
+char_u *((*func)(expand_T *, int));
/* returns a string from the list */
int escaped;
{
@@ -4008,21 +4006,20 @@ expand_shellcmd (
return OK;
}
-
-static void * call_user_expand_func __ARGS((void *(*user_expand_func)__ARGS(
- (char_u *, int, char_u **,
- int)), expand_T *xp,
- int *num_file, char_u ***file));
+typedef void *(*user_expand_func_T)(char_u *, int, char_u **, int);
+static void * call_user_expand_func(user_expand_func_T user_expand_func,
+ expand_T *xp, int *num_file,
+ char_u ***file);
/*
* Call "user_expand_func()" to invoke a user defined VimL function and return
* 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)__ARGS((char_u *, int, char_u **, int));
-expand_T *xp;
-int *num_file;
-char_u ***file;
+user_expand_func_T user_expand_func;
+expand_T *xp;
+int *num_file;
+char_u ***file;
{
int keep = 0;
char_u num[50];
@@ -4552,7 +4549,7 @@ int get_history_idx(int histype)
return history[histype][hisidx[histype]].hisnum;
}
-static struct cmdline_info *get_ccline_ptr __ARGS((void));
+static struct cmdline_info *get_ccline_ptr(void);
/*
* Get pointer to the command line info to use. cmdline_paste() may clear
@@ -4936,7 +4933,7 @@ static int viminfo_hisidx[HIST_COUNT] = {0, 0, 0, 0};
static int viminfo_hislen[HIST_COUNT] = {0, 0, 0, 0};
static int viminfo_add_at_front = FALSE;
-static int hist_type2char __ARGS((int type, int use_question));
+static int hist_type2char(int type, int use_question);
/*
* Translate a history type number to the associated character.