Skip to content

Commit d99df42

Browse files
committed
patch 7.4.1200
Problem: Still using __ARGS. Solution: Remove __ARGS in several files. (script by Hirohito Higashi)
1 parent baaa7e9 commit d99df42

30 files changed

+97
-121
lines changed

runtime/tools/xcmdsrv_client.c

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,8 @@
2929
#include <X11/Intrinsic.h>
3030
#include <X11/Xatom.h>
3131

32-
#define __ARGS(x) x
33-
3432
/* Client API */
35-
char * sendToVim __ARGS((Display *dpy, char *name, char *cmd, int asKeys, int *code));
33+
char * sendToVim(Display *dpy, char *name, char *cmd, int asKeys, int *code);
3634

3735
#ifdef MAIN
3836
/* A sample program */
@@ -70,15 +68,15 @@ main(int argc, char **argv)
7068
* Forward declarations for procedures defined later in this file:
7169
*/
7270

73-
static int x_error_check __ARGS((Display *dpy, XErrorEvent *error_event));
74-
static int AppendPropCarefully __ARGS((Display *display,
75-
Window window, Atom property, char *value, int length));
76-
static Window LookupName __ARGS((Display *dpy, char *name,
77-
int delete, char **loose));
78-
static int SendInit __ARGS((Display *dpy));
79-
static char *SendEventProc __ARGS((Display *dpy, XEvent *eventPtr,
80-
int expect, int *code));
81-
static int IsSerialName __ARGS((char *name));
71+
static int x_error_check(Display *dpy, XErrorEvent *error_event);
72+
static int AppendPropCarefully(Display *display,
73+
Window window, Atom property, char *value, int length);
74+
static Window LookupName(Display *dpy, char *name,
75+
int delete, char **loose);
76+
static int SendInit(Display *dpy);
77+
static char *SendEventProc(Display *dpy, XEvent *eventPtr,
78+
int expect, int *code);
79+
static int IsSerialName(char *name);
8280

8381
/* Private variables */
8482
static Atom registryProperty = None;

src/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1660,10 +1660,11 @@ PRO_AUTO = \
16601660
hashtab.pro \
16611661
hangulin.pro \
16621662
if_cscope.pro \
1663-
if_xcmdsrv.pro \
1663+
if_lua.pro \
16641664
if_python.pro \
16651665
if_python3.pro \
16661666
if_ruby.pro \
1667+
if_xcmdsrv.pro \
16671668
json.pro \
16681669
main.pro \
16691670
mark.pro \
@@ -1680,6 +1681,7 @@ PRO_AUTO = \
16801681
option.pro \
16811682
os_unix.pro \
16821683
popupmnu.pro \
1684+
pty.pro \
16831685
quickfix.pro \
16841686
regexp.pro \
16851687
screen.pro \
@@ -1997,6 +1999,7 @@ test_arglist \
19971999
test_cursor_func \
19982000
test_delete \
19992001
test_expand \
2002+
test_glob2regpat \
20002003
test_hardcopy \
20012004
test_increment \
20022005
test_json \

src/blowfish.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ typedef struct {
5656
} bf_state_T;
5757

5858

59-
static void bf_e_block __ARGS((bf_state_T *state, UINT32_T *p_xl, UINT32_T *p_xr));
60-
static void bf_e_cblock __ARGS((bf_state_T *state, char_u *block));
61-
static int bf_check_tables __ARGS((UINT32_T pax[18], UINT32_T sbx[4][256], UINT32_T val));
62-
static int bf_self_test __ARGS((void));
63-
static void bf_key_init __ARGS((bf_state_T *state, char_u *password, char_u *salt, int salt_len));
64-
static void bf_cfb_init __ARGS((bf_state_T *state, char_u *seed, int seed_len));
59+
static void bf_e_block(bf_state_T *state, UINT32_T *p_xl, UINT32_T *p_xr);
60+
static void bf_e_cblock(bf_state_T *state, char_u *block);
61+
static int bf_check_tables(UINT32_T pax[18], UINT32_T sbx[4][256], UINT32_T val);
62+
static int bf_self_test(void);
63+
static void bf_key_init(bf_state_T *state, char_u *password, char_u *salt, int salt_len);
64+
static void bf_cfb_init(bf_state_T *state, char_u *seed, int seed_len);
6565

