mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07:00
commit
a3a9ef9ad4
@ -541,11 +541,6 @@ endfunction()
|
||||
set(NO_SINGLE_CHECK_HEADERS
|
||||
os/win_defs.h
|
||||
os/pty_process_win.h
|
||||
regexp_defs.h
|
||||
syntax_defs.h
|
||||
terminal.h
|
||||
undo.h
|
||||
undo_defs.h
|
||||
)
|
||||
foreach(hfile ${NVIM_HEADERS})
|
||||
get_test_target(test-includes "${hfile}" relative_path texe)
|
||||
|
@ -15,6 +15,8 @@
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "nvim/pos.h"
|
||||
#include "nvim/types.h"
|
||||
#include "nvim/profile.h"
|
||||
|
||||
/*
|
||||
* The number of sub-matches is limited to 10.
|
||||
@ -41,18 +43,36 @@
|
||||
#define NFA_ENGINE 2
|
||||
|
||||
typedef struct regengine regengine_T;
|
||||
typedef struct regprog regprog_T;
|
||||
typedef struct reg_extmatch reg_extmatch_T;
|
||||
|
||||
/// Structure to be used for multi-line matching.
|
||||
/// Sub-match "no" starts in line "startpos[no].lnum" column "startpos[no].col"
|
||||
/// and ends in line "endpos[no].lnum" just before column "endpos[no].col".
|
||||
/// The line numbers are relative to the first line, thus startpos[0].lnum is
|
||||
/// always 0.
|
||||
/// When there is no match, the line number is -1.
|
||||
typedef struct {
|
||||
regprog_T *regprog;
|
||||
lpos_T startpos[NSUBEXP];
|
||||
lpos_T endpos[NSUBEXP];
|
||||
int rmm_ic;
|
||||
colnr_T rmm_maxcol; /// when not zero: maximum column
|
||||
} regmmatch_T;
|
||||
|
||||
#include "nvim/buffer_defs.h"
|
||||
|
||||
/*
|
||||
* Structure returned by vim_regcomp() to pass on to vim_regexec().
|
||||
* This is the general structure. For the actual matcher, two specific
|
||||
* structures are used. See code below.
|
||||
*/
|
||||
typedef struct regprog {
|
||||
struct regprog {
|
||||
regengine_T *engine;
|
||||
unsigned regflags;
|
||||
unsigned re_engine; ///< Automatic, backtracking or NFA engine.
|
||||
unsigned re_flags; ///< Second argument for vim_regcomp().
|
||||
} regprog_T;
|
||||
};
|
||||
|
||||
/*
|
||||
* Structure used by the back track matcher.
|
||||
@ -125,31 +145,15 @@ typedef struct {
|
||||
bool rm_ic;
|
||||
} regmatch_T;
|
||||
|
||||
/*
|
||||
* Structure to be used for multi-line matching.
|
||||
* Sub-match "no" starts in line "startpos[no].lnum" column "startpos[no].col"
|
||||
* and ends in line "endpos[no].lnum" just before column "endpos[no].col".
|
||||
* The line numbers are relative to the first line, thus startpos[0].lnum is
|
||||
* always 0.
|
||||
* When there is no match, the line number is -1.
|
||||
*/
|
||||
typedef struct {
|
||||
regprog_T *regprog;
|
||||
lpos_T startpos[NSUBEXP];
|
||||
lpos_T endpos[NSUBEXP];
|
||||
int rmm_ic;
|
||||
colnr_T rmm_maxcol; /* when not zero: maximum column */
|
||||
} regmmatch_T;
|
||||
|
||||
/*
|
||||
* Structure used to store external references: "\z\(\)" to "\z\1".
|
||||
* Use a reference count to avoid the need to copy this around. When it goes
|
||||
* from 1 to zero the matches need to be freed.
|
||||
*/
|
||||
typedef struct {
|
||||
short refcnt;
|
||||
struct reg_extmatch {
|
||||
int16_t refcnt;
|
||||
char_u *matches[NSUBEXP];
|
||||
} reg_extmatch_T;
|
||||
};
|
||||
|
||||
struct regengine {
|
||||
regprog_T *(*regcomp)(char_u*, int);
|
||||
|
@ -2,7 +2,6 @@
|
||||
#define NVIM_SYNTAX_DEFS_H
|
||||
|
||||
#include "nvim/highlight_defs.h"
|
||||
#include "nvim/regexp_defs.h"
|
||||
|
||||
# define SST_MIN_ENTRIES 150 /* minimal size for state stack array */
|
||||
# define SST_MAX_ENTRIES 1000 /* maximal size for state stack array */
|
||||
@ -10,6 +9,11 @@
|
||||
# define SST_DIST 16 /* normal distance between entries */
|
||||
# define SST_INVALID (synstate_T *)-1 /* invalid syn_state pointer */
|
||||
|
||||
typedef struct syn_state synstate_T;
|
||||
|
||||
#include "nvim/buffer_defs.h"
|
||||
#include "nvim/regexp_defs.h"
|
||||
|
||||
typedef unsigned short disptick_T; /* display tick type */
|
||||
|
||||
/* struct passed to in_id_list() */
|
||||
@ -48,8 +52,6 @@ typedef struct buf_state {
|
||||
* syn_state contains the syntax state stack for the start of one line.
|
||||
* Used by b_sst_array[].
|
||||
*/
|
||||
typedef struct syn_state synstate_T;
|
||||
|
||||
struct syn_state {
|
||||
synstate_T *sst_next; /* next entry in used or free list */
|
||||
linenr_T sst_lnum; /* line number for this state */
|
||||
|
@ -552,7 +552,7 @@ void terminal_receive(Terminal *term, char *data, size_t len)
|
||||
}
|
||||
|
||||
void terminal_get_line_attributes(Terminal *term, win_T *wp, int linenr,
|
||||
int *term_attrs)
|
||||
int *term_attrs)
|
||||
{
|
||||
int height, width;
|
||||
vterm_get_size(term->vt, &height, &width);
|
||||
|
@ -10,6 +10,8 @@ typedef void (*terminal_write_cb)(char *buffer, size_t size, void *data);
|
||||
typedef void (*terminal_resize_cb)(uint16_t width, uint16_t height, void *data);
|
||||
typedef void (*terminal_close_cb)(void *data);
|
||||
|
||||
#include "nvim/buffer_defs.h"
|
||||
|
||||
typedef struct {
|
||||
void *data;
|
||||
uint16_t width, height;
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define NVIM_UNDO_H
|
||||
|
||||
#include "nvim/undo_defs.h"
|
||||
#include "nvim/ex_cmds_defs.h"
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "undo.h.generated.h"
|
||||
|
@ -4,9 +4,10 @@
|
||||
#include <time.h> // for time_t
|
||||
|
||||
#include "nvim/pos.h"
|
||||
#include "nvim/buffer_defs.h"
|
||||
#include "nvim/mark_defs.h"
|
||||
|
||||
typedef struct u_header u_header_T;
|
||||
|
||||
/* Structure to store info about the Visual area. */
|
||||
typedef struct {
|
||||
pos_T vi_start; /* start pos of last VIsual */
|
||||
@ -15,8 +16,9 @@ typedef struct {
|
||||
colnr_T vi_curswant; /* MAXCOL from w_curswant */
|
||||
} visualinfo_T;
|
||||
|
||||
#include "nvim/buffer_defs.h"
|
||||
|
||||
typedef struct u_entry u_entry_T;
|
||||
typedef struct u_header u_header_T;
|
||||
struct u_entry {
|
||||
u_entry_T *ue_next; /* pointer to next entry in list */
|
||||
linenr_T ue_top; /* number of line above undo block */
|
||||
|
Loading…
Reference in New Issue
Block a user