patch 8.1.2366: using old C style comments

Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
This commit is contained in:
Bram Moolenaar
2019-11-30 19:44:38 +01:00
parent 20ebbeac46
commit 9bf703d46a
38 changed files with 1368 additions and 1375 deletions

View File

@ -13,7 +13,7 @@
#ifndef EBCDIC
/* IF_EB(ASCII_constant, EBCDIC_constant) */
// IF_EB(ASCII_constant, EBCDIC_constant)
#define IF_EB(a, b) a
#define CharOrd(x) ((x) < 'a' ? (x) - 'A' : (x) - 'a')
@ -28,7 +28,7 @@
#define NL '\012'
#define NL_STR (char_u *)"\012"
#define FF '\014'
#define CAR '\015' /* CR is used by Mac OS X */
#define CAR '\015' // CR is used by Mac OS X
#define ESC '\033'
#define ESC_STR (char_u *)"\033"
#define ESC_STR_nc "\033"
@ -37,14 +37,14 @@
#define POUND 0xA3
#define Ctrl_chr(x) (TOUPPER_ASC(x) ^ 0x40) /* '?' -> DEL, '@' -> ^@, etc. */
#define Ctrl_chr(x) (TOUPPER_ASC(x) ^ 0x40) // '?' -> DEL, '@' -> ^@, etc.
#define Meta(x) ((x) | 0x80)
#define CTRL_F_STR "\006"
#define CTRL_H_STR "\010"
#define CTRL_V_STR "\026"
#define Ctrl_AT 0 /* @ */
#define Ctrl_AT 0 // @
#define Ctrl_A 1
#define Ctrl_B 2
#define Ctrl_C 3
@ -71,17 +71,17 @@
#define Ctrl_X 24
#define Ctrl_Y 25
#define Ctrl_Z 26
/* CTRL- [ Left Square Bracket == ESC*/
#define Ctrl_BSL 28 /* \ BackSLash */
#define Ctrl_RSB 29 /* ] Right Square Bracket */
#define Ctrl_HAT 30 /* ^ */
// CTRL- [ Left Square Bracket == ESC
#define Ctrl_BSL 28 // \ BackSLash
#define Ctrl_RSB 29 // ] Right Square Bracket
#define Ctrl_HAT 30 // ^
#define Ctrl__ 31
#else
/* EBCDIC */
// EBCDIC
/* IF_EB(ASCII_constant, EBCDIC_constant) */
// IF_EB(ASCII_constant, EBCDIC_constant)
#define IF_EB(a, b) b
/*
@ -120,7 +120,7 @@
#define CTRL_H_STR "\026"
#define CTRL_V_STR "\062"
#define Ctrl_AT 0x00 /* @ */
#define Ctrl_AT 0x00 // @
#define Ctrl_A 0x01
#define Ctrl_B 0x02
#define Ctrl_C 0x03
@ -147,10 +147,10 @@
#define Ctrl_X 0x18
#define Ctrl_Y 0x19
#define Ctrl_Z 0x3F
/* CTRL- [ Left Square Bracket == ESC*/
#define Ctrl_RSB 0x1D /* ] Right Square Bracket */
#define Ctrl_BSL 0x1C /* \ BackSLash */
#define Ctrl_HAT 0x1E /* ^ */
// CTRL- [ Left Square Bracket == ESC
#define Ctrl_RSB 0x1D // ] Right Square Bracket
#define Ctrl_BSL 0x1C // \ BackSLash
#define Ctrl_HAT 0x1E // ^
#define Ctrl__ 0x1F
#define Ctrl_chr(x) (CtrlTable[(x)])
@ -162,14 +162,14 @@ extern char CtrlCharTable[];
#define MetaChar(x) ((x < ' ') ? MetaCharTable[(x)] : 0)
extern char MetaCharTable[];
#endif /* defined EBCDIC */
#endif // defined EBCDIC
/* TODO: EBCDIC Code page dependent (here 1047) */
#define CSI 0x9b /* Control Sequence Introducer */
// TODO: EBCDIC Code page dependent (here 1047)
#define CSI 0x9b // Control Sequence Introducer
#define CSI_STR "\233"
#define DCS 0x90 /* Device Control String */
#define OSC 0x9d /* Operating System Command */
#define STERM 0x9c /* String Terminator */
#define DCS 0x90 // Device Control String
#define OSC 0x9d // Operating System Command
#define STERM 0x9c // String Terminator
/*
* Character that separates dir names in a path.

View File

@ -24,51 +24,51 @@
typedef enum
{
ShS_NEUTRAL, /* nothing showing or pending */
ShS_PENDING, /* data requested from debugger */
ShS_UPDATE_PENDING, /* switching information displayed */
ShS_SHOWING /* the balloon is being displayed */
ShS_NEUTRAL, // nothing showing or pending
ShS_PENDING, // data requested from debugger
ShS_UPDATE_PENDING, // switching information displayed
ShS_SHOWING // the balloon is being displayed
} BeState;
typedef struct BalloonEvalStruct
{
#ifdef FEAT_BEVAL_GUI
# ifdef FEAT_GUI_GTK
GtkWidget *target; /* widget we are monitoring */
GtkWidget *target; // widget we are monitoring
GtkWidget *balloonShell;
GtkWidget *balloonLabel;
unsigned int timerID; /* timer for run */
BeState showState; /* tells us whats currently going on */
unsigned int timerID; // timer for run
BeState showState; // tells us whats currently going on
int x;
int y;
unsigned int state; /* Button/Modifier key state */
unsigned int state; // Button/Modifier key state
# else
# if !defined(FEAT_GUI_MSWIN)
Widget target; /* widget we are monitoring */
Widget target; // widget we are monitoring
Widget balloonShell;
Widget balloonLabel;
XtIntervalId timerID; /* timer for run */
BeState showState; /* tells us whats currently going on */
XtAppContext appContext; /* used in event handler */
XtIntervalId timerID; // timer for run
BeState showState; // tells us whats currently going on
XtAppContext appContext; // used in event handler
Position x;
Position y;
Position x_root;
Position y_root;
int state; /* Button/Modifier key state */
int state; // Button/Modifier key state
# else
HWND target;
HWND balloon;
int x;
int y;
BeState showState; /* tells us whats currently going on */
BeState showState; // tells us whats currently going on
# endif
# endif
# if !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_MSWIN)
Dimension screen_width; /* screen width in pixels */
Dimension screen_height; /* screen height in pixels */
Dimension screen_width; // screen width in pixels
Dimension screen_height; // screen height in pixels
# endif
void (*msgCB)(struct BalloonEvalStruct *, int);
void *clientData; /* For callback */
void *clientData; // For callback
#endif
int ts; // tabstop setting for this buffer
@ -81,11 +81,11 @@ typedef struct BalloonEvalStruct
#endif
} BalloonEval;
#define EVAL_OFFSET_X 15 /* displacement of beval topleft corner from pointer */
#define EVAL_OFFSET_X 15 // displacement of beval topleft corner from pointer
#define EVAL_OFFSET_Y 10
#ifdef FEAT_BEVAL_GUI
# include "gui_beval.pro"
#endif
#endif /* BEVAL__H and FEAT_BEVAL_GUI */
#endif // BEVAL__H and FEAT_BEVAL_GUI

View File

