Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | /* buffer.c */ |
Bram Moolenaar | 5b8cfed | 2019-06-30 22:16:10 +0200 | [diff] [blame] | 2 | void buffer_ensure_loaded(buf_T *buf); |
Bram Moolenaar | ef26954 | 2016-01-19 13:22:12 +0100 | [diff] [blame] | 3 | int open_buffer(int read_stdin, exarg_T *eap, int flags); |
Bram Moolenaar | b25f9a9 | 2016-07-10 18:21:50 +0200 | [diff] [blame] | 4 | void set_bufref(bufref_T *bufref, buf_T *buf); |
| 5 | int bufref_valid(bufref_T *bufref); |
Bram Moolenaar | ef26954 | 2016-01-19 13:22:12 +0100 | [diff] [blame] | 6 | int buf_valid(buf_T *buf); |
| 7 | void close_buffer(win_T *win, buf_T *buf, int action, int abort_if_last); |
| 8 | void buf_clear_file(buf_T *buf); |
| 9 | void buf_freeall(buf_T *buf, int flags); |
| 10 | void goto_buffer(exarg_T *eap, int start, int dir, int count); |
Bram Moolenaar | 7c0a2f3 | 2016-07-10 22:11:16 +0200 | [diff] [blame] | 11 | void handle_swap_exists(bufref_T *old_curbuf); |
Bram Moolenaar | f9e3e09 | 2019-01-13 23:38:42 +0100 | [diff] [blame] | 12 | char *do_bufdel(int command, char_u *arg, int addr_count, int start_bnr, int end_bnr, int forceit); |
Bram Moolenaar | ef26954 | 2016-01-19 13:22:12 +0100 | [diff] [blame] | 13 | int do_buffer(int action, int start, int dir, int count, int forceit); |
| 14 | void set_curbuf(buf_T *buf, int action); |
Bram Moolenaar | ef26954 | 2016-01-19 13:22:12 +0100 | [diff] [blame] | 15 | void do_autochdir(void); |
Bram Moolenaar | f5be7cd | 2017-08-17 16:55:13 +0200 | [diff] [blame] | 16 | void no_write_message(void); |
Bram Moolenaar | 7a76092 | 2018-02-19 23:10:02 +0100 | [diff] [blame] | 17 | void no_write_message_nobang(buf_T *buf); |
Bram Moolenaar | 46a53df | 2018-04-24 21:58:51 +0200 | [diff] [blame] | 18 | int curbuf_reusable(void); |
Bram Moolenaar | c447d8d | 2018-12-18 21:56:28 +0100 | [diff] [blame] | 19 | buf_T *buflist_new(char_u *ffname_arg, char_u *sfname_arg, linenr_T lnum, int flags); |
Bram Moolenaar | ef26954 | 2016-01-19 13:22:12 +0100 | [diff] [blame] | 20 | void free_buf_options(buf_T *buf, int free_p_ff); |
| 21 | int buflist_getfile(int n, linenr_T lnum, int options, int forceit); |
Bram Moolenaar | ef26954 | 2016-01-19 13:22:12 +0100 | [diff] [blame] | 22 | buf_T *buflist_findname_exp(char_u *fname); |
| 23 | buf_T *buflist_findname(char_u *ffname); |
| 24 | int buflist_findpat(char_u *pattern, char_u *pattern_end, int unlisted, int diffmode, int curtab_only); |
| 25 | int ExpandBufnames(char_u *pat, int *num_file, char_u ***file, int options); |
| 26 | buf_T *buflist_findnr(int nr); |
| 27 | char_u *buflist_nr2name(int n, int fullname, int helptail); |
Bram Moolenaar | defa067 | 2019-07-21 19:25:37 +0200 | [diff] [blame] | 28 | void buflist_setfpos(buf_T *buf, win_T *win, linenr_T lnum, colnr_T col, int copy_options); |
Bram Moolenaar | ef26954 | 2016-01-19 13:22:12 +0100 | [diff] [blame] | 29 | void get_winopts(buf_T *buf); |
| 30 | pos_T *buflist_findfpos(buf_T *buf); |
| 31 | linenr_T buflist_findlnum(buf_T *buf); |
| 32 | void buflist_list(exarg_T *eap); |
| 33 | int buflist_name_nr(int fnum, char_u **fname, linenr_T *lnum); |
Bram Moolenaar | c447d8d | 2018-12-18 21:56:28 +0100 | [diff] [blame] | 34 | int setfname(buf_T *buf, char_u *ffname_arg, char_u *sfname_arg, int message); |
Bram Moolenaar | ef26954 | 2016-01-19 13:22:12 +0100 | [diff] [blame] | 35 | void buf_set_name(int fnum, char_u *name); |
| 36 | void buf_name_changed(buf_T *buf); |
| 37 | buf_T *setaltfname(char_u *ffname, char_u *sfname, linenr_T lnum); |
| 38 | char_u *getaltfname(int errmsg); |
| 39 | int buflist_add(char_u *fname, int flags); |
| 40 | void buflist_slash_adjust(void); |
| 41 | void buflist_altfpos(win_T *win); |
| 42 | int otherfile(char_u *ffname); |
| 43 | void buf_setino(buf_T *buf); |
| 44 | void fileinfo(int fullname, int shorthelp, int dont_truncate); |
| 45 | void col_print(char_u *buf, size_t buflen, int col, int vcol); |
| 46 | void maketitle(void); |
| 47 | void resettitle(void); |
| 48 | void free_titles(void); |
| 49 | int build_stl_str_hl(win_T *wp, char_u *out, size_t outlen, char_u *fmt, int use_sandbox, int fillchar, int maxwidth, struct stl_hlrec *hltab, struct stl_hlrec *tabtab); |
| 50 | void get_rel_pos(win_T *wp, char_u *buf, int buflen); |
| 51 | char_u *fix_fname(char_u *fname); |
| 52 | void fname_expand(buf_T *buf, char_u **ffname, char_u **sfname); |
Bram Moolenaar | ef26954 | 2016-01-19 13:22:12 +0100 | [diff] [blame] | 53 | void ex_buffer_all(exarg_T *eap); |
| 54 | void do_modelines(int flags); |
Bram Moolenaar | 91335e5 | 2018-08-01 17:53:12 +0200 | [diff] [blame] | 55 | int bt_normal(buf_T *buf); |
Bram Moolenaar | f0a521f | 2017-07-25 23:31:12 +0200 | [diff] [blame] | 56 | int bt_quickfix(buf_T *buf); |
| 57 | int bt_terminal(buf_T *buf); |
Bram Moolenaar | d28cc3f | 2017-07-27 22:03:50 +0200 | [diff] [blame] | 58 | int bt_help(buf_T *buf); |
Bram Moolenaar | f273245 | 2018-06-03 14:47:35 +0200 | [diff] [blame] | 59 | int bt_prompt(buf_T *buf); |
Bram Moolenaar | 4d784b2 | 2019-05-25 19:51:39 +0200 | [diff] [blame] | 60 | int bt_popup(buf_T *buf); |
Bram Moolenaar | 26910de | 2019-06-15 19:37:15 +0200 | [diff] [blame] | 61 | int bt_nofilename(buf_T *buf); |
Bram Moolenaar | f0a521f | 2017-07-25 23:31:12 +0200 | [diff] [blame] | 62 | int bt_nofile(buf_T *buf); |
| 63 | int bt_dontwrite(buf_T *buf); |
| 64 | int bt_dontwrite_msg(buf_T *buf); |
| 65 | int buf_hide(buf_T *buf); |
Bram Moolenaar | ef26954 | 2016-01-19 13:22:12 +0100 | [diff] [blame] | 66 | char_u *buf_spname(buf_T *buf); |
Bram Moolenaar | 6b7355a | 2017-08-04 21:37:54 +0200 | [diff] [blame] | 67 | void switch_to_win_for_buf(buf_T *buf, win_T **save_curwinp, tabpage_T **save_curtabp, bufref_T *save_curbuf); |
| 68 | void restore_win_for_buf(win_T *save_curwin, tabpage_T *save_curtab, bufref_T *save_curbuf); |
Bram Moolenaar | ef26954 | 2016-01-19 13:22:12 +0100 | [diff] [blame] | 69 | void set_buflisted(int on); |
| 70 | int buf_contents_changed(buf_T *buf); |
| 71 | void wipe_buffer(buf_T *buf, int aucmd); |
Bram Moolenaar | 75a1a94 | 2019-06-20 03:45:36 +0200 | [diff] [blame] | 72 | int set_ref_in_buffers(int copyID); |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 73 | /* vim: set ft=c : */ |