Use ANSI C prototypes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176
diff --git a/src/heapsort.c b/src/heapsort.c
index 7e345c7..72dbcbc 100644
--- a/src/heapsort.c
+++ b/src/heapsort.c
@@ -130,10 +130,8 @@
* only advantage over quicksort is that it requires little additional memory.
*/
int
-heapsort(vbase, nmemb, size, compar)
- void *vbase;
- size_t nmemb, size;
- int (*compar)(const void *, const void *);
+heapsort(void *vbase, size_t nmemb, size_t size,
+ int (*compar)(const void *, const void *))
{
size_t cnt, i, j, l;
char tmp, *tmp1, *tmp2;
diff --git a/src/inet_net_pton.c b/src/inet_net_pton.c
index 8d33156..28c55ba 100644
--- a/src/inet_net_pton.c
+++ b/src/inet_net_pton.c
@@ -55,11 +55,7 @@ static int inet_net_pton_ipv4(const char *src, u_char *dst, size_t size);
* Paul Vixie (ISC), June 1996
*/
int
-inet_net_pton(af, src, dst, size)
- int af;
- const char *src;
- void *dst;
- size_t size;
+inet_net_pton(int af, const char *src, void *dst, size_t size)
{
switch (af) {
case AF_INET:
@@ -87,10 +83,7 @@ inet_net_pton(af, src, dst, size)
* Paul Vixie (ISC), June 1996
*/
static int
-inet_net_pton_ipv4(src, dst, size)
- const char *src;
- u_char *dst;
- size_t size;
+inet_net_pton_ipv4(const char *src, u_char *dst, size_t size)
{
static const char
xdigits[] = "0123456789abcdef",
diff --git a/src/merge.c b/src/merge.c
index e1078e7..470352a 100644
--- a/src/merge.c
+++ b/src/merge.c
@@ -95,11 +95,8 @@ static void insertionsort(u_char *, size_t, size_t,
* Arguments are as for qsort.
*/
int
-mergesort(base, nmemb, size, cmp)
- void *base;
- size_t nmemb;
- size_t size;
- int (*cmp)(const void *, const void *);
+mergesort(void *base, size_t nmemb, size_t size,
+ int (*cmp)(const void *, const void *))
{
size_t i;
int sense;
@@ -259,10 +256,8 @@ COPY: b = t;
* is defined. Otherwise simple pairwise merging is used.)
*/
void
-setup(list1, list2, n, size, cmp)
- size_t n, size;
- int (*cmp)(const void *, const void *);
- u_char *list1, *list2;
+setup(u_char *list1, u_char *list2, size_t n, size_t size,
+ int (*cmp)(const void *, const void *))
{
int i, length, size2, tmp, sense;
u_char *f1, *f2, *s, *l2, *last, *p2;
@@ -333,10 +328,8 @@ setup(list1, list2, n, size, cmp)
* last 4 elements.
*/
static void
-insertionsort(a, n, size, cmp)
- u_char *a;
- size_t n, size;
- int (*cmp)(const void *, const void *);
+insertionsort(u_char *a, size_t n, size_t size,
+ int (*cmp)(const void *, const void *))
{
u_char *ai, *s, *t, *u, tmp;
int i;
diff --git a/src/nlist.c b/src/nlist.c
index 6c9be51..3f2c0f8 100644
--- a/src/nlist.c
+++ b/src/nlist.c
@@ -70,9 +70,7 @@ static int __elf_fdnlist(int, struct nlist *);
int __fdnlist(int, struct nlist *);
int
-nlist(name, list)
- const char *name;
- struct nlist *list;
+nlist(const char *name, struct nlist *list)
{
int fd, n;
@@ -96,9 +94,7 @@ static struct nlist_handlers {
};
int
-__fdnlist(fd, list)
- int fd;
- struct nlist *list;
+__fdnlist(int fd, struct nlist *list)
{
size_t i;
int n = -1;
@@ -115,9 +111,7 @@ __fdnlist(fd, list)
#ifdef _NLIST_DO_AOUT
static int
-__aout_fdnlist(fd, list)
- int fd;
- struct nlist *list;
+__aout_fdnlist(int fd, struct nlist *list)
{
struct nlist *p, *symtab;
caddr_t strtab, a_out_mmap;
@@ -220,8 +214,7 @@ static void elf_sym_to_nlist(struct nlist *, Elf_Sym *, Elf_Shdr *, int);
* as such its use should be restricted.
*/
static int
-__elf_is_okay__(ehdr)
- Elf_Ehdr *ehdr;
+__elf_is_okay__(Elf_Ehdr *ehdr)
{
int retval = 0;
/*
@@ -244,9 +237,7 @@ __elf_is_okay__(ehdr)
}
static int
-__elf_fdnlist(fd, list)
- int fd;
- struct nlist *list;
+__elf_fdnlist(int fd, struct nlist *list)
{
struct nlist *p;
Elf_Off symoff = 0, symstroff = 0;
@@ -386,11 +377,7 @@ __elf_fdnlist(fd, list)
* n_value and n_type members.
*/
static void
-elf_sym_to_nlist(nl, s, shdr, shnum)
- struct nlist *nl;
- Elf_Sym *s;
- Elf_Shdr *shdr;
- int shnum;
+elf_sym_to_nlist(struct nlist *nl, Elf_Sym *s, Elf_Shdr *shdr, int shnum)
{
nl->n_value = s->st_value;
diff --git a/src/strmode.c b/src/strmode.c
index 97136e6..8d825ae 100644
--- a/src/strmode.c
+++ b/src/strmode.c
@@ -37,9 +37,7 @@ static char sccsid[] = "@(#)strmode.c 8.3 (Berkeley) 8/15/94";
#include <string.h>
void
-strmode(mode, p)
- mode_t mode;
- char *p;
+strmode(mode_t mode, char *p)
{
/* print type */
switch (mode & S_IFMT) {