main.h
Go to the documentation of this file.
1 #ifndef NVIM_MAIN_H
2 #define NVIM_MAIN_H
3 
4 #include "nvim/normal.h"
5 #include "nvim/event/loop.h"
6 
7 // Maximum number of commands from + or -c arguments.
8 #define MAX_ARG_CMDS 10
9 
10 extern Loop main_loop;
11 
12 // Struct for various parameters passed between main() and other functions.
13 typedef struct {
14  int argc;
15  char **argv;
16 
17  char *use_vimrc; // vimrc from -u argument
18  bool clean; // --clean argument
19 
20  int n_commands; // no. of commands from + or -c
21  char *commands[MAX_ARG_CMDS]; // commands from + or -c arg
22  char_u cmds_tofree[MAX_ARG_CMDS]; // commands that need free()
23  int n_pre_commands; // no. of commands from --cmd
24  char *pre_commands[MAX_ARG_CMDS]; // commands from --cmd argument
25 
26  int edit_type; // type of editing to do
27  char_u *tagname; // tag from -t argument
28  char_u *use_ef; // 'errorfile' from -q argument
29 
30  bool input_isatty; // stdin is a terminal
31  bool output_isatty; // stdout is a terminal
32  bool err_isatty; // stderr is a terminal
33  int no_swap_file; // "-n" argument used
35  int window_count; // number of windows to use
36  int window_layout; // 0, WIN_HOR, WIN_VER or WIN_TABS
37 
38  int diff_mode; // start with 'diff' set
39 
40  char *listen_addr; // --listen {address}
41 } mparm_T;
42 
43 #ifdef INCLUDE_GENERATED_DECLARATIONS
44 # include "main.h.generated.h"
45 #endif
46 #endif // NVIM_MAIN_H
char * listen_addr
Definition: main.h:40
int window_count
Definition: main.h:35
#define MAX_ARG_CMDS
Definition: main.h:8
bool output_isatty
Definition: main.h:31
int diff_mode
Definition: main.h:38
Definition: main.h:13
int n_pre_commands
Definition: main.h:23
char_u * use_ef
Definition: main.h:28
char * use_vimrc
Definition: main.h:17
int argc
Definition: main.h:14
bool err_isatty
Definition: main.h:32
Loop main_loop
Definition: main.c:103
int window_layout
Definition: main.h:36
int no_swap_file
Definition: main.h:33
char ** argv
Definition: main.h:15
int use_debug_break_level
Definition: main.h:34
char_u * tagname
Definition: main.h:27
bool input_isatty
Definition: main.h:30
Definition: loop.h:17
int edit_type
Definition: main.h:26
unsigned char char_u
Definition: types.h:11
int n_commands
Definition: main.h:20
bool clean
Definition: main.h:18