diff options
-rw-r--r-- | src/gui_x11.c | 40 | ||||
-rw-r--r-- | src/hangulin.c | 8 | ||||
-rw-r--r-- | src/hardcopy.c | 102 | ||||
-rw-r--r-- | src/hashtab.c | 2 | ||||
-rw-r--r-- | src/if_cscope.c | 72 | ||||
-rw-r--r-- | src/if_python3.c | 2 | ||||
-rw-r--r-- | src/if_sniff.c | 30 | ||||
-rw-r--r-- | src/if_xcmdsrv.c | 32 | ||||
-rw-r--r-- | src/main.c | 48 | ||||
-rw-r--r-- | src/mark.c | 14 | ||||
-rw-r--r-- | src/mbyte.c | 36 | ||||
-rw-r--r-- | src/memfile.c | 44 | ||||
-rw-r--r-- | src/memfile_test.c | 2 | ||||
-rw-r--r-- | src/memline.c | 54 | ||||
-rw-r--r-- | src/menu.c | 50 | ||||
-rw-r--r-- | src/message.c | 222 | ||||
-rw-r--r-- | src/misc1.c | 124 | ||||
-rw-r--r-- | src/misc2.c | 50 | ||||
-rw-r--r-- | src/move.c | 24 | ||||
-rw-r--r-- | src/netbeans.c | 46 | ||||
-rw-r--r-- | src/normal.c | 246 | ||||
-rw-r--r-- | src/version.c | 2 |
22 files changed, 560 insertions, 690 deletions
diff --git a/src/gui_x11.c b/src/gui_x11.c index 18a580590f..01e9394b8a 100644 --- a/src/gui_x11.c +++ b/src/gui_x11.c @@ -123,9 +123,9 @@ static XFontSet current_fontset = NULL; XDrawImageString16(dpy, win, gc, x, y, (XChar2b *)str, n); \ } while (0) -static int check_fontset_sanity __ARGS((XFontSet fs)); -static int fontset_width __ARGS((XFontSet fs)); -static int fontset_ascent __ARGS((XFontSet fs)); +static int check_fontset_sanity(XFontSet fs); +static int fontset_width(XFontSet fs); +static int fontset_ascent(XFontSet fs); #endif static guicolor_T prev_fg_color = INVALCOLOR; @@ -136,26 +136,26 @@ static guicolor_T prev_sp_color = INVALCOLOR; static XButtonPressedEvent last_mouse_event; #endif -static int find_closest_color __ARGS((Colormap colormap, XColor *colorPtr)); -static void gui_x11_timer_cb __ARGS((XtPointer timed_out, XtIntervalId *interval_id)); -static void gui_x11_visibility_cb __ARGS((Widget w, XtPointer dud, XEvent *event, Boolean *dum)); -static void gui_x11_expose_cb __ARGS((Widget w, XtPointer dud, XEvent *event, Boolean *dum)); -static void gui_x11_resize_window_cb __ARGS((Widget w, XtPointer dud, XEvent *event, Boolean *dum)); -static void gui_x11_focus_change_cb __ARGS((Widget w, XtPointer data, XEvent *event, Boolean *dum)); -static void gui_x11_enter_cb __ARGS((Widget w, XtPointer data, XEvent *event, Boolean *dum)); -static void gui_x11_leave_cb __ARGS((Widget w, XtPointer data, XEvent *event, Boolean *dum)); -static void gui_x11_mouse_cb __ARGS((Widget w, XtPointer data, XEvent *event, Boolean *dum)); +static int find_closest_color(Colormap colormap, XColor *colorPtr); +static void gui_x11_timer_cb(XtPointer timed_out, XtIntervalId *interval_id); +static void gui_x11_visibility_cb(Widget w, XtPointer dud, XEvent *event, Boolean *dum); +static void gui_x11_expose_cb(Widget w, XtPointer dud, XEvent *event, Boolean *dum); +static void gui_x11_resize_window_cb(Widget w, XtPointer dud, XEvent *event, Boolean *dum); +static void gui_x11_focus_change_cb(Widget w, XtPointer data, XEvent *event, Boolean *dum); +static void gui_x11_enter_cb(Widget w, XtPointer data, XEvent *event, Boolean *dum); +static void gui_x11_leave_cb(Widget w, XtPointer data, XEvent *event, Boolean *dum); +static void gui_x11_mouse_cb(Widget w, XtPointer data, XEvent *event, Boolean *dum); #ifdef FEAT_SNIFF -static void gui_x11_sniff_request_cb __ARGS((XtPointer closure, int *source, XtInputId *id)); +static void gui_x11_sniff_request_cb(XtPointer closure, int *source, XtInputId *id); #endif -static void gui_x11_check_copy_area __ARGS((void)); +static void gui_x11_check_copy_area(void); #ifdef FEAT_CLIENTSERVER -static void gui_x11_send_event_handler __ARGS((Widget, XtPointer, XEvent *, Boolean *)); +static void gui_x11_send_event_handler(Widget, XtPointer, XEvent *, Boolean *); #endif -static void gui_x11_wm_protocol_handler __ARGS((Widget, XtPointer, XEvent *, Boolean *)); -static void gui_x11_blink_cb __ARGS((XtPointer timed_out, XtIntervalId *interval_id)); -static Cursor gui_x11_create_blank_mouse __ARGS((void)); -static void draw_curl __ARGS((int row, int col, int cells)); +static void gui_x11_wm_protocol_handler(Widget, XtPointer, XEvent *, Boolean *); +static void gui_x11_blink_cb(XtPointer timed_out, XtIntervalId *interval_id); +static Cursor gui_x11_create_blank_mouse(void); +static void draw_curl(int row, int col, int cells); /* @@ -1312,7 +1312,7 @@ gui_mch_init_check() */ static XtInputId _xsmp_xtinputid; -static void local_xsmp_handle_requests __ARGS((XtPointer c, int *s, XtInputId *i)); +static void local_xsmp_handle_requests(XtPointer c, int *s, XtInputId *i); static void local_xsmp_handle_requests(c, s, i) diff --git a/src/hangulin.c b/src/hangulin.c index 4e1a7f8014..540161ad08 100644 --- a/src/hangulin.c +++ b/src/hangulin.c @@ -35,10 +35,10 @@ static char_u stack[20] = {0}; static int last_l = -1, last_ll = -1; static int hangul_keyboard_type = HANGUL_DEFAULT_KEYBOARD; -static void convert_ks_to_3 __ARGS((const char_u *src, int *fp, int *mp, int *lp)); -static int convert_3_to_ks __ARGS((int fv, int mv, int lv, char_u *des)); -static int hangul_automata2 __ARGS((char_u *buf, unsigned int *c)); -static int hangul_automata3 __ARGS((char_u *buf, unsigned int *c)); +static void convert_ks_to_3(const char_u *src, int *fp, int *mp, int *lp); +static int convert_3_to_ks(int fv, int mv, int lv, char_u *des); +static int hangul_automata2(char_u *buf, unsigned int *c); +static int hangul_automata3(char_u *buf, unsigned int *c); #define push(x) {stack[ sp++ ] = *(x); stack[sp++] = *((x)+1);} #define pop(x) {*((x) + 1) = stack[--sp]; *(x) = stack[--sp];} diff --git a/src/hardcopy.c b/src/hardcopy.c index def619f3e5..235b46b2fa 100644 --- a/src/hardcopy.c +++ b/src/hardcopy.c @@ -135,21 +135,21 @@ typedef struct int ff; /* seen form feed character */ } prt_pos_T; -static char_u *parse_list_options __ARGS((char_u *option_str, option_table_T *table, int table_size)); +static char_u *parse_list_options(char_u *option_str, option_table_T *table, int table_size); #ifdef FEAT_SYN_HL -static long_u darken_rgb __ARGS((long_u rgb)); -static long_u prt_get_term_color __ARGS((int colorindex)); +static long_u darken_rgb(long_u rgb); +static long_u prt_get_term_color(int colorindex); #endif -static void prt_set_fg __ARGS((long_u fg)); -static void prt_set_bg __ARGS((long_u bg)); -static void prt_set_font __ARGS((int bold, int italic, int underline)); -static void prt_line_number __ARGS((prt_settings_T *psettings, int page_line, linenr_T lnum)); -static void prt_header __ARGS((prt_settings_T *psettings, int pagenum, linenr_T lnum)); -static void prt_message __ARGS((char_u *s)); -static colnr_T hardcopy_line __ARGS((prt_settings_T *psettings, int page_line, prt_pos_T *ppos)); +static void prt_set_fg(long_u fg); +static void prt_set_bg(long_u bg); +static void prt_set_font(int bold, int italic, int underline); +static void prt_line_number(prt_settings_T *psettings, int page_line, linenr_T lnum); +static void prt_header(prt_settings_T *psettings, int pagenum, linenr_T lnum); +static void prt_message(char_u *s); +static colnr_T hardcopy_line(prt_settings_T *psettings, int page_line, prt_pos_T *ppos); #ifdef FEAT_SYN_HL -static void prt_get_attr __ARGS((int hl_id, prt_text_attr_T* pattr, int modec)); +static void prt_get_attr(int hl_id, prt_text_attr_T* pattr, int modec); #endif /* @@ -1337,47 +1337,47 @@ static struct prt_dsc_comment_S prt_dsc_table[] = PRT_DSC_ENDCOMMENTS_TYPE} }; -static void prt_write_file_raw_len __ARGS((char_u *buffer, int bytes)); -static void prt_write_file __ARGS((char_u *buffer)); -static void prt_write_file_len __ARGS((char_u *buffer, int bytes)); -static void prt_write_string __ARGS((char *s)); -static void prt_write_int __ARGS((int i)); -static void prt_write_boolean __ARGS((int b)); -static void prt_def_font __ARGS((char *new_name, char *encoding, int height, char *font)); -static void prt_real_bits __ARGS((double real, int precision, int *pinteger, int *pfraction)); -static void prt_write_real __ARGS((double val, int prec)); -static void prt_def_var __ARGS((char *name, double value, int prec)); -static void prt_flush_buffer __ARGS((void)); -static void prt_resource_name __ARGS((char_u *filename, void *cookie)); -static int prt_find_resource __ARGS((char *name, struct prt_ps_resource_S *resource)); -static int prt_open_resource __ARGS((struct prt_ps_resource_S *resource)); -static int prt_check_resource __ARGS((struct prt_ps_resource_S *resource, char_u *version)); -static void prt_dsc_start __ARGS((void)); -static void prt_dsc_noarg __ARGS((char *comment)); -static void prt_dsc_textline __ARGS((char *comment, char *text)); -static void prt_dsc_text __ARGS((char *comment, char *text)); -static void prt_dsc_ints __ARGS((char *comment, int count, int *ints)); -static void prt_dsc_requirements __ARGS((int duplex, int tumble, int collate, int color, int num_copies)); -static void prt_dsc_docmedia __ARGS((char *paper_name, double width, double height, double weight, char *colour, char *type)); -static void prt_dsc_resources __ARGS((char *comment, char *type, char *strings)); -static void prt_dsc_font_resource __ARGS((char *resource, struct prt_ps_font_S *ps_font)); -static float to_device_units __ARGS((int idx, double physsize, int def_number)); -static void prt_page_margins __ARGS((double width, double height, double *left, double *right, double *top, double *bottom)); -static void prt_font_metrics __ARGS((int font_scale)); -static int prt_get_cpl __ARGS((void)); -static int prt_get_lpp __ARGS((void)); -static int prt_add_resource __ARGS((struct prt_ps_resource_S *resource)); -static int prt_resfile_next_line __ARGS((void)); -static int prt_resfile_strncmp __ARGS((int offset, char *string, int len)); -static int prt_resfile_skip_nonws __ARGS((int offset)); -static int prt_resfile_skip_ws __ARGS((int offset)); -static int prt_next_dsc __ARGS((struct prt_dsc_line_S *p_dsc_line)); +static void prt_write_file_raw_len(char_u *buffer, int bytes); +static void prt_write_file(char_u *buffer); +static void prt_write_file_len(char_u *buffer, int bytes); +static void prt_write_string(char *s); +static void prt_write_int(int i); +static void prt_write_boolean(int b); +static void prt_def_font(char *new_name, char *encoding, int height, char *font); +static void prt_real_bits(double real, int precision, int *pinteger, int *pfraction); +static void prt_write_real(double val, int prec); +static void prt_def_var(char *name, double value, int prec); +static void prt_flush_buffer(void); +static void prt_resource_name(char_u *filename, void *cookie); +static int prt_find_resource(char *name, struct prt_ps_resource_S *resource); +static int prt_open_resource(struct prt_ps_resource_S *resource); +static int prt_check_resource(struct prt_ps_resource_S *resource, char_u *version); +static void prt_dsc_start(void); +static void prt_dsc_noarg(char *comment); +static void prt_dsc_textline(char *comment, char *text); +static void prt_dsc_text(char *comment, char *text); +static void prt_dsc_ints(char *comment, int count, int *ints); +static void prt_dsc_requirements(int duplex, int tumble, int collate, int color, int num_copies); +static void prt_dsc_docmedia(char *paper_name, double width, double height, double weight, char *colour, char *type); +static void prt_dsc_resources(char *comment, char *type, char *strings); +static void prt_dsc_font_resource(char *resource, struct prt_ps_font_S *ps_font); +static float to_device_units(int idx, double physsize, int def_number); +static void prt_page_margins(double width, double height, double *left, double *right, double *top, double *bottom); +static void prt_font_metrics(int font_scale); +static int prt_get_cpl(void); +static int prt_get_lpp(void); +static int prt_add_resource(struct prt_ps_resource_S *resource); +static int prt_resfile_next_line(void); +static int prt_resfile_strncmp(int offset, char *string, int len); +static int prt_resfile_skip_nonws(int offset); +static int prt_resfile_skip_ws(int offset); +static int prt_next_dsc(struct prt_dsc_line_S *p_dsc_line); #ifdef FEAT_MBYTE -static int prt_build_cid_fontname __ARGS((int font, char_u *name, int name_len)); -static void prt_def_cidfont __ARGS((char *new_name, int height, char *cidfont)); -static void prt_dup_cidfont __ARGS((char *original_name, char *new_name)); -static int prt_match_encoding __ARGS((char *p_encoding, struct prt_ps_mbfont_S *p_cmap, struct prt_ps_encoding_S **pp_mbenc)); -static int prt_match_charset __ARGS((char *p_charset, struct prt_ps_mbfont_S *p_cmap, struct prt_ps_charset_S **pp_mbchar)); +static int prt_build_cid_fontname(int font, char_u *name, int name_len); +static void prt_def_cidfont(char *new_name, int height, char *cidfont); +static void prt_dup_cidfont(char *original_name, char *new_name); +static int prt_match_encoding(char *p_encoding, struct prt_ps_mbfont_S *p_cmap, struct prt_ps_encoding_S **pp_mbenc); +static int prt_match_charset(char *p_charset, struct prt_ps_mbfont_S *p_cmap, struct prt_ps_charset_S **pp_mbchar); #endif /* diff --git a/src/hashtab.c b/src/hashtab.c index a47fa94b2d..a4bce6503e 100644 --- a/src/hashtab.c +++ b/src/hashtab.c @@ -41,7 +41,7 @@ static long hash_count_perturb = 0; /* count number of "misses" */ /* Magic value for algorithm that walks through the array. */ #define PERTURB_SHIFT 5 -static int hash_may_resize __ARGS((hashtab_T *ht, int minitems)); +static int hash_may_resize(hashtab_T *ht, int minitems); #if 0 /* currently not used */ /* diff --git a/src/if_cscope.c b/src/if_cscope.c index 4c3e2bd316..c6acd17653 100644 --- a/src/if_cscope.c +++ b/src/if_cscope.c @@ -20,43 +20,43 @@ #endif #include "if_cscope.h" -static void cs_usage_msg __ARGS((csid_e x)); -static int cs_add __ARGS((exarg_T *eap)); -static void cs_stat_emsg __ARGS((char *fname)); -static int cs_add_common __ARGS((char *, char *, char *)); -static int cs_check_for_connections __ARGS((void)); -static int cs_check_for_tags __ARGS((void)); -static int cs_cnt_connections __ARGS((void)); -static void cs_reading_emsg __ARGS((int idx)); -static int cs_cnt_matches __ARGS((int idx)); -static char * cs_create_cmd __ARGS((char *csoption, char *pattern)); -static int cs_create_connection __ARGS((int i)); -static void do_cscope_general __ARGS((exarg_T *eap, int make_split)); +static void cs_usage_msg(csid_e x); +static int cs_add(exarg_T *eap); +static void cs_stat_emsg(char *fname); +static int cs_add_common(char *, char *, char *); +static int cs_check_for_connections(void); +static int cs_check_for_tags(void); +static int cs_cnt_connections(void); +static void cs_reading_emsg(int idx); +static int cs_cnt_matches(int idx); +static char * cs_create_cmd(char *csoption, char *pattern); +static int cs_create_connection(int i); +static void do_cscope_general(exarg_T *eap, int make_split); #ifdef FEAT_QUICKFIX -static void cs_file_results __ARGS((FILE *, int *)); +static void cs_file_results(FILE *, int *); #endif -static void cs_fill_results __ARGS((char *, int , int *, char ***, - char ***, int *)); -static int cs_find __ARGS((exarg_T *eap)); -static int cs_find_common __ARGS((char *opt, char *pat, int, int, int, char_u *cmdline)); -static int cs_help __ARGS((exarg_T *eap)); -static void clear_csinfo __ARGS((int i)); -static int cs_insert_filelist __ARGS((char *, char *, char *, - struct stat *)); -static int cs_kill __ARGS((exarg_T *eap)); -static void cs_kill_execute __ARGS((int, char *)); -static cscmd_T * cs_lookup_cmd __ARGS((exarg_T *eap)); -static char * cs_make_vim_style_matches __ARGS((char *, char *, - char *, char *)); -static char * cs_manage_matches __ARGS((char **, char **, int, mcmd_e)); -static char * cs_parse_results __ARGS((int cnumber, char *buf, int bufsize, char **context, char **linenumber, char **search)); -static char * cs_pathcomponents __ARGS((char *path)); -static void cs_print_tags_priv __ARGS((char **, char **, int)); -static int cs_read_prompt __ARGS((int)); -static void cs_release_csp __ARGS((int, int freefnpp)); -static int cs_reset __ARGS((exarg_T *eap)); -static char * cs_resolve_file __ARGS((int, char *)); -static int cs_show __ARGS((exarg_T *eap)); +static void cs_fill_results(char *, int , int *, char ***, + char ***, int *); +static int cs_find(exarg_T *eap); +static int cs_find_common(char *opt, char *pat, int, int, int, char_u *cmdline); +static int cs_help(exarg_T *eap); +static void clear_csinfo(int i); +static int cs_insert_filelist(char *, char *, char *, + struct stat *); +static int cs_kill(exarg_T *eap); +static void cs_kill_execute(int, char *); +static cscmd_T * cs_lookup_cmd(exarg_T *eap); +static char * cs_make_vim_style_matches(char *, char *, + char *, char *); +static char * cs_manage_matches(char **, char **, int, mcmd_e); +static char * cs_parse_results(int cnumber, char *buf, int bufsize, char **context, char **linenumber, char **search); +static char * cs_pathcomponents(char *path); +static void cs_print_tags_priv(char **, char **, int); +static int cs_read_prompt(int); +static void cs_release_csp(int, int freefnpp); +static int cs_reset(exarg_T *eap); +static char * cs_resolve_file(int, char *); +static int cs_show(exarg_T *eap); static csinfo_T * csinfo = NULL; @@ -1405,7 +1405,7 @@ clear_csinfo(i) } #ifndef UNIX -static char *GetWin32Error __ARGS((void)); +static char *GetWin32Error(void); static char * GetWin32Error() diff --git a/src/if_python3.c b/src/if_python3.c index a78fa6b588..ec1754715a 100644 --- a/src/if_python3.c +++ b/src/if_python3.c @@ -692,7 +692,7 @@ python3_enabled(int verbose) /* Load the standard Python exceptions - don't import the symbols from the * DLL, as this can cause errors (importing data symbols is not reliable). */ -static void get_py3_exceptions __ARGS((void)); +static void get_py3_exceptions(void); static void get_py3_exceptions() diff --git a/src/if_sniff.c b/src/if_sniff.c index bfdc68bfa6..14353f26df 100644 --- a/src/if_sniff.c +++ b/src/if_sniff.c @@ -126,21 +126,21 @@ static char *init_cmds[]= { /*-------- Function Prototypes ----------------------------------*/ -static int ConnectToSniffEmacs __ARGS((void)); -static void sniff_connect __ARGS((void)); -static void HandleSniffRequest __ARGS((char* buffer)); -static int get_request __ARGS((int fd, char *buf, int maxlen)); -static void WriteToSniff __ARGS((char *str)); -static void SendRequest __ARGS((struct sn_cmd *command, char* symbol)); -static void vi_msg __ARGS((char *)); -static void vi_error_msg __ARGS((char *)); -static char *vi_symbol_under_cursor __ARGS((void)); -static void vi_open_file __ARGS((char *)); -static char *vi_buffer_name __ARGS((void)); -static buf_T *vi_find_buffer __ARGS((char *)); -static void vi_exec_cmd __ARGS((char *)); -static void vi_set_cursor_pos __ARGS((long char_nr)); -static long vi_cursor_pos __ARGS((void)); +static int ConnectToSniffEmacs(void); +static void sniff_connect(void); +static void HandleSniffRequest(char* buffer); +static int get_request(int fd, char *buf, int maxlen); +static void WriteToSniff(char *str); +static void SendRequest(struct sn_cmd *command, char* symbol); +static void vi_msg(char *); +static void vi_error_msg(char *); +static char *vi_symbol_under_cursor(void); +static void vi_open_file(char *); +static char *vi_buffer_name(void); +static buf_T *vi_find_buffer(char *); +static void vi_exec_cmd(char *); +static void vi_set_cursor_pos(long char_nr); +static long vi_cursor_pos(void); /* debug trace */ #if 0 diff --git a/src/if_xcmdsrv.c b/src/if_xcmdsrv.c index b1fbdaa35d..a758f2b56d 100644 --- a/src/if_xcmdsrv.c +++ b/src/if_xcmdsrv.c @@ -167,7 +167,7 @@ struct ServerReply static garray_T serverReply = { 0, 0, 0, 0, 0 }; enum ServerReplyOp { SROP_Find, SROP_Add, SROP_Delete }; -typedef int (*EndCond) __ARGS((void *)); +typedef int (*EndCond)(void *); struct x_cmdqueue { @@ -186,21 +186,21 @@ static x_queue_T head = {NULL, 0, NULL, NULL}; * Forward declarations for procedures defined later in this file: */ -static Window LookupName __ARGS((Display *dpy, char_u *name, int delete, char_u **loose)); -static int SendInit __ARGS((Display *dpy)); -static int DoRegisterName __ARGS((Display *dpy, char_u *name)); -static void DeleteAnyLingerer __ARGS((Display *dpy, Window w)); -static int GetRegProp __ARGS((Display *dpy, char_u **regPropp, long_u *numItemsp, int domsg)); -static int WaitForPend __ARGS((void *p)); -static int WaitForReply __ARGS((void *p)); -static int WindowValid __ARGS((Display *dpy, Window w)); -static void ServerWait __ARGS((Display *dpy, Window w, EndCond endCond, void *endData, int localLoop, int seconds)); -static struct ServerReply *ServerReplyFind __ARGS((Window w, enum ServerReplyOp op)); -static int AppendPropCarefully __ARGS((Display *display, Window window, Atom property, char_u *value, int length)); -static int x_error_check __ARGS((Display *dpy, XErrorEvent *error_event)); -static int IsSerialName __ARGS((char_u *name)); -static void save_in_queue __ARGS((char_u *buf, long_u len)); -static void server_parse_message __ARGS((Display *dpy, char_u *propInfo, long_u numItems)); +static Window LookupName(Display *dpy, char_u *name, int delete, char_u **loose); +static int SendInit(Display *dpy); +static int DoRegisterName(Display *dpy, char_u *name); +static void DeleteAnyLingerer(Display *dpy, Window w); +static int GetRegProp(Display *dpy, char_u **regPropp, long_u *numItemsp, int domsg); +static int WaitForPend(void *p); +static int WaitForReply(void *p); +static int WindowValid(Display *dpy, Window w); +static void ServerWait(Display *dpy, Window w, EndCond endCond, void *endData, int localLoop, int seconds); +static struct ServerReply *ServerReplyFind(Window w, enum ServerReplyOp op); +static int AppendPropCarefully(Display *display, Window window, Atom property, char_u *value, int length); +static int x_error_check(Display *dpy, XErrorEvent *error_event); +static int IsSerialName(char_u *name); +static void save_in_queue(char_u *buf, long_u len); +static void server_parse_message(Display *dpy, char_u *propInfo, long_u numItems); /* Private variables for the "server" functionality */ static Atom registryProperty = None; diff --git a/src/main.c b/src/main.c index e872e3aa7d..dcc8274fd9 100644 --- a/src/main.c +++ b/src/main.c @@ -94,37 +94,37 @@ typedef struct #define EDIT_QF 4 /* start in quickfix mode */ #if (defined(UNIX) || defined(VMS)) && !defined(NO_VIM_MAIN) -static int file_owned __ARGS((char *fname)); +static int file_owned(char *fname); #endif -static void mainerr __ARGS((int, char_u *)); +static void mainerr(int, char_u *); #ifndef NO_VIM_MAIN -static void main_msg __ARGS((char *s)); -static void usage __ARGS((void)); -static int get_number_arg __ARGS((char_u *p, int *idx, int def)); +static void main_msg(char *s); +static void usage(void); +static int get_number_arg(char_u *p, int *idx, int def); # if defined(HAVE_LOCALE_H) || defined(X_LOCALE) -static void init_locale __ARGS((void)); +static void init_locale(void); # endif -static void parse_command_name __ARGS((mparm_T *parmp)); -static void early_arg_scan __ARGS((mparm_T *parmp)); -static void command_line_scan __ARGS((mparm_T *parmp)); -static void check_tty __ARGS((mparm_T *parmp)); -static void read_stdin __ARGS((void)); -static void create_windows __ARGS((mparm_T *parmp)); +static void parse_command_name(mparm_T *parmp); +static void early_arg_scan(mparm_T *parmp); +static void command_line_scan(mparm_T *parmp); +static void check_tty(mparm_T *parmp); +static void read_stdin(void); +static void create_windows(mparm_T *parmp); # ifdef FEAT_WINDOWS -static void edit_buffers __ARGS((mparm_T *parmp, char_u *cwd)); +static void edit_buffers(mparm_T *parmp, char_u *cwd); # endif -static void exe_pre_commands __ARGS((mparm_T *parmp)); -static void exe_commands __ARGS((mparm_T *parmp)); -static void source_startup_scripts __ARGS((mparm_T *parmp)); -static void main_start_gui __ARGS((void)); +static void exe_pre_commands(mparm_T *parmp); +static void exe_commands(mparm_T *parmp); +static void source_startup_scripts(mparm_T *parmp); +static void main_start_gui(void); # if defined(HAS_SWAP_EXISTS_ACTION) -static void check_swap_exists_action __ARGS((void)); +static void check_swap_exists_action(void); # endif # if defined(FEAT_CLIENTSERVER) || defined(PROTO) -static void exec_on_server __ARGS((mparm_T *parmp)); -static void prepare_server __ARGS((mparm_T *parmp)); -static void cmdsrv_main __ARGS((int *argc, char **argv, char_u *serverName_arg, char_u **serverStr)); -static char_u *serverMakeName __ARGS((char_u *arg, char *cmd)); +static void exec_on_server(mparm_T *parmp); +static void prepare_server(mparm_T *parmp); +static void cmdsrv_main(int *argc, char **argv, char_u *serverName_arg, char_u **serverStr); +static char_u *serverMakeName(char_u *arg, char *cmd); # endif #endif @@ -3442,7 +3442,7 @@ check_swap_exists_action() #endif #if defined(STARTUPTIME) || defined(PROTO) -static void time_diff __ARGS((struct timeval *then, struct timeval *now)); +static void time_diff(struct timeval *then, struct timeval *now); static struct timeval prev_timeval; @@ -3556,7 +3556,7 @@ time_msg(mesg, tv_start) * Common code for the X command server and the Win32 command server. */ -static char_u *build_drop_cmd __ARGS((int filec, char **filev, int tabs, int sendReply)); +static char_u *build_drop_cmd(int filec, char **filev, int tabs, int sendReply); /* * Do the client-server stuff, unless "--servername ''" was used. diff --git a/src/mark.c b/src/mark.c index ef9ddc07ea..284fedfebd 100644 --- a/src/mark.c +++ b/src/mark.c @@ -27,15 +27,15 @@ #define EXTRA_MARKS 10 /* marks 0-9 */ static xfmark_T namedfm[NMARKS + EXTRA_MARKS]; /* marks with file nr */ -static void fname2fnum __ARGS((xfmark_T *fm)); -static void fmarks_check_one __ARGS((xfmark_T *fm, char_u *name, buf_T *buf)); -static char_u *mark_line __ARGS((pos_T *mp, int lead_len)); -static void show_one_mark __ARGS((int, char_u *, pos_T *, char_u *, int current)); +static void fname2fnum(xfmark_T *fm); +static void fmarks_check_one(xfmark_T *fm, char_u *name, buf_T *buf); +static char_u *mark_line(pos_T *mp, int lead_len); +static void show_one_mark(int, char_u *, pos_T *, char_u *, int current); #ifdef FEAT_JUMPLIST -static void cleanup_jumplist __ARGS((void)); +static void cleanup_jumplist(void); #endif #ifdef FEAT_VIMINFO -static void write_one_filemark __ARGS((FILE *fp, xfmark_T *fm, int c1, int c2)); +static void write_one_filemark(FILE *fp, xfmark_T *fm, int c1, int c2); #endif /* @@ -1558,7 +1558,7 @@ removable(name) return retval; } -static void write_one_mark __ARGS((FILE *fp_out, int c, pos_T *pos)); +static void write_one_mark(FILE *fp_out, int c, pos_T *pos); /* * Write all the named marks for all buffers. diff --git a/src/mbyte.c b/src/mbyte.c index 0e4b7e495b..01906eb2f9 100644 --- a/src/mbyte.c +++ b/src/mbyte.c @@ -131,16 +131,16 @@ #if defined(FEAT_MBYTE) || defined(PROTO) -static int enc_canon_search __ARGS((char_u *name)); -static int dbcs_char2len __ARGS((int c)); -static int dbcs_char2bytes __ARGS((int c, char_u *buf)); -static int dbcs_ptr2len __ARGS((char_u *p)); -static int dbcs_ptr2len_len __ARGS((char_u *p, int size)); -static int utf_ptr2cells_len __ARGS((char_u *p, int size)); -static int dbcs_char2cells __ARGS((int c)); -static int dbcs_ptr2cells_len __ARGS((char_u *p, int size)); -static int dbcs_ptr2char __ARGS((char_u *p)); -static int utf_safe_read_char_adv __ARGS((char_u **s, size_t *n)); +static int enc_canon_search(char_u *name); +static int dbcs_char2len(int c); +static int dbcs_char2bytes(int c, char_u *buf); +static int dbcs_ptr2len(char_u *p); +static int dbcs_ptr2len_len(char_u *p, int size); +static int utf_ptr2cells_len(char_u *p, int size); +static int dbcs_char2cells(int c); +static int dbcs_ptr2cells_len(char_u *p, int size); +static int dbcs_ptr2char(char_u *p); +static int utf_safe_read_char_adv(char_u **s, size_t *n); /* * Lookup table to quickly get the length in bytes of a UTF-8 character from @@ -1195,7 +1195,7 @@ struct interval long first; long last; }; -static int intable __ARGS((struct interval *table, size_t size, int c)); +static int intable(struct interval *table, size_t size, int c); /* * Return TRUE if "c" is in "table[size / sizeof(struct interval)]". @@ -2827,8 +2827,8 @@ static convertStruct foldCase[] = {0x118a0,0x118bf,1,32} }; -static int utf_convert __ARGS((int a, convertStruct table[], int tableSize)); -static int utf_strnicmp __ARGS((char_u *s1, char_u *s2, size_t n1, size_t n2)); +static int utf_convert(int a, convertStruct table[], int tableSize); +static int utf_strnicmp(char_u *s1, char_u *s2, size_t n1, size_t n2); /* * Generic conversion function for case operations. @@ -4000,7 +4000,7 @@ mb_fix_col(col, row) #endif #if defined(FEAT_MBYTE) || defined(FEAT_POSTSCRIPT) || defined(PROTO) -static int enc_alias_search __ARGS((char_u *name)); +static int enc_alias_search(char_u *name); /* * Skip the Vim specific head of a 'encoding' name. @@ -4226,7 +4226,7 @@ encname2codepage(name) # if defined(USE_ICONV) || defined(PROTO) -static char_u *iconv_string __ARGS((vimconv_T *vcp, char_u *str, int slen, int *unconvlenp, int *resultlenp)); +static char_u *iconv_string(vimconv_T *vcp, char_u *str, int slen, int *unconvlenp, int *resultlenp); /* * Call iconv_open() with a check if iconv() works properly (there are broken @@ -5552,12 +5552,12 @@ static char e_xim[] = N_("E285: Failed to create input context"); # define USE_X11R6_XIM # endif -static int xim_real_init __ARGS((Window x11_window, Display *x11_display)); +static int xim_real_init(Window x11_window, Display *x11_display); #ifdef USE_X11R6_XIM -static void xim_instantiate_cb __ARGS((Display *display, XPointer client_data, XPointer call_data)); -static void xim_destroy_cb __ARGS((XIM im, XPointer client_data, XPointer call_data)); +static void xim_instantiate_cb(Display *display, XPointer client_data, XPointer call_data); +static void xim_destroy_cb(XIM im, XPointer client_data, XPointer call_data); static void xim_instantiate_cb(display, client_data, call_data) diff --git a/src/memfile.c b/src/memfile.c index 5b13d510ea..155c05bf91 100644 --- a/src/memfile.c +++ b/src/memfile.c @@ -69,28 +69,28 @@ extern int dos2; /* this is in os_amiga.c */ static long_u total_mem_used = 0; /* total memory used for memfiles */ -static void mf_ins_hash __ARGS((memfile_T *, bhdr_T *)); -static void mf_rem_hash __ARGS((memfile_T *, bhdr_T *)); -static bhdr_T *mf_find_hash __ARGS((memfile_T *, blocknr_T)); -static void mf_ins_used __ARGS((memfile_T *, bhdr_T *)); -static void mf_rem_used __ARGS((memfile_T *, bhdr_T *)); -static bhdr_T *mf_release __ARGS((memfile_T *, int)); -static bhdr_T *mf_alloc_bhdr __ARGS((memfile_T *, int)); -static void mf_free_bhdr __ARGS((bhdr_T *)); -static void mf_ins_free __ARGS((memfile_T *, bhdr_T *)); -static bhdr_T *mf_rem_free __ARGS((memfile_T *)); -static int mf_read __ARGS((memfile_T *, bhdr_T *)); -static int mf_write __ARGS((memfile_T *, bhdr_T *)); -static int mf_write_block __ARGS((memfile_T *mfp, bhdr_T *hp, off_t offset, unsigned size)); -static int mf_trans_add __ARGS((memfile_T *, bhdr_T *)); -static void mf_do_open __ARGS((memfile_T *, char_u *, int)); -static void mf_hash_init __ARGS((mf_hashtab_T *)); -static void mf_hash_free __ARGS((mf_hashtab_T *)); -static void mf_hash_free_all __ARGS((mf_hashtab_T *)); -static mf_hashitem_T *mf_hash_find __ARGS((mf_hashtab_T *, blocknr_T)); -static void mf_hash_add_item __ARGS((mf_hashtab_T *, mf_hashitem_T *)); -static void mf_hash_rem_item __ARGS((mf_hashtab_T *, mf_hashitem_T *)); -static int mf_hash_grow __ARGS((mf_hashtab_T *)); +static void mf_ins_hash(memfile_T *, bhdr_T *); +static void mf_rem_hash(memfile_T *, bhdr_T *); +static bhdr_T *mf_find_hash(memfile_T *, blocknr_T); +static void mf_ins_used(memfile_T *, bhdr_T *); +static void mf_rem_used(memfile_T *, bhdr_T *); +static bhdr_T *mf_release(memfile_T *, int); +static bhdr_T *mf_alloc_bhdr(memfile_T *, int); +static void mf_free_bhdr(bhdr_T *); +static void mf_ins_free(memfile_T *, bhdr_T *); +static bhdr_T *mf_rem_free(memfile_T *); +static int mf_read(memfile_T *, bhdr_T *); +static int mf_write(memfile_T *, bhdr_T *); +static int mf_write_block(memfile_T *mfp, bhdr_T *hp, off_t offset, unsigned size); +static int mf_trans_add(memfile_T *, bhdr_T *); +static void mf_do_open(memfile_T *, char_u *, int); +static void mf_hash_init(mf_hashtab_T *); +static void mf_hash_free(mf_hashtab_T *); +static void mf_hash_free_all(mf_hashtab_T *); +static mf_hashitem_T *mf_hash_find(mf_hashtab_T *, blocknr_T); +static void mf_hash_add_item(mf_hashtab_T *, mf_hashitem_T *); +static void mf_hash_rem_item(mf_hashtab_T *, mf_hashitem_T *); +static int mf_hash_grow(mf_hashtab_T *); /* * The functions for using a memfile: diff --git a/src/memfile_test.c b/src/memfile_test.c index e9f32b36ea..672d30fd97 100644 --- a/src/memfile_test.c +++ b/src/memfile_test.c @@ -25,7 +25,7 @@ #define index_to_key(i) ((i) ^ 15167) #define TEST_COUNT 50000 -static void test_mf_hash __ARGS((void)); +static void test_mf_hash(void); /* * Test mf_hash_*() functions. diff --git a/src/memline.c b/src/memline.c index 153e4deeb2..34887c31f8 100644 --- a/src/memline.c +++ b/src/memline.c @@ -235,41 +235,41 @@ typedef enum { } upd_block0_T; #ifdef FEAT_CRYPT -static void ml_set_mfp_crypt __ARGS((buf_T *buf)); -static void ml_set_b0_crypt __ARGS((buf_T *buf, ZERO_BL *b0p)); +static void ml_set_mfp_crypt(buf_T *buf); +static void ml_set_b0_crypt(buf_T *buf, ZERO_BL *b0p); #endif -static int ml_check_b0_id __ARGS((ZERO_BL *b0p)); -static void ml_upd_block0 __ARGS((buf_T *buf, upd_block0_T what)); -static void set_b0_fname __ARGS((ZERO_BL *, buf_T *buf)); -static void set_b0_dir_flag __ARGS((ZERO_BL *b0p, buf_T *buf)); +static int ml_check_b0_id(ZERO_BL *b0p); +static void ml_upd_block0(buf_T *buf, upd_block0_T what); +static void set_b0_fname(ZERO_BL *, buf_T *buf); +static void set_b0_dir_flag(ZERO_BL *b0p, buf_T *buf); #ifdef FEAT_MBYTE -static void add_b0_fenc __ARGS((ZERO_BL *b0p, buf_T *buf)); +static void add_b0_fenc(ZERO_BL *b0p, buf_T *buf); #endif -static time_t swapfile_info __ARGS((char_u *)); -static int recov_file_names __ARGS((char_u **, char_u *, int prepend_dot)); -static int ml_append_int __ARGS((buf_T *, linenr_T, char_u *, colnr_T, int, int)); -static int ml_delete_int __ARGS((buf_T *, linenr_T, int)); -static char_u *findswapname __ARGS((buf_T *, char_u **, char_u *)); -static void ml_flush_line __ARGS((buf_T *)); -static bhdr_T *ml_new_data __ARGS((memfile_T *, int, int)); -static bhdr_T *ml_new_ptr __ARGS((memfile_T *)); -static bhdr_T *ml_find_line __ARGS((buf_T *, linenr_T, int)); -static int ml_add_stack __ARGS((buf_T *)); -static v |