comparison src/ex_getln.c @ 7801:a1e71a01dbd6 v7.4.1197

commit https://github.com/vim/vim/commit/d25c16e2f2776d50245bf31d6e4d5364f12d188e Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jan 29 22:13:30 2016 +0100 patch 7.4.1197 Problem: Still using __ARGS. Solution: Remove __ARGS in several files. (script by Hirohito Higashi)
author Christian Brabandt <cb@256bit.org>
date Fri, 29 Jan 2016 22:15:05 +0100
parents ad432f8f68fb
children 1a5d34492798
comparison
equal deleted inserted replaced
7800:a835f2222ce6 7801:a1e71a01dbd6
64 static int hisidx[HIST_COUNT] = {-1, -1, -1, -1, -1}; /* lastused entry */ 64 static int hisidx[HIST_COUNT] = {-1, -1, -1, -1, -1}; /* lastused entry */
65 static int hisnum[HIST_COUNT] = {0, 0, 0, 0, 0}; 65 static int hisnum[HIST_COUNT] = {0, 0, 0, 0, 0};
66 /* identifying (unique) number of newest history entry */ 66 /* identifying (unique) number of newest history entry */
67 static int hislen = 0; /* actual length of history tables */ 67 static int hislen = 0; /* actual length of history tables */
68 68
69 static int hist_char2type __ARGS((int c)); 69 static int hist_char2type(int c);
70 70
71 static int in_history __ARGS((int, char_u *, int, int, int)); 71 static int in_history(int, char_u *, int, int, int);
72 # ifdef FEAT_EVAL 72 # ifdef FEAT_EVAL
73 static int calc_hist_idx __ARGS((int histype, int num)); 73 static int calc_hist_idx(int histype, int num);
74 # endif 74 # endif
75 #endif 75 #endif
76 76
77 #ifdef FEAT_RIGHTLEFT 77 #ifdef FEAT_RIGHTLEFT
78 static int cmd_hkmap = 0; /* Hebrew mapping during command line */ 78 static int cmd_hkmap = 0; /* Hebrew mapping during command line */
80 80
81 #ifdef FEAT_FKMAP 81 #ifdef FEAT_FKMAP
82 static int cmd_fkmap = 0; /* Farsi mapping during command line */ 82 static int cmd_fkmap = 0; /* Farsi mapping during command line */
83 #endif 83 #endif
84 84
85 static int cmdline_charsize __ARGS((int idx)); 85 static int cmdline_charsize(int idx);
86 static void set_cmdspos __ARGS((void)); 86 static void set_cmdspos(void);
87 static void set_cmdspos_cursor __ARGS((void)); 87 static void set_cmdspos_cursor(void);
88 #ifdef FEAT_MBYTE 88 #ifdef FEAT_MBYTE
89 static void correct_cmdspos __ARGS((int idx, int cells)); 89 static void correct_cmdspos(int idx, int cells);
90 #endif 90 #endif
91 static void alloc_cmdbuff __ARGS((int len)); 91 static void alloc_cmdbuff(int len);
92 static int realloc_cmdbuff __ARGS((int len)); 92 static int realloc_cmdbuff(int len);
93 static void draw_cmdline __ARGS((int start, int len)); 93 static void draw_cmdline(int start, int len);
94 static void save_cmdline __ARGS((struct cmdline_info *ccp)); 94 static void save_cmdline(struct cmdline_info *ccp);
95 static void restore_cmdline __ARGS((struct cmdline_info *ccp)); 95 static void restore_cmdline(struct cmdline_info *ccp);
96 static int cmdline_paste __ARGS((int regname, int literally, int remcr)); 96 static int cmdline_paste(int regname, int literally, int remcr);
97 #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK) 97 #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
98 static void redrawcmd_preedit __ARGS((void)); 98 static void redrawcmd_preedit(void);
99 #endif 99 #endif
100 #ifdef FEAT_WILDMENU 100 #ifdef FEAT_WILDMENU
101 static void cmdline_del __ARGS((int from)); 101 static void cmdline_del(int from);
102 #endif 102 #endif
103 static void redrawcmdprompt __ARGS((void)); 103 static void redrawcmdprompt(void);
104 static void cursorcmd __ARGS((void)); 104 static void cursorcmd(void);
105 static int ccheck_abbr __ARGS((int)); 105 static int ccheck_abbr(int);
106 static int nextwild __ARGS((expand_T *xp, int type, int options, int escape)); 106 static int nextwild(expand_T *xp, int type, int options, int escape);
107 static void escape_fname __ARGS((char_u **pp)); 107 static void escape_fname(char_u **pp);
108 static int showmatches __ARGS((expand_T *xp, int wildmenu)); 108 static int showmatches(expand_T *xp, int wildmenu);
109 static void set_expand_context __ARGS((expand_T *xp)); 109 static void set_expand_context(expand_T *xp);
110 static int ExpandFromContext __ARGS((expand_T *xp, char_u *, int *, char_u ***, int)); 110 static int ExpandFromContext(expand_T *xp, char_u *, int *, char_u ***, int);
111 static int expand_showtail __ARGS((expand_T *xp)); 111 static int expand_showtail(expand_T *xp);
112 #ifdef FEAT_CMDL_COMPL 112 #ifdef FEAT_CMDL_COMPL
113 static int expand_shellcmd __ARGS((char_u *filepat, int *num_file, char_u ***file, int flagsarg)); 113 static int expand_shellcmd(char_u *filepat, int *num_file, char_u ***file, int flagsarg);
114 static int ExpandRTDir __ARGS((char_u *pat, int *num_file, char_u ***file, char *dirname[])); 114 static int ExpandRTDir(char_u *pat, int *num_file, char_u ***file, char *dirname[]);
115 # ifdef FEAT_CMDHIST 115 # ifdef FEAT_CMDHIST
116 static char_u *get_history_arg __ARGS((expand_T *xp, int idx)); 116 static char_u *get_history_arg(expand_T *xp, int idx);
117 # endif 117 # endif
118 # if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL) 118 # if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL)
119 static int ExpandUserDefined __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file)); 119 static int ExpandUserDefined(expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file);
120 static int ExpandUserList __ARGS((expand_T *xp, int *num_file, char_u ***file)); 120 static int ExpandUserList(expand_T *xp, int *num_file, char_u ***file);
121 # endif 121 # endif
122 #endif 122 #endif
123 #ifdef FEAT_CMDHIST 123 #ifdef FEAT_CMDHIST
124 static void clear_hist_entry __ARGS((histentry_T *hisptr)); 124 static void clear_hist_entry(histentry_T *hisptr);
125 #endif 125 #endif
126 126
127 #ifdef FEAT_CMDWIN 127 #ifdef FEAT_CMDWIN
128 static int ex_window __ARGS((void)); 128 static int ex_window(void);
129 #endif 129 #endif
130 130
131 #if defined(FEAT_CMDL_COMPL) || defined(PROTO) 131 #if defined(FEAT_CMDL_COMPL) || defined(PROTO)
132 static int 132 static int
133 #ifdef __BORLANDC__ 133 #ifdef __BORLANDC__
134 _RTLENTRYF 134 _RTLENTRYF
135 #endif 135 #endif
136 sort_func_compare __ARGS((const void *s1, const void *s2)); 136 sort_func_compare(const void *s1, const void *s2);
137 #endif 137 #endif
138 138
139 /* 139 /*
140 * getcmdline() - accept a command line starting with firstc. 140 * getcmdline() - accept a command line starting with firstc.
141 * 141 *
4528 4528
4529 #ifdef FEAT_MULTI_LANG 4529 #ifdef FEAT_MULTI_LANG
4530 /* 4530 /*
4531 * Cleanup matches for help tags: remove "@en" if "en" is the only language. 4531 * Cleanup matches for help tags: remove "@en" if "en" is the only language.
4532 */ 4532 */
4533 static void cleanup_help_tags __ARGS((int num_file, char_u **file)); 4533 static void cleanup_help_tags(int num_file, char_u **file);
4534 4534
4535 static void 4535 static void
4536 cleanup_help_tags(num_file, file) 4536 cleanup_help_tags(num_file, file)
4537 int num_file; 4537 int num_file;
4538 char_u **file; 4538 char_u **file;
5007 return OK; 5007 return OK;
5008 } 5008 }
5009 5009
5010 5010
5011 # if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL) 5011 # if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL)
5012 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)); 5012 static void * call_user_expand_func(void *(*user_expand_func)(char_u *, int, char_u **, int), expand_T *xp, int *num_file, char_u ***file);
5013 5013
5014 /* 5014 /*
5015 * Call "user_expand_func()" to invoke a user defined VimL function and return 5015 * Call "user_expand_func()" to invoke a user defined VimL function and return
5016 * the result (either a string or a List). 5016 * the result (either a string or a List).
5017 */ 5017 */
5018 static void * 5018 static void *
5019 call_user_expand_func(user_expand_func, xp, num_file, file) 5019 call_user_expand_func(user_expand_func, xp, num_file, file)
5020 void *(*user_expand_func) __ARGS((char_u *, int, char_u **, int)); 5020 void *(*user_expand_func)(char_u *, int, char_u **, int);
5021 expand_T *xp; 5021 expand_T *xp;
5022 int *num_file; 5022 int *num_file;
5023 char_u ***file; 5023 char_u ***file;
5024 { 5024 {
5025 int keep = 0; 5025 int keep = 0;
5608 return -1; 5608 return -1;
5609 5609
5610 return history[histype][hisidx[histype]].hisnum; 5610 return history[histype][hisidx[histype]].hisnum;
5611 } 5611 }
5612 5612
5613 static struct cmdline_info *get_ccline_ptr __ARGS((void)); 5613 static struct cmdline_info *get_ccline_ptr(void);
5614 5614
5615 /* 5615 /*
5616 * Get pointer to the command line info to use. cmdline_paste() may clear 5616 * Get pointer to the command line info to use. cmdline_paste() may clear
5617 * ccline and put the previous value in prev_ccline. 5617 * ccline and put the previous value in prev_ccline.
5618 */ 5618 */
6064 static char_u **viminfo_history[HIST_COUNT] = {NULL, NULL, NULL, NULL}; 6064 static char_u **viminfo_history[HIST_COUNT] = {NULL, NULL, NULL, NULL};
6065 static int viminfo_hisidx[HIST_COUNT] = {0, 0, 0, 0}; 6065 static int viminfo_hisidx[HIST_COUNT] = {0, 0, 0, 0};
6066 static int viminfo_hislen[HIST_COUNT] = {0, 0, 0, 0}; 6066 static int viminfo_hislen[HIST_COUNT] = {0, 0, 0, 0};
6067 static int viminfo_add_at_front = FALSE; 6067 static int viminfo_add_at_front = FALSE;
6068 6068
6069 static int hist_type2char __ARGS((int type, int use_question)); 6069 static int hist_type2char(int type, int use_question);
6070 6070
6071 /* 6071 /*
6072 * Translate a history type number to the associated character. 6072 * Translate a history type number to the associated character.
6073 */ 6073 */
6074 static int 6074 static int