mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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. */
This commit is contained in:
parent
82e0636e78
commit
0ef90c13b7
@ -7,6 +7,8 @@
|
||||
* See README.txt for an overview of the Vim source code.
|
||||
*/
|
||||
|
||||
#include "arabic.h"
|
||||
|
||||
/*
|
||||
* arabic.c: functions for Arabic language
|
||||
*
|
||||
|
@ -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 */
|
||||
|
@ -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]))
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
#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));
|
||||
@ -8,3 +10,4 @@ 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 */
|
35
src/buffer.c
35
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
|
||||
|
@ -1,3 +1,5 @@
|
||||
#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));
|
||||
@ -79,3 +81,4 @@ 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 */
|
@ -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));
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
#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));
|
||||
@ -62,3 +64,4 @@ 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 */
|
21
src/diff.c
21
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 */
|
||||
|
@ -1,3 +1,5 @@
|
||||
#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));
|
||||
@ -28,3 +30,4 @@ linenr_T diff_get_corresponding_line __ARGS((buf_T *buf1, linenr_T lnum1,
|
||||
linenr_T lnum3));
|
||||
linenr_T diff_lnum_win __ARGS((linenr_T lnum, win_T *wp));
|
||||
/* vim: set ft=c : */
|
||||
#endif /* NEOVIM_DIFF_H */
|
@ -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;
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
#ifndef NEOVIM_DIGRAPH_H
|
||||
#define NEOVIM_DIGRAPH_H
|
||||
/* digraph.c */
|
||||
int do_digraph __ARGS((int c));
|
||||
int get_digraph __ARGS((int cmdline));
|
||||
@ -7,3 +9,4 @@ 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 */
|
32
src/edit.c
32
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
|
||||
|
@ -1,3 +1,5 @@
|
||||
#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));
|
||||
@ -44,3 +46,4 @@ 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 */
|
46
src/eval.c
46
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 <math.h>
|
||||
#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:" */
|
||||
|
@ -1,3 +1,5 @@
|
||||
#ifndef NEOVIM_EVAL_H
|
||||
#define NEOVIM_EVAL_H
|
||||
/* eval.c */
|
||||
void eval_init __ARGS((void));
|
||||
void eval_clear __ARGS((void));
|
||||
@ -148,3 +150,4 @@ int modify_fname __ARGS((char_u *src, int *usedlen, char_u **fnamep, char_u *
|
||||
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 */
|
@ -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,
|
||||
|
1265
src/ex_cmds.h
1265
src/ex_cmds.h
File diff suppressed because it is too large
Load Diff
@ -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));
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
#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));
|
||||
@ -91,3 +93,4 @@ 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 */
|
1191
src/ex_cmds_defs.h
Normal file
1191
src/ex_cmds_defs.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -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.
|
||||
|
@ -1,3 +1,5 @@
|
||||
#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));
|
||||
@ -67,3 +69,4 @@ 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 */
|
@ -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));
|
||||
|
@ -1,3 +1,5 @@
|
||||
#ifndef NEOVIM_EX_EVAL_H
|
||||
#define NEOVIM_EX_EVAL_H
|
||||
/* ex_eval.c */
|
||||
int aborting __ARGS((void));
|
||||
void update_force_abort __ARGS((void));
|
||||
@ -36,3 +38,4 @@ void rewind_conditionals __ARGS((struct condstack *cstack, int idx,
|
||||
void ex_endfunction __ARGS((exarg_T *eap));
|
||||
int has_loop_cmd __ARGS((char_u *p));
|
||||
/* vim: set ft=c : */
|
||||
#endif /* NEOVIM_EX_EVAL_H */
|
@ -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"
|
||||
|
||||
/*
|
||||
|
@ -1,3 +1,5 @@
|
||||
#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,
|
||||
@ -64,3 +66,4 @@ 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 */
|
@ -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
|
||||
*
|
||||
|
@ -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 */
|
||||
|
31
src/fileio.c
31
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"
|
||||
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
#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,
|
||||
@ -80,3 +82,4 @@ char_u *file_pat_to_reg_pat __ARGS((char_u *pat, char_u *pat_end,
|
||||
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 */
|
16
src/fold.c
16
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 */
|
||||
|
@ -1,3 +1,5 @@
|
||||
#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));
|
||||
@ -48,3 +50,4 @@ char_u *get_foldtext __ARGS((win_T *wp, linenr_T lnum, linenr_T lnume,
|
||||
void foldtext_cleanup __ARGS((char_u *str));
|
||||
int put_folds __ARGS((FILE *fd, win_T *wp));
|
||||
/* vim: set ft=c : */
|
||||
#endif /* NEOVIM_FOLD_H */
|
@ -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:
|
||||
|
@ -1,3 +1,5 @@
|
||||
#ifndef NEOVIM_GETCHAR_H
|
||||
#define NEOVIM_GETCHAR_H
|
||||
/* getchar.c */
|
||||
void free_buff __ARGS((struct buffheader *buf));
|
||||
char_u *get_recorded __ARGS((void));
|
||||
@ -72,3 +74,4 @@ char_u *check_map __ARGS((char_u *keys, int mode, int exact, int ign_mod,
|
||||
void init_mappings __ARGS((void));
|
||||
void add_map __ARGS((char_u *map, int mode));
|
||||
/* vim: set ft=c : */
|
||||
#endif /* NEOVIM_GETCHAR_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 */
|
||||
|
@ -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
|
||||
|
@ -1,3 +1,5 @@
|
||||
#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));
|
||||
@ -7,3 +9,4 @@ 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 */
|
@ -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
|
||||
|
@ -1,3 +1,5 @@
|
||||
#ifndef NEOVIM_HARDCOPY_H
|
||||
#define NEOVIM_HARDCOPY_H
|
||||
/* hardcopy.c */
|
||||
char_u *parse_printoptions __ARGS((void));
|
||||
char_u *parse_printmbfont __ARGS((void));
|
||||
@ -19,3 +21,4 @@ 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 */
|
@ -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
|
||||
|
@ -1,3 +1,5 @@
|
||||
#ifndef NEOVIM_HASHTAB_H
|
||||
#define NEOVIM_HASHTAB_H
|
||||
/* hashtab.c */
|
||||
void hash_init __ARGS((hashtab_T *ht));
|
||||
void hash_clear __ARGS((hashtab_T *ht));
|
||||
@ -13,3 +15,4 @@ 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 */
|
@ -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 <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#if defined(UNIX)
|
||||
# include <sys/wait.h>
|
||||
#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
|
||||
{
|
||||
|
@ -1,72 +1,16 @@
|
||||
/* vi:set ts=8 sts=4 sw=4:
|
||||
*
|
||||
* CSCOPE support for Vim added by Andy Kahn <kahn@zk3.dec.com>
|
||||
* Ported to Win32 by Sergey Khorev <sergey.khorev@gmail.com>
|
||||
*
|
||||
* 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 <sys/types.h> /* pid_t */
|
||||
# include <sys/stat.h> /* 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 */
|
||||
|
72
src/if_cscope_defs.h
Normal file
72
src/if_cscope_defs.h
Normal file
@ -0,0 +1,72 @@
|
||||
/* vi:set ts=8 sts=4 sw=4:
|
||||
*
|
||||
* CSCOPE support for Vim added by Andy Kahn <kahn@zk3.dec.com>
|
||||
* Ported to Win32 by Sergey Khorev <sergey.khorev@gmail.com>
|
||||
*
|
||||
* 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 <sys/types.h> /* pid_t */
|
||||
# include <sys/stat.h> /* 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 */
|
@ -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 */
|
||||
|
||||
|
32
src/main.c
32
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
|
||||
|
@ -1,3 +1,5 @@
|
||||
#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));
|
||||
@ -25,3 +27,4 @@ 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 */
|
18
src/mark.c
18
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"
|
||||
|
||||
/*
|
||||
|
@ -1,3 +1,5 @@
|
||||
#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));
|
||||
@ -32,3 +34,4 @@ 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 */
|
11
src/mbyte.c
11
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
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
#ifndef NEOVIM_MBYTE_H
|
||||
#define NEOVIM_MBYTE_H
|
||||
/* mbyte.c */
|
||||
int enc_canon_props __ARGS((char_u *name));
|
||||
char_u *mb_init __ARGS((void));
|
||||
@ -98,3 +100,4 @@ 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 */
|
@ -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
|
||||
|
@ -1,3 +1,5 @@
|
||||
#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));
|
||||
@ -16,3 +18,4 @@ 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 */
|
@ -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 <time.h>
|
||||
#endif
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
#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));
|
||||
@ -39,3 +41,4 @@ void ml_decrypt_data __ARGS((memfile_T *mfp, char_u *data, off_t offset,
|
||||
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 */
|
@ -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 */
|
||||
|
@ -1,3 +1,5 @@
|
||||
#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,
|
||||
@ -21,3 +23,4 @@ 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 */
|
@ -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 <math.h>
|
||||
|
@ -1,3 +1,5 @@
|
||||
#ifndef NEOVIM_MESSAGE_H
|
||||
#define NEOVIM_MESSAGE_H
|
||||
/* message.c */
|
||||
int msg __ARGS((char_u *s));
|
||||
int verb_msg __ARGS((char_u *s));
|
||||
@ -78,3 +80,4 @@ 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 */
|
31
src/misc1.c
31
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));
|
||||
|
@ -1,3 +1,5 @@
|
||||
#ifndef NEOVIM_MISC1_H
|
||||
#define NEOVIM_MISC1_H
|
||||
/* misc1.c */
|
||||
int get_indent __ARGS((void));
|
||||
int get_indent_lnum __ARGS((linenr_T lnum));
|
||||
@ -115,3 +117,4 @@ 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 */
|
22
src/misc2.c
22
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() */
|
||||
|
@ -1,3 +1,5 @@
|
||||
#ifndef NEOVIM_MISC2_H
|
||||
#define NEOVIM_MISC2_H
|
||||
/* misc2.c */
|
||||
int virtual_active __ARGS((void));
|
||||
int getviscol __ARGS((void));
|
||||
@ -131,3 +133,4 @@ 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 */
|
11
src/move.c
11
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));
|
||||
|
@ -1,3 +1,5 @@
|
||||
#ifndef NEOVIM_MOVE_H
|
||||
#define NEOVIM_MOVE_H
|
||||
/* move.c */
|
||||
void update_topline_redraw __ARGS((void));
|
||||
void update_topline __ARGS((void));
|
||||
@ -39,3 +41,4 @@ 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 */
|
33
src/normal.c
33
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.
|
||||
|
@ -1,3 +1,5 @@
|
||||
#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));
|
||||
@ -27,3 +29,4 @@ 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 */
|
25
src/ops.c
25
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.
|
||||
|
@ -1,3 +1,5 @@
|
||||
#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));
|
||||
@ -64,3 +66,4 @@ void write_reg_contents_ex __ARGS((int name, char_u *str, int maxlen,
|
||||
void clear_oparg __ARGS((oparg_T *oap));
|
||||
void cursor_pos_info __ARGS((void));
|
||||
/* vim: set ft=c : */
|
||||
#endif /* NEOVIM_OPS_H */
|
37
src/option.c
37
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)
|
||||
|
845
src/option.h
845
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 */
|
||||
|
768
src/option_defs.h
Normal file
768
src/option_defs.h
Normal file
@ -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
|
@ -14,6 +14,7 @@
|
||||
#include <uv.h>
|
||||
|
||||
#include "os.h"
|
||||
#include "../message.h"
|
||||
|
||||
int mch_chdir(char *path) {
|
||||
if (p_verbose >= 5) {
|
||||
|
@ -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
|
||||
|
429
src/os_unix.h
429
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 <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
# include <sys/types.h>
|
||||
# include <sys/stat.h>
|
||||
|
||||
#ifdef HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#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 <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBC_H
|
||||
# include <libc.h> /* for NeXT */
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
# include <sys/param.h> /* 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 <dirent.h>
|
||||
# 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 <sys/ndir.h>
|
||||
# endif
|
||||
# if HAVE_SYS_DIR_H
|
||||
# include <sys/dir.h>
|
||||
# endif
|
||||
# if HAVE_NDIR_H
|
||||
# include <ndir.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_SYS_TIME_H) || defined(TIME_WITH_SYS_TIME)
|
||||
# include <time.h> /* on some systems time.h should not be
|
||||
included together with sys/time.h */
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
#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 <pwd.h>
|
||||
#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 <string.h>
|
||||
#endif
|
||||
#if defined(HAVE_STRINGS_H) && !defined(NO_STRINGS_WITH_STRING_H)
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_SETJMP_H)
|
||||
# include <setjmp.h>
|
||||
# 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 */
|
||||
|
351
src/os_unix_defs.h
Normal file
351
src/os_unix_defs.h
Normal file
@ -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 <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
# include <sys/types.h>
|
||||
# include <sys/stat.h>
|
||||
|
||||
#ifdef HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#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 <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBC_H
|
||||
# include <libc.h> /* for NeXT */
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
# include <sys/param.h> /* 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 <dirent.h>
|
||||
# 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 <sys/ndir.h>
|
||||
# endif
|
||||
# if HAVE_SYS_DIR_H
|
||||
# include <sys/dir.h>
|
||||
# endif
|
||||
# if HAVE_NDIR_H
|
||||
# include <ndir.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_SYS_TIME_H) || defined(TIME_WITH_SYS_TIME)
|
||||
# include <time.h> /* on some systems time.h should not be
|
||||
included together with sys/time.h */
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
#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 <pwd.h>
|
||||
#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 <string.h>
|
||||
#endif
|
||||
#if defined(HAVE_STRINGS_H) && !defined(NO_STRINGS_WITH_STRING_H)
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_SETJMP_H)
|
||||
# include <setjmp.h>
|
||||
# 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)
|
@ -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" */
|
||||
|
@ -1,3 +1,5 @@
|
||||
#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));
|
||||
@ -6,3 +8,4 @@ void pum_clear __ARGS((void));
|
||||
int pum_visible __ARGS((void));
|
||||
int pum_get_height __ARGS((void));
|
||||
/* vim: set ft=c : */
|
||||
#endif /* NEOVIM_POPUPMNU_H */
|
75
src/proto.h
75
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 */
|
||||
|
@ -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 : */
|
@ -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 : */
|
@ -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 : */
|
@ -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 : */
|
@ -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 : */
|
@ -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 : */
|
@ -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 : */
|
@ -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"
|
||||
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
#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));
|
||||
@ -31,3 +33,4 @@ 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 */
|
11
src/regexp.c
11
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:
|
||||
*
|
||||
|
179
src/regexp.h
179
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 */
|
||||
|
152
src/regexp_defs.h
Normal file
152
src/regexp_defs.h
Normal file
@ -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 */
|
@ -5,6 +5,8 @@
|
||||
* This file is included in "regexp.c".
|
||||
*/
|
||||
|
||||
#include "misc2.h"
|
||||
|
||||
/*
|
||||
* Logging of NFA engine.
|
||||
*
|
||||
|
31
src/screen.c
31
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. */
|
||||
|
@ -1,3 +1,5 @@
|
||||
#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));
|
||||
@ -64,3 +66,4 @@ 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 */
|
25
src/search.c
25
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));
|
||||
|
@ -1,3 +1,5 @@
|
||||
#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));
|
||||
@ -47,3 +49,4 @@ void find_pattern_in_path __ARGS((char_u *ptr, int dir, int len, int whole,
|
||||
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 */
|
@ -21,7 +21,7 @@
|
||||
*/
|
||||
|
||||
#include "vim.h"
|
||||
|
||||
#include "sha256.h"
|
||||
|
||||
static void sha256_process __ARGS((context_sha256_T *ctx, char_u data[64]));
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
#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,
|
||||
@ -10,3 +12,4 @@ 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 */
|
29
src/spell.c
29
src/spell.c
@ -298,9 +298,34 @@
|
||||
*/
|
||||
|
||||
#include "vim.h"
|
||||
#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.h for Unix */
|
||||
#ifndef UNIX /* it's in os_unix_defs.h for Unix */
|
||||
# include <time.h> /* for time_t */
|
||||
#endif
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user