diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-01-29 22:03:47 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-01-29 22:03:47 +0100 |
commit | f28dbcea371b3a35727d91afc90fb90e0527d78a (patch) | |
tree | df3ced3771c8d6900fc2e65ffa37e89566f215ba | |
parent | f12d983deab06b0408781d7a6c2f8970d765b723 (diff) |
patch 7.4.1196v7.4.1196
Problem: Still using __ARGS.
Solution: Remove __ARGS in several files. (script by Hirohito Higashi)
-rw-r--r-- | src/arabic.c | 38 | ||||
-rw-r--r-- | src/buffer.c | 34 | ||||
-rw-r--r-- | src/charset.c | 6 | ||||
-rw-r--r-- | src/crypt_zip.c | 2 | ||||
-rw-r--r-- | src/diff.c | 28 | ||||
-rw-r--r-- | src/digraph.c | 6 | ||||
-rw-r--r-- | src/edit.c | 200 | ||||
-rw-r--r-- | src/ex_cmds.c | 32 | ||||
-rw-r--r-- | src/ex_cmds2.c | 38 | ||||
-rw-r--r-- | src/ex_docmd.c | 312 | ||||
-rw-r--r-- | src/version.c | 2 |
11 files changed, 350 insertions, 348 deletions
diff --git a/src/arabic.c b/src/arabic.c index 72c64b5187..d6679d6e04 100644 --- a/src/arabic.c +++ b/src/arabic.c @@ -18,25 +18,25 @@ * */ -static int A_is_a __ARGS((int cur_c)); -static int A_is_s __ARGS((int cur_c)); -static int A_is_f __ARGS((int cur_c)); -static int chg_c_a2s __ARGS((int cur_c)); -static int chg_c_a2i __ARGS((int cur_c)); -static int chg_c_a2m __ARGS((int cur_c)); -static int chg_c_a2f __ARGS((int cur_c)); -static int chg_c_i2m __ARGS((int cur_c)); -static int chg_c_f2m __ARGS((int cur_c)); -static int chg_c_laa2i __ARGS((int hid_c)); -static int chg_c_laa2f __ARGS((int hid_c)); -static int half_shape __ARGS((int c)); -static int A_firstc_laa __ARGS((int c1, int c)); -static int A_is_harakat __ARGS((int c)); -static int A_is_iso __ARGS((int c)); -static int A_is_formb __ARGS((int c)); -static int A_is_ok __ARGS((int c)); -static int A_is_valid __ARGS((int c)); -static int A_is_special __ARGS((int c)); +static int A_is_a(int cur_c); +static int A_is_s(int cur_c); +static int A_is_f(int cur_c); +static int chg_c_a2s(int cur_c); +static int chg_c_a2i(int cur_c); +static int chg_c_a2m(int cur_c); +static int chg_c_a2f(int cur_c); +static int chg_c_i2m(int cur_c); +static int chg_c_f2m(int cur_c); +static int chg_c_laa2i(int hid_c); +static int chg_c_laa2f(int hid_c); +static int half_shape(int c); +static int A_firstc_laa(int c1, int c); +static int A_is_harakat(int c); +static int A_is_iso(int c); +static int A_is_formb(int c); +static int A_is_ok(int c); +static int A_is_valid(int c); +static int A_is_special(int c); /* diff --git a/src/buffer.c b/src/buffer.c index 8986ac4e22..92513cc27d 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -28,26 +28,26 @@ #include "vim.h" #if defined(FEAT_CMDL_COMPL) || defined(FEAT_LISTCMDS) || defined(FEAT_EVAL) || defined(FEAT_PERL) -static char_u *buflist_match __ARGS((regmatch_T *rmp, buf_T *buf, int ignore_case)); +static char_u *buflist_match(regmatch_T *rmp, buf_T *buf, int ignore_case); # define HAVE_BUFLIST_MATCH -static char_u *fname_match __ARGS((regmatch_T *rmp, char_u *name, int ignore_case)); +static char_u *fname_match(regmatch_T *rmp, char_u *name, int ignore_case); #endif -static void buflist_setfpos __ARGS((buf_T *buf, win_T *win, linenr_T lnum, colnr_T col, int copy_options)); -static wininfo_T *find_wininfo __ARGS((buf_T *buf, int skip_diff_buffer)); +static void buflist_setfpos(buf_T *buf, win_T *win, linenr_T lnum, colnr_T col, int copy_options); +static wininfo_T *find_wininfo(buf_T *buf, int skip_diff_buffer); #ifdef UNIX -static buf_T *buflist_findname_stat __ARGS((char_u *ffname, struct stat *st)); -static int otherfile_buf __ARGS((buf_T *buf, char_u *ffname, struct stat *stp)); -static int buf_same_ino __ARGS((buf_T *buf, struct stat *stp)); +static buf_T *buflist_findname_stat(char_u *ffname, struct stat *st); +static int otherfile_buf(buf_T *buf, char_u *ffname, struct stat *stp); +static int buf_same_ino(buf_T *buf, struct stat *stp); #else -static int otherfile_buf __ARGS((buf_T *buf, char_u *ffname)); +static int otherfile_buf(buf_T *buf, char_u *ffname); #endif #ifdef FEAT_TITLE -static int ti_change __ARGS((char_u *str, char_u **last)); +static int ti_change(char_u *str, char_u **last); #endif -static int append_arg_number __ARGS((win_T *wp, char_u *buf, int buflen, int add_file)); -static void free_buffer __ARGS((buf_T *)); -static void free_buffer_stuff __ARGS((buf_T *buf, int free_options)); -static void clear_wininfo __ARGS((buf_T *buf)); +static int append_arg_number(win_T *wp, char_u *buf, int buflen, int add_file); +static void free_buffer(buf_T *); +static void free_buffer_stuff(buf_T *buf, int free_options); +static void clear_wininfo(buf_T *buf); #ifdef UNIX # define dev_T dev_t @@ -56,7 +56,7 @@ static void clear_wininfo __ARGS((buf_T *buf)); #endif #if defined(FEAT_SIGNS) -static void insert_sign __ARGS((buf_T *buf, signlist_T *prev, signlist_T *next, int id, linenr_T lnum, int typenr)); +static void insert_sign(buf_T *buf, signlist_T *prev, signlist_T *next, int id, linenr_T lnum, int typenr); #endif #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) @@ -1006,7 +1006,7 @@ do_bufdel(command, arg, addr_count, start_bnr, end_bnr, forceit) #if defined(FEAT_LISTCMDS) || defined(FEAT_PYTHON) \ || defined(FEAT_PYTHON3) || defined(PROTO) -static int empty_curbuf __ARGS((int close_others, int forceit, int action)); +static int empty_curbuf(int close_others, int forceit, int action); /* * Make the current buffer empty. @@ -2613,7 +2613,7 @@ buflist_setfpos(buf, win, lnum, col, copy_options) } #ifdef FEAT_DIFF -static int wininfo_other_tab_diff __ARGS((wininfo_T *wip)); +static int wininfo_other_tab_diff(wininfo_T *wip); /* * Return TRUE when "wip" has 'diff' set and the diff is only for another tab @@ -5118,7 +5118,7 @@ ex_buffer_all(eap) #endif /* FEAT_WINDOWS */ -static int chk_modeline __ARGS((linenr_T, int)); +static int chk_modeline(linenr_T, int); /* * do_modelines() - process mode lines for the current file diff --git a/src/charset.c b/src/charset.c index 8a4fb7d6c3..4df4e7f327 100644 --- a/src/charset.c +++ b/src/charset.c @@ -10,17 +10,17 @@ #include "vim.h" #ifdef FEAT_LINEBREAK -static int win_chartabsize __ARGS((win_T *wp, char_u *p, colnr_T col)); +static int win_chartabsize(win_T *wp, char_u *p, colnr_T col); #endif #ifdef FEAT_MBYTE # if defined(HAVE_WCHAR_H) # include <wchar.h> /* for towupper() and towlower() */ # endif -static int win_nolbr_chartabsize __ARGS((win_T *wp, char_u *s, colnr_T col, int *headp)); +static int win_nolbr_chartabsize(win_T *wp, char_u *s, colnr_T col, int *headp); #endif -static unsigned nr2hex __ARGS((unsigned c)); +static unsigned nr2hex(unsigned c); static int chartab_initialized = FALSE; diff --git a/src/crypt_zip.c b/src/crypt_zip.c index 571f3ec746..f7b69b0b2c 100644 --- a/src/crypt_zip.c +++ b/src/crypt_zip.c @@ -36,7 +36,7 @@ typedef struct { } zip_state_T; -static void make_crc_tab __ARGS((void)); +static void make_crc_tab(void); static u32_T crc_32_table[256]; diff --git a/src/diff.c b/src/diff.c index 09dfdbeeec..035f0ada9f 100644 --- a/src/diff.c +++ b/src/diff.c @@ -35,22 +35,22 @@ static int diff_bin_works = MAYBE; /* TRUE when "diff --binary" works, FALSE checked yet */ #endif -static int diff_buf_idx __ARGS((buf_T *buf)); -static int diff_buf_idx_tp __ARGS((buf_T *buf, tabpage_T *tp)); -static void diff_mark_adjust_tp __ARGS((tabpage_T *tp, int idx, linenr_T line1, linenr_T line2, long amount, long amount_after)); -static void diff_check_unchanged __ARGS((tabpage_T *tp, diff_T *dp)); -static int diff_check_sanity __ARGS((tabpage_T *tp, diff_T *dp)); -static void diff_redraw __ARGS((int dofold)); -static int diff_write __ARGS((buf_T *buf, char_u *fname)); -static void diff_file __ARGS((char_u *tmp_orig, char_u *tmp_new, char_u *tmp_diff)); -static int diff_equal_entry __ARGS((diff_T *dp, int idx1, int idx2)); -static int diff_cmp __ARGS((char_u *s1, char_u *s2)); +static int diff_buf_idx(buf_T *buf); +static int diff_buf_idx_tp(buf_T *buf, tabpage_T *tp); +static void diff_mark_adjust_tp(tabpage_T *tp, int idx, linenr_T line1, linenr_T line2, long amount, long amount_after); +static void diff_check_unchanged(tabpage_T *tp, diff_T *dp); +static int diff_check_sanity(tabpage_T *tp, diff_T *dp); +static void diff_redraw(int dofold); +static int diff_write(buf_T *buf, char_u *fname); +static void diff_file(char_u *tmp_orig, char_u *tmp_new, char_u *tmp_diff); +static int diff_equal_entry(diff_T *dp, int idx1, int idx2); +static int diff_cmp(char_u *s1, char_u *s2); #ifdef FEAT_FOLDING -static void diff_fold_update __ARGS((diff_T *dp, int skip_idx)); +static void diff_fold_update(diff_T *dp, int skip_idx); #endif -static void diff_read __ARGS((int idx_orig, int idx_new, char_u *fname)); -static void diff_copy_entry __ARGS((diff_T *dprev, diff_T *dp, int idx_orig, int idx_new)); -static diff_T *diff_alloc_new __ARGS((tabpage_T *tp, diff_T *dprev, diff_T *dp)); +static void diff_read(int idx_orig, int idx_new, char_u *fname); +static void diff_copy_entry(diff_T *dprev, diff_T *dp, int idx_orig, int idx_new); +static diff_T *diff_alloc_new(tabpage_T *tp, diff_T *dprev, diff_T *dp); #ifndef USE_CR # define tag_fgets vim_fgets diff --git a/src/digraph.c b/src/digraph.c index ba24e3f0fc..5814ab2672 100644 --- a/src/digraph.c +++ b/src/digraph.c @@ -28,8 +28,8 @@ typedef struct digraph result_T result; } digr_T; -static int getexactdigraph __ARGS((int, int, int)); -static void printdigraph __ARGS((digr_T *)); +static int getexactdigraph(int, int, int); +static void printdigraph(digr_T *); /* digraphs added by the user */ static garray_T user_digraphs = {0, 0, (int)sizeof(digr_T), 10, NULL}; @@ -2357,7 +2357,7 @@ typedef struct #define KMAP_MAXLEN 20 /* maximum length of "from" or "to" */ -static void keymap_unload __ARGS((void)); +static void keymap_unload(void); /* * Set up key mapping tables for the 'keymap' option. diff --git a/src/edit.c b/src/edit.c index bd5c57e1a9..72edd534e3 100644 --- a/src/edit.c +++ b/src/edit.c @@ -145,48 +145,48 @@ static expand_T compl_xp; static int compl_opt_refresh_always = FALSE; -static void ins_ctrl_x __ARGS((void)); -static int has_compl_option __ARGS((int dict_opt)); -static int ins_compl_accept_char __ARGS((int c)); -static int ins_compl_add __ARGS((char_u *str, int len, int icase, char_u *fname, char_u **cptext, int cdir, int flags, int adup)); -static int ins_compl_equal __ARGS((compl_T *match, char_u *str, int len)); -static void ins_compl_longest_match __ARGS((compl_T *match)); -static void ins_compl_add_matches __ARGS((int num_matches, char_u **matches, int icase)); -static int ins_compl_make_cyclic __ARGS((void)); -static void ins_compl_upd_pum __ARGS((void)); -static void ins_compl_del_pum __ARGS((void)); -static int pum_wanted __ARGS((void)); -static int pum_enough_matches __ARGS((void)); -static void ins_compl_dictionaries __ARGS((char_u *dict, char_u *pat, int flags, int thesaurus)); -static void ins_compl_files __ARGS((int count, char_u **files, int thesaurus, int flags, regmatch_T *regmatch, char_u *buf, int *dir)); -static char_u *find_line_end __ARGS((char_u *ptr)); -static void ins_compl_free __ARGS((void)); -static void ins_compl_clear __ARGS((void)); -static int ins_compl_bs __ARGS((void)); -static int ins_compl_need_restart __ARGS((void)); -static void ins_compl_new_leader __ARGS((void)); -static void ins_compl_addleader __ARGS((int c)); -static int ins_compl_len __ARGS((void)); -static void ins_compl_restart __ARGS((void)); -static void ins_compl_set_original_text __ARGS((char_u *str)); -static void ins_compl_addfrommatch __ARGS((void)); -static int ins_compl_prep __ARGS((int c)); -static void ins_compl_fixRedoBufForLeader __ARGS((char_u *ptr_arg)); -static buf_T *ins_compl_next_buf __ARGS((buf_T *buf, int flag)); +static void ins_ctrl_x(void); +static int has_compl_option(int dict_opt); +static int ins_compl_accept_char(int c); +static int ins_compl_add(char_u *str, int len, int icase, char_u *fname, char_u **cptext, int cdir, int flags, int adup); +static int ins_compl_equal(compl_T *match, char_u *str, int len); +static void ins_compl_longest_match(compl_T *match); +static void ins_compl_add_matches(int num_matches, char_u **matches, int icase); +static int ins_compl_make_cyclic(void); +static void ins_compl_upd_pum(void); +static void ins_compl_del_pum(void); +static int pum_wanted(void); +static int pum_enough_matches(void); +static void ins_compl_dictionaries(char_u *dict, char_u *pat, int flags, int thesaurus); +static void ins_compl_files(int count, char_u **files, int thesaurus, int flags, regmatch_T *regmatch, char_u *buf, int *dir); +static char_u *find_line_end(char_u *ptr); +static void ins_compl_free(void); +static void ins_compl_clear(void); +static int ins_compl_bs(void); +static int ins_compl_need_restart(void); +static void ins_compl_new_leader(void); +static void ins_compl_addleader(int c); +static int ins_compl_len(void); +static void ins_compl_restart(void); +static void ins_compl_set_original_text(char_u *str); +static void ins_compl_addfrommatch(void); +static int ins_compl_prep(int c); +static void ins_compl_fixRedoBufForLeader(char_u *ptr_arg); +static buf_T *ins_compl_next_buf(buf_T *buf, int flag); #if defined(FEAT_COMPL_FUNC) || defined(FEAT_EVAL) -static void ins_compl_add_list __ARGS((list_T *list)); -static void ins_compl_add_dict __ARGS((dict_T *dict)); -#endif -static int ins_compl_get_exp __ARGS((pos_T *ini)); -static void ins_compl_delete __ARGS((void)); -static void ins_compl_insert __ARGS((void)); -static int ins_compl_next __ARGS((int allow_get_expansion, int count, int insert_match)); -static int ins_compl_key2dir __ARGS((int c)); -static int ins_compl_pum_key __ARGS((int c)); -static int ins_compl_key2count __ARGS((int c)); -static int ins_compl_use_match __ARGS((int c)); -static int ins_complete __ARGS((int c)); -static unsigned quote_meta __ARGS((char_u *dest, char_u *str, int len)); +static void ins_compl_add_list(list_T *list); +static void ins_compl_add_dict(dict_T *dict); +#endif +static int ins_compl_get_exp(pos_T *ini); +static void ins_compl_delete(void); +static void ins_compl_insert(void); +static int ins_compl_next(int allow_get_expansion, int count, int insert_match); +static int ins_compl_key2dir(int c); +static int ins_compl_pum_key(int c); +static int ins_compl_key2count(int c); +static int ins_compl_use_match(int c); +static int ins_complete(int c); +static unsigned quote_meta(char_u *dest, char_u *str, int len); #endif /* FEAT_INS_EXPAND */ #define BACKSPACE_CHAR 1 @@ -194,80 +194,80 @@ static unsigned quote_meta __ARGS((char_u *dest, char_u *str, int len)); #define BACKSPACE_WORD_NOT_SPACE 3 #define BACKSPACE_LINE 4 -static void ins_redraw __ARGS((int ready)); -static void ins_ctrl_v __ARGS((void)); -static void undisplay_dollar __ARGS((void)); -static void insert_special __ARGS((int, int, int)); -static void internal_format __ARGS((int textwidth, int second_indent, int flags, int format_only, int c)); -static void check_auto_format __ARGS((int)); -static void redo_literal __ARGS((int c)); -static void start_arrow __ARGS((pos_T *end_insert_pos)); -static void start_arrow_with_change __ARGS((pos_T *end_insert_pos, int change)); -static void start_arrow_common __ARGS((pos_T *end_insert_pos, int change)); +static void ins_redraw(int ready); +static void ins_ctrl_v(void); +static void undisplay_dollar(void); +static void insert_special(int, int, int); +static void internal_format(int textwidth, int second_indent, int flags, int format_only, int c); +static void check_auto_format(int); +static void redo_literal(int c); +static void start_arrow(pos_T *end_insert_pos); +static void start_arrow_with_change(pos_T *end_insert_pos, int change); +static void start_arrow_common(pos_T *end_insert_pos, int change); #ifdef FEAT_SPELL -static void check_spell_redraw __ARGS((void)); -static void spell_back_to_badword __ARGS((void)); +static void check_spell_redraw(void); +static void spell_back_to_badword(void); static int spell_bad_len = 0; /* length of located bad word */ #endif -static void stop_insert __ARGS((pos_T *end_insert_pos, int esc, int nomove)); -static int echeck_abbr __ARGS((int)); -static int replace_pop __ARGS((void)); -static void replace_join __ARGS((int off)); -static void replace_pop_ins __ARGS((void)); +static void stop_insert(pos_T *end_insert_pos, int esc, int nomove); +static int echeck_abbr(int); +static int replace_pop(void); +static void replace_join(int off); +static void replace_pop_ins(void); #ifdef FEAT_MBYTE -static void mb_replace_pop_ins __ARGS((int cc)); +static void mb_replace_pop_ins(int cc); #endif -static void replace_flush __ARGS((void)); -static void replace_do_bs __ARGS((int limit_col)); -static int del_char_after_col __ARGS((int limit_col)); +static void replace_flush(void); +static void replace_do_bs(int limit_col); +static int del_char_after_col(int limit_col); #ifdef FEAT_CINDENT -static int cindent_on __ARGS((void)); +static int cindent_on(void); #endif -static void ins_reg __ARGS((void)); -static void ins_ctrl_g __ARGS((void)); -static void ins_ctrl_hat __ARGS((void)); -static int ins_esc __ARGS((long *count, int cmdchar, int nomove)); +static void ins_reg(void); +static void ins_ctrl_g(void); +static void ins_ctrl_hat(void); +static int ins_esc(long *count, int cmdchar, int nomove); #ifdef FEAT_RIGHTLEFT -static void ins_ctrl_ __ARGS((void)); -#endif -static int ins_start_select __ARGS((int c)); -static void ins_insert __ARGS((int replaceState)); -static void ins_ctrl_o __ARGS((void)); -static void ins_shift __ARGS((int c, int lastc)); -static void ins_del __ARGS((void)); -static int ins_bs __ARGS((int c, int mode, int *inserted_space_p)); +static void ins_ctrl_(void); +#endif +static int ins_start_select(int c); +static void ins_insert(int replaceState); +static void ins_ctrl_o(void); +static void ins_shift(int c, int lastc); +static void ins_del(void); +static int ins_bs(int c, int mode, int *inserted_space_p); #ifdef FEAT_MOUSE -static void ins_mouse __ARGS((int c)); -static void ins_mousescroll __ARGS((int dir)); +static void ins_mouse(int c); +static void ins_mousescroll(int dir); #endif #if defined(FEAT_GUI_TABLINE) || defined(PROTO) -static void ins_tabline __ARGS((int c)); -#endif -static void ins_left __ARGS((int end_change)); -static void ins_home __ARGS((int c)); -static void ins_end __ARGS((int c)); -static void ins_s_left __ARGS((void)); -static void ins_right __ARGS((int end_change)); -static void ins_s_right __ARGS((void)); -static void ins_up __ARGS((int startcol)); -static void ins_pageup __ARGS((void)); -static void ins_down __ARGS((int startcol)); -static void ins_pagedown __ARGS((void)); +static void ins_tabline(int c); +#endif +static void ins_left(int end_change); +static void ins_home(int c); +static void ins_end(int c); +static void ins_s_left(void); +static void ins_right(int end_change); +static void ins_s_right(void); +static void ins_up(int startcol); +static void ins_pageup(void); +static void ins_down(int startcol); +static void ins_pagedown(void); #ifdef FEAT_DND -static void ins_drop __ARGS((void)); +static void ins_drop(void); #endif -static int ins_tab __ARGS((void)); -static int ins_eol __ARGS((int c)); +static int ins_tab(void); +static int ins_eol(int c); #ifdef FEAT_DIGRAPHS -static int ins_digraph __ARGS((void)); +static int ins_digraph(void); #endif -static int ins_ctrl_ey __ARGS((int tc)); +static int ins_ctrl_ey(int tc); #ifdef FEAT_SMARTINDENT -static void ins_try_si __ARGS((int c)); +static void ins_try_si(int c); #endif -static colnr_T get_nolist_virtcol __ARGS((void)); +static colnr_T get_nolist_virtcol(void); #ifdef FEAT_AUTOCMD -static char_u *do_insert_char_pre __ARGS((int c)); +static char_u *do_insert_char_pre(int c); #endif static colnr_T Insstart_textlen; /* length of line when insert started */ @@ -4024,7 +4024,7 @@ ins_compl_next_buf(buf, flag) } #ifdef FEAT_COMPL_FUNC -static void expand_by_function __ARGS((int type, char_u *base)); +static void expand_by_function(int type, char_u *base); /* * Execute user defined complete function 'completefunc' or 'omnifunc', and @@ -7852,7 +7852,7 @@ cindent_on() void fixthisline(get_the_indent) - int (*get_the_indent) __ARGS((void)); + int (*get_the_indent)(void); { int amount = get_the_indent(); @@ -8849,7 +8849,7 @@ ins_del() AppendCharToRedobuff(K_DEL); } -static void ins_bs_one __ARGS((colnr_T *vcolp)); +static void ins_bs_one(colnr_T *vcolp); /* * Delete one character for ins_bs(). diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 6bd7afcc45..e9630ee078 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -19,26 +19,26 @@ #endif #ifdef FEAT_EX_EXTRA -static int linelen __ARGS((int *has_tab)); +static int linelen(int *has_tab); #endif -static void do_filter __ARGS((linenr_T line1, linenr_T line2, exarg_T *eap, char_u *cmd, int do_in, int do_out)); +static void do_filter(linenr_T line1, linenr_T line2, exarg_T *eap, char_u *cmd, int do_in, int do_out); #ifdef FEAT_VIMINFO -static char_u *viminfo_filename __ARGS((char_u *)); -static void do_viminfo __ARGS((FILE *fp_in, FILE *fp_out, int flags)); -static int viminfo_encoding __ARGS((vir_T *virp)); -static int read_viminfo_up_to_marks __ARGS((vir_T *virp, int forceit, int writing)); +static char_u *viminfo_filename(char_u *); +static void do_viminfo(FILE *fp_in, FILE *fp_out, int flags); +static int viminfo_encoding(vir_T *virp); +static int read_viminfo_up_to_marks(vir_T *virp, int forceit, int writing); #endif -static int check_readonly __ARGS((int *forceit, buf_T *buf)); +static int check_readonly(int *forceit, buf_T *buf); #ifdef FEAT_AUTOCMD -static void delbuf_msg __ARGS((char_u *name)); +static void delbuf_msg(char_u *name); #endif static int #ifdef __BORLANDC__ _RTLENTRYF #endif - help_compare __ARGS((const void *s1, const void *s2)); -static void prepare_help_buffer __ARGS((void)); + help_compare(const void *s1, const void *s2); +static void prepare_help_buffer(void); /* * ":ascii" and "ga". @@ -309,7 +309,7 @@ static int #ifdef __BORLANDC__ _RTLENTRYF #endif -sort_compare __ARGS((const void *s1, const void *s2)); +sort_compare(const void *s1, const void *s2); static int #ifdef __BORLANDC__ @@ -1759,7 +1759,7 @@ append_redir(buf, buflen, opt, fname) #if defined(FEAT_VIMINFO) || defined(PROTO) -static int no_viminfo __ARGS((void)); +static int no_viminfo(void); static void write_viminfo_barlines(vir_T *virp, FILE *fp_out); static int viminfo_errcnt; @@ -6627,7 +6627,7 @@ ex_viusage(eap) } #if defined(FEAT_EX_EXTRA) || defined(PROTO) -static void helptags_one __ARGS((char_u *dir, char_u *ext, char_u *lang, int add_help_tags)); +static void helptags_one(char_u *dir, char_u *ext, char_u *lang, int add_help_tags); /* * ":helptags" @@ -7038,9 +7038,9 @@ struct sign static sign_T *first_sign = NULL; static int next_sign_typenr = 1; -static int sign_cmd_idx __ARGS((char_u *begin_cmd, char_u *end_cmd)); -static void sign_list_defined __ARGS((sign_T *sp)); -static void sign_undefine __ARGS((sign_T *sp, sign_T *sp_prev)); +static int sign_cmd_idx(char_u *begin_cmd, char_u *end_cmd); +static void sign_list_defined(sign_T *sp); +static void sign_undefine(sign_T *sp, sign_T *sp_prev); static char *cmds[] = { "define", diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index bc7193d122..2c9209662b 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -14,7 +14,7 @@ #include "vim.h" #include "version.h" -static void cmd_source __ARGS((char_u *fname, exarg_T *eap)); +static void cmd_source(char_u *fname, exarg_T *eap); #ifdef FEAT_EVAL /* Growarray to store info about already sourced scripts. @@ -562,8 +562,8 @@ static garray_T prof_ga = {0, 0, sizeof(struct debuggy), 4, NULL}; #define DBG_FUNC 1 #define DBG_FILE 2 -static int dbg_parsearg __ARGS((char_u *arg, garray_T *gap)); -static linenr_T debuggy_find __ARGS((int file,char_u *fname, linenr_T after, garray_T *gap, int *fp)); +static int dbg_parsearg(char_u *arg, garray_T *gap); +static linenr_T debuggy_find(int file,char_u *fname, linenr_T after, garray_T *gap, int *fp); /* * Parse the arguments of ":profile", ":breakadd" or ":breakdel" and put them @@ -1133,8 +1133,8 @@ profile_divide(tm, count, tm2) /* * Functions for profiling. */ -static void script_do_profile __ARGS((scriptitem_T *si)); -static void script_dump_profile __ARGS((FILE *fd)); +static void script_do_profile(scriptitem_T *si); +static void script_dump_profile(FILE *fd); static proftime_T prof_wait_time; /* @@ -1757,7 +1757,7 @@ can_abandon(buf, forceit) || forceit); } -static void add_bufnum __ARGS((int *bufnrs, int *bufnump, int nr)); +static void add_bufnum(int *bufnrs, int *bufnump, int nr); /* * Add a buffer number to "bufnrs", unless it's already there. @@ -1951,12 +1951,12 @@ buf_write_all(buf, forceit) * Code to handle the argument list. */ -static char_u *do_one_arg __ARGS((char_u *str)); -static int do_arglist __ARGS((char_u *str, int what, int after)); -static void alist_check_arg_idx __ARGS((void)); -static int editing_arg_idx __ARGS((win_T *win)); +static char_u *do_one_arg(char_u *str); +static int do_arglist(char_u *str, int what, int after); +static void alist_check_arg_idx(void); +static int editing_arg_idx(win_T *win); #ifdef FEAT_LISTCMDS -static int alist_add_list __ARGS((int count, char_u **files, int after)); +static int alist_add_list(int count, char_u **files, int after); #endif #define AL_SET 1 #define AL_ADD 2 @@ -2960,7 +2960,7 @@ ex_runtime(eap) source_runtime(eap->arg, eap->forceit); } -static void source_callback __ARGS((char_u *fname, void *cookie)); +static void source_callback(char_u *fname, void *cookie); static void source_callback(fname, cookie) @@ -3224,11 +3224,11 @@ source_level(cookie) } #endif -static char_u *get_one_sourceline __ARGS((struct source_cookie *sp)); +static char_u *get_one_sourceline(struct source_cookie *sp); #if (defined(WIN32) && defined(FEAT_CSCOPE)) || defined(HAVE_FD_CLOEXEC) # define USE_FOPEN_NOINH -static FILE *fopen_noinh_readbin __ARGS((char *filename)); +static FILE *fopen_noinh_readbin(char *filename); /* * Special function to open a file without handle inheritance. @@ -4196,7 +4196,7 @@ do_finish(eap, reanimate) */ int source_finished(fgetline, cookie) - char_u *(*fgetline) __ARGS((int, void *, int)); + char_u *(*fgetline)(int, void *, int); void *cookie; { return (getline_equal(fgetline, cookie, getsourceline) @@ -4232,7 +4232,7 @@ ex_checktime(eap) #if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \ && (defined(FEAT_EVAL) || defined(FEAT_MULTI_LANG)) # define HAVE_GET_LOCALE_VAL -static char *get_locale_val __ARGS((int what)); +static char *get_locale_val(int what); static char * get_locale_val(what) @@ -4353,7 +4353,7 @@ get_mess_lang() || ((defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \ && (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE)) \ && !defined(LC_MESSAGES)) -static char_u *get_mess_env __ARGS((void)); +static char_u *get_mess_env(void); /* * Get the language used for messages from the environment. @@ -4555,8 +4555,8 @@ ex_language(eap) static char_u **locales = NULL; /* Array of all available locales */ static int did_init_locales = FALSE; -static void init_locales __ARGS((void)); -static char_u **find_locales __ARGS((void)); +static void init_locales(void); +static char_u **find_locales(void); /* * Lazy initialization of all available locales. diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 5c61679d7b..47f6b5b5d8 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -43,11 +43,11 @@ static garray_T ucmds = {0, 0, sizeof(ucmd_T), 4, NULL}; #define USER_CMD(i) (&((ucmd_T *)(ucmds.ga_data))[i]) #define USER_CMD_GA(gap, i) (&((ucmd_T *)((gap)->ga_data))[i]) -static void do_ucmd __ARGS((exarg_T *eap)); -static void ex_command __ARGS((exarg_T *eap)); -static void ex_delcommand __ARGS((exarg_T *eap)); +static void do_ucmd(exarg_T *eap); +static void ex_command(exarg_T *eap); +static void ex_delcommand(exarg_T *eap); # ifdef FEAT_CMDL_COMPL -static char_u *get_user_command_name __ARGS((int idx)); +static char_u *get_user_command_name(int idx); # endif /* Wether a command index indicates a user command. */ @@ -61,42 +61,42 @@ static char_u *get_user_command_name __ARGS((int idx)); # define IS_USER_CMDIDX(idx) (FALSE) #endif -static int compute_buffer_local_count __ARGS((int addr_type, int lnum, int local)); +static int compute_buffer_local_count(int addr_type, int lnum, int local); #ifdef FEAT_EVAL -static char_u *do_one_cmd __ARGS((char_u **, int, struct condstack *, char_u *(*fgetline)(int, void *, int), void *cookie)); +static char_u *do_one_cmd(char_u **, int, struct condstack *, char_u *(*fgetline)(int, void *, int), void *cookie); #else -static char_u *do_one_cmd __ARGS((char_u **, int, char_u *(*fgetline)(int, void *, int), void *cookie)); +static char_u *do_one_cmd(char_u **, int, char_u *(*fgetline)(int, void *, int), void *cookie); static int if_level = 0; /* depth in :if */ #endif -static void append_command __ARGS((char_u *cmd)); -static char_u *find_command __ARGS((exarg_T *eap, int *full)); +static void append_command(char_u *cmd); +static char_u *find_command(exarg_T *eap, int *full); -static void ex_abbreviate __ARGS((exarg_T *eap)); -static void ex_map __ARGS((exarg_T *eap)); -static void ex_unmap __ARGS((exarg_T *eap)); -static void ex_mapclear __ARGS((exarg_T *eap)); -static void ex_abclear __ARGS((exarg_T *eap)); +static void ex_abbreviate(exarg_T *eap); +static void ex_map(exarg_T *eap); +static void ex_unmap(exarg_T *eap); +static void ex_mapclear(exarg_T *eap); +static void ex_abclear(exarg_T *eap); #ifndef FEAT_MENU # define ex_emenu ex_ni # define ex_menu ex_ni # define ex_menutranslate ex_ni #endif #ifdef FEAT_AUTOCMD -static void ex_autocmd __ARGS((exarg_T *eap)); -static void ex_doautocmd __ARGS((exarg_T *eap)); +static void ex_autocmd(exarg_T *eap); +static void ex_doautocmd(exarg_T *eap); #else # define ex_autocmd ex_ni # define ex_doautocmd ex_ni # define ex_doautoall ex_ni #endif #ifdef FEAT_LISTCMDS -static void ex_bunload __ARGS((exarg_T *eap)); -static void ex_buffer __ARGS((exarg_T *eap)); -static void ex_bmodified __ARGS((exarg_T *eap)); -static void ex_bnext __ARGS((exarg_T *eap)); -static void ex_bprevious __ARGS((exarg_T *eap)); -static void ex_brewind __ARGS((exarg_T *eap)); -static void ex_blast __ARGS((exarg_T *eap)); +static void ex_bunload(exarg_T *eap); +static void ex_buffer(exarg_T *eap); +static void ex_bmodified(exarg_T *eap); +static void ex_bnext(exarg_T *eap); +static void ex_bprevious(exarg_T *eap); +static void ex_brewind(exarg_T *eap); +static void ex_blast(exarg_T *eap); #else # define ex_bunload ex_ni # define ex_buffer ex_ni @@ -111,9 +111,9 @@ static void ex_blast __ARGS((exarg_T *eap)); #if !defined(FEAT_LISTCMDS) || !defined(FEAT_WINDOWS) # define ex_buffer_all ex_ni #endif -static char_u *getargcmd __ARGS((char_u **)); -static char_u *skip_cmd_arg __ARGS((char_u *p, int rembs)); -static int getargopt __ARGS((exarg_T *eap)); +static char_u *getargcmd(char_u **); +static char_u *skip_cmd_arg(char_u *p, int rembs); +static int getargopt(exarg_T *eap); #ifndef FEAT_QUICKFIX # define ex_make ex_ni # define ex_cbuffer ex_ni @@ -134,9 +134,9 @@ static int getargopt __ARGS((exarg_T *eap)); # define ex_cexpr ex_ni #endif -static int check_more __ARGS((int, int)); -static linenr_T get_address __ARGS((exarg_T *, char_u **, int addr_type, int skip, int to_other_file)); -static void get_flags __ARGS((exarg_T *eap)); +static int check_more(int, int); +static linenr_T get_address(exarg_T *, char_u **, int addr_type, int skip, int to_other_file); +static void get_flags(exarg_T *eap); #if !defined(FEAT_PERL) \ || !defined(FEAT_PYTHON) || !defined(FEAT_PYTHON3) \ || !defined(FEAT_TCL) \ @@ -144,30 +144,30 @@ static void get_flags __ARGS((exarg_T *eap)); || !defined(FEAT_LUA) \ || !defined(FEAT_MZSCHEME) # define HAVE_EX_SCRIPT_NI -static void ex_script_ni __ARGS((exarg_T *eap)); +static void ex_script_ni(exarg_T *eap); #endif -static char_u *invalid_range __ARGS((exarg_T *eap)); -static void correct_range __ARGS((exarg_T *eap)); +static char_u *invalid_range(exarg_T *eap); +static void correct_range(exarg_T *eap); #ifdef FEAT_QUICKFIX -static char_u *replace_makeprg __ARGS((exarg_T *eap, char_u *p, char_u **cmdlinep)); -#endif -static char_u *repl_cmdline __ARGS((exarg_T *eap, char_u *src, int srclen, char_u *repl, char_u **cmdlinep)); -static void ex_highlight __ARGS((exarg_T *eap)); -static void ex_colorscheme __ARGS((exarg_T *eap)); -static void ex_quit __ARGS((exarg_T *eap)); -static void ex_cquit __ARGS((exarg_T *eap)); -static void ex_quit_all __ARGS((exarg_T *eap)); +static char_u *replace_makeprg(exarg_T *eap, char_u *p, char_u **cmdlinep); +#endif +static char_u *repl_cmdline(exarg_T *eap, char_u *src, int srclen, char_u *repl, char_u **cmdlinep); +static void ex_highlight(exarg_T *eap); +static void ex_colorscheme(exarg_T *eap); +static void ex_quit(exarg_T *eap); +static void ex_cquit(exarg_T *eap); +static void ex_quit_all(exarg_T *eap); #ifdef FEAT_WINDOWS -static void ex_close __ARGS((exarg_T *eap)); -static void ex_win_close __ARGS((int forceit, win_T *win, tabpage_T *tp)); -static void ex_only __ARGS((exarg_T *eap)); -static void ex_resize __ARGS((exarg_T *eap)); -static void ex_stag __ARGS((exarg_T *eap)); -static void ex_tabclose __ARGS((exarg_T *eap)); -static void ex_tabonly __ARGS((exarg_T *eap)); -static void ex_tabnext __ARGS((exarg_T *eap)); -static void ex_tabmove __ARGS((exarg_T *eap)); -static void ex_tabs __ARGS((exarg_T *eap)); +static void ex_close(exarg_T *eap); +static void ex_win_close(int forceit, win_T *win, tabpage_T *tp); +static void ex_only(exarg_T *eap); +static void ex_resize(exarg_T *eap); +static void ex_stag(exarg_T *eap); +static void ex_tabclose(exarg_T *eap); +static void ex_tabonly(exarg_T *eap); +static void ex_tabnext(exarg_T *eap); +static void ex_tabmove(exarg_T *eap); +static void ex_tabs(exarg_T *eap); #else # define ex_close ex_ni # define ex_only ex_ni @@ -182,51 +182,51 @@ static void ex_tabs __ARGS((exarg_T *eap)); # define ex_tabonly ex_ni #endif #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) -static void ex_pclose __ARGS((exarg_T *eap)); -static void ex_ptag __ARGS((exarg_T *eap)); -static void ex_pedit __ARGS((exarg_T *eap)); +static void ex_pclose(exarg_T *eap); +static void ex_ptag(exarg_T *eap); +static void ex_pedit(exarg_T *eap); #else # define ex_pclose ex_ni # define ex_ptag ex_ni # define ex_pedit ex_ni #endif -static void ex_hide __ARGS((exarg_T *eap)); -static void ex_stop __ARGS((exarg_T *eap)); -static void ex_exit __ARGS((exarg_T *eap)); -static void ex_print __ARGS((exarg_T *eap)); +static void ex_hide(exarg_T *eap); +static void ex_stop(exarg_T *eap); +static void ex_exit(exarg_T *eap); +static void ex_print(exarg_T *eap); #ifdef FEAT_BYTEOFF -static void ex_goto __ARGS((exarg_T *eap)); +static void ex_goto(exarg_T *eap); #else # define ex_goto |