1/* misc2.c */ 2int virtual_active(void); 3int getviscol(void); 4int coladvance_force(colnr_T wcol); 5int getviscol2(colnr_T col, colnr_T coladd); 6int coladvance(colnr_T wcol); 7int getvpos(pos_T *pos, colnr_T wcol); 8int inc_cursor(void); 9int inc(pos_T *lp); 10int incl(pos_T *lp); 11int dec_cursor(void); 12int dec(pos_T *lp); 13int decl(pos_T *lp); 14linenr_T get_cursor_rel_lnum(win_T *wp, linenr_T lnum); 15void check_pos(buf_T *buf, pos_T *pos); 16void check_cursor_lnum(void); 17void check_cursor_col(void); 18void check_cursor_col_win(win_T *win); 19void check_cursor(void); 20void adjust_cursor_col(void); 21int leftcol_changed(void); 22void vim_mem_profile_dump(void); 23int alloc_does_fail(long_u size); 24char_u *alloc(unsigned size); 25char_u *alloc_id(unsigned size, alloc_id_T id); 26char_u *alloc_clear(unsigned size); 27char_u *alloc_clear_id(unsigned size, alloc_id_T id); 28char_u *alloc_check(unsigned size); 29char_u *lalloc_clear(long_u size, int message); 30char_u *lalloc(long_u size, int message); 31char_u *lalloc_id(long_u size, int message, alloc_id_T id); 32void *mem_realloc(void *ptr, size_t size); 33void do_outofmem_msg(long_u size); 34void free_all_mem(void); 35char_u *vim_strsave(char_u *string); 36char_u *vim_strnsave(char_u *string, int len); 37char_u *vim_memsave(char_u *p, int len); 38char_u *vim_strsave_escaped(char_u *string, char_u *esc_chars); 39char_u *vim_strsave_escaped_ext(char_u *string, char_u *esc_chars, int cc, int bsl); 40int csh_like_shell(void); 41char_u *vim_strsave_shellescape(char_u *string, int do_special, int do_newline); 42char_u *vim_strsave_up(char_u *string); 43char_u *vim_strnsave_up(char_u *string, int len); 44void vim_strup(char_u *p); 45char_u *strup_save(char_u *orig); 46char_u *strlow_save(char_u *orig); 47void del_trailing_spaces(char_u *ptr); 48void vim_strncpy(char_u *to, char_u *from, size_t len); 49void vim_strcat(char_u *to, char_u *from, size_t tosize); 50int copy_option_part(char_u **option, char_u *buf, int maxlen, char *sep_chars); 51void vim_free(void *x); 52int vim_stricmp(char *s1, char *s2); 53int vim_strnicmp(char *s1, char *s2, size_t len); 54char_u *vim_strchr(char_u *string, int c); 55char_u *vim_strbyte(char_u *string, int c); 56char_u *vim_strrchr(char_u *string, int c); 57int vim_isspace(int x); 58void ga_clear(garray_T *gap); 59void ga_clear_strings(garray_T *gap); 60void ga_init(garray_T *gap); 61void ga_init2(garray_T *gap, int itemsize, int growsize); 62int ga_grow(garray_T *gap, int n); 63char_u *ga_concat_strings(garray_T *gap, char *sep); 64void ga_add_string(garray_T *gap, char_u *p); 65void ga_concat(garray_T *gap, char_u *s); 66void ga_append(garray_T *gap, int c); 67void append_ga_line(garray_T *gap); 68int name_to_mod_mask(int c); 69int simplify_key(int key, int *modifiers); 70int handle_x_keys(int key); 71char_u *get_special_key_name(int c, int modifiers); 72int trans_special(char_u **srcp, char_u *dst, int keycode, int in_string); 73int find_special_key(char_u **srcp, int *modp, int keycode, int keep_x_key, int in_string); 74int extract_modifiers(int key, int *modp); 75int find_special_key_in_table(int c); 76int get_special_key_code(char_u *name); 77char_u *get_key_name(int i); 78int get_mouse_button(int code, int *is_click, int *is_drag); 79int get_pseudo_mouse_code(int button, int is_click, int is_drag); 80int get_fileformat(buf_T *buf); 81int get_fileformat_force(buf_T *buf, exarg_T *eap); 82void set_fileformat(int t, int opt_flags); 83int default_fileformat(void); 84int call_shell(char_u *cmd, int opt); 85int get_real_state(void); 86int after_pathsep(char_u *b, char_u *p); 87int same_directory(char_u *f1, char_u *f2); 88int vim_chdirfile(char_u *fname, char *trigger_autocmd); 89int vim_stat(const char *name, stat_T *stp); 90char *parse_shape_opt(int what); 91int get_shape_idx(int mouse); 92void update_mouseshape(int shape_idx); 93void *vim_findfile_init(char_u *path, char_u *filename, char_u *stopdirs, int level, int free_visited, int find_what, void *search_ctx_arg, int tagfile, char_u *rel_fname); 94char_u *vim_findfile_stopdir(char_u *buf); 95void vim_findfile_cleanup(void *ctx); 96char_u *vim_findfile(void *search_ctx_arg); 97void vim_findfile_free_visited(void *search_ctx_arg); 98char_u *find_file_in_path(char_u *ptr, int len, int options, int first, char_u *rel_fname); 99char_u *find_directory_in_path(char_u *ptr, int len, int options, char_u *rel_fname); 100char_u *find_file_in_path_option(char_u *ptr, int len, int options, int first, char_u *path_option, int find_what, char_u *rel_fname, char_u *suffixes); 101int vim_chdir(char_u *new_dir); 102int get_user_name(char_u *buf, int len); 103void sort_strings(char_u **files, int count); 104int pathcmp(const char *p, const char *q, int maxlen); 105int filewritable(char_u *fname); 106int get2c(FILE *fd); 107int get3c(FILE *fd); 108int get4c(FILE *fd); 109time_T get8ctime(FILE *fd); 110char_u *read_string(FILE *fd, int cnt); 111int put_bytes(FILE *fd, long_u nr, int len); 112int put_time(FILE *fd, time_T the_time); 113void time_to_bytes(time_T the_time, char_u *buf); 114int has_non_ascii(char_u *s); 115void parse_queued_messages(void); 116int mch_parse_cmd(char_u *cmd, int use_shcf, char ***argv, int *argc); 117int build_argv_from_string(char_u *cmd, char ***argv, int *argc); 118int build_argv_from_list(list_T *l, char ***argv, int *argc); 119/* vim: set ft=c : */ 120