From 0ef90c13b72b74928bfb3c183c7a5bd7240b51ad Mon Sep 17 00:00:00 2001 From: scott-linder Date: Tue, 25 Feb 2014 15:41:16 -0500 Subject: Removes 'proto' dir See #137 for the issue. Every header in the proto directory was: * Given include guards in the form #ifndef NEOVIM_FILENAME_H #define NEOVIM_FILENAME_H ... #endif /* NEOVIM_FILENAM_H */ * Renamed from *.pro -> *.h * Moved from src/proto/ to src/ This would have caused conficts with some existing headers in src/; rather than merge these conflicts now (which is a whole other can of worms involving multiple and conditional inclusion), any header in src/ with a conflicting name was renamed from *.h -> *_defs.h (which may or may not actually describe its purpose, the change is purely a namespacing issue). Once all of these changes were made a script was developed to determine what #includes needed to be added to each source file to describe its dependencies and allow it to compile; because the script is so short and I'll just list it here: #! /bin/bash cd $(dirname $0) # Scrapes `make` output for provided error messages and outputs #includes # needed to resolve them. # $1 : part of the clang error message between filename and identifier list_missing_includes() { for file_missing_pair in $(CC=clang make 2>&1 >/dev/null | sed -n "s/\/\(.*\.[hc]\).*$1.*'\(.*\)'.*/\1:\2/p"); do fields=(${file_missing_pair//:/ }) source_file=${fields[0]} missing_func=${fields[1]} # Try to find the declaration of the missing function. echo $(basename $source_file) \ \#include \"$(grep -r "\b$missing_func __ARGS" | sed -n "s/.*\/\(.*\)\:.*/\1/p")\" # Remove duplicates done | sort | uniq } echo "Finding missing function prototypes..." list_missing_includes "implicit declaration of function" echo "Finding missing identifier declarations..." list_missing_includes "use of undeclared identifier" Each list of required headers was added by hand in the following format: #include "vim.h" #include "*_defs.h" #include "filename.h" /* All other includes in same module here, in alphabetical order. */ /* All includes from other modules (e.g. "os/*.h") here in alphabetical * order. */ --- src/arabic.c | 2 + src/ascii.h | 5 + src/blowfish.c | 4 +- src/blowfish.h | 13 + src/buffer.c | 35 +- src/buffer.h | 84 ++++ src/charset.c | 8 + src/charset.h | 67 +++ src/diff.c | 21 +- src/diff.h | 33 ++ src/digraph.c | 13 +- src/digraph.h | 12 + src/edit.c | 32 ++ src/edit.h | 49 ++ src/eval.c | 46 +- src/eval.h | 153 ++++++ src/ex_cmds.c | 39 +- src/ex_cmds.h | 1267 +++-------------------------------------------- src/ex_cmds2.c | 27 +- src/ex_cmds2.h | 96 ++++ src/ex_cmds_defs.h | 1191 ++++++++++++++++++++++++++++++++++++++++++++ src/ex_docmd.c | 44 +- src/ex_docmd.h | 72 +++ src/ex_eval.c | 8 + src/ex_eval.h | 41 ++ src/ex_getln.c | 31 ++ src/ex_getln.h | 69 +++ src/farsi.c | 4 + src/farsi.h | 5 + src/fileio.c | 31 ++ src/fileio.h | 85 ++++ src/fold.c | 16 +- src/fold.h | 53 ++ src/getchar.c | 21 + src/getchar.h | 77 +++ src/globals.h | 7 + src/hangulin.c | 6 + src/hangulin.h | 12 + src/hardcopy.c | 19 +- src/hardcopy.h | 24 + src/hashtab.c | 5 +- src/hashtab.h | 18 + src/if_cscope.c | 17 +- src/if_cscope.h | 88 +--- src/if_cscope_defs.h | 72 +++ src/keymap.h | 2 +- src/main.c | 32 ++ src/main.h | 30 ++ src/mark.c | 18 + src/mark.h | 37 ++ src/mbyte.c | 11 + src/mbyte.h | 103 ++++ src/memfile.c | 8 + src/memfile.h | 21 + src/memline.c | 23 +- src/memline.h | 44 ++ src/menu.c | 9 + src/menu.h | 26 + src/message.c | 14 + src/message.h | 83 ++++ src/misc1.c | 31 +- src/misc1.h | 120 +++++ src/misc2.c | 22 + src/misc2.h | 136 +++++ src/move.c | 11 + src/move.h | 44 ++ src/normal.c | 33 ++ src/normal.h | 32 ++ src/ops.c | 25 + src/ops.h | 69 +++ src/option.c | 37 +- src/option.h | 845 +++---------------------------- src/option_defs.h | 768 ++++++++++++++++++++++++++++ src/os/fs.c | 1 + src/os_unix.c | 18 +- src/os_unix.h | 429 +++------------- src/os_unix_defs.h | 351 +++++++++++++ src/popupmnu.c | 11 +- src/popupmnu.h | 11 + src/proto.h | 75 --- src/proto/blowfish.pro | 10 - src/proto/buffer.pro | 81 --- src/proto/charset.pro | 64 --- src/proto/diff.pro | 30 -- src/proto/digraph.pro | 9 - src/proto/edit.pro | 46 -- src/proto/eval.pro | 150 ------ src/proto/ex_cmds.pro | 72 --- src/proto/ex_cmds2.pro | 93 ---- src/proto/ex_docmd.pro | 69 --- src/proto/ex_eval.pro | 38 -- src/proto/ex_getln.pro | 66 --- src/proto/fileio.pro | 82 --- src/proto/fold.pro | 50 -- src/proto/getchar.pro | 74 --- src/proto/hangulin.pro | 9 - src/proto/hardcopy.pro | 21 - src/proto/hashtab.pro | 15 - src/proto/if_cscope.pro | 13 - src/proto/main.pro | 27 - src/proto/mark.pro | 34 -- src/proto/mbyte.pro | 100 ---- src/proto/memfile.pro | 18 - src/proto/memline.pro | 41 -- src/proto/menu.pro | 23 - src/proto/message.pro | 80 --- src/proto/misc1.pro | 117 ----- src/proto/misc2.pro | 133 ----- src/proto/move.pro | 41 -- src/proto/normal.pro | 29 -- src/proto/ops.pro | 66 --- src/proto/option.pro | 74 --- src/proto/os_unix.pro | 75 --- src/proto/popupmnu.pro | 8 - src/proto/quickfix.pro | 33 -- src/proto/regexp.pro | 24 - src/proto/screen.pro | 66 --- src/proto/search.pro | 49 -- src/proto/sha256.pro | 12 - src/proto/spell.pro | 30 -- src/proto/syntax.pro | 58 --- src/proto/tag.pro | 15 - src/proto/term.pro | 65 --- src/proto/ui.pro | 67 --- src/proto/undo.pro | 31 -- src/proto/version.pro | 10 - src/proto/window.pro | 93 ---- src/quickfix.c | 28 ++ src/quickfix.h | 36 ++ src/regexp.c | 11 +- src/regexp.h | 179 +------ src/regexp_defs.h | 152 ++++++ src/regexp_nfa.c | 2 + src/screen.c | 31 ++ src/screen.h | 69 +++ src/search.c | 25 + src/search.h | 52 ++ src/sha256.c | 2 +- src/sha256.h | 15 + src/spell.c | 31 +- src/spell.h | 33 ++ src/structs.h | 4 +- src/syntax.c | 19 + src/syntax.h | 61 +++ src/tag.c | 27 + src/tag.h | 18 + src/term.c | 19 + src/term.h | 224 +++------ src/term_defs.h | 156 ++++++ src/ui.c | 16 +- src/ui.h | 70 +++ src/undo.c | 15 + src/undo.h | 34 ++ src/version.c | 9 +- src/version.h | 53 +- src/version_defs.h | 40 ++ src/vim.h | 16 +- src/window.c | 32 ++ src/window.h | 96 ++++ 159 files changed, 6277 insertions(+), 5261 deletions(-) create mode 100644 src/blowfish.h create mode 100644 src/buffer.h create mode 100644 src/charset.h create mode 100644 src/diff.h create mode 100644 src/digraph.h create mode 100644 src/edit.h create mode 100644 src/eval.h create mode 100644 src/ex_cmds2.h create mode 100644 src/ex_cmds_defs.h create mode 100644 src/ex_docmd.h create mode 100644 src/ex_eval.h create mode 100644 src/ex_getln.h create mode 100644 src/fileio.h create mode 100644 src/fold.h create mode 100644 src/getchar.h create mode 100644 src/hangulin.h create mode 100644 src/hardcopy.h create mode 100644 src/hashtab.h create mode 100644 src/if_cscope_defs.h create mode 100644 src/main.h create mode 100644 src/mark.h create mode 100644 src/mbyte.h create mode 100644 src/memfile.h create mode 100644 src/memline.h create mode 100644 src/menu.h create mode 100644 src/message.h create mode 100644 src/misc1.h create mode 100644 src/misc2.h create mode 100644 src/move.h create mode 100644 src/normal.h create mode 100644 src/ops.h create mode 100644 src/option_defs.h create mode 100644 src/os_unix_defs.h create mode 100644 src/popupmnu.h delete mode 100644 src/proto/blowfish.pro delete mode 100644 src/proto/buffer.pro delete mode 100644 src/proto/charset.pro delete mode 100644 src/proto/diff.pro delete mode 100644 src/proto/digraph.pro delete mode 100644 src/proto/edit.pro delete mode 100644 src/proto/eval.pro delete mode 100644 src/proto/ex_cmds.pro delete mode 100644 src/proto/ex_cmds2.pro delete mode 100644 src/proto/ex_docmd.pro delete mode 100644 src/proto/ex_eval.pro delete mode 100644 src/proto/ex_getln.pro delete mode 100644 src/proto/fileio.pro delete mode 100644 src/proto/fold.pro delete mode 100644 src/proto/getchar.pro delete mode 100644 src/proto/hangulin.pro delete mode 100644 src/proto/hardcopy.pro delete mode 100644 src/proto/hashtab.pro delete mode 100644 src/proto/if_cscope.pro delete mode 100644 src/proto/main.pro delete mode 100644 src/proto/mark.pro delete mode 100644 src/proto/mbyte.pro delete mode 100644 src/proto/memfile.pro delete mode 100644 src/proto/memline.pro delete mode 100644 src/proto/menu.pro delete mode 100644 src/proto/message.pro delete mode 100644 src/proto/misc1.pro delete mode 100644 src/proto/misc2.pro delete mode 100644 src/proto/move.pro delete mode 100644 src/proto/normal.pro delete mode 100644 src/proto/ops.pro delete mode 100644 src/proto/option.pro delete mode 100644 src/proto/os_unix.pro delete mode 100644 src/proto/popupmnu.pro delete mode 100644 src/proto/quickfix.pro delete mode 100644 src/proto/regexp.pro delete mode 100644 src/proto/screen.pro delete mode 100644 src/proto/search.pro delete mode 100644 src/proto/sha256.pro delete mode 100644 src/proto/spell.pro delete mode 100644 src/proto/syntax.pro delete mode 100644 src/proto/tag.pro delete mode 100644 src/proto/term.pro delete mode 100644 src/proto/ui.pro delete mode 100644 src/proto/undo.pro delete mode 100644 src/proto/version.pro delete mode 100644 src/proto/window.pro create mode 100644 src/quickfix.h create mode 100644 src/regexp_defs.h create mode 100644 src/screen.h create mode 100644 src/search.h create mode 100644 src/sha256.h create mode 100644 src/spell.h create mode 100644 src/syntax.h create mode 100644 src/tag.h create mode 100644 src/term_defs.h create mode 100644 src/ui.h create mode 100644 src/undo.h create mode 100644 src/version_defs.h create mode 100644 src/window.h (limited to 'src') diff --git a/src/arabic.c b/src/arabic.c index 3aec35aba3..5359b83a43 100644 --- a/src/arabic.c +++ b/src/arabic.c @@ -7,6 +7,8 @@ * See README.txt for an overview of the Vim source code. */ +#include "arabic.h" + /* * arabic.c: functions for Arabic language * diff --git a/src/ascii.h b/src/ascii.h index 0904521ccf..50ca04f443 100644 --- a/src/ascii.h +++ b/src/ascii.h @@ -6,6 +6,9 @@ * Do ":help credits" in Vim to see a list of people who contributed. */ +#ifndef NEOVIM_ASCII_H +#define NEOVIM_ASCII_H + /* * Definitions of various common control characters. * For EBCDIC we have to use different values. @@ -94,3 +97,5 @@ # define PATHSEP '/' # define PATHSEPSTR "/" #endif + +#endif /* NEOVIM_ASCII_H */ diff --git a/src/blowfish.c b/src/blowfish.c index df820d1152..d7074bd42c 100644 --- a/src/blowfish.c +++ b/src/blowfish.c @@ -12,7 +12,9 @@ */ #include "vim.h" - +#include "blowfish.h" +#include "message.h" +#include "sha256.h" #define ARRAY_LENGTH(A) (sizeof(A)/sizeof(A[0])) diff --git a/src/blowfish.h b/src/blowfish.h new file mode 100644 index 0000000000..d4d8f36429 --- /dev/null +++ b/src/blowfish.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_BLOWFISH_H */ diff --git a/src/buffer.c b/src/buffer.c index de1af62307..401dc40333 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -26,6 +26,39 @@ */ #include "vim.h" +#include "buffer.h" +#include "charset.h" +#include "diff.h" +#include "digraph.h" +#include "eval.h" +#include "ex_cmds2.h" +#include "ex_cmds.h" +#include "ex_docmd.h" +#include "ex_eval.h" +#include "ex_getln.h" +#include "fileio.h" +#include "fold.h" +#include "getchar.h" +#include "hashtab.h" +#include "main.h" +#include "mark.h" +#include "mbyte.h" +#include "memline.h" +#include "message.h" +#include "misc1.h" +#include "misc2.h" +#include "move.h" +#include "option.h" +#include "os_unix.h" +#include "quickfix.h" +#include "regexp.h" +#include "screen.h" +#include "spell.h" +#include "syntax.h" +#include "term.h" +#include "ui.h" +#include "undo.h" +#include "window.h" static char_u *buflist_match __ARGS((regprog_T *prog, buf_T *buf)); # define HAVE_BUFLIST_MATCH @@ -4111,7 +4144,7 @@ void do_modelines(int flags) --entered; } -#include "version.h" /* for version number */ +#include "version_defs.h" /* for version number */ /* * chk_modeline() - check a single line for a mode string diff --git a/src/buffer.h b/src/buffer.h new file mode 100644 index 0000000000..3ca525612d --- /dev/null +++ b/src/buffer.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_BUFFER_H */ diff --git a/src/charset.c b/src/charset.c index 1cc1a79a6f..271df2c7f4 100644 --- a/src/charset.c +++ b/src/charset.c @@ -8,6 +8,14 @@ */ #include "vim.h" +#include "charset.h" +#include "main.h" +#include "mbyte.h" +#include "memline.h" +#include "misc1.h" +#include "misc2.h" +#include "move.h" +#include "os_unix.h" static int win_chartabsize __ARGS((win_T *wp, char_u *p, colnr_T col)); diff --git a/src/charset.h b/src/charset.h new file mode 100644 index 0000000000..d680522880 --- /dev/null +++ b/src/charset.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_CHARSET_H */ diff --git a/src/diff.c b/src/diff.c index 166b40ee0c..626271a7b5 100644 --- a/src/diff.c +++ b/src/diff.c @@ -12,9 +12,28 @@ */ #include "vim.h" +#include "diff.h" +#include "buffer.h" +#include "charset.h" +#include "eval.h" +#include "ex_cmds.h" +#include "ex_docmd.h" +#include "fileio.h" +#include "fold.h" +#include "mark.h" +#include "mbyte.h" +#include "memline.h" +#include "message.h" +#include "misc1.h" +#include "misc2.h" +#include "move.h" +#include "normal.h" +#include "option.h" +#include "screen.h" +#include "undo.h" +#include "window.h" #include "os/os.h" - static int diff_busy = FALSE; /* ex_diffgetput() is busy */ /* flags obtained from the 'diffopt' option */ diff --git a/src/diff.h b/src/diff.h new file mode 100644 index 0000000000..5a2d32204e --- /dev/null +++ b/src/diff.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_DIFF_H */ diff --git a/src/digraph.c b/src/digraph.c index 4a1e1e4d04..9a58058fde 100644 --- a/src/digraph.c +++ b/src/digraph.c @@ -12,7 +12,18 @@ */ #include "vim.h" - +#include "digraph.h" +#include "charset.h" +#include "ex_cmds2.h" +#include "ex_docmd.h" +#include "ex_getln.h" +#include "getchar.h" +#include "mbyte.h" +#include "message.h" +#include "misc2.h" +#include "normal.h" +#include "screen.h" +#include "ui.h" typedef int result_T; diff --git a/src/digraph.h b/src/digraph.h new file mode 100644 index 0000000000..c74e428979 --- /dev/null +++ b/src/digraph.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_DIGRAPH_H */ diff --git a/src/edit.c b/src/edit.c index eec47b3637..6ac6565d40 100644 --- a/src/edit.c +++ b/src/edit.c @@ -12,6 +12,38 @@ */ #include "vim.h" +#include "edit.h" +#include "buffer.h" +#include "charset.h" +#include "digraph.h" +#include "eval.h" +#include "ex_docmd.h" +#include "ex_getln.h" +#include "fileio.h" +#include "fold.h" +#include "getchar.h" +#include "main.h" +#include "mbyte.h" +#include "memline.h" +#include "message.h" +#include "misc1.h" +#include "misc2.h" +#include "move.h" +#include "normal.h" +#include "ops.h" +#include "option.h" +#include "popupmnu.h" +#include "quickfix.h" +#include "regexp.h" +#include "screen.h" +#include "search.h" +#include "spell.h" +#include "syntax.h" +#include "tag.h" +#include "term.h" +#include "ui.h" +#include "undo.h" +#include "window.h" /* * definitions used for CTRL-X submode diff --git a/src/edit.h b/src/edit.h new file mode 100644 index 0000000000..aa2b72d93b --- /dev/null +++ b/src/edit.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_EDIT_H */ diff --git a/src/eval.c b/src/eval.c index 51519bb899..4d120c82ce 100644 --- a/src/eval.c +++ b/src/eval.c @@ -12,12 +12,48 @@ */ #include "vim.h" +#include "eval.h" +#include "buffer.h" +#include "charset.h" +#include "diff.h" +#include "edit.h" +#include "ex_cmds.h" +#include "ex_cmds2.h" +#include "ex_docmd.h" +#include "ex_eval.h" +#include "ex_getln.h" +#include "fileio.h" +#include "fold.h" +#include "getchar.h" +#include "hashtab.h" +#include "if_cscope.h" +#include "mark.h" +#include "mbyte.h" +#include "memline.h" +#include "message.h" +#include "misc1.h" +#include "misc2.h" +#include "move.h" +#include "normal.h" +#include "ops.h" +#include "option.h" +#include "os_unix.h" +#include "popupmnu.h" +#include "quickfix.h" +#include "regexp.h" +#include "screen.h" +#include "search.h" +#include "sha256.h" +#include "spell.h" +#include "syntax.h" +#include "tag.h" +#include "term.h" +#include "ui.h" +#include "undo.h" +#include "version.h" +#include "window.h" #include "os/os.h" - - - - #if defined(FEAT_FLOAT) && defined(HAVE_MATH_H) # include #endif @@ -264,7 +300,7 @@ typedef struct { * The reason to use this table anyway is for very quick access to the * variables with the VV_ defines. */ -#include "version.h" +#include "version_defs.h" /* values for vv_flags: */ #define VV_COMPAT 1 /* compatible, also used without "v:" */ diff --git a/src/eval.h b/src/eval.h new file mode 100644 index 0000000000..d63ea3dd8b --- /dev/null +++ b/src/eval.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_EVAL_H */ diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 2570335f66..5a28167ddb 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -12,7 +12,44 @@ */ #include "vim.h" -#include "version.h" +#include "version_defs.h" +#include "ex_cmds.h" +#include "buffer.h" +#include "charset.h" +#include "diff.h" +#include "digraph.h" +#include "edit.h" +#include "eval.h" +#include "ex_cmds2.h" +#include "ex_docmd.h" +#include "ex_eval.h" +#include "ex_getln.h" +#include "fileio.h" +#include "fold.h" +#include "getchar.h" +#include "main.h" +#include "mark.h" +#include "mbyte.h" +#include "memline.h" +#include "message.h" +#include "misc1.h" +#include "misc2.h" +#include "move.h" +#include "normal.h" +#include "ops.h" +#include "option.h" +#include "os_unix.h" +#include "quickfix.h" +#include "regexp.h" +#include "screen.h" +#include "search.h" +#include "spell.h" +#include "syntax.h" +#include "tag.h" +#include "term.h" +#include "ui.h" +#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, diff --git a/src/ex_cmds.h b/src/ex_cmds.h index a560789fef..4bb11ea20c 100644 --- a/src/ex_cmds.h +++ b/src/ex_cmds.h @@ -1,1191 +1,76 @@ -/* vi:set ts=8 sts=4 sw=4: - * - * VIM - Vi IMproved by Bram Moolenaar - * - * Do ":help uganda" in Vim to read copying and usage conditions. - * Do ":help credits" in Vim to see a list of people who contributed. - */ - -/* - * This file defines the Ex commands. - * When DO_DECLARE_EXCMD is defined, the table with ex command names and - * options results. - * When DO_DECLARE_EXCMD is NOT defined, the enum with all the Ex commands - * results. - * This clever trick was invented by Ron Aaron. - */ - -/* - * When adding an Ex command: - * 1. Add an entry in the table below. Keep it sorted on the shortest - * version of the command name that works. If it doesn't start with a - * lower case letter, add it at the end. - * 2. Add a "case: CMD_xxx" in the big switch in ex_docmd.c. - * 3. Add an entry in the index for Ex commands at ":help ex-cmd-index". - * 4. Add documentation in ../doc/xxx.txt. Add a tag for both the short and - * long name of the command. - */ - -#ifdef RANGE -# undef RANGE /* SASC on Amiga defines it */ -#endif - -#define RANGE 0x001 /* allow a linespecs */ -#define BANG 0x002 /* allow a ! after the command name */ -#define EXTRA 0x004 /* allow extra args after command name */ -#define XFILE 0x008 /* expand wildcards in extra part */ -#define NOSPC 0x010 /* no spaces allowed in the extra part */ -#define DFLALL 0x020 /* default file range is 1,$ */ -#define WHOLEFOLD 0x040 /* extend range to include whole fold also - when less than two numbers given */ -#define NEEDARG 0x080 /* argument required */ -#define TRLBAR 0x100 /* check for trailing vertical bar */ -#define REGSTR 0x200 /* allow "x for register designation */ -#define COUNT 0x400 /* allow count in argument, after command */ -#define NOTRLCOM 0x800 /* no trailing comment allowed */ -#define ZEROR 0x1000 /* zero line number allowed */ -#define USECTRLV 0x2000 /* do not remove CTRL-V from argument */ -#define NOTADR 0x4000 /* number before command is not an address */ -#define EDITCMD 0x8000 /* allow "+command" argument */ -#define BUFNAME 0x10000L /* accepts buffer name */ -#define BUFUNL 0x20000L /* accepts unlisted buffer too */ -#define ARGOPT 0x40000L /* allow "++opt=val" argument */ -#define SBOXOK 0x80000L /* allowed in the sandbox */ -#define CMDWIN 0x100000L /* allowed in cmdline window */ -#define MODIFY 0x200000L /* forbidden in non-'modifiable' buffer */ -#define EXFLAGS 0x400000L /* allow flags after count in argument */ -#define FILES (XFILE | EXTRA) /* multiple extra files allowed */ -#define WORD1 (EXTRA | NOSPC) /* one extra word allowed */ -#define FILE1 (FILES | NOSPC) /* 1 file allowed, defaults to current file */ - -#ifndef DO_DECLARE_EXCMD -typedef struct exarg exarg_T; -#endif - -/* - * This array maps ex command names to command codes. - * The order in which command names are listed below is significant -- - * ambiguous abbreviations are always resolved to be the first possible match - * (e.g. "r" is taken to mean "read", not "rewind", because "read" comes - * before "rewind"). - * Not supported commands are included to avoid ambiguities. - */ -#ifdef EX -# undef EX /* just in case */ -#endif -#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)); - -static struct cmdname { - char_u *cmd_name; /* name of the command */ - ex_func_T cmd_func; /* function for this command */ - long_u cmd_argt; /* flags declared above */ -} -cmdnames[] = -#else -# define EX(a, b, c, d) a -enum CMD_index -#endif -{ - EX(CMD_append, "append", ex_append, - BANG|RANGE|ZEROR|TRLBAR|CMDWIN|MODIFY), - EX(CMD_abbreviate, "abbreviate", ex_abbreviate, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_abclear, "abclear", ex_abclear, - EXTRA|TRLBAR|CMDWIN), - EX(CMD_aboveleft, "aboveleft", ex_wrongmodifier, - NEEDARG|EXTRA|NOTRLCOM), - EX(CMD_all, "all", ex_all, - BANG|RANGE|NOTADR|COUNT|TRLBAR), - EX(CMD_amenu, "amenu", ex_menu, - RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_anoremenu, "anoremenu", ex_menu, - RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_args, "args", ex_args, - BANG|FILES|EDITCMD|ARGOPT|TRLBAR), - EX(CMD_argadd, "argadd", ex_argadd, - BANG|NEEDARG|RANGE|NOTADR|ZEROR|FILES|TRLBAR), - EX(CMD_argdelete, "argdelete", ex_argdelete, - BANG|RANGE|NOTADR|FILES|TRLBAR), - EX(CMD_argdo, "argdo", ex_listdo, - BANG|NEEDARG|EXTRA|NOTRLCOM), - EX(CMD_argedit, "argedit", ex_argedit, - BANG|NEEDARG|RANGE|NOTADR|FILE1|EDITCMD|ARGOPT|TRLBAR), - EX(CMD_argglobal, "argglobal", ex_args, - BANG|FILES|EDITCMD|ARGOPT|TRLBAR), - EX(CMD_arglocal, "arglocal", ex_args, - BANG|FILES|EDITCMD|ARGOPT|TRLBAR), - EX(CMD_argument, "argument", ex_argument, - BANG|RANGE|NOTADR|COUNT|EXTRA|EDITCMD|ARGOPT|TRLBAR), - EX(CMD_ascii, "ascii", do_ascii, - TRLBAR|SBOXOK|CMDWIN), - EX(CMD_autocmd, "autocmd", ex_autocmd, - BANG|EXTRA|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_augroup, "augroup", ex_autocmd, - BANG|WORD1|TRLBAR|CMDWIN), - EX(CMD_aunmenu, "aunmenu", ex_menu, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_buffer, "buffer", ex_buffer, - BANG|RANGE|NOTADR|BUFNAME|BUFUNL|COUNT|EXTRA|TRLBAR), - EX(CMD_bNext, "bNext", ex_bprevious, - BANG|RANGE|NOTADR|COUNT|TRLBAR), - EX(CMD_ball, "ball", ex_buffer_all, - RANGE|NOTADR|COUNT|TRLBAR), - EX(CMD_badd, "badd", ex_edit, - NEEDARG|FILE1|EDITCMD|TRLBAR|CMDWIN), - EX(CMD_bdelete, "bdelete", ex_bunload, - BANG|RANGE|NOTADR|BUFNAME|COUNT|EXTRA|TRLBAR), - EX(CMD_behave, "behave", ex_behave, - NEEDARG|WORD1|TRLBAR|CMDWIN), - EX(CMD_belowright, "belowright", ex_wrongmodifier, - NEEDARG|EXTRA|NOTRLCOM), - EX(CMD_bfirst, "bfirst", ex_brewind, - BANG|RANGE|NOTADR|TRLBAR), - EX(CMD_blast, "blast", ex_blast, - BANG|RANGE|NOTADR|TRLBAR), - EX(CMD_bmodified, "bmodified", ex_bmodified, - BANG|RANGE|NOTADR|COUNT|TRLBAR), - EX(CMD_bnext, "bnext", ex_bnext, - BANG|RANGE|NOTADR|COUNT|TRLBAR), - EX(CMD_botright, "botright", ex_wrongmodifier, - NEEDARG|EXTRA|NOTRLCOM), - EX(CMD_bprevious, "bprevious", ex_bprevious, - BANG|RANGE|NOTADR|COUNT|TRLBAR), - EX(CMD_brewind, "brewind", ex_brewind, - BANG|RANGE|NOTADR|TRLBAR), - EX(CMD_break, "break", ex_break, - TRLBAR|SBOXOK|CMDWIN), - EX(CMD_breakadd, "breakadd", ex_breakadd, - EXTRA|TRLBAR|CMDWIN), - EX(CMD_breakdel, "breakdel", ex_breakdel, - EXTRA|TRLBAR|CMDWIN), - EX(CMD_breaklist, "breaklist", ex_breaklist, - EXTRA|TRLBAR|CMDWIN), - EX(CMD_browse, "browse", ex_wrongmodifier, - NEEDARG|EXTRA|NOTRLCOM|CMDWIN), - EX(CMD_buffers, "buffers", buflist_list, - BANG|TRLBAR|CMDWIN), - EX(CMD_bufdo, "bufdo", ex_listdo, - BANG|NEEDARG|EXTRA|NOTRLCOM), - EX(CMD_bunload, "bunload", ex_bunload, - BANG|RANGE|NOTADR|BUFNAME|COUNT|EXTRA|TRLBAR), - EX(CMD_bwipeout, "bwipeout", ex_bunload, - BANG|RANGE|NOTADR|BUFNAME|BUFUNL|COUNT|EXTRA|TRLBAR), - EX(CMD_change, "change", ex_change, - BANG|WHOLEFOLD|RANGE|COUNT|TRLBAR|CMDWIN|MODIFY), - EX(CMD_cNext, "cNext", ex_cnext, - RANGE|NOTADR|COUNT|TRLBAR|BANG), - EX(CMD_cNfile, "cNfile", ex_cnext, - RANGE|NOTADR|COUNT|TRLBAR|BANG), - EX(CMD_cabbrev, "cabbrev", ex_abbreviate, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_cabclear, "cabclear", ex_abclear, - EXTRA|TRLBAR|CMDWIN), - EX(CMD_caddbuffer, "caddbuffer", ex_cbuffer, - RANGE|NOTADR|WORD1|TRLBAR), - EX(CMD_caddexpr, "caddexpr", ex_cexpr, - NEEDARG|WORD1|NOTRLCOM|TRLBAR), - EX(CMD_caddfile, "caddfile", ex_cfile, - TRLBAR|FILE1), - EX(CMD_call, "call", ex_call, - RANGE|NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN), - EX(CMD_catch, "catch", ex_catch, - EXTRA|SBOXOK|CMDWIN), - EX(CMD_cbuffer, "cbuffer", ex_cbuffer, - BANG|RANGE|NOTADR|WORD1|TRLBAR), - EX(CMD_cc, "cc", ex_cc, - RANGE|NOTADR|COUNT|TRLBAR|BANG), - EX(CMD_cclose, "cclose", ex_cclose, - RANGE|NOTADR|COUNT|TRLBAR), - EX(CMD_cd, "cd", ex_cd, - BANG|FILE1|TRLBAR|CMDWIN), - EX(CMD_center, "center", ex_align, - TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY), - EX(CMD_cexpr, "cexpr", ex_cexpr, - NEEDARG|WORD1|NOTRLCOM|TRLBAR|BANG), - EX(CMD_cfile, "cfile", ex_cfile, - TRLBAR|FILE1|BANG), - EX(CMD_cfirst, "cfirst", ex_cc, - RANGE|NOTADR|COUNT|TRLBAR|BANG), - EX(CMD_cgetfile, "cgetfile", ex_cfile, - TRLBAR|FILE1), - EX(CMD_cgetbuffer, "cgetbuffer", ex_cbuffer, - RANGE|NOTADR|WORD1|TRLBAR), - EX(CMD_cgetexpr, "cgetexpr", ex_cexpr, - NEEDARG|WORD1|NOTRLCOM|TRLBAR), - EX(CMD_chdir, "chdir", ex_cd, - BANG|FILE1|TRLBAR|CMDWIN), - EX(CMD_changes, "changes", ex_changes, - TRLBAR|CMDWIN), - EX(CMD_checkpath, "checkpath", ex_checkpath, - TRLBAR|BANG|CMDWIN), - EX(CMD_checktime, "checktime", ex_checktime, - RANGE|NOTADR|BUFNAME|COUNT|EXTRA|TRLBAR), - EX(CMD_clist, "clist", qf_list, - BANG|EXTRA|TRLBAR|CMDWIN), - EX(CMD_clast, "clast", ex_cc, - RANGE|NOTADR|COUNT|TRLBAR|BANG), - EX(CMD_close, "close", ex_close, - BANG|TRLBAR|CMDWIN), - EX(CMD_cmap, "cmap", ex_map, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_cmapclear, "cmapclear", ex_mapclear, - EXTRA|TRLBAR|CMDWIN), - EX(CMD_cmenu, "cmenu", ex_menu, - RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_cnext, "cnext", ex_cnext, - RANGE|NOTADR|COUNT|TRLBAR|BANG), - EX(CMD_cnewer, "cnewer", qf_age, - RANGE|NOTADR|COUNT|TRLBAR), - EX(CMD_cnfile, "cnfile", ex_cnext, - RANGE|NOTADR|COUNT|TRLBAR|BANG), - EX(CMD_cnoremap, "cnoremap", ex_map, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_cnoreabbrev, "cnoreabbrev", ex_abbreviate, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_cnoremenu, "cnoremenu", ex_menu, - RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_copy, "copy", ex_copymove, - RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN|MODIFY), - EX(CMD_colder, "colder", qf_age, - RANGE|NOTADR|COUNT|TRLBAR), - EX(CMD_colorscheme, "colorscheme", ex_colorscheme, - WORD1|TRLBAR|CMDWIN), - EX(CMD_command, "command", ex_command, - EXTRA|BANG|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_comclear, "comclear", ex_comclear, - TRLBAR|CMDWIN), - EX(CMD_compiler, "compiler", ex_compiler, - BANG|TRLBAR|WORD1|CMDWIN), - EX(CMD_continue, "continue", ex_continue, - TRLBAR|SBOXOK|CMDWIN), - EX(CMD_confirm, "confirm", ex_wrongmodifier, - NEEDARG|EXTRA|NOTRLCOM|CMDWIN), - EX(CMD_copen, "copen", ex_copen, - RANGE|NOTADR|COUNT|TRLBAR), - EX(CMD_cprevious, "cprevious", ex_cnext, - RANGE|NOTADR|COUNT|TRLBAR|BANG), - EX(CMD_cpfile, "cpfile", ex_cnext, - RANGE|NOTADR|COUNT|TRLBAR|BANG), - EX(CMD_cquit, "cquit", ex_cquit, - TRLBAR|BANG), - EX(CMD_crewind, "crewind", ex_cc, - RANGE|NOTADR|COUNT|TRLBAR|BANG), - EX(CMD_cscope, "cscope", do_cscope, - EXTRA|NOTRLCOM|XFILE), - EX(CMD_cstag, "cstag", do_cstag, - BANG|TRLBAR|WORD1), - EX(CMD_cunmap, "cunmap", ex_unmap, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_cunabbrev, "cunabbrev", ex_abbreviate, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_cunmenu, "cunmenu", ex_menu, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_cwindow, "cwindow", ex_cwindow, - RANGE|NOTADR|COUNT|TRLBAR), - EX(CMD_delete, "delete", ex_operators, - RANGE|WHOLEFOLD|REGSTR|COUNT|TRLBAR|CMDWIN|MODIFY), - EX(CMD_delmarks, "delmarks", ex_delmarks, - BANG|EXTRA|TRLBAR|CMDWIN), - EX(CMD_debug, "debug", ex_debug, - NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN), - EX(CMD_debuggreedy, "debuggreedy", ex_debuggreedy, - RANGE|NOTADR|ZEROR|TRLBAR|CMDWIN), - EX(CMD_delcommand, "delcommand", ex_delcommand, - NEEDARG|WORD1|TRLBAR|CMDWIN), - EX(CMD_delfunction, "delfunction", ex_delfunction, - NEEDARG|WORD1|CMDWIN), - EX(CMD_display, "display", ex_display, - EXTRA|NOTRLCOM|TRLBAR|SBOXOK|CMDWIN), - EX(CMD_diffupdate, "diffupdate", ex_diffupdate, - BANG|TRLBAR), - EX(CMD_diffget, "diffget", ex_diffgetput, - RANGE|EXTRA|TRLBAR|MODIFY), - EX(CMD_diffoff, "diffoff", ex_diffoff, - BANG|TRLBAR), - EX(CMD_diffpatch, "diffpatch", ex_diffpatch, - EXTRA|FILE1|TRLBAR|MODIFY), - EX(CMD_diffput, "diffput", ex_diffgetput, - RANGE|EXTRA|TRLBAR), - EX(CMD_diffsplit, "diffsplit", ex_diffsplit, - EXTRA|FILE1|TRLBAR), - EX(CMD_diffthis, "diffthis", ex_diffthis, - TRLBAR), - EX(CMD_digraphs, "digraphs", ex_digraphs, - EXTRA|TRLBAR|CMDWIN), - EX(CMD_djump, "djump", ex_findpat, - BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA), - EX(CMD_dlist, "dlist", ex_findpat, - BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA|CMDWIN), - EX(CMD_doautocmd, "doautocmd", ex_doautocmd, - EXTRA|TRLBAR|CMDWIN), - EX(CMD_doautoall, "doautoall", ex_doautoall, - EXTRA|TRLBAR|CMDWIN), - EX(CMD_drop, "drop", ex_drop, - FILES|EDITCMD|NEEDARG|ARGOPT|TRLBAR), - EX(CMD_dsearch, "dsearch", ex_findpat, - BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA|CMDWIN), - EX(CMD_dsplit, "dsplit", ex_findpat, - BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA), - EX(CMD_edit, "edit", ex_edit, - BANG|FILE1|EDITCMD|ARGOPT|TRLBAR), - EX(CMD_earlier, "earlier", ex_later, - TRLBAR|EXTRA|NOSPC|CMDWIN), - EX(CMD_echo, "echo", ex_echo, - EXTRA|NOTRLCOM|SBOXOK|CMDWIN), - EX(CMD_echoerr, "echoerr", ex_execute, - EXTRA|NOTRLCOM|SBOXOK|CMDWIN), - EX(CMD_echohl, "echohl", ex_echohl, - EXTRA|TRLBAR|SBOXOK|CMDWIN), - EX(CMD_echomsg, "echomsg", ex_execute, - EXTRA|NOTRLCOM|SBOXOK|CMDWIN), - EX(CMD_echon, "echon", ex_echo, - EXTRA|NOTRLCOM|SBOXOK|CMDWIN), - EX(CMD_else, "else", ex_else, - TRLBAR|SBOXOK|CMDWIN), - EX(CMD_elseif, "elseif", ex_else, - EXTRA|NOTRLCOM|SBOXOK|CMDWIN), - EX(CMD_emenu, "emenu", ex_emenu, - NEEDARG|EXTRA|TRLBAR|NOTRLCOM|RANGE|NOTADR|CMDWIN), - EX(CMD_endif, "endif", ex_endif, - TRLBAR|SBOXOK|CMDWIN), - EX(CMD_endfunction, "endfunction", ex_endfunction, - TRLBAR|CMDWIN), - EX(CMD_endfor, "endfor", ex_endwhile, - TRLBAR|SBOXOK|CMDWIN), - EX(CMD_endtry, "endtry", ex_endtry, - TRLBAR|SBOXOK|CMDWIN), - EX(CMD_endwhile, "endwhile", ex_endwhile, - TRLBAR|SBOXOK|CMDWIN), - EX(CMD_enew, "enew", ex_edit, - BANG|TRLBAR), - EX(CMD_ex, "ex", ex_edit, - BANG|FILE1|EDITCMD|ARGOPT|TRLBAR), - EX(CMD_execute, "execute", ex_execute, - EXTRA|NOTRLCOM|SBOXOK|CMDWIN), - EX(CMD_exit, "exit", ex_exit, - RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR|CMDWIN), - EX(CMD_exusage, "exusage", ex_exusage, - TRLBAR), - EX(CMD_file, "file", ex_file, - RANGE|NOTADR|ZEROR|BANG|FILE1|TRLBAR), - EX(CMD_files, "files", buflist_list, - BANG|TRLBAR|CMDWIN), - EX(CMD_filetype, "filetype", ex_filetype, - EXTRA|TRLBAR|CMDWIN), - EX(CMD_find, "find", ex_find, - RANGE|NOTADR|BANG|FILE1|EDITCMD|ARGOPT|TRLBAR), - EX(CMD_finally, "finally", ex_finally, - TRLBAR|SBOXOK|CMDWIN), - EX(CMD_finish, "finish", ex_finish, - TRLBAR|SBOXOK|CMDWIN), - EX(CMD_first, "first", ex_rewind, - EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR), - EX(CMD_fixdel, "fixdel", do_fixdel, - TRLBAR|CMDWIN), - EX(CMD_fold, "fold", ex_fold, - RANGE|WHOLEFOLD|TRLBAR|SBOXOK|CMDWIN), - EX(CMD_foldclose, "foldclose", ex_foldopen, - RANGE|BANG|WHOLEFOLD|TRLBAR|SBOXOK|CMDWIN), - EX(CMD_folddoopen, "folddoopen", ex_folddo, - RANGE|DFLALL|NEEDARG|EXTRA|NOTRLCOM), - EX(CMD_folddoclosed, "folddoclosed", ex_folddo, - RANGE|DFLALL|NEEDARG|EXTRA|NOTRLCOM), - EX(CMD_foldopen, "foldopen", ex_foldopen, - RANGE|BANG|WHOLEFOLD|TRLBAR|SBOXOK|CMDWIN), - EX(CMD_for, "for", ex_while, - EXTRA|NOTRLCOM|SBOXOK|CMDWIN), - EX(CMD_function, "function", ex_function, - EXTRA|BANG|CMDWIN), - EX(CMD_global, "global", ex_global, - RANGE|WHOLEFOLD|BANG|EXTRA|DFLALL|SBOXOK|CMDWIN), - EX(CMD_goto, "goto", ex_goto, - RANGE|NOTADR|COUNT|TRLBAR|SBOXOK|CMDWIN), - EX(CMD_grep, "grep", ex_make, - RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE), - EX(CMD_grepadd, "grepadd", ex_make, - RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE), - EX(CMD_gui, "gui", ex_gui, - BANG|FILES|EDITCMD|ARGOPT|TRLBAR|CMDWIN), - EX(CMD_gvim, "gvim", ex_gui, - BANG|FILES|EDITCMD|ARGOPT|TRLBAR|CMDWIN), - EX(CMD_help, "help", ex_help, - BANG|EXTRA|NOTRLCOM), - EX(CMD_helpfind, "helpfind", ex_helpfind, - EXTRA|NOTRLCOM), - EX(CMD_helpgrep, "helpgrep", ex_helpgrep, - EXTRA|NOTRLCOM|NEEDARG), - EX(CMD_helptags, "helptags", ex_helptags, - NEEDARG|FILES|TRLBAR|CMDWIN), - EX(CMD_hardcopy, "hardcopy", ex_hardcopy, - RANGE|COUNT|EXTRA|TRLBAR|DFLALL|BANG), - EX(CMD_highlight, "highlight", ex_highlight, - BANG|EXTRA|TRLBAR|SBOXOK|CMDWIN), - EX(CMD_hide, "hide", ex_hide, - BANG|EXTRA|NOTRLCOM), - EX(CMD_history, "history", ex_history, - EXTRA|TRLBAR|CMDWIN), - EX(CMD_insert, "insert", ex_append, - BANG|RANGE|TRLBAR|CMDWIN|MODIFY), - EX(CMD_iabbrev, "iabbrev", ex_abbreviate, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_iabclear, "iabclear", ex_abclear, - EXTRA|TRLBAR|CMDWIN), - EX(CMD_if, "if", ex_if, - EXTRA|NOTRLCOM|SBOXOK|CMDWIN), - EX(CMD_ijump, "ijump", ex_findpat, - BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA), - EX(CMD_ilist, "ilist", ex_findpat, - BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA|CMDWIN), - EX(CMD_imap, "imap", ex_map, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_imapclear, "imapclear", ex_mapclear, - EXTRA|TRLBAR|CMDWIN), - EX(CMD_imenu, "imenu", ex_menu, - RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_inoremap, "inoremap", ex_map, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_inoreabbrev, "inoreabbrev", ex_abbreviate, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_inoremenu, "inoremenu", ex_menu, - RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_intro, "intro", ex_intro, - TRLBAR|CMDWIN), - EX(CMD_isearch, "isearch", ex_findpat, - BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA|CMDWIN), - EX(CMD_isplit, "isplit", ex_findpat, - BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA), - EX(CMD_iunmap, "iunmap", ex_unmap, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_iunabbrev, "iunabbrev", ex_abbreviate, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_iunmenu, "iunmenu", ex_menu, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_join, "join", ex_join, - BANG|RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN|MODIFY), - EX(CMD_jumps, "jumps", ex_jumps, - TRLBAR|CMDWIN), - EX(CMD_k, "k", ex_mark, - RANGE|WORD1|TRLBAR|SBOXOK|CMDWIN), - EX(CMD_keepmarks, "keepmarks", ex_wrongmodifier, - NEEDARG|EXTRA|NOTRLCOM), - EX(CMD_keepjumps, "keepjumps", ex_wrongmodifier, - NEEDARG|EXTRA|NOTRLCOM), - EX(CMD_keeppatterns, "keeppatterns", ex_wrongmodifier, - NEEDARG|EXTRA|NOTRLCOM), - EX(CMD_keepalt, "keepalt", ex_wrongmodifier, - NEEDARG|EXTRA|NOTRLCOM), - EX(CMD_list, "list", ex_print, - RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN), - EX(CMD_lNext, "lNext", ex_cnext, - RANGE|NOTADR|COUNT|TRLBAR|BANG), - EX(CMD_lNfile, "lNfile", ex_cnext, - RANGE|NOTADR|COUNT|TRLBAR|BANG), - EX(CMD_last, "last", ex_last, - EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR), - EX(CMD_language, "language", ex_language, - EXTRA|TRLBAR|CMDWIN), - EX(CMD_laddexpr, "laddexpr", ex_cexpr, - NEEDARG|WORD1|NOTRLCOM|TRLBAR), - EX(CMD_laddbuffer, "laddbuffer", ex_cbuffer, - RANGE|NOTADR|WORD1|TRLBAR), - EX(CMD_laddfile, "laddfile", ex_cfile, - TRLBAR|FILE1), - EX(CMD_later, "later", ex_later, - TRLBAR|EXTRA|NOSPC|CMDWIN), - EX(CMD_lbuffer, "lbuffer", ex_cbuffer, - BANG|RANGE|NOTADR|WORD1|TRLBAR), - EX(CMD_lcd, "lcd", ex_cd, - BANG|FILE1|TRLBAR|CMDWIN), - EX(CMD_lchdir, "lchdir", ex_cd, - BANG|FILE1|TRLBAR|CMDWIN), - EX(CMD_lclose, "lclose", ex_cclose, - RANGE|NOTADR|COUNT|TRLBAR), - EX(CMD_lcscope, "lcscope", do_cscope, - EXTRA|NOTRLCOM|XFILE), - EX(CMD_left, "left", ex_align, - TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY), - EX(CMD_leftabove, "leftabove", ex_wrongmodifier, - NEEDARG|EXTRA|NOTRLCOM), - EX(CMD_let, "let", ex_let, - EXTRA|NOTRLCOM|SBOXOK|CMDWIN), - EX(CMD_lexpr, "lexpr", ex_cexpr, - NEEDARG|WORD1|NOTRLCOM|TRLBAR|BANG), - EX(CMD_lfile, "lfile", ex_cfile, - TRLBAR|FILE1|BANG), - EX(CMD_lfirst, "lfirst", ex_cc, - RANGE|NOTADR|COUNT|TRLBAR|BANG), - EX(CMD_lgetfile, "lgetfile", ex_cfile, - TRLBAR|FILE1), - EX(CMD_lgetbuffer, "lgetbuffer", ex_cbuffer, - RANGE|NOTADR|WORD1|TRLBAR), - EX(CMD_lgetexpr, "lgetexpr", ex_cexpr, - NEEDARG|WORD1|NOTRLCOM|TRLBAR), - EX(CMD_lgrep, "lgrep", ex_make, - RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE), - EX(CMD_lgrepadd, "lgrepadd", ex_make, - RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE), - EX(CMD_lhelpgrep, "lhelpgrep", ex_helpgrep, - EXTRA|NOTRLCOM|NEEDARG), - EX(CMD_ll, "ll", ex_cc, - RANGE|NOTADR|COUNT|TRLBAR|BANG), - EX(CMD_llast, "llast", ex_cc, - RANGE|NOTADR|COUNT|TRLBAR|BANG), - EX(CMD_llist, "llist", qf_list, - BANG|EXTRA|TRLBAR|CMDWIN), - EX(CMD_lmap, "lmap", ex_map, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_lmapclear, "lmapclear", ex_mapclear, - EXTRA|TRLBAR|CMDWIN), - EX(CMD_lmake, "lmake", ex_make, - BANG|EXTRA|NOTRLCOM|TRLBAR|XFILE), - EX(CMD_lnoremap, "lnoremap", ex_map, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_lnext, "lnext", ex_cnext, - RANGE|NOTADR|COUNT|TRLBAR|BANG), - EX(CMD_lnewer, "lnewer", qf_age, - RANGE|NOTADR|COUNT|TRLBAR), - EX(CMD_lnfile, "lnfile", ex_cnext, - RANGE|NOTADR|COUNT|TRLBAR|BANG), - EX(CMD_loadview, "loadview", ex_loadview, - FILE1|TRLBAR), - EX(CMD_loadkeymap, "loadkeymap", ex_loadkeymap, - CMDWIN), - EX(CMD_lockmarks, "lockmarks", ex_wrongmodifier, - NEEDARG|EXTRA|NOTRLCOM), - EX(CMD_lockvar, "lockvar", ex_lockvar, - BANG|EXTRA|NEEDARG|SBOXOK|CMDWIN), - EX(CMD_lolder, "lolder", qf_age, - RANGE|NOTADR|COUNT|TRLBAR), - EX(CMD_lopen, "lopen", ex_copen, - RANGE|NOTADR|COUNT|TRLBAR), - EX(CMD_lprevious, "lprevious", ex_cnext, - RANGE|NOTADR|COUNT|TRLBAR|BANG), - EX(CMD_lpfile, "lpfile", ex_cnext, - RANGE|NOTADR|COUNT|TRLBAR|BANG), - EX(CMD_lrewind, "lrewind", ex_cc, - RANGE|NOTADR|COUNT|TRLBAR|BANG), - EX(CMD_ltag, "ltag", ex_tag, - NOTADR|TRLBAR|BANG|WORD1), - EX(CMD_lua, "lua", ex_lua, - RANGE|EXTRA|NEEDARG|CMDWIN), - EX(CMD_luado, "luado", ex_luado, - RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN), - EX(CMD_luafile, "luafile", ex_luafile, - RANGE|FILE1|NEEDARG|CMDWIN), - EX(CMD_lunmap, "lunmap", ex_unmap, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_lvimgrep, "lvimgrep", ex_vimgrep, - RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE), - EX(CMD_lvimgrepadd, "lvimgrepadd", ex_vimgrep, - RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE), - EX(CMD_lwindow, "lwindow", ex_cwindow, - RANGE|NOTADR|COUNT|TRLBAR), - EX(CMD_ls, "ls", buflist_list, - BANG|TRLBAR|CMDWIN), - EX(CMD_move, "move", ex_copymove, - RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN|MODIFY), - EX(CMD_mark, "mark", ex_mark, - RANGE|WORD1|TRLBAR|SBOXOK|CMDWIN), - EX(CMD_make, "make", ex_make, - BANG|EXTRA|NOTRLCOM|TRLBAR|XFILE), - EX(CMD_map, "map", ex_map, - BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_mapclear, "mapclear", ex_mapclear, - EXTRA|BANG|TRLBAR|CMDWIN), - EX(CMD_marks, "marks", do_marks, - EXTRA|TRLBAR|CMDWIN), - EX(CMD_match, "match", ex_match, - RANGE|NOTADR|EXTRA|CMDWIN), - EX(CMD_menu, "menu", ex_menu, - RANGE|NOTADR|ZEROR|BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_menutranslate, "menutranslate", ex_menutranslate, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_messages, "messages", ex_messages, - TRLBAR|CMDWIN), - EX(CMD_mkexrc, "mkexrc", ex_mkrc, - BANG|FILE1|TRLBAR|CMDWIN), - EX(CMD_mksession, "mksession", ex_mkrc, - BANG|FILE1|TRLBAR), - EX(CMD_mkspell, "mkspell", ex_mkspell, - BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE), - EX(CMD_mkvimrc, "mkvimrc", ex_mkrc, - BANG|FILE1|TRLBAR|CMDWIN), - EX(CMD_mkview, "mkview", ex_mkrc, - BANG|FILE1|TRLBAR), - EX(CMD_mode, "mode", ex_mode, - WORD1|TRLBAR|CMDWIN), - EX(CMD_mzscheme, "mzscheme", ex_mzscheme, - RANGE|EXTRA|DFLALL|NEEDARG|CMDWIN|SBOXOK), - EX(CMD_mzfile, "mzfile", ex_mzfile, - RANGE|FILE1|NEEDARG|CMDWIN), - EX(CMD_next, "next", ex_next, - RANGE|NOTADR|BANG|FILES|EDITCMD|ARGOPT|TRLBAR), - EX(CMD_nbkey, "nbkey", ex_nbkey, - EXTRA|NOTADR|NEEDARG), - EX(CMD_nbclose, "nbclose", ex_nbclose, - TRLBAR|CMDWIN), - EX(CMD_nbstart, "nbstart", ex_nbstart, - WORD1|TRLBAR|CMDWIN), - EX(CMD_new, "new", ex_splitview, - BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR), - EX(CMD_nmap, "nmap", ex_map, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_nmapclear, "nmapclear", ex_mapclear, - EXTRA|TRLBAR|CMDWIN), - EX(CMD_nmenu, "nmenu", ex_menu, - RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_nnoremap, "nnoremap", ex_map, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_nnoremenu, "nnoremenu", ex_menu, - RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_noremap, "noremap", ex_map, - BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_noautocmd, "noautocmd", ex_wrongmodifier, - NEEDARG|EXTRA|NOTRLCOM), - EX(CMD_nohlsearch, "nohlsearch", ex_nohlsearch, - TRLBAR|SBOXOK|CMDWIN), - EX(CMD_noreabbrev, "noreabbrev", ex_abbreviate, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_noremenu, "noremenu", ex_menu, - RANGE|NOTADR|ZEROR|BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_normal, "normal", ex_normal, - RANGE|BANG|EXTRA|NEEDARG|NOTRLCOM|USECTRLV|SBOXOK|CMDWIN), - EX(CMD_number, "number", ex_print, - RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN), - EX(CMD_nunmap, "nunmap", ex_unmap, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_nunmenu, "nunmenu", ex_menu, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_open, "open", ex_open, - RANGE|BANG|EXTRA), - EX(CMD_oldfiles, "oldfiles", ex_oldfiles, - BANG|TRLBAR|SBOXOK|CMDWIN), - EX(CMD_omap, "omap", ex_map, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_omapclear, "omapclear", ex_mapclear, - EXTRA|TRLBAR|CMDWIN), - EX(CMD_omenu, "omenu", ex_menu, - RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_only, "only", ex_only, - BANG|TRLBAR), - EX(CMD_onoremap, "onoremap", ex_map, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_onoremenu, "onoremenu", ex_menu, - RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_options, "options", ex_options, - TRLBAR), - EX(CMD_ounmap, "ounmap", ex_unmap, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_ounmenu, "ounmenu", ex_menu, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_ownsyntax, "ownsyntax", ex_ownsyntax, - EXTRA|NOTRLCOM|SBOXOK|CMDWIN), - EX(CMD_print, "print", ex_print, - RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN|SBOXOK), - EX(CMD_pclose, "pclose", ex_pclose, - BANG|TRLBAR), - EX(CMD_perl, "perl", ex_perl, - RANGE|EXTRA|DFLALL|NEEDARG|SBOXOK|CMDWIN), - EX(CMD_perldo, "perldo", ex_perldo, - RANGE|EXTRA|DFLALL|NEEDARG|CMDWIN), - EX(CMD_pedit, "pedit", ex_pedit, - BANG|FILE1|EDITCMD|ARGOPT|TRLBAR), - EX(CMD_pop, "pop", ex_tag, - RANGE|NOTADR|BANG|COUNT|TRLBAR|ZEROR), - EX(CMD_popup, "popup", ex_popup, - NEEDARG|EXTRA|BANG|TRLBAR|NOTRLCOM|CMDWIN), - EX(CMD_ppop, "ppop", ex_ptag, - RANGE|NOTADR|BANG|COUNT|TRLBAR|ZEROR), - EX(CMD_preserve, "preserve", ex_preserve, - TRLBAR), - EX(CMD_previous, "previous", ex_previous, - EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR), - EX(CMD_promptfind, "promptfind", gui_mch_find_dialog, - EXTRA|NOTRLCOM|CMDWIN), - EX(CMD_promptrepl, "promptrepl", gui_mch_replace_dialog, - EXTRA|NOTRLCOM|CMDWIN), - EX(CMD_profile, "profile", ex_profile, - BANG|EXTRA|TRLBAR|CMDWIN), - EX(CMD_profdel, "profdel", ex_breakdel, - EXTRA|TRLBAR|CMDWIN), - EX(CMD_psearch, "psearch", ex_psearch, - BANG|RANGE|WHOLEFOLD|DFLALL|EXTRA), - EX(CMD_ptag, "ptag", ex_ptag, - RANGE|NOTADR|BANG|WORD1|TRLBAR|ZEROR), - EX(CMD_ptNext, "ptNext", ex_ptag, - RANGE|NOTADR|BANG|TRLBAR|ZEROR), - EX(CMD_ptfirst, "ptfirst", ex_ptag, - RANGE|NOTADR|BANG|TRLBAR|ZEROR), - EX(CMD_ptjump, "ptjump", ex_ptag, - BANG|TRLBAR|WORD1), - EX(CMD_ptlast, "ptlast", ex_ptag, - BANG|TRLBAR), - EX(CMD_ptnext, "ptnext", ex_ptag, - RANGE|NOTADR|BANG|TRLBAR|ZEROR), - EX(CMD_ptprevious, "ptprevious", ex_ptag, - RANGE|NOTADR|BANG|TRLBAR|ZEROR), - EX(CMD_ptrewind, "ptrewind", ex_ptag, - RANGE|NOTADR|BANG|TRLBAR|ZEROR), - EX(CMD_ptselect, "ptselect", ex_ptag, - BANG|TRLBAR|WORD1), - EX(CMD_put, "put", ex_put, - RANGE|WHOLEFOLD|BANG|REGSTR|TRLBAR|ZEROR|CMDWIN|MODIFY), - EX(CMD_pwd, "pwd", ex_pwd, - TRLBAR|CMDWIN), - EX(CMD_python, "python", ex_python, - RANGE|EXTRA|NEEDARG|CMDWIN), - EX(CMD_pydo, "pydo", ex_pydo, - RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN), - EX(CMD_pyfile, "pyfile", ex_pyfile, - RANGE|FILE1|NEEDARG|CMDWIN), - EX(CMD_py3, "py3", ex_py3, - RANGE|EXTRA|NEEDARG|CMDWIN), - EX(CMD_py3do, "py3do", ex_py3do, - RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN), - EX(CMD_python3, "python3", ex_py3, - RANGE|EXTRA|NEEDARG|CMDWIN), - EX(CMD_py3file, "py3file", ex_py3file, - RANGE|FILE1|NEEDARG|CMDWIN), - EX(CMD_quit, "quit", ex_quit, - BANG|TRLBAR|CMDWIN), - EX(CMD_quitall, "quitall", ex_quit_all, - BANG|TRLBAR), - EX(CMD_qall, "qall", ex_quit_all, - BANG|TRLBAR|CMDWIN), - EX(CMD_read, "read", ex_read, - BANG|RANGE|WHOLEFOLD|FILE1|ARGOPT|TRLBAR|ZEROR|CMDWIN|MODIFY), - EX(CMD_recover, "recover", ex_recover, - BANG|FILE1|TRLBAR), - EX(CMD_redo, "redo", ex_redo, - TRLBAR|CMDWIN), - EX(CMD_redir, "redir", ex_redir, - BANG|FILES|TRLBAR|CMDWIN), - EX(CMD_redraw, "redraw", ex_redraw, - BANG|TRLBAR|CMDWIN), - EX(CMD_redrawstatus, "redrawstatus", ex_redrawstatus, - BANG|TRLBAR|CMDWIN), - EX(CMD_registers, "registers", ex_display, - EXTRA|NOTRLCOM|TRLBAR|CMDWIN), - EX(CMD_resize, "resize", ex_resize, - RANGE|NOTADR|TRLBAR|WORD1), - EX(CMD_retab, "retab", ex_retab, - TRLBAR|RANGE|WHOLEFOLD|DFLALL|BANG|WORD1|CMDWIN|MODIFY), - EX(CMD_return, "return", ex_return, - EXTRA|NOTRLCOM|SBOXOK|CMDWIN), - EX(CMD_rewind, "rewind", ex_rewind, - EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR), - EX(CMD_right, "right", ex_align, - TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY), - EX(CMD_rightbelow, "rightbelow", ex_wrongmodifier, - NEEDARG|EXTRA|NOTRLCOM), - EX(CMD_runtime, "runtime", ex_runtime, - BANG|NEEDARG|FILES|TRLBAR|SBOXOK|CMDWIN), - EX(CMD_ruby, "ruby", ex_ruby, - RANGE|EXTRA|NEEDARG|CMDWIN), - EX(CMD_rubydo, "rubydo", ex_rubydo, - RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN), - EX(CMD_rubyfile, "rubyfile", ex_rubyfile, - RANGE|FILE1|NEEDARG|CMDWIN), - EX(CMD_rundo, "rundo", ex_rundo, - NEEDARG|FILE1), - EX(CMD_rviminfo, "rviminfo", ex_viminfo, - BANG|FILE1|TRLBAR|CMDWIN), - EX(CMD_substitute, "substitute", do_sub, - RANGE|WHOLEFOLD|EXTRA|CMDWIN), - EX(CMD_sNext, "sNext", ex_previous, - EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR), - EX(CMD_sargument, "sargument", ex_argument, - BANG|RANGE|NOTADR|COUNT|EXTRA|EDITCMD|ARGOPT|TRLBAR), - EX(CMD_sall, "sall", ex_all, - BANG|RANGE|NOTADR|COUNT|TRLBAR), - EX(CMD_sandbox, "sandbox", ex_wrongmodifier, - NEEDARG|EXTRA|NOTRLCOM), - EX(CMD_saveas, "saveas", ex_write, - BANG|DFLALL|FILE1|ARGOPT|CMDWIN|TRLBAR), - EX(CMD_sbuffer, "sbuffer", ex_buffer, - BANG|RANGE|NOTADR|BUFNAME|BUFUNL|COUNT|EXTRA|TRLBAR), - EX(CMD_sbNext, "sbNext", ex_bprevious, - RANGE|NOTADR|COUNT|TRLBAR), - EX(CMD_sball, "sball", ex_buffer_all, - RANGE|NOTADR|COUNT|TRLBAR), - EX(CMD_sbfirst, "sbfirst", ex_brewind, - TRLBAR), - EX(CMD_sblast, "sblast", ex_blast, - TRLBAR), - EX(CMD_sbmodified, "sbmodified", ex_bmodified, - RANGE|NOTADR|COUNT|TRLBAR), - EX(CMD_sbnext, "sbnext", ex_bnext, - RANGE|NOTADR|COUNT|TRLBAR), - EX(CMD_sbprevious, "sbprevious", ex_bprevious, - RANGE|NOTADR|COUNT|TRLBAR), - EX(CMD_sbrewind, "sbrewind", ex_brewind, - TRLBAR), - EX(CMD_scriptnames, "scriptnames", ex_scriptnames, - TRLBAR|CMDWIN), - EX(CMD_scriptencoding, "scriptencoding", ex_scriptencoding, - WORD1|TRLBAR|CMDWIN), - EX(CMD_scscope, "scscope", do_scscope, - EXTRA|NOTRLCOM), - EX(CMD_set, "set", ex_set, - TRLBAR|EXTRA|CMDWIN|SBOXOK), - EX(CMD_setfiletype, "setfiletype", ex_setfiletype, - TRLBAR|EXTRA|NEEDARG|CMDWIN), - EX(CMD_setglobal, "setglobal", ex_set, - TRLBAR|EXTRA|CMDWIN|SBOXOK), - EX(CMD_setlocal, "setlocal", ex_set, - TRLBAR|EXTRA|CMDWIN|SBOXOK), - EX(CMD_sfind, "sfind", ex_splitview, - BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR), - EX(CMD_sfirst, "sfirst", ex_rewind, - EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR), - EX(CMD_shell, "shell", ex_shell, - TRLBAR|CMDWIN), - EX(CMD_simalt, "simalt", ex_simalt, - NEEDARG|WORD1|TRLBAR|CMDWIN), - EX(CMD_sign, "sign", ex_sign, - NEEDARG|RANGE|NOTADR|EXTRA|CMDWIN), - EX(CMD_silent, "silent", ex_wrongmodifier, - NEEDARG|EXTRA|BANG|NOTRLCOM|SBOXOK|CMDWIN), - EX(CMD_sleep, "sleep", ex_sleep, - RANGE|NOTADR|COUNT|EXTRA|TRLBAR|CMDWIN), - EX(CMD_slast, "slast", ex_last, - EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR), - EX(CMD_smagic, "smagic", ex_submagic, - RANGE|WHOLEFOLD|EXTRA|CMDWIN), - EX(CMD_smap, "smap", ex_map, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_smapclear, "smapclear", ex_mapclear, - EXTRA|TRLBAR|CMDWIN), - EX(CMD_smenu, "smenu", ex_menu, - RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_snext, "snext", ex_next, - RANGE|NOTADR|BANG|FILES|EDITCMD|ARGOPT|TRLBAR), - EX(CMD_sniff, "sniff", ex_sniff, - EXTRA|TRLBAR), - EX(CMD_snomagic, "snomagic", ex_submagic, - RANGE|WHOLEFOLD|EXTRA|CMDWIN), - EX(CMD_snoremap, "snoremap", ex_map, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_snoremenu, "snoremenu", ex_menu, - RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_source, "source", ex_source, - BANG|FILE1|TRLBAR|SBOXOK|CMDWIN), - EX(CMD_sort, "sort", ex_sort, - RANGE|DFLALL|WHOLEFOLD|BANG|EXTRA|NOTRLCOM|MODIFY), - EX(CMD_split, "split", ex_splitview, - BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR), - EX(CMD_spellgood, "spellgood", ex_spell, - BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR), - EX(CMD_spelldump, "spelldump", ex_spelldump, - BANG|TRLBAR), - EX(CMD_spellinfo, "spellinfo", ex_spellinfo, - TRLBAR), - EX(CMD_spellrepall, "spellrepall", ex_spellrepall, - TRLBAR), - EX(CMD_spellundo, "spellundo", ex_spell, - BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR), - EX(CMD_spellwrong, "spellwrong", ex_spell, - BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR), - EX(CMD_sprevious, "sprevious", ex_previous, - EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR), - EX(CMD_srewind, "srewind", ex_rewind, - EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR), - EX(CMD_stop, "stop", ex_stop, - TRLBAR|BANG|CMDWIN), - EX(CMD_stag, "stag", ex_stag, - RANGE|NOTADR|BANG|WORD1|TRLBAR|ZEROR), - EX(CMD_startinsert, "startinsert", ex_startinsert, - BANG|TRLBAR|CMDWIN), - EX(CMD_startgreplace, "startgreplace", ex_startinsert, - BANG|TRLBAR|CMDWIN), - EX(CMD_startreplace, "startreplace", ex_startinsert, - BANG|TRLBAR|CMDWIN), - EX(CMD_stopinsert, "stopinsert", ex_stopinsert, - BANG|TRLBAR|CMDWIN), - EX(CMD_stjump, "stjump", ex_stag, - BANG|TRLBAR|WORD1), - EX(CMD_stselect, "stselect", ex_stag, - BANG|TRLBAR|WORD1), - EX(CMD_sunhide, "sunhide", ex_buffer_all, - RANGE|NOTADR|COUNT|TRLBAR), - EX(CMD_sunmap, "sunmap", ex_unmap, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_sunmenu, "sunmenu", ex_menu, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_suspend, "suspend", ex_stop, - TRLBAR|BANG|CMDWIN), - EX(CMD_sview, "sview", ex_splitview, - BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR), - EX(CMD_swapname, "swapname", ex_swapname, - TRLBAR|CMDWIN), - EX(CMD_syntax, "syntax", ex_syntax, - EXTRA|NOTRLCOM|CMDWIN), - EX(CMD_syntime, "syntime", ex_syntime, - NEEDARG|WORD1|TRLBAR|CMDWIN), - EX(CMD_syncbind, "syncbind", ex_syncbind, - TRLBAR), - EX(CMD_t, "t", ex_copymove, - RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN|MODIFY), - EX(CMD_tNext, "tNext", ex_tag, - RANGE|NOTADR|BANG|TRLBAR|ZEROR), - EX(CMD_tag, "tag", ex_tag, - RANGE|NOTADR|BANG|WORD1|TRLBAR|ZEROR), - EX(CMD_tags, "tags", do_tags, - TRLBAR|CMDWIN), - EX(CMD_tab, "tab", ex_wrongmodifier, - NEEDARG|EXTRA|NOTRLCOM), - EX(CMD_tabclose, "tabclose", ex_tabclose, - RANGE|NOTADR|COUNT|BANG|TRLBAR|CMDWIN), - EX(CMD_tabdo, "tabdo", ex_listdo, - NEEDARG|EXTRA|NOTRLCOM), - EX(CMD_tabedit, "tabedit", ex_splitview, - BANG|FILE1|RANGE|NOTADR|ZEROR|EDITCMD|ARGOPT|TRLBAR), - EX(CMD_tabfind, "tabfind", ex_splitview, - BANG|FILE1|RANGE|NOTADR|ZEROR|EDITCMD|ARGOPT|NEEDARG|TRLBAR), - EX(CMD_tabfirst, "tabfirst", ex_tabnext, - TRLBAR), - EX(CMD_tabmove, "tabmove", ex_tabmove, - RANGE|NOTADR|ZEROR|EXTRA|NOSPC|TRLBAR), - EX(CMD_tablast, "tablast", ex_tabnext, - TRLBAR), - EX(CMD_tabnext, "tabnext", ex_tabnext, - RANGE|NOTADR|COUNT|TRLBAR), - EX(CMD_tabnew, "tabnew", ex_splitview, - BANG|FILE1|RANGE|NOTADR|ZEROR|EDITCMD|ARGOPT|TRLBAR), - EX(CMD_tabonly, "tabonly", ex_tabonly, - BANG|TRLBAR|CMDWIN), - EX(CMD_tabprevious, "tabprevious", ex_tabnext, - RANGE|NOTADR|COUNT|TRLBAR), - EX(CMD_tabNext, "tabNext", ex_tabnext, - RANGE|NOTADR|COUNT|TRLBAR), - EX(CMD_tabrewind, "tabrewind", ex_tabnext, - TRLBAR), - EX(CMD_tabs, "tabs", ex_tabs, - TRLBAR|CMDWIN), - EX(CMD_tcl, "tcl", ex_tcl, - RANGE|EXTRA|NEEDARG|CMDWIN), - EX(CMD_tcldo, "tcldo", ex_tcldo, - RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN), - EX(CMD_tclfile, "tclfile", ex_tclfile, - RANGE|FILE1|NEEDARG|CMDWIN), - EX(CMD_tearoff, "tearoff", ex_tearoff, - NEEDARG|EXTRA|TRLBAR|NOTRLCOM|CMDWIN), - EX(CMD_tfirst, "tfirst", ex_tag, - RANGE|NOTADR|BANG|TRLBAR|ZEROR), - EX(CMD_throw, "throw", ex_throw, - EXTRA|NEEDARG|SBOXOK|CMDWIN), - EX(CMD_tjump, "tjump", ex_tag, - BANG|TRLBAR|WORD1), - EX(CMD_tlast, "tlast", ex_tag, - BANG|TRLBAR), - EX(CMD_tmenu, "tmenu", ex_menu, - RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_tnext, "tnext", ex_tag, - RANGE|NOTADR|BANG|TRLBAR|ZEROR), - EX(CMD_topleft, "topleft", ex_wrongmodifier, - NEEDARG|EXTRA|NOTRLCOM), - EX(CMD_tprevious, "tprevious", ex_tag, - RANGE|NOTADR|BANG|TRLBAR|ZEROR), - EX(CMD_trewind, "trewind", ex_tag, - RANGE|NOTADR|BANG|TRLBAR|ZEROR), - EX(CMD_try, "try", ex_try, - TRLBAR|SBOXOK|CMDWIN), - EX(CMD_tselect, "tselect", ex_tag, - BANG|TRLBAR|WORD1), - EX(CMD_tunmenu, "tunmenu", ex_menu, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_undo, "undo", ex_undo, - RANGE|NOTADR|COUNT|ZEROR|TRLBAR|CMDWIN), - EX(CMD_undojoin, "undojoin", ex_undojoin, - TRLBAR|CMDWIN), - EX(CMD_undolist, "undolist", ex_undolist, - TRLBAR|CMDWIN), - EX(CMD_unabbreviate, "unabbreviate", ex_abbreviate, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_unhide, "unhide", ex_buffer_all, - RANGE|NOTADR|COUNT|TRLBAR), - EX(CMD_unlet, "unlet", ex_unlet, - BANG|EXTRA|NEEDARG|SBOXOK|CMDWIN), - EX(CMD_unlockvar, "unlockvar", ex_lockvar, - BANG|EXTRA|NEEDARG|SBOXOK|CMDWIN), - EX(CMD_unmap, "unmap", ex_unmap, - BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_unmenu, "unmenu", ex_menu, - BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_unsilent, "unsilent", ex_wrongmodifier, - NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN), - EX(CMD_update, "update", ex_update, - RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR), - EX(CMD_vglobal, "vglobal", ex_global, - RANGE|WHOLEFOLD|EXTRA|DFLALL|CMDWIN), - EX(CMD_version, "version", ex_version, - EXTRA|TRLBAR|CMDWIN), - EX(CMD_verbose, "verbose", ex_wrongmodifier, - NEEDARG|RANGE|NOTADR|EXTRA|NOTRLCOM|SBOXOK|CMDWIN), - EX(CMD_vertical, "vertical", ex_wrongmodifier, - NEEDARG|EXTRA|NOTRLCOM), - EX(CMD_visual, "visual", ex_edit, - BANG|FILE1|EDITCMD|ARGOPT|TRLBAR), - EX(CMD_view, "view", ex_edit, - BANG|FILE1|EDITCMD|ARGOPT|TRLBAR), - EX(CMD_vimgrep, "vimgrep", ex_vimgrep, - RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE), - EX(CMD_vimgrepadd, "vimgrepadd", ex_vimgrep, - RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE), - EX(CMD_viusage, "viusage", ex_viusage, - TRLBAR), - EX(CMD_vmap, "vmap", ex_map, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_vmapclear, "vmapclear", ex_mapclear, - EXTRA|TRLBAR|CMDWIN), - EX(CMD_vmenu, "vmenu", ex_menu, - RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_vnoremap, "vnoremap", ex_map, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_vnew, "vnew", ex_splitview, - BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR), - EX(CMD_vnoremenu, "vnoremenu", ex_menu, - RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_vsplit, "vsplit", ex_splitview, - BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR), - EX(CMD_vunmap, "vunmap", ex_unmap, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_vunmenu, "vunmenu", ex_menu, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_write, "write", ex_write, - RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR|CMDWIN), - EX(CMD_wNext, "wNext", ex_wnext, - RANGE|WHOLEFOLD|NOTADR|BANG|FILE1|ARGOPT|TRLBAR), - EX(CMD_wall, "wall", do_wqall, - BANG|TRLBAR|CMDWIN), - EX(CMD_while, "while", ex_while, - EXTRA|NOTRLCOM|SBOXOK|CMDWIN), - EX(CMD_winsize, "winsize", ex_winsize, - EXTRA|NEEDARG|TRLBAR), - EX(CMD_wincmd, "wincmd", ex_wincmd, - NEEDARG|WORD1|RANGE|NOTADR), - EX(CMD_windo, "windo", ex_listdo, - BANG|NEEDARG|EXTRA|NOTRLCOM), - EX(CMD_winpos, "winpos", ex_winpos, - EXTRA|TRLBAR|CMDWIN), - EX(CMD_wnext, "wnext", ex_wnext, - RANGE|NOTADR|BANG|FILE1|ARGOPT|TRLBAR), - EX(CMD_wprevious, "wprevious", ex_wnext, - RANGE|NOTADR|BANG|FILE1|ARGOPT|TRLBAR), - EX(CMD_wq, "wq", ex_exit, - RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR), - EX(CMD_wqall, "wqall", do_wqall, - BANG|FILE1|ARGOPT|DFLALL|TRLBAR), - EX(CMD_wsverb, "wsverb", ex_wsverb, - EXTRA|NOTADR|NEEDARG), - EX(CMD_wundo, "wundo", ex_wundo, - BANG|NEEDARG|FILE1), - EX(CMD_wviminfo, "wviminfo", ex_viminfo, - BANG|FILE1|TRLBAR|CMDWIN), - EX(CMD_xit, "xit", ex_exit, - RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR|CMDWIN), - EX(CMD_xall, "xall", do_wqall, - BANG|TRLBAR), - EX(CMD_xmap, "xmap", ex_map, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_xmapclear, "xmapclear", ex_mapclear, - EXTRA|TRLBAR|CMDWIN), - EX(CMD_xmenu, "xmenu", ex_menu, - RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_xnoremap, "xnoremap", ex_map, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_xnoremenu, "xnoremenu", ex_menu, - RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_xunmap, "xunmap", ex_unmap, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_xunmenu, "xunmenu", ex_menu, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_yank, "yank", ex_operators, - RANGE|WHOLEFOLD|REGSTR|COUNT|TRLBAR|CMDWIN), - EX(CMD_z, "z", ex_z, - RANGE|WHOLEFOLD|EXTRA|EXFLAGS|TRLBAR|CMDWIN), - - /* commands that don't start with a lowercase letter */ - EX(CMD_bang, "!", ex_bang, - RANGE|WHOLEFOLD|BANG|FILES|CMDWIN), - EX(CMD_pound, "#", ex_print, - RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN), - EX(CMD_and, "&", do_sub, - RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY), - EX(CMD_star, "*", ex_at, - RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN), - EX(CMD_lshift, "<", ex_operators, - RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN|MODIFY), - EX(CMD_equal, "=", ex_equal, - RANGE|TRLBAR|DFLALL|EXFLAGS|CMDWIN), - EX(CMD_rshift, ">", ex_operators, - RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN|MODIFY), - EX(CMD_at, "@", ex_at, - RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN), - EX(CMD_Next, "Next", ex_previous, - EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR), - EX(CMD_Print, "Print", ex_print, - RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN), - EX(CMD_X, "X", ex_X, - TRLBAR), - EX(CMD_tilde, "~", do_sub, - RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY), - -#ifndef DO_DECLARE_EXCMD - CMD_SIZE, /* MUST be after all real commands! */ - CMD_USER = -1, /* User-defined command */ - CMD_USER_BUF = -2 /* User-defined command local to buffer */ -#endif -}; - -#define USER_CMDIDX(idx) ((int)(idx) < 0) - -#ifndef DO_DECLARE_EXCMD -typedef enum CMD_index cmdidx_T; - -/* - * Arguments used for Ex commands. - */ -struct exarg { - char_u *arg; /* argument of the command */ - char_u *nextcmd; /* next command (NULL if none) */ - char_u *cmd; /* the name of the command (except for :make) */ - char_u **cmdlinep; /* pointer to pointer of allocated cmdline */ - cmdidx_T cmdidx; /* the index for the command */ - long argt; /* flags for the command */ - int skip; /* don't execute the command, only parse it */ - int forceit; /* TRUE if ! present */ - int addr_count; /* the number of addresses given */ - linenr_T line1; /* the first line number */ - linenr_T line2; /* the second line number or count */ - int flags; /* extra flags after count: EXFLAG_ */ - char_u *do_ecmd_cmd; /* +command arg to be used in edited file */ - linenr_T do_ecmd_lnum; /* the line number in an edited file */ - int append; /* TRUE with ":w >>file" command */ - int usefilter; /* TRUE with ":w !command" and ":r!command" */ - int amount; /* number of '>' or '<' for shift command */ - int regname; /* register name (NUL if none) */ - int force_bin; /* 0, FORCE_BIN or FORCE_NOBIN */ - int read_edit; /* ++edit argument */ - int force_ff; /* ++ff= argument (index in cmd[]) */ - int force_enc; /* ++enc= argument (index in cmd[]) */ - 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)); - void *cookie; /* argument for getline() */ - struct condstack *cstack; /* condition stack for ":if" etc. */ -}; - -#define FORCE_BIN 1 /* ":edit ++bin file" */ -#define FORCE_NOBIN 2 /* ":edit ++nobin file" */ - -/* Values for "flags" */ -#define EXFLAG_LIST 0x01 /* 'l': list */ -#define EXFLAG_NR 0x02 /* '#': number */ -#define EXFLAG_PRINT 0x04 /* 'p': print */ - -#endif +#ifndef NEOVIM_EX_CMDS_H +#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 * + 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, + linenr_T lnum, + int forceit)); +int do_ecmd __ARGS((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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_EX_CMDS_H */ diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index 4f5cd60da9..dfda02ff19 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -12,7 +12,32 @@ */ #include "vim.h" -#include "version.h" +#include "version_defs.h" +#include "ex_cmds2.h" +#include "buffer.h" +#include "charset.h" +#include "eval.h" +#include "ex_cmds.h" +#include "ex_docmd.h" +#include "ex_eval.h" +#include "ex_getln.h" +#include "fileio.h" +#include "getchar.h" +#include "mark.h" +#include "mbyte.h" +#include "message.h" +#include "misc1.h" +#include "misc2.h" +#include "move.h" +#include "normal.h" +#include "option.h" +#include "os_unix.h" +#include "quickfix.h" +#include "regexp.h" +#include "screen.h" +#include "term.h" +#include "undo.h" +#include "window.h" static void cmd_source __ARGS((char_u *fname, exarg_T *eap)); diff --git a/src/ex_cmds2.h b/src/ex_cmds2.h new file mode 100644 index 0000000000..a01096cfd7 --- /dev/null +++ b/src/ex_cmds2.h @@ -0,0 +1,96 @@ +#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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_EX_CMDS2_H */ diff --git a/src/ex_cmds_defs.h b/src/ex_cmds_defs.h new file mode 100644 index 0000000000..a560789fef --- /dev/null +++ b/src/ex_cmds_defs.h @@ -0,0 +1,1191 @@ +/* vi:set ts=8 sts=4 sw=4: + * + * VIM - Vi IMproved by Bram Moolenaar + * + * Do ":help uganda" in Vim to read copying and usage conditions. + * Do ":help credits" in Vim to see a list of people who contributed. + */ + +/* + * This file defines the Ex commands. + * When DO_DECLARE_EXCMD is defined, the table with ex command names and + * options results. + * When DO_DECLARE_EXCMD is NOT defined, the enum with all the Ex commands + * results. + * This clever trick was invented by Ron Aaron. + */ + +/* + * When adding an Ex command: + * 1. Add an entry in the table below. Keep it sorted on the shortest + * version of the command name that works. If it doesn't start with a + * lower case letter, add it at the end. + * 2. Add a "case: CMD_xxx" in the big switch in ex_docmd.c. + * 3. Add an entry in the index for Ex commands at ":help ex-cmd-index". + * 4. Add documentation in ../doc/xxx.txt. Add a tag for both the short and + * long name of the command. + */ + +#ifdef RANGE +# undef RANGE /* SASC on Amiga defines it */ +#endif + +#define RANGE 0x001 /* allow a linespecs */ +#define BANG 0x002 /* allow a ! after the command name */ +#define EXTRA 0x004 /* allow extra args after command name */ +#define XFILE 0x008 /* expand wildcards in extra part */ +#define NOSPC 0x010 /* no spaces allowed in the extra part */ +#define DFLALL 0x020 /* default file range is 1,$ */ +#define WHOLEFOLD 0x040 /* extend range to include whole fold also + when less than two numbers given */ +#define NEEDARG 0x080 /* argument required */ +#define TRLBAR 0x100 /* check for trailing vertical bar */ +#define REGSTR 0x200 /* allow "x for register designation */ +#define COUNT 0x400 /* allow count in argument, after command */ +#define NOTRLCOM 0x800 /* no trailing comment allowed */ +#define ZEROR 0x1000 /* zero line number allowed */ +#define USECTRLV 0x2000 /* do not remove CTRL-V from argument */ +#define NOTADR 0x4000 /* number before command is not an address */ +#define EDITCMD 0x8000 /* allow "+command" argument */ +#define BUFNAME 0x10000L /* accepts buffer name */ +#define BUFUNL 0x20000L /* accepts unlisted buffer too */ +#define ARGOPT 0x40000L /* allow "++opt=val" argument */ +#define SBOXOK 0x80000L /* allowed in the sandbox */ +#define CMDWIN 0x100000L /* allowed in cmdline window */ +#define MODIFY 0x200000L /* forbidden in non-'modifiable' buffer */ +#define EXFLAGS 0x400000L /* allow flags after count in argument */ +#define FILES (XFILE | EXTRA) /* multiple extra files allowed */ +#define WORD1 (EXTRA | NOSPC) /* one extra word allowed */ +#define FILE1 (FILES | NOSPC) /* 1 file allowed, defaults to current file */ + +#ifndef DO_DECLARE_EXCMD +typedef struct exarg exarg_T; +#endif + +/* + * This array maps ex command names to command codes. + * The order in which command names are listed below is significant -- + * ambiguous abbreviations are always resolved to be the first possible match + * (e.g. "r" is taken to mean "read", not "rewind", because "read" comes + * before "rewind"). + * Not supported commands are included to avoid ambiguities. + */ +#ifdef EX +# undef EX /* just in case */ +#endif +#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)); + +static struct cmdname { + char_u *cmd_name; /* name of the command */ + ex_func_T cmd_func; /* function for this command */ + long_u cmd_argt; /* flags declared above */ +} +cmdnames[] = +#else +# define EX(a, b, c, d) a +enum CMD_index +#endif +{ + EX(CMD_append, "append", ex_append, + BANG|RANGE|ZEROR|TRLBAR|CMDWIN|MODIFY), + EX(CMD_abbreviate, "abbreviate", ex_abbreviate, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_abclear, "abclear", ex_abclear, + EXTRA|TRLBAR|CMDWIN), + EX(CMD_aboveleft, "aboveleft", ex_wrongmodifier, + NEEDARG|EXTRA|NOTRLCOM), + EX(CMD_all, "all", ex_all, + BANG|RANGE|NOTADR|COUNT|TRLBAR), + EX(CMD_amenu, "amenu", ex_menu, + RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_anoremenu, "anoremenu", ex_menu, + RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_args, "args", ex_args, + BANG|FILES|EDITCMD|ARGOPT|TRLBAR), + EX(CMD_argadd, "argadd", ex_argadd, + BANG|NEEDARG|RANGE|NOTADR|ZEROR|FILES|TRLBAR), + EX(CMD_argdelete, "argdelete", ex_argdelete, + BANG|RANGE|NOTADR|FILES|TRLBAR), + EX(CMD_argdo, "argdo", ex_listdo, + BANG|NEEDARG|EXTRA|NOTRLCOM), + EX(CMD_argedit, "argedit", ex_argedit, + BANG|NEEDARG|RANGE|NOTADR|FILE1|EDITCMD|ARGOPT|TRLBAR), + EX(CMD_argglobal, "argglobal", ex_args, + BANG|FILES|EDITCMD|ARGOPT|TRLBAR), + EX(CMD_arglocal, "arglocal", ex_args, + BANG|FILES|EDITCMD|ARGOPT|TRLBAR), + EX(CMD_argument, "argument", ex_argument, + BANG|RANGE|NOTADR|COUNT|EXTRA|EDITCMD|ARGOPT|TRLBAR), + EX(CMD_ascii, "ascii", do_ascii, + TRLBAR|SBOXOK|CMDWIN), + EX(CMD_autocmd, "autocmd", ex_autocmd, + BANG|EXTRA|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_augroup, "augroup", ex_autocmd, + BANG|WORD1|TRLBAR|CMDWIN), + EX(CMD_aunmenu, "aunmenu", ex_menu, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_buffer, "buffer", ex_buffer, + BANG|RANGE|NOTADR|BUFNAME|BUFUNL|COUNT|EXTRA|TRLBAR), + EX(CMD_bNext, "bNext", ex_bprevious, + BANG|RANGE|NOTADR|COUNT|TRLBAR), + EX(CMD_ball, "ball", ex_buffer_all, + RANGE|NOTADR|COUNT|TRLBAR), + EX(CMD_badd, "badd", ex_edit, + NEEDARG|FILE1|EDITCMD|TRLBAR|CMDWIN), + EX(CMD_bdelete, "bdelete", ex_bunload, + BANG|RANGE|NOTADR|BUFNAME|COUNT|EXTRA|TRLBAR), + EX(CMD_behave, "behave", ex_behave, + NEEDARG|WORD1|TRLBAR|CMDWIN), + EX(CMD_belowright, "belowright", ex_wrongmodifier, + NEEDARG|EXTRA|NOTRLCOM), + EX(CMD_bfirst, "bfirst", ex_brewind, + BANG|RANGE|NOTADR|TRLBAR), + EX(CMD_blast, "blast", ex_blast, + BANG|RANGE|NOTADR|TRLBAR), + EX(CMD_bmodified, "bmodified", ex_bmodified, + BANG|RANGE|NOTADR|COUNT|TRLBAR), + EX(CMD_bnext, "bnext", ex_bnext, + BANG|RANGE|NOTADR|COUNT|TRLBAR), + EX(CMD_botright, "botright", ex_wrongmodifier, + NEEDARG|EXTRA|NOTRLCOM), + EX(CMD_bprevious, "bprevious", ex_bprevious, + BANG|RANGE|NOTADR|COUNT|TRLBAR), + EX(CMD_brewind, "brewind", ex_brewind, + BANG|RANGE|NOTADR|TRLBAR), + EX(CMD_break, "break", ex_break, + TRLBAR|SBOXOK|CMDWIN), + EX(CMD_breakadd, "breakadd", ex_breakadd, + EXTRA|TRLBAR|CMDWIN), + EX(CMD_breakdel, "breakdel", ex_breakdel, + EXTRA|TRLBAR|CMDWIN), + EX(CMD_breaklist, "breaklist", ex_breaklist, + EXTRA|TRLBAR|CMDWIN), + EX(CMD_browse, "browse", ex_wrongmodifier, + NEEDARG|EXTRA|NOTRLCOM|CMDWIN), + EX(CMD_buffers, "buffers", buflist_list, + BANG|TRLBAR|CMDWIN), + EX(CMD_bufdo, "bufdo", ex_listdo, + BANG|NEEDARG|EXTRA|NOTRLCOM), + EX(CMD_bunload, "bunload", ex_bunload, + BANG|RANGE|NOTADR|BUFNAME|COUNT|EXTRA|TRLBAR), + EX(CMD_bwipeout, "bwipeout", ex_bunload, + BANG|RANGE|NOTADR|BUFNAME|BUFUNL|COUNT|EXTRA|TRLBAR), + EX(CMD_change, "change", ex_change, + BANG|WHOLEFOLD|RANGE|COUNT|TRLBAR|CMDWIN|MODIFY), + EX(CMD_cNext, "cNext", ex_cnext, + RANGE|NOTADR|COUNT|TRLBAR|BANG), + EX(CMD_cNfile, "cNfile", ex_cnext, + RANGE|NOTADR|COUNT|TRLBAR|BANG), + EX(CMD_cabbrev, "cabbrev", ex_abbreviate, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_cabclear, "cabclear", ex_abclear, + EXTRA|TRLBAR|CMDWIN), + EX(CMD_caddbuffer, "caddbuffer", ex_cbuffer, + RANGE|NOTADR|WORD1|TRLBAR), + EX(CMD_caddexpr, "caddexpr", ex_cexpr, + NEEDARG|WORD1|NOTRLCOM|TRLBAR), + EX(CMD_caddfile, "caddfile", ex_cfile, + TRLBAR|FILE1), + EX(CMD_call, "call", ex_call, + RANGE|NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN), + EX(CMD_catch, "catch", ex_catch, + EXTRA|SBOXOK|CMDWIN), + EX(CMD_cbuffer, "cbuffer", ex_cbuffer, + BANG|RANGE|NOTADR|WORD1|TRLBAR), + EX(CMD_cc, "cc", ex_cc, + RANGE|NOTADR|COUNT|TRLBAR|BANG), + EX(CMD_cclose, "cclose", ex_cclose, + RANGE|NOTADR|COUNT|TRLBAR), + EX(CMD_cd, "cd", ex_cd, + BANG|FILE1|TRLBAR|CMDWIN), + EX(CMD_center, "center", ex_align, + TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY), + EX(CMD_cexpr, "cexpr", ex_cexpr, + NEEDARG|WORD1|NOTRLCOM|TRLBAR|BANG), + EX(CMD_cfile, "cfile", ex_cfile, + TRLBAR|FILE1|BANG), + EX(CMD_cfirst, "cfirst", ex_cc, + RANGE|NOTADR|COUNT|TRLBAR|BANG), + EX(CMD_cgetfile, "cgetfile", ex_cfile, + TRLBAR|FILE1), + EX(CMD_cgetbuffer, "cgetbuffer", ex_cbuffer, + RANGE|NOTADR|WORD1|TRLBAR), + EX(CMD_cgetexpr, "cgetexpr", ex_cexpr, + NEEDARG|WORD1|NOTRLCOM|TRLBAR), + EX(CMD_chdir, "chdir", ex_cd, + BANG|FILE1|TRLBAR|CMDWIN), + EX(CMD_changes, "changes", ex_changes, + TRLBAR|CMDWIN), + EX(CMD_checkpath, "checkpath", ex_checkpath, + TRLBAR|BANG|CMDWIN), + EX(CMD_checktime, "checktime", ex_checktime, + RANGE|NOTADR|BUFNAME|COUNT|EXTRA|TRLBAR), + EX(CMD_clist, "clist", qf_list, + BANG|EXTRA|TRLBAR|CMDWIN), + EX(CMD_clast, "clast", ex_cc, + RANGE|NOTADR|COUNT|TRLBAR|BANG), + EX(CMD_close, "close", ex_close, + BANG|TRLBAR|CMDWIN), + EX(CMD_cmap, "cmap", ex_map, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_cmapclear, "cmapclear", ex_mapclear, + EXTRA|TRLBAR|CMDWIN), + EX(CMD_cmenu, "cmenu", ex_menu, + RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_cnext, "cnext", ex_cnext, + RANGE|NOTADR|COUNT|TRLBAR|BANG), + EX(CMD_cnewer, "cnewer", qf_age, + RANGE|NOTADR|COUNT|TRLBAR), + EX(CMD_cnfile, "cnfile", ex_cnext, + RANGE|NOTADR|COUNT|TRLBAR|BANG), + EX(CMD_cnoremap, "cnoremap", ex_map, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_cnoreabbrev, "cnoreabbrev", ex_abbreviate, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_cnoremenu, "cnoremenu", ex_menu, + RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_copy, "copy", ex_copymove, + RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN|MODIFY), + EX(CMD_colder, "colder", qf_age, + RANGE|NOTADR|COUNT|TRLBAR), + EX(CMD_colorscheme, "colorscheme", ex_colorscheme, + WORD1|TRLBAR|CMDWIN), + EX(CMD_command, "command", ex_command, + EXTRA|BANG|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_comclear, "comclear", ex_comclear, + TRLBAR|CMDWIN), + EX(CMD_compiler, "compiler", ex_compiler, + BANG|TRLBAR|WORD1|CMDWIN), + EX(CMD_continue, "continue", ex_continue, + TRLBAR|SBOXOK|CMDWIN), + EX(CMD_confirm, "confirm", ex_wrongmodifier, + NEEDARG|EXTRA|NOTRLCOM|CMDWIN), + EX(CMD_copen, "copen", ex_copen, + RANGE|NOTADR|COUNT|TRLBAR), + EX(CMD_cprevious, "cprevious", ex_cnext, + RANGE|NOTADR|COUNT|TRLBAR|BANG), + EX(CMD_cpfile, "cpfile", ex_cnext, + RANGE|NOTADR|COUNT|TRLBAR|BANG), + EX(CMD_cquit, "cquit", ex_cquit, + TRLBAR|BANG), + EX(CMD_crewind, "crewind", ex_cc, + RANGE|NOTADR|COUNT|TRLBAR|BANG), + EX(CMD_cscope, "cscope", do_cscope, + EXTRA|NOTRLCOM|XFILE), + EX(CMD_cstag, "cstag", do_cstag, + BANG|TRLBAR|WORD1), + EX(CMD_cunmap, "cunmap", ex_unmap, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_cunabbrev, "cunabbrev", ex_abbreviate, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_cunmenu, "cunmenu", ex_menu, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_cwindow, "cwindow", ex_cwindow, + RANGE|NOTADR|COUNT|TRLBAR), + EX(CMD_delete, "delete", ex_operators, + RANGE|WHOLEFOLD|REGSTR|COUNT|TRLBAR|CMDWIN|MODIFY), + EX(CMD_delmarks, "delmarks", ex_delmarks, + BANG|EXTRA|TRLBAR|CMDWIN), + EX(CMD_debug, "debug", ex_debug, + NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN), + EX(CMD_debuggreedy, "debuggreedy", ex_debuggreedy, + RANGE|NOTADR|ZEROR|TRLBAR|CMDWIN), + EX(CMD_delcommand, "delcommand", ex_delcommand, + NEEDARG|WORD1|TRLBAR|CMDWIN), + EX(CMD_delfunction, "delfunction", ex_delfunction, + NEEDARG|WORD1|CMDWIN), + EX(CMD_display, "display", ex_display, + EXTRA|NOTRLCOM|TRLBAR|SBOXOK|CMDWIN), + EX(CMD_diffupdate, "diffupdate", ex_diffupdate, + BANG|TRLBAR), + EX(CMD_diffget, "diffget", ex_diffgetput, + RANGE|EXTRA|TRLBAR|MODIFY), + EX(CMD_diffoff, "diffoff", ex_diffoff, + BANG|TRLBAR), + EX(CMD_diffpatch, "diffpatch", ex_diffpatch, + EXTRA|FILE1|TRLBAR|MODIFY), + EX(CMD_diffput, "diffput", ex_diffgetput, + RANGE|EXTRA|TRLBAR), + EX(CMD_diffsplit, "diffsplit", ex_diffsplit, + EXTRA|FILE1|TRLBAR), + EX(CMD_diffthis, "diffthis", ex_diffthis, + TRLBAR), + EX(CMD_digraphs, "digraphs", ex_digraphs, + EXTRA|TRLBAR|CMDWIN), + EX(CMD_djump, "djump", ex_findpat, + BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA), + EX(CMD_dlist, "dlist", ex_findpat, + BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA|CMDWIN), + EX(CMD_doautocmd, "doautocmd", ex_doautocmd, + EXTRA|TRLBAR|CMDWIN), + EX(CMD_doautoall, "doautoall", ex_doautoall, + EXTRA|TRLBAR|CMDWIN), + EX(CMD_drop, "drop", ex_drop, + FILES|EDITCMD|NEEDARG|ARGOPT|TRLBAR), + EX(CMD_dsearch, "dsearch", ex_findpat, + BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA|CMDWIN), + EX(CMD_dsplit, "dsplit", ex_findpat, + BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA), + EX(CMD_edit, "edit", ex_edit, + BANG|FILE1|EDITCMD|ARGOPT|TRLBAR), + EX(CMD_earlier, "earlier", ex_later, + TRLBAR|EXTRA|NOSPC|CMDWIN), + EX(CMD_echo, "echo", ex_echo, + EXTRA|NOTRLCOM|SBOXOK|CMDWIN), + EX(CMD_echoerr, "echoerr", ex_execute, + EXTRA|NOTRLCOM|SBOXOK|CMDWIN), + EX(CMD_echohl, "echohl", ex_echohl, + EXTRA|TRLBAR|SBOXOK|CMDWIN), + EX(CMD_echomsg, "echomsg", ex_execute, + EXTRA|NOTRLCOM|SBOXOK|CMDWIN), + EX(CMD_echon, "echon", ex_echo, + EXTRA|NOTRLCOM|SBOXOK|CMDWIN), + EX(CMD_else, "else", ex_else, + TRLBAR|SBOXOK|CMDWIN), + EX(CMD_elseif, "elseif", ex_else, + EXTRA|NOTRLCOM|SBOXOK|CMDWIN), + EX(CMD_emenu, "emenu", ex_emenu, + NEEDARG|EXTRA|TRLBAR|NOTRLCOM|RANGE|NOTADR|CMDWIN), + EX(CMD_endif, "endif", ex_endif, + TRLBAR|SBOXOK|CMDWIN), + EX(CMD_endfunction, "endfunction", ex_endfunction, + TRLBAR|CMDWIN), + EX(CMD_endfor, "endfor", ex_endwhile, + TRLBAR|SBOXOK|CMDWIN), + EX(CMD_endtry, "endtry", ex_endtry, + TRLBAR|SBOXOK|CMDWIN), + EX(CMD_endwhile, "endwhile", ex_endwhile, + TRLBAR|SBOXOK|CMDWIN), + EX(CMD_enew, "enew", ex_edit, + BANG|TRLBAR), + EX(CMD_ex, "ex", ex_edit, + BANG|FILE1|EDITCMD|ARGOPT|TRLBAR), + EX(CMD_execute, "execute", ex_execute, + EXTRA|NOTRLCOM|SBOXOK|CMDWIN), + EX(CMD_exit, "exit", ex_exit, + RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR|CMDWIN), + EX(CMD_exusage, "exusage", ex_exusage, + TRLBAR), + EX(CMD_file, "file", ex_file, + RANGE|NOTADR|ZEROR|BANG|FILE1|TRLBAR), + EX(CMD_files, "files", buflist_list, + BANG|TRLBAR|CMDWIN), + EX(CMD_filetype, "filetype", ex_filetype, + EXTRA|TRLBAR|CMDWIN), + EX(CMD_find, "find", ex_find, + RANGE|NOTADR|BANG|FILE1|EDITCMD|ARGOPT|TRLBAR), + EX(CMD_finally, "finally", ex_finally, + TRLBAR|SBOXOK|CMDWIN), + EX(CMD_finish, "finish", ex_finish, + TRLBAR|SBOXOK|CMDWIN), + EX(CMD_first, "first", ex_rewind, + EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR), + EX(CMD_fixdel, "fixdel", do_fixdel, + TRLBAR|CMDWIN), + EX(CMD_fold, "fold", ex_fold, + RANGE|WHOLEFOLD|TRLBAR|SBOXOK|CMDWIN), + EX(CMD_foldclose, "foldclose", ex_foldopen, + RANGE|BANG|WHOLEFOLD|TRLBAR|SBOXOK|CMDWIN), + EX(CMD_folddoopen, "folddoopen", ex_folddo, + RANGE|DFLALL|NEEDARG|EXTRA|NOTRLCOM), + EX(CMD_folddoclosed, "folddoclosed", ex_folddo, + RANGE|DFLALL|NEEDARG|EXTRA|NOTRLCOM), + EX(CMD_foldopen, "foldopen", ex_foldopen, + RANGE|BANG|WHOLEFOLD|TRLBAR|SBOXOK|CMDWIN), + EX(CMD_for, "for", ex_while, + EXTRA|NOTRLCOM|SBOXOK|CMDWIN), + EX(CMD_function, "function", ex_function, + EXTRA|BANG|CMDWIN), + EX(CMD_global, "global", ex_global, + RANGE|WHOLEFOLD|BANG|EXTRA|DFLALL|SBOXOK|CMDWIN), + EX(CMD_goto, "goto", ex_goto, + RANGE|NOTADR|COUNT|TRLBAR|SBOXOK|CMDWIN), + EX(CMD_grep, "grep", ex_make, + RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE), + EX(CMD_grepadd, "grepadd", ex_make, + RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE), + EX(CMD_gui, "gui", ex_gui, + BANG|FILES|EDITCMD|ARGOPT|TRLBAR|CMDWIN), + EX(CMD_gvim, "gvim", ex_gui, + BANG|FILES|EDITCMD|ARGOPT|TRLBAR|CMDWIN), + EX(CMD_help, "help", ex_help, + BANG|EXTRA|NOTRLCOM), + EX(CMD_helpfind, "helpfind", ex_helpfind, + EXTRA|NOTRLCOM), + EX(CMD_helpgrep, "helpgrep", ex_helpgrep, + EXTRA|NOTRLCOM|NEEDARG), + EX(CMD_helptags, "helptags", ex_helptags, + NEEDARG|FILES|TRLBAR|CMDWIN), + EX(CMD_hardcopy, "hardcopy", ex_hardcopy, + RANGE|COUNT|EXTRA|TRLBAR|DFLALL|BANG), + EX(CMD_highlight, "highlight", ex_highlight, + BANG|EXTRA|TRLBAR|SBOXOK|CMDWIN), + EX(CMD_hide, "hide", ex_hide, + BANG|EXTRA|NOTRLCOM), + EX(CMD_history, "history", ex_history, + EXTRA|TRLBAR|CMDWIN), + EX(CMD_insert, "insert", ex_append, + BANG|RANGE|TRLBAR|CMDWIN|MODIFY), + EX(CMD_iabbrev, "iabbrev", ex_abbreviate, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_iabclear, "iabclear", ex_abclear, + EXTRA|TRLBAR|CMDWIN), + EX(CMD_if, "if", ex_if, + EXTRA|NOTRLCOM|SBOXOK|CMDWIN), + EX(CMD_ijump, "ijump", ex_findpat, + BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA), + EX(CMD_ilist, "ilist", ex_findpat, + BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA|CMDWIN), + EX(CMD_imap, "imap", ex_map, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_imapclear, "imapclear", ex_mapclear, + EXTRA|TRLBAR|CMDWIN), + EX(CMD_imenu, "imenu", ex_menu, + RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_inoremap, "inoremap", ex_map, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_inoreabbrev, "inoreabbrev", ex_abbreviate, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_inoremenu, "inoremenu", ex_menu, + RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_intro, "intro", ex_intro, + TRLBAR|CMDWIN), + EX(CMD_isearch, "isearch", ex_findpat, + BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA|CMDWIN), + EX(CMD_isplit, "isplit", ex_findpat, + BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA), + EX(CMD_iunmap, "iunmap", ex_unmap, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_iunabbrev, "iunabbrev", ex_abbreviate, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_iunmenu, "iunmenu", ex_menu, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_join, "join", ex_join, + BANG|RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN|MODIFY), + EX(CMD_jumps, "jumps", ex_jumps, + TRLBAR|CMDWIN), + EX(CMD_k, "k", ex_mark, + RANGE|WORD1|TRLBAR|SBOXOK|CMDWIN), + EX(CMD_keepmarks, "keepmarks", ex_wrongmodifier, + NEEDARG|EXTRA|NOTRLCOM), + EX(CMD_keepjumps, "keepjumps", ex_wrongmodifier, + NEEDARG|EXTRA|NOTRLCOM), + EX(CMD_keeppatterns, "keeppatterns", ex_wrongmodifier, + NEEDARG|EXTRA|NOTRLCOM), + EX(CMD_keepalt, "keepalt", ex_wrongmodifier, + NEEDARG|EXTRA|NOTRLCOM), + EX(CMD_list, "list", ex_print, + RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN), + EX(CMD_lNext, "lNext", ex_cnext, + RANGE|NOTADR|COUNT|TRLBAR|BANG), + EX(CMD_lNfile, "lNfile", ex_cnext, + RANGE|NOTADR|COUNT|TRLBAR|BANG), + EX(CMD_last, "last", ex_last, + EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR), + EX(CMD_language, "language", ex_language, + EXTRA|TRLBAR|CMDWIN), + EX(CMD_laddexpr, "laddexpr", ex_cexpr, + NEEDARG|WORD1|NOTRLCOM|TRLBAR), + EX(CMD_laddbuffer, "laddbuffer", ex_cbuffer, + RANGE|NOTADR|WORD1|TRLBAR), + EX(CMD_laddfile, "laddfile", ex_cfile, + TRLBAR|FILE1), + EX(CMD_later, "later", ex_later, + TRLBAR|EXTRA|NOSPC|CMDWIN), + EX(CMD_lbuffer, "lbuffer", ex_cbuffer, + BANG|RANGE|NOTADR|WORD1|TRLBAR), + EX(CMD_lcd, "lcd", ex_cd, + BANG|FILE1|TRLBAR|CMDWIN), + EX(CMD_lchdir, "lchdir", ex_cd, + BANG|FILE1|TRLBAR|CMDWIN), + EX(CMD_lclose, "lclose", ex_cclose, + RANGE|NOTADR|COUNT|TRLBAR), + EX(CMD_lcscope, "lcscope", do_cscope, + EXTRA|NOTRLCOM|XFILE), + EX(CMD_left, "left", ex_align, + TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY), + EX(CMD_leftabove, "leftabove", ex_wrongmodifier, + NEEDARG|EXTRA|NOTRLCOM), + EX(CMD_let, "let", ex_let, + EXTRA|NOTRLCOM|SBOXOK|CMDWIN), + EX(CMD_lexpr, "lexpr", ex_cexpr, + NEEDARG|WORD1|NOTRLCOM|TRLBAR|BANG), + EX(CMD_lfile, "lfile", ex_cfile, + TRLBAR|FILE1|BANG), + EX(CMD_lfirst, "lfirst", ex_cc, + RANGE|NOTADR|COUNT|TRLBAR|BANG), + EX(CMD_lgetfile, "lgetfile", ex_cfile, + TRLBAR|FILE1), + EX(CMD_lgetbuffer, "lgetbuffer", ex_cbuffer, + RANGE|NOTADR|WORD1|TRLBAR), + EX(CMD_lgetexpr, "lgetexpr", ex_cexpr, + NEEDARG|WORD1|NOTRLCOM|TRLBAR), + EX(CMD_lgrep, "lgrep", ex_make, + RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE), + EX(CMD_lgrepadd, "lgrepadd", ex_make, + RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE), + EX(CMD_lhelpgrep, "lhelpgrep", ex_helpgrep, + EXTRA|NOTRLCOM|NEEDARG), + EX(CMD_ll, "ll", ex_cc, + RANGE|NOTADR|COUNT|TRLBAR|BANG), + EX(CMD_llast, "llast", ex_cc, + RANGE|NOTADR|COUNT|TRLBAR|BANG), + EX(CMD_llist, "llist", qf_list, + BANG|EXTRA|TRLBAR|CMDWIN), + EX(CMD_lmap, "lmap", ex_map, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_lmapclear, "lmapclear", ex_mapclear, + EXTRA|TRLBAR|CMDWIN), + EX(CMD_lmake, "lmake", ex_make, + BANG|EXTRA|NOTRLCOM|TRLBAR|XFILE), + EX(CMD_lnoremap, "lnoremap", ex_map, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_lnext, "lnext", ex_cnext, + RANGE|NOTADR|COUNT|TRLBAR|BANG), + EX(CMD_lnewer, "lnewer", qf_age, + RANGE|NOTADR|COUNT|TRLBAR), + EX(CMD_lnfile, "lnfile", ex_cnext, + RANGE|NOTADR|COUNT|TRLBAR|BANG), + EX(CMD_loadview, "loadview", ex_loadview, + FILE1|TRLBAR), + EX(CMD_loadkeymap, "loadkeymap", ex_loadkeymap, + CMDWIN), + EX(CMD_lockmarks, "lockmarks", ex_wrongmodifier, + NEEDARG|EXTRA|NOTRLCOM), + EX(CMD_lockvar, "lockvar", ex_lockvar, + BANG|EXTRA|NEEDARG|SBOXOK|CMDWIN), + EX(CMD_lolder, "lolder", qf_age, + RANGE|NOTADR|COUNT|TRLBAR), + EX(CMD_lopen, "lopen", ex_copen, + RANGE|NOTADR|COUNT|TRLBAR), + EX(CMD_lprevious, "lprevious", ex_cnext, + RANGE|NOTADR|COUNT|TRLBAR|BANG), + EX(CMD_lpfile, "lpfile", ex_cnext, + RANGE|NOTADR|COUNT|TRLBAR|BANG), + EX(CMD_lrewind, "lrewind", ex_cc, + RANGE|NOTADR|COUNT|TRLBAR|BANG), + EX(CMD_ltag, "ltag", ex_tag, + NOTADR|TRLBAR|BANG|WORD1), + EX(CMD_lua, "lua", ex_lua, + RANGE|EXTRA|NEEDARG|CMDWIN), + EX(CMD_luado, "luado", ex_luado, + RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN), + EX(CMD_luafile, "luafile", ex_luafile, + RANGE|FILE1|NEEDARG|CMDWIN), + EX(CMD_lunmap, "lunmap", ex_unmap, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_lvimgrep, "lvimgrep", ex_vimgrep, + RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE), + EX(CMD_lvimgrepadd, "lvimgrepadd", ex_vimgrep, + RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE), + EX(CMD_lwindow, "lwindow", ex_cwindow, + RANGE|NOTADR|COUNT|TRLBAR), + EX(CMD_ls, "ls", buflist_list, + BANG|TRLBAR|CMDWIN), + EX(CMD_move, "move", ex_copymove, + RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN|MODIFY), + EX(CMD_mark, "mark", ex_mark, + RANGE|WORD1|TRLBAR|SBOXOK|CMDWIN), + EX(CMD_make, "make", ex_make, + BANG|EXTRA|NOTRLCOM|TRLBAR|XFILE), + EX(CMD_map, "map", ex_map, + BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_mapclear, "mapclear", ex_mapclear, + EXTRA|BANG|TRLBAR|CMDWIN), + EX(CMD_marks, "marks", do_marks, + EXTRA|TRLBAR|CMDWIN), + EX(CMD_match, "match", ex_match, + RANGE|NOTADR|EXTRA|CMDWIN), + EX(CMD_menu, "menu", ex_menu, + RANGE|NOTADR|ZEROR|BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_menutranslate, "menutranslate", ex_menutranslate, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_messages, "messages", ex_messages, + TRLBAR|CMDWIN), + EX(CMD_mkexrc, "mkexrc", ex_mkrc, + BANG|FILE1|TRLBAR|CMDWIN), + EX(CMD_mksession, "mksession", ex_mkrc, + BANG|FILE1|TRLBAR), + EX(CMD_mkspell, "mkspell", ex_mkspell, + BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE), + EX(CMD_mkvimrc, "mkvimrc", ex_mkrc, + BANG|FILE1|TRLBAR|CMDWIN), + EX(CMD_mkview, "mkview", ex_mkrc, + BANG|FILE1|TRLBAR), + EX(CMD_mode, "mode", ex_mode, + WORD1|TRLBAR|CMDWIN), + EX(CMD_mzscheme, "mzscheme", ex_mzscheme, + RANGE|EXTRA|DFLALL|NEEDARG|CMDWIN|SBOXOK), + EX(CMD_mzfile, "mzfile", ex_mzfile, + RANGE|FILE1|NEEDARG|CMDWIN), + EX(CMD_next, "next", ex_next, + RANGE|NOTADR|BANG|FILES|EDITCMD|ARGOPT|TRLBAR), + EX(CMD_nbkey, "nbkey", ex_nbkey, + EXTRA|NOTADR|NEEDARG), + EX(CMD_nbclose, "nbclose", ex_nbclose, + TRLBAR|CMDWIN), + EX(CMD_nbstart, "nbstart", ex_nbstart, + WORD1|TRLBAR|CMDWIN), + EX(CMD_new, "new", ex_splitview, + BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR), + EX(CMD_nmap, "nmap", ex_map, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_nmapclear, "nmapclear", ex_mapclear, + EXTRA|TRLBAR|CMDWIN), + EX(CMD_nmenu, "nmenu", ex_menu, + RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_nnoremap, "nnoremap", ex_map, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_nnoremenu, "nnoremenu", ex_menu, + RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_noremap, "noremap", ex_map, + BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_noautocmd, "noautocmd", ex_wrongmodifier, + NEEDARG|EXTRA|NOTRLCOM), + EX(CMD_nohlsearch, "nohlsearch", ex_nohlsearch, + TRLBAR|SBOXOK|CMDWIN), + EX(CMD_noreabbrev, "noreabbrev", ex_abbreviate, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_noremenu, "noremenu", ex_menu, + RANGE|NOTADR|ZEROR|BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_normal, "normal", ex_normal, + RANGE|BANG|EXTRA|NEEDARG|NOTRLCOM|USECTRLV|SBOXOK|CMDWIN), + EX(CMD_number, "number", ex_print, + RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN), + EX(CMD_nunmap, "nunmap", ex_unmap, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_nunmenu, "nunmenu", ex_menu, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_open, "open", ex_open, + RANGE|BANG|EXTRA), + EX(CMD_oldfiles, "oldfiles", ex_oldfiles, + BANG|TRLBAR|SBOXOK|CMDWIN), + EX(CMD_omap, "omap", ex_map, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_omapclear, "omapclear", ex_mapclear, + EXTRA|TRLBAR|CMDWIN), + EX(CMD_omenu, "omenu", ex_menu, + RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_only, "only", ex_only, + BANG|TRLBAR), + EX(CMD_onoremap, "onoremap", ex_map, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_onoremenu, "onoremenu", ex_menu, + RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_options, "options", ex_options, + TRLBAR), + EX(CMD_ounmap, "ounmap", ex_unmap, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_ounmenu, "ounmenu", ex_menu, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_ownsyntax, "ownsyntax", ex_ownsyntax, + EXTRA|NOTRLCOM|SBOXOK|CMDWIN), + EX(CMD_print, "print", ex_print, + RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN|SBOXOK), + EX(CMD_pclose, "pclose", ex_pclose, + BANG|TRLBAR), + EX(CMD_perl, "perl", ex_perl, + RANGE|EXTRA|DFLALL|NEEDARG|SBOXOK|CMDWIN), + EX(CMD_perldo, "perldo", ex_perldo, + RANGE|EXTRA|DFLALL|NEEDARG|CMDWIN), + EX(CMD_pedit, "pedit", ex_pedit, + BANG|FILE1|EDITCMD|ARGOPT|TRLBAR), + EX(CMD_pop, "pop", ex_tag, + RANGE|NOTADR|BANG|COUNT|TRLBAR|ZEROR), + EX(CMD_popup, "popup", ex_popup, + NEEDARG|EXTRA|BANG|TRLBAR|NOTRLCOM|CMDWIN), + EX(CMD_ppop, "ppop", ex_ptag, + RANGE|NOTADR|BANG|COUNT|TRLBAR|ZEROR), + EX(CMD_preserve, "preserve", ex_preserve, + TRLBAR), + EX(CMD_previous, "previous", ex_previous, + EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR), + EX(CMD_promptfind, "promptfind", gui_mch_find_dialog, + EXTRA|NOTRLCOM|CMDWIN), + EX(CMD_promptrepl, "promptrepl", gui_mch_replace_dialog, + EXTRA|NOTRLCOM|CMDWIN), + EX(CMD_profile, "profile", ex_profile, + BANG|EXTRA|TRLBAR|CMDWIN), + EX(CMD_profdel, "profdel", ex_breakdel, + EXTRA|TRLBAR|CMDWIN), + EX(CMD_psearch, "psearch", ex_psearch, + BANG|RANGE|WHOLEFOLD|DFLALL|EXTRA), + EX(CMD_ptag, "ptag", ex_ptag, + RANGE|NOTADR|BANG|WORD1|TRLBAR|ZEROR), + EX(CMD_ptNext, "ptNext", ex_ptag, + RANGE|NOTADR|BANG|TRLBAR|ZEROR), + EX(CMD_ptfirst, "ptfirst", ex_ptag, + RANGE|NOTADR|BANG|TRLBAR|ZEROR), + EX(CMD_ptjump, "ptjump", ex_ptag, + BANG|TRLBAR|WORD1), + EX(CMD_ptlast, "ptlast", ex_ptag, + BANG|TRLBAR), + EX(CMD_ptnext, "ptnext", ex_ptag, + RANGE|NOTADR|BANG|TRLBAR|ZEROR), + EX(CMD_ptprevious, "ptprevious", ex_ptag, + RANGE|NOTADR|BANG|TRLBAR|ZEROR), + EX(CMD_ptrewind, "ptrewind", ex_ptag, + RANGE|NOTADR|BANG|TRLBAR|ZEROR), + EX(CMD_ptselect, "ptselect", ex_ptag, + BANG|TRLBAR|WORD1), + EX(CMD_put, "put", ex_put, + RANGE|WHOLEFOLD|BANG|REGSTR|TRLBAR|ZEROR|CMDWIN|MODIFY), + EX(CMD_pwd, "pwd", ex_pwd, + TRLBAR|CMDWIN), + EX(CMD_python, "python", ex_python, + RANGE|EXTRA|NEEDARG|CMDWIN), + EX(CMD_pydo, "pydo", ex_pydo, + RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN), + EX(CMD_pyfile, "pyfile", ex_pyfile, + RANGE|FILE1|NEEDARG|CMDWIN), + EX(CMD_py3, "py3", ex_py3, + RANGE|EXTRA|NEEDARG|CMDWIN), + EX(CMD_py3do, "py3do", ex_py3do, + RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN), + EX(CMD_python3, "python3", ex_py3, + RANGE|EXTRA|NEEDARG|CMDWIN), + EX(CMD_py3file, "py3file", ex_py3file, + RANGE|FILE1|NEEDARG|CMDWIN), + EX(CMD_quit, "quit", ex_quit, + BANG|TRLBAR|CMDWIN), + EX(CMD_quitall, "quitall", ex_quit_all, + BANG|TRLBAR), + EX(CMD_qall, "qall", ex_quit_all, + BANG|TRLBAR|CMDWIN), + EX(CMD_read, "read", ex_read, + BANG|RANGE|WHOLEFOLD|FILE1|ARGOPT|TRLBAR|ZEROR|CMDWIN|MODIFY), + EX(CMD_recover, "recover", ex_recover, + BANG|FILE1|TRLBAR), + EX(CMD_redo, "redo", ex_redo, + TRLBAR|CMDWIN), + EX(CMD_redir, "redir", ex_redir, + BANG|FILES|TRLBAR|CMDWIN), + EX(CMD_redraw, "redraw", ex_redraw, + BANG|TRLBAR|CMDWIN), + EX(CMD_redrawstatus, "redrawstatus", ex_redrawstatus, + BANG|TRLBAR|CMDWIN), + EX(CMD_registers, "registers", ex_display, + EXTRA|NOTRLCOM|TRLBAR|CMDWIN), + EX(CMD_resize, "resize", ex_resize, + RANGE|NOTADR|TRLBAR|WORD1), + EX(CMD_retab, "retab", ex_retab, + TRLBAR|RANGE|WHOLEFOLD|DFLALL|BANG|WORD1|CMDWIN|MODIFY), + EX(CMD_return, "return", ex_return, + EXTRA|NOTRLCOM|SBOXOK|CMDWIN), + EX(CMD_rewind, "rewind", ex_rewind, + EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR), + EX(CMD_right, "right", ex_align, + TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY), + EX(CMD_rightbelow, "rightbelow", ex_wrongmodifier, + NEEDARG|EXTRA|NOTRLCOM), + EX(CMD_runtime, "runtime", ex_runtime, + BANG|NEEDARG|FILES|TRLBAR|SBOXOK|CMDWIN), + EX(CMD_ruby, "ruby", ex_ruby, + RANGE|EXTRA|NEEDARG|CMDWIN), + EX(CMD_rubydo, "rubydo", ex_rubydo, + RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN), + EX(CMD_rubyfile, "rubyfile", ex_rubyfile, + RANGE|FILE1|NEEDARG|CMDWIN), + EX(CMD_rundo, "rundo", ex_rundo, + NEEDARG|FILE1), + EX(CMD_rviminfo, "rviminfo", ex_viminfo, + BANG|FILE1|TRLBAR|CMDWIN), + EX(CMD_substitute, "substitute", do_sub, + RANGE|WHOLEFOLD|EXTRA|CMDWIN), + EX(CMD_sNext, "sNext", ex_previous, + EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR), + EX(CMD_sargument, "sargument", ex_argument, + BANG|RANGE|NOTADR|COUNT|EXTRA|EDITCMD|ARGOPT|TRLBAR), + EX(CMD_sall, "sall", ex_all, + BANG|RANGE|NOTADR|COUNT|TRLBAR), + EX(CMD_sandbox, "sandbox", ex_wrongmodifier, + NEEDARG|EXTRA|NOTRLCOM), + EX(CMD_saveas, "saveas", ex_write, + BANG|DFLALL|FILE1|ARGOPT|CMDWIN|TRLBAR), + EX(CMD_sbuffer, "sbuffer", ex_buffer, + BANG|RANGE|NOTADR|BUFNAME|BUFUNL|COUNT|EXTRA|TRLBAR), + EX(CMD_sbNext, "sbNext", ex_bprevious, + RANGE|NOTADR|COUNT|TRLBAR), + EX(CMD_sball, "sball", ex_buffer_all, + RANGE|NOTADR|COUNT|TRLBAR), + EX(CMD_sbfirst, "sbfirst", ex_brewind, + TRLBAR), + EX(CMD_sblast, "sblast", ex_blast, + TRLBAR), + EX(CMD_sbmodified, "sbmodified", ex_bmodified, + RANGE|NOTADR|COUNT|TRLBAR), + EX(CMD_sbnext, "sbnext", ex_bnext, + RANGE|NOTADR|COUNT|TRLBAR), + EX(CMD_sbprevious, "sbprevious", ex_bprevious, + RANGE|NOTADR|COUNT|TRLBAR), + EX(CMD_sbrewind, "sbrewind", ex_brewind, + TRLBAR), + EX(CMD_scriptnames, "scriptnames", ex_scriptnames, + TRLBAR|CMDWIN), + EX(CMD_scriptencoding, "scriptencoding", ex_scriptencoding, + WORD1|TRLBAR|CMDWIN), + EX(CMD_scscope, "scscope", do_scscope, + EXTRA|NOTRLCOM), + EX(CMD_set, "set", ex_set, + TRLBAR|EXTRA|CMDWIN|SBOXOK), + EX(CMD_setfiletype, "setfiletype", ex_setfiletype, + TRLBAR|EXTRA|NEEDARG|CMDWIN), + EX(CMD_setglobal, "setglobal", ex_set, + TRLBAR|EXTRA|CMDWIN|SBOXOK), + EX(CMD_setlocal, "setlocal", ex_set, + TRLBAR|EXTRA|CMDWIN|SBOXOK), + EX(CMD_sfind, "sfind", ex_splitview, + BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR), + EX(CMD_sfirst, "sfirst", ex_rewind, + EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR), + EX(CMD_shell, "shell", ex_shell, + TRLBAR|CMDWIN), + EX(CMD_simalt, "simalt", ex_simalt, + NEEDARG|WORD1|TRLBAR|CMDWIN), + EX(CMD_sign, "sign", ex_sign, + NEEDARG|RANGE|NOTADR|EXTRA|CMDWIN), + EX(CMD_silent, "silent", ex_wrongmodifier, + NEEDARG|EXTRA|BANG|NOTRLCOM|SBOXOK|CMDWIN), + EX(CMD_sleep, "sleep", ex_sleep, + RANGE|NOTADR|COUNT|EXTRA|TRLBAR|CMDWIN), + EX(CMD_slast, "slast", ex_last, + EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR), + EX(CMD_smagic, "smagic", ex_submagic, + RANGE|WHOLEFOLD|EXTRA|CMDWIN), + EX(CMD_smap, "smap", ex_map, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_smapclear, "smapclear", ex_mapclear, + EXTRA|TRLBAR|CMDWIN), + EX(CMD_smenu, "smenu", ex_menu, + RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_snext, "snext", ex_next, + RANGE|NOTADR|BANG|FILES|EDITCMD|ARGOPT|TRLBAR), + EX(CMD_sniff, "sniff", ex_sniff, + EXTRA|TRLBAR), + EX(CMD_snomagic, "snomagic", ex_submagic, + RANGE|WHOLEFOLD|EXTRA|CMDWIN), + EX(CMD_snoremap, "snoremap", ex_map, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_snoremenu, "snoremenu", ex_menu, + RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_source, "source", ex_source, + BANG|FILE1|TRLBAR|SBOXOK|CMDWIN), + EX(CMD_sort, "sort", ex_sort, + RANGE|DFLALL|WHOLEFOLD|BANG|EXTRA|NOTRLCOM|MODIFY), + EX(CMD_split, "split", ex_splitview, + BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR), + EX(CMD_spellgood, "spellgood", ex_spell, + BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR), + EX(CMD_spelldump, "spelldump", ex_spelldump, + BANG|TRLBAR), + EX(CMD_spellinfo, "spellinfo", ex_spellinfo, + TRLBAR), + EX(CMD_spellrepall, "spellrepall", ex_spellrepall, + TRLBAR), + EX(CMD_spellundo, "spellundo", ex_spell, + BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR), + EX(CMD_spellwrong, "spellwrong", ex_spell, + BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR), + EX(CMD_sprevious, "sprevious", ex_previous, + EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR), + EX(CMD_srewind, "srewind", ex_rewind, + EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR), + EX(CMD_stop, "stop", ex_stop, + TRLBAR|BANG|CMDWIN), + EX(CMD_stag, "stag", ex_stag, + RANGE|NOTADR|BANG|WORD1|TRLBAR|ZEROR), + EX(CMD_startinsert, "startinsert", ex_startinsert, + BANG|TRLBAR|CMDWIN), + EX(CMD_startgreplace, "startgreplace", ex_startinsert, + BANG|TRLBAR|CMDWIN), + EX(CMD_startreplace, "startreplace", ex_startinsert, + BANG|TRLBAR|CMDWIN), + EX(CMD_stopinsert, "stopinsert", ex_stopinsert, + BANG|TRLBAR|CMDWIN), + EX(CMD_stjump, "stjump", ex_stag, + BANG|TRLBAR|WORD1), + EX(CMD_stselect, "stselect", ex_stag, + BANG|TRLBAR|WORD1), + EX(CMD_sunhide, "sunhide", ex_buffer_all, + RANGE|NOTADR|COUNT|TRLBAR), + EX(CMD_sunmap, "sunmap", ex_unmap, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_sunmenu, "sunmenu", ex_menu, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_suspend, "suspend", ex_stop, + TRLBAR|BANG|CMDWIN), + EX(CMD_sview, "sview", ex_splitview, + BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR), + EX(CMD_swapname, "swapname", ex_swapname, + TRLBAR|CMDWIN), + EX(CMD_syntax, "syntax", ex_syntax, + EXTRA|NOTRLCOM|CMDWIN), + EX(CMD_syntime, "syntime", ex_syntime, + NEEDARG|WORD1|TRLBAR|CMDWIN), + EX(CMD_syncbind, "syncbind", ex_syncbind, + TRLBAR), + EX(CMD_t, "t", ex_copymove, + RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN|MODIFY), + EX(CMD_tNext, "tNext", ex_tag, + RANGE|NOTADR|BANG|TRLBAR|ZEROR), + EX(CMD_tag, "tag", ex_tag, + RANGE|NOTADR|BANG|WORD1|TRLBAR|ZEROR), + EX(CMD_tags, "tags", do_tags, + TRLBAR|CMDWIN), + EX(CMD_tab, "tab", ex_wrongmodifier, + NEEDARG|EXTRA|NOTRLCOM), + EX(CMD_tabclose, "tabclose", ex_tabclose, + RANGE|NOTADR|COUNT|BANG|TRLBAR|CMDWIN), + EX(CMD_tabdo, "tabdo", ex_listdo, + NEEDARG|EXTRA|NOTRLCOM), + EX(CMD_tabedit, "tabedit", ex_splitview, + BANG|FILE1|RANGE|NOTADR|ZEROR|EDITCMD|ARGOPT|TRLBAR), + EX(CMD_tabfind, "tabfind", ex_splitview, + BANG|FILE1|RANGE|NOTADR|ZEROR|EDITCMD|ARGOPT|NEEDARG|TRLBAR), + EX(CMD_tabfirst, "tabfirst", ex_tabnext, + TRLBAR), + EX(CMD_tabmove, "tabmove", ex_tabmove, + RANGE|NOTADR|ZEROR|EXTRA|NOSPC|TRLBAR), + EX(CMD_tablast, "tablast", ex_tabnext, + TRLBAR), + EX(CMD_tabnext, "tabnext", ex_tabnext, + RANGE|NOTADR|COUNT|TRLBAR), + EX(CMD_tabnew, "tabnew", ex_splitview, + BANG|FILE1|RANGE|NOTADR|ZEROR|EDITCMD|ARGOPT|TRLBAR), + EX(CMD_tabonly, "tabonly", ex_tabonly, + BANG|TRLBAR|CMDWIN), + EX(CMD_tabprevious, "tabprevious", ex_tabnext, + RANGE|NOTADR|COUNT|TRLBAR), + EX(CMD_tabNext, "tabNext", ex_tabnext, + RANGE|NOTADR|COUNT|TRLBAR), + EX(CMD_tabrewind, "tabrewind", ex_tabnext, + TRLBAR), + EX(CMD_tabs, "tabs", ex_tabs, + TRLBAR|CMDWIN), + EX(CMD_tcl, "tcl", ex_tcl, + RANGE|EXTRA|NEEDARG|CMDWIN), + EX(CMD_tcldo, "tcldo", ex_tcldo, + RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN), + EX(CMD_tclfile, "tclfile", ex_tclfile, + RANGE|FILE1|NEEDARG|CMDWIN), + EX(CMD_tearoff, "tearoff", ex_tearoff, + NEEDARG|EXTRA|TRLBAR|NOTRLCOM|CMDWIN), + EX(CMD_tfirst, "tfirst", ex_tag, + RANGE|NOTADR|BANG|TRLBAR|ZEROR), + EX(CMD_throw, "throw", ex_throw, + EXTRA|NEEDARG|SBOXOK|CMDWIN), + EX(CMD_tjump, "tjump", ex_tag, + BANG|TRLBAR|WORD1), + EX(CMD_tlast, "tlast", ex_tag, + BANG|TRLBAR), + EX(CMD_tmenu, "tmenu", ex_menu, + RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_tnext, "tnext", ex_tag, + RANGE|NOTADR|BANG|TRLBAR|ZEROR), + EX(CMD_topleft, "topleft", ex_wrongmodifier, + NEEDARG|EXTRA|NOTRLCOM), + EX(CMD_tprevious, "tprevious", ex_tag, + RANGE|NOTADR|BANG|TRLBAR|ZEROR), + EX(CMD_trewind, "trewind", ex_tag, + RANGE|NOTADR|BANG|TRLBAR|ZEROR), + EX(CMD_try, "try", ex_try, + TRLBAR|SBOXOK|CMDWIN), + EX(CMD_tselect, "tselect", ex_tag, + BANG|TRLBAR|WORD1), + EX(CMD_tunmenu, "tunmenu", ex_menu, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_undo, "undo", ex_undo, + RANGE|NOTADR|COUNT|ZEROR|TRLBAR|CMDWIN), + EX(CMD_undojoin, "undojoin", ex_undojoin, + TRLBAR|CMDWIN), + EX(CMD_undolist, "undolist", ex_undolist, + TRLBAR|CMDWIN), + EX(CMD_unabbreviate, "unabbreviate", ex_abbreviate, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_unhide, "unhide", ex_buffer_all, + RANGE|NOTADR|COUNT|TRLBAR), + EX(CMD_unlet, "unlet", ex_unlet, + BANG|EXTRA|NEEDARG|SBOXOK|CMDWIN), + EX(CMD_unlockvar, "unlockvar", ex_lockvar, + BANG|EXTRA|NEEDARG|SBOXOK|CMDWIN), + EX(CMD_unmap, "unmap", ex_unmap, + BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_unmenu, "unmenu", ex_menu, + BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_unsilent, "unsilent", ex_wrongmodifier, + NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN), + EX(CMD_update, "update", ex_update, + RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR), + EX(CMD_vglobal, "vglobal", ex_global, + RANGE|WHOLEFOLD|EXTRA|DFLALL|CMDWIN), + EX(CMD_version, "version", ex_version, + EXTRA|TRLBAR|CMDWIN), + EX(CMD_verbose, "verbose", ex_wrongmodifier, + NEEDARG|RANGE|NOTADR|EXTRA|NOTRLCOM|SBOXOK|CMDWIN), + EX(CMD_vertical, "vertical", ex_wrongmodifier, + NEEDARG|EXTRA|NOTRLCOM), + EX(CMD_visual, "visual", ex_edit, + BANG|FILE1|EDITCMD|ARGOPT|TRLBAR), + EX(CMD_view, "view", ex_edit, + BANG|FILE1|EDITCMD|ARGOPT|TRLBAR), + EX(CMD_vimgrep, "vimgrep", ex_vimgrep, + RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE), + EX(CMD_vimgrepadd, "vimgrepadd", ex_vimgrep, + RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE), + EX(CMD_viusage, "viusage", ex_viusage, + TRLBAR), + EX(CMD_vmap, "vmap", ex_map, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_vmapclear, "vmapclear", ex_mapclear, + EXTRA|TRLBAR|CMDWIN), + EX(CMD_vmenu, "vmenu", ex_menu, + RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_vnoremap, "vnoremap", ex_map, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_vnew, "vnew", ex_splitview, + BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR), + EX(CMD_vnoremenu, "vnoremenu", ex_menu, + RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_vsplit, "vsplit", ex_splitview, + BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR), + EX(CMD_vunmap, "vunmap", ex_unmap, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_vunmenu, "vunmenu", ex_menu, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_write, "write", ex_write, + RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR|CMDWIN), + EX(CMD_wNext, "wNext", ex_wnext, + RANGE|WHOLEFOLD|NOTADR|BANG|FILE1|ARGOPT|TRLBAR), + EX(CMD_wall, "wall", do_wqall, + BANG|TRLBAR|CMDWIN), + EX(CMD_while, "while", ex_while, + EXTRA|NOTRLCOM|SBOXOK|CMDWIN), + EX(CMD_winsize, "winsize", ex_winsize, + EXTRA|NEEDARG|TRLBAR), + EX(CMD_wincmd, "wincmd", ex_wincmd, + NEEDARG|WORD1|RANGE|NOTADR), + EX(CMD_windo, "windo", ex_listdo, + BANG|NEEDARG|EXTRA|NOTRLCOM), + EX(CMD_winpos, "winpos", ex_winpos, + EXTRA|TRLBAR|CMDWIN), + EX(CMD_wnext, "wnext", ex_wnext, + RANGE|NOTADR|BANG|FILE1|ARGOPT|TRLBAR), + EX(CMD_wprevious, "wprevious", ex_wnext, + RANGE|NOTADR|BANG|FILE1|ARGOPT|TRLBAR), + EX(CMD_wq, "wq", ex_exit, + RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR), + EX(CMD_wqall, "wqall", do_wqall, + BANG|FILE1|ARGOPT|DFLALL|TRLBAR), + EX(CMD_wsverb, "wsverb", ex_wsverb, + EXTRA|NOTADR|NEEDARG), + EX(CMD_wundo, "wundo", ex_wundo, + BANG|NEEDARG|FILE1), + EX(CMD_wviminfo, "wviminfo", ex_viminfo, + BANG|FILE1|TRLBAR|CMDWIN), + EX(CMD_xit, "xit", ex_exit, + RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR|CMDWIN), + EX(CMD_xall, "xall", do_wqall, + BANG|TRLBAR), + EX(CMD_xmap, "xmap", ex_map, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_xmapclear, "xmapclear", ex_mapclear, + EXTRA|TRLBAR|CMDWIN), + EX(CMD_xmenu, "xmenu", ex_menu, + RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_xnoremap, "xnoremap", ex_map, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_xnoremenu, "xnoremenu", ex_menu, + RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_xunmap, "xunmap", ex_unmap, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_xunmenu, "xunmenu", ex_menu, + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_yank, "yank", ex_operators, + RANGE|WHOLEFOLD|REGSTR|COUNT|TRLBAR|CMDWIN), + EX(CMD_z, "z", ex_z, + RANGE|WHOLEFOLD|EXTRA|EXFLAGS|TRLBAR|CMDWIN), + + /* commands that don't start with a lowercase letter */ + EX(CMD_bang, "!", ex_bang, + RANGE|WHOLEFOLD|BANG|FILES|CMDWIN), + EX(CMD_pound, "#", ex_print, + RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN), + EX(CMD_and, "&", do_sub, + RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY), + EX(CMD_star, "*", ex_at, + RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN), + EX(CMD_lshift, "<", ex_operators, + RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN|MODIFY), + EX(CMD_equal, "=", ex_equal, + RANGE|TRLBAR|DFLALL|EXFLAGS|CMDWIN), + EX(CMD_rshift, ">", ex_operators, + RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN|MODIFY), + EX(CMD_at, "@", ex_at, + RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN), + EX(CMD_Next, "Next", ex_previous, + EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR), + EX(CMD_Print, "Print", ex_print, + RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN), + EX(CMD_X, "X", ex_X, + TRLBAR), + EX(CMD_tilde, "~", do_sub, + RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY), + +#ifndef DO_DECLARE_EXCMD + CMD_SIZE, /* MUST be after all real commands! */ + CMD_USER = -1, /* User-defined command */ + CMD_USER_BUF = -2 /* User-defined command local to buffer */ +#endif +}; + +#define USER_CMDIDX(idx) ((int)(idx) < 0) + +#ifndef DO_DECLARE_EXCMD +typedef enum CMD_index cmdidx_T; + +/* + * Arguments used for Ex commands. + */ +struct exarg { + char_u *arg; /* argument of the command */ + char_u *nextcmd; /* next command (NULL if none) */ + char_u *cmd; /* the name of the command (except for :make) */ + char_u **cmdlinep; /* pointer to pointer of allocated cmdline */ + cmdidx_T cmdidx; /* the index for the command */ + long argt; /* flags for the command */ + int skip; /* don't execute the command, only parse it */ + int forceit; /* TRUE if ! present */ + int addr_count; /* the number of addresses given */ + linenr_T line1; /* the first line number */ + linenr_T line2; /* the second line number or count */ + int flags; /* extra flags after count: EXFLAG_ */ + char_u *do_ecmd_cmd; /* +command arg to be used in edited file */ + linenr_T do_ecmd_lnum; /* the line number in an edited file */ + int append; /* TRUE with ":w >>file" command */ + int usefilter; /* TRUE with ":w !command" and ":r!command" */ + int amount; /* number of '>' or '<' for shift command */ + int regname; /* register name (NUL if none) */ + int force_bin; /* 0, FORCE_BIN or FORCE_NOBIN */ + int read_edit; /* ++edit argument */ + int force_ff; /* ++ff= argument (index in cmd[]) */ + int force_enc; /* ++enc= argument (index in cmd[]) */ + 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)); + void *cookie; /* argument for getline() */ + struct condstack *cstack; /* condition stack for ":if" etc. */ +}; + +#define FORCE_BIN 1 /* ":edit ++bin file" */ +#define FORCE_NOBIN 2 /* ":edit ++nobin file" */ + +/* Values for "flags" */ +#define EXFLAG_LIST 0x01 /* 'l': list */ +#define EXFLAG_NR 0x02 /* '#': number */ +#define EXFLAG_PRINT 0x04 /* 'p': print */ + +#endif diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 0a31ccc108..35aa970aac 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -12,6 +12,48 @@ */ #include "vim.h" +#include "ex_docmd.h" +#include "blowfish.h" +#include "buffer.h" +#include "charset.h" +#include "diff.h" +#include "digraph.h" +#include "edit.h" +#include "eval.h" +#include "ex_cmds.h" +#include "ex_cmds2.h" +#include "ex_eval.h" +#include "ex_getln.h" +#include "fileio.h" +#include "fold.h" +#include "getchar.h" +#include "hardcopy.h" +#include "if_cscope.h" +#include "main.h" +#include "mark.h" +#include "mbyte.h" +#include "memline.h" +#include "menu.h" +#include "message.h" +#include "misc1.h" +#include "misc2.h" +#include "move.h" +#include "normal.h" +#include "ops.h" +#include "option.h" +#include "os_unix.h" +#include "quickfix.h" +#include "regexp.h" +#include "screen.h" +#include "search.h" +#include "spell.h" +#include "syntax.h" +#include "tag.h" +#include "term.h" +#include "ui.h" +#include "undo.h" +#include "version.h" +#include "window.h" #include "os/os.h" static int quitmore = 0; @@ -223,7 +265,7 @@ static void ex_folddo __ARGS((exarg_T *eap)); * Declare cmdnames[]. */ #define DO_DECLARE_EXCMD -#include "ex_cmds.h" +#include "ex_cmds_defs.h" /* * Table used to quickly search for a command, based on its first character. diff --git a/src/ex_docmd.h b/src/ex_docmd.h new file mode 100644 index 0000000000..f3f9ca16ec --- /dev/null +++ b/src/ex_docmd.h @@ -0,0 +1,72 @@ +#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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_EX_DOCMD_H */ diff --git a/src/ex_eval.c b/src/ex_eval.c index 3ccac9e84f..e4148068f5 100644 --- a/src/ex_eval.c +++ b/src/ex_eval.c @@ -12,6 +12,14 @@ */ #include "vim.h" +#include "ex_eval.h" +#include "charset.h" +#include "eval.h" +#include "ex_cmds2.h" +#include "ex_docmd.h" +#include "message.h" +#include "misc2.h" +#include "regexp.h" static void free_msglist __ARGS((struct msglist *l)); diff --git a/src/ex_eval.h b/src/ex_eval.h new file mode 100644 index 0000000000..3685899063 --- /dev/null +++ b/src/ex_eval.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_EX_EVAL_H */ diff --git a/src/ex_getln.c b/src/ex_getln.c index 83a0fd3dcc..c3f389e279 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -12,6 +12,37 @@ */ #include "vim.h" +#include "ex_getln.h" +#include "buffer.h" +#include "charset.h" +#include "digraph.h" +#include "edit.h" +#include "eval.h" +#include "ex_cmds.h" +#include "ex_cmds2.h" +#include "ex_docmd.h" +#include "ex_eval.h" +#include "fileio.h" +#include "getchar.h" +#include "if_cscope.h" +#include "main.h" +#include "mbyte.h" +#include "memline.h" +#include "menu.h" +#include "message.h" +#include "misc1.h" +#include "misc2.h" +#include "move.h" +#include "ops.h" +#include "option.h" +#include "os_unix.h" +#include "regexp.h" +#include "screen.h" +#include "search.h" +#include "syntax.h" +#include "tag.h" +#include "term.h" +#include "window.h" #include "os/os.h" /* diff --git a/src/ex_getln.h b/src/ex_getln.h new file mode 100644 index 0000000000..bf04476e2f --- /dev/null +++ b/src/ex_getln.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_EX_GETLN_H */ diff --git a/src/farsi.c b/src/farsi.c index 9c28284166..f3c55216f2 100644 --- a/src/farsi.c +++ b/src/farsi.c @@ -7,6 +7,10 @@ * See README.txt for an overview of the Vim source code. */ +#include "farsi.h" +#include "edit.h" +#include "ex_getln.h" + /* * farsi.c: functions for Farsi language * diff --git a/src/farsi.h b/src/farsi.h index a9dd2fb79f..84c3402431 100644 --- a/src/farsi.h +++ b/src/farsi.h @@ -6,6 +6,9 @@ * Do ":help credits" in Vim to see a list of people who contributed. */ +#ifndef NEOVIM_FARSI_H +#define NEOVIM_FARSI_H + /* * Farsi characters are categorized into following types: * @@ -224,3 +227,5 @@ EXTERN char_u farsi_text_5[] = { ' ', YE_, _SIN, RE, ALEF_, _FE, '\0'} #endif ; + +#endif /* NEOVIM_FARSI_H */ diff --git a/src/fileio.c b/src/fileio.c index 8dc31c31c6..482c47e17d 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -12,6 +12,37 @@ */ #include "vim.h" +#include "fileio.h" +#include "blowfish.h" +#include "buffer.h" +#include "charset.h" +#include "diff.h" +#include "edit.h" +#include "eval.h" +#include "ex_cmds.h" +#include "ex_docmd.h" +#include "ex_eval.h" +#include "fold.h" +#include "getchar.h" +#include "hashtab.h" +#include "mbyte.h" +#include "memfile.h" +#include "memline.h" +#include "message.h" +#include "misc1.h" +#include "misc2.h" +#include "move.h" +#include "option.h" +#include "os_unix.h" +#include "quickfix.h" +#include "regexp.h" +#include "screen.h" +#include "search.h" +#include "sha256.h" +#include "term.h" +#include "ui.h" +#include "undo.h" +#include "window.h" #include "os/os.h" diff --git a/src/fileio.h b/src/fileio.h new file mode 100644 index 0000000000..add97d37d6 --- /dev/null +++ b/src/fileio.h @@ -0,0 +1,85 @@ +#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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_FILEIO_H */ diff --git a/src/fold.c b/src/fold.c index 7a967d8be0..47e5cdfdd2 100644 --- a/src/fold.c +++ b/src/fold.c @@ -13,7 +13,21 @@ */ #include "vim.h" - +#include "fold.h" +#include "charset.h" +#include "diff.h" +#include "eval.h" +#include "ex_docmd.h" +#include "mark.h" +#include "memline.h" +#include "message.h" +#include "misc1.h" +#include "misc2.h" +#include "move.h" +#include "option.h" +#include "screen.h" +#include "syntax.h" +#include "undo.h" /* local declarations. {{{1 */ /* typedef fold_T {{{2 */ diff --git a/src/fold.h b/src/fold.h new file mode 100644 index 0000000000..3ad08b01e5 --- /dev/null +++ b/src/fold.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_FOLD_H */ diff --git a/src/getchar.c b/src/getchar.c index 91779b348a..7303e3739e 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -17,6 +17,27 @@ */ #include "vim.h" +#include "getchar.h" +#include "charset.h" +#include "edit.h" +#include "eval.h" +#include "ex_docmd.h" +#include "ex_getln.h" +#include "main.h" +#include "mbyte.h" +#include "memline.h" +#include "message.h" +#include "misc1.h" +#include "misc2.h" +#include "move.h" +#include "normal.h" +#include "ops.h" +#include "option.h" +#include "regexp.h" +#include "screen.h" +#include "term.h" +#include "ui.h" +#include "undo.h" /* * These buffers are used for storing: diff --git a/src/getchar.h b/src/getchar.h new file mode 100644 index 0000000000..131286ee50 --- /dev/null +++ b/src/getchar.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_GETCHAR_H */ diff --git a/src/globals.h b/src/globals.h index e6db0d866b..056c098368 100644 --- a/src/globals.h +++ b/src/globals.h @@ -6,6 +6,11 @@ * Do ":help credits" in Vim to see a list of people who contributed. */ +#ifndef NEOVIM_GLOBALS_H +#define NEOVIM_GLOBALS_H + +#include "mbyte.h" + /* * definition of global variables */ @@ -1197,3 +1202,5 @@ EXTERN char *ignoredp; * Optional Arabic support. Include it here, so EXTERN and INIT are defined. */ # include "arabic.h" + +#endif /* NEOVIM_GLOBALS_H */ diff --git a/src/hangulin.c b/src/hangulin.c index c04a1800ba..185bf0a5bd 100644 --- a/src/hangulin.c +++ b/src/hangulin.c @@ -8,6 +8,12 @@ */ #include "vim.h" +#include "hangulin.h" +#include "message.h" +#include "misc1.h" +#include "screen.h" +#include "term.h" +#include "ui.h" #ifndef HANGUL_DEFAULT_KEYBOARD # define HANGUL_DEFAULT_KEYBOARD 3 diff --git a/src/hangulin.h b/src/hangulin.h new file mode 100644 index 0000000000..1023955c0d --- /dev/null +++ b/src/hangulin.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_HANGULIN_H */ diff --git a/src/hardcopy.c b/src/hardcopy.c index 9ebe087bca..4f5ef53799 100644 --- a/src/hardcopy.c +++ b/src/hardcopy.c @@ -12,7 +12,24 @@ */ #include "vim.h" -#include "version.h" +#include "version_defs.h" +#include "hardcopy.h" +#include "buffer.h" +#include "charset.h" +#include "eval.h" +#include "ex_cmds2.h" +#include "ex_docmd.h" +#include "fileio.h" +#include "mbyte.h" +#include "memline.h" +#include "message.h" +#include "misc1.h" +#include "misc2.h" +#include "option.h" +#include "screen.h" +#include "syntax.h" +#include "term.h" +#include "ui.h" /* * To implement printing on a platform, the following functions must be diff --git a/src/hardcopy.h b/src/hardcopy.h new file mode 100644 index 0000000000..84cbe02be8 --- /dev/null +++ b/src/hardcopy.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_HARDCOPY_H */ diff --git a/src/hashtab.c b/src/hashtab.c index 2682885113..cdea743777 100644 --- a/src/hashtab.c +++ b/src/hashtab.c @@ -28,8 +28,9 @@ */ #include "vim.h" - - +#include "hashtab.h" +#include "message.h" +#include "misc2.h" /* Magic value for algorithm that walks through the array. */ #define PERTURB_SHIFT 5 diff --git a/src/hashtab.h b/src/hashtab.h new file mode 100644 index 0000000000..a1dfa63162 --- /dev/null +++ b/src/hashtab.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_HASHTAB_H */ diff --git a/src/if_cscope.c b/src/if_cscope.c index cbdcf6b255..47a835a314 100644 --- a/src/if_cscope.c +++ b/src/if_cscope.c @@ -10,14 +10,25 @@ */ #include "vim.h" - +#include "if_cscope.h" +#include "charset.h" +#include "eval.h" +#include "fileio.h" +#include "message.h" +#include "misc1.h" +#include "misc2.h" +#include "os_unix.h" +#include "quickfix.h" +#include "tag.h" +#include "ui.h" +#include "window.h" #include #include #if defined(UNIX) # include #endif -#include "if_cscope.h" +#include "if_cscope_defs.h" static void cs_usage_msg __ARGS((csid_e x)); static int cs_add __ARGS((exarg_T *eap)); @@ -542,7 +553,7 @@ staterr: #if defined(UNIX) else if (S_ISREG(statbuf.st_mode) || S_ISLNK(statbuf.st_mode)) #else - /* WIN32 - substitute define S_ISREG from os_unix.h */ + /* WIN32 - substitute define S_ISREG from os_unix_defs.h */ else if (((statbuf.st_mode) & S_IFMT) == S_IFREG) #endif { diff --git a/src/if_cscope.h b/src/if_cscope.h index 3ed89715fc..35cf432c46 100644 --- a/src/if_cscope.h +++ b/src/if_cscope.h @@ -1,72 +1,16 @@ -/* vi:set ts=8 sts=4 sw=4: - * - * CSCOPE support for Vim added by Andy Kahn - * Ported to Win32 by Sergey Khorev - * - * The basic idea/structure of cscope for Vim was borrowed from Nvi. - * There might be a few lines of code that look similar to what Nvi - * has. If this is a problem and requires inclusion of the annoying - * BSD license, then sue me; I'm not worth much anyway. - */ - - -#if defined(UNIX) -# include /* pid_t */ -# include /* dev_t, ino_t */ -#else -#endif - -#define CSCOPE_SUCCESS 0 -#define CSCOPE_FAILURE -1 - -#define CSCOPE_DBFILE "cscope.out" -#define CSCOPE_PROMPT ">> " - -/* - * s 0name Find this C symbol - * g 1name Find this definition - * d 2name Find functions called by this function - * c 3name Find functions calling this function - * t 4string find text string (cscope 12.9) - * t 4name Find assignments to (cscope 13.3) - * 5pattern change pattern -- NOT USED - * e 6pattern Find this egrep pattern - * f 7name Find this file - * i 8name Find files #including this file - */ - -typedef struct { - char * name; - int (*func)__ARGS((exarg_T *eap)); - char * help; - char * usage; - int cansplit; /* if supports splitting window */ -} cscmd_T; - -typedef struct csi { - char * fname; /* cscope db name */ - char * ppath; /* path to prepend (the -P option) */ - char * flags; /* additional cscope flags/options (e.g, -p2) */ -#if defined(UNIX) - pid_t pid; /* PID of the connected cscope process. */ - dev_t st_dev; /* ID of dev containing cscope db */ - ino_t st_ino; /* inode number of cscope db */ -#else -#endif - - FILE * fr_fp; /* from cscope: FILE. */ - FILE * to_fp; /* to cscope: FILE. */ -} csinfo_T; - -typedef enum { Add, Find, Help, Kill, Reset, Show } csid_e; - -typedef enum { - Store, - Get, - Free, - Print -} mcmd_e; - - - -/* the end */ +#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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_IF_CSCOPE_H */ diff --git a/src/if_cscope_defs.h b/src/if_cscope_defs.h new file mode 100644 index 0000000000..3ed89715fc --- /dev/null +++ b/src/if_cscope_defs.h @@ -0,0 +1,72 @@ +/* vi:set ts=8 sts=4 sw=4: + * + * CSCOPE support for Vim added by Andy Kahn + * Ported to Win32 by Sergey Khorev + * + * The basic idea/structure of cscope for Vim was borrowed from Nvi. + * There might be a few lines of code that look similar to what Nvi + * has. If this is a problem and requires inclusion of the annoying + * BSD license, then sue me; I'm not worth much anyway. + */ + + +#if defined(UNIX) +# include /* pid_t */ +# include /* dev_t, ino_t */ +#else +#endif + +#define CSCOPE_SUCCESS 0 +#define CSCOPE_FAILURE -1 + +#define CSCOPE_DBFILE "cscope.out" +#define CSCOPE_PROMPT ">> " + +/* + * s 0name Find this C symbol + * g 1name Find this definition + * d 2name Find functions called by this function + * c 3name Find functions calling this function + * t 4string find text string (cscope 12.9) + * t 4name Find assignments to (cscope 13.3) + * 5pattern change pattern -- NOT USED + * e 6pattern Find this egrep pattern + * f 7name Find this file + * i 8name Find files #including this file + */ + +typedef struct { + char * name; + int (*func)__ARGS((exarg_T *eap)); + char * help; + char * usage; + int cansplit; /* if supports splitting window */ +} cscmd_T; + +typedef struct csi { + char * fname; /* cscope db name */ + char * ppath; /* path to prepend (the -P option) */ + char * flags; /* additional cscope flags/options (e.g, -p2) */ +#if defined(UNIX) + pid_t pid; /* PID of the connected cscope process. */ + dev_t st_dev; /* ID of dev containing cscope db */ + ino_t st_ino; /* inode number of cscope db */ +#else +#endif + + FILE * fr_fp; /* from cscope: FILE. */ + FILE * to_fp; /* to cscope: FILE. */ +} csinfo_T; + +typedef enum { Add, Find, Help, Kill, Reset, Show } csid_e; + +typedef enum { + Store, + Get, + Free, + Print +} mcmd_e; + + + +/* the end */ diff --git a/src/keymap.h b/src/keymap.h index 766413c30c..140eee5322 100644 --- a/src/keymap.h +++ b/src/keymap.h @@ -14,7 +14,7 @@ /* * For MSDOS some keys produce codes larger than 0xff. They are split into two - * chars, the first one is K_NUL (same value used in term.h). + * chars, the first one is K_NUL (same value used in term_defs.h). */ #define K_NUL (0xce) /* for MSDOS: special key follows */ diff --git a/src/main.c b/src/main.c index f6093a5b38..418c579209 100644 --- a/src/main.c +++ b/src/main.c @@ -9,6 +9,38 @@ #define EXTERN #include "vim.h" +#include "main.h" +#include "blowfish.h" +#include "buffer.h" +#include "charset.h" +#include "diff.h" +#include "eval.h" +#include "ex_cmds.h" +#include "ex_cmds2.h" +#include "ex_docmd.h" +#include "fileio.h" +#include "fold.h" +#include "getchar.h" +#include "hashtab.h" +#include "if_cscope.h" +#include "mark.h" +#include "mbyte.h" +#include "memline.h" +#include "message.h" +#include "misc1.h" +#include "misc2.h" +#include "move.h" +#include "normal.h" +#include "ops.h" +#include "option.h" +#include "os_unix.h" +#include "quickfix.h" +#include "screen.h" +#include "syntax.h" +#include "term.h" +#include "ui.h" +#include "version.h" +#include "window.h" /* Maximum number of commands from + or -c arguments. */ #define MAX_ARG_CMDS 10 diff --git a/src/main.h b/src/main.h new file mode 100644 index 0000000000..1e407ae154 --- /dev/null +++ b/src/main.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_MAIN_H */ diff --git a/src/mark.c b/src/mark.c index 52f51b7679..db274cda50 100644 --- a/src/mark.c +++ b/src/mark.c @@ -12,6 +12,24 @@ */ #include "vim.h" +#include "mark.h" +#include "buffer.h" +#include "charset.h" +#include "diff.h" +#include "eval.h" +#include "ex_cmds.h" +#include "fileio.h" +#include "fold.h" +#include "mbyte.h" +#include "memline.h" +#include "message.h" +#include "misc1.h" +#include "misc2.h" +#include "option.h" +#include "quickfix.h" +#include "search.h" +#include "term.h" +#include "ui.h" #include "os/os.h" /* diff --git a/src/mark.h b/src/mark.h new file mode 100644 index 0000000000..f78a41bbc4 --- /dev/null +++ b/src/mark.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_MARK_H */ diff --git a/src/mbyte.c b/src/mbyte.c index dfbaf29f1b..8a1fbef901 100644 --- a/src/mbyte.c +++ b/src/mbyte.c @@ -78,6 +78,17 @@ */ #include "vim.h" +#include "mbyte.h" +#include "charset.h" +#include "fileio.h" +#include "memline.h" +#include "message.h" +#include "misc1.h" +#include "misc2.h" +#include "option.h" +#include "screen.h" +#include "spell.h" +#include "ui.h" # define WINBYTE BYTE diff --git a/src/mbyte.h b/src/mbyte.h new file mode 100644 index 0000000000..b9b5aa05d7 --- /dev/null +++ b/src/mbyte.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_MBYTE_H */ diff --git a/src/memfile.c b/src/memfile.c index f4a49b1cef..d3b8bed6cc 100644 --- a/src/memfile.c +++ b/src/memfile.c @@ -33,6 +33,14 @@ */ #include "vim.h" +#include "memfile.h" +#include "fileio.h" +#include "memline.h" +#include "message.h" +#include "misc1.h" +#include "misc2.h" +#include "os_unix.h" +#include "ui.h" /* * Some systems have the page size in statfs.f_bsize, some in stat.st_blksize diff --git a/src/memfile.h b/src/memfile.h new file mode 100644 index 0000000000..0ea6b9fd17 --- /dev/null +++ b/src/memfile.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_MEMFILE_H */ diff --git a/src/memline.c b/src/memline.c index 09818a5115..292d09a37a 100644 --- a/src/memline.c +++ b/src/memline.c @@ -43,9 +43,30 @@ */ #include "vim.h" +#include "memline.h" +#include "blowfish.h" +#include "buffer.h" +#include "eval.h" +#include "fileio.h" +#include "main.h" +#include "mark.h" +#include "mbyte.h" +#include "memfile.h" +#include "message.h" +#include "misc1.h" +#include "misc2.h" +#include "option.h" +#include "os_unix.h" +#include "screen.h" +#include "sha256.h" +#include "spell.h" +#include "term.h" +#include "ui.h" +#include "undo.h" +#include "window.h" #include "os/os.h" -#ifndef UNIX /* it's in os_unix.h for Unix */ +#ifndef UNIX /* it's in os_unix_defs.h for Unix */ # include #endif diff --git a/src/memline.h b/src/memline.h new file mode 100644 index 0000000000..7a18633d25 --- /dev/null +++ b/src/memline.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_MEMLINE_H */ diff --git a/src/menu.c b/src/menu.c index bb62296a61..95ac7bd5f5 100644 --- a/src/menu.c +++ b/src/menu.c @@ -13,6 +13,15 @@ */ #include "vim.h" +#include "menu.h" +#include "charset.h" +#include "eval.h" +#include "ex_docmd.h" +#include "getchar.h" +#include "message.h" +#include "misc1.h" +#include "misc2.h" +#include "term.h" #define MENUDEPTH 10 /* maximum depth of menus */ diff --git a/src/menu.h b/src/menu.h new file mode 100644 index 0000000000..0d76b523bd --- /dev/null +++ b/src/menu.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_MENU_H */ diff --git a/src/message.c b/src/message.c index 062a196636..99d52380a4 100644 --- a/src/message.c +++ b/src/message.c @@ -14,6 +14,20 @@ #define MESSAGE_FILE /* don't include prototype for smsg() */ #include "vim.h" +#include "message.h" +#include "charset.h" +#include "eval.h" +#include "ex_eval.h" +#include "fileio.h" +#include "getchar.h" +#include "mbyte.h" +#include "misc1.h" +#include "misc2.h" +#include "ops.h" +#include "option.h" +#include "screen.h" +#include "term.h" +#include "ui.h" #if defined(FEAT_FLOAT) && defined(HAVE_MATH_H) # include diff --git a/src/message.h b/src/message.h new file mode 100644 index 0000000000..bd1ef4242c --- /dev/null +++ b/src/message.h @@ -0,0 +1,83 @@ +#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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_MESSAGE_H */ diff --git a/src/misc1.c b/src/misc1.c index 98ed65a08b..2d59948e60 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -12,7 +12,36 @@ */ #include "vim.h" -#include "version.h" +#include "version_defs.h" +#include "misc1.h" +#include "charset.h" +#include "diff.h" +#include "edit.h" +#include "eval.h" +#include "ex_cmds.h" +#include "ex_docmd.h" +#include "ex_getln.h" +#include "fileio.h" +#include "fold.h" +#include "getchar.h" +#include "main.h" +#include "mark.h" +#include "mbyte.h" +#include "memline.h" +#include "message.h" +#include "misc2.h" +#include "move.h" +#include "option.h" +#include "os_unix.h" +#include "quickfix.h" +#include "regexp.h" +#include "screen.h" +#include "search.h" +#include "tag.h" +#include "term.h" +#include "ui.h" +#include "undo.h" +#include "window.h" #include "os/os.h" static char_u *vim_version_dir __ARGS((char_u *vimdir)); diff --git a/src/misc1.h b/src/misc1.h new file mode 100644 index 0000000000..ea7cb1b7e7 --- /dev/null +++ b/src/misc1.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_MISC1_H */ diff --git a/src/misc2.c b/src/misc2.c index da90eedb55..544a45a315 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -11,6 +11,28 @@ * misc2.c: Various functions. */ #include "vim.h" +#include "misc2.h" +#include "blowfish.h" +#include "charset.h" +#include "edit.h" +#include "eval.h" +#include "ex_docmd.h" +#include "ex_getln.h" +#include "fileio.h" +#include "fold.h" +#include "mbyte.h" +#include "memfile.h" +#include "memline.h" +#include "message.h" +#include "misc1.h" +#include "move.h" +#include "option.h" +#include "os_unix.h" +#include "screen.h" +#include "tag.h" +#include "term.h" +#include "ui.h" +#include "window.h" #include "os/os.h" static char_u *username = NULL; /* cached result of mch_get_user_name() */ diff --git a/src/misc2.h b/src/misc2.h new file mode 100644 index 0000000000..7beb681661 --- /dev/null +++ b/src/misc2.h @@ -0,0 +1,136 @@ +#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)); +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)); +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)); +void *vim_findfile_init __ARGS((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)); +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, + int first, char_u *path_option, + int find_what, char_u *rel_fname, + char_u *suffixes)); +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_MISC2_H */ diff --git a/src/move.c b/src/move.c index 60547e4a94..d83cfc6b13 100644 --- a/src/move.c +++ b/src/move.c @@ -18,6 +18,17 @@ */ #include "vim.h" +#include "move.h" +#include "charset.h" +#include "diff.h" +#include "edit.h" +#include "fold.h" +#include "mbyte.h" +#include "memline.h" +#include "misc1.h" +#include "misc2.h" +#include "popupmnu.h" +#include "screen.h" static void comp_botline __ARGS((win_T *wp)); static int scrolljump_value __ARGS((void)); diff --git a/src/move.h b/src/move.h new file mode 100644 index 0000000000..bf3371fa2d --- /dev/null +++ b/src/move.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_MOVE_H */ diff --git a/src/normal.c b/src/normal.c index 2a8327a451..75b9319d95 100644 --- a/src/normal.c +++ b/src/normal.c @@ -13,6 +13,39 @@ */ #include "vim.h" +#include "normal.h" +#include "buffer.h" +#include "charset.h" +#include "diff.h" +#include "digraph.h" +#include "edit.h" +#include "eval.h" +#include "ex_cmds.h" +#include "ex_cmds2.h" +#include "ex_docmd.h" +#include "ex_getln.h" +#include "fileio.h" +#include "fold.h" +#include "getchar.h" +#include "main.h" +#include "mark.h" +#include "memline.h" +#include "message.h" +#include "misc1.h" +#include "misc2.h" +#include "move.h" +#include "ops.h" +#include "option.h" +#include "quickfix.h" +#include "screen.h" +#include "search.h" +#include "spell.h" +#include "syntax.h" +#include "tag.h" +#include "term.h" +#include "ui.h" +#include "undo.h" +#include "window.h" /* * The Visual area is remembered for reselection. diff --git a/src/normal.h b/src/normal.h new file mode 100644 index 0000000000..171c4c928d --- /dev/null +++ b/src/normal.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_NORMAL_H */ diff --git a/src/ops.c b/src/ops.c index 8b2a728acb..5fb256e30d 100644 --- a/src/ops.c +++ b/src/ops.c @@ -13,6 +13,31 @@ */ #include "vim.h" +#include "ops.h" +#include "buffer.h" +#include "charset.h" +#include "edit.h" +#include "eval.h" +#include "ex_cmds.h" +#include "ex_cmds2.h" +#include "ex_getln.h" +#include "fold.h" +#include "getchar.h" +#include "mark.h" +#include "mbyte.h" +#include "memline.h" +#include "message.h" +#include "misc1.h" +#include "misc2.h" +#include "move.h" +#include "normal.h" +#include "option.h" +#include "screen.h" +#include "search.h" +#include "term.h" +#include "ui.h" +#include "undo.h" +#include "window.h" /* * Number of registers. diff --git a/src/ops.h b/src/ops.h new file mode 100644 index 0000000000..f9fcbb2656 --- /dev/null +++ b/src/ops.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_OPS_H */ diff --git a/src/option.c b/src/option.c index 60bf6a663f..ded6fc1314 100644 --- a/src/option.c +++ b/src/option.c @@ -11,7 +11,7 @@ * Code to handle user-settable options. This is all pretty much table- * driven. Checklist for adding a new option: * - Put it in the options array below (copy an existing entry). - * - For a global option: Add a variable for it in option.h. + * - For a global option: Add a variable for it in option_defs.h. * - For a buffer or window local option: * - Add a PV_XX entry to the enum below. * - Add a variable to the window or buffer struct in structs.h. @@ -33,6 +33,37 @@ #define IN_OPTION_C #include "vim.h" +#include "option.h" +#include "blowfish.h" +#include "buffer.h" +#include "charset.h" +#include "diff.h" +#include "digraph.h" +#include "eval.h" +#include "ex_cmds2.h" +#include "ex_docmd.h" +#include "ex_getln.h" +#include "fileio.h" +#include "fold.h" +#include "getchar.h" +#include "hardcopy.h" +#include "mbyte.h" +#include "memfile.h" +#include "memline.h" +#include "message.h" +#include "misc1.h" +#include "misc2.h" +#include "move.h" +#include "normal.h" +#include "os_unix.h" +#include "regexp.h" +#include "screen.h" +#include "spell.h" +#include "syntax.h" +#include "term.h" +#include "ui.h" +#include "undo.h" +#include "window.h" /* * The options that are local to a window or buffer have "indir" set to one of @@ -52,7 +83,7 @@ /* * Definition of the PV_ values for buffer-local options. - * The BV_ values are defined in option.h. + * The BV_ values are defined in option_defs.h. */ #define PV_AI OPT_BUF(BV_AI) #define PV_AR OPT_BOTH(OPT_BUF(BV_AR)) @@ -130,7 +161,7 @@ /* * Definition of the PV_ values for window-local options. - * The WV_ values are defined in option.h. + * The WV_ values are defined in option_defs.h. */ #define PV_LIST OPT_WIN(WV_LIST) # define PV_ARAB OPT_WIN(WV_ARAB) diff --git a/src/option.h b/src/option.h index 6cc0cce362..e8332cd2aa 100644 --- a/src/option.h +++ b/src/option.h @@ -1,768 +1,77 @@ -/* vi:set ts=8 sts=4 sw=4: - * - * VIM - Vi IMproved by Bram Moolenaar - * - * Do ":help uganda" in Vim to read copying and usage conditions. - * Do ":help credits" in Vim to see a list of people who contributed. - */ - -/* - * option.h: definition of global variables for settable options - */ - -/* - * Default values for 'errorformat'. - * The "%f|%l| %m" one is used for when the contents of the quickfix window is - * written to a file. - */ -#define DFLT_EFM \ - "%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%-GIn file included from %f:%l:%c:,%-GIn file included from %f:%l:%c\\,,%-GIn file included from %f:%l:%c,%-GIn file included from %f:%l,%-G%*[ ]from %f:%l:%c,%-G%*[ ]from %f:%l:,%-G%*[ ]from %f:%l\\,,%-G%*[ ]from %f:%l,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory %*[`']%f',%X%*\\a[%*\\d]: Leaving directory %*[`']%f',%D%*\\a: Entering directory %*[`']%f',%X%*\\a: Leaving directory %*[`']%f',%DMaking %*\\a in %f,%f|%l| %m" - -#define DFLT_GREPFORMAT "%f:%l:%m,%f:%l%m,%f %l%m" - -/* default values for b_p_ff 'fileformat' and p_ffs 'fileformats' */ -#define FF_DOS "dos" -#define FF_MAC "mac" -#define FF_UNIX "unix" - -#ifdef USE_CRNL -# define DFLT_FF "dos" -# define DFLT_FFS_VIM "dos,unix" -# define DFLT_FFS_VI "dos,unix" /* also autodetect in compatible mode */ -# define DFLT_TEXTAUTO TRUE -#else -# ifdef USE_CR -# define DFLT_FF "mac" -# define DFLT_FFS_VIM "mac,unix,dos" -# define DFLT_FFS_VI "mac,unix,dos" -# define DFLT_TEXTAUTO TRUE -# else -# define DFLT_FF "unix" -# define DFLT_FFS_VIM "unix,dos" -# define DFLT_FFS_VI "" -# define DFLT_TEXTAUTO FALSE -# endif -#endif - - -/* Possible values for 'encoding' */ -# define ENC_UCSBOM "ucs-bom" /* check for BOM at start of file */ - -/* default value for 'encoding' */ -# define ENC_DFLT "latin1" - -/* end-of-line style */ -#define EOL_UNKNOWN -1 /* not defined yet */ -#define EOL_UNIX 0 /* NL */ -#define EOL_DOS 1 /* CR NL */ -#define EOL_MAC 2 /* CR */ - -/* Formatting options for p_fo 'formatoptions' */ -#define FO_WRAP 't' -#define FO_WRAP_COMS 'c' -#define FO_RET_COMS 'r' -#define FO_OPEN_COMS 'o' -#define FO_Q_COMS 'q' -#define FO_Q_NUMBER 'n' -#define FO_Q_SECOND '2' -#define FO_INS_VI 'v' -#define FO_INS_LONG 'l' -#define FO_INS_BLANK 'b' -#define FO_MBYTE_BREAK 'm' /* break before/after multi-byte char */ -#define FO_MBYTE_JOIN 'M' /* no space before/after multi-byte char */ -#define FO_MBYTE_JOIN2 'B' /* no space between multi-byte chars */ -#define FO_ONE_LETTER '1' -#define FO_WHITE_PAR 'w' /* trailing white space continues paragr. */ -#define FO_AUTO 'a' /* automatic formatting */ -#define FO_REMOVE_COMS 'j' /* remove comment leaders when joining lines */ - -#define DFLT_FO_VI "vt" -#define DFLT_FO_VIM "tcq" -#define FO_ALL "tcroq2vlb1mMBn,awj" /* for do_set() */ - -/* characters for the p_cpo option: */ -#define CPO_ALTREAD 'a' /* ":read" sets alternate file name */ -#define CPO_ALTWRITE 'A' /* ":write" sets alternate file name */ -#define CPO_BAR 'b' /* "\|" ends a mapping */ -#define CPO_BSLASH 'B' /* backslash in mapping is not special */ -#define CPO_SEARCH 'c' -#define CPO_CONCAT 'C' /* Don't concatenate sourced lines */ -#define CPO_DOTTAG 'd' /* "./tags" in 'tags' is in current dir */ -#define CPO_DIGRAPH 'D' /* No digraph after "r", "f", etc. */ -#define CPO_EXECBUF 'e' -#define CPO_EMPTYREGION 'E' /* operating on empty region is an error */ -#define CPO_FNAMER 'f' /* set file name for ":r file" */ -#define CPO_FNAMEW 'F' /* set file name for ":w file" */ -#define CPO_GOTO1 'g' /* goto line 1 for ":edit" */ -#define CPO_INSEND 'H' /* "I" inserts before last blank in line */ -#define CPO_INTMOD 'i' /* interrupt a read makes buffer modified */ -#define CPO_INDENT 'I' /* remove auto-indent more often */ -#define CPO_JOINSP 'j' /* only use two spaces for join after '.' */ -#define CPO_ENDOFSENT 'J' /* need two spaces to detect end of sentence */ -#define CPO_KEYCODE 'k' /* don't recognize raw key code in mappings */ -#define CPO_KOFFSET 'K' /* don't wait for key code in mappings */ -#define CPO_LITERAL 'l' /* take char after backslash in [] literal */ -#define CPO_LISTWM 'L' /* 'list' changes wrapmargin */ -#define CPO_SHOWMATCH 'm' -#define CPO_MATCHBSL 'M' /* "%" ignores use of backslashes */ -#define CPO_NUMCOL 'n' /* 'number' column also used for text */ -#define CPO_LINEOFF 'o' -#define CPO_OVERNEW 'O' /* silently overwrite new file */ -#define CPO_LISP 'p' /* 'lisp' indenting */ -#define CPO_FNAMEAPP 'P' /* set file name for ":w >>file" */ -#define CPO_JOINCOL 'q' /* with "3J" use column after first join */ -#define CPO_REDO 'r' -#define CPO_REMMARK 'R' /* remove marks when filtering */ -#define CPO_BUFOPT 's' -#define CPO_BUFOPTGLOB 'S' -#define CPO_TAGPAT 't' -#define CPO_UNDO 'u' /* "u" undoes itself */ -#define CPO_BACKSPACE 'v' /* "v" keep deleted text */ -#define CPO_CW 'w' /* "cw" only changes one blank */ -#define CPO_FWRITE 'W' /* "w!" doesn't overwrite readonly files */ -#define CPO_ESC 'x' -#define CPO_REPLCNT 'X' /* "R" with a count only deletes chars once */ -#define CPO_YANK 'y' -#define CPO_KEEPRO 'Z' /* don't reset 'readonly' on ":w!" */ -#define CPO_DOLLAR '$' -#define CPO_FILTER '!' -#define CPO_MATCH '%' -#define CPO_STAR '*' /* ":*" means ":@" */ -#define CPO_PLUS '+' /* ":write file" resets 'modified' */ -#define CPO_MINUS '-' /* "9-" fails at and before line 9 */ -#define CPO_SPECI '<' /* don't recognize <> in mappings */ -#define CPO_REGAPPEND '>' /* insert NL when appending to a register */ -/* POSIX flags */ -#define CPO_HASH '#' /* "D", "o" and "O" do not use a count */ -#define CPO_PARA '{' /* "{" is also a paragraph boundary */ -#define CPO_TSIZE '|' /* $LINES and $COLUMNS overrule term size */ -#define CPO_PRESERVE '&' /* keep swap file after :preserve */ -#define CPO_SUBPERCENT '/' /* % in :s string uses previous one */ -#define CPO_BACKSL '\\' /* \ is not special in [] */ -#define CPO_CHDIR '.' /* don't chdir if buffer is modified */ -#define CPO_SCOLON ';' /* using "," and ";" will skip over char if - * cursor would not move */ -/* default values for Vim, Vi and POSIX */ -#define CPO_VIM "aABceFs" -#define CPO_VI "aAbBcCdDeEfFgHiIjJkKlLmMnoOpPqrRsStuvwWxXyZ$!%*-+<>;" -#define CPO_ALL \ - "aAbBcCdDeEfFgHiIjJkKlLmMnoOpPqrRsStuvwWxXyZ$!%*-+<>#{|&/\\.;" - -/* characters for p_ww option: */ -#define WW_ALL "bshl<>[],~" - -/* characters for p_mouse option: */ -#define MOUSE_NORMAL 'n' /* use mouse in Normal mode */ -#define MOUSE_VISUAL 'v' /* use mouse in Visual/Select mode */ -#define MOUSE_INSERT 'i' /* use mouse in Insert mode */ -#define MOUSE_COMMAND 'c' /* use mouse in Command-line mode */ -#define MOUSE_HELP 'h' /* use mouse in help buffers */ -#define MOUSE_RETURN 'r' /* use mouse for hit-return message */ -#define MOUSE_A "nvich" /* used for 'a' flag */ -#define MOUSE_ALL "anvichr" /* all possible characters */ -#define MOUSE_NONE ' ' /* don't use Visual selection */ -#define MOUSE_NONEF 'x' /* forced modeless selection */ - -#define COCU_ALL "nvic" /* flags for 'concealcursor' */ - -/* characters for p_shm option: */ -#define SHM_RO 'r' /* readonly */ -#define SHM_MOD 'm' /* modified */ -#define SHM_FILE 'f' /* (file 1 of 2) */ -#define SHM_LAST 'i' /* last line incomplete */ -#define SHM_TEXT 'x' /* tx instead of textmode */ -#define SHM_LINES 'l' /* "L" instead of "lines" */ -#define SHM_NEW 'n' /* "[New]" instead of "[New file]" */ -#define SHM_WRI 'w' /* "[w]" instead of "written" */ -#define SHM_A "rmfixlnw" /* represented by 'a' flag */ -#define SHM_WRITE 'W' /* don't use "written" at all */ -#define SHM_TRUNC 't' /* trunctate file messages */ -#define SHM_TRUNCALL 'T' /* trunctate all messages */ -#define SHM_OVER 'o' /* overwrite file messages */ -#define SHM_OVERALL 'O' /* overwrite more messages */ -#define SHM_SEARCH 's' /* no search hit bottom messages */ -#define SHM_ATTENTION 'A' /* no ATTENTION messages */ -#define SHM_INTRO 'I' /* intro messages */ -#define SHM_ALL "rmfixlnwaWtToOsAI" /* all possible flags for 'shm' */ - -/* characters for p_go: */ -#define GO_ASEL 'a' /* autoselect */ -#define GO_ASELML 'A' /* autoselect modeless selection */ -#define GO_BOT 'b' /* use bottom scrollbar */ -#define GO_CONDIALOG 'c' /* use console dialog */ -#define GO_TABLINE 'e' /* may show tabline */ -#define GO_FORG 'f' /* start GUI in foreground */ -#define GO_GREY 'g' /* use grey menu items */ -#define GO_HORSCROLL 'h' /* flexible horizontal scrolling */ -#define GO_ICON 'i' /* use Vim icon */ -#define GO_LEFT 'l' /* use left scrollbar */ -#define GO_VLEFT 'L' /* left scrollbar with vert split */ -#define GO_MENUS 'm' /* use menu bar */ -#define GO_NOSYSMENU 'M' /* don't source system menu */ -#define GO_POINTER 'p' /* pointer enter/leave callbacks */ -#define GO_ASELPLUS 'P' /* autoselectPlus */ -#define GO_RIGHT 'r' /* use right scrollbar */ -#define GO_VRIGHT 'R' /* right scrollbar with vert split */ -#define GO_TEAROFF 't' /* add tear-off menu items */ -#define GO_TOOLBAR 'T' /* add toolbar */ -#define GO_FOOTER 'F' /* add footer */ -#define GO_VERTICAL 'v' /* arrange dialog buttons vertically */ -#define GO_ALL "aAbcefFghilmMprtTv" /* all possible flags for 'go' */ - -/* flags for 'comments' option */ -#define COM_NEST 'n' /* comments strings nest */ -#define COM_BLANK 'b' /* needs blank after string */ -#define COM_START 's' /* start of comment */ -#define COM_MIDDLE 'm' /* middle of comment */ -#define COM_END 'e' /* end of comment */ -#define COM_AUTO_END 'x' /* last char of end closes comment */ -#define COM_FIRST 'f' /* first line comment only */ -#define COM_LEFT 'l' /* left adjusted */ -#define COM_RIGHT 'r' /* right adjusted */ -#define COM_NOBACK 'O' /* don't use for "O" command */ -#define COM_ALL "nbsmexflrO" /* all flags for 'comments' option */ -#define COM_MAX_LEN 50 /* maximum length of a part */ - -/* flags for 'statusline' option */ -#define STL_FILEPATH 'f' /* path of file in buffer */ -#define STL_FULLPATH 'F' /* full path of file in buffer */ -#define STL_FILENAME 't' /* last part (tail) of file path */ -#define STL_COLUMN 'c' /* column og cursor*/ -#define STL_VIRTCOL 'v' /* virtual column */ -#define STL_VIRTCOL_ALT 'V' /* - with 'if different' display */ -#define STL_LINE 'l' /* line number of cursor */ -#define STL_NUMLINES 'L' /* number of lines in buffer */ -#define STL_BUFNO 'n' /* current buffer number */ -#define STL_KEYMAP 'k' /* 'keymap' when active */ -#define STL_OFFSET 'o' /* offset of character under cursor*/ -#define STL_OFFSET_X 'O' /* - in hexadecimal */ -#define STL_BYTEVAL 'b' /* byte value of character */ -#define STL_BYTEVAL_X 'B' /* - in hexadecimal */ -#define STL_ROFLAG 'r' /* readonly flag */ -#define STL_ROFLAG_ALT 'R' /* - other display */ -#define STL_HELPFLAG 'h' /* window is showing a help file */ -#define STL_HELPFLAG_ALT 'H' /* - other display */ -#define STL_FILETYPE 'y' /* 'filetype' */ -#define STL_FILETYPE_ALT 'Y' /* - other display */ -#define STL_PREVIEWFLAG 'w' /* window is showing the preview buf */ -#define STL_PREVIEWFLAG_ALT 'W' /* - other display */ -#define STL_MODIFIED 'm' /* modified flag */ -#define STL_MODIFIED_ALT 'M' /* - other display */ -#define STL_QUICKFIX 'q' /* quickfix window description */ -#define STL_PERCENTAGE 'p' /* percentage through file */ -#define STL_ALTPERCENT 'P' /* percentage as TOP BOT ALL or NN% */ -#define STL_ARGLISTSTAT 'a' /* argument list status as (x of y) */ -#define STL_PAGENUM 'N' /* page number (when printing)*/ -#define STL_VIM_EXPR '{' /* start of expression to substitute */ -#define STL_MIDDLEMARK '=' /* separation between left and right */ -#define STL_TRUNCMARK '<' /* truncation mark if line is too long*/ -#define STL_USER_HL '*' /* highlight from (User)1..9 or 0 */ -#define STL_HIGHLIGHT '#' /* highlight name */ -#define STL_TABPAGENR 'T' /* tab page label nr */ -#define STL_TABCLOSENR 'X' /* tab page close nr */ -#define STL_ALL ((char_u *) "fFtcvVlLknoObBrRhHmYyWwMqpPaN{#") - -/* flags used for parsed 'wildmode' */ -#define WIM_FULL 1 -#define WIM_LONGEST 2 -#define WIM_LIST 4 - -/* arguments for can_bs() */ -#define BS_INDENT 'i' /* "Indent" */ -#define BS_EOL 'o' /* "eOl" */ -#define BS_START 's' /* "Start" */ - -#define LISPWORD_VALUE \ - "defun,define,defmacro,set!,lambda,if,case,let,flet,let*,letrec,do,do*,define-syntax,let-syntax,letrec-syntax,destructuring-bind,defpackage,defparameter,defstruct,deftype,defvar,do-all-symbols,do-external-symbols,do-symbols,dolist,dotimes,ecase,etypecase,eval-when,labels,macrolet,multiple-value-bind,multiple-value-call,multiple-value-prog1,multiple-value-setq,prog1,progv,typecase,unless,unwind-protect,when,with-input-from-string,with-open-file,with-open-stream,with-output-to-string,with-package-iterator,define-condition,handler-bind,handler-case,restart-bind,restart-case,with-simple-restart,store-value,use-value,muffle-warning,abort,continue,with-slots,with-slots*,with-accessors,with-accessors*,defclass,defmethod,print-unreadable-object" - -/* - * The following are actual variables for the options - */ - -EXTERN long p_aleph; /* 'aleph' */ -EXTERN int p_acd; /* 'autochdir' */ -EXTERN char_u *p_ambw; /* 'ambiwidth' */ -EXTERN int p_ar; /* 'autoread' */ -EXTERN int p_aw; /* 'autowrite' */ -EXTERN int p_awa; /* 'autowriteall' */ -EXTERN char_u *p_bs; /* 'backspace' */ -EXTERN char_u *p_bg; /* 'background' */ -EXTERN int p_bk; /* 'backup' */ -EXTERN char_u *p_bkc; /* 'backupcopy' */ -EXTERN unsigned bkc_flags; -#ifdef IN_OPTION_C -static char *(p_bkc_values[]) = -{"yes", "auto", "no", "breaksymlink", "breakhardlink", NULL}; -#endif -# define BKC_YES 0x001 -# define BKC_AUTO 0x002 -# define BKC_NO 0x004 -# define BKC_BREAKSYMLINK 0x008 -# define BKC_BREAKHARDLINK 0x010 -EXTERN char_u *p_bdir; /* 'backupdir' */ -EXTERN char_u *p_bex; /* 'backupext' */ -EXTERN char_u *p_bsk; /* 'backupskip' */ -EXTERN char_u *p_cm; /* 'cryptmethod' */ -EXTERN char_u *p_breakat; /* 'breakat' */ -EXTERN char_u *p_cmp; /* 'casemap' */ -EXTERN unsigned cmp_flags; -# ifdef IN_OPTION_C -static char *(p_cmp_values[]) = {"internal", "keepascii", NULL}; -# endif -# define CMP_INTERNAL 0x001 -# define CMP_KEEPASCII 0x002 -EXTERN char_u *p_enc; /* 'encoding' */ -EXTERN int p_deco; /* 'delcombine' */ -EXTERN char_u *p_ccv; /* 'charconvert' */ -EXTERN char_u *p_cedit; /* 'cedit' */ -EXTERN long p_cwh; /* 'cmdwinheight' */ -EXTERN long p_ch; /* 'cmdheight' */ -EXTERN int p_confirm; /* 'confirm' */ -EXTERN int p_cp; /* 'compatible' */ -EXTERN char_u *p_cot; /* 'completeopt' */ -EXTERN long p_ph; /* 'pumheight' */ -EXTERN char_u *p_cpo; /* 'cpoptions' */ -EXTERN char_u *p_csprg; /* 'cscopeprg' */ -EXTERN int p_csre; /* 'cscoperelative' */ -EXTERN char_u *p_csqf; /* 'cscopequickfix' */ -# define CSQF_CMDS "sgdctefi" -# define CSQF_FLAGS "+-0" -EXTERN int p_cst; /* 'cscopetag' */ -EXTERN long p_csto; /* 'cscopetagorder' */ -EXTERN long p_cspc; /* 'cscopepathcomp' */ -EXTERN int p_csverbose; /* 'cscopeverbose' */ -EXTERN char_u *p_debug; /* 'debug' */ -EXTERN char_u *p_def; /* 'define' */ -EXTERN char_u *p_inc; -EXTERN char_u *p_dip; /* 'diffopt' */ -EXTERN char_u *p_dex; /* 'diffexpr' */ -EXTERN char_u *p_dict; /* 'dictionary' */ -EXTERN int p_dg; /* 'digraph' */ -EXTERN char_u *p_dir; /* 'directory' */ -EXTERN char_u *p_dy; /* 'display' */ -EXTERN unsigned dy_flags; -#ifdef IN_OPTION_C -static char *(p_dy_values[]) = {"lastline", "uhex", NULL}; -#endif -#define DY_LASTLINE 0x001 -#define DY_UHEX 0x002 -EXTERN int p_ed; /* 'edcompatible' */ -EXTERN char_u *p_ead; /* 'eadirection' */ -EXTERN int p_ea; /* 'equalalways' */ -EXTERN char_u *p_ep; /* 'equalprg' */ -EXTERN int p_eb; /* 'errorbells' */ -EXTERN char_u *p_ef; /* 'errorfile' */ -EXTERN char_u *p_efm; /* 'errorformat' */ -EXTERN char_u *p_gefm; /* 'grepformat' */ -EXTERN char_u *p_gp; /* 'grepprg' */ -EXTERN char_u *p_ei; /* 'eventignore' */ -EXTERN int p_ek; /* 'esckeys' */ -EXTERN int p_exrc; /* 'exrc' */ -EXTERN char_u *p_fencs; /* 'fileencodings' */ -EXTERN char_u *p_ffs; /* 'fileformats' */ -EXTERN long p_fic; /* 'fileignorecase' */ -EXTERN char_u *p_fcl; /* 'foldclose' */ -EXTERN long p_fdls; /* 'foldlevelstart' */ -EXTERN char_u *p_fdo; /* 'foldopen' */ -EXTERN unsigned fdo_flags; -# ifdef IN_OPTION_C -static char *(p_fdo_values[]) = {"all", "block", "hor", "mark", "percent", - "quickfix", "search", "tag", "insert", - "undo", "jump", NULL}; -# endif -# define FDO_ALL 0x001 -# define FDO_BLOCK 0x002 -# define FDO_HOR 0x004 -# define FDO_MARK 0x008 -# define FDO_PERCENT 0x010 -# define FDO_QUICKFIX 0x020 -# define FDO_SEARCH 0x040 -# define FDO_TAG 0x080 -# define FDO_INSERT 0x100 -# define FDO_UNDO 0x200 -# define FDO_JUMP 0x400 -EXTERN char_u *p_fp; /* 'formatprg' */ -#ifdef HAVE_FSYNC -EXTERN int p_fs; /* 'fsync' */ -#endif -EXTERN int p_gd; /* 'gdefault' */ -EXTERN char_u *p_pdev; /* 'printdevice' */ -EXTERN char_u *p_penc; /* 'printencoding' */ -EXTERN char_u *p_pexpr; /* 'printexpr' */ -EXTERN char_u *p_pmfn; /* 'printmbfont' */ -EXTERN char_u *p_pmcs; /* 'printmbcharset' */ -EXTERN char_u *p_pfn; /* 'printfont' */ -EXTERN char_u *p_popt; /* 'printoptions' */ -EXTERN char_u *p_header; /* 'printheader' */ -EXTERN int p_prompt; /* 'prompt' */ -#ifdef CURSOR_SHAPE -EXTERN char_u *p_guicursor; /* 'guicursor' */ -#endif -EXTERN char_u *p_hf; /* 'helpfile' */ -EXTERN long p_hh; /* 'helpheight' */ -EXTERN char_u *p_hlg; /* 'helplang' */ -EXTERN int p_hid; /* 'hidden' */ -/* Use P_HID to check if a buffer is to be hidden when it is no longer - * visible in a window. */ -# define P_HID(buf) (buf_hide(buf)) -EXTERN char_u *p_hl; /* 'highlight' */ -EXTERN int p_hls; /* 'hlsearch' */ -EXTERN long p_hi; /* 'history' */ -EXTERN int p_hkmap; /* 'hkmap' */ -EXTERN int p_hkmapp; /* 'hkmapp' */ -EXTERN int p_fkmap; /* 'fkmap' */ -EXTERN int p_altkeymap; /* 'altkeymap' */ -EXTERN int p_arshape; /* 'arabicshape' */ -EXTERN int p_icon; /* 'icon' */ -EXTERN char_u *p_iconstring; /* 'iconstring' */ -EXTERN int p_ic; /* 'ignorecase' */ -#ifdef USE_IM_CONTROL -EXTERN int p_imcmdline; /* 'imcmdline' */ -EXTERN int p_imdisable; /* 'imdisable' */ -#endif -EXTERN int p_is; /* 'incsearch' */ -EXTERN int p_im; /* 'insertmode' */ -EXTERN char_u *p_isf; /* 'isfname' */ -EXTERN char_u *p_isi; /* 'isident' */ -EXTERN char_u *p_isp; /* 'isprint' */ -EXTERN int p_js; /* 'joinspaces' */ -EXTERN char_u *p_kp; /* 'keywordprg' */ -EXTERN char_u *p_km; /* 'keymodel' */ -EXTERN char_u *p_langmap; /* 'langmap'*/ -EXTERN char_u *p_lm; /* 'langmenu' */ -EXTERN char_u *p_lispwords; /* 'lispwords' */ -EXTERN long p_ls; /* 'laststatus' */ -EXTERN long p_stal; /* 'showtabline' */ -EXTERN char_u *p_lcs; /* 'listchars' */ - -EXTERN int p_lz; /* 'lazyredraw' */ -EXTERN int p_lpl; /* 'loadplugins' */ -EXTERN int p_magic; /* 'magic' */ -EXTERN char_u *p_mef; /* 'makeef' */ -EXTERN char_u *p_mp; /* 'makeprg' */ -EXTERN char_u *p_cc; /* 'colorcolumn' */ -EXTERN int p_cc_cols[256]; /* array for 'colorcolumn' columns */ -EXTERN long p_mat; /* 'matchtime' */ -EXTERN long p_mco; /* 'maxcombine' */ -EXTERN long p_mfd; /* 'maxfuncdepth' */ -EXTERN long p_mmd; /* 'maxmapdepth' */ -EXTERN long p_mm; /* 'maxmem' */ -EXTERN long p_mmp; /* 'maxmempattern' */ -EXTERN long p_mmt; /* 'maxmemtot' */ -EXTERN long p_mis; /* 'menuitems' */ -EXTERN char_u *p_msm; /* 'mkspellmem' */ -EXTERN long p_mls; /* 'modelines' */ -EXTERN char_u *p_mouse; /* 'mouse' */ -EXTERN char_u *p_mousem; /* 'mousemodel' */ -EXTERN long p_mouset; /* 'mousetime' */ -EXTERN int p_more; /* 'more' */ -EXTERN char_u *p_opfunc; /* 'operatorfunc' */ -EXTERN char_u *p_para; /* 'paragraphs' */ -EXTERN int p_paste; /* 'paste' */ -EXTERN char_u *p_pt; /* 'pastetoggle' */ -EXTERN char_u *p_pex; /* 'patchexpr' */ -EXTERN char_u *p_pm; /* 'patchmode' */ -EXTERN char_u *p_path; /* 'path' */ -EXTERN char_u *p_cdpath; /* 'cdpath' */ -EXTERN long p_rdt; /* 'redrawtime' */ -EXTERN int p_remap; /* 'remap' */ -EXTERN long p_re; /* 'regexpengine' */ -EXTERN long p_report; /* 'report' */ -EXTERN long p_pvh; /* 'previewheight' */ -EXTERN int p_ari; /* 'allowrevins' */ -EXTERN int p_ri; /* 'revins' */ -EXTERN int p_ru; /* 'ruler' */ -EXTERN char_u *p_ruf; /* 'rulerformat' */ -EXTERN char_u *p_rtp; /* 'runtimepath' */ -EXTERN long p_sj; /* 'scrolljump' */ -EXTERN long p_so; /* 'scrolloff' */ -EXTERN char_u *p_sbo; /* 'scrollopt' */ -EXTERN char_u *p_sections; /* 'sections' */ -EXTERN int p_secure; /* 'secure' */ -EXTERN char_u *p_sel; /* 'selection' */ -EXTERN char_u *p_slm; /* 'selectmode' */ -EXTERN char_u *p_ssop; /* 'sessionoptions' */ -EXTERN unsigned ssop_flags; -# ifdef IN_OPTION_C -/* Also used for 'viewoptions'! */ -static char *(p_ssop_values[]) = {"buffers", "winpos", "resize", "winsize", - "localoptions", "options", "help", "blank", - "globals", "slash", "unix", - "sesdir", "curdir", "folds", "cursor", - "tabpages", NULL}; -# endif -# define SSOP_BUFFERS 0x001 -# define SSOP_WINPOS 0x002 -# define SSOP_RESIZE 0x004 -# define SSOP_WINSIZE 0x008 -# define SSOP_LOCALOPTIONS 0x010 -# define SSOP_OPTIONS 0x020 -# define SSOP_HELP 0x040 -# define SSOP_BLANK 0x080 -# define SSOP_GLOBALS 0x100 -# define SSOP_SLASH 0x200 -# define SSOP_UNIX 0x400 -# define SSOP_SESDIR 0x800 -# define SSOP_CURDIR 0x1000 -# define SSOP_FOLDS 0x2000 -# define SSOP_CURSOR 0x4000 -# define SSOP_TABPAGES 0x8000 -EXTERN char_u *p_sh; /* 'shell' */ -EXTERN char_u *p_shcf; /* 'shellcmdflag' */ -EXTERN char_u *p_sp; /* 'shellpipe' */ -EXTERN char_u *p_shq; /* 'shellquote' */ -EXTERN char_u *p_sxq; /* 'shellxquote' */ -EXTERN char_u *p_sxe; /* 'shellxescape' */ -EXTERN char_u *p_srr; /* 'shellredir' */ -EXTERN int p_stmp; /* 'shelltemp' */ -#ifdef BACKSLASH_IN_FILENAME -EXTERN int p_ssl; /* 'shellslash' */ -#endif -EXTERN char_u *p_stl; /* 'statusline' */ -EXTERN int p_sr; /* 'shiftround' */ -EXTERN char_u *p_shm; /* 'shortmess' */ -EXTERN char_u *p_sbr; /* 'showbreak' */ -EXTERN int p_sc; /* 'showcmd' */ -EXTERN int p_sft; /* 'showfulltag' */ -EXTERN int p_sm; /* 'showmatch' */ -EXTERN int p_smd; /* 'showmode' */ -EXTERN long p_ss; /* 'sidescroll' */ -EXTERN long p_siso; /* 'sidescrolloff' */ -EXTERN int p_scs; /* 'smartcase' */ -EXTERN int p_sta; /* 'smarttab' */ -EXTERN int p_sb; /* 'splitbelow' */ -EXTERN long p_tpm; /* 'tabpagemax' */ -EXTERN char_u *p_tal; /* 'tabline' */ -EXTERN char_u *p_sps; /* 'spellsuggest' */ -EXTERN int p_spr; /* 'splitright' */ -EXTERN int p_sol; /* 'startofline' */ -EXTERN char_u *p_su; /* 'suffixes' */ -EXTERN char_u *p_sws; /* 'swapsync' */ -EXTERN char_u *p_swb; /* 'switchbuf' */ -EXTERN unsigned swb_flags; -#ifdef IN_OPTION_C -static char *(p_swb_values[]) = {"useopen", "usetab", "split", "newtab", NULL}; -#endif -#define SWB_USEOPEN 0x001 -#define SWB_USETAB 0x002 -#define SWB_SPLIT 0x004 -#define SWB_NEWTAB 0x008 -EXTERN int p_tbs; /* 'tagbsearch' */ -EXTERN long p_tl; /* 'taglength' */ -EXTERN int p_tr; /* 'tagrelative' */ -EXTERN char_u *p_tags; /* 'tags' */ -EXTERN int p_tgst; /* 'tagstack' */ -EXTERN int p_tbidi; /* 'termbidi' */ -EXTERN char_u *p_tenc; /* 'termencoding' */ -EXTERN int p_terse; /* 'terse' */ -EXTERN int p_ta; /* 'textauto' */ -EXTERN int p_to; /* 'tildeop' */ -EXTERN int p_timeout; /* 'timeout' */ -EXTERN long p_tm; /* 'timeoutlen' */ -EXTERN int p_title; /* 'title' */ -EXTERN long p_titlelen; /* 'titlelen' */ -EXTERN char_u *p_titleold; /* 'titleold' */ -EXTERN char_u *p_titlestring; /* 'titlestring' */ -EXTERN char_u *p_tsr; /* 'thesaurus' */ -EXTERN int p_ttimeout; /* 'ttimeout' */ -EXTERN long p_ttm; /* 'ttimeoutlen' */ -EXTERN int p_tbi; /* 'ttybuiltin' */ -EXTERN int p_tf; /* 'ttyfast' */ -EXTERN long p_ttyscroll; /* 'ttyscroll' */ -#if defined(FEAT_MOUSE) && (defined(UNIX) || defined(VMS)) -EXTERN char_u *p_ttym; /* 'ttymouse' */ -EXTERN unsigned ttym_flags; -# ifdef IN_OPTION_C -static char *(p_ttym_values[]) = -{"xterm", "xterm2", "dec", "netterm", "jsbterm", "pterm", "urxvt", "sgr", NULL}; -# endif -# define TTYM_XTERM 0x01 -# define TTYM_XTERM2 0x02 -# define TTYM_DEC 0x04 -# define TTYM_NETTERM 0x08 -# define TTYM_JSBTERM 0x10 -# define TTYM_PTERM 0x20 -# define TTYM_URXVT 0x40 -# define TTYM_SGR 0x80 -#endif -EXTERN char_u *p_udir; /* 'undodir' */ -EXTERN long p_ul; /* 'undolevels' */ -EXTERN long p_ur; /* 'undoreload' */ -EXTERN long p_uc; /* 'updatecount' */ -EXTERN long p_ut; /* 'updatetime' */ -EXTERN char_u *p_fcs; /* 'fillchar' */ -EXTERN char_u *p_viminfo; /* 'viminfo' */ -EXTERN char_u *p_vdir; /* 'viewdir' */ -EXTERN char_u *p_vop; /* 'viewoptions' */ -EXTERN unsigned vop_flags; /* uses SSOP_ flags */ -EXTERN int p_vb; /* 'visualbell' */ -EXTERN char_u *p_ve; /* 'virtualedit' */ -EXTERN unsigned ve_flags; -# ifdef IN_OPTION_C -static char *(p_ve_values[]) = {"block", "insert", "all", "onemore", NULL}; -# endif -# define VE_BLOCK 5 /* includes "all" */ -# define VE_INSERT 6 /* includes "all" */ -# define VE_ALL 4 -# define VE_ONEMORE 8 -EXTERN long p_verbose; /* 'verbose' */ -#ifdef IN_OPTION_C -char_u *p_vfile = (char_u *)""; /* used before options are initialized */ -#else -extern char_u *p_vfile; /* 'verbosefile' */ -#endif -EXTERN int p_warn; /* 'warn' */ -EXTERN char_u *p_wop; /* 'wildoptions' */ -EXTERN long p_window; /* 'window' */ -#if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) || defined(LINT) \ - || defined (FEAT_GUI_GTK) || defined(FEAT_GUI_PHOTON) -#define FEAT_WAK -EXTERN char_u *p_wak; /* 'winaltkeys' */ -#endif -EXTERN char_u *p_wak; -EXTERN char_u *p_wig; /* 'wildignore' */ -EXTERN int p_wiv; /* 'weirdinvert' */ -EXTERN char_u *p_ww; /* 'whichwrap' */ -EXTERN long p_wc; /* 'wildchar' */ -EXTERN long p_wcm; /* 'wildcharm' */ -EXTERN long p_wic; /* 'wildignorecase' */ -EXTERN char_u *p_wim; /* 'wildmode' */ -EXTERN int p_wmnu; /* 'wildmenu' */ -EXTERN long p_wh; /* 'winheight' */ -EXTERN long p_wmh; /* 'winminheight' */ -EXTERN long p_wmw; /* 'winminwidth' */ -EXTERN long p_wiw; /* 'winwidth' */ -EXTERN int p_ws; /* 'wrapscan' */ -EXTERN int p_write; /* 'write' */ -EXTERN int p_wa; /* 'writeany' */ -EXTERN int p_wb; /* 'writebackup' */ -EXTERN long p_wd; /* 'writedelay' */ - -/* - * "indir" values for buffer-local opions. - * These need to be defined globally, so that the BV_COUNT can be used with - * b_p_scriptID[]. - */ -enum { - BV_AI = 0 - , BV_AR - , BV_BH - , BV_BT - , BV_EFM - , BV_GP - , BV_MP - , BV_BIN - , BV_BL - , BV_BOMB - , BV_CI - , BV_CIN - , BV_CINK - , BV_CINO - , BV_CINW - , BV_CM - , BV_CMS - , BV_COM - , BV_CPT - , BV_DICT - , BV_TSR - , BV_CFU - , BV_DEF - , BV_INC - , BV_EOL - , BV_EP - , BV_ET - , BV_FENC - , BV_BEXPR - , BV_FEX - , BV_FF - , BV_FLP - , BV_FO - , BV_FT - , BV_IMI - , BV_IMS - , BV_INDE - , BV_INDK - , BV_INEX - , BV_INF - , BV_ISK - , BV_KEY - , BV_KMAP - , BV_KP - , BV_LISP - , BV_MA - , BV_ML - , BV_MOD - , BV_MPS - , BV_NF - , BV_OFU - , BV_PATH - , BV_PI - , BV_QE - , BV_RO - , BV_SI -#ifndef SHORT_FNAME - , BV_SN -#endif - , BV_SMC - , BV_SYN - , BV_SPC - , BV_SPF - , BV_SPL - , BV_STS - , BV_SUA - , BV_SW - , BV_SWF - , BV_TAGS - , BV_TS - , BV_TW - , BV_TX - , BV_UDF - , BV_UL - , BV_WM - , BV_COUNT /* must be the last one */ -}; - -/* - * "indir" values for window-local options. - * These need to be defined globally, so that the WV_COUNT can be used in the - * window structure. - */ -enum { - WV_LIST = 0 - , WV_ARAB - , WV_COCU - , WV_COLE - , WV_CRBIND - , WV_DIFF - , WV_FDC - , WV_FEN - , WV_FDI - , WV_FDL - , WV_FDM - , WV_FML - , WV_FDN - , WV_FDE - , WV_FDT - , WV_FMR - , WV_LBR - , WV_NU - , WV_RNU - , WV_NUW - , WV_PVW - , WV_RL - , WV_RLC - , WV_SCBIND - , WV_SCROLL - , WV_SPELL - , WV_CUC - , WV_CUL - , WV_CC - , WV_STL - , WV_WFH - , WV_WFW - , WV_WRAP - , WV_COUNT /* must be the last one */ -}; - -/* Value for b_p_ul indicating the global value must be used. */ -#define NO_LOCAL_UNDOLEVEL -123456 +#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, + 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 * + *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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_OPTION_H */ diff --git a/src/option_defs.h b/src/option_defs.h new file mode 100644 index 0000000000..6dc232d03d --- /dev/null +++ b/src/option_defs.h @@ -0,0 +1,768 @@ +/* vi:set ts=8 sts=4 sw=4: + * + * VIM - Vi IMproved by Bram Moolenaar + * + * Do ":help uganda" in Vim to read copying and usage conditions. + * Do ":help credits" in Vim to see a list of people who contributed. + */ + +/* + * option_defs.h: definition of global variables for settable options + */ + +/* + * Default values for 'errorformat'. + * The "%f|%l| %m" one is used for when the contents of the quickfix window is + * written to a file. + */ +#define DFLT_EFM \ + "%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%-GIn file included from %f:%l:%c:,%-GIn file included from %f:%l:%c\\,,%-GIn file included from %f:%l:%c,%-GIn file included from %f:%l,%-G%*[ ]from %f:%l:%c,%-G%*[ ]from %f:%l:,%-G%*[ ]from %f:%l\\,,%-G%*[ ]from %f:%l,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory %*[`']%f',%X%*\\a[%*\\d]: Leaving directory %*[`']%f',%D%*\\a: Entering directory %*[`']%f',%X%*\\a: Leaving directory %*[`']%f',%DMaking %*\\a in %f,%f|%l| %m" + +#define DFLT_GREPFORMAT "%f:%l:%m,%f:%l%m,%f %l%m" + +/* default values for b_p_ff 'fileformat' and p_ffs 'fileformats' */ +#define FF_DOS "dos" +#define FF_MAC "mac" +#define FF_UNIX "unix" + +#ifdef USE_CRNL +# define DFLT_FF "dos" +# define DFLT_FFS_VIM "dos,unix" +# define DFLT_FFS_VI "dos,unix" /* also autodetect in compatible mode */ +# define DFLT_TEXTAUTO TRUE +#else +# ifdef USE_CR +# define DFLT_FF "mac" +# define DFLT_FFS_VIM "mac,unix,dos" +# define DFLT_FFS_VI "mac,unix,dos" +# define DFLT_TEXTAUTO TRUE +# else +# define DFLT_FF "unix" +# define DFLT_FFS_VIM "unix,dos" +# define DFLT_FFS_VI "" +# define DFLT_TEXTAUTO FALSE +# endif +#endif + + +/* Possible values for 'encoding' */ +# define ENC_UCSBOM "ucs-bom" /* check for BOM at start of file */ + +/* default value for 'encoding' */ +# define ENC_DFLT "latin1" + +/* end-of-line style */ +#define EOL_UNKNOWN -1 /* not defined yet */ +#define EOL_UNIX 0 /* NL */ +#define EOL_DOS 1 /* CR NL */ +#define EOL_MAC 2 /* CR */ + +/* Formatting options for p_fo 'formatoptions' */ +#define FO_WRAP 't' +#define FO_WRAP_COMS 'c' +#define FO_RET_COMS 'r' +#define FO_OPEN_COMS 'o' +#define FO_Q_COMS 'q' +#define FO_Q_NUMBER 'n' +#define FO_Q_SECOND '2' +#define FO_INS_VI 'v' +#define FO_INS_LONG 'l' +#define FO_INS_BLANK 'b' +#define FO_MBYTE_BREAK 'm' /* break before/after multi-byte char */ +#define FO_MBYTE_JOIN 'M' /* no space before/after multi-byte char */ +#define FO_MBYTE_JOIN2 'B' /* no space between multi-byte chars */ +#define FO_ONE_LETTER '1' +#define FO_WHITE_PAR 'w' /* trailing white space continues paragr. */ +#define FO_AUTO 'a' /* automatic formatting */ +#define FO_REMOVE_COMS 'j' /* remove comment leaders when joining lines */ + +#define DFLT_FO_VI "vt" +#define DFLT_FO_VIM "tcq" +#define FO_ALL "tcroq2vlb1mMBn,awj" /* for do_set() */ + +/* characters for the p_cpo option: */ +#define CPO_ALTREAD 'a' /* ":read" sets alternate file name */ +#define CPO_ALTWRITE 'A' /* ":write" sets alternate file name */ +#define CPO_BAR 'b' /* "\|" ends a mapping */ +#define CPO_BSLASH 'B' /* backslash in mapping is not special */ +#define CPO_SEARCH 'c' +#define CPO_CONCAT 'C' /* Don't concatenate sourced lines */ +#define CPO_DOTTAG 'd' /* "./tags" in 'tags' is in current dir */ +#define CPO_DIGRAPH 'D' /* No digraph after "r", "f", etc. */ +#define CPO_EXECBUF 'e' +#define CPO_EMPTYREGION 'E' /* operating on empty region is an error */ +#define CPO_FNAMER 'f' /* set file name for ":r file" */ +#define CPO_FNAMEW 'F' /* set file name for ":w file" */ +#define CPO_GOTO1 'g' /* goto line 1 for ":edit" */ +#define CPO_INSEND 'H' /* "I" inserts before last blank in line */ +#define CPO_INTMOD 'i' /* interrupt a read makes buffer modified */ +#define CPO_INDENT 'I' /* remove auto-indent more often */ +#define CPO_JOINSP 'j' /* only use two spaces for join after '.' */ +#define CPO_ENDOFSENT 'J' /* need two spaces to detect end of sentence */ +#define CPO_KEYCODE 'k' /* don't recognize raw key code in mappings */ +#define CPO_KOFFSET 'K' /* don't wait for key code in mappings */ +#define CPO_LITERAL 'l' /* take char after backslash in [] literal */ +#define CPO_LISTWM 'L' /* 'list' changes wrapmargin */ +#define CPO_SHOWMATCH 'm' +#define CPO_MATCHBSL 'M' /* "%" ignores use of backslashes */ +#define CPO_NUMCOL 'n' /* 'number' column also used for text */ +#define CPO_LINEOFF 'o' +#define CPO_OVERNEW 'O' /* silently overwrite new file */ +#define CPO_LISP 'p' /* 'lisp' indenting */ +#define CPO_FNAMEAPP 'P' /* set file name for ":w >>file" */ +#define CPO_JOINCOL 'q' /* with "3J" use column after first join */ +#define CPO_REDO 'r' +#define CPO_REMMARK 'R' /* remove marks when filtering */ +#define CPO_BUFOPT 's' +#define CPO_BUFOPTGLOB 'S' +#define CPO_TAGPAT 't' +#define CPO_UNDO 'u' /* "u" undoes itself */ +#define CPO_BACKSPACE 'v' /* "v" keep deleted text */ +#define CPO_CW 'w' /* "cw" only changes one blank */ +#define CPO_FWRITE 'W' /* "w!" doesn't overwrite readonly files */ +#define CPO_ESC 'x' +#define CPO_REPLCNT 'X' /* "R" with a count only deletes chars once */ +#define CPO_YANK 'y' +#define CPO_KEEPRO 'Z' /* don't reset 'readonly' on ":w!" */ +#define CPO_DOLLAR '$' +#define CPO_FILTER '!' +#define CPO_MATCH '%' +#define CPO_STAR '*' /* ":*" means ":@" */ +#define CPO_PLUS '+' /* ":write file" resets 'modified' */ +#define CPO_MINUS '-' /* "9-" fails at and before line 9 */ +#define CPO_SPECI '<' /* don't recognize <> in mappings */ +#define CPO_REGAPPEND '>' /* insert NL when appending to a register */ +/* POSIX flags */ +#define CPO_HASH '#' /* "D", "o" and "O" do not use a count */ +#define CPO_PARA '{' /* "{" is also a paragraph boundary */ +#define CPO_TSIZE '|' /* $LINES and $COLUMNS overrule term size */ +#define CPO_PRESERVE '&' /* keep swap file after :preserve */ +#define CPO_SUBPERCENT '/' /* % in :s string uses previous one */ +#define CPO_BACKSL '\\' /* \ is not special in [] */ +#define CPO_CHDIR '.' /* don't chdir if buffer is modified */ +#define CPO_SCOLON ';' /* using "," and ";" will skip over char if + * cursor would not move */ +/* default values for Vim, Vi and POSIX */ +#define CPO_VIM "aABceFs" +#define CPO_VI "aAbBcCdDeEfFgHiIjJkKlLmMnoOpPqrRsStuvwWxXyZ$!%*-+<>;" +#define CPO_ALL \ + "aAbBcCdDeEfFgHiIjJkKlLmMnoOpPqrRsStuvwWxXyZ$!%*-+<>#{|&/\\.;" + +/* characters for p_ww option: */ +#define WW_ALL "bshl<>[],~" + +/* characters for p_mouse option: */ +#define MOUSE_NORMAL 'n' /* use mouse in Normal mode */ +#define MOUSE_VISUAL 'v' /* use mouse in Visual/Select mode */ +#define MOUSE_INSERT 'i' /* use mouse in Insert mode */ +#define MOUSE_COMMAND 'c' /* use mouse in Command-line mode */ +#define MOUSE_HELP 'h' /* use mouse in help buffers */ +#define MOUSE_RETURN 'r' /* use mouse for hit-return message */ +#define MOUSE_A "nvich" /* used for 'a' flag */ +#define MOUSE_ALL "anvichr" /* all possible characters */ +#define MOUSE_NONE ' ' /* don't use Visual selection */ +#define MOUSE_NONEF 'x' /* forced modeless selection */ + +#define COCU_ALL "nvic" /* flags for 'concealcursor' */ + +/* characters for p_shm option: */ +#define SHM_RO 'r' /* readonly */ +#define SHM_MOD 'm' /* modified */ +#define SHM_FILE 'f' /* (file 1 of 2) */ +#define SHM_LAST 'i' /* last line incomplete */ +#define SHM_TEXT 'x' /* tx instead of textmode */ +#define SHM_LINES 'l' /* "L" instead of "lines" */ +#define SHM_NEW 'n' /* "[New]" instead of "[New file]" */ +#define SHM_WRI 'w' /* "[w]" instead of "written" */ +#define SHM_A "rmfixlnw" /* represented by 'a' flag */ +#define SHM_WRITE 'W' /* don't use "written" at all */ +#define SHM_TRUNC 't' /* trunctate file messages */ +#define SHM_TRUNCALL 'T' /* trunctate all messages */ +#define SHM_OVER 'o' /* overwrite file messages */ +#define SHM_OVERALL 'O' /* overwrite more messages */ +#define SHM_SEARCH 's' /* no search hit bottom messages */ +#define SHM_ATTENTION 'A' /* no ATTENTION messages */ +#define SHM_INTRO 'I' /* intro messages */ +#define SHM_ALL "rmfixlnwaWtToOsAI" /* all possible flags for 'shm' */ + +/* characters for p_go: */ +#define GO_ASEL 'a' /* autoselect */ +#define GO_ASELML 'A' /* autoselect modeless selection */ +#define GO_BOT 'b' /* use bottom scrollbar */ +#define GO_CONDIALOG 'c' /* use console dialog */ +#define GO_TABLINE 'e' /* may show tabline */ +#define GO_FORG 'f' /* start GUI in foreground */ +#define GO_GREY 'g' /* use grey menu items */ +#define GO_HORSCROLL 'h' /* flexible horizontal scrolling */ +#define GO_ICON 'i' /* use Vim icon */ +#define GO_LEFT 'l' /* use left scrollbar */ +#define GO_VLEFT 'L' /* left scrollbar with vert split */ +#define GO_MENUS 'm' /* use menu bar */ +#define GO_NOSYSMENU 'M' /* don't source system menu */ +#define GO_POINTER 'p' /* pointer enter/leave callbacks */ +#define GO_ASELPLUS 'P' /* autoselectPlus */ +#define GO_RIGHT 'r' /* use right scrollbar */ +#define GO_VRIGHT 'R' /* right scrollbar with vert split */ +#define GO_TEAROFF 't' /* add tear-off menu items */ +#define GO_TOOLBAR 'T' /* add toolbar */ +#define GO_FOOTER 'F' /* add footer */ +#define GO_VERTICAL 'v' /* arrange dialog buttons vertically */ +#define GO_ALL "aAbcefFghilmMprtTv" /* all possible flags for 'go' */ + +/* flags for 'comments' option */ +#define COM_NEST 'n' /* comments strings nest */ +#define COM_BLANK 'b' /* needs blank after string */ +#define COM_START 's' /* start of comment */ +#define COM_MIDDLE 'm' /* middle of comment */ +#define COM_END 'e' /* end of comment */ +#define COM_AUTO_END 'x' /* last char of end closes comment */ +#define COM_FIRST 'f' /* first line comment only */ +#define COM_LEFT 'l' /* left adjusted */ +#define COM_RIGHT 'r' /* right adjusted */ +#define COM_NOBACK 'O' /* don't use for "O" command */ +#define COM_ALL "nbsmexflrO" /* all flags for 'comments' option */ +#define COM_MAX_LEN 50 /* maximum length of a part */ + +/* flags for 'statusline' option */ +#define STL_FILEPATH 'f' /* path of file in buffer */ +#define STL_FULLPATH 'F' /* full path of file in buffer */ +#define STL_FILENAME 't' /* last part (tail) of file path */ +#define STL_COLUMN 'c' /* column og cursor*/ +#define STL_VIRTCOL 'v' /* virtual column */ +#define STL_VIRTCOL_ALT 'V' /* - with 'if different' display */ +#define STL_LINE 'l' /* line number of cursor */ +#define STL_NUMLINES 'L' /* number of lines in buffer */ +#define STL_BUFNO 'n' /* current buffer number */ +#define STL_KEYMAP 'k' /* 'keymap' when active */ +#define STL_OFFSET 'o' /* offset of character under cursor*/ +#define STL_OFFSET_X 'O' /* - in hexadecimal */ +#define STL_BYTEVAL 'b' /* byte value of character */ +#define STL_BYTEVAL_X 'B' /* - in hexadecimal */ +#define STL_ROFLAG 'r' /* readonly flag */ +#define STL_ROFLAG_ALT 'R' /* - other display */ +#define STL_HELPFLAG 'h' /* window is showing a help file */ +#define STL_HELPFLAG_ALT 'H' /* - other display */ +#define STL_FILETYPE 'y' /* 'filetype' */ +#define STL_FILETYPE_ALT 'Y' /* - other display */ +#define STL_PREVIEWFLAG 'w' /* window is showing the preview buf */ +#define STL_PREVIEWFLAG_ALT 'W' /* - other display */ +#define STL_MODIFIED 'm' /* modified flag */ +#define STL_MODIFIED_ALT 'M' /* - other display */ +#define STL_QUICKFIX 'q' /* quickfix window description */ +#define STL_PERCENTAGE 'p' /* percentage through file */ +#define STL_ALTPERCENT 'P' /* percentage as TOP BOT ALL or NN% */ +#define STL_ARGLISTSTAT 'a' /* argument list status as (x of y) */ +#define STL_PAGENUM 'N' /* page number (when printing)*/ +#define STL_VIM_EXPR '{' /* start of expression to substitute */ +#define STL_MIDDLEMARK '=' /* separation between left and right */ +#define STL_TRUNCMARK '<' /* truncation mark if line is too long*/ +#define STL_USER_HL '*' /* highlight from (User)1..9 or 0 */ +#define STL_HIGHLIGHT '#' /* highlight name */ +#define STL_TABPAGENR 'T' /* tab page label nr */ +#define STL_TABCLOSENR 'X' /* tab page close nr */ +#define STL_ALL ((char_u *) "fFtcvVlLknoObBrRhHmYyWwMqpPaN{#") + +/* flags used for parsed 'wildmode' */ +#define WIM_FULL 1 +#define WIM_LONGEST 2 +#define WIM_LIST 4 + +/* arguments for can_bs() */ +#define BS_INDENT 'i' /* "Indent" */ +#define BS_EOL 'o' /* "eOl" */ +#define BS_START 's' /* "Start" */ + +#define LISPWORD_VALUE \ + "defun,define,defmacro,set!,lambda,if,case,let,flet,let*,letrec,do,do*,define-syntax,let-syntax,letrec-syntax,destructuring-bind,defpackage,defparameter,defstruct,deftype,defvar,do-all-symbols,do-external-symbols,do-symbols,dolist,dotimes,ecase,etypecase,eval-when,labels,macrolet,multiple-value-bind,multiple-value-call,multiple-value-prog1,multiple-value-setq,prog1,progv,typecase,unless,unwind-protect,when,with-input-from-string,with-open-file,with-open-stream,with-output-to-string,with-package-iterator,define-condition,handler-bind,handler-case,restart-bind,restart-case,with-simple-restart,store-value,use-value,muffle-warning,abort,continue,with-slots,with-slots*,with-accessors,with-accessors*,defclass,defmethod,print-unreadable-object" + +/* + * The following are actual variables for the options + */ + +EXTERN long p_aleph; /* 'aleph' */ +EXTERN int p_acd; /* 'autochdir' */ +EXTERN char_u *p_ambw; /* 'ambiwidth' */ +EXTERN int p_ar; /* 'autoread' */ +EXTERN int p_aw; /* 'autowrite' */ +EXTERN int p_awa; /* 'autowriteall' */ +EXTERN char_u *p_bs; /* 'backspace' */ +EXTERN char_u *p_bg; /* 'background' */ +EXTERN int p_bk; /* 'backup' */ +EXTERN char_u *p_bkc; /* 'backupcopy' */ +EXTERN unsigned bkc_flags; +#ifdef IN_OPTION_C +static char *(p_bkc_values[]) = +{"yes", "auto", "no", "breaksymlink", "breakhardlink", NULL}; +#endif +# define BKC_YES 0x001 +# define BKC_AUTO 0x002 +# define BKC_NO 0x004 +# define BKC_BREAKSYMLINK 0x008 +# define BKC_BREAKHARDLINK 0x010 +EXTERN char_u *p_bdir; /* 'backupdir' */ +EXTERN char_u *p_bex; /* 'backupext' */ +EXTERN char_u *p_bsk; /* 'backupskip' */ +EXTERN char_u *p_cm; /* 'cryptmethod' */ +EXTERN char_u *p_breakat; /* 'breakat' */ +EXTERN char_u *p_cmp; /* 'casemap' */ +EXTERN unsigned cmp_flags; +# ifdef IN_OPTION_C +static char *(p_cmp_values[]) = {"internal", "keepascii", NULL}; +# endif +# define CMP_INTERNAL 0x001 +# define CMP_KEEPASCII 0x002 +EXTERN char_u *p_enc; /* 'encoding' */ +EXTERN int p_deco; /* 'delcombine' */ +EXTERN char_u *p_ccv; /* 'charconvert' */ +EXTERN char_u *p_cedit; /* 'cedit' */ +EXTERN long p_cwh; /* 'cmdwinheight' */ +EXTERN long p_ch; /* 'cmdheight' */ +EXTERN int p_confirm; /* 'confirm' */ +EXTERN int p_cp; /* 'compatible' */ +EXTERN char_u *p_cot; /* 'completeopt' */ +EXTERN long p_ph; /* 'pumheight' */ +EXTERN char_u *p_cpo; /* 'cpoptions' */ +EXTERN char_u *p_csprg; /* 'cscopeprg' */ +EXTERN int p_csre; /* 'cscoperelative' */ +EXTERN char_u *p_csqf; /* 'cscopequickfix' */ +# define CSQF_CMDS "sgdctefi" +# define CSQF_FLAGS "+-0" +EXTERN int p_cst; /* 'cscopetag' */ +EXTERN long p_csto; /* 'cscopetagorder' */ +EXTERN long p_cspc; /* 'cscopepathcomp' */ +EXTERN int p_csverbose; /* 'cscopeverbose' */ +EXTERN char_u *p_debug; /* 'debug' */ +EXTERN char_u *p_def; /* 'define' */ +EXTERN char_u *p_inc; +EXTERN char_u *p_dip; /* 'diffopt' */ +EXTERN char_u *p_dex; /* 'diffexpr' */ +EXTERN char_u *p_dict; /* 'dictionary' */ +EXTERN int p_dg; /* 'digraph' */ +EXTERN char_u *p_dir; /* 'directory' */ +EXTERN char_u *p_dy; /* 'display' */ +EXTERN unsigned dy_flags; +#ifdef IN_OPTION_C +static char *(p_dy_values[]) = {"lastline", "uhex", NULL}; +#endif +#define DY_LASTLINE 0x001 +#define DY_UHEX 0x002 +EXTERN int p_ed; /* 'edcompatible' */ +EXTERN char_u *p_ead; /* 'eadirection' */ +EXTERN int p_ea; /* 'equalalways' */ +EXTERN char_u *p_ep; /* 'equalprg' */ +EXTERN int p_eb; /* 'errorbells' */ +EXTERN char_u *p_ef; /* 'errorfile' */ +EXTERN char_u *p_efm; /* 'errorformat' */ +EXTERN char_u *p_gefm; /* 'grepformat' */ +EXTERN char_u *p_gp; /* 'grepprg' */ +EXTERN char_u *p_ei; /* 'eventignore' */ +EXTERN int p_ek; /* 'esckeys' */ +EXTERN int p_exrc; /* 'exrc' */ +EXTERN char_u *p_fencs; /* 'fileencodings' */ +EXTERN char_u *p_ffs; /* 'fileformats' */ +EXTERN long p_fic; /* 'fileignorecase' */ +EXTERN char_u *p_fcl; /* 'foldclose' */ +EXTERN long p_fdls; /* 'foldlevelstart' */ +EXTERN char_u *p_fdo; /* 'foldopen' */ +EXTERN unsigned fdo_flags; +# ifdef IN_OPTION_C +static char *(p_fdo_values[]) = {"all", "block", "hor", "mark", "percent", + "quickfix", "search", "tag", "insert", + "undo", "jump", NULL}; +# endif +# define FDO_ALL 0x001 +# define FDO_BLOCK 0x002 +# define FDO_HOR 0x004 +# define FDO_MARK 0x008 +# define FDO_PERCENT 0x010 +# define FDO_QUICKFIX 0x020 +# define FDO_SEARCH 0x040 +# define FDO_TAG 0x080 +# define FDO_INSERT 0x100 +# define FDO_UNDO 0x200 +# define FDO_JUMP 0x400 +EXTERN char_u *p_fp; /* 'formatprg' */ +#ifdef HAVE_FSYNC +EXTERN int p_fs; /* 'fsync' */ +#endif +EXTERN int p_gd; /* 'gdefault' */ +EXTERN char_u *p_pdev; /* 'printdevice' */ +EXTERN char_u *p_penc; /* 'printencoding' */ +EXTERN char_u *p_pexpr; /* 'printexpr' */ +EXTERN char_u *p_pmfn; /* 'printmbfont' */ +EXTERN char_u *p_pmcs; /* 'printmbcharset' */ +EXTERN char_u *p_pfn; /* 'printfont' */ +EXTERN char_u *p_popt; /* 'printoptions' */ +EXTERN char_u *p_header; /* 'printheader' */ +EXTERN int p_prompt; /* 'prompt' */ +#ifdef CURSOR_SHAPE +EXTERN char_u *p_guicursor; /* 'guicursor' */ +#endif +EXTERN char_u *p_hf; /* 'helpfile' */ +EXTERN long p_hh; /* 'helpheight' */ +EXTERN char_u *p_hlg; /* 'helplang' */ +EXTERN int p_hid; /* 'hidden' */ +/* Use P_HID to check if a buffer is to be hidden when it is no longer + * visible in a window. */ +# define P_HID(buf) (buf_hide(buf)) +EXTERN char_u *p_hl; /* 'highlight' */ +EXTERN int p_hls; /* 'hlsearch' */ +EXTERN long p_hi; /* 'history' */ +EXTERN int p_hkmap; /* 'hkmap' */ +EXTERN int p_hkmapp; /* 'hkmapp' */ +EXTERN int p_fkmap; /* 'fkmap' */ +EXTERN int p_altkeymap; /* 'altkeymap' */ +EXTERN int p_arshape; /* 'arabicshape' */ +EXTERN int p_icon; /* 'icon' */ +EXTERN char_u *p_iconstring; /* 'iconstring' */ +EXTERN int p_ic; /* 'ignorecase' */ +#ifdef USE_IM_CONTROL +EXTERN int p_imcmdline; /* 'imcmdline' */ +EXTERN int p_imdisable; /* 'imdisable' */ +#endif +EXTERN int p_is; /* 'incsearch' */ +EXTERN int p_im; /* 'insertmode' */ +EXTERN char_u *p_isf; /* 'isfname' */ +EXTERN char_u *p_isi; /* 'isident' */ +EXTERN char_u *p_isp; /* 'isprint' */ +EXTERN int p_js; /* 'joinspaces' */ +EXTERN char_u *p_kp; /* 'keywordprg' */ +EXTERN char_u *p_km; /* 'keymodel' */ +EXTERN char_u *p_langmap; /* 'langmap'*/ +EXTERN char_u *p_lm; /* 'langmenu' */ +EXTERN char_u *p_lispwords; /* 'lispwords' */ +EXTERN long p_ls; /* 'laststatus' */ +EXTERN long p_stal; /* 'showtabline' */ +EXTERN char_u *p_lcs; /* 'listchars' */ + +EXTERN int p_lz; /* 'lazyredraw' */ +EXTERN int p_lpl; /* 'loadplugins' */ +EXTERN int p_magic; /* 'magic' */ +EXTERN char_u *p_mef; /* 'makeef' */ +EXTERN char_u *p_mp; /* 'makeprg' */ +EXTERN char_u *p_cc; /* 'colorcolumn' */ +EXTERN int p_cc_cols[256]; /* array for 'colorcolumn' columns */ +EXTERN long p_mat; /* 'matchtime' */ +EXTERN long p_mco; /* 'maxcombine' */ +EXTERN long p_mfd; /* 'maxfuncdepth' */ +EXTERN long p_mmd; /* 'maxmapdepth' */ +EXTERN long p_mm; /* 'maxmem' */ +EXTERN long p_mmp; /* 'maxmempattern' */ +EXTERN long p_mmt; /* 'maxmemtot' */ +EXTERN long p_mis; /* 'menuitems' */ +EXTERN char_u *p_msm; /* 'mkspellmem' */ +EXTERN long p_mls; /* 'modelines' */ +EXTERN char_u *p_mouse; /* 'mouse' */ +EXTERN char_u *p_mousem; /* 'mousemodel' */ +EXTERN long p_mouset; /* 'mousetime' */ +EXTERN int p_more; /* 'more' */ +EXTERN char_u *p_opfunc; /* 'operatorfunc' */ +EXTERN char_u *p_para; /* 'paragraphs' */ +EXTERN int p_paste; /* 'paste' */ +EXTERN char_u *p_pt; /* 'pastetoggle' */ +EXTERN char_u *p_pex; /* 'patchexpr' */ +EXTERN char_u *p_pm; /* 'patchmode' */ +EXTERN char_u *p_path; /* 'path' */ +EXTERN char_u *p_cdpath; /* 'cdpath' */ +EXTERN long p_rdt; /* 'redrawtime' */ +EXTERN int p_remap; /* 'remap' */ +EXTERN long p_re; /* 'regexpengine' */ +EXTERN long p_report; /* 'report' */ +EXTERN long p_pvh; /* 'previewheight' */ +EXTERN int p_ari; /* 'allowrevins' */ +EXTERN int p_ri; /* 'revins' */ +EXTERN int p_ru; /* 'ruler' */ +EXTERN char_u *p_ruf; /* 'rulerformat' */ +EXTERN char_u *p_rtp; /* 'runtimepath' */ +EXTERN long p_sj; /* 'scrolljump' */ +EXTERN long p_so; /* 'scrolloff' */ +EXTERN char_u *p_sbo; /* 'scrollopt' */ +EXTERN char_u *p_sections; /* 'sections' */ +EXTERN int p_secure; /* 'secure' */ +EXTERN char_u *p_sel; /* 'selection' */ +EXTERN char_u *p_slm; /* 'selectmode' */ +EXTERN char_u *p_ssop; /* 'sessionoptions' */ +EXTERN unsigned ssop_flags; +# ifdef IN_OPTION_C +/* Also used for 'viewoptions'! */ +static char *(p_ssop_values[]) = {"buffers", "winpos", "resize", "winsize", + "localoptions", "options", "help", "blank", + "globals", "slash", "unix", + "sesdir", "curdir", "folds", "cursor", + "tabpages", NULL}; +# endif +# define SSOP_BUFFERS 0x001 +# define SSOP_WINPOS 0x002 +# define SSOP_RESIZE 0x004 +# define SSOP_WINSIZE 0x008 +# define SSOP_LOCALOPTIONS 0x010 +# define SSOP_OPTIONS 0x020 +# define SSOP_HELP 0x040 +# define SSOP_BLANK 0x080 +# define SSOP_GLOBALS 0x100 +# define SSOP_SLASH 0x200 +# define SSOP_UNIX 0x400 +# define SSOP_SESDIR 0x800 +# define SSOP_CURDIR 0x1000 +# define SSOP_FOLDS 0x2000 +# define SSOP_CURSOR 0x4000 +# define SSOP_TABPAGES 0x8000 +EXTERN char_u *p_sh; /* 'shell' */ +EXTERN char_u *p_shcf; /* 'shellcmdflag' */ +EXTERN char_u *p_sp; /* 'shellpipe' */ +EXTERN char_u *p_shq; /* 'shellquote' */ +EXTERN char_u *p_sxq; /* 'shellxquote' */ +EXTERN char_u *p_sxe; /* 'shellxescape' */ +EXTERN char_u *p_srr; /* 'shellredir' */ +EXTERN int p_stmp; /* 'shelltemp' */ +#ifdef BACKSLASH_IN_FILENAME +EXTERN int p_ssl; /* 'shellslash' */ +#endif +EXTERN char_u *p_stl; /* 'statusline' */ +EXTERN int p_sr; /* 'shiftround' */ +EXTERN char_u *p_shm; /* 'shortmess' */ +EXTERN char_u *p_sbr; /* 'showbreak' */ +EXTERN int p_sc; /* 'showcmd' */ +EXTERN int p_sft; /* 'showfulltag' */ +EXTERN int p_sm; /* 'showmatch' */ +EXTERN int p_smd; /* 'showmode' */ +EXTERN long p_ss; /* 'sidescroll' */ +EXTERN long p_siso; /* 'sidescrolloff' */ +EXTERN int p_scs; /* 'smartcase' */ +EXTERN int p_sta; /* 'smarttab' */ +EXTERN int p_sb; /* 'splitbelow' */ +EXTERN long p_tpm; /* 'tabpagemax' */ +EXTERN char_u *p_tal; /* 'tabline' */ +EXTERN char_u *p_sps; /* 'spellsuggest' */ +EXTERN int p_spr; /* 'splitright' */ +EXTERN int p_sol; /* 'startofline' */ +EXTERN char_u *p_su; /* 'suffixes' */ +EXTERN char_u *p_sws; /* 'swapsync' */ +EXTERN char_u *p_swb; /* 'switchbuf' */ +EXTERN unsigned swb_flags; +#ifdef IN_OPTION_C +static char *(p_swb_values[]) = {"useopen", "usetab", "split", "newtab", NULL}; +#endif +#define SWB_USEOPEN 0x001 +#define SWB_USETAB 0x002 +#define SWB_SPLIT 0x004 +#define SWB_NEWTAB 0x008 +EXTERN int p_tbs; /* 'tagbsearch' */ +EXTERN long p_tl; /* 'taglength' */ +EXTERN int p_tr; /* 'tagrelative' */ +EXTERN char_u *p_tags; /* 'tags' */ +EXTERN int p_tgst; /* 'tagstack' */ +EXTERN int p_tbidi; /* 'termbidi' */ +EXTERN char_u *p_tenc; /* 'termencoding' */ +EXTERN int p_terse; /* 'terse' */ +EXTERN int p_ta; /* 'textauto' */ +EXTERN int p_to; /* 'tildeop' */ +EXTERN int p_timeout; /* 'timeout' */ +EXTERN long p_tm; /* 'timeoutlen' */ +EXTERN int p_title; /* 'title' */ +EXTERN long p_titlelen; /* 'titlelen' */ +EXTERN char_u *p_titleold; /* 'titleold' */ +EXTERN char_u *p_titlestring; /* 'titlestring' */ +EXTERN char_u *p_tsr; /* 'thesaurus' */ +EXTERN int p_ttimeout; /* 'ttimeout' */ +EXTERN long p_ttm; /* 'ttimeoutlen' */ +EXTERN int p_tbi; /* 'ttybuiltin' */ +EXTERN int p_tf; /* 'ttyfast' */ +EXTERN long p_ttyscroll; /* 'ttyscroll' */ +#if defined(FEAT_MOUSE) && (defined(UNIX) || defined(VMS)) +EXTERN char_u *p_ttym; /* 'ttymouse' */ +EXTERN unsigned ttym_flags; +# ifdef IN_OPTION_C +static char *(p_ttym_values[]) = +{"xterm", "xterm2", "dec", "netterm", "jsbterm", "pterm", "urxvt", "sgr", NULL}; +# endif +# define TTYM_XTERM 0x01 +# define TTYM_XTERM2 0x02 +# define TTYM_DEC 0x04 +# define TTYM_NETTERM 0x08 +# define TTYM_JSBTERM 0x10 +# define TTYM_PTERM 0x20 +# define TTYM_URXVT 0x40 +# define TTYM_SGR 0x80 +#endif +EXTERN char_u *p_udir; /* 'undodir' */ +EXTERN long p_ul; /* 'undolevels' */ +EXTERN long p_ur; /* 'undoreload' */ +EXTERN long p_uc; /* 'updatecount' */ +EXTERN long p_ut; /* 'updatetime' */ +EXTERN char_u *p_fcs; /* 'fillchar' */ +EXTERN char_u *p_viminfo; /* 'viminfo' */ +EXTERN char_u *p_vdir; /* 'viewdir' */ +EXTERN char_u *p_vop; /* 'viewoptions' */ +EXTERN unsigned vop_flags; /* uses SSOP_ flags */ +EXTERN int p_vb; /* 'visualbell' */ +EXTERN char_u *p_ve; /* 'virtualedit' */ +EXTERN unsigned ve_flags; +# ifdef IN_OPTION_C +static char *(p_ve_values[]) = {"block", "insert", "all", "onemore", NULL}; +# endif +# define VE_BLOCK 5 /* includes "all" */ +# define VE_INSERT 6 /* includes "all" */ +# define VE_ALL 4 +# define VE_ONEMORE 8 +EXTERN long p_verbose; /* 'verbose' */ +#ifdef IN_OPTION_C +char_u *p_vfile = (char_u *)""; /* used before options are initialized */ +#else +extern char_u *p_vfile; /* 'verbosefile' */ +#endif +EXTERN int p_warn; /* 'warn' */ +EXTERN char_u *p_wop; /* 'wildoptions' */ +EXTERN long p_window; /* 'window' */ +#if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) || defined(LINT) \ + || defined (FEAT_GUI_GTK) || defined(FEAT_GUI_PHOTON) +#define FEAT_WAK +EXTERN char_u *p_wak; /* 'winaltkeys' */ +#endif +EXTERN char_u *p_wak; +EXTERN char_u *p_wig; /* 'wildignore' */ +EXTERN int p_wiv; /* 'weirdinvert' */ +EXTERN char_u *p_ww; /* 'whichwrap' */ +EXTERN long p_wc; /* 'wildchar' */ +EXTERN long p_wcm; /* 'wildcharm' */ +EXTERN long p_wic; /* 'wildignorecase' */ +EXTERN char_u *p_wim; /* 'wildmode' */ +EXTERN int p_wmnu; /* 'wildmenu' */ +EXTERN long p_wh; /* 'winheight' */ +EXTERN long p_wmh; /* 'winminheight' */ +EXTERN long p_wmw; /* 'winminwidth' */ +EXTERN long p_wiw; /* 'winwidth' */ +EXTERN int p_ws; /* 'wrapscan' */ +EXTERN int p_write; /* 'write' */ +EXTERN int p_wa; /* 'writeany' */ +EXTERN int p_wb; /* 'writebackup' */ +EXTERN long p_wd; /* 'writedelay' */ + +/* + * "indir" values for buffer-local opions. + * These need to be defined globally, so that the BV_COUNT can be used with + * b_p_scriptID[]. + */ +enum { + BV_AI = 0 + , BV_AR + , BV_BH + , BV_BT + , BV_EFM + , BV_GP + , BV_MP + , BV_BIN + , BV_BL + , BV_BOMB + , BV_CI + , BV_CIN + , BV_CINK + , BV_CINO + , BV_CINW + , BV_CM + , BV_CMS + , BV_COM + , BV_CPT + , BV_DICT + , BV_TSR + , BV_CFU + , BV_DEF + , BV_INC + , BV_EOL + , BV_EP + , BV_ET + , BV_FENC + , BV_BEXPR + , BV_FEX + , BV_FF + , BV_FLP + , BV_FO + , BV_FT + , BV_IMI + , BV_IMS + , BV_INDE + , BV_INDK + , BV_INEX + , BV_INF + , BV_ISK + , BV_KEY + , BV_KMAP + , BV_KP + , BV_LISP + , BV_MA + , BV_ML + , BV_MOD + , BV_MPS + , BV_NF + , BV_OFU + , BV_PATH + , BV_PI + , BV_QE + , BV_RO + , BV_SI +#ifndef SHORT_FNAME + , BV_SN +#endif + , BV_SMC + , BV_SYN + , BV_SPC + , BV_SPF + , BV_SPL + , BV_STS + , BV_SUA + , BV_SW + , BV_SWF + , BV_TAGS + , BV_TS + , BV_TW + , BV_TX + , BV_UDF + , BV_UL + , BV_WM + , BV_COUNT /* must be the last one */ +}; + +/* + * "indir" values for window-local options. + * These need to be defined globally, so that the WV_COUNT can be used in the + * window structure. + */ +enum { + WV_LIST = 0 + , WV_ARAB + , WV_COCU + , WV_COLE + , WV_CRBIND + , WV_DIFF + , WV_FDC + , WV_FEN + , WV_FDI + , WV_FDL + , WV_FDM + , WV_FML + , WV_FDN + , WV_FDE + , WV_FDT + , WV_FMR + , WV_LBR + , WV_NU + , WV_RNU + , WV_NUW + , WV_PVW + , WV_RL + , WV_RLC + , WV_SCBIND + , WV_SCROLL + , WV_SPELL + , WV_CUC + , WV_CUL + , WV_CC + , WV_STL + , WV_WFH + , WV_WFW + , WV_WRAP + , WV_COUNT /* must be the last one */ +}; + +/* Value for b_p_ul indicating the global value must be used. */ +#define NO_LOCAL_UNDOLEVEL -123456 diff --git a/src/os/fs.c b/src/os/fs.c index e9fe651b6b..3529ab4f46 100644 --- a/src/os/fs.c +++ b/src/os/fs.c @@ -14,6 +14,7 @@ #include #include "os.h" +#include "../message.h" int mch_chdir(char *path) { if (p_verbose >= 5) { diff --git a/src/os_unix.c b/src/os_unix.c index c3353d3724..856191ea95 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -28,9 +28,25 @@ # define select select_declared_wrong #include "vim.h" +#include "os_unix.h" +#include "buffer.h" +#include "charset.h" +#include "eval.h" +#include "ex_cmds.h" +#include "fileio.h" +#include "getchar.h" +#include "main.h" +#include "mbyte.h" +#include "memline.h" +#include "message.h" +#include "misc1.h" +#include "misc2.h" +#include "screen.h" +#include "syntax.h" +#include "term.h" +#include "ui.h" #include "os/os.h" - #include "os_unixx.h" /* unix includes for os_unix.c only */ #ifdef HAVE_SELINUX diff --git a/src/os_unix.h b/src/os_unix.h index 3eb79e9a25..3a20c49252 100644 --- a/src/os_unix.h +++ b/src/os_unix.h @@ -1,351 +1,78 @@ -/* vi:set ts=8 sts=4 sw=4: - * - * VIM - Vi IMproved by Bram Moolenaar - * - * Do ":help uganda" in Vim to read copying and usage conditions. - * Do ":help credits" in Vim to see a list of people who contributed. - */ - -/* - * NextStep has a problem with configure, undefine a few things: - */ - -#include -#include - -# include -# include - -#ifdef HAVE_STDLIB_H -# include -#endif - - - -/* On AIX 4.2 there is a conflicting prototype for ioctl() in stropts.h and - * unistd.h. This hack should fix that (suggested by Jeff George). - * But on AIX 4.3 it's alright (suggested by Jake Hamby). */ - -#ifdef HAVE_UNISTD_H -# include -#endif - -#ifdef HAVE_LIBC_H -# include /* for NeXT */ -#endif - -#ifdef HAVE_SYS_PARAM_H -# include /* defines BSD, if it's a BSD system */ -#endif - -/* - * 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)) -# define mch_remove(x) unlink((char *)(x)) - -/* The number of arguments to a signal handler is configured here. */ -/* It used to be a long list of almost all systems. Any system that doesn't - * have an argument??? */ -#define SIGHASARG - -/* List 3 arg systems here. I guess __sgi, please test and correct me. jw. */ - -#ifdef SIGHASARG -# ifdef SIGHAS3ARGS -# define SIGPROTOARG (int, int, struct sigcontext *) -# define SIGDEFARG(s) (s, sig2, scont) int s, sig2; struct sigcontext *scont; -# define SIGDUMMYARG 0, 0, (struct sigcontext *)0 -# else -# define SIGPROTOARG (int) -# define SIGDEFARG(s) (s) int s; -# define SIGDUMMYARG 0 -# endif -#else -# define SIGPROTOARG (void) -# define SIGDEFARG(s) () -# define SIGDUMMYARG -#endif - -#ifdef HAVE_DIRENT_H -# include -# ifndef NAMLEN -# define NAMLEN(dirent) strlen((dirent)->d_name) -# endif -#else -# define dirent direct -# define NAMLEN(dirent) (dirent)->d_namlen -# if HAVE_SYS_NDIR_H -# include -# endif -# if HAVE_SYS_DIR_H -# include -# endif -# if HAVE_NDIR_H -# include -# endif -#endif - -#if !defined(HAVE_SYS_TIME_H) || defined(TIME_WITH_SYS_TIME) -# include /* on some systems time.h should not be - included together with sys/time.h */ -#endif -#ifdef HAVE_SYS_TIME_H -# include -#endif - -#include - -#if defined(DIRSIZ) && !defined(MAXNAMLEN) -# define MAXNAMLEN DIRSIZ -#endif - -#if defined(UFS_MAXNAMLEN) && !defined(MAXNAMLEN) -# define MAXNAMLEN UFS_MAXNAMLEN /* for dynix/ptx */ -#endif - -#if defined(NAME_MAX) && !defined(MAXNAMLEN) -# define MAXNAMLEN NAME_MAX /* for Linux before .99p3 */ -#endif - -/* - * Note: if MAXNAMLEN has the wrong value, you will get error messages - * for not being able to open the swap file. - */ -#if !defined(MAXNAMLEN) -# define MAXNAMLEN 512 /* for all other Unix */ -#endif - -#define BASENAMELEN (MAXNAMLEN - 5) - -#ifdef HAVE_PWD_H -# include -#endif - -#ifdef __COHERENT__ -# undef __ARGS -#endif - -/* - * Unix system-dependent file names - */ -#ifndef SYS_VIMRC_FILE -# define SYS_VIMRC_FILE "$VIM/vimrc" -#endif -#ifndef SYS_GVIMRC_FILE -# define SYS_GVIMRC_FILE "$VIM/gvimrc" -#endif -#ifndef DFLT_HELPFILE -# define DFLT_HELPFILE "$VIMRUNTIME/doc/help.txt" -#endif -#ifndef FILETYPE_FILE -# define FILETYPE_FILE "filetype.vim" -#endif -#ifndef FTPLUGIN_FILE -# define FTPLUGIN_FILE "ftplugin.vim" -#endif -#ifndef INDENT_FILE -# define INDENT_FILE "indent.vim" -#endif -#ifndef FTOFF_FILE -# define FTOFF_FILE "ftoff.vim" -#endif -#ifndef FTPLUGOF_FILE -# define FTPLUGOF_FILE "ftplugof.vim" -#endif -#ifndef INDOFF_FILE -# define INDOFF_FILE "indoff.vim" -#endif -#ifndef SYS_MENU_FILE -# define SYS_MENU_FILE "$VIMRUNTIME/menu.vim" -#endif - -#ifndef USR_EXRC_FILE -# define USR_EXRC_FILE "$HOME/.exrc" -#endif - - -#ifndef USR_VIMRC_FILE -# define USR_VIMRC_FILE "$HOME/.neovimrc" -#endif - - -#if !defined(USR_EXRC_FILE2) -# define USR_VIMRC_FILE2 "~/.neovim/vimrc" -#endif - - -#ifndef USR_GVIMRC_FILE -# define USR_GVIMRC_FILE "$HOME/.neogvimrc" -#endif - -#ifndef USR_GVIMRC_FILE2 -# define USR_GVIMRC_FILE2 "~/.neovim/gvimrc" -#endif - - -#ifndef EVIM_FILE -# define EVIM_FILE "$VIMRUNTIME/evim.vim" -#endif - -# ifndef VIMINFO_FILE -# define VIMINFO_FILE "$HOME/.neoviminfo" -# endif - -#ifndef EXRC_FILE -# define EXRC_FILE ".exrc" -#endif - -#ifndef VIMRC_FILE -# define VIMRC_FILE ".neovimrc" -#endif - - -#ifndef SYNTAX_FNAME -# define SYNTAX_FNAME "$VIMRUNTIME/syntax/%s.vim" -#endif - -#ifndef DFLT_BDIR -# define DFLT_BDIR ".,~/tmp,~/" /* default for 'backupdir' */ -#endif - -#ifndef DFLT_DIR -# define DFLT_DIR ".,~/tmp,/var/tmp,/tmp" /* default for 'directory' */ -#endif - -#ifndef DFLT_VDIR -# define DFLT_VDIR "$HOME/.neovim/view" /* default for 'viewdir' */ -#endif - -#define DFLT_ERRORFILE "errors.err" - -# ifdef RUNTIME_GLOBAL -# define DFLT_RUNTIMEPATH "~/.neovim," RUNTIME_GLOBAL ",$VIMRUNTIME," \ - RUNTIME_GLOBAL "/after,~/.neovim/after" -# else -# define DFLT_RUNTIMEPATH \ - "~/.neovim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,~/.neovim/after" -# endif - -# define TEMPDIRNAMES "$TMPDIR", "/tmp", ".", "$HOME" -# define TEMPNAMELEN 256 - -/* Special wildcards that need to be handled by the shell */ -#define SPECIAL_WILDCHAR "`'{" - -#ifndef HAVE_OPENDIR -# define NO_EXPANDPATH -#endif - -/* - * Unix has plenty of memory, use large buffers - */ -#define CMDBUFFSIZE 1024 /* size of the command processing buffer */ - -/* Use the system path length if it makes sense. */ -#if defined(PATH_MAX) && (PATH_MAX > 1000) -# define MAXPATHL PATH_MAX -#else -# define MAXPATHL 1024 -#endif - -#define CHECK_INODE /* used when checking if a swap file already - exists for a file */ -# ifndef DFLT_MAXMEM -# define DFLT_MAXMEM (5*1024) /* use up to 5 Mbyte for a buffer */ -# endif -# ifndef DFLT_MAXMEMTOT -# define DFLT_MAXMEMTOT (10*1024) /* use up to 10 Mbyte for Vim */ -# endif - -/* memmove is not present on all systems, use memmove, bcopy, memcpy or our - * own version */ -/* Some systems have (void *) arguments, some (char *). If we use (char *) it - * works for all */ -#ifdef USEMEMMOVE -# define mch_memmove(to, from, len) memmove((char *)(to), (char *)(from), len) -#else -# ifdef USEBCOPY -# define mch_memmove(to, from, len) bcopy((char *)(from), (char *)(to), len) -# else -# ifdef USEMEMCPY -# define mch_memmove(to, from, len) memcpy((char *)(to), (char *)(from), len) -# else -# define VIM_MEMMOVE /* found in misc2.c */ -# endif -# endif -#endif - -# ifdef HAVE_RENAME -# define mch_rename(src, dst) rename(src, dst) -# else -int mch_rename __ARGS((const char *src, const char *dest)); -# endif -# ifdef __MVS__ -/* on OS390 Unix getenv() doesn't return a pointer to persistent - * storage -> use __getenv() */ -# define mch_getenv(x) (char_u *)__getenv((char *)(x)) -# else -# define mch_getenv(x) (char_u *)getenv((char *)(x)) -# endif -# define mch_setenv(name, val, x) setenv(name, val, x) - -#if !defined(S_ISDIR) && defined(S_IFDIR) -# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) -#endif -#if !defined(S_ISREG) && defined(S_IFREG) -# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) -#endif -#if !defined(S_ISBLK) && defined(S_IFBLK) -# define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) -#endif -#if !defined(S_ISSOCK) && defined(S_IFSOCK) -# define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) -#endif -#if !defined(S_ISFIFO) && defined(S_IFIFO) -# define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) -#endif -#if !defined(S_ISCHR) && defined(S_IFCHR) -# define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) -#endif - -/* Note: Some systems need both string.h and strings.h (Savage). However, - * some systems can't handle both, only use string.h in that case. */ -#ifdef HAVE_STRING_H -# include -#endif -#if defined(HAVE_STRINGS_H) && !defined(NO_STRINGS_WITH_STRING_H) -# include -#endif - -#if defined(HAVE_SETJMP_H) -# include -# ifdef HAVE_SIGSETJMP -# define JMP_BUF sigjmp_buf -# define SETJMP(x) sigsetjmp((x), 1) -# define LONGJMP siglongjmp -# else -# define JMP_BUF jmp_buf -# define SETJMP(x) setjmp(x) -# define LONGJMP longjmp -# endif -#endif - -#define HAVE_DUP /* have dup() */ -#define HAVE_ST_MODE /* have stat.st_mode */ - -/* We have three kinds of ACL support. */ -#define HAVE_ACL (HAVE_POSIX_ACL || HAVE_SOLARIS_ACL || HAVE_AIX_ACL) +#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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_OS_UNIX_H */ diff --git a/src/os_unix_defs.h b/src/os_unix_defs.h new file mode 100644 index 0000000000..3eb79e9a25 --- /dev/null +++ b/src/os_unix_defs.h @@ -0,0 +1,351 @@ +/* vi:set ts=8 sts=4 sw=4: + * + * VIM - Vi IMproved by Bram Moolenaar + * + * Do ":help uganda" in Vim to read copying and usage conditions. + * Do ":help credits" in Vim to see a list of people who contributed. + */ + +/* + * NextStep has a problem with configure, undefine a few things: + */ + +#include +#include + +# include +# include + +#ifdef HAVE_STDLIB_H +# include +#endif + + + +/* On AIX 4.2 there is a conflicting prototype for ioctl() in stropts.h and + * unistd.h. This hack should fix that (suggested by Jeff George). + * But on AIX 4.3 it's alright (suggested by Jake Hamby). */ + +#ifdef HAVE_UNISTD_H +# include +#endif + +#ifdef HAVE_LIBC_H +# include /* for NeXT */ +#endif + +#ifdef HAVE_SYS_PARAM_H +# include /* defines BSD, if it's a BSD system */ +#endif + +/* + * 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)) +# define mch_remove(x) unlink((char *)(x)) + +/* The number of arguments to a signal handler is configured here. */ +/* It used to be a long list of almost all systems. Any system that doesn't + * have an argument??? */ +#define SIGHASARG + +/* List 3 arg systems here. I guess __sgi, please test and correct me. jw. */ + +#ifdef SIGHASARG +# ifdef SIGHAS3ARGS +# define SIGPROTOARG (int, int, struct sigcontext *) +# define SIGDEFARG(s) (s, sig2, scont) int s, sig2; struct sigcontext *scont; +# define SIGDUMMYARG 0, 0, (struct sigcontext *)0 +# else +# define SIGPROTOARG (int) +# define SIGDEFARG(s) (s) int s; +# define SIGDUMMYARG 0 +# endif +#else +# define SIGPROTOARG (void) +# define SIGDEFARG(s) () +# define SIGDUMMYARG +#endif + +#ifdef HAVE_DIRENT_H +# include +# ifndef NAMLEN +# define NAMLEN(dirent) strlen((dirent)->d_name) +# endif +#else +# define dirent direct +# define NAMLEN(dirent) (dirent)->d_namlen +# if HAVE_SYS_NDIR_H +# include +# endif +# if HAVE_SYS_DIR_H +# include +# endif +# if HAVE_NDIR_H +# include +# endif +#endif + +#if !defined(HAVE_SYS_TIME_H) || defined(TIME_WITH_SYS_TIME) +# include /* on some systems time.h should not be + included together with sys/time.h */ +#endif +#ifdef HAVE_SYS_TIME_H +# include +#endif + +#include + +#if defined(DIRSIZ) && !defined(MAXNAMLEN) +# define MAXNAMLEN DIRSIZ +#endif + +#if defined(UFS_MAXNAMLEN) && !defined(MAXNAMLEN) +# define MAXNAMLEN UFS_MAXNAMLEN /* for dynix/ptx */ +#endif + +#if defined(NAME_MAX) && !defined(MAXNAMLEN) +# define MAXNAMLEN NAME_MAX /* for Linux before .99p3 */ +#endif + +/* + * Note: if MAXNAMLEN has the wrong value, you will get error messages + * for not being able to open the swap file. + */ +#if !defined(MAXNAMLEN) +# define MAXNAMLEN 512 /* for all other Unix */ +#endif + +#define BASENAMELEN (MAXNAMLEN - 5) + +#ifdef HAVE_PWD_H +# include +#endif + +#ifdef __COHERENT__ +# undef __ARGS +#endif + +/* + * Unix system-dependent file names + */ +#ifndef SYS_VIMRC_FILE +# define SYS_VIMRC_FILE "$VIM/vimrc" +#endif +#ifndef SYS_GVIMRC_FILE +# define SYS_GVIMRC_FILE "$VIM/gvimrc" +#endif +#ifndef DFLT_HELPFILE +# define DFLT_HELPFILE "$VIMRUNTIME/doc/help.txt" +#endif +#ifndef FILETYPE_FILE +# define FILETYPE_FILE "filetype.vim" +#endif +#ifndef FTPLUGIN_FILE +# define FTPLUGIN_FILE "ftplugin.vim" +#endif +#ifndef INDENT_FILE +# define INDENT_FILE "indent.vim" +#endif +#ifndef FTOFF_FILE +# define FTOFF_FILE "ftoff.vim" +#endif +#ifndef FTPLUGOF_FILE +# define FTPLUGOF_FILE "ftplugof.vim" +#endif +#ifndef INDOFF_FILE +# define INDOFF_FILE "indoff.vim" +#endif +#ifndef SYS_MENU_FILE +# define SYS_MENU_FILE "$VIMRUNTIME/menu.vim" +#endif + +#ifndef USR_EXRC_FILE +# define USR_EXRC_FILE "$HOME/.exrc" +#endif + + +#ifndef USR_VIMRC_FILE +# define USR_VIMRC_FILE "$HOME/.neovimrc" +#endif + + +#if !defined(USR_EXRC_FILE2) +# define USR_VIMRC_FILE2 "~/.neovim/vimrc" +#endif + + +#ifndef USR_GVIMRC_FILE +# define USR_GVIMRC_FILE "$HOME/.neogvimrc" +#endif + +#ifndef USR_GVIMRC_FILE2 +# define USR_GVIMRC_FILE2 "~/.neovim/gvimrc" +#endif + + +#ifndef EVIM_FILE +# define EVIM_FILE "$VIMRUNTIME/evim.vim" +#endif + +# ifndef VIMINFO_FILE +# define VIMINFO_FILE "$HOME/.neoviminfo" +# endif + +#ifndef EXRC_FILE +# define EXRC_FILE ".exrc" +#endif + +#ifndef VIMRC_FILE +# define VIMRC_FILE ".neovimrc" +#endif + + +#ifndef SYNTAX_FNAME +# define SYNTAX_FNAME "$VIMRUNTIME/syntax/%s.vim" +#endif + +#ifndef DFLT_BDIR +# define DFLT_BDIR ".,~/tmp,~/" /* default for 'backupdir' */ +#endif + +#ifndef DFLT_DIR +# define DFLT_DIR ".,~/tmp,/var/tmp,/tmp" /* default for 'directory' */ +#endif + +#ifndef DFLT_VDIR +# define DFLT_VDIR "$HOME/.neovim/view" /* default for 'viewdir' */ +#endif + +#define DFLT_ERRORFILE "errors.err" + +# ifdef RUNTIME_GLOBAL +# define DFLT_RUNTIMEPATH "~/.neovim," RUNTIME_GLOBAL ",$VIMRUNTIME," \ + RUNTIME_GLOBAL "/after,~/.neovim/after" +# else +# define DFLT_RUNTIMEPATH \ + "~/.neovim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,~/.neovim/after" +# endif + +# define TEMPDIRNAMES "$TMPDIR", "/tmp", ".", "$HOME" +# define TEMPNAMELEN 256 + +/* Special wildcards that need to be handled by the shell */ +#define SPECIAL_WILDCHAR "`'{" + +#ifndef HAVE_OPENDIR +# define NO_EXPANDPATH +#endif + +/* + * Unix has plenty of memory, use large buffers + */ +#define CMDBUFFSIZE 1024 /* size of the command processing buffer */ + +/* Use the system path length if it makes sense. */ +#if defined(PATH_MAX) && (PATH_MAX > 1000) +# define MAXPATHL PATH_MAX +#else +# define MAXPATHL 1024 +#endif + +#define CHECK_INODE /* used when checking if a swap file already + exists for a file */ +# ifndef DFLT_MAXMEM +# define DFLT_MAXMEM (5*1024) /* use up to 5 Mbyte for a buffer */ +# endif +# ifndef DFLT_MAXMEMTOT +# define DFLT_MAXMEMTOT (10*1024) /* use up to 10 Mbyte for Vim */ +# endif + +/* memmove is not present on all systems, use memmove, bcopy, memcpy or our + * own version */ +/* Some systems have (void *) arguments, some (char *). If we use (char *) it + * works for all */ +#ifdef USEMEMMOVE +# define mch_memmove(to, from, len) memmove((char *)(to), (char *)(from), len) +#else +# ifdef USEBCOPY +# define mch_memmove(to, from, len) bcopy((char *)(from), (char *)(to), len) +# else +# ifdef USEMEMCPY +# define mch_memmove(to, from, len) memcpy((char *)(to), (char *)(from), len) +# else +# define VIM_MEMMOVE /* found in misc2.c */ +# endif +# endif +#endif + +# ifdef HAVE_RENAME +# define mch_rename(src, dst) rename(src, dst) +# else +int mch_rename __ARGS((const char *src, const char *dest)); +# endif +# ifdef __MVS__ +/* on OS390 Unix getenv() doesn't return a pointer to persistent + * storage -> use __getenv() */ +# define mch_getenv(x) (char_u *)__getenv((char *)(x)) +# else +# define mch_getenv(x) (char_u *)getenv((char *)(x)) +# endif +# define mch_setenv(name, val, x) setenv(name, val, x) + +#if !defined(S_ISDIR) && defined(S_IFDIR) +# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) +#endif +#if !defined(S_ISREG) && defined(S_IFREG) +# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) +#endif +#if !defined(S_ISBLK) && defined(S_IFBLK) +# define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) +#endif +#if !defined(S_ISSOCK) && defined(S_IFSOCK) +# define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) +#endif +#if !defined(S_ISFIFO) && defined(S_IFIFO) +# define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) +#endif +#if !defined(S_ISCHR) && defined(S_IFCHR) +# define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) +#endif + +/* Note: Some systems need both string.h and strings.h (Savage). However, + * some systems can't handle both, only use string.h in that case. */ +#ifdef HAVE_STRING_H +# include +#endif +#if defined(HAVE_STRINGS_H) && !defined(NO_STRINGS_WITH_STRING_H) +# include +#endif + +#if defined(HAVE_SETJMP_H) +# include +# ifdef HAVE_SIGSETJMP +# define JMP_BUF sigjmp_buf +# define SETJMP(x) sigsetjmp((x), 1) +# define LONGJMP siglongjmp +# else +# define JMP_BUF jmp_buf +# define SETJMP(x) setjmp(x) +# define LONGJMP longjmp +# endif +#endif + +#define HAVE_DUP /* have dup() */ +#define HAVE_ST_MODE /* have stat.st_mode */ + +/* We have three kinds of ACL support. */ +#define HAVE_ACL (HAVE_POSIX_ACL || HAVE_SOLARIS_ACL || HAVE_AIX_ACL) diff --git a/src/popupmnu.c b/src/popupmnu.c index be8c3ec0e0..293e1f0bb2 100644 --- a/src/popupmnu.c +++ b/src/popupmnu.c @@ -11,7 +11,16 @@ * popupmnu.c: Popup menu (PUM) */ #include "vim.h" - +#include "popupmnu.h" +#include "charset.h" +#include "ex_cmds.h" +#include "memline.h" +#include "misc2.h" +#include "move.h" +#include "option.h" +#include "screen.h" +#include "search.h" +#include "window.h" static pumitem_T *pum_array = NULL; /* items of displayed pum */ static int pum_size; /* nr of items in "pum_array" */ diff --git a/src/popupmnu.h b/src/popupmnu.h new file mode 100644 index 0000000000..8a619fdb36 --- /dev/null +++ b/src/popupmnu.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_POPUPMNU_H */ diff --git a/src/proto.h b/src/proto.h index b040ff70cc..5037dfa26f 100644 --- a/src/proto.h +++ b/src/proto.h @@ -26,35 +26,6 @@ # define GdkEventKey int # define XImage int -# if defined(UNIX) || defined(__EMX__) || defined(VMS) -# include "os_unix.pro" -# endif - -# include "blowfish.pro" -# include "buffer.pro" -# include "charset.pro" -# include "if_cscope.pro" -# include "diff.pro" -# include "digraph.pro" -# include "edit.pro" -# include "eval.pro" -# include "ex_cmds.pro" -# include "ex_cmds2.pro" -# include "ex_docmd.pro" -# include "ex_eval.pro" -# include "ex_getln.pro" -# include "fileio.pro" -# include "fold.pro" -# include "getchar.pro" -# include "hangulin.pro" -# include "hardcopy.pro" -# include "hashtab.pro" -# include "main.pro" -# include "mark.pro" -# include "memfile.pro" -# include "memline.pro" -# include "menu.pro" - # if !defined MESSAGE_FILE || defined(HAVE_STDARG_H) /* These prototypes cannot be produced automatically and conflict with * the old-style prototypes in message.c. */ @@ -75,9 +46,6 @@ int vim_vsnprintf(char *str, size_t str_m, char *fmt, va_list ap, typval_T *tvs) # endif # endif -# include "message.pro" -# include "misc1.pro" -# include "misc2.pro" #ifndef HAVE_STRPBRK /* not generated automatically from misc2.c */ char_u *vim_strpbrk __ARGS((char_u *s, char_u *charset)); #endif @@ -86,52 +54,9 @@ char_u *vim_strpbrk __ARGS((char_u *s, char_u *charset)); void qsort __ARGS((void *base, size_t elm_count, size_t elm_size, int (*cmp)( const void *, const void *))); #endif -# include "move.pro" -# if defined(FEAT_MBYTE) || defined(FEAT_XIM) || defined(FEAT_KEYMAP) \ - || defined(FEAT_POSTSCRIPT) -# include "mbyte.pro" -# endif -# include "normal.pro" -# include "ops.pro" -# include "option.pro" -# include "popupmnu.pro" -# include "quickfix.pro" -# include "regexp.pro" -# include "screen.pro" -# include "sha256.pro" -# include "search.pro" -# include "spell.pro" -# include "syntax.pro" -# include "tag.pro" -# include "term.pro" -# include "ui.pro" -# include "undo.pro" -# include "version.pro" -# include "window.pro" - - - - - - /* Ugly solution for "BalloonEval" not being defined while it's used in some * .pro files. */ # define BalloonEval int - - -# ifdef FEAT_OLE -# endif - -/* - * The perl include files pollute the namespace, therefore proto.h must be - * included before the perl include files. But then CV is not defined, which - * not included here for the perl files. Use a dummy define for CV for the - * other files. - */ - -#ifdef MACOS_CONVERT -#endif - #endif /* !PROTO && !NOPROTO */ diff --git a/src/proto/blowfish.pro b/src/proto/blowfish.pro deleted file mode 100644 index 51e4fa9ec5..0000000000 --- a/src/proto/blowfish.pro +++ /dev/null @@ -1,10 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/buffer.pro b/src/proto/buffer.pro deleted file mode 100644 index 060008db77..0000000000 --- a/src/proto/buffer.pro +++ /dev/null @@ -1,81 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/charset.pro b/src/proto/charset.pro deleted file mode 100644 index d0223f1e9c..0000000000 --- a/src/proto/charset.pro +++ /dev/null @@ -1,64 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/diff.pro b/src/proto/diff.pro deleted file mode 100644 index 0093629033..0000000000 --- a/src/proto/diff.pro +++ /dev/null @@ -1,30 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/digraph.pro b/src/proto/digraph.pro deleted file mode 100644 index 5573b8c36d..0000000000 --- a/src/proto/digraph.pro +++ /dev/null @@ -1,9 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/edit.pro b/src/proto/edit.pro deleted file mode 100644 index 0284101df4..0000000000 --- a/src/proto/edit.pro +++ /dev/null @@ -1,46 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/eval.pro b/src/proto/eval.pro deleted file mode 100644 index c0f707cab2..0000000000 --- a/src/proto/eval.pro +++ /dev/null @@ -1,150 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/ex_cmds.pro b/src/proto/ex_cmds.pro deleted file mode 100644 index 6d566e7f05..0000000000 --- a/src/proto/ex_cmds.pro +++ /dev/null @@ -1,72 +0,0 @@ -/* 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 * - 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, - linenr_T lnum, - int forceit)); -int do_ecmd __ARGS((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)); -/* vim: set ft=c : */ diff --git a/src/proto/ex_cmds2.pro b/src/proto/ex_cmds2.pro deleted file mode 100644 index 51efb73455..0000000000 --- a/src/proto/ex_cmds2.pro +++ /dev/null @@ -1,93 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/ex_docmd.pro b/src/proto/ex_docmd.pro deleted file mode 100644 index ff83cad83f..0000000000 --- a/src/proto/ex_docmd.pro +++ /dev/null @@ -1,69 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/ex_eval.pro b/src/proto/ex_eval.pro deleted file mode 100644 index 7fc87410e0..0000000000 --- a/src/proto/ex_eval.pro +++ /dev/null @@ -1,38 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/ex_getln.pro b/src/proto/ex_getln.pro deleted file mode 100644 index e3a642283f..0000000000 --- a/src/proto/ex_getln.pro +++ /dev/null @@ -1,66 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/fileio.pro b/src/proto/fileio.pro deleted file mode 100644 index ec83342e4d..0000000000 --- a/src/proto/fileio.pro +++ /dev/null @@ -1,82 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/fold.pro b/src/proto/fold.pro deleted file mode 100644 index 6f498872e7..0000000000 --- a/src/proto/fold.pro +++ /dev/null @@ -1,50 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/getchar.pro b/src/proto/getchar.pro deleted file mode 100644 index df3c9836cd..0000000000 --- a/src/proto/getchar.pro +++ /dev/null @@ -1,74 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/hangulin.pro b/src/proto/hangulin.pro deleted file mode 100644 index adfde142ff..0000000000 --- a/src/proto/hangulin.pro +++ /dev/null @@ -1,9 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/hardcopy.pro b/src/proto/hardcopy.pro deleted file mode 100644 index 3744181371..0000000000 --- a/src/proto/hardcopy.pro +++ /dev/null @@ -1,21 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/hashtab.pro b/src/proto/hashtab.pro deleted file mode 100644 index c90f44898e..0000000000 --- a/src/proto/hashtab.pro +++ /dev/null @@ -1,15 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/if_cscope.pro b/src/proto/if_cscope.pro deleted file mode 100644 index 1239835d79..0000000000 --- a/src/proto/if_cscope.pro +++ /dev/null @@ -1,13 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/main.pro b/src/proto/main.pro deleted file mode 100644 index a93b8de2ae..0000000000 --- a/src/proto/main.pro +++ /dev/null @@ -1,27 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/mark.pro b/src/proto/mark.pro deleted file mode 100644 index 47623f4847..0000000000 --- a/src/proto/mark.pro +++ /dev/null @@ -1,34 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/mbyte.pro b/src/proto/mbyte.pro deleted file mode 100644 index c440d62a4e..0000000000 --- a/src/proto/mbyte.pro +++ /dev/null @@ -1,100 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/memfile.pro b/src/proto/memfile.pro deleted file mode 100644 index 3983b4799c..0000000000 --- a/src/proto/memfile.pro +++ /dev/null @@ -1,18 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/memline.pro b/src/proto/memline.pro deleted file mode 100644 index 97806d38a2..0000000000 --- a/src/proto/memline.pro +++ /dev/null @@ -1,41 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/menu.pro b/src/proto/menu.pro deleted file mode 100644 index 80460d2de2..0000000000 --- a/src/proto/menu.pro +++ /dev/null @@ -1,23 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/message.pro b/src/proto/message.pro deleted file mode 100644 index ece1985213..0000000000 --- a/src/proto/message.pro +++ /dev/null @@ -1,80 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/misc1.pro b/src/proto/misc1.pro deleted file mode 100644 index 0497096791..0000000000 --- a/src/proto/misc1.pro +++ /dev/null @@ -1,117 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/misc2.pro b/src/proto/misc2.pro deleted file mode 100644 index c0fd06ff77..0000000000 --- a/src/proto/misc2.pro +++ /dev/null @@ -1,133 +0,0 @@ -/* 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)); -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)); -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)); -void *vim_findfile_init __ARGS((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)); -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, - int first, char_u *path_option, - int find_what, char_u *rel_fname, - char_u *suffixes)); -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)); -/* vim: set ft=c : */ diff --git a/src/proto/move.pro b/src/proto/move.pro deleted file mode 100644 index 595e3b8dd7..0000000000 --- a/src/proto/move.pro +++ /dev/null @@ -1,41 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/normal.pro b/src/proto/normal.pro deleted file mode 100644 index a178751474..0000000000 --- a/src/proto/normal.pro +++ /dev/null @@ -1,29 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/ops.pro b/src/proto/ops.pro deleted file mode 100644 index f69f71ae25..0000000000 --- a/src/proto/ops.pro +++ /dev/null @@ -1,66 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/option.pro b/src/proto/option.pro deleted file mode 100644 index 00aa74d34a..0000000000 --- a/src/proto/option.pro +++ /dev/null @@ -1,74 +0,0 @@ -/* 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, - 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 * - *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)); -/* vim: set ft=c : */ diff --git a/src/proto/os_unix.pro b/src/proto/os_unix.pro deleted file mode 100644 index 3d03df1eaf..0000000000 --- a/src/proto/os_unix.pro +++ /dev/null @@ -1,75 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/popupmnu.pro b/src/proto/popupmnu.pro deleted file mode 100644 index 74a53e2f0e..0000000000 --- a/src/proto/popupmnu.pro +++ /dev/null @@ -1,8 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/quickfix.pro b/src/proto/quickfix.pro deleted file mode 100644 index 98d64a7a3f..0000000000 --- a/src/proto/quickfix.pro +++ /dev/null @@ -1,33 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/regexp.pro b/src/proto/regexp.pro deleted file mode 100644 index b77a8e8ea9..0000000000 --- a/src/proto/regexp.pro +++ /dev/null @@ -1,24 +0,0 @@ -/* 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 magic, - int backslash)); -int vim_regsub_multi __ARGS((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, - linenr_T lnum, colnr_T col, - proftime_T *tm)); -/* vim: set ft=c : */ diff --git a/src/proto/screen.pro b/src/proto/screen.pro deleted file mode 100644 index 53a909e242..0000000000 --- a/src/proto/screen.pro +++ /dev/null @@ -1,66 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/search.pro b/src/proto/search.pro deleted file mode 100644 index 9c3c520c9f..0000000000 --- a/src/proto/search.pro +++ /dev/null @@ -1,49 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/sha256.pro b/src/proto/sha256.pro deleted file mode 100644 index dca9e37998..0000000000 --- a/src/proto/sha256.pro +++ /dev/null @@ -1,12 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/spell.pro b/src/proto/spell.pro deleted file mode 100644 index cba277509e..0000000000 --- a/src/proto/spell.pro +++ /dev/null @@ -1,30 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/syntax.pro b/src/proto/syntax.pro deleted file mode 100644 index 0d5f23910f..0000000000 --- a/src/proto/syntax.pro +++ /dev/null @@ -1,58 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/tag.pro b/src/proto/tag.pro deleted file mode 100644 index fedbc93745..0000000000 --- a/src/proto/tag.pro +++ /dev/null @@ -1,15 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/term.pro b/src/proto/term.pro deleted file mode 100644 index 9a348c0a72..0000000000 --- a/src/proto/term.pro +++ /dev/null @@ -1,65 +0,0 @@ -/* 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 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)); -/* vim: set ft=c : */ diff --git a/src/proto/ui.pro b/src/proto/ui.pro deleted file mode 100644 index 2f37fb9dfe..0000000000 --- a/src/proto/ui.pro +++ /dev/null @@ -1,67 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/undo.pro b/src/proto/undo.pro deleted file mode 100644 index dfbb07ac26..0000000000 --- a/src/proto/undo.pro +++ /dev/null @@ -1,31 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/version.pro b/src/proto/version.pro deleted file mode 100644 index e6fb78f069..0000000000 --- a/src/proto/version.pro +++ /dev/null @@ -1,10 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/proto/window.pro b/src/proto/window.pro deleted file mode 100644 index bf82ca1982..0000000000 --- a/src/proto/window.pro +++ /dev/null @@ -1,93 +0,0 @@ -/* 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)); -/* vim: set ft=c : */ diff --git a/src/quickfix.c b/src/quickfix.c index a141d9834b..af134d19f9 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -12,6 +12,34 @@ */ #include "vim.h" +#include "quickfix.h" +#include "buffer.h" +#include "charset.h" +#include "edit.h" +#include "eval.h" +#include "ex_cmds.h" +#include "ex_cmds2.h" +#include "ex_docmd.h" +#include "ex_eval.h" +#include "ex_getln.h" +#include "fileio.h" +#include "fold.h" +#include "mark.h" +#include "mbyte.h" +#include "memline.h" +#include "message.h" +#include "misc1.h" +#include "misc2.h" +#include "move.h" +#include "normal.h" +#include "option.h" +#include "os_unix.h" +#include "regexp.h" +#include "screen.h" +#include "search.h" +#include "term.h" +#include "ui.h" +#include "window.h" #include "os/os.h" diff --git a/src/quickfix.h b/src/quickfix.h new file mode 100644 index 0000000000..949d60bd73 --- /dev/null +++ b/src/quickfix.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_QUICKFIX_H */ diff --git a/src/regexp.c b/src/regexp.c index de98543a11..3641f16cdb 100644 --- a/src/regexp.c +++ b/src/regexp.c @@ -45,6 +45,15 @@ /* #define REGEXP_DEBUG */ #include "vim.h" +#include "regexp.h" +#include "charset.h" +#include "eval.h" +#include "ex_cmds2.h" +#include "mark.h" +#include "memline.h" +#include "message.h" +#include "misc1.h" +#include "misc2.h" #ifdef REGEXP_DEBUG /* show/save debugging data when BT engine is used */ @@ -56,7 +65,7 @@ #endif /* - * The "internal use only" fields in regexp.h are present to pass info from + * The "internal use only" fields in regexp_defs.h are present to pass info from * compile to execute that permits the execute phase to run lots faster on * simple cases. They are: * diff --git a/src/regexp.h b/src/regexp.h index 0426f242a4..a843983e3c 100644 --- a/src/regexp.h +++ b/src/regexp.h @@ -1,152 +1,27 @@ -/* vi:set ts=8 sts=4 sw=4: - * - * NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE - * - * This is NOT the original regular expression code as written by Henry - * Spencer. This code has been modified specifically for use with Vim, and - * should not be used apart from compiling Vim. If you want a good regular - * expression library, get the original code. - * - * NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE - */ - -#ifndef _REGEXP_H -#define _REGEXP_H - -/* - * The number of sub-matches is limited to 10. - * The first one (index 0) is the whole match, referenced with "\0". - * The second one (index 1) is the first sub-match, referenced with "\1". - * This goes up to the tenth (index 9), referenced with "\9". - */ -#define NSUBEXP 10 - -/* - * In the NFA engine: how many braces are allowed. - * TODO(RE): Use dynamic memory allocation instead of static, like here - */ -#define NFA_MAX_BRACES 20 - -typedef struct regengine regengine_T; - -/* - * Structure returned by vim_regcomp() to pass on to vim_regexec(). - * This is the general structure. For the actual matcher, two specific - * structures are used. See code below. - */ -typedef struct regprog { - regengine_T *engine; - unsigned regflags; -} regprog_T; - -/* - * Structure used by the back track matcher. - * These fields are only to be used in regexp.c! - * See regexp.c for an explanation. - */ -typedef struct { - /* These two members implement regprog_T */ - regengine_T *engine; - unsigned regflags; - - int regstart; - char_u reganch; - char_u *regmust; - int regmlen; - char_u reghasz; - char_u program[1]; /* actually longer.. */ -} bt_regprog_T; - -/* - * Structure representing a NFA state. - * A NFA state may have no outgoing edge, when it is a NFA_MATCH state. - */ -typedef struct nfa_state nfa_state_T; -struct nfa_state { - int c; - nfa_state_T *out; - nfa_state_T *out1; - int id; - int lastlist[2]; /* 0: normal, 1: recursive */ - int val; -}; - -/* - * Structure used by the NFA matcher. - */ -typedef struct { - /* These two members implement regprog_T */ - regengine_T *engine; - unsigned regflags; - - nfa_state_T *start; /* points into state[] */ - - int reganch; /* pattern starts with ^ */ - int regstart; /* char at start of pattern */ - char_u *match_text; /* plain text to match with */ - - int has_zend; /* pattern contains \ze */ - int has_backref; /* pattern contains \1 .. \9 */ - int reghasz; -#ifdef DEBUG - char_u *pattern; -#endif - int nsubexp; /* number of () */ - int nstate; - nfa_state_T state[1]; /* actually longer.. */ -} nfa_regprog_T; - -/* - * Structure to be used for single-line matching. - * Sub-match "no" starts at "startp[no]" and ends just before "endp[no]". - * When there is no match, the pointer is NULL. - */ -typedef struct { - regprog_T *regprog; - char_u *startp[NSUBEXP]; - char_u *endp[NSUBEXP]; - int rm_ic; -} regmatch_T; - -/* - * Structure to be used for multi-line matching. - * Sub-match "no" starts in line "startpos[no].lnum" column "startpos[no].col" - * and ends in line "endpos[no].lnum" just before column "endpos[no].col". - * The line numbers are relative to the first line, thus startpos[0].lnum is - * always 0. - * When there is no match, the line number is -1. - */ -typedef struct { - regprog_T *regprog; - lpos_T startpos[NSUBEXP]; - lpos_T endpos[NSUBEXP]; - int rmm_ic; - colnr_T rmm_maxcol; /* when not zero: maximum column */ -} regmmatch_T; - -/* - * Structure used to store external references: "\z\(\)" to "\z\1". - * Use a reference count to avoid the need to copy this around. When it goes - * from 1 to zero the matches need to be freed. - */ -typedef struct { - short refcnt; - char_u *matches[NSUBEXP]; -} reg_extmatch_T; - -struct regengine { - regprog_T *(*regcomp)(char_u*, int); - void (*regfree)(regprog_T *); - int (*regexec)(regmatch_T*, char_u*, colnr_T); -#if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \ - || defined(FIND_REPLACE_DIALOG) || defined(PROTO) - int (*regexec_nl)(regmatch_T*, char_u*, colnr_T); -#endif - long (*regexec_multi)(regmmatch_T*, win_T*, buf_T*, linenr_T, colnr_T, - proftime_T*); -#ifdef DEBUG - char_u *expr; -#endif -}; - -#endif /* _REGEXP_H */ +#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 magic, + int backslash)); +int vim_regsub_multi __ARGS((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, + linenr_T lnum, colnr_T col, + proftime_T *tm)); +/* vim: set ft=c : */ +#endif /* NEOVIM_REGEXP_H */ diff --git a/src/regexp_defs.h b/src/regexp_defs.h new file mode 100644 index 0000000000..0426f242a4 --- /dev/null +++ b/src/regexp_defs.h @@ -0,0 +1,152 @@ +/* vi:set ts=8 sts=4 sw=4: + * + * NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE + * + * This is NOT the original regular expression code as written by Henry + * Spencer. This code has been modified specifically for use with Vim, and + * should not be used apart from compiling Vim. If you want a good regular + * expression library, get the original code. + * + * NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE + */ + +#ifndef _REGEXP_H +#define _REGEXP_H + +/* + * The number of sub-matches is limited to 10. + * The first one (index 0) is the whole match, referenced with "\0". + * The second one (index 1) is the first sub-match, referenced with "\1". + * This goes up to the tenth (index 9), referenced with "\9". + */ +#define NSUBEXP 10 + +/* + * In the NFA engine: how many braces are allowed. + * TODO(RE): Use dynamic memory allocation instead of static, like here + */ +#define NFA_MAX_BRACES 20 + +typedef struct regengine regengine_T; + +/* + * Structure returned by vim_regcomp() to pass on to vim_regexec(). + * This is the general structure. For the actual matcher, two specific + * structures are used. See code below. + */ +typedef struct regprog { + regengine_T *engine; + unsigned regflags; +} regprog_T; + +/* + * Structure used by the back track matcher. + * These fields are only to be used in regexp.c! + * See regexp.c for an explanation. + */ +typedef struct { + /* These two members implement regprog_T */ + regengine_T *engine; + unsigned regflags; + + int regstart; + char_u reganch; + char_u *regmust; + int regmlen; + char_u reghasz; + char_u program[1]; /* actually longer.. */ +} bt_regprog_T; + +/* + * Structure representing a NFA state. + * A NFA state may have no outgoing edge, when it is a NFA_MATCH state. + */ +typedef struct nfa_state nfa_state_T; +struct nfa_state { + int c; + nfa_state_T *out; + nfa_state_T *out1; + int id; + int lastlist[2]; /* 0: normal, 1: recursive */ + int val; +}; + +/* + * Structure used by the NFA matcher. + */ +typedef struct { + /* These two members implement regprog_T */ + regengine_T *engine; + unsigned regflags; + + nfa_state_T *start; /* points into state[] */ + + int reganch; /* pattern starts with ^ */ + int regstart; /* char at start of pattern */ + char_u *match_text; /* plain text to match with */ + + int has_zend; /* pattern contains \ze */ + int has_backref; /* pattern contains \1 .. \9 */ + int reghasz; +#ifdef DEBUG + char_u *pattern; +#endif + int nsubexp; /* number of () */ + int nstate; + nfa_state_T state[1]; /* actually longer.. */ +} nfa_regprog_T; + +/* + * Structure to be used for single-line matching. + * Sub-match "no" starts at "startp[no]" and ends just before "endp[no]". + * When there is no match, the pointer is NULL. + */ +typedef struct { + regprog_T *regprog; + char_u *startp[NSUBEXP]; + char_u *endp[NSUBEXP]; + int rm_ic; +} regmatch_T; + +/* + * Structure to be used for multi-line matching. + * Sub-match "no" starts in line "startpos[no].lnum" column "startpos[no].col" + * and ends in line "endpos[no].lnum" just before column "endpos[no].col". + * The line numbers are relative to the first line, thus startpos[0].lnum is + * always 0. + * When there is no match, the line number is -1. + */ +typedef struct { + regprog_T *regprog; + lpos_T startpos[NSUBEXP]; + lpos_T endpos[NSUBEXP]; + int rmm_ic; + colnr_T rmm_maxcol; /* when not zero: maximum column */ +} regmmatch_T; + +/* + * Structure used to store external references: "\z\(\)" to "\z\1". + * Use a reference count to avoid the need to copy this around. When it goes + * from 1 to zero the matches need to be freed. + */ +typedef struct { + short refcnt; + char_u *matches[NSUBEXP]; +} reg_extmatch_T; + +struct regengine { + regprog_T *(*regcomp)(char_u*, int); + void (*regfree)(regprog_T *); + int (*regexec)(regmatch_T*, char_u*, colnr_T); +#if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \ + || defined(FIND_REPLACE_DIALOG) || defined(PROTO) + int (*regexec_nl)(regmatch_T*, char_u*, colnr_T); +#endif + long (*regexec_multi)(regmmatch_T*, win_T*, buf_T*, linenr_T, colnr_T, + proftime_T*); +#ifdef DEBUG + char_u *expr; +#endif +}; + +#endif /* _REGEXP_H */ diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c index 50e193924a..75deff1b3e 100644 --- a/src/regexp_nfa.c +++ b/src/regexp_nfa.c @@ -5,6 +5,8 @@ * This file is included in "regexp.c". */ +#include "misc2.h" + /* * Logging of NFA engine. * diff --git a/src/screen.c b/src/screen.c index 3f544ad423..293a41b9c6 100644 --- a/src/screen.c +++ b/src/screen.c @@ -88,6 +88,37 @@ */ #include "vim.h" +#include "screen.h" +#include "buffer.h" +#include "charset.h" +#include "diff.h" +#include "eval.h" +#include "ex_cmds2.h" +#include "ex_getln.h" +#include "fileio.h" +#include "fold.h" +#include "getchar.h" +#include "main.h" +#include "mbyte.h" +#include "memline.h" +#include "menu.h" +#include "message.h" +#include "misc1.h" +#include "misc2.h" +#include "move.h" +#include "normal.h" +#include "option.h" +#include "popupmnu.h" +#include "quickfix.h" +#include "regexp.h" +#include "search.h" +#include "spell.h" +#include "syntax.h" +#include "term.h" +#include "ui.h" +#include "undo.h" +#include "version.h" +#include "window.h" #define MB_FILLER_CHAR '<' /* character used when a double-width character * doesn't fit. */ diff --git a/src/screen.h b/src/screen.h new file mode 100644 index 0000000000..2f25798757 --- /dev/null +++ b/src/screen.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_SCREEN_H */ diff --git a/src/search.c b/src/search.c index a46637efdb..7c89b775d0 100644 --- a/src/search.c +++ b/src/search.c @@ -11,6 +11,31 @@ */ #include "vim.h" +#include "search.h" +#include "charset.h" +#include "edit.h" +#include "eval.h" +#include "ex_cmds.h" +#include "ex_cmds2.h" +#include "ex_getln.h" +#include "fileio.h" +#include "fold.h" +#include "getchar.h" +#include "main.h" +#include "mark.h" +#include "mbyte.h" +#include "memline.h" +#include "message.h" +#include "misc1.h" +#include "misc2.h" +#include "move.h" +#include "normal.h" +#include "option.h" +#include "regexp.h" +#include "screen.h" +#include "term.h" +#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)); diff --git a/src/search.h b/src/search.h new file mode 100644 index 0000000000..b24d2aa69a --- /dev/null +++ b/src/search.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_SEARCH_H */ diff --git a/src/sha256.c b/src/sha256.c index 16ee6cfad0..bc2be2678f 100644 --- a/src/sha256.c +++ b/src/sha256.c @@ -21,7 +21,7 @@ */ #include "vim.h" - +#include "sha256.h" static void sha256_process __ARGS((context_sha256_T *ctx, char_u data[64])); diff --git a/src/sha256.h b/src/sha256.h new file mode 100644 index 0000000000..03e8aa6bea --- /dev/null +++ b/src/sha256.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_SHA256_H */ diff --git a/src/spell.c b/src/spell.c index 941ac08b05..3fae72ffd2 100644 --- a/src/spell.c +++ b/src/spell.c @@ -298,9 +298,34 @@ */ #include "vim.h" - - -#ifndef UNIX /* it's in os_unix.h for Unix */ +#include "spell.h" +#include "buffer.h" +#include "charset.h" +#include "edit.h" +#include "eval.h" +#include "ex_cmds.h" +#include "ex_cmds2.h" +#include "ex_docmd.h" +#include "fileio.h" +#include "getchar.h" +#include "hashtab.h" +#include "mbyte.h" +#include "memline.h" +#include "message.h" +#include "misc1.h" +#include "misc2.h" +#include "normal.h" +#include "option.h" +#include "os_unix.h" +#include "regexp.h" +#include "screen.h" +#include "search.h" +#include "syntax.h" +#include "term.h" +#include "ui.h" +#include "undo.h" + +#ifndef UNIX /* it's in os_unix_defs.h for Unix */ # include /* for time_t */ #endif diff --git a/src/spell.h b/src/spell.h new file mode 100644 index 0000000000..8a349300a3 --- /dev/null +++ b/src/spell.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_SPELL_H */ diff --git a/src/structs.h b/src/structs.h index c29848a9af..639d50f674 100644 --- a/src/structs.h +++ b/src/structs.h @@ -56,9 +56,9 @@ typedef int scid_T; /* script ID */ typedef struct file_buffer buf_T; /* forward declaration */ /* - * This is here because regexp.h needs pos_T and below regprog_T is used. + * This is here because regexp_defs.h needs pos_T and below regprog_T is used. */ -#include "regexp.h" +#include "regexp_defs.h" /* * This is here because gui.h needs the pos_T and win_T, and win_T needs gui.h diff --git a/src/syntax.c b/src/syntax.c index e576185b7d..4b22137fda 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -12,6 +12,25 @@ */ #include "vim.h" +#include "syntax.h" +#include "charset.h" +#include "eval.h" +#include "ex_cmds2.h" +#include "ex_docmd.h" +#include "fileio.h" +#include "fold.h" +#include "hashtab.h" +#include "mbyte.h" +#include "memline.h" +#include "message.h" +#include "misc1.h" +#include "misc2.h" +#include "option.h" +#include "os_unix.h" +#include "regexp.h" +#include "screen.h" +#include "term.h" +#include "ui.h" #include "os/os.h" /* diff --git a/src/syntax.h b/src/syntax.h new file mode 100644 index 0000000000..e05d342927 --- /dev/null +++ b/src/syntax.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_SYNTAX_H */ diff --git a/src/tag.c b/src/tag.c index 671f624ce8..ebdfb6b2a2 100644 --- a/src/tag.c +++ b/src/tag.c @@ -12,6 +12,33 @@ */ #include "vim.h" +#include "tag.h" +#include "buffer.h" +#include "charset.h" +#include "edit.h" +#include "eval.h" +#include "ex_cmds.h" +#include "ex_cmds2.h" +#include "ex_docmd.h" +#include "ex_getln.h" +#include "fileio.h" +#include "fold.h" +#include "if_cscope.h" +#include "mark.h" +#include "mbyte.h" +#include "message.h" +#include "misc1.h" +#include "misc2.h" +#include "move.h" +#include "option.h" +#include "os_unix.h" +#include "quickfix.h" +#include "regexp.h" +#include "screen.h" +#include "search.h" +#include "term.h" +#include "ui.h" +#include "window.h" /* * Structure to hold pointers to various items in a tag line. diff --git a/src/tag.h b/src/tag.h new file mode 100644 index 0000000000..829d48ff7b --- /dev/null +++ b/src/tag.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_TAG_H */ diff --git a/src/term.c b/src/term.c index a15e281de5..8488376a25 100644 --- a/src/term.c +++ b/src/term.c @@ -24,6 +24,25 @@ #define tgetstr tgetstr_defined_wrong #include "vim.h" +#include "term.h" +#include "buffer.h" +#include "charset.h" +#include "edit.h" +#include "eval.h" +#include "ex_getln.h" +#include "fileio.h" +#include "getchar.h" +#include "message.h" +#include "misc2.h" +#include "move.h" +#include "normal.h" +#include "option.h" +#include "os_unix.h" +#include "popupmnu.h" +#include "screen.h" +#include "syntax.h" +#include "ui.h" +#include "window.h" #ifdef HAVE_TGETENT # ifdef HAVE_TERMIOS_H diff --git a/src/term.h b/src/term.h index 0ba5a19c13..792d9b7484 100644 --- a/src/term.h +++ b/src/term.h @@ -1,156 +1,68 @@ -/* vi:set ts=8 sts=4 sw=4: - * - * VIM - Vi IMproved by Bram Moolenaar - * - * Do ":help uganda" in Vim to read copying and usage conditions. - * Do ":help credits" in Vim to see a list of people who contributed. - */ - -/* - * This file contains the defines for the machine dependent escape sequences - * that the editor needs to perform various operations. All of the sequences - * here are optional, except "cm" (cursor motion). - */ - - -/* - * Index of the termcap codes in the term_strings array. - */ -enum SpecialKey { - KS_NAME = 0, /* name of this terminal entry */ - KS_CE, /* clear to end of line */ - KS_AL, /* add new blank line */ - KS_CAL, /* add number of blank lines */ - KS_DL, /* delete line */ - KS_CDL, /* delete number of lines */ - KS_CS, /* scroll region */ - KS_CL, /* clear screen */ - KS_CD, /* clear to end of display */ - KS_UT, /* clearing uses current background color */ - KS_DA, /* text may be scrolled down from up */ - KS_DB, /* text may be scrolled up from down */ - KS_VI, /* cursor invisible */ - KS_VE, /* cursor visible */ - KS_VS, /* cursor very visible */ - KS_ME, /* normal mode */ - KS_MR, /* reverse mode */ - KS_MD, /* bold mode */ - KS_SE, /* normal mode */ - KS_SO, /* standout mode */ - KS_CZH, /* italic mode start */ - KS_CZR, /* italic mode end */ - KS_UE, /* exit underscore (underline) mode */ - KS_US, /* underscore (underline) mode */ - KS_UCE, /* exit undercurl mode */ - KS_UCS, /* undercurl mode */ - KS_MS, /* save to move cur in reverse mode */ - KS_CM, /* cursor motion */ - KS_SR, /* scroll reverse (backward) */ - KS_CRI, /* cursor number of chars right */ - KS_VB, /* visual bell */ - KS_KS, /* put term in "keypad transmit" mode */ - KS_KE, /* out of "keypad transmit" mode */ - KS_TI, /* put terminal in termcap mode */ - KS_TE, /* out of termcap mode */ - KS_BC, /* backspace character (cursor left) */ - KS_CCS, /* cur is relative to scroll region */ - KS_CCO, /* number of colors */ - KS_CSF, /* set foreground color */ - KS_CSB, /* set background color */ - KS_XS, /* standout not erased by overwriting (hpterm) */ - KS_MB, /* blink mode */ - KS_CAF, /* set foreground color (ANSI) */ - KS_CAB, /* set background color (ANSI) */ - KS_LE, /* cursor left (mostly backspace) */ - KS_ND, /* cursor right */ - KS_CIS, /* set icon text start */ - KS_CIE, /* set icon text end */ - KS_TS, /* set window title start (to status line)*/ - KS_FS, /* set window title end (from status line) */ - KS_CWP, /* set window position in pixels */ - KS_CWS, /* set window size in characters */ - KS_CRV, /* request version string */ - KS_CSI, /* start insert mode (bar cursor) */ - KS_CEI, /* end insert mode (block cursor) */ - KS_CSV, /* scroll region vertical */ - KS_OP, /* original color pair */ - KS_U7 /* request cursor position */ -}; - -#define KS_LAST KS_U7 - -/* - * the terminal capabilities are stored in this array - * IMPORTANT: When making changes, note the following: - * - there should be an entry for each code in the builtin termcaps - * - there should be an option for each code in option.c - * - there should be code in term.c to obtain the value from the termcap - */ - -extern char_u *(term_strings[]); /* current terminal strings */ - -/* - * strings used for terminal - */ -#define T_NAME (term_str(KS_NAME)) /* terminal name */ -#define T_CE (term_str(KS_CE)) /* clear to end of line */ -#define T_AL (term_str(KS_AL)) /* add new blank line */ -#define T_CAL (term_str(KS_CAL)) /* add number of blank lines */ -#define T_DL (term_str(KS_DL)) /* delete line */ -#define T_CDL (term_str(KS_CDL)) /* delete number of lines */ -#define T_CS (term_str(KS_CS)) /* scroll region */ -#define T_CSV (term_str(KS_CSV)) /* scroll region vertical */ -#define T_CL (term_str(KS_CL)) /* clear screen */ -#define T_CD (term_str(KS_CD)) /* clear to end of display */ -#define T_UT (term_str(KS_UT)) /* clearing uses background color */ -#define T_DA (term_str(KS_DA)) /* text may be scrolled down from up */ -#define T_DB (term_str(KS_DB)) /* text may be scrolled up from down */ -#define T_VI (term_str(KS_VI)) /* cursor invisible */ -#define T_VE (term_str(KS_VE)) /* cursor visible */ -#define T_VS (term_str(KS_VS)) /* cursor very visible */ -#define T_ME (term_str(KS_ME)) /* normal mode */ -#define T_MR (term_str(KS_MR)) /* reverse mode */ -#define T_MD (term_str(KS_MD)) /* bold mode */ -#define T_SE (term_str(KS_SE)) /* normal mode */ -#define T_SO (term_str(KS_SO)) /* standout mode */ -#define T_CZH (term_str(KS_CZH)) /* italic mode start */ -#define T_CZR (term_str(KS_CZR)) /* italic mode end */ -#define T_UE (term_str(KS_UE)) /* exit underscore (underline) mode */ -#define T_US (term_str(KS_US)) /* underscore (underline) mode */ -#define T_UCE (term_str(KS_UCE)) /* exit undercurl mode */ -#define T_UCS (term_str(KS_UCS)) /* undercurl mode */ -#define T_MS (term_str(KS_MS)) /* save to move cur in reverse mode */ -#define T_CM (term_str(KS_CM)) /* cursor motion */ -#define T_SR (term_str(KS_SR)) /* scroll reverse (backward) */ -#define T_CRI (term_str(KS_CRI)) /* cursor number of chars right */ -#define T_VB (term_str(KS_VB)) /* visual bell */ -#define T_KS (term_str(KS_KS)) /* put term in "keypad transmit" mode */ -#define T_KE (term_str(KS_KE)) /* out of "keypad transmit" mode */ -#define T_TI (term_str(KS_TI)) /* put terminal in termcap mode */ -#define T_TE (term_str(KS_TE)) /* out of termcap mode */ -#define T_BC (term_str(KS_BC)) /* backspace character */ -#define T_CCS (term_str(KS_CCS)) /* cur is relative to scroll region */ -#define T_CCO (term_str(KS_CCO)) /* number of colors */ -#define T_CSF (term_str(KS_CSF)) /* set foreground color */ -#define T_CSB (term_str(KS_CSB)) /* set background color */ -#define T_XS (term_str(KS_XS)) /* standout not erased by overwriting */ -#define T_MB (term_str(KS_MB)) /* blink mode */ -#define T_CAF (term_str(KS_CAF)) /* set foreground color (ANSI) */ -#define T_CAB (term_str(KS_CAB)) /* set background color (ANSI) */ -#define T_LE (term_str(KS_LE)) /* cursor left */ -#define T_ND (term_str(KS_ND)) /* cursor right */ -#define T_CIS (term_str(KS_CIS)) /* set icon text start */ -#define T_CIE (term_str(KS_CIE)) /* set icon text end */ -#define T_TS (term_str(KS_TS)) /* set window title start */ -#define T_FS (term_str(KS_FS)) /* set window title end */ -#define T_CWP (term_str(KS_CWP)) /* window position */ -#define T_CWS (term_str(KS_CWS)) /* window size */ -#define T_CSI (term_str(KS_CSI)) /* start insert mode */ -#define T_CEI (term_str(KS_CEI)) /* end insert mode */ -#define T_CRV (term_str(KS_CRV)) /* request version string */ -#define T_OP (term_str(KS_OP)) /* original color pair */ -#define T_U7 (term_str(KS_U7)) /* request cursor position */ - -#define TMODE_COOK 0 /* terminal mode for external cmds and Ex mode */ -#define TMODE_SLEEP 1 /* terminal mode for sleeping (cooked but no echo) */ -#define TMODE_RAW 2 /* terminal mode for Normal and Insert mode */ +#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 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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_TERM_H */ diff --git a/src/term_defs.h b/src/term_defs.h new file mode 100644 index 0000000000..0ba5a19c13 --- /dev/null +++ b/src/term_defs.h @@ -0,0 +1,156 @@ +/* vi:set ts=8 sts=4 sw=4: + * + * VIM - Vi IMproved by Bram Moolenaar + * + * Do ":help uganda" in Vim to read copying and usage conditions. + * Do ":help credits" in Vim to see a list of people who contributed. + */ + +/* + * This file contains the defines for the machine dependent escape sequences + * that the editor needs to perform various operations. All of the sequences + * here are optional, except "cm" (cursor motion). + */ + + +/* + * Index of the termcap codes in the term_strings array. + */ +enum SpecialKey { + KS_NAME = 0, /* name of this terminal entry */ + KS_CE, /* clear to end of line */ + KS_AL, /* add new blank line */ + KS_CAL, /* add number of blank lines */ + KS_DL, /* delete line */ + KS_CDL, /* delete number of lines */ + KS_CS, /* scroll region */ + KS_CL, /* clear screen */ + KS_CD, /* clear to end of display */ + KS_UT, /* clearing uses current background color */ + KS_DA, /* text may be scrolled down from up */ + KS_DB, /* text may be scrolled up from down */ + KS_VI, /* cursor invisible */ + KS_VE, /* cursor visible */ + KS_VS, /* cursor very visible */ + KS_ME, /* normal mode */ + KS_MR, /* reverse mode */ + KS_MD, /* bold mode */ + KS_SE, /* normal mode */ + KS_SO, /* standout mode */ + KS_CZH, /* italic mode start */ + KS_CZR, /* italic mode end */ + KS_UE, /* exit underscore (underline) mode */ + KS_US, /* underscore (underline) mode */ + KS_UCE, /* exit undercurl mode */ + KS_UCS, /* undercurl mode */ + KS_MS, /* save to move cur in reverse mode */ + KS_CM, /* cursor motion */ + KS_SR, /* scroll reverse (backward) */ + KS_CRI, /* cursor number of chars right */ + KS_VB, /* visual bell */ + KS_KS, /* put term in "keypad transmit" mode */ + KS_KE, /* out of "keypad transmit" mode */ + KS_TI, /* put terminal in termcap mode */ + KS_TE, /* out of termcap mode */ + KS_BC, /* backspace character (cursor left) */ + KS_CCS, /* cur is relative to scroll region */ + KS_CCO, /* number of colors */ + KS_CSF, /* set foreground color */ + KS_CSB, /* set background color */ + KS_XS, /* standout not erased by overwriting (hpterm) */ + KS_MB, /* blink mode */ + KS_CAF, /* set foreground color (ANSI) */ + KS_CAB, /* set background color (ANSI) */ + KS_LE, /* cursor left (mostly backspace) */ + KS_ND, /* cursor right */ + KS_CIS, /* set icon text start */ + KS_CIE, /* set icon text end */ + KS_TS, /* set window title start (to status line)*/ + KS_FS, /* set window title end (from status line) */ + KS_CWP, /* set window position in pixels */ + KS_CWS, /* set window size in characters */ + KS_CRV, /* request version string */ + KS_CSI, /* start insert mode (bar cursor) */ + KS_CEI, /* end insert mode (block cursor) */ + KS_CSV, /* scroll region vertical */ + KS_OP, /* original color pair */ + KS_U7 /* request cursor position */ +}; + +#define KS_LAST KS_U7 + +/* + * the terminal capabilities are stored in this array + * IMPORTANT: When making changes, note the following: + * - there should be an entry for each code in the builtin termcaps + * - there should be an option for each code in option.c + * - there should be code in term.c to obtain the value from the termcap + */ + +extern char_u *(term_strings[]); /* current terminal strings */ + +/* + * strings used for terminal + */ +#define T_NAME (term_str(KS_NAME)) /* terminal name */ +#define T_CE (term_str(KS_CE)) /* clear to end of line */ +#define T_AL (term_str(KS_AL)) /* add new blank line */ +#define T_CAL (term_str(KS_CAL)) /* add number of blank lines */ +#define T_DL (term_str(KS_DL)) /* delete line */ +#define T_CDL (term_str(KS_CDL)) /* delete number of lines */ +#define T_CS (term_str(KS_CS)) /* scroll region */ +#define T_CSV (term_str(KS_CSV)) /* scroll region vertical */ +#define T_CL (term_str(KS_CL)) /* clear screen */ +#define T_CD (term_str(KS_CD)) /* clear to end of display */ +#define T_UT (term_str(KS_UT)) /* clearing uses background color */ +#define T_DA (term_str(KS_DA)) /* text may be scrolled down from up */ +#define T_DB (term_str(KS_DB)) /* text may be scrolled up from down */ +#define T_VI (term_str(KS_VI)) /* cursor invisible */ +#define T_VE (term_str(KS_VE)) /* cursor visible */ +#define T_VS (term_str(KS_VS)) /* cursor very visible */ +#define T_ME (term_str(KS_ME)) /* normal mode */ +#define T_MR (term_str(KS_MR)) /* reverse mode */ +#define T_MD (term_str(KS_MD)) /* bold mode */ +#define T_SE (term_str(KS_SE)) /* normal mode */ +#define T_SO (term_str(KS_SO)) /* standout mode */ +#define T_CZH (term_str(KS_CZH)) /* italic mode start */ +#define T_CZR (term_str(KS_CZR)) /* italic mode end */ +#define T_UE (term_str(KS_UE)) /* exit underscore (underline) mode */ +#define T_US (term_str(KS_US)) /* underscore (underline) mode */ +#define T_UCE (term_str(KS_UCE)) /* exit undercurl mode */ +#define T_UCS (term_str(KS_UCS)) /* undercurl mode */ +#define T_MS (term_str(KS_MS)) /* save to move cur in reverse mode */ +#define T_CM (term_str(KS_CM)) /* cursor motion */ +#define T_SR (term_str(KS_SR)) /* scroll reverse (backward) */ +#define T_CRI (term_str(KS_CRI)) /* cursor number of chars right */ +#define T_VB (term_str(KS_VB)) /* visual bell */ +#define T_KS (term_str(KS_KS)) /* put term in "keypad transmit" mode */ +#define T_KE (term_str(KS_KE)) /* out of "keypad transmit" mode */ +#define T_TI (term_str(KS_TI)) /* put terminal in termcap mode */ +#define T_TE (term_str(KS_TE)) /* out of termcap mode */ +#define T_BC (term_str(KS_BC)) /* backspace character */ +#define T_CCS (term_str(KS_CCS)) /* cur is relative to scroll region */ +#define T_CCO (term_str(KS_CCO)) /* number of colors */ +#define T_CSF (term_str(KS_CSF)) /* set foreground color */ +#define T_CSB (term_str(KS_CSB)) /* set background color */ +#define T_XS (term_str(KS_XS)) /* standout not erased by overwriting */ +#define T_MB (term_str(KS_MB)) /* blink mode */ +#define T_CAF (term_str(KS_CAF)) /* set foreground color (ANSI) */ +#define T_CAB (term_str(KS_CAB)) /* set background color (ANSI) */ +#define T_LE (term_str(KS_LE)) /* cursor left */ +#define T_ND (term_str(KS_ND)) /* cursor right */ +#define T_CIS (term_str(KS_CIS)) /* set icon text start */ +#define T_CIE (term_str(KS_CIE)) /* set icon text end */ +#define T_TS (term_str(KS_TS)) /* set window title start */ +#define T_FS (term_str(KS_FS)) /* set window title end */ +#define T_CWP (term_str(KS_CWP)) /* window position */ +#define T_CWS (term_str(KS_CWS)) /* window size */ +#define T_CSI (term_str(KS_CSI)) /* start insert mode */ +#define T_CEI (term_str(KS_CEI)) /* end insert mode */ +#define T_CRV (term_str(KS_CRV)) /* request version string */ +#define T_OP (term_str(KS_OP)) /* original color pair */ +#define T_U7 (term_str(KS_U7)) /* request cursor position */ + +#define TMODE_COOK 0 /* terminal mode for external cmds and Ex mode */ +#define TMODE_SLEEP 1 /* terminal mode for sleeping (cooked but no echo) */ +#define TMODE_RAW 2 /* terminal mode for Normal and Insert mode */ diff --git a/src/ui.c b/src/ui.c index 76eca6fff9..3396f2e6ef 100644 --- a/src/ui.c +++ b/src/ui.c @@ -17,7 +17,21 @@ */ #include "vim.h" - +#include "ui.h" +#include "diff.h" +#include "ex_cmds2.h" +#include "fold.h" +#include "main.h" +#include "mbyte.h" +#include "misc1.h" +#include "misc2.h" +#include "move.h" +#include "normal.h" +#include "option.h" +#include "os_unix.h" +#include "screen.h" +#include "term.h" +#include "window.h" void ui_write(char_u *s, int len) { diff --git a/src/ui.h b/src/ui.h new file mode 100644 index 0000000000..bcd6afd426 --- /dev/null +++ b/src/ui.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_UI_H */ diff --git a/src/undo.c b/src/undo.c index d5bdfb53b1..b63e89458e 100644 --- a/src/undo.c +++ b/src/undo.c @@ -82,6 +82,21 @@ #define UE_MAGIC 0xabc123 /* value for ue_magic when in use */ #include "vim.h" +#include "undo.h" +#include "edit.h" +#include "eval.h" +#include "fileio.h" +#include "fold.h" +#include "mark.h" +#include "memline.h" +#include "message.h" +#include "misc1.h" +#include "misc2.h" +#include "option.h" +#include "os_unix.h" +#include "quickfix.h" +#include "screen.h" +#include "sha256.h" static long get_undolevel __ARGS((void)); static void u_unch_branch __ARGS((u_header_T *uhp)); diff --git a/src/undo.h b/src/undo.h new file mode 100644 index 0000000000..aecab36875 --- /dev/null +++ b/src/undo.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_UNDO_H */ diff --git a/src/version.c b/src/version.c index a928e840bd..e85f7a57ec 100644 --- a/src/version.c +++ b/src/version.c @@ -8,7 +8,12 @@ */ #include "vim.h" - +#include "version.h" +#include "charset.h" +#include "memline.h" +#include "message.h" +#include "misc2.h" +#include "screen.h" /* * Vim originated from Stevie version 3.6 (Fish disk 217) by GRWalter (Fred) @@ -22,7 +27,7 @@ * interesting. */ -#include "version.h" +#include "version_defs.h" char *Version = VIM_VERSION_SHORT; static char *mediumVersion = VIM_VERSION_MEDIUM; diff --git a/src/version.h b/src/version.h index ee49a6d97c..b2828980f3 100644 --- a/src/version.h +++ b/src/version.h @@ -1,40 +1,13 @@ -/* vi:set ts=8 sts=4 sw=4: - * - * VIM - Vi IMproved by Bram Moolenaar - * - * Do ":help uganda" in Vim to read copying and usage conditions. - * Do ":help credits" in Vim to see a list of people who contributed. - */ - -/* - * Define the version number, name, etc. - * The patchlevel is in included_patches[], in version.c. - * - * This doesn't use string concatenation, some compilers don't support it. - */ - -#define VIM_VERSION_MAJOR 7 -#define VIM_VERSION_MAJOR_STR "7" -#define VIM_VERSION_MINOR 4 -#define VIM_VERSION_MINOR_STR "4" -#define VIM_VERSION_100 (VIM_VERSION_MAJOR * 100 + VIM_VERSION_MINOR) - -#define VIM_VERSION_BUILD 280 -#define VIM_VERSION_BUILD_BCD 0x118 -#define VIM_VERSION_BUILD_STR "280" -#define VIM_VERSION_PATCHLEVEL 0 -#define VIM_VERSION_PATCHLEVEL_STR "0" -/* Used by MacOS port should be one of: development, alpha, beta, final */ -#define VIM_VERSION_RELEASE final - -/* - * VIM_VERSION_NODOT is used for the runtime directory name. - * VIM_VERSION_SHORT is copied into the swap file (max. length is 6 chars). - * VIM_VERSION_MEDIUM is used for the startup-screen. - * VIM_VERSION_LONG is used for the ":version" command and "Vim -h". - */ -#define VIM_VERSION_NODOT "vim74" -#define VIM_VERSION_SHORT "7.4" -#define VIM_VERSION_MEDIUM "7.4" -#define VIM_VERSION_LONG "VIM - Vi IMproved 7.4 (2013 Aug 10)" -#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.4 (2013 Aug 10, compiled " +#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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_VERSION_H */ diff --git a/src/version_defs.h b/src/version_defs.h new file mode 100644 index 0000000000..ee49a6d97c --- /dev/null +++ b/src/version_defs.h @@ -0,0 +1,40 @@ +/* vi:set ts=8 sts=4 sw=4: + * + * VIM - Vi IMproved by Bram Moolenaar + * + * Do ":help uganda" in Vim to read copying and usage conditions. + * Do ":help credits" in Vim to see a list of people who contributed. + */ + +/* + * Define the version number, name, etc. + * The patchlevel is in included_patches[], in version.c. + * + * This doesn't use string concatenation, some compilers don't support it. + */ + +#define VIM_VERSION_MAJOR 7 +#define VIM_VERSION_MAJOR_STR "7" +#define VIM_VERSION_MINOR 4 +#define VIM_VERSION_MINOR_STR "4" +#define VIM_VERSION_100 (VIM_VERSION_MAJOR * 100 + VIM_VERSION_MINOR) + +#define VIM_VERSION_BUILD 280 +#define VIM_VERSION_BUILD_BCD 0x118 +#define VIM_VERSION_BUILD_STR "280" +#define VIM_VERSION_PATCHLEVEL 0 +#define VIM_VERSION_PATCHLEVEL_STR "0" +/* Used by MacOS port should be one of: development, alpha, beta, final */ +#define VIM_VERSION_RELEASE final + +/* + * VIM_VERSION_NODOT is used for the runtime directory name. + * VIM_VERSION_SHORT is copied into the swap file (max. length is 6 chars). + * VIM_VERSION_MEDIUM is used for the startup-screen. + * VIM_VERSION_LONG is used for the ":version" command and "Vim -h". + */ +#define VIM_VERSION_NODOT "vim74" +#define VIM_VERSION_SHORT "7.4" +#define VIM_VERSION_MEDIUM "7.4" +#define VIM_VERSION_LONG "VIM - Vi IMproved 7.4 (2013 Aug 10)" +#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.4 (2013 Aug 10, compiled " diff --git a/src/vim.h b/src/vim.h index fab3d70568..75c2b14d38 100644 --- a/src/vim.h +++ b/src/vim.h @@ -6,8 +6,8 @@ * Do ":help credits" in Vim to see a list of people who contributed. */ -#ifndef VIM__H -# define VIM__H +#ifndef NEOVIM_VIM_H +# define NEOVIM_VIM_H /* Included when ported to cmake */ /* This is needed to replace TRUE/FALSE macros by true/false from c99 */ #include @@ -62,7 +62,7 @@ Error: configure did not run properly.Check auto/config.log. # define VIMPACKAGE "vim" #endif -#include "os_unix.h" /* bring lots of system header files */ +#include "os_unix_defs.h" /* bring lots of system header files */ #ifndef __ARGS # if defined(__STDC__) || defined(__GNUC__) || defined(WIN3264) @@ -154,7 +154,7 @@ typedef unsigned long u8char_T; /* long should be 32 bits or more */ #include "ascii.h" #include "keymap.h" -#include "term.h" +#include "term_defs.h" #include "macros.h" #include @@ -1260,9 +1260,9 @@ int vim_memcmp __ARGS((void *, void *, size_t)); typedef struct timeval proftime_T; -/* Include option.h before structs.h, because the number of window-local and +/* Include option_defs.h before structs.h, because the number of window-local and * buffer-local options is used there. */ -#include "option.h" /* options and default values */ +#include "option_defs.h" /* options and default values */ /* Note that gui.h is included by structs.h */ @@ -1412,7 +1412,7 @@ typedef struct timeval proftime_T; typedef int VimClipboard; /* This is required for the prototypes. */ -#include "ex_cmds.h" /* Ex command defines */ +#include "ex_cmds_defs.h" /* Ex command defines */ #include "proto.h" /* function prototypes */ /* This has to go after the include of proto.h, as proto/gui.pro declares @@ -1594,4 +1594,4 @@ typedef int VimClipboard; /* This is required for the prototypes. */ # define SET_NO_HLSEARCH(flag) no_hlsearch = (flag); set_vim_var_nr( \ VV_HLSEARCH, !no_hlsearch) -#endif /* VIM__H */ +#endif /* NEOVIM_VIM_H */ diff --git a/src/window.c b/src/window.c index 5256fbd1fa..fb95ec1239 100644 --- a/src/window.c +++ b/src/window.c @@ -8,6 +8,38 @@ */ #include "vim.h" +#include "window.h" +#include "buffer.h" +#include "charset.h" +#include "diff.h" +#include "edit.h" +#include "eval.h" +#include "ex_cmds.h" +#include "ex_cmds2.h" +#include "ex_docmd.h" +#include "ex_eval.h" +#include "ex_getln.h" +#include "fileio.h" +#include "fold.h" +#include "getchar.h" +#include "hashtab.h" +#include "main.h" +#include "mark.h" +#include "memline.h" +#include "message.h" +#include "misc1.h" +#include "misc2.h" +#include "move.h" +#include "normal.h" +#include "option.h" +#include "os_unix.h" +#include "quickfix.h" +#include "regexp.h" +#include "screen.h" +#include "search.h" +#include "syntax.h" +#include "term.h" +#include "undo.h" #include "os/os.h" static int path_is_url __ARGS((char_u *p)); diff --git a/src/window.h b/src/window.h new file mode 100644 index 0000000000..1fa7c302fd --- /dev/null +++ b/src/window.h @@ -0,0 +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)); +/* vim: set ft=c : */ +#endif /* NEOVIM_WINDOW_H */ -- cgit