6666
/* Blowfish code */
6767
static UINT32_T pax_init[18] = {

src/ex_cmds.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ typedef struct exarg exarg_T;
8585
#ifdef DO_DECLARE_EXCMD
8686
# define EX(a, b, c, d, e) {(char_u *)b, c, (long_u)(d), e}
8787

88-
typedef void (*ex_func_T) __ARGS((exarg_T *eap));
88+
typedef void (*ex_func_T) (exarg_T *eap);
8989

9090
static struct cmdname
9191
{
@@ -1739,7 +1739,7 @@ struct exarg
17391739
int useridx; /* user command index */
17401740
#endif
17411741
char_u *errmsg; /* returned error message */
1742-
char_u *(*getline) __ARGS((int, void *, int));
1742+
char_u *(*getline)(int, void *, int);
17431743
void *cookie; /* argument for getline() */
17441744
#ifdef FEAT_EVAL
17451745
struct condstack *cstack; /* condition stack for ":if" etc. */

src/ex_cmds2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2999,7 +2999,7 @@ source_runtime(name, all)
29992999
do_in_runtimepath(name, all, callback, cookie)
30003000
char_u *name;
30013001
int all;
3002-
void (*callback)__ARGS((char_u *fname, void *ck));
3002+
void (*callback)(char_u *fname, void *ck);
30033003
void *cookie;
30043004
{
30053005
char_u *rtp;

src/ex_getln.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4709,7 +4709,7 @@ ExpandFromContext(xp, pat, num_file, file, options)
47094709
static struct expgen
47104710
{
47114711
int context;
4712-
char_u *((*func)__ARGS((expand_T *, int)));
4712+
char_u *((*func)(expand_T *, int));
47134713
int ic;
47144714
int escaped;
47154715
} tab[] =
@@ -4804,7 +4804,7 @@ ExpandGeneric(xp, regmatch, num_file, file, func, escaped)
48044804
regmatch_T *regmatch;
48054805
int *num_file;
48064806
char_u ***file;
4807-
char_u *((*func)__ARGS((expand_T *, int)));
4807+
char_u *((*func)(expand_T *, int));
48084808
/* returns a string from the list */
48094809
int escaped;
48104810
{

src/fold.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2142,7 +2142,7 @@ typedef struct
21422142
static int fold_changed;
21432143

21442144
/* Function declarations. {{{2 */
2145-
static linenr_T foldUpdateIEMSRecurse(garray_T *gap, int level, linenr_T startlnum, fline_T *flp, void (*getlevel)__ARGS((fline_T *)), linenr_T bot, int topflags);
2145+
static linenr_T foldUpdateIEMSRecurse(garray_T *gap, int level, linenr_T startlnum, fline_T *flp, void (*getlevel)(fline_T *), linenr_T bot, int topflags);
21462146
static int foldInsert(garray_T *gap, int i);
21472147
static void foldSplit(garray_T *gap, int i, linenr_T top, linenr_T bot);
21482148
static void foldRemove(garray_T *gap, linenr_T top, linenr_T bot);
@@ -2169,7 +2169,7 @@ foldUpdateIEMS(wp, top, bot)
21692169
linenr_T start;
21702170
linenr_T end;
21712171
fline_T fline;
2172-
void (*getlevel)__ARGS((fline_T *));
2172+
void (*getlevel)(fline_T *);
21732173
int level;
21742174
fold_T *fp;
21752175

@@ -2422,7 +2422,7 @@ foldUpdateIEMSRecurse(gap, level, startlnum, flp, getlevel, bot, topflags)
24222422
int level;
24232423
linenr_T startlnum;
24242424
fline_T *flp;
2425-
void (*getlevel)__ARGS((fline_T *));
2425+
void (*getlevel)(fline_T *);
24262426
linenr_T bot;
24272427
int topflags; /* flags used by containing fold */
24282428
{

src/globals.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -845,19 +845,19 @@ EXTERN vimconv_T output_conv; /* type of output conversion */
845845
* The value is set in mb_init();
846846
*/
847847
/* length of char in bytes, including following composing chars */
848-
EXTERN int (*mb_ptr2len) __ARGS((char_u *p)) INIT(= latin_ptr2len);
848+
EXTERN int (*mb_ptr2len)(char_u *p) INIT(= latin_ptr2len);
849849
/* idem, with limit on string length */
850-
EXTERN int (*mb_ptr2len_len) __ARGS((char_u *p, int size)) INIT(= latin_ptr2len_len);
850+
EXTERN int (*mb_ptr2len_len)(char_u *p, int size) INIT(= latin_ptr2len_len);
851851
/* byte length of char */
852-
EXTERN int (*mb_char2len) __ARGS((int c)) INIT(= latin_char2len);
852+
EXTERN int (*mb_char2len)(int c) INIT(= latin_char2len);
853853
/* convert char to bytes, return the length */
854-
EXTERN int (*mb_char2bytes) __ARGS((int c, char_u *buf)) INIT(= latin_char2bytes);
855-
EXTERN int (*mb_ptr2cells) __ARGS((char_u *p)) INIT(= latin_ptr2cells);
856-
EXTERN int (*mb_ptr2cells_len) __ARGS((char_u *p, int size)) INIT(= latin_ptr2cells_len);
857-
EXTERN int (*mb_char2cells) __ARGS((int c)) INIT(= latin_char2cells);
858-
EXTERN int (*mb_off2cells) __ARGS((unsigned off, unsigned max_off)) INIT(= latin_off2cells);
859-
EXTERN int (*mb_ptr2char) __ARGS((char_u *p)) INIT(= latin_ptr2char);
860-
EXTERN int (*mb_head_off) __ARGS((char_u *base, char_u *p)) INIT(= latin_head_off);
854+
EXTERN int (*mb_char2bytes)(int c, char_u *buf) INIT(= latin_char2bytes);
855+
EXTERN int (*mb_ptr2cells)(char_u *p) INIT(= latin_ptr2cells);
856+
EXTERN int (*mb_ptr2cells_len)(char_u *p, int size) INIT(= latin_ptr2cells_len);
857+
EXTERN int (*mb_char2cells)(int c) INIT(= latin_char2cells);
858+
EXTERN int (*mb_off2cells)(unsigned off, unsigned max_off) INIT(= latin_off2cells);
859+
EXTERN int (*mb_ptr2char)(char_u *p) INIT(= latin_ptr2char);
860+
EXTERN int (*mb_head_off)(char_u *base, char_u *p) INIT(= latin_head_off);
861861

862862
# if defined(USE_ICONV) && defined(DYNAMIC_ICONV)
863863
/* Pointers to functions and variables to be loaded at runtime */

src/gui_at_sb.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ typedef struct _ScrollbarClassRec *ScrollbarWidgetClass;
9494

9595
extern WidgetClass vim_scrollbarWidgetClass;
9696

97-
extern void vim_XawScrollbarSetThumb __ARGS((Widget, double, double, double));
97+
extern void vim_XawScrollbarSetThumb(Widget, double, double, double);
9898

9999
typedef struct
100100
{

src/gui_beval.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ static void createBalloonEvalWindow(BalloonEval *);
195195
gui_mch_create_beval_area(target, mesg, mesgCB, clientData)
196196
void *target;
197197
char_u *mesg;
198-
void (*mesgCB)__ARGS((BalloonEval *, int));
198+
void (*mesgCB)(BalloonEval *, int);
199199
void *clientData;
200200
{
201201
#ifndef FEAT_GUI_GTK

src/gui_beval.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ typedef struct BalloonEvalStruct
6060
#endif
6161
int ts; /* tabstop setting for this buffer */
6262
char_u *msg;
63-
void (*msgCB)__ARGS((struct BalloonEvalStruct *, int));
63+
void (*msgCB)(struct BalloonEvalStruct *, int);
6464
void *clientData; /* For callback */
6565
#if !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_W32)
6666
Dimension screen_width; /* screen width in pixels */

src/gui_w32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4931,7 +4931,7 @@ gui_mch_post_balloon(beval, mesg)
49314931
gui_mch_create_beval_area(target, mesg, mesgCB, clientData)
49324932
void *target; /* ignored, always use s_textArea */
49334933
char_u *mesg;
4934-
void (*mesgCB)__ARGS((BalloonEval *, int));
4934+
void (*mesgCB)(BalloonEval *, int);
49354935
void *clientData;
49364936
{
49374937
/* partially stolen from gui_beval.c */

src/if_cscope.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
typedef struct {
4646
char * name;
47-
int (*func) __ARGS((exarg_T *eap));
47+
int (*func)(exarg_T *eap);
4848
char * help;
4949
char * usage;
5050
int cansplit; /* if supports splitting window */

src/if_perl.xs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@
125125
/* Compatibility hacks over */
126126

127127
static PerlInterpreter *perl_interp = NULL;
128-
static void xs_init __ARGS((pTHX));
129-
static void VIM_init __ARGS((void));
130-
EXTERN_C void boot_DynaLoader __ARGS((pTHX_ CV*));
128+
static void xs_init(pTHX);
129+
static void VIM_init(void);
130+
EXTERN_C void boot_DynaLoader(pTHX_ CV*);
131131

132132
/*
133133
* For dynamic linked perl.
@@ -1090,7 +1090,7 @@ perl_to_vim(sv, rettv)
10901090
item2 = av_fetch((AV *)sv, size, 0);
10911091

10921092
if (item2 == NULL || *item2 == NULL ||
1093-
perl_to_vim(*item2, &item->li_tv) == FAIL)
1093+
perl_to_vim(*item2, &item->li_tv) == FAIL)
10941094
break;
10951095
}
10961096
}

src/if_sniff.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ extern int want_sniff_request;
99
extern int sniff_request_waiting;
1010
extern int sniff_connected;
1111
extern int fd_from_sniff;
12-
extern void sniff_disconnect __ARGS((int immediately));
13-
extern void ProcessSniffRequests __ARGS((void));
14-
extern void ex_sniff __ARGS((exarg_T *eap));
12+
extern void sniff_disconnect(int immediately);
13+
extern void ProcessSniffRequests(void);
14+
extern void ex_sniff(exarg_T *eap);
1515

1616
#endif

src/nbdebug.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ typedef enum {
4444

4545
void nbdbg(char *, ...);
4646

47-
void nbdebug_wait __ARGS((u_int wait_flags, char *wait_var, u_int wait_secs));
48-
void nbdebug_log_init __ARGS((char *log_var, char *level_var));
47+
void nbdebug_wait(u_int wait_flags, char *wait_var, u_int wait_secs);
48+
void nbdebug_log_init(char *log_var, char *level_var);
4949

5050
extern FILE *nb_debug;
5151
extern u_int nb_dlevel; /* nb_debug verbosity level */

src/os_unix.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ static int mch_gpm_process(void);
109109

110110
static int sysmouse_open(void);
111111
static void sysmouse_close(void);
112-
static RETSIGTYPE sig_sysmouse __ARGS(SIGPROTOARG);
112+
static RETSIGTYPE sig_sysmouse SIGPROTOARG;
113113
#endif
114114

115115
/*
@@ -190,22 +190,22 @@ static int do_xterm_trace(void);
190190
static void handle_resize(void);
191191

192192
#if defined(SIGWINCH)
193-
static RETSIGTYPE sig_winch __ARGS(SIGPROTOARG);
193+
static RETSIGTYPE sig_winch SIGPROTOARG;
194194
#endif
195195
#if defined(SIGINT)
196-
static RETSIGTYPE catch_sigint __ARGS(SIGPROTOARG);
196+
static RETSIGTYPE catch_sigint SIGPROTOARG;
197197
#endif
198198
#if defined(SIGPWR)
199-
static RETSIGTYPE catch_sigpwr __ARGS(SIGPROTOARG);
199+
static RETSIGTYPE catch_sigpwr SIGPROTOARG;
200200
#endif
201201
#if defined(SIGALRM) && defined(FEAT_X11) \
202202
&& defined(FEAT_TITLE) && !defined(FEAT_GUI_GTK)
203203
# define SET_SIG_ALARM
204-
static RETSIGTYPE sig_alarm __ARGS(SIGPROTOARG);
204+
static RETSIGTYPE sig_alarm SIGPROTOARG;
205205
/* volatile because it is used in signal handler sig_alarm(). */
206206
static volatile int sig_alarm_called;
207207
#endif
208-
static RETSIGTYPE deathtrap __ARGS(SIGPROTOARG);
208+
static RETSIGTYPE deathtrap SIGPROTOARG;
209209

210210
static void catch_int_signal(void);
211211
static void set_signals(void);
@@ -1137,7 +1137,7 @@ deathtrap SIGDEFARG(sigarg)
11371137
* volatile because it is used in signal handler sigcont_handler().
11381138
*/
11391139
static volatile int sigcont_received;
1140-
static RETSIGTYPE sigcont_handler __ARGS(SIGPROTOARG);
1140+
static RETSIGTYPE sigcont_handler SIGPROTOARG;
11411141

11421142
/*
11431143
* signal handler for SIGCONT
@@ -6592,10 +6592,10 @@ sig_sysmouse SIGDEFARG(sigarg)
65926592
#endif /* FEAT_SYSMOUSE */
65936593

65946594
#if defined(FEAT_LIBCALL) || defined(PROTO)
6595-
typedef char_u * (*STRPROCSTR)__ARGS((char_u *));
6596-
typedef char_u * (*INTPROCSTR)__ARGS((int));
6597-
typedef int (*STRPROCINT)__ARGS((char_u *));
6598-
typedef int (*INTPROCINT)__ARGS((int));
6595+
typedef char_u * (*STRPROCSTR)(char_u *);
6596+
typedef char_u * (*INTPROCSTR)(int);
6597+
typedef int (*STRPROCINT)(char_u *);
6598+
typedef int (*INTPROCINT)(int);
65996599

66006600
/*
66016601
* Call a DLL routine which takes either a string or int param

src/os_unix.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,6 @@
7474
# define USE_GETCWD
7575
#endif
7676

77-
#ifndef __ARGS
78-
# define __ARGS(x) x
79-
#endif
80-
8177
/* always use unlink() to remove files */
8278
#ifndef PROTO
8379
# ifdef VMS
@@ -453,7 +449,7 @@ typedef struct dsc$descriptor DESC;
453449
# ifdef HAVE_RENAME
454450
# define mch_rename(src, dst) rename(src, dst)
455451
# else
456-
int mch_rename __ARGS((const char *src, const char *dest));
452+
int mch_rename(const char *src, const char *dest);
457453
# endif
458454
# ifndef VMS
459455
# ifdef __MVS__

src/os_win16.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ int _stricoll(char *a, char *b);
8484
/* cproto doesn't create a prototype for main() */
8585
int _cdecl
8686
VimMain
87-
__ARGS((int argc, char **argv));
87+
(int argc, char **argv);
8888
static int (_cdecl *pmain)(int, char **);
8989

9090
#ifndef PROTO

0 commit comments

Comments
 (0)