second set of ANSI C changes: C89-style function declarations, more inline functions, remove register keyword

This commit is contained in:
Chet Ramey
2023-01-03 10:23:11 -05:00
parent 81e3a4fb07
commit a61ffa78ed
85 changed files with 2867 additions and 5479 deletions
+8 -18
View File
@@ -106,8 +106,7 @@ static int enable_shell_command (char *, int);
then print out a list of shell commands showing which are enabled and
which are disabled. */
int
enable_builtin (list)
WORD_LIST *list;
enable_builtin (WORD_LIST *list)
{
int result, flags;
int opt, filter;
@@ -254,10 +253,9 @@ enable_builtin (list)
}
/* List some builtins.
FILTER is a mask with two slots: ENABLED and DISABLED. */
FILTER is a mask with three slots: SPECIAL, ENABLED, and DISABLED. */
static void
list_some_builtins (filter)
int filter;
list_some_builtins (int filter)
{
register int i;
@@ -281,9 +279,7 @@ list_some_builtins (filter)
/* Enable the shell command NAME. If DISABLE_P is non-zero, then
disable NAME instead. */
static int
enable_shell_command (name, disable_p)
char *name;
int disable_p;
enable_shell_command (char *name, int disable_p)
{
struct builtin *b;
@@ -318,10 +314,7 @@ enable_shell_command (name, disable_p)
#endif
static int
dyn_load_builtin (list, flags, filename)
WORD_LIST *list;
int flags;
char *filename;
dyn_load_builtin (WORD_LIST *list, int flags, char *filename)
{
WORD_LIST *l;
void *handle;
@@ -483,8 +476,7 @@ dyn_load_builtin (list, flags, filename)
#if defined (HAVE_DLCLOSE)
static void
delete_builtin (b)
struct builtin *b;
delete_builtin (struct builtin *b)
{
int ind, size;
struct builtin *new_shell_builtins;
@@ -519,8 +511,7 @@ delete_builtin (b)
/* Tenon's MachTen has a dlclose that doesn't return a value, so we
finesse it with a local wrapper. */
static int
local_dlclose (handle)
void *handle;
local_dlclose (void *handle)
{
#if !defined (__MACHTEN__)
return (dlclose (handle));
@@ -531,8 +522,7 @@ local_dlclose (handle)
}
static int
dyn_unload_builtin (name)
char *name;
dyn_unload_builtin (char *name)
{
struct builtin *b;
void *handle;