mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Refactor/uncrustify (#15790)
* refactor: format with uncrustify * fixup(dundar): fix functions comments * fixup(dundar): remove space between variable and ++/-- * fixup(dundar): better workaround for macro attributes This is done to be able to better use uncrustify rules for macros * fixup(justin): make preprocessors follow neovim style guide
This commit is contained in:
parent
ec4731d982
commit
d90fb1c0bf
@ -45,5 +45,5 @@ MsgpackRpcRequestHandler msgpack_rpc_get_handler_for(const char *name, size_t na
|
||||
}
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
#include "api/private/dispatch_wrappers.generated.h"
|
||||
# include "api/private/dispatch_wrappers.generated.h"
|
||||
#endif
|
||||
|
@ -24,8 +24,8 @@
|
||||
#include "nvim/vim.h"
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
#include "auevents_name_map.generated.h"
|
||||
#include "autocmd.c.generated.h"
|
||||
# include "auevents_name_map.generated.h"
|
||||
# include "autocmd.c.generated.h"
|
||||
#endif
|
||||
|
||||
//
|
||||
|
@ -3429,14 +3429,14 @@ void resettitle(void)
|
||||
ui_flush();
|
||||
}
|
||||
|
||||
# if defined(EXITFREE)
|
||||
#if defined(EXITFREE)
|
||||
void free_titles(void)
|
||||
{
|
||||
xfree(lasttitle);
|
||||
xfree(lasticon);
|
||||
}
|
||||
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/// Enumeration specifying the valid numeric bases that can
|
||||
/// be used when printing numbers in the status line.
|
||||
|
@ -37,7 +37,7 @@ void bufhl_add_hl_pos_offset(buf_T *buf, int src_id, int hl_id, lpos_T pos_start
|
||||
|
||||
decor->priority = DECOR_PRIORITY_BASE;
|
||||
// TODO(bfredl): if decoration had blocky mode, we could avoid this loop
|
||||
for (linenr_T lnum = pos_start.lnum; lnum <= pos_end.lnum; lnum ++) {
|
||||
for (linenr_T lnum = pos_start.lnum; lnum <= pos_end.lnum; lnum++) {
|
||||
int end_off = 0;
|
||||
if (pos_start.lnum < lnum && lnum < pos_end.lnum) {
|
||||
// TODO(bfredl): This is quite ad-hoc, but the space between |num| and
|
||||
|
@ -5681,7 +5681,7 @@ static void insert_special(int c, int allow_modmask, int ctrlv)
|
||||
* stop and defer processing to the "normal" mechanism.
|
||||
* '0' and '^' are special, because they can be followed by CTRL-D.
|
||||
*/
|
||||
# define ISSPECIAL(c) ((c) < ' ' || (c) >= DEL || (c) == '0' || (c) == '^')
|
||||
#define ISSPECIAL(c) ((c) < ' ' || (c) >= DEL || (c) == '0' || (c) == '^')
|
||||
|
||||
#define WHITECHAR(cc) ( \
|
||||
ascii_iswhite(cc) \
|
||||
|
@ -80,16 +80,16 @@ KHASH_MAP_INIT_STR(functions, VimLFuncDef)
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "eval/funcs.c.generated.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# ifdef _MSC_VER
|
||||
// This prevents MSVC from replacing the functions with intrinsics,
|
||||
// and causing errors when trying to get their addresses in funcs.generated.h
|
||||
#pragma function(ceil)
|
||||
#pragma function(floor)
|
||||
#endif
|
||||
# pragma function(ceil)
|
||||
# pragma function(floor)
|
||||
# endif
|
||||
|
||||
PRAGMA_DIAG_PUSH_IGNORE_MISSING_PROTOTYPES
|
||||
PRAGMA_DIAG_PUSH_IGNORE_IMPLICIT_FALLTHROUGH
|
||||
#include "funcs.generated.h"
|
||||
# include "funcs.generated.h"
|
||||
PRAGMA_DIAG_POP
|
||||
PRAGMA_DIAG_POP
|
||||
#endif
|
||||
|
@ -100,7 +100,7 @@ void list_write_log(const char *const fname)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef EXITFREE
|
||||
# ifdef EXITFREE
|
||||
/// Free list log
|
||||
void list_free_log(void)
|
||||
{
|
||||
@ -110,7 +110,7 @@ void list_free_log(void)
|
||||
chunk = list_log_first;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
#endif
|
||||
//{{{2 List item
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
#define FC_CFUNC 0x800 // C function extension
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
#include "eval/userfunc.c.generated.h"
|
||||
# include "eval/userfunc.c.generated.h"
|
||||
#endif
|
||||
|
||||
hashtab_T func_hashtab;
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
// For compatibility with libuv < 1.19.0 (tested on 1.18.0)
|
||||
#if UV_VERSION_MINOR < 19
|
||||
#define uv_stream_get_write_queue_size(stream) stream->write_queue_size
|
||||
# define uv_stream_get_write_queue_size(stream) stream->write_queue_size
|
||||
#endif
|
||||
|
||||
/// Sets the stream associated with `fd` to "blocking" mode.
|
||||
|
@ -109,7 +109,7 @@ struct source_cookie {
|
||||
vimconv_T conv; ///< type of conversion
|
||||
};
|
||||
|
||||
# define PRL_ITEM(si, idx) (((sn_prl_T *)(si)->sn_prl_ga.ga_data)[(idx)])
|
||||
#define PRL_ITEM(si, idx) (((sn_prl_T *)(si)->sn_prl_ga.ga_data)[(idx)])
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "ex_cmds2.c.generated.h"
|
||||
@ -2340,7 +2340,7 @@ void ex_scriptnames(exarg_T *eap)
|
||||
}
|
||||
}
|
||||
|
||||
# if defined(BACKSLASH_IN_FILENAME)
|
||||
#if defined(BACKSLASH_IN_FILENAME)
|
||||
/// Fix slashes in the list of script names for 'shellslash'.
|
||||
void scriptnames_slash_adjust(void)
|
||||
{
|
||||
@ -2351,7 +2351,7 @@ void scriptnames_slash_adjust(void)
|
||||
}
|
||||
}
|
||||
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/// Get a pointer to a script name. Used for ":verbose set".
|
||||
/// Message appended to "Last set from "
|
||||
@ -2388,7 +2388,7 @@ char_u *get_scriptname(LastSet last_set, bool *should_free)
|
||||
}
|
||||
}
|
||||
|
||||
# if defined(EXITFREE)
|
||||
#if defined(EXITFREE)
|
||||
void free_scriptnames(void)
|
||||
{
|
||||
profile_reset();
|
||||
@ -2396,7 +2396,7 @@ void free_scriptnames(void)
|
||||
# define FREE_SCRIPTNAME(item) xfree((item)->sn_name)
|
||||
GA_DEEP_CLEAR(&script_items, scriptitem_T, FREE_SCRIPTNAME);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
linenr_T get_sourced_lnum(LineGetter fgetline, void *cookie)
|
||||
{
|
||||
@ -2786,17 +2786,17 @@ char *get_mess_lang(void)
|
||||
{
|
||||
char *p;
|
||||
|
||||
# ifdef HAVE_GET_LOCALE_VAL
|
||||
# if defined(LC_MESSAGES)
|
||||
#ifdef HAVE_GET_LOCALE_VAL
|
||||
# if defined(LC_MESSAGES)
|
||||
p = get_locale_val(LC_MESSAGES);
|
||||
# else
|
||||
# else
|
||||
// This is necessary for Win32, where LC_MESSAGES is not defined and $LANG
|
||||
// may be set to the LCID number. LC_COLLATE is the best guess, LC_TIME
|
||||
// and LC_MONETARY may be set differently for a Japanese working in the
|
||||
// US.
|
||||
p = get_locale_val(LC_COLLATE);
|
||||
# endif
|
||||
# else
|
||||
# endif
|
||||
#else
|
||||
p = os_getenv("LC_ALL");
|
||||
if (!is_valid_mess_lang(p)) {
|
||||
p = os_getenv("LC_MESSAGES");
|
||||
@ -2804,7 +2804,7 @@ char *get_mess_lang(void)
|
||||
p = os_getenv("LANG");
|
||||
}
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
return is_valid_mess_lang(p) ? p : NULL;
|
||||
}
|
||||
|
||||
@ -2842,37 +2842,37 @@ void set_lang_var(void)
|
||||
{
|
||||
const char *loc;
|
||||
|
||||
# ifdef HAVE_GET_LOCALE_VAL
|
||||
#ifdef HAVE_GET_LOCALE_VAL
|
||||
loc = get_locale_val(LC_CTYPE);
|
||||
# else
|
||||
#else
|
||||
// setlocale() not supported: use the default value
|
||||
loc = "C";
|
||||
# endif
|
||||
#endif
|
||||
set_vim_var_string(VV_CTYPE, loc, -1);
|
||||
|
||||
// When LC_MESSAGES isn't defined use the value from $LC_MESSAGES, fall
|
||||
// back to LC_CTYPE if it's empty.
|
||||
# ifdef HAVE_WORKING_LIBINTL
|
||||
#ifdef HAVE_WORKING_LIBINTL
|
||||
loc = (char *)get_mess_env();
|
||||
# elif defined(LC_MESSAGES)
|
||||
#elif defined(LC_MESSAGES)
|
||||
loc = get_locale_val(LC_MESSAGES);
|
||||
# else
|
||||
#else
|
||||
// In Windows LC_MESSAGES is not defined fallback to LC_CTYPE
|
||||
loc = get_locale_val(LC_CTYPE);
|
||||
# endif
|
||||
#endif
|
||||
set_vim_var_string(VV_LANG, loc, -1);
|
||||
|
||||
# ifdef HAVE_GET_LOCALE_VAL
|
||||
#ifdef HAVE_GET_LOCALE_VAL
|
||||
loc = get_locale_val(LC_TIME);
|
||||
# endif
|
||||
#endif
|
||||
set_vim_var_string(VV_LC_TIME, loc, -1);
|
||||
|
||||
# ifdef HAVE_GET_LOCALE_VAL
|
||||
#ifdef HAVE_GET_LOCALE_VAL
|
||||
loc = get_locale_val(LC_COLLATE);
|
||||
# else
|
||||
#else
|
||||
// setlocale() not supported: use the default value
|
||||
loc = "C";
|
||||
# endif
|
||||
#endif
|
||||
set_vim_var_string(VV_COLLATE, loc, -1);
|
||||
}
|
||||
|
||||
@ -2889,11 +2889,11 @@ void ex_language(exarg_T *eap)
|
||||
char_u *name;
|
||||
int what = LC_ALL;
|
||||
char *whatstr = "";
|
||||
#ifdef LC_MESSAGES
|
||||
# define VIM_LC_MESSAGES LC_MESSAGES
|
||||
#else
|
||||
# define VIM_LC_MESSAGES 6789
|
||||
#endif
|
||||
# ifdef LC_MESSAGES
|
||||
# define VIM_LC_MESSAGES LC_MESSAGES
|
||||
# else
|
||||
# define VIM_LC_MESSAGES 6789
|
||||
# endif
|
||||
|
||||
name = eap->arg;
|
||||
|
||||
@ -2922,43 +2922,43 @@ void ex_language(exarg_T *eap)
|
||||
}
|
||||
|
||||
if (*name == NUL) {
|
||||
#ifdef HAVE_WORKING_LIBINTL
|
||||
# ifdef HAVE_WORKING_LIBINTL
|
||||
if (what == VIM_LC_MESSAGES) {
|
||||
p = get_mess_env();
|
||||
} else {
|
||||
#endif
|
||||
# endif
|
||||
p = (char_u *)setlocale(what, NULL);
|
||||
#ifdef HAVE_WORKING_LIBINTL
|
||||
# ifdef HAVE_WORKING_LIBINTL
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
if (p == NULL || *p == NUL) {
|
||||
p = (char_u *)"Unknown";
|
||||
}
|
||||
smsg(_("Current %slanguage: \"%s\""), whatstr, p);
|
||||
} else {
|
||||
#ifndef LC_MESSAGES
|
||||
# ifndef LC_MESSAGES
|
||||
if (what == VIM_LC_MESSAGES) {
|
||||
loc = "";
|
||||
} else {
|
||||
#endif
|
||||
# endif
|
||||
loc = setlocale(what, (char *)name);
|
||||
#ifdef LC_NUMERIC
|
||||
# ifdef LC_NUMERIC
|
||||
// Make sure strtod() uses a decimal point, not a comma.
|
||||
setlocale(LC_NUMERIC, "C");
|
||||
#endif
|
||||
#ifndef LC_MESSAGES
|
||||
# endif
|
||||
# ifndef LC_MESSAGES
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
if (loc == NULL) {
|
||||
EMSG2(_("E197: Cannot set language to \"%s\""), name);
|
||||
} else {
|
||||
#ifdef HAVE_NL_MSG_CAT_CNTR
|
||||
# ifdef HAVE_NL_MSG_CAT_CNTR
|
||||
// Need to do this for GNU gettext, otherwise cached translations
|
||||
// will be used again.
|
||||
extern int _nl_msg_cat_cntr;
|
||||
|
||||
_nl_msg_cat_cntr++;
|
||||
#endif
|
||||
# endif
|
||||
// Reset $LC_ALL, otherwise it would overrule everything.
|
||||
os_setenv("LC_ALL", "", 1);
|
||||
|
||||
@ -2987,7 +2987,7 @@ void ex_language(exarg_T *eap)
|
||||
|
||||
static char_u **locales = NULL; // Array of all available locales
|
||||
|
||||
#ifndef WIN32
|
||||
# ifndef WIN32
|
||||
static bool did_init_locales = false;
|
||||
|
||||
/// Return an array of strings for all available locales + NULL for the
|
||||
@ -3022,20 +3022,20 @@ static char_u **find_locales(void)
|
||||
((char_u **)locales_ga.ga_data)[locales_ga.ga_len] = NULL;
|
||||
return (char_u **)locales_ga.ga_data;
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
/// Lazy initialization of all available locales.
|
||||
static void init_locales(void)
|
||||
{
|
||||
#ifndef WIN32
|
||||
# ifndef WIN32
|
||||
if (!did_init_locales) {
|
||||
did_init_locales = true;
|
||||
locales = find_locales();
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
}
|
||||
|
||||
# if defined(EXITFREE)
|
||||
# if defined(EXITFREE)
|
||||
void free_locales(void)
|
||||
{
|
||||
int i;
|
||||
@ -3047,7 +3047,7 @@ void free_locales(void)
|
||||
}
|
||||
}
|
||||
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/// Function given to ExpandGeneric() to obtain the possible arguments of the
|
||||
/// ":language" command.
|
||||
|
@ -99,7 +99,7 @@ static garray_T ucmds = { 0, 0, sizeof(ucmd_T), 4, NULL };
|
||||
#define USER_CMD_GA(gap, i) (&((ucmd_T *)((gap)->ga_data))[i])
|
||||
|
||||
// Whether a command index indicates a user command.
|
||||
# define IS_USER_CMDIDX(idx) ((int)(idx) < 0)
|
||||
#define IS_USER_CMDIDX(idx) ((int)(idx) < 0)
|
||||
|
||||
// Struct for storing a line inside a while/for loop
|
||||
typedef struct {
|
||||
@ -6949,7 +6949,7 @@ static void ex_goto(exarg_T *eap)
|
||||
*/
|
||||
void alist_clear(alist_T *al)
|
||||
{
|
||||
# define FREE_AENTRY_FNAME(arg) xfree(arg->ae_fname)
|
||||
#define FREE_AENTRY_FNAME(arg) xfree(arg->ae_fname)
|
||||
GA_DEEP_CLEAR(&al->al_ga, aentry_T, FREE_AENTRY_FNAME);
|
||||
}
|
||||
|
||||
|
@ -2570,13 +2570,13 @@ static void realloc_cmdbuff(int len)
|
||||
|
||||
static char_u *arshape_buf = NULL;
|
||||
|
||||
# if defined(EXITFREE)
|
||||
#if defined(EXITFREE)
|
||||
void free_arshape_buf(void)
|
||||
{
|
||||
xfree(arshape_buf);
|
||||
}
|
||||
|
||||
# endif
|
||||
#endif
|
||||
|
||||
enum { MAX_CB_ERRORS = 1 };
|
||||
|
||||
@ -4111,7 +4111,7 @@ char *vim_strsave_fnameescape(const char *const fname, const bool shell FUNC_ATT
|
||||
FUNC_ATTR_NONNULL_RET FUNC_ATTR_MALLOC FUNC_ATTR_NONNULL_ALL
|
||||
{
|
||||
#ifdef BACKSLASH_IN_FILENAME
|
||||
#define PATH_ESC_CHARS " \t\n*?[{`%#'\"|!<"
|
||||
# define PATH_ESC_CHARS " \t\n*?[{`%#'\"|!<"
|
||||
char_u buf[sizeof(PATH_ESC_CHARS)];
|
||||
int j = 0;
|
||||
|
||||
@ -4125,8 +4125,8 @@ char *vim_strsave_fnameescape(const char *const fname, const bool shell FUNC_ATT
|
||||
char *p = (char *)vim_strsave_escaped((const char_u *)fname,
|
||||
(const char_u *)buf);
|
||||
#else
|
||||
#define PATH_ESC_CHARS ((char_u *)" \t\n*?[{`$\\%#'\"|!<")
|
||||
#define SHELL_ESC_CHARS ((char_u *)" \t\n*?[{`$\\%#'\"|!<>();&")
|
||||
# define PATH_ESC_CHARS ((char_u *)" \t\n*?[{`$\\%#'\"|!<")
|
||||
# define SHELL_ESC_CHARS ((char_u *)" \t\n*?[{`$\\%#'\"|!<>();&")
|
||||
char *p =
|
||||
(char *)vim_strsave_escaped((const char_u *)fname, (shell ? SHELL_ESC_CHARS : PATH_ESC_CHARS));
|
||||
if (shell && csh_like_shell()) {
|
||||
|
@ -65,7 +65,7 @@
|
||||
|
||||
// For compatibility with libuv < 1.20.0 (tested on 1.18.0)
|
||||
#ifndef UV_FS_COPYFILE_FICLONE
|
||||
#define UV_FS_COPYFILE_FICLONE 0
|
||||
# define UV_FS_COPYFILE_FICLONE 0
|
||||
#endif
|
||||
|
||||
#define HAS_BW_FLAGS
|
||||
@ -105,9 +105,9 @@ struct bw_info {
|
||||
int bw_conv_error; // set for conversion error
|
||||
linenr_T bw_conv_error_lnum; // first line with error or zero
|
||||
linenr_T bw_start_lnum; // line number at start of buffer
|
||||
# ifdef HAVE_ICONV
|
||||
#ifdef HAVE_ICONV
|
||||
iconv_t bw_iconv_fd; // descriptor for iconv() or -1
|
||||
# endif
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
@ -233,11 +233,11 @@ int readfile(char_u *fname, char_u *sfname, linenr_T from, linenr_T lines_to_ski
|
||||
char_u *fenc_next = NULL; // next item in 'fencs' or NULL
|
||||
bool advance_fenc = false;
|
||||
long real_size = 0;
|
||||
# ifdef HAVE_ICONV
|
||||
#ifdef HAVE_ICONV
|
||||
iconv_t iconv_fd = (iconv_t)-1; // descriptor for iconv() or -1
|
||||
bool did_iconv = false; // true when iconv() failed and trying
|
||||
// 'charconvert' next
|
||||
# endif
|
||||
#endif
|
||||
bool converted = false; // true if conversion done
|
||||
bool notconverted = false; // true if conversion wanted but it wasn't possible
|
||||
char_u conv_rest[CONV_RESTLEN];
|
||||
@ -373,10 +373,10 @@ int readfile(char_u *fname, char_u *sfname, linenr_T from, linenr_T lines_to_ski
|
||||
if (perm >= 0 && !S_ISREG(perm) // not a regular file ...
|
||||
&& !S_ISFIFO(perm) // ... or fifo
|
||||
&& !S_ISSOCK(perm) // ... or socket
|
||||
# ifdef OPEN_CHR_FILES
|
||||
#ifdef OPEN_CHR_FILES
|
||||
&& !(S_ISCHR(perm) && is_dev_fd_file(fname))
|
||||
// ... or a character special file named /dev/fd/<n>
|
||||
# endif
|
||||
#endif
|
||||
) {
|
||||
if (S_ISDIR(perm)) {
|
||||
filemess(curbuf, fname, (char_u *)_(msg_is_a_directory), 0);
|
||||
@ -493,11 +493,11 @@ int readfile(char_u *fname, char_u *sfname, linenr_T from, linenr_T lines_to_ski
|
||||
} else {
|
||||
filemess(curbuf, sfname, (char_u *)(
|
||||
(fd == UV_EFBIG) ? _("[File too big]") :
|
||||
# if defined(UNIX) && defined(EOVERFLOW)
|
||||
#if defined(UNIX) && defined(EOVERFLOW)
|
||||
// libuv only returns -errno in Unix and in Windows open() does not
|
||||
// set EOVERFLOW
|
||||
(fd == -EOVERFLOW) ? _("[File too big]") :
|
||||
# endif
|
||||
#endif
|
||||
_("[Permission Denied]")), 0);
|
||||
curbuf->b_p_ro = TRUE; // must use "w!" now
|
||||
}
|
||||
@ -768,13 +768,13 @@ retry:
|
||||
}
|
||||
}
|
||||
|
||||
# ifdef HAVE_ICONV
|
||||
#ifdef HAVE_ICONV
|
||||
if (iconv_fd != (iconv_t)-1) {
|
||||
// aborted conversion with iconv(), close the descriptor
|
||||
iconv_close(iconv_fd);
|
||||
iconv_fd = (iconv_t)-1;
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
if (advance_fenc) {
|
||||
/*
|
||||
@ -833,13 +833,13 @@ retry:
|
||||
|
||||
|
||||
|
||||
# ifdef HAVE_ICONV
|
||||
#ifdef HAVE_ICONV
|
||||
// Try using iconv() if we can't convert internally.
|
||||
if (fio_flags == 0
|
||||
&& !did_iconv) {
|
||||
iconv_fd = (iconv_t)my_iconv_open((char_u *)"utf-8", fenc);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Use the 'charconvert' expression when conversion is required
|
||||
@ -847,13 +847,13 @@ retry:
|
||||
*/
|
||||
if (fio_flags == 0 && !read_stdin && !read_buffer && *p_ccv != NUL
|
||||
&& !read_fifo
|
||||
# ifdef HAVE_ICONV
|
||||
#ifdef HAVE_ICONV
|
||||
&& iconv_fd == (iconv_t)-1
|
||||
# endif
|
||||
#endif
|
||||
) {
|
||||
# ifdef HAVE_ICONV
|
||||
#ifdef HAVE_ICONV
|
||||
did_iconv = false;
|
||||
# endif
|
||||
#endif
|
||||
/* Skip conversion when it's already done (retry for wrong
|
||||
* "fileformat"). */
|
||||
if (tmpname == NULL) {
|
||||
@ -872,9 +872,9 @@ retry:
|
||||
}
|
||||
} else {
|
||||
if (fio_flags == 0
|
||||
# ifdef HAVE_ICONV
|
||||
#ifdef HAVE_ICONV
|
||||
&& iconv_fd == (iconv_t)-1
|
||||
# endif
|
||||
#endif
|
||||
) {
|
||||
/* Conversion wanted but we can't.
|
||||
* Try the next conversion in 'fileencodings' */
|
||||
@ -960,11 +960,11 @@ retry:
|
||||
* ucs-4 to utf-8: 4 bytes become up to 6 bytes, size must be
|
||||
* multiple of 4 */
|
||||
real_size = (int)size;
|
||||
# ifdef HAVE_ICONV
|
||||
#ifdef HAVE_ICONV
|
||||
if (iconv_fd != (iconv_t)-1) {
|
||||
size = size / ICONV_MULT;
|
||||
} else {
|
||||
# endif
|
||||
#endif
|
||||
if (fio_flags & FIO_LATIN1) {
|
||||
size = size / 2;
|
||||
} else if (fio_flags & (FIO_UCS2 | FIO_UTF16)) {
|
||||
@ -974,9 +974,9 @@ retry:
|
||||
} else if (fio_flags == FIO_UCSBOM) {
|
||||
size = size / ICONV_MULT; // worst case
|
||||
}
|
||||
# ifdef HAVE_ICONV
|
||||
#ifdef HAVE_ICONV
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
if (conv_restlen > 0) {
|
||||
// Insert unconverted bytes from previous line.
|
||||
memmove(ptr, conv_rest, conv_restlen); // -V614
|
||||
@ -1055,9 +1055,9 @@ retry:
|
||||
|
||||
// When we did a conversion report an error.
|
||||
if (fio_flags != 0
|
||||
# ifdef HAVE_ICONV
|
||||
#ifdef HAVE_ICONV
|
||||
|| iconv_fd != (iconv_t)-1
|
||||
# endif
|
||||
#endif
|
||||
) {
|
||||
if (can_retry) {
|
||||
goto rewind_retry;
|
||||
@ -1081,9 +1081,9 @@ retry:
|
||||
* leave the UTF8 checking code to do it, as it
|
||||
* works slightly differently. */
|
||||
if (bad_char_behavior != BAD_KEEP && (fio_flags != 0
|
||||
# ifdef HAVE_ICONV
|
||||
#ifdef HAVE_ICONV
|
||||
|| iconv_fd != (iconv_t)-1
|
||||
# endif
|
||||
#endif
|
||||
)) {
|
||||
while (conv_restlen > 0) {
|
||||
*(--ptr) = bad_char_behavior;
|
||||
@ -1091,12 +1091,12 @@ retry:
|
||||
}
|
||||
}
|
||||
fio_flags = 0; // don't convert this
|
||||
# ifdef HAVE_ICONV
|
||||
#ifdef HAVE_ICONV
|
||||
if (iconv_fd != (iconv_t)-1) {
|
||||
iconv_close(iconv_fd);
|
||||
iconv_fd = (iconv_t)-1;
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1165,7 +1165,7 @@ retry:
|
||||
break;
|
||||
}
|
||||
|
||||
# ifdef HAVE_ICONV
|
||||
#ifdef HAVE_ICONV
|
||||
if (iconv_fd != (iconv_t)-1) {
|
||||
/*
|
||||
* Attempt conversion of the read bytes to 'encoding' using
|
||||
@ -1223,7 +1223,7 @@ retry:
|
||||
memmove(line_start, buffer, (size_t)linerest);
|
||||
size = ((char_u *)top - ptr);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
if (fio_flags != 0) {
|
||||
unsigned int u8c;
|
||||
@ -1441,12 +1441,12 @@ retry:
|
||||
if (can_retry && !incomplete_tail) {
|
||||
break;
|
||||
}
|
||||
# ifdef HAVE_ICONV
|
||||
#ifdef HAVE_ICONV
|
||||
// When we did a conversion report an error.
|
||||
if (iconv_fd != (iconv_t)-1 && conv_error == 0) {
|
||||
conv_error = readfile_linenr(linecnt, ptr, p);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
// Remember the first linenr with an illegal byte
|
||||
if (conv_error == 0 && illegal_byte == 0) {
|
||||
illegal_byte = readfile_linenr(linecnt, ptr, p);
|
||||
@ -1469,17 +1469,17 @@ retry:
|
||||
// Detected a UTF-8 error.
|
||||
rewind_retry:
|
||||
// Retry reading with another conversion.
|
||||
# ifdef HAVE_ICONV
|
||||
#ifdef HAVE_ICONV
|
||||
if (*p_ccv != NUL && iconv_fd != (iconv_t)-1) {
|
||||
// iconv() failed, try 'charconvert'
|
||||
did_iconv = true;
|
||||
} else {
|
||||
# endif
|
||||
#endif
|
||||
// use next item from 'fileencodings'
|
||||
advance_fenc = true;
|
||||
# ifdef HAVE_ICONV
|
||||
#ifdef HAVE_ICONV
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
file_rewind = true;
|
||||
goto retry;
|
||||
}
|
||||
@ -1700,11 +1700,11 @@ failed:
|
||||
if (fenc_alloced) {
|
||||
xfree(fenc);
|
||||
}
|
||||
# ifdef HAVE_ICONV
|
||||
#ifdef HAVE_ICONV
|
||||
if (iconv_fd != (iconv_t)-1) {
|
||||
iconv_close(iconv_fd);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
if (!read_buffer && !read_stdin) {
|
||||
close(fd); // errors are ignored
|
||||
@ -2280,9 +2280,9 @@ int buf_write(buf_T *buf, char_u *fname, char_u *sfname, linenr_T start, linenr_
|
||||
write_info.bw_conv_error = FALSE;
|
||||
write_info.bw_conv_error_lnum = 0;
|
||||
write_info.bw_restlen = 0;
|
||||
# ifdef HAVE_ICONV
|
||||
#ifdef HAVE_ICONV
|
||||
write_info.bw_iconv_fd = (iconv_t)-1;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* After writing a file changedtick changes but we don't want to display
|
||||
* the line. */
|
||||
@ -2690,7 +2690,7 @@ int buf_write(buf_T *buf, char_u *fname, char_u *sfname, linenr_T start, linenr_
|
||||
if (fd < 0) { // can't write in directory
|
||||
backup_copy = TRUE;
|
||||
} else {
|
||||
# ifdef UNIX
|
||||
#ifdef UNIX
|
||||
os_fchown(fd, file_info_old.stat.st_uid, file_info_old.stat.st_gid);
|
||||
if (!os_fileinfo((char *)IObuff, &file_info)
|
||||
|| file_info.stat.st_uid != file_info_old.stat.st_uid
|
||||
@ -2698,7 +2698,7 @@ int buf_write(buf_T *buf, char_u *fname, char_u *sfname, linenr_T start, linenr_
|
||||
|| (long)file_info.stat.st_mode != perm) {
|
||||
backup_copy = TRUE;
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
/* Close the file before removing it, on MS-Windows we
|
||||
* can't delete an open file. */
|
||||
close(fd);
|
||||
@ -2711,7 +2711,7 @@ int buf_write(buf_T *buf, char_u *fname, char_u *sfname, linenr_T start, linenr_
|
||||
* Break symlinks and/or hardlinks if we've been asked to.
|
||||
*/
|
||||
if ((bkc & BKC_BREAKSYMLINK) || (bkc & BKC_BREAKHARDLINK)) {
|
||||
# ifdef UNIX
|
||||
#ifdef UNIX
|
||||
bool file_info_link_ok = os_fileinfo_link((char *)fname, &file_info);
|
||||
|
||||
// Symlinks.
|
||||
@ -2728,7 +2728,7 @@ int buf_write(buf_T *buf, char_u *fname, char_u *sfname, linenr_T start, linenr_
|
||||
|| os_fileinfo_id_equal(&file_info, &file_info_old))) {
|
||||
backup_copy = FALSE;
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
// make sure we have a valid backup extension to use
|
||||
@ -3085,7 +3085,7 @@ nobackup:
|
||||
|
||||
|
||||
if (converted && wb_flags == 0) {
|
||||
# ifdef HAVE_ICONV
|
||||
#ifdef HAVE_ICONV
|
||||
// Use iconv() conversion when conversion is needed and it's not done
|
||||
// internally.
|
||||
write_info.bw_iconv_fd = (iconv_t)my_iconv_open(fenc, (char_u *)"utf-8");
|
||||
@ -3098,7 +3098,7 @@ nobackup:
|
||||
}
|
||||
write_info.bw_first = TRUE;
|
||||
} else
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* When the file needs to be converted with 'charconvert' after
|
||||
@ -3114,9 +3114,9 @@ nobackup:
|
||||
}
|
||||
}
|
||||
if (converted && wb_flags == 0
|
||||
# ifdef HAVE_ICONV
|
||||
#ifdef HAVE_ICONV
|
||||
&& write_info.bw_iconv_fd == (iconv_t)-1
|
||||
# endif
|
||||
#endif
|
||||
&& wfname == fname) {
|
||||
if (!forceit) {
|
||||
SET_ERRMSG(_("E213: Cannot convert (add ! to write without conversion)"));
|
||||
@ -3644,12 +3644,12 @@ nofail:
|
||||
}
|
||||
xfree(fenc_tofree);
|
||||
xfree(write_info.bw_conv_buf);
|
||||
# ifdef HAVE_ICONV
|
||||
#ifdef HAVE_ICONV
|
||||
if (write_info.bw_iconv_fd != (iconv_t)-1) {
|
||||
iconv_close(write_info.bw_iconv_fd);
|
||||
write_info.bw_iconv_fd = (iconv_t)-1;
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
#ifdef HAVE_ACL
|
||||
mch_free_acl(acl);
|
||||
#endif
|
||||
@ -4034,7 +4034,7 @@ static int buf_write_bytes(struct bw_info *ip)
|
||||
}
|
||||
}
|
||||
|
||||
# ifdef HAVE_ICONV
|
||||
#ifdef HAVE_ICONV
|
||||
if (ip->bw_iconv_fd != (iconv_t)-1) {
|
||||
const char *from;
|
||||
size_t fromlen;
|
||||
@ -4096,7 +4096,7 @@ static int buf_write_bytes(struct bw_info *ip)
|
||||
buf = ip->bw_conv_buf;
|
||||
len = (int)((char_u *)to - ip->bw_conv_buf);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
if (ip->bw_fd < 0) {
|
||||
|
@ -1414,7 +1414,7 @@ static void deleteFoldEntry(win_T *const wp, garray_T *const gap, const int idx,
|
||||
*/
|
||||
void deleteFoldRecurse(buf_T *bp, garray_T *gap)
|
||||
{
|
||||
# define DELETE_FOLD_NESTED(fd) deleteFoldRecurse(bp, &((fd)->fd_nested))
|
||||
#define DELETE_FOLD_NESTED(fd) deleteFoldRecurse(bp, &((fd)->fd_nested))
|
||||
GA_DEEP_CLEAR(gap, fold_T, DELETE_FOLD_NESTED);
|
||||
}
|
||||
|
||||
|
@ -140,13 +140,13 @@ static uint32_t curr_bg;
|
||||
static uint32_t curr_fg;
|
||||
static int page_count;
|
||||
|
||||
# define OPT_MBFONT_USECOURIER 0
|
||||
# define OPT_MBFONT_ASCII 1
|
||||
# define OPT_MBFONT_REGULAR 2
|
||||
# define OPT_MBFONT_BOLD 3
|
||||
# define OPT_MBFONT_OBLIQUE 4
|
||||
# define OPT_MBFONT_BOLDOBLIQUE 5
|
||||
# define OPT_MBFONT_NUM_OPTIONS 6
|
||||
#define OPT_MBFONT_USECOURIER 0
|
||||
#define OPT_MBFONT_ASCII 1
|
||||
#define OPT_MBFONT_REGULAR 2
|
||||
#define OPT_MBFONT_BOLD 3
|
||||
#define OPT_MBFONT_OBLIQUE 4
|
||||
#define OPT_MBFONT_BOLDOBLIQUE 5
|
||||
#define OPT_MBFONT_NUM_OPTIONS 6
|
||||
|
||||
static option_table_T mbfont_opts[OPT_MBFONT_NUM_OPTIONS] =
|
||||
{
|
||||
|
@ -755,7 +755,7 @@ void nlua_push_Array(lua_State *lstate, const Array array, bool special)
|
||||
FUNC_ATTR_NONNULL_ALL \
|
||||
{ \
|
||||
lua_pushnumber(lstate, (lua_Number)(item)); \
|
||||
}
|
||||
}
|
||||
|
||||
GENERATE_INDEX_FUNCTION(Buffer)
|
||||
GENERATE_INDEX_FUNCTION(Window)
|
||||
@ -1126,9 +1126,9 @@ Object nlua_pop_Object(lua_State *const lstate, bool ref, Error *const err)
|
||||
size_t len;
|
||||
const char *s = lua_tolstring(lstate, -1, &len);
|
||||
*cur.obj = STRING_OBJ(((String) {
|
||||
.data = xmemdupz(s, len),
|
||||
.size = len,
|
||||
}));
|
||||
.data = xmemdupz(s, len),
|
||||
.size = len,
|
||||
}));
|
||||
break;
|
||||
}
|
||||
case LUA_TNUMBER: {
|
||||
@ -1147,10 +1147,10 @@ Object nlua_pop_Object(lua_State *const lstate, bool ref, Error *const err)
|
||||
switch (table_props.type) {
|
||||
case kObjectTypeArray:
|
||||
*cur.obj = ARRAY_OBJ(((Array) {
|
||||
.items = NULL,
|
||||
.size = 0,
|
||||
.capacity = 0,
|
||||
}));
|
||||
.items = NULL,
|
||||
.size = 0,
|
||||
.capacity = 0,
|
||||
}));
|
||||
if (table_props.maxidx != 0) {
|
||||
cur.obj->data.array.items =
|
||||
xcalloc(table_props.maxidx,
|
||||
@ -1162,10 +1162,10 @@ Object nlua_pop_Object(lua_State *const lstate, bool ref, Error *const err)
|
||||
break;
|
||||
case kObjectTypeDictionary:
|
||||
*cur.obj = DICTIONARY_OBJ(((Dictionary) {
|
||||
.items = NULL,
|
||||
.size = 0,
|
||||
.capacity = 0,
|
||||
}));
|
||||
.items = NULL,
|
||||
.size = 0,
|
||||
.capacity = 0,
|
||||
}));
|
||||
if (table_props.string_keys_num != 0) {
|
||||
cur.obj->data.dictionary.items =
|
||||
xcalloc(table_props.string_keys_num,
|
||||
|
@ -36,11 +36,11 @@
|
||||
|
||||
|
||||
#if defined(ARCH_64)
|
||||
#define ptr_t_hash(key) uint64_t_hash((uint64_t)key)
|
||||
#define ptr_t_eq(a, b) uint64_t_eq((uint64_t)a, (uint64_t)b)
|
||||
# define ptr_t_hash(key) uint64_t_hash((uint64_t)key)
|
||||
# define ptr_t_eq(a, b) uint64_t_eq((uint64_t)a, (uint64_t)b)
|
||||
#elif defined(ARCH_32)
|
||||
#define ptr_t_hash(key) uint32_t_hash((uint32_t)key)
|
||||
#define ptr_t_eq(a, b) uint32_t_eq((uint32_t)a, (uint32_t)b)
|
||||
# define ptr_t_hash(key) uint32_t_hash((uint32_t)key)
|
||||
# define ptr_t_eq(a, b) uint32_t_eq((uint32_t)a, (uint32_t)b)
|
||||
#endif
|
||||
|
||||
#define INITIALIZER(T, U) T##_##U##_initializer
|
||||
|
@ -1395,9 +1395,9 @@ static int utf_strnicmp(const char_u *s1, const char_u *s2, size_t n1, size_t n2
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
#ifndef CP_UTF8
|
||||
# define CP_UTF8 65001 // magic number from winnls.h
|
||||
#endif
|
||||
# ifndef CP_UTF8
|
||||
# define CP_UTF8 65001 // magic number from winnls.h
|
||||
# endif
|
||||
|
||||
/// Converts string from UTF-8 to UTF-16.
|
||||
///
|
||||
@ -2208,13 +2208,13 @@ char_u *enc_locale(void)
|
||||
char buf[50];
|
||||
|
||||
const char *s;
|
||||
# ifdef HAVE_NL_LANGINFO_CODESET
|
||||
#ifdef HAVE_NL_LANGINFO_CODESET
|
||||
if (!(s = nl_langinfo(CODESET)) || *s == NUL)
|
||||
# endif
|
||||
#endif
|
||||
{
|
||||
# if defined(HAVE_LOCALE_H)
|
||||
#if defined(HAVE_LOCALE_H)
|
||||
if (!(s = setlocale(LC_CTYPE, NULL)) || *s == NUL)
|
||||
# endif
|
||||
#endif
|
||||
{
|
||||
if ((s = os_getenv("LC_ALL"))) {
|
||||
if ((s = os_getenv("LC_CTYPE"))) {
|
||||
@ -2265,7 +2265,7 @@ enc_locale_copy_enc:
|
||||
return enc_canonize((char_u *)buf);
|
||||
}
|
||||
|
||||
# if defined(HAVE_ICONV)
|
||||
#if defined(HAVE_ICONV)
|
||||
|
||||
|
||||
/*
|
||||
@ -2277,7 +2277,7 @@ enc_locale_copy_enc:
|
||||
void *my_iconv_open(char_u *to, char_u *from)
|
||||
{
|
||||
iconv_t fd;
|
||||
#define ICONV_TESTLEN 400
|
||||
# define ICONV_TESTLEN 400
|
||||
char_u tobuf[ICONV_TESTLEN];
|
||||
char *p;
|
||||
size_t tolen;
|
||||
@ -2395,7 +2395,7 @@ static char_u *iconv_string(const vimconv_T *const vcp, char_u *str, size_t slen
|
||||
return result;
|
||||
}
|
||||
|
||||
# endif // HAVE_ICONV
|
||||
#endif // HAVE_ICONV
|
||||
|
||||
|
||||
|
||||
@ -2425,11 +2425,11 @@ int convert_setup_ext(vimconv_T *vcp, char_u *from, bool from_unicode_is_utf8, c
|
||||
int to_is_utf8;
|
||||
|
||||
// Reset to no conversion.
|
||||
# ifdef HAVE_ICONV
|
||||
#ifdef HAVE_ICONV
|
||||
if (vcp->vc_type == CONV_ICONV && vcp->vc_fd != (iconv_t)-1) {
|
||||
iconv_close(vcp->vc_fd);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
*vcp = (vimconv_T)MBYTE_NONE_CONV;
|
||||
|
||||
// No conversion when one of the names is empty or they are equal.
|
||||
@ -2466,7 +2466,7 @@ int convert_setup_ext(vimconv_T *vcp, char_u *from, bool from_unicode_is_utf8, c
|
||||
// Internal utf-8 -> latin9 conversion.
|
||||
vcp->vc_type = CONV_TO_LATIN9;
|
||||
}
|
||||
# ifdef HAVE_ICONV
|
||||
#ifdef HAVE_ICONV
|
||||
else { // NOLINT(readability/braces)
|
||||
// Use iconv() for conversion.
|
||||
vcp->vc_fd = (iconv_t)my_iconv_open(to_is_utf8 ? (char_u *)"utf-8" : to,
|
||||
@ -2476,7 +2476,7 @@ int convert_setup_ext(vimconv_T *vcp, char_u *from, bool from_unicode_is_utf8, c
|
||||
vcp->vc_factor = 4; // could be longer too...
|
||||
}
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
if (vcp->vc_type == CONV_NONE) {
|
||||
return FAIL;
|
||||
}
|
||||
@ -2644,11 +2644,11 @@ char_u *string_convert_ext(const vimconv_T *const vcp, char_u *ptr, size_t *lenp
|
||||
}
|
||||
break;
|
||||
|
||||
# ifdef HAVE_ICONV
|
||||
#ifdef HAVE_ICONV
|
||||
case CONV_ICONV: // conversion with vcp->vc_fd
|
||||
retval = iconv_string(vcp, ptr, len, unconvlenp, lenp);
|
||||
break;
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
return retval;
|
||||
|
@ -526,35 +526,35 @@ void time_to_bytes(time_t time_, uint8_t buf[8])
|
||||
|
||||
#if defined(EXITFREE)
|
||||
|
||||
#include "nvim/buffer.h"
|
||||
#include "nvim/charset.h"
|
||||
#include "nvim/diff.h"
|
||||
#include "nvim/edit.h"
|
||||
#include "nvim/eval/typval.h"
|
||||
#include "nvim/ex_cmds.h"
|
||||
#include "nvim/ex_docmd.h"
|
||||
#include "nvim/ex_getln.h"
|
||||
#include "nvim/file_search.h"
|
||||
#include "nvim/fileio.h"
|
||||
#include "nvim/fold.h"
|
||||
#include "nvim/getchar.h"
|
||||
#include "nvim/mark.h"
|
||||
#include "nvim/mbyte.h"
|
||||
#include "nvim/memline.h"
|
||||
#include "nvim/move.h"
|
||||
#include "nvim/ops.h"
|
||||
#include "nvim/option.h"
|
||||
#include "nvim/os/os.h"
|
||||
#include "nvim/os_unix.h"
|
||||
#include "nvim/path.h"
|
||||
#include "nvim/quickfix.h"
|
||||
#include "nvim/regexp.h"
|
||||
#include "nvim/screen.h"
|
||||
#include "nvim/search.h"
|
||||
#include "nvim/spell.h"
|
||||
#include "nvim/syntax.h"
|
||||
#include "nvim/tag.h"
|
||||
#include "nvim/window.h"
|
||||
# include "nvim/buffer.h"
|
||||
# include "nvim/charset.h"
|
||||
# include "nvim/diff.h"
|
||||
# include "nvim/edit.h"
|
||||
# include "nvim/eval/typval.h"
|
||||
# include "nvim/ex_cmds.h"
|
||||
# include "nvim/ex_docmd.h"
|
||||
# include "nvim/ex_getln.h"
|
||||
# include "nvim/file_search.h"
|
||||
# include "nvim/fileio.h"
|
||||
# include "nvim/fold.h"
|
||||
# include "nvim/getchar.h"
|
||||
# include "nvim/mark.h"
|
||||
# include "nvim/mbyte.h"
|
||||
# include "nvim/memline.h"
|
||||
# include "nvim/move.h"
|
||||
# include "nvim/ops.h"
|
||||
# include "nvim/option.h"
|
||||
# include "nvim/os/os.h"
|
||||
# include "nvim/os_unix.h"
|
||||
# include "nvim/path.h"
|
||||
# include "nvim/quickfix.h"
|
||||
# include "nvim/regexp.h"
|
||||
# include "nvim/screen.h"
|
||||
# include "nvim/search.h"
|
||||
# include "nvim/spell.h"
|
||||
# include "nvim/syntax.h"
|
||||
# include "nvim/tag.h"
|
||||
# include "nvim/window.h"
|
||||
|
||||
/*
|
||||
* Free everything that we allocated.
|
||||
|
@ -874,7 +874,7 @@ void preserve_exit(void)
|
||||
*/
|
||||
|
||||
#ifndef BREAKCHECK_SKIP
|
||||
# define BREAKCHECK_SKIP 1000
|
||||
# define BREAKCHECK_SKIP 1000
|
||||
#endif
|
||||
|
||||
static int breakcheck_count = 0;
|
||||
|
@ -33,8 +33,8 @@
|
||||
#include "nvim/vim.h"
|
||||
|
||||
#if MIN_LOG_LEVEL > DEBUG_LOG_LEVEL
|
||||
#define log_client_msg(...)
|
||||
#define log_server_msg(...)
|
||||
# define log_client_msg(...)
|
||||
# define log_server_msg(...)
|
||||
#endif
|
||||
|
||||
static PMap(cstr_t) event_strings = MAP_INIT;
|
||||
@ -699,14 +699,14 @@ const char *rpc_client_name(Channel *chan)
|
||||
}
|
||||
|
||||
#if MIN_LOG_LEVEL <= DEBUG_LOG_LEVEL
|
||||
#define REQ "[request] "
|
||||
#define RES "[response] "
|
||||
#define NOT "[notify] "
|
||||
#define ERR "[error] "
|
||||
# define REQ "[request] "
|
||||
# define RES "[response] "
|
||||
# define NOT "[notify] "
|
||||
# define ERR "[error] "
|
||||
|
||||
// Cannot define array with negative offsets, so this one is needed to be added
|
||||
// to MSGPACK_UNPACK_\* values.
|
||||
#define MUR_OFF 2
|
||||
# define MUR_OFF 2
|
||||
|
||||
static const char *const msgpack_error_messages[] = {
|
||||
[MSGPACK_UNPACK_EXTRA_BYTES + MUR_OFF] = "extra bytes found",
|
||||
|
@ -47,17 +47,15 @@ static msgpack_sbuffer sbuffer;
|
||||
} \
|
||||
\
|
||||
static void msgpack_rpc_from_##lt(Integer o, msgpack_packer *res) \
|
||||
/* uncrustify:indent-off */ \
|
||||
FUNC_ATTR_NONNULL_ARG(2) \
|
||||
/* uncrustify:indent-on */ \
|
||||
{ \
|
||||
msgpack_packer pac; \
|
||||
msgpack_packer_init(&pac, &sbuffer, msgpack_sbuffer_write); \
|
||||
msgpack_pack_int64(&pac, (handle_T)o); \
|
||||
msgpack_pack_ext(res, sbuffer.size, \
|
||||
kObjectType##t - EXT_OBJECT_TYPE_SHIFT); \
|
||||
msgpack_pack_ext_body(res, sbuffer.data, sbuffer.size); \
|
||||
msgpack_sbuffer_clear(&sbuffer); \
|
||||
msgpack_packer pac; \
|
||||
msgpack_packer_init(&pac, &sbuffer, msgpack_sbuffer_write); \
|
||||
msgpack_pack_int64(&pac, (handle_T)o); \
|
||||
msgpack_pack_ext(res, sbuffer.size, \
|
||||
kObjectType##t - EXT_OBJECT_TYPE_SHIFT); \
|
||||
msgpack_pack_ext_body(res, sbuffer.data, sbuffer.size); \
|
||||
msgpack_sbuffer_clear(&sbuffer); \
|
||||
}
|
||||
|
||||
void msgpack_rpc_helpers_init(void)
|
||||
@ -90,11 +88,11 @@ bool msgpack_rpc_to_object(const msgpack_object *const obj, Object *const arg)
|
||||
kvec_withinit_t(MPToAPIObjectStackItem, 2) stack = KV_INITIAL_VALUE;
|
||||
kvi_init(stack);
|
||||
kvi_push(stack, ((MPToAPIObjectStackItem) {
|
||||
.mobj = obj,
|
||||
.aobj = arg,
|
||||
.container = false,
|
||||
.idx = 0,
|
||||
}));
|
||||
.mobj = obj,
|
||||
.aobj = arg,
|
||||
.container = false,
|
||||
.idx = 0,
|
||||
}));
|
||||
while (ret && kv_size(stack)) {
|
||||
MPToAPIObjectStackItem cur = kv_last(stack);
|
||||
if (!cur.container) {
|
||||
@ -154,19 +152,19 @@ case type: { \
|
||||
cur.idx++;
|
||||
kv_last(stack) = cur;
|
||||
kvi_push(stack, ((MPToAPIObjectStackItem) {
|
||||
.mobj = &cur.mobj->via.array.ptr[idx],
|
||||
.aobj = &cur.aobj->data.array.items[idx],
|
||||
.container = false,
|
||||
}));
|
||||
.mobj = &cur.mobj->via.array.ptr[idx],
|
||||
.aobj = &cur.aobj->data.array.items[idx],
|
||||
.container = false,
|
||||
}));
|
||||
}
|
||||
} else {
|
||||
*cur.aobj = ARRAY_OBJ(((Array) {
|
||||
.size = size,
|
||||
.capacity = size,
|
||||
.items = (size > 0
|
||||
.size = size,
|
||||
.capacity = size,
|
||||
.items = (size > 0
|
||||
? xcalloc(size, sizeof(*cur.aobj->data.array.items))
|
||||
: NULL),
|
||||
}));
|
||||
}));
|
||||
cur.container = true;
|
||||
kv_last(stack) = cur;
|
||||
}
|
||||
@ -207,20 +205,20 @@ case type: { \
|
||||
}
|
||||
if (ret) {
|
||||
kvi_push(stack, ((MPToAPIObjectStackItem) {
|
||||
.mobj = &cur.mobj->via.map.ptr[idx].val,
|
||||
.aobj = &cur.aobj->data.dictionary.items[idx].value,
|
||||
.container = false,
|
||||
}));
|
||||
.mobj = &cur.mobj->via.map.ptr[idx].val,
|
||||
.aobj = &cur.aobj->data.dictionary.items[idx].value,
|
||||
.container = false,
|
||||
}));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
*cur.aobj = DICTIONARY_OBJ(((Dictionary) {
|
||||
.size = size,
|
||||
.capacity = size,
|
||||
.items = (size > 0
|
||||
.size = size,
|
||||
.capacity = size,
|
||||
.items = (size > 0
|
||||
? xcalloc(size, sizeof(*cur.aobj->data.dictionary.items))
|
||||
: NULL),
|
||||
}));
|
||||
}));
|
||||
cur.container = true;
|
||||
kv_last(stack) = cur;
|
||||
}
|
||||
@ -412,9 +410,9 @@ void msgpack_rpc_from_object(const Object result, msgpack_packer *const res)
|
||||
cur.idx++;
|
||||
kv_last(stack) = cur;
|
||||
kvi_push(stack, ((APIToMPObjectStackItem) {
|
||||
.aobj = &cur.aobj->data.array.items[idx],
|
||||
.container = false,
|
||||
}));
|
||||
.aobj = &cur.aobj->data.array.items[idx],
|
||||
.container = false,
|
||||
}));
|
||||
}
|
||||
} else {
|
||||
msgpack_pack_array(res, size);
|
||||
@ -435,9 +433,9 @@ void msgpack_rpc_from_object(const Object result, msgpack_packer *const res)
|
||||
msgpack_rpc_from_string(cur.aobj->data.dictionary.items[idx].key,
|
||||
res);
|
||||
kvi_push(stack, ((APIToMPObjectStackItem) {
|
||||
.aobj = &cur.aobj->data.dictionary.items[idx].value,
|
||||
.container = false,
|
||||
}));
|
||||
.aobj = &cur.aobj->data.dictionary.items[idx].value,
|
||||
.container = false,
|
||||
}));
|
||||
}
|
||||
} else {
|
||||
msgpack_pack_map(res, size);
|
||||
|
@ -3372,7 +3372,7 @@ static void may_clear_cmdline(void)
|
||||
}
|
||||
|
||||
// Routines for displaying a partly typed command
|
||||
# define SHOWCMD_BUFLEN SHOWCMD_COLS + 1 + 30
|
||||
#define SHOWCMD_BUFLEN SHOWCMD_COLS + 1 + 30
|
||||
static char_u showcmd_buf[SHOWCMD_BUFLEN];
|
||||
static char_u old_showcmd_buf[SHOWCMD_BUFLEN]; // For push_showcmd()
|
||||
static bool showcmd_is_clear = true;
|
||||
|
@ -374,11 +374,11 @@ void set_init_1(bool clean_arg)
|
||||
* temp files.
|
||||
*/
|
||||
{
|
||||
# ifdef UNIX
|
||||
#ifdef UNIX
|
||||
static char *(names[4]) = { "", "TMPDIR", "TEMP", "TMP" };
|
||||
# else
|
||||
#else
|
||||
static char *(names[3]) = { "TMPDIR", "TEMP", "TMP" };
|
||||
# endif
|
||||
#endif
|
||||
garray_T ga;
|
||||
opt_idx = findoption("backupskip");
|
||||
|
||||
@ -386,16 +386,16 @@ void set_init_1(bool clean_arg)
|
||||
for (size_t n = 0; n < ARRAY_SIZE(names); n++) {
|
||||
bool mustfree = true;
|
||||
char *p;
|
||||
# ifdef UNIX
|
||||
#ifdef UNIX
|
||||
if (*names[n] == NUL) {
|
||||
# ifdef __APPLE__
|
||||
# ifdef __APPLE__
|
||||
p = "/private/tmp";
|
||||
# else
|
||||
# else
|
||||
p = "/tmp";
|
||||
# endif
|
||||
# endif
|
||||
mustfree = false;
|
||||
} else
|
||||
# endif
|
||||
#endif
|
||||
{
|
||||
p = vim_getenv(names[n]);
|
||||
}
|
||||
@ -5831,10 +5831,10 @@ static char_u *get_varp(vimoption_T *p)
|
||||
return (char_u *)&(curbuf->b_p_cms);
|
||||
case PV_CPT:
|
||||
return (char_u *)&(curbuf->b_p_cpt);
|
||||
# ifdef BACKSLASH_IN_FILENAME
|
||||
#ifdef BACKSLASH_IN_FILENAME
|
||||
case PV_CSL:
|
||||
return (char_u *)&(curbuf->b_p_csl);
|
||||
# endif
|
||||
#endif
|
||||
case PV_CFU:
|
||||
return (char_u *)&(curbuf->b_p_cfu);
|
||||
case PV_OFU:
|
||||
@ -6179,9 +6179,9 @@ void buf_copy_options(buf_T *buf, int flags)
|
||||
buf->b_p_inf = p_inf;
|
||||
buf->b_p_swf = cmdmod.noswapfile ? false : p_swf;
|
||||
buf->b_p_cpt = vim_strsave(p_cpt);
|
||||
# ifdef BACKSLASH_IN_FILENAME
|
||||
#ifdef BACKSLASH_IN_FILENAME
|
||||
buf->b_p_csl = vim_strsave(p_csl);
|
||||
# endif
|
||||
#endif
|
||||
buf->b_p_cfu = vim_strsave(p_cfu);
|
||||
buf->b_p_ofu = vim_strsave(p_ofu);
|
||||
buf->b_p_tfu = vim_strsave(p_tfu);
|
||||
|
@ -22,15 +22,15 @@
|
||||
#include "nvim/vim.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#include "nvim/mbyte.h" // for utf8_to_utf16, utf16_to_utf8
|
||||
# include "nvim/mbyte.h" // for utf8_to_utf16, utf16_to_utf8
|
||||
#endif
|
||||
|
||||
#ifdef HAVE__NSGETENVIRON
|
||||
#include <crt_externs.h>
|
||||
# include <crt_externs.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_UTSNAME_H
|
||||
#include <sys/utsname.h>
|
||||
# include <sys/utsname.h>
|
||||
#endif
|
||||
|
||||
// Because `uv_os_getenv` requires allocating, we must manage a map to maintain
|
||||
@ -1161,7 +1161,7 @@ char_u *home_replace_save(buf_T *buf, char_u *src) FUNC_ATTR_NONNULL_RET
|
||||
/// Function given to ExpandGeneric() to obtain an environment variable name.
|
||||
char_u *get_env_name(expand_T *xp, int idx)
|
||||
{
|
||||
# define ENVNAMELEN 100
|
||||
#define ENVNAMELEN 100
|
||||
// this static buffer is needed to avoid a memory leak in ExpandGeneric
|
||||
static char_u name[ENVNAMELEN];
|
||||
assert(idx >= 0);
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include "nvim/strings.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#include "nvim/mbyte.h" // for utf8_to_utf16, utf16_to_utf8
|
||||
# include "nvim/mbyte.h" // for utf8_to_utf16, utf16_to_utf8
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
@ -1226,12 +1226,12 @@ char *os_resolve_shortcut(const char *fname)
|
||||
goto shortcut_errorw;
|
||||
}
|
||||
|
||||
# if 0 // This makes Vim wait a long time if the target does not exist.
|
||||
# if 0 // This makes Vim wait a long time if the target does not exist.
|
||||
hr = pslw->lpVtbl->Resolve(pslw, NULL, SLR_NO_UI);
|
||||
if (hr != S_OK) {
|
||||
goto shortcut_errorw;
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
|
||||
// Get the path to the link target.
|
||||
ZeroMemory(wsz, MAX_PATH * sizeof(wchar_t));
|
||||
@ -1262,7 +1262,7 @@ shortcut_end:
|
||||
return rfname;
|
||||
}
|
||||
|
||||
#define is_path_sep(c) ((c) == L'\\' || (c) == L'/')
|
||||
# define is_path_sep(c) ((c) == L'\\' || (c) == L'/')
|
||||
/// Returns true if the path contains a reparse point (junction or symbolic
|
||||
/// link). Otherwise false in returned.
|
||||
bool os_is_reparse_point_include(const char *path)
|
||||
|
@ -157,7 +157,7 @@ static void init_child(PtyProcess *ptyproc)
|
||||
FUNC_ATTR_NONNULL_ALL
|
||||
{
|
||||
#if defined(HAVE__NSGETENVIRON)
|
||||
#define environ (*_NSGetEnviron())
|
||||
# define environ (*_NSGetEnviron())
|
||||
#else
|
||||
extern char **environ;
|
||||
#endif
|
||||
|
@ -43,7 +43,7 @@ int os_get_usernames(garray_T *users)
|
||||
}
|
||||
ga_init(users, sizeof(char *), 20);
|
||||
|
||||
# if defined(HAVE_GETPWENT) && defined(HAVE_PWD_H)
|
||||
#if defined(HAVE_GETPWENT) && defined(HAVE_PWD_H)
|
||||
{
|
||||
struct passwd *pw;
|
||||
|
||||
@ -53,7 +53,7 @@ int os_get_usernames(garray_T *users)
|
||||
}
|
||||
endpwent();
|
||||
}
|
||||
# elif defined(WIN32)
|
||||
#elif defined(WIN32)
|
||||
{
|
||||
DWORD nusers = 0, ntotal = 0, i;
|
||||
PUSER_INFO_0 uinfo;
|
||||
@ -73,8 +73,8 @@ int os_get_usernames(garray_T *users)
|
||||
NetApiBufferFree(uinfo);
|
||||
}
|
||||
}
|
||||
# endif
|
||||
# if defined(HAVE_GETPWNAM)
|
||||
#endif
|
||||
#if defined(HAVE_GETPWNAM)
|
||||
{
|
||||
const char *user_env = os_getenv("USER");
|
||||
|
||||
@ -104,7 +104,7 @@ int os_get_usernames(garray_T *users)
|
||||
}
|
||||
}
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
@ -2061,7 +2061,7 @@ static int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool noc
|
||||
bool draw_color_col = false; // highlight colorcolumn
|
||||
int *color_cols = NULL; // pointer to according columns array
|
||||
bool has_spell = false; // this buffer has spell checking
|
||||
# define SPWORDLEN 150
|
||||
#define SPWORDLEN 150
|
||||
char_u nextline[SPWORDLEN * 2]; // text with start of the next line
|
||||
int nextlinecol = 0; // column where nextline[] starts
|
||||
int nextline_idx = 0; /* index in nextline[] where next line
|
||||
@ -2124,12 +2124,12 @@ static int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool noc
|
||||
|
||||
// draw_state: items that are drawn in sequence:
|
||||
#define WL_START 0 // nothing done yet
|
||||
# define WL_CMDLINE WL_START + 1 // cmdline window column
|
||||
# define WL_FOLD WL_CMDLINE + 1 // 'foldcolumn'
|
||||
# define WL_SIGN WL_FOLD + 1 // column for signs
|
||||
#define WL_CMDLINE WL_START + 1 // cmdline window column
|
||||
#define WL_FOLD WL_CMDLINE + 1 // 'foldcolumn'
|
||||
#define WL_SIGN WL_FOLD + 1 // column for signs
|
||||
#define WL_NR WL_SIGN + 1 // line number
|
||||
# define WL_BRI WL_NR + 1 // 'breakindent'
|
||||
# define WL_SBR WL_BRI + 1 // 'showbreak' or 'diff'
|
||||
#define WL_BRI WL_NR + 1 // 'breakindent'
|
||||
#define WL_SBR WL_BRI + 1 // 'showbreak' or 'diff'
|
||||
#define WL_LINE WL_SBR + 1 // text in the line
|
||||
int draw_state = WL_START; // what to draw next
|
||||
|
||||
@ -2144,8 +2144,8 @@ static int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool noc
|
||||
int did_wcol = false;
|
||||
int match_conc = 0; ///< cchar for match functions
|
||||
int old_boguscols = 0;
|
||||
# define VCOL_HLC (vcol - vcol_off)
|
||||
# define FIX_FOR_BOGUSCOLS \
|
||||
#define VCOL_HLC (vcol - vcol_off)
|
||||
#define FIX_FOR_BOGUSCOLS \
|
||||
{ \
|
||||
n_extra += vcol_off; \
|
||||
vcol -= vcol_off; \
|
||||
|
@ -3229,9 +3229,9 @@ static void shada_free_shada_entry(ShadaEntry *const entry)
|
||||
#ifndef HAVE_BE64TOH
|
||||
static inline uint64_t be64toh(uint64_t big_endian_64_bits)
|
||||
{
|
||||
#ifdef ORDER_BIG_ENDIAN
|
||||
# ifdef ORDER_BIG_ENDIAN
|
||||
return big_endian_64_bits;
|
||||
#else
|
||||
# else
|
||||
// It may appear that when !defined(ORDER_BIG_ENDIAN) actual order is big
|
||||
// endian. This variant is suboptimal, but it works regardless of actual
|
||||
// order.
|
||||
@ -3241,7 +3241,7 @@ static inline uint64_t be64toh(uint64_t big_endian_64_bits)
|
||||
ret |= ((uint64_t)buf[i - 1]) << ((8 - i) * 8);
|
||||
}
|
||||
return ret;
|
||||
#endif
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
1913
src/nvim/spell.c
1913
src/nvim/spell.c
File diff suppressed because it is too large
Load Diff
1761
src/nvim/spellfile.c
1761
src/nvim/spellfile.c
File diff suppressed because it is too large
Load Diff
@ -383,7 +383,7 @@ static int current_line_id = 0; // unique number for current line
|
||||
#define CUR_STATE(idx) ((stateitem_T *)(current_state.ga_data))[idx]
|
||||
|
||||
static bool syn_time_on = false;
|
||||
# define IF_SYN_TIME(p) (p)
|
||||
#define IF_SYN_TIME(p) (p)
|
||||
|
||||
// Set the timeout used for syntax highlighting.
|
||||
// Use NULL to reset, no timeout.
|
||||
@ -578,7 +578,7 @@ void syntax_start(win_T *wp, linenr_T lnum)
|
||||
static void clear_syn_state(synstate_T *p)
|
||||
{
|
||||
if (p->sst_stacksize > SST_FIX_STATES) {
|
||||
# define UNREF_BUFSTATE_EXTMATCH(bs) unref_extmatch((bs)->bs_extmatch)
|
||||
#define UNREF_BUFSTATE_EXTMATCH(bs) unref_extmatch((bs)->bs_extmatch)
|
||||
GA_DEEP_CLEAR(&(p->sst_union.sst_ga), bufstate_T, UNREF_BUFSTATE_EXTMATCH);
|
||||
} else {
|
||||
for (int i = 0; i < p->sst_stacksize; i++) {
|
||||
@ -592,7 +592,7 @@ static void clear_syn_state(synstate_T *p)
|
||||
*/
|
||||
static void clear_current_state(void)
|
||||
{
|
||||
# define UNREF_STATEITEM_EXTMATCH(si) unref_extmatch((si)->si_extmatch)
|
||||
#define UNREF_STATEITEM_EXTMATCH(si) unref_extmatch((si)->si_extmatch)
|
||||
GA_DEEP_CLEAR(¤t_state, stateitem_T, UNREF_STATEITEM_EXTMATCH);
|
||||
}
|
||||
|
||||
|
@ -59,12 +59,12 @@
|
||||
#define LINUXSET1C "\x1b[?1c"
|
||||
|
||||
#ifdef NVIM_UNIBI_HAS_VAR_FROM
|
||||
#define UNIBI_SET_NUM_VAR(var, num) \
|
||||
# define UNIBI_SET_NUM_VAR(var, num) \
|
||||
do { \
|
||||
(var) = unibi_var_from_num((num)); \
|
||||
} while (0)
|
||||
#else
|
||||
#define UNIBI_SET_NUM_VAR(var, num) (var).i = (num);
|
||||
# define UNIBI_SET_NUM_VAR(var, num) (var).i = (num);
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
@ -1483,7 +1483,7 @@ static void tui_guess_size(UI *ui)
|
||||
height = unibi_get_num(data->ut, unibi_lines);
|
||||
width = unibi_get_num(data->ut, unibi_columns);
|
||||
|
||||
end:
|
||||
end:
|
||||
if (width <= 0 || height <= 0) {
|
||||
// use the defaults
|
||||
width = DFLT_COLS;
|
||||
@ -2111,14 +2111,14 @@ static void flush_buf(UI *ui)
|
||||
static const char *tui_get_stty_erase(void)
|
||||
{
|
||||
static char stty_erase[2] = { 0 };
|
||||
#if defined(HAVE_TERMIOS_H)
|
||||
# if defined(HAVE_TERMIOS_H)
|
||||
struct termios t;
|
||||
if (tcgetattr(input_global_fd(), &t) != -1) {
|
||||
stty_erase[0] = (char)t.c_cc[VERASE];
|
||||
stty_erase[1] = '\0';
|
||||
DLOG("stty/termios:erase=%s", stty_erase);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
return stty_erase;
|
||||
}
|
||||
|
||||
|
@ -936,7 +936,7 @@ static const char *intchar2str(const int ch)
|
||||
}
|
||||
|
||||
#ifdef UNIT_TESTING
|
||||
#include <stdio.h>
|
||||
# include <stdio.h>
|
||||
|
||||
REAL_FATTR_UNUSED
|
||||
static inline void viml_pexpr_debug_print_ast_node(const ExprASTNode *const *const eastnode_p,
|
||||
@ -971,14 +971,14 @@ static inline void viml_pexpr_debug_print_token(const ParserState *const pstate,
|
||||
{
|
||||
fprintf(stderr, "\ntkn: %s\n", viml_pexpr_repr_token(pstate, token, NULL));
|
||||
}
|
||||
#define PSTACK(msg) \
|
||||
# define PSTACK(msg) \
|
||||
viml_pexpr_debug_print_ast_stack(&ast_stack, #msg)
|
||||
#define PSTACK_P(msg) \
|
||||
# define PSTACK_P(msg) \
|
||||
viml_pexpr_debug_print_ast_stack(ast_stack, #msg)
|
||||
#define PNODE_P(eastnode_p, msg) \
|
||||
# define PNODE_P(eastnode_p, msg) \
|
||||
viml_pexpr_debug_print_ast_node((const ExprASTNode *const *)eastnode_p, \
|
||||
(#msg))
|
||||
#define PTOKEN(tkn) \
|
||||
# define PTOKEN(tkn) \
|
||||
viml_pexpr_debug_print_token(pstate, tkn)
|
||||
#endif
|
||||
|
||||
|
@ -62,7 +62,7 @@
|
||||
|
||||
#define NOWIN (win_T *)-1 // non-existing window
|
||||
|
||||
# define ROWS_AVAIL (Rows - p_ch - tabline_height())
|
||||
#define ROWS_AVAIL (Rows - p_ch - tabline_height())
|
||||
|
||||
/// flags for win_enter_ext()
|
||||
typedef enum {
|
||||
@ -90,7 +90,7 @@ void do_window(int nchar, long Prenum, int xchar)
|
||||
|
||||
Prenum1 = Prenum == 0 ? 1 : Prenum;
|
||||
|
||||
# define CHECK_CMDWIN \
|
||||
#define CHECK_CMDWIN \
|
||||
do { \
|
||||
if (cmdwin_type != 0) { \
|
||||
EMSG(_(e_cmdwin)); \
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Uncrustify-0.73.0-181-847f1e99
|
||||
# Uncrustify-0.73.0-186-03faf73c
|
||||
|
||||
#
|
||||
# General options
|
||||
@ -787,7 +787,7 @@ sp_sign = ignore # ignore/add/remove/force/not_defined
|
||||
# applied, as in '(--x)' or 'y++;'.
|
||||
#
|
||||
# Default: remove
|
||||
sp_incdec = ignore # ignore/add/remove/force/not_defined
|
||||
sp_incdec = remove # ignore/add/remove/force/not_defined
|
||||
|
||||
# Add or remove space before a backslash-newline at the end of a line.
|
||||
#
|
||||
@ -3041,7 +3041,7 @@ mod_sort_oc_property_nullability_weight = 0 # number
|
||||
|
||||
# Add or remove indentation of preprocessor directives inside #if blocks
|
||||
# at brace level 0 (file-level).
|
||||
pp_indent = ignore # ignore/add/remove/force/not_defined
|
||||
pp_indent = remove # ignore/add/remove/force/not_defined
|
||||
|
||||
# Whether to indent #if/#else/#endif at the brace level. If false, these are
|
||||
# indented from column 1.
|
||||
@ -3056,7 +3056,7 @@ pp_indent_at_level = false # true/false
|
||||
pp_indent_count = 1 # unsigned number
|
||||
|
||||
# Add or remove space after # based on pp_level of #if blocks.
|
||||
pp_space = ignore # ignore/add/remove/force/not_defined
|
||||
pp_space = force # ignore/add/remove/force/not_defined
|
||||
|
||||
# Sets the number of spaces per level added with pp_space.
|
||||
pp_space_count = 0 # unsigned number
|
||||
@ -3267,29 +3267,29 @@ debug_truncate = 0 # unsigned number
|
||||
# `macro-close END_MESSAGE_MAP`
|
||||
#
|
||||
#
|
||||
set PREPROC FUNC_API_CHECK_TEXTLOCK
|
||||
set PREPROC FUNC_API_DEPRECATED_SINCE
|
||||
set PREPROC FUNC_API_FAST
|
||||
set PREPROC FUNC_API_LUA_ONLY
|
||||
set PREPROC FUNC_API_NOEXPORT
|
||||
set PREPROC FUNC_API_REMOTE_ONLY
|
||||
set PREPROC FUNC_API_SINCE
|
||||
set PREPROC FUNC_ATTR_ALWAYS_INLINE
|
||||
set PREPROC FUNC_ATTR_CONST
|
||||
set PREPROC FUNC_ATTR_MALLOC
|
||||
set PREPROC FUNC_ATTR_NONNULL_ALL
|
||||
set PREPROC FUNC_ATTR_NONNULL_ARG
|
||||
set PREPROC FUNC_ATTR_NONNULL_RET
|
||||
set PREPROC FUNC_ATTR_NORETURN
|
||||
set PREPROC FUNC_ATTR_NO_SANITIZE_UNDEFINED
|
||||
set PREPROC FUNC_ATTR_PRINTF
|
||||
set PREPROC FUNC_ATTR_PURE
|
||||
set PREPROC FUNC_ATTR_UNUSED
|
||||
set PREPROC FUNC_ATTR_WARN_UNUSED_RESULT
|
||||
set PREPROC REAL_FATTR_ALWAYS_INLINE
|
||||
set PREPROC REAL_FATTR_CONST
|
||||
set PREPROC REAL_FATTR_NONNULL_ALL
|
||||
set PREPROC REAL_FATTR_PURE
|
||||
set PREPROC REAL_FATTR_WARN_UNUSED_RESULT
|
||||
# option(s) with 'not default' value: 61
|
||||
set QUESTION FUNC_API_CHECK_TEXTLOCK
|
||||
set QUESTION FUNC_API_DEPRECATED_SINCE
|
||||
set QUESTION FUNC_API_FAST
|
||||
set QUESTION FUNC_API_LUA_ONLY
|
||||
set QUESTION FUNC_API_NOEXPORT
|
||||
set QUESTION FUNC_API_REMOTE_ONLY
|
||||
set QUESTION FUNC_API_SINCE
|
||||
set QUESTION FUNC_ATTR_ALWAYS_INLINE
|
||||
set QUESTION FUNC_ATTR_CONST
|
||||
set QUESTION FUNC_ATTR_MALLOC
|
||||
set QUESTION FUNC_ATTR_NONNULL_ALL
|
||||
set QUESTION FUNC_ATTR_NONNULL_ARG
|
||||
set QUESTION FUNC_ATTR_NONNULL_RET
|
||||
set QUESTION FUNC_ATTR_NORETURN
|
||||
set QUESTION FUNC_ATTR_NO_SANITIZE_UNDEFINED
|
||||
set QUESTION FUNC_ATTR_PRINTF
|
||||
set QUESTION FUNC_ATTR_PURE
|
||||
set QUESTION FUNC_ATTR_UNUSED
|
||||
set QUESTION FUNC_ATTR_WARN_UNUSED_RESULT
|
||||
set QUESTION REAL_FATTR_ALWAYS_INLINE
|
||||
set QUESTION REAL_FATTR_CONST
|
||||
set QUESTION REAL_FATTR_NONNULL_ALL
|
||||
set QUESTION REAL_FATTR_PURE
|
||||
set QUESTION REAL_FATTR_WARN_UNUSED_RESULT
|
||||
# option(s) with 'not default' value: 62
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user