aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/arabic.c38
-rw-r--r--src/blowfish.c10
-rw-r--r--src/blowfish.h16
-rw-r--r--src/buffer.c36
-rw-r--r--src/buffer.h158
-rw-r--r--src/charset.c8
-rw-r--r--src/charset.h124
-rw-r--r--src/diff.c35
-rw-r--r--src/diff.h56
-rw-r--r--src/digraph.c6
-rw-r--r--src/digraph.h14
-rw-r--r--src/edit.c206
-rw-r--r--src/edit.h88
-rw-r--r--src/eval.c952
-rw-r--r--src/eval.h296
-rw-r--r--src/ex_cmds.c35
-rw-r--r--src/ex_cmds.h134
-rw-r--r--src/ex_cmds2.c44
-rw-r--r--src/ex_cmds2.h183
-rw-r--r--src/ex_cmds_defs.h4
-rw-r--r--src/ex_docmd.c336
-rw-r--r--src/ex_docmd.h131
-rw-r--r--src/ex_eval.c14
-rw-r--r--src/ex_eval.h72
-rw-r--r--src/ex_getln.c105
-rw-r--r--src/ex_getln.h128
-rw-r--r--src/farsi.c40
-rw-r--r--src/file_search.c28
-rw-r--r--src/file_search.h26
-rw-r--r--src/fileio.c95
-rw-r--r--src/fileio.h159
-rw-r--r--src/fold.c97
-rw-r--r--src/fold.h96
-rw-r--r--src/garray.h18
-rw-r--r--src/getchar.c34
-rw-r--r--src/getchar.h144
-rw-r--r--src/globals.h24
-rw-r--r--src/hangulin.c9
-rw-r--r--src/hangulin.h14
-rw-r--r--src/hardcopy.c143
-rw-r--r--src/hardcopy.h38
-rw-r--r--src/hashtab.c2
-rw-r--r--src/hashtab.h26
-rw-r--r--src/if_cscope.c80
-rw-r--r--src/if_cscope.h22
-rw-r--r--src/if_cscope_defs.h2
-rw-r--r--src/main.c58
-rw-r--r--src/main.h50
-rw-r--r--src/mark.c14
-rw-r--r--src/mark.h64
-rw-r--r--src/mbyte.c32
-rw-r--r--src/mbyte.h196
-rw-r--r--src/memfile.c46
-rw-r--r--src/memfile.h32
-rw-r--r--src/memline.c52
-rw-r--r--src/memline.h78
-rw-r--r--src/menu.c46
-rw-r--r--src/menu.h42
-rw-r--r--src/message.c70
-rw-r--r--src/message.h158
-rw-r--r--src/misc1.c120
-rw-r--r--src/misc1.h230
-rw-r--r--src/misc2.c24
-rw-r--r--src/misc2.h210
-rw-r--r--src/move.c24
-rw-r--r--src/move.h78
-rw-r--r--src/normal.c214
-rw-r--r--src/normal.h54
-rw-r--r--src/ops.c58
-rw-r--r--src/ops.h128
-rw-r--r--src/option.c111
-rw-r--r--src/option.h140
-rw-r--r--src/os_unix.c58
-rw-r--r--src/os_unix.h146
-rw-r--r--src/os_unix_defs.h16
-rw-r--r--src/popupmnu.c2
-rw-r--r--src/popupmnu.h12
-rw-r--r--src/proto.h14
-rw-r--r--src/quickfix.c72
-rw-r--r--src/quickfix.h62
-rw-r--r--src/regexp.c174
-rw-r--r--src/regexp.h38
-rw-r--r--src/regexp_nfa.c160
-rw-r--r--src/screen.c90
-rw-r--r--src/screen.h128
-rw-r--r--src/search.c42
-rw-r--r--src/search.h94
-rw-r--r--src/sha256.c4
-rw-r--r--src/sha256.h20
-rw-r--r--src/spell.c410
-rw-r--r--src/spell.h56
-rw-r--r--src/syntax.c239
-rw-r--r--src/syntax.h112
-rw-r--r--src/tag.c32
-rw-r--r--src/tag.h26
-rw-r--r--src/term.c42
-rw-r--r--src/term.h124
-rw-r--r--src/ui.h130
-rw-r--r--src/undo.c60
-rw-r--r--src/undo.h58
-rw-r--r--src/version.c8
-rw-r--r--src/version.h16
-rw-r--r--src/vim.h14
-rw-r--r--src/window.c128
-rw-r--r--src/window.h182
105 files changed, 4689 insertions, 4735 deletions
diff --git a/src/arabic.c b/src/arabic.c
index 5359b83a43..8904ed7108 100644
--- a/src/arabic.c
+++ b/src/arabic.c
@@ -20,25 +20,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/blowfish.c b/src/blowfish.c
index d7074bd42c..354f66ab95 100644
--- a/src/blowfish.c
+++ b/src/blowfish.c
@@ -28,11 +28,11 @@ typedef union {
} block8;
-static void bf_e_block __ARGS((UINT32_T *p_xl, UINT32_T *p_xr));
-static void bf_e_cblock __ARGS((char_u *block));
-static int bf_check_tables __ARGS((UINT32_T a_ipa[18], UINT32_T a_sbi[4][256],
- UINT32_T val));
-static int bf_self_test __ARGS((void));
+static void bf_e_block(UINT32_T *p_xl, UINT32_T *p_xr);
+static void bf_e_cblock(char_u *block);
+static int bf_check_tables(UINT32_T a_ipa[18], UINT32_T a_sbi[4][256],
+ UINT32_T val);
+static int bf_self_test(void);
/* Blowfish code */
static UINT32_T pax[18];
diff --git a/src/blowfish.h b/src/blowfish.h
index d4d8f36429..747f469349 100644
--- a/src/blowfish.h
+++ b/src/blowfish.h
@@ -1,13 +1,13 @@
#ifndef NEOVIM_BLOWFISH_H
#define NEOVIM_BLOWFISH_H
/* blowfish.c */
-void bf_key_init __ARGS((char_u *password, char_u *salt, int salt_len));
-void bf_ofb_init __ARGS((char_u *iv, int iv_len));
-void bf_crypt_encode __ARGS((char_u *from, size_t len, char_u *to));
-void bf_crypt_decode __ARGS((char_u *ptr, long len));
-void bf_crypt_init_keys __ARGS((char_u *passwd));
-void bf_crypt_save __ARGS((void));
-void bf_crypt_restore __ARGS((void));
-int blowfish_self_test __ARGS((void));
+void bf_key_init(char_u *password, char_u *salt, int salt_len);
+void bf_ofb_init(char_u *iv, int iv_len);
+void bf_crypt_encode(char_u *from, size_t len, char_u *to);
+void bf_crypt_decode(char_u *ptr, long len);
+void bf_crypt_init_keys(char_u *passwd);
+void bf_crypt_save(void);
+void bf_crypt_restore(void);
+int blowfish_self_test(void);
/* vim: set ft=c : */
#endif /* NEOVIM_BLOWFISH_H */
diff --git a/src/buffer.c b/src/buffer.c
index 0cefde5640..1c1c0dc6d9 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -61,26 +61,24 @@
#include "undo.h"
#include "window.h"
-static char_u *buflist_match __ARGS((regprog_T *prog, buf_T *buf));
+static char_u *buflist_match(regprog_T *prog, buf_T *buf);
# define HAVE_BUFLIST_MATCH
-static char_u *fname_match __ARGS((regprog_T *prog, char_u *name));
-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 char_u *fname_match(regprog_T *prog, char_u *name);
+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
-static int ti_change __ARGS((char_u *str, char_u **last));
-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 ti_change(char_u *str, char_u **last);
+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
@@ -787,7 +785,7 @@ do_bufdel (
#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.
@@ -2035,7 +2033,7 @@ static void buflist_setfpos(buf_T *buf, win_T *win, linenr_T lnum, colnr_T col,
return;
}
-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
@@ -4107,7 +4105,7 @@ void ex_buffer_all(exarg_T *eap)
}
-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/buffer.h b/src/buffer.h
index 3ca525612d..f25a3a1b21 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -1,84 +1,84 @@
#ifndef NEOVIM_BUFFER_H
#define NEOVIM_BUFFER_H
/* buffer.c */
-int open_buffer __ARGS((int read_stdin, exarg_T *eap, int flags));
-int buf_valid __ARGS((buf_T *buf));
-void close_buffer __ARGS((win_T *win, buf_T *buf, int action, int abort_if_last));
-void buf_clear_file __ARGS((buf_T *buf));
-void buf_freeall __ARGS((buf_T *buf, int flags));
-void goto_buffer __ARGS((exarg_T *eap, int start, int dir, int count));
-void handle_swap_exists __ARGS((buf_T *old_curbuf));
-char_u *do_bufdel __ARGS((int command, char_u *arg, int addr_count,
- int start_bnr, int end_bnr,
- int forceit));
-int do_buffer __ARGS((int action, int start, int dir, int count, int forceit));
-void set_curbuf __ARGS((buf_T *buf, int action));
-void enter_buffer __ARGS((buf_T *buf));
-void do_autochdir __ARGS((void));
-buf_T *buflist_new __ARGS((char_u *ffname, char_u *sfname, linenr_T lnum,
- int flags));
-void free_buf_options __ARGS((buf_T *buf, int free_p_ff));
-int buflist_getfile __ARGS((int n, linenr_T lnum, int options, int forceit));
-void buflist_getfpos __ARGS((void));
-buf_T *buflist_findname_exp __ARGS((char_u *fname));
-buf_T *buflist_findname __ARGS((char_u *ffname));
-int buflist_findpat __ARGS((char_u *pattern, char_u *pattern_end, int unlisted,
- int diffmode,
- int curtab_only));
-int ExpandBufnames __ARGS((char_u *pat, int *num_file, char_u ***file,
- int options));
-buf_T *buflist_findnr __ARGS((int nr));
-char_u *buflist_nr2name __ARGS((int n, int fullname, int helptail));
-void get_winopts __ARGS((buf_T *buf));
-pos_T *buflist_findfpos __ARGS((buf_T *buf));
-linenr_T buflist_findlnum __ARGS((buf_T *buf));
-void buflist_list __ARGS((exarg_T *eap));
-int buflist_name_nr __ARGS((int fnum, char_u **fname, linenr_T *lnum));
-int setfname __ARGS((buf_T *buf, char_u *ffname, char_u *sfname, int message));
-void buf_set_name __ARGS((int fnum, char_u *name));
-void buf_name_changed __ARGS((buf_T *buf));
-buf_T *setaltfname __ARGS((char_u *ffname, char_u *sfname, linenr_T lnum));
-char_u *getaltfname __ARGS((int errmsg));
-int buflist_add __ARGS((char_u *fname, int flags));
-void buflist_slash_adjust __ARGS((void));
-void buflist_altfpos __ARGS((win_T *win));
-int otherfile __ARGS((char_u *ffname));
-void buf_setino __ARGS((buf_T *buf));
-void fileinfo __ARGS((int fullname, int shorthelp, int dont_truncate));
-void col_print __ARGS((char_u *buf, size_t buflen, int col, int vcol));
-void maketitle __ARGS((void));
-void resettitle __ARGS((void));
-void free_titles __ARGS((void));
-int build_stl_str_hl __ARGS((win_T *wp, char_u *out, size_t outlen, char_u *fmt,
- int use_sandbox, int fillchar, int maxwidth,
- struct stl_hlrec *hltab,
- struct stl_hlrec *tabtab));
-void get_rel_pos __ARGS((win_T *wp, char_u *buf, int buflen));
-char_u *fix_fname __ARGS((char_u *fname));
-void fname_expand __ARGS((buf_T *buf, char_u **ffname, char_u **sfname));
-char_u *alist_name __ARGS((aentry_T *aep));
-void do_arg_all __ARGS((int count, int forceit, int keep_tabs));
-void ex_buffer_all __ARGS((exarg_T *eap));
-void do_modelines __ARGS((int flags));
-int read_viminfo_bufferlist __ARGS((vir_T *virp, int writing));
-void write_viminfo_bufferlist __ARGS((FILE *fp));
-char_u *buf_spname __ARGS((buf_T *buf));
-int find_win_for_buf __ARGS((buf_T *buf, win_T **wp, tabpage_T **tp));
-void buf_addsign __ARGS((buf_T *buf, int id, linenr_T lnum, int typenr));
-linenr_T buf_change_sign_type __ARGS((buf_T *buf, int markId, int typenr));
-int buf_getsigntype __ARGS((buf_T *buf, linenr_T lnum, int type));
-linenr_T buf_delsign __ARGS((buf_T *buf, int id));
-int buf_findsign __ARGS((buf_T *buf, int id));
-int buf_findsign_id __ARGS((buf_T *buf, linenr_T lnum));
-int buf_findsigntype_id __ARGS((buf_T *buf, linenr_T lnum, int typenr));
-int buf_signcount __ARGS((buf_T *buf, linenr_T lnum));
-void buf_delete_signs __ARGS((buf_T *buf));
-void buf_delete_all_signs __ARGS((void));
-void sign_list_placed __ARGS((buf_T *rbuf));
-void sign_mark_adjust __ARGS((linenr_T line1, linenr_T line2, long amount,
- long amount_after));
-void set_buflisted __ARGS((int on));
-int buf_contents_changed __ARGS((buf_T *buf));
-void wipe_buffer __ARGS((buf_T *buf, int aucmd));
+int open_buffer(int read_stdin, exarg_T *eap, int flags);
+int buf_valid(buf_T *buf);
+void close_buffer(win_T *win, buf_T *buf, int action, int abort_if_last);
+void buf_clear_file(buf_T *buf);
+void buf_freeall(buf_T *buf, int flags);
+void goto_buffer(exarg_T *eap, int start, int dir, int count);
+void handle_swap_exists(buf_T *old_curbuf);
+char_u *do_bufdel(int command, char_u *arg, int addr_count,
+ int start_bnr, int end_bnr,
+ int forceit);
+int do_buffer(int action, int start, int dir, int count, int forceit);
+void set_curbuf(buf_T *buf, int action);
+void enter_buffer(buf_T *buf);
+void do_autochdir(void);
+buf_T *buflist_new(char_u *ffname, char_u *sfname, linenr_T lnum,
+ int flags);
+void free_buf_options(buf_T *buf, int free_p_ff);
+int buflist_getfile(int n, linenr_T lnum, int options, int forceit);
+void buflist_getfpos(void);
+buf_T *buflist_findname_exp(char_u *fname);
+buf_T *buflist_findname(char_u *ffname);
+int buflist_findpat(char_u *pattern, char_u *pattern_end, int unlisted,
+ int diffmode,
+ int curtab_only);
+int ExpandBufnames(char_u *pat, int *num_file, char_u ***file,
+ int options);
+buf_T *buflist_findnr(int nr);
+char_u *buflist_nr2name(int n, int fullname, int helptail);
+void get_winopts(buf_T *buf);
+pos_T *buflist_findfpos(buf_T *buf);
+linenr_T buflist_findlnum(buf_T *buf);
+void buflist_list(exarg_T *eap);
+int buflist_name_nr(int fnum, char_u **fname, linenr_T *lnum);
+int setfname(buf_T *buf, char_u *ffname, char_u *sfname, int message);
+void buf_set_name(int fnum, char_u *name);
+void buf_name_changed(buf_T *buf);
+buf_T *setaltfname(char_u *ffname, char_u *sfname, linenr_T lnum);
+char_u *getaltfname(int errmsg);
+int buflist_add(char_u *fname, int flags);
+void buflist_slash_adjust(void);
+void buflist_altfpos(win_T *win);
+int otherfile(char_u *ffname);
+void buf_setino(buf_T *buf);
+void fileinfo(int fullname, int shorthelp, int dont_truncate);
+void col_print(char_u *buf, size_t buflen, int col, int vcol);
+void maketitle(void);
+void resettitle(void);
+void free_titles(void);
+int build_stl_str_hl(win_T *wp, char_u *out, size_t outlen, char_u *fmt,
+ int use_sandbox, int fillchar, int maxwidth,
+ struct stl_hlrec *hltab,
+ struct stl_hlrec *tabtab);
+void get_rel_pos(win_T *wp, char_u *buf, int buflen);
+char_u *fix_fname(char_u *fname);
+void fname_expand(buf_T *buf, char_u **ffname, char_u **sfname);
+char_u *alist_name(aentry_T *aep);
+void do_arg_all(int count, int forceit, int keep_tabs);
+void ex_buffer_all(exarg_T *eap);
+void do_modelines(int flags);
+int read_viminfo_bufferlist(vir_T *virp, int writing);
+void write_viminfo_bufferlist(FILE *fp);
+char_u *buf_spname(buf_T *buf);
+int find_win_for_buf(buf_T *buf, win_T **wp, tabpage_T **tp);
+void buf_addsign(buf_T *buf, int id, linenr_T lnum, int typenr);
+linenr_T buf_change_sign_type(buf_T *buf, int markId, int typenr);
+int buf_getsigntype(buf_T *buf, linenr_T lnum, int type);
+linenr_T buf_delsign(buf_T *buf, int id);
+int buf_findsign(buf_T *buf, int id);
+int buf_findsign_id(buf_T *buf, linenr_T lnum);
+int buf_findsigntype_id(buf_T *buf, linenr_T lnum, int typenr);
+int buf_signcount(buf_T *buf, linenr_T lnum);
+void buf_delete_signs(buf_T *buf);
+void buf_delete_all_signs(void);
+void sign_list_placed(buf_T *rbuf);
+void sign_mark_adjust(linenr_T line1, linenr_T line2, long amount,
+ long amount_after);
+void set_buflisted(int on);
+int buf_contents_changed(buf_T *buf);
+void wipe_buffer(buf_T *buf, int aucmd);
/* vim: set ft=c : */
#endif /* NEOVIM_BUFFER_H */
diff --git a/src/charset.c b/src/charset.c
index d613e2b48b..ad84f09874 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -18,15 +18,15 @@
#include "move.h"
#include "os_unix.h"
-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);
# 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);
-static unsigned nr2hex __ARGS((unsigned c));
+static unsigned nr2hex(unsigned c);
static int chartab_initialized = FALSE;
diff --git a/src/charset.h b/src/charset.h
index d680522880..433c88ec9e 100644
--- a/src/charset.h
+++ b/src/charset.h
@@ -1,67 +1,67 @@
#ifndef NEOVIM_CHARSET_H
#define NEOVIM_CHARSET_H
/* charset.c */
-int init_chartab __ARGS((void));
-int buf_init_chartab __ARGS((buf_T *buf, int global));
-void trans_characters __ARGS((char_u *buf, int bufsize));
-char_u *transstr __ARGS((char_u *s));
-char_u *str_foldcase __ARGS((char_u *str, int orglen, char_u *buf, int buflen));
-char_u *transchar __ARGS((int c));
-char_u *transchar_byte __ARGS((int c));
-void transchar_nonprint __ARGS((char_u *buf, int c));
-void transchar_hex __ARGS((char_u *buf, int c));
-int byte2cells __ARGS((int b));
-int char2cells __ARGS((int c));
-int ptr2cells __ARGS((char_u *p));
-int vim_strsize __ARGS((char_u *s));
-int vim_strnsize __ARGS((char_u *s, int len));
-int chartabsize __ARGS((char_u *p, colnr_T col));
-int linetabsize __ARGS((char_u *s));
-int linetabsize_col __ARGS((int startcol, char_u *s));
-int win_linetabsize __ARGS((win_T *wp, char_u *p, colnr_T len));
-int vim_isIDc __ARGS((int c));
-int vim_iswordc __ARGS((int c));
-int vim_iswordc_buf __ARGS((int c, buf_T *buf));
-int vim_iswordp __ARGS((char_u *p));
-int vim_iswordp_buf __ARGS((char_u *p, buf_T *buf));
-int vim_isfilec __ARGS((int c));
-int vim_isfilec_or_wc __ARGS((int c));
-int vim_isprintc __ARGS((int c));
-int vim_isprintc_strict __ARGS((int c));
-int lbr_chartabsize __ARGS((unsigned char *s, colnr_T col));
-int lbr_chartabsize_adv __ARGS((char_u **s, colnr_T col));
-int win_lbr_chartabsize __ARGS((win_T *wp, char_u *s, colnr_T col, int *headp));
-int in_win_border __ARGS((win_T *wp, colnr_T vcol));
-void getvcol __ARGS((win_T *wp, pos_T *pos, colnr_T *start, colnr_T *cursor,
- colnr_T *end));
-colnr_T getvcol_nolist __ARGS((pos_T *posp));
-void getvvcol __ARGS((win_T *wp, pos_T *pos, colnr_T *start, colnr_T *cursor,
- colnr_T *end));
-void getvcols __ARGS((win_T *wp, pos_T *pos1, pos_T *pos2, colnr_T *left,
- colnr_T *right));
-char_u *skipwhite __ARGS((char_u *q));
-char_u *skipdigits __ARGS((char_u *q));
-char_u *skiphex __ARGS((char_u *q));
-char_u *skiptodigit __ARGS((char_u *q));
-char_u *skiptohex __ARGS((char_u *q));
-int vim_isdigit __ARGS((int c));
-int vim_isxdigit __ARGS((int c));
-int vim_islower __ARGS((int c));
-int vim_isupper __ARGS((int c));
-int vim_toupper __ARGS((int c));
-int vim_tolower __ARGS((int c));
-char_u *skiptowhite __ARGS((char_u *p));
-char_u *skiptowhite_esc __ARGS((char_u *p));
-long getdigits __ARGS((char_u **pp));
-int vim_isblankline __ARGS((char_u *lbuf));
-void vim_str2nr __ARGS((char_u *start, int *hexp, int *len, int dooct,
- int dohex, long *nptr,
- unsigned long *unptr));
-int hex2nr __ARGS((int c));
-int hexhex2nr __ARGS((char_u *p));
-int rem_backslash __ARGS((char_u *str));
-void backslash_halve __ARGS((char_u *p));
-char_u *backslash_halve_save __ARGS((char_u *p));
-void ebcdic2ascii __ARGS((char_u *buffer, int len));
+int init_chartab(void);
+int buf_init_chartab(buf_T *buf, int global);
+void trans_characters(char_u *buf, int bufsize);
+char_u *transstr(char_u *s);
+char_u *str_foldcase(char_u *str, int orglen, char_u *buf, int buflen);
+char_u *transchar(int c);
+char_u *transchar_byte(int c);
+void transchar_nonprint(char_u *buf, int c);
+void transchar_hex(char_u *buf, int c);
+int byte2cells(int b);
+int char2cells(int c);
+int ptr2cells(char_u *p);
+int vim_strsize(char_u *s);
+int vim_strnsize(char_u *s, int len);
+int chartabsize(char_u *p, colnr_T col);
+int linetabsize(char_u *s);
+int linetabsize_col(int startcol, char_u *s);
+int win_linetabsize(win_T *wp, char_u *p, colnr_T len);
+int vim_isIDc(int c);
+int vim_iswordc(int c);
+int vim_iswordc_buf(int c, buf_T *buf);
+int vim_iswordp(char_u *p);
+int vim_iswordp_buf(char_u *p, buf_T *buf);
+int vim_isfilec(int c);
+int vim_isfilec_or_wc(int c);
+int vim_isprintc(int c);
+int vim_isprintc_strict(int c);
+int lbr_chartabsize(unsigned char *s, colnr_T col);
+int lbr_chartabsize_adv(char_u **s, colnr_T col);
+int win_lbr_chartabsize(win_T *wp, char_u *s, colnr_T col, int *headp);
+int in_win_border(win_T *wp, colnr_T vcol);
+void getvcol(win_T *wp, pos_T *pos, colnr_T *start, colnr_T *cursor,
+ colnr_T *end);
+colnr_T getvcol_nolist(pos_T *posp);
+void getvvcol(win_T *wp, pos_T *pos, colnr_T *start, colnr_T *cursor,
+ colnr_T *end);
+void getvcols(win_T *wp, pos_T *pos1, pos_T *pos2, colnr_T *left,
+ colnr_T *right);
+char_u *skipwhite(char_u *q);
+char_u *skipdigits(char_u *q);
+char_u *skiphex(char_u *q);
+char_u *skiptodigit(char_u *q);
+char_u *skiptohex(char_u *q);
+int vim_isdigit(int c);
+int vim_isxdigit(int c);
+int vim_islower(int c);
+int vim_isupper(int c);
+int vim_toupper(int c);
+int vim_tolower(int c);
+char_u *skiptowhite(char_u *p);
+char_u *skiptowhite_esc(char_u *p);
+long getdigits(char_u **pp);
+int vim_isblankline(char_u *lbuf);
+void vim_str2nr(char_u *start, int *hexp, int *len, int dooct,
+ int dohex, long *nptr,
+ unsigned long *unptr);
+int hex2nr(int c);
+int hexhex2nr(char_u *p);
+int rem_backslash(char_u *str);
+void backslash_halve(char_u *p);
+char_u *backslash_halve_save(char_u *p);
+void ebcdic2ascii(char_u *buffer, int len);
/* vim: set ft=c : */
#endif /* NEOVIM_CHARSET_H */
diff --git a/src/diff.c b/src/diff.c
index 626271a7b5..ff375c9296 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -49,24 +49,23 @@ static int diff_flags = DIFF_FILLER;
static int diff_a_works = MAYBE; /* TRUE when "diff -a" works, FALSE when it
doesn't work, MAYBE when not checked yet */
-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 void diff_fold_update __ARGS((diff_T *dp, int skip_idx));
-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 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);
+static void diff_fold_update(diff_T *dp, int skip_idx);
+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/diff.h b/src/diff.h
index 5a2d32204e..2f51fafbb2 100644
--- a/src/diff.h
+++ b/src/diff.h
@@ -1,33 +1,33 @@
#ifndef NEOVIM_DIFF_H
#define NEOVIM_DIFF_H
/* diff.c */
-void diff_buf_delete __ARGS((buf_T *buf));
-void diff_buf_adjust __ARGS((win_T *win));
-void diff_buf_add __ARGS((buf_T *buf));
-void diff_invalidate __ARGS((buf_T *buf));
-void diff_mark_adjust __ARGS((linenr_T line1, linenr_T line2, long amount,
- long amount_after));
-void ex_diffupdate __ARGS((exarg_T *eap));
-void ex_diffpatch __ARGS((exarg_T *eap));
-void ex_diffsplit __ARGS((exarg_T *eap));
-void ex_diffthis __ARGS((exarg_T *eap));
-void diff_win_options __ARGS((win_T *wp, int addbuf));
-void ex_diffoff __ARGS((exarg_T *eap));
-void diff_clear __ARGS((tabpage_T *tp));
-int diff_check __ARGS((win_T *wp, linenr_T lnum));
-int diff_check_fill __ARGS((win_T *wp, linenr_T lnum));
-void diff_set_topline __ARGS((win_T *fromwin, win_T *towin));
-int diffopt_changed __ARGS((void));
-int diffopt_horizontal __ARGS((void));
-int diff_find_change __ARGS((win_T *wp, linenr_T lnum, int *startp, int *endp));
-int diff_infold __ARGS((win_T *wp, linenr_T lnum));
-void nv_diffgetput __ARGS((int put));
-void ex_diffgetput __ARGS((exarg_T *eap));
-int diff_mode_buf __ARGS((buf_T *buf));
-int diff_move_to __ARGS((int dir, long count));
-linenr_T diff_get_corresponding_line __ARGS((buf_T *buf1, linenr_T lnum1,
- buf_T *buf2,
- linenr_T lnum3));
-linenr_T diff_lnum_win __ARGS((linenr_T lnum, win_T *wp));
+void diff_buf_delete(buf_T *buf);
+void diff_buf_adjust(win_T *win);
+void diff_buf_add(buf_T *buf);
+void diff_invalidate(buf_T *buf);
+void diff_mark_adjust(linenr_T line1, linenr_T line2, long amount,
+ long amount_after);
+void ex_diffupdate(exarg_T *eap);
+void ex_diffpatch(exarg_T *eap);
+void ex_diffsplit(exarg_T *eap);
+void ex_diffthis(exarg_T *eap);
+void diff_win_options(win_T *wp, int addbuf);
+void ex_diffoff(exarg_T *eap);
+void diff_clear(tabpage_T *tp);
+int diff_check(win_T *wp, linenr_T lnum);
+int diff_check_fill(win_T *wp, linenr_T lnum);
+void diff_set_topline(win_T *fromwin, win_T *towin);
+int diffopt_changed(void);
+int diffopt_horizontal(void);
+int diff_find_change(win_T *wp, linenr_T lnum, int *startp, int *endp);
+int diff_infold(win_T *wp, linenr_T lnum);
+void nv_diffgetput(int put);
+void ex_diffgetput(exarg_T *eap);
+int diff_mode_buf(buf_T *buf);
+int diff_move_to(int dir, long count);
+linenr_T diff_get_corresponding_line(buf_T *buf1, linenr_T lnum1,
+ buf_T *buf2,
+ linenr_T lnum3);
+linenr_T diff_lnum_win(linenr_T lnum, win_T *wp);
/* vim: set ft=c : */
#endif /* NEOVIM_DIFF_H */
diff --git a/src/digraph.c b/src/digraph.c
index 25b0251916..3faac48089 100644
--- a/src/digraph.c
+++ b/src/digraph.c
@@ -34,8 +34,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};
@@ -1922,7 +1922,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/digraph.h b/src/digraph.h
index c74e428979..f638e0bd90 100644
--- a/src/digraph.h
+++ b/src/digraph.h
@@ -1,12 +1,12 @@
#ifndef NEOVIM_DIGRAPH_H
#define NEOVIM_DIGRAPH_H
/* digraph.c */
-int do_digraph __ARGS((int c));
-int get_digraph __ARGS((int cmdline));
-int getdigraph __ARGS((int char1, int char2, int meta_char));
-void putdigraph __ARGS((char_u *str));
-void listdigraphs __ARGS((void));
-char_u *keymap_init __ARGS((void));
-void ex_loadkeymap __ARGS((exarg_T *eap));
+int do_digraph(int c);
+int get_digraph(int cmdline);
+int getdigraph(int char1, int char2, int meta_char);
+void putdigraph(char_u *str);
+void listdigraphs(void);
+char_u *keymap_init(void);
+void ex_loadkeymap(exarg_T *eap);
/* vim: set ft=c : */
#endif /* NEOVIM_DIGRAPH_H */
diff --git a/src/edit.c b/src/edit.c
index 6ac6565d40..5397904902 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -165,113 +165,113 @@ 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_compl_add_list __ARGS((list_T *list));
-static void ins_compl_add_dict __ARGS((dict_T *dict));
-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_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);
+static void ins_compl_add_list(list_T *list);
+static void ins_compl_add_dict(dict_T *dict);
+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);
#define BACKSPACE_CHAR 1
#define BACKSPACE_WORD 2
#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 check_spell_redraw __ARGS((void));
-static void spell_back_to_badword __ARGS((void));
+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 check_spell_redraw(void);
+static void spell_back_to_badword(void);
static int spell_bad_len = 0; /* length of located bad word */
-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 mb_replace_pop_ins __ARGS((int cc));
-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 int cindent_on __ARGS((void));
-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_ctrl_ __ARGS((void));
-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_mouse __ARGS((int c));
-static void ins_mousescroll __ARGS((int dir));
-static void ins_left __ARGS((void));
-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((void));
-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 int ins_tab __ARGS((void));
-static int ins_eol __ARGS((int c));
-static int ins_digraph __ARGS((void));
-static int ins_ctrl_ey __ARGS((int tc));
-static void ins_try_si __ARGS((int c));
-static colnr_T get_nolist_virtcol __ARGS((void));
-static char_u *do_insert_char_pre __ARGS((int c));
+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);
+static void mb_replace_pop_ins(int cc);
+static void replace_flush(void);
+static void replace_do_bs(int limit_col);
+static int del_char_after_col(int limit_col);
+static int cindent_on(void);
+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);
+static void ins_ctrl_(void);
+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);
+static void ins_mouse(int c);
+static void ins_mousescroll(int dir);
+static void ins_left(void);
+static void ins_home(int c);
+static void ins_end(int c);
+static void ins_s_left(void);
+static void ins_right(void);
+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);
+static int ins_tab(void);
+static int ins_eol(int c);
+static int ins_digraph(void);
+static int ins_ctrl_ey(int tc);
+static void ins_try_si(int c);
+static colnr_T get_nolist_virtcol(void);
+static char_u *do_insert_char_pre(int c);
static colnr_T Insstart_textlen; /* length of line when insert started */
static colnr_T Insstart_blank_vcol; /* vcol for first inserted blank */
@@ -3337,7 +3337,7 @@ static buf_T *ins_compl_next_buf(buf_T *buf, int flag)
return buf;
}
-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
@@ -6479,7 +6479,7 @@ static int cindent_on(void) {
*/
void fixthisline(get_the_indent)
-int (*get_the_indent)__ARGS((void));
+int (*get_the_indent)(void);
{
change_indent(INDENT_SET, get_the_indent(), FALSE, 0, TRUE);
if (linewhite(curwin->w_cursor.lnum))
@@ -7267,7 +7267,7 @@ static void ins_del(void) {
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/edit.h b/src/edit.h
index aa2b72d93b..b1ae8cbc94 100644
--- a/src/edit.h
+++ b/src/edit.h
@@ -1,49 +1,49 @@
#ifndef NEOVIM_EDIT_H
#define NEOVIM_EDIT_H
/* edit.c */
-int edit __ARGS((int cmdchar, int startln, long count));
-void edit_putchar __ARGS((int c, int highlight));
-void edit_unputchar __ARGS((void));
-void display_dollar __ARGS((colnr_T col));
-void change_indent __ARGS((int type, int amount, int round, int replaced,
- int call_changed_bytes));
-void truncate_spaces __ARGS((char_u *line));
-void backspace_until_column __ARGS((int col));
-int vim_is_ctrl_x_key __ARGS((int c));
-int ins_compl_add_infercase __ARGS((char_u *str, int len, int icase, char_u *
- fname, int dir,
- int flags));
-void set_completion __ARGS((colnr_T startcol, list_T *list));
-void ins_compl_show_pum __ARGS((void));
-char_u *find_word_start __ARGS((char_u *ptr));
-char_u *find_word_end __ARGS((char_u *ptr));
-int ins_compl_active __ARGS((void));
-int ins_compl_add_tv __ARGS((typval_T *tv, int dir));
-void ins_compl_check_keys __ARGS((int frequency));
-int get_literal __ARGS((void));
-void insertchar __ARGS((int c, int flags, int second_indent));
-void auto_format __ARGS((int trailblank, int prev_line));
-int comp_textwidth __ARGS((int ff));
-int stop_arrow __ARGS((void));
-void set_last_insert __ARGS((int c));
-void free_last_insert __ARGS((void));
-char_u *add_char2buf __ARGS((int c, char_u *s));
-void beginline __ARGS((int flags));
-int oneright __ARGS((void));
-int oneleft __ARGS((void));
-int cursor_up __ARGS((long n, int upd_topline));
-int cursor_down __ARGS((long n, int upd_topline));
-int stuff_inserted __ARGS((int c, long count, int no_esc));
-char_u *get_last_insert __ARGS((void));
-char_u *get_last_insert_save __ARGS((void));
-void replace_push __ARGS((int c));
-int replace_push_mb __ARGS((char_u *p));
-void fixthisline __ARGS((int (*get_the_indent)(void)));
-void fix_indent __ARGS((void));
-int in_cinkeys __ARGS((int keytyped, int when, int line_is_empty));
-int hkmap __ARGS((int c));
-void ins_scroll __ARGS((void));
-void ins_horscroll __ARGS((void));
-int ins_copychar __ARGS((linenr_T lnum));
+int edit(int cmdchar, int startln, long count);
+void edit_putchar(int c, int highlight);
+void edit_unputchar(void);
+void display_dollar(colnr_T col);
+void change_indent(int type, int amount, int round, int replaced,
+ int call_changed_bytes);
+void truncate_spaces(char_u *line);
+void backspace_until_column(int col);
+int vim_is_ctrl_x_key(int c);
+int ins_compl_add_infercase(char_u *str, int len, int icase,
+ char_u *fname, int dir,
+ int flags);
+void set_completion(colnr_T startcol, list_T *list);
+void ins_compl_show_pum(void);
+char_u *find_word_start(char_u *ptr);
+char_u *find_word_end(char_u *ptr);
+int ins_compl_active(void);
+int ins_compl_add_tv(typval_T *tv, int dir);
+void ins_compl_check_keys(int frequency);
+int get_literal(void);
+void insertchar(int c, int flags, int second_indent);
+void auto_format(int trailblank, int prev_line);
+int comp_textwidth(int ff);
+int stop_arrow(void);
+void set_last_insert(int c);
+void free_last_insert(void);
+char_u *add_char2buf(int c, char_u *s);
+void beginline(int flags);
+int oneright(void);
+int oneleft(void);
+int cursor_up(long n, int upd_topline);
+int cursor_down(long n, int upd_topline);
+int stuff_inserted(int c, long count, int no_esc);
+char_u *get_last_insert(void);
+char_u *get_last_insert_save(void);
+void replace_push(int c);
+int replace_push_mb(char_u *p);
+void fixthisline(int (*get_the_indent)(void));
+void fix_indent(void);
+int in_cinkeys(int keytyped, int when, int line_is_empty);
+int hkmap(int c);
+void ins_scroll(void);
+void ins_horscroll(void);
+int ins_copychar(linenr_T lnum);
/* vim: set ft=c : */
#endif /* NEOVIM_EDIT_H */
diff --git a/src/eval.c b/src/eval.c
index 5b8c43fc8d..9c65d5babb 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -392,463 +392,461 @@ static struct vimvar {
static dictitem_T vimvars_var; /* variable used for v: */
#define vimvarht vimvardict.dv_hashtab
-static void prepare_vimvar __ARGS((int idx, typval_T *save_tv));
-static void restore_vimvar __ARGS((int idx, typval_T *save_tv));
-static int ex_let_vars __ARGS((char_u *arg, typval_T *tv, int copy,
- int semicolon, int var_count,
- char_u *nextchars));
-static char_u *skip_var_list __ARGS((char_u *arg, int *var_count,
- int *semicolon));
-static char_u *skip_var_one __ARGS((char_u *arg));
-static void list_hashtable_vars __ARGS((hashtab_T *ht, char_u *prefix,
+static void prepare_vimvar(int idx, typval_T *save_tv);
+static void restore_vimvar(int idx, typval_T *save_tv);
+static int ex_let_vars(char_u *arg, typval_T *tv, int copy,
+ int semicolon, int var_count,
+ char_u *nextchars);
+static char_u *skip_var_list(char_u *arg, int *var_count,
+ int *semicolon);
+static char_u *skip_var_one(char_u *arg);
+static void list_hashtable_vars(hashtab_T *ht, char_u *prefix,
int empty,
- int *first));
-static void list_glob_vars __ARGS((int *first));
-static void list_buf_vars __ARGS((int *first));
-static void list_win_vars __ARGS((int *first));
-static void list_tab_vars __ARGS((int *first));
-static void list_vim_vars __ARGS((int *first));
-static void list_script_vars __ARGS((int *first));
-static void list_func_vars __ARGS((int *first));
-static char_u *list_arg_vars __ARGS((exarg_T *eap, char_u *arg, int *first));
-static char_u *ex_let_one __ARGS((char_u *arg, typval_T *tv, int copy, char_u *
- endchars,
- char_u *op));
-static int check_changedtick __ARGS((char_u *arg));
-static char_u *get_lval __ARGS((char_u *name, typval_T *rettv, lval_T *lp,
- int unlet, int skip, int flags,
- int fne_flags));
-static void clear_lval __ARGS((lval_T *lp));
-static void set_var_lval __ARGS((lval_T *lp, char_u *endp, typval_T *rettv,
- int copy,
- char_u *op));
-static int tv_op __ARGS((typval_T *tv1, typval_T *tv2, char_u *op));
-static void list_fix_watch __ARGS((list_T *l, listitem_T *item));
-static void ex_unletlock __ARGS((exarg_T *eap, char_u *argstart, int deep));
-static int do_unlet_var __ARGS((lval_T *lp, char_u *name_end, int forceit));
-static int do_lock_var __ARGS((lval_T *lp, char_u *name_end, int deep, int lock));
-static void item_lock __ARGS((typval_T *tv, int deep, int lock));
-static int tv_islocked __ARGS((typval_T *tv));
-
-static int eval0 __ARGS((char_u *arg, typval_T *rettv, char_u **nextcmd,
- int evaluate));
-static int eval1 __ARGS((char_u **arg, typval_T *rettv, int evaluate));
-static int eval2 __ARGS((char_u **arg, typval_T *rettv, int evaluate));
-static int eval3 __ARGS((char_u **arg, typval_T *rettv, int evaluate));
-static int eval4 __ARGS((char_u **arg, typval_T *rettv, int evaluate));
-static int eval5 __ARGS((char_u **arg, typval_T *rettv, int evaluate));
-static int eval6 __ARGS((char_u **arg, typval_T *rettv, int evaluate,
- int want_string));
-static int eval7 __ARGS((char_u **arg, typval_T *rettv, int evaluate,
- int want_string));
-
-static int eval_index __ARGS((char_u **arg, typval_T *rettv, int evaluate,
- int verbose));
-static int get_option_tv __ARGS((char_u **arg, typval_T *rettv, int evaluate));
-static int get_string_tv __ARGS((char_u **arg, typval_T *rettv, int evaluate));
-static int get_lit_string_tv __ARGS((char_u **arg, typval_T *rettv,
- int evaluate));
-static int get_list_tv __ARGS((char_u **arg, typval_T *rettv, int evaluate));
-static int rettv_list_alloc __ARGS((typval_T *rettv));
-static long list_len __ARGS((list_T *l));
-static int list_equal __ARGS((list_T *l1, list_T *l2, int ic, int recursive));
-static int dict_equal __ARGS((dict_T *d1, dict_T *d2, int ic, int recursive));
-static int tv_equal __ARGS((typval_T *tv1, typval_T *tv2, int ic, int recursive));
-static long list_find_nr __ARGS((list_T *l, long idx, int *errorp));
-static long list_idx_of_item __ARGS((list_T *l, listitem_T *item));
-static int list_append_number __ARGS((list_T *l, varnumber_T n));
-static int list_extend __ARGS((list_T *l1, list_T *l2, listitem_T *bef));
-static int list_concat __ARGS((list_T *l1, list_T *l2, typval_T *tv));
-static list_T *list_copy __ARGS((list_T *orig, int deep, int copyID));
-static char_u *list2string __ARGS((typval_T *tv, int copyID));
-static int list_join_inner __ARGS((garray_T *gap, list_T *l, char_u *sep,
- int echo_style, int copyID,
- garray_T *join_gap));
-static int list_join __ARGS((garray_T *gap, list_T *l, char_u *sep, int echo,
- int copyID));
-static int free_unref_items __ARGS((int copyID));
-static int rettv_dict_alloc __ARGS((typval_T *rettv));
-static dictitem_T *dictitem_copy __ARGS((dictitem_T *org));
-static void dictitem_remove __ARGS((dict_T *dict, dictitem_T *item));
-static dict_T *dict_copy __ARGS((dict_T *orig, int deep, int copyID));
-static long dict_len __ARGS((dict_T *d));
-static char_u *dict2string __ARGS((typval_T *tv, int copyID));
-static int get_dict_tv __ARGS((char_u **arg, typval_T *rettv, int evaluate));
-static char_u *echo_string __ARGS((typval_T *tv, char_u **tofree, char_u *
- numbuf,
- int copyID));
-static char_u *tv2string __ARGS((typval_T *tv, char_u **tofree, char_u *numbuf,
- int copyID));
-static char_u *string_quote __ARGS((char_u *str, int function));
-static int string2float __ARGS((char_u *text, float_T *value));
-static int get_env_tv __ARGS((char_u **arg, typval_T *rettv, int evaluate));
-static int find_internal_func __ARGS((char_u *name));
-static char_u *deref_func_name __ARGS((char_u *name, int *lenp, int no_autoload));
-static int get_func_tv __ARGS((char_u *name, int len, typval_T *rettv, char_u *
- *arg, linenr_T firstline, linenr_T lastline,
- int *doesrange, int evaluate,
- dict_T *selfdict));
-static int call_func __ARGS((char_u *funcname, int len, typval_T *rettv,
- int argcount, typval_T *argvars,
- linenr_T firstline, linenr_T lastline,
- int *doesrange, int evaluate,
- dict_T *selfdict));
-static void emsg_funcname __ARGS((char *ermsg, char_u *name));
-static int non_zero_arg __ARGS((typval_T *argvars));
-
-static void f_abs __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_acos __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_add __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_and __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_append __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_argc __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_argidx __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_argv __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_asin __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_atan __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_atan2 __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_browse __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_browsedir __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_bufexists __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_buflisted __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_bufloaded __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_bufname __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_bufnr __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_bufwinnr __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_byte2line __ARGS((typval_T *argvars, typval_T *rettv));
-static void byteidx __ARGS((typval_T *argvars, typval_T *rettv, int comp));
-static void f_byteidx __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_byteidxcomp __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_call __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_ceil __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_changenr __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_char2nr __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_cindent __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_clearmatches __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_col __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_complete __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_complete_add __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_complete_check __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_confirm __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_copy __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_cos __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_cosh __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_count __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_cscope_connection __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_cursor __ARGS((typval_T *argsvars, typval_T *rettv));
-static void f_deepcopy __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_delete __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_did_filetype __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_diff_filler __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_diff_hlID __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_empty __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_escape __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_eval __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_eventhandler __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_executable __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_exists __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_exp __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_expand __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_extend __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_feedkeys __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_filereadable __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_filewritable __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_filter __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_finddir __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_findfile __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_float2nr __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_floor __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_fmod __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_fnameescape __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_fnamemodify __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_foldclosed __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_foldclosedend __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_foldlevel __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_foldtext __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_foldtextresult __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_foreground __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_function __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_garbagecollect __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_get __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_getbufline __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_getbufvar __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_getchar __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_getcharmod __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_getcmdline __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_getcmdpos __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_getcmdtype __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_getcwd __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_getfontname __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_getfperm __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_getfsize __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_getftime __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_getftype __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_getline __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_getmatches __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_getpid __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_getpos __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_getqflist __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_getreg __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_getregtype __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_gettabvar __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_gettabwinvar __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_getwinposx __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_getwinposy __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_getwinvar __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_glob __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_globpath __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_has __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_has_key __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_haslocaldir __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_hasmapto __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_histadd __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_histdel __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_histget __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_histnr __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_hlID __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_hlexists __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_hostname __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_iconv __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_indent __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_index __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_input __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_inputdialog __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_inputlist __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_inputrestore __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_inputsave __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_inputsecret __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_insert __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_invert __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_isdirectory __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_islocked __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_items __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_join __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_keys __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_last_buffer_nr __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_len __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_libcall __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_libcallnr __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_line __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_line2byte __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_lispindent __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_localtime __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_log __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_log10 __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_map __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_maparg __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_mapcheck __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_match __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_matchadd __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_matcharg __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_matchdelete __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_matchend __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_matchlist __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_matchstr __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_max __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_min __ARGS((typval_T *argvars, typval_T *rettv));
+ int *first);
+static void list_glob_vars(int *first);
+static void list_buf_vars(int *first);
+static void list_win_vars(int *first);
+static void list_tab_vars(int *first);
+static void list_vim_vars(int *first);
+static void list_script_vars(int *first);
+static void list_func_vars(int *first);
+static char_u *list_arg_vars(exarg_T *eap, char_u *arg, int *first);
+static char_u *ex_let_one(char_u *arg, typval_T *tv, int copy,
+ char_u *endchars, char_u *op);
+static int check_changedtick(char_u *arg);
+static char_u *get_lval(char_u *name, typval_T *rettv, lval_T *lp,
+ int unlet, int skip, int flags,
+ int fne_flags);
+static void clear_lval(lval_T *lp);
+static void set_var_lval(lval_T *lp, char_u *endp, typval_T *rettv,
+ int copy,
+ char_u *op);
+static int tv_op(typval_T *tv1, typval_T *tv2, char_u *op);
+static void list_fix_watch(list_T *l, listitem_T *item);
+static void ex_unletlock(exarg_T *eap, char_u *argstart, int deep);
+static int do_unlet_var(lval_T *lp, char_u *name_end, int forceit);
+static int do_lock_var(lval_T *lp, char_u *name_end, int deep, int lock);
+static void item_lock(typval_T *tv, int deep, int lock);
+static int tv_islocked(typval_T *tv);
+
+static int eval0(char_u *arg, typval_T *rettv, char_u **nextcmd,
+ int evaluate);
+static int eval1(char_u **arg, typval_T *rettv, int evaluate);
+static int eval2(char_u **arg, typval_T *rettv, int evaluate);
+static int eval3(char_u **arg, typval_T *rettv, int evaluate);
+static int eval4(char_u **arg, typval_T *rettv, int evaluate);
+static int eval5(char_u **arg, typval_T *rettv, int evaluate);
+static int eval6(char_u **arg, typval_T *rettv, int evaluate,
+ int want_string);
+static int eval7(char_u **arg, typval_T *rettv, int evaluate,
+ int want_string);
+
+static int eval_index(char_u **arg, typval_T *rettv, int evaluate,
+ int verbose);
+static int get_option_tv(char_u **arg, typval_T *rettv, int evaluate);
+static int get_string_tv(char_u **arg, typval_T *rettv, int evaluate);
+static int get_lit_string_tv(char_u **arg, typval_T *rettv, int evaluate);
+static int get_list_tv(char_u **arg, typval_T *rettv, int evaluate);
+static int rettv_list_alloc(typval_T *rettv);
+static long list_len(list_T *l);
+static int list_equal(list_T *l1, list_T *l2, int ic, int recursive);
+static int dict_equal(dict_T *d1, dict_T *d2, int ic, int recursive);
+static int tv_equal(typval_T *tv1, typval_T *tv2, int ic, int recursive);
+static long list_find_nr(list_T *l, long idx, int *errorp);
+static long list_idx_of_item(list_T *l, listitem_T *item);
+static int list_append_number(list_T *l, varnumber_T n);
+static int list_extend(list_T *l1, list_T *l2, listitem_T *bef);
+static int list_concat(list_T *l1, list_T *l2, typval_T *tv);
+static list_T *list_copy(list_T *orig, int deep, int copyID);
+static char_u *list2string(typval_T *tv, int copyID);
+static int list_join_inner(garray_T *gap, list_T *l, char_u *sep,
+ int echo_style, int copyID,
+ garray_T *join_gap);
+static int list_join(garray_T *gap, list_T *l, char_u *sep, int echo,
+ int copyID);
+static int free_unref_items(int copyID);
+static int rettv_dict_alloc(typval_T *rettv);
+static dictitem_T *dictitem_copy(dictitem_T *org);
+static void dictitem_remove(dict_T *dict, dictitem_T *item);
+static dict_T *dict_copy(dict_T *orig, int deep, int copyID);
+static long dict_len(dict_T *d);
+static char_u *dict2string(typval_T *tv, int copyID);
+static int get_dict_tv(char_u **arg, typval_T *rettv, int evaluate);
+static char_u *echo_string(typval_T *tv, char_u **tofree,
+ char_u *numbuf,
+ int copyID);
+static char_u *tv2string(typval_T *tv, char_u **tofree, char_u *numbuf,
+ int copyID);
+static char_u *string_quote(char_u *str, int function);
+static int string2float(char_u *text, float_T *value);
+static int get_env_tv(char_u **arg, typval_T *rettv, int evaluate);
+static int find_internal_func(char_u *name);
+static char_u *deref_func_name(char_u *name, int *lenp, int no_autoload);
+static int get_func_tv(char_u *name, int len, typval_T *rettv,
+ char_u **arg, linenr_T firstline, linenr_T lastline,
+ int *doesrange, int evaluate,
+ dict_T *selfdict);
+static int call_func(char_u *funcname, int len, typval_T *rettv,
+ int argcount, typval_T *argvars,
+ linenr_T firstline, linenr_T lastline,
+ int *doesrange, int evaluate,
+ dict_T *selfdict);
+static void emsg_funcname(char *ermsg, char_u *name);
+static int non_zero_arg(typval_T *argvars);
+
+static void f_abs(typval_T *argvars, typval_T *rettv);
+static void f_acos(typval_T *argvars, typval_T *rettv);
+static void f_add(typval_T *argvars, typval_T *rettv);
+static void f_and(typval_T *argvars, typval_T *rettv);
+static void f_append(typval_T *argvars, typval_T *rettv);
+static void f_argc(typval_T *argvars, typval_T *rettv);
+static void f_argidx(typval_T *argvars, typval_T *rettv);
+static void f_argv(typval_T *argvars, typval_T *rettv);
+static void f_asin(typval_T *argvars, typval_T *rettv);
+static void f_atan(typval_T *argvars, typval_T *rettv);
+static void f_atan2(typval_T *argvars, typval_T *rettv);
+static void f_browse(typval_T *argvars, typval_T *rettv);
+static void f_browsedir(typval_T *argvars, typval_T *rettv);
+static void f_bufexists(typval_T *argvars, typval_T *rettv);
+static void f_buflisted(typval_T *argvars, typval_T *rettv);
+static void f_bufloaded(typval_T *argvars, typval_T *rettv);
+static void f_bufname(typval_T *argvars, typval_T *rettv);
+static void f_bufnr(typval_T *argvars, typval_T *rettv);
+static void f_bufwinnr(typval_T *argvars, typval_T *rettv);
+static void f_byte2line(typval_T *argvars, typval_T *rettv);
+static void byteidx(typval_T *argvars, typval_T *rettv, int comp);
+static void f_byteidx(typval_T *argvars, typval_T *rettv);
+static void f_byteidxcomp(typval_T *argvars, typval_T *rettv);
+static void f_call(typval_T *argvars, typval_T *rettv);
+static void f_ceil(typval_T *argvars, typval_T *rettv);
+static void f_changenr(typval_T *argvars, typval_T *rettv);
+static void f_char2nr(typval_T *argvars, typval_T *rettv);
+static void f_cindent(typval_T *argvars, typval_T *rettv);
+static void f_clearmatches(typval_T *argvars, typval_T *rettv);
+static void f_col(typval_T *argvars, typval_T *rettv);
+static void f_complete(typval_T *argvars, typval_T *rettv);
+static void f_complete_add(typval_T *argvars, typval_T *rettv);
+static void f_complete_check(typval_T *argvars, typval_T *rettv);
+static void f_confirm(typval_T *argvars, typval_T *rettv);
+static void f_copy(typval_T *argvars, typval_T *rettv);
+static void f_cos(typval_T *argvars, typval_T *rettv);
+static void f_cosh(typval_T *argvars, typval_T *rettv);
+static void f_count(typval_T *argvars, typval_T *rettv);
+static void f_cscope_connection(typval_T *argvars, typval_T *rettv);
+static void f_cursor(typval_T *argsvars, typval_T *rettv);
+static void f_deepcopy(typval_T *argvars, typval_T *rettv);
+static void f_delete(typval_T *argvars, typval_T *rettv);
+static void f_did_filetype(typval_T *argvars, typval_T *rettv);
+static void f_diff_filler(typval_T *argvars, typval_T *rettv);
+static void f_diff_hlID(typval_T *argvars, typval_T *rettv);
+static void f_empty(typval_T *argvars, typval_T *rettv);
+static void f_escape(typval_T *argvars, typval_T *rettv);
+static void f_eval(typval_T *argvars, typval_T *rettv);
+static void f_eventhandler(typval_T *argvars, typval_T *rettv);
+static void f_executable(typval_T *argvars, typval_T *rettv);
+static void f_exists(typval_T *argvars, typval_T *rettv);
+static void f_exp(typval_T *argvars, typval_T *rettv);
+static void f_expand(typval_T *argvars, typval_T *rettv);
+static void f_extend(typval_T *argvars, typval_T *rettv);
+static void f_feedkeys(typval_T *argvars, typval_T *rettv);
+static void f_filereadable(typval_T *argvars, typval_T *rettv);
+static void f_filewritable(typval_T *argvars, typval_T *rettv);
+static void f_filter(typval_T *argvars, typval_T *rettv);
+static void f_finddir(typval_T *argvars, typval_T *rettv);
+static void f_findfile(typval_T *argvars, typval_T *rettv);
+static void f_float2nr(typval_T *argvars, typval_T *rettv);
+static void f_floor(typval_T *argvars, typval_T *rettv);
+static void f_fmod(typval_T *argvars, typval_T *rettv);
+static void f_fnameescape(typval_T *argvars, typval_T *rettv);
+static void f_fnamemodify(typval_T *argvars, typval_T *rettv);
+static void f_foldclosed(typval_T *argvars, typval_T *rettv);
+static void f_foldclosedend(typval_T *argvars, typval_T *rettv);
+static void f_foldlevel(typval_T *argvars, typval_T *rettv);
+static void f_foldtext(typval_T *argvars, typval_T *rettv);
+static void f_foldtextresult(typval_T *argvars, typval_T *rettv);
+static void f_foreground(typval_T *argvars, typval_T *rettv);
+static void f_function(typval_T *argvars, typval_T *rettv);
+static void f_garbagecollect(typval_T *argvars, typval_T *rettv);
+static void f_get(typval_T *argvars, typval_T *rettv);
+static void f_getbufline(typval_T *argvars, typval_T *rettv);
+static void f_getbufvar(typval_T *argvars, typval_T *rettv);
+static void f_getchar(typval_T *argvars, typval_T *rettv);
+static void f_getcharmod(typval_T *argvars, typval_T *rettv);
+static void f_getcmdline(typval_T *argvars, typval_T *rettv);
+static void f_getcmdpos(typval_T *argvars, typval_T *rettv);
+static void f_getcmdtype(typval_T *argvars, typval_T *rettv);
+static void f_getcwd(typval_T *argvars, typval_T *rettv);
+static void f_getfontname(typval_T *argvars, typval_T *rettv);
+static void f_getfperm(typval_T *argvars, typval_T *rettv);
+static void f_getfsize(typval_T *argvars, typval_T *rettv);
+static void f_getftime(typval_T *argvars, typval_T *rettv);
+static void f_getftype(typval_T *argvars, typval_T *rettv);
+static void f_getline(typval_T *argvars, typval_T *rettv);
+static void f_getmatches(typval_T *argvars, typval_T *rettv);
+static void f_getpid(typval_T *argvars, typval_T *rettv);
+static void f_getpos(typval_T *argvars, typval_T *rettv);
+static void f_getqflist(typval_T *argvars, typval_T *rettv);
+static void f_getreg(typval_T *argvars, typval_T *rettv);
+static void f_getregtype(typval_T *argvars, typval_T *rettv);
+static void f_gettabvar(typval_T *argvars, typval_T *rettv);
+static void f_gettabwinvar(typval_T *argvars, typval_T *rettv);
+static void f_getwinposx(typval_T *argvars, typval_T *rettv);
+static void f_getwinposy(typval_T *argvars, typval_T *rettv);
+static void f_getwinvar(typval_T *argvars, typval_T *rettv);
+static void f_glob(typval_T *argvars, typval_T *rettv);
+static void f_globpath(typval_T *argvars, typval_T *rettv);
+static void f_has(typval_T *argvars, typval_T *rettv);
+static void f_has_key(typval_T *argvars, typval_T *rettv);
+static void f_haslocaldir(typval_T *argvars, typval_T *rettv);
+static void f_hasmapto(typval_T *argvars, typval_T *rettv);
+static void f_histadd(typval_T *argvars, typval_T *rettv);
+static void f_histdel(typval_T *argvars, typval_T *rettv);
+static void f_histget(typval_T *argvars, typval_T *rettv);
+static void f_histnr(typval_T *argvars, typval_T *rettv);
+static void f_hlID(typval_T *argvars, typval_T *rettv);
+static void f_hlexists(typval_T *argvars, typval_T *rettv);
+static void f_hostname(typval_T *argvars, typval_T *rettv);
+static void f_iconv(typval_T *argvars, typval_T *rettv);
+static void f_indent(typval_T *argvars, typval_T *rettv);
+static void f_index(typval_T *argvars, typval_T *rettv);
+static void f_input(typval_T *argvars, typval_T *rettv);
+static void f_inputdialog(typval_T *argvars, typval_T *rettv);
+static void f_inputlist(typval_T *argvars, typval_T *rettv);
+static void f_inputrestore(typval_T *argvars, typval_T *rettv);
+static void f_inputsave(typval_T *argvars, typval_T *rettv);
+static void f_inputsecret(typval_T *argvars, typval_T *rettv);
+static void f_insert(typval_T *argvars, typval_T *rettv);
+static void f_invert(typval_T *argvars, typval_T *rettv);
+static void f_isdirectory(typval_T *argvars, typval_T *rettv);
+static void f_islocked(typval_T *argvars, typval_T *rettv);
+static void f_items(typval_T *argvars, typval_T *rettv);
+static void f_join(typval_T *argvars, typval_T *rettv);
+static void f_keys(typval_T *argvars, typval_T *rettv);
+static void f_last_buffer_nr(typval_T *argvars, typval_T *rettv);
+static void f_len(typval_T *argvars, typval_T *rettv);
+static void f_libcall(typval_T *argvars, typval_T *rettv);
+static void f_libcallnr(typval_T *argvars, typval_T *rettv);
+static void f_line(typval_T *argvars, typval_T *rettv);
+static void f_line2byte(typval_T *argvars, typval_T *rettv);
+static void f_lispindent(typval_T *argvars, typval_T *rettv);
+static void f_localtime(typval_T *argvars, typval_T *rettv);
+static void f_log(typval_T *argvars, typval_T *rettv);
+static void f_log10(typval_T *argvars, typval_T *rettv);
+static void f_map(typval_T *argvars, typval_T *rettv);
+static void f_maparg(typval_T *argvars, typval_T *rettv);
+static void f_mapcheck(typval_T *argvars, typval_T *rettv);
+static void f_match(typval_T *argvars, typval_T *rettv);
+static void f_matchadd(typval_T *argvars, typval_T *rettv);
+static void f_matcharg(typval_T *argvars, typval_T *rettv);
+static void f_matchdelete(typval_T *argvars, typval_T *rettv);
+static void f_matchend(typval_T *argvars, typval_T *rettv);
+static void f_matchlist(typval_T *argvars, typval_T *rettv);
+static void f_matchstr(typval_T *argvars, typval_T *rettv);
+static void f_max(typval_T *argvars, typval_T *rettv);
+static void f_min(typval_T *argvars, typval_T *rettv);
#ifdef vim_mkdir
-static void f_mkdir __ARGS((typval_T *argvars, typval_T *rettv));
+static void f_mkdir(typval_T *argvars, typval_T *rettv);
#endif
-static void f_mode __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_nextnonblank __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_nr2char __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_or __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_pathshorten __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_pow __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_prevnonblank __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_printf __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_pumvisible __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_range __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_readfile __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_reltime __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_reltimestr __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_remote_expr __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_remote_foreground __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_remote_peek __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_remote_read __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_remote_send __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_remove __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_rename __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_repeat __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_resolve __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_reverse __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_round __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_screenattr __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_screenchar __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_screencol __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_screenrow __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_search __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_searchdecl __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_searchpair __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_searchpairpos __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_searchpos __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_server2client __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_serverlist __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_setbufvar __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_setcmdpos __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_setline __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_setloclist __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_setmatches __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_setpos __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_setqflist __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_setreg __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_settabvar __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_settabwinvar __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_setwinvar __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_sha256 __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_shellescape __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_shiftwidth __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_simplify __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_sin __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_sinh __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_sort __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_soundfold __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_spellbadword __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_spellsuggest __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_split __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_sqrt __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_str2float __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_str2nr __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_strchars __ARGS((typval_T *argvars, typval_T *rettv));
+static void f_mode(typval_T *argvars, typval_T *rettv);
+static void f_nextnonblank(typval_T *argvars, typval_T *rettv);
+static void f_nr2char(typval_T *argvars, typval_T *rettv);
+static void f_or(typval_T *argvars, typval_T *rettv);
+static void f_pathshorten(typval_T *argvars, typval_T *rettv);
+static void f_pow(typval_T *argvars, typval_T *rettv);
+static void f_prevnonblank(typval_T *argvars, typval_T *rettv);
+static void f_printf(typval_T *argvars, typval_T *rettv);
+static void f_pumvisible(typval_T *argvars, typval_T *rettv);
+static void f_range(typval_T *argvars, typval_T *rettv);
+static void f_readfile(typval_T *argvars, typval_T *rettv);
+static void f_reltime(typval_T *argvars, typval_T *rettv);
+static void f_reltimestr(typval_T *argvars, typval_T *rettv);
+static void f_remote_expr(typval_T *argvars, typval_T *rettv);
+static void f_remote_foreground(typval_T *argvars, typval_T *rettv);
+static void f_remote_peek(typval_T *argvars, typval_T *rettv);
+static void f_remote_read(typval_T *argvars, typval_T *rettv);
+static void f_remote_send(typval_T *argvars, typval_T *rettv);
+static void f_remove(typval_T *argvars, typval_T *rettv);
+static void f_rename(typval_T *argvars, typval_T *rettv);
+static void f_repeat(typval_T *argvars, typval_T *rettv);
+static void f_resolve(typval_T *argvars, typval_T *rettv);
+static void f_reverse(typval_T *argvars, typval_T *rettv);
+static void f_round(typval_T *argvars, typval_T *rettv);
+static void f_screenattr(typval_T *argvars, typval_T *rettv);
+static void f_screenchar(typval_T *argvars, typval_T *rettv);
+static void f_screencol(typval_T *argvars, typval_T *rettv);
+static void f_screenrow(typval_T *argvars, typval_T *rettv);
+static void f_search(typval_T *argvars, typval_T *rettv);
+static void f_searchdecl(typval_T *argvars, typval_T *rettv);
+static void f_searchpair(typval_T *argvars, typval_T *rettv);
+static void f_searchpairpos(typval_T *argvars, typval_T *rettv);
+static void f_searchpos(typval_T *argvars, typval_T *rettv);
+static void f_server2client(typval_T *argvars, typval_T *rettv);
+static void f_serverlist(typval_T *argvars, typval_T *rettv);
+static void f_setbufvar(typval_T *argvars, typval_T *rettv);
+static void f_setcmdpos(typval_T *argvars, typval_T *rettv);
+static void f_setline(typval_T *argvars, typval_T *rettv);
+static void f_setloclist(typval_T *argvars, typval_T *rettv);
+static void f_setmatches(typval_T *argvars, typval_T *rettv);
+static void f_setpos(typval_T *argvars, typval_T *rettv);
+static void f_setqflist(typval_T *argvars, typval_T *rettv);
+static void f_setreg(typval_T *argvars, typval_T *rettv);
+static void f_settabvar(typval_T *argvars, typval_T *rettv);
+static void f_settabwinvar(typval_T *argvars, typval_T *rettv);
+static void f_setwinvar(typval_T *argvars, typval_T *rettv);
+static void f_sha256(typval_T *argvars, typval_T *rettv);
+static void f_shellescape(typval_T *argvars, typval_T *rettv);
+static void f_shiftwidth(typval_T *argvars, typval_T *rettv);
+static void f_simplify(typval_T *argvars, typval_T *rettv);
+static void f_sin(typval_T *argvars, typval_T *rettv);
+static void f_sinh(typval_T *argvars, typval_T *rettv);
+static void f_sort(typval_T *argvars, typval_T *rettv);
+static void f_soundfold(typval_T *argvars, typval_T *rettv);
+static void f_spellbadword(typval_T *argvars, typval_T *rettv);
+static void f_spellsuggest(typval_T *argvars, typval_T *rettv);
+static void f_split(typval_T *argvars, typval_T *rettv);
+static void f_sqrt(typval_T *argvars, typval_T *rettv);
+static void f_str2float(typval_T *argvars, typval_T *rettv);
+static void f_str2nr(typval_T *argvars, typval_T *rettv);
+static void f_strchars(typval_T *argvars, typval_T *rettv);
#ifdef HAVE_STRFTIME
-static void f_strftime __ARGS((typval_T *argvars, typval_T *rettv));
+static void f_strftime(typval_T *argvars, typval_T *rettv);
#endif
-static void f_stridx __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_string __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_strlen __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_strpart __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_strridx __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_strtrans __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_strdisplaywidth __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_strwidth __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_submatch __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_substitute __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_synID __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_synIDattr __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_synIDtrans __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_synstack __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_synconcealed __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_system __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_tabpagebuflist __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_tabpagenr __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_tabpagewinnr __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_taglist __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_tagfiles __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_tempname __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_test __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_tan __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_tanh __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_tolower __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_toupper __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_tr __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_trunc __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_type __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_undofile __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_undotree __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_values __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_virtcol __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_visualmode __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_wildmenumode __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_winbufnr __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_wincol __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_winheight __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_winline __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_winnr __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_winrestcmd __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_winrestview __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_winsaveview __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_winwidth __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_writefile __ARGS((typval_T *argvars, typval_T *rettv));
-static void f_xor __ARGS((typval_T *argvars, typval_T *rettv));
-
-static int list2fpos __ARGS((typval_T *arg, pos_T *posp, int *fnump));
-static pos_T *var2fpos __ARGS((typval_T *varp, int dollar_lnum, int *fnum));
-static int get_env_len __ARGS((char_u **arg));
-static int get_id_len __ARGS((char_u **arg));
-static int get_name_len __ARGS((char_u **arg, char_u **alias, int evaluate,
- int verbose));
-static char_u *find_name_end __ARGS((char_u *arg, char_u **expr_start, char_u *
- *expr_end,
- int flags));
+static void f_stridx(typval_T *argvars, typval_T *rettv);
+static void f_string(typval_T *argvars, typval_T *rettv);
+static void f_strlen(typval_T *argvars, typval_T *rettv);
+static void f_strpart(typval_T *argvars, typval_T *rettv);
+static void f_strridx(typval_T *argvars, typval_T *rettv);
+static void f_strtrans(typval_T *argvars, typval_T *rettv);
+static void f_strdisplaywidth(typval_T *argvars, typval_T *rettv);
+static void f_strwidth(typval_T *argvars, typval_T *rettv);
+static void f_submatch(typval_T *argvars, typval_T *rettv);
+static void f_substitute(typval_T *argvars, typval_T *rettv);
+static void f_synID(typval_T *argvars, typval_T *rettv);
+static void f_synIDattr(typval_T *argvars, typval_T *rettv);
+static void f_synIDtrans(typval_T *argvars, typval_T *rettv);
+static void f_synstack(typval_T *argvars, typval_T *rettv);
+static void f_synconcealed(typval_T *argvars, typval_T *rettv);
+static void f_system(typval_T *argvars, typval_T *rettv);
+static void f_tabpagebuflist(typval_T *argvars, typval_T *rettv);
+static void f_tabpagenr(typval_T *argvars, typval_T *rettv);
+static void f_tabpagewinnr(typval_T *argvars, typval_T *rettv);
+static void f_taglist(typval_T *argvars, typval_T *rettv);
+static void f_tagfiles(typval_T *argvars, typval_T *rettv);
+static void f_tempname(typval_T *argvars, typval_T *rettv);
+static void f_test(typval_T *argvars, typval_T *rettv);
+static void f_tan(typval_T *argvars, typval_T *rettv);
+static void f_tanh(typval_T *argvars, typval_T *rettv);
+static void f_tolower(typval_T *argvars, typval_T *rettv);
+static void f_toupper(typval_T *argvars, typval_T *rettv);
+static void f_tr(typval_T *argvars, typval_T *rettv);
+static void f_trunc(typval_T *argvars, typval_T *rettv);
+static void f_type(typval_T *argvars, typval_T *rettv);
+static void f_undofile(typval_T *argvars, typval_T *rettv);
+static void f_undotree(typval_T *argvars, typval_T *rettv);
+static void f_values(typval_T *argvars, typval_T *rettv);
+static void f_virtcol(typval_T *argvars, typval_T *rettv);
+static void f_visualmode(typval_T *argvars, typval_T *rettv);
+static void f_wildmenumode(typval_T *argvars, typval_T *rettv);
+static void f_winbufnr(typval_T *argvars, typval_T *rettv);
+static void f_wincol(typval_T *argvars, typval_T *rettv);
+static void f_winheight(typval_T *argvars, typval_T *rettv);
+static void f_winline(typval_T *argvars, typval_T *rettv);
+static void f_winnr(typval_T *argvars, typval_T *rettv);
+static void f_winrestcmd(typval_T *argvars, typval_T *rettv);
+static void f_winrestview(typval_T *argvars, typval_T *rettv);
+static void f_winsaveview(typval_T *argvars, typval_T *rettv);
+static void f_winwidth(typval_T *argvars, typval_T *rettv);
+static void f_writefile(typval_T *argvars, typval_T *rettv);
+static void f_xor(typval_T *argvars, typval_T *rettv);
+
+static int list2fpos(typval_T *arg, pos_T *posp, int *fnump);
+static pos_T *var2fpos(typval_T *varp, int dollar_lnum, int *fnum);
+static int get_env_len(char_u **arg);
+static int get_id_len(char_u **arg);
+static int get_name_len(char_u **arg, char_u **alias, int evaluate,
+ int verbose);
+static char_u *find_name_end(char_u *arg, char_u **expr_start, char_u *
+ *expr_end,
+ int flags);
#define FNE_INCL_BR 1 /* find_name_end(): include [] in name */
#define FNE_CHECK_START 2 /* find_name_end(): check name starts with
valid character */
static char_u *
-make_expanded_name __ARGS((char_u *in_start, char_u *expr_start, char_u *
- expr_end,
- char_u *in_end));
-static int eval_isnamec __ARGS((int c));
-static int eval_isnamec1 __ARGS((int c));
-static int get_var_tv __ARGS((char_u *name, int len, typval_T *rettv,
- int verbose,
- int no_autoload));
-static int handle_subscript __ARGS((char_u **arg, typval_T *rettv, int evaluate,
- int verbose));
-static typval_T *alloc_tv __ARGS((void));
-static typval_T *alloc_string_tv __ARGS((char_u *string));
-static void init_tv __ARGS((typval_T *varp));
-static long get_tv_number __ARGS((typval_T *varp));
-static linenr_T get_tv_lnum __ARGS((typval_T *argvars));
-static linenr_T get_tv_lnum_buf __ARGS((typval_T *argvars, buf_T *buf));
-static char_u *get_tv_string __ARGS((typval_T *varp));
-static char_u *get_tv_string_buf __ARGS((typval_T *varp, char_u *buf));
-static char_u *get_tv_string_buf_chk __ARGS((typval_T *varp, char_u *buf));
-static dictitem_T *find_var __ARGS((char_u *name, hashtab_T **htp,
- int no_autoload));
-static dictitem_T *find_var_in_ht __ARGS((hashtab_T *ht, int htname, char_u *
- varname,
- int no_autoload));
-static hashtab_T *find_var_ht __ARGS((char_u *name, char_u **varname));
-static void vars_clear_ext __ARGS((hashtab_T *ht, int free_val));
-static void delete_var __ARGS((hashtab_T *ht, hashitem_T *hi));
-static void list_one_var __ARGS((dictitem_T *v, char_u *prefix, int *first));
-static void list_one_var_a __ARGS((char_u *prefix, char_u *name, int type,
- char_u *string,
- int *first));
-static void set_var __ARGS((char_u *name, typval_T *varp, int copy));
-static int var_check_ro __ARGS((int flags, char_u *name));
-static int var_check_fixed __ARGS((int flags, char_u *name));
-static int var_check_func_name __ARGS((char_u *name, int new_var));
-static int valid_varname __ARGS((char_u *varname));
-static int tv_check_lock __ARGS((int lock, char_u *name));
-static int item_copy __ARGS((typval_T *from, typval_T *to, int deep, int copyID));
-static char_u *find_option_end __ARGS((char_u **arg, int *opt_flags));
-static char_u *trans_function_name __ARGS((char_u **pp, int skip, int flags,
- funcdict_T *fd));
-static int eval_fname_script __ARGS((char_u *p));
-static int eval_fname_sid __ARGS((char_u *p));
-static void list_func_head __ARGS((ufunc_T *fp, int indent));
-static ufunc_T *find_func __ARGS((char_u *name));
-static int function_exists __ARGS((char_u *name));
-static int builtin_function __ARGS((char_u *name));
-static void func_do_profile __ARGS((ufunc_T *fp));
-static void prof_sort_list __ARGS((FILE *fd, ufunc_T **sorttab, int st_len,
- char *title,
- int prefer_self));
-static void prof_func_line __ARGS((FILE *fd, int count, proftime_T *total,
- proftime_T *self,
- int prefer_self));
+make_expanded_name(char_u *in_start, char_u *expr_start, char_u *
+ expr_end,
+ char_u *in_end);
+static int eval_isnamec(int c);
+static int eval_isnamec1(int c);
+static int get_var_tv(char_u *name, int len, typval_T *rettv,
+ int verbose,
+ int no_autoload);
+static int handle_subscript(char_u **arg, typval_T *rettv, int evaluate,
+ int verbose);
+static typval_T *alloc_tv(void);
+static typval_T *alloc_string_tv(char_u *string);
+static void init_tv(typval_T *varp);
+static long get_tv_number(typval_T *varp);
+static linenr_T get_tv_lnum(typval_T *argvars);
+static linenr_T get_tv_lnum_buf(typval_T *argvars, buf_T *buf);
+static char_u *get_tv_string(typval_T *varp);
+static char_u *get_tv_string_buf(typval_T *varp, char_u *buf);
+static char_u *get_tv_string_buf_chk(typval_T *varp, char_u *buf);
+static dictitem_T *find_var(char_u *name, hashtab_T **htp,
+ int no_autoload);
+static dictitem_T *find_var_in_ht(hashtab_T *ht, int htname,
+ char_u *varname,
+ int no_autoload);
+static hashtab_T *find_var_ht(char_u *name, char_u **varname);
+static void vars_clear_ext(hashtab_T *ht, int free_val);
+static void delete_var(hashtab_T *ht, hashitem_T *hi);
+static void list_one_var(dictitem_T *v, char_u *prefix, int *first);
+static void list_one_var_a(char_u *prefix, char_u *name, int type,
+ char_u *string,
+ int *first);
+static void set_var(char_u *name, typval_T *varp, int copy);
+static int var_check_ro(int flags, char_u *name);
+static int var_check_fixed(int flags, char_u *name);
+static int var_check_func_name(char_u *name, int new_var);
+static int valid_varname(char_u *varname);
+static int tv_check_lock(int lock, char_u *name);
+static int item_copy(typval_T *from, typval_T *to, int deep, int copyID);
+static char_u *find_option_end(char_u **arg, int *opt_flags);
+static char_u *trans_function_name(char_u **pp, int skip, int flags,
+ funcdict_T *fd);
+static int eval_fname_script(char_u *p);
+static int eval_fname_sid(char_u *p);
+static void list_func_head(ufunc_T *fp, int indent);
+static ufunc_T *find_func(char_u *name);
+static int function_exists(char_u *name);
+static int builtin_function(char_u *name);
+static void func_do_profile(ufunc_T *fp);
+static void prof_sort_list(FILE *fd, ufunc_T **sorttab, int st_len,
+ char *title,
+ int prefer_self);
+static void prof_func_line(FILE *fd, int count, proftime_T *total,
+ proftime_T *self,
+ int prefer_self);
static int
-prof_total_cmp __ARGS((const void *s1, const void *s2));
+prof_total_cmp(const void *s1, const void *s2);
static int
-prof_self_cmp __ARGS((const void *s1, const void *s2));
-static int script_autoload __ARGS((char_u *name, int reload));
-static char_u *autoload_name __ARGS((char_u *name));
-static void cat_func_name __ARGS((char_u *buf, ufunc_T *fp));
-static void func_free __ARGS((ufunc_T *fp));
-static void call_user_func __ARGS((ufunc_T *fp, int argcount, typval_T *argvars,
- typval_T *rettv, linenr_T firstline,
- linenr_T lastline,
- dict_T *selfdict));
-static int can_free_funccal __ARGS((funccall_T *fc, int copyID));
-static void free_funccal __ARGS((funccall_T *fc, int free_val));
-static void add_nr_var __ARGS((dict_T *dp, dictitem_T *v, char *name,
- varnumber_T nr));
-static win_T *find_win_by_nr __ARGS((typval_T *vp, tabpage_T *tp));
-static void getwinvar __ARGS((typval_T *argvars, typval_T *rettv, int off));
-static int searchpair_cmn __ARGS((typval_T *argvars, pos_T *match_pos));
-static int search_cmn __ARGS((typval_T *argvars, pos_T *match_pos, int *flagsp));
-static void setwinvar __ARGS((typval_T *argvars, typval_T *rettv, int off));
+prof_self_cmp(const void *s1, const void *s2);
+static int script_autoload(char_u *name, int reload);
+static char_u *autoload_name(char_u *name);
+static void cat_func_name(char_u *buf, ufunc_T *fp);
+static void func_free(ufunc_T *fp);
+static void call_user_func(ufunc_T *fp, int argcount, typval_T *argvars,
+ typval_T *rettv, linenr_T firstline,
+ linenr_T lastline,
+ dict_T *selfdict);
+static int can_free_funccal(funccall_T *fc, int copyID);
+static void free_funccal(funccall_T *fc, int free_val);
+static void add_nr_var(dict_T *dp, dictitem_T *v, char *name,
+ varnumber_T nr);
+static win_T *find_win_by_nr(typval_T *vp, tabpage_T *tp);
+static void getwinvar(typval_T *argvars, typval_T *rettv, int off);
+static int searchpair_cmn(typval_T *argvars, pos_T *match_pos);
+static int search_cmn(typval_T *argvars, pos_T *match_pos, int *flagsp);
+static void setwinvar(typval_T *argvars, typval_T *rettv, int off);
@@ -3420,7 +3418,7 @@ void del_menutrans_vars(void) {
* get_user_var_name().
*/
-static char_u *cat_prefix_varname __ARGS((int prefix, char_u *name));
+static char_u *cat_prefix_varname(int prefix, char_u *name);
static char_u *varnamebuf = NULL;
static int varnamebuflen = 0;
@@ -6796,7 +6794,7 @@ static struct fst {
char *f_name; /* function name */
char f_min_argc; /* minimal number of arguments */
char f_max_argc; /* maximal number of arguments */
- void (*f_func)__ARGS((typval_T *args, typval_T *rvar));
+ void (*f_func)(typval_T *args, typval_T *rvar);
/* implementation of function */
} functions[] =
{
@@ -7474,7 +7472,7 @@ static int non_zero_arg(typval_T *argvars)
* Implementation of the built-in functions
*/
-static int get_float_arg __ARGS((typval_T *argvars, float_T *f));
+static int get_float_arg(typval_T *argvars, float_T *f);
/*
* Get the float value of "argvars[0]" into "f".
@@ -7708,7 +7706,7 @@ static void f_browsedir(typval_T *argvars, typval_T *rettv)
rettv->v_type = VAR_STRING;
}
-static buf_T *find_buffer __ARGS((typval_T *avar));
+static buf_T *find_buffer(typval_T *avar);
/*
* Find a buffer by number or exact name.
@@ -7766,7 +7764,7 @@ static void f_bufloaded(typval_T *argvars, typval_T *rettv)
rettv->vval.v_number = (buf != NULL && buf->b_ml.ml_mfp != NULL);
}
-static buf_T *get_buf_tv __ARGS((typval_T *tv, int curtab_only));
+static buf_T *get_buf_tv(typval_T *tv, int curtab_only);
/*
* Get buffer by number or pattern.
@@ -8868,8 +8866,8 @@ static void f_filewritable(typval_T *argvars, typval_T *rettv)
rettv->vval.v_number = filewritable(get_tv_string(&argvars[0]));
}
-static void findfilendir __ARGS((typval_T *argvars, typval_T *rettv,
- int find_what));
+static void findfilendir(typval_T *argvars, typval_T *rettv,
+ int find_what);
static void findfilendir(typval_T *argvars, typval_T *rettv, int find_what)
{
@@ -8926,9 +8924,8 @@ static void findfilendir(typval_T *argvars, typval_T *rettv, int find_what)
rettv->vval.v_string = fresult;
}
-static void filter_map __ARGS((typval_T *argvars, typval_T *rettv, int map));
-static int filter_map_one __ARGS((typval_T *tv, char_u *expr, int map,
- int *remp));
+static void filter_map(typval_T *argvars, typval_T *rettv, int map);
+static int filter_map_one(typval_T *tv, char_u *expr, int map, int *remp);
/*
* Implementation of map() and filter().
@@ -9174,7 +9171,7 @@ static void f_fnamemodify(typval_T *argvars, typval_T *rettv)
vim_free(fbuf);
}
-static void foldclosed_both __ARGS((typval_T *argvars, typval_T *rettv, int end));
+static void foldclosed_both(typval_T *argvars, typval_T *rettv, int end);
/*
* "foldclosed()" function
@@ -9397,9 +9394,9 @@ static void f_get(typval_T *argvars, typval_T *rettv)
copy_tv(tv, rettv);
}
-static void get_buffer_lines __ARGS((buf_T *buf, linenr_T start, linenr_T end,
- int retlist,
- typval_T *rettv));
+static void get_buffer_lines(buf_T *buf, linenr_T start, linenr_T end,
+ int retlist,
+ typval_T *rettv);
/*
* Get line or list of lines from buffer "buf" into "rettv".
@@ -10630,8 +10627,8 @@ static void f_index(typval_T *argvars, typval_T *rettv)
static int inputsecret_flag = 0;
-static void get_user_input __ARGS((typval_T *argvars, typval_T *rettv,
- int inputdialog));
+static void get_user_input(typval_T *argvars, typval_T *rettv,
+ int inputdialog);
/*
* This function is used by f_input() and f_inputdialog() functions. The third
@@ -10926,7 +10923,7 @@ static void f_islocked(typval_T *argvars, typval_T *rettv)
clear_lval(&lv);
}
-static void dict_list __ARGS((typval_T *argvars, typval_T *rettv, int what));
+static void dict_list(typval_T *argvars, typval_T *rettv, int what);
/*
* Turn a dict into a list:
@@ -11085,7 +11082,7 @@ static void f_len(typval_T *argvars, typval_T *rettv)
}
}
-static void libcall_common __ARGS((typval_T *argvars, typval_T *rettv, int type));
+static void libcall_common(typval_T *argvars, typval_T *rettv, int type);
static void libcall_common(typval_T *argvars, typval_T *rettv, int type)
{
@@ -11197,7 +11194,7 @@ static void f_localtime(typval_T *argvars, typval_T *rettv)
rettv->vval.v_number = (varnumber_T)time(NULL);
}
-static void get_maparg __ARGS((typval_T *argvars, typval_T *rettv, int exact));
+static void get_maparg(typval_T *argvars, typval_T *rettv, int exact);
static void get_maparg(typval_T *argvars, typval_T *rettv, int exact)
{
@@ -11317,8 +11314,7 @@ static void f_mapcheck(typval_T *argvars, typval_T *rettv)
get_maparg(argvars, rettv, FALSE);
}
-static void find_some_match __ARGS((typval_T *argvars, typval_T *rettv,
- int start));
+static void find_some_match(typval_T *argvars, typval_T *rettv, int start);
static void find_some_match(typval_T *argvars, typval_T *rettv, int type)
{
@@ -11564,7 +11560,7 @@ static void f_matchstr(typval_T *argvars, typval_T *rettv)
find_some_match(argvars, rettv, 2);
}
-static void max_min __ARGS((typval_T *argvars, typval_T *rettv, int domax));
+static void max_min(typval_T *argvars, typval_T *rettv, int domax);
static void max_min(typval_T *argvars, typval_T *rettv, int domax)
{
@@ -11633,7 +11629,7 @@ static void f_min(typval_T *argvars, typval_T *rettv)
max_min(argvars, rettv, FALSE);
}
-static int mkdir_recurse __ARGS((char_u *dir, int prot));
+static int mkdir_recurse(char_u *dir, int prot);
/*
* Create the directory in which "dir" is located, and higher levels when
@@ -12126,7 +12122,7 @@ static void f_readfile(typval_T *argvars, typval_T *rettv)
fclose(fd);
}
-static int list2proftime __ARGS((typval_T *arg, proftime_T *tm));
+static int list2proftime(typval_T *arg, proftime_T *tm);
/*
* Convert a List to proftime_T.
@@ -12592,7 +12588,7 @@ static void f_reverse(typval_T *argvars, typval_T *rettv)
#define SP_SUBPAT 0x20 /* return nr of matching sub-pattern */
#define SP_END 0x40 /* leave cursor at end of match */
-static int get_search_arg __ARGS((typval_T *varp, int *flagsp));
+static int get_search_arg(typval_T *varp, int *flagsp);
/*
* Get flags for a search function.
@@ -13255,9 +13251,9 @@ static void f_setline(typval_T *argvars, typval_T *rettv)
appended_lines_mark(lcount, added);
}
-static void set_qf_ll_list __ARGS((win_T *wp, typval_T *list_arg, typval_T *
- action_arg,
- typval_T *rettv));
+static void set_qf_ll_list(win_T *wp, typval_T *list_arg,
+ typval_T *action_arg,
+ typval_T *rettv);
/*
* Used by "setqflist()" and "setloclist()" functions
@@ -13634,9 +13630,9 @@ static void f_sinh(typval_T *argvars, typval_T *rettv)
}
static int
-item_compare __ARGS((const void *s1, const void *s2));
+item_compare(const void *s1, const void *s2);
static int
-item_compare2 __ARGS((const void *s1, const void *s2));
+item_compare2(const void *s1, const void *s2);
static int item_compare_ic;
static char_u *item_compare_func;
@@ -14617,7 +14613,7 @@ static void f_tabpagenr(typval_T *argvars, typval_T *rettv)
}
-static int get_winnr __ARGS((tabpage_T *tp, typval_T *argvar));
+static int get_winnr(tabpage_T *tp, typval_T *argvar);
/*
* Common code for tabpagewinnr() and winnr().
@@ -19041,7 +19037,7 @@ typedef enum {
VAR_FLAVOUR_VIMINFO /* all uppercase */
} var_flavour_T;
-static var_flavour_T var_flavour __ARGS((char_u *varname));
+static var_flavour_T var_flavour(char_u *varname);
static var_flavour_T var_flavour(char_u *varname)
{
diff --git a/src/eval.h b/src/eval.h
index d63ea3dd8b..efb9c50cb8 100644
--- a/src/eval.h
+++ b/src/eval.h
@@ -1,153 +1,153 @@
#ifndef NEOVIM_EVAL_H
#define NEOVIM_EVAL_H
/* eval.c */
-void eval_init __ARGS((void));
-void eval_clear __ARGS((void));
-char_u *func_name __ARGS((void *cookie));
-linenr_T *func_breakpoint __ARGS((void *cookie));
-int *func_dbg_tick __ARGS((void *cookie));
-int func_level __ARGS((void *cookie));
-int current_func_returned __ARGS((void));
-void set_internal_string_var __ARGS((char_u *name, char_u *value));
-int var_redir_start __ARGS((char_u *name, int append));
-void var_redir_str __ARGS((char_u *value, int value_len));
-void var_redir_stop __ARGS((void));
-int eval_charconvert __ARGS((char_u *enc_from, char_u *enc_to, char_u *
- fname_from,
- char_u *fname_to));
-int eval_printexpr __ARGS((char_u *fname, char_u *args));
-void eval_diff __ARGS((char_u *origfile, char_u *newfile, char_u *outfile));
-void eval_patch __ARGS((char_u *origfile, char_u *difffile, char_u *outfile));
-int eval_to_bool __ARGS((char_u *arg, int *error, char_u **nextcmd, int skip));
-char_u *eval_to_string_skip __ARGS((char_u *arg, char_u **nextcmd, int skip));
-int skip_expr __ARGS((char_u **pp));
-char_u *eval_to_string __ARGS((char_u *arg, char_u **nextcmd, int convert));
-char_u *eval_to_string_safe __ARGS((char_u *arg, char_u **nextcmd,
- int use_sandbox));
-int eval_to_number __ARGS((char_u *expr));
-list_T *eval_spell_expr __ARGS((char_u *badword, char_u *expr));
-int get_spellword __ARGS((list_T *list, char_u **pp));
-typval_T *eval_expr __ARGS((char_u *arg, char_u **nextcmd));
-int call_vim_function __ARGS((char_u *func, int argc, char_u **argv, int safe,
- int str_arg_only,
- typval_T *rettv));
-long call_func_retnr __ARGS((char_u *func, int argc, char_u **argv, int safe));
-void *call_func_retstr __ARGS((char_u *func, int argc, char_u **argv, int safe));
-void *call_func_retlist __ARGS((char_u *func, int argc, char_u **argv, int safe));
-void *save_funccal __ARGS((void));
-void restore_funccal __ARGS((void *vfc));
-void prof_child_enter __ARGS((proftime_T *tm));
-void prof_child_exit __ARGS((proftime_T *tm));
-int eval_foldexpr __ARGS((char_u *arg, int *cp));
-void ex_let __ARGS((exarg_T *eap));
-void list_add_watch __ARGS((list_T *l, listwatch_T *lw));
-void list_rem_watch __ARGS((list_T *l, listwatch_T *lwrem));
-void *eval_for_line __ARGS((char_u *arg, int *errp, char_u **nextcmdp, int skip));
-int next_for_item __ARGS((void *fi_void, char_u *arg));
-void free_for_info __ARGS((void *fi_void));
-void set_context_for_expression __ARGS((expand_T *xp, char_u *arg,
- cmdidx_T cmdidx));
-void ex_call __ARGS((exarg_T *eap));
-void ex_unlet __ARGS((exarg_T *eap));
-void ex_lockvar __ARGS((exarg_T *eap));
-int do_unlet __ARGS((char_u *name, int forceit));
-void del_menutrans_vars __ARGS((void));
-char_u *get_user_var_name __ARGS((expand_T *xp, int idx));
-list_T *list_alloc __ARGS((void));
-void list_unref __ARGS((list_T *l));
-void list_free __ARGS((list_T *l, int recurse));
-listitem_T *listitem_alloc __ARGS((void));
-void listitem_free __ARGS((listitem_T *item));
-void listitem_remove __ARGS((list_T *l, listitem_T *item));
-dictitem_T *dict_lookup __ARGS((hashitem_T *hi));
-listitem_T *list_find __ARGS((list_T *l, long n));
-char_u *list_find_str __ARGS((list_T *l, long idx));
-void list_append __ARGS((list_T *l, listitem_T *item));
-int list_append_tv __ARGS((list_T *l, typval_T *tv));
-int list_append_dict __ARGS((list_T *list, dict_T *dict));
-int list_append_string __ARGS((list_T *l, char_u *str, int len));
-int list_insert_tv __ARGS((list_T *l, typval_T *tv, listitem_T *item));
-void list_remove __ARGS((list_T *l, listitem_T *item, listitem_T *item2));
-void list_insert __ARGS((list_T *l, listitem_T *ni, listitem_T *item));
-int garbage_collect __ARGS((void));
-void set_ref_in_ht __ARGS((hashtab_T *ht, int copyID));
-void set_ref_in_list __ARGS((list_T *l, int copyID));
-void set_ref_in_item __ARGS((typval_T *tv, int copyID));
-dict_T *dict_alloc __ARGS((void));
-void dict_unref __ARGS((dict_T *d));
-void dict_free __ARGS((dict_T *d, int recurse));
-dictitem_T *dictitem_alloc __ARGS((char_u *key));
-void dictitem_free __ARGS((dictitem_T *item));
-int dict_add __ARGS((dict_T *d, dictitem_T *item));
-int dict_add_nr_str __ARGS((dict_T *d, char *key, long nr, char_u *str));
-int dict_add_list __ARGS((dict_T *d, char *key, list_T *list));
-dictitem_T *dict_find __ARGS((dict_T *d, char_u *key, int len));
-char_u *get_dict_string __ARGS((dict_T *d, char_u *key, int save));
-long get_dict_number __ARGS((dict_T *d, char_u *key));
-char_u *get_function_name __ARGS((expand_T *xp, int idx));
-char_u *get_expr_name __ARGS((expand_T *xp, int idx));
-int func_call __ARGS((char_u *name, typval_T *args, dict_T *selfdict,
- typval_T *rettv));
-void dict_extend __ARGS((dict_T *d1, dict_T *d2, char_u *action));
-void mzscheme_call_vim __ARGS((char_u *name, typval_T *args, typval_T *rettv));
-float_T vim_round __ARGS((float_T f));
-long do_searchpair __ARGS((char_u *spat, char_u *mpat, char_u *epat, int dir,
- char_u *skip, int flags, pos_T *match_pos,
- linenr_T lnum_stop,
- long time_limit));
-void set_vim_var_nr __ARGS((int idx, long val));
-long get_vim_var_nr __ARGS((int idx));
-char_u *get_vim_var_str __ARGS((int idx));
-list_T *get_vim_var_list __ARGS((int idx));
-void set_vim_var_char __ARGS((int c));
-void set_vcount __ARGS((long count, long count1, int set_prevcount));
-void set_vim_var_string __ARGS((int idx, char_u *val, int len));
-void set_vim_var_list __ARGS((int idx, list_T *val));
-void set_reg_var __ARGS((int c));
-char_u *v_exception __ARGS((char_u *oldval));
-char_u *v_throwpoint __ARGS((char_u *oldval));
-char_u *set_cmdarg __ARGS((exarg_T *eap, char_u *oldarg));
-void free_tv __ARGS((typval_T *varp));
-void clear_tv __ARGS((typval_T *varp));
-long get_tv_number_chk __ARGS((typval_T *varp, int *denote));
-char_u *get_tv_string_chk __ARGS((typval_T *varp));
-char_u *get_var_value __ARGS((char_u *name));
-void new_script_vars __ARGS((scid_T id));
-void init_var_dict __ARGS((dict_T *dict, dictitem_T *dict_var, int scope));
-void unref_var_dict __ARGS((dict_T *dict));
-void vars_clear __ARGS((hashtab_T *ht));
-void copy_tv __ARGS((typval_T *from, typval_T *to));
-void ex_echo __ARGS((exarg_T *eap));
-void ex_echohl __ARGS((exarg_T *eap));
-void ex_execute __ARGS((exarg_T *eap));
-void ex_function __ARGS((exarg_T *eap));
-void free_all_functions __ARGS((void));
-int translated_function_exists __ARGS((char_u *name));
-char_u *get_expanded_name __ARGS((char_u *name, int check));
-void func_dump_profile __ARGS((FILE *fd));
-char_u *get_user_func_name __ARGS((expand_T *xp, int idx));
-void ex_delfunction __ARGS((exarg_T *eap));
-void func_unref __ARGS((char_u *name));
-void func_ref __ARGS((char_u *name));
-void ex_return __ARGS((exarg_T *eap));
-int do_return __ARGS((exarg_T *eap, int reanimate, int is_cmd, void *rettv));
-void discard_pending_return __ARGS((void *rettv));
-char_u *get_return_cmd __ARGS((void *rettv));
-char_u *get_func_line __ARGS((int c, void *cookie, int indent));
-void func_line_start __ARGS((void *cookie));
-void func_line_exec __ARGS((void *cookie));
-void func_line_end __ARGS((void *cookie));
-int func_has_ended __ARGS((void *cookie));
-int func_has_abort __ARGS((void *cookie));
-int read_viminfo_varlist __ARGS((vir_T *virp, int writing));
-void write_viminfo_varlist __ARGS((FILE *fp));
-int store_session_globals __ARGS((FILE *fd));
-void last_set_msg __ARGS((scid_T scriptID));
-void ex_oldfiles __ARGS((exarg_T *eap));
-int modify_fname __ARGS((char_u *src, int *usedlen, char_u **fnamep, char_u *
- *bufp,
- int *fnamelen));
-char_u *do_string_sub __ARGS((char_u *str, char_u *pat, char_u *sub,
- char_u *flags));
+void eval_init(void);
+void eval_clear(void);
+char_u *func_name(void *cookie);
+linenr_T *func_breakpoint(void *cookie);
+int *func_dbg_tick(void *cookie);
+int func_level(void *cookie);
+int current_func_returned(void);
+void set_internal_string_var(char_u *name, char_u *value);
+int var_redir_start(char_u *name, int append);
+void var_redir_str(char_u *value, int value_len);
+void var_redir_stop(void);
+int eval_charconvert(char_u *enc_from, char_u *enc_to, char_u *
+ fname_from,
+ char_u *fname_to);
+int eval_printexpr(char_u *fname, char_u *args);
+void eval_diff(char_u *origfile, char_u *newfile, char_u *outfile);
+void eval_patch(char_u *origfile, char_u *difffile, char_u *outfile);
+int eval_to_bool(char_u *arg, int *error, char_u **nextcmd, int skip);
+char_u *eval_to_string_skip(char_u *arg, char_u **nextcmd, int skip);
+int skip_expr(char_u **pp);
+char_u *eval_to_string(char_u *arg, char_u **nextcmd, int convert);
+char_u *eval_to_string_safe(char_u *arg, char_u **nextcmd,
+ int use_sandbox);
+int eval_to_number(char_u *expr);
+list_T *eval_spell_expr(char_u *badword, char_u *expr);
+int get_spellword(list_T *list, char_u **pp);
+typval_T *eval_expr(char_u *arg, char_u **nextcmd);
+int call_vim_function(char_u *func, int argc, char_u **argv, int safe,
+ int str_arg_only,
+ typval_T *rettv);
+long call_func_retnr(char_u *func, int argc, char_u **argv, int safe);
+void *call_func_retstr(char_u *func, int argc, char_u **argv, int safe);
+void *call_func_retlist(char_u *func, int argc, char_u **argv, int safe);
+void *save_funccal(void);
+void restore_funccal(void *vfc);
+void prof_child_enter(proftime_T *tm);
+void prof_child_exit(proftime_T *tm);
+int eval_foldexpr(char_u *arg, int *cp);
+void ex_let(exarg_T *eap);
+void list_add_watch(list_T *l, listwatch_T *lw);
+void list_rem_watch(list_T *l, listwatch_T *lwrem);
+void *eval_for_line(char_u *arg, int *errp, char_u **nextcmdp, int skip);
+int next_for_item(void *fi_void, char_u *arg);
+void free_for_info(void *fi_void);
+void set_context_for_expression(expand_T *xp, char_u *arg,
+ cmdidx_T cmdidx);
+void ex_call(exarg_T *eap);
+void ex_unlet(exarg_T *eap);
+void ex_lockvar(exarg_T *eap);
+int do_unlet(char_u *name, int forceit);
+void del_menutrans_vars(void);
+char_u *get_user_var_name(expand_T *xp, int idx);
+list_T *list_alloc(void);
+void list_unref(list_T *l);
+void list_free(list_T *l, int recurse);
+listitem_T *listitem_alloc(void);
+void listitem_free(listitem_T *item);
+void listitem_remove(list_T *l, listitem_T *item);
+dictitem_T *dict_lookup(hashitem_T *hi);
+listitem_T *list_find(list_T *l, long n);
+char_u *list_find_str(list_T *l, long idx);
+void list_append(list_T *l, listitem_T *item);
+int list_append_tv(list_T *l, typval_T *tv);
+int list_append_dict(list_T *list, dict_T *dict);
+int list_append_string(list_T *l, char_u *str, int len);
+int list_insert_tv(list_T *l, typval_T *tv, listitem_T *item);
+void list_remove(list_T *l, listitem_T *item, listitem_T *item2);
+void list_insert(list_T *l, listitem_T *ni, listitem_T *item);
+int garbage_collect(void);
+void set_ref_in_ht(hashtab_T *ht, int copyID);
+void set_ref_in_list(list_T *l, int copyID);
+void set_ref_in_item(typval_T *tv, int copyID);
+dict_T *dict_alloc(void);
+void dict_unref(dict_T *d);
+void dict_free(dict_T *d, int recurse);
+dictitem_T *dictitem_alloc(char_u *key);
+void dictitem_free(dictitem_T *item);
+int dict_add(dict_T *d, dictitem_T *item);
+int dict_add_nr_str(dict_T *d, char *key, long nr, char_u *str);
+int dict_add_list(dict_T *d, char *key, list_T *list);
+dictitem_T *dict_find(dict_T *d, char_u *key, int len);
+char_u *get_dict_string(dict_T *d, char_u *key, int save);
+long get_dict_number(dict_T *d, char_u *key);
+char_u *get_function_name(expand_T *xp, int idx);
+char_u *get_expr_name(expand_T *xp, int idx);
+int func_call(char_u *name, typval_T *args, dict_T *selfdict,
+ typval_T *rettv);
+void dict_extend(dict_T *d1, dict_T *d2, char_u *action);
+void mzscheme_call_vim(char_u *name, typval_T *args, typval_T *rettv);
+float_T vim_round(float_T f);
+long do_searchpair(char_u *spat, char_u *mpat, char_u *epat, int dir,
+ char_u *skip, int flags, pos_T *match_pos,
+ linenr_T lnum_stop,
+ long time_limit);
+void set_vim_var_nr(int idx, long val);
+long get_vim_var_nr(int idx);
+char_u *get_vim_var_str(int idx);
+list_T *get_vim_var_list(int idx);
+void set_vim_var_char(int c);
+void set_vcount(long count, long count1, int set_prevcount);
+void set_vim_var_string(int idx, char_u *val, int len);
+void set_vim_var_list(int idx, list_T *val);
+void set_reg_var(int c);
+char_u *v_exception(char_u *oldval);
+char_u *v_throwpoint(char_u *oldval);
+char_u *set_cmdarg(exarg_T *eap, char_u *oldarg);
+void free_tv(typval_T *varp);
+void clear_tv(typval_T *varp);
+long get_tv_number_chk(typval_T *varp, int *denote);
+char_u *get_tv_string_chk(typval_T *varp);
+char_u *get_var_value(char_u *name);
+void new_script_vars(scid_T id);
+void init_var_dict(dict_T *dict, dictitem_T *dict_var, int scope);
+void unref_var_dict(dict_T *dict);
+void vars_clear(hashtab_T *ht);
+void copy_tv(typval_T *from, typval_T *to);
+void ex_echo(exarg_T *eap);
+void ex_echohl(exarg_T *eap);
+void ex_execute(exarg_T *eap);
+void ex_function(exarg_T *eap);
+void free_all_functions(void);
+int translated_function_exists(char_u *name);
+char_u *get_expanded_name(char_u *name, int check);
+void func_dump_profile(FILE *fd);
+char_u *get_user_func_name(expand_T *xp, int idx);
+void ex_delfunction(exarg_T *eap);
+void func_unref(char_u *name);
+void func_ref(char_u *name);
+void ex_return(exarg_T *eap);
+int do_return(exarg_T *eap, int reanimate, int is_cmd, void *rettv);
+void discard_pending_return(void *rettv);
+char_u *get_return_cmd(void *rettv);
+char_u *get_func_line(int c, void *cookie, int indent);
+void func_line_start(void *cookie);
+void func_line_exec(void *cookie);
+void func_line_end(void *cookie);
+int func_has_ended(void *cookie);
+int func_has_abort(void *cookie);
+int read_viminfo_varlist(vir_T *virp, int writing);
+void write_viminfo_varlist(FILE *fp);
+int store_session_globals(FILE *fd);
+void last_set_msg(scid_T scriptID);
+void ex_oldfiles(exarg_T *eap);
+int modify_fname(char_u *src, int *usedlen, char_u **fnamep,
+ char_u **bufp,
+ int *fnamelen);
+char_u *do_string_sub(char_u *str, char_u *pat, char_u *sub,
+ char_u *flags);
/* vim: set ft=c : */
#endif /* NEOVIM_EVAL_H */
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 73fd567429..dfddce3447 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -52,20 +52,19 @@
#include "undo.h"
#include "window.h"
-static int linelen __ARGS((int *has_tab));
-static void do_filter __ARGS((linenr_T line1, linenr_T line2, exarg_T *eap,
- char_u *cmd, int do_in,
- int do_out));
-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 int check_readonly __ARGS((int *forceit, buf_T *buf));
-static void delbuf_msg __ARGS((char_u *name));
-static int
-help_compare __ARGS((const void *s1, const void *s2));
+static int linelen(int *has_tab);
+static void do_filter(linenr_T line1, linenr_T line2, exarg_T *eap,
+ char_u *cmd, int do_in,
+ int do_out);
+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);
+
+static int check_readonly(int *forceit, buf_T *buf);
+static void delbuf_msg(char_u *name);
+static int help_compare(const void *s1, const void *s2);
/*
* ":ascii" and "ga".
@@ -285,7 +284,7 @@ typedef struct {
} sorti_T;
static int
-sort_compare __ARGS((const void *s1, const void *s2));
+sort_compare(const void *s1, const void *s2);
static int sort_compare(const void *s1, const void *s2)
{
@@ -1395,7 +1394,7 @@ void append_redir(char_u *buf, int buflen, char_u *opt, char_u *fname)
}
-static int no_viminfo __ARGS((void));
+static int no_viminfo(void);
static int viminfo_errcnt;
static int no_viminfo(void) {
@@ -5327,8 +5326,8 @@ void ex_viusage(exarg_T *eap)
do_cmdline_cmd((char_u *)"help normal-index");
}
-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"
diff --git a/src/ex_cmds.h b/src/ex_cmds.h
index 4bb11ea20c..8892541ec9 100644
--- a/src/ex_cmds.h
+++ b/src/ex_cmds.h
@@ -2,75 +2,75 @@
#define NEOVIM_EX_CMDS_H
/* ex_cmds.c */
-void do_ascii __ARGS((exarg_T *eap));
-void ex_align __ARGS((exarg_T *eap));
-void ex_sort __ARGS((exarg_T *eap));
-void ex_retab __ARGS((exarg_T *eap));
-int do_move __ARGS((linenr_T line1, linenr_T line2, linenr_T dest));
-void ex_copy __ARGS((linenr_T line1, linenr_T line2, linenr_T n));
-void free_prev_shellcmd __ARGS((void));
-void do_bang __ARGS((int addr_count, exarg_T *eap, int forceit, int do_in,
- int do_out));
-void do_shell __ARGS((char_u *cmd, int flags));
-char_u *make_filter_cmd __ARGS((char_u *cmd, char_u *itmp, char_u *otmp));
-void append_redir __ARGS((char_u *buf, int buflen, char_u *opt, char_u *fname));
-int viminfo_error __ARGS((char *errnum, char *message, char_u *line));
-int read_viminfo __ARGS((char_u *file, int flags));
-void write_viminfo __ARGS((char_u *file, int forceit));
-int viminfo_readline __ARGS((vir_T *virp));
-char_u *viminfo_readstring __ARGS((vir_T *virp, int off, int convert));
-void viminfo_writestring __ARGS((FILE *fd, char_u *p));
-void do_fixdel __ARGS((exarg_T *eap));
-void print_line_no_prefix __ARGS((linenr_T lnum, int use_number, int list));
-void print_line __ARGS((linenr_T lnum, int use_number, int list));
-int rename_buffer __ARGS((char_u *new_fname));
-void ex_file __ARGS((exarg_T *eap));
-void ex_update __ARGS((exarg_T *eap));
-void ex_write __ARGS((exarg_T *eap));
-int do_write __ARGS((exarg_T *eap));
-int check_overwrite __ARGS((exarg_T *eap, buf_T *buf, char_u *fname, char_u *
+void do_ascii(exarg_T *eap);
+void ex_align(exarg_T *eap);
+void ex_sort(exarg_T *eap);
+void ex_retab(exarg_T *eap);
+int do_move(linenr_T line1, linenr_T line2, linenr_T dest);
+void ex_copy(linenr_T line1, linenr_T line2, linenr_T n);
+void free_prev_shellcmd(void);
+void do_bang(int addr_count, exarg_T *eap, int forceit, int do_in,
+ int do_out);
+void do_shell(char_u *cmd, int flags);
+char_u *make_filter_cmd(char_u *cmd, char_u *itmp, char_u *otmp);
+void append_redir(char_u *buf, int buflen, char_u *opt, char_u *fname);
+int viminfo_error(char *errnum, char *message, char_u *line);
+int read_viminfo(char_u *file, int flags);
+void write_viminfo(char_u *file, int forceit);
+int viminfo_readline(vir_T *virp);
+char_u *viminfo_readstring(vir_T *virp, int off, int convert);
+void viminfo_writestring(FILE *fd, char_u *p);
+void do_fixdel(exarg_T *eap);
+void print_line_no_prefix(linenr_T lnum, int use_number, int list);
+void print_line(linenr_T lnum, int use_number, int list);
+int rename_buffer(char_u *new_fname);
+void ex_file(exarg_T *eap);
+void ex_update(exarg_T *eap);
+void ex_write(exarg_T *eap);
+int do_write(exarg_T *eap);
+int check_overwrite(exarg_T *eap, buf_T *buf, char_u *fname, char_u *
ffname,
- int other));
-void ex_wnext __ARGS((exarg_T *eap));
-void do_wqall __ARGS((exarg_T *eap));
-int not_writing __ARGS((void));
-int getfile __ARGS((int fnum, char_u *ffname, char_u *sfname, int setpm,
+ int other);
+void ex_wnext(exarg_T *eap);
+void do_wqall(exarg_T *eap);
+int not_writing(void);
+int getfile(int fnum, char_u *ffname, char_u *sfname, int setpm,
linenr_T lnum,
- int forceit));
-int do_ecmd __ARGS((int fnum, char_u *ffname, char_u *sfname, exarg_T *eap,
+ int forceit);
+int do_ecmd(int fnum, char_u *ffname, char_u *sfname, exarg_T *eap,
linenr_T newlnum, int flags,
- win_T *oldwin));
-void ex_append __ARGS((exarg_T *eap));
-void ex_change __ARGS((exarg_T *eap));
-void ex_z __ARGS((exarg_T *eap));
-int check_restricted __ARGS((void));
-int check_secure __ARGS((void));
-void do_sub __ARGS((exarg_T *eap));
-int do_sub_msg __ARGS((int count_only));
-void ex_global __ARGS((exarg_T *eap));
-void global_exe __ARGS((char_u *cmd));
-int read_viminfo_sub_string __ARGS((vir_T *virp, int force));
-void write_viminfo_sub_string __ARGS((FILE *fp));
-void free_old_sub __ARGS((void));
-int prepare_tagpreview __ARGS((int undo_sync));
-void ex_help __ARGS((exarg_T *eap));
-char_u *check_help_lang __ARGS((char_u *arg));
-int help_heuristic __ARGS((char_u *matched_string, int offset, int wrong_case));
-int find_help_tags __ARGS((char_u *arg, int *num_matches, char_u ***matches,
- int keep_lang));
-void fix_help_buffer __ARGS((void));
-void ex_exusage __ARGS((exarg_T *eap));
-void ex_viusage __ARGS((exarg_T *eap));
-void ex_helptags __ARGS((exarg_T *eap));
-void ex_sign __ARGS((exarg_T *eap));
-void sign_gui_started __ARGS((void));
-int sign_get_attr __ARGS((int typenr, int line));
-char_u *sign_get_text __ARGS((int typenr));
-void *sign_get_image __ARGS((int typenr));
-char_u *sign_typenr2name __ARGS((int typenr));
-void free_signs __ARGS((void));
-char_u *get_sign_name __ARGS((expand_T *xp, int idx));
-void set_context_in_sign_cmd __ARGS((expand_T *xp, char_u *arg));
-void ex_drop __ARGS((exarg_T *eap));
+ win_T *oldwin);
+void ex_append(exarg_T *eap);
+void ex_change(exarg_T *eap);
+void ex_z(exarg_T *eap);
+int check_restricted(void);
+int check_secure(void);
+void do_sub(exarg_T *eap);
+int do_sub_msg(int count_only);
+void ex_global(exarg_T *eap);
+void global_exe(char_u *cmd);
+int read_viminfo_sub_string(vir_T *virp, int force);
+void write_viminfo_sub_string(FILE *fp);
+void free_old_sub(void);
+int prepare_tagpreview(int undo_sync);
+void ex_help(exarg_T *eap);
+char_u *check_help_lang(char_u *arg);
+int help_heuristic(char_u *matched_string, int offset, int wrong_case);
+int find_help_tags(char_u *arg, int *num_matches, char_u ***matches,
+ int keep_lang);
+void fix_help_buffer(void);
+void ex_exusage(exarg_T *eap);
+void ex_viusage(exarg_T *eap);
+void ex_helptags(exarg_T *eap);
+void ex_sign(exarg_T *eap);
+void sign_gui_started(void);
+int sign_get_attr(int typenr, int line);
+char_u *sign_get_text(int typenr);
+void *sign_get_image(int typenr);
+char_u *sign_typenr2name(int typenr);
+void free_signs(void);
+char_u *get_sign_name(expand_T *xp, int idx);
+void set_context_in_sign_cmd(expand_T *xp, char_u *arg);
+void ex_drop(exarg_T *eap);
/* vim: set ft=c : */
#endif /* NEOVIM_EX_CMDS_H */
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c
index 8aaa47cc34..b23f6ad46a 100644
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -40,7 +40,7 @@
#include "undo.h"
#include "window.h"
-static void cmd_source __ARGS((char_u *fname, exarg_T *eap));
+static void cmd_source(char_u *fname, exarg_T *eap);
/* Growarray to store info about already sourced scripts.
* For Unix also store the dev/ino, so that we don't have to stat() each
@@ -385,10 +385,10 @@ 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
@@ -844,8 +844,8 @@ int count;
/*
* 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;
/*
@@ -1324,7 +1324,7 @@ int can_abandon(buf_T *buf, int 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.
@@ -1484,11 +1484,11 @@ int buf_write_all(buf_T *buf, int 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 int alist_add_list __ARGS((int count, char_u **files, int after));
+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);
+static int alist_add_list(int count, char_u **files, int after);
#define AL_SET 1
#define AL_ADD 2
#define AL_DEL 3
@@ -2213,7 +2213,7 @@ void ex_runtime(exarg_T *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(char_u *fname, void *cookie)
{
@@ -2245,7 +2245,7 @@ int source_runtime(char_u *name, int all)
int do_in_runtimepath(name, all, callback, cookie)
char_u *name;
int all;
-void (*callback)__ARGS((char_u *fname, void *ck));
+void (*callback)(char_u *fname, void *ck);
void *cookie;
{
char_u *rtp;
@@ -2410,11 +2410,11 @@ int source_level(void *cookie)
return ((struct source_cookie *)cookie)->level;
}
-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.
@@ -3236,7 +3236,7 @@ void do_finish(exarg_T *eap, int reanimate)
* Return FALSE when not sourcing a file.
*/
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)
@@ -3266,7 +3266,7 @@ void ex_checktime(exarg_T *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(int what)
{
@@ -3313,7 +3313,7 @@ char_u *get_mess_lang(void) {
/* Complicated #if; matches with where get_mess_env() is used below. */
#ifdef HAVE_WORKING_LIBINTL
-static char_u *get_mess_env __ARGS((void));
+static char_u *get_mess_env(void);
/*
* Get the language used for messages from the environment.
@@ -3475,8 +3475,8 @@ void ex_language(exarg_T *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_cmds2.h b/src/ex_cmds2.h
index a01096cfd7..b6e61583bd 100644
--- a/src/ex_cmds2.h
+++ b/src/ex_cmds2.h
@@ -1,96 +1,97 @@
#ifndef NEOVIM_EX_CMDS2_H
#define NEOVIM_EX_CMDS2_H
/* ex_cmds2.c */
-void do_debug __ARGS((char_u *cmd));
-void ex_debug __ARGS((exarg_T *eap));
-void dbg_check_breakpoint __ARGS((exarg_T *eap));
-int dbg_check_skipped __ARGS((exarg_T *eap));
-void ex_breakadd __ARGS((exarg_T *eap));
-void ex_debuggreedy __ARGS((exarg_T *eap));
-void ex_breakdel __ARGS((exarg_T *eap));
-void ex_breaklist __ARGS((exarg_T *eap));
-linenr_T dbg_find_breakpoint __ARGS((int file, char_u *fname, linenr_T after));
-int has_profiling __ARGS((int file, char_u *fname, int *fp));
-void dbg_breakpoint __ARGS((char_u *name, linenr_T lnum));
-void profile_start __ARGS((proftime_T *tm));
-void profile_end __ARGS((proftime_T *tm));
-void profile_sub __ARGS((proftime_T *tm, proftime_T *tm2));
-char *profile_msg __ARGS((proftime_T *tm));
-void profile_setlimit __ARGS((long msec, proftime_T *tm));
-int profile_passed_limit __ARGS((proftime_T *tm));
-void profile_zero __ARGS((proftime_T *tm));
-void profile_divide __ARGS((proftime_T *tm, int count, proftime_T *tm2));
-void profile_add __ARGS((proftime_T *tm, proftime_T *tm2));
-void profile_self __ARGS((proftime_T *self, proftime_T *total,
- proftime_T *children));
-void profile_get_wait __ARGS((proftime_T *tm));
-void profile_sub_wait __ARGS((proftime_T *tm, proftime_T *tma));
-int profile_equal __ARGS((proftime_T *tm1, proftime_T *tm2));
-int profile_cmp __ARGS((const proftime_T *tm1, const proftime_T *tm2));
-void ex_profile __ARGS((exarg_T *eap));
-char_u *get_profile_name __ARGS((expand_T *xp, int idx));
-void set_context_in_profile_cmd __ARGS((expand_T *xp, char_u *arg));
-void profile_dump __ARGS((void));
-void script_prof_save __ARGS((proftime_T *tm));
-void script_prof_restore __ARGS((proftime_T *tm));
-void prof_inchar_enter __ARGS((void));
-void prof_inchar_exit __ARGS((void));
-int prof_def_func __ARGS((void));
-int autowrite __ARGS((buf_T *buf, int forceit));
-void autowrite_all __ARGS((void));
-int check_changed __ARGS((buf_T *buf, int flags));
-void browse_save_fname __ARGS((buf_T *buf));
-void dialog_changed __ARGS((buf_T *buf, int checkall));
-int can_abandon __ARGS((buf_T *buf, int forceit));
-int check_changed_any __ARGS((int hidden));
-int check_fname __ARGS((void));
-int buf_write_all __ARGS((buf_T *buf, int forceit));
-int get_arglist __ARGS((garray_T *gap, char_u *str));
-int get_arglist_exp __ARGS((char_u *str, int *fcountp, char_u ***fnamesp,
- int wig));
-void set_arglist __ARGS((char_u *str));
-void check_arg_idx __ARGS((win_T *win));
-void ex_args __ARGS((exarg_T *eap));
-void ex_previous __ARGS((exarg_T *eap));
-void ex_rewind __ARGS((exarg_T *eap));
-void ex_last __ARGS((exarg_T *eap));
-void ex_argument __ARGS((exarg_T *eap));
-void do_argfile __ARGS((exarg_T *eap, int argn));
-void ex_next __ARGS((exarg_T *eap));
-void ex_argedit __ARGS((exarg_T *eap));
-void ex_argadd __ARGS((exarg_T *eap));
-void ex_argdelete __ARGS((exarg_T *eap));
-void ex_listdo __ARGS((exarg_T *eap));
-void ex_compiler __ARGS((exarg_T *eap));
-void ex_runtime __ARGS((exarg_T *eap));
-int source_runtime __ARGS((char_u *name, int all));
-int do_in_runtimepath __ARGS((char_u *name, int all, void (*callback)(
- char_u *fname, void *ck), void *cookie));
-void ex_options __ARGS((exarg_T *eap));
-void ex_source __ARGS((exarg_T *eap));
-linenr_T *source_breakpoint __ARGS((void *cookie));
-int *source_dbg_tick __ARGS((void *cookie));
-int source_level __ARGS((void *cookie));
-int do_source __ARGS((char_u *fname, int check_other, int is_vimrc));
-void ex_scriptnames __ARGS((exarg_T *eap));
-void scriptnames_slash_adjust __ARGS((void));
-char_u *get_scriptname __ARGS((scid_T id));
-void free_scriptnames __ARGS((void));
-char *fgets_cr __ARGS((char *s, int n, FILE *stream));
-char_u *getsourceline __ARGS((int c, void *cookie, int indent));
-void script_line_start __ARGS((void));
-void script_line_exec __ARGS((void));
-void script_line_end __ARGS((void));
-void ex_scriptencoding __ARGS((exarg_T *eap));
-void ex_finish __ARGS((exarg_T *eap));
-void do_finish __ARGS((exarg_T *eap, int reanimate));
-int source_finished __ARGS((char_u *(*fgetline)(int, void *, int), void *cookie));
-void ex_checktime __ARGS((exarg_T *eap));
-char_u *get_mess_lang __ARGS((void));
-void set_lang_var __ARGS((void));
-void ex_language __ARGS((exarg_T *eap));
-void free_locales __ARGS((void));
-char_u *get_lang_arg __ARGS((expand_T *xp, int idx));
-char_u *get_locales __ARGS((expand_T *xp, int idx));
+void do_debug(char_u *cmd);
+void ex_debug(exarg_T *eap);
+void dbg_check_breakpoint(exarg_T *eap);
+int dbg_check_skipped(exarg_T *eap);
+void ex_breakadd(exarg_T *eap);
+void ex_debuggreedy(exarg_T *eap);
+void ex_breakdel(exarg_T *eap);
+void ex_breaklist(exarg_T *eap);
+linenr_T dbg_find_breakpoint(int file, char_u *fname, linenr_T after);
+int has_profiling(int file, char_u *fname, int *fp);
+void dbg_breakpoint(char_u *name, linenr_T lnum);
+void profile_start(proftime_T *tm);
+void profile_end(proftime_T *tm);
+void profile_sub(proftime_T *tm, proftime_T *tm2);
+char *profile_msg(proftime_T *tm);
+void profile_setlimit(long msec, proftime_T *tm);
+int profile_passed_limit(proftime_T *tm);
+void profile_zero(proftime_T *tm);
+void profile_divide(proftime_T *tm, int count, proftime_T *tm2);
+void profile_add(proftime_T *tm, proftime_T *tm2);
+void profile_self(proftime_T *self, proftime_T *total,
+ proftime_T *children);
+void profile_get_wait(proftime_T *tm);
+void profile_sub_wait(proftime_T *tm, proftime_T *tma);
+int profile_equal(proftime_T *tm1, proftime_T *tm2);
+int profile_cmp(const proftime_T *tm1, const proftime_T *tm2);
+void ex_profile(exarg_T *eap);
+char_u *get_profile_name(expand_T *xp, int idx);
+void set_context_in_profile_cmd(expand_T *xp, char_u *arg);
+void profile_dump(void);
+void script_prof_save(proftime_T *tm);
+void script_prof_restore(proftime_T *tm);
+void prof_inchar_enter(void);
+void prof_inchar_exit(void);
+int prof_def_func(void);
+int autowrite(buf_T *buf, int forceit);
+void autowrite_all(void);
+int check_changed(buf_T *buf, int flags);
+void browse_save_fname(buf_T *buf);
+void dialog_changed(buf_T *buf, int checkall);
+int can_abandon(buf_T *buf, int forceit);
+int check_changed_any(int hidden);
+int check_fname(void);
+int buf_write_all(buf_T *buf, int forceit);
+int get_arglist(garray_T *gap, char_u *str);
+int get_arglist_exp(char_u *str, int *fcountp, char_u ***fnamesp,
+ int wig);
+void set_arglist(char_u *str);
+void check_arg_idx(win_T *win);
+void ex_args(exarg_T *eap);
+void ex_previous(exarg_T *eap);
+void ex_rewind(exarg_T *eap);
+void ex_last(exarg_T *eap);
+void ex_argument(exarg_T *eap);
+void do_argfile(exarg_T *eap, int argn);
+void ex_next(exarg_T *eap);
+void ex_argedit(exarg_T *eap);
+void ex_argadd(exarg_T *eap);
+void ex_argdelete(exarg_T *eap);
+void ex_listdo(exarg_T *eap);
+void ex_compiler(exarg_T *eap);
+void ex_runtime(exarg_T *eap);
+int source_runtime(char_u *name, int all);
+int do_in_runtimepath(char_u *name, int all,
+ void (*callback)(char_u *fname, void *ck),
+ void *cookie);
+void ex_options(exarg_T *eap);
+void ex_source(exarg_T *eap);
+linenr_T *source_breakpoint(void *cookie);
+int *source_dbg_tick(void *cookie);
+int source_level(void *cookie);
+int do_source(char_u *fname, int check_other, int is_vimrc);
+void ex_scriptnames(exarg_T *eap);
+void scriptnames_slash_adjust(void);
+char_u *get_scriptname(scid_T id);
+void free_scriptnames(void);
+char *fgets_cr(char *s, int n, FILE *stream);
+char_u *getsourceline(int c, void *cookie, int indent);
+void script_line_start(void);
+void script_line_exec(void);
+void script_line_end(void);
+void ex_scriptencoding(exarg_T *eap);
+void ex_finish(exarg_T *eap);
+void do_finish(exarg_T *eap, int reanimate);
+int source_finished(char_u *(*fgetline)(int, void *, int), void *cookie);
+void ex_checktime(exarg_T *eap);
+char_u *get_mess_lang(void);
+void set_lang_var(void);
+void ex_language(exarg_T *eap);
+void free_locales(void);
+char_u *get_lang_arg(expand_T *xp, int idx);
+char_u *get_locales(expand_T *xp, int idx);
/* vim: set ft=c : */
#endif /* NEOVIM_EX_CMDS2_H */
diff --git a/src/ex_cmds_defs.h b/src/ex_cmds_defs.h
index a560789fef..7c1ac1bc1b 100644
--- a/src/ex_cmds_defs.h
+++ b/src/ex_cmds_defs.h
@@ -76,7 +76,7 @@ typedef struct exarg exarg_T;
#ifdef DO_DECLARE_EXCMD
# define EX(a, b, c, d) {(char_u *)b, c, (long_u)(d)}
-typedef void (*ex_func_T) __ARGS ((exarg_T *eap));
+typedef void (*ex_func_T)(exarg_T *eap);
static struct cmdname {
char_u *cmd_name; /* name of the command */
@@ -1175,7 +1175,7 @@ struct exarg {
int bad_char; /* BAD_KEEP, BAD_DROP or replacement byte */
int useridx; /* user command index */
char_u *errmsg; /* returned error message */
- char_u *(*getline)__ARGS((int, void *, int));
+ char_u *(*getline)(int, void *, int);
void *cookie; /* argument for getline() */
struct condstack *cstack; /* condition stack for ":if" etc. */
};
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 2f4a50580a..5f118c255c 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -78,39 +78,39 @@ 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 char_u *get_user_command_name __ARGS((int idx));
-
-
-static char_u *do_one_cmd __ARGS((char_u **, int, struct condstack *,
- char_u *(*fgetline)(int, void *, int),
- void *cookie));
-static void append_command __ARGS((char_u *cmd));
-static char_u *find_command __ARGS((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_autocmd __ARGS((exarg_T *eap));
-static void ex_doautocmd __ARGS((exarg_T *eap));
-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 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 int check_more __ARGS((int, int));
-static linenr_T get_address __ARGS((char_u **, int skip, int to_other_file));
-static void get_flags __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);
+static char_u *get_user_command_name(int idx);
+
+
+static char_u *do_one_cmd(char_u **, int, struct condstack *,
+ char_u *(*fgetline)(int, void *, int),
+ void *cookie);
+static void append_command(char_u *cmd);
+static char_u *find_command(exarg_T *eap, int *full);
+
+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);
+static void ex_autocmd(exarg_T *eap);
+static void ex_doautocmd(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);
+static char_u *getargcmd(char_u **);
+static char_u *skip_cmd_arg(char_u *p, int rembs);
+static int getargopt(exarg_T *eap);
+
+static int check_more(int, int);
+static linenr_T get_address(char_u **, 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) \
@@ -118,49 +118,49 @@ 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 *replace_makeprg __ARGS((exarg_T *eap, char_u *p,
- char_u **cmdlinep));
-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 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_pclose __ARGS((exarg_T *eap));
-static void ex_ptag __ARGS((exarg_T *eap));
-static void ex_pedit __ARGS((exarg_T *eap));
-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_goto __ARGS((exarg_T *eap));
-static void ex_shell __ARGS((exarg_T *eap));
-static void ex_preserve __ARGS((exarg_T *eap));
-static void ex_recover __ARGS((exarg_T *eap));
-static void ex_mode __ARGS((exarg_T *eap));
-static void ex_wrongmodifier __ARGS((exarg_T *eap));
-static void ex_find __ARGS((exarg_T *eap));
-static void ex_open __ARGS((exarg_T *eap));
-static void ex_edit __ARGS((exarg_T *eap));
+static char_u *invalid_range(exarg_T *eap);
+static void correct_range(exarg_T *eap);
+static char_u *replace_makeprg(exarg_T *eap, char_u *p,
+ char_u **cmdlinep);
+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);
+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);
+static void ex_pclose(exarg_T *eap);
+static void ex_ptag(exarg_T *eap);
+static void ex_pedit(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);
+static void ex_goto(exarg_T *eap);
+static void ex_shell(exarg_T *eap);
+static void ex_preserve(exarg_T *eap);
+static void ex_recover(exarg_T *eap);
+static void ex_mode(exarg_T *eap);
+static void ex_wrongmodifier(exarg_T *eap);
+static void ex_find(exarg_T *eap);
+static void ex_open(exarg_T *eap);
+static void ex_edit(exarg_T *eap);
# define ex_drop ex_ni
# define ex_gui ex_nogui
-static void ex_nogui __ARGS((exarg_T *eap));
+static void ex_nogui(exarg_T *eap);
# define ex_tearoff ex_ni
# define ex_popup ex_ni
# define ex_simalt ex_ni
@@ -187,70 +187,70 @@ static void ex_nogui __ARGS((exarg_T *eap));
# define ex_rubydo ex_ni
# define ex_rubyfile ex_ni
# define ex_sniff ex_ni
-static void ex_swapname __ARGS((exarg_T *eap));
-static void ex_syncbind __ARGS((exarg_T *eap));
-static void ex_read __ARGS((exarg_T *eap));
-static void ex_pwd __ARGS((exarg_T *eap));
-static void ex_equal __ARGS((exarg_T *eap));
-static void ex_sleep __ARGS((exarg_T *eap));
-static void do_exmap __ARGS((exarg_T *eap, int isabbrev));
-static void ex_winsize __ARGS((exarg_T *eap));
-static void ex_wincmd __ARGS((exarg_T *eap));
+static void ex_swapname(exarg_T *eap);
+static void ex_syncbind(exarg_T *eap);
+static void ex_read(exarg_T *eap);
+static void ex_pwd(exarg_T *eap);
+static void ex_equal(exarg_T *eap);
+static void ex_sleep(exarg_T *eap);
+static void do_exmap(exarg_T *eap, int isabbrev);
+static void ex_winsize(exarg_T *eap);
+static void ex_wincmd(exarg_T *eap);
#if defined(FEAT_GUI) || defined(UNIX) || defined(VMS) || defined(MSWIN)
-static void ex_winpos __ARGS((exarg_T *eap));
+static void ex_winpos(exarg_T *eap);
#else
# define ex_winpos ex_ni
#endif
-static void ex_operators __ARGS((exarg_T *eap));
-static void ex_put __ARGS((exarg_T *eap));
-static void ex_copymove __ARGS((exarg_T *eap));
-static void ex_may_print __ARGS((exarg_T *eap));
-static void ex_submagic __ARGS((exarg_T *eap));
-static void ex_join __ARGS((exarg_T *eap));
-static void ex_at __ARGS((exarg_T *eap));
-static void ex_bang __ARGS((exarg_T *eap));
-static void ex_undo __ARGS((exarg_T *eap));
-static void ex_wundo __ARGS((exarg_T *eap));
-static void ex_rundo __ARGS((exarg_T *eap));
-static void ex_redo __ARGS((exarg_T *eap));
-static void ex_later __ARGS((exarg_T *eap));
-static void ex_redir __ARGS((exarg_T *eap));
-static void ex_redraw __ARGS((exarg_T *eap));
-static void ex_redrawstatus __ARGS((exarg_T *eap));
-static void close_redir __ARGS((void));
-static void ex_mkrc __ARGS((exarg_T *eap));
-static void ex_mark __ARGS((exarg_T *eap));
-static char_u *uc_fun_cmd __ARGS((void));
-static char_u *find_ucmd __ARGS((exarg_T *eap, char_u *p, int *full,
- expand_T *xp,
- int *compl));
-static void ex_normal __ARGS((exarg_T *eap));
-static void ex_startinsert __ARGS((exarg_T *eap));
-static void ex_stopinsert __ARGS((exarg_T *eap));
-static void ex_checkpath __ARGS((exarg_T *eap));
-static void ex_findpat __ARGS((exarg_T *eap));
-static void ex_psearch __ARGS((exarg_T *eap));
-static void ex_tag __ARGS((exarg_T *eap));
-static void ex_tag_cmd __ARGS((exarg_T *eap, char_u *name));
-static char_u *arg_all __ARGS((void));
-static int makeopens __ARGS((FILE *fd, char_u *dirnow));
-static int put_view __ARGS((FILE *fd, win_T *wp, int add_edit, unsigned *flagp,
- int current_arg_idx));
-static void ex_loadview __ARGS((exarg_T *eap));
-static char_u *get_view_file __ARGS((int c));
+static void ex_operators(exarg_T *eap);
+static void ex_put(exarg_T *eap);
+static void ex_copymove(exarg_T *eap);
+static void ex_may_print(exarg_T *eap);
+static void ex_submagic(exarg_T *eap);
+static void ex_join(exarg_T *eap);
+static void ex_at(exarg_T *eap);
+static void ex_bang(exarg_T *eap);
+static void ex_undo(exarg_T *eap);
+static void ex_wundo(exarg_T *eap);
+static void ex_rundo(exarg_T *eap);
+static void ex_redo(exarg_T *eap);
+static void ex_later(exarg_T *eap);
+static void ex_redir(exarg_T *eap);
+static void ex_redraw(exarg_T *eap);
+static void ex_redrawstatus(exarg_T *eap);
+static void close_redir(void);
+static void ex_mkrc(exarg_T *eap);
+static void ex_mark(exarg_T *eap);
+static char_u *uc_fun_cmd(void);
+static char_u *find_ucmd(exarg_T *eap, char_u *p, int *full,
+ expand_T *xp,
+ int *compl);
+static void ex_normal(exarg_T *eap);
+static void ex_startinsert(exarg_T *eap);
+static void ex_stopinsert(exarg_T *eap);
+static void ex_checkpath(exarg_T *eap);
+static void ex_findpat(exarg_T *eap);
+static void ex_psearch(exarg_T *eap);
+static void ex_tag(exarg_T *eap);
+static void ex_tag_cmd(exarg_T *eap, char_u *name);
+static char_u *arg_all(void);
+static int makeopens(FILE *fd, char_u *dirnow);
+static int put_view(FILE *fd, win_T *wp, int add_edit, unsigned *flagp,
+ int current_arg_idx);
+static void ex_loadview(exarg_T *eap);
+static char_u *get_view_file(int c);
static int did_lcd; /* whether ":lcd" was produced for a session */
-static void ex_viminfo __ARGS((exarg_T *eap));
-static void ex_behave __ARGS((exarg_T *eap));
-static void ex_filetype __ARGS((exarg_T *eap));
-static void ex_setfiletype __ARGS((exarg_T *eap));
-static void ex_digraphs __ARGS((exarg_T *eap));
-static void ex_set __ARGS((exarg_T *eap));
-static void ex_nohlsearch __ARGS((exarg_T *eap));
-static void ex_match __ARGS((exarg_T *eap));
-static void ex_X __ARGS((exarg_T *eap));
-static void ex_fold __ARGS((exarg_T *eap));
-static void ex_foldopen __ARGS((exarg_T *eap));
-static void ex_folddo __ARGS((exarg_T *eap));
+static void ex_viminfo(exarg_T *eap);
+static void ex_behave(exarg_T *eap);
+static void ex_filetype(exarg_T *eap);
+static void ex_setfiletype(exarg_T *eap);
+static void ex_digraphs(exarg_T *eap);
+static void ex_set(exarg_T *eap);
+static void ex_nohlsearch(exarg_T *eap);
+static void ex_match(exarg_T *eap);
+static void ex_X(exarg_T *eap);
+static void ex_fold(exarg_T *eap);
+static void ex_foldopen(exarg_T *eap);
+static void ex_folddo(exarg_T *eap);
#ifndef HAVE_WORKING_LIBINTL
# define ex_language ex_ni
#endif
@@ -322,13 +322,13 @@ struct loop_cookie {
int current_line; /* last read line from growarray */
int repeating; /* TRUE when looping a second time */
/* When "repeating" is FALSE use "getline" and "cookie" to get lines */
- char_u *(*getline)__ARGS((int, void *, int));
+ char_u *(*getline)(int, void *, int);
void *cookie;
};
-static char_u *get_loop_line __ARGS((int c, void *cookie, int indent));
-static int store_loop_line __ARGS((garray_T *gap, char_u *line));
-static void free_cmdlines __ARGS((garray_T *gap));
+static char_u *get_loop_line(int c, void *cookie, int indent);
+static int store_loop_line(garray_T *gap, char_u *line);
+static void free_cmdlines(garray_T *gap);
/* Struct to save a few things while debugging. Used in do_cmdline() only. */
struct dbg_stuff {
@@ -345,8 +345,8 @@ struct dbg_stuff {
except_T *current_exception;
};
-static void save_dbg_stuff __ARGS((struct dbg_stuff *dsp));
-static void restore_dbg_stuff __ARGS((struct dbg_stuff *dsp));
+static void save_dbg_stuff(struct dbg_stuff *dsp);
+static void restore_dbg_stuff(struct dbg_stuff *dsp);
static void save_dbg_stuff(struct dbg_stuff *dsp)
{
@@ -493,7 +493,7 @@ int do_cmdline_cmd(char_u *cmd)
*/
int do_cmdline(cmdline, fgetline, cookie, flags)
char_u *cmdline;
-char_u *(*fgetline)__ARGS((int, void *, int));
+char_u *(*fgetline)(int, void *, int);
void *cookie; /* argument for fgetline() */
int flags;
{
@@ -517,7 +517,7 @@ int flags;
struct msglist *private_msg_list;
/* "fgetline" and "cookie" passed to do_one_cmd() */
- char_u *(*cmd_getline)__ARGS((int, void *, int));
+ char_u *(*cmd_getline)(int, void *, int);
void *cmd_cookie;
struct loop_cookie cmd_loop_cookie;
void *real_cookie;
@@ -1226,11 +1226,11 @@ static void free_cmdlines(garray_T *gap)
* "func". * Otherwise return TRUE when "fgetline" equals "func".
*/
int getline_equal(fgetline, cookie, func)
-char_u *(*fgetline)__ARGS((int, void *, int));
+char_u *(*fgetline)(int, void *, int);
void *cookie; /* argument for fgetline() */
-char_u *(*func)__ARGS((int, void *, int));
+char_u *(*func)(int, void *, int);
{
- char_u *(*gp)__ARGS((int, void *, int));
+ char_u *(*gp)(int, void *, int);
struct loop_cookie *cp;
/* When "fgetline" is "get_loop_line()" use the "cookie" to find the
@@ -1250,10 +1250,10 @@ char_u *(*func)__ARGS((int, void *, int));
* getline function. Otherwise return "cookie".
*/
void * getline_cookie(fgetline, cookie)
-char_u *(*fgetline)__ARGS((int, void *, int));
+char_u *(*fgetline)(int, void *, int);
void *cookie; /* argument for fgetline() */
{
- char_u *(*gp)__ARGS((int, void *, int));
+ char_u *(*gp)(int, void *, int);
struct loop_cookie *cp;
/* When "fgetline" is "get_loop_line()" use the "cookie" to find the
@@ -1290,8 +1290,8 @@ static char_u * do_one_cmd(cmdlinep, sourcing,
char_u **cmdlinep;
int sourcing;
struct condstack *cstack;
-char_u *(*fgetline)__ARGS((int, void *, int));
-void *cookie; /* argument for fgetline() */
+char_u *(*fgetline)(int, void *, int);
+void *cookie; /*argument for fgetline() */
{
char_u *p;
linenr_T lnum;
@@ -3528,7 +3528,7 @@ static void correct_range(exarg_T *eap)
}
}
-static char_u *skip_grep_pat __ARGS((exarg_T *eap));
+static char_u *skip_grep_pat(exarg_T *eap);
/*
* For a ":vimgrep" or ":vimgrepadd" command return a pointer past the
@@ -4315,19 +4315,18 @@ char_u *get_command_name(expand_T *xp, int idx)
return cmdnames[idx].cmd_name;
}
-static int uc_add_command __ARGS((char_u *name, size_t name_len, char_u *rep,
+static int uc_add_command(char_u *name, size_t name_len, char_u *rep,
long argt, long def, int flags, int compl,
char_u *compl_arg,
- int force));
-static void uc_list __ARGS((char_u *name, size_t name_len));
-static int uc_scan_attr __ARGS((char_u *attr, size_t len, long *argt, long *def,
- int *flags, int *compl,
- char_u **compl_arg));
-static char_u *uc_split_args __ARGS((char_u *arg, size_t *lenp));
-static size_t uc_check_code __ARGS((char_u *code, size_t len, char_u *buf,
- ucmd_T *cmd, exarg_T *eap, char_u *
- *split_buf,
- size_t *split_len));
+ int force);
+static void uc_list(char_u *name, size_t name_len);
+static int uc_scan_attr(char_u *attr, size_t len, long *argt, long *def,
+ int *flags, int *compl,
+ char_u **compl_arg);
+static char_u *uc_split_args(char_u *arg, size_t *lenp);
+static size_t uc_check_code(char_u *code, size_t len, char_u *buf,
+ ucmd_T *cmd, exarg_T *eap, char_u **split_buf,
+ size_t *split_len);
static int uc_add_command(char_u *name, size_t name_len, char_u *rep, long argt, long def, int flags, int compl, char_u *compl_arg, int force)
{
@@ -8182,16 +8181,15 @@ char_u *expand_sfile(char_u *arg)
return result;
}
-static int ses_winsizes __ARGS((FILE *fd, int restore_size,
- win_T *tab_firstwin));
-static int ses_win_rec __ARGS((FILE *fd, frame_T *fr));
-static frame_T *ses_skipframe __ARGS((frame_T *fr));
-static int ses_do_frame __ARGS((frame_T *fr));
-static int ses_do_win __ARGS((win_T *wp));
-static int ses_arglist __ARGS((FILE *fd, char *cmd, garray_T *gap, int fullname,
- unsigned *flagp));
-static int ses_put_fname __ARGS((FILE *fd, char_u *name, unsigned *flagp));
-static int ses_fname __ARGS((FILE *fd, buf_T *buf, unsigned *flagp));
+static int ses_winsizes(FILE *fd, int restore_size, win_T *tab_firstwin);
+static int ses_win_rec(FILE *fd, frame_T *fr);
+static frame_T *ses_skipframe(frame_T *fr);
+static int ses_do_frame(frame_T *fr);
+static int ses_do_win(win_T *wp);
+static int ses_arglist(FILE *fd, char *cmd, garray_T *gap, int fullname,
+ unsigned *flagp);
+static int ses_put_fname(FILE *fd, char_u *name, unsigned *flagp);
+static int ses_fname(FILE *fd, buf_T *buf, unsigned *flagp);
/*
* Write openfile commands for the current buffers to an .exrc file.
diff --git a/src/ex_docmd.h b/src/ex_docmd.h
index f3f9ca16ec..f9d683d09d 100644
--- a/src/ex_docmd.h
+++ b/src/ex_docmd.h
@@ -1,72 +1,69 @@
#ifndef NEOVIM_EX_DOCMD_H
#define NEOVIM_EX_DOCMD_H
/* ex_docmd.c */
-void do_exmode __ARGS((int improved));
-int do_cmdline_cmd __ARGS((char_u *cmd));
-int do_cmdline __ARGS((char_u *cmdline, char_u *
- (*fgetline)(int, void *, int), void *cookie,
- int flags));
-int getline_equal __ARGS((char_u *
- (*fgetline)(int, void *,
- int), void *cookie, char_u *
- (*func)(int, void *,
- int)));
-void *getline_cookie __ARGS((char_u *(*fgetline)(int, void *, int),
- void *cookie));
-int checkforcmd __ARGS((char_u **pp, char *cmd, int len));
-int modifier_len __ARGS((char_u *cmd));
-int cmd_exists __ARGS((char_u *name));
-char_u *set_one_cmd_context __ARGS((expand_T *xp, char_u *buff));
-char_u *skip_range __ARGS((char_u *cmd, int *ctx));
-void ex_ni __ARGS((exarg_T *eap));
-int expand_filename __ARGS((exarg_T *eap, char_u **cmdlinep, char_u **errormsgp));
-void separate_nextcmd __ARGS((exarg_T *eap));
-int ends_excmd __ARGS((int c));
-char_u *find_nextcmd __ARGS((char_u *p));
-char_u *check_nextcmd __ARGS((char_u *p));
-char_u *get_command_name __ARGS((expand_T *xp, int idx));
-void ex_comclear __ARGS((exarg_T *eap));
-void uc_clear __ARGS((garray_T *gap));
-char_u *get_user_commands __ARGS((expand_T *xp, int idx));
-char_u *get_user_cmd_flags __ARGS((expand_T *xp, int idx));
-char_u *get_user_cmd_nargs __ARGS((expand_T *xp, int idx));
-char_u *get_user_cmd_complete __ARGS((expand_T *xp, int idx));
-int parse_compl_arg __ARGS((char_u *value, int vallen, int *complp, long *argt,
- char_u **compl_arg));
-void not_exiting __ARGS((void));
-void tabpage_close __ARGS((int forceit));
-void tabpage_close_other __ARGS((tabpage_T *tp, int forceit));
-void ex_all __ARGS((exarg_T *eap));
-void handle_drop __ARGS((int filec, char_u **filev, int split));
-void alist_clear __ARGS((alist_T *al));
-void alist_init __ARGS((alist_T *al));
-void alist_unlink __ARGS((alist_T *al));
-void alist_new __ARGS((void));
-void alist_expand __ARGS((int *fnum_list, int fnum_len));
-void alist_set __ARGS((alist_T *al, int count, char_u **files, int use_curbuf,
- int *fnum_list,
- int fnum_len));
-void alist_add __ARGS((alist_T *al, char_u *fname, int set_fnum));
-void alist_slash_adjust __ARGS((void));
-void ex_splitview __ARGS((exarg_T *eap));
-void tabpage_new __ARGS((void));
-void do_exedit __ARGS((exarg_T *eap, win_T *old_curwin));
-void free_cd_dir __ARGS((void));
-void post_chdir __ARGS((int local));
-void ex_cd __ARGS((exarg_T *eap));
-void do_sleep __ARGS((long msec));
-int vim_mkdir_emsg __ARGS((char_u *name, int prot));
-FILE *open_exfile __ARGS((char_u *fname, int forceit, char *mode));
-void update_topline_cursor __ARGS((void));
-void exec_normal_cmd __ARGS((char_u *cmd, int remap, int silent));
-int find_cmdline_var __ARGS((char_u *src, int *usedlen));
-char_u *eval_vars __ARGS((char_u *src, char_u *srcstart, int *usedlen,
- linenr_T *lnump, char_u **errormsg,
- int *escaped));
-char_u *expand_sfile __ARGS((char_u *arg));
-int put_eol __ARGS((FILE *fd));
-int put_line __ARGS((FILE *fd, char *s));
-void dialog_msg __ARGS((char_u *buff, char *format, char_u *fname));
-char_u *get_behave_arg __ARGS((expand_T *xp, int idx));
+void do_exmode(int improved);
+int do_cmdline_cmd(char_u *cmd);
+int do_cmdline(char_u *cmdline, char_u *
+ (*fgetline)(int, void *, int), void *cookie,
+ int flags);
+int getline_equal(char_u *
+ (*fgetline)(int, void *, int), void *cookie, char_u *
+ (*func)(int, void *, int));
+void *getline_cookie(char_u *(*fgetline)(int, void *, int), void *cookie);
+int checkforcmd(char_u **pp, char *cmd, int len);
+int modifier_len(char_u *cmd);
+int cmd_exists(char_u *name);
+char_u *set_one_cmd_context(expand_T *xp, char_u *buff);
+char_u *skip_range(char_u *cmd, int *ctx);
+void ex_ni(exarg_T *eap);
+int expand_filename(exarg_T *eap, char_u **cmdlinep, char_u **errormsgp);
+void separate_nextcmd(exarg_T *eap);
+int ends_excmd(int c);
+char_u *find_nextcmd(char_u *p);
+char_u *check_nextcmd(char_u *p);
+char_u *get_command_name(expand_T *xp, int idx);
+void ex_comclear(exarg_T *eap);
+void uc_clear(garray_T *gap);
+char_u *get_user_commands(expand_T *xp, int idx);
+char_u *get_user_cmd_flags(expand_T *xp, int idx);
+char_u *get_user_cmd_nargs(expand_T *xp, int idx);
+char_u *get_user_cmd_complete(expand_T *xp, int idx);
+int parse_compl_arg(char_u *value, int vallen, int *complp, long *argt,
+ char_u **compl_arg);
+void not_exiting(void);
+void tabpage_close(int forceit);
+void tabpage_close_other(tabpage_T *tp, int forceit);
+void ex_all(exarg_T *eap);
+void handle_drop(int filec, char_u **filev, int split);
+void alist_clear(alist_T *al);
+void alist_init(alist_T *al);
+void alist_unlink(alist_T *al);
+void alist_new(void);
+void alist_expand(int *fnum_list, int fnum_len);
+void alist_set(alist_T *al, int count, char_u **files, int use_curbuf,
+ int *fnum_list,
+ int fnum_len);
+void alist_add(alist_T *al, char_u *fname, int set_fnum);
+void alist_slash_adjust(void);
+void ex_splitview(exarg_T *eap);
+void tabpage_new(void);
+void do_exedit(exarg_T *eap, win_T *old_curwin);
+void free_cd_dir(void);
+void post_chdir(int local);
+void ex_cd(exarg_T *eap);
+void do_sleep(long msec);
+int vim_mkdir_emsg(char_u *name, int prot);
+FILE *open_exfile(char_u *fname, int forceit, char *mode);
+void update_topline_cursor(void);
+void exec_normal_cmd(char_u *cmd, int remap, int silent);
+int find_cmdline_var(char_u *src, int *usedlen);
+char_u *eval_vars(char_u *src, char_u *srcstart, int *usedlen,
+ linenr_T *lnump, char_u **errormsg,
+ int *escaped);
+char_u *expand_sfile(char_u *arg);
+int put_eol(FILE *fd);
+int put_line(FILE *fd, char *s);
+void dialog_msg(char_u *buff, char *format, char_u *fname);
+char_u *get_behave_arg(expand_T *xp, int idx);
/* vim: set ft=c : */
#endif /* NEOVIM_EX_DOCMD_H */
diff --git a/src/ex_eval.c b/src/ex_eval.c
index e4148068f5..a0c5d1142e 100644
--- a/src/ex_eval.c
+++ b/src/ex_eval.c
@@ -22,9 +22,9 @@
#include "regexp.h"
-static void free_msglist __ARGS((struct msglist *l));
-static int throw_exception __ARGS((void *, int, char_u *));
-static char_u *get_end_emsg __ARGS((struct condstack *cstack));
+static void free_msglist(struct msglist *l);
+static int throw_exception(void *, int, char_u *);
+static char_u *get_end_emsg(struct condstack *cstack);
/*
* Exception handling terms:
@@ -65,10 +65,10 @@ static char_u *get_end_emsg __ARGS((struct condstack *cstack));
# define THROW_ON_INTERRUPT TRUE
# define THROW_ON_INTERRUPT_TRUE
-static void catch_exception __ARGS((except_T *excp));
-static void finish_exception __ARGS((except_T *excp));
-static void discard_exception __ARGS((except_T *excp, int was_finished));
-static void report_pending __ARGS((int action, int pending, void *value));
+static void catch_exception(except_T *excp);
+static void finish_exception(except_T *excp);
+static void discard_exception(except_T *excp, int was_finished);
+static void report_pending(int action, int pending, void *value);
/*
* When several errors appear in a row, setting "force_abort" is delayed until
diff --git a/src/ex_eval.h b/src/ex_eval.h
index 3685899063..d16465f644 100644
--- a/src/ex_eval.h
+++ b/src/ex_eval.h
@@ -1,41 +1,41 @@
#ifndef NEOVIM_EX_EVAL_H
#define NEOVIM_EX_EVAL_H
/* ex_eval.c */
-int aborting __ARGS((void));
-void update_force_abort __ARGS((void));
-int should_abort __ARGS((int retcode));
-int aborted_in_try __ARGS((void));
-int cause_errthrow __ARGS((char_u *mesg, int severe, int *ignore));
-void free_global_msglist __ARGS((void));
-void do_errthrow __ARGS((struct condstack *cstack, char_u *cmdname));
-int do_intthrow __ARGS((struct condstack *cstack));
-char_u *get_exception_string __ARGS((void *value, int type, char_u *cmdname,
- int *should_free));
-void discard_current_exception __ARGS((void));
-void report_make_pending __ARGS((int pending, void *value));
-void report_resume_pending __ARGS((int pending, void *value));
-void report_discard_pending __ARGS((int pending, void *value));
-void ex_if __ARGS((exarg_T *eap));
-void ex_endif __ARGS((exarg_T *eap));
-void ex_else __ARGS((exarg_T *eap));
-void ex_while __ARGS((exarg_T *eap));
-void ex_continue __ARGS((exarg_T *eap));
-void ex_break __ARGS((exarg_T *eap));
-void ex_endwhile __ARGS((exarg_T *eap));
-void ex_throw __ARGS((exarg_T *eap));
-void do_throw __ARGS((struct condstack *cstack));
-void ex_try __ARGS((exarg_T *eap));
-void ex_catch __ARGS((exarg_T *eap));
-void ex_finally __ARGS((exarg_T *eap));
-void ex_endtry __ARGS((exarg_T *eap));
-void enter_cleanup __ARGS((cleanup_T *csp));
-void leave_cleanup __ARGS((cleanup_T *csp));
-int cleanup_conditionals __ARGS((struct condstack *cstack, int searched_cond,
- int inclusive));
-void rewind_conditionals __ARGS((struct condstack *cstack, int idx,
- int cond_type,
- int *cond_level));
-void ex_endfunction __ARGS((exarg_T *eap));
-int has_loop_cmd __ARGS((char_u *p));
+int aborting(void);
+void update_force_abort(void);
+int should_abort(int retcode);
+int aborted_in_try(void);
+int cause_errthrow(char_u *mesg, int severe, int *ignore);
+void free_global_msglist(void);
+void do_errthrow(struct condstack *cstack, char_u *cmdname);
+int do_intthrow(struct condstack *cstack);
+char_u *get_exception_string(void *value, int type, char_u *cmdname,
+ int *should_free);
+void discard_current_exception(void);
+void report_make_pending(int pending, void *value);
+void report_resume_pending(int pending, void *value);
+void report_discard_pending(int pending, void *value);
+void ex_if(exarg_T *eap);
+void ex_endif(exarg_T *eap);
+void ex_else(exarg_T *eap);
+void ex_while(exarg_T *eap);
+void ex_continue(exarg_T *eap);
+void ex_break(exarg_T *eap);
+void ex_endwhile(exarg_T *eap);
+void ex_throw(exarg_T *eap);
+void do_throw(struct condstack *cstack);
+void ex_try(exarg_T *eap);
+void ex_catch(exarg_T *eap);
+void ex_finally(exarg_T *eap);
+void ex_endtry(exarg_T *eap);
+void enter_cleanup(cleanup_T *csp);
+void leave_cleanup(cleanup_T *csp);
+int cleanup_conditionals(struct condstack *cstack, int searched_cond,
+ int inclusive);
+void rewind_conditionals(struct condstack *cstack, int idx,
+ int cond_type,
+ int *cond_level);
+void ex_endfunction(exarg_T *eap);
+int has_loop_cmd(char_u *p);
/* vim: set ft=c : */
#endif /* NEOVIM_EX_EVAL_H */
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.
diff --git a/src/ex_getln.h b/src/ex_getln.h
index bf04476e2f..f347201a82 100644
--- a/src/ex_getln.h
+++ b/src/ex_getln.h
@@ -1,69 +1,69 @@
#ifndef NEOVIM_EX_GETLN_H
#define NEOVIM_EX_GETLN_H
/* ex_getln.c */
-char_u *getcmdline __ARGS((int firstc, long count, int indent));
-char_u *getcmdline_prompt __ARGS((int firstc, char_u *prompt, int attr,
- int xp_context,
- char_u *xp_arg));
-int text_locked __ARGS((void));
-void text_locked_msg __ARGS((void));
-int curbuf_locked __ARGS((void));
-int allbuf_locked __ARGS((void));
-char_u *getexline __ARGS((int c, void *cookie, int indent));
-char_u *getexmodeline __ARGS((int promptc, void *cookie, int indent));
-int cmdline_overstrike __ARGS((void));
-int cmdline_at_end __ARGS((void));
-colnr_T cmdline_getvcol_cursor __ARGS((void));
-void free_cmdline_buf __ARGS((void));
-void putcmdline __ARGS((int c, int shift));
-void unputcmdline __ARGS((void));
-int put_on_cmdline __ARGS((char_u *str, int len, int redraw));
-char_u *save_cmdline_alloc __ARGS((void));
-void restore_cmdline_alloc __ARGS((char_u *p));
-void cmdline_paste_str __ARGS((char_u *s, int literally));
-void redrawcmdline __ARGS((void));
-void redrawcmd __ARGS((void));
-void compute_cmdrow __ARGS((void));
-void gotocmdline __ARGS((int clr));
-char_u *ExpandOne __ARGS((expand_T *xp, char_u *str, char_u *orig, int options,
- int mode));
-void ExpandInit __ARGS((expand_T *xp));
-void ExpandCleanup __ARGS((expand_T *xp));
-void ExpandEscape __ARGS((expand_T *xp, char_u *str, int numfiles, char_u *
- *files,
- int options));
-char_u *vim_strsave_fnameescape __ARGS((char_u *fname, int shell));
-void tilde_replace __ARGS((char_u *orig_pat, int num_files, char_u **files));
-char_u *sm_gettail __ARGS((char_u *s));
-char_u *addstar __ARGS((char_u *fname, int len, int context));
-void set_cmd_context __ARGS((expand_T *xp, char_u *str, int len, int col));
-int expand_cmdline __ARGS((expand_T *xp, char_u *str, int col, int *matchcount,
- char_u ***matches));
-int ExpandGeneric __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file,
- char_u ***file, char_u *((*func)(expand_T *, int)),
- int escaped));
-char_u *globpath __ARGS((char_u *path, char_u *file, int expand_options));
-void init_history __ARGS((void));
-int get_histtype __ARGS((char_u *name));
-void add_to_history __ARGS((int histype, char_u *new_entry, int in_map, int sep));
-int get_history_idx __ARGS((int histype));
-char_u *get_cmdline_str __ARGS((void));
-int get_cmdline_pos __ARGS((void));
-int set_cmdline_pos __ARGS((int pos));
-int get_cmdline_type __ARGS((void));
-char_u *get_history_entry __ARGS((int histype, int idx));
-int clr_history __ARGS((int histype));
-int del_history_entry __ARGS((int histype, char_u *str));
-int del_history_idx __ARGS((int histype, int idx));
-void remove_key_from_history __ARGS((void));
-int get_list_range __ARGS((char_u **str, int *num1, int *num2));
-void ex_history __ARGS((exarg_T *eap));
-void prepare_viminfo_history __ARGS((int asklen, int writing));
-int read_viminfo_history __ARGS((vir_T *virp, int writing));
-void finish_viminfo_history __ARGS((void));
-void write_viminfo_history __ARGS((FILE *fp, int merge));
-void cmd_pchar __ARGS((int c, int offset));
-int cmd_gchar __ARGS((int offset));
-char_u *script_get __ARGS((exarg_T *eap, char_u *cmd));
+char_u *getcmdline(int firstc, long count, int indent);
+char_u *getcmdline_prompt(int firstc, char_u *prompt, int attr,
+ int xp_context,
+ char_u *xp_arg);
+int text_locked(void);
+void text_locked_msg(void);
+int curbuf_locked(void);
+int allbuf_locked(void);
+char_u *getexline(int c, void *cookie, int indent);
+char_u *getexmodeline(int promptc, void *cookie, int indent);
+int cmdline_overstrike(void);
+int cmdline_at_end(void);
+colnr_T cmdline_getvcol_cursor(void);
+void free_cmdline_buf(void);
+void putcmdline(int c, int shift);
+void unputcmdline(void);
+int put_on_cmdline(char_u *str, int len, int redraw);
+char_u *save_cmdline_alloc(void);
+void restore_cmdline_alloc(char_u *p);
+void cmdline_paste_str(char_u *s, int literally);
+void redrawcmdline(void);
+void redrawcmd(void);
+void compute_cmdrow(void);
+void gotocmdline(int clr);
+char_u *ExpandOne(expand_T *xp, char_u *str, char_u *orig, int options,
+ int mode);
+void ExpandInit(expand_T *xp);
+void ExpandCleanup(expand_T *xp);
+void ExpandEscape(expand_T *xp, char_u *str, int numfiles, char_u *
+ *files,
+ int options);
+char_u *vim_strsave_fnameescape(char_u *fname, int shell);
+void tilde_replace(char_u *orig_pat, int num_files, char_u **files);
+char_u *sm_gettail(char_u *s);
+char_u *addstar(char_u *fname, int len, int context);
+void set_cmd_context(expand_T *xp, char_u *str, int len, int col);
+int expand_cmdline(expand_T *xp, char_u *str, int col, int *matchcount,
+ char_u ***matches);
+int ExpandGeneric(expand_T *xp, regmatch_T *regmatch, int *num_file,
+ char_u ***file, char_u *((*func)(expand_T *, int)),
+ int escaped);
+char_u *globpath(char_u *path, char_u *file, int expand_options);
+void init_history(void);
+int get_histtype(char_u *name);
+void add_to_history(int histype, char_u *new_entry, int in_map, int sep);
+int get_history_idx(int histype);
+char_u *get_cmdline_str(void);
+int get_cmdline_pos(void);
+int set_cmdline_pos(int pos);
+int get_cmdline_type(void);
+char_u *get_history_entry(int histype, int idx);
+int clr_history(int histype);
+int del_history_entry(int histype, char_u *str);
+int del_history_idx(int histype, int idx);
+void remove_key_from_history(void);
+int get_list_range(char_u **str, int *num1, int *num2);
+void ex_history(exarg_T *eap);
+void prepare_viminfo_history(int asklen, int writing);
+int read_viminfo_history(vir_T *virp, int writing);
+void finish_viminfo_history(void);
+void write_viminfo_history(FILE *fp, int merge);
+void cmd_pchar(int c, int offset);
+int cmd_gchar(int offset);
+char_u *script_get(exarg_T *eap, char_u *cmd);
/* vim: set ft=c : */
#endif /* NEOVIM_EX_GETLN_H */
diff --git a/src/farsi.c b/src/farsi.c
index f3c55216f2..31e62e2510 100644
--- a/src/farsi.c
+++ b/src/farsi.c
@@ -17,26 +17,26 @@
* Included by main.c, when FEAT_FKMAP is defined.
*/
-static int toF_Xor_X_ __ARGS((int c));
-static int F_is_TyE __ARGS((int c));
-static int F_is_TyC_TyD __ARGS((int c));
-static int F_is_TyB_TyC_TyD __ARGS((int src, int offset));
-static int toF_TyB __ARGS((int c));
-static void put_curr_and_l_to_X __ARGS((int c));
-static void put_and_redo __ARGS((int c));
-static void chg_c_toX_orX __ARGS((void));
-static void chg_c_to_X_orX_ __ARGS((void));
-static void chg_c_to_X_or_X __ARGS((void));
-static void chg_l_to_X_orX_ __ARGS((void));
-static void chg_l_toXor_X __ARGS((void));
-static void chg_r_to_Xor_X_ __ARGS((void));
-static int toF_leading __ARGS((int c));
-static int toF_Rjoin __ARGS((int c));
-static int canF_Ljoin __ARGS((int c));
-static int canF_Rjoin __ARGS((int c));
-static int F_isterm __ARGS((int c));
-static int toF_ending __ARGS((int c));
-static void lrswapbuf __ARGS((char_u *buf, int len));
+static int toF_Xor_X_(int c);
+static int F_is_TyE(int c);
+static int F_is_TyC_TyD(int c);
+static int F_is_TyB_TyC_TyD(int src, int offset);
+static int toF_TyB(int c);
+static void put_curr_and_l_to_X(int c);
+static void put_and_redo(int c);
+static void chg_c_toX_orX(void);
+static void chg_c_to_X_orX_(void);
+static void chg_c_to_X_or_X(void);
+static void chg_l_to_X_orX_(void);
+static void chg_l_toXor_X(void);
+static void chg_r_to_Xor_X_(void);
+static int toF_leading(int c);
+static int toF_Rjoin(int c);
+static int canF_Ljoin(int c);
+static int canF_Rjoin(int c);
+static int F_isterm(int c);
+static int toF_ending(int c);
+static void lrswapbuf(char_u *buf, int len);
/*
** Convert the given Farsi character into a _X or _X_ type
diff --git a/src/file_search.c b/src/file_search.c
index c9d3f3c234..c80557f7ec 100644
--- a/src/file_search.c
+++ b/src/file_search.c
@@ -182,20 +182,20 @@ typedef struct ff_search_ctx_T {
} ff_search_ctx_T;
/* locally needed functions */
-static int ff_check_visited __ARGS((ff_visited_T **, char_u *, char_u *));
-static void vim_findfile_free_visited_list __ARGS(
- (ff_visited_list_hdr_T **list_headp));
-static void ff_free_visited_list __ARGS((ff_visited_T *vl));
-static ff_visited_list_hdr_T* ff_get_visited_list __ARGS(
- (char_u *, ff_visited_list_hdr_T **list_headp));
-static int ff_wc_equal __ARGS((char_u *s1, char_u *s2));
-
-static void ff_push __ARGS((ff_search_ctx_T *search_ctx, ff_stack_T *stack_ptr));
-static ff_stack_T *ff_pop __ARGS((ff_search_ctx_T *search_ctx));
-static void ff_clear __ARGS((ff_search_ctx_T *search_ctx));
-static void ff_free_stack_element __ARGS((ff_stack_T *stack_ptr));
-static ff_stack_T *ff_create_stack_element __ARGS((char_u *, char_u *, int, int));
-static int ff_path_in_stoplist __ARGS((char_u *, int, char_u **));
+static int ff_check_visited(ff_visited_T **, char_u *, char_u *);
+static void vim_findfile_free_visited_list
+ (ff_visited_list_hdr_T **list_headp);
+static void ff_free_visited_list(ff_visited_T *vl);
+static ff_visited_list_hdr_T* ff_get_visited_list
+ (char_u *, ff_visited_list_hdr_T **list_headp);
+static int ff_wc_equal(char_u *s1, char_u *s2);
+
+static void ff_push(ff_search_ctx_T *search_ctx, ff_stack_T *stack_ptr);
+static ff_stack_T *ff_pop(ff_search_ctx_T *search_ctx);
+static void ff_clear(ff_search_ctx_T *search_ctx);
+static void ff_free_stack_element(ff_stack_T *stack_ptr);
+static ff_stack_T *ff_create_stack_element(char_u *, char_u *, int, int);
+static int ff_path_in_stoplist(char_u *, int, char_u **);
static char_u e_pathtoolong[] = N_("E854: path too long for completion");
diff --git a/src/file_search.h b/src/file_search.h
index 3ea1d84a1b..32ec4f5a62 100644
--- a/src/file_search.h
+++ b/src/file_search.h
@@ -1,23 +1,23 @@
#ifndef NEOVIM_FIND_FILE_H
#define NEOVIM_FIND_FILE_H
-void *vim_findfile_init __ARGS((char_u *path, char_u *filename, char_u *
+void *vim_findfile_init(char_u *path, char_u *filename, char_u *
stopdirs, int level, int free_visited,
int find_what, void *search_ctx_arg,
int tagfile,
- char_u *rel_fname));
-char_u *vim_findfile_stopdir __ARGS((char_u *buf));
-void vim_findfile_cleanup __ARGS((void *ctx));
-char_u *vim_findfile __ARGS((void *search_ctx_arg));
-void vim_findfile_free_visited __ARGS((void *search_ctx_arg));
-char_u *find_file_in_path __ARGS((char_u *ptr, int len, int options, int first,
- char_u *rel_fname));
-void free_findfile __ARGS((void));
-char_u *find_directory_in_path __ARGS((char_u *ptr, int len, int options,
- char_u *rel_fname));
-char_u *find_file_in_path_option __ARGS((char_u *ptr, int len, int options,
+ char_u *rel_fname);
+char_u *vim_findfile_stopdir(char_u *buf);
+void vim_findfile_cleanup(void *ctx);
+char_u *vim_findfile(void *search_ctx_arg);
+void vim_findfile_free_visited(void *search_ctx_arg);
+char_u *find_file_in_path(char_u *ptr, int len, int options, int first,
+ char_u *rel_fname);
+void free_findfile(void);
+char_u *find_directory_in_path(char_u *ptr, int len, int options,
+ char_u *rel_fname);
+char_u *find_file_in_path_option(char_u *ptr, int len, int options,
int first, char_u *path_option,
int find_what, char_u *rel_fname,
- char_u *suffixes));
+ char_u *suffixes);
#endif /* NEOVIM_FIND_FILE_H */
diff --git a/src/fileio.c b/src/fileio.c
index 3efddfe66d..54631ad34a 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -69,27 +69,27 @@ static int crypt_seed_len[] = {0, 8};
/* Is there any system that doesn't have access()? */
#define USE_MCH_ACCESS
-static char_u *next_fenc __ARGS((char_u **pp));
-static char_u *readfile_charconvert __ARGS((char_u *fname, char_u *fenc,
- int *fdp));
-static void check_marks_read __ARGS((void));
-static int crypt_method_from_magic __ARGS((char *ptr, int len));
-static char_u *check_for_cryptkey __ARGS((char_u *cryptkey, char_u *ptr,
- long *sizep, off_t *filesizep,
- int newfile, char_u *fname,
- int *did_ask));
+static char_u *next_fenc(char_u **pp);
+static char_u *readfile_charconvert(char_u *fname, char_u *fenc,
+ int *fdp);
+static void check_marks_read(void);
+static int crypt_method_from_magic(char *ptr, int len);
+static char_u *check_for_cryptkey(char_u *cryptkey, char_u *ptr,
+ long *sizep, off_t *filesizep,
+ int newfile, char_u *fname,
+ int *did_ask);
#ifdef UNIX
-static void set_file_time __ARGS((char_u *fname, time_t atime, time_t mtime));
+static void set_file_time(char_u *fname, time_t atime, time_t mtime);
#endif
-static int set_rw_fname __ARGS((char_u *fname, char_u *sfname));
-static int msg_add_fileformat __ARGS((int eol_type));
-static void msg_add_eol __ARGS((void));
-static int check_mtime __ARGS((buf_T *buf, struct stat *s));
-static int time_differs __ARGS((long t1, long t2));
-static int apply_autocmds_exarg __ARGS((event_T event, char_u *fname, char_u *
- fname_io, int force, buf_T *buf,
- exarg_T *eap));
-static int au_find_group __ARGS((char_u *name));
+static int set_rw_fname(char_u *fname, char_u *sfname);
+static int msg_add_fileformat(int eol_type);
+static void msg_add_eol(void);
+static int check_mtime(buf_T *buf, struct stat *s);
+static int time_differs(long t1, long t2);
+static int apply_autocmds_exarg(event_T event, char_u *fname, char_u *fname_io,
+ int force, buf_T *buf,
+ exarg_T *eap);
+static int au_find_group(char_u *name);
# define AUGROUP_DEFAULT -1 /* default autocmd group */
# define AUGROUP_ERROR -2 /* erroneous autocmd group */
@@ -138,18 +138,18 @@ struct bw_info {
# endif
};
-static int buf_write_bytes __ARGS((struct bw_info *ip));
+static int buf_write_bytes(struct bw_info *ip);
-static linenr_T readfile_linenr __ARGS((linenr_T linecnt, char_u *p,
- char_u *endp));
-static int ucs2bytes __ARGS((unsigned c, char_u **pp, int flags));
-static int need_conversion __ARGS((char_u *fenc));
-static int get_fio_flags __ARGS((char_u *ptr));
-static char_u *check_for_bom __ARGS((char_u *p, long size, int *lenp, int flags));
-static int make_bom __ARGS((char_u *buf, char_u *name));
-static int move_lines __ARGS((buf_T *frombuf, buf_T *tobuf));
+static linenr_T readfile_linenr(linenr_T linecnt, char_u *p,
+ char_u *endp);
+static int ucs2bytes(unsigned c, char_u **pp, int flags);
+static int need_conversion(char_u *fenc);
+static int get_fio_flags(char_u *ptr);
+static char_u *check_for_bom(char_u *p, long size, int *lenp, int flags);
+static int make_bom(char_u *buf, char_u *name);
+static int move_lines(buf_T *frombuf, buf_T *tobuf);
#ifdef TEMPDIRNAMES
-static void vim_settempdir __ARGS((char_u *tempdir));
+static void vim_settempdir(char_u *tempdir);
#endif
static char *e_auchangedbuf = N_(
"E812: Autocommands changed buffer or buffer name");
@@ -6151,25 +6151,24 @@ static int current_augroup = AUGROUP_DEFAULT;
static int au_need_clean = FALSE; /* need to delete marked patterns */
-static void show_autocmd __ARGS((AutoPat *ap, event_T event));
-static void au_remove_pat __ARGS((AutoPat *ap));
-static void au_remove_cmds __ARGS((AutoPat *ap));
-static void au_cleanup __ARGS((void));
-static int au_new_group __ARGS((char_u *name));
-static void au_del_group __ARGS((char_u *name));
-static event_T event_name2nr __ARGS((char_u *start, char_u **end));
-static char_u *event_nr2name __ARGS((event_T event));
-static char_u *find_end_event __ARGS((char_u *arg, int have_group));
-static int event_ignored __ARGS((event_T event));
-static int au_get_grouparg __ARGS((char_u **argp));
-static int do_autocmd_event __ARGS((event_T event, char_u *pat, int nested,
- char_u *cmd, int forceit,
- int group));
-static int apply_autocmds_group __ARGS((event_T event, char_u *fname, char_u *
- fname_io, int force, int group, buf_T *
- buf,
- exarg_T *eap));
-static void auto_next_pat __ARGS((AutoPatCmd *apc, int stop_at_last));
+static void show_autocmd(AutoPat *ap, event_T event);
+static void au_remove_pat(AutoPat *ap);
+static void au_remove_cmds(AutoPat *ap);
+static void au_cleanup(void);
+static int au_new_group(char_u *name);
+static void au_del_group(char_u *name);
+static event_T event_name2nr(char_u *start, char_u **end);
+static char_u *event_nr2name(event_T event);
+static char_u *find_end_event(char_u *arg, int have_group);
+static int event_ignored(event_T event);
+static int au_get_grouparg(char_u **argp);
+static int do_autocmd_event(event_T event, char_u *pat, int nested,
+ char_u *cmd, int forceit,
+ int group);
+static int apply_autocmds_group(event_T event, char_u *fname, char_u *fname_io,
+ int force, int group, buf_T *buf,
+ exarg_T *eap);
+static void auto_next_pat(AutoPatCmd *apc, int stop_at_last);
static event_T last_event;
diff --git a/src/fileio.h b/src/fileio.h
index add97d37d6..6ac28d9b82 100644
--- a/src/fileio.h
+++ b/src/fileio.h
@@ -1,85 +1,84 @@
#ifndef NEOVIM_FILEIO_H
#define NEOVIM_FILEIO_H
/* fileio.c */
-void filemess __ARGS((buf_T *buf, char_u *name, char_u *s, int attr));
-int readfile __ARGS((char_u *fname, char_u *sfname, linenr_T from,
- linenr_T lines_to_skip, linenr_T lines_to_read, exarg_T *
- eap,
- int flags));
-int prep_exarg __ARGS((exarg_T *eap, buf_T *buf));
-void set_file_options __ARGS((int set_options, exarg_T *eap));
-void set_forced_fenc __ARGS((exarg_T *eap));
-int prepare_crypt_read __ARGS((FILE *fp));
-char_u *prepare_crypt_write __ARGS((buf_T *buf, int *lenp));
-int check_file_readonly __ARGS((char_u *fname, int perm));
-int buf_write __ARGS((buf_T *buf, char_u *fname, char_u *sfname, linenr_T start,
- linenr_T end, exarg_T *eap, int append, int forceit,
- int reset_changed,
- int filtering));
-void msg_add_fname __ARGS((buf_T *buf, char_u *fname));
-void msg_add_lines __ARGS((int insert_space, long lnum, off_t nchars));
-char_u *shorten_fname1 __ARGS((char_u *full_path));
-char_u *shorten_fname __ARGS((char_u *full_path, char_u *dir_name));
-void shorten_fnames __ARGS((int force));
-void shorten_filenames __ARGS((char_u **fnames, int count));
-char_u *modname __ARGS((char_u *fname, char_u *ext, int prepend_dot));
-char_u *buf_modname __ARGS((int shortname, char_u *fname, char_u *ext,
- int prepend_dot));
-int vim_fgets __ARGS((char_u *buf, int size, FILE *fp));
-int tag_fgets __ARGS((char_u *buf, int size, FILE *fp));
-int vim_rename __ARGS((char_u *from, char_u *to));
-int check_timestamps __ARGS((int focus));
-int buf_check_timestamp __ARGS((buf_T *buf, int focus));
-void buf_reload __ARGS((buf_T *buf, int orig_mode));
-void buf_store_time __ARGS((buf_T *buf, struct stat *st, char_u *fname));
-void write_lnum_adjust __ARGS((linenr_T offset));
-void vim_deltempdir __ARGS((void));
-char_u *vim_tempname __ARGS((int extra_char));
-void forward_slash __ARGS((char_u *fname));
-void aubuflocal_remove __ARGS((buf_T *buf));
-int au_has_group __ARGS((char_u *name));
-void do_augroup __ARGS((char_u *arg, int del_group));
-void free_all_autocmds __ARGS((void));
-int check_ei __ARGS((void));
-char_u *au_event_disable __ARGS((char *what));
-void au_event_restore __ARGS((char_u *old_ei));
-void do_autocmd __ARGS((char_u *arg, int forceit));
-int do_doautocmd __ARGS((char_u *arg, int do_msg));
-void ex_doautoall __ARGS((exarg_T *eap));
-int check_nomodeline __ARGS((char_u **argp));
-void aucmd_prepbuf __ARGS((aco_save_T *aco, buf_T *buf));
-void aucmd_restbuf __ARGS((aco_save_T *aco));
-int apply_autocmds __ARGS((event_T event, char_u *fname, char_u *fname_io,
- int force,
- buf_T *buf));
-int apply_autocmds_retval __ARGS((event_T event, char_u *fname, char_u *
- fname_io, int force, buf_T *buf,
- int *retval));
-int has_cursorhold __ARGS((void));
-int trigger_cursorhold __ARGS((void));
-int has_cursormoved __ARGS((void));
-int has_cursormovedI __ARGS((void));
-int has_textchanged __ARGS((void));
-int has_textchangedI __ARGS((void));
-int has_insertcharpre __ARGS((void));
-void block_autocmds __ARGS((void));
-void unblock_autocmds __ARGS((void));
-int is_autocmd_blocked __ARGS((void));
-char_u *getnextac __ARGS((int c, void *cookie, int indent));
-int has_autocmd __ARGS((event_T event, char_u *sfname, buf_T *buf));
-char_u *get_augroup_name __ARGS((expand_T *xp, int idx));
-char_u *set_context_in_autocmd __ARGS((expand_T *xp, char_u *arg, int doautocmd));
-char_u *get_event_name __ARGS((expand_T *xp, int idx));
-int autocmd_supported __ARGS((char_u *name));
-int au_exists __ARGS((char_u *arg));
-int match_file_pat __ARGS((char_u *pattern, regprog_T *prog, char_u *fname,
- char_u *sfname, char_u *tail,
- int allow_dirs));
-int match_file_list __ARGS((char_u *list, char_u *sfname, char_u *ffname));
-char_u *file_pat_to_reg_pat __ARGS((char_u *pat, char_u *pat_end,
- char *allow_dirs,
- int no_bslash));
-long read_eintr __ARGS((int fd, void *buf, size_t bufsize));
-long write_eintr __ARGS((int fd, void *buf, size_t bufsize));
+void filemess(buf_T *buf, char_u *name, char_u *s, int attr);
+int readfile(char_u *fname, char_u *sfname, linenr_T from,
+ linenr_T lines_to_skip, linenr_T lines_to_read, exarg_T *eap,
+ int flags);
+int prep_exarg(exarg_T *eap, buf_T *buf);
+void set_file_options(int set_options, exarg_T *eap);
+void set_forced_fenc(exarg_T *eap);
+int prepare_crypt_read(FILE *fp);
+char_u *prepare_crypt_write(buf_T *buf, int *lenp);
+int check_file_readonly(char_u *fname, int perm);
+int buf_write(buf_T *buf, char_u *fname, char_u *sfname, linenr_T start,
+ linenr_T end, exarg_T *eap, int append, int forceit,
+ int reset_changed,
+ int filtering);
+void msg_add_fname(buf_T *buf, char_u *fname);
+void msg_add_lines(int insert_space, long lnum, off_t nchars);
+char_u *shorten_fname1(char_u *full_path);
+char_u *shorten_fname(char_u *full_path, char_u *dir_name);
+void shorten_fnames(int force);
+void shorten_filenames(char_u **fnames, int count);
+char_u *modname(char_u *fname, char_u *ext, int prepend_dot);
+char_u *buf_modname(int shortname, char_u *fname, char_u *ext,
+ int prepend_dot);
+int vim_fgets(char_u *buf, int size, FILE *fp);
+int tag_fgets(char_u *buf, int size, FILE *fp);
+int vim_rename(char_u *from, char_u *to);
+int check_timestamps(int focus);
+int buf_check_timestamp(buf_T *buf, int focus);
+void buf_reload(buf_T *buf, int orig_mode);
+void buf_store_time(buf_T *buf, struct stat *st, char_u *fname);
+void write_lnum_adjust(linenr_T offset);
+void vim_deltempdir(void);
+char_u *vim_tempname(int extra_char);
+void forward_slash(char_u *fname);
+void aubuflocal_remove(buf_T *buf);
+int au_has_group(char_u *name);
+void do_augroup(char_u *arg, int del_group);
+void free_all_autocmds(void);
+int check_ei(void);
+char_u *au_event_disable(char *what);
+void au_event_restore(char_u *old_ei);
+void do_autocmd(char_u *arg, int forceit);
+int do_doautocmd(char_u *arg, int do_msg);
+void ex_doautoall(exarg_T *eap);
+int check_nomodeline(char_u **argp);
+void aucmd_prepbuf(aco_save_T *aco, buf_T *buf);
+void aucmd_restbuf(aco_save_T *aco);
+int apply_autocmds(event_T event, char_u *fname, char_u *fname_io,
+ int force,
+ buf_T *buf);
+int apply_autocmds_retval(event_T event, char_u *fname, char_u *fname_io,
+ int force, buf_T *buf,
+ int *retval);
+int has_cursorhold(void);
+int trigger_cursorhold(void);
+int has_cursormoved(void);
+int has_cursormovedI(void);
+int has_textchanged(void);
+int has_textchangedI(void);
+int has_insertcharpre(void);
+void block_autocmds(void);
+void unblock_autocmds(void);
+int is_autocmd_blocked(void);
+char_u *getnextac(int c, void *cookie, int indent);
+int has_autocmd(event_T event, char_u *sfname, buf_T *buf);
+char_u *get_augroup_name(expand_T *xp, int idx);
+char_u *set_context_in_autocmd(expand_T *xp, char_u *arg, int doautocmd);
+char_u *get_event_name(expand_T *xp, int idx);
+int autocmd_supported(char_u *name);
+int au_exists(char_u *arg);
+int match_file_pat(char_u *pattern, regprog_T *prog, char_u *fname,
+ char_u *sfname, char_u *tail,
+ int allow_dirs);
+int match_file_list(char_u *list, char_u *sfname, char_u *ffname);
+char_u *file_pat_to_reg_pat(char_u *pat, char_u *pat_end,
+ char *allow_dirs,
+ int no_bslash);
+long read_eintr(int fd, void *buf, size_t bufsize);
+long write_eintr(int fd, void *buf, size_t bufsize);
/* vim: set ft=c : */
#endif /* NEOVIM_FILEIO_H */
diff --git a/src/fold.c b/src/fold.c
index f4aa436a3a..38648d54c0 100644
--- a/src/fold.c
+++ b/src/fold.c
@@ -56,35 +56,35 @@ typedef struct {
#define MAX_LEVEL 20 /* maximum fold depth */
/* static functions {{{2 */
-static void newFoldLevelWin __ARGS((win_T *wp));
-static int checkCloseRec __ARGS((garray_T *gap, linenr_T lnum, int level));
-static int foldFind __ARGS((garray_T *gap, linenr_T lnum, fold_T **fpp));
-static int foldLevelWin __ARGS((win_T *wp, linenr_T lnum));
-static void checkupdate __ARGS((win_T *wp));
-static void setFoldRepeat __ARGS((linenr_T lnum, long count, int do_open));
-static linenr_T setManualFold __ARGS((linenr_T lnum, int opening, int recurse,
- int *donep));
-static linenr_T setManualFoldWin __ARGS((win_T *wp, linenr_T lnum, int opening,
- int recurse,
- int *donep));
-static void foldOpenNested __ARGS((fold_T *fpr));
-static void deleteFoldEntry __ARGS((garray_T *gap, int idx, int recursive));
-static void foldMarkAdjustRecurse __ARGS((garray_T *gap, linenr_T line1,
- linenr_T line2, long amount,
- long amount_after));
-static int getDeepestNestingRecurse __ARGS((garray_T *gap));
-static int check_closed __ARGS((win_T *win, fold_T *fp, int *use_levelp,
- int level, int *maybe_smallp,
- linenr_T lnum_off));
-static void checkSmall __ARGS((win_T *wp, fold_T *fp, linenr_T lnum_off));
-static void setSmallMaybe __ARGS((garray_T *gap));
-static void foldCreateMarkers __ARGS((linenr_T start, linenr_T end));
-static void foldAddMarker __ARGS((linenr_T lnum, char_u *marker, int markerlen));
-static void deleteFoldMarkers __ARGS((fold_T *fp, int recursive,
- linenr_T lnum_off));
-static void foldDelMarker __ARGS((linenr_T lnum, char_u *marker, int markerlen));
-static void foldUpdateIEMS __ARGS((win_T *wp, linenr_T top, linenr_T bot));
-static void parseMarker __ARGS((win_T *wp));
+static void newFoldLevelWin(win_T *wp);
+static int checkCloseRec(garray_T *gap, linenr_T lnum, int level);
+static int foldFind(garray_T *gap, linenr_T lnum, fold_T **fpp);
+static int foldLevelWin(win_T *wp, linenr_T lnum);
+static void checkupdate(win_T *wp);
+static void setFoldRepeat(linenr_T lnum, long count, int do_open);
+static linenr_T setManualFold(linenr_T lnum, int opening, int recurse,
+ int *donep);
+static linenr_T setManualFoldWin(win_T *wp, linenr_T lnum, int opening,
+ int recurse,
+ int *donep);
+static void foldOpenNested(fold_T *fpr);
+static void deleteFoldEntry(garray_T *gap, int idx, int recursive);
+static void foldMarkAdjustRecurse(garray_T *gap, linenr_T line1,
+ linenr_T line2, long amount,
+ long amount_after);
+static int getDeepestNestingRecurse(garray_T *gap);
+static int check_closed(win_T *win, fold_T *fp, int *use_levelp,
+ int level, int *maybe_smallp,
+ linenr_T lnum_off);
+static void checkSmall(win_T *wp, fold_T *fp, linenr_T lnum_off);
+static void setSmallMaybe(garray_T *gap);
+static void foldCreateMarkers(linenr_T start, linenr_T end);
+static void foldAddMarker(linenr_T lnum, char_u *marker, int markerlen);
+static void deleteFoldMarkers(fold_T *fp, int recursive,
+ linenr_T lnum_off);
+static void foldDelMarker(linenr_T lnum, char_u *marker, int markerlen);
+static void foldUpdateIEMS(win_T *wp, linenr_T top, linenr_T bot);
+static void parseMarker(win_T *wp);
static char *e_nofold = N_("E490: No fold found");
@@ -1876,20 +1876,19 @@ typedef struct {
static int fold_changed;
/* Function declarations. {{{2 */
-static linenr_T foldUpdateIEMSRecurse __ARGS((garray_T *gap, int level,
- linenr_T startlnum, fline_T *flp,
- void (*getlevel)__ARGS(
- (fline_T *)), linenr_T bot,
- int topflags));
-static int foldInsert __ARGS((garray_T *gap, int i));
-static void foldSplit __ARGS((garray_T *gap, int i, linenr_T top, linenr_T bot));
-static void foldRemove __ARGS((garray_T *gap, linenr_T top, linenr_T bot));
-static void foldMerge __ARGS((fold_T *fp1, garray_T *gap, fold_T *fp2));
-static void foldlevelIndent __ARGS((fline_T *flp));
-static void foldlevelDiff __ARGS((fline_T *flp));
-static void foldlevelExpr __ARGS((fline_T *flp));
-static void foldlevelMarker __ARGS((fline_T *flp));
-static void foldlevelSyntax __ARGS((fline_T *flp));
+static linenr_T foldUpdateIEMSRecurse(garray_T *gap, int level,
+ linenr_T startlnum, fline_T *flp,
+ void (*getlevel)(fline_T *), linenr_T bot,
+ int topflags);
+static int foldInsert(garray_T *gap, int i);
+static void foldSplit(garray_T *gap, int i, linenr_T top, linenr_T bot);
+static void foldRemove(garray_T *gap, linenr_T top, linenr_T bot);
+static void foldMerge(fold_T *fp1, garray_T *gap, fold_T *fp2);
+static void foldlevelIndent(fline_T *flp);
+static void foldlevelDiff(fline_T *flp);
+static void foldlevelExpr(fline_T *flp);
+static void foldlevelMarker(fline_T *flp);
+static void foldlevelSyntax(fline_T *flp);
/* foldUpdateIEMS() {{{2 */
/*
@@ -1901,7 +1900,7 @@ static void foldUpdateIEMS(win_T *wp, linenr_T top, linenr_T bot)
linenr_T start;
linenr_T end;
fline_T fline;
- void (*getlevel)__ARGS((fline_T *));
+ void (*getlevel)(fline_T *);
int level;
fold_T *fp;
@@ -2132,7 +2131,7 @@ garray_T *gap;
int level;
linenr_T startlnum;
fline_T *flp;
-void (*getlevel)__ARGS((fline_T *));
+void (*getlevel)(fline_T *);
linenr_T bot;
int topflags; /* flags used by containing fold */
{
@@ -2910,10 +2909,10 @@ static void foldlevelSyntax(fline_T *flp)
/* functions for storing the fold state in a View {{{1 */
/* put_folds() {{{2 */
-static int put_folds_recurse __ARGS((FILE *fd, garray_T *gap, linenr_T off));
-static int put_foldopen_recurse __ARGS((FILE *fd, win_T *wp, garray_T *gap,
- linenr_T off));
-static int put_fold_open_close __ARGS((FILE *fd, fold_T *fp, linenr_T off));
+static int put_folds_recurse(FILE *fd, garray_T *gap, linenr_T off);
+static int put_foldopen_recurse(FILE *fd, win_T *wp, garray_T *gap,
+ linenr_T off);
+static int put_fold_open_close(FILE *fd, fold_T *fp, linenr_T off);
/*
* Write commands to "fd" to restore the manual folds in window "wp".
diff --git a/src/fold.h b/src/fold.h
index 3ad08b01e5..70416ed8aa 100644
--- a/src/fold.h
+++ b/src/fold.h
@@ -1,53 +1,53 @@
#ifndef NEOVIM_FOLD_H
#define NEOVIM_FOLD_H
/* fold.c */
-void copyFoldingState __ARGS((win_T *wp_from, win_T *wp_to));
-int hasAnyFolding __ARGS((win_T *win));
-int hasFolding __ARGS((linenr_T lnum, linenr_T *firstp, linenr_T *lastp));
-int hasFoldingWin __ARGS((win_T *win, linenr_T lnum, linenr_T *firstp,
- linenr_T *lastp, int cache,
- foldinfo_T *infop));
-int foldLevel __ARGS((linenr_T lnum));
-int lineFolded __ARGS((win_T *win, linenr_T lnum));
-long foldedCount __ARGS((win_T *win, linenr_T lnum, foldinfo_T *infop));
-int foldmethodIsManual __ARGS((win_T *wp));
-int foldmethodIsIndent __ARGS((win_T *wp));
-int foldmethodIsExpr __ARGS((win_T *wp));
-int foldmethodIsMarker __ARGS((win_T *wp));
-int foldmethodIsSyntax __ARGS((win_T *wp));
-int foldmethodIsDiff __ARGS((win_T *wp));
-void closeFold __ARGS((linenr_T lnum, long count));
-void closeFoldRecurse __ARGS((linenr_T lnum));
-void opFoldRange __ARGS((linenr_T first, linenr_T last, int opening,
- int recurse,
- int had_visual));
-void openFold __ARGS((linenr_T lnum, long count));
-void openFoldRecurse __ARGS((linenr_T lnum));
-void foldOpenCursor __ARGS((void));
-void newFoldLevel __ARGS((void));
-void foldCheckClose __ARGS((void));
-int foldManualAllowed __ARGS((int create));
-void foldCreate __ARGS((linenr_T start, linenr_T end));
-void deleteFold __ARGS((linenr_T start, linenr_T end, int recursive,
- int had_visual));
-void clearFolding __ARGS((win_T *win));
-void foldUpdate __ARGS((win_T *wp, linenr_T top, linenr_T bot));
-void foldUpdateAll __ARGS((win_T *win));
-int foldMoveTo __ARGS((int updown, int dir, long count));
-void foldInitWin __ARGS((win_T *new_win));
-int find_wl_entry __ARGS((win_T *win, linenr_T lnum));
-void foldAdjustVisual __ARGS((void));
-void foldAdjustCursor __ARGS((void));
-void cloneFoldGrowArray __ARGS((garray_T *from, garray_T *to));
-void deleteFoldRecurse __ARGS((garray_T *gap));
-void foldMarkAdjust __ARGS((win_T *wp, linenr_T line1, linenr_T line2,
- long amount,
- long amount_after));
-int getDeepestNesting __ARGS((void));
-char_u *get_foldtext __ARGS((win_T *wp, linenr_T lnum, linenr_T lnume,
- foldinfo_T *foldinfo,
- char_u *buf));
-void foldtext_cleanup __ARGS((char_u *str));
-int put_folds __ARGS((FILE *fd, win_T *wp));
+void copyFoldingState(win_T *wp_from, win_T *wp_to);
+int hasAnyFolding(win_T *win);
+int hasFolding(linenr_T lnum, linenr_T *firstp, linenr_T *lastp);
+int hasFoldingWin(win_T *win, linenr_T lnum, linenr_T *firstp,
+ linenr_T *lastp, int cache,
+ foldinfo_T *infop);
+int foldLevel(linenr_T lnum);
+int lineFolded(win_T *win, linenr_T lnum);
+long foldedCount(win_T *win, linenr_T lnum, foldinfo_T *infop);
+int foldmethodIsManual(win_T *wp);
+int foldmethodIsIndent(win_T *wp);
+int foldmethodIsExpr(win_T *wp);
+int foldmethodIsMarker(win_T *wp);
+int foldmethodIsSyntax(win_T *wp);
+int foldmethodIsDiff(win_T *wp);
+void closeFold(linenr_T lnum, long count);
+void closeFoldRecurse(linenr_T lnum);
+void opFoldRange(linenr_T first, linenr_T last, int opening,
+ int recurse,
+ int had_visual);
+void openFold(linenr_T lnum, long count);
+void openFoldRecurse(linenr_T lnum);
+void foldOpenCursor(void);
+void newFoldLevel(void);
+void foldCheckClose(void);
+int foldManualAllowed(int create);
+void foldCreate(linenr_T start, linenr_T end);
+void deleteFold(linenr_T start, linenr_T end, int recursive,
+ int had_visual);
+void clearFolding(win_T *win);
+void foldUpdate(win_T *wp, linenr_T top, linenr_T bot);
+void foldUpdateAll(win_T *win);
+int foldMoveTo(int updown, int dir, long count);
+void foldInitWin(win_T *new_win);
+int find_wl_entry(win_T *win, linenr_T lnum);
+void foldAdjustVisual(void);
+void foldAdjustCursor(void);
+void cloneFoldGrowArray(garray_T *from, garray_T *to);
+void deleteFoldRecurse(garray_T *gap);
+void foldMarkAdjust(win_T *wp, linenr_T line1, linenr_T line2,
+ long amount,
+ long amount_after);
+int getDeepestNesting(void);
+char_u *get_foldtext(win_T *wp, linenr_T lnum, linenr_T lnume,
+ foldinfo_T *foldinfo,
+ char_u *buf);
+void foldtext_cleanup(char_u *str);
+int put_folds(FILE *fd, win_T *wp);
/* vim: set ft=c : */
#endif /* NEOVIM_FOLD_H */
diff --git a/src/garray.h b/src/garray.h
index 256d5f2cb8..ff57ec957d 100644
--- a/src/garray.h
+++ b/src/garray.h
@@ -1,14 +1,14 @@
#ifndef NEOVIM_GARRAY_H
#define NEOVIM_GARRAY_H
-void ga_clear __ARGS((garray_T *gap));
-void ga_clear_strings __ARGS((garray_T *gap));
-void ga_init __ARGS((garray_T *gap));
-void ga_init2 __ARGS((garray_T *gap, int itemsize, int growsize));
-int ga_grow __ARGS((garray_T *gap, int n));
-char_u *ga_concat_strings __ARGS((garray_T *gap));
-void ga_concat __ARGS((garray_T *gap, char_u *s));
-void ga_append __ARGS((garray_T *gap, int c));
-void append_ga_line __ARGS((garray_T *gap));
+void ga_clear(garray_T *gap);
+void ga_clear_strings(garray_T *gap);
+void ga_init(garray_T *gap);
+void ga_init2(garray_T *gap, int itemsize, int growsize);
+int ga_grow(garray_T *gap, int n);
+char_u *ga_concat_strings(garray_T *gap);
+void ga_concat(garray_T *gap, char_u *s);
+void ga_append(garray_T *gap, int c);
+void append_ga_line(garray_T *gap);
#endif /* NEOVIM_GARRAY_H */
diff --git a/src/getchar.c b/src/getchar.c
index be1966c007..3a75b0f336 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -135,23 +135,23 @@ static char_u noremapbuf_init[TYPELEN_INIT]; /* initial typebuf.tb_noremap */
static int last_recorded_len = 0; /* number of last recorded chars */
-static char_u *get_buffcont __ARGS((struct buffheader *, int));
-static void add_buff __ARGS((struct buffheader *, char_u *, long n));
-static void add_num_buff __ARGS((struct buffheader *, long));
-static void add_char_buff __ARGS((struct buffheader *, int));
-static int read_stuff __ARGS((int advance));
-static void start_stuff __ARGS((void));
-static int read_redo __ARGS((int, int));
-static void copy_redo __ARGS((int));
-static void init_typebuf __ARGS((void));
-static void gotchars __ARGS((char_u *, int));
-static void may_sync_undo __ARGS((void));
-static void closescript __ARGS((void));
-static int vgetorpeek __ARGS((int));
-static void map_free __ARGS((mapblock_T **));
-static void validate_maphash __ARGS((void));
-static void showmap __ARGS((mapblock_T *mp, int local));
-static char_u *eval_map_expr __ARGS((char_u *str, int c));
+static char_u *get_buffcont(struct buffheader *, int);
+static void add_buff(struct buffheader *, char_u *, long n);
+static void add_num_buff(struct buffheader *, long);
+static void add_char_buff(struct buffheader *, int);
+static int read_stuff(int advance);
+static void start_stuff(void);
+static int read_redo(int, int);
+static void copy_redo(int);
+static void init_typebuf(void);
+static void gotchars(char_u *, int);
+static void may_sync_undo(void);
+static void closescript(void);
+static int vgetorpeek(int);
+static void map_free(mapblock_T **);
+static void validate_maphash(void);
+static void showmap(mapblock_T *mp, int local);
+static char_u *eval_map_expr(char_u *str, int c);
/*
* Free and clear a buffer.
diff --git a/src/getchar.h b/src/getchar.h
index 131286ee50..7261b59571 100644
--- a/src/getchar.h
+++ b/src/getchar.h
@@ -1,77 +1,77 @@
#ifndef NEOVIM_GETCHAR_H
#define NEOVIM_GETCHAR_H
/* getchar.c */
-void free_buff __ARGS((struct buffheader *buf));
-char_u *get_recorded __ARGS((void));
-char_u *get_inserted __ARGS((void));
-int stuff_empty __ARGS((void));
-void typeahead_noflush __ARGS((int c));
-void flush_buffers __ARGS((int flush_typeahead));
-void ResetRedobuff __ARGS((void));
-void CancelRedo __ARGS((void));
-void saveRedobuff __ARGS((void));
-void restoreRedobuff __ARGS((void));
-void AppendToRedobuff __ARGS((char_u *s));
-void AppendToRedobuffLit __ARGS((char_u *str, int len));
-void AppendCharToRedobuff __ARGS((int c));
-void AppendNumberToRedobuff __ARGS((long n));
-void stuffReadbuff __ARGS((char_u *s));
-void stuffReadbuffLen __ARGS((char_u *s, long len));
-void stuffReadbuffSpec __ARGS((char_u *s));
-void stuffcharReadbuff __ARGS((int c));
-void stuffnumReadbuff __ARGS((long n));
-int start_redo __ARGS((long count, int old_redo));
-int start_redo_ins __ARGS((void));
-void stop_redo_ins __ARGS((void));
-int ins_typebuf __ARGS((char_u *str, int noremap, int offset, int nottyped,
- int silent));
-void ins_char_typebuf __ARGS((int c));
-int typebuf_changed __ARGS((int tb_change_cnt));
-int typebuf_typed __ARGS((void));
-int typebuf_maplen __ARGS((void));
-void del_typebuf __ARGS((int len, int offset));
-int alloc_typebuf __ARGS((void));
-void free_typebuf __ARGS((void));
-int save_typebuf __ARGS((void));
-void save_typeahead __ARGS((tasave_T *tp));
-void restore_typeahead __ARGS((tasave_T *tp));
-void openscript __ARGS((char_u *name, int directly));
-void close_all_scripts __ARGS((void));
-int using_script __ARGS((void));
-void before_blocking __ARGS((void));
-void updatescript __ARGS((int c));
-int vgetc __ARGS((void));
-int safe_vgetc __ARGS((void));
-int plain_vgetc __ARGS((void));
-int vpeekc __ARGS((void));
-int vpeekc_nomap __ARGS((void));
-int vpeekc_any __ARGS((void));
-int char_avail __ARGS((void));
-void vungetc __ARGS((int c));
-int inchar __ARGS((char_u *buf, int maxlen, long wait_time, int tb_change_cnt));
-int fix_input_buffer __ARGS((char_u *buf, int len, int script));
-int input_available __ARGS((void));
-int do_map __ARGS((int maptype, char_u *arg, int mode, int abbrev));
-int get_map_mode __ARGS((char_u **cmdp, int forceit));
-void map_clear __ARGS((char_u *cmdp, char_u *arg, int forceit, int abbr));
-void map_clear_int __ARGS((buf_T *buf, int mode, int local, int abbr));
-char_u *map_mode_to_chars __ARGS((int mode));
-int map_to_exists __ARGS((char_u *str, char_u *modechars, int abbr));
-int map_to_exists_mode __ARGS((char_u *rhs, int mode, int abbr));
-char_u *set_context_in_map_cmd __ARGS((expand_T *xp, char_u *cmd, char_u *arg,
- int forceit, int isabbrev, int isunmap,
- cmdidx_T cmdidx));
-int ExpandMappings __ARGS((regmatch_T *regmatch, int *num_file, char_u ***file));
-int check_abbr __ARGS((int c, char_u *ptr, int col, int mincol));
-char_u *vim_strsave_escape_csi __ARGS((char_u *p));
-void vim_unescape_csi __ARGS((char_u *p));
-int makemap __ARGS((FILE *fd, buf_T *buf));
-int put_escstr __ARGS((FILE *fd, char_u *strstart, int what));
-void check_map_keycodes __ARGS((void));
-char_u *check_map __ARGS((char_u *keys, int mode, int exact, int ign_mod,
- int abbr, mapblock_T **mp_ptr,
- int *local_ptr));
-void init_mappings __ARGS((void));
-void add_map __ARGS((char_u *map, int mode));
+void free_buff(struct buffheader *buf);
+char_u *get_recorded(void);
+char_u *get_inserted(void);
+int stuff_empty(void);
+void typeahead_noflush(int c);
+void flush_buffers(int flush_typeahead);
+void ResetRedobuff(void);
+void CancelRedo(void);
+void saveRedobuff(void);
+void restoreRedobuff(void);
+void AppendToRedobuff(char_u *s);
+void AppendToRedobuffLit(char_u *str, int len);
+void AppendCharToRedobuff(int c);
+void AppendNumberToRedobuff(long n);
+void stuffReadbuff(char_u *s);
+void stuffReadbuffLen(char_u *s, long len);
+void stuffReadbuffSpec(char_u *s);
+void stuffcharReadbuff(int c);
+void stuffnumReadbuff(long n);
+int start_redo(long count, int old_redo);
+int start_redo_ins(void);
+void stop_redo_ins(void);
+int ins_typebuf(char_u *str, int noremap, int offset, int nottyped,
+ int silent);
+void ins_char_typebuf(int c);
+int typebuf_changed(int tb_change_cnt);
+int typebuf_typed(void);
+int typebuf_maplen(void);
+void del_typebuf(int len, int offset);
+int alloc_typebuf(void);
+void free_typebuf(void);
+int save_typebuf(void);
+void save_typeahead(tasave_T *tp);
+void restore_typeahead(tasave_T *tp);
+void openscript(char_u *name, int directly);
+void close_all_scripts(void);
+int using_script(void);
+void before_blocking(void);
+void updatescript(int c);
+int vgetc(void);
+int safe_vgetc(void);
+int plain_vgetc(void);
+int vpeekc(void);
+int vpeekc_nomap(void);
+int vpeekc_any(void);
+int char_avail(void);
+void vungetc(int c);
+int inchar(char_u *buf, int maxlen, long wait_time, int tb_change_cnt);
+int fix_input_buffer(char_u *buf, int len, int script);
+int input_available(void);
+int do_map(int maptype, char_u *arg, int mode, int abbrev);
+int get_map_mode(char_u **cmdp, int forceit);
+void map_clear(char_u *cmdp, char_u *arg, int forceit, int abbr);
+void map_clear_int(buf_T *buf, int mode, int local, int abbr);
+char_u *map_mode_to_chars(int mode);
+int map_to_exists(char_u *str, char_u *modechars, int abbr);
+int map_to_exists_mode(char_u *rhs, int mode, int abbr);
+char_u *set_context_in_map_cmd(expand_T *xp, char_u *cmd, char_u *arg,
+ int forceit, int isabbrev, int isunmap,
+ cmdidx_T cmdidx);
+int ExpandMappings(regmatch_T *regmatch, int *num_file, char_u ***file);
+int check_abbr(int c, char_u *ptr, int col, int mincol);
+char_u *vim_strsave_escape_csi(char_u *p);
+void vim_unescape_csi(char_u *p);
+int makemap(FILE *fd, buf_T *buf);
+int put_escstr(FILE *fd, char_u *strstart, int what);
+void check_map_keycodes(void);
+char_u *check_map(char_u *keys, int mode, int exact, int ign_mod,
+ int abbr, mapblock_T **mp_ptr,
+ int *local_ptr);
+void init_mappings(void);
+void add_map(char_u *map, int mode);
/* vim: set ft=c : */
#endif /* NEOVIM_GETCHAR_H */
diff --git a/src/globals.h b/src/globals.h
index 056c098368..75011f7c53 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -645,28 +645,26 @@ EXTERN vimconv_T output_conv; /* type of output conversion */
* The value is set in mb_init();
*/
/* length of char in bytes, including following composing chars */
-EXTERN int (*mb_ptr2len)__ARGS((char_u *p)) INIT(= latin_ptr2len);
+EXTERN int (*mb_ptr2len)(char_u *p) INIT(= latin_ptr2len);
/* idem, with limit on string length */
-EXTERN int (*mb_ptr2len_len)__ARGS((char_u *p, int size)) INIT(
- = latin_ptr2len_len);
+EXTERN int (*mb_ptr2len_len)(char_u *p, int size) INIT(= latin_ptr2len_len);
/* byte length of char */
-EXTERN int (*mb_char2len)__ARGS((int c)) INIT(= latin_char2len);
+EXTERN int (*mb_char2len)(int c) INIT(= latin_char2len);
/* convert char to bytes, return the length */
-EXTERN int (*mb_char2bytes)__ARGS((int c, char_u *buf)) INIT(= latin_char2bytes);
-EXTERN int (*mb_ptr2cells)__ARGS((char_u *p)) INIT(= latin_ptr2cells);
-EXTERN int (*mb_ptr2cells_len)__ARGS((char_u *p, int size)) INIT(
+EXTERN int (*mb_char2bytes)(int c, char_u *buf) INIT(= latin_char2bytes);
+EXTERN int (*mb_ptr2cells)(char_u *p) INIT(= latin_ptr2cells);
+EXTERN int (*mb_ptr2cells_len)(char_u *p, int size) INIT(
= latin_ptr2cells_len);
-EXTERN int (*mb_char2cells)__ARGS((int c)) INIT(= latin_char2cells);
-EXTERN int (*mb_off2cells)__ARGS((unsigned off, unsigned max_off)) INIT(
+EXTERN int (*mb_char2cells)(int c) INIT(= latin_char2cells);
+EXTERN int (*mb_off2cells)(unsigned off, unsigned max_off) INIT(
= latin_off2cells);
-EXTERN int (*mb_ptr2char)__ARGS((char_u *p)) INIT(= latin_ptr2char);
-EXTERN int (*mb_head_off)__ARGS((char_u *base, char_u *p)) INIT(
- = latin_head_off);
+EXTERN int (*mb_ptr2char)(char_u *p) INIT(= latin_ptr2char);
+EXTERN int (*mb_head_off)(char_u *base, char_u *p) INIT(= latin_head_off);
# if defined(USE_ICONV) && defined(DYNAMIC_ICONV)
/* Pointers to functions and variables to be loaded at runtime */
EXTERN size_t (*iconv)(iconv_t cd, const char **inbuf, size_t *inbytesleft,
- char **outbuf, size_t *outbytesleft);
+ char **outbuf, size_t *outbytesleft);
EXTERN iconv_t (*iconv_open)(const char *tocode, const char *fromcode);
EXTERN int (*iconv_close)(iconv_t cd);
EXTERN int (*iconvctl)(iconv_t cd, int request, void *argument);
diff --git a/src/hangulin.c b/src/hangulin.c
index f7619ef0b3..4f84312cad 100644
--- a/src/hangulin.c
+++ b/src/hangulin.c
@@ -41,11 +41,10 @@ static char_u stack[20] = {0};
static int last_l = -1, last_ll = -1;
static int hangul_keyboard_type = HANGUL_DEFAULT_KEYBOARD;
-static void convert_ks_to_3 __ARGS((const char_u *src, int *fp, int *mp,
- int *lp));
-static int convert_3_to_ks __ARGS((int fv, int mv, int lv, char_u *des));
-static int hangul_automata2 __ARGS((char_u *buf, unsigned int *c));
-static int hangul_automata3 __ARGS((char_u *buf, unsigned int *c));
+static void convert_ks_to_3(const char_u *src, int *fp, int *mp, int *lp);
+static int convert_3_to_ks(int fv, int mv, int lv, char_u *des);
+static int hangul_automata2(char_u *buf, unsigned int *c);
+static int hangul_automata3(char_u *buf, unsigned int *c);
#define push(x) {stack[ sp++ ] = *(x); stack[sp++] = *((x)+1); }
#define pop(x) {*((x) + 1) = stack[--sp]; *(x) = stack[--sp]; }
diff --git a/src/hangulin.h b/src/hangulin.h
index 1023955c0d..a6d24474c3 100644
--- a/src/hangulin.h
+++ b/src/hangulin.h
@@ -1,12 +1,12 @@
#ifndef NEOVIM_HANGULIN_H
#define NEOVIM_HANGULIN_H
/* hangulin.c */
-int hangul_input_state_get __ARGS((void));
-void hangul_input_state_set __ARGS((int state));
-int im_get_status __ARGS((void));
-void hangul_input_state_toggle __ARGS((void));
-void hangul_keyboard_set __ARGS((void));
-int hangul_input_process __ARGS((char_u *s, int len));
-void hangul_input_clear __ARGS((void));
+int hangul_input_state_get(void);
+void hangul_input_state_set(int state);
+int im_get_status(void);
+void hangul_input_state_toggle(void);
+void hangul_keyboard_set(void);
+int hangul_input_process(char_u *s, int len);
+void hangul_input_clear(void);
/* vim: set ft=c : */
#endif /* NEOVIM_HANGULIN_H */
diff --git a/src/hardcopy.c b/src/hardcopy.c
index cfcf86cf62..34435c4791 100644
--- a/src/hardcopy.c
+++ b/src/hardcopy.c
@@ -147,23 +147,23 @@ typedef struct {
int ff; /* seen form feed character */
} prt_pos_T;
-static char_u *parse_list_options __ARGS((char_u *option_str, option_table_T *
- table,
- int table_size));
-
-static long_u darken_rgb __ARGS((long_u rgb));
-static long_u prt_get_term_color __ARGS((int colorindex));
-static void prt_set_fg __ARGS((long_u fg));
-static void prt_set_bg __ARGS((long_u bg));
-static void prt_set_font __ARGS((int bold, int italic, int underline));
-static void prt_line_number __ARGS((prt_settings_T *psettings, int page_line,
- linenr_T lnum));
-static void prt_header __ARGS((prt_settings_T *psettings, int pagenum,
- linenr_T lnum));
-static void prt_message __ARGS((char_u *s));
-static colnr_T hardcopy_line __ARGS((prt_settings_T *psettings, int page_line,
- prt_pos_T *ppos));
-static void prt_get_attr __ARGS((int hl_id, prt_text_attr_T* pattr, int modec));
+static char_u *parse_list_options(char_u *option_str,
+ option_table_T *table,
+ int table_size);
+
+static long_u darken_rgb(long_u rgb);
+static long_u prt_get_term_color(int colorindex);
+static void prt_set_fg(long_u fg);
+static void prt_set_bg(long_u bg);
+static void prt_set_font(int bold, int italic, int underline);
+static void prt_line_number(prt_settings_T *psettings, int page_line,
+ linenr_T lnum);
+static void prt_header(prt_settings_T *psettings, int pagenum,
+ linenr_T lnum);
+static void prt_message(char_u *s);
+static colnr_T hardcopy_line(prt_settings_T *psettings, int page_line,
+ prt_pos_T *ppos);
+static void prt_get_attr(int hl_id, prt_text_attr_T* pattr, int modec);
/*
* Parse 'printoptions' and set the flags in "printer_opts".
@@ -1199,61 +1199,60 @@ static struct prt_dsc_comment_S prt_dsc_table[] =
PRT_DSC_ENDCOMMENTS_TYPE}
};
-static void prt_write_file_raw_len __ARGS((char_u *buffer, int bytes));
-static void prt_write_file __ARGS((char_u *buffer));
-static void prt_write_file_len __ARGS((char_u *buffer, int bytes));
-static void prt_write_string __ARGS((char *s));
-static void prt_write_int __ARGS((int i));
-static void prt_write_boolean __ARGS((int b));
-static void prt_def_font __ARGS((char *new_name, char *encoding, int height,
- char *font));
-static void prt_real_bits __ARGS((double real, int precision, int *pinteger,
- int *pfraction));
-static void prt_write_real __ARGS((double val, int prec));
-static void prt_def_var __ARGS((char *name, double value, int prec));
-static void prt_flush_buffer __ARGS((void));
-static void prt_resource_name __ARGS((char_u *filename, void *cookie));
-static int prt_find_resource __ARGS((char *name,
- struct prt_ps_resource_S *resource));
-static int prt_open_resource __ARGS((struct prt_ps_resource_S *resource));
-static int prt_check_resource __ARGS((struct prt_ps_resource_S *resource,
- char_u *version));
-static void prt_dsc_start __ARGS((void));
-static void prt_dsc_noarg __ARGS((char *comment));
-static void prt_dsc_textline __ARGS((char *comment, char *text));
-static void prt_dsc_text __ARGS((char *comment, char *text));
-static void prt_dsc_ints __ARGS((char *comment, int count, int *ints));
-static void prt_dsc_requirements __ARGS((int duplex, int tumble, int collate,
- int color,
- int num_copies));
-static void prt_dsc_docmedia __ARGS((char *paper_name, double width,
- double height, double weight, char *colour,
- char *type));
-static void prt_dsc_resources __ARGS((char *comment, char *type, char *strings));
-static void prt_dsc_font_resource __ARGS((char *resource,
- struct prt_ps_font_S *ps_font));
-static float to_device_units __ARGS((int idx, double physsize, int def_number));
-static void prt_page_margins __ARGS((double width, double height, double *left,
- double *right, double *top,
- double *bottom));
-static void prt_font_metrics __ARGS((int font_scale));
-static int prt_get_cpl __ARGS((void));
-static int prt_get_lpp __ARGS((void));
-static int prt_add_resource __ARGS((struct prt_ps_resource_S *resource));
-static int prt_resfile_next_line __ARGS((void));
-static int prt_resfile_strncmp __ARGS((int offset, char *string, int len));
-static int prt_resfile_skip_nonws __ARGS((int offset));
-static int prt_resfile_skip_ws __ARGS((int offset));
-static int prt_next_dsc __ARGS((struct prt_dsc_line_S *p_dsc_line));
-static int prt_build_cid_fontname __ARGS((int font, char_u *name, int name_len));
-static void prt_def_cidfont __ARGS((char *new_name, int height, char *cidfont));
-static void prt_dup_cidfont __ARGS((char *original_name, char *new_name));
-static int prt_match_encoding __ARGS((char *p_encoding,
- struct prt_ps_mbfont_S *p_cmap,
- struct prt_ps_encoding_S **pp_mbenc));
-static int prt_match_charset __ARGS((char *p_charset,
- struct prt_ps_mbfont_S *p_cmap,
- struct prt_ps_charset_S **pp_mbchar));
+static void prt_write_file_raw_len(char_u *buffer, int bytes);
+static void prt_write_file(char_u *buffer);
+static void prt_write_file_len(char_u *buffer, int bytes);
+static void prt_write_string(char *s);
+static void prt_write_int(int i);
+static void prt_write_boolean(int b);
+static void prt_def_font(char *new_name, char *encoding, int height,
+ char *font);
+static void prt_real_bits(double real, int precision, int *pinteger,
+ int *pfraction);
+static void prt_write_real(double val, int prec);
+static void prt_def_var(char *name, double value, int prec);
+static void prt_flush_buffer(void);
+static void prt_resource_name(char_u *filename, void *cookie);
+static int prt_find_resource(char *name, struct prt_ps_resource_S *resource);
+static int prt_open_resource(struct prt_ps_resource_S *resource);
+static int prt_check_resource(struct prt_ps_resource_S *resource,
+ char_u *version);
+static void prt_dsc_start(void);
+static void prt_dsc_noarg(char *comment);
+static void prt_dsc_textline(char *comment, char *text);
+static void prt_dsc_text(char *comment, char *text);
+static void prt_dsc_ints(char *comment, int count, int *ints);
+static void prt_dsc_requirements(int duplex, int tumble, int collate,
+ int color,
+ int num_copies);
+static void prt_dsc_docmedia(char *paper_name, double width,
+ double height, double weight, char *colour,
+ char *type);
+static void prt_dsc_resources(char *comment, char *type, char *strings);
+static void prt_dsc_font_resource(char *resource,
+ struct prt_ps_font_S *ps_font);
+static float to_device_units(int idx, double physsize, int def_number);
+static void prt_page_margins(double width, double height, double *left,
+ double *right, double *top,
+ double *bottom);
+static void prt_font_metrics(int font_scale);
+static int prt_get_cpl(void);
+static int prt_get_lpp(void);
+static int prt_add_resource(struct prt_ps_resource_S *resource);
+static int prt_resfile_next_line(void);
+static int prt_resfile_strncmp(int offset, char *string, int len);
+static int prt_resfile_skip_nonws(int offset);
+static int prt_resfile_skip_ws(int offset);
+static int prt_next_dsc(struct prt_dsc_line_S *p_dsc_line);
+static int prt_build_cid_fontname(int font, char_u *name, int name_len);
+static void prt_def_cidfont(char *new_name, int height, char *cidfont);
+static void prt_dup_cidfont(char *original_name, char *new_name);
+static int prt_match_encoding(char *p_encoding,
+ struct prt_ps_mbfont_S *p_cmap,
+ struct prt_ps_encoding_S **pp_mbenc);
+static int prt_match_charset(char *p_charset,
+ struct prt_ps_mbfont_S *p_cmap,
+ struct prt_ps_charset_S **pp_mbchar);
/*
* Variables for the output PostScript file.
diff --git a/src/hardcopy.h b/src/hardcopy.h
index 84cbe02be8..43a9278370 100644
--- a/src/hardcopy.h
+++ b/src/hardcopy.h
@@ -1,24 +1,24 @@
#ifndef NEOVIM_HARDCOPY_H
#define NEOVIM_HARDCOPY_H
/* hardcopy.c */
-char_u *parse_printoptions __ARGS((void));
-char_u *parse_printmbfont __ARGS((void));
-int prt_header_height __ARGS((void));
-int prt_use_number __ARGS((void));
-int prt_get_unit __ARGS((int idx));
-void ex_hardcopy __ARGS((exarg_T *eap));
-void mch_print_cleanup __ARGS((void));
-int mch_print_init __ARGS((prt_settings_T *psettings, char_u *jobname,
- int forceit));
-int mch_print_begin __ARGS((prt_settings_T *psettings));
-void mch_print_end __ARGS((prt_settings_T *psettings));
-int mch_print_end_page __ARGS((void));
-int mch_print_begin_page __ARGS((char_u *str));
-int mch_print_blank_page __ARGS((void));
-void mch_print_start_line __ARGS((int margin, int page_line));
-int mch_print_text_out __ARGS((char_u *p, int len));
-void mch_print_set_font __ARGS((int iBold, int iItalic, int iUnderline));
-void mch_print_set_bg __ARGS((long_u bgcol));
-void mch_print_set_fg __ARGS((long_u fgcol));
+char_u *parse_printoptions(void);
+char_u *parse_printmbfont(void);
+int prt_header_height(void);
+int prt_use_number(void);
+int prt_get_unit(int idx);
+void ex_hardcopy(exarg_T *eap);
+void mch_print_cleanup(void);
+int mch_print_init(prt_settings_T *psettings, char_u *jobname,
+ int forceit);
+int mch_print_begin(prt_settings_T *psettings);
+void mch_print_end(prt_settings_T *psettings);
+int mch_print_end_page(void);
+int mch_print_begin_page(char_u *str);
+int mch_print_blank_page(void);
+void mch_print_start_line(int margin, int page_line);
+int mch_print_text_out(char_u *p, int len);
+void mch_print_set_font(int iBold, int iItalic, int iUnderline);
+void mch_print_set_bg(long_u bgcol);
+void mch_print_set_fg(long_u fgcol);
/* vim: set ft=c : */
#endif /* NEOVIM_HARDCOPY_H */
diff --git a/src/hashtab.c b/src/hashtab.c
index cdea743777..fc639e3512 100644
--- a/src/hashtab.c
+++ b/src/hashtab.c
@@ -35,7 +35,7 @@
/* Magic value for algorithm that walks through the array. */
#define PERTURB_SHIFT 5
-static int hash_may_resize __ARGS((hashtab_T *ht, int minitems));
+static int hash_may_resize(hashtab_T *ht, int minitems);
/*
diff --git a/src/hashtab.h b/src/hashtab.h
index a1dfa63162..edc3f0a88f 100644
--- a/src/hashtab.h
+++ b/src/hashtab.h
@@ -1,18 +1,18 @@
#ifndef NEOVIM_HASHTAB_H
#define NEOVIM_HASHTAB_H
/* hashtab.c */
-void hash_init __ARGS((hashtab_T *ht));
-void hash_clear __ARGS((hashtab_T *ht));
-void hash_clear_all __ARGS((hashtab_T *ht, int off));
-hashitem_T *hash_find __ARGS((hashtab_T *ht, char_u *key));
-hashitem_T *hash_lookup __ARGS((hashtab_T *ht, char_u *key, hash_T hash));
-void hash_debug_results __ARGS((void));
-int hash_add __ARGS((hashtab_T *ht, char_u *key));
-int hash_add_item __ARGS((hashtab_T *ht, hashitem_T *hi, char_u *key,
- hash_T hash));
-void hash_remove __ARGS((hashtab_T *ht, hashitem_T *hi));
-void hash_lock __ARGS((hashtab_T *ht));
-void hash_unlock __ARGS((hashtab_T *ht));
-hash_T hash_hash __ARGS((char_u *key));
+void hash_init(hashtab_T *ht);
+void hash_clear(hashtab_T *ht);
+void hash_clear_all(hashtab_T *ht, int off);
+hashitem_T *hash_find(hashtab_T *ht, char_u *key);
+hashitem_T *hash_lookup(hashtab_T *ht, char_u *key, hash_T hash);
+void hash_debug_results(void);
+int hash_add(hashtab_T *ht, char_u *key);
+int hash_add_item(hashtab_T *ht, hashitem_T *hi, char_u *key,
+ hash_T hash);
+void hash_remove(hashtab_T *ht, hashitem_T *hi);
+void hash_lock(hashtab_T *ht);
+void hash_unlock(hashtab_T *ht);
+hash_T hash_hash(char_u *key);
/* vim: set ft=c : */
#endif /* NEOVIM_HASHTAB_H */
diff --git a/src/if_cscope.c b/src/if_cscope.c
index 47a835a314..8d03bfe2e3 100644
--- a/src/if_cscope.c
+++ b/src/if_cscope.c
@@ -30,45 +30,45 @@
#endif
#include "if_cscope_defs.h"
-static void cs_usage_msg __ARGS((csid_e x));
-static int cs_add __ARGS((exarg_T *eap));
-static void cs_stat_emsg __ARGS((char *fname));
-static int cs_add_common __ARGS((char *, char *, char *));
-static int cs_check_for_connections __ARGS((void));
-static int cs_check_for_tags __ARGS((void));
-static int cs_cnt_connections __ARGS((void));
-static void cs_reading_emsg __ARGS((int idx));
-static int cs_cnt_matches __ARGS((int idx));
-static char * cs_create_cmd __ARGS((char *csoption, char *pattern));
-static int cs_create_connection __ARGS((int i));
-static void do_cscope_general __ARGS((exarg_T *eap, int make_split));
-static void cs_file_results __ARGS((FILE *, int *));
-static void cs_fill_results __ARGS((char *, int, int *, char ***,
- char ***, int *));
-static int cs_find __ARGS((exarg_T *eap));
-static int cs_find_common __ARGS((char *opt, char *pat, int, int, int,
- char_u *cmdline));
-static int cs_help __ARGS((exarg_T *eap));
-static void clear_csinfo __ARGS((int i));
-static int cs_insert_filelist __ARGS((char *, char *, char *,
- struct stat *));
-static int cs_kill __ARGS((exarg_T *eap));
-static void cs_kill_execute __ARGS((int, char *));
-static cscmd_T * cs_lookup_cmd __ARGS((exarg_T *eap));
-static char * cs_make_vim_style_matches __ARGS((char *, char *,
- char *, char *));
-static char * cs_manage_matches __ARGS((char **, char **, int, mcmd_e));
-static char * cs_parse_results __ARGS((int cnumber, char *buf,
- int bufsize, char **context,
- char **linenumber,
- char **search));
-static char * cs_pathcomponents __ARGS((char *path));
-static void cs_print_tags_priv __ARGS((char **, char **, int));
-static int cs_read_prompt __ARGS((int));
-static void cs_release_csp __ARGS((int, int freefnpp));
-static int cs_reset __ARGS((exarg_T *eap));
-static char * cs_resolve_file __ARGS((int, char *));
-static int cs_show __ARGS((exarg_T *eap));
+static void cs_usage_msg(csid_e x);
+static int cs_add(exarg_T *eap);
+static void cs_stat_emsg(char *fname);
+static int cs_add_common(char *, char *, char *);
+static int cs_check_for_connections(void);
+static int cs_check_for_tags(void);
+static int cs_cnt_connections(void);
+static void cs_reading_emsg(int idx);
+static int cs_cnt_matches(int idx);
+static char * cs_create_cmd(char *csoption, char *pattern);
+static int cs_create_connection(int i);
+static void do_cscope_general(exarg_T *eap, int make_split);
+static void cs_file_results(FILE *, int *);
+static void cs_fill_results(char *, int, int *, char ***,
+ char ***, int *);
+static int cs_find(exarg_T *eap);
+static int cs_find_common(char *opt, char *pat, int, int, int,
+ char_u *cmdline);
+static int cs_help(exarg_T *eap);
+static void clear_csinfo(int i);
+static int cs_insert_filelist(char *, char *, char *,
+ struct stat *);
+static int cs_kill(exarg_T *eap);
+static void cs_kill_execute(int, char *);
+static cscmd_T * cs_lookup_cmd(exarg_T *eap);
+static char * cs_make_vim_style_matches(char *, char *,
+ char *, char *);
+static char * cs_manage_matches(char **, char **, int, mcmd_e);
+static char * cs_parse_results(int cnumber, char *buf,
+ int bufsize, char **context,
+ char **linenumber,
+ char **search);
+static char * cs_pathcomponents(char *path);
+static void cs_print_tags_priv(char **, char **, int);
+static int cs_read_prompt(int);
+static void cs_release_csp(int, int freefnpp);
+static int cs_reset(exarg_T *eap);
+static char * cs_resolve_file(int, char *);
+static int cs_show(exarg_T *eap);
static csinfo_T * csinfo = NULL;
@@ -1235,7 +1235,7 @@ static void clear_csinfo(int i)
}
#ifndef UNIX
-static char *GetWin32Error __ARGS((void));
+static char *GetWin32Error(void);
static char *GetWin32Error(void) {
char *msg = NULL;
diff --git a/src/if_cscope.h b/src/if_cscope.h
index 35cf432c46..f76d131c93 100644
--- a/src/if_cscope.h
+++ b/src/if_cscope.h
@@ -1,16 +1,16 @@
#ifndef NEOVIM_IF_CSCOPE_H
#define NEOVIM_IF_CSCOPE_H
/* if_cscope.c */
-char_u *get_cscope_name __ARGS((expand_T *xp, int idx));
-void set_context_in_cscope_cmd __ARGS((expand_T *xp, char_u *arg,
- cmdidx_T cmdidx));
-void do_cscope __ARGS((exarg_T *eap));
-void do_scscope __ARGS((exarg_T *eap));
-void do_cstag __ARGS((exarg_T *eap));
-int cs_fgets __ARGS((char_u *buf, int size));
-void cs_free_tags __ARGS((void));
-void cs_print_tags __ARGS((void));
-int cs_connection __ARGS((int num, char_u *dbpath, char_u *ppath));
-void cs_end __ARGS((void));
+char_u *get_cscope_name(expand_T *xp, int idx);
+void set_context_in_cscope_cmd(expand_T *xp, char_u *arg,
+ cmdidx_T cmdidx);
+void do_cscope(exarg_T *eap);
+void do_scscope(exarg_T *eap);
+void do_cstag(exarg_T *eap);
+int cs_fgets(char_u *buf, int size);
+void cs_free_tags(void);
+void cs_print_tags(void);
+int cs_connection(int num, char_u *dbpath, char_u *ppath);
+void cs_end(void);
/* vim: set ft=c : */
#endif /* NEOVIM_IF_CSCOPE_H */
diff --git a/src/if_cscope_defs.h b/src/if_cscope_defs.h
index 3ed89715fc..100f2d1ab3 100644
--- a/src/if_cscope_defs.h
+++ b/src/if_cscope_defs.h
@@ -37,7 +37,7 @@
typedef struct {
char * name;
- int (*func)__ARGS((exarg_T *eap));
+ int (*func)(exarg_T *eap);
char * help;
char * usage;
int cansplit; /* if supports splitting window */
diff --git a/src/main.c b/src/main.c
index 680f3675b3..f2e83234a5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -92,39 +92,39 @@ typedef struct {
#define EDIT_QF 4 /* start in quickfix mode */
#if (defined(UNIX) || defined(VMS)) && !defined(NO_VIM_MAIN)
-static int file_owned __ARGS((char *fname));
+static int file_owned(char *fname);
#endif
-static void mainerr __ARGS((int, char_u *));
+static void mainerr(int, char_u *);
#ifndef NO_VIM_MAIN
-static void main_msg __ARGS((char *s));
-static void usage __ARGS((void));
-static int get_number_arg __ARGS((char_u *p, int *idx, int def));
+static void main_msg(char *s);
+static void usage(void);
+static int get_number_arg(char_u *p, int *idx, int def);
# if defined(HAVE_LOCALE_H) || defined(X_LOCALE)
-static void init_locale __ARGS((void));
+static void init_locale(void);
# endif
-static void parse_command_name __ARGS((mparm_T *parmp));
-static bool parse_char_i __ARGS((char_u **input, char val));
-static bool parse_string __ARGS((char_u **input, char* val, int len));
-static void command_line_scan __ARGS((mparm_T *parmp));
-static void init_params __ARGS((mparm_T *parmp, int argc, char **argv));
-static void init_startuptime __ARGS((mparm_T *parmp));
-static void allocate_generic_buffers __ARGS((void));
-static void check_and_set_isatty __ARGS((mparm_T *parmp));
-static char_u* get_fname __ARGS((mparm_T *parmp));
-static void set_window_layout __ARGS((mparm_T *parmp));
-static void load_plugins __ARGS((void));
-static void handle_quickfix __ARGS((mparm_T *parmp));
-static void handle_tag __ARGS((char_u *tagname));
-static void check_tty __ARGS((mparm_T *parmp));
-static void read_stdin __ARGS((void));
-static void create_windows __ARGS((mparm_T *parmp));
-static void edit_buffers __ARGS((mparm_T *parmp));
-static void exe_pre_commands __ARGS((mparm_T *parmp));
-static void exe_commands __ARGS((mparm_T *parmp));
-static void source_startup_scripts __ARGS((mparm_T *parmp));
-static void main_start_gui __ARGS((void));
+static void parse_command_name(mparm_T *parmp);
+static bool parse_char_i(char_u **input, char val);
+static bool parse_string(char_u **input, char* val, int len);
+static void command_line_scan(mparm_T *parmp);
+static void init_params(mparm_T *parmp, int argc, char **argv);
+static void init_startuptime(mparm_T *parmp);
+static void allocate_generic_buffers(void);
+static void check_and_set_isatty(mparm_T *parmp);
+static char_u* get_fname(mparm_T *parmp);
+static void set_window_layout(mparm_T *parmp);
+static void load_plugins(void);
+static void handle_quickfix(mparm_T *parmp);
+static void handle_tag(char_u *tagname);
+static void check_tty(mparm_T *parmp);
+static void read_stdin(void);
+static void create_windows(mparm_T *parmp);
+static void edit_buffers(mparm_T *parmp);
+static void exe_pre_commands(mparm_T *parmp);
+static void exe_commands(mparm_T *parmp);
+static void source_startup_scripts(mparm_T *parmp);
+static void main_start_gui(void);
# if defined(HAS_SWAP_EXISTS_ACTION)
-static void check_swap_exists_action __ARGS((void));
+static void check_swap_exists_action(void);
# endif
#endif /* NO_VIM_MAIN */
@@ -2298,7 +2298,7 @@ static void check_swap_exists_action(void) {
#endif
#if defined(STARTUPTIME) || defined(PROTO)
-static void time_diff __ARGS((struct timeval *then, struct timeval *now));
+static void time_diff(struct timeval *then, struct timeval *now);
static struct timeval prev_timeval;
diff --git a/src/main.h b/src/main.h
index 1e407ae154..481292e79d 100644
--- a/src/main.h
+++ b/src/main.h
@@ -1,30 +1,30 @@
#ifndef NEOVIM_MAIN_H
#define NEOVIM_MAIN_H
/* main.c */
-void main_loop __ARGS((int cmdwin, int noexmode));
-void getout_preserve_modified __ARGS((int exitval));
-void getout __ARGS((int exitval));
-int process_env __ARGS((char_u *env, int is_viminit));
-void mainerr_arg_missing __ARGS((char_u *str));
-void time_push __ARGS((void *tv_rel, void *tv_start));
-void time_pop __ARGS((void *tp));
-void time_msg __ARGS((char *mesg, void *tv_start));
-void server_to_input_buf __ARGS((char_u *str));
-char_u *eval_client_expr_to_string __ARGS((char_u *expr));
-char_u *serverConvert __ARGS((char_u *client_enc, char_u *data, char_u **tofree));
-int toF_TyA __ARGS((int c));
-int fkmap __ARGS((int c));
-void conv_to_pvim __ARGS((void));
-void conv_to_pstd __ARGS((void));
-char_u *lrswap __ARGS((char_u *ibuf));
-char_u *lrFswap __ARGS((char_u *cmdbuf, int len));
-char_u *lrF_sub __ARGS((char_u *ibuf));
-int cmdl_fkmap __ARGS((int c));
-int F_isalpha __ARGS((int c));
-int F_isdigit __ARGS((int c));
-int F_ischar __ARGS((int c));
-void farsi_fkey __ARGS((cmdarg_T *cap));
-int arabic_shape __ARGS((int c, int *ccp, int *c1p, int prev_c, int prev_c1,
- int next_c));
+void main_loop(int cmdwin, int noexmode);
+void getout_preserve_modified(int exitval);
+void getout(int exitval);
+int process_env(char_u *env, int is_viminit);
+void mainerr_arg_missing(char_u *str);
+void time_push(void *tv_rel, void *tv_start);
+void time_pop(void *tp);
+void time_msg(char *mesg, void *tv_start);
+void server_to_input_buf(char_u *str);
+char_u *eval_client_expr_to_string(char_u *expr);
+char_u *serverConvert(char_u *client_enc, char_u *data, char_u **tofree);
+int toF_TyA(int c);
+int fkmap(int c);
+void conv_to_pvim(void);
+void conv_to_pstd(void);
+char_u *lrswap(char_u *ibuf);
+char_u *lrFswap(char_u *cmdbuf, int len);
+char_u *lrF_sub(char_u *ibuf);
+int cmdl_fkmap(int c);
+int F_isalpha(int c);
+int F_isdigit(int c);
+int F_ischar(int c);
+void farsi_fkey(cmdarg_T *cap);
+int arabic_shape(int c, int *ccp, int *c1p, int prev_c, int prev_c1,
+ int next_c);
/* vim: set ft=c : */
#endif /* NEOVIM_MAIN_H */
diff --git a/src/mark.c b/src/mark.c
index db274cda50..d0b5366dd3 100644
--- a/src/mark.c
+++ b/src/mark.c
@@ -46,12 +46,12 @@
#define EXTRA_MARKS 10 /* marks 0-9 */
static xfmark_T namedfm[NMARKS + EXTRA_MARKS]; /* marks with file nr */
-static void fname2fnum __ARGS((xfmark_T *fm));
-static void fmarks_check_one __ARGS((xfmark_T *fm, char_u *name, buf_T *buf));
-static char_u *mark_line __ARGS((pos_T *mp, int lead_len));
-static void show_one_mark __ARGS((int, char_u *, pos_T *, char_u *, int current));
-static void cleanup_jumplist __ARGS((void));
-static void write_one_filemark __ARGS((FILE *fp, xfmark_T *fm, int c1, int c2));
+static void fname2fnum(xfmark_T *fm);
+static void fmarks_check_one(xfmark_T *fm, char_u *name, buf_T *buf);
+static char_u *mark_line(pos_T *mp, int lead_len);
+static void show_one_mark(int, char_u *, pos_T *, char_u *, int current);
+static void cleanup_jumplist(void);
+static void write_one_filemark(FILE *fp, xfmark_T *fm, int c1, int c2);
/*
* Set named mark "c" at current cursor position.
@@ -1321,7 +1321,7 @@ int removable(char_u *name)
return retval;
}
-static void write_one_mark __ARGS((FILE *fp_out, int c, pos_T *pos));
+static void write_one_mark(FILE *fp_out, int c, pos_T *pos);
/*
* Write all the named marks for all buffers.
diff --git a/src/mark.h b/src/mark.h
index f78a41bbc4..8da6aa3565 100644
--- a/src/mark.h
+++ b/src/mark.h
@@ -1,37 +1,37 @@
#ifndef NEOVIM_MARK_H
#define NEOVIM_MARK_H
/* mark.c */
-int setmark __ARGS((int c));
-int setmark_pos __ARGS((int c, pos_T *pos, int fnum));
-void setpcmark __ARGS((void));
-void checkpcmark __ARGS((void));
-pos_T *movemark __ARGS((int count));
-pos_T *movechangelist __ARGS((int count));
-pos_T *getmark_buf __ARGS((buf_T *buf, int c, int changefile));
-pos_T *getmark __ARGS((int c, int changefile));
-pos_T *getmark_buf_fnum __ARGS((buf_T *buf, int c, int changefile, int *fnum));
-pos_T *getnextmark __ARGS((pos_T *startpos, int dir, int begin_line));
-void fmarks_check_names __ARGS((buf_T *buf));
-int check_mark __ARGS((pos_T *pos));
-void clrallmarks __ARGS((buf_T *buf));
-char_u *fm_getname __ARGS((fmark_T *fmark, int lead_len));
-void do_marks __ARGS((exarg_T *eap));
-void ex_delmarks __ARGS((exarg_T *eap));
-void ex_jumps __ARGS((exarg_T *eap));
-void ex_changes __ARGS((exarg_T *eap));
-void mark_adjust __ARGS((linenr_T line1, linenr_T line2, long amount,
- long amount_after));
-void mark_col_adjust __ARGS((linenr_T lnum, colnr_T mincol, long lnum_amount,
- long col_amount));
-void copy_jumplist __ARGS((win_T *from, win_T *to));
-void free_jumplist __ARGS((win_T *wp));
-void set_last_cursor __ARGS((win_T *win));
-void free_all_marks __ARGS((void));
-int read_viminfo_filemark __ARGS((vir_T *virp, int force));
-void write_viminfo_filemarks __ARGS((FILE *fp));
-int removable __ARGS((char_u *name));
-int write_viminfo_marks __ARGS((FILE *fp_out));
-void copy_viminfo_marks __ARGS((vir_T *virp, FILE *fp_out, int count, int eof,
- int flags));
+int setmark(int c);
+int setmark_pos(int c, pos_T *pos, int fnum);
+void setpcmark(void);
+void checkpcmark(void);
+pos_T *movemark(int count);
+pos_T *movechangelist(int count);
+pos_T *getmark_buf(buf_T *buf, int c, int changefile);
+pos_T *getmark(int c, int changefile);
+pos_T *getmark_buf_fnum(buf_T *buf, int c, int changefile, int *fnum);
+pos_T *getnextmark(pos_T *startpos, int dir, int begin_line);
+void fmarks_check_names(buf_T *buf);
+int check_mark(pos_T *pos);
+void clrallmarks(buf_T *buf);
+char_u *fm_getname(fmark_T *fmark, int lead_len);
+void do_marks(exarg_T *eap);
+void ex_delmarks(exarg_T *eap);
+void ex_jumps(exarg_T *eap);
+void ex_changes(exarg_T *eap);
+void mark_adjust(linenr_T line1, linenr_T line2, long amount,
+ long amount_after);
+void mark_col_adjust(linenr_T lnum, colnr_T mincol, long lnum_amount,
+ long col_amount);
+void copy_jumplist(win_T *from, win_T *to);
+void free_jumplist(win_T *wp);
+void set_last_cursor(win_T *win);
+void free_all_marks(void);
+int read_viminfo_filemark(vir_T *virp, int force);
+void write_viminfo_filemarks(FILE *fp);
+int removable(char_u *name);
+int write_viminfo_marks(FILE *fp_out);
+void copy_viminfo_marks(vir_T *virp, FILE *fp_out, int count, int eof,
+ int flags);
/* vim: set ft=c : */
#endif /* NEOVIM_MARK_H */
diff --git a/src/mbyte.c b/src/mbyte.c
index 8a1fbef901..2ebf3cd98f 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -101,16 +101,16 @@
-static int enc_canon_search __ARGS((char_u *name));
-static int dbcs_char2len __ARGS((int c));
-static int dbcs_char2bytes __ARGS((int c, char_u *buf));
-static int dbcs_ptr2len __ARGS((char_u *p));
-static int dbcs_ptr2len_len __ARGS((char_u *p, int size));
-static int utf_ptr2cells_len __ARGS((char_u *p, int size));
-static int dbcs_char2cells __ARGS((int c));
-static int dbcs_ptr2cells_len __ARGS((char_u *p, int size));
-static int dbcs_ptr2char __ARGS((char_u *p));
-static int utf_safe_read_char_adv __ARGS((char_u **s, size_t *n));
+static int enc_canon_search(char_u *name);
+static int dbcs_char2len(int c);
+static int dbcs_char2bytes(int c, char_u *buf);
+static int dbcs_ptr2len(char_u *p);
+static int dbcs_ptr2len_len(char_u *p, int size);
+static int utf_ptr2cells_len(char_u *p, int size);
+static int dbcs_char2cells(int c);
+static int dbcs_ptr2cells_len(char_u *p, int size);
+static int dbcs_ptr2char(char_u *p);
+static int utf_safe_read_char_adv(char_u **s, size_t *n);
/*
* Lookup table to quickly get the length in bytes of a UTF-8 character from
@@ -953,7 +953,7 @@ struct interval {
long first;
long last;
};
-static int intable __ARGS((struct interval *table, size_t size, int c));
+static int intable(struct interval *table, size_t size, int c);
/*
* Return TRUE if "c" is in "table[size / sizeof(struct interval)]".
@@ -2405,8 +2405,8 @@ static convertStruct foldCase[] =
{0x10400,0x10427,1,40}
};
-static int utf_convert __ARGS((int a, convertStruct table[], int tableSize));
-static int utf_strnicmp __ARGS((char_u *s1, char_u *s2, size_t n1, size_t n2));
+static int utf_convert(int a, convertStruct table[], int tableSize);
+static int utf_strnicmp(char_u *s1, char_u *s2, size_t n1, size_t n2);
/*
* Generic conversion function for case operations.
@@ -3366,7 +3366,7 @@ int mb_fix_col(int col, int row)
return col;
}
-static int enc_alias_search __ARGS((char_u *name));
+static int enc_alias_search(char_u *name);
/*
* Skip the Vim specific head of a 'encoding' name.
@@ -3526,8 +3526,8 @@ char_u * enc_locale() {
# if defined(USE_ICONV) || defined(PROTO)
static char_u *
-iconv_string __ARGS((vimconv_T *vcp, char_u *str, int slen, int *unconvlenp,
- int *resultlenp));
+iconv_string(vimconv_T *vcp, char_u *str, int slen, int *unconvlenp,
+ int *resultlenp);
/*
* Call iconv_open() with a check if iconv() works properly (there are broken
diff --git a/src/mbyte.h b/src/mbyte.h
index b9b5aa05d7..d3871eb1b2 100644
--- a/src/mbyte.h
+++ b/src/mbyte.h
@@ -1,103 +1,103 @@
#ifndef NEOVIM_MBYTE_H
#define NEOVIM_MBYTE_H
/* mbyte.c */
-int enc_canon_props __ARGS((char_u *name));
-char_u *mb_init __ARGS((void));
-int bomb_size __ARGS((void));
-void remove_bom __ARGS((char_u *s));
-int mb_get_class __ARGS((char_u *p));
-int mb_get_class_buf __ARGS((char_u *p, buf_T *buf));
-int dbcs_class __ARGS((unsigned lead, unsigned trail));
-int latin_char2len __ARGS((int c));
-int latin_char2bytes __ARGS((int c, char_u *buf));
-int latin_ptr2len __ARGS((char_u *p));
-int latin_ptr2len_len __ARGS((char_u *p, int size));
-int utf_char2cells __ARGS((int c));
-int latin_ptr2cells __ARGS((char_u *p));
-int utf_ptr2cells __ARGS((char_u *p));
-int dbcs_ptr2cells __ARGS((char_u *p));
-int latin_ptr2cells_len __ARGS((char_u *p, int size));
-int latin_char2cells __ARGS((int c));
-int mb_string2cells __ARGS((char_u *p, int len));
-int latin_off2cells __ARGS((unsigned off, unsigned max_off));
-int dbcs_off2cells __ARGS((unsigned off, unsigned max_off));
-int utf_off2cells __ARGS((unsigned off, unsigned max_off));
-int latin_ptr2char __ARGS((char_u *p));
-int utf_ptr2char __ARGS((char_u *p));
-int mb_ptr2char_adv __ARGS((char_u **pp));
-int mb_cptr2char_adv __ARGS((char_u **pp));
-int arabic_combine __ARGS((int one, int two));
-int arabic_maycombine __ARGS((int two));
-int utf_composinglike __ARGS((char_u *p1, char_u *p2));
-int utfc_ptr2char __ARGS((char_u *p, int *pcc));
-int utfc_ptr2char_len __ARGS((char_u *p, int *pcc, int maxlen));
-int utfc_char2bytes __ARGS((int off, char_u *buf));
-int utf_ptr2len __ARGS((char_u *p));
-int utf_byte2len __ARGS((int b));
-int utf_ptr2len_len __ARGS((char_u *p, int size));
-int utfc_ptr2len __ARGS((char_u *p));
-int utfc_ptr2len_len __ARGS((char_u *p, int size));
-int utf_char2len __ARGS((int c));
-int utf_char2bytes __ARGS((int c, char_u *buf));
-int utf_iscomposing __ARGS((int c));
-int utf_printable __ARGS((int c));
-int utf_class __ARGS((int c));
-int utf_fold __ARGS((int a));
-int utf_toupper __ARGS((int a));
-int utf_islower __ARGS((int a));
-int utf_tolower __ARGS((int a));
-int utf_isupper __ARGS((int a));
-int mb_strnicmp __ARGS((char_u *s1, char_u *s2, size_t nn));
-void show_utf8 __ARGS((void));
-int latin_head_off __ARGS((char_u *base, char_u *p));
-int dbcs_head_off __ARGS((char_u *base, char_u *p));
-int dbcs_screen_head_off __ARGS((char_u *base, char_u *p));
-int utf_head_off __ARGS((char_u *base, char_u *p));
-void mb_copy_char __ARGS((char_u **fp, char_u **tp));
-int mb_off_next __ARGS((char_u *base, char_u *p));
-int mb_tail_off __ARGS((char_u *base, char_u *p));
-void utf_find_illegal __ARGS((void));
-int utf_valid_string __ARGS((char_u *s, char_u *end));
-int dbcs_screen_tail_off __ARGS((char_u *base, char_u *p));
-void mb_adjust_cursor __ARGS((void));
-void mb_adjustpos __ARGS((buf_T *buf, pos_T *lp));
-char_u *mb_prevptr __ARGS((char_u *line, char_u *p));
-int mb_charlen __ARGS((char_u *str));
-int mb_charlen_len __ARGS((char_u *str, int len));
-char_u *mb_unescape __ARGS((char_u **pp));
-int mb_lefthalve __ARGS((int row, int col));
-int mb_fix_col __ARGS((int col, int row));
-char_u *enc_skip __ARGS((char_u *p));
-char_u *enc_canonize __ARGS((char_u *enc));
-char_u *enc_locale __ARGS((void));
-int encname2codepage __ARGS((char_u *name));
-void *my_iconv_open __ARGS((char_u *to, char_u *from));
-int iconv_enabled __ARGS((int verbose));
-void iconv_end __ARGS((void));
-void im_set_active __ARGS((int active));
-void xim_set_focus __ARGS((int focus));
-void im_set_position __ARGS((int row, int col));
-void xim_set_preedit __ARGS((void));
-int im_get_feedback_attr __ARGS((int col));
-void xim_init __ARGS((void));
-void im_shutdown __ARGS((void));
-int im_xim_isvalid_imactivate __ARGS((void));
-void xim_reset __ARGS((void));
-int xim_queue_key_press_event __ARGS((GdkEventKey *event, int down));
-int im_get_status __ARGS((void));
-int preedit_get_status __ARGS((void));
-int im_is_preediting __ARGS((void));
-void xim_set_status_area __ARGS((void));
-int xim_get_status_area_height __ARGS((void));
-int convert_setup __ARGS((vimconv_T *vcp, char_u *from, char_u *to));
-int convert_setup_ext __ARGS((vimconv_T *vcp, char_u *from,
- int from_unicode_is_utf8, char_u *to,
- int to_unicode_is_utf8));
-int convert_input __ARGS((char_u *ptr, int len, int maxlen));
-int convert_input_safe __ARGS((char_u *ptr, int len, int maxlen, char_u **restp,
- int *restlenp));
-char_u *string_convert __ARGS((vimconv_T *vcp, char_u *ptr, int *lenp));
-char_u *string_convert_ext __ARGS((vimconv_T *vcp, char_u *ptr, int *lenp,
- int *unconvlenp));
+int enc_canon_props(char_u *name);
+char_u *mb_init(void);
+int bomb_size(void);
+void remove_bom(char_u *s);
+int mb_get_class(char_u *p);
+int mb_get_class_buf(char_u *p, buf_T *buf);
+int dbcs_class(unsigned lead, unsigned trail);
+int latin_char2len(int c);
+int latin_char2bytes(int c, char_u *buf);
+int latin_ptr2len(char_u *p);
+int latin_ptr2len_len(char_u *p, int size);
+int utf_char2cells(int c);
+int latin_ptr2cells(char_u *p);
+int utf_ptr2cells(char_u *p);
+int dbcs_ptr2cells(char_u *p);
+int latin_ptr2cells_len(char_u *p, int size);
+int latin_char2cells(int c);
+int mb_string2cells(char_u *p, int len);
+int latin_off2cells(unsigned off, unsigned max_off);
+int dbcs_off2cells(unsigned off, unsigned max_off);
+int utf_off2cells(unsigned off, unsigned max_off);
+int latin_ptr2char(char_u *p);
+int utf_ptr2char(char_u *p);
+int mb_ptr2char_adv(char_u **pp);
+int mb_cptr2char_adv(char_u **pp);
+int arabic_combine(int one, int two);
+int arabic_maycombine(int two);
+int utf_composinglike(char_u *p1, char_u *p2);
+int utfc_ptr2char(char_u *p, int *pcc);
+int utfc_ptr2char_len(char_u *p, int *pcc, int maxlen);
+int utfc_char2bytes(int off, char_u *buf);
+int utf_ptr2len(char_u *p);
+int utf_byte2len(int b);
+int utf_ptr2len_len(char_u *p, int size);
+int utfc_ptr2len(char_u *p);
+int utfc_ptr2len_len(char_u *p, int size);
+int utf_char2len(int c);
+int utf_char2bytes(int c, char_u *buf);
+int utf_iscomposing(int c);
+int utf_printable(int c);
+int utf_class(int c);
+int utf_fold(int a);
+int utf_toupper(int a);
+int utf_islower(int a);
+int utf_tolower(int a);
+int utf_isupper(int a);
+int mb_strnicmp(char_u *s1, char_u *s2, size_t nn);
+void show_utf8(void);
+int latin_head_off(char_u *base, char_u *p);
+int dbcs_head_off(char_u *base, char_u *p);
+int dbcs_screen_head_off(char_u *base, char_u *p);
+int utf_head_off(char_u *base, char_u *p);
+void mb_copy_char(char_u **fp, char_u **tp);
+int mb_off_next(char_u *base, char_u *p);
+int mb_tail_off(char_u *base, char_u *p);
+void utf_find_illegal(void);
+int utf_valid_string(char_u *s, char_u *end);
+int dbcs_screen_tail_off(char_u *base, char_u *p);
+void mb_adjust_cursor(void);
+void mb_adjustpos(buf_T *buf, pos_T *lp);
+char_u *mb_prevptr(char_u *line, char_u *p);
+int mb_charlen(char_u *str);
+int mb_charlen_len(char_u *str, int len);
+char_u *mb_unescape(char_u **pp);
+int mb_lefthalve(int row, int col);
+int mb_fix_col(int col, int row);
+char_u *enc_skip(char_u *p);
+char_u *enc_canonize(char_u *enc);
+char_u *enc_locale(void);
+int encname2codepage(char_u *name);
+void *my_iconv_open(char_u *to, char_u *from);
+int iconv_enabled(int verbose);
+void iconv_end(void);
+void im_set_active(int active);
+void xim_set_focus(int focus);
+void im_set_position(int row, int col);
+void xim_set_preedit(void);
+int im_get_feedback_attr(int col);
+void xim_init(void);
+void im_shutdown(void);
+int im_xim_isvalid_imactivate(void);
+void xim_reset(void);
+int xim_queue_key_press_event(GdkEventKey *event, int down);
+int im_get_status(void);
+int preedit_get_status(void);
+int im_is_preediting(void);
+void xim_set_status_area(void);
+int xim_get_status_area_height(void);
+int convert_setup(vimconv_T *vcp, char_u *from, char_u *to);
+int convert_setup_ext(vimconv_T *vcp, char_u *from,
+ int from_unicode_is_utf8, char_u *to,
+ int to_unicode_is_utf8);
+int convert_input(char_u *ptr, int len, int maxlen);
+int convert_input_safe(char_u *ptr, int len, int maxlen, char_u **restp,
+ int *restlenp);
+char_u *string_convert(vimconv_T *vcp, char_u *ptr, int *lenp);
+char_u *string_convert_ext(vimconv_T *vcp, char_u *ptr, int *lenp,
+ int *unconvlenp);
/* vim: set ft=c : */
#endif /* NEOVIM_MBYTE_H */
diff --git a/src/memfile.c b/src/memfile.c
index d3b8bed6cc..f56c3588b2 100644
--- a/src/memfile.c
+++ b/src/memfile.c
@@ -65,29 +65,29 @@
static long_u total_mem_used = 0; /* total memory used for memfiles */
-static void mf_ins_hash __ARGS((memfile_T *, bhdr_T *));
-static void mf_rem_hash __ARGS((memfile_T *, bhdr_T *));
-static bhdr_T *mf_find_hash __ARGS((memfile_T *, blocknr_T));
-static void mf_ins_used __ARGS((memfile_T *, bhdr_T *));
-static void mf_rem_used __ARGS((memfile_T *, bhdr_T *));
-static bhdr_T *mf_release __ARGS((memfile_T *, int));
-static bhdr_T *mf_alloc_bhdr __ARGS((memfile_T *, int));
-static void mf_free_bhdr __ARGS((bhdr_T *));
-static void mf_ins_free __ARGS((memfile_T *, bhdr_T *));
-static bhdr_T *mf_rem_free __ARGS((memfile_T *));
-static int mf_read __ARGS((memfile_T *, bhdr_T *));
-static int mf_write __ARGS((memfile_T *, bhdr_T *));
-static int mf_write_block __ARGS((memfile_T *mfp, bhdr_T *hp, off_t offset,
- unsigned size));
-static int mf_trans_add __ARGS((memfile_T *, bhdr_T *));
-static void mf_do_open __ARGS((memfile_T *, char_u *, int));
-static void mf_hash_init __ARGS((mf_hashtab_T *));
-static void mf_hash_free __ARGS((mf_hashtab_T *));
-static void mf_hash_free_all __ARGS((mf_hashtab_T *));
-static mf_hashitem_T *mf_hash_find __ARGS((mf_hashtab_T *, blocknr_T));
-static void mf_hash_add_item __ARGS((mf_hashtab_T *, mf_hashitem_T *));
-static void mf_hash_rem_item __ARGS((mf_hashtab_T *, mf_hashitem_T *));
-static int mf_hash_grow __ARGS((mf_hashtab_T *));
+static void mf_ins_hash(memfile_T *, bhdr_T *);
+static void mf_rem_hash(memfile_T *, bhdr_T *);
+static bhdr_T *mf_find_hash(memfile_T *, blocknr_T);
+static void mf_ins_used(memfile_T *, bhdr_T *);
+static void mf_rem_used(memfile_T *, bhdr_T *);
+static bhdr_T *mf_release(memfile_T *, int);
+static bhdr_T *mf_alloc_bhdr(memfile_T *, int);
+static void mf_free_bhdr(bhdr_T *);
+static void mf_ins_free(memfile_T *, bhdr_T *);
+static bhdr_T *mf_rem_free(memfile_T *);
+static int mf_read(memfile_T *, bhdr_T *);
+static int mf_write(memfile_T *, bhdr_T *);
+static int mf_write_block(memfile_T *mfp, bhdr_T *hp, off_t offset,
+ unsigned size);
+static int mf_trans_add(memfile_T *, bhdr_T *);
+static void mf_do_open(memfile_T *, char_u *, int);
+static void mf_hash_init(mf_hashtab_T *);
+static void mf_hash_free(mf_hashtab_T *);
+static void mf_hash_free_all(mf_hashtab_T *);
+static mf_hashitem_T *mf_hash_find(mf_hashtab_T *, blocknr_T);
+static void mf_hash_add_item(mf_hashtab_T *, mf_hashitem_T *);
+static void mf_hash_rem_item(mf_hashtab_T *, mf_hashitem_T *);
+static int mf_hash_grow(mf_hashtab_T *);
/*
* The functions for using a memfile:
diff --git a/src/memfile.h b/src/memfile.h
index 0ea6b9fd17..25ecacdfb5 100644
--- a/src/memfile.h
+++ b/src/memfile.h
@@ -1,21 +1,21 @@
#ifndef NEOVIM_MEMFILE_H
#define NEOVIM_MEMFILE_H
/* memfile.c */
-memfile_T *mf_open __ARGS((char_u *fname, int flags));
-int mf_open_file __ARGS((memfile_T *mfp, char_u *fname));
-void mf_close __ARGS((memfile_T *mfp, int del_file));
-void mf_close_file __ARGS((buf_T *buf, int getlines));
-void mf_new_page_size __ARGS((memfile_T *mfp, unsigned new_size));
-bhdr_T *mf_new __ARGS((memfile_T *mfp, int negative, int page_count));
-bhdr_T *mf_get __ARGS((memfile_T *mfp, blocknr_T nr, int page_count));
-void mf_put __ARGS((memfile_T *mfp, bhdr_T *hp, int dirty, int infile));
-void mf_free __ARGS((memfile_T *mfp, bhdr_T *hp));
-int mf_sync __ARGS((memfile_T *mfp, int flags));
-void mf_set_dirty __ARGS((memfile_T *mfp));
-int mf_release_all __ARGS((void));
-blocknr_T mf_trans_del __ARGS((memfile_T *mfp, blocknr_T old_nr));
-void mf_set_ffname __ARGS((memfile_T *mfp));
-void mf_fullname __ARGS((memfile_T *mfp));
-int mf_need_trans __ARGS((memfile_T *mfp));
+memfile_T *mf_open(char_u *fname, int flags);
+int mf_open_file(memfile_T *mfp, char_u *fname);
+void mf_close(memfile_T *mfp, int del_file);
+void mf_close_file(buf_T *buf, int getlines);
+void mf_new_page_size(memfile_T *mfp, unsigned new_size);
+bhdr_T *mf_new(memfile_T *mfp, int negative, int page_count);
+bhdr_T *mf_get(memfile_T *mfp, blocknr_T nr, int page_count);
+void mf_put(memfile_T *mfp, bhdr_T *hp, int dirty, int infile);
+void mf_free(memfile_T *mfp, bhdr_T *hp);
+int mf_sync(memfile_T *mfp, int flags);
+void mf_set_dirty(memfile_T *mfp);
+int mf_release_all(void);
+blocknr_T mf_trans_del(memfile_T *mfp, blocknr_T old_nr);
+void mf_set_ffname(memfile_T *mfp);
+void mf_fullname(memfile_T *mfp);
+int mf_need_trans(memfile_T *mfp);
/* vim: set ft=c : */
#endif /* NEOVIM_MEMFILE_H */
diff --git a/src/memline.c b/src/memline.c
index 292d09a37a..7ccd39b9fc 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -243,34 +243,34 @@ typedef enum {
, UB_CRYPT /* update crypt key */
} upd_block0_T;
-static void ml_set_b0_crypt __ARGS((buf_T *buf, ZERO_BL *b0p));
-static int ml_check_b0_id __ARGS((ZERO_BL *b0p));
-static void ml_upd_block0 __ARGS((buf_T *buf, upd_block0_T what));
-static void set_b0_fname __ARGS((ZERO_BL *, buf_T *buf));
-static void set_b0_dir_flag __ARGS((ZERO_BL *b0p, buf_T *buf));
-static void add_b0_fenc __ARGS((ZERO_BL *b0p, buf_T *buf));
-static time_t swapfile_info __ARGS((char_u *));
-static int recov_file_names __ARGS((char_u **, char_u *, int prepend_dot));
-static int ml_append_int __ARGS((buf_T *, linenr_T, char_u *, colnr_T, int, int));
-static int ml_delete_int __ARGS((buf_T *, linenr_T, int));
-static char_u *findswapname __ARGS((buf_T *, char_u **, char_u *));
-static void ml_flush_line __ARGS((buf_T *));
-static bhdr_T *ml_new_data __ARGS((memfile_T *, int, int));
-static bhdr_T *ml_new_ptr __ARGS((memfile_T *));
-static bhdr_T *ml_find_line __ARGS((buf_T *, linenr_T, int));
-static int ml_add_stack __ARGS((buf_T *));
-static void ml_lineadd __ARGS((buf_T *, int));
-static int b0_magic_wrong __ARGS((ZERO_BL *));
+static void ml_set_b0_crypt(buf_T *buf, ZERO_BL *b0p);
+static int ml_check_b0_id(ZERO_BL *b0p);
+static void ml_upd_block0(buf_T *buf, upd_block0_T what);
+static void set_b0_fname(ZERO_BL *, buf_T *buf);
+static void set_b0_dir_flag(ZERO_BL *b0p, buf_T *buf);
+static void add_b0_fenc(ZERO_BL *b0p, buf_T *buf);
+static time_t swapfile_info(char_u *);
+static int recov_file_names(char_u **, char_u *, int prepend_dot);
+static int ml_append_int(buf_T *, linenr_T, char_u *, colnr_T, int, int);
+static int ml_delete_int(buf_T *, linenr_T, int);
+static char_u *findswapname(buf_T *, char_u **, char_u *);
+static void ml_flush_line(buf_T *);
+static bhdr_T *ml_new_data(memfile_T *, int, int);
+static bhdr_T *ml_new_ptr(memfile_T *);
+static bhdr_T *ml_find_line(buf_T *, linenr_T, int);
+static int ml_add_stack(buf_T *);
+static void ml_lineadd(buf_T *, int);
+static int b0_magic_wrong(ZERO_BL *);
#ifdef CHECK_INODE
-static int fnamecmp_ino __ARGS((char_u *, char_u *, long));
+static int fnamecmp_ino(char_u *, char_u *, long);
#endif
-static void long_to_char __ARGS((long, char_u *));
-static long char_to_long __ARGS((char_u *));
+static void long_to_char(long, char_u *);
+static long char_to_long(char_u *);
#if defined(UNIX) || defined(WIN3264)
-static char_u *make_percent_swname __ARGS((char_u *dir, char_u *name));
+static char_u *make_percent_swname(char_u *dir, char_u *name);
#endif
-static void ml_crypt_prepare __ARGS((memfile_T *mfp, off_t offset, int reading));
-static void ml_updatechunk __ARGS((buf_T *buf, long line, long len, int updtype));
+static void ml_crypt_prepare(memfile_T *mfp, off_t offset, int reading);
+static void ml_updatechunk(buf_T *buf, long line, long len, int updtype);
/*
* Open a new memline for "buf".
@@ -3506,7 +3506,7 @@ get_file_in_dir (
return retval;
}
-static void attention_message __ARGS((buf_T *buf, char_u *fname));
+static void attention_message(buf_T *buf, char_u *fname);
/*
* Print the ATTENTION message: info about an existing swap file.
@@ -3557,7 +3557,7 @@ attention_message (
--no_wait_return;
}
-static int do_swapexists __ARGS((buf_T *buf, char_u *fname));
+static int do_swapexists(buf_T *buf, char_u *fname);
/*
* Trigger the SwapExists autocommands.
diff --git a/src/memline.h b/src/memline.h
index 7a18633d25..c6aa757c8d 100644
--- a/src/memline.h
+++ b/src/memline.h
@@ -1,44 +1,44 @@
#ifndef NEOVIM_MEMLINE_H
#define NEOVIM_MEMLINE_H
/* memline.c */
-int ml_open __ARGS((buf_T *buf));
-void ml_set_crypt_key __ARGS((buf_T *buf, char_u *old_key, int old_cm));
-void ml_setname __ARGS((buf_T *buf));
-void ml_open_files __ARGS((void));
-void ml_open_file __ARGS((buf_T *buf));
-void check_need_swap __ARGS((int newfile));
-void ml_close __ARGS((buf_T *buf, int del_file));
-void ml_close_all __ARGS((int del_file));
-void ml_close_notmod __ARGS((void));
-void ml_timestamp __ARGS((buf_T *buf));
-void ml_recover __ARGS((void));
-int recover_names __ARGS((char_u *fname, int list, int nr, char_u **fname_out));
-void ml_sync_all __ARGS((int check_file, int check_char));
-void ml_preserve __ARGS((buf_T *buf, int message));
-char_u *ml_get __ARGS((linenr_T lnum));
-char_u *ml_get_pos __ARGS((pos_T *pos));
-char_u *ml_get_curline __ARGS((void));
-char_u *ml_get_cursor __ARGS((void));
-char_u *ml_get_buf __ARGS((buf_T *buf, linenr_T lnum, int will_change));
-int ml_line_alloced __ARGS((void));
-int ml_append __ARGS((linenr_T lnum, char_u *line, colnr_T len, int newfile));
-int ml_append_buf __ARGS((buf_T *buf, linenr_T lnum, char_u *line, colnr_T len,
- int newfile));
-int ml_replace __ARGS((linenr_T lnum, char_u *line, int copy));
-int ml_delete __ARGS((linenr_T lnum, int message));
-void ml_setmarked __ARGS((linenr_T lnum));
-linenr_T ml_firstmarked __ARGS((void));
-void ml_clearmarked __ARGS((void));
-int resolve_symlink __ARGS((char_u *fname, char_u *buf));
-char_u *makeswapname __ARGS((char_u *fname, char_u *ffname, buf_T *buf,
- char_u *dir_name));
-char_u *get_file_in_dir __ARGS((char_u *fname, char_u *dname));
-void ml_setflags __ARGS((buf_T *buf));
-char_u *ml_encrypt_data __ARGS((memfile_T *mfp, char_u *data, off_t offset,
- unsigned size));
-void ml_decrypt_data __ARGS((memfile_T *mfp, char_u *data, off_t offset,
- unsigned size));
-long ml_find_line_or_offset __ARGS((buf_T *buf, linenr_T lnum, long *offp));
-void goto_byte __ARGS((long cnt));
+int ml_open(buf_T *buf);
+void ml_set_crypt_key(buf_T *buf, char_u *old_key, int old_cm);
+void ml_setname(buf_T *buf);
+void ml_open_files(void);
+void ml_open_file(buf_T *buf);
+void check_need_swap(int newfile);
+void ml_close(buf_T *buf, int del_file);
+void ml_close_all(int del_file);
+void ml_close_notmod(void);
+void ml_timestamp(buf_T *buf);
+void ml_recover(void);
+int recover_names(char_u *fname, int list, int nr, char_u **fname_out);
+void ml_sync_all(int check_file, int check_char);
+void ml_preserve(buf_T *buf, int message);
+char_u *ml_get(linenr_T lnum);
+char_u *ml_get_pos(pos_T *pos);
+char_u *ml_get_curline(void);
+char_u *ml_get_cursor(void);
+char_u *ml_get_buf(buf_T *buf, linenr_T lnum, int will_change);
+int ml_line_alloced(void);
+int ml_append(linenr_T lnum, char_u *line, colnr_T len, int newfile);
+int ml_append_buf(buf_T *buf, linenr_T lnum, char_u *line, colnr_T len,
+ int newfile);
+int ml_replace(linenr_T lnum, char_u *line, int copy);
+int ml_delete(linenr_T lnum, int message);
+void ml_setmarked(linenr_T lnum);
+linenr_T ml_firstmarked(void);
+void ml_clearmarked(void);
+int resolve_symlink(char_u *fname, char_u *buf);
+char_u *makeswapname(char_u *fname, char_u *ffname, buf_T *buf,
+ char_u *dir_name);
+char_u *get_file_in_dir(char_u *fname, char_u *dname);
+void ml_setflags(buf_T *buf);
+char_u *ml_encrypt_data(memfile_T *mfp, char_u *data, off_t offset,
+ unsigned size);
+void ml_decrypt_data(memfile_T *mfp, char_u *data, off_t offset,
+ unsigned size);
+long ml_find_line_or_offset(buf_T *buf, linenr_T lnum, long *offp);
+void goto_byte(long cnt);
/* vim: set ft=c : */
#endif /* NEOVIM_MEMLINE_H */
diff --git a/src/menu.c b/src/menu.c
index 085e3dda0d..23fe101cee 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -27,29 +27,29 @@
#define MENUDEPTH 10 /* maximum depth of menus */
-static int add_menu_path __ARGS((char_u *, vimmenu_T *, int *, char_u *));
-static int menu_nable_recurse __ARGS((vimmenu_T *menu, char_u *name, int modes,
- int enable));
-static int remove_menu __ARGS((vimmenu_T **, char_u *, int, int silent));
-static void free_menu __ARGS((vimmenu_T **menup));
-static void free_menu_string __ARGS((vimmenu_T *, int));
-static int show_menus __ARGS((char_u *, int));
-static void show_menus_recursive __ARGS((vimmenu_T *, int, int));
-static int menu_name_equal __ARGS((char_u *name, vimmenu_T *menu));
-static int menu_namecmp __ARGS((char_u *name, char_u *mname));
-static int get_menu_cmd_modes __ARGS((char_u *, int, int *, int *));
-static char_u *popup_mode_name __ARGS((char_u *name, int idx));
-static char_u *menu_text __ARGS((char_u *text, int *mnemonic, char_u **actext));
-
-
-static int menu_is_hidden __ARGS((char_u *name));
-static int menu_is_tearoff __ARGS((char_u *name));
-
-static char_u *menu_skip_part __ARGS((char_u *p));
-static char_u *menutrans_lookup __ARGS((char_u *name, int len));
-static void menu_unescape_name __ARGS((char_u *p));
-
-static char_u *menu_translate_tab_and_shift __ARGS((char_u *arg_start));
+static int add_menu_path(char_u *, vimmenu_T *, int *, char_u *);
+static int menu_nable_recurse(vimmenu_T *menu, char_u *name, int modes,
+ int enable);
+static int remove_menu(vimmenu_T **, char_u *, int, int silent);
+static void free_menu(vimmenu_T **menup);
+static void free_menu_string(vimmenu_T *, int);
+static int show_menus(char_u *, int);
+static void show_menus_recursive(vimmenu_T *, int, int);
+static int menu_name_equal(char_u *name, vimmenu_T *menu);
+static int menu_namecmp(char_u *name, char_u *mname);
+static int get_menu_cmd_modes(char_u *, int, int *, int *);
+static char_u *popup_mode_name(char_u *name, int idx);
+static char_u *menu_text(char_u *text, int *mnemonic, char_u **actext);
+
+
+static int menu_is_hidden(char_u *name);
+static int menu_is_tearoff(char_u *name);
+
+static char_u *menu_skip_part(char_u *p);
+static char_u *menutrans_lookup(char_u *name, int len);
+static void menu_unescape_name(char_u *p);
+
+static char_u *menu_translate_tab_and_shift(char_u *arg_start);
/* The character for each menu mode */
static char_u menu_mode_chars[] = {'n', 'v', 's', 'o', 'i', 'c', 't'};
diff --git a/src/menu.h b/src/menu.h
index 0d76b523bd..a7fe6b7e8e 100644
--- a/src/menu.h
+++ b/src/menu.h
@@ -1,26 +1,26 @@
#ifndef NEOVIM_MENU_H
#define NEOVIM_MENU_H
/* menu.c */
-void ex_menu __ARGS((exarg_T *eap));
-char_u *set_context_in_menu_cmd __ARGS((expand_T *xp, char_u *cmd, char_u *arg,
- int forceit));
-char_u *get_menu_name __ARGS((expand_T *xp, int idx));
-char_u *get_menu_names __ARGS((expand_T *xp, int idx));
-char_u *menu_name_skip __ARGS((char_u *name));
-int get_menu_index __ARGS((vimmenu_T *menu, int state));
-int menu_is_menubar __ARGS((char_u *name));
-int menu_is_popup __ARGS((char_u *name));
-int menu_is_child_of_popup __ARGS((vimmenu_T *menu));
-int menu_is_toolbar __ARGS((char_u *name));
-int menu_is_separator __ARGS((char_u *name));
-int check_menu_pointer __ARGS((vimmenu_T *root, vimmenu_T *menu_to_check));
-void gui_create_initial_menus __ARGS((vimmenu_T *menu));
-void gui_update_menus __ARGS((int modes));
-int gui_is_menu_shortcut __ARGS((int key));
-void gui_show_popupmenu __ARGS((void));
-void gui_mch_toggle_tearoffs __ARGS((int enable));
-void ex_emenu __ARGS((exarg_T *eap));
-vimmenu_T *gui_find_menu __ARGS((char_u *path_name));
-void ex_menutranslate __ARGS((exarg_T *eap));
+void ex_menu(exarg_T *eap);
+char_u *set_context_in_menu_cmd(expand_T *xp, char_u *cmd, char_u *arg,
+ int forceit);
+char_u *get_menu_name(expand_T *xp, int idx);
+char_u *get_menu_names(expand_T *xp, int idx);
+char_u *menu_name_skip(char_u *name);
+int get_menu_index(vimmenu_T *menu, int state);
+int menu_is_menubar(char_u *name);
+int menu_is_popup(char_u *name);
+int menu_is_child_of_popup(vimmenu_T *menu);
+int menu_is_toolbar(char_u *name);
+int menu_is_separator(char_u *name);
+int check_menu_pointer(vimmenu_T *root, vimmenu_T *menu_to_check);
+void gui_create_initial_menus(vimmenu_T *menu);
+void gui_update_menus(int modes);
+int gui_is_menu_shortcut(int key);
+void gui_show_popupmenu(void);
+void gui_mch_toggle_tearoffs(int enable);
+void ex_emenu(exarg_T *eap);
+vimmenu_T *gui_find_menu(char_u *path_name);
+void ex_menutranslate(exarg_T *eap);
/* vim: set ft=c : */
#endif /* NEOVIM_MENU_H */
diff --git a/src/message.c b/src/message.c
index 094e2f5f8e..9bee9df542 100644
--- a/src/message.c
+++ b/src/message.c
@@ -34,29 +34,29 @@
# include <math.h>
#endif
-static int other_sourcing_name __ARGS((void));
-static char_u *get_emsg_source __ARGS((void));
-static char_u *get_emsg_lnum __ARGS((void));
-static void add_msg_hist __ARGS((char_u *s, int len, int attr));
-static void hit_return_msg __ARGS((void));
-static void msg_home_replace_attr __ARGS((char_u *fname, int attr));
-static char_u *screen_puts_mbyte __ARGS((char_u *s, int l, int attr));
-static void msg_puts_attr_len __ARGS((char_u *str, int maxlen, int attr));
-static void msg_puts_display __ARGS((char_u *str, int maxlen, int attr,
- int recurse));
-static void msg_scroll_up __ARGS((void));
-static void inc_msg_scrolled __ARGS((void));
-static void store_sb_text __ARGS((char_u **sb_str, char_u *s, int attr,
- int *sb_col,
- int finish));
-static void t_puts __ARGS((int *t_col, char_u *t_s, char_u *s, int attr));
-static void msg_puts_printf __ARGS((char_u *str, int maxlen));
-static int do_more_prompt __ARGS((int typed_char));
-static void msg_screen_putchar __ARGS((int c, int attr));
-static int msg_check_screen __ARGS((void));
-static void redir_write __ARGS((char_u *s, int maxlen));
-static char_u *msg_show_console_dialog __ARGS((char_u *message, char_u *buttons,
- int dfltbutton));
+static int other_sourcing_name(void);
+static char_u *get_emsg_source(void);
+static char_u *get_emsg_lnum(void);
+static void add_msg_hist(char_u *s, int len, int attr);
+static void hit_return_msg(void);
+static void msg_home_replace_attr(char_u *fname, int attr);
+static char_u *screen_puts_mbyte(char_u *s, int l, int attr);
+static void msg_puts_attr_len(char_u *str, int maxlen, int attr);
+static void msg_puts_display(char_u *str, int maxlen, int attr,
+ int recurse);
+static void msg_scroll_up(void);
+static void inc_msg_scrolled(void);
+static void store_sb_text(char_u **sb_str, char_u *s, int attr,
+ int *sb_col,
+ int finish);
+static void t_puts(int *t_col, char_u *t_s, char_u *s, int attr);
+static void msg_puts_printf(char_u *str, int maxlen);
+static int do_more_prompt(int typed_char);
+static void msg_screen_putchar(int c, int attr);
+static int msg_check_screen(void);
+static void redir_write(char_u *s, int maxlen);
+static char_u *msg_show_console_dialog(char_u *message, char_u *buttons,
+ int dfltbutton);
static int confirm_msg_used = FALSE; /* displaying confirm_msg */
static char_u *confirm_msg = NULL; /* ":confirm" message */
static char_u *confirm_msg_tail; /* tail of confirm_msg */
@@ -326,14 +326,14 @@ void trunc_string(char_u *s, char_u *buf, int room, int buflen)
# ifndef HAVE_STDARG_H
int
-smsg __ARGS((char_u *, long, long, long,
- long, long, long, long, long, long, long));
+smsg(char_u *, long, long, long,
+ long, long, long, long, long, long, long);
int
-smsg_attr __ARGS((int, char_u *, long, long, long,
- long, long, long, long, long, long, long));
+smsg_attr(int, char_u *, long, long, long,
+ long, long, long, long, long, long, long);
-int vim_snprintf __ARGS((char *, size_t, char *, long, long, long,
- long, long, long, long, long, long, long));
+int vim_snprintf(char *, size_t, char *, long, long, long,
+ long, long, long, long, long, long, long);
/*
* smsg(str, arg, ...) is like using sprintf(buf, str, arg, ...) and then
@@ -1861,8 +1861,8 @@ struct msgchunk_S {
static msgchunk_T *last_msgchunk = NULL; /* last displayed text */
-static msgchunk_T *msg_sb_start __ARGS((msgchunk_T *mps));
-static msgchunk_T *disp_sb_line __ARGS((int row, msgchunk_T *smp));
+static msgchunk_T *msg_sb_start(msgchunk_T *mps);
+static msgchunk_T *disp_sb_line(int row, msgchunk_T *smp);
static int do_clear_sb_text = FALSE; /* clear text on next msg */
@@ -2798,7 +2798,7 @@ do_dialog (
return retval;
}
-static int copy_char __ARGS((char_u *from, char_u *to, int lowercase));
+static int copy_char(char_u *from, char_u *to, int lowercase);
/*
* Copy one character from "*from" to "*to", taking care of multi-byte
@@ -3023,9 +3023,9 @@ int vim_dialog_yesnoallcancel(int type, char_u *title, char_u *message, int dflt
#if defined(HAVE_STDARG_H) && defined(FEAT_EVAL)
static char *e_printf = N_("E766: Insufficient arguments for printf()");
-static long tv_nr __ARGS((typval_T *tvs, int *idxp));
-static char *tv_str __ARGS((typval_T *tvs, int *idxp));
-static double tv_float __ARGS((typval_T *tvs, int *idxp));
+static long tv_nr(typval_T *tvs, int *idxp);
+static char *tv_str(typval_T *tvs, int *idxp);
+static double tv_float(typval_T *tvs, int *idxp);
/*
* Get number argument from "idxp" entry in "tvs". First entry is 1.
diff --git a/src/message.h b/src/message.h
index bd1ef4242c..d7c40c5259 100644
--- a/src/message.h
+++ b/src/message.h
@@ -1,83 +1,85 @@
#ifndef NEOVIM_MESSAGE_H
#define NEOVIM_MESSAGE_H
/* message.c */
-int msg __ARGS((char_u *s));
-int verb_msg __ARGS((char_u *s));
-int msg_attr __ARGS((char_u *s, int attr));
-int msg_attr_keep __ARGS((char_u *s, int attr, int keep));
-char_u *msg_strtrunc __ARGS((char_u *s, int force));
-void trunc_string __ARGS((char_u *s, char_u *buf, int room, int buflen));
-void reset_last_sourcing __ARGS((void));
-void msg_source __ARGS((int attr));
-int emsg_not_now __ARGS((void));
-int emsg __ARGS((char_u *s));
-int emsg2 __ARGS((char_u *s, char_u *a1));
-void emsg_invreg __ARGS((int name));
-char_u *msg_trunc_attr __ARGS((char_u *s, int force, int attr));
-char_u *msg_may_trunc __ARGS((int force, char_u *s));
-int delete_first_msg __ARGS((void));
-void ex_messages __ARGS((exarg_T *eap));
-void msg_end_prompt __ARGS((void));
-void wait_return __ARGS((int redraw));
-void set_keep_msg __ARGS((char_u *s, int attr));
-void set_keep_msg_from_hist __ARGS((void));
-void msg_start __ARGS((void));
-void msg_starthere __ARGS((void));
-void msg_putchar __ARGS((int c));
-void msg_putchar_attr __ARGS((int c, int attr));
-void msg_outnum __ARGS((long n));
-void msg_home_replace __ARGS((char_u *fname));
-void msg_home_replace_hl __ARGS((char_u *fname));
-int msg_outtrans __ARGS((char_u *str));
-int msg_outtrans_attr __ARGS((char_u *str, int attr));
-int msg_outtrans_len __ARGS((char_u *str, int len));
-char_u *msg_outtrans_one __ARGS((char_u *p, int attr));
-int msg_outtrans_len_attr __ARGS((char_u *msgstr, int len, int attr));
-void msg_make __ARGS((char_u *arg));
-int msg_outtrans_special __ARGS((char_u *strstart, int from));
-char_u *str2special_save __ARGS((char_u *str, int is_lhs));
-char_u *str2special __ARGS((char_u **sp, int from));
-void str2specialbuf __ARGS((char_u *sp, char_u *buf, int len));
-void msg_prt_line __ARGS((char_u *s, int list));
-void msg_puts __ARGS((char_u *s));
-void msg_puts_title __ARGS((char_u *s));
-void msg_puts_long_attr __ARGS((char_u *longstr, int attr));
-void msg_puts_long_len_attr __ARGS((char_u *longstr, int len, int attr));
-void msg_puts_attr __ARGS((char_u *s, int attr));
-void may_clear_sb_text __ARGS((void));
-void clear_sb_text __ARGS((void));
-void show_sb_text __ARGS((void));
-void msg_sb_eol __ARGS((void));
-int msg_use_printf __ARGS((void));
-void mch_errmsg __ARGS((char *str));
-void mch_msg __ARGS((char *str));
-void msg_moremsg __ARGS((int full));
-void repeat_message __ARGS((void));
-void msg_clr_eos __ARGS((void));
-void msg_clr_eos_force __ARGS((void));
-void msg_clr_cmdline __ARGS((void));
-int msg_end __ARGS((void));
-void msg_check __ARGS((void));
-int redirecting __ARGS((void));
-void verbose_enter __ARGS((void));
-void verbose_leave __ARGS((void));
-void verbose_enter_scroll __ARGS((void));
-void verbose_leave_scroll __ARGS((void));
-void verbose_stop __ARGS((void));
-int verbose_open __ARGS((void));
-void give_warning __ARGS((char_u *message, int hl));
-void msg_advance __ARGS((int col));
-int do_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons,
- int dfltbutton, char_u *textfield,
- int ex_cmd));
-void display_confirm_msg __ARGS((void));
-int vim_dialog_yesno __ARGS((int type, char_u *title, char_u *message, int dflt));
-int vim_dialog_yesnocancel __ARGS((int type, char_u *title, char_u *message,
- int dflt));
-int vim_dialog_yesnoallcancel __ARGS((int type, char_u *title, char_u *message,
- int dflt));
-char_u *do_browse __ARGS((int flags, char_u *title, char_u *dflt, char_u *ext,
- char_u *initdir, char_u *filter,
- buf_T *buf));
+int msg(char_u *s);
+int verb_msg(char_u *s);
+int msg_attr(char_u *s, int attr);
+int msg_attr_keep(char_u *s, int attr, int keep);
+char_u *msg_strtrunc(char_u *s, int force);
+void trunc_string(char_u *s, char_u *buf, int room, int buflen);
+void reset_last_sourcing(void);
+void msg_source(int attr);
+int emsg_not_now(void);
+int emsg(char_u *s);
+int emsg2(char_u *s, char_u *a1);
+void emsg_invreg(int name);
+char_u *msg_trunc_attr(char_u *s, int force, int attr);
+char_u *msg_may_trunc(int force, char_u *s);
+int delete_first_msg(void);
+void ex_messages(exarg_T *eap);
+void msg_end_prompt(void);
+void wait_return(int redraw);
+void set_keep_msg(char_u *s, int attr);
+void set_keep_msg_from_hist(void);
+void msg_start(void);
+void msg_starthere(void);
+void msg_putchar(int c);
+void msg_putchar_attr(int c, int attr);
+void msg_outnum(long n);
+void msg_home_replace(char_u *fname);
+void msg_home_replace_hl(char_u *fname);
+int msg_outtrans(char_u *str);
+int msg_outtrans_attr(char_u *str, int attr);
+int msg_outtrans_len(char_u *str, int len);
+char_u *msg_outtrans_one(char_u *p, int attr);
+int msg_outtrans_len_attr(char_u *msgstr, int len, int attr);
+void msg_make(char_u *arg);
+int msg_outtrans_special(char_u *strstart, int from);
+char_u *str2special_save(char_u *str, int is_lhs);
+char_u *str2special(char_u **sp, int from);
+void str2specialbuf(char_u *sp, char_u *buf, int len);
+void msg_prt_line(char_u *s, int list);
+void msg_puts(char_u *s);
+void msg_puts_title(char_u *s);
+void msg_puts_long_attr(char_u *longstr, int attr);
+void msg_puts_long_len_attr(char_u *longstr, int len, int attr);
+void msg_puts_attr(char_u *s, int attr);
+void may_clear_sb_text(void);
+void clear_sb_text(void);
+void show_sb_text(void);
+void msg_sb_eol(void);
+int msg_use_printf(void);
+#ifdef USE_MCH_ERRMSG
+void mch_errmsg(char *str);
+void mch_msg(char *str);
+#endif
+void msg_moremsg(int full);
+void repeat_message(void);
+void msg_clr_eos(void);
+void msg_clr_eos_force(void);
+void msg_clr_cmdline(void);
+int msg_end(void);
+void msg_check(void);
+int redirecting(void);
+void verbose_enter(void);
+void verbose_leave(void);
+void verbose_enter_scroll(void);
+void verbose_leave_scroll(void);
+void verbose_stop(void);
+int verbose_open(void);
+void give_warning(char_u *message, int hl);
+void msg_advance(int col);
+int do_dialog(int type, char_u *title, char_u *message, char_u *buttons,
+ int dfltbutton, char_u *textfield,
+ int ex_cmd);
+void display_confirm_msg(void);
+int vim_dialog_yesno(int type, char_u *title, char_u *message, int dflt);
+int vim_dialog_yesnocancel(int type, char_u *title, char_u *message,
+ int dflt);
+int vim_dialog_yesnoallcancel(int type, char_u *title, char_u *message,
+ int dflt);
+char_u *do_browse(int flags, char_u *title, char_u *dflt, char_u *ext,
+ char_u *initdir, char_u *filter,
+ buf_T *buf);
/* vim: set ft=c : */
#endif /* NEOVIM_MESSAGE_H */
diff --git a/src/misc1.c b/src/misc1.c
index 47e8b19e24..bd37f35210 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -49,10 +49,10 @@
#include <crt_externs.h>
#endif
-static char_u *vim_version_dir __ARGS((char_u *vimdir));
-static char_u *remove_tail __ARGS((char_u *p, char_u *pend, char_u *name));
-static void init_users __ARGS((void));
-static int copy_indent __ARGS((int size, char_u *src));
+static char_u *vim_version_dir(char_u *vimdir);
+static char_u *remove_tail(char_u *p, char_u *pend, char_u *name);
+static void init_users(void);
+static int copy_indent(int size, char_u *src);
/* All user names (for ~user completion as done by shell). */
static garray_T ga_users;
@@ -451,7 +451,7 @@ int get_number_indent(linenr_T lnum)
}
-static int cin_is_cinword __ARGS((char_u *line));
+static int cin_is_cinword(char_u *line);
/*
* Return TRUE if the string "line" starts with a word from 'cinwords'.
@@ -2342,11 +2342,11 @@ void changed_int(void) {
need_maketitle = TRUE; /* set window title later */
}
-static void changedOneline __ARGS((buf_T *buf, linenr_T lnum));
-static void changed_lines_buf __ARGS((buf_T *buf, linenr_T lnum, linenr_T lnume,
- long xtra));
-static void changed_common __ARGS((linenr_T lnum, colnr_T col, linenr_T lnume,
- long xtra));
+static void changedOneline(buf_T *buf, linenr_T lnum);
+static void changed_lines_buf(buf_T *buf, linenr_T lnum, linenr_T lnume,
+ long xtra);
+static void changed_common(linenr_T lnum, colnr_T col, linenr_T lnume,
+ long xtra);
/*
* Changed bytes within a single line for the current buffer.
@@ -3982,7 +3982,7 @@ char_u *gettail(char_u *fname)
return p1;
}
-static char_u *gettail_dir __ARGS((char_u *fname));
+static char_u *gettail_dir(char_u *fname);
/*
* Return the end of the directory name, on the first path
@@ -4276,8 +4276,8 @@ FullName_save (
}
-static char_u *skip_string __ARGS((char_u *p));
-static pos_T *ind_find_start_comment __ARGS((void));
+static char_u *skip_string(char_u *p);
+static pos_T *ind_find_start_comment(void);
/*
* Find the start of a comment, not knowing if we are in a comment right now.
@@ -4381,41 +4381,41 @@ void do_c_expr_indent(void) {
* Below "XXX" means that this function may unlock the current line.
*/
-static char_u *cin_skipcomment __ARGS((char_u *));
-static int cin_nocode __ARGS((char_u *));
-static pos_T *find_line_comment __ARGS((void));
-static int cin_islabel_skip __ARGS((char_u **));
-static int cin_isdefault __ARGS((char_u *));
-static char_u *after_label __ARGS((char_u *l));
-static int get_indent_nolabel __ARGS((linenr_T lnum));
-static int skip_label __ARGS((linenr_T, char_u **pp));
-static int cin_first_id_amount __ARGS((void));
-static int cin_get_equal_amount __ARGS((linenr_T lnum));
-static int cin_ispreproc __ARGS((char_u *));
-static int cin_ispreproc_cont __ARGS((char_u **pp, linenr_T *lnump));
-static int cin_iscomment __ARGS((char_u *));
-static int cin_islinecomment __ARGS((char_u *));
-static int cin_isterminated __ARGS((char_u *, int, int));
-static int cin_isinit __ARGS((void));
-static int cin_isfuncdecl __ARGS((char_u **, linenr_T, linenr_T));
-static int cin_isif __ARGS((char_u *));
-static int cin_iselse __ARGS((char_u *));
-static int cin_isdo __ARGS((char_u *));
-static int cin_iswhileofdo __ARGS((char_u *, linenr_T));
-static int cin_is_if_for_while_before_offset __ARGS((char_u *line, int *poffset));
-static int cin_iswhileofdo_end __ARGS((int terminated));
-static int cin_isbreak __ARGS((char_u *));
-static int cin_is_cpp_baseclass __ARGS((colnr_T *col));
-static int get_baseclass_amount __ARGS((int col));
-static int cin_ends_in __ARGS((char_u *, char_u *, char_u *));
-static int cin_starts_with __ARGS((char_u *s, char *word));
-static int cin_skip2pos __ARGS((pos_T *trypos));
-static pos_T *find_start_brace __ARGS((void));
-static pos_T *find_match_paren __ARGS((int));
-static int corr_ind_maxparen __ARGS((pos_T *startpos));
-static int find_last_paren __ARGS((char_u *l, int start, int end));
-static int find_match __ARGS((int lookfor, linenr_T ourscope));
-static int cin_is_cpp_namespace __ARGS((char_u *));
+static char_u *cin_skipcomment(char_u *);
+static int cin_nocode(char_u *);
+static pos_T *find_line_comment(void);
+static int cin_islabel_skip(char_u **);
+static int cin_isdefault(char_u *);
+static char_u *after_label(char_u *l);
+static int get_indent_nolabel(linenr_T lnum);
+static int skip_label(linenr_T, char_u **pp);
+static int cin_first_id_amount(void);
+static int cin_get_equal_amount(linenr_T lnum);
+static int cin_ispreproc(char_u *);
+static int cin_ispreproc_cont(char_u **pp, linenr_T *lnump);
+static int cin_iscomment(char_u *);
+static int cin_islinecomment(char_u *);
+static int cin_isterminated(char_u *, int, int);
+static int cin_isinit(void);
+static int cin_isfuncdecl(char_u **, linenr_T, linenr_T);
+static int cin_isif(char_u *);
+static int cin_iselse(char_u *);
+static int cin_isdo(char_u *);
+static int cin_iswhileofdo(char_u *, linenr_T);
+static int cin_is_if_for_while_before_offset(char_u *line, int *poffset);
+static int cin_iswhileofdo_end(int terminated);
+static int cin_isbreak(char_u *);
+static int cin_is_cpp_baseclass(colnr_T *col);
+static int get_baseclass_amount(int col);
+static int cin_ends_in(char_u *, char_u *, char_u *);
+static int cin_starts_with(char_u *s, char *word);
+static int cin_skip2pos(pos_T *trypos);
+static pos_T *find_start_brace(void);
+static pos_T *find_match_paren(int);
+static int corr_ind_maxparen(pos_T *startpos);
+static int find_last_paren(char_u *l, int start, int end);
+static int find_match(int lookfor, linenr_T ourscope);
+static int cin_is_cpp_namespace(char_u *);
/*
* Skip over white space and C comments within the line.
@@ -7586,7 +7586,7 @@ int get_expr_indent(void) {
return indent;
}
-static int lisp_match __ARGS((char_u *p));
+static int lisp_match(char_u *p);
static int lisp_match(char_u *p)
{
@@ -8023,8 +8023,8 @@ int match_suffix(char_u *fname)
#if !defined(NO_EXPANDPATH) || defined(PROTO)
-static int vim_backtick __ARGS((char_u *p));
-static int expand_backtick __ARGS((garray_T *gap, char_u *pat, int flags));
+static int vim_backtick(char_u *p);
+static int expand_backtick(garray_T *gap, char_u *pat, int flags);
#if (defined(UNIX) && !defined(VMS)) || defined(USE_UNIXFILENAME) \
@@ -8033,7 +8033,7 @@ static int expand_backtick __ARGS((garray_T *gap, char_u *pat, int flags));
* Unix style wildcard expansion code.
* It's here because it's used both for Unix and Mac.
*/
-static int pstrcmp __ARGS((const void *, const void *));
+static int pstrcmp(const void *, const void *);
static int pstrcmp(const void *a, const void *b)
{
@@ -8237,12 +8237,12 @@ unix_expandpath (
}
#endif
-static int find_previous_pathsep __ARGS((char_u *path, char_u **psep));
-static int is_unique __ARGS((char_u *maybe_unique, garray_T *gap, int i));
-static void expand_path_option __ARGS((char_u *curdir, garray_T *gap));
-static char_u *get_path_cutoff __ARGS((char_u *fname, garray_T *gap));
-static void uniquefy_paths __ARGS((garray_T *gap, char_u *pattern));
-static int expand_in_path __ARGS((garray_T *gap, char_u *pattern, int flags));
+static int find_previous_pathsep(char_u *path, char_u **psep);
+static int is_unique(char_u *maybe_unique, garray_T *gap, int i);
+static void expand_path_option(char_u *curdir, garray_T *gap);
+static char_u *get_path_cutoff(char_u *fname, garray_T *gap);
+static void uniquefy_paths(garray_T *gap, char_u *pattern);
+static int expand_in_path(garray_T *gap, char_u *pattern, int flags);
/*
* Moves "*psep" back to the previous path separator in "path".
@@ -8629,7 +8629,7 @@ void remove_duplicates(garray_T *gap)
}
}
-static int has_env_var __ARGS((char_u *p));
+static int has_env_var(char_u *p);
/*
* Return TRUE if "p" contains what looks like an environment variable.
@@ -8649,7 +8649,7 @@ static int has_env_var(char_u *p)
}
#ifdef SPECIAL_WILDCHAR
-static int has_special_wildchar __ARGS((char_u *p));
+static int has_special_wildchar(char_u *p);
/*
* Return TRUE if "p" contains a special wildcard character.
diff --git a/src/misc1.h b/src/misc1.h
index ea7cb1b7e7..a6af8e36aa 100644
--- a/src/misc1.h
+++ b/src/misc1.h
@@ -1,120 +1,120 @@
#ifndef NEOVIM_MISC1_H
#define NEOVIM_MISC1_H
/* misc1.c */
-int get_indent __ARGS((void));
-int get_indent_lnum __ARGS((linenr_T lnum));
-int get_indent_buf __ARGS((buf_T *buf, linenr_T lnum));
-int get_indent_str __ARGS((char_u *ptr, int ts));
-int set_indent __ARGS((int size, int flags));
-int get_number_indent __ARGS((linenr_T lnum));
-int open_line __ARGS((int dir, int flags, int second_line_indent));
-int get_leader_len __ARGS((char_u *line, char_u **flags, int backward,
- int include_space));
-int get_last_leader_offset __ARGS((char_u *line, char_u **flags));
-int plines __ARGS((linenr_T lnum));
-int plines_win __ARGS((win_T *wp, linenr_T lnum, int winheight));
-int plines_nofill __ARGS((linenr_T lnum));
-int plines_win_nofill __ARGS((win_T *wp, linenr_T lnum, int winheight));
-int plines_win_nofold __ARGS((win_T *wp, linenr_T lnum));
-int plines_win_col __ARGS((win_T *wp, linenr_T lnum, long column));
-int plines_m_win __ARGS((win_T *wp, linenr_T first, linenr_T last));
-void ins_bytes __ARGS((char_u *p));
-void ins_bytes_len __ARGS((char_u *p, int len));
-void ins_char __ARGS((int c));
-void ins_char_bytes __ARGS((char_u *buf, int charlen));
-void ins_str __ARGS((char_u *s));
-int del_char __ARGS((int fixpos));
-int del_chars __ARGS((long count, int fixpos));
-int del_bytes __ARGS((long count, int fixpos_arg, int use_delcombine));
-int truncate_line __ARGS((int fixpos));
-void del_lines __ARGS((long nlines, int undo));
-int gchar_pos __ARGS((pos_T *pos));
-int gchar_cursor __ARGS((void));
-void pchar_cursor __ARGS((int c));
-int inindent __ARGS((int extra));
-char_u *skip_to_option_part __ARGS((char_u *p));
-void changed __ARGS((void));
-void changed_int __ARGS((void));
-void changed_bytes __ARGS((linenr_T lnum, colnr_T col));
-void appended_lines __ARGS((linenr_T lnum, long count));
-void appended_lines_mark __ARGS((linenr_T lnum, long count));
-void deleted_lines __ARGS((linenr_T lnum, long count));
-void deleted_lines_mark __ARGS((linenr_T lnum, long count));
-void changed_lines __ARGS((linenr_T lnum, colnr_T col, linenr_T lnume,
- long xtra));
-void unchanged __ARGS((buf_T *buf, int ff));
-void check_status __ARGS((buf_T *buf));
-void change_warning __ARGS((int col));
-int ask_yesno __ARGS((char_u *str, int direct));
-int is_mouse_key __ARGS((int c));
-int get_keystroke __ARGS((void));
-int get_number __ARGS((int colon, int *mouse_used));
-int prompt_for_number __ARGS((int *mouse_used));
-void msgmore __ARGS((long n));
-void beep_flush __ARGS((void));
-void vim_beep __ARGS((void));
-void init_homedir __ARGS((void));
-void free_homedir __ARGS((void));
-void free_users __ARGS((void));
-char_u *expand_env_save __ARGS((char_u *src));
-char_u *expand_env_save_opt __ARGS((char_u *src, int one));
-void expand_env __ARGS((char_u *src, char_u *dst, int dstlen));
-void expand_env_esc __ARGS((char_u *srcp, char_u *dst, int dstlen, int esc,
- int one,
- char_u *startstr));
-char_u *vim_getenv __ARGS((char_u *name, int *mustfree));
-void vim_setenv __ARGS((char_u *name, char_u *val));
-char_u *get_env_name __ARGS((expand_T *xp, int idx));
-char_u *get_users __ARGS((expand_T *xp, int idx));
-int match_user __ARGS((char_u *name));
-void home_replace __ARGS((buf_T *buf, char_u *src, char_u *dst, int dstlen,
- int one));
-char_u *home_replace_save __ARGS((buf_T *buf, char_u *src));
-int fullpathcmp __ARGS((char_u *s1, char_u *s2, int checkname));
-char_u *gettail __ARGS((char_u *fname));
-char_u *gettail_sep __ARGS((char_u *fname));
-char_u *getnextcomp __ARGS((char_u *fname));
-char_u *get_past_head __ARGS((char_u *path));
-int vim_ispathsep __ARGS((int c));
-int vim_ispathsep_nocolon __ARGS((int c));
-int vim_ispathlistsep __ARGS((int c));
-void shorten_dir __ARGS((char_u *str));
-int dir_of_file_exists __ARGS((char_u *fname));
-int vim_fnamecmp __ARGS((char_u *x, char_u *y));
-int vim_fnamencmp __ARGS((char_u *x, char_u *y, size_t len));
-char_u *concat_fnames __ARGS((char_u *fname1, char_u *fname2, int sep));
-char_u *concat_str __ARGS((char_u *str1, char_u *str2));
-void add_pathsep __ARGS((char_u *p));
-char_u *FullName_save __ARGS((char_u *fname, int force));
-pos_T *find_start_comment __ARGS((int ind_maxcomment));
-void do_c_expr_indent __ARGS((void));
-int cin_islabel __ARGS((void));
-int cin_iscase __ARGS((char_u *s, int strict));
-int cin_isscopedecl __ARGS((char_u *s));
-void parse_cino __ARGS((buf_T *buf));
-int get_c_indent __ARGS((void));
-int get_expr_indent __ARGS((void));
-int get_lisp_indent __ARGS((void));
-void prepare_to_exit __ARGS((void));
-void preserve_exit __ARGS((void));
-int vim_fexists __ARGS((char_u *fname));
-void line_breakcheck __ARGS((void));
-void fast_breakcheck __ARGS((void));
-int expand_wildcards_eval __ARGS((char_u **pat, int *num_file, char_u ***file,
- int flags));
-int expand_wildcards __ARGS((int num_pat, char_u **pat, int *num_file, char_u *
- **file,
- int flags));
-int match_suffix __ARGS((char_u *fname));
-int unix_expandpath __ARGS((garray_T *gap, char_u *path, int wildoff, int flags,
- int didstar));
-void remove_duplicates __ARGS((garray_T *gap));
-int gen_expand_wildcards __ARGS((int num_pat, char_u **pat, int *num_file,
- char_u ***file,
- int flags));
-void addfile __ARGS((garray_T *gap, char_u *f, int flags));
-char_u *get_cmd_output __ARGS((char_u *cmd, char_u *infile, int flags));
-void FreeWild __ARGS((int count, char_u **files));
-int goto_im __ARGS((void));
+int get_indent(void);
+int get_indent_lnum(linenr_T lnum);
+int get_indent_buf(buf_T *buf, linenr_T lnum);
+int get_indent_str(char_u *ptr, int ts);
+int set_indent(int size, int flags);
+int get_number_indent(linenr_T lnum);
+int open_line(int dir, int flags, int second_line_indent);
+int get_leader_len(char_u *line, char_u **flags, int backward,
+ int include_space);
+int get_last_leader_offset(char_u *line, char_u **flags);
+int plines(linenr_T lnum);
+int plines_win(win_T *wp, linenr_T lnum, int winheight);
+int plines_nofill(linenr_T lnum);
+int plines_win_nofill(win_T *wp, linenr_T lnum, int winheight);
+int plines_win_nofold(win_T *wp, linenr_T lnum);
+int plines_win_col(win_T *wp, linenr_T lnum, long column);
+int plines_m_win(win_T *wp, linenr_T first, linenr_T last);
+void ins_bytes(char_u *p);
+void ins_bytes_len(char_u *p, int len);
+void ins_char(int c);
+void ins_char_bytes(char_u *buf, int charlen);
+void ins_str(char_u *s);
+int del_char(int fixpos);
+int del_chars(long count, int fixpos);
+int del_bytes(long count, int fixpos_arg, int use_delcombine);
+int truncate_line(int fixpos);
+void del_lines(long nlines, int undo);
+int gchar_pos(pos_T *pos);
+int gchar_cursor(void);
+void pchar_cursor(int c);
+int inindent(int extra);
+char_u *skip_to_option_part(char_u *p);
+void changed(void);
+void changed_int(void);
+void changed_bytes(linenr_T lnum, colnr_T col);
+void appended_lines(linenr_T lnum, long count);
+void appended_lines_mark(linenr_T lnum, long count);
+void deleted_lines(linenr_T lnum, long count);
+void deleted_lines_mark(linenr_T lnum, long count);
+void changed_lines(linenr_T lnum, colnr_T col, linenr_T lnume,
+ long xtra);
+void unchanged(buf_T *buf, int ff);
+void check_status(buf_T *buf);
+void change_warning(int col);
+int ask_yesno(char_u *str, int direct);
+int is_mouse_key(int c);
+int get_keystroke(void);
+int get_number(int colon, int *mouse_used);
+int prompt_for_number(int *mouse_used);
+void msgmore(long n);
+void beep_flush(void);
+void vim_beep(void);
+void init_homedir(void);
+void free_homedir(void);
+void free_users(void);
+char_u *expand_env_save(char_u *src);
+char_u *expand_env_save_opt(char_u *src, int one);
+void expand_env(char_u *src, char_u *dst, int dstlen);
+void expand_env_esc(char_u *srcp, char_u *dst, int dstlen, int esc,
+ int one,
+ char_u *startstr);
+char_u *vim_getenv(char_u *name, int *mustfree);
+void vim_setenv(char_u *name, char_u *val);
+char_u *get_env_name(expand_T *xp, int idx);
+char_u *get_users(expand_T *xp, int idx);
+int match_user(char_u *name);
+void home_replace(buf_T *buf, char_u *src, char_u *dst, int dstlen,
+ int one);
+char_u *home_replace_save(buf_T *buf, char_u *src);
+int fullpathcmp(char_u *s1, char_u *s2, int checkname);
+char_u *gettail(char_u *fname);
+char_u *gettail_sep(char_u *fname);
+char_u *getnextcomp(char_u *fname);
+char_u *get_past_head(char_u *path);
+int vim_ispathsep(int c);
+int vim_ispathsep_nocolon(int c);
+int vim_ispathlistsep(int c);
+void shorten_dir(char_u *str);
+int dir_of_file_exists(char_u *fname);
+int vim_fnamecmp(char_u *x, char_u *y);
+int vim_fnamencmp(char_u *x, char_u *y, size_t len);
+char_u *concat_fnames(char_u *fname1, char_u *fname2, int sep);
+char_u *concat_str(char_u *str1, char_u *str2);
+void add_pathsep(char_u *p);
+char_u *FullName_save(char_u *fname, int force);
+pos_T *find_start_comment(int ind_maxcomment);
+void do_c_expr_indent(void);
+int cin_islabel(void);
+int cin_iscase(char_u *s, int strict);
+int cin_isscopedecl(char_u *s);
+void parse_cino(buf_T *buf);
+int get_c_indent(void);
+int get_expr_indent(void);
+int get_lisp_indent(void);
+void prepare_to_exit(void);
+void preserve_exit(void);
+int vim_fexists(char_u *fname);
+void line_breakcheck(void);
+void fast_breakcheck(void);
+int expand_wildcards_eval(char_u **pat, int *num_file, char_u ***file,
+ int flags);
+int expand_wildcards(int num_pat, char_u **pat, int *num_file, char_u *
+ **file,
+ int flags);
+int match_suffix(char_u *fname);
+int unix_expandpath(garray_T *gap, char_u *path, int wildoff, int flags,
+ int didstar);
+void remove_duplicates(garray_T *gap);
+int gen_expand_wildcards(int num_pat, char_u **pat, int *num_file,
+ char_u ***file,
+ int flags);
+void addfile(garray_T *gap, char_u *f, int flags);
+char_u *get_cmd_output(char_u *cmd, char_u *infile, int flags);
+void FreeWild(int count, char_u **files);
+int goto_im(void);
/* vim: set ft=c : */
#endif /* NEOVIM_MISC1_H */
diff --git a/src/misc2.c b/src/misc2.c
index d82c45f8ec..360524b0a0 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -38,8 +38,8 @@
static char_u *username = NULL; /* cached result of mch_get_user_name() */
-static int coladvance2 __ARGS((pos_T *pos, int addspaces, int finetune,
- colnr_T wcol));
+static int coladvance2(pos_T *pos, int addspaces, int finetune,
+ colnr_T wcol);
/*
* Return TRUE if in the current mode we need to use virtual.
@@ -589,10 +589,10 @@ static long_u mem_peak;
static long_u num_alloc;
static long_u num_freed;
-static void mem_pre_alloc_s __ARGS((size_t *sizep));
-static void mem_pre_alloc_l __ARGS((long_u *sizep));
-static void mem_post_alloc __ARGS((void **pp, size_t size));
-static void mem_pre_free __ARGS((void **pp));
+static void mem_pre_alloc_s(size_t *sizep);
+static void mem_pre_alloc_l(long_u *sizep);
+static void mem_post_alloc(void **pp, size_t size);
+static void mem_pre_free(void **pp);
static void mem_pre_alloc_s(size_t *sizep)
{
@@ -2883,7 +2883,7 @@ int get_shape_idx(int mouse)
typedef unsigned short ush; /* unsigned 16-bit value */
typedef unsigned long ulg; /* unsigned 32-bit value */
-static void make_crc_tab __ARGS((void));
+static void make_crc_tab(void);
static ulg crc_32_tab[256];
@@ -3183,7 +3183,7 @@ void qsort(base, elm_count, elm_size, cmp)
void *base;
size_t elm_count;
size_t elm_size;
-int (*cmp)__ARGS((const void *, const void *));
+int (*cmp)(const void *, const void *);
{
char_u *buf;
char_u *p1;
@@ -3217,7 +3217,7 @@ int (*cmp)__ARGS((const void *, const void *));
* Sort an array of strings.
*/
static int
-sort_compare __ARGS((const void *s1, const void *s2));
+sort_compare(const void *s1, const void *s2);
static int sort_compare(const void *s1, const void *s2)
{
@@ -3330,9 +3330,9 @@ static int envsize = -1; /* current size of environment */
extern
char **environ; /* the global which is your env. */
-static int findenv __ARGS((char *name)); /* look for a name in the env. */
-static int newenv __ARGS((void)); /* copy env. from stack to heap */
-static int moreenv __ARGS((void)); /* incr. size of env. */
+static int findenv(char *name); /* look for a name in the env. */
+static int newenv(void); /* copy env. from stack to heap */
+static int moreenv(void); /* incr. size of env. */
int putenv(const char *string)
{
diff --git a/src/misc2.h b/src/misc2.h
index 20046b69fb..0e3e6af2ed 100644
--- a/src/misc2.h
+++ b/src/misc2.h
@@ -1,110 +1,110 @@
#ifndef NEOVIM_MISC2_H
#define NEOVIM_MISC2_H
/* misc2.c */
-int virtual_active __ARGS((void));
-int getviscol __ARGS((void));
-int getviscol2 __ARGS((colnr_T col, colnr_T coladd));
-int coladvance_force __ARGS((colnr_T wcol));
-int coladvance __ARGS((colnr_T wcol));
-int getvpos __ARGS((pos_T *pos, colnr_T wcol));
-int inc_cursor __ARGS((void));
-int inc __ARGS((pos_T *lp));
-int incl __ARGS((pos_T *lp));
-int dec_cursor __ARGS((void));
-int dec __ARGS((pos_T *lp));
-int decl __ARGS((pos_T *lp));
-linenr_T get_cursor_rel_lnum __ARGS((win_T *wp, linenr_T lnum));
-void check_cursor_lnum __ARGS((void));
-void check_cursor_col __ARGS((void));
-void check_cursor_col_win __ARGS((win_T *win));
-void check_cursor __ARGS((void));
-void adjust_cursor_col __ARGS((void));
-int leftcol_changed __ARGS((void));
-void vim_mem_profile_dump __ARGS((void));
-char_u *alloc __ARGS((unsigned size));
-char_u *alloc_clear __ARGS((unsigned size));
-char_u *alloc_check __ARGS((unsigned size));
-char_u *lalloc_clear __ARGS((long_u size, int message));
-char_u *lalloc __ARGS((long_u size, int message));
-void *mem_realloc __ARGS((void *ptr, size_t size));
-void do_outofmem_msg __ARGS((long_u size));
-void free_all_mem __ARGS((void));
-char_u *vim_strsave __ARGS((char_u *string));
-char_u *vim_strnsave __ARGS((char_u *string, int len));
-char_u *vim_strsave_escaped __ARGS((char_u *string, char_u *esc_chars));
-char_u *vim_strsave_escaped_ext __ARGS((char_u *string, char_u *esc_chars,
- int cc,
- int bsl));
-int csh_like_shell __ARGS((void));
-char_u *vim_strsave_shellescape __ARGS((char_u *string, int do_special));
-char_u *vim_strsave_up __ARGS((char_u *string));
-char_u *vim_strnsave_up __ARGS((char_u *string, int len));
-void vim_strup __ARGS((char_u *p));
-char_u *strup_save __ARGS((char_u *orig));
-void copy_spaces __ARGS((char_u *ptr, size_t count));
-void copy_chars __ARGS((char_u *ptr, size_t count, int c));
-void del_trailing_spaces __ARGS((char_u *ptr));
-void vim_strncpy __ARGS((char_u *to, char_u *from, size_t len));
-void vim_strcat __ARGS((char_u *to, char_u *from, size_t tosize));
-int copy_option_part __ARGS((char_u **option, char_u *buf, int maxlen,
- char *sep_chars));
-void vim_free __ARGS((void *x));
-int vim_stricmp __ARGS((char *s1, char *s2));
-int vim_strnicmp __ARGS((char *s1, char *s2, size_t len));
-char_u *vim_strchr __ARGS((char_u *string, int c));
-char_u *vim_strbyte __ARGS((char_u *string, int c));
-char_u *vim_strrchr __ARGS((char_u *string, int c));
-int vim_isspace __ARGS((int x));
-int name_to_mod_mask __ARGS((int c));
-int simplify_key __ARGS((int key, int *modifiers));
-int handle_x_keys __ARGS((int key));
-char_u *get_special_key_name __ARGS((int c, int modifiers));
-int trans_special __ARGS((char_u **srcp, char_u *dst, int keycode));
-int find_special_key __ARGS((char_u **srcp, int *modp, int keycode,
- int keep_x_key));
-int extract_modifiers __ARGS((int key, int *modp));
-int find_special_key_in_table __ARGS((int c));
-int get_special_key_code __ARGS((char_u *name));
-char_u *get_key_name __ARGS((int i));
-int get_mouse_button __ARGS((int code, int *is_click, int *is_drag));
-int get_pseudo_mouse_code __ARGS((int button, int is_click, int is_drag));
-int get_fileformat __ARGS((buf_T *buf));
-int get_fileformat_force __ARGS((buf_T *buf, exarg_T *eap));
-void set_fileformat __ARGS((int t, int opt_flags));
-int default_fileformat __ARGS((void));
-int call_shell __ARGS((char_u *cmd, int opt));
-int get_real_state __ARGS((void));
-int after_pathsep __ARGS((char_u *b, char_u *p));
-int same_directory __ARGS((char_u *f1, char_u *f2));
-int vim_chdirfile __ARGS((char_u *fname));
-int illegal_slash __ARGS((char *name));
-char_u *parse_shape_opt __ARGS((int what));
-int get_shape_idx __ARGS((int mouse));
-void update_mouseshape __ARGS((int shape_idx));
-int crypt_method_from_string __ARGS((char_u *s));
-int get_crypt_method __ARGS((buf_T *buf));
-void set_crypt_method __ARGS((buf_T *buf, int method));
-void crypt_push_state __ARGS((void));
-void crypt_pop_state __ARGS((void));
-void crypt_encode __ARGS((char_u *from, size_t len, char_u *to));
-void crypt_decode __ARGS((char_u *ptr, long len));
-void crypt_init_keys __ARGS((char_u *passwd));
-void free_crypt_key __ARGS((char_u *key));
-char_u *get_crypt_key __ARGS((int store, int twice));
-int vim_chdir __ARGS((char_u *new_dir));
-int get_user_name __ARGS((char_u *buf, int len));
-void sort_strings __ARGS((char_u **files, int count));
-int pathcmp __ARGS((const char *p, const char *q, int maxlen));
-int filewritable __ARGS((char_u *fname));
-int emsg3 __ARGS((char_u *s, char_u *a1, char_u *a2));
-int emsgn __ARGS((char_u *s, long n));
-int get2c __ARGS((FILE *fd));
-int get3c __ARGS((FILE *fd));
-int get4c __ARGS((FILE *fd));
-time_t get8ctime __ARGS((FILE *fd));
-char_u *read_string __ARGS((FILE *fd, int cnt));
-int put_bytes __ARGS((FILE *fd, long_u nr, int len));
-void put_time __ARGS((FILE *fd, time_t the_time));
-int has_non_ascii __ARGS((char_u *s));
+int virtual_active(void);
+int getviscol(void);
+int getviscol2(colnr_T col, colnr_T coladd);
+int coladvance_force(colnr_T wcol);
+int coladvance(colnr_T wcol);
+int getvpos(pos_T *pos, colnr_T wcol);
+int inc_cursor(void);
+int inc(pos_T *lp);
+int incl(pos_T *lp);
+int dec_cursor(void);
+int dec(pos_T *lp);
+int decl(pos_T *lp);
+linenr_T get_cursor_rel_lnum(win_T *wp, linenr_T lnum);
+void check_cursor_lnum(void);
+void check_cursor_col(void);
+void check_cursor_col_win(win_T *win);
+void check_cursor(void);
+void adjust_cursor_col(void);
+int leftcol_changed(void);
+void vim_mem_profile_dump(void);
+char_u *alloc(unsigned size);
+char_u *alloc_clear(unsigned size);
+char_u *alloc_check(unsigned size);
+char_u *lalloc_clear(long_u size, int message);
+char_u *lalloc(long_u size, int message);
+void *mem_realloc(void *ptr, size_t size);
+void do_outofmem_msg(long_u size);
+void free_all_mem(void);
+char_u *vim_strsave(char_u *string);
+char_u *vim_strnsave(char_u *string, int len);
+char_u *vim_strsave_escaped(char_u *string, char_u *esc_chars);
+char_u *vim_strsave_escaped_ext(char_u *string, char_u *esc_chars,
+ int cc,
+ int bsl);
+int csh_like_shell(void);
+char_u *vim_strsave_shellescape(char_u *string, int do_special);
+char_u *vim_strsave_up(char_u *string);
+char_u *vim_strnsave_up(char_u *string, int len);
+void vim_strup(char_u *p);
+char_u *strup_save(char_u *orig);
+void copy_spaces(char_u *ptr, size_t count);
+void copy_chars(char_u *ptr, size_t count, int c);
+void del_trailing_spaces(char_u *ptr);
+void vim_strncpy(char_u *to, char_u *from, size_t len);
+void vim_strcat(char_u *to, char_u *from, size_t tosize);
+int copy_option_part(char_u **option, char_u *buf, int maxlen,
+ char *sep_chars);
+void vim_free(void *x);
+int vim_stricmp(char *s1, char *s2);
+int vim_strnicmp(char *s1, char *s2, size_t len);
+char_u *vim_strchr(char_u *string, int c);
+char_u *vim_strbyte(char_u *string, int c);
+char_u *vim_strrchr(char_u *string, int c);
+int vim_isspace(int x);
+int name_to_mod_mask(int c);
+int simplify_key(int key, int *modifiers);
+int handle_x_keys(int key);
+char_u *get_special_key_name(int c, int modifiers);
+int trans_special(char_u **srcp, char_u *dst, int keycode);
+int find_special_key(char_u **srcp, int *modp, int keycode,
+ int keep_x_key);
+int extract_modifiers(int key, int *modp);
+int find_special_key_in_table(int c);
+int get_special_key_code(char_u *name);
+char_u *get_key_name(int i);
+int get_mouse_button(int code, int *is_click, int *is_drag);
+int get_pseudo_mouse_code(int button, int is_click, int is_drag);
+int get_fileformat(buf_T *buf);
+int get_fileformat_force(buf_T *buf, exarg_T *eap);
+void set_fileformat(int t, int opt_flags);
+int default_fileformat(void);
+int call_shell(char_u *cmd, int opt);
+int get_real_state(void);
+int after_pathsep(char_u *b, char_u *p);
+int same_directory(char_u *f1, char_u *f2);
+int vim_chdirfile(char_u *fname);
+int illegal_slash(char *name);
+char_u *parse_shape_opt(int what);
+int get_shape_idx(int mouse);
+void update_mouseshape(int shape_idx);
+int crypt_method_from_string(char_u *s);
+int get_crypt_method(buf_T *buf);
+void set_crypt_method(buf_T *buf, int method);
+void crypt_push_state(void);
+void crypt_pop_state(void);
+void crypt_encode(char_u *from, size_t len, char_u *to);
+void crypt_decode(char_u *ptr, long len);
+void crypt_init_keys(char_u *passwd);
+void free_crypt_key(char_u *key);
+char_u *get_crypt_key(int store, int twice);
+int vim_chdir(char_u *new_dir);
+int get_user_name(char_u *buf, int len);
+void sort_strings(char_u **files, int count);
+int pathcmp(const char *p, const char *q, int maxlen);
+int filewritable(char_u *fname);
+int emsg3(char_u *s, char_u *a1, char_u *a2);
+int emsgn(char_u *s, long n);
+int get2c(FILE *fd);
+int get3c(FILE *fd);
+int get4c(FILE *fd);
+time_t get8ctime(FILE *fd);
+char_u *read_string(FILE *fd, int cnt);
+int put_bytes(FILE *fd, long_u nr, int len);
+void put_time(FILE *fd, time_t the_time);
+int has_non_ascii(char_u *s);
/* vim: set ft=c : */
#endif /* NEOVIM_MISC2_H */
diff --git a/src/move.c b/src/move.c
index d83cfc6b13..8bf405e05e 100644
--- a/src/move.c
+++ b/src/move.c
@@ -30,12 +30,12 @@
#include "popupmnu.h"
#include "screen.h"
-static void comp_botline __ARGS((win_T *wp));
-static int scrolljump_value __ARGS((void));
-static int check_top_offset __ARGS((void));
-static void curs_rows __ARGS((win_T *wp, int do_botline));
-static void validate_botline_win __ARGS((win_T *wp));
-static void validate_cheight __ARGS((void));
+static void comp_botline(win_T *wp);
+static int scrolljump_value(void);
+static int check_top_offset(void);
+static void curs_rows(win_T *wp, int do_botline);
+static void validate_botline_win(win_T *wp);
+static void validate_cheight(void);
typedef struct {
linenr_T lnum; /* line number */
@@ -43,11 +43,11 @@ typedef struct {
int height; /* height of added line */
} lineoff_T;
-static void topline_back __ARGS((lineoff_T *lp));
-static void botline_forw __ARGS((lineoff_T *lp));
-static void botline_topline __ARGS((lineoff_T *lp));
-static void topline_botline __ARGS((lineoff_T *lp));
-static void max_topfill __ARGS((void));
+static void topline_back(lineoff_T *lp);
+static void botline_forw(lineoff_T *lp);
+static void botline_topline(lineoff_T *lp);
+static void topline_botline(lineoff_T *lp);
+static void max_topfill(void);
/*
* Compute wp->w_botline for the current wp->w_topline. Can be called after
@@ -1738,7 +1738,7 @@ void cursor_correct(void) {
curwin->w_valid |= VALID_TOPLINE;
}
-static void get_scroll_overlap __ARGS((lineoff_T *lp, int dir));
+static void get_scroll_overlap(lineoff_T *lp, int dir);
/*
* move screen 'count' pages up or down and update screen
diff --git a/src/move.h b/src/move.h
index bf3371fa2d..19907d6d3f 100644
--- a/src/move.h
+++ b/src/move.h
@@ -1,44 +1,44 @@
#ifndef NEOVIM_MOVE_H
#define NEOVIM_MOVE_H
/* move.c */
-void update_topline_redraw __ARGS((void));
-void update_topline __ARGS((void));
-void update_curswant __ARGS((void));
-void check_cursor_moved __ARGS((win_T *wp));
-void changed_window_setting __ARGS((void));
-void changed_window_setting_win __ARGS((win_T *wp));
-void set_topline __ARGS((win_T *wp, linenr_T lnum));
-void changed_cline_bef_curs __ARGS((void));
-void changed_cline_bef_curs_win __ARGS((win_T *wp));
-void changed_line_abv_curs __ARGS((void));
-void changed_line_abv_curs_win __ARGS((win_T *wp));
-void validate_botline __ARGS((void));
-void invalidate_botline __ARGS((void));
-void invalidate_botline_win __ARGS((win_T *wp));
-void approximate_botline_win __ARGS((win_T *wp));
-int cursor_valid __ARGS((void));
-void validate_cursor __ARGS((void));
-void validate_cline_row __ARGS((void));
-void validate_virtcol __ARGS((void));
-void validate_virtcol_win __ARGS((win_T *wp));
-void validate_cursor_col __ARGS((void));
-int win_col_off __ARGS((win_T *wp));
-int curwin_col_off __ARGS((void));
-int win_col_off2 __ARGS((win_T *wp));
-int curwin_col_off2 __ARGS((void));
-void curs_columns __ARGS((int may_scroll));
-void scrolldown __ARGS((long line_count, int byfold));
-void scrollup __ARGS((long line_count, int byfold));
-void check_topfill __ARGS((win_T *wp, int down));
-void scrolldown_clamp __ARGS((void));
-void scrollup_clamp __ARGS((void));
-void scroll_cursor_top __ARGS((int min_scroll, int always));
-void set_empty_rows __ARGS((win_T *wp, int used));
-void scroll_cursor_bot __ARGS((int min_scroll, int set_topbot));
-void scroll_cursor_halfway __ARGS((int atend));
-void cursor_correct __ARGS((void));
-int onepage __ARGS((int dir, long count));
-void halfpage __ARGS((int flag, linenr_T Prenum));
-void do_check_cursorbind __ARGS((void));
+void update_topline_redraw(void);
+void update_topline(void);
+void update_curswant(void);
+void check_cursor_moved(win_T *wp);
+void changed_window_setting(void);
+void changed_window_setting_win(win_T *wp);
+void set_topline(win_T *wp, linenr_T lnum);
+void changed_cline_bef_curs(void);
+void changed_cline_bef_curs_win(win_T *wp);
+void changed_line_abv_curs(void);
+void changed_line_abv_curs_win(win_T *wp);
+void validate_botline(void);
+void invalidate_botline(void);
+void invalidate_botline_win(win_T *wp);
+void approximate_botline_win(win_T *wp);
+int cursor_valid(void);
+void validate_cursor(void);
+void validate_cline_row(void);
+void validate_virtcol(void);
+void validate_virtcol_win(win_T *wp);
+void validate_cursor_col(void);
+int win_col_off(win_T *wp);
+int curwin_col_off(void);
+int win_col_off2(win_T *wp);
+int curwin_col_off2(void);
+void curs_columns(int may_scroll);
+void scrolldown(long line_count, int byfold);
+void scrollup(long line_count, int byfold);
+void check_topfill(win_T *wp, int down);
+void scrolldown_clamp(void);
+void scrollup_clamp(void);
+void scroll_cursor_top(int min_scroll, int always);
+void set_empty_rows(win_T *wp, int used);
+void scroll_cursor_bot(int min_scroll, int set_topbot);
+void scroll_cursor_halfway(int atend);
+void cursor_correct(void);
+int onepage(int dir, long count);
+void halfpage(int flag, linenr_T Prenum);
+void do_check_cursorbind(void);
/* vim: set ft=c : */
#endif /* NEOVIM_MOVE_H */
diff --git a/src/normal.c b/src/normal.c
index 75b9319d95..d692256258 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -57,118 +57,118 @@ static int VIsual_mode_orig = NUL; /* type of Visual mode, that use
static int restart_VIsual_select = 0;
-static void set_vcount_ca __ARGS((cmdarg_T *cap, int *set_prevcount));
+static void set_vcount_ca(cmdarg_T *cap, int *set_prevcount);
static int
-nv_compare __ARGS((const void *s1, const void *s2));
-static int find_command __ARGS((int cmdchar));
-static void op_colon __ARGS((oparg_T *oap));
-static void op_function __ARGS((oparg_T *oap));
-static void find_start_of_word __ARGS((pos_T *));
-static void find_end_of_word __ARGS((pos_T *));
-static int get_mouse_class __ARGS((char_u *p));
-static void prep_redo_cmd __ARGS((cmdarg_T *cap));
-static void prep_redo __ARGS((int regname, long, int, int, int, int, int));
-static int checkclearop __ARGS((oparg_T *oap));
-static int checkclearopq __ARGS((oparg_T *oap));
-static void clearop __ARGS((oparg_T *oap));
-static void clearopbeep __ARGS((oparg_T *oap));
-static void unshift_special __ARGS((cmdarg_T *cap));
-static void del_from_showcmd __ARGS((int));
+nv_compare(const void *s1, const void *s2);
+static int find_command(int cmdchar);
+static void op_colon(oparg_T *oap);
+static void op_function(oparg_T *oap);
+static void find_start_of_word(pos_T *);
+static void find_end_of_word(pos_T *);
+static int get_mouse_class(char_u *p);
+static void prep_redo_cmd(cmdarg_T *cap);
+static void prep_redo(int regname, long, int, int, int, int, int);
+static int checkclearop(oparg_T *oap);
+static int checkclearopq(oparg_T *oap);
+static void clearop(oparg_T *oap);
+static void clearopbeep(oparg_T *oap);
+static void unshift_special(cmdarg_T *cap);
+static void del_from_showcmd(int);
/*
* nv_*(): functions called to handle Normal and Visual mode commands.
* n_*(): functions called to handle Normal mode commands.
* v_*(): functions called to handle Visual mode commands.
*/
-static void nv_ignore __ARGS((cmdarg_T *cap));
-static void nv_nop __ARGS((cmdarg_T *cap));
-static void nv_error __ARGS((cmdarg_T *cap));
-static void nv_help __ARGS((cmdarg_T *cap));
-static void nv_addsub __ARGS((cmdarg_T *cap));
-static void nv_page __ARGS((cmdarg_T *cap));
-static void nv_gd __ARGS((oparg_T *oap, int nchar, int thisblock));
-static int nv_screengo __ARGS((oparg_T *oap, int dir, long dist));
-static void nv_mousescroll __ARGS((cmdarg_T *cap));
-static void nv_mouse __ARGS((cmdarg_T *cap));
-static void nv_scroll_line __ARGS((cmdarg_T *cap));
-static void nv_zet __ARGS((cmdarg_T *cap));
-static void nv_exmode __ARGS((cmdarg_T *cap));
-static void nv_colon __ARGS((cmdarg_T *cap));
-static void nv_ctrlg __ARGS((cmdarg_T *cap));
-static void nv_ctrlh __ARGS((cmdarg_T *cap));
-static void nv_clear __ARGS((cmdarg_T *cap));
-static void nv_ctrlo __ARGS((cmdarg_T *cap));
-static void nv_hat __ARGS((cmdarg_T *cap));
-static void nv_Zet __ARGS((cmdarg_T *cap));
-static void nv_ident __ARGS((cmdarg_T *cap));
-static void nv_tagpop __ARGS((cmdarg_T *cap));
-static void nv_scroll __ARGS((cmdarg_T *cap));
-static void nv_right __ARGS((cmdarg_T *cap));
-static void nv_left __ARGS((cmdarg_T *cap));
-static void nv_up __ARGS((cmdarg_T *cap));
-static void nv_down __ARGS((cmdarg_T *cap));
-static void nv_gotofile __ARGS((cmdarg_T *cap));
-static void nv_end __ARGS((cmdarg_T *cap));
-static void nv_dollar __ARGS((cmdarg_T *cap));
-static void nv_search __ARGS((cmdarg_T *cap));
-static void nv_next __ARGS((cmdarg_T *cap));
-static void normal_search __ARGS((cmdarg_T *cap, int dir, char_u *pat, int opt));
-static void nv_csearch __ARGS((cmdarg_T *cap));
-static void nv_brackets __ARGS((cmdarg_T *cap));
-static void nv_percent __ARGS((cmdarg_T *cap));
-static void nv_brace __ARGS((cmdarg_T *cap));
-static void nv_mark __ARGS((cmdarg_T *cap));
-static void nv_findpar __ARGS((cmdarg_T *cap));
-static void nv_undo __ARGS((cmdarg_T *cap));
-static void nv_kundo __ARGS((cmdarg_T *cap));
-static void nv_Replace __ARGS((cmdarg_T *cap));
-static void nv_vreplace __ARGS((cmdarg_T *cap));
-static void v_swap_corners __ARGS((int cmdchar));
-static void nv_replace __ARGS((cmdarg_T *cap));
-static void n_swapchar __ARGS((cmdarg_T *cap));
-static void nv_cursormark __ARGS((cmdarg_T *cap, int flag, pos_T *pos));
-static void v_visop __ARGS((cmdarg_T *cap));
-static void nv_subst __ARGS((cmdarg_T *cap));
-static void nv_abbrev __ARGS((cmdarg_T *cap));
-static void nv_optrans __ARGS((cmdarg_T *cap));
-static void nv_gomark __ARGS((cmdarg_T *cap));
-static void nv_pcmark __ARGS((cmdarg_T *cap));
-static void nv_regname __ARGS((cmdarg_T *cap));
-static void nv_visual __ARGS((cmdarg_T *cap));
-static void n_start_visual_mode __ARGS((int c));
-static void nv_window __ARGS((cmdarg_T *cap));
-static void nv_suspend __ARGS((cmdarg_T *cap));
-static void nv_g_cmd __ARGS((cmdarg_T *cap));
-static void n_opencmd __ARGS((cmdarg_T *cap));
-static void nv_dot __ARGS((cmdarg_T *cap));
-static void nv_redo __ARGS((cmdarg_T *cap));
-static void nv_Undo __ARGS((cmdarg_T *cap));
-static void nv_tilde __ARGS((cmdarg_T *cap));
-static void nv_operator __ARGS((cmdarg_T *cap));
-static void set_op_var __ARGS((int optype));
-static void nv_lineop __ARGS((cmdarg_T *cap));
-static void nv_home __ARGS((cmdarg_T *cap));
-static void nv_pipe __ARGS((cmdarg_T *cap));
-static void nv_bck_word __ARGS((cmdarg_T *cap));
-static void nv_wordcmd __ARGS((cmdarg_T *cap));
-static void nv_beginline __ARGS((cmdarg_T *cap));
-static void adjust_cursor __ARGS((oparg_T *oap));
-static void adjust_for_sel __ARGS((cmdarg_T *cap));
-static int unadjust_for_sel __ARGS((void));
-static void nv_select __ARGS((cmdarg_T *cap));
-static void nv_goto __ARGS((cmdarg_T *cap));
-static void nv_normal __ARGS((cmdarg_T *cap));
-static void nv_esc __ARGS((cmdarg_T *oap));
-static void nv_edit __ARGS((cmdarg_T *cap));
-static void invoke_edit __ARGS((cmdarg_T *cap, int repl, int cmd, int startln));
-static void nv_object __ARGS((cmdarg_T *cap));
-static void nv_record __ARGS((cmdarg_T *cap));
-static void nv_at __ARGS((cmdarg_T *cap));
-static void nv_halfpage __ARGS((cmdarg_T *cap));
-static void nv_join __ARGS((cmdarg_T *cap));
-static void nv_put __ARGS((cmdarg_T *cap));
-static void nv_open __ARGS((cmdarg_T *cap));
-static void nv_cursorhold __ARGS((cmdarg_T *cap));
+static void nv_ignore(cmdarg_T *cap);
+static void nv_nop(cmdarg_T *cap);
+static void nv_error(cmdarg_T *cap);
+static void nv_help(cmdarg_T *cap);
+static void nv_addsub(cmdarg_T *cap);
+static void nv_page(cmdarg_T *cap);
+static void nv_gd(oparg_T *oap, int nchar, int thisblock);
+static int nv_screengo(oparg_T *oap, int dir, long dist);
+static void nv_mousescroll(cmdarg_T *cap);
+static void nv_mouse(cmdarg_T *cap);
+static void nv_scroll_line(cmdarg_T *cap);
+static void nv_zet(cmdarg_T *cap);
+static void nv_exmode(cmdarg_T *cap);
+static void nv_colon(cmdarg_T *cap);
+static void nv_ctrlg(cmdarg_T *cap);
+static void nv_ctrlh(cmdarg_T *cap);
+static void nv_clear(cmdarg_T *cap);
+static void nv_ctrlo(cmdarg_T *cap);
+static void nv_hat(cmdarg_T *cap);
+static void nv_Zet(cmdarg_T *cap);
+static void nv_ident(cmdarg_T *cap);
+static void nv_tagpop(cmdarg_T *cap);
+static void nv_scroll(cmdarg_T *cap);
+static void nv_right(cmdarg_T *cap);
+static void nv_left(cmdarg_T *cap);
+static void nv_up(cmdarg_T *cap);
+static void nv_down(cmdarg_T *cap);
+static void nv_gotofile(cmdarg_T *cap);
+static void nv_end(cmdarg_T *cap);
+static void nv_dollar(cmdarg_T *cap);
+static void nv_search(cmdarg_T *cap);
+static void nv_next(cmdarg_T *cap);
+static void normal_search(cmdarg_T *cap, int dir, char_u *pat, int opt);
+static void nv_csearch(cmdarg_T *cap);
+static void nv_brackets(cmdarg_T *cap);
+static void nv_percent(cmdarg_T *cap);
+static void nv_brace(cmdarg_T *cap);
+static void nv_mark(cmdarg_T *cap);
+static void nv_findpar(cmdarg_T *cap);
+static void nv_undo(cmdarg_T *cap);
+static void nv_kundo(cmdarg_T *cap);
+static void nv_Replace(cmdarg_T *cap);
+static void nv_vreplace(cmdarg_T *cap);
+static void v_swap_corners(int cmdchar);
+static void nv_replace(cmdarg_T *cap);
+static void n_swapchar(cmdarg_T *cap);
+static void nv_cursormark(cmdarg_T *cap, int flag, pos_T *pos);
+static void v_visop(cmdarg_T *cap);
+static void nv_subst(cmdarg_T *cap);
+static void nv_abbrev(cmdarg_T *cap);
+static void nv_optrans(cmdarg_T *cap);
+static void nv_gomark(cmdarg_T *cap);
+static void nv_pcmark(cmdarg_T *cap);
+static void nv_regname(cmdarg_T *cap);
+static void nv_visual(cmdarg_T *cap);
+static void n_start_visual_mode(int c);
+static void nv_window(cmdarg_T *cap);
+static void nv_suspend(cmdarg_T *cap);
+static void nv_g_cmd(cmdarg_T *cap);
+static void n_opencmd(cmdarg_T *cap);
+static void nv_dot(cmdarg_T *cap);
+static void nv_redo(cmdarg_T *cap);
+static void nv_Undo(cmdarg_T *cap);
+static void nv_tilde(cmdarg_T *cap);
+static void nv_operator(cmdarg_T *cap);
+static void set_op_var(int optype);
+static void nv_lineop(cmdarg_T *cap);
+static void nv_home(cmdarg_T *cap);
+static void nv_pipe(cmdarg_T *cap);
+static void nv_bck_word(cmdarg_T *cap);
+static void nv_wordcmd(cmdarg_T *cap);
+static void nv_beginline(cmdarg_T *cap);
+static void adjust_cursor(oparg_T *oap);
+static void adjust_for_sel(cmdarg_T *cap);
+static int unadjust_for_sel(void);
+static void nv_select(cmdarg_T *cap);
+static void nv_goto(cmdarg_T *cap);
+static void nv_normal(cmdarg_T *cap);
+static void nv_esc(cmdarg_T *oap);
+static void nv_edit(cmdarg_T *cap);
+static void invoke_edit(cmdarg_T *cap, int repl, int cmd, int startln);
+static void nv_object(cmdarg_T *cap);
+static void nv_record(cmdarg_T *cap);
+static void nv_at(cmdarg_T *cap);
+static void nv_halfpage(cmdarg_T *cap);
+static void nv_join(cmdarg_T *cap);
+static void nv_put(cmdarg_T *cap);
+static void nv_open(cmdarg_T *cap);
+static void nv_cursorhold(cmdarg_T *cap);
static char *e_noident = N_("E349: No identifier under cursor");
@@ -176,7 +176,7 @@ static char *e_noident = N_("E349: No identifier under cursor");
* Function to be called for a Normal or Visual mode command.
* The argument is a cmdarg_T.
*/
-typedef void (*nv_func_T) __ARGS ((cmdarg_T *cap));
+typedef void (*nv_func_T)(cmdarg_T *cap);
/* Values for cmd_flags. */
#define NV_NCH 0x01 /* may need to get a second char */
@@ -2987,7 +2987,7 @@ static char_u old_showcmd_buf[SHOWCMD_BUFLEN]; /* For push_showcmd() */
static int showcmd_is_clear = TRUE;
static int showcmd_visual = FALSE;
-static void display_showcmd __ARGS((void));
+static void display_showcmd(void);
void clear_showcmd(void) {
if (!p_sc)
diff --git a/src/normal.h b/src/normal.h
index 171c4c928d..8f4dc71839 100644
--- a/src/normal.h
+++ b/src/normal.h
@@ -1,32 +1,32 @@
#ifndef NEOVIM_NORMAL_H
#define NEOVIM_NORMAL_H
/* normal.c */
-void init_normal_cmds __ARGS((void));
-void normal_cmd __ARGS((oparg_T *oap, int toplevel));
-void do_pending_operator __ARGS((cmdarg_T *cap, int old_col, int gui_yank));
-int do_mouse __ARGS((oparg_T *oap, int c, int dir, long count, int fixindent));
-void check_visual_highlight __ARGS((void));
-void end_visual_mode __ARGS((void));
-void reset_VIsual_and_resel __ARGS((void));
-void reset_VIsual __ARGS((void));
-int find_ident_under_cursor __ARGS((char_u **string, int find_type));
-int find_ident_at_pos __ARGS((win_T *wp, linenr_T lnum, colnr_T startcol,
- char_u **string,
- int find_type));
-void clear_showcmd __ARGS((void));
-int add_to_showcmd __ARGS((int c));
-void add_to_showcmd_c __ARGS((int c));
-void push_showcmd __ARGS((void));
-void pop_showcmd __ARGS((void));
-void do_check_scrollbind __ARGS((int check));
-void check_scrollbind __ARGS((linenr_T topline_diff, long leftcol_diff));
-int find_decl __ARGS((char_u *ptr, int len, int locally, int thisblock,
- int searchflags));
-void scroll_redraw __ARGS((int up, long count));
-void handle_tabmenu __ARGS((void));
-void do_nv_ident __ARGS((int c1, int c2));
-int get_visual_text __ARGS((cmdarg_T *cap, char_u **pp, int *lenp));
-void start_selection __ARGS((void));
-void may_start_select __ARGS((int c));
+void init_normal_cmds(void);
+void normal_cmd(oparg_T *oap, int toplevel);
+void do_pending_operator(cmdarg_T *cap, int old_col, int gui_yank);
+int do_mouse(oparg_T *oap, int c, int dir, long count, int fixindent);
+void check_visual_highlight(void);
+void end_visual_mode(void);
+void reset_VIsual_and_resel(void);
+void reset_VIsual(void);
+int find_ident_under_cursor(char_u **string, int find_type);
+int find_ident_at_pos(win_T *wp, linenr_T lnum, colnr_T startcol,
+ char_u **string,
+ int find_type);
+void clear_showcmd(void);
+int add_to_showcmd(int c);
+void add_to_showcmd_c(int c);
+void push_showcmd(void);
+void pop_showcmd(void);
+void do_check_scrollbind(int check);
+void check_scrollbind(linenr_T topline_diff, long leftcol_diff);
+int find_decl(char_u *ptr, int len, int locally, int thisblock,
+ int searchflags);
+void scroll_redraw(int up, long count);
+void handle_tabmenu(void);
+void do_nv_ident(int c1, int c2);
+int get_visual_text(cmdarg_T *cap, char_u **pp, int *lenp);
+void start_selection(void);
+void may_start_select(int c);
/* vim: set ft=c : */
#endif /* NEOVIM_NORMAL_H */
diff --git a/src/ops.c b/src/ops.c
index 7c5f53757e..e554021e84 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -90,29 +90,29 @@ struct block_def {
colnr_T start_char_vcols; /* number of vcols of pre-block char */
};
-static void shift_block __ARGS((oparg_T *oap, int amount));
-static void block_insert __ARGS((oparg_T *oap, char_u *s, int b_insert,
- struct block_def*bdp));
-static int stuff_yank __ARGS((int, char_u *));
-static void put_reedit_in_typebuf __ARGS((int silent));
-static int put_in_typebuf __ARGS((char_u *s, int esc, int colon,
- int silent));
-static void stuffescaped __ARGS((char_u *arg, int literally));
-static void mb_adjust_opend __ARGS((oparg_T *oap));
-static void free_yank __ARGS((long));
-static void free_yank_all __ARGS((void));
-static int yank_copy_line __ARGS((struct block_def *bd, long y_idx));
-static void dis_msg __ARGS((char_u *p, int skip_esc));
-static char_u *skip_comment __ARGS((char_u *line, int process,
- int include_space,
- int *is_comment));
-static void block_prep __ARGS((oparg_T *oap, struct block_def *, linenr_T, int));
-static void str_to_reg __ARGS((struct yankreg *y_ptr, int type, char_u *str,
- long len,
- long blocklen));
-static int ends_in_white __ARGS((linenr_T lnum));
-static int same_leader __ARGS((linenr_T lnum, int, char_u *, int, char_u *));
-static int fmt_check_par __ARGS((linenr_T, int *, char_u **, int do_comments));
+static void shift_block(oparg_T *oap, int amount);
+static void block_insert(oparg_T *oap, char_u *s, int b_insert,
+ struct block_def*bdp);
+static int stuff_yank(int, char_u *);
+static void put_reedit_in_typebuf(int silent);
+static int put_in_typebuf(char_u *s, int esc, int colon,
+ int silent);
+static void stuffescaped(char_u *arg, int literally);
+static void mb_adjust_opend(oparg_T *oap);
+static void free_yank(long);
+static void free_yank_all(void);
+static int yank_copy_line(struct block_def *bd, long y_idx);
+static void dis_msg(char_u *p, int skip_esc);
+static char_u *skip_comment(char_u *line, int process,
+ int include_space,
+ int *is_comment);
+static void block_prep(oparg_T *oap, struct block_def *, linenr_T, int);
+static void str_to_reg(struct yankreg *y_ptr, int type, char_u *str,
+ long len,
+ long blocklen);
+static int ends_in_white(linenr_T lnum);
+static int same_leader(linenr_T lnum, int, char_u *, int, char_u *);
+static int fmt_check_par(linenr_T, int *, char_u **, int do_comments);
/*
* The names of operators.
@@ -574,7 +574,7 @@ static void block_insert(oparg_T *oap, char_u *s, int b_insert, struct block_def
*/
void op_reindent(oap, how)
oparg_T *oap;
-int (*how)__ARGS((void));
+int (*how)(void);
{
long i;
char_u *l;
@@ -1890,7 +1890,7 @@ int op_replace(oparg_T *oap, int c)
return OK;
}
-static int swapchars __ARGS((int op_type, pos_T *pos, int length));
+static int swapchars(int op_type, pos_T *pos, int length);
/*
* Handle the (non-standard vi) tilde operator. Also for "gu", "gU" and "g?".
@@ -4257,7 +4257,7 @@ static void block_prep(oparg_T *oap, struct block_def *bdp, linenr_T lnum, int i
bdp->textstart = pstart;
}
-static void reverse_line __ARGS((char_u *s));
+static void reverse_line(char_u *s);
static void reverse_line(char_u *s)
{
@@ -4979,9 +4979,9 @@ void clear_oparg(oparg_T *oap)
vim_memset(oap, 0, sizeof(oparg_T));
}
-static long line_count_info __ARGS((char_u *line, long *wc, long *cc,
- long limit,
- int eol_size));
+static long line_count_info(char_u *line, long *wc, long *cc,
+ long limit,
+ int eol_size);
/*
* Count the number of bytes, characters and "words" in a line.
diff --git a/src/ops.h b/src/ops.h
index f9fcbb2656..eed21ccc79 100644
--- a/src/ops.h
+++ b/src/ops.h
@@ -1,69 +1,69 @@
#ifndef NEOVIM_OPS_H
#define NEOVIM_OPS_H
/* ops.c */
-int get_op_type __ARGS((int char1, int char2));
-int op_on_lines __ARGS((int op));
-int get_op_char __ARGS((int optype));
-int get_extra_op_char __ARGS((int optype));
-void op_shift __ARGS((oparg_T *oap, int curs_top, int amount));
-void shift_line __ARGS((int left, int round, int amount, int call_changed_bytes));
-void op_reindent __ARGS((oparg_T *oap, int (*how)(void)));
-int get_expr_register __ARGS((void));
-void set_expr_line __ARGS((char_u *new_line));
-char_u *get_expr_line __ARGS((void));
-char_u *get_expr_line_src __ARGS((void));
-int valid_yank_reg __ARGS((int regname, int writing));
-void get_yank_register __ARGS((int regname, int writing));
-int may_get_selection __ARGS((int regname));
-void *get_register __ARGS((int name, int copy));
-void put_register __ARGS((int name, void *reg));
-void free_register __ARGS((void *reg));
-int yank_register_mline __ARGS((int regname));
-int do_record __ARGS((int c));
-int do_execreg __ARGS((int regname, int colon, int addcr, int silent));
-int insert_reg __ARGS((int regname, int literally));
-int get_spec_reg __ARGS((int regname, char_u **argp, int *allocated, int errmsg));
-int cmdline_paste_reg __ARGS((int regname, int literally, int remcr));
-void adjust_clip_reg __ARGS((int *rp));
-int op_delete __ARGS((oparg_T *oap));
-int op_replace __ARGS((oparg_T *oap, int c));
-void op_tilde __ARGS((oparg_T *oap));
-int swapchar __ARGS((int op_type, pos_T *pos));
-void op_insert __ARGS((oparg_T *oap, long count1));
-int op_change __ARGS((oparg_T *oap));
-void init_yank __ARGS((void));
-void clear_registers __ARGS((void));
-int op_yank __ARGS((oparg_T *oap, int deleting, int mess));
-void do_put __ARGS((int regname, int dir, long count, int flags));
-void adjust_cursor_eol __ARGS((void));
-int preprocs_left __ARGS((void));
-int get_register_name __ARGS((int num));
-void ex_display __ARGS((exarg_T *eap));
-int do_join __ARGS((long count, int insert_space, int save_undo,
- int use_formatoptions));
-void op_format __ARGS((oparg_T *oap, int keep_cursor));
-void op_formatexpr __ARGS((oparg_T *oap));
-int fex_format __ARGS((linenr_T lnum, long count, int c));
-void format_lines __ARGS((linenr_T line_count, int avoid_fex));
-int paragraph_start __ARGS((linenr_T lnum));
-int do_addsub __ARGS((int command, linenr_T Prenum1));
-int read_viminfo_register __ARGS((vir_T *virp, int force));
-void write_viminfo_registers __ARGS((FILE *fp));
-void x11_export_final_selection __ARGS((void));
-void clip_free_selection __ARGS((VimClipboard *cbd));
-void clip_get_selection __ARGS((VimClipboard *cbd));
-void clip_yank_selection __ARGS((int type, char_u *str, long len,
- VimClipboard *cbd));
-int clip_convert_selection __ARGS((char_u **str, long_u *len, VimClipboard *cbd));
-void dnd_yank_drag_data __ARGS((char_u *str, long len));
-char_u get_reg_type __ARGS((int regname, long *reglen));
-char_u *get_reg_contents __ARGS((int regname, int allowexpr, int expr_src));
-void write_reg_contents __ARGS((int name, char_u *str, int maxlen,
- int must_append));
-void write_reg_contents_ex __ARGS((int name, char_u *str, int maxlen,
- int must_append, int yank_type,
- long block_len));
-void clear_oparg __ARGS((oparg_T *oap));
-void cursor_pos_info __ARGS((void));
+int get_op_type(int char1, int char2);
+int op_on_lines(int op);
+int get_op_char(int optype);
+int get_extra_op_char(int optype);
+void op_shift(oparg_T *oap, int curs_top, int amount);
+void shift_line(int left, int round, int amount, int call_changed_bytes);
+void op_reindent(oparg_T *oap, int (*how)(void));
+int get_expr_register(void);
+void set_expr_line(char_u *new_line);
+char_u *get_expr_line(void);
+char_u *get_expr_line_src(void);
+int valid_yank_reg(int regname, int writing);
+void get_yank_register(int regname, int writing);
+int may_get_selection(int regname);
+void *get_register(int name, int copy);
+void put_register(int name, void *reg);
+void free_register(void *reg);
+int yank_register_mline(int regname);
+int do_record(int c);
+int do_execreg(int regname, int colon, int addcr, int silent);
+int insert_reg(int regname, int literally);
+int get_spec_reg(int regname, char_u **argp, int *allocated, int errmsg);
+int cmdline_paste_reg(int regname, int literally, int remcr);
+void adjust_clip_reg(int *rp);
+int op_delete(oparg_T *oap);
+int op_replace(oparg_T *oap, int c);
+void op_tilde(oparg_T *oap);
+int swapchar(int op_type, pos_T *pos);
+void op_insert(oparg_T *oap, long count1);
+int op_change(oparg_T *oap);
+void init_yank(void);
+void clear_registers(void);
+int op_yank(oparg_T *oap, int deleting, int mess);
+void do_put(int regname, int dir, long count, int flags);
+void adjust_cursor_eol(void);
+int preprocs_left(void);
+int get_register_name(int num);
+void ex_display(exarg_T *eap);
+int do_join(long count, int insert_space, int save_undo,
+ int use_formatoptions);
+void op_format(oparg_T *oap, int keep_cursor);
+void op_formatexpr(oparg_T *oap);
+int fex_format(linenr_T lnum, long count, int c);
+void format_lines(linenr_T line_count, int avoid_fex);
+int paragraph_start(linenr_T lnum);
+int do_addsub(int command, linenr_T Prenum1);
+int read_viminfo_register(vir_T *virp, int force);
+void write_viminfo_registers(FILE *fp);
+void x11_export_final_selection(void);
+void clip_free_selection(VimClipboard *cbd);
+void clip_get_selection(VimClipboard *cbd);
+void clip_yank_selection(int type, char_u *str, long len,
+ VimClipboard *cbd);
+int clip_convert_selection(char_u **str, long_u *len, VimClipboard *cbd);
+void dnd_yank_drag_data(char_u *str, long len);
+char_u get_reg_type(int regname, long *reglen);
+char_u *get_reg_contents(int regname, int allowexpr, int expr_src);
+void write_reg_contents(int name, char_u *str, int maxlen,
+ int must_append);
+void write_reg_contents_ex(int name, char_u *str, int maxlen,
+ int must_append, int yank_type,
+ long block_len);
+void clear_oparg(oparg_T *oap);
+void cursor_pos_info(void);
/* vim: set ft=c : */
#endif /* NEOVIM_OPS_H */
diff --git a/src/option.c b/src/option.c
index 50335cd9db..375a8f6f4e 100644
--- a/src/option.c
+++ b/src/option.c
@@ -1893,60 +1893,59 @@ static char *(p_fdm_values[]) = {"manual", "expr", "marker", "indent", "syntax",
static char *(p_fcl_values[]) = {"all", NULL};
static char *(p_cot_values[]) = {"menu", "menuone", "longest", "preview", NULL};
-static void set_option_default __ARGS((int, int opt_flags, int compatible));
-static void set_options_default __ARGS((int opt_flags));
-static char_u *term_bg_default __ARGS((void));
-static void did_set_option __ARGS((int opt_idx, int opt_flags, int new_value));
-static char_u *illegal_char __ARGS((char_u *, int));
-static int string_to_key __ARGS((char_u *arg));
-static char_u *check_cedit __ARGS((void));
-static void did_set_title __ARGS((int icon));
-static char_u *option_expand __ARGS((int opt_idx, char_u *val));
-static void didset_options __ARGS((void));
-static void check_string_option __ARGS((char_u **pp));
-static long_u *insecure_flag __ARGS((int opt_idx, int opt_flags));
-static void set_string_option_global __ARGS((int opt_idx, char_u **varp));
-static char_u *set_string_option __ARGS((int opt_idx, char_u *value,
- int opt_flags));
-static char_u *did_set_string_option __ARGS((int opt_idx, char_u **varp,
- int new_value_alloced, char_u *
- oldval, char_u *errbuf,
- int opt_flags));
-static char_u *set_chars_option __ARGS((char_u **varp));
-static int int_cmp __ARGS((const void *a, const void *b));
-static char_u *compile_cap_prog __ARGS((synblock_T *synblock));
-static void set_option_scriptID_idx __ARGS((int opt_idx, int opt_flags, int id));
-static char_u *set_bool_option __ARGS((int opt_idx, char_u *varp, int value,
- int opt_flags));
-static char_u *set_num_option __ARGS((int opt_idx, char_u *varp, long value,
- char_u *errbuf, size_t errbuflen,
- int opt_flags));
-static void check_redraw __ARGS((long_u flags));
-static int findoption __ARGS((char_u *));
-static int find_key_option __ARGS((char_u *));
-static void showoptions __ARGS((int all, int opt_flags));
-static int optval_default __ARGS((struct vimoption *, char_u *varp));
-static void showoneopt __ARGS((struct vimoption *, int opt_flags));
-static int put_setstring __ARGS((FILE *fd, char *cmd, char *name, char_u *
- *valuep,
- int expand));
-static int put_setnum __ARGS((FILE *fd, char *cmd, char *name, long *valuep));
-static int put_setbool __ARGS((FILE *fd, char *cmd, char *name, int value));
-static int istermoption __ARGS((struct vimoption *));
-static char_u *get_varp_scope __ARGS((struct vimoption *p, int opt_flags));
-static char_u *get_varp __ARGS((struct vimoption *));
-static void option_value2string __ARGS((struct vimoption *, int opt_flags));
-static int wc_use_keyname __ARGS((char_u *varp, long *wcp));
-static void langmap_init __ARGS((void));
-static void langmap_set __ARGS((void));
-static void paste_option_changed __ARGS((void));
-static void compatible_set __ARGS((void));
-static void fill_breakat_flags __ARGS((void));
-static int opt_strings_flags __ARGS((char_u *val, char **values,
- unsigned *flagp,
- int list));
-static int check_opt_strings __ARGS((char_u *val, char **values, int));
-static int check_opt_wim __ARGS((void));
+static void set_option_default(int, int opt_flags, int compatible);
+static void set_options_default(int opt_flags);
+static char_u *term_bg_default(void);
+static void did_set_option(int opt_idx, int opt_flags, int new_value);
+static char_u *illegal_char(char_u *, int);
+static int string_to_key(char_u *arg);
+static char_u *check_cedit(void);
+static void did_set_title(int icon);
+static char_u *option_expand(int opt_idx, char_u *val);
+static void didset_options(void);
+static void check_string_option(char_u **pp);
+static long_u *insecure_flag(int opt_idx, int opt_flags);
+static void set_string_option_global(int opt_idx, char_u **varp);
+static char_u *set_string_option(int opt_idx, char_u *value,
+ int opt_flags);
+static char_u *did_set_string_option(int opt_idx, char_u **varp,
+ int new_value_alloced,
+ char_u *oldval, char_u *errbuf,
+ int opt_flags);
+static char_u *set_chars_option(char_u **varp);
+static int int_cmp(const void *a, const void *b);
+static char_u *compile_cap_prog(synblock_T *synblock);
+static void set_option_scriptID_idx(int opt_idx, int opt_flags, int id);
+static char_u *set_bool_option(int opt_idx, char_u *varp, int value,
+ int opt_flags);
+static char_u *set_num_option(int opt_idx, char_u *varp, long value,
+ char_u *errbuf, size_t errbuflen,
+ int opt_flags);
+static void check_redraw(long_u flags);
+static int findoption(char_u *);
+static int find_key_option(char_u *);
+static void showoptions(int all, int opt_flags);
+static int optval_default(struct vimoption *, char_u *varp);
+static void showoneopt(struct vimoption *, int opt_flags);
+static int put_setstring(FILE *fd, char *cmd, char *name, char_u **valuep,
+ int expand);
+static int put_setnum(FILE *fd, char *cmd, char *name, long *valuep);
+static int put_setbool(FILE *fd, char *cmd, char *name, int value);
+static int istermoption(struct vimoption *);
+static char_u *get_varp_scope(struct vimoption *p, int opt_flags);
+static char_u *get_varp(struct vimoption *);
+static void option_value2string(struct vimoption *, int opt_flags);
+static int wc_use_keyname(char_u *varp, long *wcp);
+static void langmap_init(void);
+static void langmap_set(void);
+static void paste_option_changed(void);
+static void compatible_set(void);
+static void fill_breakat_flags(void);
+static int opt_strings_flags(char_u *val, char **values,
+ unsigned *flagp,
+ int list);
+static int check_opt_strings(char_u *val, char **values, int);
+static int check_opt_wim(void);
/*
* Initialize the options, first part.
@@ -3759,7 +3758,7 @@ static long_u *insecure_flag(int opt_idx, int opt_flags)
return &options[opt_idx].flags;
}
-static void redraw_titles __ARGS((void));
+static void redraw_titles(void);
/*
* Redraw the window title and/or tab page text later.
@@ -7637,7 +7636,7 @@ typedef struct {
} langmap_entry_T;
static garray_T langmap_mapga;
-static void langmap_set_entry __ARGS((int from, int to));
+static void langmap_set_entry(int from, int to);
/*
* Search for an entry in "langmap_mapga" for "from". If found set the "to"
diff --git a/src/option.h b/src/option.h
index e8332cd2aa..f054bfe10e 100644
--- a/src/option.h
+++ b/src/option.h
@@ -1,77 +1,77 @@
#ifndef NEOVIM_OPTION_H
#define NEOVIM_OPTION_H
/* option.c */
-void set_init_1 __ARGS((void));
-void set_string_default __ARGS((char *name, char_u *val));
-void set_number_default __ARGS((char *name, long val));
-void free_all_options __ARGS((void));
-void set_init_2 __ARGS((void));
-void set_init_3 __ARGS((void));
-void set_helplang_default __ARGS((char_u *lang));
-void init_gui_options __ARGS((void));
-void set_title_defaults __ARGS((void));
-int do_set __ARGS((char_u *arg, int opt_flags));
-void set_options_bin __ARGS((int oldval, int newval, int opt_flags));
-int get_viminfo_parameter __ARGS((int type));
-char_u *find_viminfo_parameter __ARGS((int type));
-void check_options __ARGS((void));
-void check_buf_options __ARGS((buf_T *buf));
-void free_string_option __ARGS((char_u *p));
-void clear_string_option __ARGS((char_u **pp));
-void set_term_option_alloced __ARGS((char_u **p));
-int was_set_insecurely __ARGS((char_u *opt, int opt_flags));
-void set_string_option_direct __ARGS((char_u *name, int opt_idx, char_u *val,
+void set_init_1(void);
+void set_string_default(char *name, char_u *val);
+void set_number_default(char *name, long val);
+void free_all_options(void);
+void set_init_2(void);
+void set_init_3(void);
+void set_helplang_default(char_u *lang);
+void init_gui_options(void);
+void set_title_defaults(void);
+int do_set(char_u *arg, int opt_flags);
+void set_options_bin(int oldval, int newval, int opt_flags);
+int get_viminfo_parameter(int type);
+char_u *find_viminfo_parameter(int type);
+void check_options(void);
+void check_buf_options(buf_T *buf);
+void free_string_option(char_u *p);
+void clear_string_option(char_u **pp);
+void set_term_option_alloced(char_u **p);
+int was_set_insecurely(char_u *opt, int opt_flags);
+void set_string_option_direct(char_u *name, int opt_idx, char_u *val,
int opt_flags,
- int set_sid));
-char_u *check_colorcolumn __ARGS((win_T *wp));
-char_u *check_stl_option __ARGS((char_u *s));
-int get_option_value __ARGS((char_u *name, long *numval, char_u **stringval,
- int opt_flags));
-int get_option_value_strict __ARGS((char_u *name, long *numval, char_u *
+ int set_sid);
+char_u *check_colorcolumn(win_T *wp);
+char_u *check_stl_option(char_u *s);
+int get_option_value(char_u *name, long *numval, char_u **stringval,
+ int opt_flags);
+int get_option_value_strict(char_u *name, long *numval, char_u *
*stringval, int opt_type,
- void *from));
-char_u *option_iter_next __ARGS((void **option, int opt_type));
-char_u *set_option_value __ARGS((char_u *name, long number, char_u *string,
- int opt_flags));
-char_u *get_term_code __ARGS((char_u *tname));
-char_u *get_highlight_default __ARGS((void));
-char_u *get_encoding_default __ARGS((void));
-int makeset __ARGS((FILE *fd, int opt_flags, int local_only));
-int makefoldset __ARGS((FILE *fd));
-void clear_termoptions __ARGS((void));
-void free_termoptions __ARGS((void));
-void free_one_termoption __ARGS((char_u *var));
-void set_term_defaults __ARGS((void));
-void comp_col __ARGS((void));
-void unset_global_local_option __ARGS((char_u *name, void *from));
-char_u *get_equalprg __ARGS((void));
-void win_copy_options __ARGS((win_T *wp_from, win_T *wp_to));
-void copy_winopt __ARGS((winopt_T *from, winopt_T *to));
-void check_win_options __ARGS((win_T *win));
-void check_winopt __ARGS((winopt_T *wop));
-void clear_winopt __ARGS((winopt_T *wop));
-void buf_copy_options __ARGS((buf_T *buf, int flags));
-void reset_modifiable __ARGS((void));
-void set_iminsert_global __ARGS((void));
-void set_imsearch_global __ARGS((void));
-void set_context_in_set_cmd __ARGS((expand_T *xp, char_u *arg, int opt_flags));
-int ExpandSettings __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file,
- char_u ***file));
-int ExpandOldSetting __ARGS((int *num_file, char_u ***file));
-int langmap_adjust_mb __ARGS((int c));
-int has_format_option __ARGS((int x));
-int shortmess __ARGS((int x));
-void vimrc_found __ARGS((char_u *fname, char_u *envname));
-void change_compatible __ARGS((int on));
-int option_was_set __ARGS((char_u *name));
-void reset_option_was_set __ARGS((char_u *name));
-int can_bs __ARGS((int what));
-void save_file_ff __ARGS((buf_T *buf));
-int file_ff_differs __ARGS((buf_T *buf, int ignore_empty));
-int check_ff_value __ARGS((char_u *p));
-long get_sw_value __ARGS((buf_T *buf));
-long get_sts_value __ARGS((void));
-void find_mps_values __ARGS((int *initc, int *findc, int *backwards,
- int switchit));
+ void *from);
+char_u *option_iter_next(void **option, int opt_type);
+char_u *set_option_value(char_u *name, long number, char_u *string,
+ int opt_flags);
+char_u *get_term_code(char_u *tname);
+char_u *get_highlight_default(void);
+char_u *get_encoding_default(void);
+int makeset(FILE *fd, int opt_flags, int local_only);
+int makefoldset(FILE *fd);
+void clear_termoptions(void);
+void free_termoptions(void);
+void free_one_termoption(char_u *var);
+void set_term_defaults(void);
+void comp_col(void);
+void unset_global_local_option(char_u *name, void *from);
+char_u *get_equalprg(void);
+void win_copy_options(win_T *wp_from, win_T *wp_to);
+void copy_winopt(winopt_T *from, winopt_T *to);
+void check_win_options(win_T *win);
+void check_winopt(winopt_T *wop);
+void clear_winopt(winopt_T *wop);
+void buf_copy_options(buf_T *buf, int flags);
+void reset_modifiable(void);
+void set_iminsert_global(void);
+void set_imsearch_global(void);
+void set_context_in_set_cmd(expand_T *xp, char_u *arg, int opt_flags);
+int ExpandSettings(expand_T *xp, regmatch_T *regmatch, int *num_file,
+ char_u ***file);
+int ExpandOldSetting(int *num_file, char_u ***file);
+int langmap_adjust_mb(int c);
+int has_format_option(int x);
+int shortmess(int x);
+void vimrc_found(char_u *fname, char_u *envname);
+void change_compatible(int on);
+int option_was_set(char_u *name);
+void reset_option_was_set(char_u *name);
+int can_bs(int what);
+void save_file_ff(buf_T *buf);
+int file_ff_differs(buf_T *buf, int ignore_empty);
+int check_ff_value(char_u *p);
+long get_sw_value(buf_T *buf);
+long get_sts_value(void);
+void find_mps_values(int *initc, int *findc, int *backwards,
+ int switchit);
/* vim: set ft=c : */
#endif /* NEOVIM_OPTION_H */
diff --git a/src/os_unix.c b/src/os_unix.c
index d80ef00f5e..4456a1110f 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -62,7 +62,7 @@ static int selinux_enabled = -1;
#if defined(HAVE_SELECT)
-extern int select __ARGS((int, fd_set *, fd_set *, fd_set *, struct timeval *));
+extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
#endif
@@ -87,49 +87,49 @@ extern int select __ARGS((int, fd_set *, fd_set *, fd_set *, struct timeval *));
#endif
-static int get_x11_title __ARGS((int));
-static int get_x11_icon __ARGS((int));
+static int get_x11_title(int);
+static int get_x11_icon(int);
static char_u *oldtitle = NULL;
static int did_set_title = FALSE;
static char_u *oldicon = NULL;
static int did_set_icon = FALSE;
-static void may_core_dump __ARGS((void));
+static void may_core_dump(void);
#ifdef HAVE_UNION_WAIT
typedef union wait waitstatus;
#else
typedef int waitstatus;
#endif
-static pid_t wait4pid __ARGS((pid_t, waitstatus *));
+static pid_t wait4pid(pid_t, waitstatus *);
-static int WaitForChar __ARGS((long));
-static int RealWaitForChar __ARGS((int, long, int *));
+static int WaitForChar(long);
+static int RealWaitForChar(int, long, int *);
-static void handle_resize __ARGS((void));
+static void handle_resize(void);
#if defined(SIGWINCH)
-static RETSIGTYPE sig_winch __ARGS(SIGPROTOARG);
+static RETSIGTYPE sig_winch SIGPROTOARG;
#endif
#if defined(SIGINT)
-static RETSIGTYPE catch_sigint __ARGS(SIGPROTOARG);
+static RETSIGTYPE catch_sigint SIGPROTOARG;
#endif
#if defined(SIGPWR)
-static RETSIGTYPE catch_sigpwr __ARGS(SIGPROTOARG);
+static RETSIGTYPE catch_sigpwr SIGPROTOARG;
#endif
-static RETSIGTYPE deathtrap __ARGS(SIGPROTOARG);
+static RETSIGTYPE deathtrap SIGPROTOARG;
-static void catch_int_signal __ARGS((void));
-static void set_signals __ARGS((void));
-static void catch_signals __ARGS(
- (RETSIGTYPE (*func_deadly)(), RETSIGTYPE (*func_other)()));
-static int have_wildcard __ARGS((int, char_u **));
-static int have_dollars __ARGS((int, char_u **));
+static void catch_int_signal(void);
+static void set_signals(void);
+static void catch_signals
+ (RETSIGTYPE (*func_deadly)(), RETSIGTYPE (*func_other)());
+static int have_wildcard(int, char_u **);
+static int have_dollars(int, char_u **);
-static int save_patterns __ARGS((int num_pat, char_u **pat, int *num_file,
- char_u ***file));
+static int save_patterns(int num_pat, char_u **pat, int *num_file,
+ char_u ***file);
#ifndef SIG_ERR
# define SIG_ERR ((RETSIGTYPE (*)())-1)
@@ -408,7 +408,7 @@ void mch_delay(long msec, int ignoreinput)
* Return a pointer to an item on the stack. Used to find out if the stack
* grows up or down.
*/
-static void check_stack_growth __ARGS((char *p));
+static void check_stack_growth(char *p);
static int stack_grows_downwards;
/*
@@ -515,7 +515,7 @@ static stack_t sigstk; /* for sigaltstack() */
static struct sigstack sigstk; /* for sigstack() */
# endif
-static void init_signal_stack __ARGS((void));
+static void init_signal_stack(void);
static char *signal_stack;
static void init_signal_stack() {
@@ -765,7 +765,7 @@ deathtrap SIGDEFARG(sigarg) {
* volatile because it is used in signal handler sigcont_handler().
*/
static volatile int sigcont_received;
-static RETSIGTYPE sigcont_handler __ARGS(SIGPROTOARG);
+static RETSIGTYPE sigcont_handler SIGPROTOARG;
/*
* signal handler for SIGCONT
@@ -1445,7 +1445,7 @@ int mch_isdir(char_u *name)
#endif
}
-static int executable_file __ARGS((char_u *name));
+static int executable_file(char_u *name);
/*
* Return 1 if "name" is an executable file, 0 if not or it doesn't exist.
@@ -1566,7 +1566,7 @@ void mch_free_mem() {
#endif
-static void exit_scroll __ARGS((void));
+static void exit_scroll(void);
/*
* Output a newline when exiting.
@@ -3556,10 +3556,10 @@ const char *src, *dest;
#if defined(FEAT_LIBCALL) || defined(PROTO)
-typedef char_u * (*STRPROCSTR) __ARGS ((char_u *));
-typedef char_u * (*INTPROCSTR) __ARGS ((int));
-typedef int (*STRPROCINT) __ARGS ((char_u *));
-typedef int (*INTPROCINT) __ARGS ((int));
+typedef char_u * (*STRPROCSTR)(char_u *);
+typedef char_u * (*INTPROCSTR)(int);
+typedef int (*STRPROCINT)(char_u *);
+typedef int (*INTPROCINT)(int);
/*
* Call a DLL routine which takes either a string or int param
diff --git a/src/os_unix.h b/src/os_unix.h
index 3a20c49252..79cabd0edf 100644
--- a/src/os_unix.h
+++ b/src/os_unix.h
@@ -1,78 +1,78 @@
#ifndef NEOVIM_OS_UNIX_H
#define NEOVIM_OS_UNIX_H
/* os_unix.c */
-void mch_write __ARGS((char_u *s, int len));
-int mch_inchar __ARGS((char_u *buf, int maxlen, long wtime, int tb_change_cnt));
-int mch_char_avail __ARGS((void));
-void mch_delay __ARGS((long msec, int ignoreinput));
-int mch_stackcheck __ARGS((char *p));
-void mch_startjmp __ARGS((void));
-void mch_endjmp __ARGS((void));
-void mch_didjmp __ARGS((void));
-void mch_suspend __ARGS((void));
-void mch_init __ARGS((void));
-void reset_signals __ARGS((void));
-int vim_handle_signal __ARGS((int sig));
-int mch_check_win __ARGS((int argc, char **argv));
-int mch_input_isatty __ARGS((void));
-int mch_can_restore_title __ARGS((void));
-int mch_can_restore_icon __ARGS((void));
-void mch_settitle __ARGS((char_u *title, char_u *icon));
-void mch_restore_title __ARGS((int which));
-int vim_is_xterm __ARGS((char_u *name));
-int use_xterm_like_mouse __ARGS((char_u *name));
-int use_xterm_mouse __ARGS((void));
-int vim_is_iris __ARGS((char_u *name));
-int vim_is_vt300 __ARGS((char_u *name));
-int vim_is_fastterm __ARGS((char_u *name));
-int mch_get_user_name __ARGS((char_u *s, int len));
-int mch_get_uname __ARGS((uid_t uid, char_u *s, int len));
-void mch_get_host_name __ARGS((char_u *s, int len));
-long mch_get_pid __ARGS((void));
-void slash_adjust __ARGS((char_u *p));
-void fname_case __ARGS((char_u *name, int len));
-long mch_getperm __ARGS((char_u *name));
-int mch_setperm __ARGS((char_u *name, long perm));
-void mch_copy_sec __ARGS((char_u *from_file, char_u *to_file));
-vim_acl_T mch_get_acl __ARGS((char_u *fname));
-void mch_set_acl __ARGS((char_u *fname, vim_acl_T aclent));
-void mch_free_acl __ARGS((vim_acl_T aclent));
-void mch_hide __ARGS((char_u *name));
-int mch_isdir __ARGS((char_u *name));
-int mch_can_exe __ARGS((char_u *name));
-int mch_nodetype __ARGS((char_u *name));
-void mch_early_init __ARGS((void));
-void mch_free_mem __ARGS((void));
-void mch_exit __ARGS((int r));
-void mch_settmode __ARGS((int tmode));
-void get_stty __ARGS((void));
-void mch_setmouse __ARGS((int on));
-void check_mouse_termcode __ARGS((void));
-int mch_screenmode __ARGS((char_u *arg));
-int mch_get_shellsize __ARGS((void));
-void mch_set_shellsize __ARGS((void));
-void mch_new_shellsize __ARGS((void));
-int mch_call_shell __ARGS((char_u *cmd, int options));
-void mch_breakcheck __ARGS((void));
-int mch_expandpath __ARGS((garray_T *gap, char_u *path, int flags));
-int mch_expand_wildcards __ARGS((int num_pat, char_u **pat, int *num_file,
- char_u ***file,
- int flags));
-int mch_has_exp_wildcard __ARGS((char_u *p));
-int mch_has_wildcard __ARGS((char_u *p));
-int mch_libcall __ARGS((char_u *libname, char_u *funcname, char_u *argstring,
- int argint, char_u **string_result,
- int *number_result));
-void setup_term_clip __ARGS((void));
-void start_xterm_trace __ARGS((int button));
-void stop_xterm_trace __ARGS((void));
-void clear_xterm_clip __ARGS((void));
-int clip_xterm_own_selection __ARGS((VimClipboard *cbd));
-void clip_xterm_lose_selection __ARGS((VimClipboard *cbd));
-void clip_xterm_request_selection __ARGS((VimClipboard *cbd));
-void clip_xterm_set_selection __ARGS((VimClipboard *cbd));
-int xsmp_handle_requests __ARGS((void));
-void xsmp_init __ARGS((void));
-void xsmp_close __ARGS((void));
+void mch_write(char_u *s, int len);
+int mch_inchar(char_u *buf, int maxlen, long wtime, int tb_change_cnt);
+int mch_char_avail(void);
+void mch_delay(long msec, int ignoreinput);
+int mch_stackcheck(char *p);
+void mch_startjmp(void);
+void mch_endjmp(void);
+void mch_didjmp(void);
+void mch_suspend(void);
+void mch_init(void);
+void reset_signals(void);
+int vim_handle_signal(int sig);
+int mch_check_win(int argc, char **argv);
+int mch_input_isatty(void);
+int mch_can_restore_title(void);
+int mch_can_restore_icon(void);
+void mch_settitle(char_u *title, char_u *icon);
+void mch_restore_title(int which);
+int vim_is_xterm(char_u *name);
+int use_xterm_like_mouse(char_u *name);
+int use_xterm_mouse(void);
+int vim_is_iris(char_u *name);
+int vim_is_vt300(char_u *name);
+int vim_is_fastterm(char_u *name);
+int mch_get_user_name(char_u *s, int len);
+int mch_get_uname(uid_t uid, char_u *s, int len);
+void mch_get_host_name(char_u *s, int len);
+long mch_get_pid(void);
+void slash_adjust(char_u *p);
+void fname_case(char_u *name, int len);
+long mch_getperm(char_u *name);
+int mch_setperm(char_u *name, long perm);
+void mch_copy_sec(char_u *from_file, char_u *to_file);
+vim_acl_T mch_get_acl(char_u *fname);
+void mch_set_acl(char_u *fname, vim_acl_T aclent);
+void mch_free_acl(vim_acl_T aclent);
+void mch_hide(char_u *name);
+int mch_isdir(char_u *name);
+int mch_can_exe(char_u *name);
+int mch_nodetype(char_u *name);
+void mch_early_init(void);
+void mch_free_mem(void);
+void mch_exit(int r);
+void mch_settmode(int tmode);
+void get_stty(void);
+void mch_setmouse(int on);
+void check_mouse_termcode(void);
+int mch_screenmode(char_u *arg);
+int mch_get_shellsize(void);
+void mch_set_shellsize(void);
+void mch_new_shellsize(void);
+int mch_call_shell(char_u *cmd, int options);
+void mch_breakcheck(void);
+int mch_expandpath(garray_T *gap, char_u *path, int flags);
+int mch_expand_wildcards(int num_pat, char_u **pat, int *num_file,
+ char_u ***file,
+ int flags);
+int mch_has_exp_wildcard(char_u *p);
+int mch_has_wildcard(char_u *p);
+int mch_libcall(char_u *libname, char_u *funcname, char_u *argstring,
+ int argint, char_u **string_result,
+ int *number_result);
+void setup_term_clip(void);
+void start_xterm_trace(int button);
+void stop_xterm_trace(void);
+void clear_xterm_clip(void);
+int clip_xterm_own_selection(VimClipboard *cbd);
+void clip_xterm_lose_selection(VimClipboard *cbd);
+void clip_xterm_request_selection(VimClipboard *cbd);
+void clip_xterm_set_selection(VimClipboard *cbd);
+int xsmp_handle_requests(void);
+void xsmp_init(void);
+void xsmp_close(void);
/* vim: set ft=c : */
#endif /* NEOVIM_OS_UNIX_H */
diff --git a/src/os_unix_defs.h b/src/os_unix_defs.h
index 3eb79e9a25..3aacac69a0 100644
--- a/src/os_unix_defs.h
+++ b/src/os_unix_defs.h
@@ -42,16 +42,6 @@
* Sun defines FILE on SunOS 4.x.x, Solaris has a typedef for FILE
*/
-#ifndef __ARGS
-/* The AIX VisualAge cc compiler defines __EXTENDED__ instead of __STDC__
- * because it includes pre-ansi features. */
-# if defined(__STDC__) || defined(__GNUC__) || defined(__EXTENDED__)
-# define __ARGS(x) x
-# else
-# define __ARGS(x) ()
-# endif
-#endif
-
/* always use unlink() to remove files */
# define vim_mkdir(x, y) mkdir((char *)(x), y)
# define mch_rmdir(x) rmdir((char *)(x))
@@ -135,10 +125,6 @@
# include <pwd.h>
#endif
-#ifdef __COHERENT__
-# undef __ARGS
-#endif
-
/*
* Unix system-dependent file names
*/
@@ -292,7 +278,7 @@
# ifdef HAVE_RENAME
# define mch_rename(src, dst) rename(src, dst)
# else
-int mch_rename __ARGS((const char *src, const char *dest));
+int mch_rename(const char *src, const char *dest);
# endif
# ifdef __MVS__
/* on OS390 Unix getenv() doesn't return a pointer to persistent
diff --git a/src/popupmnu.c b/src/popupmnu.c
index 293e1f0bb2..7ae9018e0c 100644
--- a/src/popupmnu.c
+++ b/src/popupmnu.c
@@ -38,7 +38,7 @@ static int pum_col; /* left column of pum */
static int pum_do_redraw = FALSE; /* do redraw anyway */
-static int pum_set_selected __ARGS((int n, int repeat));
+static int pum_set_selected(int n, int repeat);
#define PUM_DEF_HEIGHT 10
#define PUM_DEF_WIDTH 15
diff --git a/src/popupmnu.h b/src/popupmnu.h
index 8a619fdb36..9c0bdb2d7b 100644
--- a/src/popupmnu.h
+++ b/src/popupmnu.h
@@ -1,11 +1,11 @@
#ifndef NEOVIM_POPUPMNU_H
#define NEOVIM_POPUPMNU_H
/* popupmnu.c */
-void pum_display __ARGS((pumitem_T *array, int size, int selected));
-void pum_redraw __ARGS((void));
-void pum_undisplay __ARGS((void));
-void pum_clear __ARGS((void));
-int pum_visible __ARGS((void));
-int pum_get_height __ARGS((void));
+void pum_display(pumitem_T *array, int size, int selected);
+void pum_redraw(void);
+void pum_undisplay(void);
+void pum_clear(void);
+int pum_visible(void);
+int pum_get_height(void);
/* vim: set ft=c : */
#endif /* NEOVIM_POPUPMNU_H */
diff --git a/src/proto.h b/src/proto.h
index 5037dfa26f..ad463bd370 100644
--- a/src/proto.h
+++ b/src/proto.h
@@ -30,16 +30,16 @@
/* These prototypes cannot be produced automatically and conflict with
* the old-style prototypes in message.c. */
int
-smsg __ARGS((char_u *, ...));
+smsg(char_u *, ...);
int
-smsg_attr __ARGS((int, char_u *, ...));
+smsg_attr(int, char_u *, ...);
int
-vim_snprintf_add __ARGS((char *, size_t, char *, ...));
+vim_snprintf_add(char *, size_t, char *, ...);
int
-vim_snprintf __ARGS((char *, size_t, char *, ...));
+vim_snprintf(char *, size_t, char *, ...);
# if defined(HAVE_STDARG_H)
int vim_vsnprintf(char *str, size_t str_m, char *fmt, va_list ap, typval_T *tvs);
@@ -47,12 +47,12 @@ int vim_vsnprintf(char *str, size_t str_m, char *fmt, va_list ap, typval_T *tvs)
# endif
#ifndef HAVE_STRPBRK /* not generated automatically from misc2.c */
-char_u *vim_strpbrk __ARGS((char_u *s, char_u *charset));
+char_u *vim_strpbrk(char_u *s, char_u *charset);
#endif
#ifndef HAVE_QSORT
/* Use our own qsort(), don't define the prototype when not used. */
-void qsort __ARGS((void *base, size_t elm_count, size_t elm_size, int (*cmp)(
- const void *, const void *)));
+void qsort(void *base, size_t elm_count, size_t elm_size,
+ int (*cmp)(const void *, const void *));
#endif
/* Ugly solution for "BalloonEval" not being defined while it's used in some
diff --git a/src/quickfix.c b/src/quickfix.c
index af134d19f9..f429b533a3 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -129,42 +129,42 @@ struct efm_S {
int conthere; /* %> used */
};
-static int qf_init_ext __ARGS((qf_info_T *qi, char_u *efile, buf_T *buf,
- typval_T *tv, char_u *errorformat, int newlist,
- linenr_T lnumfirst,
- linenr_T lnumlast,
- char_u *qf_title));
-static void qf_new_list __ARGS((qf_info_T *qi, char_u *qf_title));
-static void ll_free_all __ARGS((qf_info_T **pqi));
-static int qf_add_entry __ARGS((qf_info_T *qi, qfline_T **prevp, char_u *dir,
- char_u *fname, int bufnum, char_u *mesg,
- long lnum, int col, int vis_col,
- char_u *pattern, int nr, int type,
- int valid));
-static qf_info_T *ll_new_list __ARGS((void));
-static void qf_msg __ARGS((qf_info_T *qi));
-static void qf_free __ARGS((qf_info_T *qi, int idx));
-static char_u *qf_types __ARGS((int, int));
-static int qf_get_fnum __ARGS((char_u *, char_u *));
-static char_u *qf_push_dir __ARGS((char_u *, struct dir_stack_T **));
-static char_u *qf_pop_dir __ARGS((struct dir_stack_T **));
-static char_u *qf_guess_filepath __ARGS((char_u *));
-static void qf_fmt_text __ARGS((char_u *text, char_u *buf, int bufsize));
-static void qf_clean_dir_stack __ARGS((struct dir_stack_T **));
-static int qf_win_pos_update __ARGS((qf_info_T *qi, int old_qf_index));
-static int is_qf_win __ARGS((win_T *win, qf_info_T *qi));
-static win_T *qf_find_win __ARGS((qf_info_T *qi));
-static buf_T *qf_find_buf __ARGS((qf_info_T *qi));
-static void qf_update_buffer __ARGS((qf_info_T *qi));
-static void qf_set_title __ARGS((qf_info_T *qi));
-static void qf_fill_buffer __ARGS((qf_info_T *qi));
-static char_u *get_mef_name __ARGS((void));
-static void restore_start_dir __ARGS((char_u *dirname_start));
-static buf_T *load_dummy_buffer __ARGS((char_u *fname, char_u *dirname_start,
- char_u *resulting_dir));
-static void wipe_dummy_buffer __ARGS((buf_T *buf, char_u *dirname_start));
-static void unload_dummy_buffer __ARGS((buf_T *buf, char_u *dirname_start));
-static qf_info_T *ll_get_or_alloc_list __ARGS((win_T *));
+static int qf_init_ext(qf_info_T *qi, char_u *efile, buf_T *buf,
+ typval_T *tv, char_u *errorformat, int newlist,
+ linenr_T lnumfirst,
+ linenr_T lnumlast,
+ char_u *qf_title);
+static void qf_new_list(qf_info_T *qi, char_u *qf_title);
+static void ll_free_all(qf_info_T **pqi);
+static int qf_add_entry(qf_info_T *qi, qfline_T **prevp, char_u *dir,
+ char_u *fname, int bufnum, char_u *mesg,
+ long lnum, int col, int vis_col,
+ char_u *pattern, int nr, int type,
+ int valid);
+static qf_info_T *ll_new_list(void);
+static void qf_msg(qf_info_T *qi);
+static void qf_free(qf_info_T *qi, int idx);
+static char_u *qf_types(int, int);
+static int qf_get_fnum(char_u *, char_u *);
+static char_u *qf_push_dir(char_u *, struct dir_stack_T **);
+static char_u *qf_pop_dir(struct dir_stack_T **);
+static char_u *qf_guess_filepath(char_u *);
+static void qf_fmt_text(char_u *text, char_u *buf, int bufsize);
+static void qf_clean_dir_stack(struct dir_stack_T **);
+static int qf_win_pos_update(qf_info_T *qi, int old_qf_index);
+static int is_qf_win(win_T *win, qf_info_T *qi);
+static win_T *qf_find_win(qf_info_T *qi);
+static buf_T *qf_find_buf(qf_info_T *qi);
+static void qf_update_buffer(qf_info_T *qi);
+static void qf_set_title(qf_info_T *qi);
+static void qf_fill_buffer(qf_info_T *qi);
+static char_u *get_mef_name(void);
+static void restore_start_dir(char_u *dirname_start);
+static buf_T *load_dummy_buffer(char_u *fname, char_u *dirname_start,
+ char_u *resulting_dir);
+static void wipe_dummy_buffer(buf_T *buf, char_u *dirname_start);
+static void unload_dummy_buffer(buf_T *buf, char_u *dirname_start);
+static qf_info_T *ll_get_or_alloc_list(win_T *);
/* Quickfix window check helper macro */
#define IS_QF_WINDOW(wp) (bt_quickfix(wp->w_buffer) && wp->w_llist_ref == NULL)
diff --git a/src/quickfix.h b/src/quickfix.h
index 949d60bd73..71a3a684a0 100644
--- a/src/quickfix.h
+++ b/src/quickfix.h
@@ -1,36 +1,36 @@
#ifndef NEOVIM_QUICKFIX_H
#define NEOVIM_QUICKFIX_H
/* quickfix.c */
-int qf_init __ARGS((win_T *wp, char_u *efile, char_u *errorformat, int newlist,
- char_u *qf_title));
-void qf_free_all __ARGS((win_T *wp));
-void copy_loclist __ARGS((win_T *from, win_T *to));
-void qf_jump __ARGS((qf_info_T *qi, int dir, int errornr, int forceit));
-void qf_list __ARGS((exarg_T *eap));
-void qf_age __ARGS((exarg_T *eap));
-void qf_mark_adjust __ARGS((win_T *wp, linenr_T line1, linenr_T line2,
- long amount,
- long amount_after));
-void ex_cwindow __ARGS((exarg_T *eap));
-void ex_cclose __ARGS((exarg_T *eap));
-void ex_copen __ARGS((exarg_T *eap));
-linenr_T qf_current_entry __ARGS((win_T *wp));
-int bt_quickfix __ARGS((buf_T *buf));
-int bt_nofile __ARGS((buf_T *buf));
-int bt_dontwrite __ARGS((buf_T *buf));
-int bt_dontwrite_msg __ARGS((buf_T *buf));
-int buf_hide __ARGS((buf_T *buf));
-int grep_internal __ARGS((cmdidx_T cmdidx));
-void ex_make __ARGS((exarg_T *eap));
-void ex_cc __ARGS((exarg_T *eap));
-void ex_cnext __ARGS((exarg_T *eap));
-void ex_cfile __ARGS((exarg_T *eap));
-void ex_vimgrep __ARGS((exarg_T *eap));
-char_u *skip_vimgrep_pat __ARGS((char_u *p, char_u **s, int *flags));
-int get_errorlist __ARGS((win_T *wp, list_T *list));
-int set_errorlist __ARGS((win_T *wp, list_T *list, int action, char_u *title));
-void ex_cbuffer __ARGS((exarg_T *eap));
-void ex_cexpr __ARGS((exarg_T *eap));
-void ex_helpgrep __ARGS((exarg_T *eap));
+int qf_init(win_T *wp, char_u *efile, char_u *errorformat, int newlist,
+ char_u *qf_title);
+void qf_free_all(win_T *wp);
+void copy_loclist(win_T *from, win_T *to);
+void qf_jump(qf_info_T *qi, int dir, int errornr, int forceit);
+void qf_list(exarg_T *eap);
+void qf_age(exarg_T *eap);
+void qf_mark_adjust(win_T *wp, linenr_T line1, linenr_T line2,
+ long amount,
+ long amount_after);
+void ex_cwindow(exarg_T *eap);
+void ex_cclose(exarg_T *eap);
+void ex_copen(exarg_T *eap);
+linenr_T qf_current_entry(win_T *wp);
+int bt_quickfix(buf_T *buf);
+int bt_nofile(buf_T *buf);
+int bt_dontwrite(buf_T *buf);
+int bt_dontwrite_msg(buf_T *buf);
+int buf_hide(buf_T *buf);
+int grep_internal(cmdidx_T cmdidx);
+void ex_make(exarg_T *eap);
+void ex_cc(exarg_T *eap);
+void ex_cnext(exarg_T *eap);
+void ex_cfile(exarg_T *eap);
+void ex_vimgrep(exarg_T *eap);
+char_u *skip_vimgrep_pat(char_u *p, char_u **s, int *flags);
+int get_errorlist(win_T *wp, list_T *list);
+int set_errorlist(win_T *wp, list_T *list, int action, char_u *title);
+void ex_cbuffer(exarg_T *eap);
+void ex_cexpr(exarg_T *eap);
+void ex_helpgrep(exarg_T *eap);
/* vim: set ft=c : */
#endif /* NEOVIM_QUICKFIX_H */
diff --git a/src/regexp.c b/src/regexp.c
index 7bcc69593c..6d9163dde9 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -262,8 +262,8 @@
#define un_Magic(x) ((x) + 256)
#define is_Magic(x) ((x) < 0)
-static int no_Magic __ARGS((int x));
-static int toggle_Magic __ARGS((int x));
+static int no_Magic(int x);
+static int toggle_Magic(int x);
static int no_Magic(int x)
{
@@ -357,15 +357,15 @@ static int toggle_Magic(int x)
#define MAX_LIMIT (32767L << 16L)
-static int re_multi_type __ARGS((int));
-static int cstrncmp __ARGS((char_u *s1, char_u *s2, int *n));
-static char_u *cstrchr __ARGS((char_u *, int));
+static int re_multi_type(int);
+static int cstrncmp(char_u *s1, char_u *s2, int *n);
+static char_u *cstrchr(char_u *, int);
#ifdef BT_REGEXP_DUMP
-static void regdump __ARGS((char_u *, bt_regprog_T *));
+static void regdump(char_u *, bt_regprog_T *);
#endif
#ifdef REGEXP_DEBUG
-static char_u *regprop __ARGS((char_u *));
+static char_u *regprop(char_u *);
#endif
static char_u e_missingbracket[] = N_("E769: Missing ] after %s[");
@@ -430,13 +430,13 @@ static char_u *reg_prev_sub = NULL;
static char_u REGEXP_INRANGE[] = "]^-n\\";
static char_u REGEXP_ABBR[] = "nrtebdoxuU";
-static int backslash_trans __ARGS((int c));
-static int get_char_class __ARGS((char_u **pp));
-static int get_equi_class __ARGS((char_u **pp));
-static void reg_equi_class __ARGS((int c));
-static int get_coll_element __ARGS((char_u **pp));
-static char_u *skip_anyof __ARGS((char_u *p));
-static void init_class_tab __ARGS((void));
+static int backslash_trans(int c);
+static int get_char_class(char_u **pp);
+static int get_equi_class(char_u **pp);
+static void reg_equi_class(int c);
+static int get_coll_element(char_u **pp);
+static char_u *skip_anyof(char_u *p);
+static void init_class_tab(void);
/*
* Translate '\x' to its control character, except "\n", which is Magic.
@@ -652,39 +652,39 @@ typedef struct {
/*
* Forward declarations for vim_regcomp()'s friends.
*/
-static void initchr __ARGS((char_u *));
-static void save_parse_state __ARGS((parse_state_T *ps));
-static void restore_parse_state __ARGS((parse_state_T *ps));
-static int getchr __ARGS((void));
-static void skipchr_keepstart __ARGS((void));
-static int peekchr __ARGS((void));
-static void skipchr __ARGS((void));
-static void ungetchr __ARGS((void));
-static int gethexchrs __ARGS((int maxinputlen));
-static int getoctchrs __ARGS((void));
-static int getdecchrs __ARGS((void));
-static int coll_get_char __ARGS((void));
-static void regcomp_start __ARGS((char_u *expr, int flags));
-static char_u *reg __ARGS((int, int *));
-static char_u *regbranch __ARGS((int *flagp));
-static char_u *regconcat __ARGS((int *flagp));
-static char_u *regpiece __ARGS((int *));
-static char_u *regatom __ARGS((int *));
-static char_u *regnode __ARGS((int));
-static int use_multibytecode __ARGS((int c));
-static int prog_magic_wrong __ARGS((void));
-static char_u *regnext __ARGS((char_u *));
-static void regc __ARGS((int b));
-static void regmbc __ARGS((int c));
+static void initchr(char_u *);
+static void save_parse_state(parse_state_T *ps);
+static void restore_parse_state(parse_state_T *ps);
+static int getchr(void);
+static void skipchr_keepstart(void);
+static int peekchr(void);
+static void skipchr(void);
+static void ungetchr(void);
+static int gethexchrs(int maxinputlen);
+static int getoctchrs(void);
+static int getdecchrs(void);
+static int coll_get_char(void);
+static void regcomp_start(char_u *expr, int flags);
+static char_u *reg(int, int *);
+static char_u *regbranch(int *flagp);
+static char_u *regconcat(int *flagp);
+static char_u *regpiece(int *);
+static char_u *regatom(int *);
+static char_u *regnode(int);
+static int use_multibytecode(int c);
+static int prog_magic_wrong(void);
+static char_u *regnext(char_u *);
+static void regc(int b);
+static void regmbc(int c);
# define REGMBC(x) regmbc(x);
# define CASEMBC(x) case x:
-static void reginsert __ARGS((int, char_u *));
-static void reginsert_nr __ARGS((int op, long val, char_u *opnd));
-static void reginsert_limits __ARGS((int, long, long, char_u *));
-static char_u *re_put_long __ARGS((char_u *pr, long_u val));
-static int read_limits __ARGS((long *, long *));
-static void regtail __ARGS((char_u *, char_u *));
-static void regoptail __ARGS((char_u *, char_u *));
+static void reginsert(int, char_u *);
+static void reginsert_nr(int op, long val, char_u *opnd);
+static void reginsert_limits(int, long, long, char_u *);
+static char_u *re_put_long(char_u *pr, long_u val);
+static int read_limits(long *, long *);
+static void regtail(char_u *, char_u *);
+static void regoptail(char_u *, char_u *);
static regengine_T bt_regengine;
static regengine_T nfa_regengine;
@@ -1066,7 +1066,7 @@ static int get_coll_element(char_u **pp)
return 0;
}
-static void get_cpo_flags __ARGS((void));
+static void get_cpo_flags(void);
static int reg_cpo_lit; /* 'cpoptions' contains 'l' flag */
static int reg_cpo_bsl; /* 'cpoptions' contains '\' flag */
@@ -1163,8 +1163,8 @@ char_u *skip_regexp(char_u *startp, int dirc, int magic, char_u **newp)
return p;
}
-static regprog_T *bt_regcomp __ARGS((char_u *expr, int re_flags));
-static void bt_regfree __ARGS((regprog_T *prog));
+static regprog_T *bt_regcomp(char_u *expr, int re_flags);
+static void bt_regfree(regprog_T *prog);
/*
* bt_regcomp() - compile a regular expression into internal code for the
@@ -3079,19 +3079,19 @@ typedef struct regbehind_S {
save_se_T save_end[NSUBEXP];
} regbehind_T;
-static char_u *reg_getline __ARGS((linenr_T lnum));
-static long bt_regexec_both __ARGS((char_u *line, colnr_T col, proftime_T *tm));
-static long regtry __ARGS((bt_regprog_T *prog, colnr_T col));
-static void cleanup_subexpr __ARGS((void));
-static void cleanup_zsubexpr __ARGS((void));
-static void save_subexpr __ARGS((regbehind_T *bp));
-static void restore_subexpr __ARGS((regbehind_T *bp));
-static void reg_nextline __ARGS((void));
-static void reg_save __ARGS((regsave_T *save, garray_T *gap));
-static void reg_restore __ARGS((regsave_T *save, garray_T *gap));
-static int reg_save_equal __ARGS((regsave_T *save));
-static void save_se_multi __ARGS((save_se_T *savep, lpos_T *posp));
-static void save_se_one __ARGS((save_se_T *savep, char_u **pp));
+static char_u *reg_getline(linenr_T lnum);
+static long bt_regexec_both(char_u *line, colnr_T col, proftime_T *tm);
+static long regtry(bt_regprog_T *prog, colnr_T col);
+static void cleanup_subexpr(void);
+static void cleanup_zsubexpr(void);
+static void save_subexpr(regbehind_T *bp);
+static void restore_subexpr(regbehind_T *bp);
+static void reg_nextline(void);
+static void reg_save(regsave_T *save, garray_T *gap);
+static void reg_restore(regsave_T *save, garray_T *gap);
+static int reg_save_equal(regsave_T *save);
+static void save_se_multi(save_se_T *savep, lpos_T *posp);
+static void save_se_one(save_se_T *savep, char_u **pp);
/* Save the sub-expressions before attempting a match. */
#define save_se(savep, posp, pp) \
@@ -3104,12 +3104,12 @@ static void save_se_one __ARGS((save_se_T *savep, char_u **pp));
else \
*(pp) = (savep)->se_u.ptr; }
-static int re_num_cmp __ARGS((long_u val, char_u *scan));
-static int match_with_backref __ARGS((linenr_T start_lnum, colnr_T start_col,
- linenr_T end_lnum, colnr_T end_col,
- int *bytelen));
-static int regmatch __ARGS((char_u *prog));
-static int regrepeat __ARGS((char_u *p, long maxcount));
+static int re_num_cmp(long_u val, char_u *scan);
+static int match_with_backref(linenr_T start_lnum, colnr_T start_col,
+ linenr_T end_lnum, colnr_T end_col,
+ int *bytelen);
+static int regmatch(char_u *prog);
+static int regrepeat(char_u *p, long maxcount);
#ifdef REGEXP_DEBUG
int regnarrate = 0;
@@ -3205,8 +3205,8 @@ typedef struct regitem_S {
short rs_no; /* submatch nr or BEHIND/NOBEHIND */
} regitem_T;
-static regitem_T *regstack_push __ARGS((regstate_T state, char_u *scan));
-static void regstack_pop __ARGS((char_u **scan));
+static regitem_T *regstack_push(regstate_T state, char_u *scan);
+static void regstack_pop(char_u **scan);
/* used for STAR, PLUS and BRACE_SIMPLE matching */
typedef struct regstar_S {
@@ -3283,7 +3283,7 @@ static lpos_T reg_endzpos[NSUBEXP]; /* idem, end pos */
/* TRUE if using multi-line regexp. */
#define REG_MULTI (reg_match == NULL)
-static int bt_regexec __ARGS((regmatch_T *rmp, char_u *line, colnr_T col));
+static int bt_regexec(regmatch_T *rmp, char_u *line, colnr_T col);
/*
* Match a regexp against a string.
@@ -3314,7 +3314,7 @@ bt_regexec (
#if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \
|| defined(FIND_REPLACE_DIALOG) || defined(PROTO)
-static int bt_regexec_nl __ARGS((regmatch_T *rmp, char_u *line, colnr_T col));
+static int bt_regexec_nl(regmatch_T *rmp, char_u *line, colnr_T col);
/*
* Like vim_regexec(), but consider a "\n" in "line" to be a line break.
@@ -3339,9 +3339,9 @@ bt_regexec_nl (
}
#endif
-static long bt_regexec_multi __ARGS((regmmatch_T *rmp, win_T *win, buf_T *buf,
- linenr_T lnum, colnr_T col,
- proftime_T *tm));
+static long bt_regexec_multi(regmmatch_T *rmp, win_T *win, buf_T *buf,
+ linenr_T lnum, colnr_T col,
+ proftime_T *tm);
/*
* Match a regexp against multiple lines.
@@ -3567,7 +3567,7 @@ theend:
return retval;
}
-static reg_extmatch_T *make_extmatch __ARGS((void));
+static reg_extmatch_T *make_extmatch(void);
/*
* Create a new extmatch and mark it as referenced once.
@@ -3668,7 +3668,7 @@ static long regtry(bt_regprog_T *prog, colnr_T col)
return 1 + reglnum;
}
-static int reg_prev_class __ARGS((void));
+static int reg_prev_class(void);
/*
* Get class of previous character.
@@ -3680,7 +3680,7 @@ static int reg_prev_class(void) {
return -1;
}
-static int reg_match_visual __ARGS((void));
+static int reg_match_visual(void);
/*
* Return TRUE if the current reginput position matches the Visual area.
@@ -6177,7 +6177,7 @@ static char_u *regprop(char_u *op)
}
#endif /* REGEXP_DEBUG */
-static void mb_decompose __ARGS((int c, int *c1, int *c2, int *c3));
+static void mb_decompose(int c, int *c1, int *c2, int *c3);
typedef struct {
int a, b, c;
@@ -6356,16 +6356,16 @@ static char_u *cstrchr(char_u *s, int c)
* This is impossible, so we declare a pointer to a function returning a
* pointer to a function returning void. This should work for all compilers.
*/
-typedef void (*(*fptr_T)__ARGS((int *, int)))();
+typedef void (*(*fptr_T)(int *, int))();
-static fptr_T do_upper __ARGS((int *, int));
-static fptr_T do_Upper __ARGS((int *, int));
-static fptr_T do_lower __ARGS((int *, int));
-static fptr_T do_Lower __ARGS((int *, int));
+static fptr_T do_upper(int *, int);
+static fptr_T do_Upper(int *, int);
+static fptr_T do_lower(int *, int);
+static fptr_T do_Lower(int *, int);
-static int vim_regsub_both __ARGS((char_u *source, char_u *dest, int copy,
- int magic,
- int backslash));
+static int vim_regsub_both(char_u *source, char_u *dest, int copy,
+ int magic,
+ int backslash);
static fptr_T do_upper(d, c)
int *d;
@@ -6815,7 +6815,7 @@ exit:
return (int)((dst - dest) + 1);
}
-static char_u *reg_getline_submatch __ARGS((linenr_T lnum));
+static char_u *reg_getline_submatch(linenr_T lnum);
/*
* Call reg_getline() with the line numbers from the submatch. If a
diff --git a/src/regexp.h b/src/regexp.h
index a843983e3c..f0995946e2 100644
--- a/src/regexp.h
+++ b/src/regexp.h
@@ -1,27 +1,27 @@
#ifndef NEOVIM_REGEXP_H
#define NEOVIM_REGEXP_H
/* regexp.c */
-int re_multiline __ARGS((regprog_T *prog));
-int re_lookbehind __ARGS((regprog_T *prog));
-char_u *skip_regexp __ARGS((char_u *startp, int dirc, int magic, char_u **newp));
-int vim_regcomp_had_eol __ARGS((void));
-void free_regexp_stuff __ARGS((void));
-reg_extmatch_T *ref_extmatch __ARGS((reg_extmatch_T *em));
-void unref_extmatch __ARGS((reg_extmatch_T *em));
-char_u *regtilde __ARGS((char_u *source, int magic));
-int vim_regsub __ARGS((regmatch_T *rmp, char_u *source, char_u *dest, int copy,
+int re_multiline(regprog_T *prog);
+int re_lookbehind(regprog_T *prog);
+char_u *skip_regexp(char_u *startp, int dirc, int magic, char_u **newp);
+int vim_regcomp_had_eol(void);
+void free_regexp_stuff(void);
+reg_extmatch_T *ref_extmatch(reg_extmatch_T *em);
+void unref_extmatch(reg_extmatch_T *em);
+char_u *regtilde(char_u *source, int magic);
+int vim_regsub(regmatch_T *rmp, char_u *source, char_u *dest, int copy,
int magic,
- int backslash));
-int vim_regsub_multi __ARGS((regmmatch_T *rmp, linenr_T lnum, char_u *source,
+ int backslash);
+int vim_regsub_multi(regmmatch_T *rmp, linenr_T lnum, char_u *source,
char_u *dest, int copy, int magic,
- int backslash));
-char_u *reg_submatch __ARGS((int no));
-regprog_T *vim_regcomp __ARGS((char_u *expr_arg, int re_flags));
-void vim_regfree __ARGS((regprog_T *prog));
-int vim_regexec __ARGS((regmatch_T *rmp, char_u *line, colnr_T col));
-int vim_regexec_nl __ARGS((regmatch_T *rmp, char_u *line, colnr_T col));
-long vim_regexec_multi __ARGS((regmmatch_T *rmp, win_T *win, buf_T *buf,
+ int backslash);
+char_u *reg_submatch(int no);
+regprog_T *vim_regcomp(char_u *expr_arg, int re_flags);
+void vim_regfree(regprog_T *prog);
+int vim_regexec(regmatch_T *rmp, char_u *line, colnr_T col);
+int vim_regexec_nl(regmatch_T *rmp, char_u *line, colnr_T col);
+long vim_regexec_multi(regmmatch_T *rmp, win_T *win, buf_T *buf,
linenr_T lnum, colnr_T col,
- proftime_T *tm));
+ proftime_T *tm);
/* vim: set ft=c : */
#endif /* NEOVIM_REGEXP_H */
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
index 3e4b74d2d2..e8d0398059 100644
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -276,48 +276,48 @@ static int nfa_alt_listid;
/* 0 for first call to nfa_regmatch(), 1 for recursive call. */
static int nfa_ll_index = 0;
-static int nfa_regcomp_start __ARGS((char_u *expr, int re_flags));
-static int nfa_get_reganch __ARGS((nfa_state_T *start, int depth));
-static int nfa_get_regstart __ARGS((nfa_state_T *start, int depth));
-static char_u *nfa_get_match_text __ARGS((nfa_state_T *start));
-static int realloc_post_list __ARGS((void));
-static int nfa_recognize_char_class __ARGS((char_u *start, char_u *end,
- int extra_newl));
-static int nfa_emit_equi_class __ARGS((int c));
-static int nfa_regatom __ARGS((void));
-static int nfa_regpiece __ARGS((void));
-static int nfa_regconcat __ARGS((void));
-static int nfa_regbranch __ARGS((void));
-static int nfa_reg __ARGS((int paren));
+static int nfa_regcomp_start(char_u *expr, int re_flags);
+static int nfa_get_reganch(nfa_state_T *start, int depth);
+static int nfa_get_regstart(nfa_state_T *start, int depth);
+static char_u *nfa_get_match_text(nfa_state_T *start);
+static int realloc_post_list(void);
+static int nfa_recognize_char_class(char_u *start, char_u *end,
+ int extra_newl);
+static int nfa_emit_equi_class(int c);
+static int nfa_regatom(void);
+static int nfa_regpiece(void);
+static int nfa_regconcat(void);
+static int nfa_regbranch(void);
+static int nfa_reg(int paren);
#ifdef REGEXP_DEBUG
-static void nfa_set_code __ARGS((int c));
-static void nfa_postfix_dump __ARGS((char_u *expr, int retval));
-static void nfa_print_state __ARGS((FILE *debugf, nfa_state_T *state));
-static void nfa_print_state2 __ARGS((FILE *debugf, nfa_state_T *state,
- garray_T *indent));
-static void nfa_dump __ARGS((nfa_regprog_T *prog));
+static void nfa_set_code(int c);
+static void nfa_postfix_dump(char_u *expr, int retval);
+static void nfa_print_state(FILE *debugf, nfa_state_T *state);
+static void nfa_print_state2(FILE *debugf, nfa_state_T *state,
+ garray_T *indent);
+static void nfa_dump(nfa_regprog_T *prog);
#endif
-static int *re2post __ARGS((void));
-static nfa_state_T *alloc_state __ARGS((int c, nfa_state_T *out,
- nfa_state_T *out1));
-static void st_error __ARGS((int *postfix, int *end, int *p));
-static int nfa_max_width __ARGS((nfa_state_T *startstate, int depth));
-static nfa_state_T *post2nfa __ARGS((int *postfix, int *end, int nfa_calc_size));
-static void nfa_postprocess __ARGS((nfa_regprog_T *prog));
-static int check_char_class __ARGS((int class, int c));
-static void nfa_save_listids __ARGS((nfa_regprog_T *prog, int *list));
-static void nfa_restore_listids __ARGS((nfa_regprog_T *prog, int *list));
-static int nfa_re_num_cmp __ARGS((long_u val, int op, long_u pos));
-static long nfa_regtry __ARGS((nfa_regprog_T *prog, colnr_T col));
-static long nfa_regexec_both __ARGS((char_u *line, colnr_T col));
-static regprog_T *nfa_regcomp __ARGS((char_u *expr, int re_flags));
-static void nfa_regfree __ARGS((regprog_T *prog));
-static int nfa_regexec __ARGS((regmatch_T *rmp, char_u *line, colnr_T col));
-static long nfa_regexec_multi __ARGS((regmmatch_T *rmp, win_T *win, buf_T *buf,
- linenr_T lnum, colnr_T col,
- proftime_T *tm));
-static int match_follows __ARGS((nfa_state_T *startstate, int depth));
-static int failure_chance __ARGS((nfa_state_T *state, int depth));
+static int *re2post(void);
+static nfa_state_T *alloc_state(int c, nfa_state_T *out,
+ nfa_state_T *out1);
+static void st_error(int *postfix, int *end, int *p);
+static int nfa_max_width(nfa_state_T *startstate, int depth);
+static nfa_state_T *post2nfa(int *postfix, int *end, int nfa_calc_size);
+static void nfa_postprocess(nfa_regprog_T *prog);
+static int check_char_class(int class, int c);
+static void nfa_save_listids(nfa_regprog_T *prog, int *list);
+static void nfa_restore_listids(nfa_regprog_T *prog, int *list);
+static int nfa_re_num_cmp(long_u val, int op, long_u pos);
+static long nfa_regtry(nfa_regprog_T *prog, colnr_T col);
+static long nfa_regexec_both(char_u *line, colnr_T col);
+static regprog_T *nfa_regcomp(char_u *expr, int re_flags);
+static void nfa_regfree(regprog_T *prog);
+static int nfa_regexec(regmatch_T *rmp, char_u *line, colnr_T col);
+static long nfa_regexec_multi(regmmatch_T *rmp, win_T *win, buf_T *buf,
+ linenr_T lnum, colnr_T col,
+ proftime_T *tm);
+static int match_follows(nfa_state_T *startstate, int depth);
+static int failure_chance(nfa_state_T *state, int depth);
/* helper functions used when doing re2post() ... regatom() parsing */
#define EMIT(c) do { \
@@ -2511,12 +2511,12 @@ struct Frag {
};
typedef struct Frag Frag_T;
-static Frag_T frag __ARGS((nfa_state_T *start, Ptrlist *out));
-static Ptrlist *list1 __ARGS((nfa_state_T **outp));
-static void patch __ARGS((Ptrlist *l, nfa_state_T *s));
-static Ptrlist *append __ARGS((Ptrlist *l1, Ptrlist *l2));
-static void st_push __ARGS((Frag_T s, Frag_T **p, Frag_T *stack_end));
-static Frag_T st_pop __ARGS((Frag_T **p, Frag_T *stack));
+static Frag_T frag(nfa_state_T *start, Ptrlist *out);
+static Ptrlist *list1(nfa_state_T **outp);
+static void patch(Ptrlist *l, nfa_state_T *s);
+static Ptrlist *append(Ptrlist *l1, Ptrlist *l2);
+static void st_push(Frag_T s, Frag_T **p, Frag_T *stack_end);
+static Frag_T st_pop(Frag_T **p, Frag_T *stack);
/*
* Initialize a Frag_T struct and return it.
@@ -3449,9 +3449,9 @@ typedef struct {
} nfa_list_T;
#ifdef ENABLE_LOG
-static void log_subsexpr __ARGS((regsubs_T *subs));
-static void log_subexpr __ARGS((regsub_T *sub));
-static char *pim_info __ARGS((nfa_pim_T *pim));
+static void log_subsexpr(regsubs_T *subs);
+static void log_subexpr(regsub_T *sub);
+static char *pim_info(nfa_pim_T *pim);
static void log_subsexpr(regsubs_T *subs)
{
@@ -3501,25 +3501,25 @@ static char *pim_info(nfa_pim_T *pim)
/* Used during execution: whether a match has been found. */
static int nfa_match;
-static void copy_pim __ARGS((nfa_pim_T *to, nfa_pim_T *from));
-static void clear_sub __ARGS((regsub_T *sub));
-static void copy_sub __ARGS((regsub_T *to, regsub_T *from));
-static void copy_sub_off __ARGS((regsub_T *to, regsub_T *from));
-static void copy_ze_off __ARGS((regsub_T *to, regsub_T *from));
-static int sub_equal __ARGS((regsub_T *sub1, regsub_T *sub2));
-static int match_backref __ARGS((regsub_T *sub, int subidx, int *bytelen));
-static int has_state_with_pos __ARGS((nfa_list_T *l, nfa_state_T *state,
- regsubs_T *subs,
- nfa_pim_T *pim));
-static int pim_equal __ARGS((nfa_pim_T *one, nfa_pim_T *two));
-static int state_in_list __ARGS((nfa_list_T *l, nfa_state_T *state,
- regsubs_T *subs));
-static regsubs_T *addstate __ARGS((nfa_list_T *l, nfa_state_T *state,
- regsubs_T *subs_arg, nfa_pim_T *pim,
- int off));
-static void addstate_here __ARGS((nfa_list_T *l, nfa_state_T *state,
- regsubs_T *subs, nfa_pim_T *pim,
- int *ip));
+static void copy_pim(nfa_pim_T *to, nfa_pim_T *from);
+static void clear_sub(regsub_T *sub);
+static void copy_sub(regsub_T *to, regsub_T *from);
+static void copy_sub_off(regsub_T *to, regsub_T *from);
+static void copy_ze_off(regsub_T *to, regsub_T *from);
+static int sub_equal(regsub_T *sub1, regsub_T *sub2);
+static int match_backref(regsub_T *sub, int subidx, int *bytelen);
+static int has_state_with_pos(nfa_list_T *l, nfa_state_T *state,
+ regsubs_T *subs,
+ nfa_pim_T *pim);
+static int pim_equal(nfa_pim_T *one, nfa_pim_T *two);
+static int state_in_list(nfa_list_T *l, nfa_state_T *state,
+ regsubs_T *subs);
+static regsubs_T *addstate(nfa_list_T *l, nfa_state_T *state,
+ regsubs_T *subs_arg, nfa_pim_T *pim,
+ int off);
+static void addstate_here(nfa_list_T *l, nfa_state_T *state,
+ regsubs_T *subs, nfa_pim_T *pim,
+ int *ip);
/*
* Copy postponed invisible match info from "from" to "to".
@@ -4376,7 +4376,7 @@ retempty:
}
-static int match_zref __ARGS((int subidx, int *bytelen));
+static int match_zref(int subidx, int *bytelen);
/*
* Check for a match with \z subexpression "subidx".
@@ -4446,13 +4446,13 @@ static int nfa_re_num_cmp(long_u val, int op, long_u pos)
return val == pos;
}
-static int recursive_regmatch __ARGS((nfa_state_T *state, nfa_pim_T *pim,
- nfa_regprog_T *prog, regsubs_T *submatch,
- regsubs_T *m,
- int **listids));
-static int nfa_regmatch __ARGS((nfa_regprog_T *prog, nfa_state_T *start,
- regsubs_T *submatch,
- regsubs_T *m));
+static int recursive_regmatch(nfa_state_T *state, nfa_pim_T *pim,
+ nfa_regprog_T *prog, regsubs_T *submatch,
+ regsubs_T *m,
+ int **listids);
+static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start,
+ regsubs_T *submatch,
+ regsubs_T *m);
/*
* Recursively call nfa_regmatch()
@@ -4599,9 +4599,9 @@ static int recursive_regmatch(nfa_state_T *state, nfa_pim_T *pim, nfa_regprog_T
return result;
}
-static int skip_to_start __ARGS((int c, colnr_T *colp));
-static long find_match_text __ARGS((colnr_T startcol, int regstart,
- char_u *match_text));
+static int skip_to_start(int c, colnr_T *colp);
+static long find_match_text(colnr_T startcol, int regstart,
+ char_u *match_text);
/*
* Estimate the chance of a match with "state" failing.
@@ -6405,7 +6405,7 @@ nfa_regexec (
#if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \
|| defined(FIND_REPLACE_DIALOG) || defined(PROTO)
-static int nfa_regexec_nl __ARGS((regmatch_T *rmp, char_u *line, colnr_T col));
+static int nfa_regexec_nl(regmatch_T *rmp, char_u *line, colnr_T col);
/*
* Like nfa_regexec(), but consider a "\n" in "line" to be a line break.
diff --git a/src/screen.c b/src/screen.c
index b860b6719e..caaf0550f8 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -144,48 +144,48 @@ static foldinfo_T win_foldinfo; /* info for 'foldcolumn' */
*/
static schar_T *current_ScreenLine;
-static void win_update __ARGS((win_T *wp));
-static void win_draw_end __ARGS((win_T *wp, int c1, int c2, int row, int endrow,
- hlf_T hl));
-static void fold_line __ARGS((win_T *wp, long fold_count, foldinfo_T *foldinfo,
- linenr_T lnum,
- int row));
-static void fill_foldcolumn __ARGS((char_u *p, win_T *wp, int closed,
- linenr_T lnum));
-static void copy_text_attr __ARGS((int off, char_u *buf, int len, int attr));
-static int win_line __ARGS((win_T *, linenr_T, int, int, int nochange));
-static int char_needs_redraw __ARGS((int off_from, int off_to, int cols));
-static void screen_line __ARGS((int row, int coloff, int endcol,
- int clear_width,
- int rlflag));
+static void win_update(win_T *wp);
+static void win_draw_end(win_T *wp, int c1, int c2, int row, int endrow,
+ hlf_T hl);
+static void fold_line(win_T *wp, long fold_count, foldinfo_T *foldinfo,
+ linenr_T lnum,
+ int row);
+static void fill_foldcolumn(char_u *p, win_T *wp, int closed,
+ linenr_T lnum);
+static void copy_text_attr(int off, char_u *buf, int len, int attr);
+static int win_line(win_T *, linenr_T, int, int, int nochange);
+static int char_needs_redraw(int off_from, int off_to, int cols);
+static void screen_line(int row, int coloff, int endcol,
+ int clear_width,
+ int rlflag);
# define SCREEN_LINE(r, o, e, c, rl) screen_line((r), (o), (e), (c), (rl))
-static void draw_vsep_win __ARGS((win_T *wp, int row));
-static void redraw_custom_statusline __ARGS((win_T *wp));
+static void draw_vsep_win(win_T *wp, int row);
+static void redraw_custom_statusline(win_T *wp);
#define SEARCH_HL_PRIORITY 0
-static void start_search_hl __ARGS((void));
-static void end_search_hl __ARGS((void));
-static void init_search_hl __ARGS((win_T *wp));
-static void prepare_search_hl __ARGS((win_T *wp, linenr_T lnum));
-static void next_search_hl __ARGS((win_T *win, match_T *shl, linenr_T lnum,
- colnr_T mincol));
-static void screen_start_highlight __ARGS((int attr));
-static void screen_char __ARGS((unsigned off, int row, int col));
-static void screen_char_2 __ARGS((unsigned off, int row, int col));
-static void screenclear2 __ARGS((void));
-static void lineclear __ARGS((unsigned off, int width));
-static void lineinvalid __ARGS((unsigned off, int width));
-static void linecopy __ARGS((int to, int from, win_T *wp));
-static void redraw_block __ARGS((int row, int end, win_T *wp));
-static int win_do_lines __ARGS((win_T *wp, int row, int line_count,
- int mayclear,
- int del));
-static void win_rest_invalid __ARGS((win_T *wp));
-static void msg_pos_mode __ARGS((void));
-static void draw_tabline __ARGS((void));
-static int fillchar_status __ARGS((int *attr, int is_curwin));
-static int fillchar_vsep __ARGS((int *attr));
-static void win_redr_custom __ARGS((win_T *wp, int draw_ruler));
-static void win_redr_ruler __ARGS((win_T *wp, int always));
+static void start_search_hl(void);
+static void end_search_hl(void);
+static void init_search_hl(win_T *wp);
+static void prepare_search_hl(win_T *wp, linenr_T lnum);
+static void next_search_hl(win_T *win, match_T *shl, linenr_T lnum,
+ colnr_T mincol);
+static void screen_start_highlight(int attr);
+static void screen_char(unsigned off, int row, int col);
+static void screen_char_2(unsigned off, int row, int col);
+static void screenclear2(void);
+static void lineclear(unsigned off, int width);
+static void lineinvalid(unsigned off, int width);
+static void linecopy(int to, int from, win_T *wp);
+static void redraw_block(int row, int end, win_T *wp);
+static int win_do_lines(win_T *wp, int row, int line_count,
+ int mayclear,
+ int del);
+static void win_rest_invalid(win_T *wp);
+static void msg_pos_mode(void);
+static void draw_tabline(void);
+static int fillchar_status(int *attr, int is_curwin);
+static int fillchar_vsep(int *attr);
+static void win_redr_custom(win_T *wp, int draw_ruler);
+static void win_redr_ruler(win_T *wp, int always);
/* Ugly global: overrule attribute used by screen_char() */
static int screen_char_attr = 0;
@@ -1704,7 +1704,7 @@ static void win_draw_end(win_T *wp, int c1, int c2, int row, int endrow, hlf_T h
set_empty_rows(wp, row);
}
-static int advance_color_col __ARGS((int vcol, int **color_cols));
+static int advance_color_col(int vcol, int **color_cols);
/*
* Advance **color_cols and return TRUE when there are columns to draw.
@@ -4057,7 +4057,7 @@ win_line (
return row;
}
-static int comp_char_differs __ARGS((int, int));
+static int comp_char_differs(int, int);
/*
* Return if the composing characters at "off_from" and "off_to" differ.
@@ -4458,8 +4458,8 @@ static void draw_vsep_win(win_T *wp, int row)
}
}
-static int status_match_len __ARGS((expand_T *xp, char_u *s));
-static int skip_status_match_char __ARGS((expand_T *xp, char_u *s));
+static int status_match_len(expand_T *xp, char_u *s);
+static int skip_status_match_char(expand_T *xp, char_u *s);
/*
* Get the length of an item as it will be shown in the status line.
@@ -5111,7 +5111,7 @@ void screen_getbytes(int row, int col, char_u *bytes, int *attrp)
}
}
-static int screen_comp_differs __ARGS((int, int*));
+static int screen_comp_differs(int, int*);
/*
* Return TRUE if composing characters for screen posn "off" differs from
diff --git a/src/screen.h b/src/screen.h
index 2f25798757..21218aee92 100644
--- a/src/screen.h
+++ b/src/screen.h
@@ -1,69 +1,69 @@
#ifndef NEOVIM_SCREEN_H
#define NEOVIM_SCREEN_H
/* screen.c */
-void redraw_later __ARGS((int type));
-void redraw_win_later __ARGS((win_T *wp, int type));
-void redraw_later_clear __ARGS((void));
-void redraw_all_later __ARGS((int type));
-void redraw_curbuf_later __ARGS((int type));
-void redraw_buf_later __ARGS((buf_T *buf, int type));
-int redraw_asap __ARGS((int type));
-void redrawWinline __ARGS((linenr_T lnum, int invalid));
-void update_curbuf __ARGS((int type));
-void update_screen __ARGS((int type));
-int conceal_cursor_line __ARGS((win_T *wp));
-void conceal_check_cursur_line __ARGS((void));
-void update_single_line __ARGS((win_T *wp, linenr_T lnum));
-void update_debug_sign __ARGS((buf_T *buf, linenr_T lnum));
-void updateWindow __ARGS((win_T *wp));
-void rl_mirror __ARGS((char_u *str));
-void status_redraw_all __ARGS((void));
-void status_redraw_curbuf __ARGS((void));
-void redraw_statuslines __ARGS((void));
-void win_redraw_last_status __ARGS((frame_T *frp));
-void win_redr_status_matches __ARGS((expand_T *xp, int num_matches, char_u *
- *matches, int match,
- int showtail));
-void win_redr_status __ARGS((win_T *wp));
-int stl_connected __ARGS((win_T *wp));
-int get_keymap_str __ARGS((win_T *wp, char_u *buf, int len));
-void screen_putchar __ARGS((int c, int row, int col, int attr));
-void screen_getbytes __ARGS((int row, int col, char_u *bytes, int *attrp));
-void screen_puts __ARGS((char_u *text, int row, int col, int attr));
-void screen_puts_len __ARGS((char_u *text, int len, int row, int col, int attr));
-void screen_stop_highlight __ARGS((void));
-void reset_cterm_colors __ARGS((void));
-void screen_draw_rectangle __ARGS((int row, int col, int height, int width,
- int invert));
-void screen_fill __ARGS((int start_row, int end_row, int start_col, int end_col,
- int c1, int c2,
- int attr));
-void check_for_delay __ARGS((int check_msg_scroll));
-int screen_valid __ARGS((int doclear));
-void screenalloc __ARGS((int doclear));
-void free_screenlines __ARGS((void));
-void screenclear __ARGS((void));
-int can_clear __ARGS((char_u *p));
-void screen_start __ARGS((void));
-void windgoto __ARGS((int row, int col));
-void setcursor __ARGS((void));
-int win_ins_lines __ARGS((win_T *wp, int row, int line_count, int invalid,
- int mayclear));
-int win_del_lines __ARGS((win_T *wp, int row, int line_count, int invalid,
- int mayclear));
-int screen_ins_lines __ARGS((int off, int row, int line_count, int end,
- win_T *wp));
-int screen_del_lines __ARGS((int off, int row, int line_count, int end,
- int force,
- win_T *wp));
-int showmode __ARGS((void));
-void unshowmode __ARGS((int force));
-void get_trans_bufname __ARGS((buf_T *buf));
-int redrawing __ARGS((void));
-int messaging __ARGS((void));
-void showruler __ARGS((int always));
-int number_width __ARGS((win_T *wp));
-int screen_screencol __ARGS((void));
-int screen_screenrow __ARGS((void));
+void redraw_later(int type);
+void redraw_win_later(win_T *wp, int type);
+void redraw_later_clear(void);
+void redraw_all_later(int type);
+void redraw_curbuf_later(int type);
+void redraw_buf_later(buf_T *buf, int type);
+int redraw_asap(int type);
+void redrawWinline(linenr_T lnum, int invalid);
+void update_curbuf(int type);
+void update_screen(int type);
+int conceal_cursor_line(win_T *wp);
+void conceal_check_cursur_line(void);
+void update_single_line(win_T *wp, linenr_T lnum);
+void update_debug_sign(buf_T *buf, linenr_T lnum);
+void updateWindow(win_T *wp);
+void rl_mirror(char_u *str);
+void status_redraw_all(void);
+void status_redraw_curbuf(void);
+void redraw_statuslines(void);
+void win_redraw_last_status(frame_T *frp);
+void win_redr_status_matches(expand_T *xp, int num_matches, char_u *
+ *matches, int match,
+ int showtail);
+void win_redr_status(win_T *wp);
+int stl_connected(win_T *wp);
+int get_keymap_str(win_T *wp, char_u *buf, int len);
+void screen_putchar(int c, int row, int col, int attr);
+void screen_getbytes(int row, int col, char_u *bytes, int *attrp);
+void screen_puts(char_u *text, int row, int col, int attr);
+void screen_puts_len(char_u *text, int len, int row, int col, int attr);
+void screen_stop_highlight(void);
+void reset_cterm_colors(void);
+void screen_draw_rectangle(int row, int col, int height, int width,
+ int invert);
+void screen_fill(int start_row, int end_row, int start_col, int end_col,
+ int c1, int c2,
+ int attr);
+void check_for_delay(int check_msg_scroll);
+int screen_valid(int doclear);
+void screenalloc(int doclear);
+void free_screenlines(void);
+void screenclear(void);
+int can_clear(char_u *p);
+void screen_start(void);
+void windgoto(int row, int col);
+void setcursor(void);
+int win_ins_lines(win_T *wp, int row, int line_count, int invalid,
+ int mayclear);
+int win_del_lines(win_T *wp, int row, int line_count, int invalid,
+ int mayclear);
+int screen_ins_lines(int off, int row, int line_count, int end,
+ win_T *wp);
+int screen_del_lines(int off, int row, int line_count, int end,
+ int force,
+ win_T *wp);
+int showmode(void);
+void unshowmode(int force);
+void get_trans_bufname(buf_T *buf);
+int redrawing(void);
+int messaging(void);
+void showruler(int always);
+int number_width(win_T *wp);
+int screen_screencol(void);
+int screen_screenrow(void);
/* vim: set ft=c : */
#endif /* NEOVIM_SCREEN_H */
diff --git a/src/search.c b/src/search.c
index 7c89b775d0..1cec595e25 100644
--- a/src/search.c
+++ b/src/search.c
@@ -37,20 +37,20 @@
#include "ui.h"
#include "window.h"
-static void save_re_pat __ARGS((int idx, char_u *pat, int magic));
-static void set_vv_searchforward __ARGS((void));
-static int first_submatch __ARGS((regmmatch_T *rp));
-static int check_prevcol __ARGS((char_u *linep, int col, int ch, int *prevcol));
-static int inmacro __ARGS((char_u *, char_u *));
-static int check_linecomment __ARGS((char_u *line));
-static int cls __ARGS((void));
-static int skip_chars __ARGS((int, int));
-static void back_in_line __ARGS((void));
-static void find_first_blank __ARGS((pos_T *));
-static void findsent_forward __ARGS((long count, int at_start_sent));
-static void show_pat_in_path __ARGS((char_u *, int,
- int, int, FILE *, linenr_T *, long));
-static void wvsp_one __ARGS((FILE *fp, int idx, char *s, int sc));
+static void save_re_pat(int idx, char_u *pat, int magic);
+static void set_vv_searchforward(void);
+static int first_submatch(regmmatch_T *rp);
+static int check_prevcol(char_u *linep, int col, int ch, int *prevcol);
+static int inmacro(char_u *, char_u *);
+static int check_linecomment(char_u *line);
+static int cls(void);
+static int skip_chars(int, int);
+static void back_in_line(void);
+static void find_first_blank(pos_T *);
+static void findsent_forward(long count, int at_start_sent);
+static void show_pat_in_path(char_u *, int,
+ int, int, FILE *, linenr_T *, long);
+static void wvsp_one(FILE *fp, int idx, char *s, int sc);
/*
* This file contains various searching-related routines. These fall into
@@ -2088,7 +2088,7 @@ int findsent(int dir, long count)
{
pos_T pos, tpos;
int c;
- int (*func)__ARGS((pos_T *));
+ int (*func)(pos_T *);
int startlnum;
int noskip = FALSE; /* do not skip blanks */
int cpo_J;
@@ -3091,7 +3091,7 @@ current_block (
return OK;
}
-static int in_html_tag __ARGS((int));
+static int in_html_tag(int);
/*
* Return TRUE if the cursor is on a "<aaa>" tag. Ignore "<aaa/>".
@@ -3492,10 +3492,10 @@ extend:
return OK;
}
-static int find_next_quote __ARGS((char_u *top_ptr, int col, int quotechar,
- char_u *escape));
-static int find_prev_quote __ARGS((char_u *line, int col_start, int quotechar,
- char_u *escape));
+static int find_next_quote(char_u *top_ptr, int col, int quotechar,
+ char_u *escape);
+static int find_prev_quote(char_u *line, int col_start, int quotechar,
+ char_u *escape);
/*
* Search quote char from string line[col].
@@ -3772,7 +3772,7 @@ current_quote (
}
-static int is_one_char __ARGS((char_u *pattern));
+static int is_one_char(char_u *pattern);
/*
* Find next search match under cursor, cursor at end.
diff --git a/src/search.h b/src/search.h
index b24d2aa69a..87e97555ee 100644
--- a/src/search.h
+++ b/src/search.h
@@ -1,52 +1,52 @@
#ifndef NEOVIM_SEARCH_H
#define NEOVIM_SEARCH_H
/* search.c */
-int search_regcomp __ARGS((char_u *pat, int pat_save, int pat_use, int options,
- regmmatch_T *regmatch));
-char_u *get_search_pat __ARGS((void));
-char_u *reverse_text __ARGS((char_u *s));
-void save_search_patterns __ARGS((void));
-void restore_search_patterns __ARGS((void));
-void free_search_patterns __ARGS((void));
-int ignorecase __ARGS((char_u *pat));
-int pat_has_uppercase __ARGS((char_u *pat));
-char_u *last_search_pat __ARGS((void));
-void reset_search_dir __ARGS((void));
-void set_last_search_pat __ARGS((char_u *s, int idx, int magic, int setlast));
-void last_pat_prog __ARGS((regmmatch_T *regmatch));
-int searchit __ARGS((win_T *win, buf_T *buf, pos_T *pos, int dir, char_u *pat,
- long count, int options, int pat_use, linenr_T stop_lnum,
- proftime_T *tm));
-void set_search_direction __ARGS((int cdir));
-int do_search __ARGS((oparg_T *oap, int dirc, char_u *pat, long count,
- int options,
- proftime_T *tm));
-int search_for_exact_line __ARGS((buf_T *buf, pos_T *pos, int dir, char_u *pat));
-int searchc __ARGS((cmdarg_T *cap, int t_cmd));
-pos_T *findmatch __ARGS((oparg_T *oap, int initc));
-pos_T *findmatchlimit __ARGS((oparg_T *oap, int initc, int flags, int maxtravel));
-void showmatch __ARGS((int c));
-int findsent __ARGS((int dir, long count));
-int findpar __ARGS((int *pincl, int dir, long count, int what, int both));
-int startPS __ARGS((linenr_T lnum, int para, int both));
-int fwd_word __ARGS((long count, int bigword, int eol));
-int bck_word __ARGS((long count, int bigword, int stop));
-int end_word __ARGS((long count, int bigword, int stop, int empty));
-int bckend_word __ARGS((long count, int bigword, int eol));
-int current_word __ARGS((oparg_T *oap, long count, int include, int bigword));
-int current_sent __ARGS((oparg_T *oap, long count, int include));
-int current_block __ARGS((oparg_T *oap, long count, int include, int what,
- int other));
-int current_tagblock __ARGS((oparg_T *oap, long count_arg, int include));
-int current_par __ARGS((oparg_T *oap, long count, int include, int type));
-int current_quote __ARGS((oparg_T *oap, long count, int include, int quotechar));
-int current_search __ARGS((long count, int forward));
-int linewhite __ARGS((linenr_T lnum));
-void find_pattern_in_path __ARGS((char_u *ptr, int dir, int len, int whole,
- int skip_comments, int type, long count,
- int action, linenr_T start_lnum,
- linenr_T end_lnum));
-int read_viminfo_search_pattern __ARGS((vir_T *virp, int force));
-void write_viminfo_search_pattern __ARGS((FILE *fp));
+int search_regcomp(char_u *pat, int pat_save, int pat_use, int options,
+ regmmatch_T *regmatch);
+char_u *get_search_pat(void);
+char_u *reverse_text(char_u *s);
+void save_search_patterns(void);
+void restore_search_patterns(void);
+void free_search_patterns(void);
+int ignorecase(char_u *pat);
+int pat_has_uppercase(char_u *pat);
+char_u *last_search_pat(void);
+void reset_search_dir(void);
+void set_last_search_pat(char_u *s, int idx, int magic, int setlast);
+void last_pat_prog(regmmatch_T *regmatch);
+int searchit(win_T *win, buf_T *buf, pos_T *pos, int dir, char_u *pat,
+ long count, int options, int pat_use, linenr_T stop_lnum,
+ proftime_T *tm);
+void set_search_direction(int cdir);
+int do_search(oparg_T *oap, int dirc, char_u *pat, long count,
+ int options,
+ proftime_T *tm);
+int search_for_exact_line(buf_T *buf, pos_T *pos, int dir, char_u *pat);
+int searchc(cmdarg_T *cap, int t_cmd);
+pos_T *findmatch(oparg_T *oap, int initc);
+pos_T *findmatchlimit(oparg_T *oap, int initc, int flags, int maxtravel);
+void showmatch(int c);
+int findsent(int dir, long count);
+int findpar(int *pincl, int dir, long count, int what, int both);
+int startPS(linenr_T lnum, int para, int both);
+int fwd_word(long count, int bigword, int eol);
+int bck_word(long count, int bigword, int stop);
+int end_word(long count, int bigword, int stop, int empty);
+int bckend_word(long count, int bigword, int eol);
+int current_word(oparg_T *oap, long count, int include, int bigword);
+int current_sent(oparg_T *oap, long count, int include);
+int current_block(oparg_T *oap, long count, int include, int what,
+ int other);
+int current_tagblock(oparg_T *oap, long count_arg, int include);
+int current_par(oparg_T *oap, long count, int include, int type);
+int current_quote(oparg_T *oap, long count, int include, int quotechar);
+int current_search(long count, int forward);
+int linewhite(linenr_T lnum);
+void find_pattern_in_path(char_u *ptr, int dir, int len, int whole,
+ int skip_comments, int type, long count,
+ int action, linenr_T start_lnum,
+ linenr_T end_lnum);
+int read_viminfo_search_pattern(vir_T *virp, int force);
+void write_viminfo_search_pattern(FILE *fp);
/* vim: set ft=c : */
#endif /* NEOVIM_SEARCH_H */
diff --git a/src/sha256.c b/src/sha256.c
index bc2be2678f..0aaf07d5e5 100644
--- a/src/sha256.c
+++ b/src/sha256.c
@@ -23,7 +23,7 @@
#include "vim.h"
#include "sha256.h"
-static void sha256_process __ARGS((context_sha256_T *ctx, char_u data[64]));
+static void sha256_process(context_sha256_T *ctx, char_u data[64]);
#define GET_UINT32(n, b, i) \
{ \
@@ -256,7 +256,7 @@ void sha256_finish(context_sha256_T *ctx, char_u digest[32])
PUT_UINT32(ctx->state[7], digest, 28);
}
-static unsigned int get_some_time __ARGS((void));
+static unsigned int get_some_time(void);
/*
* Returns hex digest of "buf[buf_len]" in a static array.
diff --git a/src/sha256.h b/src/sha256.h
index 03e8aa6bea..0732ba8ec7 100644
--- a/src/sha256.h
+++ b/src/sha256.h
@@ -1,15 +1,15 @@
#ifndef NEOVIM_SHA256_H
#define NEOVIM_SHA256_H
/* sha256.c */
-void sha256_start __ARGS((context_sha256_T *ctx));
-void sha256_update __ARGS((context_sha256_T *ctx, char_u *input,
- UINT32_T length));
-void sha256_finish __ARGS((context_sha256_T *ctx, char_u digest[32]));
-char_u *sha256_bytes __ARGS((char_u *buf, int buf_len, char_u *salt,
- int salt_len));
-char_u *sha256_key __ARGS((char_u *buf, char_u *salt, int salt_len));
-int sha256_self_test __ARGS((void));
-void sha2_seed __ARGS((char_u *header, int header_len, char_u *salt,
- int salt_len));
+void sha256_start(context_sha256_T *ctx);
+void sha256_update(context_sha256_T *ctx, char_u *input,
+ UINT32_T length);
+void sha256_finish(context_sha256_T *ctx, char_u digest[32]);
+char_u *sha256_bytes(char_u *buf, int buf_len, char_u *salt,
+ int salt_len);
+char_u *sha256_key(char_u *buf, char_u *salt, int salt_len);
+int sha256_self_test(void);
+void sha2_seed(char_u *header, int header_len, char_u *salt,
+ int salt_len);
/* vim: set ft=c : */
#endif /* NEOVIM_SHA256_H */
diff --git a/src/spell.c b/src/spell.c
index 4d8bcf5245..df264ee3fa 100644
--- a/src/spell.c
+++ b/src/spell.c
@@ -742,13 +742,13 @@ static int did_set_spelltab;
#define CF_WORD 0x01
#define CF_UPPER 0x02
-static void clear_spell_chartab __ARGS((spelltab_T *sp));
-static int set_spell_finish __ARGS((spelltab_T *new_st));
-static int spell_iswordp __ARGS((char_u *p, win_T *wp));
-static int spell_iswordp_nmw __ARGS((char_u *p, win_T *wp));
-static int spell_mb_isword_class __ARGS((int cl, win_T *wp));
-static int spell_iswordp_w __ARGS((int *p, win_T *wp));
-static int write_spell_prefcond __ARGS((FILE *fd, garray_T *gap));
+static void clear_spell_chartab(spelltab_T *sp);
+static int set_spell_finish(spelltab_T *new_st);
+static int spell_iswordp(char_u *p, win_T *wp);
+static int spell_iswordp_nmw(char_u *p, win_T *wp);
+static int spell_mb_isword_class(int cl, win_T *wp);
+static int spell_iswordp_w(int *p, win_T *wp);
+static int write_spell_prefcond(FILE *fd, garray_T *gap);
/*
* For finding suggestions: At each node in the tree these states are tried:
@@ -826,135 +826,133 @@ typedef struct trystate_S {
#define FIND_COMPOUND 3 /* find case-folded compound word */
#define FIND_KEEPCOMPOUND 4 /* find keep-case compound word */
-static slang_T *slang_alloc __ARGS((char_u *lang));
-static void slang_free __ARGS((slang_T *lp));
-static void slang_clear __ARGS((slang_T *lp));
-static void slang_clear_sug __ARGS((slang_T *lp));
-static void find_word __ARGS((matchinf_T *mip, int mode));
-static int match_checkcompoundpattern __ARGS((char_u *ptr, int wlen,
- garray_T *gap));
-static int can_compound __ARGS((slang_T *slang, char_u *word, char_u *flags));
-static int can_be_compound __ARGS((trystate_T *sp, slang_T *slang, char_u *
- compflags,
- int flag));
-static int match_compoundrule __ARGS((slang_T *slang, char_u *compflags));
-static int valid_word_prefix __ARGS((int totprefcnt, int arridx, int flags,
- char_u *word, slang_T *slang,
- int cond_req));
-static void find_prefix __ARGS((matchinf_T *mip, int mode));
-static int fold_more __ARGS((matchinf_T *mip));
-static int spell_valid_case __ARGS((int wordflags, int treeflags));
-static int no_spell_checking __ARGS((win_T *wp));
-static void spell_load_lang __ARGS((char_u *lang));
-static char_u *spell_enc __ARGS((void));
-static void int_wordlist_spl __ARGS((char_u *fname));
-static void spell_load_cb __ARGS((char_u *fname, void *cookie));
-static slang_T *spell_load_file __ARGS((char_u *fname, char_u *lang, slang_T *
- old_lp,
- int silent));
-static char_u *read_cnt_string __ARGS((FILE *fd, int cnt_bytes, int *lenp));
-static int read_region_section __ARGS((FILE *fd, slang_T *slang, int len));
-static int read_charflags_section __ARGS((FILE *fd));
-static int read_prefcond_section __ARGS((FILE *fd, slang_T *lp));
-static int read_rep_section __ARGS((FILE *fd, garray_T *gap, short *first));
-static int read_sal_section __ARGS((FILE *fd, slang_T *slang));
-static int read_words_section __ARGS((FILE *fd, slang_T *lp, int len));
-static void count_common_word __ARGS((slang_T *lp, char_u *word, int len,
- int count));
-static int score_wordcount_adj __ARGS((slang_T *slang, int score, char_u *word,
- int split));
-static int read_sofo_section __ARGS((FILE *fd, slang_T *slang));
-static int read_compound __ARGS((FILE *fd, slang_T *slang, int len));
-static int byte_in_str __ARGS((char_u *str, int byte));
-static int init_syl_tab __ARGS((slang_T *slang));
-static int count_syllables __ARGS((slang_T *slang, char_u *word));
-static int set_sofo __ARGS((slang_T *lp, char_u *from, char_u *to));
-static void set_sal_first __ARGS((slang_T *lp));
-static int *mb_str2wide __ARGS((char_u *s));
-static int spell_read_tree __ARGS((FILE *fd, char_u **bytsp, idx_T **idxsp,
- int prefixtree,
- int prefixcnt));
-static idx_T read_tree_node __ARGS((FILE *fd, char_u *byts, idx_T *idxs,
- int maxidx, idx_T startidx, int prefixtree,
- int maxprefcondnr));
-static void clear_midword __ARGS((win_T *buf));
-static void use_midword __ARGS((slang_T *lp, win_T *buf));
-static int find_region __ARGS((char_u *rp, char_u *region));
-static int captype __ARGS((char_u *word, char_u *end));
-static int badword_captype __ARGS((char_u *word, char_u *end));
-static void spell_reload_one __ARGS((char_u *fname, int added_word));
-static void set_spell_charflags __ARGS((char_u *flags, int cnt, char_u *upp));
-static int set_spell_chartab __ARGS((char_u *fol, char_u *low, char_u *upp));
-static int spell_casefold __ARGS((char_u *p, int len, char_u *buf, int buflen));
-static int check_need_cap __ARGS((linenr_T lnum, colnr_T col));
-static void spell_find_suggest __ARGS((char_u *badptr, int badlen, suginfo_T *
- su, int maxcount, int banbadword,
- int need_cap,
- int interactive));
-static void spell_suggest_expr __ARGS((suginfo_T *su, char_u *expr));
-static void spell_suggest_file __ARGS((suginfo_T *su, char_u *fname));
-static void spell_suggest_intern __ARGS((suginfo_T *su, int interactive));
-static void suggest_load_files __ARGS((void));
-static void tree_count_words __ARGS((char_u *byts, idx_T *idxs));
-static void spell_find_cleanup __ARGS((suginfo_T *su));
-static void onecap_copy __ARGS((char_u *word, char_u *wcopy, int upper));
-static void allcap_copy __ARGS((char_u *word, char_u *wcopy));
-static void suggest_try_special __ARGS((suginfo_T *su));
-static void suggest_try_change __ARGS((suginfo_T *su));
-static void suggest_trie_walk __ARGS((suginfo_T *su, langp_T *lp, char_u *fword,
- int soundfold));
-static void go_deeper __ARGS((trystate_T *stack, int depth, int score_add));
-static int nofold_len __ARGS((char_u *fword, int flen, char_u *word));
-static void find_keepcap_word __ARGS((slang_T *slang, char_u *fword,
- char_u *kword));
-static void score_comp_sal __ARGS((suginfo_T *su));
-static void score_combine __ARGS((suginfo_T *su));
-static int stp_sal_score __ARGS((suggest_T *stp, suginfo_T *su, slang_T *slang,
- char_u *badsound));
-static void suggest_try_soundalike_prep __ARGS((void));
-static void suggest_try_soundalike __ARGS((suginfo_T *su));
-static void suggest_try_soundalike_finish __ARGS((void));
-static void add_sound_suggest __ARGS((suginfo_T *su, char_u *goodword,
- int score,
- langp_T *lp));
-static int soundfold_find __ARGS((slang_T *slang, char_u *word));
-static void make_case_word __ARGS((char_u *fword, char_u *cword, int flags));
-static void set_map_str __ARGS((slang_T *lp, char_u *map));
-static int similar_chars __ARGS((slang_T *slang, int c1, int c2));
-static void add_suggestion __ARGS((suginfo_T *su, garray_T *gap, char_u *
- goodword, int badlen, int score,
- int altscore, int had_bonus, slang_T *slang,
- int maxsf));
-static void check_suggestions __ARGS((suginfo_T *su, garray_T *gap));
-static void add_banned __ARGS((suginfo_T *su, char_u *word));
-static void rescore_suggestions __ARGS((suginfo_T *su));
-static void rescore_one __ARGS((suginfo_T *su, suggest_T *stp));
-static int cleanup_suggestions __ARGS((garray_T *gap, int maxscore, int keep));
-static void spell_soundfold __ARGS((slang_T *slang, char_u *inword, int folded,
- char_u *res));
-static void spell_soundfold_sofo __ARGS((slang_T *slang, char_u *inword,
- char_u *res));
-static void spell_soundfold_sal __ARGS((slang_T *slang, char_u *inword,
- char_u *res));
-static void spell_soundfold_wsal __ARGS((slang_T *slang, char_u *inword,
- char_u *res));
-static int soundalike_score __ARGS((char_u *goodsound, char_u *badsound));
-static int spell_edit_score __ARGS((slang_T *slang, char_u *badword,
- char_u *goodword));
-static int spell_edit_score_limit __ARGS((slang_T *slang, char_u *badword,
- char_u *goodword,
- int limit));
-static int spell_edit_score_limit_w __ARGS((slang_T *slang, char_u *badword,
- char_u *goodword,
- int limit));
-static void dump_word __ARGS((slang_T *slang, char_u *word, char_u *pat,
+static slang_T *slang_alloc(char_u *lang);
+static void slang_free(slang_T *lp);
+static void slang_clear(slang_T *lp);
+static void slang_clear_sug(slang_T *lp);
+static void find_word(matchinf_T *mip, int mode);
+static int match_checkcompoundpattern(char_u *ptr, int wlen,
+ garray_T *gap);
+static int can_compound(slang_T *slang, char_u *word, char_u *flags);
+static int can_be_compound(trystate_T *sp, slang_T *slang, char_u *compflags,
+ int flag);
+static int match_compoundrule(slang_T *slang, char_u *compflags);
+static int valid_word_prefix(int totprefcnt, int arridx, int flags,
+ char_u *word, slang_T *slang,
+ int cond_req);
+static void find_prefix(matchinf_T *mip, int mode);
+static int fold_more(matchinf_T *mip);
+static int spell_valid_case(int wordflags, int treeflags);
+static int no_spell_checking(win_T *wp);
+static void spell_load_lang(char_u *lang);
+static char_u *spell_enc(void);
+static void int_wordlist_spl(char_u *fname);
+static void spell_load_cb(char_u *fname, void *cookie);
+static slang_T *spell_load_file(char_u *fname, char_u *lang, slang_T *old_lp,
+ int silent);
+static char_u *read_cnt_string(FILE *fd, int cnt_bytes, int *lenp);
+static int read_region_section(FILE *fd, slang_T *slang, int len);
+static int read_charflags_section(FILE *fd);
+static int read_prefcond_section(FILE *fd, slang_T *lp);
+static int read_rep_section(FILE *fd, garray_T *gap, short *first);
+static int read_sal_section(FILE *fd, slang_T *slang);
+static int read_words_section(FILE *fd, slang_T *lp, int len);
+static void count_common_word(slang_T *lp, char_u *word, int len,
+ int count);
+static int score_wordcount_adj(slang_T *slang, int score, char_u *word,
+ int split);
+static int read_sofo_section(FILE *fd, slang_T *slang);
+static int read_compound(FILE *fd, slang_T *slang, int len);
+static int byte_in_str(char_u *str, int byte);
+static int init_syl_tab(slang_T *slang);
+static int count_syllables(slang_T *slang, char_u *word);
+static int set_sofo(slang_T *lp, char_u *from, char_u *to);
+static void set_sal_first(slang_T *lp);
+static int *mb_str2wide(char_u *s);
+static int spell_read_tree(FILE *fd, char_u **bytsp, idx_T **idxsp,
+ int prefixtree,
+ int prefixcnt);
+static idx_T read_tree_node(FILE *fd, char_u *byts, idx_T *idxs,
+ int maxidx, idx_T startidx, int prefixtree,
+ int maxprefcondnr);
+static void clear_midword(win_T *buf);
+static void use_midword(slang_T *lp, win_T *buf);
+static int find_region(char_u *rp, char_u *region);
+static int captype(char_u *word, char_u *end);
+static int badword_captype(char_u *word, char_u *end);
+static void spell_reload_one(char_u *fname, int added_word);
+static void set_spell_charflags(char_u *flags, int cnt, char_u *upp);
+static int set_spell_chartab(char_u *fol, char_u *low, char_u *upp);
+static int spell_casefold(char_u *p, int len, char_u *buf, int buflen);
+static int check_need_cap(linenr_T lnum, colnr_T col);
+static void spell_find_suggest(char_u *badptr, int badlen, suginfo_T *su,
+ int maxcount, int banbadword,
+ int need_cap,
+ int interactive);
+static void spell_suggest_expr(suginfo_T *su, char_u *expr);
+static void spell_suggest_file(suginfo_T *su, char_u *fname);
+static void spell_suggest_intern(suginfo_T *su, int interactive);
+static void suggest_load_files(void);
+static void tree_count_words(char_u *byts, idx_T *idxs);
+static void spell_find_cleanup(suginfo_T *su);
+static void onecap_copy(char_u *word, char_u *wcopy, int upper);
+static void allcap_copy(char_u *word, char_u *wcopy);
+static void suggest_try_special(suginfo_T *su);
+static void suggest_try_change(suginfo_T *su);
+static void suggest_trie_walk(suginfo_T *su, langp_T *lp, char_u *fword,
+ int soundfold);
+static void go_deeper(trystate_T *stack, int depth, int score_add);
+static int nofold_len(char_u *fword, int flen, char_u *word);
+static void find_keepcap_word(slang_T *slang, char_u *fword,
+ char_u *kword);
+static void score_comp_sal(suginfo_T *su);
+static void score_combine(suginfo_T *su);
+static int stp_sal_score(suggest_T *stp, suginfo_T *su, slang_T *slang,
+ char_u *badsound);
+static void suggest_try_soundalike_prep(void);
+static void suggest_try_soundalike(suginfo_T *su);
+static void suggest_try_soundalike_finish(void);
+static void add_sound_suggest(suginfo_T *su, char_u *goodword,
+ int score,
+ langp_T *lp);
+static int soundfold_find(slang_T *slang, char_u *word);
+static void make_case_word(char_u *fword, char_u *cword, int flags);
+static void set_map_str(slang_T *lp, char_u *map);
+static int similar_chars(slang_T *slang, int c1, int c2);
+static void add_suggestion(suginfo_T *su, garray_T *gap, char_u *goodword,
+ int badlen, int score,
+ int altscore, int had_bonus, slang_T *slang,
+ int maxsf);
+static void check_suggestions(suginfo_T *su, garray_T *gap);
+static void add_banned(suginfo_T *su, char_u *word);
+static void rescore_suggestions(suginfo_T *su);
+static void rescore_one(suginfo_T *su, suggest_T *stp);
+static int cleanup_suggestions(garray_T *gap, int maxscore, int keep);
+static void spell_soundfold(slang_T *slang, char_u *inword, int folded,
+ char_u *res);
+static void spell_soundfold_sofo(slang_T *slang, char_u *inword,
+ char_u *res);
+static void spell_soundfold_sal(slang_T *slang, char_u *inword,
+ char_u *res);
+static void spell_soundfold_wsal(slang_T *slang, char_u *inword,
+ char_u *res);
+static int soundalike_score(char_u *goodsound, char_u *badsound);
+static int spell_edit_score(slang_T *slang, char_u *badword,
+ char_u *goodword);
+static int spell_edit_score_limit(slang_T *slang, char_u *badword,
+ char_u *goodword,
+ int limit);
+static int spell_edit_score_limit_w(slang_T *slang, char_u *badword,
+ char_u *goodword,
+ int limit);
+static void dump_word(slang_T *slang, char_u *word, char_u *pat,
+ int *dir, int round, int flags,
+ linenr_T lnum);
+static linenr_T dump_prefixes(slang_T *slang, char_u *word, char_u *pat,
int *dir, int round, int flags,
- linenr_T lnum));
-static linenr_T dump_prefixes __ARGS((slang_T *slang, char_u *word, char_u *pat,
- int *dir, int round, int flags,
- linenr_T startlnum));
-static buf_T *open_spellbuf __ARGS((void));
-static void close_spellbuf __ARGS((buf_T *buf));
+ linenr_T startlnum);
+static buf_T *open_spellbuf(void);
+static void close_spellbuf(buf_T *buf);
/*
* Use our own character-case definitions, because the current locale may
@@ -4560,75 +4558,75 @@ typedef struct spellinfo_S {
int si_newcompID; /* current value for compound ID */
} spellinfo_T;
-static afffile_T *spell_read_aff __ARGS((spellinfo_T *spin, char_u *fname));
-static int is_aff_rule __ARGS((char_u **items, int itemcnt, char *rulename,
- int mincount));
-static void aff_process_flags __ARGS((afffile_T *affile, affentry_T *entry));
-static int spell_info_item __ARGS((char_u *s));
-static unsigned affitem2flag __ARGS((int flagtype, char_u *item, char_u *fname,
- int lnum));
-static unsigned get_affitem __ARGS((int flagtype, char_u **pp));
-static void process_compflags __ARGS((spellinfo_T *spin, afffile_T *aff,
- char_u *compflags));
-static void check_renumber __ARGS((spellinfo_T *spin));
-static int flag_in_afflist __ARGS((int flagtype, char_u *afflist, unsigned flag));
-static void aff_check_number __ARGS((int spinval, int affval, char *name));
-static void aff_check_string __ARGS((char_u *spinval, char_u *affval,
- char *name));
-static int str_equal __ARGS((char_u *s1, char_u *s2));
-static void add_fromto __ARGS((spellinfo_T *spin, garray_T *gap, char_u *from,
- char_u *to));
-static int sal_to_bool __ARGS((char_u *s));
-static void spell_free_aff __ARGS((afffile_T *aff));
-static int spell_read_dic __ARGS((spellinfo_T *spin, char_u *fname,
- afffile_T *affile));
-static int get_affix_flags __ARGS((afffile_T *affile, char_u *afflist));
-static int get_pfxlist __ARGS((afffile_T *affile, char_u *afflist,
- char_u *store_afflist));
-static void get_compflags __ARGS((afffile_T *affile, char_u *afflist,
- char_u *store_afflist));
-static int store_aff_word __ARGS((spellinfo_T *spin, char_u *word, char_u *
- afflist, afffile_T *affile, hashtab_T *ht,
- hashtab_T *xht, int condit, int flags,
- char_u *pfxlist,
- int pfxlen));
-static int spell_read_wordfile __ARGS((spellinfo_T *spin, char_u *fname));
-static void *getroom __ARGS((spellinfo_T *spin, size_t len, int align));
-static char_u *getroom_save __ARGS((spellinfo_T *spin, char_u *s));
-static void free_blocks __ARGS((sblock_T *bl));
-static wordnode_T *wordtree_alloc __ARGS((spellinfo_T *spin));
-static int store_word __ARGS((spellinfo_T *spin, char_u *word, int flags,
- int region, char_u *pfxlist,
- int need_affix));
-static int tree_add_word __ARGS((spellinfo_T *spin, char_u *word, wordnode_T *
- tree, int flags, int region,
- int affixID));
-static wordnode_T *get_wordnode __ARGS((spellinfo_T *spin));
-static int deref_wordnode __ARGS((spellinfo_T *spin, wordnode_T *node));
-static void free_wordnode __ARGS((spellinfo_T *spin, wordnode_T *n));
-static void wordtree_compress __ARGS((spellinfo_T *spin, wordnode_T *root));
-static int node_compress __ARGS((spellinfo_T *spin, wordnode_T *node,
- hashtab_T *ht,
- int *tot));
-static int node_equal __ARGS((wordnode_T *n1, wordnode_T *n2));
-static int write_vim_spell __ARGS((spellinfo_T *spin, char_u *fname));
-static void clear_node __ARGS((wordnode_T *node));
-static int put_node __ARGS((FILE *fd, wordnode_T *node, int idx, int regionmask,
- int prefixtree));
-static void spell_make_sugfile __ARGS((spellinfo_T *spin, char_u *wfname));
-static int sug_filltree __ARGS((spellinfo_T *spin, slang_T *slang));
-static int sug_maketable __ARGS((spellinfo_T *spin));
-static int sug_filltable __ARGS((spellinfo_T *spin, wordnode_T *node,
- int startwordnr,
- garray_T *gap));
-static int offset2bytes __ARGS((int nr, char_u *buf));
-static int bytes2offset __ARGS((char_u **pp));
-static void sug_write __ARGS((spellinfo_T *spin, char_u *fname));
-static void mkspell __ARGS((int fcount, char_u **fnames, int ascii,
- int over_write,
- int added_word));
-static void spell_message __ARGS((spellinfo_T *spin, char_u *str));
-static void init_spellfile __ARGS((void));
+static afffile_T *spell_read_aff(spellinfo_T *spin, char_u *fname);
+static int is_aff_rule(char_u **items, int itemcnt, char *rulename,
+ int mincount);
+static void aff_process_flags(afffile_T *affile, affentry_T *entry);
+static int spell_info_item(char_u *s);
+static unsigned affitem2flag(int flagtype, char_u *item, char_u *fname,
+ int lnum);
+static unsigned get_affitem(int flagtype, char_u **pp);
+static void process_compflags(spellinfo_T *spin, afffile_T *aff,
+ char_u *compflags);
+static void check_renumber(spellinfo_T *spin);
+static int flag_in_afflist(int flagtype, char_u *afflist, unsigned flag);
+static void aff_check_number(int spinval, int affval, char *name);
+static void aff_check_string(char_u *spinval, char_u *affval,
+ char *name);
+static int str_equal(char_u *s1, char_u *s2);
+static void add_fromto(spellinfo_T *spin, garray_T *gap, char_u *from,
+ char_u *to);
+static int sal_to_bool(char_u *s);
+static void spell_free_aff(afffile_T *aff);
+static int spell_read_dic(spellinfo_T *spin, char_u *fname,
+ afffile_T *affile);
+static int get_affix_flags(afffile_T *affile, char_u *afflist);
+static int get_pfxlist(afffile_T *affile, char_u *afflist,
+ char_u *store_afflist);
+static void get_compflags(afffile_T *affile, char_u *afflist,
+ char_u *store_afflist);
+static int store_aff_word(spellinfo_T *spin, char_u *word, char_u *afflist,
+ afffile_T *affile, hashtab_T *ht,
+ hashtab_T *xht, int condit, int flags,
+ char_u *pfxlist,
+ int pfxlen);
+static int spell_read_wordfile(spellinfo_T *spin, char_u *fname);
+static void *getroom(spellinfo_T *spin, size_t len, int align);
+static char_u *getroom_save(spellinfo_T *spin, char_u *s);
+static void free_blocks(sblock_T *bl);
+static wordnode_T *wordtree_alloc(spellinfo_T *spin);
+static int store_word(spellinfo_T *spin, char_u *word, int flags,
+ int region, char_u *pfxlist,
+ int need_affix);
+static int tree_add_word(spellinfo_T *spin, char_u *word,
+ wordnode_T *tree, int flags, int region,
+ int affixID);
+static wordnode_T *get_wordnode(spellinfo_T *spin);
+static int deref_wordnode(spellinfo_T *spin, wordnode_T *node);
+static void free_wordnode(spellinfo_T *spin, wordnode_T *n);
+static void wordtree_compress(spellinfo_T *spin, wordnode_T *root);
+static int node_compress(spellinfo_T *spin, wordnode_T *node,
+ hashtab_T *ht,
+ int *tot);
+static int node_equal(wordnode_T *n1, wordnode_T *n2);
+static int write_vim_spell(spellinfo_T *spin, char_u *fname);
+static void clear_node(wordnode_T *node);
+static int put_node(FILE *fd, wordnode_T *node, int idx, int regionmask,
+ int prefixtree);
+static void spell_make_sugfile(spellinfo_T *spin, char_u *wfname);
+static int sug_filltree(spellinfo_T *spin, slang_T *slang);
+static int sug_maketable(spellinfo_T *spin);
+static int sug_filltable(spellinfo_T *spin, wordnode_T *node,
+ int startwordnr,
+ garray_T *gap);
+static int offset2bytes(int nr, char_u *buf);
+static int bytes2offset(char_u **pp);
+static void sug_write(spellinfo_T *spin, char_u *fname);
+static void mkspell(int fcount, char_u **fnames, int ascii,
+ int over_write,
+ int added_word);
+static void spell_message(spellinfo_T *spin, char_u *str);
+static void init_spellfile(void);
/* In the postponed prefixes tree wn_flags is used to store the WFP_ flags,
* but it must be negative to indicate the prefix tree to tree_add_word().
@@ -7111,7 +7109,7 @@ static int node_equal(wordnode_T *n1, wordnode_T *n2)
}
static int
-rep_compare __ARGS((const void *s1, const void *s2));
+rep_compare(const void *s1, const void *s2);
/*
* Function given to qsort() to sort the REP items on "from" string.
@@ -12417,7 +12415,7 @@ static void rescore_one(suginfo_T *su, suggest_T *stp)
}
static int
-sug_compare __ARGS((const void *s1, const void *s2));
+sug_compare(const void *s1, const void *s2);
/*
* Function given to qsort() to sort the suggestions on st_score.
diff --git a/src/spell.h b/src/spell.h
index 8a349300a3..6541e8fe25 100644
--- a/src/spell.h
+++ b/src/spell.h
@@ -1,33 +1,33 @@
#ifndef NEOVIM_SPELL_H
#define NEOVIM_SPELL_H
/* spell.c */
-int spell_check __ARGS((win_T *wp, char_u *ptr, hlf_T *attrp, int *capcol,
- int docount));
-int spell_move_to __ARGS((win_T *wp, int dir, int allwords, int curline,
- hlf_T *attrp));
-void spell_cat_line __ARGS((char_u *buf, char_u *line, int maxlen));
-char_u *did_set_spelllang __ARGS((win_T *wp));
-void spell_delete_wordlist __ARGS((void));
-void spell_free_all __ARGS((void));
-void spell_reload __ARGS((void));
-int spell_check_msm __ARGS((void));
-void ex_mkspell __ARGS((exarg_T *eap));
-void ex_spell __ARGS((exarg_T *eap));
-void spell_add_word __ARGS((char_u *word, int len, int bad, int idx, int undo));
-void init_spell_chartab __ARGS((void));
-int spell_check_sps __ARGS((void));
-void spell_suggest __ARGS((int count));
-void ex_spellrepall __ARGS((exarg_T *eap));
-void spell_suggest_list __ARGS((garray_T *gap, char_u *word, int maxcount,
- int need_cap,
- int interactive));
-char_u *eval_soundfold __ARGS((char_u *word));
-void ex_spellinfo __ARGS((exarg_T *eap));
-void ex_spelldump __ARGS((exarg_T *eap));
-void spell_dump_compl __ARGS((char_u *pat, int ic, int *dir, int dumpflags_arg));
-char_u *spell_to_word_end __ARGS((char_u *start, win_T *win));
-int spell_word_start __ARGS((int startcol));
-void spell_expand_check_cap __ARGS((colnr_T col));
-int expand_spelling __ARGS((linenr_T lnum, char_u *pat, char_u ***matchp));
+int spell_check(win_T *wp, char_u *ptr, hlf_T *attrp, int *capcol,
+ int docount);
+int spell_move_to(win_T *wp, int dir, int allwords, int curline,
+ hlf_T *attrp);
+void spell_cat_line(char_u *buf, char_u *line, int maxlen);
+char_u *did_set_spelllang(win_T *wp);
+void spell_delete_wordlist(void);
+void spell_free_all(void);
+void spell_reload(void);
+int spell_check_msm(void);
+void ex_mkspell(exarg_T *eap);
+void ex_spell(exarg_T *eap);
+void spell_add_word(char_u *word, int len, int bad, int idx, int undo);
+void init_spell_chartab(void);
+int spell_check_sps(void);
+void spell_suggest(int count);
+void ex_spellrepall(exarg_T *eap);
+void spell_suggest_list(garray_T *gap, char_u *word, int maxcount,
+ int need_cap,
+ int interactive);
+char_u *eval_soundfold(char_u *word);
+void ex_spellinfo(exarg_T *eap);
+void ex_spelldump(exarg_T *eap);
+void spell_dump_compl(char_u *pat, int ic, int *dir, int dumpflags_arg);
+char_u *spell_to_word_end(char_u *start, win_T *win);
+int spell_word_start(int startcol);
+void spell_expand_check_cap(colnr_T col);
+int expand_spelling(linenr_T lnum, char_u *pat, char_u ***matchp);
/* vim: set ft=c : */
#endif /* NEOVIM_SPELL_H */
diff --git a/src/syntax.c b/src/syntax.c
index ca0bfe1e4b..fb3285729f 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -90,17 +90,17 @@ static int hl_attr_table[] =
{HL_BOLD, HL_STANDOUT, HL_UNDERLINE, HL_UNDERCURL, HL_ITALIC, HL_INVERSE,
HL_INVERSE, 0};
-static int get_attr_entry __ARGS((garray_T *table, attrentry_T *aep));
-static void syn_unadd_group __ARGS((void));
-static void set_hl_attr __ARGS((int idx));
-static void highlight_list_one __ARGS((int id));
-static int highlight_list_arg __ARGS((int id, int didh, int type, int iarg,
- char_u *sarg,
- char *name));
-static int syn_add_group __ARGS((char_u *name));
-static int syn_list_header __ARGS((int did_header, int outlen, int id));
-static int hl_has_settings __ARGS((int idx, int check_link));
-static void highlight_clear __ARGS((int idx));
+static int get_attr_entry(garray_T *table, attrentry_T *aep);
+static void syn_unadd_group(void);
+static void set_hl_attr(int idx);
+static void highlight_list_one(int id);
+static int highlight_list_arg(int id, int didh, int type, int iarg,
+ char_u *sarg,
+ char *name);
+static int syn_add_group(char_u *name);
+static int syn_list_header(int did_header, int outlen, int id);
+static int hl_has_settings(int idx, int check_link);
+static void highlight_clear(int idx);
/*
@@ -353,114 +353,113 @@ static int current_line_id = 0; /* unique number for current line */
#define CUR_STATE(idx) ((stateitem_T *)(current_state.ga_data))[idx]
-static void syn_sync __ARGS((win_T *wp, linenr_T lnum, synstate_T *last_valid));
-static int syn_match_linecont __ARGS((linenr_T lnum));
-static void syn_start_line __ARGS((void));
-static void syn_update_ends __ARGS((int startofline));
-static void syn_stack_alloc __ARGS((void));
-static int syn_stack_cleanup __ARGS((void));
-static void syn_stack_free_entry __ARGS((synblock_T *block, synstate_T *p));
-static synstate_T *syn_stack_find_entry __ARGS((linenr_T lnum));
-static synstate_T *store_current_state __ARGS((void));
-static void load_current_state __ARGS((synstate_T *from));
-static void invalidate_current_state __ARGS((void));
-static int syn_stack_equal __ARGS((synstate_T *sp));
-static void validate_current_state __ARGS((void));
-static int syn_finish_line __ARGS((int syncing));
-static int syn_current_attr __ARGS((int syncing, int displaying, int *can_spell,
- int keep_state));
-static int did_match_already __ARGS((int idx, garray_T *gap));
-static stateitem_T *push_next_match __ARGS((stateitem_T *cur_si));
-static void check_state_ends __ARGS((void));
-static void update_si_attr __ARGS((int idx));
-static void check_keepend __ARGS((void));
-static void update_si_end __ARGS((stateitem_T *sip, int startcol, int force));
-static short *copy_id_list __ARGS((short *list));
-static int in_id_list __ARGS((stateitem_T *item, short *cont_list,
- struct sp_syn *ssp,
- int contained));
-static int push_current_state __ARGS((int idx));
-static void pop_current_state __ARGS((void));
-static void syn_clear_time __ARGS((syn_time_T *tt));
-static void syntime_clear __ARGS((void));
-static int syn_compare_syntime __ARGS((const void *v1, const void *v2));
-static void syntime_report __ARGS((void));
+static void syn_sync(win_T *wp, linenr_T lnum, synstate_T *last_valid);
+static int syn_match_linecont(linenr_T lnum);
+static void syn_start_line(void);
+static void syn_update_ends(int startofline);
+static void syn_stack_alloc(void);
+static int syn_stack_cleanup(void);
+static void syn_stack_free_entry(synblock_T *block, synstate_T *p);
+static synstate_T *syn_stack_find_entry(linenr_T lnum);
+static synstate_T *store_current_state(void);
+static void load_current_state(synstate_T *from);
+static void invalidate_current_state(void);
+static int syn_stack_equal(synstate_T *sp);
+static void validate_current_state(void);
+static int syn_finish_line(int syncing);
+static int syn_current_attr(int syncing, int displaying, int *can_spell,
+ int keep_state);
+static int did_match_already(int idx, garray_T *gap);
+static stateitem_T *push_next_match(stateitem_T *cur_si);
+static void check_state_ends(void);
+static void update_si_attr(int idx);
+static void check_keepend(void);
+static void update_si_end(stateitem_T *sip, int startcol, int force);
+static short *copy_id_list(short *list);
+static int in_id_list(stateitem_T *item, short *cont_list,
+ struct sp_syn *ssp,
+ int contained);
+static int push_current_state(int idx);
+static void pop_current_state(void);
+static void syn_clear_time(syn_time_T *tt);
+static void syntime_clear(void);
+static int syn_compare_syntime(const void *v1, const void *v2);
+static void syntime_report(void);
static int syn_time_on = FALSE;
# define IF_SYN_TIME(p) (p)
-static void syn_stack_apply_changes_block __ARGS((synblock_T *block, buf_T *buf));
-static void find_endpos __ARGS((int idx, lpos_T *startpos, lpos_T *m_endpos,
- lpos_T *hl_endpos, long *flagsp, lpos_T *
- end_endpos, int *end_idx,
- reg_extmatch_T *start_ext));
-static void clear_syn_state __ARGS((synstate_T *p));
-static void clear_current_state __ARGS((void));
-
-static void limit_pos __ARGS((lpos_T *pos, lpos_T *limit));
-static void limit_pos_zero __ARGS((lpos_T *pos, lpos_T *limit));
-static void syn_add_end_off __ARGS((lpos_T *result, regmmatch_T *regmatch,
- synpat_T *spp, int idx,
- int extra));
-static void syn_add_start_off __ARGS((lpos_T *result, regmmatch_T *regmatch,
- synpat_T *spp, int idx,
- int extra));
-static char_u *syn_getcurline __ARGS((void));
-static int syn_regexec __ARGS((regmmatch_T *rmp, linenr_T lnum, colnr_T col,
- syn_time_T *st));
-static int check_keyword_id __ARGS((char_u *line, int startcol, int *endcol,
- long *flags, short **next_list,
- stateitem_T *cur_si,
- int *ccharp));
-static void syn_cmd_case __ARGS((exarg_T *eap, int syncing));
-static void syn_cmd_spell __ARGS((exarg_T *eap, int syncing));
-static void syntax_sync_clear __ARGS((void));
-static void syn_remove_pattern __ARGS((synblock_T *block, int idx));
-static void syn_clear_pattern __ARGS((synblock_T *block, int i));
-static void syn_clear_cluster __ARGS((synblock_T *block, int i));
-static void syn_cmd_clear __ARGS((exarg_T *eap, int syncing));
-static void syn_cmd_conceal __ARGS((exarg_T *eap, int syncing));
-static void syn_clear_one __ARGS((int id, int syncing));
-static void syn_cmd_on __ARGS((exarg_T *eap, int syncing));
-static void syn_cmd_enable __ARGS((exarg_T *eap, int syncing));
-static void syn_cmd_reset __ARGS((exarg_T *eap, int syncing));
-static void syn_cmd_manual __ARGS((exarg_T *eap, int syncing));
-static void syn_cmd_off __ARGS((exarg_T *eap, int syncing));
-static void syn_cmd_onoff __ARGS((exarg_T *eap, char *name));
-static void syn_cmd_list __ARGS((exarg_T *eap, int syncing));
-static void syn_lines_msg __ARGS((void));
-static void syn_match_msg __ARGS((void));
-static void syn_stack_free_block __ARGS((synblock_T *block));
-static void syn_list_one __ARGS((int id, int syncing, int link_only));
-static void syn_list_cluster __ARGS((int id));
-static void put_id_list __ARGS((char_u *name, short *list, int attr));
-static void put_pattern __ARGS((char *s, int c, synpat_T *spp, int attr));
-static int syn_list_keywords __ARGS((int id, hashtab_T *ht, int did_header,
- int attr));
-static void syn_clear_keyword __ARGS((int id, hashtab_T *ht));
-static void clear_keywtab __ARGS((hashtab_T *ht));
-static void add_keyword __ARGS((char_u *name, int id, int flags,
- short *cont_in_list, short *next_list,
- int conceal_char));
-static char_u *get_group_name __ARGS((char_u *arg, char_u **name_end));
-static char_u *get_syn_options __ARGS((char_u *arg, syn_opt_arg_T *opt,
- int *conceal_char));
-static void syn_cmd_include __ARGS((exarg_T *eap, int syncing));
-static void syn_cmd_keyword __ARGS((exarg_T *eap, int syncing));
-static void syn_cmd_match __ARGS((exarg_T *eap, int syncing));
-static void syn_cmd_region __ARGS((exarg_T *eap, int syncing));
-static int syn_compare_stub __ARGS((const void *v1, const void *v2));
-static void syn_cmd_cluster __ARGS((exarg_T *eap, int syncing));
-static int syn_scl_name2id __ARGS((char_u *name));
-static int syn_scl_namen2id __ARGS((char_u *linep, int len));
-static int syn_check_cluster __ARGS((char_u *pp, int len));
-static int syn_add_cluster __ARGS((char_u *name));
-static void init_syn_patterns __ARGS((void));
-static char_u *get_syn_pattern __ARGS((char_u *arg, synpat_T *ci));
-static void syn_cmd_sync __ARGS((exarg_T *eap, int syncing));
-static int get_id_list __ARGS((char_u **arg, int keylen, short **list));
-static void syn_combine_list __ARGS((short **clstr1, short **clstr2,
- int list_op));
-static void syn_incl_toplevel __ARGS((int id, int *flagsp));
+static void syn_stack_apply_changes_block(synblock_T *block, buf_T *buf);
+static void find_endpos(int idx, lpos_T *startpos, lpos_T *m_endpos,
+ lpos_T *hl_endpos, long *flagsp, lpos_T *end_endpos,
+ int *end_idx, reg_extmatch_T *start_ext);
+static void clear_syn_state(synstate_T *p);
+static void clear_current_state(void);
+
+static void limit_pos(lpos_T *pos, lpos_T *limit);
+static void limit_pos_zero(lpos_T *pos, lpos_T *limit);
+static void syn_add_end_off(lpos_T *result, regmmatch_T *regmatch,
+ synpat_T *spp, int idx,
+ int extra);
+static void syn_add_start_off(lpos_T *result, regmmatch_T *regmatch,
+ synpat_T *spp, int idx,
+ int extra);
+static char_u *syn_getcurline(void);
+static int syn_regexec(regmmatch_T *rmp, linenr_T lnum, colnr_T col,
+ syn_time_T *st);
+static int check_keyword_id(char_u *line, int startcol, int *endcol,
+ long *flags, short **next_list,
+ stateitem_T *cur_si,
+ int *ccharp);
+static void syn_cmd_case(exarg_T *eap, int syncing);
+static void syn_cmd_spell(exarg_T *eap, int syncing);
+static void syntax_sync_clear(void);
+static void syn_remove_pattern(synblock_T *block, int idx);
+static void syn_clear_pattern(synblock_T *block, int i);
+static void syn_clear_cluster(synblock_T *block, int i);
+static void syn_cmd_clear(exarg_T *eap, int syncing);
+static void syn_cmd_conceal(exarg_T *eap, int syncing);
+static void syn_clear_one(int id, int syncing);
+static void syn_cmd_on(exarg_T *eap, int syncing);
+static void syn_cmd_enable(exarg_T *eap, int syncing);
+static void syn_cmd_reset(exarg_T *eap, int syncing);
+static void syn_cmd_manual(exarg_T *eap, int syncing);
+static void syn_cmd_off(exarg_T *eap, int syncing);
+static void syn_cmd_onoff(exarg_T *eap, char *name);
+static void syn_cmd_list(exarg_T *eap, int syncing);
+static void syn_lines_msg(void);
+static void syn_match_msg(void);
+static void syn_stack_free_block(synblock_T *block);
+static void syn_list_one(int id, int syncing, int link_only);
+static void syn_list_cluster(int id);
+static void put_id_list(char_u *name, short *list, int attr);
+static void put_pattern(char *s, int c, synpat_T *spp, int attr);
+static int syn_list_keywords(int id, hashtab_T *ht, int did_header,
+ int attr);
+static void syn_clear_keyword(int id, hashtab_T *ht);
+static void clear_keywtab(hashtab_T *ht);
+static void add_keyword(char_u *name, int id, int flags,
+ short *cont_in_list, short *next_list,
+ int conceal_char);
+static char_u *get_group_name(char_u *arg, char_u **name_end);
+static char_u *get_syn_options(char_u *arg, syn_opt_arg_T *opt,
+ int *conceal_char);
+static void syn_cmd_include(exarg_T *eap, int syncing);
+static void syn_cmd_keyword(exarg_T *eap, int syncing);
+static void syn_cmd_match(exarg_T *eap, int syncing);
+static void syn_cmd_region(exarg_T *eap, int syncing);
+static int syn_compare_stub(const void *v1, const void *v2);
+static void syn_cmd_cluster(exarg_T *eap, int syncing);
+static int syn_scl_name2id(char_u *name);
+static int syn_scl_namen2id(char_u *linep, int len);
+static int syn_check_cluster(char_u *pp, int len);
+static int syn_add_cluster(char_u *name);
+static void init_syn_patterns(void);
+static char_u *get_syn_pattern(char_u *arg, synpat_T *ci);
+static void syn_cmd_sync(exarg_T *eap, int syncing);
+static int get_id_list(char_u **arg, int keylen, short **list);
+static void syn_combine_list(short **clstr1, short **clstr2,
+ int list_op);
+static void syn_incl_toplevel(int id, int *flagsp);
/*
* Start the syntax recognition for a line. This function is normally called
@@ -3503,7 +3502,7 @@ struct name_list {
char *name;
};
-static void syn_list_flags __ARGS((struct name_list *nl, int flags, int attr));
+static void syn_list_flags(struct name_list *nl, int flags, int attr);
/*
* List one syntax item, for ":syntax" or "syntax list syntax_name".
@@ -5478,7 +5477,7 @@ in_id_list (
struct subcommand {
char *name; /* subcommand name */
- void (*func)__ARGS((exarg_T *, int)); /* function to call */
+ void (*func)(exarg_T *, int); /* function to call */
};
static struct subcommand subcommands[] =
@@ -7744,8 +7743,8 @@ int highlight_changed(void) {
return OK;
}
-static void highlight_list __ARGS((void));
-static void highlight_list_two __ARGS((int cnt, int attr));
+static void highlight_list(void);
+static void highlight_list_two(int cnt, int attr);
/*
* Handle command line completion for :highlight command.
diff --git a/src/syntax.h b/src/syntax.h
index e05d342927..e11eeb181c 100644
--- a/src/syntax.h
+++ b/src/syntax.h
@@ -1,61 +1,61 @@
#ifndef NEOVIM_SYNTAX_H
#define NEOVIM_SYNTAX_H
/* syntax.c */
-void syntax_start __ARGS((win_T *wp, linenr_T lnum));
-void syn_stack_free_all __ARGS((synblock_T *block));
-void syn_stack_apply_changes __ARGS((buf_T *buf));
-void syntax_end_parsing __ARGS((linenr_T lnum));
-int syntax_check_changed __ARGS((linenr_T lnum));
-int get_syntax_attr __ARGS((colnr_T col, int *can_spell, int keep_state));
-void syntax_clear __ARGS((synblock_T *block));
-void reset_synblock __ARGS((win_T *wp));
-void ex_syntax __ARGS((exarg_T *eap));
-void ex_ownsyntax __ARGS((exarg_T *eap));
-int syntax_present __ARGS((win_T *win));
-void reset_expand_highlight __ARGS((void));
-void set_context_in_echohl_cmd __ARGS((expand_T *xp, char_u *arg));
-void set_context_in_syntax_cmd __ARGS((expand_T *xp, char_u *arg));
-char_u *get_syntax_name __ARGS((expand_T *xp, int idx));
-int syn_get_id __ARGS((win_T *wp, long lnum, colnr_T col, int trans,
- int *spellp,
- int keep_state));
-int get_syntax_info __ARGS((int *seqnrp));
-int syn_get_sub_char __ARGS((void));
-int syn_get_stack_item __ARGS((int i));
-int syn_get_foldlevel __ARGS((win_T *wp, long lnum));
-void ex_syntime __ARGS((exarg_T *eap));
-char_u *get_syntime_arg __ARGS((expand_T *xp, int idx));
-void init_highlight __ARGS((int both, int reset));
-int load_colors __ARGS((char_u *name));
-void do_highlight __ARGS((char_u *line, int forceit, int init));
-void free_highlight __ARGS((void));
-void restore_cterm_colors __ARGS((void));
-void set_normal_colors __ARGS((void));
-char_u *hl_get_font_name __ARGS((void));
-void hl_set_font_name __ARGS((char_u *font_name));
-void hl_set_bg_color_name __ARGS((char_u *name));
-void hl_set_fg_color_name __ARGS((char_u *name));
-void clear_hl_tables __ARGS((void));
-int hl_combine_attr __ARGS((int char_attr, int prim_attr));
-attrentry_T *syn_gui_attr2entry __ARGS((int attr));
-int syn_attr2attr __ARGS((int attr));
-attrentry_T *syn_term_attr2entry __ARGS((int attr));
-attrentry_T *syn_cterm_attr2entry __ARGS((int attr));
-char_u *highlight_has_attr __ARGS((int id, int flag, int modec));
-char_u *highlight_color __ARGS((int id, char_u *what, int modec));
-long_u highlight_gui_color_rgb __ARGS((int id, int fg));
-int syn_name2id __ARGS((char_u *name));
-int highlight_exists __ARGS((char_u *name));
-char_u *syn_id2name __ARGS((int id));
-int syn_namen2id __ARGS((char_u *linep, int len));
-int syn_check_group __ARGS((char_u *pp, int len));
-int syn_id2attr __ARGS((int hl_id));
-int syn_id2colors __ARGS((int hl_id, guicolor_T *fgp, guicolor_T *bgp));
-int syn_get_final_id __ARGS((int hl_id));
-void highlight_gui_started __ARGS((void));
-int highlight_changed __ARGS((void));
-void set_context_in_highlight_cmd __ARGS((expand_T *xp, char_u *arg));
-char_u *get_highlight_name __ARGS((expand_T *xp, int idx));
-void free_highlight_fonts __ARGS((void));
+void syntax_start(win_T *wp, linenr_T lnum);
+void syn_stack_free_all(synblock_T *block);
+void syn_stack_apply_changes(buf_T *buf);
+void syntax_end_parsing(linenr_T lnum);
+int syntax_check_changed(linenr_T lnum);
+int get_syntax_attr(colnr_T col, int *can_spell, int keep_state);
+void syntax_clear(synblock_T *block);
+void reset_synblock(win_T *wp);
+void ex_syntax(exarg_T *eap);
+void ex_ownsyntax(exarg_T *eap);
+int syntax_present(win_T *win);
+void reset_expand_highlight(void);
+void set_context_in_echohl_cmd(expand_T *xp, char_u *arg);
+void set_context_in_syntax_cmd(expand_T *xp, char_u *arg);
+char_u *get_syntax_name(expand_T *xp, int idx);
+int syn_get_id(win_T *wp, long lnum, colnr_T col, int trans,
+ int *spellp,
+ int keep_state);
+int get_syntax_info(int *seqnrp);
+int syn_get_sub_char(void);
+int syn_get_stack_item(int i);
+int syn_get_foldlevel(win_T *wp, long lnum);
+void ex_syntime(exarg_T *eap);
+char_u *get_syntime_arg(expand_T *xp, int idx);
+void init_highlight(int both, int reset);
+int load_colors(char_u *name);
+void do_highlight(char_u *line, int forceit, int init);
+void free_highlight(void);
+void restore_cterm_colors(void);
+void set_normal_colors(void);
+char_u *hl_get_font_name(void);
+void hl_set_font_name(char_u *font_name);
+void hl_set_bg_color_name(char_u *name);
+void hl_set_fg_color_name(char_u *name);
+void clear_hl_tables(void);
+int hl_combine_attr(int char_attr, int prim_attr);
+attrentry_T *syn_gui_attr2entry(int attr);
+int syn_attr2attr(int attr);
+attrentry_T *syn_term_attr2entry(int attr);
+attrentry_T *syn_cterm_attr2entry(int attr);
+char_u *highlight_has_attr(int id, int flag, int modec);
+char_u *highlight_color(int id, char_u *what, int modec);
+long_u highlight_gui_color_rgb(int id, int fg);
+int syn_name2id(char_u *name);
+int highlight_exists(char_u *name);
+char_u *syn_id2name(int id);
+int syn_namen2id(char_u *linep, int len);
+int syn_check_group(char_u *pp, int len);
+int syn_id2attr(int hl_id);
+int syn_id2colors(int hl_id, guicolor_T *fgp, guicolor_T *bgp);
+int syn_get_final_id(int hl_id);
+void highlight_gui_started(void);
+int highlight_changed(void);
+void set_context_in_highlight_cmd(expand_T *xp, char_u *arg);
+char_u *get_highlight_name(expand_T *xp, int idx);
+void free_highlight_fonts(void);
/* vim: set ft=c : */
#endif /* NEOVIM_SYNTAX_H */
diff --git a/src/tag.c b/src/tag.c
index 3eed09031d..7154990ff4 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -84,17 +84,17 @@ static char *mt_names[MT_COUNT/2] =
#define NOTAGFILE 99 /* return value for jumpto_tag */
static char_u *nofile_fname = NULL; /* fname for NOTAGFILE error */
-static void taglen_advance __ARGS((int l));
-
-static int jumpto_tag __ARGS((char_u *lbuf, int forceit, int keep_help));
-static int parse_tag_line __ARGS((char_u *lbuf, tagptrs_T *tagp));
-static int test_for_static __ARGS((tagptrs_T *));
-static int parse_match __ARGS((char_u *lbuf, tagptrs_T *tagp));
-static char_u *tag_full_fname __ARGS((tagptrs_T *tagp));
-static char_u *expand_tag_fname __ARGS((char_u *fname, char_u *tag_fname,
- int expand));
-static int test_for_current __ARGS((char_u *, char_u *, char_u *, char_u *));
-static int find_extra __ARGS((char_u **pp));
+static void taglen_advance(int l);
+
+static int jumpto_tag(char_u *lbuf, int forceit, int keep_help);
+static int parse_tag_line(char_u *lbuf, tagptrs_T *tagp);
+static int test_for_static(tagptrs_T *);
+static int parse_match(char_u *lbuf, tagptrs_T *tagp);
+static char_u *tag_full_fname(tagptrs_T *tagp);
+static char_u *expand_tag_fname(char_u *fname, char_u *tag_fname,
+ int expand);
+static int test_for_current(char_u *, char_u *, char_u *, char_u *);
+static int find_extra(char_u **pp);
static char_u *bottommsg = (char_u *)N_("E555: at bottom of tag stack");
static char_u *topmsg = (char_u *)N_("E556: at top of tag stack");
@@ -1000,7 +1000,7 @@ void do_tags(exarg_T *eap)
# define tag_fgets vim_fgets
#endif
-static int tag_strnicmp __ARGS((char_u *s1, char_u *s2, size_t len));
+static int tag_strnicmp(char_u *s1, char_u *s2, size_t len);
/*
* Compare two strings, for length "len", ignoring case the ASCII way.
@@ -1035,7 +1035,7 @@ typedef struct {
regmatch_T regmatch; /* regexp program, may be NULL */
} pat_T;
-static void prepare_pats __ARGS((pat_T *pats, int has_re));
+static void prepare_pats(pat_T *pats, int has_re);
/*
* Extract info from the tag search pattern "pats->pat".
@@ -2040,7 +2040,7 @@ findtag_end:
}
static garray_T tag_fnames = GA_EMPTY;
-static void found_tagfile_cb __ARGS((char_u *fname, void *cookie));
+static void found_tagfile_cb(char_u *fname, void *cookie);
/*
* Callback function for finding all "tags" and "tags-??" files in
@@ -2992,8 +2992,8 @@ expand_tags (
return ret;
}
-static int add_tag_field __ARGS((dict_T *dict, char *field_name, char_u *start,
- char_u *end));
+static int add_tag_field(dict_T *dict, char *field_name, char_u *start,
+ char_u *end);
/*
* Add a tag field to the dictionary "dict".
diff --git a/src/tag.h b/src/tag.h
index 829d48ff7b..9ca8441892 100644
--- a/src/tag.h
+++ b/src/tag.h
@@ -1,18 +1,18 @@
#ifndef NEOVIM_TAG_H
#define NEOVIM_TAG_H
/* tag.c */
-int do_tag __ARGS((char_u *tag, int type, int count, int forceit, int verbose));
-void tag_freematch __ARGS((void));
-void do_tags __ARGS((exarg_T *eap));
-int find_tags __ARGS((char_u *pat, int *num_matches, char_u ***matchesp,
- int flags, int mincount,
- char_u *buf_ffname));
-void free_tag_stuff __ARGS((void));
-int get_tagfname __ARGS((tagname_T *tnp, int first, char_u *buf));
-void tagname_free __ARGS((tagname_T *tnp));
-void simplify_filename __ARGS((char_u *filename));
-int expand_tags __ARGS((int tagnames, char_u *pat, int *num_file,
- char_u ***file));
-int get_tags __ARGS((list_T *list, char_u *pat));
+int do_tag(char_u *tag, int type, int count, int forceit, int verbose);
+void tag_freematch(void);
+void do_tags(exarg_T *eap);
+int find_tags(char_u *pat, int *num_matches, char_u ***matchesp,
+ int flags, int mincount,
+ char_u *buf_ffname);
+void free_tag_stuff(void);
+int get_tagfname(tagname_T *tnp, int first, char_u *buf);
+void tagname_free(tagname_T *tnp);
+void simplify_filename(char_u *filename);
+int expand_tags(int tagnames, char_u *pat, int *num_file,
+ char_u ***file);
+int get_tags(list_T *list, char_u *pat);
/* vim: set ft=c : */
#endif /* NEOVIM_TAG_H */
diff --git a/src/term.c b/src/term.c
index fad1401c0e..ef75c3282c 100644
--- a/src/term.c
+++ b/src/term.c
@@ -85,32 +85,32 @@ struct builtin_term {
/* start of keys that are not directly used by Vim but can be mapped */
#define BT_EXTRA_KEYS 0x101
-static struct builtin_term *find_builtin_term __ARGS((char_u *name));
-static void parse_builtin_tcap __ARGS((char_u *s));
-static void term_color __ARGS((char_u *s, int n));
-static void gather_termleader __ARGS((void));
-static void req_codes_from_term __ARGS((void));
-static void req_more_codes_from_term __ARGS((void));
-static void got_code_from_term __ARGS((char_u *code, int len));
-static void check_for_codes_from_term __ARGS((void));
+static struct builtin_term *find_builtin_term(char_u *name);
+static void parse_builtin_tcap(char_u *s);
+static void term_color(char_u *s, int n);
+static void gather_termleader(void);
+static void req_codes_from_term(void);
+static void req_more_codes_from_term(void);
+static void got_code_from_term(char_u *code, int len);
+static void check_for_codes_from_term(void);
#if defined(FEAT_GUI) \
|| (defined(FEAT_MOUSE) && (!defined(UNIX) || defined(FEAT_MOUSE_XTERM) \
|| defined(FEAT_MOUSE_GPM) || defined(FEAT_SYSMOUSE)))
-static int get_bytes_from_buf __ARGS((char_u *, char_u *, int));
+static int get_bytes_from_buf(char_u *, char_u *, int);
#endif
-static void del_termcode_idx __ARGS((int idx));
-static int term_is_builtin __ARGS((char_u *name));
-static int term_7to8bit __ARGS((char_u *p));
-static void switch_to_8bit __ARGS((void));
+static void del_termcode_idx(int idx);
+static int term_is_builtin(char_u *name);
+static int term_7to8bit(char_u *p);
+static void switch_to_8bit(void);
#ifdef HAVE_TGETENT
-static char_u *tgetent_error __ARGS((char_u *, char_u *));
+static char_u *tgetent_error(char_u *, char_u *);
/*
* Here is our own prototype for tgetstr(), any prototypes from the include
* files have been disabled by the define at the start of this file.
*/
-char *tgetstr __ARGS((char *, char **));
+char *tgetstr(char *, char **);
/* Change this to "if 1" to debug what happens with termresponse. */
# define LOG_TR(msg)
@@ -149,7 +149,7 @@ char *UP, *BC, PC;
# define TGETSTR(s, p) vim_tgetstr((s), (p))
# define TGETENT(b, t) tgetent((char *)(b), (char *)(t))
-static char_u *vim_tgetstr __ARGS((char *s, char_u **pp));
+static char_u *vim_tgetstr(char *s, char_u **pp);
#endif /* HAVE_TGETENT */
static int detected_8bit = FALSE; /* detected 8-bit terminal */
@@ -1233,7 +1233,7 @@ static void parse_builtin_tcap(char_u *term)
}
}
}
-static void set_color_count __ARGS((int nr));
+static void set_color_count(int nr);
/*
* Set number of colors.
@@ -1963,7 +1963,7 @@ char_u *tltoa(unsigned long i)
* minimal tgoto() implementation.
* no padding and we only parse for %i %d and %+char
*/
-static char *tgoto __ARGS((char *, int, int));
+static char *tgoto(char *, int, int);
static char *tgoto(char *cm, int x, int y)
{
@@ -2086,7 +2086,7 @@ void out_char(unsigned c)
out_flush();
}
-static void out_char_nf __ARGS((unsigned));
+static void out_char_nf(unsigned);
/*
* out_char_nf(c): like out_char(), but don't flush when p_wd is set
@@ -2363,7 +2363,7 @@ void add_long_to_buf(long_u val, char_u *dst)
}
}
-static int get_long_from_buf __ARGS((char_u *buf, long_u *val));
+static int get_long_from_buf(char_u *buf, long_u *val);
/*
* Interpret the next string of bytes in buf as a long integer, with the most
@@ -2951,7 +2951,7 @@ static struct termcode {
static int tc_max_len = 0; /* number of entries that termcodes[] can hold */
static int tc_len = 0; /* current number of entries in termcodes[] */
-static int termcode_star __ARGS((char_u *code, int len));
+static int termcode_star(char_u *code, int len);
void clear_termcodes(void) {
while (tc_len > 0)
diff --git a/src/term.h b/src/term.h
index 792d9b7484..2211efc805 100644
--- a/src/term.h
+++ b/src/term.h
@@ -1,68 +1,68 @@
#ifndef NEOVIM_TERM_H
#define NEOVIM_TERM_H
/* term.c */
-int set_termname __ARGS((char_u *term));
-void set_mouse_termcode __ARGS((int n, char_u *s));
-void del_mouse_termcode __ARGS((int n));
-void getlinecol __ARGS((long *cp, long *rp));
-int add_termcap_entry __ARGS((char_u *name, int force));
-int term_is_8bit __ARGS((char_u *name));
-int term_is_gui __ARGS((char_u *name));
-char_u *tltoa __ARGS((unsigned long i));
-void termcapinit __ARGS((char_u *name));
-void out_flush __ARGS((void));
-void out_flush_check __ARGS((void));
-void out_trash __ARGS((void));
-void out_char __ARGS((unsigned c));
-void out_str_nf __ARGS((char_u *s));
-void out_str __ARGS((char_u *s));
-void term_windgoto __ARGS((int row, int col));
-void term_cursor_right __ARGS((int i));
-void term_append_lines __ARGS((int line_count));
-void term_delete_lines __ARGS((int line_count));
-void term_set_winpos __ARGS((int x, int y));
-void term_set_winsize __ARGS((int width, int height));
-void term_fg_color __ARGS((int n));
-void term_bg_color __ARGS((int n));
-void term_settitle __ARGS((char_u *title));
-void ttest __ARGS((int pairs));
-void add_long_to_buf __ARGS((long_u val, char_u *dst));
-void check_shellsize __ARGS((void));
-void limit_screen_size __ARGS((void));
-void win_new_shellsize __ARGS((void));
-void shell_resized __ARGS((void));
-void shell_resized_check __ARGS((void));
-void set_shellsize __ARGS((int width, int height, int mustset));
-void settmode __ARGS((int tmode));
-void starttermcap __ARGS((void));
-void stoptermcap __ARGS((void));
-void may_req_termresponse __ARGS((void));
-void may_req_ambiguous_char_width __ARGS((void));
-int swapping_screen __ARGS((void));
-void setmouse __ARGS((void));
-int mouse_has __ARGS((int c));
-int mouse_model_popup __ARGS((void));
-void scroll_start __ARGS((void));
-void cursor_on __ARGS((void));
-void cursor_off __ARGS((void));
-void term_cursor_shape __ARGS((void));
-void scroll_region_set __ARGS((win_T *wp, int off));
-void scroll_region_reset __ARGS((void));
-void clear_termcodes __ARGS((void));
-void add_termcode __ARGS((char_u *name, char_u *string, int flags));
-char_u *find_termcode __ARGS((char_u *name));
-char_u *get_termcode __ARGS((int i));
-void del_termcode __ARGS((char_u *name));
-void set_mouse_topline __ARGS((win_T *wp));
-int check_termcode __ARGS((int max_offset, char_u *buf, int bufsize,
- int *buflen));
-char_u *replace_termcodes __ARGS((char_u *from, char_u **bufp, int from_part,
+int set_termname(char_u *term);
+void set_mouse_termcode(int n, char_u *s);
+void del_mouse_termcode(int n);
+void getlinecol(long *cp, long *rp);
+int add_termcap_entry(char_u *name, int force);
+int term_is_8bit(char_u *name);
+int term_is_gui(char_u *name);
+char_u *tltoa(unsigned long i);
+void termcapinit(char_u *name);
+void out_flush(void);
+void out_flush_check(void);
+void out_trash(void);
+void out_char(unsigned c);
+void out_str_nf(char_u *s);
+void out_str(char_u *s);
+void term_windgoto(int row, int col);
+void term_cursor_right(int i);
+void term_append_lines(int line_count);
+void term_delete_lines(int line_count);
+void term_set_winpos(int x, int y);
+void term_set_winsize(int width, int height);
+void term_fg_color(int n);
+void term_bg_color(int n);
+void term_settitle(char_u *title);
+void ttest(int pairs);
+void add_long_to_buf(long_u val, char_u *dst);
+void check_shellsize(void);
+void limit_screen_size(void);
+void win_new_shellsize(void);
+void shell_resized(void);
+void shell_resized_check(void);
+void set_shellsize(int width, int height, int mustset);
+void settmode(int tmode);
+void starttermcap(void);
+void stoptermcap(void);
+void may_req_termresponse(void);
+void may_req_ambiguous_char_width(void);
+int swapping_screen(void);
+void setmouse(void);
+int mouse_has(int c);
+int mouse_model_popup(void);
+void scroll_start(void);
+void cursor_on(void);
+void cursor_off(void);
+void term_cursor_shape(void);
+void scroll_region_set(win_T *wp, int off);
+void scroll_region_reset(void);
+void clear_termcodes(void);
+void add_termcode(char_u *name, char_u *string, int flags);
+char_u *find_termcode(char_u *name);
+char_u *get_termcode(int i);
+void del_termcode(char_u *name);
+void set_mouse_topline(win_T *wp);
+int check_termcode(int max_offset, char_u *buf, int bufsize,
+ int *buflen);
+char_u *replace_termcodes(char_u *from, char_u **bufp, int from_part,
int do_lt,
- int special));
-int find_term_bykeys __ARGS((char_u *src));
-void show_termcodes __ARGS((void));
-int show_one_termcode __ARGS((char_u *name, char_u *code, int printit));
-char_u *translate_mapping __ARGS((char_u *str, int expmap));
-void update_tcap __ARGS((int attr));
+ int special);
+int find_term_bykeys(char_u *src);
+void show_termcodes(void);
+int show_one_termcode(char_u *name, char_u *code, int printit);
+char_u *translate_mapping(char_u *str, int expmap);
+void update_tcap(int attr);
/* vim: set ft=c : */
#endif /* NEOVIM_TERM_H */
diff --git a/src/ui.h b/src/ui.h
index bcd6afd426..2f6ee9b214 100644
--- a/src/ui.h
+++ b/src/ui.h
@@ -1,70 +1,70 @@
#ifndef NEOVIM_UI_H
#define NEOVIM_UI_H
/* ui.c */
-void ui_write __ARGS((char_u *s, int len));
-void ui_inchar_undo __ARGS((char_u *s, int len));
-int ui_inchar __ARGS((char_u *buf, int maxlen, long wtime, int tb_change_cnt));
-int ui_char_avail __ARGS((void));
-void ui_delay __ARGS((long msec, int ignoreinput));
-void ui_suspend __ARGS((void));
-void suspend_shell __ARGS((void));
-int ui_get_shellsize __ARGS((void));
-void ui_set_shellsize __ARGS((int mustset));
-void ui_new_shellsize __ARGS((void));
-void ui_breakcheck __ARGS((void));
-void clip_init __ARGS((int can_use));
-void clip_update_selection __ARGS((VimClipboard *clip));
-void clip_own_selection __ARGS((VimClipboard *cbd));
-void clip_lose_selection __ARGS((VimClipboard *cbd));
-void clip_auto_select __ARGS((void));
-int clip_isautosel_star __ARGS((void));
-int clip_isautosel_plus __ARGS((void));
-void clip_modeless __ARGS((int button, int is_click, int is_drag));
-void clip_start_selection __ARGS((int col, int row, int repeated_click));
-void clip_process_selection __ARGS((int button, int col, int row,
- int_u repeated_click));
-void clip_may_redraw_selection __ARGS((int row, int col, int len));
-void clip_clear_selection __ARGS((VimClipboard *cbd));
-void clip_may_clear_selection __ARGS((int row1, int row2));
-void clip_scroll_selection __ARGS((int rows));
-void clip_copy_modeless_selection __ARGS((int both));
-int clip_gen_own_selection __ARGS((VimClipboard *cbd));
-void clip_gen_lose_selection __ARGS((VimClipboard *cbd));
-void clip_gen_set_selection __ARGS((VimClipboard *cbd));
-void clip_gen_request_selection __ARGS((VimClipboard *cbd));
-int clip_gen_owner_exists __ARGS((VimClipboard *cbd));
-int vim_is_input_buf_full __ARGS((void));
-int vim_is_input_buf_empty __ARGS((void));
-int vim_free_in_input_buf __ARGS((void));
-int vim_used_in_input_buf __ARGS((void));
-char_u *get_input_buf __ARGS((void));
-void set_input_buf __ARGS((char_u *p));
-void add_to_input_buf __ARGS((char_u *s, int len));
-void add_to_input_buf_csi __ARGS((char_u *str, int len));
-void push_raw_key __ARGS((char_u *s, int len));
-void trash_input_buf __ARGS((void));
-int read_from_input_buf __ARGS((char_u *buf, long maxlen));
-void fill_input_buf __ARGS((int exit_on_error));
-void read_error_exit __ARGS((void));
-void ui_cursor_shape __ARGS((void));
-int check_col __ARGS((int col));
-int check_row __ARGS((int row));
-void open_app_context __ARGS((void));
-void x11_setup_atoms __ARGS((Display *dpy));
-void x11_setup_selection __ARGS((Widget w));
-void clip_x11_request_selection __ARGS((Widget myShell, Display *dpy,
- VimClipboard *cbd));
-void clip_x11_lose_selection __ARGS((Widget myShell, VimClipboard *cbd));
-int clip_x11_own_selection __ARGS((Widget myShell, VimClipboard *cbd));
-void clip_x11_set_selection __ARGS((VimClipboard *cbd));
-int clip_x11_owner_exists __ARGS((VimClipboard *cbd));
-void yank_cut_buffer0 __ARGS((Display *dpy, VimClipboard *cbd));
-int jump_to_mouse __ARGS((int flags, int *inclusive, int which_button));
-int mouse_comp_pos __ARGS((win_T *win, int *rowp, int *colp, linenr_T *lnump));
-win_T *mouse_find_win __ARGS((int *rowp, int *colp));
-int get_fpos_of_mouse __ARGS((pos_T *mpos));
-int vcol2col __ARGS((win_T *wp, linenr_T lnum, int vcol));
-void ui_focus_change __ARGS((int in_focus));
-void im_save_status __ARGS((long *psave));
+void ui_write(char_u *s, int len);
+void ui_inchar_undo(char_u *s, int len);
+int ui_inchar(char_u *buf, int maxlen, long wtime, int tb_change_cnt);
+int ui_char_avail(void);
+void ui_delay(long msec, int ignoreinput);
+void ui_suspend(void);
+void suspend_shell(void);
+int ui_get_shellsize(void);
+void ui_set_shellsize(int mustset);
+void ui_new_shellsize(void);
+void ui_breakcheck(void);
+void clip_init(int can_use);
+void clip_update_selection(VimClipboard *clip);
+void clip_own_selection(VimClipboard *cbd);
+void clip_lose_selection(VimClipboard *cbd);
+void clip_auto_select(void);
+int clip_isautosel_star(void);
+int clip_isautosel_plus(void);
+void clip_modeless(int button, int is_click, int is_drag);
+void clip_start_selection(int col, int row, int repeated_click);
+void clip_process_selection(int button, int col, int row,
+ int_u repeated_click);
+void clip_may_redraw_selection(int row, int col, int len);
+void clip_clear_selection(VimClipboard *cbd);
+void clip_may_clear_selection(int row1, int row2);
+void clip_scroll_selection(int rows);
+void clip_copy_modeless_selection(int both);
+int clip_gen_own_selection(VimClipboard *cbd);
+void clip_gen_lose_selection(VimClipboard *cbd);
+void clip_gen_set_selection(VimClipboard *cbd);
+void clip_gen_request_selection(VimClipboard *cbd);
+int clip_gen_owner_exists(VimClipboard *cbd);
+int vim_is_input_buf_full(void);
+int vim_is_input_buf_empty(void);
+int vim_free_in_input_buf(void);
+int vim_used_in_input_buf(void);
+char_u *get_input_buf(void);
+void set_input_buf(char_u *p);
+void add_to_input_buf(char_u *s, int len);
+void add_to_input_buf_csi(char_u *str, int len);
+void push_raw_key(char_u *s, int len);
+void trash_input_buf(void);
+int read_from_input_buf(char_u *buf, long maxlen);
+void fill_input_buf(int exit_on_error);
+void read_error_exit(void);
+void ui_cursor_shape(void);
+int check_col(int col);
+int check_row(int row);
+void open_app_context(void);
+void x11_setup_atoms(Display *dpy);
+void x11_setup_selection(Widget w);
+void clip_x11_request_selection(Widget myShell, Display *dpy,
+ VimClipboard *cbd);
+void clip_x11_lose_selection(Widget myShell, VimClipboard *cbd);
+int clip_x11_own_selection(Widget myShell, VimClipboard *cbd);
+void clip_x11_set_selection(VimClipboard *cbd);
+int clip_x11_owner_exists(VimClipboard *cbd);
+void yank_cut_buffer0(Display *dpy, VimClipboard *cbd);
+int jump_to_mouse(int flags, int *inclusive, int which_button);
+int mouse_comp_pos(win_T *win, int *rowp, int *colp, linenr_T *lnump);
+win_T *mouse_find_win(int *rowp, int *colp);
+int get_fpos_of_mouse(pos_T *mpos);
+int vcol2col(win_T *wp, linenr_T lnum, int vcol);
+void ui_focus_change(int in_focus);
+void im_save_status(long *psave);
/* vim: set ft=c : */
#endif /* NEOVIM_UI_H */
diff --git a/src/undo.c b/src/undo.c
index 8d28f86fba..0903dbf708 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -99,38 +99,38 @@
#include "screen.h"
#include "sha256.h"
-static long get_undolevel __ARGS((void));
-static void u_unch_branch __ARGS((u_header_T *uhp));
-static u_entry_T *u_get_headentry __ARGS((void));
-static void u_getbot __ARGS((void));
-static void u_doit __ARGS((int count));
-static void u_undoredo __ARGS((int undo));
-static void u_undo_end __ARGS((int did_undo, int absolute));
-static void u_add_time __ARGS((char_u *buf, size_t buflen, time_t tt));
-static void u_freeheader __ARGS((buf_T *buf, u_header_T *uhp, u_header_T **uhpp));
-static void u_freebranch __ARGS((buf_T *buf, u_header_T *uhp, u_header_T **uhpp));
-static void u_freeentries __ARGS((buf_T *buf, u_header_T *uhp,
- u_header_T **uhpp));
-static void u_freeentry __ARGS((u_entry_T *, long));
-static void corruption_error __ARGS((char *mesg, char_u *file_name));
-static void u_free_uhp __ARGS((u_header_T *uhp));
-static size_t fwrite_crypt __ARGS((buf_T *buf, char_u *ptr, size_t len,
- FILE *fp));
-static char_u *read_string_decrypt __ARGS((buf_T *buf, FILE *fd, int len));
-static int serialize_header __ARGS((FILE *fp, buf_T *buf, char_u *hash));
-static int serialize_uhp __ARGS((FILE *fp, buf_T *buf, u_header_T *uhp));
-static u_header_T *unserialize_uhp __ARGS((FILE *fp, char_u *file_name));
-static int serialize_uep __ARGS((FILE *fp, buf_T *buf, u_entry_T *uep));
-static u_entry_T *unserialize_uep __ARGS((FILE *fp, int *error,
- char_u *file_name));
-static void serialize_pos __ARGS((pos_T pos, FILE *fp));
-static void unserialize_pos __ARGS((pos_T *pos, FILE *fp));
-static void serialize_visualinfo __ARGS((visualinfo_T *info, FILE *fp));
-static void unserialize_visualinfo __ARGS((visualinfo_T *info, FILE *fp));
-static void put_header_ptr __ARGS((FILE *fp, u_header_T *uhp));
+static long get_undolevel(void);
+static void u_unch_branch(u_header_T *uhp);
+static u_entry_T *u_get_headentry(void);
+static void u_getbot(void);
+static void u_doit(int count);
+static void u_undoredo(int undo);
+static void u_undo_end(int did_undo, int absolute);
+static void u_add_time(char_u *buf, size_t buflen, time_t tt);
+static void u_freeheader(buf_T *buf, u_header_T *uhp, u_header_T **uhpp);
+static void u_freebranch(buf_T *buf, u_header_T *uhp, u_header_T **uhpp);
+static void u_freeentries(buf_T *buf, u_header_T *uhp,
+ u_header_T **uhpp);
+static void u_freeentry(u_entry_T *, long);
+static void corruption_error(char *mesg, char_u *file_name);
+static void u_free_uhp(u_header_T *uhp);
+static size_t fwrite_crypt(buf_T *buf, char_u *ptr, size_t len,
+ FILE *fp);
+static char_u *read_string_decrypt(buf_T *buf, FILE *fd, int len);
+static int serialize_header(FILE *fp, buf_T *buf, char_u *hash);
+static int serialize_uhp(FILE *fp, buf_T *buf, u_header_T *uhp);
+static u_header_T *unserialize_uhp(FILE *fp, char_u *file_name);
+static int serialize_uep(FILE *fp, buf_T *buf, u_entry_T *uep);
+static u_entry_T *unserialize_uep(FILE *fp, int *error,
+ char_u *file_name);
+static void serialize_pos(pos_T pos, FILE *fp);
+static void unserialize_pos(pos_T *pos, FILE *fp);
+static void serialize_visualinfo(visualinfo_T *info, FILE *fp);
+static void unserialize_visualinfo(visualinfo_T *info, FILE *fp);
+static void put_header_ptr(FILE *fp, u_header_T *uhp);
#define U_ALLOC_LINE(size) lalloc((long_u)(size), FALSE)
-static char_u *u_save_line __ARGS((linenr_T));
+static char_u *u_save_line(linenr_T);
/* used in undo_end() to report number of added and deleted lines */
static long u_newcount, u_oldcount;
diff --git a/src/undo.h b/src/undo.h
index aecab36875..58c8a1fb95 100644
--- a/src/undo.h
+++ b/src/undo.h
@@ -1,34 +1,34 @@
#ifndef NEOVIM_UNDO_H
#define NEOVIM_UNDO_H
/* undo.c */
-int u_save_cursor __ARGS((void));
-int u_save __ARGS((linenr_T top, linenr_T bot));
-int u_savesub __ARGS((linenr_T lnum));
-int u_inssub __ARGS((linenr_T lnum));
-int u_savedel __ARGS((linenr_T lnum, long nlines));
-int undo_allowed __ARGS((void));
-int u_savecommon __ARGS((linenr_T top, linenr_T bot, linenr_T newbot,
- int reload));
-void u_compute_hash __ARGS((char_u *hash));
-char_u *u_get_undo_file_name __ARGS((char_u *buf_ffname, int reading));
-void u_write_undo __ARGS((char_u *name, int forceit, buf_T *buf, char_u *hash));
-void u_read_undo __ARGS((char_u *name, char_u *hash, char_u *orig_name));
-void u_undo __ARGS((int count));
-void u_redo __ARGS((int count));
-void undo_time __ARGS((long step, int sec, int file, int absolute));
-void u_sync __ARGS((int force));
-void ex_undolist __ARGS((exarg_T *eap));
-void ex_undojoin __ARGS((exarg_T *eap));
-void u_unchanged __ARGS((buf_T *buf));
-void u_find_first_changed __ARGS((void));
-void u_update_save_nr __ARGS((buf_T *buf));
-void u_clearall __ARGS((buf_T *buf));
-void u_saveline __ARGS((linenr_T lnum));
-void u_clearline __ARGS((void));
-void u_undoline __ARGS((void));
-void u_blockfree __ARGS((buf_T *buf));
-int bufIsChanged __ARGS((buf_T *buf));
-int curbufIsChanged __ARGS((void));
-void u_eval_tree __ARGS((u_header_T *first_uhp, list_T *list));
+int u_save_cursor(void);
+int u_save(linenr_T top, linenr_T bot);
+int u_savesub(linenr_T lnum);
+int u_inssub(linenr_T lnum);
+int u_savedel(linenr_T lnum, long nlines);
+int undo_allowed(void);
+int u_savecommon(linenr_T top, linenr_T bot, linenr_T newbot,
+ int reload);
+void u_compute_hash(char_u *hash);
+char_u *u_get_undo_file_name(char_u *buf_ffname, int reading);
+void u_write_undo(char_u *name, int forceit, buf_T *buf, char_u *hash);
+void u_read_undo(char_u *name, char_u *hash, char_u *orig_name);
+void u_undo(int count);
+void u_redo(int count);
+void undo_time(long step, int sec, int file, int absolute);
+void u_sync(int force);
+void ex_undolist(exarg_T *eap);
+void ex_undojoin(exarg_T *eap);
+void u_unchanged(buf_T *buf);
+void u_find_first_changed(void);
+void u_update_save_nr(buf_T *buf);
+void u_clearall(buf_T *buf);
+void u_saveline(linenr_T lnum);
+void u_clearline(void);
+void u_undoline(void);
+void u_blockfree(buf_T *buf);
+int bufIsChanged(buf_T *buf);
+int curbufIsChanged(void);
+void u_eval_tree(u_header_T *first_uhp, list_T *list);
/* vim: set ft=c : */
#endif /* NEOVIM_UNDO_H */
diff --git a/src/version.c b/src/version.c
index e85f7a57ec..2de1105123 100644
--- a/src/version.c
+++ b/src/version.c
@@ -38,8 +38,8 @@ char *longVersion = VIM_VERSION_LONG_DATE __DATE__ " " __TIME__ ")";
char *longVersion = VIM_VERSION_LONG;
#endif
-static void list_features __ARGS((void));
-static void version_msg __ARGS((char *s));
+static void list_features(void);
+static void version_msg(char *s);
static char *(features[]) =
{
@@ -806,8 +806,8 @@ static void version_msg(char *s)
MSG_PUTS(s);
}
-static void do_intro_line __ARGS((int row, char_u *mesg, int add_version,
- int attr));
+static void do_intro_line(int row, char_u *mesg, int add_version,
+ int attr);
/*
* Show the intro message when not editing a file.
diff --git a/src/version.h b/src/version.h
index b2828980f3..2b950e5e60 100644
--- a/src/version.h
+++ b/src/version.h
@@ -1,13 +1,13 @@
#ifndef NEOVIM_VERSION_H
#define NEOVIM_VERSION_H
/* version.c */
-void make_version __ARGS((void));
-int highest_patch __ARGS((void));
-int has_patch __ARGS((int n));
-void ex_version __ARGS((exarg_T *eap));
-void list_version __ARGS((void));
-void maybe_intro_message __ARGS((void));
-void intro_message __ARGS((int colon));
-void ex_intro __ARGS((exarg_T *eap));
+void make_version(void);
+int highest_patch(void);
+int has_patch(int n);
+void ex_version(exarg_T *eap);
+void list_version(void);
+void maybe_intro_message(void);
+void intro_message(int colon);
+void ex_intro(exarg_T *eap);
/* vim: set ft=c : */
#endif /* NEOVIM_VERSION_H */
diff --git a/src/vim.h b/src/vim.h
index 8e70717652..a2628ade0b 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -67,14 +67,6 @@ Error: configure did not run properly.Check auto/config.log.
#include "os_unix_defs.h" /* bring lots of system header files */
-#ifndef __ARGS
-# if defined(__STDC__) || defined(__GNUC__) || defined(WIN3264)
-# define __ARGS(x) x
-# else
-# define __ARGS(x) ()
-# endif
-#endif
-
# ifdef HAVE_LOCALE_H
# include <locale.h>
# endif
@@ -1174,7 +1166,7 @@ typedef void *vim_acl_T; /* dummy to pass an ACL to a function */
* Include a prototype for mch_memmove(), it may not be in alloc.pro.
*/
#ifdef VIM_MEMMOVE
-void mch_memmove __ARGS((void *, void *, size_t));
+void mch_memmove(void *, void *, size_t);
#else
# ifndef mch_memmove
# define mch_memmove(to, from, len) memmove(to, from, len)
@@ -1194,7 +1186,7 @@ void mch_memmove __ARGS((void *, void *, size_t));
#ifdef HAVE_MEMSET
# define vim_memset(ptr, c, size) memset((ptr), (c), (size))
#else
-void *vim_memset __ARGS((void *, int, size_t));
+void *vim_memset(void *, int, size_t);
#endif
#ifdef HAVE_MEMCMP
@@ -1203,7 +1195,7 @@ void *vim_memset __ARGS((void *, int, size_t));
# ifdef HAVE_BCMP
# define vim_memcmp(p1, p2, len) bcmp((p1), (p2), (len))
# else
-int vim_memcmp __ARGS((void *, void *, size_t));
+int vim_memcmp(void *, void *, size_t);
# define VIM_MEMCMP
# endif
#endif
diff --git a/src/window.c b/src/window.c
index 2e906d633b..cd96365902 100644
--- a/src/window.c
+++ b/src/window.c
@@ -44,69 +44,69 @@
#include "undo.h"
#include "os/os.h"
-static int path_is_url __ARGS((char_u *p));
-static void win_init __ARGS((win_T *newp, win_T *oldp, int flags));
-static void win_init_some __ARGS((win_T *newp, win_T *oldp));
-static void frame_comp_pos __ARGS((frame_T *topfrp, int *row, int *col));
-static void frame_setheight __ARGS((frame_T *curfrp, int height));
-static void frame_setwidth __ARGS((frame_T *curfrp, int width));
-static void win_exchange __ARGS((long));
-static void win_rotate __ARGS((int, int));
-static void win_totop __ARGS((int size, int flags));
-static void win_equal_rec __ARGS((win_T *next_curwin, int current, frame_T *
- topfr, int dir, int col, int row, int width,
- int height));
-static int last_window __ARGS((void));
-static int close_last_window_tabpage __ARGS((win_T *win, int free_buf,
- tabpage_T *prev_curtab));
-static win_T *win_free_mem __ARGS((win_T *win, int *dirp, tabpage_T *tp));
-static frame_T *win_altframe __ARGS((win_T *win, tabpage_T *tp));
-static tabpage_T *alt_tabpage __ARGS((void));
-static win_T *frame2win __ARGS((frame_T *frp));
-static int frame_has_win __ARGS((frame_T *frp, win_T *wp));
-static void frame_new_height __ARGS((frame_T *topfrp, int height, int topfirst,
- int wfh));
-static int frame_fixed_height __ARGS((frame_T *frp));
-static int frame_fixed_width __ARGS((frame_T *frp));
-static void frame_add_statusline __ARGS((frame_T *frp));
-static void frame_new_width __ARGS((frame_T *topfrp, int width, int leftfirst,
- int wfw));
-static void frame_add_vsep __ARGS((frame_T *frp));
-static int frame_minwidth __ARGS((frame_T *topfrp, win_T *next_curwin));
-static void frame_fix_width __ARGS((win_T *wp));
-static int win_alloc_firstwin __ARGS((win_T *oldwin));
-static void new_frame __ARGS((win_T *wp));
-static tabpage_T *alloc_tabpage __ARGS((void));
-static int leave_tabpage __ARGS((buf_T *new_curbuf, int trigger_leave_autocmds));
-static void enter_tabpage __ARGS((tabpage_T *tp, buf_T *old_curbuf,
- int trigger_enter_autocmds,
- int trigger_leave_autocmds));
-static void frame_fix_height __ARGS((win_T *wp));
-static int frame_minheight __ARGS((frame_T *topfrp, win_T *next_curwin));
-static void win_enter_ext __ARGS((win_T *wp, int undo_sync, int no_curwin,
- int trigger_enter_autocmds,
- int trigger_leave_autocmds));
-static void win_free __ARGS((win_T *wp, tabpage_T *tp));
-static void frame_append __ARGS((frame_T *after, frame_T *frp));
-static void frame_insert __ARGS((frame_T *before, frame_T *frp));
-static void frame_remove __ARGS((frame_T *frp));
-static void win_goto_ver __ARGS((int up, long count));
-static void win_goto_hor __ARGS((int left, long count));
-static void frame_add_height __ARGS((frame_T *frp, int n));
-static void last_status_rec __ARGS((frame_T *fr, int statusline));
-
-static void make_snapshot_rec __ARGS((frame_T *fr, frame_T **frp));
-static void clear_snapshot __ARGS((tabpage_T *tp, int idx));
-static void clear_snapshot_rec __ARGS((frame_T *fr));
-static int check_snapshot_rec __ARGS((frame_T *sn, frame_T *fr));
-static win_T *restore_snapshot_rec __ARGS((frame_T *sn, frame_T *fr));
-
-static int frame_check_height __ARGS((frame_T *topfrp, int height));
-static int frame_check_width __ARGS((frame_T *topfrp, int width));
-
-
-static win_T *win_alloc __ARGS((win_T *after, int hidden));
-static void set_fraction __ARGS((win_T *wp));
+static int path_is_url(char_u *p);
+static void win_init(win_T *newp, win_T *oldp, int flags);
+static void win_init_some(win_T *newp, win_T *oldp);
+static void frame_comp_pos(frame_T *topfrp, int *row, int *col);
+static void frame_setheight(frame_T *curfrp, int height);
+static void frame_setwidth(frame_T *curfrp, int width);
+static void win_exchange(long);
+static void win_rotate(int, int);
+static void win_totop(int size, int flags);
+static void win_equal_rec(win_T *next_curwin, int current, frame_T *topfr,
+ int dir, int col, int row, int width,
+ int height);
+static int last_window(void);
+static int close_last_window_tabpage(win_T *win, int free_buf,
+ tabpage_T *prev_curtab);
+static win_T *win_free_mem(win_T *win, int *dirp, tabpage_T *tp);
+static frame_T *win_altframe(win_T *win, tabpage_T *tp);
+static tabpage_T *alt_tabpage(void);
+static win_T *frame2win(frame_T *frp);
+static int frame_has_win(frame_T *frp, win_T *wp);
+static void frame_new_height(frame_T *topfrp, int height, int topfirst,
+ int wfh);
+static int frame_fixed_height(frame_T *frp);
+static int frame_fixed_width(frame_T *frp);
+static void frame_add_statusline(frame_T *frp);
+static void frame_new_width(frame_T *topfrp, int width, int leftfirst,
+ int wfw);
+static void frame_add_vsep(frame_T *frp);
+static int frame_minwidth(frame_T *topfrp, win_T *next_curwin);
+static void frame_fix_width(win_T *wp);
+static int win_alloc_firstwin(win_T *oldwin);
+static void new_frame(win_T *wp);
+static tabpage_T *alloc_tabpage(void);
+static int leave_tabpage(buf_T *new_curbuf, int trigger_leave_autocmds);
+static void enter_tabpage(tabpage_T *tp, buf_T *old_curbuf,
+ int trigger_enter_autocmds,
+ int trigger_leave_autocmds);
+static void frame_fix_height(win_T *wp);
+static int frame_minheight(frame_T *topfrp, win_T *next_curwin);
+static void win_enter_ext(win_T *wp, int undo_sync, int no_curwin,
+ int trigger_enter_autocmds,
+ int trigger_leave_autocmds);
+static void win_free(win_T *wp, tabpage_T *tp);
+static void frame_append(frame_T *after, frame_T *frp);
+static void frame_insert(frame_T *before, frame_T *frp);
+static void frame_remove(frame_T *frp);
+static void win_goto_ver(int up, long count);
+static void win_goto_hor(int left, long count);
+static void frame_add_height(frame_T *frp, int n);
+static void last_status_rec(frame_T *fr, int statusline);
+
+static void make_snapshot_rec(frame_T *fr, frame_T **frp);
+static void clear_snapshot(tabpage_T *tp, int idx);
+static void clear_snapshot_rec(frame_T *fr);
+static int check_snapshot_rec(frame_T *sn, frame_T *fr);
+static win_T *restore_snapshot_rec(frame_T *sn, frame_T *fr);
+
+static int frame_check_height(frame_T *topfrp, int height);
+static int frame_check_width(frame_T *topfrp, int width);
+
+
+static win_T *win_alloc(win_T *after, int hidden);
+static void set_fraction(win_T *wp);
#define URL_SLASH 1 /* path_is_url() has found "://" */
#define URL_BACKSLASH 2 /* path_is_url() has found ":\\" */
@@ -4955,7 +4955,7 @@ file_name_in_line (
return find_file_name_in_path(ptr, len, options, count, rel_fname);
}
-static char_u *eval_includeexpr __ARGS((char_u *ptr, int len));
+static char_u *eval_includeexpr(char_u *ptr, int len);
static char_u *eval_includeexpr(char_u *ptr, int len)
{
diff --git a/src/window.h b/src/window.h
index 1fa7c302fd..6637ffc7f9 100644
--- a/src/window.h
+++ b/src/window.h
@@ -1,96 +1,96 @@
#ifndef NEOVIM_WINDOW_H
#define NEOVIM_WINDOW_H
/* window.c */
-void do_window __ARGS((int nchar, long Prenum, int xchar));
-int win_split __ARGS((int size, int flags));
-int win_split_ins __ARGS((int size, int flags, win_T *new_wp, int dir));
-int win_valid __ARGS((win_T *win));
-int win_count __ARGS((void));
-int make_windows __ARGS((int count, int vertical));
-void win_move_after __ARGS((win_T *win1, win_T *win2));
-void win_equal __ARGS((win_T *next_curwin, int current, int dir));
-void close_windows __ARGS((buf_T *buf, int keep_curwin));
-int one_window __ARGS((void));
-int win_close __ARGS((win_T *win, int free_buf));
-void win_close_othertab __ARGS((win_T *win, int free_buf, tabpage_T *tp));
-void win_free_all __ARGS((void));
-win_T *winframe_remove __ARGS((win_T *win, int *dirp, tabpage_T *tp));
-void close_others __ARGS((int message, int forceit));
-void curwin_init __ARGS((void));
-void win_init_empty __ARGS((win_T *wp));
-int win_alloc_first __ARGS((void));
-void win_alloc_aucmd_win __ARGS((void));
-void win_init_size __ARGS((void));
-void free_tabpage __ARGS((tabpage_T *tp));
-int win_new_tabpage __ARGS((int after));
-int may_open_tabpage __ARGS((void));
-int make_tabpages __ARGS((int maxcount));
-int valid_tabpage __ARGS((tabpage_T *tpc));
-tabpage_T *find_tabpage __ARGS((int n));
-int tabpage_index __ARGS((tabpage_T *ftp));
-void goto_tabpage __ARGS((int n));
-void goto_tabpage_tp __ARGS((tabpage_T *tp, int trigger_enter_autocmds,
- int trigger_leave_autocmds));
-void goto_tabpage_win __ARGS((tabpage_T *tp, win_T *wp));
-void tabpage_move __ARGS((int nr));
-void win_goto __ARGS((win_T *wp));
-win_T *win_find_nr __ARGS((int winnr));
-tabpage_T *win_find_tabpage __ARGS((win_T *win));
-void win_enter __ARGS((win_T *wp, int undo_sync));
-win_T *buf_jump_open_win __ARGS((buf_T *buf));
-win_T *buf_jump_open_tab __ARGS((buf_T *buf));
-void win_append __ARGS((win_T *after, win_T *wp));
-void win_remove __ARGS((win_T *wp, tabpage_T *tp));
-int win_alloc_lines __ARGS((win_T *wp));
-void win_free_lsize __ARGS((win_T *wp));
-void shell_new_rows __ARGS((void));
-void shell_new_columns __ARGS((void));
-void win_size_save __ARGS((garray_T *gap));
-void win_size_restore __ARGS((garray_T *gap));
-int win_comp_pos __ARGS((void));
-void win_setheight __ARGS((int height));
-void win_setheight_win __ARGS((int height, win_T *win));
-void win_setwidth __ARGS((int width));
-void win_setwidth_win __ARGS((int width, win_T *wp));
-void win_setminheight __ARGS((void));
-void win_drag_status_line __ARGS((win_T *dragwin, int offset));
-void win_drag_vsep_line __ARGS((win_T *dragwin, int offset));
-void win_new_height __ARGS((win_T *wp, int height));
-void win_new_width __ARGS((win_T *wp, int width));
-void win_comp_scroll __ARGS((win_T *wp));
-void command_height __ARGS((void));
-void last_status __ARGS((int morewin));
-int tabline_height __ARGS((void));
-char_u *grab_file_name __ARGS((long count, linenr_T *file_lnum));
-char_u *file_name_at_cursor __ARGS((int options, long count,
- linenr_T *file_lnum));
-char_u *file_name_in_line __ARGS((char_u *line, int col, int options,
- long count, char_u *rel_fname,
- linenr_T *file_lnum));
-char_u *find_file_name_in_path __ARGS((char_u *ptr, int len, int options,
- long count,
- char_u *rel_fname));
-int path_with_url __ARGS((char_u *fname));
-int vim_isAbsName __ARGS((char_u *name));
-int vim_FullName __ARGS((char_u *fname, char_u *buf, int len, int force));
-int min_rows __ARGS((void));
-int only_one_window __ARGS((void));
-void check_lnums __ARGS((int do_curwin));
-void make_snapshot __ARGS((int idx));
-void restore_snapshot __ARGS((int idx, int close_curwin));
-int switch_win __ARGS((win_T **save_curwin, tabpage_T **save_curtab, win_T *win,
- tabpage_T *tp,
- int no_display));
-void restore_win __ARGS((win_T *save_curwin, tabpage_T *save_curtab,
- int no_display));
-void switch_buffer __ARGS((buf_T **save_curbuf, buf_T *buf));
-void restore_buffer __ARGS((buf_T *save_curbuf));
-int win_hasvertsplit __ARGS((void));
-int match_add __ARGS((win_T *wp, char_u *grp, char_u *pat, int prio, int id));
-int match_delete __ARGS((win_T *wp, int id, int perr));
-void clear_matches __ARGS((win_T *wp));
-matchitem_T *get_match __ARGS((win_T *wp, int id));
-int get_win_number __ARGS((win_T *wp, win_T *first_win));
-int get_tab_number __ARGS((tabpage_T *tp));
+void do_window(int nchar, long Prenum, int xchar);
+int win_split(int size, int flags);
+int win_split_ins(int size, int flags, win_T *new_wp, int dir);
+int win_valid(win_T *win);
+int win_count(void);
+int make_windows(int count, int vertical);
+void win_move_after(win_T *win1, win_T *win2);
+void win_equal(win_T *next_curwin, int current, int dir);
+void close_windows(buf_T *buf, int keep_curwin);
+int one_window(void);
+int win_close(win_T *win, int free_buf);
+void win_close_othertab(win_T *win, int free_buf, tabpage_T *tp);
+void win_free_all(void);
+win_T *winframe_remove(win_T *win, int *dirp, tabpage_T *tp);
+void close_others(int message, int forceit);
+void curwin_init(void);
+void win_init_empty(win_T *wp);
+int win_alloc_first(void);
+void win_alloc_aucmd_win(void);
+void win_init_size(void);
+void free_tabpage(tabpage_T *tp);
+int win_new_tabpage(int after);
+int may_open_tabpage(void);
+int make_tabpages(int maxcount);
+int valid_tabpage(tabpage_T *tpc);
+tabpage_T *find_tabpage(int n);
+int tabpage_index(tabpage_T *ftp);
+void goto_tabpage(int n);
+void goto_tabpage_tp(tabpage_T *tp, int trigger_enter_autocmds,
+ int trigger_leave_autocmds);
+void goto_tabpage_win(tabpage_T *tp, win_T *wp);
+void tabpage_move(int nr);
+void win_goto(win_T *wp);
+win_T *win_find_nr(int winnr);
+tabpage_T *win_find_tabpage(win_T *win);
+void win_enter(win_T *wp, int undo_sync);
+win_T *buf_jump_open_win(buf_T *buf);
+win_T *buf_jump_open_tab(buf_T *buf);
+void win_append(win_T *after, win_T *wp);
+void win_remove(win_T *wp, tabpage_T *tp);
+int win_alloc_lines(win_T *wp);
+void win_free_lsize(win_T *wp);
+void shell_new_rows(void);
+void shell_new_columns(void);
+void win_size_save(garray_T *gap);
+void win_size_restore(garray_T *gap);
+int win_comp_pos(void);
+void win_setheight(int height);
+void win_setheight_win(int height, win_T *win);
+void win_setwidth(int width);
+void win_setwidth_win(int width, win_T *wp);
+void win_setminheight(void);
+void win_drag_status_line(win_T *dragwin, int offset);
+void win_drag_vsep_line(win_T *dragwin, int offset);
+void win_new_height(win_T *wp, int height);
+void win_new_width(win_T *wp, int width);
+void win_comp_scroll(win_T *wp);
+void command_height(void);
+void last_status(int morewin);
+int tabline_height(void);
+char_u *grab_file_name(long count, linenr_T *file_lnum);
+char_u *file_name_at_cursor(int options, long count,
+ linenr_T *file_lnum);
+char_u *file_name_in_line(char_u *line, int col, int options,
+ long count, char_u *rel_fname,
+ linenr_T *file_lnum);
+char_u *find_file_name_in_path(char_u *ptr, int len, int options,
+ long count,
+ char_u *rel_fname);
+int path_with_url(char_u *fname);
+int vim_isAbsName(char_u *name);
+int vim_FullName(char_u *fname, char_u *buf, int len, int force);
+int min_rows(void);
+int only_one_window(void);
+void check_lnums(int do_curwin);
+void make_snapshot(int idx);
+void restore_snapshot(int idx, int close_curwin);
+int switch_win(win_T **save_curwin, tabpage_T **save_curtab, win_T *win,
+ tabpage_T *tp,
+ int no_display);
+void restore_win(win_T *save_curwin, tabpage_T *save_curtab,
+ int no_display);
+void switch_buffer(buf_T **save_curbuf, buf_T *buf);
+void restore_buffer(buf_T *save_curbuf);
+int win_hasvertsplit(void);
+int match_add(win_T *wp, char_u *grp, char_u *pat, int prio, int id);
+int match_delete(win_T *wp, int id, int perr);
+void clear_matches(win_T *wp);
+matchitem_T *get_match(win_T *wp, int id);
+int get_win_number(win_T *wp, win_T *first_win);
+int get_tab_number(tabpage_T *tp);
/* vim: set ft=c : */
#endif /* NEOVIM_WINDOW_H */