@ -10,7 +10,7 @@
* dosinst.h: Common code for dosinst.c and uninstall.c
*/
/* 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
@ -33,7 +33,7 @@
#endif
#ifdef UNIX_LINT
/* Running lint on Unix: Some things are missing. */
// Running lint on Unix: Some things are missing.
char *searchpath(char *name);
#endif
@ -52,10 +52,10 @@ char *searchpath(char *name);
#define sleep(n) Sleep((n) * 1000)
/* ---------------------------------------- */
// ----------------------------------------
#define BUFSIZE (MAX_PATH*2) /* long enough to hold a file name path */
#define BUFSIZE (MAX_PATH*2) // long enough to hold a file name path
#define NUL 0
#define FAIL 0
@ -81,7 +81,7 @@ char *searchpath(char *name);
#define VIM_STARTMENU "Programs\\Vim " VIM_VERSION_SHORT
int interactive; /* non-zero when running interactively */
int interactive; // non-zero when running interactively
/*
* Call malloc() and exit when out of memory.
@ -116,7 +116,7 @@ myexit(int n)
{
if (!interactive)
{
/* Present a prompt, otherwise error messages can't be read. */
// Present a prompt, otherwise error messages can't be read.
printf("Press Enter to continue\n");
rewind(stdin);
(void)getchar();
@ -152,8 +152,8 @@ searchpath(char *name)
static char widename[2 * BUFSIZE];
static char location[2 * BUFSIZE + 2];
/* There appears to be a bug in FindExecutableA() on Windows NT.
* Use FindExecutableW() instead... */
// There appears to be a bug in FindExecutableA() on Windows NT.
// Use FindExecutableW() instead...
MultiByteToWideChar(CP_ACP, 0, (LPCTSTR)name, -1,
(LPWSTR)widename, BUFSIZE);
if (FindExecutableW((LPCWSTR)widename, (LPCWSTR)"",
@ -206,8 +206,8 @@ get_shell_folder_path(
* The resulting executable worked on Windows 95, Millennium Edition, and
* 2000 Professional. But it was changed after testing...
*/
LPITEMIDLIST pidl = 0; /* Pointer to an Item ID list allocated below */
LPMALLOC pMalloc; /* Pointer to an IMalloc interface */
LPITEMIDLIST pidl = 0; // Pointer to an Item ID list allocated below
LPMALLOC pMalloc; // Pointer to an IMalloc interface
int csidl;
int alt_csidl = -1;
static int desktop_csidl = -1;
@ -234,7 +234,7 @@ get_shell_folder_path(
return FAIL;
}
/* Did this stuff before, use the same ID again. */
// Did this stuff before, use the same ID again.
if (*pcsidl >= 0)
{
csidl = *pcsidl;
@ -242,7 +242,7 @@ get_shell_folder_path(
}
retry:
/* Initialize pointer to IMalloc interface */
// Initialize pointer to IMalloc interface
if (NOERROR != SHGetMalloc(&pMalloc))
{
printf("\nERROR getting interface for shell_folder_name: \"%s\"\n\n",
@ -250,7 +250,7 @@ retry:
return FAIL;
}
/* Get an ITEMIDLIST corresponding to the folder code */
// Get an ITEMIDLIST corresponding to the folder code
if (NOERROR != SHGetSpecialFolderLocation(0, csidl, &pidl))
{
if (alt_csidl < 0 || NOERROR != SHGetSpecialFolderLocation(0,
@ -264,20 +264,20 @@ retry:
alt_csidl = -1;
}
/* Translate that ITEMIDLIST to a string */
// Translate that ITEMIDLIST to a string
r = SHGetPathFromIDList(pidl, shell_folder_path);
/* Free the data associated with pidl */
// Free the data associated with pidl
pMalloc->lpVtbl->Free(pMalloc, pidl);
/* Release the IMalloc interface */
// Release the IMalloc interface
pMalloc->lpVtbl->Release(pMalloc);
if (!r)
{
if (alt_csidl >= 0)
{
/* We probably get here for Windows 95: the "all users"
* desktop/start menu entry doesn't exist. */
// We probably get here for Windows 95: the "all users"
// desktop/start menu entry doesn't exist.
csidl = alt_csidl;
alt_csidl = -1;
goto retry;
@ -287,9 +287,9 @@ retry:
return FAIL;
}
/* If there is an alternative: verify we can write in this directory.
* This should cause a retry when the "all users" directory exists but we
* are a normal user and can't write there. */
// If there is an alternative: verify we can write in this directory.
// This should cause a retry when the "all users" directory exists but we
// are a normal user and can't write there.
if (alt_csidl >= 0)
{
char tbuf[BUFSIZE];
@ -329,16 +329,16 @@ retry:
struct
{
char *name; /* Vim exe name (without .exe) */
char *batname; /* batch file name */
char *lnkname; /* shortcut file name */
char *exename; /* exe file name */
char *exenamearg; /* exe file name when using exearg */
char *exearg; /* argument for vim.exe or gvim.exe */
char *oldbat; /* path to existing xxx.bat or NULL */
char *oldexe; /* path to existing xxx.exe or NULL */
char batpath[BUFSIZE]; /* path of batch file to create; not
created when it's empty */
char *name; // Vim exe name (without .exe)
char *batname; // batch file name
char *lnkname; // shortcut file name
char *exename; // exe file name
char *exenamearg; // exe file name when using exearg
char *exearg; // argument for vim.exe or gvim.exe
char *oldbat; // path to existing xxx.bat or NULL
char *oldexe; // path to existing xxx.exe or NULL
char batpath[BUFSIZE]; // path of batch file to create; not
// created when it's empty
} targets[TARGET_COUNT] =
{
{"all", "batch files"},
@ -382,17 +382,16 @@ run_command(char *cmd)
char cmd_buf[BUFSIZE * 2 + 35];
char *p;
/* On WinNT, 'start' is a shell built-in for cmd.exe rather than an
* executable (start.exe) like in Win9x. */
// On WinNT, 'start' is a shell built-in for cmd.exe rather than an
// executable (start.exe) like in Win9x.
cmd_path = searchpath_save("cmd.exe");
if (cmd_path != NULL)
{
/* There is a cmd.exe, so this might be Windows NT. If it is,
* we need to call cmd.exe explicitly. If it is a later OS,
* calling cmd.exe won't hurt if it is present.
* Also, "start" on NT expects a window title argument.
*/
/* Replace the slashes with backslashes. */
// There is a cmd.exe, so this might be Windows NT. If it is,
// we need to call cmd.exe explicitly. If it is a later OS,
// calling cmd.exe won't hurt if it is present.
// Also, "start" on NT expects a window title argument.
// Replace the slashes with backslashes.
while ((p = strchr(cmd_path, '/')) != NULL)
*p = '\\';
sprintf(cmd_buf, "%s /c start \"vimcmd\" /wait %s", cmd_path, cmd);
@ -400,7 +399,7 @@ run_command(char *cmd)
}
else
{
/* No cmd.exe, just make the call and let the system handle it. */
// No cmd.exe, just make the call and let the system handle it.
sprintf(cmd_buf, "start /w %s", cmd);
}
system(cmd_buf);
@ -422,7 +421,6 @@ add_pathsep(char *name)
/*
* The normal chdir() does not change the default drive. This one does.
*/
/*ARGSUSED*/
int
change_drive(int drive)
{
@ -438,17 +436,17 @@ change_drive(int drive)
int
mch_chdir(char *path)
{
if (path[0] == NUL) /* just checking... */
if (path[0] == NUL) // just checking...
return 0;
if (path[1] == ':') /* has a drive name */
if (path[1] == ':') // has a drive name
{
if (change_drive(mytoupper(path[0]) - 'A' + 1))
return -1; /* invalid drive name */
return -1; // invalid drive name
path += 2;
}
if (*path == NUL) /* drive name only */
if (*path == NUL) // drive name only
return 0;
return chdir(path); /* let the normal chdir() do the rest */
return chdir(path); // let the normal chdir() do the rest
}
/*
@ -457,8 +455,8 @@ mch_chdir(char *path)
static char *
my_fullpath(char *buf, char *fname, int len)
{
/* Only GetModuleFileName() will get the long file name path.
* GetFullPathName() may still use the short (FAT) name. */
// Only GetModuleFileName() will get the long file name path.
// GetFullPathName() may still use the short (FAT) name.
DWORD len_read = GetModuleFileName(NULL, buf, (size_t)len);
return (len_read > 0 && len_read < (DWORD)len) ? buf : NULL;
@ -482,11 +480,11 @@ remove_tail(char *path)
}
char installdir[MAX_PATH-9]; /* top of the installation dir, where the
install.exe is located, E.g.:
"c:\vim\vim60" */
int runtimeidx; /* index in installdir[] where "vim60" starts */
char *sysdrive; /* system drive or "c:\" */
char installdir[MAX_PATH-9]; // top of the installation dir, where the
// install.exe is located, E.g.:
// "c:\vim\vim60"
int runtimeidx; // index in installdir[] where "vim60" starts
char *sysdrive; // system drive or "c:\"
/*
* Setup for using this program.
@ -495,20 +493,20 @@ char *sysdrive; /* system drive or "c:\" */
static void
do_inits(char **argv)
{
/* Find out the full path of our executable. */
// Find out the full path of our executable.
if (my_fullpath(installdir, argv[0], sizeof(installdir)) == NULL)
{
printf("ERROR: Cannot get name of executable\n");
myexit(1);
}
/* remove the tail, the executable name "install.exe" */
// remove the tail, the executable name "install.exe"
remove_tail(installdir);
/* change to the installdir */
// change to the installdir
mch_chdir(installdir);
/* Find the system drive. Only used for searching the Vim executable, not
* very important. */
// Find the system drive. Only used for searching the Vim executable, not
// very important.
sysdrive = getenv("SYSTEMDRIVE");
if (sysdrive == NULL || *sysdrive == NUL)
sysdrive = "C:\\";

View File

@ -46,11 +46,11 @@
*/
#if !defined(FEAT_TINY) && !defined(FEAT_SMALL) && !defined(FEAT_NORMAL) \
&& !defined(FEAT_BIG) && !defined(FEAT_HUGE)
/* #define FEAT_TINY */
/* #define FEAT_SMALL */
/* #define FEAT_NORMAL */
/* #define FEAT_BIG */
/* #define FEAT_HUGE */
// #define FEAT_TINY
// #define FEAT_SMALL
// #define FEAT_NORMAL
// #define FEAT_BIG
// #define FEAT_HUGE
#endif
/*
@ -153,7 +153,7 @@
*/
#ifdef FEAT_NORMAL
# define FEAT_DIGRAPHS
/* #define OLD_DIGRAPHS */
// #define OLD_DIGRAPHS
#endif
/*
@ -174,7 +174,7 @@
#endif
#ifdef FEAT_NORMAL
# define VIM_BACKTICK /* internal backtick expansion */
# define VIM_BACKTICK // internal backtick expansion
#endif
/*
@ -217,7 +217,7 @@
* +find_in_path "[I" ":isearch" "^W^I", ":checkpath", etc.
*/
#ifdef FEAT_NORMAL
# ifdef FEAT_SEARCHPATH /* FEAT_SEARCHPATH is required */
# ifdef FEAT_SEARCHPATH // FEAT_SEARCHPATH is required
# define FEAT_FIND_ID
# endif
#endif
@ -378,7 +378,7 @@
#ifdef FEAT_NORMAL
# define FEAT_STL_OPT
# ifndef FEAT_CMDL_INFO
# define FEAT_CMDL_INFO /* 'ruler' is required for 'statusline' */
# define FEAT_CMDL_INFO // 'ruler' is required for 'statusline'
# endif
#endif
@ -409,8 +409,8 @@
*/
#ifdef FEAT_NORMAL
# define FEAT_VIMINFO
/* #define VIMINFO_FILE "$HOME/foo/.viminfo" */
/* #define VIMINFO_FILE2 "~/bar/.viminfo" */
// #define VIMINFO_FILE "$HOME/foo/.viminfo"
// #define VIMINFO_FILE2 "~/bar/.viminfo"
#endif
/*
@ -454,14 +454,14 @@
* (used only with NO_BUILTIN_TCAPS not defined).
*/
#ifdef HAVE_TGETENT
/* #define NO_BUILTIN_TCAPS */
// #define NO_BUILTIN_TCAPS
#endif
#if !defined(NO_BUILTIN_TCAPS)
# ifdef FEAT_BIG
# define ALL_BUILTIN_TCAPS
# else
# define SOME_BUILTIN_TCAPS /* default */
# define SOME_BUILTIN_TCAPS // default
# endif
#endif
@ -517,10 +517,10 @@
* IME can be used to input chars. Not tested much!
*/
#if defined(FEAT_GUI_MSWIN) && !defined(FEAT_MBYTE_IME)
/* #define FEAT_MBYTE_IME */
// #define FEAT_MBYTE_IME
# endif
/* Use iconv() when it's available. */
// Use iconv() when it's available.
#if (defined(HAVE_ICONV_H) && defined(HAVE_ICONV)) || defined(DYNAMIC_ICONV)
# define USE_ICONV
#endif
@ -531,11 +531,11 @@
* this is for Unix and VMS only.
*/
#ifndef FEAT_XIM
/* #define FEAT_XIM */
// #define FEAT_XIM
#endif
#if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
# define USE_XIM 1 /* needed for GTK include files */
# define USE_XIM 1 // needed for GTK include files
#endif
#if defined(FEAT_XIM)
@ -550,14 +550,14 @@
# if defined(HAVE_X11) && !defined(FEAT_GUI_GTK)
# define FEAT_XFONTSET
# else
/* # define FEAT_XFONTSET */
// # define FEAT_XFONTSET
# endif
#endif
/*
* +libcall libcall() function
*/
/* Using dlopen() also requires dlsym() to be available. */
// Using dlopen() also requires dlsym() to be available.
#if defined(HAVE_DLOPEN) && defined(HAVE_DLSYM)
# define USE_DLOPEN
#endif
@ -593,7 +593,7 @@
# define FEAT_SOUND_CANBERRA
#endif
/* There are two ways to use XPM. */
// There are two ways to use XPM.
#if (defined(HAVE_XM_XPMP_H) && defined(FEAT_GUI_MOTIF)) \
|| defined(HAVE_X11_XPM_H)
# define HAVE_XPM 1
@ -678,7 +678,7 @@
#if !defined(FEAT_GUI_DIALOG) && (defined(FEAT_GUI_MOTIF) \
|| defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK) \
|| defined(FEAT_GUI_MSWIN))
/* need a dialog to show error messages when starting from the desktop */
// need a dialog to show error messages when starting from the desktop
# define FEAT_GUI_DIALOG
#endif
#if defined(FEAT_GUI_DIALOG) && \
@ -698,7 +698,7 @@
# define FEAT_TERMGUICOLORS
#endif
/* Mac specific thing: Codewarrior interface. */
// Mac specific thing: Codewarrior interface.
#ifdef FEAT_GUI_MAC
# define FEAT_CW_EDITOR
#endif
@ -735,12 +735,12 @@
* be set to save the screen when starting Vim and
* restoring it when exiting.
*/
/* #define FEAT_XTERM_SAVE */
// #define FEAT_XTERM_SAVE
/*
* DEBUG Output a lot of debugging garbage.
*/
/* #define DEBUG */
// #define DEBUG
/*
* STARTUPTIME Time the startup process. Writes a file with
@ -755,22 +755,22 @@
/*
* MEM_PROFILE Debugging of memory allocation and freeing.
*/
/* #define MEM_PROFILE */
// #define MEM_PROFILE
/*
* VIMRC_FILE Name of the .vimrc file in current dir.
*/
/* #define VIMRC_FILE ".vimrc" */
// #define VIMRC_FILE ".vimrc"
/*
* EXRC_FILE Name of the .exrc file in current dir.
*/
/* #define EXRC_FILE ".exrc" */
// #define EXRC_FILE ".exrc"
/*
* GVIMRC_FILE Name of the .gvimrc file in current dir.
*/
/* #define GVIMRC_FILE ".gvimrc" */
// #define GVIMRC_FILE ".gvimrc"
/*
* SESSION_FILE Name of the default ":mksession" file.
@ -782,49 +782,49 @@
* USR_VIMRC_FILE2 Name of alternate user .vimrc file.
* USR_VIMRC_FILE3 Name of alternate user .vimrc file.
*/
/* #define USR_VIMRC_FILE "~/foo/.vimrc" */
/* #define USR_VIMRC_FILE2 "~/bar/.vimrc" */
/* #define USR_VIMRC_FILE3 "$VIM/.vimrc" */
// #define USR_VIMRC_FILE "~/foo/.vimrc"
// #define USR_VIMRC_FILE2 "~/bar/.vimrc"
// #define USR_VIMRC_FILE3 "$VIM/.vimrc"
/*
* VIM_DEFAULTS_FILE Name of the defaults.vim script file
*/
/* #define VIM_DEFAULTS_FILE "$VIMRUNTIME/defaults.vim" */
// #define VIM_DEFAULTS_FILE "$VIMRUNTIME/defaults.vim"
/*
* EVIM_FILE Name of the evim.vim script file
*/
/* #define EVIM_FILE "$VIMRUNTIME/evim.vim" */
// #define EVIM_FILE "$VIMRUNTIME/evim.vim"
/*
* USR_EXRC_FILE Name of the user .exrc file.
* USR_EXRC_FILE2 Name of the alternate user .exrc file.
*/
/* #define USR_EXRC_FILE "~/foo/.exrc" */
/* #define USR_EXRC_FILE2 "~/bar/.exrc" */
// #define USR_EXRC_FILE "~/foo/.exrc"
// #define USR_EXRC_FILE2 "~/bar/.exrc"
/*
* USR_GVIMRC_FILE Name of the user .gvimrc file.
* USR_GVIMRC_FILE2 Name of the alternate user .gvimrc file.
*/
/* #define USR_GVIMRC_FILE "~/foo/.gvimrc" */
/* #define USR_GVIMRC_FILE2 "~/bar/.gvimrc" */
/* #define USR_GVIMRC_FILE3 "$VIM/.gvimrc" */
// #define USR_GVIMRC_FILE "~/foo/.gvimrc"
// #define USR_GVIMRC_FILE2 "~/bar/.gvimrc"
// #define USR_GVIMRC_FILE3 "$VIM/.gvimrc"
/*
* SYS_VIMRC_FILE Name of the system-wide .vimrc file.
*/
/* #define SYS_VIMRC_FILE "/etc/vimrc" */
// #define SYS_VIMRC_FILE "/etc/vimrc"
/*
* SYS_GVIMRC_FILE Name of the system-wide .gvimrc file.
*/
/* #define SYS_GVIMRC_FILE "/etc/gvimrc" */
// #define SYS_GVIMRC_FILE "/etc/gvimrc"
/*
* DFLT_HELPFILE Name of the help file.
*/
/* # define DFLT_HELPFILE "$VIMRUNTIME/doc/help.txt.gz" */
// # define DFLT_HELPFILE "$VIMRUNTIME/doc/help.txt.gz"
/*
* File names for:
@ -835,17 +835,17 @@
* FTPLUGOF_FILE switch off loading settings files
* INDOFF_FILE switch off loading indent files
*/
/* # define FILETYPE_FILE "filetype.vim" */
/* # define FTPLUGIN_FILE "ftplugin.vim" */
/* # define INDENT_FILE "indent.vim" */
/* # define FTOFF_FILE "ftoff.vim" */
/* # define FTPLUGOF_FILE "ftplugof.vim" */
/* # define INDOFF_FILE "indoff.vim" */
// # define FILETYPE_FILE "filetype.vim"
// # define FTPLUGIN_FILE "ftplugin.vim"
// # define INDENT_FILE "indent.vim"
// # define FTOFF_FILE "ftoff.vim"
// # define FTPLUGOF_FILE "ftplugof.vim"
// # define INDOFF_FILE "indoff.vim"
/*
* SYS_MENU_FILE Name of the default menu.vim file.
*/
/* # define SYS_MENU_FILE "$VIMRUNTIME/menu.vim" */
// # define SYS_MENU_FILE "$VIMRUNTIME/menu.vim"
/*
* SYS_OPTWIN_FILE Name of the default optwin.vim file.
@ -857,7 +857,7 @@
/*
* SYNTAX_FNAME Name of a syntax file, where %s is the syntax name.
*/
/* #define SYNTAX_FNAME "/foo/%s.vim" */
// #define SYNTAX_FNAME "/foo/%s.vim"
/*
* RUNTIME_DIRNAME Generic name for the directory of the runtime files.
@ -873,7 +873,7 @@
* string concatenation.
* Also set by "--with-global-runtime" configure argument.
*/
/* #define RUNTIME_GLOBAL "/etc/vim" */
// #define RUNTIME_GLOBAL "/etc/vim"
/*
* RUNTIME_GLOBAL_AFTER Comma-separated list of directory names for global Vim
@ -882,14 +882,14 @@
* string concatenation.
* Also set by "--with-global-runtime" configure argument.
*/
/* #define RUNTIME_GLOBAL_AFTER "/etc/vim/after" */
// #define RUNTIME_GLOBAL_AFTER "/etc/vim/after"
/*
* MODIFIED_BY Name of who modified Vim. Required when distributing
* a modified version of Vim.
* Also from the "--with-modified-by" configure argument.
*/
/* #define MODIFIED_BY "John Doe" */
// #define MODIFIED_BY "John Doe"
/*
* Machine dependent:
@ -901,7 +901,7 @@
* +system Use system() instead of fork/exec for starting a
* shell. Doesn't work for the GUI!
*/
/* #define USE_SYSTEM */
// #define USE_SYSTEM
/*
* +X11 Unix only. Include code for xterm title saving and X
@ -944,7 +944,7 @@
* Always included, since either FEAT_MOUSE_XTERM or
* DOS_MOUSE is defined.
*/
/* OS/2 and Amiga console have no mouse support */
// OS/2 and Amiga console have no mouse support
#if defined(UNIX) || defined(VMS)
# define FEAT_MOUSE_XTERM
# ifdef FEAT_BIG
@ -1017,7 +1017,7 @@
#endif
#if defined(FEAT_GUI_MSWIN) && defined(FEAT_SMALL)
# define MSWIN_FIND_REPLACE /* include code for find/replace dialog */
# define MSWIN_FIND_REPLACE // include code for find/replace dialog
# define MSWIN_FR_BUFSIZE 256
#endif
@ -1040,11 +1040,11 @@
*/
#if defined(FEAT_CLIENTSERVER) && !defined(FEAT_AUTOSERVERNAME)
# ifdef MSWIN
/* Always enabled on MS-Windows. */
// Always enabled on MS-Windows.
# define FEAT_AUTOSERVERNAME
# else
/* Enable here if you don't use configure. */
/* # define FEAT_AUTOSERVERNAME */
// Enable here if you don't use configure.
// # define FEAT_AUTOSERVERNAME
# endif
#endif
@ -1073,8 +1073,8 @@
# endif
#endif
/* GUI and some consoles can change the shape of the cursor. The code is also
* needed for the 'mouseshape' and 'concealcursor' options. */
// GUI and some consoles can change the shape of the cursor. The code is also
// needed for the 'mouseshape' and 'concealcursor' options.
#if defined(FEAT_GUI) \
|| defined(MCH_CURSOR_SHAPE) \
|| defined(FEAT_MOUSESHAPE) \
@ -1195,7 +1195,7 @@
#endif
#if defined(FEAT_BEVAL_GUI) && (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA))
# define FEAT_BEVAL_TIP /* balloon eval used for toolbar tooltip */
# define FEAT_BEVAL_TIP // balloon eval used for toolbar tooltip
#endif
/*
@ -1211,7 +1211,7 @@
# define FEAT_BEVAL
#endif
/* both Motif and Athena are X11 and share some code */
// both Motif and Athena are X11 and share some code
#if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)
# define FEAT_GUI_X11
#endif

View File

@ -12,7 +12,7 @@
# ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
# endif
void global_ime_init(ATOM, HWND);
void global_ime_end(void);
LRESULT WINAPI global_ime_DefWindowProc(HWND, UINT, WPARAM, LPARAM);
@ -27,7 +27,7 @@ extern "C" {
int WINAPI global_ime_get_status(void);
# ifdef __cplusplus
}
#endif /* __cplusplus */
# endif
#endif /* _INC_GLOBAL_IME */
#endif /* GLOBAL_IME */
# endif // _INC_GLOBAL_IME
#endif // GLOBAL_IME

View File

@ -853,9 +853,9 @@ EXTERN pos_T saved_cursor // w_cursor before formatting text.
EXTERN pos_T Insstart; // This is where the latest
// insert/append mode started.
/* This is where the latest insert/append mode started. In contrast to
* Insstart, this won't be reset by certain keys and is needed for
* op_insert(), to detect correctly where inserting by the user started. */
// This is where the latest insert/append mode started. In contrast to
// Insstart, this won't be reset by certain keys and is needed for
// op_insert(), to detect correctly where inserting by the user started.
EXTERN pos_T Insstart_orig;
/*
@ -865,7 +865,7 @@ EXTERN int orig_line_count INIT(= 0); // Line count when "gR" started
EXTERN int vr_lines_changed INIT(= 0); // #Lines changed by "gR" so far
#if defined(FEAT_X11) && defined(FEAT_XCLIPBOARD)
/* argument to SETJMP() for handling X IO errors */
// argument to SETJMP() for handling X IO errors
EXTERN JMP_BUF x_jump_env;
#endif
@ -1404,7 +1404,7 @@ EXTERN int term_is_xterm INIT(= FALSE); // xterm-like 'term'
#ifdef BACKSLASH_IN_FILENAME
EXTERN char psepc INIT(= '\\'); // normal path separator character
EXTERN char psepcN INIT(= '/'); // abnormal path separator character
/* normal path separator string */
// normal path separator string
EXTERN char pseps[2] INIT(= {'\\' COMMA 0});
#endif

407
src/gui.h
View File

@ -17,7 +17,7 @@
#endif
#ifdef FEAT_GUI_GTK
# ifdef VMS /* undef MIN and MAX because Intrinsic.h redefines them anyway */
# ifdef VMS // undef MIN and MAX because Intrinsic.h redefines them anyway
# ifdef MAX
# undef MAX
# endif
@ -113,48 +113,48 @@
# define Y_2_ROW(y) (((y) - gui.border_offset) / gui.char_height)
#endif
/* Indices for arrays of scrollbars */
// Indices for arrays of scrollbars
#define SBAR_NONE -1
#define SBAR_LEFT 0
#define SBAR_RIGHT 1
#define SBAR_BOTTOM 2
/* Orientations for scrollbars */
// Orientations for scrollbars
#define SBAR_VERT 0
#define SBAR_HORIZ 1
/* Default size of scrollbar */
// Default size of scrollbar
#define SB_DEFAULT_WIDTH 16
/* Default height of the menu bar */
#define MENU_DEFAULT_HEIGHT 1 /* figure it out at runtime */
// Default height of the menu bar
#define MENU_DEFAULT_HEIGHT 1 // figure it out at runtime
/* Flags for gui_mch_outstr_nowrap() */
#define GUI_MON_WRAP_CURSOR 0x01 /* wrap cursor at end of line */
#define GUI_MON_INVERT 0x02 /* invert the characters */
#define GUI_MON_IS_CURSOR 0x04 /* drawing cursor */
#define GUI_MON_TRS_CURSOR 0x08 /* drawing transparent cursor */
#define GUI_MON_NOCLEAR 0x10 /* don't clear selection */
// Flags for gui_mch_outstr_nowrap()
#define GUI_MON_WRAP_CURSOR 0x01 // wrap cursor at end of line
#define GUI_MON_INVERT 0x02 // invert the characters
#define GUI_MON_IS_CURSOR 0x04 // drawing cursor
#define GUI_MON_TRS_CURSOR 0x08 // drawing transparent cursor
#define GUI_MON_NOCLEAR 0x10 // don't clear selection
/* Flags for gui_mch_draw_string() */
#define DRAW_TRANSP 0x01 /* draw with transparent bg */
#define DRAW_BOLD 0x02 /* draw bold text */
#define DRAW_UNDERL 0x04 /* draw underline text */
#define DRAW_UNDERC 0x08 /* draw undercurl text */
// Flags for gui_mch_draw_string()
#define DRAW_TRANSP 0x01 // draw with transparent bg
#define DRAW_BOLD 0x02 // draw bold text
#define DRAW_UNDERL 0x04 // draw underline text
#define DRAW_UNDERC 0x08 // draw undercurl text
#if defined(FEAT_GUI_GTK)
# define DRAW_ITALIC 0x10 /* draw italic text */
# define DRAW_ITALIC 0x10 // draw italic text
#endif
#define DRAW_CURSOR 0x20 /* drawing block cursor (win32) */
#define DRAW_STRIKE 0x40 /* strikethrough */
#define DRAW_CURSOR 0x20 // drawing block cursor (win32)
#define DRAW_STRIKE 0x40 // strikethrough
/* For our own tearoff menu item */
// For our own tearoff menu item
#define TEAR_STRING "-->Detach"
#define TEAR_LEN (9) /* length of above string */
#define TEAR_LEN (9) // length of above string
/* for the toolbar */
// for the toolbar
#define TOOLBAR_BUTTON_HEIGHT 18
#define TOOLBAR_BUTTON_WIDTH 18
#define TOOLBAR_BORDER_HEIGHT 12 /* room above+below buttons for MSWindows */
#define TOOLBAR_BORDER_HEIGHT 12 // room above+below buttons for MSWindows
#ifdef FEAT_GUI_MSWIN
# define TABLINE_HEIGHT 22
@ -164,62 +164,62 @@
#endif
#if defined(NO_CONSOLE) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11)
# define NO_CONSOLE_INPUT /* use no_console_input() to check if there
is no console input possible */
# define NO_CONSOLE_INPUT // use no_console_input() to check if there
// is no console input possible
#endif
typedef struct GuiScrollbar
{
long ident; /* Unique identifier for each scrollbar */
win_T *wp; /* Scrollbar's window, NULL for bottom */
int type; /* one of SBAR_{LEFT,RIGHT,BOTTOM} */
long value; /* Represents top line number visible */
long ident; // Unique identifier for each scrollbar
win_T *wp; // Scrollbar's window, NULL for bottom
int type; // one of SBAR_{LEFT,RIGHT,BOTTOM}
long value; // Represents top line number visible
#ifdef FEAT_GUI_ATHENA
int pixval; /* pixel count of value */
int pixval; // pixel count of value
#endif
long size; /* Size of scrollbar thumb */
long max; /* Number of lines in buffer */
long size; // Size of scrollbar thumb
long max; // Number of lines in buffer
/* Values measured in characters: */
int top; /* Top of scroll bar (chars from row 0) */
int height; /* Current height of scroll bar in rows */
int width; /* Current width of scroll bar in cols */
int status_height; /* Height of status line */
// Values measured in characters:
int top; // Top of scroll bar (chars from row 0)
int height; // Current height of scroll bar in rows
int width; // Current width of scroll bar in cols
int status_height; // Height of status line
#ifdef FEAT_GUI_X11
Widget id; /* Id of real scroll bar */
Widget id; // Id of real scroll bar
#endif
#ifdef FEAT_GUI_GTK
GtkWidget *id; /* Id of real scroll bar */
unsigned long handler_id; /* Id of "value_changed" signal handler */
GtkWidget *id; // Id of real scroll bar
unsigned long handler_id; // Id of "value_changed" signal handler
#endif
#ifdef FEAT_GUI_MSWIN
HWND id; /* Id of real scroll bar */
int scroll_shift; /* The scrollbar stuff can handle only up to
32767 lines. When the file is longer,
scroll_shift is set to the number of shifts
to reduce the count. */
HWND id; // Id of real scroll bar
int scroll_shift; // The scrollbar stuff can handle only up to
// 32767 lines. When the file is longer,
// scroll_shift is set to the number of shifts
// to reduce the count.
#endif
#ifdef FEAT_GUI_MAC
ControlHandle id; /* A handle to the scrollbar */
ControlHandle id; // A handle to the scrollbar
#endif
#ifdef FEAT_GUI_PHOTON
PtWidget_t *id;
#endif
} scrollbar_T;
typedef long guicolor_T; /* handle for a GUI color; for X11 this should
be "Pixel", but that's an unsigned and we
need a signed value */
#define INVALCOLOR (guicolor_T)-11111 /* number for invalid color; on 32 bit
displays there is a tiny chance this is an
actual color */
#define CTERMCOLOR (guicolor_T)-11110 /* only used for cterm.bg_rgb and
cterm.fg_rgb: use cterm color */
typedef long guicolor_T; // handle for a GUI color; for X11 this should
// be "Pixel", but that's an unsigned and we
// need a signed value
#define INVALCOLOR (guicolor_T)-11111 // number for invalid color; on 32 bit
// displays there is a tiny chance this is an
// actual color
#define CTERMCOLOR (guicolor_T)-11110 // only used for cterm.bg_rgb and
// cterm.fg_rgb: use cterm color
#ifdef FEAT_GUI_GTK
typedef PangoFontDescription *GuiFont; /* handle for a GUI font */
typedef PangoFontDescription *GuiFontset; /* handle for a GUI fontset */
typedef PangoFontDescription *GuiFont; // handle for a GUI font
typedef PangoFontDescription *GuiFontset; // handle for a GUI fontset
# define NOFONT (GuiFont)NULL
# define NOFONTSET (GuiFontset)NULL
#else
@ -230,13 +230,13 @@ typedef long guicolor_T; /* handle for a GUI color; for X11 this should
# define NOFONTSET (GuiFontset)NULL
# else
# ifdef FEAT_GUI_X11
typedef XFontStruct *GuiFont; /* handle for a GUI font */
typedef XFontSet GuiFontset; /* handle for a GUI fontset */
typedef XFontStruct *GuiFont; // handle for a GUI font
typedef XFontSet GuiFontset; // handle for a GUI fontset
# define NOFONT (GuiFont)0
# define NOFONTSET (GuiFontset)0
# else
typedef long_u GuiFont; /* handle for a GUI font */
typedef long_u GuiFontset; /* handle for a GUI fontset */
typedef long_u GuiFont; // handle for a GUI font
typedef long_u GuiFontset; // handle for a GUI fontset
# define NOFONT (GuiFont)0
# define NOFONTSET (GuiFontset)0
# endif
@ -255,174 +255,174 @@ typedef long guicolor_T; /* handle for a GUI color; for X11 this should
typedef struct Gui
{
int in_focus; /* Vim has input focus */
int in_use; /* Is the GUI being used? */
int starting; /* GUI will start in a little while */
int shell_created; /* Has the shell been created yet? */
int dying; /* Is vim dying? Then output to terminal */
int dofork; /* Use fork() when GUI is starting */
int in_focus; // Vim has input focus
int in_use; // Is the GUI being used?
int starting; // GUI will start in a little while
int shell_created; // Has the shell been created yet?
int dying; // Is vim dying? Then output to terminal
int dofork; // Use fork() when GUI is starting
#ifdef GUI_MAY_SPAWN
int dospawn; /* Use spawn() when GUI is starting */
int dospawn; // Use spawn() when GUI is starting
#endif
int dragged_sb; /* Which scrollbar being dragged, if any? */
win_T *dragged_wp; /* Which WIN's sb being dragged, if any? */
int pointer_hidden; /* Is the mouse pointer hidden? */
int col; /* Current cursor column in GUI display */
int row; /* Current cursor row in GUI display */
int cursor_col; /* Physical cursor column in GUI display */
int cursor_row; /* Physical cursor row in GUI display */
char cursor_is_valid; /* There is a cursor at cursor_row/col */
int num_cols; /* Number of columns */
int num_rows; /* Number of rows */
int scroll_region_top; /* Top (first) line of scroll region */
int scroll_region_bot; /* Bottom (last) line of scroll region */
int scroll_region_left; /* Left (first) column of scroll region */
int scroll_region_right; /* Right (last) col. of scroll region */
int highlight_mask; /* Highlight attribute mask */
int scrollbar_width; /* Width of vertical scrollbars */
int scrollbar_height; /* Height of horizontal scrollbar */
int left_sbar_x; /* Calculated x coord for left scrollbar */
int right_sbar_x; /* Calculated x coord for right scrollbar */
int dragged_sb; // Which scrollbar being dragged, if any?
win_T *dragged_wp; // Which WIN's sb being dragged, if any?
int pointer_hidden; // Is the mouse pointer hidden?
int col; // Current cursor column in GUI display
int row; // Current cursor row in GUI display
int cursor_col; // Physical cursor column in GUI display
int cursor_row; // Physical cursor row in GUI display
char cursor_is_valid; // There is a cursor at cursor_row/col
int num_cols; // Number of columns
int num_rows; // Number of rows
int scroll_region_top; // Top (first) line of scroll region
int scroll_region_bot; // Bottom (last) line of scroll region
int scroll_region_left; // Left (first) column of scroll region
int scroll_region_right; // Right (last) col. of scroll region
int highlight_mask; // Highlight attribute mask
int scrollbar_width; // Width of vertical scrollbars
int scrollbar_height; // Height of horizontal scrollbar
int left_sbar_x; // Calculated x coord for left scrollbar
int right_sbar_x; // Calculated x coord for right scrollbar
#ifdef FEAT_MENU
# ifndef FEAT_GUI_GTK
int menu_height; /* Height of the menu bar */
int menu_width; /* Width of the menu bar */
int menu_height; // Height of the menu bar
int menu_width; // Width of the menu bar
# endif
char menu_is_active; /* TRUE if menu is present */
char menu_is_active; // TRUE if menu is present
# ifdef FEAT_GUI_ATHENA
char menu_height_fixed; /* TRUE if menu height fixed */
char menu_height_fixed; // TRUE if menu height fixed
# endif
#endif
scrollbar_T bottom_sbar; /* Bottom scrollbar */
int which_scrollbars[3];/* Which scrollbar boxes are active? */
int prev_wrap; /* For updating the horizontal scrollbar */
int char_width; /* Width of char cell in pixels */
int char_height; /* Height of char cell in pixels, includes
'linespace' */
int char_ascent; /* Ascent of char in pixels */
int border_width; /* Width of our border around text area */
int border_offset; /* Total pixel offset for all borders */
scrollbar_T bottom_sbar; // Bottom scrollbar
int which_scrollbars[3];// Which scrollbar boxes are active?
int prev_wrap; // For updating the horizontal scrollbar
int char_width; // Width of char cell in pixels
int char_height; // Height of char cell in pixels, includes
// 'linespace'
int char_ascent; // Ascent of char in pixels
int border_width; // Width of our border around text area
int border_offset; // Total pixel offset for all borders
GuiFont norm_font; /* Normal font */
GuiFont norm_font; // Normal font
#ifndef FEAT_GUI_GTK
GuiFont bold_font; /* Bold font */
GuiFont ital_font; /* Italic font */
GuiFont boldital_font; /* Bold-Italic font */
GuiFont bold_font; // Bold font
GuiFont ital_font; // Italic font
GuiFont boldital_font; // Bold-Italic font
#else
int font_can_bold; /* Whether norm_font supports bold weight.
* The styled font variants are not used. */
int font_can_bold; // Whether norm_font supports bold weight.
// The styled font variants are not used.
#endif
#if defined(FEAT_MENU) && !defined(FEAT_GUI_GTK)
# ifdef FONTSET_ALWAYS
GuiFontset menu_fontset; /* set of fonts for multi-byte chars */
GuiFontset menu_fontset; // set of fonts for multi-byte chars
# else
GuiFont menu_font; /* menu item font */
GuiFont menu_font; // menu item font
# endif
#endif
GuiFont wide_font; /* Normal 'guifontwide' font */
GuiFont wide_font; // Normal 'guifontwide' font
#ifndef FEAT_GUI_GTK
GuiFont wide_bold_font; /* Bold 'guifontwide' font */
GuiFont wide_ital_font; /* Italic 'guifontwide' font */
GuiFont wide_boldital_font; /* Bold-Italic 'guifontwide' font */
GuiFont wide_bold_font; // Bold 'guifontwide' font
GuiFont wide_ital_font; // Italic 'guifontwide' font
GuiFont wide_boldital_font; // Bold-Italic 'guifontwide' font
#endif
#ifdef FEAT_XFONTSET
GuiFontset fontset; /* set of fonts for multi-byte chars */
GuiFontset fontset; // set of fonts for multi-byte chars
#endif
guicolor_T back_pixel; /* Color of background */
guicolor_T norm_pixel; /* Color of normal text */
guicolor_T def_back_pixel; /* default Color of background */
guicolor_T def_norm_pixel; /* default Color of normal text */
guicolor_T back_pixel; // Color of background
guicolor_T norm_pixel; // Color of normal text
guicolor_T def_back_pixel; // default Color of background
guicolor_T def_norm_pixel; // default Color of normal text
#ifdef FEAT_GUI_X11
char *rsrc_menu_fg_name; /* Color of menu & dialog foreground */
guicolor_T menu_fg_pixel; /* Same in Pixel format */
char *rsrc_menu_bg_name; /* Color of menu & dialog background */
guicolor_T menu_bg_pixel; /* Same in Pixel format */
char *rsrc_scroll_fg_name; /* Color of scrollbar foreground */
guicolor_T scroll_fg_pixel; /* Same in Pixel format */
char *rsrc_scroll_bg_name; /* Color of scrollbar background */
guicolor_T scroll_bg_pixel; /* Same in Pixel format */
char *rsrc_menu_fg_name; // Color of menu & dialog foreground
guicolor_T menu_fg_pixel; // Same in Pixel format
char *rsrc_menu_bg_name; // Color of menu & dialog background
guicolor_T menu_bg_pixel; // Same in Pixel format
char *rsrc_scroll_fg_name; // Color of scrollbar foreground
guicolor_T scroll_fg_pixel; // Same in Pixel format
char *rsrc_scroll_bg_name; // Color of scrollbar background
guicolor_T scroll_bg_pixel; // Same in Pixel format
# ifdef FEAT_GUI_MOTIF
guicolor_T menu_def_fg_pixel; /* Default menu foreground */
guicolor_T menu_def_bg_pixel; /* Default menu background */
guicolor_T scroll_def_fg_pixel; /* Default scrollbar foreground */
guicolor_T scroll_def_bg_pixel; /* Default scrollbar background */
guicolor_T menu_def_fg_pixel; // Default menu foreground
guicolor_T menu_def_bg_pixel; // Default menu background
guicolor_T scroll_def_fg_pixel; // Default scrollbar foreground
guicolor_T scroll_def_bg_pixel; // Default scrollbar background
# endif
Display *dpy; /* X display */
Window wid; /* Window id of text area */
int visibility; /* Is shell partially/fully obscured? */
Display *dpy; // X display
Window wid; // Window id of text area
int visibility; // Is shell partially/fully obscured?
GC text_gc;
GC back_gc;
GC invert_gc;
Cursor blank_pointer; /* Blank pointer */
Cursor blank_pointer; // Blank pointer
/* X Resources */
char_u *rsrc_font_name; /* Resource font name, used if 'guifont'
not set */
char_u *rsrc_bold_font_name; /* Resource bold font name */
char_u *rsrc_ital_font_name; /* Resource italic font name */
char_u *rsrc_boldital_font_name; /* Resource bold-italic font name */
char_u *rsrc_menu_font_name; /* Resource menu Font name */
Bool rsrc_rev_video; /* Use reverse video? */
// X Resources
char_u *rsrc_font_name; // Resource font name, used if 'guifont'
// not set
char_u *rsrc_bold_font_name; // Resource bold font name
char_u *rsrc_ital_font_name; // Resource italic font name
char_u *rsrc_boldital_font_name; // Resource bold-italic font name
char_u *rsrc_menu_font_name; // Resource menu Font name
Bool rsrc_rev_video; // Use reverse video?
char_u *geom; /* Geometry, eg "80x24" */
Bool color_approx; /* Some color was approximated */
char_u *geom; // Geometry, eg "80x24"
Bool color_approx; // Some color was approximated
#endif
#ifdef FEAT_GUI_GTK
# ifndef USE_GTK3
int visibility; /* Is shell partially/fully obscured? */
int visibility; // Is shell partially/fully obscured?
# endif
GdkCursor *blank_pointer; /* Blank pointer */
GdkCursor *blank_pointer; // Blank pointer
/* X Resources */
char_u *geom; /* Geometry, eg "80x24" */
// X Resources
char_u *geom; // Geometry, eg "80x24"
GtkWidget *mainwin; /* top level GTK window */
GtkWidget *formwin; /* manages all the windows below */
GtkWidget *drawarea; /* the "text" area */
GtkWidget *mainwin; // top level GTK window
GtkWidget *formwin; // manages all the windows below
GtkWidget *drawarea; // the "text" area
# ifdef FEAT_MENU
GtkWidget *menubar; /* menubar */
GtkWidget *menubar; // menubar
# endif
# ifdef FEAT_TOOLBAR
GtkWidget *toolbar; /* toolbar */
GtkWidget *toolbar; // toolbar
# endif
# ifdef FEAT_GUI_GNOME
GtkWidget *menubar_h; /* menubar handle */
GtkWidget *toolbar_h; /* toolbar handle */
GtkWidget *menubar_h; // menubar handle
GtkWidget *toolbar_h; // toolbar handle
# endif
# ifdef USE_GTK3
GdkRGBA *fgcolor; /* GDK-styled foreground color */
GdkRGBA *bgcolor; /* GDK-styled background color */
GdkRGBA *spcolor; /* GDK-styled special color */
GdkRGBA *fgcolor; // GDK-styled foreground color
GdkRGBA *bgcolor; // GDK-styled background color
GdkRGBA *spcolor; // GDK-styled special color
# else
GdkColor *fgcolor; /* GDK-styled foreground color */
GdkColor *bgcolor; /* GDK-styled background color */
GdkColor *spcolor; /* GDK-styled special color */
GdkColor *fgcolor; // GDK-styled foreground color
GdkColor *bgcolor; // GDK-styled background color
GdkColor *spcolor; // GDK-styled special color
# endif
# ifdef USE_GTK3
cairo_surface_t *surface; /* drawarea surface */
gboolean by_signal; /* cause of draw operation */
cairo_surface_t *surface; // drawarea surface
gboolean by_signal; // cause of draw operation
# else
GdkGC *text_gc; /* cached GC for normal text */
GdkGC *text_gc; // cached GC for normal text
# endif
PangoContext *text_context; /* the context used for all text */
PangoFont *ascii_font; /* cached font for ASCII strings */
PangoGlyphString *ascii_glyphs; /* cached code point -> glyph map */
PangoContext *text_context; // the context used for all text
PangoFont *ascii_font; // cached font for ASCII strings
PangoGlyphString *ascii_glyphs; // cached code point -> glyph map
# ifdef FEAT_GUI_TABLINE
GtkWidget *tabline; /* tab pages line handle */
GtkWidget *tabline; // tab pages line handle
# endif
GtkAccelGroup *accel_group;
GtkWidget *filedlg; /* file selection dialog */
char_u *browse_fname; /* file name from filedlg */
GtkWidget *filedlg; // file selection dialog
char_u *browse_fname; // file name from filedlg
guint32 event_time;
#endif /* FEAT_GUI_GTK */
#endif // FEAT_GUI_GTK
#if defined(FEAT_GUI_TABLINE) \
&& (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) \
@ -431,43 +431,43 @@ typedef struct Gui
#endif
#ifdef FEAT_FOOTER
int footer_height; /* height of the message footer */
int footer_height; // height of the message footer
#endif
#if defined(FEAT_TOOLBAR) \
&& (defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_MOTIF))
int toolbar_height; /* height of the toolbar */
int toolbar_height; // height of the toolbar
#endif
#ifdef FEAT_BEVAL_TIP
/* Tooltip properties; also used for balloon evaluation */
char_u *rsrc_tooltip_font_name; /* tooltip font name */
char *rsrc_tooltip_fg_name; /* tooltip foreground color name */
char *rsrc_tooltip_bg_name; /* tooltip background color name */
guicolor_T tooltip_fg_pixel; /* tooltip foreground color */
guicolor_T tooltip_bg_pixel; /* tooltip background color */
XFontSet tooltip_fontset; /* tooltip fontset */
// Tooltip properties; also used for balloon evaluation
char_u *rsrc_tooltip_font_name; // tooltip font name
char *rsrc_tooltip_fg_name; // tooltip foreground color name
char *rsrc_tooltip_bg_name; // tooltip background color name
guicolor_T tooltip_fg_pixel; // tooltip foreground color
guicolor_T tooltip_bg_pixel; // tooltip background color
XFontSet tooltip_fontset; // tooltip fontset
#endif
#ifdef FEAT_GUI_MSWIN
GuiFont currFont; /* Current font */
guicolor_T currFgColor; /* Current foreground text color */
guicolor_T currBgColor; /* Current background text color */
guicolor_T currSpColor; /* Current special text color */
GuiFont currFont; // Current font
guicolor_T currFgColor; // Current foreground text color
guicolor_T currBgColor; // Current background text color
guicolor_T currSpColor; // Current special text color
#endif
#ifdef FEAT_GUI_MAC
WindowPtr VimWindow;
MenuHandle MacOSHelpMenu; /* Help menu provided by the MacOS */
int MacOSHelpItems; /* Nr of help-items supplied by MacOS */
WindowPtr wid; /* Window id of text area */
int visibility; /* Is window partially/fully obscured? */
MenuHandle MacOSHelpMenu; // Help menu provided by the MacOS
int MacOSHelpItems; // Nr of help-items supplied by MacOS
WindowPtr wid; // Window id of text area
int visibility; // Is window partially/fully obscured?
#endif
#ifdef FEAT_GUI_PHOTON
PtWidget_t *vimWindow; /* PtWindow */
PtWidget_t *vimTextArea; /* PtRaw */
PtWidget_t *vimContainer; /* PtPanel */
PtWidget_t *vimWindow; // PtWindow
PtWidget_t *vimTextArea; // PtRaw
PtWidget_t *vimContainer; // PtPanel
# if defined(FEAT_MENU) || defined(FEAT_TOOLBAR)
PtWidget_t *vimToolBarGroup;
# endif
@ -487,10 +487,9 @@ typedef struct Gui
#endif
} gui_T;
extern gui_T gui; /* this is defined in gui.c */
extern gui_T gui; // this is defined in gui.c
/* definitions of available window positionings for gui_*_position_in_parent()
*/
// definitions of available window positionings for gui_*_position_in_parent()
typedef enum
{
VW_POS_MOUSE,
@ -503,15 +502,15 @@ typedef enum
* Flags used to distinguish the different contexts in which the
* find/replace callback may be called.
*/
# define FRD_FINDNEXT 1 /* Find next in find dialog */
# define FRD_R_FINDNEXT 2 /* Find next in repl dialog */
# define FRD_REPLACE 3 /* Replace once */
# define FRD_REPLACEALL 4 /* Replace remaining matches */
# define FRD_UNDO 5 /* Undo replaced text */
# define FRD_TYPE_MASK 7 /* Mask for the callback type */
/* Flags which change the way searching is done. */
# define FRD_WHOLE_WORD 0x08 /* match whole word only */
# define FRD_MATCH_CASE 0x10 /* match case */
# define FRD_FINDNEXT 1 // Find next in find dialog
# define FRD_R_FINDNEXT 2 // Find next in repl dialog
# define FRD_REPLACE 3 // Replace once
# define FRD_REPLACEALL 4 // Replace remaining matches
# define FRD_UNDO 5 // Undo replaced text
# define FRD_TYPE_MASK 7 // Mask for the callback type
// Flags which change the way searching is done.
# define FRD_WHOLE_WORD 0x08 // match whole word only
# define FRD_MATCH_CASE 0x10 // match case
#endif
#ifdef FEAT_GUI_GTK
@ -555,7 +554,7 @@ typedef enum
# define CONVERT_TO_UTF8_FREE(String) ((String) = (char_u *)NULL)
# define CONVERT_FROM_UTF8(String) (String)
# define CONVERT_FROM_UTF8_FREE(String) ((String) = (char_u *)NULL)
#endif /* FEAT_GUI_GTK */
#endif // FEAT_GUI_GTK
#ifdef FEAT_GUI_GTK
/*
@ -581,7 +580,7 @@ typedef enum
# else
# define FUNC2GENERIC(func) G_CALLBACK(func)
# endif
#endif /* FEAT_GUI_GTK */
#endif // FEAT_GUI_GTK
#if defined(UNIX) && !defined(FEAT_GUI_MAC)
# define GUI_MAY_FORK

View File

@ -1,8 +1,8 @@
/* vi:set ts=8 sts=4 sw=4 noet: */
/* MODIFIED ATHENA SCROLLBAR (USING ARROWHEADS AT ENDS OF TRAVEL) */
/* Modifications Copyright 1992 by Mitch Trachtenberg */
/* Rights, permissions, and disclaimer of warranty are as in the */
/* DEC and MIT notice below. See usage warning in .c file. */
// vi:set ts=8 sts=4 sw=4 noet:
// MODIFIED ATHENA SCROLLBAR (USING ARROWHEADS AT ENDS OF TRAVEL)
// Modifications Copyright 1992 by Mitch Trachtenberg
// Rights, permissions, and disclaimer of warranty are as in the
// DEC and MIT notice below. See usage warning in .c file.
/*
* $XConsortium: ScrollbarP.h,v 1.3 94/04/17 20:12:42 jim Exp $
*/
@ -98,33 +98,33 @@ extern void vim_XawScrollbarSetThumb(Widget, double, double, double);
typedef struct
{
/* public */
Pixel foreground; /* thumb foreground color */
XtOrientation orientation; /* horizontal or vertical */
XtCallbackList scrollProc; /* proportional scroll */
XtCallbackList thumbProc; /* jump (to position) scroll */
XtCallbackList jumpProc; /* same as thumbProc but pass data by ref */
Pixmap thumb; /* thumb color */
float top; /* What percent is above the win's top */
float shown; /* What percent is shown in the win */
float max; /* Maximum value for top */
Dimension length; /* either height or width */
Dimension thickness; /* either width or height */
Dimension min_thumb; /* minimum size for the thumb. */
// public
Pixel foreground; // thumb foreground color
XtOrientation orientation; // horizontal or vertical
XtCallbackList scrollProc; // proportional scroll
XtCallbackList thumbProc; // jump (to position) scroll
XtCallbackList jumpProc; // same as thumbProc but pass data by ref
Pixmap thumb; // thumb color
float top; // What percent is above the win's top
float shown; // What percent is shown in the win
float max; // Maximum value for top
Dimension length; // either height or width
Dimension thickness; // either width or height
Dimension min_thumb; // minimum size for the thumb.
/* private */
XtIntervalId timer_id; /* autorepeat timer; remove on destruction */
char scroll_mode; /* see below */
float scroll_off; /* offset from event to top of thumb */
GC gc; /* a (shared) gc */
Position topLoc; /* Pixel that corresponds to top */
Dimension shownLength; /* Num pixels corresponding to shown */
// private
XtIntervalId timer_id; // autorepeat timer; remove on destruction
char scroll_mode; // see below
float scroll_off; // offset from event to top of thumb
GC gc; // a (shared) gc
Position topLoc; // Pixel that corresponds to top
Dimension shownLength; // Num pixels corresponding to shown
/* From 3d widget */
// From 3d widget
Dimension shadow_width;
Pixel top_shadow_pixel;
Pixel bot_shadow_pixel;
Bool limit_thumb; /* limit thumb to inside scrollbar */
Bool limit_thumb; // limit thumb to inside scrollbar
int top_shadow_contrast;
int bot_shadow_contrast;
GC top_shadow_GC;
@ -158,4 +158,4 @@ typedef struct _ScrollbarClassRec {
extern ScrollbarClassRec vim_scrollbarClassRec;
#endif /* _Scrollbar_h */
#endif // _Scrollbar_h

View File

@ -70,10 +70,9 @@ void gtk_form_move_resize(GtkForm * form, GtkWidget * widget,
gint x, gint y,
gint w, gint h);
/* These disable and enable moving and repainting respectively. If you
* want to update the layout's offsets but do not want it to repaint
* itself, you should use these functions.
*/
// These disable and enable moving and repainting respectively. If you
// want to update the layout's offsets but do not want it to repaint
// itself, you should use these functions.
void gtk_form_freeze(GtkForm *form);
void gtk_form_thaw(GtkForm *form);
@ -82,4 +81,4 @@ void gtk_form_thaw(GtkForm *form);
#ifdef __cplusplus
}
#endif
#endif /* __GTK_FORM_H__ */
#endif // __GTK_FORM_H__

View File

@ -74,11 +74,11 @@
*************************************************************************
*/
/* INTRINSIC.H omits proto if XtFree is defined */
/* VMS_BEGIN_C_PLUS_PLUS */
// INTRINSIC.H omits proto if XtFree is defined
// VMS_BEGIN_C_PLUS_PLUS
extern void XtFree(char*);
extern void XTFREE(char*);
/* VMS_END_C_PLUS_PLUS */
// VMS_END_C_PLUS_PLUS
#define _XRegisterFilterByType _XREGISTERFILTERBYTYPE
@ -719,10 +719,10 @@ extern void XTFREE(char*);
** named None. So for now hard code this is R5....
*/
#ifndef VMS_X11R6
/* R5 or earlier */
// R5 or earlier
#define _XtRegisterWindow _XTREGISTERWINDOW
#define _XtUnregisterWindow _XTUNREGISTERWINDOW
/* original code is fixed so we don't need this now */
// original code is fixed so we don't need this now
#if 0
#define XtRegisterDrawable(display,drawable,widget) \
{ extern void _XtRegisterWindow(Window,Widget); \
@ -734,7 +734,7 @@ extern void XTFREE(char*);
}
#endif
#else
/* R6 or later */
// R6 or later
#define XtRegisterDrawable XTREGISTERDRAWABLE
#define XtUnregisterDrawable XTUNREGISTERDRAWABLE
#endif

View File

@ -84,7 +84,7 @@ static char **(built_in_pixmaps[]) =
tb_exit_xpm
};
/* Indices for named colors */
// Indices for named colors
#define BACKGROUND 0
#define FOREGROUND 1
#define BOTTOM_SHADOW 2

View File

@ -53,13 +53,13 @@ extern XmEnhancedButtonClassRec xmEnhancedButtonClassRec;
*/
typedef struct _XmEnhancedButtonPart
{
/* public resources */
// public resources
String pixmap_data;
String pixmap_file;
Dimension spacing;
int label_location;
/* private resources */
// private resources
int pixmap_depth;
Dimension pixmap_width;
Dimension pixmap_height;

View File

@ -33,29 +33,29 @@ typedef struct {
int (*func)(exarg_T *eap);
char * help;
char * usage;
int cansplit; /* if supports splitting window */
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) */
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 */
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
# if defined(MSWIN)
DWORD pid; /* PID of the connected cscope process. */
HANDLE hProc; /* cscope process handle */
DWORD nVolume; /* Volume serial number, instead of st_dev */
DWORD nIndexHigh; /* st_ino has no meaning in the Windows */
DWORD pid; // PID of the connected cscope process.
HANDLE hProc; // cscope process handle
DWORD nVolume; // Volume serial number, instead of st_dev
DWORD nIndexHigh; // st_ino has no meaning in the Windows
DWORD nIndexLow;
# endif
#endif
FILE * fr_fp; /* from cscope: FILE. */
FILE * to_fp; /* to cscope: FILE. */
FILE * fr_fp; // from cscope: FILE.
FILE * to_fp; // to cscope: FILE.
} csinfo_T;
typedef enum { Add, Find, Help, Kill, Reset, Show } csid_e;
@ -68,6 +68,4 @@ typedef enum {
} mcmd_e;
#endif /* FEAT_CSCOPE */
/* the end */
#endif // FEAT_CSCOPE

View File

@ -5,17 +5,17 @@
#ifndef _IF_MZSCH_H_
#define _IF_MZSCH_H_
#ifdef __MINGW32__
/* Hack to engage Cygwin-specific settings */
// Hack to engage Cygwin-specific settings
# define __CYGWIN32__
# include <stdint.h>
#endif
#ifdef PROTO
/* avoid syntax error for defining Thread_Local_Variables. */
# define __thread /* empty */
// avoid syntax error for defining Thread_Local_Variables.
# define __thread // empty
#endif
/* #ifdef needed for "make depend" */
// #ifdef needed for "make depend"
#ifdef FEAT_MZSCHEME
# include <schvers.h>
# include <scheme.h>
@ -29,12 +29,12 @@
# define SCHEME_STRINGP(obj) (SCHEME_BYTE_STRINGP(obj) || SCHEME_CHAR_STRINGP(obj))
# define BYTE_STRING_VALUE(obj) ((char_u *)SCHEME_BYTE_STR_VAL(obj))
#else
/* macros for compatibility with older versions */
// macros for compatibility with older versions
# define scheme_current_config() scheme_config
# define scheme_make_sized_byte_string scheme_make_sized_string
# define scheme_format_utf8 scheme_format
# ifndef DYNAMIC_MZSCHEME
/* for dynamic MzScheme there will be separate definitions in if_mzsch.c */
// for dynamic MzScheme there will be separate definitions in if_mzsch.c
# define scheme_get_sized_byte_string_output scheme_get_sized_string_output
# define scheme_make_byte_string scheme_make_string
# define scheme_make_byte_string_output_port scheme_make_string_output_port
@ -46,21 +46,21 @@
# define SCHEME_BYTE_STRINGP SCHEME_STRINGP
#endif
/* Precise GC macros */
// Precise GC macros
#ifndef MZ_GC_DECL_REG
# define MZ_GC_DECL_REG(size) /* empty */
# define MZ_GC_DECL_REG(size) // empty
#endif
#ifndef MZ_GC_VAR_IN_REG
# define MZ_GC_VAR_IN_REG(x, v) /* empty */
# define MZ_GC_VAR_IN_REG(x, v) // empty
#endif
#ifndef MZ_GC_ARRAY_VAR_IN_REG
# define MZ_GC_ARRAY_VAR_IN_REG(x, v, l) /* empty */
# define MZ_GC_ARRAY_VAR_IN_REG(x, v, l) // empty
#endif
#ifndef MZ_GC_REG
# define MZ_GC_REG() /* empty */
# define MZ_GC_REG() // empty
#endif
#ifndef MZ_GC_UNREG
# define MZ_GC_UNREG() /* empty */
# define MZ_GC_UNREG() // empty
#endif
#ifdef MZSCHEME_FORCE_GC
@ -70,7 +70,7 @@
*/
# define MZ_GC_CHECK() scheme_collect_garbage();
#else
# define MZ_GC_CHECK() /* empty */
# define MZ_GC_CHECK() // empty
#endif
#endif /* _IF_MZSCH_H_ */
#endif // _IF_MZSCH_H_

View File

@ -1,20 +1,18 @@
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
// this ALWAYS GENERATED file contains the definitions for the interfaces
/* File created by MIDL compiler version 3.01.75 */
/* at Wed Jun 06 18:20:37 2001
*/
/* Compiler settings for .\if_ole.idl:
Os (OptLev=s), W1, Zp8, env=Win32, ms_ext, c_ext
error checks: none
*/
// File created by MIDL compiler version 3.01.75
// at Wed Jun 06 18:20:37 2001
// Compiler settings for .\if_ole.idl:
// Os (OptLev=s), W1, Zp8, env=Win32, ms_ext, c_ext
// error checks: none
//@@MIDL_FILE_HEADING( )
#include "rpc.h"
#include "rpcndr.h"
#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif /*COM_NO_WINDOWS_H*/
#endif //COM_NO_WINDOWS_H
#ifndef __if_ole_h__
#define __if_ole_h__
@ -23,12 +21,12 @@
extern "C"{
#endif
/* Forward Declarations */
// Forward Declarations
#ifndef __IVim_FWD_DEFINED__
#define __IVim_FWD_DEFINED__
typedef interface IVim IVim;
#endif /* __IVim_FWD_DEFINED__ */
#endif // __IVim_FWD_DEFINED__
#ifndef __Vim_FWD_DEFINED__
@ -38,12 +36,12 @@ typedef interface IVim IVim;
typedef class Vim Vim;
#else
typedef struct Vim Vim;
#endif /* __cplusplus */
#endif // __cplusplus
#endif /* __Vim_FWD_DEFINED__ */
#endif // __Vim_FWD_DEFINED__
/* header files for imported files */
// header files for imported files
#include "oaidl.h"
#ifndef __MIDL_user_allocate_free_DEFINED__
@ -55,12 +53,12 @@ typedef struct Vim Vim;
#ifndef __IVim_INTERFACE_DEFINED__
#define __IVim_INTERFACE_DEFINED__
/****************************************
* Generated header for interface: IVim
* at Wed Jun 06 18:20:37 2001
* using MIDL 3.01.75
****************************************/
/* [oleautomation][dual][unique][helpstring][uuid][object] */
//***************************************
// Generated header for interface: IVim
// at Wed Jun 06 18:20:37 2001
// using MIDL 3.01.75
//**************************************
// [oleautomation][dual][unique][helpstring][uuid][object]
@ -86,7 +84,7 @@ EXTERN_C const IID IID_IVim;
};
#else /* C style interface */
#else // C style interface
typedef struct IVimVtbl
{
@ -194,10 +192,10 @@ EXTERN_C const IID IID_IVim;
#define IVim_GetHwnd(This,result) \
(This)->lpVtbl -> GetHwnd(This,result)
#endif /* COBJMACROS */
#endif // COBJMACROS
#endif /* C style interface */
#endif // C style interface
@ -250,19 +248,19 @@ void __RPC_STUB IVim_GetHwnd_Stub(
#endif /* __IVim_INTERFACE_DEFINED__ */
#endif // __IVim_INTERFACE_DEFINED__
#ifndef __Vim_LIBRARY_DEFINED__
#define __Vim_LIBRARY_DEFINED__
/****************************************
* Generated header for library: Vim
* at Wed Jun 06 18:20:37 2001
* using MIDL 3.01.75
****************************************/
/* [version][helpstring][uuid] */
//***************************************
// Generated header for library: Vim
// at Wed Jun 06 18:20:37 2001
// using MIDL 3.01.75
//**************************************
// [version][helpstring][uuid]
@ -274,16 +272,16 @@ EXTERN_C const CLSID CLSID_Vim;
class DECLSPEC_UUID("0F0BFAE1-4C90-11d1-82D7-0004AC368519")
Vim;
#endif
#endif /* __Vim_LIBRARY_DEFINED__ */
#endif // __Vim_LIBRARY_DEFINED__
/* Additional Prototypes for ALL interfaces */
// Additional Prototypes for ALL interfaces
unsigned long __RPC_USER BSTR_UserSize( unsigned long __RPC_FAR *, unsigned long , BSTR __RPC_FAR * );
unsigned char __RPC_FAR * __RPC_USER BSTR_UserMarshal( unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, BSTR __RPC_FAR * );
unsigned char __RPC_FAR * __RPC_USER BSTR_UserUnmarshal(unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, BSTR __RPC_FAR * );
void __RPC_USER BSTR_UserFree( unsigned long __RPC_FAR *, BSTR __RPC_FAR * );
/* end of Additional Prototypes */
// end of Additional Prototypes
#ifdef __cplusplus
}

View File

@ -16,7 +16,7 @@
static char_u e_py_systemexit[] = "E880: Can't handle SystemExit of %s exception in vim";
#if PY_VERSION_HEX < 0x02050000
typedef int Py_ssize_t; /* Python 2.4 and earlier don't have this type. */
typedef int Py_ssize_t; // Python 2.4 and earlier don't have this type.
#endif
#define ENC_OPT ((char *)p_enc)
@ -303,10 +303,9 @@ ObjectDir(PyObject *self, char **attributes)
return ret;
}
/* Output buffer management
*/
// Output buffer management
/* Function to write a line, points to either msg() or emsg(). */
// Function to write a line, points to either msg() or emsg().
typedef void (*writefn)(char_u *);
static PyTypeObject OutputType;
@ -350,7 +349,7 @@ OutputSetattr(OutputObject *self, char *name, PyObject *valObject)
return -1;
}
/* Buffer IO, we write one whole line at a time. */
// Buffer IO, we write one whole line at a time.
static garray_T io_ga = {0, 0, 1, 80, NULL};
static writefn old_fn = NULL;
@ -370,7 +369,7 @@ writer(writefn fn, char_u *str, PyInt n)
{
char_u *ptr;
/* Flush when switching output function. */
// Flush when switching output function.
if (fn != old_fn)
PythonIO_Flush();
old_fn = fn;
@ -459,7 +458,7 @@ OutputWritelines(OutputObject *self, PyObject *seq)
Py_DECREF(iterator);
/* Iterator may have finished due to an exception */
// Iterator may have finished due to an exception
if (PyErr_Occurred())
return NULL;
@ -470,7 +469,7 @@ OutputWritelines(OutputObject *self, PyObject *seq)
static PyObject *
AlwaysNone(PyObject *self UNUSED)
{
/* do nothing */
// do nothing
Py_INCREF(Py_None);
return Py_None;
}
@ -478,7 +477,7 @@ AlwaysNone(PyObject *self UNUSED)
static PyObject *
AlwaysFalse(PyObject *self UNUSED)
{
/* do nothing */
// do nothing
PyObject *ret = Py_False;
Py_INCREF(ret);
return ret;
@ -487,7 +486,7 @@ AlwaysFalse(PyObject *self UNUSED)
static PyObject *
AlwaysTrue(PyObject *self UNUSED)
{
/* do nothing */
// do nothing
PyObject *ret = Py_True;
Py_INCREF(ret);
return ret;
@ -496,7 +495,7 @@ AlwaysTrue(PyObject *self UNUSED)
/***************/
static struct PyMethodDef OutputMethods[] = {
/* name, function, calling, doc */
// name, function, calling, doc
{"write", (PyCFunction)OutputWrite, METH_O, ""},
{"writelines", (PyCFunction)OutputWritelines, METH_O, ""},
{"flush", (PyCFunction)AlwaysNone, METH_NOARGS, ""},
@ -596,16 +595,16 @@ LoaderLoadModule(LoaderObject *self, PyObject *args UNUSED)
}
static struct PyMethodDef LoaderMethods[] = {
/* name, function, calling, doc */
// name, function, calling, doc
{"load_module", (PyCFunction)LoaderLoadModule, METH_VARARGS, ""},
{ NULL, NULL, 0, NULL}
};
#endif
/* Check to see whether a Vim error has been reported, or a keyboard
/*
* Check to see whether a Vim error has been reported, or a keyboard
* interrupt has been detected.
*/
static void
VimTryStart(void)
{
@ -616,11 +615,10 @@ VimTryStart(void)
VimTryEnd(void)
{
--trylevel;
/* Without this it stops processing all subsequent Vim script commands and
* generates strange error messages if I e.g. try calling Test() in a cycle
*/
// Without this it stops processing all subsequent Vim script commands and
// generates strange error messages if I e.g. try calling Test() in a cycle
did_emsg = FALSE;
/* Keyboard interrupt should be preferred over anything else */
// Keyboard interrupt should be preferred over anything else
if (got_int)
{
if (did_throw)
@ -653,13 +651,13 @@ VimTryEnd(void)
}
else if (!did_throw)
return (PyErr_Occurred() ? -1 : 0);
/* Python exception is preferred over vim one; unlikely to occur though */
// Python exception is preferred over vim one; unlikely to occur though
else if (PyErr_Occurred())
{
discard_current_exception();
return -1;
}
/* Finally transform Vim script exception to python one */
// Finally transform Vim script exception to python one
else
{
PyErr_SetVim((char *)current_exception->value);
@ -679,8 +677,7 @@ VimCheckInterrupt(void)
return 0;
}
/* Vim module - Implementation
*/
// Vim module - Implementation
static PyObject *
VimCommand(PyObject *self UNUSED, PyObject *string)
@ -726,7 +723,7 @@ VimToPython(typval_T *our_tv, int depth, PyObject *lookup_dict)
PyObject *newObj;
char ptrBuf[sizeof(void *) * 2 + 3];
/* Avoid infinite recursion */
// Avoid infinite recursion
if (depth > 100)
{
Py_INCREF(Py_None);
@ -734,8 +731,8 @@ VimToPython(typval_T *our_tv, int depth, PyObject *lookup_dict)
return ret;
}
/* Check if we run into a recursive loop. The item must be in lookup_dict
* then and we can use it again. */
// Check if we run into a recursive loop. The item must be in lookup_dict
// then and we can use it again.
if ((our_tv->v_type == VAR_LIST && our_tv->vval.v_list != NULL)
|| (our_tv->v_type == VAR_DICT && our_tv->vval.v_dict != NULL))
{
@ -757,7 +754,7 @@ VimToPython(typval_T *our_tv, int depth, PyObject *lookup_dict)
{
char buf[NUMBUFLEN];
/* For backwards compatibility numbers are stored as strings. */
// For backwards compatibility numbers are stored as strings.
sprintf(buf, "%ld", (long)our_tv->vval.v_number);
ret = PyString_FromString((char *)buf);
}
@ -912,8 +909,8 @@ VimEval(PyObject *self UNUSED, PyObject *args)
return NULL;
}
/* Convert the Vim type into a Python type. Create a dictionary that's
* used to check for recursive loops. */
// Convert the Vim type into a Python type. Create a dictionary that's
// used to check for recursive loops.
if (!(lookup_dict = PyDict_New()))
ret = NULL;
else
@ -1134,7 +1131,7 @@ map_finder_callback(char_u *path, void *_data)
#endif
#define PY_ALTERNATE_DIR_STRING "pythonx"
#define PYTHONX_STRING_LENGTH 7 /* STRLEN("pythonx") */
#define PYTHONX_STRING_LENGTH 7 // STRLEN("pythonx")
if (!(pathbuf = PyMem_New(char,
pathlen + STRLEN(PATHSEPSTR) + PYTHONX_STRING_LENGTH + 1)))
{
@ -1403,7 +1400,7 @@ VimPathHook(PyObject *self UNUSED, PyObject *args)
*/
static struct PyMethodDef VimMethods[] = {
/* name, function, calling, documentation */
// name, function, calling, documentation
{"command", VimCommand, METH_O, "Execute a Vim ex-mode command" },
{"eval", VimEval, METH_VARARGS, "Evaluate an expression using Vim evaluator" },
{"bindeval", VimEvalPy, METH_O, "Like eval(), but returns objects attached to vim ones"},
@ -1431,10 +1428,9 @@ typedef void (*destructorfun)(void *);
typedef int (*traversefun)(void *, visitproc, void *);
typedef int (*clearfun)(void **);
/* Main purpose of this object is removing the need for do python
* initialization (i.e. PyType_Ready and setting type attributes) for a big
* bunch of objects. */
// Main purpose of this object is removing the need for do python
// initialization (i.e. PyType_Ready and setting type attributes) for a big
// bunch of objects.
typedef struct
{
PyObject_HEAD
@ -1478,7 +1474,7 @@ IterTraverse(IterObject *self, visitproc visit, void *arg)
return 0;
}
/* Mac OSX defines clear() somewhere. */
// Mac OSX defines clear() somewhere.
#ifdef clear
# undef clear
#endif
@ -1688,7 +1684,7 @@ DictionaryLength(DictionaryObject *self)
#define DICT_FLAG_HAS_DEFAULT 0x01
#define DICT_FLAG_POP 0x02
#define DICT_FLAG_NONE_DEFAULT 0x04
#define DICT_FLAG_RETURN_BOOL 0x08 /* Incompatible with DICT_FLAG_POP */
#define DICT_FLAG_RETURN_BOOL 0x08 // Incompatible with DICT_FLAG_POP
#define DICT_FLAG_RETURN_PAIR 0x10
static PyObject *
@ -2141,7 +2137,7 @@ DictionaryUpdate(DictionaryObject *self, PyObject *args, PyObject *kwargs)
Py_DECREF(iterator);
/* Iterator may have finished due to an exception */
// Iterator may have finished due to an exception
if (PyErr_Occurred())
return NULL;
}
@ -2205,16 +2201,16 @@ DictionaryHasKey(DictionaryObject *self, PyObject *keyObject)
}
static PySequenceMethods DictionaryAsSeq = {
0, /* sq_length */
0, /* sq_concat */
0, /* sq_repeat */
0, /* sq_item */
0, /* sq_slice */
0, /* sq_ass_item */
0, /* sq_ass_slice */
(objobjproc) DictionaryContains, /* sq_contains */
0, /* sq_inplace_concat */
0, /* sq_inplace_repeat */
0, // sq_length
0, // sq_concat
0, // sq_repeat
0, // sq_item
0, // sq_slice
0, // sq_ass_item
0, // sq_ass_slice
(objobjproc) DictionaryContains, // sq_contains
0, // sq_inplace_concat
0, // sq_inplace_repeat
};
static PyMappingMethods DictionaryAsMapping = {
@ -2315,7 +2311,7 @@ list_py_concat(list_T *l, PyObject *obj, PyObject *lookup_dict)
Py_DECREF(iterator);
/* Iterator may have finished due to an exception */
// Iterator may have finished due to an exception
if (PyErr_Occurred())
return -1;
@ -2392,7 +2388,7 @@ ListIndex(ListObject *self, Py_ssize_t index)
li = list_find(self->list, (long) index);
if (li == NULL)
{
/* No more suitable format specifications in python-2.3 */
// No more suitable format specifications in python-2.3
PyErr_VIM_FORMAT(N_("internal error: failed to get vim list item %d"),
(int) index);
return NULL;
@ -2519,7 +2515,7 @@ ListAssSlice(ListObject *self, Py_ssize_t first,
if (step != 1 && slicelen == 0)
{
/* Nothing to do. Only error out if obj has some items. */
// Nothing to do. Only error out if obj has some items.
int ret = 0;
if (obj == NULL)
@ -2541,7 +2537,7 @@ ListAssSlice(ListObject *self, Py_ssize_t first,
}
if (obj != NULL)
/* XXX May allocate zero bytes. */
// XXX May allocate zero bytes.
if (!(lis = PyMem_New(listitem_T *, slicelen * 2)))
{
PyErr_NoMemory();
@ -2881,16 +2877,16 @@ ListSetattr(ListObject *self, char *name, PyObject *valObject)
}
static PySequenceMethods ListAsSeq = {
(lenfunc) ListLength, /* sq_length, len(x) */
(binaryfunc) 0, /* RangeConcat, sq_concat, x+y */
0, /* RangeRepeat, sq_repeat, x*n */
(PyIntArgFunc) ListIndex, /* sq_item, x[i] */
0, /* was_sq_slice, x[i:j] */
(PyIntObjArgProc) ListAssIndex, /* sq_as_item, x[i]=v */
0, /* was_sq_ass_slice, x[i:j]=v */
0, /* sq_contains */
(binaryfunc) ListConcatInPlace,/* sq_inplace_concat */
0, /* sq_inplace_repeat */
(lenfunc) ListLength, // sq_length, len(x)
(binaryfunc) 0, // RangeConcat, sq_concat, x+y
0, // RangeRepeat, sq_repeat, x*n
(PyIntArgFunc) ListIndex, // sq_item, x[i]
0, // was_sq_slice, x[i:j]
(PyIntObjArgProc) ListAssIndex, // sq_as_item, x[i]=v
0, // was_sq_ass_slice, x[i:j]=v
0, // sq_contains
(binaryfunc) ListConcatInPlace,// sq_inplace_concat
0, // sq_inplace_repeat
};
static PyMappingMethods ListAsMapping = {
@ -3127,7 +3123,8 @@ FunctionAttr(FunctionObject *self, char *name)
return NULL;
}
/* Populate partial_T given function object.
/*
* Populate partial_T given function object.
*
* "exported" should be set to true when it is needed to construct a partial
* that may be stored in a variable (i.e. may be freed by Vim).
@ -3642,16 +3639,16 @@ OptionsAssItem(OptionsObject *self, PyObject *keyObject, PyObject *valObject)
}
static PySequenceMethods OptionsAsSeq = {
0, /* sq_length */
0, /* sq_concat */
0, /* sq_repeat */
0, /* sq_item */
0, /* sq_slice */
0, /* sq_ass_item */
0, /* sq_ass_slice */
(objobjproc) OptionsContains, /* sq_contains */
0, /* sq_inplace_concat */
0, /* sq_inplace_repeat */
0, // sq_length
0, // sq_concat
0, // sq_repeat
0, // sq_item
0, // sq_slice
0, // sq_ass_item
0, // sq_ass_slice
(objobjproc) OptionsContains, // sq_contains
0, // sq_inplace_concat
0, // sq_inplace_repeat
};
static PyMappingMethods OptionsAsMapping = {
@ -3660,8 +3657,7 @@ static PyMappingMethods OptionsAsMapping = {
(objobjargproc) OptionsAssItem,
};
/* Tabpage object
*/
// Tabpage object
typedef struct
{
@ -3751,8 +3747,7 @@ TabPageAttr(TabPageObject *self, char *name)
return NEW_DICTIONARY(self->tab->tp_vars);
else if (strcmp(name, "window") == 0)
{
/* For current tab window.c does not bother to set or update tp_curwin
*/
// For current tab window.c does not bother to set or update tp_curwin
if (self->tab == curtab)
return WindowNew(curwin, curtab);
else
@ -3781,7 +3776,7 @@ TabPageRepr(TabPageObject *self)
}
static struct PyMethodDef TabPageMethods[] = {
/* name, function, calling, documentation */
// name, function, calling, documentation
{"__dir__", (PyCFunction)TabPageDir, METH_NOARGS, ""},
{ NULL, NULL, 0, NULL}
};
@ -3854,7 +3849,8 @@ CheckWindow(WindowObject *self)
static PyObject *
WindowNew(win_T *win, tabpage_T *tab)
{
/* We need to handle deletion of windows underneath us.
/*
* We need to handle deletion of windows underneath us.
* If we add a "w_python*_ref" field to the win_T structure,
* then we can get at it in win_free() in vim. We then
* need to create only ONE Python object per window - if
@ -3921,8 +3917,7 @@ get_firstwin(TabPageObject *tabObject)
{
if (CheckTabPage(tabObject))
return NULL;
/* For current tab window.c does not bother to set or update tp_firstwin
*/
// For current tab window.c does not bother to set or update tp_firstwin
else if (tabObject->tab == curtab)
return firstwin;
else
@ -4034,7 +4029,7 @@ WindowSetattr(WindowObject *self, char *name, PyObject *valObject)
return -1;
}
/* Check for keyboard interrupts */
// Check for keyboard interrupts
if (VimCheckInterrupt())
return -1;
@ -4042,7 +4037,7 @@ WindowSetattr(WindowObject *self, char *name, PyObject *valObject)
self->win->w_cursor.col = col;
self->win->w_set_curswant = TRUE;
self->win->w_cursor.coladd = 0;
/* When column is out of range silently correct it. */
// When column is out of range silently correct it.
check_cursor_col_win(self->win);
update_screen(VALID);
@ -4117,7 +4112,7 @@ WindowRepr(WindowObject *self)
}
static struct PyMethodDef WindowMethods[] = {
/* name, function, calling, documentation */
// name, function, calling, documentation
{"__dir__", (PyCFunction)WindowDir, METH_NOARGS, ""},
{ NULL, NULL, 0, NULL}
};
@ -4194,7 +4189,8 @@ WinListItem(WinListObject *self, PyInt n)
return NULL;
}
/* Convert a Python string into a Vim line.
/*
* Convert a Python string into a Vim line.
*
* The result is in allocated memory. All internal nulls are replaced by
* newline characters. It is an error for the string to contain newline
@ -4263,7 +4259,8 @@ StringToLine(PyObject *obj)
}
}
/* Create a copy of the string, with internal nulls replaced by
/*
* Create a copy of the string, with internal nulls replaced by
* newline characters, as is the vim convention.
*/
save = alloc(len+1);
@ -4283,12 +4280,13 @@ StringToLine(PyObject *obj)
}
save[i] = '\0';
Py_XDECREF(bytes); /* Python 2 does nothing here */
Py_XDECREF(bytes); // Python 2 does nothing here
return save;
}
/* Get a line from the specified buffer. The line number is
/*
* Get a line from the specified buffer. The line number is
* in Vim format (1-based). The line is returned as a Python
* string object.
*/
@ -4299,7 +4297,8 @@ GetBufferLine(buf_T *buf, PyInt n)
}
/* Get a list of lines from the specified buffer. The line numbers
/*
* Get a list of lines from the specified buffer. The line numbers
* are in Vim format (1-based). The range is from lo up to, but not
* including, hi. The list is returned as a Python list of string objects.
*/
@ -4318,7 +4317,7 @@ GetBufferLineList(buf_T *buf, PyInt lo, PyInt hi)
PyObject *string = LineToString(
(char *)ml_get_buf(buf, (linenr_T)(lo+i), FALSE));
/* Error check - was the Python string creation OK? */
// Error check - was the Python string creation OK?
if (string == NULL)
{
Py_DECREF(list);
@ -4328,10 +4327,9 @@ GetBufferLineList(buf_T *buf, PyInt lo, PyInt hi)
PyList_SET_ITEM(list, i, string);
}
/* The ownership of the Python list is passed to the caller (ie,
* the caller should Py_DECREF() the object when it is finished
* with it).
*/
// The ownership of the Python list is passed to the caller (ie,
// the caller should Py_DECREF() the object when it is finished
// with it).
return list;
}
@ -4346,8 +4344,8 @@ py_fix_cursor(linenr_T lo, linenr_T hi, linenr_T extra)
{
if (curwin->w_cursor.lnum >= lo)
{
/* Adjust the cursor position if it's in/after the changed
* lines. */
// Adjust the cursor position if it's in/after the changed
// lines.
if (curwin->w_cursor.lnum >= hi)
{
curwin->w_cursor.lnum += extra;
@ -4381,12 +4379,11 @@ SetBufferLine(buf_T *buf, PyInt n, PyObject *line, PyInt *len_change)
win_T *save_curwin = NULL;
tabpage_T *save_curtab = NULL;
/* First of all, we check the type of the supplied Python object.
* There are three cases:
* 1. NULL, or None - this is a deletion.
* 2. A string - this is a replacement.
* 3. Anything else - this is an error.
*/
// First of all, we check the type of the supplied Python object.
// There are three cases:
// 1. NULL, or None - this is a deletion.
// 2. A string - this is a replacement.
// 3. Anything else - this is an error.
if (line == Py_None || line == NULL)
{
PyErr_Clear();
@ -4406,8 +4403,8 @@ SetBufferLine(buf_T *buf, PyInt n, PyObject *line, PyInt *len_change)
// position.
py_fix_cursor((linenr_T)n, (linenr_T)n + 1, (linenr_T)-1);
if (save_curbuf.br_buf == NULL)
/* Only adjust marks if we managed to switch to a window that
* holds the buffer, otherwise line numbers will be invalid. */
// Only adjust marks if we managed to switch to a window that
// holds the buffer, otherwise line numbers will be invalid.
deleted_lines_mark((linenr_T)n, 1L);
}
@ -4430,7 +4427,7 @@ SetBufferLine(buf_T *buf, PyInt n, PyObject *line, PyInt *len_change)
VimTryStart();
/* We do not need to free "save" if ml_replace() consumes it. */
// We do not need to free "save" if ml_replace() consumes it.
PyErr_Clear();
switch_to_win_for_buf(buf, &save_curwin, &save_curtab, &save_curbuf);
@ -4449,7 +4446,7 @@ SetBufferLine(buf_T *buf, PyInt n, PyObject *line, PyInt *len_change)
restore_win_for_buf(save_curwin, save_curtab, &save_curbuf);
/* Check that the cursor is not beyond the end of the line now. */
// Check that the cursor is not beyond the end of the line now.
if (buf == curbuf)
check_cursor_col();
@ -4468,7 +4465,8 @@ SetBufferLine(buf_T *buf, PyInt n, PyObject *line, PyInt *len_change)
}
}
/* Replace a range of lines in the specified buffer. The line numbers are in
/*
* Replace a range of lines in the specified buffer. The line numbers are in
* Vim format (1-based). The range is from lo up to, but not including, hi.
* The replacement lines are given as a Python list of string objects. The
* list is checked for validity and correct format. Errors are returned as a
@ -4488,12 +4486,11 @@ SetBufferLineList(
win_T *save_curwin = NULL;
tabpage_T *save_curtab = NULL;
/* First of all, we check the type of the supplied Python object.
* There are three cases:
* 1. NULL, or None - this is a deletion.
* 2. A list - this is a replacement.
* 3. Anything else - this is an error.
*/
// First of all, we check the type of the supplied Python object.
// There are three cases:
// 1. NULL, or None - this is a deletion.
// 2. A list - this is a replacement.
// 3. Anything else - this is an error.
if (list == Py_None || list == NULL)
{
PyInt i;
@ -4517,12 +4514,12 @@ SetBufferLineList(
}
if (buf == curbuf && (save_curwin != NULL
|| save_curbuf.br_buf == NULL))
/* Using an existing window for the buffer, adjust the cursor
* position. */
// Using an existing window for the buffer, adjust the cursor
// position.
py_fix_cursor((linenr_T)lo, (linenr_T)hi, (linenr_T)-n);
if (save_curbuf.br_buf == NULL)
/* Only adjust marks if we managed to switch to a window that
* holds the buffer, otherwise line numbers will be invalid. */
// Only adjust marks if we managed to switch to a window that
// holds the buffer, otherwise line numbers will be invalid.
deleted_lines_mark((linenr_T)lo, (long)i);
}
@ -4541,10 +4538,10 @@ SetBufferLineList(
PyInt i;
PyInt new_len = PyList_Size(list);
PyInt old_len = hi - lo;
PyInt extra = 0; /* lines added to text, can be negative */
PyInt extra = 0; // lines added to text, can be negative
char **array;
if (new_len == 0) /* avoid allocating zero bytes */
if (new_len == 0) // avoid allocating zero bytes
array = NULL;
else
{
@ -4573,16 +4570,15 @@ SetBufferLineList(
VimTryStart();
PyErr_Clear();
/* START of region without "return". Must call restore_buffer()! */
// START of region without "return". Must call restore_buffer()!
switch_to_win_for_buf(buf, &save_curwin, &save_curtab, &save_curbuf);
if (u_save((linenr_T)(lo-1), (linenr_T)hi) == FAIL)
RAISE_UNDO_FAIL;
/* If the size of the range is reducing (ie, new_len < old_len) we
* need to delete some old_len. We do this at the start, by
* repeatedly deleting line "lo".
*/
// If the size of the range is reducing (ie, new_len < old_len) we
// need to delete some old_len. We do this at the start, by
// repeatedly deleting line "lo".
if (!PyErr_Occurred())
{
for (i = 0; i < old_len - new_len; ++i)
@ -4594,10 +4590,9 @@ SetBufferLineList(
extra -= i;
}
/* For as long as possible, replace the existing old_len with the
* new old_len. This is a more efficient operation, as it requires
* less memory allocation and freeing.
*/
// For as long as possible, replace the existing old_len with the
// new old_len. This is a more efficient operation, as it requires
// less memory allocation and freeing.
if (!PyErr_Occurred())
{
for (i = 0; i < old_len && i < new_len; ++i)
@ -4611,10 +4606,9 @@ SetBufferLineList(
else
i = 0;
/* Now we may need to insert the remaining new old_len. If we do, we
* must free the strings as we finish with them (we can't pass the
* responsibility to vim in this case).
*/
// Now we may need to insert the remaining new old_len. If we do, we
// must free the strings as we finish with them (we can't pass the
// responsibility to vim in this case).
if (!PyErr_Occurred())
{
while (i < new_len)
@ -4631,23 +4625,22 @@ SetBufferLineList(
}
}
/* Free any left-over old_len, as a result of an error */
// Free any left-over old_len, as a result of an error
while (i < new_len)
{
vim_free(array[i]);
++i;
}
/* Free the array of old_len. All of its contents have now
* been dealt with (either freed, or the responsibility passed
* to vim.
*/
// Free the array of old_len. All of its contents have now
// been dealt with (either freed, or the responsibility passed
// to vim.
PyMem_Free(array);
/* Adjust marks. Invalidate any which lie in the
* changed range, and move any in the remainder of the buffer.
* Only adjust marks if we managed to switch to a window that holds
* the buffer, otherwise line numbers will be invalid. */
// Adjust marks. Invalidate any which lie in the
// changed range, and move any in the remainder of the buffer.
// Only adjust marks if we managed to switch to a window that holds
// the buffer, otherwise line numbers will be invalid.
if (save_curbuf.br_buf == NULL)
mark_adjust((linenr_T)lo, (linenr_T)(hi - 1),
(long)MAXLNUM, (long)extra);
@ -4659,7 +4652,7 @@ SetBufferLineList(
// position.
py_fix_cursor((linenr_T)lo, (linenr_T)hi, (linenr_T)extra);
/* END of region without "return". */
// END of region without "return".
restore_win_for_buf(save_curwin, save_curtab, &save_curbuf);
if (VimTryEnd())
@ -4677,7 +4670,8 @@ SetBufferLineList(
}
}
/* Insert a number of lines into the specified buffer after the specified line.
/*
* Insert a number of lines into the specified buffer after the specified line.
* The line number is in Vim format (1-based). The lines to be inserted are
* given as a Python list of string objects or as a single string. The lines
* to be added are checked for validity and correct format. Errors are
@ -4692,9 +4686,8 @@ InsertBufferLines(buf_T *buf, PyInt n, PyObject *lines, PyInt *len_change)
win_T *save_curwin = NULL;
tabpage_T *save_curtab = NULL;
/* First of all, we check the type of the supplied Python object.
* It must be a string or a list, or the call is in error.
*/
// First of all, we check the type of the supplied Python object.
// It must be a string or a list, or the call is in error.
if (PyBytes_Check(lines) || PyUnicode_Check(lines))
{
char *str = StringToLine(lines);
@ -4711,8 +4704,8 @@ InsertBufferLines(buf_T *buf, PyInt n, PyObject *lines, PyInt *len_change)
else if (ml_append((linenr_T)n, (char_u *)str, 0, FALSE) == FAIL)
RAISE_INSERT_LINE_FAIL;
else if (save_curbuf.br_buf == NULL)
/* Only adjust marks if we managed to switch to a window that
* holds the buffer, otherwise line numbers will be invalid. */
// Only adjust marks if we managed to switch to a window that
// holds the buffer, otherwise line numbers will be invalid.
appended_lines_mark((linenr_T)n, 1L);
vim_free(str);
@ -4769,7 +4762,7 @@ InsertBufferLines(buf_T *buf, PyInt n, PyObject *lines, PyInt *len_change)
{
RAISE_INSERT_LINE_FAIL;
/* Free the rest of the lines */
// Free the rest of the lines
while (i < size)
vim_free(array[i++]);
@ -4778,13 +4771,13 @@ InsertBufferLines(buf_T *buf, PyInt n, PyObject *lines, PyInt *len_change)
vim_free(array[i]);
}
if (i > 0 && save_curbuf.br_buf == NULL)
/* Only adjust marks if we managed to switch to a window that
* holds the buffer, otherwise line numbers will be invalid. */
// Only adjust marks if we managed to switch to a window that
// holds the buffer, otherwise line numbers will be invalid.
appended_lines_mark((linenr_T)n, (long)i);
}
/* Free the array of lines. All of its contents have now
* been freed. */
// Free the array of lines. All of its contents have now
// been freed.
PyMem_Free(array);
restore_win_for_buf(save_curwin, save_curtab, &save_curbuf);
@ -4924,14 +4917,14 @@ RBAsSlice(
PyInt size;
PyInt len_change;
/* Self must be a valid buffer */
// Self must be a valid buffer
if (CheckBuffer(self))
return -1;
if (end == -1)
end = self->buf->b_ml.ml_line_count;
/* Sort out the slice range */
// Sort out the slice range
size = end - start + 1;
if (lo < 0)
@ -4996,8 +4989,7 @@ RBAppend(
return Py_None;
}
/* Range object
*/
// Range object
static PyTypeObject RangeType;
static PySequenceMethods RangeAsSeq;
@ -5060,9 +5052,9 @@ RangeClear(RangeObject *self)
static PyInt
RangeLength(RangeObject *self)
{
/* HOW DO WE SIGNAL AN ERROR FROM THIS FUNCTION? */
// HOW DO WE SIGNAL AN ERROR FROM THIS FUNCTION?
if (CheckBuffer(self->buf))
return -1; /* ??? */
return -1; // ???
return (self->end - self->start + 1);
}
@ -5115,7 +5107,7 @@ RangeRepr(RangeObject *self)
}
static struct PyMethodDef RangeMethods[] = {
/* name, function, calling, documentation */
// name, function, calling, documentation
{"append", (PyCFunction)RangeAppend, METH_VARARGS, "Append data to the Vim range" },
{"__dir__", (PyCFunction)RangeDir, METH_NOARGS, ""},
{ NULL, NULL, 0, NULL}
@ -5128,7 +5120,8 @@ static PyMappingMethods BufferAsMapping;
static PyObject *
BufferNew(buf_T *buf)
{
/* We need to handle deletion of buffers underneath us.
/*
* We need to handle deletion of buffers underneath us.
* If we add a "b_python*_ref" field to the buf_T structure,
* then we can get at it in buf_freeall() in vim. We then
* need to create only ONE Python object per buffer - if
@ -5176,9 +5169,9 @@ BufferDestructor(BufferObject *self)
static PyInt
BufferLength(BufferObject *self)
{
/* HOW DO WE SIGNAL AN ERROR FROM THIS FUNCTION? */
// HOW DO WE SIGNAL AN ERROR FROM THIS FUNCTION?
if (CheckBuffer(self))
return -1; /* ??? */
return -1; // ???
return (PyInt)(self->buf->b_ml.ml_line_count);
}
@ -5255,7 +5248,7 @@ BufferSetattr(BufferObject *self, char *name, PyObject *valObject)
return -1;
VimTryStart();
/* Using aucmd_*: autocommands will be executed by rename_buffer */
// Using aucmd_*: autocommands will be executed by rename_buffer
aucmd_prepbuf(&aco, self->buf);
ren_ret = rename_buffer(val);
aucmd_restbuf(&aco);
@ -5325,7 +5318,7 @@ BufferMark(BufferObject *self, PyObject *pmarkObject)
if (posp->lnum <= 0)
{
/* Or raise an error? */
// Or raise an error?
Py_INCREF(Py_None);
return Py_None;
}
@ -5365,7 +5358,7 @@ BufferRepr(BufferObject *self)
}
static struct PyMethodDef BufferMethods[] = {
/* name, function, calling, documentation */
// name, function, calling, documentation
{"append", (PyCFunction)BufferAppend, METH_VARARGS, "Append data to Vim buffer" },
{"mark", (PyCFunction)BufferMark, METH_O, "Return (row,col) representing position of named mark" },
{"range", (PyCFunction)BufferRange, METH_VARARGS, "Return a range object which represents the part of the given buffer between line numbers s and e" },
@ -5422,7 +5415,7 @@ BufMapItem(PyObject *self UNUSED, PyObject *keyObject)
static void
BufMapIterDestruct(PyObject *buffer)
{
/* Iteration was stopped before all buffers were processed */
// Iteration was stopped before all buffers were processed
if (buffer)
{
Py_DECREF(buffer);
@ -5467,8 +5460,8 @@ BufMapIterNext(PyObject **buffer)
else if (!(next = BufferNew(((BufferObject *)(ret))->buf->b_next)))
return NULL;
*buffer = next;
/* Do not increment reference: we no longer hold it (decref), but whoever
* on other side will hold (incref). Decref+incref = nothing. */
// Do not increment reference: we no longer hold it (decref), but whoever
// on other side will hold (incref). Decref+incref = nothing.
return ret;
}
@ -5489,8 +5482,7 @@ static PyMappingMethods BufMapAsMapping = {
(objobjargproc) 0,
};
/* Current items object
*/
// Current items object
static char *CurrentAttrs[] = {
"buffer", "window", "line", "range", "tabpage",
@ -5634,7 +5626,7 @@ CurrentSetattr(PyObject *self UNUSED, char *name, PyObject *valObject)
}
static struct PyMethodDef CurrentMethods[] = {
/* name, function, calling, documentation */
// name, function, calling, documentation
{"__dir__", (PyCFunction)CurrentDir, METH_NOARGS, ""},
{ NULL, NULL, 0, NULL}
};
@ -5744,7 +5736,7 @@ run_do(const char *cmd, void *arg UNUSED
#ifdef PY_CAN_RECURSE
*pygilstate = PyGILState_Ensure();
#endif
/* Check the line number, the command my have deleted lines. */
// Check the line number, the command my have deleted lines.
if (lnum > curbuf->b_ml.ml_line_count
|| !(line = GetBufferLine(curbuf, lnum)))
goto err;
@ -5759,7 +5751,7 @@ run_do(const char *cmd, void *arg UNUSED
if (!ret)
goto err;
/* Check that the command didn't switch to another buffer. */
// Check that the command didn't switch to another buffer.
if (curbuf != was_curbuf)
{
Py_XDECREF(ret);
@ -6117,8 +6109,8 @@ convert_dl(PyObject *obj, typval_T *tv,
tv->v_type = VAR_UNKNOWN;
return -1;
}
/* As we are not using copy_tv which increments reference count we must
* do it ourself. */
// As we are not using copy_tv which increments reference count we must
// do it ourself.
if (tv->v_type == VAR_DICT)
++tv->vval.v_dict->dv_refcount;
else if (tv->v_type == VAR_LIST)
@ -6310,7 +6302,7 @@ _ConvertFromPyObject(PyObject *obj, typval_T *tv, PyObject *lookup_dict)
#endif
else if (PyObject_HasAttrString(obj, "keys"))
return convert_dl(obj, tv, pymap_to_tv, lookup_dict);
/* PyObject_GetIter can create built-in iterator for any sequence object */
// PyObject_GetIter can create built-in iterator for any sequence object
else if (PyIter_Check(obj) || PySequence_Check(obj))
return convert_dl(obj, tv, pyseq_to_tv, lookup_dict);
else if (PyMapping_Check(obj))
@ -6720,7 +6712,7 @@ init_sys_path(void)
"You should now do the following:\n"
"- append vim.path_hook to sys.path_hooks\n"
"- append vim.VIM_SPECIAL_PATH to sys.path\n"));
VimTryEnd(); /* Discard the error */
VimTryEnd(); // Discard the error
Py_DECREF(path_hook);
return 0;
}
@ -6748,7 +6740,7 @@ init_sys_path(void)
VimTryStart();
emsg(_("Failed to set path: sys.path is not a list\n"
"You should now append vim.VIM_SPECIAL_PATH to sys.path"));
VimTryEnd(); /* Discard the error */
VimTryEnd(); // Discard the error
}
return 0;

View File

@ -38,4 +38,4 @@ int is_cygpty_used(void);
#define is_cygpty_used() 0
#endif
#endif /* _ISCYGPTY_H */
#endif // _ISCYGPTY_H

View File

@ -16,7 +16,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).
*/
#define K_NUL (0xce) /* for MSDOS: special key follows */
#define K_NUL (0xce) // for MSDOS: special key follows
/*
* K_SPECIAL is the first byte of a special key code and is always followed by
@ -92,29 +92,29 @@
*/
#define KS_TEAROFF 244
/* Used for JSB term mouse. */
// Used for JSB term mouse.
#define KS_JSBTERM_MOUSE 243
/* Used a termcap entry that produces a normal character. */
// Used a termcap entry that produces a normal character.
#define KS_KEY 242
/* Used for the qnx pterm mouse. */
// Used for the qnx pterm mouse.
#define KS_PTERM_MOUSE 241
/* Used for click in a tab pages label. */
// Used for click in a tab pages label.
#define KS_TABLINE 240
/* Used for menu in a tab pages line. */
// Used for menu in a tab pages line.
#define KS_TABMENU 239
/* Used for the urxvt mouse. */
// Used for the urxvt mouse.
#define KS_URXVT_MOUSE 238
/* Used for the sgr mouse. */
// Used for the sgr mouse.
#define KS_SGR_MOUSE 237
#define KS_SGR_MOUSE_RELEASE 236
/* Used for the GPM mouse. */
// Used for the GPM mouse.
#define KS_GPM_MOUSE 235
/*
@ -150,12 +150,12 @@
*/
enum key_extra
{
KE_NAME = 3 /* name of this terminal entry */
KE_NAME = 3 // name of this terminal entry
, KE_S_UP = 4 /* shift-up */
, KE_S_DOWN = 5 /* shift-down */
, KE_S_UP = 4 // shift-up
, KE_S_DOWN = 5 // shift-down
, KE_S_F1 = 6 /* shifted function keys */
, KE_S_F1 = 6 // shifted function keys
, KE_S_F2 = 7
, KE_S_F3 = 8
, KE_S_F4 = 9
@ -196,84 +196,84 @@ enum key_extra
, KE_S_F36 = 41
, KE_S_F37 = 42
, KE_MOUSE = 43 /* mouse event start */
, KE_MOUSE = 43 // mouse event start
/*
* Symbols for pseudo keys which are translated from the real key symbols
* above.
*/
, KE_LEFTMOUSE = 44 /* Left mouse button click */
, KE_LEFTDRAG = 45 /* Drag with left mouse button down */
, KE_LEFTRELEASE = 46 /* Left mouse button release */
, KE_MIDDLEMOUSE = 47 /* Middle mouse button click */
, KE_MIDDLEDRAG = 48 /* Drag with middle mouse button down */
, KE_MIDDLERELEASE = 49 /* Middle mouse button release */
, KE_RIGHTMOUSE = 50 /* Right mouse button click */
, KE_RIGHTDRAG = 51 /* Drag with right mouse button down */
, KE_RIGHTRELEASE = 52 /* Right mouse button release */
, KE_LEFTMOUSE = 44 // Left mouse button click
, KE_LEFTDRAG = 45 // Drag with left mouse button down
, KE_LEFTRELEASE = 46 // Left mouse button release
, KE_MIDDLEMOUSE = 47 // Middle mouse button click
, KE_MIDDLEDRAG = 48 // Drag with middle mouse button down
, KE_MIDDLERELEASE = 49 // Middle mouse button release
, KE_RIGHTMOUSE = 50 // Right mouse button click
, KE_RIGHTDRAG = 51 // Drag with right mouse button down
, KE_RIGHTRELEASE = 52 // Right mouse button release
, KE_IGNORE = 53 /* Ignored mouse drag/release */
, KE_IGNORE = 53 // Ignored mouse drag/release
, KE_TAB = 54 /* unshifted TAB key */
, KE_S_TAB_OLD = 55 /* shifted TAB key (no longer used) */
, KE_TAB = 54 // unshifted TAB key
, KE_S_TAB_OLD = 55 // shifted TAB key (no longer used)
, KE_SNIFF_UNUSED = 56 /* obsolete */
, KE_XF1 = 57 /* extra vt100 function keys for xterm */
, KE_SNIFF_UNUSED = 56 // obsolete
, KE_XF1 = 57 // extra vt100 function keys for xterm
, KE_XF2 = 58
, KE_XF3 = 59
, KE_XF4 = 60
, KE_XEND = 61 /* extra (vt100) end key for xterm */
, KE_ZEND = 62 /* extra (vt100) end key for xterm */
, KE_XHOME = 63 /* extra (vt100) home key for xterm */
, KE_ZHOME = 64 /* extra (vt100) home key for xterm */
, KE_XUP = 65 /* extra vt100 cursor keys for xterm */
, KE_XEND = 61 // extra (vt100) end key for xterm
, KE_ZEND = 62 // extra (vt100) end key for xterm
, KE_XHOME = 63 // extra (vt100) home key for xterm
, KE_ZHOME = 64 // extra (vt100) home key for xterm
, KE_XUP = 65 // extra vt100 cursor keys for xterm
, KE_XDOWN = 66
, KE_XLEFT = 67
, KE_XRIGHT = 68
, KE_LEFTMOUSE_NM = 69 /* non-mappable Left mouse button click */
, KE_LEFTRELEASE_NM = 70 /* non-mappable left mouse button release */
, KE_LEFTMOUSE_NM = 69 // non-mappable Left mouse button click
, KE_LEFTRELEASE_NM = 70 // non-mappable left mouse button release
, KE_S_XF1 = 71 /* vt100 shifted function keys for xterm */
, KE_S_XF1 = 71 // vt100 shifted function keys for xterm
, KE_S_XF2 = 72
, KE_S_XF3 = 73
, KE_S_XF4 = 74
/* NOTE: The scroll wheel events are inverted: i.e. UP is the same as
* moving the actual scroll wheel down, LEFT is the same as moving the
* scroll wheel right. */
, KE_MOUSEDOWN = 75 /* scroll wheel pseudo-button Down */
, KE_MOUSEUP = 76 /* scroll wheel pseudo-button Up */
, KE_MOUSELEFT = 77 /* scroll wheel pseudo-button Left */
, KE_MOUSERIGHT = 78 /* scroll wheel pseudo-button Right */
// NOTE: The scroll wheel events are inverted: i.e. UP is the same as
// moving the actual scroll wheel down, LEFT is the same as moving the
// scroll wheel right.
, KE_MOUSEDOWN = 75 // scroll wheel pseudo-button Down
, KE_MOUSEUP = 76 // scroll wheel pseudo-button Up
, KE_MOUSELEFT = 77 // scroll wheel pseudo-button Left
, KE_MOUSERIGHT = 78 // scroll wheel pseudo-button Right
, KE_KINS = 79 /* keypad Insert key */
, KE_KDEL = 80 /* keypad Delete key */
, KE_KINS = 79 // keypad Insert key
, KE_KDEL = 80 // keypad Delete key
, KE_CSI = 81 /* CSI typed directly */
, KE_SNR = 82 /* <SNR> */
, KE_PLUG = 83 /* <Plug> */
, KE_CMDWIN = 84 /* open command-line window from Command-line Mode */
, KE_CSI = 81 // CSI typed directly
, KE_SNR = 82 // <SNR>
, KE_PLUG = 83 // <Plug>
, KE_CMDWIN = 84 // open command-line window from Command-line Mode
, KE_C_LEFT = 85 /* control-left */
, KE_C_RIGHT = 86 /* control-right */
, KE_C_HOME = 87 /* control-home */
, KE_C_END = 88 /* control-end */
, KE_C_LEFT = 85 // control-left
, KE_C_RIGHT = 86 // control-right
, KE_C_HOME = 87 // control-home
, KE_C_END = 88 // control-end
, KE_X1MOUSE = 89 /* X1/X2 mouse-buttons */
, KE_X1MOUSE = 89 // X1/X2 mouse-buttons
, KE_X1DRAG = 90
, KE_X1RELEASE = 91
, KE_X2MOUSE = 92
, KE_X2DRAG = 93
, KE_X2RELEASE = 94
, KE_DROP = 95 /* DnD data is available */
, KE_CURSORHOLD = 96 /* CursorHold event */
, KE_NOP = 97 /* doesn't do something */
, KE_FOCUSGAINED = 98 /* focus gained */
, KE_FOCUSLOST = 99 /* focus lost */
, KE_MOUSEMOVE = 100 /* mouse moved with no button down */
, KE_CANCEL = 101 /* return from vgetc() */
, KE_DROP = 95 // DnD data is available
, KE_CURSORHOLD = 96 // CursorHold event
, KE_NOP = 97 // doesn't do something
, KE_FOCUSGAINED = 98 // focus gained
, KE_FOCUSLOST = 99 // focus lost
, KE_MOUSEMOVE = 100 // mouse moved with no button down
, KE_CANCEL = 101 // return from vgetc()
};
/*
@ -298,19 +298,19 @@ enum key_extra
#define K_TAB TERMCAP2KEY(KS_EXTRA, KE_TAB)
#define K_S_TAB TERMCAP2KEY('k', 'B')
/* extra set of function keys F1-F4, for vt100 compatible xterm */
// extra set of function keys F1-F4, for vt100 compatible xterm
#define K_XF1 TERMCAP2KEY(KS_EXTRA, KE_XF1)
#define K_XF2 TERMCAP2KEY(KS_EXTRA, KE_XF2)
#define K_XF3 TERMCAP2KEY(KS_EXTRA, KE_XF3)
#define K_XF4 TERMCAP2KEY(KS_EXTRA, KE_XF4)
/* extra set of cursor keys for vt100 compatible xterm */
// extra set of cursor keys for vt100 compatible xterm
#define K_XUP TERMCAP2KEY(KS_EXTRA, KE_XUP)
#define K_XDOWN TERMCAP2KEY(KS_EXTRA, KE_XDOWN)
#define K_XLEFT TERMCAP2KEY(KS_EXTRA, KE_XLEFT)
#define K_XRIGHT TERMCAP2KEY(KS_EXTRA, KE_XRIGHT)
#define K_F1 TERMCAP2KEY('k', '1') /* function keys */
#define K_F1 TERMCAP2KEY('k', '1') // function keys
#define K_F2 TERMCAP2KEY('k', '2')
#define K_F3 TERMCAP2KEY('k', '3')
#define K_F4 TERMCAP2KEY('k', '4')
@ -351,13 +351,13 @@ enum key_extra
#define K_F36 TERMCAP2KEY('F', 'Q')
#define K_F37 TERMCAP2KEY('F', 'R')
/* extra set of shifted function keys F1-F4, for vt100 compatible xterm */
// extra set of shifted function keys F1-F4, for vt100 compatible xterm
#define K_S_XF1 TERMCAP2KEY(KS_EXTRA, KE_S_XF1)
#define K_S_XF2 TERMCAP2KEY(KS_EXTRA, KE_S_XF2)
#define K_S_XF3 TERMCAP2KEY(KS_EXTRA, KE_S_XF3)
#define K_S_XF4 TERMCAP2KEY(KS_EXTRA, KE_S_XF4)
#define K_S_F1 TERMCAP2KEY(KS_EXTRA, KE_S_F1) /* shifted func. keys */
#define K_S_F1 TERMCAP2KEY(KS_EXTRA, KE_S_F1) // shifted func. keys
#define K_S_F2 TERMCAP2KEY(KS_EXTRA, KE_S_F2)
#define K_S_F3 TERMCAP2KEY(KS_EXTRA, KE_S_F3)
#define K_S_F4 TERMCAP2KEY(KS_EXTRA, KE_S_F4)
@ -370,7 +370,7 @@ enum key_extra
#define K_S_F11 TERMCAP2KEY(KS_EXTRA, KE_S_F11)
#define K_S_F12 TERMCAP2KEY(KS_EXTRA, KE_S_F12)
/* K_S_F13 to K_S_F37 are currently not used */
// K_S_F13 to K_S_F37 are currently not used
#define K_HELP TERMCAP2KEY('%', '1')
#define K_UNDO TERMCAP2KEY('&', '8')
@ -382,37 +382,37 @@ enum key_extra
#define K_DEL TERMCAP2KEY('k', 'D')
#define K_KDEL TERMCAP2KEY(KS_EXTRA, KE_KDEL)
#define K_HOME TERMCAP2KEY('k', 'h')
#define K_KHOME TERMCAP2KEY('K', '1') /* keypad home (upper left) */
#define K_KHOME TERMCAP2KEY('K', '1') // keypad home (upper left)
#define K_XHOME TERMCAP2KEY(KS_EXTRA, KE_XHOME)
#define K_ZHOME TERMCAP2KEY(KS_EXTRA, KE_ZHOME)
#define K_END TERMCAP2KEY('@', '7')
#define K_KEND TERMCAP2KEY('K', '4') /* keypad end (lower left) */
#define K_KEND TERMCAP2KEY('K', '4') // keypad end (lower left)
#define K_XEND TERMCAP2KEY(KS_EXTRA, KE_XEND)
#define K_ZEND TERMCAP2KEY(KS_EXTRA, KE_ZEND)
#define K_PAGEUP TERMCAP2KEY('k', 'P')
#define K_PAGEDOWN TERMCAP2KEY('k', 'N')
#define K_KPAGEUP TERMCAP2KEY('K', '3') /* keypad pageup (upper R.) */
#define K_KPAGEDOWN TERMCAP2KEY('K', '5') /* keypad pagedown (lower R.) */
#define K_KPAGEUP TERMCAP2KEY('K', '3') // keypad pageup (upper R.)
#define K_KPAGEDOWN TERMCAP2KEY('K', '5') // keypad pagedown (lower R.)
#define K_KPLUS TERMCAP2KEY('K', '6') /* keypad plus */
#define K_KMINUS TERMCAP2KEY('K', '7') /* keypad minus */
#define K_KDIVIDE TERMCAP2KEY('K', '8') /* keypad / */
#define K_KMULTIPLY TERMCAP2KEY('K', '9') /* keypad * */
#define K_KENTER TERMCAP2KEY('K', 'A') /* keypad Enter */
#define K_KPOINT TERMCAP2KEY('K', 'B') /* keypad . or ,*/
#define K_PS TERMCAP2KEY('P', 'S') /* paste start */
#define K_PE TERMCAP2KEY('P', 'E') /* paste end */
#define K_KPLUS TERMCAP2KEY('K', '6') // keypad plus
#define K_KMINUS TERMCAP2KEY('K', '7') // keypad minus
#define K_KDIVIDE TERMCAP2KEY('K', '8') // keypad /
#define K_KMULTIPLY TERMCAP2KEY('K', '9') // keypad *
#define K_KENTER TERMCAP2KEY('K', 'A') // keypad Enter
#define K_KPOINT TERMCAP2KEY('K', 'B') // keypad . or ,
#define K_PS TERMCAP2KEY('P', 'S') // paste start
#define K_PE TERMCAP2KEY('P', 'E') // paste end
#define K_K0 TERMCAP2KEY('K', 'C') /* keypad 0 */
#define K_K1 TERMCAP2KEY('K', 'D') /* keypad 1 */
#define K_K2 TERMCAP2KEY('K', 'E') /* keypad 2 */
#define K_K3 TERMCAP2KEY('K', 'F') /* keypad 3 */
#define K_K4 TERMCAP2KEY('K', 'G') /* keypad 4 */
#define K_K5 TERMCAP2KEY('K', 'H') /* keypad 5 */
#define K_K6 TERMCAP2KEY('K', 'I') /* keypad 6 */
#define K_K7 TERMCAP2KEY('K', 'J') /* keypad 7 */
#define K_K8 TERMCAP2KEY('K', 'K') /* keypad 8 */
#define K_K9 TERMCAP2KEY('K', 'L') /* keypad 9 */
#define K_K0 TERMCAP2KEY('K', 'C') // keypad 0
#define K_K1 TERMCAP2KEY('K', 'D') // keypad 1
#define K_K2 TERMCAP2KEY('K', 'E') // keypad 2
#define K_K3 TERMCAP2KEY('K', 'F') // keypad 3
#define K_K4 TERMCAP2KEY('K', 'G') // keypad 4
#define K_K5 TERMCAP2KEY('K', 'H') // keypad 5
#define K_K6 TERMCAP2KEY('K', 'I') // keypad 6
#define K_K7 TERMCAP2KEY('K', 'J') // keypad 7
#define K_K8 TERMCAP2KEY('K', 'K') // keypad 8
#define K_K9 TERMCAP2KEY('K', 'L') // keypad 9
#define K_MOUSE TERMCAP2KEY(KS_MOUSE, KE_FILLER)
#define K_MENU TERMCAP2KEY(KS_MENU, KE_FILLER)
@ -477,15 +477,15 @@ enum key_extra
#define K_CURSORHOLD TERMCAP2KEY(KS_EXTRA, KE_CURSORHOLD)
/* Bits for modifier mask */
/* 0x01 cannot be used, because the modifier must be 0x02 or higher */
// Bits for modifier mask
// 0x01 cannot be used, because the modifier must be 0x02 or higher
#define MOD_MASK_SHIFT 0x02
#define MOD_MASK_CTRL 0x04
#define MOD_MASK_ALT 0x08 /* aka META */
#define MOD_MASK_META 0x10 /* META when it's different from ALT */
#define MOD_MASK_2CLICK 0x20 /* use MOD_MASK_MULTI_CLICK */
#define MOD_MASK_3CLICK 0x40 /* use MOD_MASK_MULTI_CLICK */
#define MOD_MASK_4CLICK 0x60 /* use MOD_MASK_MULTI_CLICK */
#define MOD_MASK_ALT 0x08 // aka META
#define MOD_MASK_META 0x10 // META when it's different from ALT
#define MOD_MASK_2CLICK 0x20 // use MOD_MASK_MULTI_CLICK
#define MOD_MASK_3CLICK 0x40 // use MOD_MASK_MULTI_CLICK
#define MOD_MASK_4CLICK 0x60 // use MOD_MASK_MULTI_CLICK
#ifdef MACOS_X
# define MOD_MASK_CMD 0x80
#endif
@ -499,7 +499,8 @@ enum key_extra
*/
#define MAX_KEY_NAME_LEN 32
/* Maximum length of a special key event as tokens. This includes modifiers.
/*
* Maximum length of a special key event as tokens. This includes modifiers.
* The longest event is something like <M-C-S-T-4-LeftDrag> which would be the
* following string of tokens:
*

View File

@ -74,7 +74,7 @@
# endif
#endif
/* toupper() and tolower() for ASCII only and ignore the current locale. */
// toupper() and tolower() for ASCII only and ignore the current locale.
#ifdef EBCDIC
# define TOUPPER_ASC(c) (islower(c) ? toupper(c) : (c))
# define TOLOWER_ASC(c) (isupper(c) ? tolower(c) : (c))
@ -92,13 +92,13 @@
#define MB_TOLOWER(c) vim_tolower(c)
#define MB_TOUPPER(c) vim_toupper(c)
/* Use our own isdigit() replacement, because on MS-Windows isdigit() returns
* non-zero for superscript 1. Also avoids that isdigit() crashes for numbers
* below 0 and above 255. */
// Use our own isdigit() replacement, because on MS-Windows isdigit() returns
// non-zero for superscript 1. Also avoids that isdigit() crashes for numbers
// below 0 and above 255.
#define VIM_ISDIGIT(c) ((unsigned)(c) - '0' < 10)
/* Like isalpha() but reject non-ASCII characters. Can't be used with a
* special key (negative value). */
// Like isalpha() but reject non-ASCII characters. Can't be used with a
// special key (negative value).
#ifdef EBCDIC
# define ASCII_ISALPHA(c) isalpha(c)
# define ASCII_ISALNUM(c) isalnum(c)
@ -111,7 +111,7 @@
# define ASCII_ISALNUM(c) (ASCII_ISALPHA(c) || VIM_ISDIGIT(c))
#endif
/* Returns empty string if it is NULL. */
// Returns empty string if it is NULL.
#define EMPTY_IF_NULL(x) ((x) ? (x) : (char_u *)"")
#ifdef FEAT_LANGMAP
@ -138,7 +138,7 @@
} \
} while (0)
#else
# define LANGMAP_ADJUST(c, condition) /* nop */
# define LANGMAP_ADJUST(c, condition) // nop
#endif
/*
@ -153,10 +153,10 @@
*/
#ifdef VMS
# define mch_access(n, p) access(vms_fixfilename(n), (p))
/* see mch_open() comment */
// see mch_open() comment
# define mch_fopen(n, p) fopen(vms_fixfilename(n), (p))
# define mch_fstat(n, p) fstat(vms_fixfilename(n), (p))
/* VMS does not have lstat() */
// VMS does not have lstat()
# define mch_stat(n, p) stat(vms_fixfilename(n), (p))
# define mch_rmdir(n) rmdir(vms_fixfilename(n))
#else
@ -190,8 +190,8 @@
# define mch_open(n, m, p) open(vms_fixfilename(n), (m), (p))
#endif
/* mch_open_rw(): invoke mch_open() with third argument for user R/W. */
#if defined(UNIX) || defined(VMS) /* open in rw------- mode */
// mch_open_rw(): invoke mch_open() with third argument for user R/W.
#if defined(UNIX) || defined(VMS) // open in rw------- mode
# define mch_open_rw(n, f) mch_open((n), (f), (mode_t)0600)
#else
# if defined(MSWIN) // open read/write
@ -217,7 +217,7 @@
#endif
#ifdef FEAT_RIGHTLEFT
/* Whether to draw the vertical bar on the right side of the cell. */
// Whether to draw the vertical bar on the right side of the cell.
# define CURSOR_BAR_RIGHT (curwin->w_p_rl && (!(State & CMDLINE) || cmdmsg_rl))
#endif
@ -229,13 +229,13 @@
* MB_COPY_CHAR(f, t): copy one char from "f" to "t" and advance the pointers.
* PTR2CHAR(): get character from pointer.
*/
/* Advance multi-byte pointer, skip over composing chars. */
// Advance multi-byte pointer, skip over composing chars.
#define MB_PTR_ADV(p) p += (*mb_ptr2len)(p)
/* Advance multi-byte pointer, do not skip over composing chars. */
// Advance multi-byte pointer, do not skip over composing chars.
#define MB_CPTR_ADV(p) p += enc_utf8 ? utf_ptr2len(p) : (*mb_ptr2len)(p)
/* Backup multi-byte pointer. Only use with "p" > "s" ! */
// Backup multi-byte pointer. Only use with "p" > "s" !
#define MB_PTR_BACK(s, p) p -= has_mbyte ? ((*mb_head_off)(s, p - 1) + 1) : 1
/* get length of multi-byte char, not including composing chars */
// get length of multi-byte char, not including composing chars
#define MB_CPTR2LEN(p) (enc_utf8 ? utf_ptr2len(p) : (*mb_ptr2len)(p))
#define MB_COPY_CHAR(f, t) do { if (has_mbyte) mb_copy_char(&f, &t); else *t++ = *f++; } while (0)
@ -265,7 +265,7 @@
#if defined(FEAT_EVAL) && defined(FEAT_FLOAT)
# include <float.h>
# if defined(HAVE_MATH_H)
/* for isnan() and isinf() */
// for isnan() and isinf()
# include <math.h>
# endif
# ifdef USING_FLOAT_STUFF
@ -335,7 +335,7 @@
} \
} while (0)
/* Whether a command index indicates a user command. */
// Whether a command index indicates a user command.
#define IS_USER_CMDIDX(idx) ((int)(idx) < 0)
// Give an error in curwin is a popup window and evaluate to TRUE.

View File

@ -36,9 +36,9 @@
# define NBDEBUG_TRACE 1
typedef enum {
WT_ENV = 1, /* look for env var if set */
WT_WAIT, /* look for ~/.gvimwait if set */
WT_STOP /* look for ~/.gvimstop if set */
WT_ENV = 1, // look for env var if set
WT_WAIT, // look for ~/.gvimwait if set
WT_STOP // look for ~/.gvimstop if set
} WtWait;
@ -52,9 +52,9 @@ void nbdebug_wait(u_int wait_flags, char *wait_var, u_int wait_secs);
void nbdebug_log_init(char *log_var, char *level_var);
extern FILE *nb_debug;
extern u_int nb_dlevel; /* nb_debug verbosity level */
extern u_int nb_dlevel; // nb_debug verbosity level
# else /* not NBDEBUG */
#else // not NBDEBUG
# ifndef ASSERT
# define ASSERT(c)
@ -72,5 +72,5 @@ nbdbg(
{
}
#endif /* NBDEBUG */
#endif /* NBDEBUG_H */
#endif // NBDEBUG
#endif // NBDEBUG_H

View File

@ -197,7 +197,7 @@
#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 */
// 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
@ -207,7 +207,7 @@
#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 */
// default values for Vim, Vi and POSIX
#define CPO_VIM "aABceFs"
#define CPO_VI "aAbBcCdDeEfFgHiIjJkKlLmMnoOpPqrRsStuvwWxXyZ$!%*-+<>;"
#define CPO_ALL "aAbBcCdDeEfFgHiIjJkKlLmMnoOpPqrRsStuvwWxXyZ$!%*-+<>#{|&/\\.;"

View File

@ -10,9 +10,9 @@
* Amiga Machine-dependent things
*/
#define CASE_INSENSITIVE_FILENAME /* ignore case when comparing file names */
#define CASE_INSENSITIVE_FILENAME // ignore case when comparing file names
#define SPACE_IN_FILENAME
#define USE_FNAME_CASE /* adjust case of file names */
#define USE_FNAME_CASE // adjust case of file names
#define USE_TERM_CONSOLE
#define HAVE_AVAIL_MEM
@ -26,7 +26,7 @@
# define HAVE_STRCSPN
# define HAVE_STRICMP
# define HAVE_STRNICMP
# define HAVE_STRFTIME /* guessed */
# define HAVE_STRFTIME // guessed
# define HAVE_SETENV
# define HAVE_MEMSET
# define HAVE_QSORT
@ -34,10 +34,10 @@
# define HAVE_DATE_TIME
# endif
#endif /* HAVE_CONFIG_H */
#endif // HAVE_CONFIG_H
#ifndef DFLT_ERRORFILE
# define DFLT_ERRORFILE "AztecC.Err" /* Should this change? */
# define DFLT_ERRORFILE "AztecC.Err" // Should this change?
#endif
#ifndef DFLT_RUNTIMEPATH
@ -48,7 +48,7 @@
#endif
#ifndef BASENAMELEN
# define BASENAMELEN 26 /* Amiga */
# define BASENAMELEN 26 // Amiga
#endif
#ifndef TEMPNAME
@ -56,23 +56,23 @@
# define TEMPNAMELEN 12
#endif
/* cproto fails on missing include files */
// cproto fails on missing include files
#ifndef PROTO
#include <exec/types.h>
#include <libraries/dos.h>
#include <libraries/dosextens.h>
/* Currently, all Amiga compilers except AZTEC C have these... */
// Currently, all Amiga compilers except AZTEC C have these...
#ifndef AZTEC_C
# include <proto/exec.h>
# include <proto/dos.h>
# include <proto/intuition.h>
#endif
#endif /* PROTO */
#endif // PROTO
#define FNAME_ILLEGAL ";*?`#%" /* illegal characters in a file name */
#define FNAME_ILLEGAL ";*?`#%" // illegal characters in a file name
/*
* Manx doesn't have off_t, define it here.
@ -82,7 +82,7 @@ typedef long off_t;
#endif
#ifdef LATTICE
# define USE_TMPNAM /* use tmpnam() instead of mktemp() */
# define USE_TMPNAM // use tmpnam() instead of mktemp()
#endif
#ifdef __GNUC__
@ -104,7 +104,7 @@ typedef long off_t;
# include <libraries/arpbase.h>
#endif
#endif /* PROTO */
#endif // PROTO
/*
* This won't be needed if you have a version of Lattice 4.01 without broken
@ -193,7 +193,7 @@ typedef long off_t;
# ifndef VIMINFO_FILE
# define VIMINFO_FILE "s:.viminfo"
# endif
#endif /* FEAT_VIMINFO */
#endif
#ifndef EXRC_FILE
# define EXRC_FILE ".exrc"
@ -208,22 +208,22 @@ typedef long off_t;
#endif
#ifndef DFLT_BDIR
# define DFLT_BDIR ".,t:" /* default for 'backupdir' */
# define DFLT_BDIR ".,t:" // default for 'backupdir'
#endif
#ifndef DFLT_DIR
# define DFLT_DIR ".,t:" /* default for 'directory' */
# define DFLT_DIR ".,t:" // default for 'directory'
#endif
#ifndef DFLT_VDIR
# define DFLT_VDIR "$VIM/vimfiles/view" /* default for 'viewdir' */
# define DFLT_VDIR "$VIM/vimfiles/view" // default for 'viewdir'
#endif
#ifndef DFLT_MAXMEM
# define DFLT_MAXMEM 256 /* use up to 256Kbyte for buffer */
# define DFLT_MAXMEM 256 // use up to 256Kbyte for buffer
#endif
#ifndef DFLT_MAXMEMTOT
# define DFLT_MAXMEMTOT 0 /* decide in set_init */
# define DFLT_MAXMEMTOT 0 // decide in set_init
#endif
#if defined(SASC)

View File

@ -20,8 +20,8 @@
#undef BEOS_DR8
#define BEOS_PR_OR_BETTER
/* select emulation */
// select emulation
#ifndef PROTO
# include <net/socket.h> /* for typedefs and #defines only */
# include <net/socket.h> // for typedefs and #defines only
#endif

View File

@ -112,24 +112,24 @@
#endif
#ifndef DFLT_BDIR
# define DFLT_BDIR ".,$TEMP,c:\\tmp,c:\\temp" /* default for 'backupdir' */
# define DFLT_BDIR ".,$TEMP,c:\\tmp,c:\\temp" // default for 'backupdir'
#endif
#ifndef DFLT_VDIR
# define DFLT_VDIR "$VIM/vimfiles/view" /* default for 'viewdir' */
# define DFLT_VDIR "$VIM/vimfiles/view" // default for 'viewdir'
#endif
#ifndef DFLT_DIR
# define DFLT_DIR ".,$TEMP,c:\\tmp,c:\\temp" /* default for 'directory' */
# define DFLT_DIR ".,$TEMP,c:\\tmp,c:\\temp" // default for 'directory'
#endif
#define DFLT_ERRORFILE "errors.err"
#define DFLT_RUNTIMEPATH "$HOME/vimfiles,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,$HOME/vimfiles/after"
#define CLEAN_RUNTIMEPATH "$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after"
#define CASE_INSENSITIVE_FILENAME /* ignore case when comparing file names */
#define CASE_INSENSITIVE_FILENAME // ignore case when comparing file names
#define SPACE_IN_FILENAME
#define BACKSLASH_IN_FILENAME
#define USE_CRNL /* lines end in CR-NL instead of NL */
#define HAVE_DUP /* have dup() */
#define HAVE_ST_MODE /* have stat.st_mode */
#define USE_CRNL // lines end in CR-NL instead of NL
#define HAVE_DUP // have dup()
#define HAVE_ST_MODE // have stat.st_mode

View File

@ -6,17 +6,16 @@
* Do ":help credits" in Vim to see a list of people who contributed.
*/
/* Before Including the MacOS specific files,
* lets set the OPAQUE_TOOLBOX_STRUCTS to 0 so we
* can access the internal structures.
* (Until fully Carbon compliant)
* TODO: Can we remove this? (Dany)
*/
// Before Including the MacOS specific files,
// lets set the OPAQUE_TOOLBOX_STRUCTS to 0 so we
// can access the internal structures.
// (Until fully Carbon compliant)
// TODO: Can we remove this? (Dany)
#if 0
# define OPAQUE_TOOLBOX_STRUCTS 0
#endif
/* Include MAC_OS_X_VERSION_* macros */
// Include MAC_OS_X_VERSION_* macros
#ifdef HAVE_AVAILABILITYMACROS_H
# include <AvailabilityMacros.h>
#endif
@ -28,7 +27,7 @@
* files have many conflicts).
*/
#ifdef FEAT_GUI_MAC
# include <Quickdraw.h> /* Apple calls it QuickDraw.h... */
# include <Quickdraw.h> // Apple calls it QuickDraw.h...
# include <ToolUtils.h>
# include <LowMem.h>
# include <Scrap.h>
@ -43,17 +42,17 @@
/*
* Unix interface
*/
#if defined(__APPLE_CC__) /* for Project Builder and ... */
#if defined(__APPLE_CC__) // for Project Builder and ...
# include <unistd.h>
/* Get stat.h or something similar. Comment: How come some OS get in in vim.h */
// Get stat.h or something similar. Comment: How come some OS get in in vim.h
# include <sys/stat.h>
/* && defined(HAVE_CURSE) */
/* The curses.h from MacOS X provides by default some BACKWARD compatibility
* definition which can cause us problem later on. So we undefine a few of them. */
// && defined(HAVE_CURSE)
// The curses.h from MacOS X provides by default some BACKWARD compatibility
// definition which can cause us problem later on. So we undefine a few of them.
# include <curses.h>
# undef reg
# undef ospeed
/* OK defined to 0 in MacOS X 10.2 curses! Remove it, we define it to be 1. */
// OK defined to 0 in MacOS X 10.2 curses! Remove it, we define it to be 1.
# undef OK
#endif
#include <signal.h>
@ -67,14 +66,13 @@
* MacOS specific #define
*/
/* This will go away when CMD_KEY fully tested */
// This will go away when CMD_KEY fully tested
#define USE_CMD_KEY
/* On MacOS X use the / not the : */
/* TODO: Should file such as ~/.vimrc reside instead in
* ~/Library/Vim or ~/Library/Preferences/org.vim.vim/ ? (Dany)
*/
/* When compiled under MacOS X (including CARBON version)
* we use the Unix File path style. Also when UNIX is defined. */
// On MacOS X use the / not the :
// TODO: Should file such as ~/.vimrc reside instead in
// ~/Library/Vim or ~/Library/Preferences/org.vim.vim/ ? (Dany)
// When compiled under MacOS X (including CARBON version)
// we use the Unix File path style. Also when UNIX is defined.
#define USE_UNIXFILENAME
@ -85,15 +83,15 @@
#define FEAT_SOURCE_FFS
#define FEAT_SOURCE_FF_MAC
#define USE_EXE_NAME /* to find $VIM */
#define CASE_INSENSITIVE_FILENAME /* ignore case when comparing file names */
#define USE_EXE_NAME // to find $VIM
#define CASE_INSENSITIVE_FILENAME // ignore case when comparing file names
#define SPACE_IN_FILENAME
#define BREAKCHECK_SKIP 32 /* call mch_breakcheck() each time, it's
quite fast. Did I forgot to update the
comment */
#define BREAKCHECK_SKIP 32 // call mch_breakcheck() each time, it's
// quite fast. Did I forgot to update the
// comment
#define USE_FNAME_CASE /* make ":e os_Mac.c" open the file in its
original case, as "os_mac.c" */
#define USE_FNAME_CASE // make ":e os_Mac.c" open the file in its
// original case, as "os_mac.c"
#define BINARY_FILE_IO
#define EOL_DEFAULT EOL_MAC
#define HAVE_AVAIL_MEM
@ -102,10 +100,10 @@
# define HAVE_STRING_H
# define HAVE_STRCSPN
# define HAVE_MEMSET
# define USE_TMPNAM /* use tmpnam() instead of mktemp() */
# define USE_TMPNAM // use tmpnam() instead of mktemp()
# define HAVE_FCNTL_H
# define HAVE_QSORT
# define HAVE_ST_MODE /* have stat.st_mode */
# define HAVE_ST_MODE // have stat.st_mode
# define HAVE_MATH_H
# if defined(__DATE__) && defined(__TIME__)
@ -193,18 +191,18 @@
# ifndef VIMINFO_FILE
# define VIMINFO_FILE "~/.viminfo"
# endif
#endif /* FEAT_VIMINFO */
#endif // FEAT_VIMINFO
#ifndef DFLT_BDIR
# define DFLT_BDIR "." /* default for 'backupdir' */
# define DFLT_BDIR "." // default for 'backupdir'
#endif
#ifndef DFLT_DIR
# define DFLT_DIR "." /* default for 'directory' */
# define DFLT_DIR "." // default for 'directory'
#endif
#ifndef DFLT_VDIR
# define DFLT_VDIR "$VIM/vimfiles/view" /* default for 'viewdir' */
# define DFLT_VDIR "$VIM/vimfiles/view" // default for 'viewdir'
#endif
#define DFLT_ERRORFILE "errors.err"
@ -219,14 +217,14 @@
/*
* Macintosh has plenty of memory, use large buffers
*/
#define CMDBUFFSIZE 1024 /* size of the command processing buffer */
#define CMDBUFFSIZE 1024 // size of the command processing buffer
#ifndef DFLT_MAXMEM
# define DFLT_MAXMEM 512 /* use up to 512 Kbyte for buffer */
# define DFLT_MAXMEM 512 // use up to 512 Kbyte for buffer
#endif
#ifndef DFLT_MAXMEMTOT
# define DFLT_MAXMEMTOT 2048 /* use up to 2048 Kbyte for Vim */
# define DFLT_MAXMEMTOT 2048 // use up to 2048 Kbyte for Vim
#endif
#define WILDCHAR_LIST "*?[{`$"
@ -239,7 +237,7 @@
# define mch_getenv(name) ((char_u *)getenv((char *)(name)))
# define mch_setenv(name, val, x) setenv(name, val, x)
# else
/* vim_getenv() is in pty.c */
// vim_getenv() is in pty.c
# define USE_VIMPTY_GETENV
# define mch_getenv(x) vimpty_getenv(x)
# define mch_setenv(name, val, x) setenv(name, val, x)
@ -248,18 +246,17 @@
#ifndef HAVE_CONFIG_H
# ifdef __APPLE_CC__
/* Assuming compiling for MacOS X */
/* Trying to take advantage of the prebinding */
// Assuming compiling for MacOS X
// Trying to take advantage of the prebinding
# define HAVE_TGETENT
# define OSPEED_EXTERN
# define UP_BC_PC_EXTERN
# endif
#endif
/* Some "prep work" definition to be able to compile the MacOS X
* version with os_unix.c instead of os_mac.c. Based on the result
* of ./configure for console MacOS X.
*/
// Some "prep work" definition to be able to compile the MacOS X
// version with os_unix.c instead of os_mac.c. Based on the result
// of ./configure for console MacOS X.
#ifndef SIGPROTOARG
# define SIGPROTOARG (int)
@ -274,8 +271,8 @@
#ifndef HAVE_CONFIG_H
# define RETSIGTYPE void
# define SIGRETURN return
/*# define USE_SYSTEM */ /* Output ship do debugger :(, but ot compile */
# define HAVE_SYS_WAIT_H 1 /* Attempt */
//# define USE_SYSTEM // Output ship do debugger :(, but not compile
# define HAVE_SYS_WAIT_H 1 // Attempt
# define HAVE_TERMIOS_H 1
# define SYS_SELECT_WITH_SYS_TIME 1
# define HAVE_SELECT 1
@ -289,5 +286,5 @@
# define HAVE_PUTENV
#endif
/* A Mac constant causing big problem to syntax highlighting */
// A Mac constant causing big problem to syntax highlighting
#define UNKNOWN_CREATOR '\?\?\?\?'

View File

@ -12,7 +12,7 @@
#define USE_TMPNAM
#define POSIX /* Used by pty.c */
#define POSIX // Used by pty.c
#if defined(FEAT_GUI_PHOTON)
extern int is_photon_available;

View File

@ -34,16 +34,16 @@
#endif
#ifdef __CYGWIN__
# define WIN32UNIX /* Compiling for Win32 using Unix files. */
# define WIN32UNIX // Compiling for Win32 using Unix files.
# define BINARY_FILE_IO
# define CASE_INSENSITIVE_FILENAME
# define USE_FNAME_CASE /* Fix filename case differences. */
# define USE_FNAME_CASE // Fix filename case differences.
#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). */
// 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).
#if defined(FEAT_GUI) && defined(_AIX) && !defined(_AIX43) && !defined(_NO_PROTO)
# define _NO_PROTO
#endif
@ -53,11 +53,11 @@
#endif
#ifdef HAVE_LIBC_H
# include <libc.h> /* for NeXT */
# include <libc.h> // for NeXT
#endif
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h> /* defines BSD, if it's a BSD system */
# include <sys/param.h> // defines BSD, if it's a BSD system
#endif
/*
@ -70,7 +70,7 @@
# define USE_GETCWD
#endif
/* always use unlink() to remove files */
// always use unlink() to remove files
#ifndef PROTO
# ifdef VMS
# define mch_remove(x) delete((char *)(x))
@ -82,12 +82,12 @@
# endif
#endif
/* 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??? */
// 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. */
// List 3 arg systems here. I guess __sgi, please test and correct me. jw.
#if defined(__sgi) && defined(HAVE_SIGCONTEXT)
# define SIGHAS3ARGS
#endif
@ -142,11 +142,11 @@
#endif
#if defined(UFS_MAXNAMLEN) && !defined(MAXNAMLEN)
# define MAXNAMLEN UFS_MAXNAMLEN /* for dynix/ptx */
# define MAXNAMLEN UFS_MAXNAMLEN // for dynix/ptx
#endif
#if defined(NAME_MAX) && !defined(MAXNAMLEN)
# define MAXNAMLEN NAME_MAX /* for Linux before .99p3 */
# define MAXNAMLEN NAME_MAX // for Linux before .99p3
#endif
/*
@ -154,7 +154,7 @@
* for not being able to open the swap file.
*/
#if !defined(MAXNAMLEN)
# define MAXNAMLEN 512 /* for all other Unix */
# define MAXNAMLEN 512 // for all other Unix
#endif
#define BASENAMELEN (MAXNAMLEN - 5)
@ -204,7 +204,7 @@
# endif
#endif
#endif /* PROTO */
#endif // PROTO
#ifdef VMS
typedef struct dsc$descriptor DESC;
@ -342,7 +342,7 @@ typedef struct dsc$descriptor DESC;
# ifdef VMS
# define DFLT_BDIR "./,sys$login:,tmp:"
# else
# define DFLT_BDIR ".,~/tmp,~/" /* default for 'backupdir' */
# define DFLT_BDIR ".,~/tmp,~/" // default for 'backupdir'
# endif
#endif
@ -350,7 +350,7 @@ typedef struct dsc$descriptor DESC;
# ifdef VMS
# define DFLT_DIR "./,sys$login:,tmp:"
# else
# define DFLT_DIR ".,~/tmp,/var/tmp,/tmp" /* default for 'directory' */
# define DFLT_DIR ".,~/tmp,/var/tmp,/tmp" // default for 'directory'
# endif
#endif
@ -358,7 +358,7 @@ typedef struct dsc$descriptor DESC;
# ifdef VMS
# define DFLT_VDIR "sys$login:vimfiles/view"
# else
# define DFLT_VDIR "$HOME/.vim/view" /* default for 'viewdir' */
# define DFLT_VDIR "$HOME/.vim/view" // default for 'viewdir'
# endif
#endif
@ -384,34 +384,34 @@ typedef struct dsc$descriptor DESC;
#ifdef VMS
# ifndef VAX
# define VMS_TEMPNAM /* to fix default .LIS extension */
# define VMS_TEMPNAM // to fix default .LIS extension
# endif
# define TEMPNAME "TMP:v?XXXXXX.txt"
# define TEMPNAMELEN 28
#else
/* Try several directories to put the temp files. */
// Try several directories to put the temp files.
# define TEMPDIRNAMES "$TMPDIR", "/tmp", ".", "$HOME"
# define TEMPNAMELEN 256
#endif
/* Special wildcards that need to be handled by the shell */
// Special wildcards that need to be handled by the shell
#define SPECIAL_WILDCHAR "`'{"
/*
* Unix has plenty of memory, use large buffers
*/
#define CMDBUFFSIZE 1024 /* size of the command processing buffer */
#define CMDBUFFSIZE 1024 // size of the command processing buffer
/* Use the system path length if it makes sense. */
// 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 */
#ifdef VMS /* Use less memory because of older systems */
#define CHECK_INODE // used when checking if a swap file already
// exists for a file
#ifdef VMS // Use less memory because of older systems
# ifndef DFLT_MAXMEM
# define DFLT_MAXMEM (2*1024)
# endif
@ -420,23 +420,23 @@ typedef struct dsc$descriptor DESC;
# endif
#else
# ifndef DFLT_MAXMEM
# define DFLT_MAXMEM (5*1024) /* use up to 5 Mbyte for a buffer */
# 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 */
# define DFLT_MAXMEMTOT (10*1024) // use up to 10 Mbyte for Vim
# endif
#endif
/* memmove() is not present on all systems, use memmove, bcopy or memcpy.
* Some systems have (void *) arguments, some (char *). If we use (char *) it
* works for all */
// memmove() is not present on all systems, use memmove, bcopy or memcpy.
// Some systems have (void *) arguments, some (char *). If we use (char *) it
// works for all
#if defined(USEMEMMOVE) || (!defined(USEBCOPY) && !defined(USEMEMCPY))
# 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 */
// ifdef USEMEMCPY
# define mch_memmove(to, from, len) memcpy((char *)(to), (char *)(from), len)
# endif
#endif
@ -449,8 +449,8 @@ int mch_rename(const char *src, const char *dest);
# endif
# ifndef VMS
# ifdef __MVS__
/* on OS390 Unix getenv() doesn't return a pointer to persistent
* storage -> use __getenv() */
// 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))
@ -459,8 +459,8 @@ int mch_rename(const char *src, const char *dest);
# endif
#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. */
// 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
@ -482,9 +482,9 @@ int mch_rename(const char *src, const char *dest);
#endif
#ifndef HAVE_DUP
# define HAVE_DUP /* have dup() */
# define HAVE_DUP // have dup()
#endif
#define HAVE_ST_MODE /* have stat.st_mode */
#define HAVE_ST_MODE // have stat.st_mode
/* We have three kinds of ACL support. */
// We have three kinds of ACL support.
#define HAVE_ACL (HAVE_POSIX_ACL || HAVE_SOLARIS_ACL || HAVE_AIX_ACL)

View File

@ -17,12 +17,12 @@
# define signal sigset
#endif
/* Sun's sys/ioctl.h redefines symbols from termio world */
// Sun's sys/ioctl.h redefines symbols from termio world
#if defined(HAVE_SYS_IOCTL_H) && !defined(SUN_SYSTEM)
# include <sys/ioctl.h>
#endif
#ifndef USE_SYSTEM /* use fork/exec to start the shell */
#ifndef USE_SYSTEM // use fork/exec to start the shell
# if defined(HAVE_SYS_WAIT_H) || defined(HAVE_UNION_WAIT)
# include <sys/wait.h>
@ -44,7 +44,7 @@
# endif
# endif
#endif /* !USE_SYSTEM */
#endif // !USE_SYSTEM
#ifdef HAVE_STROPTS_H
#ifdef sinix
@ -69,12 +69,12 @@
#endif
#ifdef HAVE_SYS_SYSTEMINFO_H
/* <sys/systeminfo.h> uses SYS_NMLN but it may not be defined (CrayT3E). */
// <sys/systeminfo.h> uses SYS_NMLN but it may not be defined (CrayT3E).
# ifndef SYS_NMLN
# define SYS_NMLN 32
# endif
# include <sys/systeminfo.h> /* for sysinfo */
# include <sys/systeminfo.h> // for sysinfo
#endif
/*
@ -96,16 +96,16 @@
#endif
#ifdef HAVE_SYS_PTEM_H
# include <sys/ptem.h> /* must be after termios.h for Sinix */
# ifndef _IO_PTEM_H /* For UnixWare that should check for _IO_PT_PTEM_H */
# include <sys/ptem.h> // must be after termios.h for Sinix
# ifndef _IO_PTEM_H // For UnixWare that should check for _IO_PT_PTEM_H
# define _IO_PTEM_H
# endif
#endif
/* shared library access */
// shared library access
#if defined(HAVE_DLFCN_H) && defined(USE_DLOPEN)
# if defined(__MVS__) && !defined (__SUSV3)
/* needed to define RTLD_LAZY (Anthony Giorgio) */
// needed to define RTLD_LAZY (Anthony Giorgio)
# define __SUSV3
# endif
# include <dlfcn.h>

View File

@ -1,100 +1,102 @@
/* os_vms_conf.h. Replaces auto/config.h for VMS */
/*
* os_vms_conf.h. Replaces auto/config.h for VMS
*/
#define CASE_INSENSITIVE_FILENAME /* Open VMS is case insensitive */
#define SPACE_IN_FILENAME /* There could be space between user and passwd */
#define FNAME_ILLEGAL "|*#?%" /* Illegal characters in a file name */
#define BINARY_FILE_IO /* Use binary fileio */
#define CASE_INSENSITIVE_FILENAME // Open VMS is case insensitive
#define SPACE_IN_FILENAME // There could be space between user and passwd
#define FNAME_ILLEGAL "|*#?%" // Illegal characters in a file name
#define BINARY_FILE_IO // Use binary fileio
#define USE_GETCWD
#define USE_SYSTEM
#define XPMATTRIBUTES_TYPE XpmAttributes
/* Define when terminfo support found */
// Define when terminfo support found
#undef TERMINFO
/* Define when termcap.h contains ospeed */
/* #define HAVE_OSPEED */
// Define when termcap.h contains ospeed
// #define HAVE_OSPEED
/* Define when termcap.h contains UP, BC and PC */
/* #define HAVE_UP_BC_PC */
// Define when termcap.h contains UP, BC and PC
// #define HAVE_UP_BC_PC
/* Define when termcap.h defines outfuntype */
/*#define HAVE_OUTFUNTYPE */
// Define when termcap.h defines outfuntype
//#define HAVE_OUTFUNTYPE
/* Define when __DATE__ " " __TIME__ can be used */
// Define when __DATE__ " " __TIME__ can be used
#define HAVE_DATE_TIME
/* Defined to the size of an int */
// Defined to the size of an int
#define VIM_SIZEOF_INT 4
/* #undef USEBCOPY */
// #undef USEBCOPY
#define USEMEMMOVE
/* #undef USEMEMCPY */
// #undef USEMEMCPY
/* Define when "man -s 2" is to be used */
/* #undef USEMAN_S */
// Define when "man -s 2" is to be used
// #undef USEMAN_S
/* Define to empty if the keyword does not work. */
/* #undef const */
// Define to empty if the keyword does not work.
// #undef const
/* Define to `int' if <sys/types.h> doesn't define. */
/* #undef mode_t */
// Define to `int' if <sys/types.h> doesn't define.
// #undef mode_t
/* Define to `long' if <sys/types.h> doesn't define. */
/* #undef off_t */
// Define to `long' if <sys/types.h> doesn't define.
// #undef off_t
/* Define to `long' if <sys/types.h> doesn't define. */
/* #undef pid_t */
// Define to `long' if <sys/types.h> doesn't define.
// #undef pid_t
/* Define to `unsigned' if <sys/types.h> doesn't define. */
/* #undef size_t */
// Define to `unsigned' if <sys/types.h> doesn't define.
// #undef size_t
/* Define to `int' if <sys/types.h> doesn't define. */
/* #undef uid_t */
// Define to `int' if <sys/types.h> doesn't define.
// #undef uid_t
/* Define to `unsigned int' or other type that is 32 bit. */
// Define to `unsigned int' or other type that is 32 bit.
#define UINT32_T unsigned int
/* Define to `int' if <sys/types.h> doesn't define. */
/* #undef gid_t */
// Define to `int' if <sys/types.h> doesn't define.
// #undef gid_t
/* Define to `long' if <sys/types.h> doesn't define. */
/* #undef ino_t */
// Define to `long' if <sys/types.h> doesn't define.
// #undef ino_t
/* Define if you have the nanosleep() function. */
/* #undef HAVE_NANOSLEEP */
// Define if you have the nanosleep() function.
// #undef HAVE_NANOSLEEP
/* Define if you can safely include both <sys/time.h> and <time.h>. */
// Define if you can safely include both <sys/time.h> and <time.h>.
#define TIME_WITH_SYS_TIME
/* Define if you can safely include both <sys/time.h> and <sys/select.h>. */
/* #undef SYS_SELECT_WITH_SYS_TIME */
// Define if you can safely include both <sys/time.h> and <sys/select.h>.
// #undef SYS_SELECT_WITH_SYS_TIME
/* Define as the return type of signal handlers (int or void). */
// Define as the return type of signal handlers (int or void).
#define RETSIGTYPE void
/* Define as the command at the end of signal handlers ("" or "return 0;"). */
// Define as the command at the end of signal handlers ("" or "return 0;").
#define SIGRETURN return
/* Define if struct sigcontext is present */
// Define if struct sigcontext is present
#define HAVE_SIGCONTEXT
/* Define if toupper/tolower only work on lower/uppercase characters */
/* #define BROKEN_TOUPPER */
// Define if toupper/tolower only work on lower/uppercase characters
// #define BROKEN_TOUPPER
/* Define if tgetstr() has a second argument that is (char *) */
/* #undef TGETSTR_CHAR_P */
// Define if tgetstr() has a second argument that is (char *)
// #undef TGETSTR_CHAR_P
/* Define if you have the sigset() function. */
/* #undef HAVE_SIGSET */
// Define if you have the sigset() function.
// #undef HAVE_SIGSET
/* Define if you have the setpgid() function. */
/* #undef HAVE_SETPGID */
// Define if you have the setpgid() function.
// #undef HAVE_SETPGID
/* Define if you have the setsid() function. */
/* #undef HAVE_SETSID */
// Define if you have the setsid() function.
// #undef HAVE_SETSID
/* Define if you have the sigset() function. */
/* #undef HAVE_SIGSET */
// Define if you have the sigset() function.
// #undef HAVE_SIGSET
#define TGETENT_ZERO_ERR
#define HAVE_GETCWD
@ -145,7 +147,7 @@
#undef HAVE_FCHDIR
#undef HAVE_LSTAT
/* Hardware specific */
// Hardware specific
#ifdef VAX
#undef HAVE_GETTIMEOFDAY
#undef HAVE_USLEEP
@ -155,7 +157,7 @@
#undef HAVE_ISNAN
#define HAVE_NO_LONG_LONG
#define VIM_SIZEOF_LONG 4
#else /* AXP and IA64 */
#else // AXP and IA64
#define HAVE_GETTIMEOFDAY
#define HAVE_USLEEP
#define HAVE_STRCASECMP
@ -165,7 +167,7 @@
#define VIM_SIZEOF_LONG 8
#endif
/* Compiler specific */
// Compiler specific
#ifdef VAXC
#undef HAVE_SELECT
#undef HAVE_FCNTL_H
@ -194,7 +196,7 @@
#undef HAVE_ICONV
#endif
/* GUI support defines */
// GUI support defines
#if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK)
#define HAVE_X11
#ifdef HAVE_XPM

View File

@ -10,22 +10,22 @@
* Win32 (Windows NT and Windows 95) machine-dependent things.
*/
#include "os_dos.h" /* common MS-DOS and Win32 stuff */
#include "os_dos.h" // common MS-DOS and Win32 stuff
#ifndef __CYGWIN__
/* cproto fails on missing include files */
// cproto fails on missing include files
# ifndef PROTO
# include <direct.h> /* for _mkdir() */
# include <direct.h> // for _mkdir()
# endif
#endif
/* Stop the VC2005 compiler from nagging. */
// Stop the VC2005 compiler from nagging.
#if _MSC_VER >= 1400
# define _CRT_SECURE_NO_DEPRECATE
# define _CRT_NONSTDC_NO_DEPRECATE
#endif
#define BINARY_FILE_IO
#define USE_EXE_NAME /* use argv[0] for $VIM */
#define USE_EXE_NAME // use argv[0] for $VIM
#define USE_TERM_CONSOLE
#ifndef HAVE_STRING_H
# define HAVE_STRING_H
@ -39,7 +39,7 @@
#define HAVE_STRNICMP
#endif
#ifndef HAVE_STRFTIME
# define HAVE_STRFTIME /* guessed */
# define HAVE_STRFTIME // guessed
#endif
#define HAVE_MEMSET
#ifndef HAVE_LOCALE_H
@ -49,9 +49,9 @@
# define HAVE_FCNTL_H
#endif
#define HAVE_QSORT
#define HAVE_ST_MODE /* have stat.st_mode */
#define HAVE_ST_MODE // have stat.st_mode
#define FEAT_SHORTCUT /* resolve shortcuts */
#define FEAT_SHORTCUT // resolve shortcuts
#if (!defined(_MSC_VER) || _MSC_VER > 1020)
/*
@ -61,30 +61,30 @@
# define HAVE_ACL
#endif
#define USE_FNAME_CASE /* adjust case of file names */
#define USE_FNAME_CASE // adjust case of file names
#if !defined(FEAT_CLIPBOARD)
# define FEAT_CLIPBOARD /* include clipboard support */
# define FEAT_CLIPBOARD // include clipboard support
#endif
#if defined(__DATE__) && defined(__TIME__)
# define HAVE_DATE_TIME
#endif
#ifndef FEAT_GUI_MSWIN /* GUI works different */
# define BREAKCHECK_SKIP 1 /* call mch_breakcheck() each time, it's fast */
#ifndef FEAT_GUI_MSWIN // GUI works different
# define BREAKCHECK_SKIP 1 // call mch_breakcheck() each time, it's fast
#endif
#define HAVE_TOTAL_MEM
#define HAVE_PUTENV /* at least Bcc 5.2 and MSC have it */
#define HAVE_PUTENV // at least Bcc 5.2 and MSC have it
#if defined(FEAT_GUI_MSWIN) && !defined(VIMDLL)
# define NO_CONSOLE /* don't included console-only code */
# define NO_CONSOLE // don't included console-only code
#endif
/* toupper() is not really broken, but it's very slow. Probably because of
* using Unicode characters on Windows NT */
// toupper() is not really broken, but it's very slow. Probably because of
// using Unicode characters on Windows NT
#define BROKEN_TOUPPER
#define FNAME_ILLEGAL "\"*?><|" /* illegal characters in a file name */
#define FNAME_ILLEGAL "\"*?><|" // illegal characters in a file name
#include <signal.h>
#include <stdlib.h>
@ -95,7 +95,7 @@
# define STRICT
#endif
#ifndef COBJMACROS
# define COBJMACROS /* For OLE: Enable "friendlier" access to objects */
# define COBJMACROS // For OLE: Enable "friendlier" access to objects
#endif
#ifndef PROTO
# include <windows.h>
@ -107,24 +107,24 @@
/*
* Win32 has plenty of memory, use large buffers
*/
#define CMDBUFFSIZE 1024 /* size of the command processing buffer */
#define CMDBUFFSIZE 1024 // size of the command processing buffer
/* _MAX_PATH is only 260 (stdlib.h), but we want more for the 'path' option,
* thus use a larger number. */
// _MAX_PATH is only 260 (stdlib.h), but we want more for the 'path' option,
// thus use a larger number.
#define MAXPATHL 1024
#ifndef BASENAMELEN
# define BASENAMELEN (_MAX_PATH - 5) /* length of base of file name */
# define BASENAMELEN (_MAX_PATH - 5) // length of base of file name
#endif
#define TEMPNAMELEN _MAX_PATH /* length of temp file name path */
#define TEMPNAMELEN _MAX_PATH // length of temp file name path
#ifndef DFLT_MAXMEM
# define DFLT_MAXMEM (2*1024) /* use up to 2 Mbyte for a buffer */
# define DFLT_MAXMEM (2*1024) // use up to 2 Mbyte for a buffer
#endif
#ifndef DFLT_MAXMEMTOT
# define DFLT_MAXMEMTOT (5*1024) /* use up to 5 Mbyte for Vim */
# define DFLT_MAXMEMTOT (5*1024) // use up to 5 Mbyte for Vim
#endif
/*
@ -141,10 +141,10 @@
#endif
#if defined(_MSC_VER)
/* Support for __try / __except. All versions of MSVC are
* expected to have this. Any other compilers that support it? */
// Support for __try / __except. All versions of MSVC are
// expected to have this. Any other compilers that support it?
# define HAVE_TRY_EXCEPT 1
# include <malloc.h> /* for _resetstkoflw() */
# include <malloc.h> // for _resetstkoflw()
# if defined(_MSC_VER) && (_MSC_VER >= 1300)
# define RESETSTKOFLW _resetstkoflw
# else
@ -161,7 +161,7 @@
#ifdef _DEBUG
# if defined(_MSC_VER) && (_MSC_VER >= 1000)
/* Use the new debugging tools in Visual C++ 4.x */
// Use the new debugging tools in Visual C++ 4.x
# include <crtdbg.h>
# define ASSERT(f) _ASSERT(f)
# else
@ -176,13 +176,13 @@
# define TRACE3(sz, p1, p2, p3) Trace(_T(sz), p1, p2, p3)
# define TRACE4(sz, p1, p2, p3, p4) Trace(_T(sz), p1, p2, p3, p4)
/* In debug version, writes trace messages to debug stream */
// In debug version, writes trace messages to debug stream
void __cdecl
Trace(char *pszFormat, ...);
#else /* !_DEBUG */
#else // !_DEBUG
/* These macros should all compile away to nothing */
// These macros should all compile away to nothing
# define ASSERT(f) ((void)0)
# define TRACE 1 ? (void)0 : printf
# define TRACE0(sz)
@ -191,7 +191,7 @@ Trace(char *pszFormat, ...);
# define TRACE3(sz, p1, p2, p3)
# define TRACE4(sz, p1, p2, p3, p4)
#endif /* !_DEBUG */
#endif // !_DEBUG
#define ASSERT_POINTER(p, type) \
@ -206,7 +206,7 @@ Trace(char *pszFormat, ...);
#define mch_getenv(x) (char_u *)getenv((char *)(x))
#define vim_mkdir(x, y) mch_mkdir(x)
/* Enable common dialogs input unicode from IME if possible. */
// Enable common dialogs input unicode from IME if possible.
#define pDispatchMessage DispatchMessageW
#define pGetMessage GetMessageW
#define pIsDialogMessage IsDialogMessageW

View File

@ -19,7 +19,7 @@
/*
* Machine-dependent routines.
*/
/* avoid errors in function prototypes */
// avoid errors in function prototypes
# if !defined(FEAT_X11) && !defined(FEAT_GUI_GTK)
# define Display int
# define Widget int
@ -116,7 +116,7 @@ extern int _stricoll(char *a, char *b);
# include "viminfo.pro"
# endif
/* These prototypes cannot be produced automatically. */
// These prototypes cannot be produced automatically.
int smsg(const char *, ...)
#ifdef USE_PRINTF_FORMAT_ATTRIBUTE
__attribute__((format(printf, 1, 0)))
@ -135,14 +135,14 @@ int smsg_attr_keep(int, const char *, ...)
#endif
;
/* These prototypes cannot be produced automatically. */
// These prototypes cannot be produced automatically.
int semsg(const char *, ...)
#ifdef USE_PRINTF_FORMAT_ATTRIBUTE
__attribute__((format(printf, 1, 0)))
#endif
;
/* These prototypes cannot be produced automatically. */
// These prototypes cannot be produced automatically.
void siemsg(const char *, ...)
#ifdef USE_PRINTF_FORMAT_ATTRIBUTE
__attribute__((format(printf, 1, 0)))
@ -167,11 +167,11 @@ int vim_vsnprintf_typval(char *str, size_t str_m, const char *fmt, va_list ap, t
# include "message.pro"
# include "misc1.pro"
# include "misc2.pro"
#ifndef HAVE_STRPBRK /* not generated automatically from misc2.c */
#ifndef HAVE_STRPBRK // not generated automatically from misc2.c
char_u *vim_strpbrk(char_u *s, char_u *charset);
#endif
#ifndef HAVE_QSORT
/* Use our own qsort(), don't define the prototype when not used. */
// Use our own qsort(), don't define the prototype when not used.
void qsort(void *base, size_t elm_count, size_t elm_size, int (*cmp)(const void *, const void *));
#endif
# include "mouse.pro"
@ -267,7 +267,7 @@ void mbyte_im_set_active(int active_arg);
# ifdef FEAT_JOB_CHANNEL
# include "channel.pro"
/* Not generated automatically, to add extra attribute. */
// Not generated automatically, to add extra attribute.
void ch_log(channel_T *ch, const char *fmt, ...)
#ifdef USE_PRINTF_FORMAT_ATTRIBUTE
__attribute__((format(printf, 2, 3)))
@ -285,9 +285,9 @@ void ch_log(channel_T *ch, const char *fmt, ...)
# ifdef FEAT_GUI
# include "gui.pro"
# if !defined(HAVE_SETENV) && !defined(HAVE_PUTENV) && !defined(VMS)
extern int putenv(const char *string); /* in misc2.c */
extern int putenv(const char *string); // in misc2.c
# ifdef USE_VIMPTY_GETENV
extern char_u *vimpty_getenv(const char_u *string); /* in misc2.c */
extern char_u *vimpty_getenv(const char_u *string); // in misc2.c
# endif
# endif
# ifdef FEAT_GUI_MSWIN
@ -316,7 +316,7 @@ extern char *vim_SelFile(Widget toplevel, char *prompt, char *init_path, int (*s
# ifdef FEAT_GUI_PHOTON
# include "gui_photon.pro"
# endif
# endif /* FEAT_GUI */
# endif // FEAT_GUI
# ifdef FEAT_OLE
# include "if_ole.pro"
@ -342,10 +342,10 @@ extern char *vim_SelFile(Widget toplevel, char *prompt, char *init_path, int (*s
# include "os_mac_conv.pro"
#endif
#if defined(MACOS_X_DARWIN) && defined(FEAT_CLIPBOARD) && !defined(FEAT_GUI)
/* functions in os_macosx.m */
// functions in os_macosx.m
void clip_mch_lose_selection(Clipboard_T *cbd);
int clip_mch_own_selection(Clipboard_T *cbd);
void clip_mch_request_selection(Clipboard_T *cbd);
void clip_mch_set_selection(Clipboard_T *cbd);
#endif
#endif /* !PROTO && !NOPROTO */
#endif // !PROTO && !NOPROTO

View File

@ -33,8 +33,8 @@
#define NFA_MAX_STATES 100000
#define NFA_TOO_EXPENSIVE -1
/* Which regexp engine to use? Needed for vim_regcomp().
* Must match with 'regexpengine'. */
// Which regexp engine to use? Needed for vim_regcomp().
// Must match with 'regexpengine'.
#define AUTOMATIC_ENGINE 0
#define BACKTRACKING_ENGINE 1
#define NFA_ENGINE 2
@ -62,7 +62,7 @@ typedef struct regprog
*/
typedef struct
{
/* These four members implement regprog_T */
// These four members implement regprog_T
regengine_T *engine;
unsigned regflags;
unsigned re_engine;
@ -76,7 +76,7 @@ typedef struct
#ifdef FEAT_SYN_HL
char_u reghasz;
#endif
char_u program[1]; /* actually longer.. */
char_u program[1]; // actually longer..
} bt_regprog_T;
/*
@ -90,7 +90,7 @@ struct nfa_state
nfa_state_T *out;
nfa_state_T *out1;
int id;
int lastlist[2]; /* 0: normal, 1: recursive */
int lastlist[2]; // 0: normal, 1: recursive
int val;
};
@ -99,28 +99,28 @@ struct nfa_state
*/
typedef struct
{
/* These three members implement regprog_T */
// These three members implement regprog_T
regengine_T *engine;
unsigned regflags;
unsigned re_engine;
unsigned re_flags;
int re_in_use;
nfa_state_T *start; /* points into state[] */
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 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 has_zend; // pattern contains \ze
int has_backref; // pattern contains \1 .. \9
#ifdef FEAT_SYN_HL
int reghasz;
#endif
char_u *pattern;
int nsubexp; /* number of () */
int nsubexp; // number of ()
int nstate;
nfa_state_T state[1]; /* actually longer.. */
nfa_state_T state[1]; // actually longer..
} nfa_regprog_T;
/*
@ -150,7 +150,7 @@ typedef struct
lpos_T startpos[NSUBEXP];
lpos_T endpos[NSUBEXP];
int rmm_ic;
colnr_T rmm_maxcol; /* when not zero: maximum column */
colnr_T rmm_maxcol; // when not zero: maximum column
} regmmatch_T;
/*
@ -173,4 +173,4 @@ struct regengine
char_u *expr;
};
#endif /* _REGEXP_H */
#endif // _REGEXP_H

View File

@ -11,33 +11,33 @@
* spell.h: common code for spell checking, used by spell.c and spellfile.c.
*/
/* Use SPELL_PRINTTREE for debugging: dump the word tree after adding a word.
* Only use it for small word lists! */
// Use SPELL_PRINTTREE for debugging: dump the word tree after adding a word.
// Only use it for small word lists!
#if 0
# define SPELL_PRINTTREE
#endif
/* Use SPELL_COMPRESS_ALLWAYS for debugging: compress the word tree after
* adding a word. Only use it for small word lists! */
// Use SPELL_COMPRESS_ALLWAYS for debugging: compress the word tree after
// adding a word. Only use it for small word lists!
#if 0
# define SPELL_COMPRESS_ALLWAYS
#endif
/* Use DEBUG_TRIEWALK to print the changes made in suggest_trie_walk() for a
* specific word. */
// Use DEBUG_TRIEWALK to print the changes made in suggest_trie_walk() for a
// specific word.
#if 0
# define DEBUG_TRIEWALK
#endif
#define MAXWLEN 254 /* Assume max. word len is this many bytes.
Some places assume a word length fits in a
byte, thus it can't be above 255.
Must be >= PFD_NOTSPECIAL. */
#define MAXWLEN 254 // Assume max. word len is this many bytes.
// Some places assume a word length fits in a
// byte, thus it can't be above 255.
// Must be >= PFD_NOTSPECIAL.
#define MAXREGIONS 8 /* Number of regions supported. */
#define MAXREGIONS 8 // Number of regions supported.
/* Type used for indexes in the word tree need to be at least 4 bytes. If int
* is 8 bytes we could use something smaller, but what? */
// Type used for indexes in the word tree need to be at least 4 bytes. If int
// is 8 bytes we could use something smaller, but what?
typedef int idx_T;
typedef int salfirst_T;
@ -60,74 +60,74 @@ typedef int salfirst_T;
typedef struct slang_S slang_T;
struct slang_S
{
slang_T *sl_next; /* next language */
char_u *sl_name; /* language name "en", "en.rare", "nl", etc. */
char_u *sl_fname; /* name of .spl file */
int sl_add; /* TRUE if it's a .add file. */
slang_T *sl_next; // next language
char_u *sl_name; // language name "en", "en.rare", "nl", etc.
char_u *sl_fname; // name of .spl file
int sl_add; // TRUE if it's a .add file.
char_u *sl_fbyts; /* case-folded word bytes */
idx_T *sl_fidxs; /* case-folded word indexes */
char_u *sl_kbyts; /* keep-case word bytes */
idx_T *sl_kidxs; /* keep-case word indexes */
char_u *sl_pbyts; /* prefix tree word bytes */
idx_T *sl_pidxs; /* prefix tree word indexes */
char_u *sl_fbyts; // case-folded word bytes
idx_T *sl_fidxs; // case-folded word indexes
char_u *sl_kbyts; // keep-case word bytes
idx_T *sl_kidxs; // keep-case word indexes
char_u *sl_pbyts; // prefix tree word bytes
idx_T *sl_pidxs; // prefix tree word indexes
char_u *sl_info; /* infotext string or NULL */
char_u *sl_info; // infotext string or NULL
char_u sl_regions[MAXREGIONS * 2 + 1];
/* table with up to 8 region names plus NUL */
// table with up to 8 region names plus NUL
char_u *sl_midword; /* MIDWORD string or NULL */
char_u *sl_midword; // MIDWORD string or NULL
hashtab_T sl_wordcount; /* hashtable with word count, wordcount_T */
hashtab_T sl_wordcount; // hashtable with word count, wordcount_T
int sl_compmax; /* COMPOUNDWORDMAX (default: MAXWLEN) */
int sl_compminlen; /* COMPOUNDMIN (default: 0) */
int sl_compsylmax; /* COMPOUNDSYLMAX (default: MAXWLEN) */
int sl_compoptions; /* COMP_* flags */
garray_T sl_comppat; /* CHECKCOMPOUNDPATTERN items */
regprog_T *sl_compprog; /* COMPOUNDRULE turned into a regexp progrm
* (NULL when no compounding) */
char_u *sl_comprules; /* all COMPOUNDRULE concatenated (or NULL) */
char_u *sl_compstartflags; /* flags for first compound word */
char_u *sl_compallflags; /* all flags for compound words */
char_u sl_nobreak; /* When TRUE: no spaces between words */
char_u *sl_syllable; /* SYLLABLE repeatable chars or NULL */
garray_T sl_syl_items; /* syllable items */
int sl_compmax; // COMPOUNDWORDMAX (default: MAXWLEN)
int sl_compminlen; // COMPOUNDMIN (default: 0)
int sl_compsylmax; // COMPOUNDSYLMAX (default: MAXWLEN)
int sl_compoptions; // COMP_* flags
garray_T sl_comppat; // CHECKCOMPOUNDPATTERN items
regprog_T *sl_compprog; // COMPOUNDRULE turned into a regexp progrm
// (NULL when no compounding)
char_u *sl_comprules; // all COMPOUNDRULE concatenated (or NULL)
char_u *sl_compstartflags; // flags for first compound word
char_u *sl_compallflags; // all flags for compound words
char_u sl_nobreak; // When TRUE: no spaces between words
char_u *sl_syllable; // SYLLABLE repeatable chars or NULL
garray_T sl_syl_items; // syllable items
int sl_prefixcnt; /* number of items in "sl_prefprog" */
regprog_T **sl_prefprog; /* table with regprogs for prefixes */
int sl_prefixcnt; // number of items in "sl_prefprog"
regprog_T **sl_prefprog; // table with regprogs for prefixes
garray_T sl_rep; /* list of fromto_T entries from REP lines */
short sl_rep_first[256]; /* indexes where byte first appears, -1 if
there is none */
garray_T sl_sal; /* list of salitem_T entries from SAL lines */
salfirst_T sl_sal_first[256]; /* indexes where byte first appears, -1 if
there is none */
int sl_followup; /* SAL followup */
int sl_collapse; /* SAL collapse_result */
int sl_rem_accents; /* SAL remove_accents */
int sl_sofo; /* SOFOFROM and SOFOTO instead of SAL items:
* "sl_sal_first" maps chars, when has_mbyte
* "sl_sal" is a list of wide char lists. */
garray_T sl_repsal; /* list of fromto_T entries from REPSAL lines */
short sl_repsal_first[256]; /* sl_rep_first for REPSAL lines */
int sl_nosplitsugs; /* don't suggest splitting a word */
int sl_nocompoundsugs; /* don't suggest compounding */
garray_T sl_rep; // list of fromto_T entries from REP lines
short sl_rep_first[256]; // indexes where byte first appears, -1 if
// there is none
garray_T sl_sal; // list of salitem_T entries from SAL lines
salfirst_T sl_sal_first[256]; // indexes where byte first appears, -1 if
// there is none
int sl_followup; // SAL followup
int sl_collapse; // SAL collapse_result
int sl_rem_accents; // SAL remove_accents
int sl_sofo; // SOFOFROM and SOFOTO instead of SAL items:
// "sl_sal_first" maps chars, when has_mbyte
// "sl_sal" is a list of wide char lists.
garray_T sl_repsal; // list of fromto_T entries from REPSAL lines
short sl_repsal_first[256]; // sl_rep_first for REPSAL lines
int sl_nosplitsugs; // don't suggest splitting a word
int sl_nocompoundsugs; // don't suggest compounding
/* Info from the .sug file. Loaded on demand. */
time_t sl_sugtime; /* timestamp for .sug file */
char_u *sl_sbyts; /* soundfolded word bytes */
idx_T *sl_sidxs; /* soundfolded word indexes */
buf_T *sl_sugbuf; /* buffer with word number table */
int sl_sugloaded; /* TRUE when .sug file was loaded or failed to
load */
// Info from the .sug file. Loaded on demand.
time_t sl_sugtime; // timestamp for .sug file
char_u *sl_sbyts; // soundfolded word bytes
idx_T *sl_sidxs; // soundfolded word indexes
buf_T *sl_sugbuf; // buffer with word number table
int sl_sugloaded; // TRUE when .sug file was loaded or failed to
// load
int sl_has_map; /* TRUE if there is a MAP line */
hashtab_T sl_map_hash; /* MAP for multi-byte chars */
int sl_map_array[256]; /* MAP for first 256 chars */
hashtab_T sl_sounddone; /* table with soundfolded words that have
handled, see add_sound_suggest() */
int sl_has_map; // TRUE if there is a MAP line
hashtab_T sl_map_hash; // MAP for multi-byte chars
int sl_map_array[256]; // MAP for first 256 chars
hashtab_T sl_sounddone; // table with soundfolded words that have
// handled, see add_sound_suggest()
};
#ifdef VMS
@ -140,94 +140,94 @@ struct slang_S
# define SPL_FNAME_ASCII ".ascii."
#endif
/* Flags used for a word. Only the lowest byte can be used, the region byte
* comes above it. */
#define WF_REGION 0x01 /* region byte follows */
#define WF_ONECAP 0x02 /* word with one capital (or all capitals) */
#define WF_ALLCAP 0x04 /* word must be all capitals */
#define WF_RARE 0x08 /* rare word */
#define WF_BANNED 0x10 /* bad word */
#define WF_AFX 0x20 /* affix ID follows */
#define WF_FIXCAP 0x40 /* keep-case word, allcap not allowed */
#define WF_KEEPCAP 0x80 /* keep-case word */
// Flags used for a word. Only the lowest byte can be used, the region byte
// comes above it.
#define WF_REGION 0x01 // region byte follows
#define WF_ONECAP 0x02 // word with one capital (or all capitals)
#define WF_ALLCAP 0x04 // word must be all capitals
#define WF_RARE 0x08 // rare word
#define WF_BANNED 0x10 // bad word
#define WF_AFX 0x20 // affix ID follows
#define WF_FIXCAP 0x40 // keep-case word, allcap not allowed
#define WF_KEEPCAP 0x80 // keep-case word
#define WF_CAPMASK (WF_ONECAP | WF_ALLCAP | WF_KEEPCAP | WF_FIXCAP)
/* for <flags2>, shifted up one byte to be used in wn_flags */
#define WF_HAS_AFF 0x0100 /* word includes affix */
#define WF_NEEDCOMP 0x0200 /* word only valid in compound */
#define WF_NOSUGGEST 0x0400 /* word not to be suggested */
#define WF_COMPROOT 0x0800 /* already compounded word, COMPOUNDROOT */
#define WF_NOCOMPBEF 0x1000 /* no compounding before this word */
#define WF_NOCOMPAFT 0x2000 /* no compounding after this word */
// for <flags2>, shifted up one byte to be used in wn_flags
#define WF_HAS_AFF 0x0100 // word includes affix
#define WF_NEEDCOMP 0x0200 // word only valid in compound
#define WF_NOSUGGEST 0x0400 // word not to be suggested
#define WF_COMPROOT 0x0800 // already compounded word, COMPOUNDROOT
#define WF_NOCOMPBEF 0x1000 // no compounding before this word
#define WF_NOCOMPAFT 0x2000 // no compounding after this word
/* flags for <pflags> */
#define WFP_RARE 0x01 /* rare prefix */
#define WFP_NC 0x02 /* prefix is not combining */
#define WFP_UP 0x04 /* to-upper prefix */
#define WFP_COMPPERMIT 0x08 /* prefix with COMPOUNDPERMITFLAG */
#define WFP_COMPFORBID 0x10 /* prefix with COMPOUNDFORBIDFLAG */
// flags for <pflags>
#define WFP_RARE 0x01 // rare prefix
#define WFP_NC 0x02 // prefix is not combining
#define WFP_UP 0x04 // to-upper prefix
#define WFP_COMPPERMIT 0x08 // prefix with COMPOUNDPERMITFLAG
#define WFP_COMPFORBID 0x10 // prefix with COMPOUNDFORBIDFLAG
/* Flags for postponed prefixes in "sl_pidxs". Must be above affixID (one
* byte) and prefcondnr (two bytes). */
#define WF_RAREPFX (WFP_RARE << 24) /* rare postponed prefix */
#define WF_PFX_NC (WFP_NC << 24) /* non-combining postponed prefix */
#define WF_PFX_UP (WFP_UP << 24) /* to-upper postponed prefix */
#define WF_PFX_COMPPERMIT (WFP_COMPPERMIT << 24) /* postponed prefix with
* COMPOUNDPERMITFLAG */
#define WF_PFX_COMPFORBID (WFP_COMPFORBID << 24) /* postponed prefix with
* COMPOUNDFORBIDFLAG */
// Flags for postponed prefixes in "sl_pidxs". Must be above affixID (one
// byte) and prefcondnr (two bytes).
#define WF_RAREPFX (WFP_RARE << 24) // rare postponed prefix
#define WF_PFX_NC (WFP_NC << 24) // non-combining postponed prefix
#define WF_PFX_UP (WFP_UP << 24) // to-upper postponed prefix
#define WF_PFX_COMPPERMIT (WFP_COMPPERMIT << 24) // postponed prefix with
// COMPOUNDPERMITFLAG
#define WF_PFX_COMPFORBID (WFP_COMPFORBID << 24) // postponed prefix with
// COMPOUNDFORBIDFLAG
/* flags for <compoptions> */
#define COMP_CHECKDUP 1 /* CHECKCOMPOUNDDUP */
#define COMP_CHECKREP 2 /* CHECKCOMPOUNDREP */
#define COMP_CHECKCASE 4 /* CHECKCOMPOUNDCASE */
#define COMP_CHECKTRIPLE 8 /* CHECKCOMPOUNDTRIPLE */
// flags for <compoptions>
#define COMP_CHECKDUP 1 // CHECKCOMPOUNDDUP
#define COMP_CHECKREP 2 // CHECKCOMPOUNDREP
#define COMP_CHECKCASE 4 // CHECKCOMPOUNDCASE
#define COMP_CHECKTRIPLE 8 // CHECKCOMPOUNDTRIPLE
/* Info from "REP", "REPSAL" and "SAL" entries in ".aff" file used in si_rep,
* si_repsal, sl_rep, and si_sal. Not for sl_sal!
* One replacement: from "ft_from" to "ft_to". */
// Info from "REP", "REPSAL" and "SAL" entries in ".aff" file used in si_rep,
// si_repsal, sl_rep, and si_sal. Not for sl_sal!
// One replacement: from "ft_from" to "ft_to".
typedef struct fromto_S
{
char_u *ft_from;
char_u *ft_to;
} fromto_T;
/* Info from "SAL" entries in ".aff" file used in sl_sal.
* The info is split for quick processing by spell_soundfold().
* Note that "sm_oneof" and "sm_rules" point into sm_lead. */
// Info from "SAL" entries in ".aff" file used in sl_sal.
// The info is split for quick processing by spell_soundfold().
// Note that "sm_oneof" and "sm_rules" point into sm_lead.
typedef struct salitem_S
{
char_u *sm_lead; /* leading letters */
int sm_leadlen; /* length of "sm_lead" */
char_u *sm_oneof; /* letters from () or NULL */
char_u *sm_rules; /* rules like ^, $, priority */
char_u *sm_to; /* replacement. */
int *sm_lead_w; /* wide character copy of "sm_lead" */
int *sm_oneof_w; /* wide character copy of "sm_oneof" */
int *sm_to_w; /* wide character copy of "sm_to" */
char_u *sm_lead; // leading letters
int sm_leadlen; // length of "sm_lead"
char_u *sm_oneof; // letters from () or NULL
char_u *sm_rules; // rules like ^, $, priority
char_u *sm_to; // replacement.
int *sm_lead_w; // wide character copy of "sm_lead"
int *sm_oneof_w; // wide character copy of "sm_oneof"
int *sm_to_w; // wide character copy of "sm_to"
} salitem_T;
/* Values for SP_*ERROR are negative, positive values are used by
* read_cnt_string(). */
#define SP_TRUNCERROR -1 /* spell file truncated error */
#define SP_FORMERROR -2 /* format error in spell file */
#define SP_OTHERERROR -3 /* other error while reading spell file */
// Values for SP_*ERROR are negative, positive values are used by
// read_cnt_string().
#define SP_TRUNCERROR -1 // spell file truncated error
#define SP_FORMERROR -2 // format error in spell file
#define SP_OTHERERROR -3 // other error while reading spell file
/*
* Structure used in "b_langp", filled from 'spelllang'.
*/
typedef struct langp_S
{
slang_T *lp_slang; /* info for this language */
slang_T *lp_sallang; /* language used for sound folding or NULL */
slang_T *lp_replang; /* language used for REP items or NULL */
int lp_region; /* bitmask for region or REGION_ALL */
slang_T *lp_slang; // info for this language
slang_T *lp_sallang; // language used for sound folding or NULL
slang_T *lp_replang; // language used for REP items or NULL
int lp_region; // bitmask for region or REGION_ALL
} langp_T;
#define LANGP_ENTRY(ga, i) (((langp_T *)(ga).ga_data) + (i))
#define VIMSUGMAGIC "VIMsug" /* string at start of Vim .sug file */
#define VIMSUGMAGIC "VIMsug" // string at start of Vim .sug file
#define VIMSUGMAGICL 6
#define VIMSUGVERSION 1
@ -237,10 +237,10 @@ typedef struct langp_S
*/
typedef struct spelltab_S
{
char_u st_isw[256]; /* flags: is word char */
char_u st_isu[256]; /* flags: is uppercase char */
char_u st_fold[256]; /* chars: folded case */
char_u st_upper[256]; /* chars: upper case */
char_u st_isw[256]; // flags: is word char
char_u st_isu[256]; // flags: is uppercase char
char_u st_fold[256]; // chars: folded case
char_u st_upper[256]; // chars: upper case
} spelltab_T;
/*
@ -249,11 +249,11 @@ typedef struct spelltab_S
* These must not be called with negative number!
*/
#if defined(HAVE_WCHAR_H)
# include <wchar.h> /* for towupper() and towlower() */
# include <wchar.h> // for towupper() and towlower()
#endif
/* Multi-byte implementation. For Unicode we can call utf_*(), but don't do
* that for ASCII, because we don't want to use 'casemap' here. Otherwise use
* the "w" library function for characters above 255 if available. */
// Multi-byte implementation. For Unicode we can call utf_*(), but don't do
// that for ASCII, because we don't want to use 'casemap' here. Otherwise use
// the "w" library function for characters above 255 if available.
#ifdef HAVE_TOWLOWER
# define SPELL_TOFOLD(c) (enc_utf8 && (c) >= 128 ? utf_fold(c) \
: (c) < 256 ? (int)spelltab.st_fold[c] : (int)towlower(c))
@ -279,8 +279,8 @@ typedef struct spelltab_S
#endif
#ifdef FEAT_SPELL
/* First language that is loaded, start of the linked list of loaded
* languages. */
// First language that is loaded, start of the linked list of loaded
// languages.
# ifdef IN_SPELL_C
# define SPELL_EXTERN
# define SPELL_INIT(x) x
@ -291,7 +291,7 @@ typedef struct spelltab_S
SPELL_EXTERN slang_T *first_lang SPELL_INIT(= NULL);
/* file used for "zG" and "zW" */
// file used for "zG" and "zW"
SPELL_EXTERN char_u *int_wordlist SPELL_INIT(= NULL);
@ -307,15 +307,15 @@ SPELL_EXTERN int did_set_spelltab;
typedef struct wordcount_S
{
short_u wc_count; /* nr of times word was seen */
char_u wc_word[1]; /* word, actually longer */
short_u wc_count; // nr of times word was seen
char_u wc_word[1]; // word, actually longer
} wordcount_T;
#define WC_KEY_OFF offsetof(wordcount_T, wc_word)
#define HI2WC(hi) ((wordcount_T *)((hi)->hi_key - WC_KEY_OFF))
#define MAXWORDCOUNT 0xffff
/* Remember what "z?" replaced. */
// Remember what "z?" replaced.
SPELL_EXTERN char_u *repl_from SPELL_INIT(= NULL);
SPELL_EXTERN char_u *repl_to SPELL_INIT(= NULL);
#endif

View File

@ -1105,7 +1105,7 @@ typedef struct
int tb_change_cnt; // nr of time tb_buf was changed; never zero
} typebuf_T;
/* Struct to hold the saved typeahead for save_typeahead(). */
// Struct to hold the saved typeahead for save_typeahead().
typedef struct
{
typebuf_T save_typebuf;
@ -1200,7 +1200,8 @@ struct stl_hlrec
* Syntax items - usually buffer-specific.
*/
/* Item for a hashtable. "hi_key" can be one of three values:
/*
* Item for a hashtable. "hi_key" can be one of three values:
* NULL: Never been used
* HI_KEY_REMOVED: Entry was removed
* Otherwise: Used item, pointer to the actual key; this usually is
@ -1505,7 +1506,9 @@ typedef struct
#define VAR_SHORT_LEN 20 // short variable name length
#define FIXVAR_CNT 12 // number of fixed variables
/* structure to hold info for a function that is currently being executed. */
/*
* structure to hold info for a function that is currently being executed.
*/
struct funccall_S
{
ufunc_T *func; // function being called
@ -1555,14 +1558,16 @@ struct funccal_entry {
funccal_entry_T *next;
};
/* From user function to hashitem and back. */
// From user function to hashitem and back.
#define UF2HIKEY(fp) ((fp)->uf_name)
#define HIKEY2UF(p) ((ufunc_T *)((p) - offsetof(ufunc_T, uf_name)))
#define HI2UF(hi) HIKEY2UF((hi)->hi_key)
/* Growarray to store info about already sourced scripts.
/*
* Growarray to store info about already sourced scripts.
* For Unix also store the dev/ino, so that we don't have to stat() each
* script when going through the list. */
* script when going through the list.
*/
typedef struct scriptitem_S
{
char_u *sn_name;
@ -1593,7 +1598,9 @@ typedef struct scriptitem_S
} scriptitem_T;
# ifdef FEAT_PROFILE
/* Struct used in sn_prl_ga for every line of a script. */
/*
* Struct used in sn_prl_ga for every line of a script.
*/
typedef struct sn_prl_S
{
int snp_count; // nr of times line was executed
@ -3370,7 +3377,7 @@ typedef struct cmdarg_S
/*
* struct to store values from 'guicursor' and 'mouseshape'
*/
/* Indexes in shape_table[] */
// Indexes in shape_table[]
#define SHAPE_IDX_N 0 // Normal mode
#define SHAPE_IDX_V 1 // Visual mode
#define SHAPE_IDX_I 2 // Insert mode

View File

@ -25,89 +25,89 @@ typedef unsigned char char_u;
*/
enum SpecialKey
{
KS_NAME = 0,/* name of this terminal entry */
KS_CE, /* clear to end of line */
KS_AL, /* add new blank line */
KS_CAL, /* add number of blank lines */
KS_DL, /* delete line */
KS_CDL, /* delete number of lines */
KS_CS, /* scroll region */
KS_CL, /* clear screen */
KS_CD, /* clear to end of display */
KS_UT, /* clearing uses current background color */
KS_DA, /* text may be scrolled down from up */
KS_DB, /* text may be scrolled up from down */
KS_VI, /* cursor invisible */
KS_VE, /* cursor visible */
KS_VS, /* cursor very visible (blink) */
KS_CVS, /* cursor normally visible (no blink) */
KS_CSH, /* cursor shape */
KS_CRC, /* request cursor blinking */
KS_CRS, /* request cursor style */
KS_ME, /* normal mode */
KS_MR, /* reverse mode */
KS_MD, /* bold mode */
KS_SE, /* normal mode */
KS_SO, /* standout mode */
KS_CZH, /* italic mode start */
KS_CZR, /* italic mode end */
KS_UE, /* exit underscore (underline) mode */
KS_US, /* underscore (underline) mode */
KS_UCE, /* exit undercurl mode */
KS_UCS, /* undercurl mode */
KS_STE, /* exit strikethrough mode */
KS_STS, /* strikethrough mode */
KS_MS, /* save to move cur in reverse mode */
KS_CM, /* cursor motion */
KS_SR, /* scroll reverse (backward) */
KS_CRI, /* cursor number of chars right */
KS_VB, /* visual bell */
KS_KS, /* put term in "keypad transmit" mode */
KS_KE, /* out of "keypad transmit" mode */
KS_TI, /* put terminal in termcap mode */
KS_CTI, /* put terminal in "raw" mode */
KS_TE, /* end of termcap mode */
KS_CTE, /* end of "raw" mode */
KS_BC, /* backspace character (cursor left) */
KS_CCS, /* cur is relative to scroll region */
KS_CCO, /* number of colors */
KS_CSF, /* set foreground color */
KS_CSB, /* set background color */
KS_XS, /* standout not erased by overwriting (hpterm) */
KS_XN, /* newline glitch */
KS_MB, /* blink mode */
KS_CAF, /* set foreground color (ANSI) */
KS_CAB, /* set background color (ANSI) */
KS_LE, /* cursor left (mostly backspace) */
KS_ND, /* cursor right */
KS_CIS, /* set icon text start */
KS_CIE, /* set icon text end */
KS_CSC, /* set cursor color start */
KS_CEC, /* set cursor color end */
KS_TS, /* set window title start (to status line)*/
KS_FS, /* set window title end (from status line) */
KS_CWP, /* set window position in pixels */
KS_CGP, /* get window position */
KS_CWS, /* set window size in characters */
KS_CRV, /* request version string */
KS_RFG, /* request foreground color */
KS_RBG, /* request background color */
KS_CSI, /* start insert mode (bar cursor) */
KS_CEI, /* end insert mode (block cursor) */
KS_CSR, /* start replace mode (underline cursor) */
KS_CSV, /* scroll region vertical */
KS_OP, /* original color pair */
KS_U7, /* request cursor position */
KS_8F, /* set foreground color (RGB) */
KS_8B, /* set background color (RGB) */
KS_CBE, /* enable bracketed paste mode */
KS_CBD, /* disable bracketed paste mode */
KS_CPS, /* start of bracketed paste */
KS_CPE, /* end of bracketed paste */
KS_CST, /* save window title */
KS_CRT, /* restore window title */
KS_SSI, /* save icon text */
KS_SRI /* restore icon text */
KS_NAME = 0,// name of this terminal entry
KS_CE, // clear to end of line
KS_AL, // add new blank line
KS_CAL, // add number of blank lines
KS_DL, // delete line
KS_CDL, // delete number of lines
KS_CS, // scroll region
KS_CL, // clear screen
KS_CD, // clear to end of display
KS_UT, // clearing uses current background color
KS_DA, // text may be scrolled down from up
KS_DB, // text may be scrolled up from down
KS_VI, // cursor invisible
KS_VE, // cursor visible
KS_VS, // cursor very visible (blink)
KS_CVS, // cursor normally visible (no blink)
KS_CSH, // cursor shape
KS_CRC, // request cursor blinking
KS_CRS, // request cursor style
KS_ME, // normal mode
KS_MR, // reverse mode
KS_MD, // bold mode
KS_SE, // normal mode
KS_SO, // standout mode
KS_CZH, // italic mode start
KS_CZR, // italic mode end
KS_UE, // exit underscore (underline) mode
KS_US, // underscore (underline) mode
KS_UCE, // exit undercurl mode
KS_UCS, // undercurl mode
KS_STE, // exit strikethrough mode
KS_STS, // strikethrough mode
KS_MS, // save to move cur in reverse mode
KS_CM, // cursor motion
KS_SR, // scroll reverse (backward)
KS_CRI, // cursor number of chars right
KS_VB, // visual bell
KS_KS, // put term in "keypad transmit" mode
KS_KE, // out of "keypad transmit" mode
KS_TI, // put terminal in termcap mode
KS_CTI, // put terminal in "raw" mode
KS_TE, // end of termcap mode
KS_CTE, // end of "raw" mode
KS_BC, // backspace character (cursor left)
KS_CCS, // cur is relative to scroll region
KS_CCO, // number of colors
KS_CSF, // set foreground color
KS_CSB, // set background color
KS_XS, // standout not erased by overwriting (hpterm)
KS_XN, // newline glitch
KS_MB, // blink mode
KS_CAF, // set foreground color (ANSI)
KS_CAB, // set background color (ANSI)
KS_LE, // cursor left (mostly backspace)
KS_ND, // cursor right
KS_CIS, // set icon text start
KS_CIE, // set icon text end
KS_CSC, // set cursor color start
KS_CEC, // set cursor color end
KS_TS, // set window title start (to status line)
KS_FS, // set window title end (from status line)
KS_CWP, // set window position in pixels
KS_CGP, // get window position
KS_CWS, // set window size in characters
KS_CRV, // request version string
KS_RFG, // request foreground color
KS_RBG, // request background color
KS_CSI, // start insert mode (bar cursor)
KS_CEI, // end insert mode (block cursor)
KS_CSR, // start replace mode (underline cursor)
KS_CSV, // scroll region vertical
KS_OP, // original color pair
KS_U7, // request cursor position
KS_8F, // set foreground color (RGB)
KS_8B, // set background color (RGB)
KS_CBE, // enable bracketed paste mode
KS_CBD, // disable bracketed paste mode
KS_CPS, // start of bracketed paste
KS_CPE, // end of bracketed paste
KS_CST, // save window title
KS_CRT, // restore window title
KS_SSI, // save icon text
KS_SRI // restore icon text
};
#define KS_LAST KS_SRI
@ -120,95 +120,95 @@ enum SpecialKey
* - there should be code in term.c to obtain the value from the termcap
*/
extern char_u *(term_strings[]); /* current terminal strings */
extern char_u *(term_strings[]); // current terminal strings
/*
* strings used for terminal
*/
#define T_NAME (TERM_STR(KS_NAME)) /* terminal name */
#define T_CE (TERM_STR(KS_CE)) /* clear to end of line */
#define T_AL (TERM_STR(KS_AL)) /* add new blank line */
#define T_CAL (TERM_STR(KS_CAL)) /* add number of blank lines */
#define T_DL (TERM_STR(KS_DL)) /* delete line */
#define T_CDL (TERM_STR(KS_CDL)) /* delete number of lines */
#define T_CS (TERM_STR(KS_CS)) /* scroll region */
#define T_CSV (TERM_STR(KS_CSV)) /* scroll region vertical */
#define T_CL (TERM_STR(KS_CL)) /* clear screen */
#define T_CD (TERM_STR(KS_CD)) /* clear to end of display */
#define T_UT (TERM_STR(KS_UT)) /* clearing uses background color */
#define T_DA (TERM_STR(KS_DA)) /* text may be scrolled down from up */
#define T_DB (TERM_STR(KS_DB)) /* text may be scrolled up from down */
#define T_VI (TERM_STR(KS_VI)) /* cursor invisible */
#define T_VE (TERM_STR(KS_VE)) /* cursor visible */
#define T_VS (TERM_STR(KS_VS)) /* cursor very visible (blink) */
#define T_CVS (TERM_STR(KS_CVS)) /* cursor normally visible (no blink) */
#define T_CSH (TERM_STR(KS_CSH)) /* cursor shape */
#define T_CRC (TERM_STR(KS_CRC)) /* request cursor blinking */
#define T_CRS (TERM_STR(KS_CRS)) /* request cursor style */
#define T_ME (TERM_STR(KS_ME)) /* normal mode */
#define T_MR (TERM_STR(KS_MR)) /* reverse mode */
#define T_MD (TERM_STR(KS_MD)) /* bold mode */
#define T_SE (TERM_STR(KS_SE)) /* normal mode */
#define T_SO (TERM_STR(KS_SO)) /* standout mode */
#define T_CZH (TERM_STR(KS_CZH)) /* italic mode start */
#define T_CZR (TERM_STR(KS_CZR)) /* italic mode end */
#define T_UE (TERM_STR(KS_UE)) /* exit underscore (underline) mode */
#define T_US (TERM_STR(KS_US)) /* underscore (underline) mode */
#define T_UCE (TERM_STR(KS_UCE)) /* exit undercurl mode */
#define T_UCS (TERM_STR(KS_UCS)) /* undercurl mode */
#define T_STE (TERM_STR(KS_STE)) /* exit strikethrough mode */
#define T_STS (TERM_STR(KS_STS)) /* strikethrough mode */
#define T_MS (TERM_STR(KS_MS)) /* save to move cur in reverse mode */
#define T_CM (TERM_STR(KS_CM)) /* cursor motion */
#define T_SR (TERM_STR(KS_SR)) /* scroll reverse (backward) */
#define T_CRI (TERM_STR(KS_CRI)) /* cursor number of chars right */
#define T_VB (TERM_STR(KS_VB)) /* visual bell */
#define T_KS (TERM_STR(KS_KS)) /* put term in "keypad transmit" mode */
#define T_KE (TERM_STR(KS_KE)) /* out of "keypad transmit" mode */
#define T_TI (TERM_STR(KS_TI)) /* put terminal in termcap mode */
#define T_CTI (TERM_STR(KS_CTI)) /* put terminal in "raw" mode */
#define T_TE (TERM_STR(KS_TE)) /* end of termcap mode */
#define T_CTE (TERM_STR(KS_CTE)) /* end of "raw" mode */
#define T_BC (TERM_STR(KS_BC)) /* backspace character */
#define T_CCS (TERM_STR(KS_CCS)) /* cur is relative to scroll region */
#define T_CCO (TERM_STR(KS_CCO)) /* number of colors */
#define T_CSF (TERM_STR(KS_CSF)) /* set foreground color */
#define T_CSB (TERM_STR(KS_CSB)) /* set background color */
#define T_XS (TERM_STR(KS_XS)) /* standout not erased by overwriting */
#define T_XN (TERM_STR(KS_XN)) /* newline glitch */
#define T_MB (TERM_STR(KS_MB)) /* blink mode */
#define T_CAF (TERM_STR(KS_CAF)) /* set foreground color (ANSI) */
#define T_CAB (TERM_STR(KS_CAB)) /* set background color (ANSI) */
#define T_LE (TERM_STR(KS_LE)) /* cursor left */
#define T_ND (TERM_STR(KS_ND)) /* cursor right */
#define T_CIS (TERM_STR(KS_CIS)) /* set icon text start */
#define T_CIE (TERM_STR(KS_CIE)) /* set icon text end */
#define T_TS (TERM_STR(KS_TS)) /* set window title start */
#define T_FS (TERM_STR(KS_FS)) /* set window title end */
#define T_CSC (TERM_STR(KS_CSC)) /* set cursor color start */
#define T_CEC (TERM_STR(KS_CEC)) /* set cursor color end */
#define T_CWP (TERM_STR(KS_CWP)) /* set window position */
#define T_CGP (TERM_STR(KS_CGP)) /* get window position */
#define T_CWS (TERM_STR(KS_CWS)) /* window size */
#define T_CSI (TERM_STR(KS_CSI)) /* start insert mode */
#define T_CEI (TERM_STR(KS_CEI)) /* end insert mode */
#define T_CSR (TERM_STR(KS_CSR)) /* start replace mode */
#define T_CRV (TERM_STR(KS_CRV)) /* request version string */
#define T_RFG (TERM_STR(KS_RFG)) /* request foreground RGB */
#define T_RBG (TERM_STR(KS_RBG)) /* request background RGB */
#define T_OP (TERM_STR(KS_OP)) /* original color pair */
#define T_U7 (TERM_STR(KS_U7)) /* request cursor position */
#define T_8F (TERM_STR(KS_8F)) /* set foreground color (RGB) */
#define T_8B (TERM_STR(KS_8B)) /* set background color (RGB) */
#define T_BE (TERM_STR(KS_CBE)) /* enable bracketed paste mode */
#define T_BD (TERM_STR(KS_CBD)) /* disable bracketed paste mode */
#define T_PS (TERM_STR(KS_CPS)) /* start of bracketed paste */
#define T_PE (TERM_STR(KS_CPE)) /* end of bracketed paste */
#define T_CST (TERM_STR(KS_CST)) /* save window title */
#define T_CRT (TERM_STR(KS_CRT)) /* restore window title */
#define T_SSI (TERM_STR(KS_SSI)) /* save icon text */
#define T_SRI (TERM_STR(KS_SRI)) /* restore icon text */
#define T_NAME (TERM_STR(KS_NAME)) // terminal name
#define T_CE (TERM_STR(KS_CE)) // clear to end of line
#define T_AL (TERM_STR(KS_AL)) // add new blank line
#define T_CAL (TERM_STR(KS_CAL)) // add number of blank lines
#define T_DL (TERM_STR(KS_DL)) // delete line
#define T_CDL (TERM_STR(KS_CDL)) // delete number of lines
#define T_CS (TERM_STR(KS_CS)) // scroll region
#define T_CSV (TERM_STR(KS_CSV)) // scroll region vertical
#define T_CL (TERM_STR(KS_CL)) // clear screen
#define T_CD (TERM_STR(KS_CD)) // clear to end of display
#define T_UT (TERM_STR(KS_UT)) // clearing uses background color
#define T_DA (TERM_STR(KS_DA)) // text may be scrolled down from up
#define T_DB (TERM_STR(KS_DB)) // text may be scrolled up from down
#define T_VI (TERM_STR(KS_VI)) // cursor invisible
#define T_VE (TERM_STR(KS_VE)) // cursor visible
#define T_VS (TERM_STR(KS_VS)) // cursor very visible (blink)
#define T_CVS (TERM_STR(KS_CVS)) // cursor normally visible (no blink)
#define T_CSH (TERM_STR(KS_CSH)) // cursor shape
#define T_CRC (TERM_STR(KS_CRC)) // request cursor blinking
#define T_CRS (TERM_STR(KS_CRS)) // request cursor style
#define T_ME (TERM_STR(KS_ME)) // normal mode
#define T_MR (TERM_STR(KS_MR)) // reverse mode
#define T_MD (TERM_STR(KS_MD)) // bold mode
#define T_SE (TERM_STR(KS_SE)) // normal mode
#define T_SO (TERM_STR(KS_SO)) // standout mode
#define T_CZH (TERM_STR(KS_CZH)) // italic mode start
#define T_CZR (TERM_STR(KS_CZR)) // italic mode end
#define T_UE (TERM_STR(KS_UE)) // exit underscore (underline) mode
#define T_US (TERM_STR(KS_US)) // underscore (underline) mode
#define T_UCE (TERM_STR(KS_UCE)) // exit undercurl mode
#define T_UCS (TERM_STR(KS_UCS)) // undercurl mode
#define T_STE (TERM_STR(KS_STE)) // exit strikethrough mode
#define T_STS (TERM_STR(KS_STS)) // strikethrough mode
#define T_MS (TERM_STR(KS_MS)) // save to move cur in reverse mode
#define T_CM (TERM_STR(KS_CM)) // cursor motion
#define T_SR (TERM_STR(KS_SR)) // scroll reverse (backward)
#define T_CRI (TERM_STR(KS_CRI)) // cursor number of chars right
#define T_VB (TERM_STR(KS_VB)) // visual bell
#define T_KS (TERM_STR(KS_KS)) // put term in "keypad transmit" mode
#define T_KE (TERM_STR(KS_KE)) // out of "keypad transmit" mode
#define T_TI (TERM_STR(KS_TI)) // put terminal in termcap mode
#define T_CTI (TERM_STR(KS_CTI)) // put terminal in "raw" mode
#define T_TE (TERM_STR(KS_TE)) // end of termcap mode
#define T_CTE (TERM_STR(KS_CTE)) // end of "raw" mode
#define T_BC (TERM_STR(KS_BC)) // backspace character
#define T_CCS (TERM_STR(KS_CCS)) // cur is relative to scroll region
#define T_CCO (TERM_STR(KS_CCO)) // number of colors
#define T_CSF (TERM_STR(KS_CSF)) // set foreground color
#define T_CSB (TERM_STR(KS_CSB)) // set background color
#define T_XS (TERM_STR(KS_XS)) // standout not erased by overwriting
#define T_XN (TERM_STR(KS_XN)) // newline glitch
#define T_MB (TERM_STR(KS_MB)) // blink mode
#define T_CAF (TERM_STR(KS_CAF)) // set foreground color (ANSI)
#define T_CAB (TERM_STR(KS_CAB)) // set background color (ANSI)
#define T_LE (TERM_STR(KS_LE)) // cursor left
#define T_ND (TERM_STR(KS_ND)) // cursor right
#define T_CIS (TERM_STR(KS_CIS)) // set icon text start
#define T_CIE (TERM_STR(KS_CIE)) // set icon text end
#define T_TS (TERM_STR(KS_TS)) // set window title start
#define T_FS (TERM_STR(KS_FS)) // set window title end
#define T_CSC (TERM_STR(KS_CSC)) // set cursor color start
#define T_CEC (TERM_STR(KS_CEC)) // set cursor color end
#define T_CWP (TERM_STR(KS_CWP)) // set window position
#define T_CGP (TERM_STR(KS_CGP)) // get window position
#define T_CWS (TERM_STR(KS_CWS)) // window size
#define T_CSI (TERM_STR(KS_CSI)) // start insert mode
#define T_CEI (TERM_STR(KS_CEI)) // end insert mode
#define T_CSR (TERM_STR(KS_CSR)) // start replace mode
#define T_CRV (TERM_STR(KS_CRV)) // request version string
#define T_RFG (TERM_STR(KS_RFG)) // request foreground RGB
#define T_RBG (TERM_STR(KS_RBG)) // request background RGB
#define T_OP (TERM_STR(KS_OP)) // original color pair
#define T_U7 (TERM_STR(KS_U7)) // request cursor position
#define T_8F (TERM_STR(KS_8F)) // set foreground color (RGB)
#define T_8B (TERM_STR(KS_8B)) // set background color (RGB)
#define T_BE (TERM_STR(KS_CBE)) // enable bracketed paste mode
#define T_BD (TERM_STR(KS_CBD)) // disable bracketed paste mode
#define T_PS (TERM_STR(KS_CPS)) // start of bracketed paste
#define T_PE (TERM_STR(KS_CPE)) // end of bracketed paste
#define T_CST (TERM_STR(KS_CST)) // save window title
#define T_CRT (TERM_STR(KS_CRT)) // restore window title
#define T_SSI (TERM_STR(KS_SSI)) // save icon text
#define T_SRI (TERM_STR(KS_SRI)) // restore icon text
#define TMODE_COOK 0 /* terminal mode for external cmds and Ex mode */
#define TMODE_SLEEP 1 /* terminal mode for sleeping (cooked but no echo) */
#define TMODE_RAW 2 /* terminal mode for Normal and Insert mode */
#define TMODE_COOK 0 // terminal mode for external cmds and Ex mode
#define TMODE_SLEEP 1 // terminal mode for sleeping (cooked but no echo)
#define TMODE_RAW 2 // terminal mode for Normal and Insert mode

View File

@ -737,6 +737,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
2366,
/**/
2365,
/**/

View File

@ -24,7 +24,7 @@
#define VIM_VERSION_BUILD_STR "282"
#define VIM_VERSION_PATCHLEVEL 0
#define VIM_VERSION_PATCHLEVEL_STR "0"
/* Used by MacOS port should be one of: development, alpha, beta, final */
// Used by MacOS port should be one of: development, alpha, beta, final
#define VIM_VERSION_RELEASE final
/*

View File

@ -7,13 +7,13 @@
* See README.txt for an overview of the Vim source code.
*/
/* 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
#endif
/* cproto fails on missing include files */
// cproto fails on missing include files
#ifndef PROTO
# include <io.h>
#endif