vim-patch:8.1.2392: using old C style comments

Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
6e0ce171e1
This commit is contained in:
Dundar Göc
2021-10-06 10:53:17 +02:00
parent 41d3b98deb
commit b4acae2c4a
3 changed files with 103 additions and 109 deletions

View File

@@ -615,8 +615,8 @@ static void set_option_default(int opt_idx, int opt_flags)
uint32_t flags = options[opt_idx].flags;
if (varp != NULL) { // skip hidden option, nothing to do for it
if (flags & P_STRING) {
/* Use set_string_option_direct() for local options to handle
* freeing and allocating the value. */
// Use set_string_option_direct() for local options to handle
// freeing and allocating the value.
if (options[opt_idx].indir != PV_NONE) {
set_string_option_direct(NULL, opt_idx,
options[opt_idx].def_val, opt_flags, 0);
@@ -1094,8 +1094,8 @@ int do_set(char_u *arg, int opt_flags)
flags = P_STRING;
}
/* Skip all options that are not window-local (used when showing
* an already loaded buffer in a window). */
// Skip all options that are not window-local (used when showing
// an already loaded buffer in a window).
if ((opt_flags & OPT_WINONLY)
&& (opt_idx < 0 || options[opt_idx].var != VAR_WIN)) {
goto skip;
@@ -1514,8 +1514,8 @@ int do_set(char_u *arg, int opt_flags)
}
}
/* concatenate the two strings; add a ',' if
* needed */
// concatenate the two strings; add a ',' if
// needed
if (adding || prepending) {
comma = ((flags & P_COMMA) && *origval != NUL
&& *newval != NUL);
@@ -1540,8 +1540,8 @@ int do_set(char_u *arg, int opt_flags)
}
}
/* Remove newval[] from origval[]. (Note: "i" has
* been set above and is used here). */
// Remove newval[] from origval[]. (Note: "i" has
// been set above and is used here).
if (removing) {
STRCPY(newval, origval);
if (*s) {
@@ -4044,8 +4044,8 @@ static char *set_bool_option(const int opt_idx, char_u *const varp, const int va
}
}
/* Arabic requires a utf-8 encoding, inform the user if its not
* set. */
// Arabic requires a utf-8 encoding, inform the user if its not
// set.
if (STRCMP(p_enc, "utf-8") != 0) {
static char *w_arabic = N_("W17: Arabic requires UTF-8, do ':set encoding=utf-8'");
@@ -4070,12 +4070,12 @@ static char *set_bool_option(const int opt_idx, char_u *const varp, const int va
changed_window_setting();
}
/* 'arabicshape' isn't reset, it is a global option and
* another window may still need it "on". */
// 'arabicshape' isn't reset, it is a global option and
// another window may still need it "on".
}
/* 'delcombine' isn't reset, it is a global option and another
* window may still want it "on". */
// 'delcombine' isn't reset, it is a global option and another
// window may still want it "on".
// Revert to the default keymap
curbuf->b_p_iminsert = B_IMODE_NONE;
@@ -5218,8 +5218,8 @@ int makeset(FILE *fd, int opt_flags, int local_only)
continue;
}
/* Do not store options like 'bufhidden' and 'syntax' in a vimrc
* file, they are always buffer-specific. */
// Do not store options like 'bufhidden' and 'syntax' in a vimrc
// file, they are always buffer-specific.
if ((opt_flags & OPT_GLOBAL) && (p->flags & P_NOGLOB)) {
continue;
}
@@ -5339,9 +5339,9 @@ static int put_setstring(FILE *fd, char *cmd, char *name, char_u **valuep, uint6
return FAIL;
}
if (*valuep != NULL) {
/* Output 'pastetoggle' as key names. For other
* options some characters have to be escaped with
* CTRL-V or backslash */
// Output 'pastetoggle' as key names. For other
// options some characters have to be escaped with
// CTRL-V or backslash
if (valuep == &p_pt) {
s = *valuep;
while (*s != NUL) {
@@ -6607,8 +6607,8 @@ void ExpandOldSetting(int *num_file, char_u ***file)
char_u *buf = vim_strsave_escaped(var, escape_chars);
#ifdef BACKSLASH_IN_FILENAME
/* For MS-Windows et al. we don't double backslashes at the start and
* before a file name character. */
// For MS-Windows et al. we don't double backslashes at the start and
// before a file name character.
for (var = buf; *var != NUL; MB_PTR_ADV(var)) {
if (var[0] == '\\' && var[1] == '\\'
&& expand_option_idx >= 0