1 | #ifndef NVIM_FILEIO_H |
2 | #define NVIM_FILEIO_H |
3 | |
4 | #include "nvim/buffer_defs.h" |
5 | #include "nvim/os/os.h" |
6 | |
7 | // Values for readfile() flags |
8 | #define READ_NEW 0x01 // read a file into a new buffer |
9 | #define READ_FILTER 0x02 // read filter output |
10 | #define READ_STDIN 0x04 // read from stdin |
11 | #define READ_BUFFER 0x08 // read from curbuf (converting stdin) |
12 | #define READ_DUMMY 0x10 // reading into a dummy buffer |
13 | #define READ_KEEP_UNDO 0x20 // keep undo info |
14 | #define READ_FIFO 0x40 // read from fifo or socket |
15 | |
16 | #define READ_STRING(x, y) (char_u *)read_string((x), (size_t)(y)) |
17 | |
18 | /* |
19 | * Struct to save values in before executing autocommands for a buffer that is |
20 | * not the current buffer. |
21 | */ |
22 | typedef struct { |
23 | buf_T *save_curbuf; ///< saved curbuf |
24 | int use_aucmd_win; ///< using aucmd_win |
25 | win_T *save_curwin; ///< saved curwin |
26 | win_T *save_prevwin; ///< saved prevwin |
27 | win_T *new_curwin; ///< new curwin |
28 | bufref_T new_curbuf; ///< new curbuf |
29 | char_u *globaldir; ///< saved value of globaldir |
30 | } aco_save_T; |
31 | |
32 | #ifdef INCLUDE_GENERATED_DECLARATIONS |
33 | // Events for autocommands |
34 | # include "auevents_enum.generated.h" |
35 | # include "fileio.h.generated.h" |
36 | #endif |
37 | #endif // NVIM_FILEIO_H |
38 | |