refactor: format all C files under nvim/ #15977

* refactor: format all C files under nvim
* refactor: disable formatting for Vim-owned files:
    * src/nvim/indent_c.c
    * src/nvim/regexp.c
    * src/nvim/regexp_nfa.c
    * src/nvim/testdir/samples/memfile_test.c
This commit is contained in:
dundargoc
2021-10-12 16:56:52 +02:00
committed by GitHub
parent ee342d3cef
commit 40be47e0fa
111 changed files with 1331 additions and 1332 deletions

View File

@@ -4,14 +4,14 @@
#include <stdbool.h>
#include <stdint.h>
#include "nvim/vim.h"
#include "nvim/buffer_defs.h"
#include "nvim/eval/funcs.h"
#include "nvim/eval/typval.h"
#include "nvim/normal.h"
#include "nvim/os/time.h"
#include "nvim/vim.h"
/* Values for the find_pattern_in_path() function args 'type' and 'action': */
// Values for the find_pattern_in_path() function args 'type' and 'action':
#define FIND_ANY 1
#define FIND_DEFINE 2
#define CHECK_PATH 3
@@ -37,18 +37,18 @@
#define SEARCH_PEEK 0x800 ///< peek for typed char, cancel search
#define SEARCH_COL 0x1000 ///< start at specified column instead of zero
/* Values for flags argument for findmatchlimit() */
#define FM_BACKWARD 0x01 /* search backwards */
#define FM_FORWARD 0x02 /* search forwards */
#define FM_BLOCKSTOP 0x04 /* stop at start/end of block */
#define FM_SKIPCOMM 0x08 /* skip comments */
// Values for flags argument for findmatchlimit()
#define FM_BACKWARD 0x01 // search backwards
#define FM_FORWARD 0x02 // search forwards
#define FM_BLOCKSTOP 0x04 // stop at start/end of block
#define FM_SKIPCOMM 0x08 // skip comments
/* Values for sub_cmd and which_pat argument for search_regcomp() */
/* Also used for which_pat argument for searchit() */
#define RE_SEARCH 0 /* save/use pat in/from search_pattern */
#define RE_SUBST 1 /* save/use pat in/from subst_pattern */
#define RE_BOTH 2 /* save pat in both patterns */
#define RE_LAST 2 /* use last used pattern if "pat" is NULL */
// Values for sub_cmd and which_pat argument for search_regcomp()
// Also used for which_pat argument for searchit()
#define RE_SEARCH 0 // save/use pat in/from search_pattern
#define RE_SUBST 1 // save/use pat in/from subst_pattern
#define RE_BOTH 2 // save pat in both patterns
#define RE_LAST 2 // use last used pattern if "pat" is NULL
// Values for searchcount()
#define SEARCH_STAT_DEF_TIMEOUT 40L
@@ -78,21 +78,21 @@ typedef struct spat {
/// Optional extra arguments for searchit().
typedef struct {
linenr_T sa_stop_lnum; ///< stop after this line number when != 0
proftime_T *sa_tm; ///< timeout limit or NULL
int sa_timed_out; ///< set when timed out
int sa_wrapped; ///< search wrapped around
linenr_T sa_stop_lnum; ///< stop after this line number when != 0
proftime_T *sa_tm; ///< timeout limit or NULL
int sa_timed_out; ///< set when timed out
int sa_wrapped; ///< search wrapped around
} searchit_arg_T;
typedef struct searchstat
{
int cur; // current position of found words
int cnt; // total count of found words
bool exact_match; // true if matched exactly on specified position
int incomplete; // 0: search was fully completed
// 1: recomputing was timed out
// 2: max count exceeded
int last_maxcount; // the max count of the last search
int cur; // current position of found words
int cnt; // total count of found words
bool exact_match; // true if matched exactly on specified position
int incomplete; // 0: search was fully completed
// 1: recomputing was timed out
// 2: max count exceeded
int last_maxcount; // the max count of the last search
} searchstat_T;
#ifdef INCLUDE_GENERATED_DECLARATIONS