main.h
Go to the documentation of this file.
1 #ifndef NVIM_MAIN_H
2 #define NVIM_MAIN_H
3 
4 #include "nvim/event/loop.h"
5 #include "nvim/normal.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  bool input_neverscript; // never treat stdin as script (-E/-Es)
34  int no_swap_file; // "-n" argument used
36  int window_count; // number of windows to use
37  int window_layout; // 0, WIN_HOR, WIN_VER or WIN_TABS
38 
39  int diff_mode; // start with 'diff' set
40 
41  char *listen_addr; // --listen {address}
42 } mparm_T;
43 
44 #ifdef INCLUDE_GENERATED_DECLARATIONS
45 # include "main.h.generated.h"
46 #endif
47 #endif // NVIM_MAIN_H
mparm_T::n_pre_commands
int n_pre_commands
Definition: main.h:23
mparm_T::no_swap_file
int no_swap_file
Definition: main.h:34
mparm_T::listen_addr
char * listen_addr
Definition: main.h:41
mparm_T::window_count
int window_count
Definition: main.h:36
mparm_T::use_ef
char_u * use_ef
Definition: main.h:28
mparm_T::output_isatty
bool output_isatty
Definition: main.h:31
mparm_T
Definition: main.h:13
mparm_T::argc
int argc
Definition: main.h:14
mparm_T::err_isatty
bool err_isatty
Definition: main.h:32
MAX_ARG_CMDS
#define MAX_ARG_CMDS
Definition: main.h:8
mparm_T::clean
bool clean
Definition: main.h:18
mparm_T::argv
char ** argv
Definition: main.h:15
mparm_T::edit_type
int edit_type
Definition: main.h:26
mparm_T::input_isatty
bool input_isatty
Definition: main.h:30
mparm_T::diff_mode
int diff_mode
Definition: main.h:39
mparm_T::window_layout
int window_layout
Definition: main.h:37
main_loop
Loop main_loop
Definition: main.c:102
mparm_T::n_commands
int n_commands
Definition: main.h:20
loop.h
mparm_T::use_debug_break_level
int use_debug_break_level
Definition: main.h:35
mparm_T::input_neverscript
bool input_neverscript
Definition: main.h:33
mparm_T::use_vimrc
char * use_vimrc
Definition: main.h:17
char_u
unsigned char char_u
Definition: types.h:12
normal.h
loop
Definition: loop.h:16
mparm_T::tagname
char_u * tagname
Definition: main.h:27