Patch 8.2.0027
Problem: Still some /* */ comments.
Solution: Convert to // comments.
Files: src/iid_ole.c, src/indent.c, src/insexpand.c, src/iscygpty.c,
src/version.c
*** ../vim-8.2.0026/src/iid_ole.c 2010-05-15 13:04:07.000000000 +0200
--- src/iid_ole.c 2019-12-21 18:35:23.163418078 +0100
***************
*** 1,16 ****
! /* this file contains the actual definitions of */
! /* the IIDs and CLSIDs */
! /* link this file in with the server and any clients */
! /* File created by MIDL compiler version 3.00.44 */
! /* at Sat Jan 03 16:34:55 1998
! */
! /* Compiler settings for if_ole.idl:
! Os (OptLev=s), W1, Zp8, env=Win32, ms_ext, c_ext
! error checks: none
! */
//@@MIDL_FILE_HEADING( )
#ifdef __cplusplus
extern "C"{
--- 1,14 ----
! // this file contains the actual definitions of
! // the IIDs and CLSIDs
! // link this file in with the server and any clients
! // File created by MIDL compiler version 3.00.44
! // at Sat Jan 03 16:34:55 1998
! // Compiler settings for if_ole.idl:
! // Os (OptLev=s), W1, Zp8, env=Win32, ms_ext, c_ext
! // error checks: none
//@@MIDL_FILE_HEADING( )
#ifdef __cplusplus
extern "C"{
***************
*** 20,27 ****
# include <w32api.h>
# if __W32API_MAJOR_VERSION == 3 && __W32API_MINOR_VERSION < 10
! /* This define is missing from older MingW versions of w32api, even though
! * IID is defined. */
# define __IID_DEFINED__
# endif
#endif
--- 18,25 ----
# include <w32api.h>
# if __W32API_MAJOR_VERSION == 3 && __W32API_MINOR_VERSION < 10
! // This define is missing from older MingW versions of w32api, even though
! // IID is defined.
# define __IID_DEFINED__
# endif
#endif
*** ../vim-8.2.0026/src/indent.c 2019-11-30 22:40:44.000000000 +0100
--- src/indent.c 2019-12-21 18:30:42.948514640 +0100
***************
*** 1534,1558 ****
long len;
long col;
long vcol;
! long start_col = 0; /* For start of white-space string */
! long start_vcol = 0; /* For start of white-space string */
long old_len;
char_u *ptr;
! char_u *new_line = (char_u *)1; /* init to non-NULL */
! int did_undo; /* called u_save for current line */
#ifdef FEAT_VARTABS
int *new_vts_array = NULL;
! char_u *new_ts_str; /* string value of tab argument */
#else
int temp;
int new_ts;
#endif
int save_list;
! linenr_T first_line = 0; /* first changed line */
! linenr_T last_line = 0; /* last changed line */
save_list = curwin->w_p_list;
! curwin->w_p_list = 0; /* don't want list mode here */
#ifdef FEAT_VARTABS
new_ts_str = eap->arg;
--- 1534,1558 ----
long len;
long col;
long vcol;
! long start_col = 0; // For start of white-space string
! long start_vcol = 0; // For start of white-space string
long old_len;
char_u *ptr;
! char_u *new_line = (char_u *)1; // init to non-NULL
! int did_undo; // called u_save for current line
#ifdef FEAT_VARTABS
int *new_vts_array = NULL;
! char_u *new_ts_str; // string value of tab argument
#else
int temp;
int new_ts;
#endif
int save_list;
! linenr_T first_line = 0; // first changed line
! linenr_T last_line = 0; // last changed line
save_list = curwin->w_p_list;
! curwin->w_p_list = 0; // don't want list mode here
#ifdef FEAT_VARTABS
new_ts_str = eap->arg;
***************
*** 1593,1599 ****
{
if (!got_tab && num_spaces == 0)
{
! /* First consecutive white-space */
start_vcol = vcol;
start_col = col;
}
--- 1593,1599 ----
{
if (!got_tab && num_spaces == 0)
{
! // First consecutive white-space
start_vcol = vcol;
start_col = col;
}
***************
*** 1606,1614 ****
{
if (got_tab || (eap->forceit && num_spaces > 1))
{
! /* Retabulate this string of white-space */
! /* len is virtual length of white string */
len = num_spaces = vcol - start_vcol;
num_tabs = 0;
if (!curbuf->b_p_et)
--- 1606,1614 ----
{
if (got_tab || (eap->forceit && num_spaces > 1))
{
! // Retabulate this string of white-space
! // len is virtual length of white string
len = num_spaces = vcol - start_vcol;
num_tabs = 0;
if (!curbuf->b_p_et)
***************
*** 1640,1651 ****
if (u_save((linenr_T)(lnum - 1),
(linenr_T)(lnum + 1)) == FAIL)
{
! new_line = NULL; /* flag out-of-memory */
break;
}
}
! /* len is actual number of white characters used */
len = num_spaces + num_tabs;
old_len = (long)STRLEN(ptr);
new_line = alloc(old_len - col + start_col + len + 1);
--- 1640,1651 ----
if (u_save((linenr_T)(lnum - 1),
(linenr_T)(lnum + 1)) == FAIL)
{
! new_line = NULL; // flag out-of-memory
break;
}
}
! // len is actual number of white characters used
len = num_spaces + num_tabs;
old_len = (long)STRLEN(ptr);
new_line = alloc(old_len - col + start_col + len + 1);
***************
*** 1677,1683 ****
else
++col;
}
! if (new_line == NULL) /* out of memory */
break;
line_breakcheck();
}
--- 1677,1683 ----
else
++col;
}
! if (new_line == NULL) // out of memory
break;
line_breakcheck();
}
***************
*** 1690,1699 ****
if (tabstop_count(curbuf->b_p_vts_array) == 0
&& tabstop_count(new_vts_array) == 1
&& curbuf->b_p_ts == tabstop_first(new_vts_array))
! ; /* not changed */
else if (tabstop_count(curbuf->b_p_vts_array) > 0
&& tabstop_eq(curbuf->b_p_vts_array, new_vts_array))
! ; /* not changed */
else
redraw_curbuf_later(NOT_VALID);
#else
--- 1690,1699 ----
if (tabstop_count(curbuf->b_p_vts_array) == 0
&& tabstop_count(new_vts_array) == 1
&& curbuf->b_p_ts == tabstop_first(new_vts_array))
! ; // not changed
else if (tabstop_count(curbuf->b_p_vts_array) > 0
&& tabstop_eq(curbuf->b_p_vts_array, new_vts_array))
! ; // not changed
else
redraw_curbuf_later(NOT_VALID);
#else
***************
*** 1703,1712 ****
if (first_line != 0)
changed_lines(first_line, 0, last_line + 1, 0L);
! curwin->w_p_list = save_list; /* restore 'list' */
#ifdef FEAT_VARTABS
! if (new_ts_str != NULL) /* set the new tabstop */
{
// If 'vartabstop' is in use or if the value given to retab has more
// than one tabstop then update 'vartabstop'.
--- 1703,1712 ----
if (first_line != 0)
changed_lines(first_line, 0, last_line + 1, 0L);
! curwin->w_p_list = save_list; // restore 'list'
#ifdef FEAT_VARTABS
! if (new_ts_str != NULL) // set the new tabstop
{
// If 'vartabstop' is in use or if the value given to retab has more
// than one tabstop then update 'vartabstop'.
*** ../vim-8.2.0026/src/insexpand.c 2019-12-10 21:17:33.000000000 +0100
--- src/insexpand.c 2019-12-21 18:30:53.100478312 +0100
***************
*** 20,26 ****
*/
# define CTRL_X_WANT_IDENT 0x100
! # define CTRL_X_NORMAL 0 /* CTRL-N CTRL-P completion, default */
# define CTRL_X_NOT_DEFINED_YET 1
# define CTRL_X_SCROLL 2
# define CTRL_X_WHOLE_LINE 3
--- 20,26 ----
*/
# define CTRL_X_WANT_IDENT 0x100
! # define CTRL_X_NORMAL 0 // CTRL-N CTRL-P completion, default
# define CTRL_X_NOT_DEFINED_YET 1
# define CTRL_X_SCROLL 2
# define CTRL_X_WHOLE_LINE 3
***************
*** 35,42 ****
# define CTRL_X_FUNCTION 12
# define CTRL_X_OMNI 13
# define CTRL_X_SPELL 14
! # define CTRL_X_LOCAL_MSG 15 /* only used in "ctrl_x_msgs" */
! # define CTRL_X_EVAL 16 /* for builtin function complete() */
# define CTRL_X_MSG(i) ctrl_x_msgs[(i) & ~CTRL_X_WANT_IDENT]
--- 35,42 ----
# define CTRL_X_FUNCTION 12
# define CTRL_X_OMNI 13
# define CTRL_X_SPELL 14
! # define CTRL_X_LOCAL_MSG 15 // only used in "ctrl_x_msgs"
! # define CTRL_X_EVAL 16 // for builtin function complete()
# define CTRL_X_MSG(i) ctrl_x_msgs[(i) & ~CTRL_X_WANT_IDENT]
*** ../vim-8.2.0026/src/iscygpty.c 2018-02-04 14:36:41.000000000 +0100
--- src/iscygpty.c 2019-12-21 18:31:35.928325016 +0100
***************
*** 35,52 ****
#include <windows.h>
#ifdef USE_FILEEXTD
! /* VC 7.1 or earlier doesn't support SAL. */
# if !defined(_MSC_VER) || (_MSC_VER < 1400)
# define __out
# define __in
# define __in_opt
# endif
! /* Win32 FileID API Library:
! *
http://www.microsoft.com/en-us/download/details.aspx?id=22599
! * Needed for WinXP. */
# include <fileextd.h>
! #else /* USE_FILEEXTD */
! /* VC 8 or earlier. */
# if defined(_MSC_VER) && (_MSC_VER < 1500)
# ifdef ENABLE_STUB_IMPL
# define STUB_IMPL
--- 35,52 ----
#include <windows.h>
#ifdef USE_FILEEXTD
! // VC 7.1 or earlier doesn't support SAL.
# if !defined(_MSC_VER) || (_MSC_VER < 1400)
# define __out
# define __in
# define __in_opt
# endif
! // Win32 FileID API Library:
! //
http://www.microsoft.com/en-us/download/details.aspx?id=22599
! // Needed for WinXP.
# include <fileextd.h>
! #else // USE_FILEEXTD
! // VC 8 or earlier.
# if defined(_MSC_VER) && (_MSC_VER < 1500)
# ifdef ENABLE_STUB_IMPL
# define STUB_IMPL
***************
*** 54,60 ****
# error "Win32 FileID API Library is required for VC2005 or earlier."
# endif
# endif
! #endif /* USE_FILEEXTD */
#include "iscygpty.h"
--- 54,60 ----
# error "Win32 FileID API Library is required for VC2005 or earlier."
# endif
# endif
! #endif // USE_FILEEXTD
#include "iscygpty.h"
***************
*** 104,110 ****
#define is_wprefix(s, prefix) \
(wcsncmp((s), (prefix), sizeof(prefix) / sizeof(WCHAR) - 1) == 0)
! /* Check if the fd is a cygwin/msys's pty. */
int is_cygpty(int fd)
{
#ifdef STUB_IMPL
--- 104,110 ----
#define is_wprefix(s, prefix) \
(wcsncmp((s), (prefix), sizeof(prefix) / sizeof(WCHAR) - 1) == 0)
! // Check if the fd is a cygwin/msys's pty.
int is_cygpty(int fd)
{
#ifdef STUB_IMPL
***************
*** 121,127 ****
if (h == INVALID_HANDLE_VALUE) {
return 0;
}
! /* Cygwin/msys's pty is a pipe. */
if (GetFileType(h) != FILE_TYPE_PIPE) {
return 0;
}
--- 121,127 ----
if (h == INVALID_HANDLE_VALUE) {
return 0;
}
! // Cygwin/msys's pty is a pipe.
if (GetFileType(h) != FILE_TYPE_PIPE) {
return 0;
}
***************
*** 129,148 ****
if (nameinfo == NULL) {
return 0;
}
! /* Check the name of the pipe:
! * '\{cygwin,msys}-XXXXXXXXXXXXXXXX-ptyN-{from,to}-master' */
if (pGetFileInformationByHandleEx(h, FileNameInfo, nameinfo, size)) {
nameinfo->FileName[nameinfo->FileNameLength / sizeof(WCHAR)] = L'\0';
p = nameinfo->FileName;
! if (is_wprefix(p, L"\\cygwin-")) { /* Cygwin */
p += 8;
! } else if (is_wprefix(p, L"\\msys-")) { /* MSYS and MSYS2 */
p += 6;
} else {
p = NULL;
}
if (p != NULL) {
! while (*p && isxdigit(*p)) /* Skip 16-digit hexadecimal. */
++p;
if (is_wprefix(p, L"-pty")) {
p += 4;
--- 129,148 ----
if (nameinfo == NULL) {
return 0;
}
! // Check the name of the pipe:
! // '\{cygwin,msys}-XXXXXXXXXXXXXXXX-ptyN-{from,to}-master'
if (pGetFileInformationByHandleEx(h, FileNameInfo, nameinfo, size)) {
nameinfo->FileName[nameinfo->FileNameLength / sizeof(WCHAR)] = L'\0';
p = nameinfo->FileName;
! if (is_wprefix(p, L"\\cygwin-")) { // Cygwin
p += 8;
! } else if (is_wprefix(p, L"\\msys-")) { // MSYS and MSYS2
p += 6;
} else {
p = NULL;
}
if (p != NULL) {
! while (*p && isxdigit(*p)) // Skip 16-digit hexadecimal.
++p;
if (is_wprefix(p, L"-pty")) {
p += 4;
***************
*** 151,157 ****
}
}
if (p != NULL) {
! while (*p && isdigit(*p)) /* Skip pty number. */
++p;
if (is_wprefix(p, L"-from-master")) {
//p += 12;
--- 151,157 ----
}
}
if (p != NULL) {
! while (*p && isdigit(*p)) // Skip pty number.
++p;
if (is_wprefix(p, L"-from-master")) {
//p += 12;
***************
*** 164,173 ****
}
free(nameinfo);
return (p != NULL);
! #endif /* STUB_IMPL */
}
! /* Check if at least one cygwin/msys pty is used. */
int is_cygpty_used(void)
{
int fd, ret = 0;
--- 164,173 ----
}
free(nameinfo);
return (p != NULL);
! #endif // STUB_IMPL
}
! // Check if at least one cygwin/msys pty is used.
int is_cygpty_used(void)
{
int fd, ret = 0;
***************
*** 178,183 ****
return ret;
}
! #endif /* _WIN32 */
! /* vim: set ts=4 sw=4: */
--- 178,183 ----
return ret;
}
! #endif // _WIN32
! // vim: set ts=4 sw=4:
*** ../vim-8.2.0026/src/version.c 2019-12-21 18:25:50.453560468 +0100
--- src/version.c 2019-12-21 18:37:00.615038252 +0100
***************
*** 10,16 ****
#include "vim.h"
#ifdef AMIGA
! # include <time.h> /* for time() */
#endif
/*
--- 10,16 ----
#include "vim.h"
#ifdef AMIGA
! # include <time.h> // for time()
#endif
/*
***************
*** 86,92 ****
#else
"-acl",
#endif
! #ifdef AMIGA /* only for Amiga systems */
# ifdef FEAT_ARP
"+ARP",
# else
--- 86,92 ----
#else
"-acl",
#endif
! #ifdef AMIGA // only for Amiga systems
# ifdef FEAT_ARP
"+ARP",
# else
***************
*** 269,275 ****
#else
"-footer",
#endif
! /* only interesting on Unix systems */
#if !defined(USE_SYSTEM) && defined(UNIX)
"+fork()",
#endif
--- 269,275 ----
#else
"-footer",
#endif
! // only interesting on Unix systems
#if !defined(USE_SYSTEM) && defined(UNIX)
"+fork()",
#endif
***************
*** 571,577 ****
#else
"-syntax",
#endif
! /* only interesting on Unix systems */
#if defined(USE_SYSTEM) && defined(UNIX)
"+system()",
#endif
--- 571,577 ----
#else
"-syntax",
#endif
! // only interesting on Unix systems
#if defined(USE_SYSTEM) && defined(UNIX)
"+system()",
#endif
***************
*** 602,608 ****
"-terminal",
#endif
#if defined(UNIX)
! /* only Unix can have terminfo instead of termcap */
# ifdef TERMINFO
"+terminfo",
# else
--- 602,608 ----
"-terminal",
#endif
#if defined(UNIX)
! // only Unix can have terminfo instead of termcap
# ifdef TERMINFO
"+terminfo",
# else
***************
*** 625,631 ****
"-textprop",
#endif
#if !defined(UNIX)
! /* unix always includes termcap support */
# ifdef HAVE_TGETENT
"+tgetent",
# else
--- 625,631 ----
"-textprop",
#endif
#if !defined(UNIX)
! // unix always includes termcap support
# ifdef HAVE_TGETENT
"+tgetent",
# else
***************
*** 903,910 ****
int use_highlight = (items == (char_u **)features);
#endif
! /* Find the length of the longest item, use that + 1 as the column
! * width. */
for (i = 0; size < 0 ? items[i] != NULL : i < size; ++i)
{
int l = (int)vim_strsize(items[i]) + (i == current ? 2 : 0);
--- 905,912 ----
int use_highlight = (items == (char_u **)features);
#endif
! // Find the length of the longest item, use that + 1 as the column
! // width.
for (i = 0; size < 0 ? items[i] != NULL : i < size; ++i)
{
int l = (int)vim_strsize(items[i]) + (i == current ? 2 : 0);
***************
*** 1035,1047 ****
#endif
! /* Print the list of patch numbers if there is at least one. */
! /* Print a range when patches are consecutive: "1-10, 12, 15-40, 42-45" */
if (included_patches[0] != 0)
{
msg_puts(_("\nIncluded patches: "));
first = -1;
! /* find last one */
for (i = 0; included_patches[i] != 0; ++i)
;
while (--i >= 0)
--- 1037,1049 ----
#endif
! // Print the list of patch numbers if there is at least one.
! // Print a range when patches are consecutive: "1-10, 12, 15-40, 42-45"
if (included_patches[0] != 0)
{
msg_puts(_("\nIncluded patches: "));
first = -1;
! // find last one
for (i = 0; included_patches[i] != 0; ++i)
;
while (--i >= 0)
***************
*** 1063,1069 ****
}
}
! /* Print the list of extra patch descriptions if there is at least one. */
if (extra_patches[0] != NULL)
{
msg_puts(_("\nExtra patches: "));
--- 1065,1071 ----
}
}
! // Print the list of extra patch descriptions if there is at least one.
if (extra_patches[0] != NULL)
{
msg_puts(_("\nExtra patches: "));
***************
*** 1281,1287 ****
*/
void
intro_message(
! int colon) /* TRUE for ":intro" */
{
int i;
int row;
--- 1283,1289 ----
*/
void
intro_message(
! int colon) // TRUE for ":intro"
{
int i;
int row;
***************
*** 1337,1359 ****
};
#endif
! /* blanklines = screen height - # message lines */
blanklines = (int)Rows - ((sizeof(lines) / sizeof(char *)) - 1);
if (!p_cp)
! blanklines += 4; /* add 4 for not showing "Vi compatible" message */
! /* Don't overwrite a statusline. Depends on 'cmdheight'. */
if (p_ls > 1)
blanklines -= Rows - topframe->fr_height;
if (blanklines < 0)
blanklines = 0;
! /* Show the sponsor and register message one out of four times, the Uganda
! * message two out of four times. */
sponsor = (int)time(NULL);
sponsor = ((sponsor & 2) == 0) - ((sponsor & 4) == 0);
! /* start displaying the message lines after half of the blank lines */
row = blanklines / 2;
if ((row >= 2 && Columns >= 50) || colon)
{
--- 1339,1361 ----
};
#endif
! // blanklines = screen height - # message lines
blanklines = (int)Rows - ((sizeof(lines) / sizeof(char *)) - 1);
if (!p_cp)
! blanklines += 4; // add 4 for not showing "Vi compatible" message
! // Don't overwrite a statusline. Depends on 'cmdheight'.
if (p_ls > 1)
blanklines -= Rows - topframe->fr_height;
if (blanklines < 0)
blanklines = 0;
! // Show the sponsor and register message one out of four times, the Uganda
! // message two out of four times.
sponsor = (int)time(NULL);
sponsor = ((sponsor & 2) == 0) - ((sponsor & 4) == 0);
! // start displaying the message lines after half of the blank lines
row = blanklines / 2;
if ((row >= 2 && Columns >= 50) || colon)
{
***************
*** 1389,1395 ****
}
}
! /* Make the wait-return message appear just below the text. */
if (colon)
msg_row = row;
}
--- 1391,1397 ----
}
}
! // Make the wait-return message appear just below the text.
if (colon)
msg_row = row;
}
***************
*** 1419,1432 ****
}
#endif
! /* Center the message horizontally. */
col = vim_strsize(mesg);
if (add_version)
{
STRCPY(vers, mediumVersion);
if (highest_patch())
{
! /* Check for 9.9x or 9.9xx, alpha/beta version */
if (isalpha((int)vers[3]))
{
int len = (isalpha((int)vers[4])) ? 5 : 4;
--- 1421,1434 ----
}
#endif
! // Center the message horizontally.
col = vim_strsize(mesg);
if (add_version)
{
STRCPY(vers, mediumVersion);
if (highest_patch())
{
! // Check for 9.9x or 9.9xx, alpha/beta version
if (isalpha((int)vers[3]))
{
int len = (isalpha((int)vers[4])) ? 5 : 4;
***************
*** 1442,1448 ****
if (col < 0)
col = 0;
! /* Split up in parts to highlight <> items differently. */
for (p = mesg; *p != NUL; p += l)
{
clen = 0;
--- 1444,1450 ----
if (col < 0)
col = 0;
! // Split up in parts to highlight <> items differently.
for (p = mesg; *p != NUL; p += l)
{
clen = 0;
***************
*** 1461,1467 ****
col += clen;
}
! /* Add the version number to the version line. */
if (add_version)
screen_puts(vers, row, col, 0);
}
--- 1463,1469 ----
col += clen;
}
! // Add the version number to the version line.
if (add_version)
screen_puts(vers, row, col, 0);
}
*** ../vim-8.2.0026/src/version.c 2019-12-21 18:25:50.453560468 +0100
--- src/version.c 2019-12-21 18:37:00.615038252 +0100
***************
*** 744,745 ****
--- 744,747 ----
{ /* Add new patch number below this line */
+ /**/
+ 27,
/**/
--
Not too long ago, a keyboard was something to make music with...
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language --
http://www.Zimbu.org ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///