mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 7.4.1098
Problem: Still using old style C function declarations. Solution: Always define __ARGS() to include types. Turn a few functions into ANSI style to find out if this causes problems for anyone.
This commit is contained in:
32
src/eval.c
32
src/eval.c
@@ -973,8 +973,7 @@ eval_clear()
|
||||
* Return the name of the executed function.
|
||||
*/
|
||||
char_u *
|
||||
func_name(cookie)
|
||||
void *cookie;
|
||||
func_name(void *cookie)
|
||||
{
|
||||
return ((funccall_T *)cookie)->func->uf_name;
|
||||
}
|
||||
@@ -993,8 +992,7 @@ func_breakpoint(cookie)
|
||||
* Return the address holding the debug tick for a funccall cookie.
|
||||
*/
|
||||
int *
|
||||
func_dbg_tick(cookie)
|
||||
void *cookie;
|
||||
func_dbg_tick(void *cookie)
|
||||
{
|
||||
return &((funccall_T *)cookie)->dbg_tick;
|
||||
}
|
||||
@@ -1003,8 +1001,7 @@ func_dbg_tick(cookie)
|
||||
* Return the nesting level for a funccall cookie.
|
||||
*/
|
||||
int
|
||||
func_level(cookie)
|
||||
void *cookie;
|
||||
func_level(void *cookie)
|
||||
{
|
||||
return ((funccall_T *)cookie)->level;
|
||||
}
|
||||
@@ -1031,9 +1028,7 @@ current_func_returned()
|
||||
* not already exist.
|
||||
*/
|
||||
void
|
||||
set_internal_string_var(name, value)
|
||||
char_u *name;
|
||||
char_u *value;
|
||||
set_internal_string_var(char_u *name, char_u *value)
|
||||
{
|
||||
char_u *val;
|
||||
typval_T *tvp;
|
||||
@@ -1057,12 +1052,11 @@ static char_u *redir_varname = NULL;
|
||||
|
||||
/*
|
||||
* Start recording command output to a variable
|
||||
* When "append" is TRUE append to an existing variable.
|
||||
* Returns OK if successfully completed the setup. FAIL otherwise.
|
||||
*/
|
||||
int
|
||||
var_redir_start(name, append)
|
||||
char_u *name;
|
||||
int append; /* append to an existing variable */
|
||||
var_redir_start(char_u *name, int append)
|
||||
{
|
||||
int save_emsg;
|
||||
int err;
|
||||
@@ -1139,9 +1133,7 @@ var_redir_start(name, append)
|
||||
* :redir END
|
||||
*/
|
||||
void
|
||||
var_redir_str(value, value_len)
|
||||
char_u *value;
|
||||
int value_len;
|
||||
var_redir_str(char_u *value, int value_len)
|
||||
{
|
||||
int len;
|
||||
|
||||
@@ -1201,11 +1193,11 @@ var_redir_stop()
|
||||
|
||||
# if defined(FEAT_MBYTE) || defined(PROTO)
|
||||
int
|
||||
eval_charconvert(enc_from, enc_to, fname_from, fname_to)
|
||||
char_u *enc_from;
|
||||
char_u *enc_to;
|
||||
char_u *fname_from;
|
||||
char_u *fname_to;
|
||||
eval_charconvert(
|
||||
char_u *enc_from,
|
||||
char_u *enc_to,
|
||||
char_u *fname_from,
|
||||
char_u *fname_to)
|
||||
{
|
||||
int err = FALSE;
|
||||
|
||||
|
12
src/main.c
12
src/main.c
@@ -1064,9 +1064,9 @@ vim_main2(int argc UNUSED, char **argv UNUSED)
|
||||
* commands, return when entering Ex mode. "noexmode" is TRUE then.
|
||||
*/
|
||||
void
|
||||
main_loop(cmdwin, noexmode)
|
||||
int cmdwin; /* TRUE when working in the command-line window */
|
||||
int noexmode; /* TRUE when return on entering Ex mode */
|
||||
main_loop(
|
||||
int cmdwin, /* TRUE when working in the command-line window */
|
||||
int noexmode) /* TRUE when return on entering Ex mode */
|
||||
{
|
||||
oparg_T oa; /* operator arguments */
|
||||
volatile int previous_got_int = FALSE; /* "got_int" was TRUE */
|
||||
@@ -1360,8 +1360,7 @@ main_loop(cmdwin, noexmode)
|
||||
* Exit, but leave behind swap files for modified buffers.
|
||||
*/
|
||||
void
|
||||
getout_preserve_modified(exitval)
|
||||
int exitval;
|
||||
getout_preserve_modified(int exitval)
|
||||
{
|
||||
# if defined(SIGHUP) && defined(SIG_IGN)
|
||||
/* Ignore SIGHUP, because a dropped connection causes a read error, which
|
||||
@@ -1380,8 +1379,7 @@ getout_preserve_modified(exitval)
|
||||
|
||||
/* Exit properly */
|
||||
void
|
||||
getout(exitval)
|
||||
int exitval;
|
||||
getout(int exitval)
|
||||
{
|
||||
#ifdef FEAT_AUTOCMD
|
||||
buf_T *buf;
|
||||
|
@@ -75,13 +75,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef __ARGS
|
||||
/* The AIX VisualAge cc compiler defines __EXTENDED__ instead of __STDC__
|
||||
* because it includes pre-ansi features. */
|
||||
# if defined(__STDC__) || defined(__GNUC__) || defined(__EXTENDED__)
|
||||
# define __ARGS(x) x
|
||||
# else
|
||||
# define __ARGS(x) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* always use unlink() to remove files */
|
||||
@@ -181,10 +175,6 @@
|
||||
# include <pwd.h>
|
||||
#endif
|
||||
|
||||
#ifdef __COHERENT__
|
||||
# undef __ARGS
|
||||
#endif
|
||||
|
||||
#if (defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT)) \
|
||||
|| (defined(HAVE_SYS_SYSINFO_H) && defined(HAVE_SYSINFO)) \
|
||||
|| defined(HAVE_SYSCTL) || defined(HAVE_SYSCONF)
|
||||
|
@@ -741,6 +741,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1098,
|
||||
/**/
|
||||
1097,
|
||||
/**/
|
||||
|
16
src/vim.h
16
src/vim.h
@@ -255,26 +255,18 @@
|
||||
*/
|
||||
#ifdef AZTEC_C
|
||||
# include <functions.h>
|
||||
# define __ARGS(x) x
|
||||
#endif
|
||||
|
||||
#ifdef SASC
|
||||
# include <clib/exec_protos.h>
|
||||
# define __ARGS(x) x
|
||||
#endif
|
||||
|
||||
#ifdef _DCC
|
||||
# include <clib/exec_protos.h>
|
||||
# define __ARGS(x) x
|
||||
#endif
|
||||
|
||||
#ifdef __TURBOC__
|
||||
# define __ARGS(x) x
|
||||
#endif
|
||||
|
||||
#ifdef __BEOS__
|
||||
# include "os_beos.h"
|
||||
# define __ARGS(x) x
|
||||
#endif
|
||||
|
||||
#if (defined(UNIX) || defined(__EMX__) || defined(VMS)) \
|
||||
@@ -282,16 +274,8 @@
|
||||
# include "os_unix.h" /* bring lots of system header files */
|
||||
#endif
|
||||
|
||||
#if defined(MACOS) && (defined(__MRC__) || defined(__SC__))
|
||||
/* Apple's Compilers support prototypes */
|
||||
# define __ARGS(x) x
|
||||
#endif
|
||||
#ifndef __ARGS
|
||||
# if defined(__STDC__) || defined(__GNUC__) || defined(WIN3264)
|
||||
# define __ARGS(x) x
|
||||
# else
|
||||
# define __ARGS(x) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* __ARGS and __PARMS are the same thing. */
|
||||
|
Reference in New Issue
Block a user