comparison src/fileio.c @ 7801:a1e71a01dbd6 v7.4.1197

commit https://github.com/vim/vim/commit/d25c16e2f2776d50245bf31d6e4d5364f12d188e Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jan 29 22:13:30 2016 +0100 patch 7.4.1197 Problem: Still using __ARGS. Solution: Remove __ARGS in several files. (script by Hirohito Higashi)
author Christian Brabandt <cb@256bit.org>
date Fri, 29 Jan 2016 22:15:05 +0100
parents 9c5e8254ea6b
children f86adafb28d4
comparison
equal deleted inserted replaced
7800:a835f2222ce6 7801:a1e71a01dbd6
30 #if (defined(sun) || defined(__FreeBSD__)) && defined(S_ISCHR) 30 #if (defined(sun) || defined(__FreeBSD__)) && defined(S_ISCHR)
31 # define OPEN_CHR_FILES 31 # define OPEN_CHR_FILES
32 static int is_dev_fd_file(char_u *fname); 32 static int is_dev_fd_file(char_u *fname);
33 #endif 33 #endif
34 #ifdef FEAT_MBYTE 34 #ifdef FEAT_MBYTE
35 static char_u *next_fenc __ARGS((char_u **pp)); 35 static char_u *next_fenc(char_u **pp);
36 # ifdef FEAT_EVAL 36 # ifdef FEAT_EVAL
37 static char_u *readfile_charconvert __ARGS((char_u *fname, char_u *fenc, int *fdp)); 37 static char_u *readfile_charconvert(char_u *fname, char_u *fenc, int *fdp);
38 # endif 38 # endif
39 #endif 39 #endif
40 #ifdef FEAT_VIMINFO 40 #ifdef FEAT_VIMINFO
41 static void check_marks_read __ARGS((void)); 41 static void check_marks_read(void);
42 #endif 42 #endif
43 #ifdef FEAT_CRYPT 43 #ifdef FEAT_CRYPT
44 static char_u *check_for_cryptkey __ARGS((char_u *cryptkey, char_u *ptr, long *sizep, off_t *filesizep, int newfile, char_u *fname, int *did_ask)); 44 static char_u *check_for_cryptkey(char_u *cryptkey, char_u *ptr, long *sizep, off_t *filesizep, int newfile, char_u *fname, int *did_ask);
45 #endif 45 #endif
46 #ifdef UNIX 46 #ifdef UNIX
47 static void set_file_time __ARGS((char_u *fname, time_t atime, time_t mtime)); 47 static void set_file_time(char_u *fname, time_t atime, time_t mtime);
48 #endif 48 #endif
49 static int set_rw_fname __ARGS((char_u *fname, char_u *sfname)); 49 static int set_rw_fname(char_u *fname, char_u *sfname);
50 static int msg_add_fileformat __ARGS((int eol_type)); 50 static int msg_add_fileformat(int eol_type);
51 static void msg_add_eol __ARGS((void)); 51 static void msg_add_eol(void);
52 static int check_mtime __ARGS((buf_T *buf, struct stat *s)); 52 static int check_mtime(buf_T *buf, struct stat *s);
53 static int time_differs __ARGS((long t1, long t2)); 53 static int time_differs(long t1, long t2);
54 #ifdef FEAT_AUTOCMD 54 #ifdef FEAT_AUTOCMD
55 static int apply_autocmds_exarg __ARGS((event_T event, char_u *fname, char_u *fname_io, int force, buf_T *buf, exarg_T *eap)); 55 static int apply_autocmds_exarg(event_T event, char_u *fname, char_u *fname_io, int force, buf_T *buf, exarg_T *eap);
56 static int au_find_group __ARGS((char_u *name)); 56 static int au_find_group(char_u *name);
57 57
58 # define AUGROUP_DEFAULT -1 /* default autocmd group */ 58 # define AUGROUP_DEFAULT -1 /* default autocmd group */
59 # define AUGROUP_ERROR -2 /* erroneous autocmd group */ 59 # define AUGROUP_ERROR -2 /* erroneous autocmd group */
60 # define AUGROUP_ALL -3 /* all autocmd groups */ 60 # define AUGROUP_ALL -3 /* all autocmd groups */
61 #endif 61 #endif
117 iconv_t bw_iconv_fd; /* descriptor for iconv() or -1 */ 117 iconv_t bw_iconv_fd; /* descriptor for iconv() or -1 */
118 # endif 118 # endif
119 #endif 119 #endif
120 }; 120 };
121 121
122 static int buf_write_bytes __ARGS((struct bw_info *ip)); 122 static int buf_write_bytes(struct bw_info *ip);
123 123
124 #ifdef FEAT_MBYTE 124 #ifdef FEAT_MBYTE
125 static linenr_T readfile_linenr __ARGS((linenr_T linecnt, char_u *p, char_u *endp)); 125 static linenr_T readfile_linenr(linenr_T linecnt, char_u *p, char_u *endp);
126 static int ucs2bytes __ARGS((unsigned c, char_u **pp, int flags)); 126 static int ucs2bytes(unsigned c, char_u **pp, int flags);
127 static int need_conversion __ARGS((char_u *fenc)); 127 static int need_conversion(char_u *fenc);
128 static int get_fio_flags __ARGS((char_u *ptr)); 128 static int get_fio_flags(char_u *ptr);
129 static char_u *check_for_bom __ARGS((char_u *p, long size, int *lenp, int flags)); 129 static char_u *check_for_bom(char_u *p, long size, int *lenp, int flags);
130 static int make_bom __ARGS((char_u *buf, char_u *name)); 130 static int make_bom(char_u *buf, char_u *name);
131 # ifdef WIN3264 131 # ifdef WIN3264
132 static int get_win_fio_flags __ARGS((char_u *ptr)); 132 static int get_win_fio_flags(char_u *ptr);
133 # endif 133 # endif
134 # ifdef MACOS_X 134 # ifdef MACOS_X
135 static int get_mac_fio_flags __ARGS((char_u *ptr)); 135 static int get_mac_fio_flags(char_u *ptr);
136 # endif 136 # endif
137 #endif 137 #endif
138 static int move_lines __ARGS((buf_T *frombuf, buf_T *tobuf)); 138 static int move_lines(buf_T *frombuf, buf_T *tobuf);
139 #ifdef TEMPDIRNAMES 139 #ifdef TEMPDIRNAMES
140 static void vim_settempdir __ARGS((char_u *tempdir)); 140 static void vim_settempdir(char_u *tempdir);
141 #endif 141 #endif
142 #ifdef FEAT_AUTOCMD 142 #ifdef FEAT_AUTOCMD
143 static char *e_auchangedbuf = N_("E812: Autocommands changed buffer or buffer name"); 143 static char *e_auchangedbuf = N_("E812: Autocommands changed buffer or buffer name");
144 #endif 144 #endif
145 145
7809 */ 7809 */
7810 static int current_augroup = AUGROUP_DEFAULT; 7810 static int current_augroup = AUGROUP_DEFAULT;
7811 7811
7812 static int au_need_clean = FALSE; /* need to delete marked patterns */ 7812 static int au_need_clean = FALSE; /* need to delete marked patterns */
7813 7813
7814 static void show_autocmd __ARGS((AutoPat *ap, event_T event)); 7814 static void show_autocmd(AutoPat *ap, event_T event);
7815 static void au_remove_pat __ARGS((AutoPat *ap)); 7815 static void au_remove_pat(AutoPat *ap);
7816 static void au_remove_cmds __ARGS((AutoPat *ap)); 7816 static void au_remove_cmds(AutoPat *ap);
7817 static void au_cleanup __ARGS((void)); 7817 static void au_cleanup(void);
7818 static int au_new_group __ARGS((char_u *name)); 7818 static int au_new_group(char_u *name);
7819 static void au_del_group __ARGS((char_u *name)); 7819 static void au_del_group(char_u *name);
7820 static event_T event_name2nr __ARGS((char_u *start, char_u **end)); 7820 static event_T event_name2nr(char_u *start, char_u **end);
7821 static char_u *event_nr2name __ARGS((event_T event)); 7821 static char_u *event_nr2name(event_T event);
7822 static char_u *find_end_event __ARGS((char_u *arg, int have_group)); 7822 static char_u *find_end_event(char_u *arg, int have_group);
7823 static int event_ignored __ARGS((event_T event)); 7823 static int event_ignored(event_T event);
7824 static int au_get_grouparg __ARGS((char_u **argp)); 7824 static int au_get_grouparg(char_u **argp);
7825 static int do_autocmd_event __ARGS((event_T event, char_u *pat, int nested, char_u *cmd, int forceit, int group)); 7825 static int do_autocmd_event(event_T event, char_u *pat, int nested, char_u *cmd, int forceit, int group);
7826 static int apply_autocmds_group __ARGS((event_T event, char_u *fname, char_u *fname_io, int force, int group, buf_T *buf, exarg_T *eap)); 7826 static int apply_autocmds_group(event_T event, char_u *fname, char_u *fname_io, int force, int group, buf_T *buf, exarg_T *eap);
7827 static void auto_next_pat __ARGS((AutoPatCmd *apc, int stop_at_last)); 7827 static void auto_next_pat(AutoPatCmd *apc, int stop_at_last);
7828 #if defined(FEAT_AUTOCMD) || defined(FEAT_WILDIGN) 7828 #if defined(FEAT_AUTOCMD) || defined(FEAT_WILDIGN)
7829 static int match_file_pat __ARGS((char_u *pattern, regprog_T **prog, char_u *fname, char_u *sfname, char_u *tail, int allow_dirs)); 7829 static int match_file_pat(char_u *pattern, regprog_T **prog, char_u *fname, char_u *sfname, char_u *tail, int allow_dirs);
7830 #endif 7830 #endif
7831 7831
7832 7832
7833 static event_T last_event; 7833 static event_T last_event;
7834 static int last_group; 7834 static int last_group;