mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
refactor: replace manual header guards with #pragma once
It is less error-prone than manually defining header guards. Pretty much all compilers support it even if it's not part of the C standard.
This commit is contained in:
parent
353a4be7e8
commit
4f8941c1a5
@ -32,19 +32,13 @@ but we nonetheless keep things as they are in order to preserve consistency.
|
||||
Header Files *dev-style-header*
|
||||
|
||||
|
||||
The #define Guard ~
|
||||
Header guard ~
|
||||
|
||||
All header files should have `#define` guards to prevent multiple inclusion.
|
||||
The format of the symbol name should be `NVIM_<DIRECTORY>_<FILE>_H`.
|
||||
All header files should start with `#pragma once` to prevent multiple inclusion.
|
||||
|
||||
In foo/bar.h:
|
||||
>c
|
||||
#ifndef NVIM_FOO_BAR_H
|
||||
#define NVIM_FOO_BAR_H
|
||||
|
||||
...
|
||||
|
||||
#endif // NVIM_FOO_BAR_H
|
||||
#pragma once
|
||||
<
|
||||
|
||||
|
||||
@ -245,15 +239,13 @@ contain only non-static function declarations. >c
|
||||
|
||||
|
||||
// src/nvim/foo.h file
|
||||
#ifndef NVIM_FOO_H
|
||||
#define NVIM_FOO_H
|
||||
#pragma once
|
||||
|
||||
…
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "foo.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_FOO_H
|
||||
|
||||
|
||||
64-bit Portability ~
|
||||
|
@ -63,12 +63,9 @@ sorted_terms="$(echo "${!entries[@]}" | tr ' ' '\n' | sort | xargs)"
|
||||
cat > "$target" <<EOF
|
||||
// uncrustify:off
|
||||
|
||||
//
|
||||
// Generated by scripts/update_terminfo.sh and $(tic -V)
|
||||
//
|
||||
|
||||
#ifndef NVIM_TUI_TERMINFO_DEFS_H
|
||||
#define NVIM_TUI_TERMINFO_DEFS_H
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
EOF
|
||||
@ -87,7 +84,4 @@ for term in $sorted_terms; do
|
||||
printf '};\n'
|
||||
done >> "$target"
|
||||
|
||||
cat >> "$target" <<EOF
|
||||
#endif // NVIM_TUI_TERMINFO_DEFS_H
|
||||
EOF
|
||||
print_bold 'done\n'
|
||||
|
222
src/clint.py
222
src/clint.py
@ -510,29 +510,6 @@ class FileInfo:
|
||||
# Don't know what to do; header guard warnings may be wrong...
|
||||
return fullname
|
||||
|
||||
def Split(self):
|
||||
"""Splits the file into the directory, basename, and extension.
|
||||
|
||||
For 'chrome/browser/browser.cc', Split() would
|
||||
return ('chrome/browser', 'browser', '.cc')
|
||||
|
||||
Returns:
|
||||
A tuple of (directory, basename, extension).
|
||||
"""
|
||||
|
||||
googlename = self.RelativePath()
|
||||
project, rest = os.path.split(googlename)
|
||||
return (project,) + os.path.splitext(rest)
|
||||
|
||||
def BaseName(self):
|
||||
"""File base name - text after the final slash, before final period."""
|
||||
return self.Split()[1]
|
||||
|
||||
def Extension(self):
|
||||
"""File extension - text following the final period."""
|
||||
return self.Split()[2]
|
||||
|
||||
|
||||
def _ShouldPrintError(category, confidence, linenum):
|
||||
"""If confidence >= verbose, category passes filter and isn't suppressed."""
|
||||
|
||||
@ -886,110 +863,8 @@ def CloseExpression(clean_lines, linenum, pos):
|
||||
return (line, clean_lines.NumLines(), -1)
|
||||
|
||||
|
||||
def FindStartOfExpressionInLine(line, endpos, depth, startchar, endchar):
|
||||
"""Find position at the matching startchar.
|
||||
|
||||
This is almost the reverse of FindEndOfExpressionInLine, but note
|
||||
that the input position and returned position differs by 1.
|
||||
|
||||
Args:
|
||||
line: a CleansedLines line.
|
||||
endpos: start searching at this position.
|
||||
depth: nesting level at endpos.
|
||||
startchar: expression opening character.
|
||||
endchar: expression closing character.
|
||||
|
||||
Returns:
|
||||
On finding matching startchar: (index at matching startchar, 0)
|
||||
Otherwise: (-1, new depth at beginning of this line)
|
||||
"""
|
||||
for i in range(endpos, -1, -1):
|
||||
if line[i] == endchar:
|
||||
depth += 1
|
||||
elif line[i] == startchar:
|
||||
depth -= 1
|
||||
if depth == 0:
|
||||
return (i, 0)
|
||||
return (-1, depth)
|
||||
|
||||
|
||||
def ReverseCloseExpression(clean_lines, linenum, pos):
|
||||
"""If input points to ) or } or ] or >, finds the position that opens it.
|
||||
|
||||
If lines[linenum][pos] points to a ')' or '}' or ']' or '>', finds the
|
||||
linenum/pos that correspond to the opening of the expression.
|
||||
|
||||
Args:
|
||||
clean_lines: A CleansedLines instance containing the file.
|
||||
linenum: The number of the line to check.
|
||||
pos: A position on the line.
|
||||
|
||||
Returns:
|
||||
A tuple (line, linenum, pos) pointer *at* the opening brace, or
|
||||
(line, 0, -1) if we never find the matching opening brace. Note
|
||||
we ignore strings and comments when matching; and the line we
|
||||
return is the 'cleansed' line at linenum.
|
||||
"""
|
||||
line = clean_lines.elided[linenum]
|
||||
endchar = line[pos]
|
||||
startchar = None
|
||||
if endchar not in ')}]>':
|
||||
return (line, 0, -1)
|
||||
if endchar == ')':
|
||||
startchar = '('
|
||||
if endchar == ']':
|
||||
startchar = '['
|
||||
if endchar == '}':
|
||||
startchar = '{'
|
||||
if endchar == '>':
|
||||
startchar = '<'
|
||||
|
||||
# Check last line
|
||||
(start_pos, num_open) = FindStartOfExpressionInLine(
|
||||
line, pos, 0, startchar, endchar)
|
||||
if start_pos > -1:
|
||||
return (line, linenum, start_pos)
|
||||
|
||||
# Continue scanning backward
|
||||
while linenum > 0:
|
||||
linenum -= 1
|
||||
line = clean_lines.elided[linenum]
|
||||
(start_pos, num_open) = FindStartOfExpressionInLine(
|
||||
line, len(line) - 1, num_open, startchar, endchar)
|
||||
if start_pos > -1:
|
||||
return (line, linenum, start_pos)
|
||||
|
||||
# Did not find startchar before beginning of file, give up
|
||||
return (line, 0, -1)
|
||||
|
||||
|
||||
def GetHeaderGuardCPPVariable(filename):
|
||||
"""Returns the CPP variable that should be used as a header guard.
|
||||
|
||||
Args:
|
||||
filename: The name of a C++ header file.
|
||||
|
||||
Returns:
|
||||
The CPP variable that should be used as a header guard in the
|
||||
named file.
|
||||
|
||||
"""
|
||||
|
||||
# Restores original filename in case that cpplint is invoked from Emacs's
|
||||
# flymake.
|
||||
filename = re.sub(r'_flymake\.h$', '.h', filename)
|
||||
filename = re.sub(r'/\.flymake/([^/]*)$', r'/\1', filename)
|
||||
|
||||
fileinfo = FileInfo(filename)
|
||||
file_path_from_root = fileinfo.RelativePath()
|
||||
return 'NVIM_' + re.sub(r'[-./\s]', '_', file_path_from_root).upper()
|
||||
|
||||
|
||||
def CheckForHeaderGuard(filename, lines, error):
|
||||
"""Checks that the file contains a header guard.
|
||||
|
||||
Logs an error if no #ifndef header guard is present. For other
|
||||
headers, checks that the full pathname is used.
|
||||
"""Checks that the file contains "#pragma once".
|
||||
|
||||
Args:
|
||||
filename: The name of the C++ header file.
|
||||
@ -1001,65 +876,9 @@ def CheckForHeaderGuard(filename, lines, error):
|
||||
}:
|
||||
return
|
||||
|
||||
cppvar = GetHeaderGuardCPPVariable(filename)
|
||||
|
||||
ifndef = None
|
||||
ifndef_linenum = 0
|
||||
define = None
|
||||
endif = None
|
||||
endif_linenum = 0
|
||||
for linenum, line in enumerate(lines):
|
||||
linesplit = line.split()
|
||||
if len(linesplit) >= 2:
|
||||
# find the first occurrence of #ifndef and #define, save arg
|
||||
if not ifndef and linesplit[0] == '#ifndef':
|
||||
# set ifndef to the header guard presented on the #ifndef line.
|
||||
ifndef = linesplit[1]
|
||||
ifndef_linenum = linenum
|
||||
if not define and linesplit[0] == '#define':
|
||||
define = linesplit[1]
|
||||
# find the last occurrence of #endif, save entire line
|
||||
if line.startswith('#endif'):
|
||||
endif = line
|
||||
endif_linenum = linenum
|
||||
|
||||
if not ifndef:
|
||||
if "#pragma once" not in lines:
|
||||
error(filename, 0, 'build/header_guard', 5,
|
||||
'No #ifndef header guard found, suggested CPP variable is: %s' %
|
||||
cppvar)
|
||||
return
|
||||
|
||||
if not define:
|
||||
error(filename, 0, 'build/header_guard', 5,
|
||||
'No #define header guard found, suggested CPP variable is: %s' %
|
||||
cppvar)
|
||||
return
|
||||
|
||||
# The guard should be PATH_FILE_H_, but we also allow PATH_FILE_H__
|
||||
# for backward compatibility.
|
||||
if ifndef != cppvar:
|
||||
error_level = 0
|
||||
if ifndef != cppvar + '_':
|
||||
error_level = 5
|
||||
|
||||
ParseNolintSuppressions(lines[ifndef_linenum], ifndef_linenum)
|
||||
error(filename, ifndef_linenum, 'build/header_guard', error_level,
|
||||
'#ifndef header guard has wrong style, please use: %s' % cppvar)
|
||||
|
||||
if define != ifndef:
|
||||
error(filename, 0, 'build/header_guard', 5,
|
||||
'#ifndef and #define don\'t match, suggested CPP variable is: %s'
|
||||
% cppvar)
|
||||
return
|
||||
|
||||
if endif != ('#endif // %s' % cppvar):
|
||||
error_level = 0
|
||||
if endif != ('#endif // %s' % (cppvar + '_')):
|
||||
error_level = 5
|
||||
|
||||
ParseNolintSuppressions(lines[endif_linenum], endif_linenum)
|
||||
error(filename, endif_linenum, 'build/header_guard', error_level,
|
||||
'#endif line should be "#endif // %s"' % cppvar)
|
||||
'No "#pragma once" found in header')
|
||||
|
||||
|
||||
def CheckForBadCharacters(filename, lines, error):
|
||||
@ -1982,41 +1801,6 @@ def CheckSpacing(filename, clean_lines, linenum, error):
|
||||
# braces. And since you should never have braces at the beginning of a line,
|
||||
# this is an easy test.
|
||||
match = Match(r'^(.*[^ ({]){', line)
|
||||
if match:
|
||||
# Try a bit harder to check for brace initialization. This
|
||||
# happens in one of the following forms:
|
||||
# Constructor() : initializer_list_{} { ... }
|
||||
# Constructor{}.MemberFunction()
|
||||
# Type variable{};
|
||||
# FunctionCall(type{}, ...);
|
||||
# LastArgument(..., type{});
|
||||
# LOG(INFO) << type{} << " ...";
|
||||
# map_of_type[{...}] = ...;
|
||||
#
|
||||
# We check for the character following the closing brace, and
|
||||
# silence the warning if it's one of those listed above, i.e.
|
||||
# "{.;,)<]".
|
||||
#
|
||||
# To account for nested initializer list, we allow any number of
|
||||
# closing braces up to "{;,)<". We can't simply silence the
|
||||
# warning on first sight of closing brace, because that would
|
||||
# cause false negatives for things that are not initializer lists.
|
||||
# Silence this: But not this:
|
||||
# Outer{ if (...) {
|
||||
# Inner{...} if (...){ // Missing space before {
|
||||
# }; }
|
||||
#
|
||||
# There is a false negative with this approach if people inserted
|
||||
# spurious semicolons, e.g. "if (cond){};", but we will catch the
|
||||
# spurious semicolon with a separate check.
|
||||
(endline, endlinenum, endpos) = CloseExpression(
|
||||
clean_lines, linenum, len(match.group(1)))
|
||||
trailing_text = ''
|
||||
if endpos > -1:
|
||||
trailing_text = endline[endpos:]
|
||||
for offset in range(endlinenum + 1,
|
||||
min(endlinenum + 3, clean_lines.NumLines() - 1)):
|
||||
trailing_text += clean_lines.elided[offset]
|
||||
|
||||
# Make sure '} else {' has spaces.
|
||||
if Search(r'}else', line):
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_API_AUTOCMD_H
|
||||
#define NVIM_API_AUTOCMD_H
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
@ -9,4 +8,3 @@
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "api/autocmd.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_API_AUTOCMD_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_API_BUFFER_H
|
||||
#define NVIM_API_BUFFER_H
|
||||
#pragma once
|
||||
|
||||
#include <lauxlib.h>
|
||||
|
||||
@ -10,4 +9,3 @@
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "api/buffer.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_API_BUFFER_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_API_COMMAND_H
|
||||
#define NVIM_API_COMMAND_H
|
||||
#pragma once
|
||||
|
||||
#include "nvim/api/keysets.h"
|
||||
#include "nvim/api/private/defs.h"
|
||||
@ -9,4 +8,3 @@
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "api/command.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_API_COMMAND_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_API_DEPRECATED_H
|
||||
#define NVIM_API_DEPRECATED_H
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
@ -8,4 +7,3 @@
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "api/deprecated.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_API_DEPRECATED_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_API_EXTMARK_H
|
||||
#define NVIM_API_EXTMARK_H
|
||||
#pragma once
|
||||
|
||||
#include "nvim/api/keysets.h"
|
||||
#include "nvim/api/private/defs.h"
|
||||
@ -14,4 +13,3 @@ EXTERN handle_T next_namespace_id INIT( = 1);
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "api/extmark.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_API_EXTMARK_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_API_KEYSETS_H
|
||||
#define NVIM_API_KEYSETS_H
|
||||
#pragma once
|
||||
|
||||
#include "nvim/api/private/defs.h"
|
||||
|
||||
@ -314,5 +313,3 @@ typedef struct {
|
||||
typedef struct {
|
||||
Boolean output;
|
||||
} Dict(exec_opts);
|
||||
|
||||
#endif // NVIM_API_KEYSETS_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_API_OPTIONS_H
|
||||
#define NVIM_API_OPTIONS_H
|
||||
#pragma once
|
||||
|
||||
#include "nvim/api/keysets.h"
|
||||
#include "nvim/api/private/defs.h"
|
||||
@ -8,5 +7,3 @@
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "api/options.h.generated.h"
|
||||
#endif
|
||||
|
||||
#endif // NVIM_API_OPTIONS_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_API_PRIVATE_CONVERTER_H
|
||||
#define NVIM_API_PRIVATE_CONVERTER_H
|
||||
#pragma once
|
||||
|
||||
#include "nvim/api/private/defs.h"
|
||||
#include "nvim/eval/typval_defs.h"
|
||||
@ -7,5 +6,3 @@
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "api/private/converter.h.generated.h"
|
||||
#endif
|
||||
|
||||
#endif // NVIM_API_PRIVATE_CONVERTER_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_API_PRIVATE_DEFS_H
|
||||
#define NVIM_API_PRIVATE_DEFS_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
@ -139,5 +138,3 @@ typedef struct {
|
||||
} KeySetLink;
|
||||
|
||||
typedef KeySetLink *(*FieldHashfn)(const char *str, size_t len);
|
||||
|
||||
#endif // NVIM_API_PRIVATE_DEFS_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_API_PRIVATE_DISPATCH_H
|
||||
#define NVIM_API_PRIVATE_DISPATCH_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
@ -30,5 +29,3 @@ extern const MsgpackRpcRequestHandler method_handlers[];
|
||||
# include "api/private/dispatch_wrappers.h.generated.h"
|
||||
# include "keysets_defs.generated.h"
|
||||
#endif
|
||||
|
||||
#endif // NVIM_API_PRIVATE_DISPATCH_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_API_PRIVATE_HELPERS_H
|
||||
#define NVIM_API_PRIVATE_HELPERS_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
@ -199,5 +198,3 @@ typedef struct {
|
||||
current_channel_id = save_channel_id; \
|
||||
current_sctx = save_current_sctx; \
|
||||
} while (0);
|
||||
|
||||
#endif // NVIM_API_PRIVATE_HELPERS_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_API_PRIVATE_VALIDATE_H
|
||||
#define NVIM_API_PRIVATE_VALIDATE_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
@ -95,5 +94,3 @@
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "api/private/validate.h.generated.h"
|
||||
#endif
|
||||
|
||||
#endif // NVIM_API_PRIVATE_VALIDATE_H
|
||||
|
@ -1,9 +1,7 @@
|
||||
#ifndef NVIM_API_TABPAGE_H
|
||||
#define NVIM_API_TABPAGE_H
|
||||
#pragma once
|
||||
|
||||
#include "nvim/api/private/defs.h"
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "api/tabpage.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_API_TABPAGE_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_API_UI_H
|
||||
#define NVIM_API_UI_H
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
@ -11,4 +10,3 @@
|
||||
# include "api/ui.h.generated.h"
|
||||
# include "ui_events_remote.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_API_UI_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_API_UI_EVENTS_IN_H
|
||||
#define NVIM_API_UI_EVENTS_IN_H
|
||||
#pragma once
|
||||
|
||||
// This file is not compiled, just parsed for definitions
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
@ -170,4 +169,3 @@ void msg_history_clear(void)
|
||||
|
||||
void error_exit(Integer status)
|
||||
FUNC_API_SINCE(12);
|
||||
#endif // NVIM_API_UI_EVENTS_IN_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_API_VIM_H
|
||||
#define NVIM_API_VIM_H
|
||||
#pragma once
|
||||
|
||||
#include "nvim/api/keysets.h"
|
||||
#include "nvim/api/private/defs.h"
|
||||
@ -7,4 +6,3 @@
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "api/vim.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_API_VIM_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_API_VIMSCRIPT_H
|
||||
#define NVIM_API_VIMSCRIPT_H
|
||||
#pragma once
|
||||
|
||||
#include "nvim/api/keysets.h"
|
||||
#include "nvim/api/private/defs.h"
|
||||
@ -7,4 +6,3 @@
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "api/vimscript.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_API_VIMSCRIPT_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_API_WIN_CONFIG_H
|
||||
#define NVIM_API_WIN_CONFIG_H
|
||||
#pragma once
|
||||
|
||||
#include "nvim/api/keysets.h"
|
||||
#include "nvim/api/private/defs.h"
|
||||
@ -8,4 +7,3 @@
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "api/win_config.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_API_WIN_CONFIG_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_API_WINDOW_H
|
||||
#define NVIM_API_WINDOW_H
|
||||
#pragma once
|
||||
|
||||
#include "nvim/api/keysets.h"
|
||||
#include "nvim/api/private/defs.h"
|
||||
@ -7,4 +6,3 @@
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "api/window.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_API_WINDOW_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_ARABIC_H
|
||||
#define NVIM_ARABIC_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
@ -8,4 +7,3 @@
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "arabic.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_ARABIC_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_ARGLIST_H
|
||||
#define NVIM_ARGLIST_H
|
||||
#pragma once
|
||||
|
||||
#include "nvim/arglist_defs.h"
|
||||
#include "nvim/cmdexpand_defs.h"
|
||||
@ -10,5 +9,3 @@
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "arglist.h.generated.h"
|
||||
#endif
|
||||
|
||||
#endif // NVIM_ARGLIST_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_ARGLIST_DEFS_H
|
||||
#define NVIM_ARGLIST_DEFS_H
|
||||
#pragma once
|
||||
|
||||
#include "nvim/garray.h"
|
||||
|
||||
@ -18,5 +17,3 @@ typedef struct argentry {
|
||||
char *ae_fname; ///< file name as specified
|
||||
int ae_fnum; ///< buffer number with expanded file name
|
||||
} aentry_T;
|
||||
|
||||
#endif // NVIM_ARGLIST_DEFS_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_ASCII_H
|
||||
#define NVIM_ASCII_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
@ -184,5 +183,3 @@ static inline bool ascii_isspace(int c)
|
||||
{
|
||||
return (c >= 9 && c <= 13) || c == ' ';
|
||||
}
|
||||
|
||||
#endif // NVIM_ASCII_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_ASSERT_H
|
||||
#define NVIM_ASSERT_H
|
||||
#pragma once
|
||||
|
||||
#include "auto/config.h"
|
||||
|
||||
@ -165,5 +164,3 @@
|
||||
# define STRICT_SUB(a, b, c, t) \
|
||||
do { *(c) = (t)((a) - (b)); } while (0)
|
||||
#endif
|
||||
|
||||
#endif // NVIM_ASSERT_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_AUTOCMD_H
|
||||
#define NVIM_AUTOCMD_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
@ -101,5 +100,3 @@ EXTERN pos_T last_cursormoved INIT( = { 0, 0, 0 });
|
||||
/// Iterates over all the events for auto commands
|
||||
#define FOR_ALL_AUEVENTS(event) \
|
||||
for (event_T event = (event_T)0; (int)event < (int)NUM_EVENTS; event = (event_T)((int)event + 1)) // NOLINT
|
||||
|
||||
#endif // NVIM_AUTOCMD_H
|
||||
|
@ -1,10 +1,7 @@
|
||||
#ifndef NVIM_BASE64_H
|
||||
#define NVIM_BASE64_H
|
||||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "base64.h.generated.h"
|
||||
#endif
|
||||
|
||||
#endif // NVIM_BASE64_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_BUFFER_H
|
||||
#define NVIM_BUFFER_H
|
||||
#pragma once
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
@ -140,5 +139,3 @@ static inline bool buf_is_empty(buf_T *buf)
|
||||
return buf->b_ml.ml_line_count == 1
|
||||
&& *ml_get_buf(buf, 1) == '\0';
|
||||
}
|
||||
|
||||
#endif // NVIM_BUFFER_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_BUFFER_DEFS_H
|
||||
#define NVIM_BUFFER_DEFS_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
@ -1340,5 +1339,3 @@ struct window_S {
|
||||
#define CHANGEDTICK(buf) \
|
||||
(=== Include buffer.h & use buf_(get|set|inc) _changedtick ===)
|
||||
// uncrustify:on
|
||||
|
||||
#endif // NVIM_BUFFER_DEFS_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_BUFFER_UPDATES_H
|
||||
#define NVIM_BUFFER_UPDATES_H
|
||||
#pragma once
|
||||
|
||||
#include "nvim/buffer_defs.h"
|
||||
#include "nvim/extmark.h"
|
||||
@ -7,5 +6,3 @@
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "buffer_updates.h.generated.h"
|
||||
#endif
|
||||
|
||||
#endif // NVIM_BUFFER_UPDATES_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_BUFWRITE_H
|
||||
#define NVIM_BUFWRITE_H
|
||||
#pragma once
|
||||
|
||||
#include "nvim/buffer_defs.h"
|
||||
#include "nvim/ex_cmds_defs.h"
|
||||
@ -7,5 +6,3 @@
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "bufwrite.h.generated.h"
|
||||
#endif
|
||||
|
||||
#endif // NVIM_BUFWRITE_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_CHANGE_H
|
||||
#define NVIM_CHANGE_H
|
||||
#pragma once
|
||||
|
||||
#include "nvim/buffer_defs.h"
|
||||
#include "nvim/pos.h"
|
||||
@ -15,5 +14,3 @@
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "change.h.generated.h"
|
||||
#endif
|
||||
|
||||
#endif // NVIM_CHANGE_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_CHANNEL_H
|
||||
#define NVIM_CHANNEL_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
@ -161,5 +160,3 @@ static inline Stream *channel_outstream(Channel *chan)
|
||||
}
|
||||
abort();
|
||||
}
|
||||
|
||||
#endif // NVIM_CHANNEL_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_CHARSET_H
|
||||
#define NVIM_CHARSET_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
@ -57,4 +56,3 @@ static inline bool vim_isbreak(int c)
|
||||
{
|
||||
return breakat_flags[(uint8_t)c];
|
||||
}
|
||||
#endif // NVIM_CHARSET_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_CMDEXPAND_H
|
||||
#define NVIM_CMDEXPAND_H
|
||||
#pragma once
|
||||
|
||||
#include "nvim/cmdexpand_defs.h"
|
||||
#include "nvim/eval/typval_defs.h"
|
||||
@ -45,4 +44,3 @@ enum {
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "cmdexpand.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_CMDEXPAND_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_CMDEXPAND_DEFS_H
|
||||
#define NVIM_CMDEXPAND_DEFS_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
@ -112,5 +111,3 @@ enum {
|
||||
|
||||
/// Type used by ExpandGeneric()
|
||||
typedef char *(*CompleteListItemGetter)(expand_T *, int);
|
||||
|
||||
#endif // NVIM_CMDEXPAND_DEFS_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_CMDHIST_H
|
||||
#define NVIM_CMDHIST_H
|
||||
#pragma once
|
||||
|
||||
#include "nvim/cmdexpand_defs.h"
|
||||
#include "nvim/eval/typval_defs.h"
|
||||
@ -31,4 +30,3 @@ typedef struct hist_entry {
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "cmdhist.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_CMDHIST_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_CONTEXT_H
|
||||
#define NVIM_CONTEXT_H
|
||||
#pragma once
|
||||
|
||||
#include <msgpack.h>
|
||||
#include <msgpack/sbuffer.h>
|
||||
@ -45,5 +44,3 @@ extern int kCtxAll;
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "context.h.generated.h"
|
||||
#endif
|
||||
|
||||
#endif // NVIM_CONTEXT_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_CURSOR_H
|
||||
#define NVIM_CURSOR_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
@ -8,5 +7,3 @@
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "cursor.h.generated.h"
|
||||
#endif
|
||||
|
||||
#endif // NVIM_CURSOR_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_CURSOR_SHAPE_H
|
||||
#define NVIM_CURSOR_SHAPE_H
|
||||
#pragma once
|
||||
|
||||
#include "nvim/api/private/defs.h"
|
||||
#include "nvim/types.h"
|
||||
@ -58,4 +57,3 @@ extern cursorentry_T shape_table[SHAPE_IDX_COUNT];
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "cursor_shape.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_CURSOR_SHAPE_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_DEBUGGER_H
|
||||
#define NVIM_DEBUGGER_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
@ -8,4 +7,3 @@
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "debugger.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_DEBUGGER_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_DECORATION_H
|
||||
#define NVIM_DECORATION_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
@ -128,5 +127,3 @@ static inline bool decor_has_sign(Decoration *decor)
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "decoration.h.generated.h"
|
||||
#endif
|
||||
|
||||
#endif // NVIM_DECORATION_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_DECORATION_PROVIDER_H
|
||||
#define NVIM_DECORATION_PROVIDER_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
@ -34,5 +33,3 @@ EXTERN bool provider_active INIT( = false);
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "decoration_provider.h.generated.h"
|
||||
#endif
|
||||
|
||||
#endif // NVIM_DECORATION_PROVIDER_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_DIFF_H
|
||||
#define NVIM_DIFF_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
@ -17,4 +16,3 @@ EXTERN bool need_diff_redraw INIT( = false); // need to call diff_redraw()
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "diff.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_DIFF_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_DIGRAPH_H
|
||||
#define NVIM_DIGRAPH_H
|
||||
#pragma once
|
||||
|
||||
#include "nvim/ex_cmds_defs.h"
|
||||
#include "nvim/types.h"
|
||||
@ -7,4 +6,3 @@
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "digraph.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_DIGRAPH_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_DRAWLINE_H
|
||||
#define NVIM_DRAWLINE_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
@ -38,4 +37,3 @@ typedef struct {
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "drawline.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_DRAWLINE_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_DRAWSCREEN_H
|
||||
#define NVIM_DRAWSCREEN_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
@ -31,4 +30,3 @@ EXTERN match_T screen_search_hl INIT( = { 0 }); // used for 'hlsearch' hig
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "drawscreen.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_DRAWSCREEN_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EDIT_H
|
||||
#define NVIM_EDIT_H
|
||||
#pragma once
|
||||
|
||||
#include "nvim/autocmd.h"
|
||||
#include "nvim/vim.h"
|
||||
@ -29,4 +28,3 @@
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "edit.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_EDIT_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EVAL_H
|
||||
#define NVIM_EVAL_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
@ -282,4 +281,3 @@ EXTERN evalarg_T EVALARG_EVALUATE INIT( = { EVAL_EVALUATE, NULL, NULL, NULL });
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "eval.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_EVAL_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EVAL_BUFFER_H
|
||||
#define NVIM_EVAL_BUFFER_H
|
||||
#pragma once
|
||||
|
||||
#include "nvim/buffer_defs.h"
|
||||
#include "nvim/eval/typval_defs.h"
|
||||
@ -7,4 +6,3 @@
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "eval/buffer.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_EVAL_BUFFER_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EVAL_DECODE_H
|
||||
#define NVIM_EVAL_DECODE_H
|
||||
#pragma once
|
||||
|
||||
#include <msgpack.h>
|
||||
#include <stddef.h>
|
||||
@ -10,4 +9,3 @@
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "eval/decode.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_EVAL_DECODE_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EVAL_ENCODE_H
|
||||
#define NVIM_EVAL_ENCODE_H
|
||||
#pragma once
|
||||
|
||||
#include <msgpack.h>
|
||||
#include <msgpack/pack.h>
|
||||
@ -74,4 +73,3 @@ extern const char *const encode_special_var_names[];
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "eval/encode.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_EVAL_ENCODE_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EVAL_EXECUTOR_H
|
||||
#define NVIM_EVAL_EXECUTOR_H
|
||||
#pragma once
|
||||
|
||||
#include "nvim/eval/typval_defs.h"
|
||||
|
||||
@ -8,4 +7,3 @@ extern char *e_list_index_out_of_range_nr;
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "eval/executor.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_EVAL_EXECUTOR_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EVAL_FUNCS_H
|
||||
#define NVIM_EVAL_FUNCS_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
@ -31,4 +30,3 @@ typedef struct {
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "eval/funcs.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_EVAL_FUNCS_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EVAL_GC_H
|
||||
#define NVIM_EVAL_GC_H
|
||||
#pragma once
|
||||
|
||||
#include "nvim/eval/typval_defs.h"
|
||||
|
||||
@ -9,4 +8,3 @@ extern list_T *gc_first_list;
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "eval/gc.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_EVAL_GC_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EVAL_TYPVAL_H
|
||||
#define NVIM_EVAL_TYPVAL_H
|
||||
#pragma once
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
@ -492,5 +491,3 @@ EXTERN const size_t kTVTranslate INIT( = TV_TRANSLATE);
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "eval/typval.h.generated.h"
|
||||
#endif
|
||||
|
||||
#endif // NVIM_EVAL_TYPVAL_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EVAL_TYPVAL_DEFS_H
|
||||
#define NVIM_EVAL_TYPVAL_DEFS_H
|
||||
#pragma once
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <limits.h>
|
||||
@ -385,5 +384,3 @@ typedef struct list_stack_S {
|
||||
list_T *list;
|
||||
struct list_stack_S *prev;
|
||||
} list_stack_T;
|
||||
|
||||
#endif // NVIM_EVAL_TYPVAL_DEFS_H
|
||||
|
@ -2,8 +2,7 @@
|
||||
///
|
||||
/// Contains common definitions for eval/typval_encode.c.h. Most of time should
|
||||
/// not be included directly.
|
||||
#ifndef NVIM_EVAL_TYPVAL_ENCODE_H
|
||||
#define NVIM_EVAL_TYPVAL_ENCODE_H
|
||||
#pragma once
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
@ -140,5 +139,3 @@ static inline size_t tv_strlen(const typval_T *const tv)
|
||||
/// Name of the dummy const dict_T *const variable
|
||||
#define TYPVAL_ENCODE_NODICT_VAR \
|
||||
_TYPVAL_ENCODE_FUNC_NAME(_typval_encode_, _nodict_var)
|
||||
|
||||
#endif // NVIM_EVAL_TYPVAL_ENCODE_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EVAL_USERFUNC_H
|
||||
#define NVIM_EVAL_USERFUNC_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
@ -97,4 +96,3 @@ typedef struct {
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "eval/userfunc.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_EVAL_USERFUNC_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EVAL_VARS_H
|
||||
#define NVIM_EVAL_VARS_H
|
||||
#pragma once
|
||||
|
||||
#include "nvim/ex_cmds_defs.h"
|
||||
#include "nvim/option_defs.h"
|
||||
@ -7,4 +6,3 @@
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "eval/vars.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_EVAL_VARS_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EVAL_WINDOW_H
|
||||
#define NVIM_EVAL_WINDOW_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
@ -76,4 +75,3 @@ typedef struct {
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "eval/window.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_EVAL_WINDOW_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EVENT_DEFS_H
|
||||
#define NVIM_EVENT_DEFS_H
|
||||
#pragma once
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdarg.h>
|
||||
@ -34,5 +33,3 @@ static inline Event event_create(argv_callback cb, int argc, ...)
|
||||
VA_EVENT_INIT(&event, cb, argc);
|
||||
return event;
|
||||
}
|
||||
|
||||
#endif // NVIM_EVENT_DEFS_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EVENT_LIBUV_PROCESS_H
|
||||
#define NVIM_EVENT_LIBUV_PROCESS_H
|
||||
#pragma once
|
||||
|
||||
#include <uv.h>
|
||||
|
||||
@ -24,4 +23,3 @@ static inline LibuvProcess libuv_process_init(Loop *loop, void *data)
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "event/libuv_process.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_EVENT_LIBUV_PROCESS_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EVENT_LOOP_H
|
||||
#define NVIM_EVENT_LOOP_H
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <uv.h>
|
||||
@ -85,5 +84,3 @@ typedef struct loop {
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "event/loop.h.generated.h"
|
||||
#endif
|
||||
|
||||
#endif // NVIM_EVENT_LOOP_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EVENT_MULTIQUEUE_H
|
||||
#define NVIM_EVENT_MULTIQUEUE_H
|
||||
#pragma once
|
||||
|
||||
#include <uv.h>
|
||||
|
||||
@ -15,4 +14,3 @@ typedef void (*PutCallback)(MultiQueue *multiq, void *data);
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "event/multiqueue.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_EVENT_MULTIQUEUE_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EVENT_PROCESS_H
|
||||
#define NVIM_EVENT_PROCESS_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
@ -83,4 +82,3 @@ static inline bool process_is_stopped(Process *proc)
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "event/process.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_EVENT_PROCESS_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EVENT_RSTREAM_H
|
||||
#define NVIM_EVENT_RSTREAM_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
@ -11,4 +10,3 @@
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "event/rstream.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_EVENT_RSTREAM_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EVENT_SIGNAL_H
|
||||
#define NVIM_EVENT_SIGNAL_H
|
||||
#pragma once
|
||||
|
||||
#include <uv.h>
|
||||
|
||||
@ -23,4 +22,3 @@ struct signal_watcher {
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "event/signal.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_EVENT_SIGNAL_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EVENT_SOCKET_H
|
||||
#define NVIM_EVENT_SOCKET_H
|
||||
#pragma once
|
||||
|
||||
#include <uv.h>
|
||||
|
||||
@ -39,4 +38,3 @@ struct socket_watcher {
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "event/socket.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_EVENT_SOCKET_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EVENT_STREAM_H
|
||||
#define NVIM_EVENT_STREAM_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
@ -61,4 +60,3 @@ struct stream {
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "event/stream.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_EVENT_STREAM_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EVENT_TIME_H
|
||||
#define NVIM_EVENT_TIME_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <uv.h>
|
||||
@ -23,4 +22,3 @@ struct time_watcher {
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "event/time.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_EVENT_TIME_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EVENT_WSTREAM_H
|
||||
#define NVIM_EVENT_WSTREAM_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
@ -23,4 +22,3 @@ struct wbuffer {
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "event/wstream.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_EVENT_WSTREAM_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EX_CMDS_H
|
||||
#define NVIM_EX_CMDS_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
@ -34,4 +33,3 @@ typedef struct {
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "ex_cmds.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_EX_CMDS_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EX_CMDS2_H
|
||||
#define NVIM_EX_CMDS2_H
|
||||
#pragma once
|
||||
|
||||
#include "nvim/ex_cmds_defs.h"
|
||||
|
||||
@ -15,4 +14,3 @@
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "ex_cmds2.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_EX_CMDS2_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EX_CMDS_DEFS_H
|
||||
#define NVIM_EX_CMDS_DEFS_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
@ -230,5 +229,3 @@ typedef struct {
|
||||
bool bar;
|
||||
} magic;
|
||||
} CmdParseInfo;
|
||||
|
||||
#endif // NVIM_EX_CMDS_DEFS_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EX_DOCMD_H
|
||||
#define NVIM_EX_DOCMD_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
@ -41,4 +40,3 @@ typedef struct {
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "ex_docmd.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_EX_DOCMD_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EX_EVAL_H
|
||||
#define NVIM_EX_EVAL_H
|
||||
#pragma once
|
||||
|
||||
#include "nvim/ex_cmds_defs.h"
|
||||
#include "nvim/ex_eval_defs.h"
|
||||
@ -7,4 +6,3 @@
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "ex_eval.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_EX_EVAL_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EX_EVAL_DEFS_H
|
||||
#define NVIM_EX_EVAL_DEFS_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
@ -128,5 +127,3 @@ struct exception_state_S {
|
||||
int estate_trylevel;
|
||||
int estate_did_emsg;
|
||||
};
|
||||
|
||||
#endif // NVIM_EX_EVAL_DEFS_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EX_GETLN_H
|
||||
#define NVIM_EX_GETLN_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
@ -84,4 +83,3 @@ enum {
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "ex_getln.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_EX_GETLN_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EX_SESSION_H
|
||||
#define NVIM_EX_SESSION_H
|
||||
#pragma once
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
@ -8,5 +7,3 @@
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "ex_session.h.generated.h"
|
||||
#endif
|
||||
|
||||
#endif // NVIM_EX_SESSION_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EXTMARK_H
|
||||
#define NVIM_EXTMARK_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
@ -103,5 +102,3 @@ struct undo_object {
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "extmark.h.generated.h"
|
||||
#endif
|
||||
|
||||
#endif // NVIM_EXTMARK_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_EXTMARK_DEFS_H
|
||||
#define NVIM_EXTMARK_DEFS_H
|
||||
#pragma once
|
||||
|
||||
#include "klib/kvec.h"
|
||||
#include "nvim/types.h"
|
||||
@ -28,5 +27,3 @@ typedef enum {
|
||||
kDecorLevelVisible = 1,
|
||||
kDecorLevelVirtLine = 2,
|
||||
} DecorLevel;
|
||||
|
||||
#endif // NVIM_EXTMARK_DEFS_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_FILE_SEARCH_H
|
||||
#define NVIM_FILE_SEARCH_H
|
||||
#pragma once
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
@ -14,4 +13,3 @@
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "file_search.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_FILE_SEARCH_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_FILEIO_H
|
||||
#define NVIM_FILEIO_H
|
||||
#pragma once
|
||||
|
||||
#include "nvim/buffer_defs.h"
|
||||
#include "nvim/eval/typval_defs.h"
|
||||
@ -47,4 +46,3 @@ enum {
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "fileio.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_FILEIO_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_FOLD_H
|
||||
#define NVIM_FOLD_H
|
||||
#pragma once
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
@ -15,4 +14,3 @@ EXTERN int disable_fold_update INIT( = 0);
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "fold.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_FOLD_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_FOLD_DEFS_H
|
||||
#define NVIM_FOLD_DEFS_H
|
||||
#pragma once
|
||||
|
||||
#include "nvim/pos.h"
|
||||
|
||||
@ -13,5 +12,3 @@ typedef struct foldinfo {
|
||||
// line
|
||||
linenr_T fi_lines;
|
||||
} foldinfo_T;
|
||||
|
||||
#endif // NVIM_FOLD_DEFS_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_GARRAY_H
|
||||
#define NVIM_GARRAY_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
@ -72,5 +71,3 @@ static inline void *ga_append_via_ptr(garray_T *gap, size_t item_size)
|
||||
///
|
||||
/// @param gap the garray to be freed
|
||||
#define GA_DEEP_CLEAR_PTR(gap) GA_DEEP_CLEAR(gap, void *, FREE_PTR_PTR)
|
||||
|
||||
#endif // NVIM_GARRAY_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_GETCHAR_H
|
||||
#define NVIM_GETCHAR_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
@ -25,4 +24,3 @@ extern FileDescriptor *scriptin[NSCRIPT];
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "getchar.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_GETCHAR_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_GETCHAR_DEFS_H
|
||||
#define NVIM_GETCHAR_DEFS_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
@ -62,5 +61,3 @@ enum RemapValues {
|
||||
REMAP_SCRIPT = -2, ///< Remap script-local mappings only.
|
||||
REMAP_SKIP = -3, ///< No remapping for first char.
|
||||
};
|
||||
|
||||
#endif // NVIM_GETCHAR_DEFS_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_GETTEXT_H
|
||||
#define NVIM_GETTEXT_H
|
||||
#pragma once
|
||||
|
||||
#ifdef HAVE_WORKING_LIBINTL
|
||||
# include <libintl.h>
|
||||
@ -24,5 +23,3 @@
|
||||
# define bind_textdomain_codeset(x, y) // empty
|
||||
# define textdomain(x) // empty
|
||||
#endif
|
||||
|
||||
#endif // NVIM_GETTEXT_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_GLOBALS_H
|
||||
#define NVIM_GLOBALS_H
|
||||
#pragma once
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
@ -1103,5 +1102,3 @@ EXTERN bool skip_win_fix_cursor INIT( = false);
|
||||
EXTERN bool skip_win_fix_scroll INIT( = false);
|
||||
/// Skip update_topline() call while executing win_fix_scroll().
|
||||
EXTERN bool skip_update_topline INIT( = false);
|
||||
|
||||
#endif // NVIM_GLOBALS_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_GRID_H
|
||||
#define NVIM_GRID_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
@ -59,4 +58,3 @@ static inline schar_T schar_from_char(int c)
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "grid.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_GRID_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_GRID_DEFS_H
|
||||
#define NVIM_GRID_DEFS_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
@ -130,5 +129,3 @@ typedef struct {
|
||||
int clear_width;
|
||||
bool wrap;
|
||||
} GridLineEvent;
|
||||
|
||||
#endif // NVIM_GRID_DEFS_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_HASHTAB_H
|
||||
#define NVIM_HASHTAB_H
|
||||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
@ -94,5 +93,3 @@ typedef struct hashtable_S {
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "hashtab.h.generated.h"
|
||||
#endif
|
||||
|
||||
#endif // NVIM_HASHTAB_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_HELP_H
|
||||
#define NVIM_HELP_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
@ -8,4 +7,3 @@
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "help.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_HELP_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_HIGHLIGHT_H
|
||||
#define NVIM_HIGHLIGHT_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
@ -31,5 +30,3 @@ static inline int win_hl_attr(win_T *wp, int hlf)
|
||||
rgb_bg = rgb_bg != -1 ? rgb_bg : (dark_ ? 0x000000 : 0xFFFFFF); \
|
||||
rgb_sp = rgb_sp != -1 ? rgb_sp : 0xFF0000; \
|
||||
} while (0);
|
||||
|
||||
#endif // NVIM_HIGHLIGHT_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_HIGHLIGHT_DEFS_H
|
||||
#define NVIM_HIGHLIGHT_DEFS_H
|
||||
#pragma once
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
@ -253,5 +252,3 @@ typedef struct {
|
||||
int hl_id;
|
||||
int priority;
|
||||
} HlPriId;
|
||||
|
||||
#endif // NVIM_HIGHLIGHT_DEFS_H
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef NVIM_HIGHLIGHT_GROUP_H
|
||||
#define NVIM_HIGHLIGHT_GROUP_H
|
||||
#pragma once
|
||||
|
||||
#include "nvim/api/keysets.h"
|
||||
#include "nvim/api/private/helpers.h"
|
||||
@ -18,5 +17,3 @@ extern color_name_table_T color_name_table[];
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "highlight_group.h.generated.h"
|
||||
#endif
|
||||
|
||||
#endif // NVIM_HIGHLIGHT_GROUP_H
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user