diff options
-rw-r--r-- | config/CMakeLists.txt | 1 | ||||
-rw-r--r-- | config/config.h.in | 1 | ||||
-rw-r--r-- | runtime/doc/quickref.txt | 2 | ||||
-rw-r--r-- | runtime/doc/repeat.txt | 4 | ||||
-rwxr-xr-x | scripts/vim-patch.sh | 2 | ||||
-rw-r--r-- | src/nvim/globals.h | 106 | ||||
-rw-r--r-- | src/nvim/os/win_defs.h | 4 |
7 files changed, 48 insertions, 72 deletions
diff --git a/config/CMakeLists.txt b/config/CMakeLists.txt index 1dcf7e4686..81b1fd64e3 100644 --- a/config/CMakeLists.txt +++ b/config/CMakeLists.txt @@ -15,7 +15,6 @@ check_type_size("void *" SIZEOF_VOID_PTR) check_symbol_exists(_NSGetEnviron crt_externs.h HAVE__NSGETENVIRON) # Headers -check_include_files(fcntl.h HAVE_FCNTL_H) check_include_files(iconv.h HAVE_ICONV_H) check_include_files(langinfo.h HAVE_LANGINFO_H) check_include_files(locale.h HAVE_LOCALE_H) diff --git a/config/config.h.in b/config/config.h.in index 84a90301ff..1eafc8cb95 100644 --- a/config/config.h.in +++ b/config/config.h.in @@ -13,7 +13,6 @@ #endif #cmakedefine HAVE__NSGETENVIRON -#cmakedefine HAVE_FCNTL_H #cmakedefine HAVE_FD_CLOEXEC #cmakedefine HAVE_FSEEKO #cmakedefine HAVE_GETPWENT diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt index 14aa3ef603..ded5e69438 100644 --- a/runtime/doc/quickref.txt +++ b/runtime/doc/quickref.txt @@ -983,8 +983,6 @@ Short explanation of each option: *option-list* |dos-CTRL-Break| CTRL-Break Windows: during searches: Interrupt the search |<Del>| <Del> while entering a count: delete last character |:version| :ve[rsion] show version information -|:mode| :mode N Windows: set screen mode to N (number, C80, - C4350, etc.) |:normal| :norm[al][!] {commands} execute Normal mode commands |Q| Q switch to "Ex" mode diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt index 05a49d9658..59dbbf3067 100644 --- a/runtime/doc/repeat.txt +++ b/runtime/doc/repeat.txt @@ -658,10 +658,6 @@ long you take to respond to the input() prompt is irrelevant. Profiling should give a good indication of where time is spent, but keep in mind there are various things that may clobber the results: -- The accuracy of the time measured depends on the gettimeofday() system - function. It may only be as accurate as 1/100 second, even though the times - are displayed in micro seconds. - - Real elapsed time is measured, if other processes are busy they may cause delays at unpredictable moments. You may want to run the profiling several times and use the lowest results. diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index c0934a17e3..badf747742 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -182,7 +182,7 @@ list_vim_patches() { local patch_number="${BASH_REMATCH[2]}" # Tagged Vim patch, check version.c: is_missing="$(sed -n '/static int included_patches/,/}/p' "${NEOVIM_SOURCE_DIR}/src/nvim/version.c" | - grep -x -e "[[:space:]]*//${patch_number} NA" -e "[[:space:]]*${patch_number}," >/dev/null && echo "false" || echo "true")" + grep -x -e "[[:space:]]*//[[:space:]]${patch_number} NA" -e "[[:space:]]*${patch_number}," >/dev/null && echo "false" || echo "true")" vim_commit="${BASH_REMATCH[1]//-/.}" else # Untagged Vim patch (e.g. runtime updates), check the Neovim git log: diff --git a/src/nvim/globals.h b/src/nvim/globals.h index 50eda6cb17..b45f13de4c 100644 --- a/src/nvim/globals.h +++ b/src/nvim/globals.h @@ -8,11 +8,10 @@ // actually defined and initialized. #ifndef EXTERN # define EXTERN extern -# define INIT(x) +# define INIT(...) #else # ifndef INIT -# define INIT(x) x -# define DO_INIT +# define INIT(...) __VA_ARGS__ # endif #endif @@ -117,12 +116,9 @@ #define DFLT_COLS 80 /* default value for 'columns' */ #define DFLT_ROWS 24 /* default value for 'lines' */ -EXTERN long Rows /* nr of rows in the screen */ -#ifdef DO_INIT - = DFLT_ROWS -#endif -; -EXTERN long Columns INIT(= DFLT_COLS); /* nr of columns in the screen */ +EXTERN long Rows INIT(= DFLT_ROWS); // nr of rows in the screen + +EXTERN long Columns INIT(= DFLT_COLS); // nr of columns in the screen /* * The characters and attributes cached for the screen. @@ -751,11 +747,8 @@ EXTERN int can_si INIT(= FALSE); */ EXTERN int can_si_back INIT(= FALSE); -EXTERN pos_T saved_cursor /* w_cursor before formatting text. */ -#ifdef DO_INIT - = INIT_POS_T(0, 0, 0) -#endif -; +// w_cursor before formatting text. +EXTERN pos_T saved_cursor INIT(= INIT_POS_T(0, 0, 0)); /* * Stuff for insert mode. @@ -917,19 +910,16 @@ EXTERN int RedrawingDisabled INIT(= 0); EXTERN int readonlymode INIT(= FALSE); /* Set to TRUE for "view" */ EXTERN int recoverymode INIT(= FALSE); /* Set to TRUE for "-r" option */ -EXTERN typebuf_T typebuf /* typeahead buffer */ -#ifdef DO_INIT - = {NULL, NULL, 0, 0, 0, 0, 0, 0, 0} -#endif -; -EXTERN int ex_normal_busy INIT(= 0); /* recursiveness of ex_normal() */ -EXTERN int ex_normal_lock INIT(= 0); /* forbid use of ex_normal() */ -EXTERN int ignore_script INIT(= FALSE); /* ignore script input */ -EXTERN int stop_insert_mode; /* for ":stopinsert" and 'insertmode' */ +// typeahead buffer +EXTERN typebuf_T typebuf INIT(= { NULL, NULL, 0, 0, 0, 0, 0, 0, 0 }); -EXTERN int KeyTyped; /* TRUE if user typed current char */ -EXTERN int KeyStuffed; /* TRUE if current char from stuffbuf */ -EXTERN int maptick INIT(= 0); /* tick for each non-mapped char */ +EXTERN int ex_normal_busy INIT(= 0); // recursiveness of ex_normal() +EXTERN int ex_normal_lock INIT(= 0); // forbid use of ex_normal() +EXTERN int ignore_script INIT(= false); // ignore script input +EXTERN int stop_insert_mode; // for ":stopinsert" and 'insertmode' +EXTERN int KeyTyped; // TRUE if user typed current char +EXTERN int KeyStuffed; // TRUE if current char from stuffbuf +EXTERN int maptick INIT(= 0); // tick for each non-mapped char EXTERN char_u chartab[256]; /* table used in charset.c; See init_chartab() for explanation */ @@ -959,30 +949,28 @@ EXTERN reg_extmatch_T *re_extmatch_in INIT(= NULL); /* Used by vim_regexec(): EXTERN reg_extmatch_T *re_extmatch_out INIT(= NULL); /* Set by vim_regexec() * to store \z\(...\) matches */ -EXTERN int did_outofmem_msg INIT(= FALSE); -/* set after out of memory msg */ -EXTERN int did_swapwrite_msg INIT(= FALSE); -/* set after swap write error msg */ -EXTERN int undo_off INIT(= FALSE); /* undo switched off for now */ -EXTERN int global_busy INIT(= 0); /* set when :global is executing */ -EXTERN int listcmd_busy INIT(= FALSE); /* set when :argdo, :windo or - :bufdo is executing */ -EXTERN int need_start_insertmode INIT(= FALSE); -/* start insert mode soon */ -EXTERN char_u *last_cmdline INIT(= NULL); /* last command line (for ":) */ -EXTERN char_u *repeat_cmdline INIT(= NULL); /* command line for "." */ -EXTERN char_u *new_last_cmdline INIT(= NULL); /* new value for last_cmdline */ -EXTERN char_u *autocmd_fname INIT(= NULL); /* fname for <afile> on cmdline */ -EXTERN int autocmd_fname_full; /* autocmd_fname is full path */ -EXTERN int autocmd_bufnr INIT(= 0); /* fnum for <abuf> on cmdline */ -EXTERN char_u *autocmd_match INIT(= NULL); /* name for <amatch> on cmdline */ -EXTERN int did_cursorhold INIT(= FALSE); /* set when CursorHold t'gerd */ -EXTERN pos_T last_cursormoved /* for CursorMoved event */ -# ifdef DO_INIT - = INIT_POS_T(0, 0, 0) -# endif -; -EXTERN int last_changedtick INIT(= 0); /* for TextChanged event */ +EXTERN int did_outofmem_msg INIT(= false); +// set after out of memory msg +EXTERN int did_swapwrite_msg INIT(= false); +// set after swap write error msg +EXTERN int undo_off INIT(= false); // undo switched off for now +EXTERN int global_busy INIT(= 0); // set when :global is executing +EXTERN int listcmd_busy INIT(= false); // set when :argdo, :windo or + // :bufdo is executing +EXTERN int need_start_insertmode INIT(= false); +// start insert mode soon +EXTERN char_u *last_cmdline INIT(= NULL); // last command line (for ":) +EXTERN char_u *repeat_cmdline INIT(= NULL); // command line for "." +EXTERN char_u *new_last_cmdline INIT(= NULL); // new value for last_cmdline +EXTERN char_u *autocmd_fname INIT(= NULL); // fname for <afile> on cmdline +EXTERN int autocmd_fname_full; // autocmd_fname is full path +EXTERN int autocmd_bufnr INIT(= 0); // fnum for <abuf> on cmdline +EXTERN char_u *autocmd_match INIT(= NULL); // name for <amatch> on cmdline +EXTERN int did_cursorhold INIT(= false); // set when CursorHold t'gerd +// for CursorMoved event +EXTERN pos_T last_cursormoved INIT(= INIT_POS_T(0, 0, 0)); + +EXTERN int last_changedtick INIT(= 0); // for TextChanged event EXTERN buf_T *last_changedtick_buf INIT(= NULL); EXTERN int postponed_split INIT(= 0); /* for CTRL-W CTRL-] command */ @@ -1092,13 +1080,9 @@ EXTERN int typebuf_was_filled INIT(= FALSE); /* received text from client #ifdef BACKSLASH_IN_FILENAME -EXTERN char psepc INIT(= '\\'); /* normal path separator character */ -EXTERN char psepcN INIT(= '/'); /* abnormal path separator character */ -EXTERN char pseps[2] /* normal path separator string */ -# ifdef DO_INIT - = {'\\', 0} -# endif -; +EXTERN char psepc INIT(= '\\'); // normal path separator character +EXTERN char psepcN INIT(= '/'); // abnormal path separator character +EXTERN char pseps[2] INIT(= { '\\', 0 }); // normal path separator string #endif /* Set to TRUE when an operator is being executed with virtual editing, MAYBE @@ -1117,12 +1101,8 @@ EXTERN int need_cursor_line_redraw INIT(= FALSE); #ifdef USE_MCH_ERRMSG -/* Grow array to collect error messages in until they can be displayed. */ -EXTERN garray_T error_ga -# ifdef DO_INIT - = GA_EMPTY_INIT_VALUE -# endif -; +// Grow array to collect error messages in until they can be displayed. +EXTERN garray_T error_ga INIT(= GA_EMPTY_INIT_VALUE); #endif diff --git a/src/nvim/os/win_defs.h b/src/nvim/os/win_defs.h index 642b038b6b..ba96347a12 100644 --- a/src/nvim/os/win_defs.h +++ b/src/nvim/os/win_defs.h @@ -5,6 +5,10 @@ #include <sys/stat.h> #include <stdio.h> +// Windows does not have S_IFLNK but libuv defines it +// and sets the flag for us when calling uv_fs_stat. +#include <uv.h> + #define NAME_MAX _MAX_PATH #define TEMP_DIR_NAMES {"$TMP", "$TEMP", "$USERPROFILE", ""} |