diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-09-01 16:24:56 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-09-01 16:24:56 +0200 |
commit | c33083592846c8d4b2d6fae499536b9d578fe10d (patch) | |
tree | 8b45ae73958c1702ac0f05f976e8ace86fee91cb /src | |
parent | da6c03342117fb7f4a8110bd9e8627b612a05a64 (diff) |
patch 8.1.1958: old style comments taking up spacev8.1.1958
Problem: Old style comments taking up space.
Solution: Change to new style comments.
Diffstat (limited to 'src')
-rw-r--r-- | src/version.c | 2 | ||||
-rw-r--r-- | src/vim.h | 1370 |
2 files changed, 685 insertions, 687 deletions
diff --git a/src/version.c b/src/version.c index 89922c2415..14842cde48 100644 --- a/src/version.c +++ b/src/version.c @@ -762,6 +762,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1958, +/**/ 1957, /**/ 1956, @@ -21,9 +21,9 @@ # include "vimio.h" #endif -/* ============ the header file puzzle (ca. 50-100 pieces) ========= */ +// ============ the header file puzzle: order matters ========= -#ifdef HAVE_CONFIG_H /* GNU autoconf (or something else) was here */ +#ifdef HAVE_CONFIG_H // GNU autoconf (or something else) was here # include "auto/config.h" # define HAVE_PATHDEF @@ -47,22 +47,22 @@ # undef HAVE_FCHDIR # endif -/* We may need to define the uint32_t on non-Unix system, but using the same - * identifier causes conflicts. Therefore use UINT32_T. */ +// We may need to define the uint32_t on non-Unix system, but using the same +// identifier causes conflicts. Therefore use UINT32_T. # define UINT32_TYPEDEF uint32_t #endif #if !defined(UINT32_TYPEDEF) -# if defined(uint32_t) /* this doesn't catch typedefs, unfortunately */ +# if defined(uint32_t) // this doesn't catch typedefs, unfortunately # define UINT32_TYPEDEF uint32_t # else - /* Fall back to assuming unsigned int is 32 bit. If this is wrong then the - * test in blowfish.c will fail. */ + // Fall back to assuming unsigned int is 32 bit. If this is wrong then the + // test in blowfish.c will fail. # define UINT32_TYPEDEF unsigned int # endif #endif -/* user ID of root is usually zero, but not for everybody */ +// user ID of root is usually zero, but not for everybody #ifdef __TANDEM # ifndef _TANDEM_SOURCE # define _TANDEM_SOURCE @@ -84,7 +84,7 @@ #if defined(MACOS_X_DARWIN) && !defined(MACOS_X) # define MACOS_X #endif -/* Unless made through the Makefile enforce GUI on Mac */ +// Unless made through the Makefile enforce GUI on Mac #if defined(MACOS_X) && !defined(HAVE_CONFIG_H) # define UNIX # define FEAT_GUI_MAC @@ -96,20 +96,20 @@ || defined(FEAT_GUI_MAC) \ || defined(FEAT_GUI_MSWIN) \ || defined(FEAT_GUI_PHOTON) -# define FEAT_GUI_ENABLED /* also defined with NO_X11_INCLUDES */ +# define FEAT_GUI_ENABLED // also defined with NO_X11_INCLUDES # if !defined(FEAT_GUI) && !defined(NO_X11_INCLUDES) # define FEAT_GUI # endif #endif -/* Check support for rendering options */ +// Check support for rendering options #ifdef FEAT_GUI # if defined(FEAT_DIRECTX) # define FEAT_RENDER_OPTIONS # endif #endif -/* Visual Studio 2005 has 'deprecated' many of the standard CRT functions */ +// Visual Studio 2005 has 'deprecated' many of the standard CRT functions #if _MSC_VER >= 1400 # define _CRT_SECURE_NO_DEPRECATE # define _CRT_NONSTDC_NO_DEPRECATE @@ -124,8 +124,8 @@ #endif #ifdef AMIGA - /* Be conservative about sizeof(int). It could be 4 too. */ -# ifndef FEAT_GUI_GTK /* avoid problems when generating prototypes */ + // Be conservative about sizeof(int). It could be 4 too. +# ifndef FEAT_GUI_GTK // avoid problems when generating prototypes # ifdef __GNUC__ # define VIM_SIZEOF_INT 4 # else @@ -156,14 +156,14 @@ # endif #endif -/* +x11 is only enabled when it's both available and wanted. */ +// +x11 is only enabled when it's both available and wanted. #if defined(HAVE_X11) && defined(WANT_X11) # define FEAT_X11 #endif #ifdef NO_X11_INCLUDES - /* In os_mac_conv.c and os_macosx.m NO_X11_INCLUDES is defined to avoid - * X11 headers. Disable all X11 related things to avoid conflicts. */ + // In os_mac_conv.c and os_macosx.m NO_X11_INCLUDES is defined to avoid + // X11 headers. Disable all X11 related things to avoid conflicts. # ifdef FEAT_X11 # undef FEAT_X11 # endif @@ -193,12 +193,12 @@ # endif #endif -/* The Mac conversion stuff doesn't work under X11. */ +// The Mac conversion stuff doesn't work under X11. #if defined(MACOS_X_DARWIN) # define MACOS_CONVERT #endif -/* Can't use "PACKAGE" here, conflicts with a Perl include file. */ +// Can't use "PACKAGE" here, conflicts with a Perl include file. #ifndef VIMPACKAGE # define VIMPACKAGE "vim" #endif @@ -224,32 +224,31 @@ #if (defined(UNIX) || defined(VMS)) \ && (!defined(MACOS_X) || defined(HAVE_CONFIG_H)) -# include "os_unix.h" /* bring lots of system header files */ +# include "os_unix.h" // bring lots of system header files #endif -/* Mark unused function arguments with UNUSED, so that gcc -Wunused-parameter - * can be used to check for mistakes. */ +// Mark unused function arguments with UNUSED, so that gcc -Wunused-parameter +// can be used to check for mistakes. #ifdef HAVE_ATTRIBUTE_UNUSED # define UNUSED __attribute__((unused)) #else # define UNUSED #endif -/* Used to check for "sun", "__sun" is used by newer compilers. */ +// Used to check for "sun", "__sun" is used by newer compilers. #if defined(__sun) # define SUN_SYSTEM #endif -/* If we're compiling in C++ (currently only KVim), the system - * headers must have the correct prototypes or nothing will build. - * Conversely, our prototypes might clash due to throw() specifiers and - * cause compilation failures even though the headers are correct. For - * a concrete example, gcc-3.2 enforces exception specifications, and - * glibc-2.2.5 has them in their system headers. - */ +// If we're compiling in C++ (currently only KVim), the system +// headers must have the correct prototypes or nothing will build. +// Conversely, our prototypes might clash due to throw() specifiers and +// cause compilation failures even though the headers are correct. For +// a concrete example, gcc-3.2 enforces exception specifications, and +// glibc-2.2.5 has them in their system headers. #if !defined(__cplusplus) && defined(UNIX) \ - && !defined(MACOS_X) /* MACOS_X doesn't yet support osdef.h */ -# include "auto/osdef.h" /* bring missing declarations in */ + && !defined(MACOS_X) // MACOS_X doesn't yet support osdef.h +# include "auto/osdef.h" // bring missing declarations in #endif #ifdef AMIGA @@ -295,7 +294,7 @@ # define PATH_ESC_CHARS ((char_u *)" \t\n*?[{`%#'\"|!<") #else # ifdef VMS - /* VMS allows a lot of characters in the file name */ + // VMS allows a lot of characters in the file name # define PATH_ESC_CHARS ((char_u *)" \t\n*?{`\\%#'\"|!") # define SHELL_ESC_CHARS ((char_u *)" \t\n*?{`\\%#'|!()&") # else @@ -304,15 +303,15 @@ # endif #endif -/* length of a buffer to store a number in ASCII (64 bits binary + NUL) */ +// length of a buffer to store a number in ASCII (64 bits binary + NUL) #define NUMBUFLEN 65 -/* flags for vim_str2nr() */ +// flags for vim_str2nr() #define STR2NR_BIN 1 #define STR2NR_OCT 2 #define STR2NR_HEX 4 #define STR2NR_ALL (STR2NR_BIN + STR2NR_OCT + STR2NR_HEX) -#define STR2NR_FORCE 8 /* only when ONE of the above is used */ +#define STR2NR_FORCE 8 // only when ONE of the above is used /* * Shorthand for unsigned variables. Many systems, but not all, have u_char @@ -322,8 +321,8 @@ typedef unsigned char char_u; typedef unsigned short short_u; typedef unsigned int int_u; -/* Older systems do not have support for long long - * use a typedef instead of hadcoded long long */ +// Older systems do not have support for long long +// use a typedef instead of hadcoded long long #ifdef HAVE_NO_LONG_LONG typedef long long_long_T; typedef long unsigned long_long_u_T; @@ -332,9 +331,9 @@ typedef unsigned int int_u; typedef long long unsigned long_long_u_T; #endif -/* Make sure long_u is big enough to hold a pointer. - * On Win64, longs are 32 bits and pointers are 64 bits. - * For printf() and scanf(), we need to take care of long_u specifically. */ +// Make sure long_u is big enough to hold a pointer. +// On Win64, longs are 32 bits and pointers are 64 bits. +// For printf() and scanf(), we need to take care of long_u specifically. #ifdef _WIN64 typedef unsigned __int64 long_u; typedef __int64 long_i; @@ -342,11 +341,10 @@ typedef __int64 long_i; # define SCANF_DECIMAL_LONG_U "%Iu" # define PRINTF_HEX_LONG_U "0x%Ix" #else - /* Microsoft-specific. The __w64 keyword should be specified on any typedefs - * that change size between 32-bit and 64-bit platforms. For any such type, - * __w64 should appear only on the 32-bit definition of the typedef. - * Define __w64 as an empty token for everything but MSVC 7.x or later. - */ + // Microsoft-specific. The __w64 keyword should be specified on any typedefs + // that change size between 32-bit and 64-bit platforms. For any such type, + // __w64 should appear only on the 32-bit definition of the typedef. + // Define __w64 as an empty token for everything but MSVC 7.x or later. # if !defined(_MSC_VER) || (_MSC_VER < 1300) # define __w64 # endif @@ -415,7 +413,7 @@ typedef unsigned short sattr_T; */ typedef unsigned int u8char_T; // int is 32 bits or more -#ifndef UNIX /* For Unix this is included in os_unix.h */ +#ifndef UNIX // For Unix this is included in os_unix.h # include <stdio.h> # include <ctype.h> #endif @@ -445,8 +443,8 @@ typedef unsigned int u8char_T; // int is 32 bits or more * These are also in os_unix.h, because osdef.sh needs them there. */ #ifndef UNIX -/* Note: Some systems need both string.h and strings.h (Savage). If the - * system can't handle this, define NO_STRINGS_WITH_STRING_H. */ +// Note: Some systems need both string.h and strings.h (Savage). If the +// system can't handle this, define NO_STRINGS_WITH_STRING_H. # ifdef HAVE_STRING_H # include <string.h> # endif @@ -459,7 +457,7 @@ typedef unsigned int u8char_T; // int is 32 bits or more # ifdef HAVE_STDLIB_H # include <stdlib.h> # endif -#endif /* NON-UNIX */ +#endif // NON-UNIX #include <assert.h> @@ -474,7 +472,7 @@ typedef unsigned int u8char_T; // int is 32 bits or more #endif #include <stdarg.h> -/* for offsetof() */ +// for offsetof() #include <stddef.h> #if defined(HAVE_SYS_SELECT_H) && \ @@ -494,7 +492,7 @@ typedef unsigned int u8char_T; // int is 32 bits or more # endif #endif -/* ================ end of the header file puzzle =============== */ +// ================ end of the header file puzzle =============== /* * For dynamically loaded imm library. Currently, only for Win32. @@ -512,7 +510,7 @@ typedef unsigned int u8char_T; // int is 32 bits or more # ifndef FEAT_GETTEXT # define FEAT_GETTEXT # endif -/* These are in os_win32.c */ +// These are in os_win32.c extern char *(*dyn_libintl_gettext)(const char *msgid); extern char *(*dyn_libintl_ngettext)(const char *msgid, const char *msgid_plural, unsigned long n); extern char *(*dyn_libintl_bindtextdomain)(const char *domainname, const char *dirname); @@ -559,31 +557,31 @@ extern int (*dyn_libintl_wputenv)(const wchar_t *envstring); # ifdef bindtextdomain # undef bindtextdomain # endif -# define bindtextdomain(x, y) /* empty */ +# define bindtextdomain(x, y) // empty # ifdef bind_textdomain_codeset # undef bind_textdomain_codeset # endif -# define bind_textdomain_codeset(x, y) /* empty */ +# define bind_textdomain_codeset(x, y) // empty # ifdef textdomain # undef textdomain # endif -# define textdomain(x) /* empty */ +# define textdomain(x) // empty #endif /* * flags for update_screen() * The higher the value, the higher the priority */ -#define VALID_NO_UPDATE 5 /* no new changes, keep the command line if - possible */ -#define VALID 10 /* buffer not changed, or changes marked - with b_mod_* */ -#define INVERTED 20 /* redisplay inverted part that changed */ -#define INVERTED_ALL 25 /* redisplay whole inverted part */ -#define REDRAW_TOP 30 /* display first w_upd_rows screen lines */ -#define SOME_VALID 35 /* like NOT_VALID but may scroll */ -#define NOT_VALID 40 /* buffer needs complete redraw */ -#define CLEAR 50 /* screen messed up, clear it */ +#define VALID_NO_UPDATE 5 // no new changes, keep the command line if + // possible +#define VALID 10 // buffer not changed, or changes marked + // with b_mod_* +#define INVERTED 20 // redisplay inverted part that changed +#define INVERTED_ALL 25 // redisplay whole inverted part +#define REDRAW_TOP 30 // display first w_upd_rows screen lines +#define SOME_VALID 35 // like NOT_VALID but may scroll +#define NOT_VALID 40 // buffer needs complete redraw +#define CLEAR 50 // screen messed up, clear it /* * Flags for w_valid. @@ -646,7 +644,7 @@ extern int (*dyn_libintl_wputenv)(const wchar_t *envstring); #define HL_STRIKETHROUGH 0x80 #define HL_ALL 0xff -/* special attribute addition: Put message in history */ +// special attribute addition: Put message in history #define MSG_HIST 0x1000 /* @@ -657,50 +655,50 @@ extern int (*dyn_libintl_wputenv)(const wchar_t *envstring); * these bits are set, no mapping is done. * The upper bits are used to distinguish between other states. */ -#define NORMAL 0x01 /* Normal mode, command expected */ -#define VISUAL 0x02 /* Visual mode - use get_real_state() */ -#define OP_PENDING 0x04 /* Normal mode, operator is pending - use - get_real_state() */ -#define CMDLINE 0x08 /* Editing command line */ -#define INSERT 0x10 /* Insert mode */ -#define LANGMAP 0x20 /* Language mapping, can be combined with - INSERT and CMDLINE */ - -#define REPLACE_FLAG 0x40 /* Replace mode flag */ +#define NORMAL 0x01 // Normal mode, command expected +#define VISUAL 0x02 // Visual mode - use get_real_state() +#define OP_PENDING 0x04 // Normal mode, operator is pending - use + // get_real_state() +#define CMDLINE 0x08 // Editing command line +#define INSERT 0x10 // Insert mode +#define LANGMAP 0x20 // Language mapping, can be combined with + // INSERT and CMDLINE + +#define REPLACE_FLAG 0x40 // Replace mode flag #define REPLACE (REPLACE_FLAG + INSERT) -#define VREPLACE_FLAG 0x80 /* Virtual-replace mode flag */ +#define VREPLACE_FLAG 0x80 // Virtual-replace mode flag #define VREPLACE (REPLACE_FLAG + VREPLACE_FLAG + INSERT) #define LREPLACE (REPLACE_FLAG + LANGMAP) -#define NORMAL_BUSY (0x100 + NORMAL) /* Normal mode, busy with a command */ -#define HITRETURN (0x200 + NORMAL) /* waiting for return or command */ -#define ASKMORE 0x300 /* Asking if you want --more-- */ -#define SETWSIZE 0x400 /* window size has changed */ -#define ABBREV 0x500 /* abbreviation instead of mapping */ -#define EXTERNCMD 0x600 /* executing an external command */ -#define SHOWMATCH (0x700 + INSERT) /* show matching paren */ -#define CONFIRM 0x800 /* ":confirm" prompt */ -#define SELECTMODE 0x1000 /* Select mode, only for mappings */ -#define TERMINAL 0x2000 /* Terminal mode */ - -/* all mode bits used for mapping */ +#define NORMAL_BUSY (0x100 + NORMAL) // Normal mode, busy with a command +#define HITRETURN (0x200 + NORMAL) // waiting for return or command +#define ASKMORE 0x300 // Asking if you want --more-- +#define SETWSIZE 0x400 // window size has changed +#define ABBREV 0x500 // abbreviation instead of mapping +#define EXTERNCMD 0x600 // executing an external command +#define SHOWMATCH (0x700 + INSERT) // show matching paren +#define CONFIRM 0x800 // ":confirm" prompt +#define SELECTMODE 0x1000 // Select mode, only for mappings +#define TERMINAL 0x2000 // Terminal mode + +// all mode bits used for mapping #define MAP_ALL_MODES (0x3f | SELECTMODE | TERMINAL) -/* directions */ +// directions #define FORWARD 1 #define BACKWARD (-1) #define FORWARD_FILE 3 #define BACKWARD_FILE (-3) -/* return values for functions */ +// return values for functions #if !(defined(OK) && (OK == 1)) -/* OK already defined to 1 in MacOS X curses, skip this */ +// OK already defined to 1 in MacOS X curses, skip this # define OK 1 #endif #define FAIL 0 -#define NOTDONE 2 /* not OK or FAIL but skipped */ +#define NOTDONE 2 // not OK or FAIL but skipped -/* flags for b_flags */ +// flags for b_flags #define BF_RECOVERED 0x01 // buffer has been recovered #define BF_CHECK_RO 0x02 // need to check readonly when loading file // into buffer (set by ":e", may be reset by @@ -718,7 +716,7 @@ extern int (*dyn_libintl_wputenv)(const wchar_t *envstring); #define BF_SYN_SET 0x200 // 'syntax' option was set #define BF_NO_SEA 0x400 // no swap_exists_action (ATTENTION prompt) -/* Mask to check for flags that prevent normal writing */ +// Mask to check for flags that prevent normal writing #define BF_WRITE_MASK (BF_NOTEDITED + BF_NEW + BF_READERR) /* @@ -776,11 +774,11 @@ extern int (*dyn_libintl_wputenv)(const wchar_t *envstring); #define EXPAND_MAPCLEAR 47 #define EXPAND_ARGLIST 48 -/* Values for exmode_active (0 is no exmode) */ +// Values for exmode_active (0 is no exmode) #define EXMODE_NORMAL 1 #define EXMODE_VIM 2 -/* Values for nextwild() and ExpandOne(). See ExpandOne() for meaning. */ +// Values for nextwild() and ExpandOne(). See ExpandOne() for meaning. #define WILD_FREE 1 #define WILD_EXPAND_FREE 2 #define WILD_EXPAND_KEEP 3 @@ -824,10 +822,10 @@ extern int (*dyn_libintl_wputenv)(const wchar_t *envstring); #define EW_EMPTYOK 0x8000 // no matches is not an error #define EW_NOTENV 0x10000 // do not expand environment variables -/* Flags for find_file_*() functions. */ -#define FINDFILE_FILE 0 /* only files */ -#define FINDFILE_DIR 1 /* only directories */ -#define FINDFILE_BOTH 2 /* files and directories */ +// Flags for find_file_*() functions. +#define FINDFILE_FILE 0 // only files +#define FINDFILE_DIR 1 // only directories +#define FINDFILE_BOTH 2 // files and directories #define W_ENDCOL(wp) (wp->w_wincol + wp->w_width) #ifdef FEAT_MENU @@ -840,7 +838,7 @@ extern int (*dyn_libintl_wputenv)(const wchar_t *envstring); # define gen_expand_wildcards mch_expand_wildcards #endif -/* Values for the find_pattern_in_path() function args 'type' and 'action': */ +// Values for the find_pattern_in_path() function args 'type' and 'action': #define FIND_ANY 1 #define FIND_DEFINE 2 #define CHECK_PATH 3 @@ -852,47 +850,47 @@ extern int (*dyn_libintl_wputenv)(const wchar_t *envstring); #define ACTION_EXPAND 5 #ifdef FEAT_SYN_HL -# define SST_MIN_ENTRIES 150 /* minimal size for state stack array */ -# define SST_MAX_ENTRIES 1000 /* maximal size for state stack array */ -# define SST_FIX_STATES 7 /* size of sst_stack[]. */ -# define SST_DIST 16 /* normal distance between entries */ -# define SST_INVALID (synstate_T *)-1 /* invalid syn_state pointer */ - -# define HL_CONTAINED 0x01 /* not used on toplevel */ -# define HL_TRANSP 0x02 /* has no highlighting */ -# define HL_ONELINE 0x04 /* match within one line only */ -# define HL_HAS_EOL 0x08 /* end pattern that matches with $ */ -# define HL_SYNC_HERE 0x10 /* sync point after this item (syncing only) */ -# define HL_SYNC_THERE 0x20 /* sync point at current line (syncing only) */ -# define HL_MATCH 0x40 /* use match ID instead of item ID */ -# define HL_SKIPNL 0x80 /* nextgroup can skip newlines */ -# define HL_SKIPWHITE 0x100 /* nextgroup can skip white space */ -# define HL_SKIPEMPTY 0x200 /* nextgroup can skip empty lines */ -# define HL_KEEPEND 0x400 /* end match always kept */ -# define HL_EXCLUDENL 0x800 /* exclude NL from match */ -# define HL_DISPLAY 0x1000 /* only used for displaying, not syncing */ -# define HL_FOLD 0x2000 /* define fold */ -# define HL_EXTEND 0x4000 /* ignore a keepend */ -# define HL_MATCHCONT 0x8000 /* match continued from previous line */ -# define HL_TRANS_CONT 0x10000 /* transparent item without contains arg */ -# define HL_CONCEAL 0x20000 /* can be concealed */ -# define HL_CONCEALENDS 0x40000 /* can be concealed */ -#endif - -/* Values for 'options' argument in do_search() and searchit() */ -#define SEARCH_REV 0x01 /* go in reverse of previous dir. */ -#define SEARCH_ECHO 0x02 /* echo the search command and handle options */ -#define SEARCH_MSG 0x0c /* give messages (yes, it's not 0x04) */ -#define SEARCH_NFMSG 0x08 /* give all messages except not found */ -#define SEARCH_OPT 0x10 /* interpret optional flags */ -#define SEARCH_HIS 0x20 /* put search pattern in history */ -#define SEARCH_END 0x40 /* put cursor at end of match */ -#define SEARCH_NOOF 0x80 /* don't add offset to position */ -#define SEARCH_START 0x100 /* start search without col offset */ -#define SEARCH_MARK 0x200 /* set previous context mark */ -#define SEARCH_KEEP 0x400 /* keep previous search pattern */ -#define SEARCH_PEEK 0x800 /* peek for typed char, cancel search */ -#define SEARCH_COL 0x1000 /* start at specified column instead of zero */ +# define SST_MIN_ENTRIES 150 // minimal size for state stack array +# define SST_MAX_ENTRIES 1000 // maximal size for state stack array +# define SST_FIX_STATES 7 // size of sst_stack[]. +# define SST_DIST 16 // normal distance between entries +# define SST_INVALID (synstate_T *)-1 // invalid syn_state pointer + +# define HL_CONTAINED 0x01 // not used on toplevel +# define HL_TRANSP 0x02 // has no highlighting +# define HL_ONELINE 0x04 // match within one line only +# define HL_HAS_EOL 0x08 // end pattern that matches with $ +# define HL_SYNC_HERE 0x10 // sync point after this item (syncing only) +# define HL_SYNC_THERE 0x20 // sync point at current line (syncing only) +# define HL_MATCH 0x40 // use match ID instead of item ID +# define HL_SKIPNL 0x80 // nextgroup can skip newlines +# define HL_SKIPWHITE 0x100 // nextgroup can skip white space +# define HL_SKIPEMPTY 0x200 // nextgroup can skip empty lines +# define HL_KEEPEND 0x400 // end match always kept +# define HL_EXCLUDENL 0x800 // exclude NL from match +# define HL_DISPLAY 0x1000 // only used for displaying, not syncing +# define HL_FOLD 0x2000 // define fold +# define HL_EXTEND 0x4000 // ignore a keepend +# define HL_MATCHCONT 0x8000 // match continued from previous line +# define HL_TRANS_CONT 0x10000 // transparent item without contains arg +# define HL_CONCEAL 0x20000 // can be concealed +# define HL_CONCEALENDS 0x40000 // can be concealed +#endif + +// Values for 'options' argument in do_search() and searchit() +#define SEARCH_REV 0x01 // go in reverse of previous dir. +#define SEARCH_ECHO 0x02 // echo the search command and handle options +#define SEARCH_MSG 0x0c // give messages (yes, it's not 0x04) +#define SEARCH_NFMSG 0x08 // give all messages except not found +#define SEARCH_OPT 0x10 // interpret optional flags +#define SEARCH_HIS 0x20 // put search pattern in history +#define SEARCH_END 0x40 // put cursor at end of match +#define SEARCH_NOOF 0x80 // don't add offset to position +#define SEARCH_START 0x100 // start search without col offset +#define SEARCH_MARK 0x200 // set previous context mark +#define SEARCH_KEEP 0x400 // keep previous search pattern +#define SEARCH_PEEK 0x800 // peek for typed char, cancel search +#define SEARCH_COL 0x1000 // start at specified column instead of zero // Values for find_ident_under_cursor() #define FIND_IDENT 1 // find identifier (word) @@ -900,25 +898,25 @@ extern int (*dyn_libintl_wputenv)(const wchar_t *envstring); #define FIND_EVAL 4 // include "->", "[]" and "." #define FIND_NOERROR 8 // no error when no word found -/* Values for file_name_in_line() */ -#define FNAME_MESS 1 /* give error message */ -#define FNAME_EXP 2 /* expand to path */ -#define FNAME_HYP 4 /* check for hypertext link */ -#define FNAME_INCL 8 /* apply 'includeexpr' */ -#define FNAME_REL 16 /* ".." and "./" are relative to the (current) - file instead of the current directory */ -#define FNAME_UNESC 32 /* remove backslashes used for escaping */ - -/* Values for buflist_getfile() */ -#define GETF_SETMARK 0x01 /* set pcmark before jumping */ -#define GETF_ALT 0x02 /* jumping to alternate file (not buf num) */ -#define GETF_SWITCH 0x04 /* respect 'switchbuf' settings when jumping */ - -/* Return values of getfile() */ -#define GETFILE_ERROR 1 /* normal error */ -#define GETFILE_NOT_WRITTEN 2 /* "not written" error */ -#define GETFILE_SAME_FILE 0 /* success, same file */ -#define GETFILE_OPEN_OTHER -1 /* success, opened another file */ +// Values for file_name_in_line() +#define FNAME_MESS 1 // give error message +#define FNAME_EXP 2 // expand to path +#define FNAME_HYP 4 // check for hypertext link +#define FNAME_INCL 8 // apply 'includeexpr' +#define FNAME_REL 16 // ".." and "./" are relative to the (current) + // file instead of the current directory +#define FNAME_UNESC 32 // remove backslashes used for escaping + +// Values for buflist_getfile() +#define GETF_SETMARK 0x01 // set pcmark before jumping +#define GETF_ALT 0x02 // jumping to alternate file (not buf num) +#define GETF_SWITCH 0x04 // respect 'switchbuf' settings when jumping + +// Return values of getfile() +#define GETFILE_ERROR 1 // normal error +#define GETFILE_NOT_WRITTEN 2 // "not written" error +#define GETFILE_SAME_FILE 0 // success, same file +#define GETFILE_OPEN_OTHER -1 // success, opened another file #define GETFILE_UNUSED 8 #define GETFILE_SUCCESS(x) ((x) <= 0) @@ -931,52 +929,52 @@ extern int (*dyn_libintl_wputenv)(const wchar_t *envstring); #define BLN_DUMMY_OK 32 // also find an existing dummy buffer #define BLN_REUSE 64 // may re-use number from buf_reuse -/* Values for in_cinkeys() */ +// Values for in_cinkeys() #define KEY_OPEN_FORW 0x101 #define KEY_OPEN_BACK 0x102 -#define KEY_COMPLETE 0x103 /* end of completion */ - -/* Values for "noremap" argument of ins_typebuf(). Also used for - * map->m_noremap and menu->noremap[]. */ -#define REMAP_YES 0 /* allow remapping */ -#define REMAP_NONE -1 /* no remapping */ -#define REMAP_SCRIPT -2 /* remap script-local mappings only */ -#define REMAP_SKIP -3 /* no remapping for first char */ - -/* Values for mch_call_shell() second argument */ -#define SHELL_FILTER 1 /* filtering text */ -#define SHELL_EXPAND 2 /* expanding wildcards */ -#define SHELL_COOKED 4 /* set term to cooked mode */ -#define SHELL_DOOUT 8 /* redirecting output */ -#define SHELL_SILENT 16 /* don't print error returned by command */ -#define SHELL_READ 32 /* read lines and insert into buffer */ -#define SHELL_WRITE 64 /* write lines from buffer */ - -/* Values returned by mch_nodetype() */ -#define NODE_NORMAL 0 /* file or directory, check with mch_isdir()*/ -#define NODE_WRITABLE 1 /* something we can write to (character - device, fifo, socket, ..) */ -#define NODE_OTHER 2 /* non-writable thing (e.g., block device) */ - -/* Values for readfile() flags */ -#define READ_NEW 0x01 /* read a file into a new buffer */ -#define READ_FILTER 0x02 /* read filter output */ -#define READ_STDIN 0x04 /* read from stdin */ -#define READ_BUFFER 0x08 /* read from curbuf (converting stdin) */ -#define READ_DUMMY 0x10 /* reading into a dummy buffer */ -#define READ_KEEP_UNDO 0x20 /* keep undo info */ -#define READ_FIFO 0x40 /* read from fifo or socket */ - -/* Values for change_indent() */ -#define INDENT_SET 1 /* set indent */ -#define INDENT_INC 2 /* increase indent */ -#define INDENT_DEC 3 /* decrease indent */ - -/* Values for flags argument for findmatchlimit() */ -#define FM_BACKWARD 0x01 /* search backwards */ -#define FM_FORWARD 0x02 /* search forwards */ -#define FM_BLOCKSTOP 0x04 /* stop at start/end of block */ -#define FM_SKIPCOMM 0x08 /* skip comments */ +#define KEY_COMPLETE 0x103 // end of completion + +// Values for "noremap" argument of ins_typebuf(). Also used for +// map->m_noremap and menu->noremap[]. +#define REMAP_YES 0 // allow remapping +#define REMAP_NONE -1 // no remapping +#define REMAP_SCRIPT -2 // remap script-local mappings only +#define REMAP_SKIP -3 // no remapping for first char + +// Values for mch_call_shell() second argument +#define SHELL_FILTER 1 // filtering text +#define SHELL_EXPAND 2 // expanding wildcards +#define SHELL_COOKED 4 // set term to cooked mode +#define SHELL_DOOUT 8 // redirecting output +#define SHELL_SILENT 16 // don't print error returned by command +#define SHELL_READ 32 // read lines and insert into buffer +#define SHELL_WRITE 64 // write lines from buffer + +// Values returned by mch_nodetype() +#define NODE_NORMAL 0 // file or directory, check with mch_isdir() +#define NODE_WRITABLE 1 // something we can write to (character + // device, fifo, socket, ..) +#define NODE_OTHER 2 // non-writable thing (e.g., block device) + +// Values for readfile() flags +#define READ_NEW 0x01 // read a file into a new buffer +#define READ_FILTER 0x02 // read filter output +#define READ_STDIN 0x04 // read from stdin +#define READ_BUFFER 0x08 // read from curbuf (converting stdin) +#define READ_DUMMY 0x10 // reading into a dummy buffer +#define READ_KEEP_UNDO 0x20 // keep undo info +#define READ_FIFO 0x40 // read from fifo or socket + +// Values for change_indent() +#define INDENT_SET 1 // set indent +#define INDENT_INC 2 // increase indent +#define INDENT_DEC 3 // decrease indent + +// Values for flags argument for findmatchlimit() +#define FM_BACKWARD 0x01 // search backwards +#define FM_FORWARD 0x02 // search forwards +#define FM_BLOCKSTOP 0x04 // stop at start/end of block +#define FM_SKIPCOMM 0x08 // skip comments // Values for action argument for do_buffer() and close_buffer() #define DOBUF_GOTO 0 // go to specified buffer @@ -986,115 +984,113 @@ extern int (*dyn_libintl_wputenv)(const wchar_t *envstring); #define DOBUF_WIPE 4 // delete specified buffer(s) really #define DOBUF_WIPE_REUSE 5 // like DOBUF_WIPE an keep number for reuse -/* Values for start argument for do_buffer() */ -#define DOBUF_CURRENT 0 /* "count" buffer from current buffer */ -#define DOBUF_FIRST 1 /* "count" buffer from first buffer */ -#define DOBUF_LAST 2 /* "count" buffer from last buffer */ -#define DOBUF_MOD 3 /* "count" mod. buffer from current buffer */ - -/* Values for sub_cmd and which_pat argument for search_regcomp() */ -/* Also used for which_pat argument for searchit() */ -#define RE_SEARCH 0 /* save/use pat in/from search_pattern */ -#define RE_SUBST 1 /* save/use pat in/from subst_pattern */ -#define RE_BOTH 2 /* save pat in both patterns */ -#define RE_LAST 2 /* use last used pattern if "pat" is NULL */ - -/* Second argument for vim_regcomp(). */ -#define RE_MAGIC 1 /* 'magic' option */ -#define RE_STRING 2 /* match in string instead of buffer text */ -#define RE_STRICT 4 /* don't allow [abc] without ] */ -#define RE_AUTO 8 /* automatic engine selection */ +// Values for start argument for do_buffer() +#define DOBUF_CURRENT 0 // "count" buffer from current buffer +#define DOBUF_FIRST 1 // "count" buffer from first buffer +#define DOBUF_LAST 2 // "count" buffer from last buffer +#define DOBUF_MOD 3 // "count" mod. buffer from current buffer + +// Values for sub_cmd and which_pat argument for search_regcomp() +// Also used for which_pat argument for searchit() +#define RE_SEARCH 0 // save/use pat in/from search_pattern +#define RE_SUBST 1 // save/use pat in/from subst_pattern +#define RE_BOTH 2 // save pat in both patterns +#define RE_LAST 2 // use last used pattern if "pat" is NULL + +// Second argument for vim_regcomp(). +#define RE_MAGIC 1 // 'magic' option +#define RE_STRING 2 // match in string instead of buffer text +#define RE_STRICT 4 // don't allow [abc] without ] +#define RE_AUTO 8 // automatic engine selection #ifdef FEAT_SYN_HL -/* values for reg_do_extmatch */ -# define REX_SET 1 /* to allow \z\(...\), */ -# define REX_USE 2 /* to allow \z\1 et al. */ +// values for reg_do_extmatch +# define REX_SET 1 // to allow \z\(...\), +# define REX_USE 2 // to allow \z\1 et al. # define REX_ALL (REX_SET | REX_USE) #endif -/* Return values for fullpathcmp() */ -/* Note: can use (fullpathcmp() & FPC_SAME) to check for equal files */ -#define FPC_SAME 1 /* both exist and are the same file. */ -#define FPC_DIFF 2 /* both exist and are different files. */ -#define FPC_NOTX 4 /* both don't exist. */ -#define FPC_DIFFX 6 /* one of them doesn't exist. */ -#define FPC_SAMEX 7 /* both don't exist and file names are same. */ - -/* flags for do_ecmd() */ -#define ECMD_HIDE 0x01 /* don't free the current buffer */ -#define ECMD_SET_HELP 0x02 /* set b_help flag of (new) buffer before - opening file */ -#define ECMD_OLDBUF 0x04 /* use existing buffer if it exists */ -#define ECMD_FORCEIT 0x08 /* ! used in Ex command */ -#define ECMD_ADDBUF 0x10 /* don't edit, just add to buffer list */ - -/* for lnum argument in do_ecmd() */ -#define ECMD_LASTL (linenr_T)0 /* use last position in loaded file */ -#define ECMD_LAST (linenr_T)-1 /* use last position in all files */ -#define ECMD_ONE (linenr_T)1 /* use first line */ - -/* flags for do_cmdline() */ -#define DOCMD_VERBOSE 0x01 /* included command in error message */ -#define DOCMD_NOWAIT 0x02 /* don't call wait_return() and friends */ -#define DOCMD_REPEAT 0x04 /* repeat exec. until getline() returns NULL */ -#define DOCMD_KEYTYPED 0x08 /* don't reset KeyTyped */ -#define DOCMD_EXCRESET 0x10 /* reset exception environment (for debugging)*/ -#define DOCMD_KEEPLINE 0x20 /* keep typed line for repeating with "." */ - -/* flags for beginline() */ -#define BL_WHITE 1 /* cursor on first non-white in the line */ -#define BL_SOL 2 /* use 'sol' option */ -#define BL_FIX 4 /* don't leave cursor on a NUL */ - -/* flags for mf_sync() */ -#define MFS_ALL 1 /* also sync blocks with negative numbers */ -#define MFS_STOP 2 /* stop syncing when a character is available */ -#define MFS_FLUSH 4 /* flushed file to disk */ -#define MFS_ZERO 8 /* only write block 0 */ - -/* flags for buf_copy_options() */ -#define BCO_ENTER 1 /* going to enter the buffer */ -#define BCO_ALWAYS 2 /* always copy the options */ -#define BCO_NOHELP 4 /* don't touch the help related options */ - -/* flags for do_put() */ -#define PUT_FIXINDENT 1 /* make indent look nice */ -#define PUT_CURSEND 2 /* leave cursor after end of new text */ -#define PUT_CURSLINE 4 /* leave cursor on last line of new text */ -#define PUT_LINE 8 /* put register as lines */ -#define PUT_LINE_SPLIT 16 /* split line for linewise register */ -#define PUT_LINE_FORWARD 32 /* put linewise register below Visual sel. */ - -/* flags for set_indent() */ -#define SIN_CHANGED 1 /* call changed_bytes() when line changed */ -#define SIN_INSERT 2 /* insert indent before existing text */ -#define SIN_UNDO 4 /* save line for undo before changing it */ - -/* flags for insertchar() */ -#define INSCHAR_FORMAT 1 /* force formatting */ -#define INSCHAR_DO_COM 2 /* format comments */ -#define INSCHAR_CTRLV 4 /* char typed just after CTRL-V */ -#define INSCHAR_NO_FEX 8 /* don't use 'formatexpr' */ -#define INSCHAR_COM_LIST 16 /* format comments with list/2nd line indent */ - -/* flags for open_line() */ -#define OPENLINE_DELSPACES 1 /* delete spaces after cursor */ -#define OPENLINE_DO_COM 2 /* format comments */ -#define OPENLINE_KEEPTRAIL 4 /* keep trailing spaces */ -#define OPENLINE_MARKFIX 8 /* fix mark positions */ -#define OPENLINE_COM_LIST 16 /* format comments with list/2nd line indent */ - -/* - * There are five history tables: - */ -#define HIST_CMD 0 /* colon commands */ -#define HIST_SEARCH 1 /* search commands */ -#define HIST_EXPR 2 /* expressions (from entering = register) */ -#define HIST_INPUT 3 /* input() lines */ -#define HIST_DEBUG 4 /* debug commands */ -#define HIST_COUNT 5 /* number of history tables */ - -/* The type numbers are fixed for backwards compatibility. */ +// Return values for fullpathcmp() +// Note: can use (fullpathcmp() & FPC_SAME) to check for equal files +#define FPC_SAME 1 // both exist and are the same file. +#define FPC_DIFF 2 // both exist and are different files. +#define FPC_NOTX 4 // both don't exist. +#define FPC_DIFFX 6 // one of them doesn't exist. +#define FPC_SAMEX 7 // both don't exist and file names are same. + +// flags for do_ecmd() +#define ECMD_HIDE 0x01 // don't free the current buffer +#define ECMD_SET_HELP 0x02 // set b_help flag of (new) buffer before + // opening file +#define ECMD_OLDBUF 0x04 // use existing buffer if it exists +#define ECMD_FORCEIT 0x08 // ! used in Ex command +#define ECMD_ADDBUF 0x10 // don't edit, just add to buffer list + +// for lnum argument in do_ecmd() +#define ECMD_LASTL (linenr_T)0 // use last position in loaded file +#define ECMD_LAST (linenr_T)-1 // use last position in all files +#define ECMD_ONE (linenr_T)1 // use first line + +// flags for do_cmdline() +#define DOCMD_VERBOSE 0x01 // included command in error message +#define DOCMD_NOWAIT 0x02 // don't call wait_return() and friends +#define DOCMD_REPEAT 0x04 // repeat exec. until getline() returns NULL +#define DOCMD_KEYTYPED 0x08 // don't reset KeyTyped +#define DOCMD_EXCRESET 0x10 // reset exception environment (for debugging) +#define DOCMD_KEEPLINE 0x20 // keep typed line for repeating with "." + +// flags for beginline() +#define BL_WHITE 1 // cursor on first non-white in the line +#define BL_SOL 2 // use 'sol' option +#define BL_FIX 4 // don't leave cursor on a NUL + +// flags for mf_sync() +#define MFS_ALL 1 // also sync blocks with negative numbers +#define MFS_STOP 2 // stop syncing when a character is available +#define MFS_FLUSH 4 // flushed file to disk +#define MFS_ZERO 8 // only write block 0 + +// flags for buf_copy_options() +#define BCO_ENTER 1 // going to enter the buffer +#define BCO_ALWAYS 2 // always copy the options +#define BCO_NOHELP 4 // don't touch the help related options + +// flags for do_put() +#define PUT_FIXINDENT 1 // make indent look nice +#define PUT_CURSEND 2 // leave cursor after end of new text +#define PUT_CURSLINE 4 // leave cursor on last line of new text +#define PUT_LINE 8 // put register as lines +#define PUT_LINE_SPLIT 16 // split line for linewise register +#define PUT_LINE_FORWARD 32 // put linewise register below Visual sel. + +// flags for set_indent() +#define SIN_CHANGED 1 // call changed_bytes() when line changed +#define SIN_INSERT 2 // insert indent before existing text +#define SIN_UNDO 4 // save line for undo before changing it + +// flags for insertchar |