]> granicus.if.org Git - strace/commitdiff
"Modernize" all old-style function parameter declarations
authorDenys Vlasenko <dvlasenk@redhat.com>
Mon, 30 May 2011 12:00:14 +0000 (14:00 +0200)
committerDenys Vlasenko <dvlasenk@redhat.com>
Mon, 30 May 2011 12:00:14 +0000 (14:00 +0200)
* bjm.c: Convert all remaining old-style C function definitions
to a "modern" form. This does not change any actual code.
* io.c: Likewise
* ioctl.c: Likewise
* net.c: Likewise
* proc.c: Likewise
* process.c: Likewise
* signal.c: Likewise
* sock.c: Likewise
* strace.c: Likewise
* stream.c: Likewise
* syscall.c: Likewise
* system.c: Likewise
* time.c: Likewise
* util.c: Likewise

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
16 files changed:
bjm.c
io.c
ioctl.c
ipc.c
mem.c
net.c
proc.c
process.c
signal.c
sock.c
strace.c
stream.c
syscall.c
system.c
time.c
util.c

diff --git a/bjm.c b/bjm.c
index 6c948d51e379c0deb3e2befb95cb8c3456a52d45..8b41237b8147fe9d116ad60bafb9c99750230d46 100644 (file)
--- a/bjm.c
+++ b/bjm.c
@@ -189,8 +189,7 @@ sys_query_module(struct tcb *tcp)
 }
 
 int
-sys_create_module(tcp)
-struct tcb *tcp;
+sys_create_module(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printpath(tcp, tcp->u_arg[0]);
@@ -200,8 +199,7 @@ struct tcb *tcp;
 }
 
 int
-sys_init_module(tcp)
-struct tcb *tcp;
+sys_init_module(struct tcb *tcp)
 {
        if (entering(tcp)) {
                tprintf("%#lx, ", tcp->u_arg[0]);
diff --git a/io.c b/io.c
index 3f8757c25905784782a591fa14bf5c85ca66382f..7ebf0ed52d27e9d67cf6908daccbaf5e1b336d2f 100644 (file)
--- a/io.c
+++ b/io.c
@@ -76,10 +76,7 @@ sys_write(struct tcb *tcp)
 
 #if HAVE_SYS_UIO_H
 void
-tprint_iov(tcp, len, addr)
-struct tcb * tcp;
-unsigned long len;
-unsigned long addr;
+tprint_iov(struct tcb *tcp, unsigned long len, unsigned long addr)
 {
 #if defined(LINUX) && SUPPORTED_PERSONALITIES > 1
        union {
diff --git a/ioctl.c b/ioctl.c
index 73cd1be54ea81af21ee7ca876be45d57b8b6eab0..0d991f8ac756f787acde650e1295975390f2c42e 100644 (file)
--- a/ioctl.c
+++ b/ioctl.c
@@ -69,9 +69,7 @@ const struct ioctlent *ioctlent;
 int nioctlents;
 
 static int
-compare(a, b)
-const void *a;
-const void *b;
+compare(const void *a, const void *b)
 {
        unsigned long code1 = ((struct ioctlent *) a)->code;
        unsigned long code2 = ((struct ioctlent *) b)->code;
@@ -79,8 +77,7 @@ const void *b;
 }
 
 const struct ioctlent *
-ioctl_lookup(code)
-long code;
+ioctl_lookup(long code)
 {
        struct ioctlent *iop, ioent;
 
@@ -111,9 +108,7 @@ const struct ioctlent *iop;
 }
 
 int
-ioctl_decode(tcp, code, arg)
-struct tcb *tcp;
-long code, arg;
+ioctl_decode(struct tcb *tcp, long code, long arg)
 {
        switch ((code >> 8) & 0xff) {
 #ifdef LINUX
diff --git a/ipc.c b/ipc.c
index 4c902bf0cd8bd32e2bf96f63174c13bb1cf3ce65..ee9aa7a35237cb1d4fbd7628db3aaaa8b4c9c36c 100644 (file)
--- a/ipc.c
+++ b/ipc.c
@@ -158,8 +158,7 @@ static const struct xlat semop_flags[] = {
        { 0,            NULL            },
 };
 
-int sys_msgget(tcp)
-struct tcb *tcp;
+int sys_msgget(struct tcb *tcp)
 {
        if (entering(tcp)) {
                if (tcp->u_arg[0])
@@ -183,8 +182,7 @@ struct tcb *tcp;
 #endif
 
 static int
-indirect_ipccall(tcp)
-struct tcb *tcp;
+indirect_ipccall(struct tcb *tcp)
 {
 #ifdef LINUX
 #ifdef X86_64
@@ -200,8 +198,7 @@ struct tcb *tcp;
        return 0;
 }
 
-int sys_msgctl(tcp)
-struct tcb *tcp;
+int sys_msgctl(struct tcb *tcp)
 {
        if (entering(tcp)) {
                tprintf("%lu, ", tcp->u_arg[0]);
@@ -360,8 +357,7 @@ int sys_semtimedop(struct tcb *tcp)
 }
 #endif
 
-int sys_semget(tcp)
-struct tcb *tcp;
+int sys_semget(struct tcb *tcp)
 {
        if (entering(tcp)) {
                if (tcp->u_arg[0])
@@ -377,8 +373,7 @@ struct tcb *tcp;
        return 0;
 }
 
-int sys_semctl(tcp)
-struct tcb *tcp;
+int sys_semctl(struct tcb *tcp)
 {
        if (entering(tcp)) {
                tprintf("%lu", tcp->u_arg[0]);
@@ -389,8 +384,7 @@ struct tcb *tcp;
        return 0;
 }
 
-int sys_shmget(tcp)
-struct tcb *tcp;
+int sys_shmget(struct tcb *tcp)
 {
        if (entering(tcp)) {
                if (tcp->u_arg[0])
@@ -406,8 +400,7 @@ struct tcb *tcp;
        return 0;
 }
 
-int sys_shmctl(tcp)
-struct tcb *tcp;
+int sys_shmctl(struct tcb *tcp)
 {
        if (entering(tcp)) {
                tprintf("%lu, ", tcp->u_arg[0]);
@@ -421,8 +414,7 @@ struct tcb *tcp;
        return 0;
 }
 
-int sys_shmat(tcp)
-struct tcb *tcp;
+int sys_shmat(struct tcb *tcp)
 {
 #ifdef LINUX
        unsigned long raddr;
@@ -452,8 +444,7 @@ struct tcb *tcp;
        return 0;
 }
 
-int sys_shmdt(tcp)
-struct tcb *tcp;
+int sys_shmdt(struct tcb *tcp)
 {
        if (entering(tcp)) {
                if (indirect_ipccall(tcp)) {
diff --git a/mem.c b/mem.c
index d4c223a4cee51fc11a9c1da702e30ba7512be7d7..4adb570c7993d23dbb7f9ffe1f6c35d4736b4ffd 100644 (file)
--- a/mem.c
+++ b/mem.c
@@ -57,8 +57,7 @@
 #endif
 
 int
-sys_brk(tcp)
-struct tcb *tcp;
+sys_brk(struct tcb *tcp)
 {
        if (entering(tcp)) {
                tprintf("%#lx", tcp->u_arg[0]);
@@ -72,8 +71,7 @@ struct tcb *tcp;
 
 #if defined(FREEBSD) || defined(SUNOS4)
 int
-sys_sbrk(tcp)
-struct tcb *tcp;
+sys_sbrk(struct tcb *tcp)
 {
        if (entering(tcp)) {
                tprintf("%lu", tcp->u_arg[0]);
@@ -267,8 +265,7 @@ print_mmap(struct tcb *tcp, long *u_arg, long long offset)
 }
 
 #ifdef LINUX
-int sys_old_mmap(tcp)
-struct tcb *tcp;
+int sys_old_mmap(struct tcb *tcp)
 {
        long u_arg[6];
 
@@ -315,8 +312,7 @@ struct tcb *tcp;
 #endif
 
 int
-sys_mmap(tcp)
-struct tcb *tcp;
+sys_mmap(struct tcb *tcp)
 {
        long long offset = tcp->u_arg[5];
 
@@ -385,8 +381,7 @@ sys_mmap64(struct tcb *tcp)
 
 
 int
-sys_munmap(tcp)
-struct tcb *tcp;
+sys_munmap(struct tcb *tcp)
 {
        if (entering(tcp)) {
                tprintf("%#lx, %lu",
@@ -396,8 +391,7 @@ struct tcb *tcp;
 }
 
 int
-sys_mprotect(tcp)
-struct tcb *tcp;
+sys_mprotect(struct tcb *tcp)
 {
        if (entering(tcp)) {
                tprintf("%#lx, %lu, ",
@@ -454,8 +448,7 @@ static const struct xlat madvise_cmds[] = {
 
 
 int
-sys_madvise(tcp)
-struct tcb *tcp;
+sys_madvise(struct tcb *tcp)
 {
        if (entering(tcp)) {
                tprintf("%#lx, %lu, ", tcp->u_arg[0], tcp->u_arg[1]);
@@ -476,8 +469,7 @@ static const struct xlat mlockall_flags[] = {
 };
 
 int
-sys_mlockall(tcp)
-struct tcb *tcp;
+sys_mlockall(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printflags(mlockall_flags, tcp->u_arg[0], "MCL_???");
@@ -500,8 +492,7 @@ static const struct xlat mctl_sync[] = {
 };
 
 int
-sys_msync(tcp)
-struct tcb *tcp;
+sys_msync(struct tcb *tcp)
 {
        if (entering(tcp)) {
                /* addr */
@@ -534,8 +525,7 @@ static const struct xlat mctl_lockas[] = {
 };
 
 int
-sys_mctl(tcp)
-struct tcb *tcp;
+sys_mctl(struct tcb *tcp)
 {
        int arg, function;
 
@@ -568,8 +558,7 @@ struct tcb *tcp;
 #endif /* MC_SYNC */
 
 int
-sys_mincore(tcp)
-struct tcb *tcp;
+sys_mincore(struct tcb *tcp)
 {
        unsigned long i, len;
        char *vec = NULL;
@@ -601,8 +590,7 @@ struct tcb *tcp;
 
 #if defined(ALPHA) || defined(FREEBSD) || defined(IA64) || defined(SUNOS4) || defined(SVR4) || defined(SPARC) || defined(SPARC64)
 int
-sys_getpagesize(tcp)
-struct tcb *tcp;
+sys_getpagesize(struct tcb *tcp)
 {
        if (exiting(tcp))
                return RVAL_HEX;
@@ -633,8 +621,7 @@ print_ldt_entry(struct modify_ldt_ldt_s *ldt_entry)
 }
 
 int
-sys_modify_ldt(tcp)
-struct tcb *tcp;
+sys_modify_ldt(struct tcb *tcp)
 {
        if (entering(tcp)) {
                struct modify_ldt_ldt_s copy;
@@ -657,8 +644,7 @@ struct tcb *tcp;
 }
 
 int
-sys_set_thread_area(tcp)
-struct tcb *tcp;
+sys_set_thread_area(struct tcb *tcp)
 {
        struct modify_ldt_ldt_s copy;
        if (entering(tcp)) {
@@ -686,8 +672,7 @@ struct tcb *tcp;
 }
 
 int
-sys_get_thread_area(tcp)
-struct tcb *tcp;
+sys_get_thread_area(struct tcb *tcp)
 {
        struct modify_ldt_ldt_s copy;
        if (exiting(tcp)) {
@@ -710,8 +695,7 @@ struct tcb *tcp;
 #if defined(LINUX) && defined(M68K)
 
 int
-sys_set_thread_area(tcp)
-struct tcb *tcp;
+sys_set_thread_area(struct tcb *tcp)
 {
        if (entering(tcp))
                tprintf("%#lx", tcp->u_arg[0]);
@@ -720,8 +704,7 @@ struct tcb *tcp;
 }
 
 int
-sys_get_thread_area(tcp)
-struct tcb *tcp;
+sys_get_thread_area(struct tcb *tcp)
 {
        return RVAL_HEX;
 }
@@ -729,8 +712,7 @@ struct tcb *tcp;
 
 #if defined(LINUX)
 int
-sys_remap_file_pages(tcp)
-struct tcb *tcp;
+sys_remap_file_pages(struct tcb *tcp)
 {
        if (entering(tcp)) {
                tprintf("%#lx, %lu, ", tcp->u_arg[0], tcp->u_arg[1]);
@@ -789,11 +771,7 @@ static const struct xlat move_pages_flags[] = {
 
 
 static void
-get_nodes(tcp, ptr, maxnodes, err)
-struct tcb *tcp;
-unsigned long ptr;
-unsigned long maxnodes;
-int err;
+get_nodes(struct tcb *tcp, unsigned long ptr, unsigned long maxnodes, int err)
 {
        unsigned long nlongs, size, end;
 
@@ -836,8 +814,7 @@ int err;
 }
 
 int
-sys_mbind(tcp)
-struct tcb *tcp;
+sys_mbind(struct tcb *tcp)
 {
        if (entering(tcp)) {
                tprintf("%#lx, %lu, ", tcp->u_arg[0], tcp->u_arg[1]);
@@ -850,8 +827,7 @@ struct tcb *tcp;
 }
 
 int
-sys_set_mempolicy(tcp)
-struct tcb *tcp;
+sys_set_mempolicy(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printxval(policies, tcp->u_arg[0], "MPOL_???");
@@ -861,8 +837,7 @@ struct tcb *tcp;
 }
 
 int
-sys_get_mempolicy(tcp)
-struct tcb *tcp;
+sys_get_mempolicy(struct tcb *tcp)
 {
        if (exiting(tcp)) {
                int pol;
@@ -880,8 +855,7 @@ struct tcb *tcp;
 }
 
 int
-sys_move_pages(tcp)
-struct tcb *tcp;
+sys_move_pages(struct tcb *tcp)
 {
        if (entering(tcp)) {
                unsigned long npages = tcp->u_arg[1];
@@ -954,8 +928,7 @@ struct tcb *tcp;
 
 #if defined(LINUX) && defined(POWERPC)
 int
-sys_subpage_prot(tcp)
-struct tcb *tcp;
+sys_subpage_prot(struct tcb *tcp)
 {
        if (entering(tcp)) {
                unsigned long cur, end, abbrev_end, entries;
diff --git a/net.c b/net.c
index a46cf061a51d67163396ae504e77a286559795e0..8242eb3d3f2a2e813e76ea515277c215b063015e 100644 (file)
--- a/net.c
+++ b/net.c
@@ -1426,9 +1426,7 @@ do_msghdr(struct tcb *tcp, struct msghdr *msg)
 }
 
 static void
-printmsghdr(tcp, addr)
-struct tcb *tcp;
-long addr;
+printmsghdr(struct tcb *tcp, long addr)
 {
        struct msghdr msg;
 
@@ -1513,8 +1511,7 @@ sys_socket(struct tcb *tcp)
 
 #ifdef SVR4
 int
-sys_so_socket(tcp)
-struct tcb *tcp;
+sys_so_socket(struct tcb *tcp)
 {
        if (entering(tcp)) {
                /* not sure really what these args are... but this
@@ -1529,8 +1526,7 @@ struct tcb *tcp;
 }
 
 int
-sys_so_socketpair(tcp)
-struct tcb *tcp;
+sys_so_socketpair(struct tcb *tcp)
 {
        if (entering(tcp)) {
                /* not sure what this arg is */
@@ -1541,8 +1537,7 @@ struct tcb *tcp;
 #endif /* SVR4 */
 
 int
-sys_bind(tcp)
-struct tcb *tcp;
+sys_bind(struct tcb *tcp)
 {
        if (entering(tcp)) {
                tprintf("%ld, ", tcp->u_arg[0]);
@@ -1553,15 +1548,13 @@ struct tcb *tcp;
 }
 
 int
-sys_connect(tcp)
-struct tcb *tcp;
+sys_connect(struct tcb *tcp)
 {
        return sys_bind(tcp);
 }
 
 int
-sys_listen(tcp)
-struct tcb *tcp;
+sys_listen(struct tcb *tcp)
 {
        if (entering(tcp)) {
                tprintf("%ld, %lu", tcp->u_arg[0], tcp->u_arg[1]);
@@ -1612,8 +1605,7 @@ sys_accept4(struct tcb *tcp)
 #endif
 
 int
-sys_send(tcp)
-struct tcb *tcp;
+sys_send(struct tcb *tcp)
 {
        if (entering(tcp)) {
                tprintf("%ld, ", tcp->u_arg[0]);
@@ -1626,8 +1618,7 @@ struct tcb *tcp;
 }
 
 int
-sys_sendto(tcp)
-struct tcb *tcp;
+sys_sendto(struct tcb *tcp)
 {
        if (entering(tcp)) {
                tprintf("%ld, ", tcp->u_arg[0]);
@@ -1647,8 +1638,7 @@ struct tcb *tcp;
 #ifdef HAVE_SENDMSG
 
 int
-sys_sendmsg(tcp)
-struct tcb *tcp;
+sys_sendmsg(struct tcb *tcp)
 {
        if (entering(tcp)) {
                tprintf("%ld, ", tcp->u_arg[0]);
@@ -1663,8 +1653,7 @@ struct tcb *tcp;
 #endif /* HAVE_SENDMSG */
 
 int
-sys_recv(tcp)
-struct tcb *tcp;
+sys_recv(struct tcb *tcp)
 {
        if (entering(tcp)) {
                tprintf("%ld, ", tcp->u_arg[0]);
@@ -1681,8 +1670,7 @@ struct tcb *tcp;
 }
 
 int
-sys_recvfrom(tcp)
-struct tcb *tcp;
+sys_recvfrom(struct tcb *tcp)
 {
        int fromlen;
 
@@ -1728,8 +1716,7 @@ struct tcb *tcp;
 #ifdef HAVE_SENDMSG
 
 int
-sys_recvmsg(tcp)
-struct tcb *tcp;
+sys_recvmsg(struct tcb *tcp)
 {
        if (entering(tcp)) {
                tprintf("%ld, ", tcp->u_arg[0]);
@@ -1804,8 +1791,7 @@ static const struct xlat shutdown_modes[] = {
 };
 
 int
-sys_shutdown(tcp)
-struct tcb *tcp;
+sys_shutdown(struct tcb *tcp)
 {
        if (entering(tcp)) {
                tprintf("%ld, ", tcp->u_arg[0]);
@@ -1815,15 +1801,13 @@ struct tcb *tcp;
 }
 
 int
-sys_getsockname(tcp)
-struct tcb *tcp;
+sys_getsockname(struct tcb *tcp)
 {
        return sys_accept(tcp);
 }
 
 int
-sys_getpeername(tcp)
-struct tcb *tcp;
+sys_getpeername(struct tcb *tcp)
 {
        return sys_accept(tcp);
 }
@@ -2048,9 +2032,7 @@ sys_getsockopt(struct tcb *tcp)
 }
 
 #if defined(ICMP_FILTER)
-static void printicmpfilter(tcp, addr)
-struct tcb *tcp;
-long addr;
+static void printicmpfilter(struct tcb *tcp, long addr)
 {
        struct icmp_filter      filter;
 
@@ -2074,12 +2056,7 @@ long addr;
 #endif /* ICMP_FILTER */
 
 static int
-printsockopt (tcp, level, name, addr, len)
-struct tcb *tcp;
-int level;
-int name;
-long addr;
-int len;
+printsockopt(struct tcb *tcp, int level, int name, long addr, int len)
 {
        printxval(socketlayers, level, "SOL_??");
        tprintf (", ");
@@ -2193,10 +2170,7 @@ int len;
 #ifdef HAVE_STRUCT_OPTHDR
 
 void
-print_sock_optmgmt (tcp, addr, len)
-struct tcb *tcp;
-long addr;
-int len;
+print_sock_optmgmt(struct tcb *tcp, long addr, int len)
 {
        int c = 0;
        struct opthdr hdr;
@@ -2229,8 +2203,7 @@ int len;
 #endif
 
 int
-sys_setsockopt(tcp)
-struct tcb *tcp;
+sys_setsockopt(struct tcb *tcp)
 {
        if (entering(tcp)) {
                tprintf("%ld, ", tcp->u_arg[0]);
@@ -2255,9 +2228,7 @@ static const struct xlat sock_version[] = {
 
 
 int
-netlib_call(tcp, func)
-struct tcb *tcp;
-int (*func) ();
+netlib_call(struct tcb *tcp, int (*func)())
 {
        if (entering(tcp)) {
                int i;
@@ -2274,64 +2245,55 @@ int (*func) ();
 }
 
 int
-sys_xsocket(tcp)
-struct tcb *tcp;
+sys_xsocket(struct tcb *tcp)
 {
        return netlib_call (tcp, sys_socket);
 }
 
 int
-sys_xsocketpair(tcp)
-struct tcb *tcp;
+sys_xsocketpair(struct tcb *tcp)
 {
        return netlib_call (tcp, sys_socketpair);
 }
 
 int
-sys_xbind(tcp)
-struct tcb *tcp;
+sys_xbind(struct tcb *tcp)
 {
        return netlib_call (tcp, sys_bind);
 }
 
 int
-sys_xconnect(tcp)
-struct tcb *tcp;
+sys_xconnect(struct tcb *tcp)
 {
        return netlib_call (tcp, sys_connect);
 }
 
 int
-sys_xlisten(tcp)
-struct tcb *tcp;
+sys_xlisten(struct tcb *tcp)
 {
        return netlib_call (tcp, sys_listen);
 }
 
 int
-sys_xaccept(tcp)
-struct tcb *tcp;
+sys_xaccept(struct tcb *tcp)
 {
        return netlib_call (tcp, sys_accept);
 }
 
 int
-sys_xsendmsg(tcp)
-struct tcb *tcp;
+sys_xsendmsg(struct tcb *tcp)
 {
        return netlib_call (tcp, sys_sendmsg);
 }
 
 int
-sys_xrecvmsg(tcp)
-struct tcb *tcp;
+sys_xrecvmsg(struct tcb *tcp)
 {
        return netlib_call (tcp, sys_recvmsg);
 }
 
 int
-sys_xgetsockaddr(tcp)
-struct tcb *tcp;
+sys_xgetsockaddr(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printxval (sock_version, tcp->u_arg[0], "__NETLIB_???");
@@ -2362,22 +2324,19 @@ struct tcb *tcp;
 }
 
 int
-sys_xgetsockopt(tcp)
-struct tcb *tcp;
+sys_xgetsockopt(struct tcb *tcp)
 {
        return netlib_call (tcp, sys_getsockopt);
 }
 
 int
-sys_xsetsockopt(tcp)
-struct tcb *tcp;
+sys_xsetsockopt(struct tcb *tcp)
 {
        return netlib_call (tcp, sys_setsockopt);
 }
 
 int
-sys_xshutdown(tcp)
-struct tcb *tcp;
+sys_xshutdown(struct tcb *tcp)
 {
        return netlib_call (tcp, sys_shutdown);
 }
diff --git a/proc.c b/proc.c
index 04ef8fb28d4e4cedf8ed45bcc73275730d42414a..1fe4890952f7bdbee7e7cc9651c0042b3fe53bcc 100644 (file)
--- a/proc.c
+++ b/proc.c
@@ -87,9 +87,7 @@ static const struct xlat proc_run_flags[] = {
 };
 
 int
-proc_ioctl(tcp, code, arg)
-struct tcb *tcp;
-int code, arg;
+proc_ioctl(struct tcb *tcp, int code, int arg)
 {
        int val;
        prstatus_t status;
@@ -203,9 +201,7 @@ static const struct xlat proc_status_flags[] = {
 };
 
 int
-proc_ioctl(tcp, code, arg)
-struct tcb *tcp;
-int code, arg;
+proc_ioctl(struct tcb *tcp, int code, int arg)
 {
        int val;
        struct procfs_status status;
index 9a767d3e6d42c26c90b993d4ca202acd068d0bba..5ac6f589589d5e90e9c129ac83d18c278519e475 100644 (file)
--- a/process.c
+++ b/process.c
@@ -251,7 +251,7 @@ static const struct xlat prctl_options[] = {
 
 
 static const char *
-unalignctl_string (unsigned int ctl)
+unalignctl_string(unsigned int ctl)
 {
        static char buf[16];
 
@@ -273,8 +273,7 @@ unalignctl_string (unsigned int ctl)
 
 
 int
-sys_prctl(tcp)
-struct tcb *tcp;
+sys_prctl(struct tcb *tcp)
 {
        int i;
 
@@ -362,8 +361,7 @@ struct tcb *tcp;
 
 #if defined(FREEBSD) || defined(SUNOS4) || defined(SVR4)
 int
-sys_gethostid(tcp)
-struct tcb *tcp;
+sys_gethostid(struct tcb *tcp)
 {
        if (exiting(tcp))
                return RVAL_HEX;
@@ -372,8 +370,7 @@ struct tcb *tcp;
 #endif /* FREEBSD || SUNOS4 || SVR4 */
 
 int
-sys_sethostname(tcp)
-struct tcb *tcp;
+sys_sethostname(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printpathn(tcp, tcp->u_arg[0], tcp->u_arg[1]);
@@ -384,8 +381,7 @@ struct tcb *tcp;
 
 #if defined(ALPHA) || defined(FREEBSD) || defined(SUNOS4) || defined(SVR4)
 int
-sys_gethostname(tcp)
-struct tcb *tcp;
+sys_gethostname(struct tcb *tcp)
 {
        if (exiting(tcp)) {
                if (syserror(tcp))
@@ -399,8 +395,7 @@ struct tcb *tcp;
 #endif /* ALPHA || FREEBSD || SUNOS4 || SVR4 */
 
 int
-sys_setdomainname(tcp)
-struct tcb *tcp;
+sys_setdomainname(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printpathn(tcp, tcp->u_arg[0], tcp->u_arg[1]);
@@ -412,8 +407,7 @@ struct tcb *tcp;
 #if !defined(LINUX)
 
 int
-sys_getdomainname(tcp)
-struct tcb *tcp;
+sys_getdomainname(struct tcb *tcp)
 {
        if (exiting(tcp)) {
                if (syserror(tcp))
@@ -427,8 +421,7 @@ struct tcb *tcp;
 #endif /* !LINUX */
 
 int
-sys_exit(tcp)
-struct tcb *tcp;
+sys_exit(struct tcb *tcp)
 {
        if (exiting(tcp)) {
                fprintf(stderr, "_exit returned!\n");
@@ -484,8 +477,7 @@ sys_fork(struct tcb *tcp)
 #if UNIXWARE > 2
 
 int
-sys_rfork(tcp)
-struct tcb *tcp;
+sys_rfork(struct tcb *tcp)
 {
        if (entering(tcp)) {
                tprintf ("%ld", tcp->u_arg[0]);
@@ -502,8 +494,7 @@ struct tcb *tcp;
 #endif
 
 int
-internal_fork(tcp)
-struct tcb *tcp;
+internal_fork(struct tcb *tcp)
 {
        struct tcb *tcpchild;
 
@@ -621,8 +612,7 @@ extern void print_ldt_entry();
 # endif
 
 int
-sys_clone(tcp)
-struct tcb *tcp;
+sys_clone(struct tcb *tcp)
 {
        if (exiting(tcp)) {
                const char *sep = "|";
@@ -674,8 +664,7 @@ sys_unshare(struct tcb *tcp)
 #endif /* LINUX */
 
 int
-sys_fork(tcp)
-struct tcb *tcp;
+sys_fork(struct tcb *tcp)
 {
        if (exiting(tcp))
                return RVAL_UDECIMAL;
@@ -960,8 +949,7 @@ internal_fork(struct tcb *tcp)
 #else /* !LINUX */
 
 int
-internal_fork(tcp)
-struct tcb *tcp;
+internal_fork(struct tcb *tcp)
 {
        struct tcb *tcpchild;
        int pid;
@@ -1049,8 +1037,7 @@ struct tcb *tcp;
 #if defined(SUNOS4) || defined(LINUX) || defined(FREEBSD)
 
 int
-sys_vfork(tcp)
-struct tcb *tcp;
+sys_vfork(struct tcb *tcp)
 {
        if (exiting(tcp))
                return RVAL_UDECIMAL;
@@ -1064,8 +1051,7 @@ struct tcb *tcp;
 static char idstr[16];
 
 int
-sys_getpid(tcp)
-struct tcb *tcp;
+sys_getpid(struct tcb *tcp)
 {
        if (exiting(tcp)) {
                sprintf(idstr, "ppid %lu", getrval2(tcp));
@@ -1076,8 +1062,7 @@ struct tcb *tcp;
 }
 
 int
-sys_getuid(tcp)
-struct tcb *tcp;
+sys_getuid(struct tcb *tcp)
 {
        if (exiting(tcp)) {
                sprintf(idstr, "euid %lu", getrval2(tcp));
@@ -1088,8 +1073,7 @@ struct tcb *tcp;
 }
 
 int
-sys_getgid(tcp)
-struct tcb *tcp;
+sys_getgid(struct tcb *tcp)
 {
        if (exiting(tcp)) {
                sprintf(idstr, "egid %lu", getrval2(tcp));
@@ -1120,8 +1104,7 @@ int sys_setfsuid(struct tcb *tcp)
 }
 
 int
-sys_setuid(tcp)
-struct tcb *tcp;
+sys_setuid(struct tcb *tcp)
 {
        if (entering(tcp)) {
                tprintf("%u", (uid_t) tcp->u_arg[0]);
@@ -1130,8 +1113,7 @@ struct tcb *tcp;
 }
 
 int
-sys_setgid(tcp)
-struct tcb *tcp;
+sys_setgid(struct tcb *tcp)
 {
        if (entering(tcp)) {
                tprintf("%u", (gid_t) tcp->u_arg[0]);
@@ -1166,8 +1148,7 @@ sys_getresuid(struct tcb *tcp)
 }
 
 int
-sys_getresgid(tcp)
-struct tcb *tcp;
+sys_getresgid(struct tcb *tcp)
 {
        if (exiting(tcp)) {
                __kernel_gid_t gid;
@@ -1195,8 +1176,7 @@ struct tcb *tcp;
 #endif /* LINUX */
 
 int
-sys_setreuid(tcp)
-struct tcb *tcp;
+sys_setreuid(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printuid("", tcp->u_arg[0]);
@@ -1206,8 +1186,7 @@ struct tcb *tcp;
 }
 
 int
-sys_setregid(tcp)
-struct tcb *tcp;
+sys_setregid(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printuid("", tcp->u_arg[0]);
@@ -1218,8 +1197,7 @@ struct tcb *tcp;
 
 #if defined(LINUX) || defined(FREEBSD)
 int
-sys_setresuid(tcp)
-     struct tcb *tcp;
+sys_setresuid(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printuid("", tcp->u_arg[0]);
@@ -1229,8 +1207,7 @@ sys_setresuid(tcp)
        return 0;
 }
 int
-sys_setresgid(tcp)
-     struct tcb *tcp;
+sys_setresgid(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printuid("", tcp->u_arg[0]);
@@ -1243,8 +1220,7 @@ sys_setresgid(tcp)
 #endif /* LINUX || FREEBSD */
 
 int
-sys_setgroups(tcp)
-struct tcb *tcp;
+sys_setgroups(struct tcb *tcp)
 {
        if (entering(tcp)) {
                unsigned long len, size, start, cur, end, abbrev_end;
@@ -1298,8 +1274,7 @@ struct tcb *tcp;
 }
 
 int
-sys_getgroups(tcp)
-struct tcb *tcp;
+sys_getgroups(struct tcb *tcp)
 {
        unsigned long len;
 
@@ -1363,8 +1338,7 @@ struct tcb *tcp;
 
 #ifdef LINUX
 int
-sys_setgroups32(tcp)
-struct tcb *tcp;
+sys_setgroups32(struct tcb *tcp)
 {
        if (entering(tcp)) {
                unsigned long len, size, start, cur, end, abbrev_end;
@@ -1418,8 +1392,7 @@ struct tcb *tcp;
 }
 
 int
-sys_getgroups32(tcp)
-struct tcb *tcp;
+sys_getgroups32(struct tcb *tcp)
 {
        unsigned long len;
 
@@ -1480,8 +1453,7 @@ struct tcb *tcp;
 
 #if defined(ALPHA) || defined(SUNOS4) || defined(SVR4)
 int
-sys_setpgrp(tcp)
-struct tcb *tcp;
+sys_setpgrp(struct tcb *tcp)
 {
        if (entering(tcp)) {
 #ifndef SVR4
@@ -1493,8 +1465,7 @@ struct tcb *tcp;
 #endif /* ALPHA || SUNOS4 || SVR4 */
 
 int
-sys_getpgrp(tcp)
-struct tcb *tcp;
+sys_getpgrp(struct tcb *tcp)
 {
        if (entering(tcp)) {
 #ifndef SVR4
@@ -1505,8 +1476,7 @@ struct tcb *tcp;
 }
 
 int
-sys_getsid(tcp)
-struct tcb *tcp;
+sys_getsid(struct tcb *tcp)
 {
        if (entering(tcp)) {
                tprintf("%lu", tcp->u_arg[0]);
@@ -1515,15 +1485,13 @@ struct tcb *tcp;
 }
 
 int
-sys_setsid(tcp)
-struct tcb *tcp;
+sys_setsid(struct tcb *tcp)
 {
        return 0;
 }
 
 int
-sys_getpgid(tcp)
-struct tcb *tcp;
+sys_getpgid(struct tcb *tcp)
 {
        if (entering(tcp)) {
                tprintf("%lu", tcp->u_arg[0]);
@@ -1532,8 +1500,7 @@ struct tcb *tcp;
 }
 
 int
-sys_setpgid(tcp)
-struct tcb *tcp;
+sys_setpgid(struct tcb *tcp)
 {
        if (entering(tcp)) {
                tprintf("%lu, %lu", tcp->u_arg[0], tcp->u_arg[1]);
@@ -1639,8 +1606,7 @@ printpriv(struct tcb *tcp, long addr, int len, const struct xlat *opt)
 
 
 int
-sys_procpriv(tcp)
-struct tcb *tcp;
+sys_procpriv(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printxval(procpriv_cmds, tcp->u_arg[0], "???PRV");
@@ -1762,8 +1728,7 @@ sys_execve(struct tcb *tcp)
 
 #if UNIXWARE > 2
 
-int sys_rexecve(tcp)
-struct tcb *tcp;
+int sys_rexecve(struct tcb *tcp)
 {
        if (entering (tcp)) {
                sys_execve (tcp);
@@ -1856,8 +1821,7 @@ static const struct xlat wait4_options[] = {
 #endif
 
 static int
-printstatus(status)
-int status;
+printstatus(int status)
 {
        int exited = 0;
 
@@ -1966,9 +1930,7 @@ printwaitn(struct tcb *tcp, int n, int bitness)
 }
 
 int
-internal_wait(tcp, flagarg)
-struct tcb *tcp;
-int flagarg;
+internal_wait(struct tcb *tcp, int flagarg)
 {
        int got_kids;
 
@@ -2056,8 +2018,7 @@ int flagarg;
 #ifdef SVR4
 
 int
-sys_wait(tcp)
-struct tcb *tcp;
+sys_wait(struct tcb *tcp)
 {
        if (exiting(tcp)) {
                /* The library wrapper stuffs this into the user variable. */
@@ -2071,8 +2032,7 @@ struct tcb *tcp;
 
 #ifdef FREEBSD
 int
-sys_wait(tcp)
-struct tcb *tcp;
+sys_wait(struct tcb *tcp)
 {
        int status;
 
@@ -2089,23 +2049,20 @@ struct tcb *tcp;
 #endif
 
 int
-sys_waitpid(tcp)
-struct tcb *tcp;
+sys_waitpid(struct tcb *tcp)
 {
        return printwaitn(tcp, 3, 0);
 }
 
 int
-sys_wait4(tcp)
-struct tcb *tcp;
+sys_wait4(struct tcb *tcp)
 {
        return printwaitn(tcp, 4, 0);
 }
 
 #ifdef ALPHA
 int
-sys_osf_wait4(tcp)
-struct tcb *tcp;
+sys_osf_wait4(struct tcb *tcp)
 {
        return printwaitn(tcp, 4, 1);
 }
@@ -2177,8 +2134,7 @@ sys_waitid(struct tcb *tcp)
 #endif /* SVR4 or LINUX */
 
 int
-sys_alarm(tcp)
-struct tcb *tcp;
+sys_alarm(struct tcb *tcp)
 {
        if (entering(tcp))
                tprintf("%lu", tcp->u_arg[0]);
@@ -2186,8 +2142,7 @@ struct tcb *tcp;
 }
 
 int
-sys_uname(tcp)
-struct tcb *tcp;
+sys_uname(struct tcb *tcp)
 {
        struct utsname uname;
 
index b47b831c1c9c92e14e6a6b40f1da1fe9a9b865e7..37b1f50169a355642873f460115c8b4d5eef4ef2 100644 (file)
--- a/signal.c
+++ b/signal.c
@@ -288,11 +288,7 @@ sigset_t *s;
 #endif
 
 static int
-copy_sigset_len(tcp, addr, s, len)
-struct tcb *tcp;
-long addr;
-sigset_t *s;
-int len;
+copy_sigset_len(struct tcb *tcp, long addr, sigset_t *s, int len)
 {
        if (len > sizeof(*s))
                len = sizeof(*s);
@@ -850,9 +846,7 @@ parse_sigset_t(const char *str, sigset_t *set)
  * else return 0.  This routine will never be called with SIGKILL.
  */
 int
-sigishandled(tcp, sig)
-struct tcb *tcp;
-int sig;
+sigishandled(struct tcb *tcp, int sig)
 {
 #ifdef LINUX
        int sfd;
@@ -946,8 +940,7 @@ int sig;
 #if defined(SUNOS4) || defined(FREEBSD)
 
 int
-sys_sigvec(tcp)
-struct tcb *tcp;
+sys_sigvec(struct tcb *tcp)
 {
        struct sigvec sv;
        long addr;
@@ -1005,8 +998,7 @@ struct tcb *tcp;
 }
 
 int
-sys_sigpause(tcp)
-struct tcb *tcp;
+sys_sigpause(struct tcb *tcp)
 {
        if (entering(tcp)) {    /* WTA: UD had a bug here: he forgot the braces */
                sigset_t sigm;
@@ -1017,8 +1009,7 @@ struct tcb *tcp;
 }
 
 int
-sys_sigstack(tcp)
-struct tcb *tcp;
+sys_sigstack(struct tcb *tcp)
 {
        struct sigstack ss;
        long addr;
@@ -1041,8 +1032,7 @@ struct tcb *tcp;
 }
 
 int
-sys_sigcleanup(tcp)
-struct tcb *tcp;
+sys_sigcleanup(struct tcb *tcp)
 {
        return 0;
 }
@@ -1052,8 +1042,7 @@ struct tcb *tcp;
 #ifndef SVR4
 
 int
-sys_sigsetmask(tcp)
-struct tcb *tcp;
+sys_sigsetmask(struct tcb *tcp)
 {
        if (entering(tcp)) {
                sigset_t sigm;
@@ -1080,8 +1069,7 @@ struct tcb *tcp;
 
 #if defined(SUNOS4) || defined(FREEBSD)
 int
-sys_sigblock(tcp)
-struct tcb *tcp;
+sys_sigblock(struct tcb *tcp)
 {
        return sys_sigsetmask(tcp);
 }
@@ -1106,8 +1094,7 @@ struct old_sigaction {
 #endif
 
 int
-sys_sigaction(tcp)
-struct tcb *tcp;
+sys_sigaction(struct tcb *tcp)
 {
        long addr;
 #ifdef LINUX
@@ -1185,8 +1172,7 @@ struct tcb *tcp;
 }
 
 int
-sys_signal(tcp)
-struct tcb *tcp;
+sys_signal(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printsignal(tcp->u_arg[0]);
@@ -1236,8 +1222,7 @@ struct tcb *tcp;
 
 #ifdef SVR4
 int
-sys_sighold(tcp)
-struct tcb *tcp;
+sys_sighold(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printsignal(tcp->u_arg[0]);
@@ -1592,8 +1577,7 @@ sys_sigreturn(struct tcb *tcp)
 }
 
 int
-sys_siggetmask(tcp)
-struct tcb *tcp;
+sys_siggetmask(struct tcb *tcp)
 {
        if (exiting(tcp)) {
                sigset_t sigm;
@@ -1619,8 +1603,7 @@ sys_sigsuspend(struct tcb *tcp)
 #if defined(SVR4) || defined(FREEBSD)
 
 int
-sys_sigsuspend(tcp)
-struct tcb *tcp;
+sys_sigsuspend(struct tcb *tcp)
 {
        sigset_t sigset;
 
@@ -1674,9 +1657,7 @@ static const struct xlat sigaltstack_flags[] = {
 
 #ifdef SVR4
 static void
-printcontext(tcp, ucp)
-struct tcb *tcp;
-ucontext_t *ucp;
+printcontext(struct tcb *tcp, ucontext_t *ucp)
 {
        tprintf("{");
        if (!abbrev(tcp)) {
@@ -1697,8 +1678,7 @@ ucontext_t *ucp;
 }
 
 int
-sys_getcontext(tcp)
-struct tcb *tcp;
+sys_getcontext(struct tcb *tcp)
 {
        ucontext_t uc;
 
@@ -1716,8 +1696,7 @@ struct tcb *tcp;
 }
 
 int
-sys_setcontext(tcp)
-struct tcb *tcp;
+sys_setcontext(struct tcb *tcp)
 {
        ucontext_t uc;
 
@@ -1743,9 +1722,7 @@ struct tcb *tcp;
 #if defined(LINUX) || defined(FREEBSD)
 
 static int
-print_stack_t(tcp, addr)
-struct tcb *tcp;
-unsigned long addr;
+print_stack_t(struct tcb *tcp, unsigned long addr)
 {
        stack_t ss;
        if (umove(tcp, addr, &ss) < 0)
@@ -1757,8 +1734,7 @@ unsigned long addr;
 }
 
 int
-sys_sigaltstack(tcp)
-       struct tcb *tcp;
+sys_sigaltstack(struct tcb *tcp)
 {
        if (entering(tcp)) {
                if (tcp->u_arg[0] == 0)
@@ -1780,8 +1756,7 @@ sys_sigaltstack(tcp)
 #ifdef HAVE_SIGACTION
 
 int
-sys_sigprocmask(tcp)
-struct tcb *tcp;
+sys_sigprocmask(struct tcb *tcp)
 {
 #ifdef ALPHA
        if (entering(tcp)) {
@@ -1820,8 +1795,7 @@ struct tcb *tcp;
 #endif /* HAVE_SIGACTION */
 
 int
-sys_kill(tcp)
-struct tcb *tcp;
+sys_kill(struct tcb *tcp)
 {
        if (entering(tcp)) {
                /*
@@ -1837,8 +1811,7 @@ struct tcb *tcp;
 
 #if defined(FREEBSD) || defined(SUNOS4)
 int
-sys_killpg(tcp)
-struct tcb *tcp;
+sys_killpg(struct tcb *tcp)
 {
        return sys_kill(tcp);
 }
@@ -1846,8 +1819,7 @@ struct tcb *tcp;
 
 #ifdef LINUX
 int
-sys_tgkill(tcp)
-       struct tcb *tcp;
+sys_tgkill(struct tcb *tcp)
 {
        if (entering(tcp)) {
                tprintf("%ld, %ld, %s",
@@ -1858,8 +1830,7 @@ sys_tgkill(tcp)
 #endif
 
 int
-sys_sigpending(tcp)
-struct tcb *tcp;
+sys_sigpending(struct tcb *tcp)
 {
        sigset_t sigset;
 
@@ -1875,8 +1846,7 @@ struct tcb *tcp;
 }
 
 #ifdef SVR4
-int sys_sigwait(tcp)
-struct tcb *tcp;
+int sys_sigwait(struct tcb *tcp)
 {
        sigset_t sigset;
 
@@ -1898,9 +1868,8 @@ struct tcb *tcp;
 
 #ifdef LINUX
 
-       int
-sys_rt_sigprocmask(tcp)
-       struct tcb *tcp;
+int
+sys_rt_sigprocmask(struct tcb *tcp)
 {
        sigset_t sigset;
 
diff --git a/sock.c b/sock.c
index e7c72b55caa3c535dd8583c3f9935caa29dc9aa0..e121619f0ed848598dddaadfd88212429fbf5c61 100644 (file)
--- a/sock.c
+++ b/sock.c
@@ -68,10 +68,7 @@ static const struct xlat iffflags[] = {
 
 
 static void
-print_addr(tcp, addr, ifr)
-struct tcb *tcp;
-long addr;
-struct ifreq *ifr;
+print_addr(struct tcb *tcp, long addr, struct ifreq *ifr)
 {
        if (ifr->ifr_addr.sa_family == AF_INET) {
                struct sockaddr_in *sinp;
index 16adba437ceed95a1d7b58a9aa0e5dd124d72c5f..a1602cac058c97b7c1850c7ecd11011248d50605 100644 (file)
--- a/strace.c
+++ b/strace.c
@@ -579,7 +579,7 @@ startup_attach(void)
 }
 
 static void
-startup_child (char **argv)
+startup_child(char **argv)
 {
        struct stat statbuf;
        const char *filename;
@@ -1634,8 +1634,7 @@ first_used_tcb(void)
 }
 
 static struct tcb *
-pfd2tcb(pfd)
-int pfd;
+pfd2tcb(int pfd)
 {
        int i;
 
@@ -1652,8 +1651,7 @@ int pfd;
 #endif /* USE_PROCFS */
 
 void
-droptcb(tcp)
-struct tcb *tcp;
+droptcb(struct tcb *tcp)
 {
        if (tcp->pid == 0)
                return;
@@ -1718,8 +1716,7 @@ struct tcb *tcp;
 #ifndef USE_PROCFS
 
 static int
-resume(tcp)
-struct tcb *tcp;
+resume(struct tcb *tcp)
 {
        if (tcp == NULL)
                return -1;
@@ -1743,7 +1740,7 @@ struct tcb *tcp;
 }
 
 static int
-resume_from_tcp (struct tcb *tcp)
+resume_from_tcp(struct tcb *tcp)
 {
        int error = 0;
        int resumed = 0;
@@ -1815,9 +1812,7 @@ resume_from_tcp (struct tcb *tcp)
    would SIGSTOP it and wait for its SIGSTOP notification forever.  */
 
 static int
-detach(tcp, sig)
-struct tcb *tcp;
-int sig;
+detach(struct tcb *tcp, int sig)
 {
        int error = 0;
 #ifdef LINUX
@@ -1960,7 +1955,7 @@ static void reaper(int sig)
 #endif /* USE_PROCFS */
 
 static void
-cleanup()
+cleanup(void)
 {
        int i;
        struct tcb *tcp;
@@ -1989,8 +1984,7 @@ cleanup()
 }
 
 static void
-interrupt(sig)
-int sig;
+interrupt(int sig)
 {
        interrupted = 1;
 }
@@ -2003,8 +1997,7 @@ extern char *sys_errlist[];
 #endif /* HAVE_DECL_SYS_ERRLIST */
 
 const char *
-strerror(err_no)
-int err_no;
+strerror(int err_no)
 {
        static char buf[64];
 
@@ -2027,8 +2020,7 @@ extern char *_sys_siglist[];
 #endif
 
 const char *
-strsignal(sig)
-int sig;
+strsignal(int sig)
 {
        static char buf[64];
 
@@ -2048,7 +2040,7 @@ int sig;
 #ifdef USE_PROCFS
 
 static void
-rebuild_pollv()
+rebuild_pollv(void)
 {
        int i, j;
 
@@ -2077,7 +2069,7 @@ rebuild_pollv()
 #ifndef HAVE_POLLABLE_PROCFS
 
 static void
-proc_poll_open()
+proc_poll_open(void)
 {
        int i;
 
@@ -2093,10 +2085,7 @@ proc_poll_open()
 }
 
 static int
-proc_poll(pollv, nfds, timeout)
-struct pollfd *pollv;
-int nfds;
-int timeout;
+proc_poll(struct pollfd *pollv, int nfds, int timeout)
 {
        int i;
        int n;
@@ -2119,14 +2108,12 @@ int timeout;
 }
 
 static void
-wakeup_handler(sig)
-int sig;
+wakeup_handler(int sig)
 {
 }
 
 static void
-proc_poller(pfd)
-int pfd;
+proc_poller(int pfd)
 {
        struct proc_pollfd pollinfo;
        struct sigaction sa;
@@ -2247,7 +2234,7 @@ choose_pfd()
 }
 
 static int
-trace()
+trace(void)
 {
 #ifdef POLL_HACK
        struct tcb *in_syscall = NULL;
@@ -2961,8 +2948,7 @@ tprintf(const char *fmt, ...)
 }
 
 void
-printleader(tcp)
-struct tcb *tcp;
+printleader(struct tcb *tcp)
 {
        if (tcp_last) {
                if (tcp_last->ptrace_errno) {
@@ -3014,8 +3000,7 @@ struct tcb *tcp;
 }
 
 void
-tabto(col)
-int col;
+tabto(int col)
 {
        if (curcol < col)
                tprintf("%*s", col - curcol, "");
index eb4e3964b924bd9ae7da2658207f381d9b5588d3..ed965019d4c255dc5c38296cd3be6c5f87c03d0b 100644 (file)
--- a/stream.c
+++ b/stream.c
@@ -77,10 +77,7 @@ static const struct xlat msgflags[] = {
 
 
 static void
-printstrbuf(tcp, sbp, getting)
-struct tcb *tcp;
-struct strbuf *sbp;
-int getting;
+printstrbuf(struct tcb *tcp, struct strbuf *sbp, int getting)
 {
        if (sbp->maxlen == -1 && getting)
                tprintf("{maxlen=-1}");
@@ -95,10 +92,7 @@ int getting;
 }
 
 static void
-printstrbufarg(tcp, arg, getting)
-struct tcb *tcp;
-int arg;
-int getting;
+printstrbufarg(struct tcb *tcp, int arg, int getting)
 {
        struct strbuf buf;
 
@@ -112,8 +106,7 @@ int getting;
 }
 
 int
-sys_putmsg(tcp)
-struct tcb *tcp;
+sys_putmsg(struct tcb *tcp)
 {
        int i;
 
@@ -131,8 +124,7 @@ struct tcb *tcp;
 
 #if defined(SPARC) || defined(SPARC64) || defined(SUNOS4) || defined(SVR4)
 int
-sys_getmsg(tcp)
-struct tcb *tcp;
+sys_getmsg(struct tcb *tcp)
 {
        int i, flags;
 
@@ -195,8 +187,7 @@ static const struct xlat pmsgflags[] = {
 
 #ifdef SYS_putpmsg
 int
-sys_putpmsg(tcp)
-struct tcb *tcp;
+sys_putpmsg(struct tcb *tcp)
 {
        int i;
 
@@ -217,8 +208,7 @@ struct tcb *tcp;
 
 #ifdef SYS_getpmsg
 int
-sys_getpmsg(tcp)
-struct tcb *tcp;
+sys_getpmsg(struct tcb *tcp)
 {
        int i, flags;
 
@@ -467,8 +457,7 @@ sys_ppoll(struct tcb *tcp)
 
 #else /* !HAVE_SYS_POLL_H */
 int
-sys_poll(tcp)
-struct tcb *tcp;
+sys_poll(struct tcb *tcp)
 {
        return 0;
 }
@@ -608,10 +597,7 @@ static const struct xlat xti_generic [] = {
 
 
 void
-print_xti_optmgmt (tcp, addr, len)
-struct tcb *tcp;
-long addr;
-int len;
+print_xti_optmgmt(struct tcb *tcp, long addr, int len)
 {
        int c = 0;
        struct t_opthdr hdr;
@@ -662,10 +648,7 @@ int len;
 
 
 static void
-print_optmgmt (tcp, addr, len)
-struct tcb *tcp;
-long addr;
-int len;
+print_optmgmt(struct tcb *tcp, long addr, int len)
 {
        /* We don't know how to tell if TLI (socket) or XTI
           optmgmt is being used yet, assume TLI. */
@@ -753,11 +736,7 @@ static const struct xlat tli_errors [] = {
 
 
 static int
-print_transport_message (tcp, expect, addr, len)
-struct tcb *tcp;
-int expect;
-long addr;
-int len;
+print_transport_message(struct tcb *tcp, int expect, long addr, int len)
 {
        union T_primitives m;
        int c = 0;
@@ -1180,9 +1159,7 @@ static int internal_stream_ioctl(struct tcb *tcp, int arg)
 }
 
 int
-stream_ioctl(tcp, code, arg)
-struct tcb *tcp;
-int code, arg;
+stream_ioctl(struct tcb *tcp, int code, int arg)
 {
 #ifdef I_LIST
        int i;
index 69870116fb6cd3143cbe88afbd59ee98c6505cc4..638274fdaae3f7dd030a3034f30f0c9bd0c56eaa 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -528,11 +528,7 @@ static const struct subcall subcalls_table[] = {
 #if !(defined(LINUX) && ( defined(ALPHA) || defined(MIPS) || defined(__ARM_EABI__) ))
 
 static void
-decode_subcall(tcp, subcall, nsubcalls, style)
-struct tcb *tcp;
-int subcall;
-int nsubcalls;
-enum subcall_style style;
+decode_subcall(struct tcb *tcp, int subcall, int nsubcalls, enum subcall_style style)
 {
        unsigned long addr, mask;
        int i;
@@ -1799,10 +1795,7 @@ get_error(struct tcb *tcp)
 }
 
 int
-force_result(tcp, error, rval)
-       struct tcb *tcp;
-       int error;
-       long rval;
+force_result(struct tcb *tcp, int error, long rval)
 {
 #ifdef LINUX
 # if defined(S390) || defined(S390X)
@@ -2733,8 +2726,7 @@ trace_syscall(struct tcb *tcp)
 }
 
 int
-printargs(tcp)
-struct tcb *tcp;
+printargs(struct tcb *tcp)
 {
        if (entering(tcp)) {
                int i;
@@ -2746,8 +2738,7 @@ struct tcb *tcp;
 }
 
 long
-getrval2(tcp)
-struct tcb *tcp;
+getrval2(struct tcb *tcp)
 {
        long val = -1;
 
@@ -2800,8 +2791,7 @@ struct tcb *tcp;
  * so if you see "indir" this program has gone astray.
  */
 int
-sys_indir(tcp)
-struct tcb *tcp;
+sys_indir(struct tcb *tcp)
 {
        int i, scno, nargs;
 
index 75f929137e9b245618d3b5f6806f9d8fb5a11fcf..10c23f73177c402124c1c7a4616dd01b41835339 100644 (file)
--- a/system.c
+++ b/system.c
@@ -208,8 +208,7 @@ static const struct xlat personality_options[] = {
 };
 
 int
-sys_personality(tcp)
-struct tcb *tcp;
+sys_personality(struct tcb *tcp)
 {
        if (entering(tcp))
                printxval(personality_options, tcp->u_arg[0], "PER_???");
@@ -240,8 +239,7 @@ static const struct xlat bootflags3[] = {
 };
 
 int
-sys_reboot(tcp)
-struct tcb *tcp;
+sys_reboot(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printflags(bootflags1, tcp->u_arg[0], "LINUX_REBOOT_MAGIC_???");
@@ -285,8 +283,7 @@ static const struct xlat cacheflush_flags[] = {
 };
 
 int
-sys_cacheflush(tcp)
-struct tcb *tcp;
+sys_cacheflush(struct tcb *tcp)
 {
        if (entering(tcp)) {
                /* addr */
@@ -402,8 +399,7 @@ sys_cacheflush(struct tcb *tcp)
 
 /*ARGSUSED*/
 int
-sys_sync(tcp)
-struct tcb *tcp;
+sys_sync(struct tcb *tcp)
 {
        return 0;
 }
@@ -424,8 +420,7 @@ static const struct xlat bootflags[] = {
 };
 
 int
-sys_reboot(tcp)
-struct tcb *tcp;
+sys_reboot(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printflags(bootflags, tcp->u_arg[0], "RB_???");
@@ -437,8 +432,7 @@ struct tcb *tcp;
 }
 
 int
-sys_sysacct(tcp)
-struct tcb *tcp;
+sys_sysacct(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printstr(tcp, tcp->u_arg[0], -1);
@@ -447,8 +441,7 @@ struct tcb *tcp;
 }
 
 int
-sys_swapon(tcp)
-struct tcb *tcp;
+sys_swapon(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printstr(tcp, tcp->u_arg[0], -1);
@@ -457,8 +450,7 @@ struct tcb *tcp;
 }
 
 int
-sys_nfs_svc(tcp)
-struct tcb *tcp;
+sys_nfs_svc(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printsock(tcp, tcp->u_arg[0]);
@@ -512,8 +504,7 @@ static const struct xlat nfsflags[] = {
 };
 
 int
-sys_mount(tcp)
-struct tcb *tcp;
+sys_mount(struct tcb *tcp)
 {
        char type[4];
 
@@ -581,8 +572,7 @@ struct tcb *tcp;
 }
 
 int
-sys_unmount(tcp)
-struct tcb *tcp;
+sys_unmount(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printstr(tcp, tcp->u_arg[0], -1);
@@ -591,15 +581,13 @@ struct tcb *tcp;
 }
 
 int
-sys_umount(tcp)
-struct tcb *tcp;
+sys_umount(struct tcb *tcp)
 {
        return sys_unmount(tcp);
 }
 
 int
-sys_auditsys(tcp)
-struct tcb *tcp;
+sys_auditsys(struct tcb *tcp)
 {
        /* XXX - no information available */
        return printargs(tcp);
@@ -612,8 +600,7 @@ static const struct xlat ex_auth_flags[] = {
 };
 
 int
-sys_exportfs(tcp)
-struct tcb *tcp;
+sys_exportfs(struct tcb *tcp)
 {
        struct export e;
        int i;
@@ -680,8 +667,7 @@ static const struct xlat sysconflimits[] = {
 };
 
 int
-sys_sysconf(tcp)
-struct tcb *tcp;
+sys_sysconf(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printxval(sysconflimits, tcp->u_arg[0], "_SC_???");
@@ -725,8 +711,7 @@ static const struct xlat pathconflimits[] = {
 
 
 int
-sys_pathconf(tcp)
-struct tcb *tcp;
+sys_pathconf(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printstr(tcp, tcp->u_arg[0], -1);
@@ -737,8 +722,7 @@ struct tcb *tcp;
 }
 
 int
-sys_fpathconf(tcp)
-struct tcb *tcp;
+sys_fpathconf(struct tcb *tcp)
 {
        if (entering(tcp)) {
                tprintf("%lu, ", tcp->u_arg[0]);
@@ -839,8 +823,7 @@ static const struct xlat sysconfig_options[] = {
 };
 
 int
-sys_sysconfig(tcp)
-struct tcb *tcp;
+sys_sysconfig(struct tcb *tcp)
 {
        if (entering(tcp))
                printxval(sysconfig_options, tcp->u_arg[0], "_CONFIG_???");
@@ -873,8 +856,7 @@ static const struct xlat sysinfo_options[] = {
 };
 
 int
-sys_sysinfo(tcp)
-struct tcb *tcp;
+sys_sysinfo(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printxval(sysinfo_options, tcp->u_arg[0], "SI_???");
@@ -1258,8 +1240,7 @@ static const struct xlat syssgi_options[] = {
 };
 
 int
-sys_syssgi(tcp)
-struct tcb *tcp;
+sys_syssgi(struct tcb *tcp)
 {
        int i;
 
@@ -1331,8 +1312,7 @@ static const struct xlat nfs_flags[] = {
 };
 
 int
-sys_mount(tcp)
-struct tcb *tcp;
+sys_mount(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printpath(tcp, tcp->u_arg[0]);
@@ -1442,8 +1422,7 @@ static const struct xlat nfs_flags[] = {
 };
 
 int
-sys_mount(tcp)
-struct tcb *tcp;
+sys_mount(struct tcb *tcp)
 {
        if (entering(tcp)) {
                char fstyp [FSTYPSZ];
@@ -1525,8 +1504,7 @@ struct tcb *tcp;
 #else /* !UNIXWARE */
 
 int
-sys_mount(tcp)
-struct tcb *tcp;
+sys_mount(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printpath(tcp, tcp->u_arg[0]);
@@ -1592,8 +1570,7 @@ static const struct xlat capabilities[] = {
 
 
 int
-sys_capget(tcp)
-struct tcb *tcp;
+sys_capget(struct tcb *tcp)
 {
        static cap_user_header_t       arg0 = NULL;
        static cap_user_data_t         arg1 = NULL;
@@ -1644,8 +1621,7 @@ struct tcb *tcp;
 }
 
 int
-sys_capset(tcp)
-struct tcb *tcp;
+sys_capset(struct tcb *tcp)
 {
        static cap_user_header_t       arg0 = NULL;
        static cap_user_data_t         arg1 = NULL;
@@ -1697,14 +1673,12 @@ struct tcb *tcp;
 
 #else
 
-int sys_capget(tcp)
-struct tcb *tcp;
+int sys_capget(struct tcb *tcp)
 {
        return printargs(tcp);
 }
 
-int sys_capset(tcp)
-struct tcb *tcp;
+int sys_capset(struct tcb *tcp)
 {
        return printargs(tcp);
 }
@@ -1958,8 +1932,7 @@ static const struct xlat sysctl_net_ipv6_route[] = {
 };
 
 int
-sys_sysctl(tcp)
-struct tcb *tcp;
+sys_sysctl(struct tcb *tcp)
 {
        struct __sysctl_args info;
        int *name;
@@ -2113,8 +2086,7 @@ struct tcb *tcp;
        return 0;
 }
 #else
-int sys_sysctl(tcp)
-struct tcb *tcp;
+int sys_sysctl(struct tcb *tcp)
 {
        return printargs(tcp);
 }
@@ -2123,8 +2095,7 @@ struct tcb *tcp;
 #ifdef FREEBSD
 #include <sys/sysctl.h>
 
-int sys___sysctl(tcp)
-struct tcb *tcp;
+int sys___sysctl(struct tcb *tcp)
 {
        int qoid[CTL_MAXNAME+2];
        char ctl[1024];
@@ -2183,8 +2154,7 @@ static const struct xlat ksym_flags[] = {
 };
 
 int
-sys_getksym(tcp)
-struct tcb *tcp;
+sys_getksym(struct tcb *tcp)
 {
        if (entering (tcp)) {
                printstr(tcp, tcp->u_arg[0], -1);
@@ -2265,8 +2235,7 @@ static const struct xlat ssi_cmd [] = {
        { 0,            NULL            },
 };
 
-int sys_ssisys (tcp)
-struct tcb *tcp;
+int sys_ssisys(struct tcb *tcp)
 {
        struct ssisys_iovec iov;
        cls_nodeinfo_args_t cni;
@@ -2356,8 +2325,7 @@ static const struct xlat sysmips_operations[] = {
        { 0, NULL }
 };
 
-int sys_sysmips(tcp)
-struct tcb *tcp;
+int sys_sysmips(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printxval(sysmips_operations, tcp->u_arg[0], "???");
diff --git a/time.c b/time.c
index b5fdc5233c4f773c56117b6e242b122f2caccb07..1560bde906e120d75e45cf8284ebdec4c6276983 100644 (file)
--- a/time.c
+++ b/time.c
@@ -207,8 +207,7 @@ void sprint_timespec(char *buf, struct tcb *tcp, long addr)
 }
 
 int
-sys_time(tcp)
-struct tcb *tcp;
+sys_time(struct tcb *tcp)
 {
        if (exiting(tcp)) {
 #ifndef SVR4
@@ -219,8 +218,7 @@ struct tcb *tcp;
 }
 
 int
-sys_stime(tcp)
-struct tcb *tcp;
+sys_stime(struct tcb *tcp)
 {
        if (exiting(tcp)) {
                printnum(tcp, tcp->u_arg[0], "%ld");
@@ -229,8 +227,7 @@ struct tcb *tcp;
 }
 
 int
-sys_gettimeofday(tcp)
-struct tcb *tcp;
+sys_gettimeofday(struct tcb *tcp)
 {
        if (exiting(tcp)) {
                if (syserror(tcp)) {
@@ -250,8 +247,7 @@ struct tcb *tcp;
 
 #ifdef ALPHA
 int
-sys_osf_gettimeofday(tcp)
-struct tcb *tcp;
+sys_osf_gettimeofday(struct tcb *tcp)
 {
        if (exiting(tcp)) {
                if (syserror(tcp)) {
@@ -269,8 +265,7 @@ struct tcb *tcp;
 #endif
 
 int
-sys_settimeofday(tcp)
-struct tcb *tcp;
+sys_settimeofday(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printtv(tcp, tcp->u_arg[0]);
@@ -284,8 +279,7 @@ struct tcb *tcp;
 
 #ifdef ALPHA
 int
-sys_osf_settimeofday(tcp)
-struct tcb *tcp;
+sys_osf_settimeofday(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printtv_bitness(tcp, tcp->u_arg[0], BITNESS_32, 0);
@@ -299,8 +293,7 @@ struct tcb *tcp;
 #endif
 
 int
-sys_adjtime(tcp)
-struct tcb *tcp;
+sys_adjtime(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printtv(tcp, tcp->u_arg[0]);
@@ -383,8 +376,7 @@ printitv_bitness(struct tcb *tcp, long addr, enum bitness_t bitness)
        printitv_bitness((tcp), (addr), BITNESS_CURRENT)
 
 int
-sys_getitimer(tcp)
-struct tcb *tcp;
+sys_getitimer(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printxval(which, tcp->u_arg[0], "ITIMER_???");
@@ -401,8 +393,7 @@ struct tcb *tcp;
 
 #ifdef ALPHA
 int
-sys_osf_getitimer(tcp)
-struct tcb *tcp;
+sys_osf_getitimer(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printxval(which, tcp->u_arg[0], "ITIMER_???");
@@ -418,8 +409,7 @@ struct tcb *tcp;
 #endif
 
 int
-sys_setitimer(tcp)
-struct tcb *tcp;
+sys_setitimer(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printxval(which, tcp->u_arg[0], "ITIMER_???");
@@ -437,8 +427,7 @@ struct tcb *tcp;
 
 #ifdef ALPHA
 int
-sys_osf_setitimer(tcp)
-struct tcb *tcp;
+sys_osf_setitimer(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printxval(which, tcp->u_arg[0], "ITIMER_???");
@@ -694,8 +683,7 @@ static const struct xlat clocknames[] = {
 };
 
 int
-sys_clock_settime(tcp)
-struct tcb *tcp;
+sys_clock_settime(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printxval(clocknames, tcp->u_arg[0], "CLOCK_???");
@@ -706,8 +694,7 @@ struct tcb *tcp;
 }
 
 int
-sys_clock_gettime(tcp)
-struct tcb *tcp;
+sys_clock_gettime(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printxval(clocknames, tcp->u_arg[0], "CLOCK_???");
@@ -722,8 +709,7 @@ struct tcb *tcp;
 }
 
 int
-sys_clock_nanosleep(tcp)
-struct tcb *tcp;
+sys_clock_nanosleep(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printxval(clocknames, tcp->u_arg[0], "CLOCK_???");
@@ -829,8 +815,7 @@ printsigevent(struct tcb *tcp, long arg)
 }
 
 int
-sys_timer_create(tcp)
-struct tcb *tcp;
+sys_timer_create(struct tcb *tcp)
 {
        if (entering(tcp)) {
                printxval(clocknames, tcp->u_arg[0], "CLOCK_???");
@@ -849,8 +834,7 @@ struct tcb *tcp;
 }
 
 int
-sys_timer_settime(tcp)
-struct tcb *tcp;
+sys_timer_settime(struct tcb *tcp)
 {
        if (entering(tcp)) {
                tprintf("%#lx, ", tcp->u_arg[0]);
@@ -868,8 +852,7 @@ struct tcb *tcp;
 }
 
 int
-sys_timer_gettime(tcp)
-struct tcb *tcp;
+sys_timer_gettime(struct tcb *tcp)
 {
        if (entering(tcp)) {
                tprintf("%#lx, ", tcp->u_arg[0]);
@@ -883,9 +866,7 @@ struct tcb *tcp;
 }
 
 static void
-print_rtc(tcp, rt)
-struct tcb *tcp;
-const struct rtc_time *rt;
+print_rtc(struct tcb *tcp, const struct rtc_time *rt)
 {
        tprintf("{tm_sec=%d, tm_min=%d, tm_hour=%d, "
                "tm_mday=%d, tm_mon=%d, tm_year=%d, ",
@@ -899,10 +880,7 @@ const struct rtc_time *rt;
 }
 
 int
-rtc_ioctl(tcp, code, arg)
-struct tcb *tcp;
-long code;
-long arg;
+rtc_ioctl(struct tcb *tcp, long code, long arg)
 {
        switch (code) {
        case RTC_ALM_SET:
@@ -983,8 +961,7 @@ static const struct xlat timerfdflags[] = {
 };
 
 int
-sys_timerfd(tcp)
-struct tcb *tcp;
+sys_timerfd(struct tcb *tcp)
 {
        if (entering(tcp)) {
                /* It does not matter that the kernel uses itimerspec.  */
diff --git a/util.c b/util.c
index 8704a460e0521df49f583783b9561685ed113a17..c8eab85e73282d4546ce8ec2ee75ec92c5249e5c 100644 (file)
--- a/util.c
+++ b/util.c
 #endif
 
 int
-tv_nz(a)
-struct timeval *a;
+tv_nz(struct timeval *a)
 {
        return a->tv_sec || a->tv_usec;
 }
 
 int
-tv_cmp(a, b)
-struct timeval *a, *b;
+tv_cmp(struct timeval *a, struct timeval *b)
 {
        if (a->tv_sec < b->tv_sec
            || (a->tv_sec == b->tv_sec && a->tv_usec < b->tv_usec))
@@ -114,15 +112,13 @@ struct timeval *a, *b;
 }
 
 double
-tv_float(tv)
-struct timeval *tv;
+tv_float(struct timeval *tv)
 {
        return tv->tv_sec + tv->tv_usec/1000000.0;
 }
 
 void
-tv_add(tv, a, b)
-struct timeval *tv, *a, *b;
+tv_add(struct timeval *tv, struct timeval *a, struct timeval *b)
 {
        tv->tv_sec = a->tv_sec + b->tv_sec;
        tv->tv_usec = a->tv_usec + b->tv_usec;
@@ -133,8 +129,7 @@ struct timeval *tv, *a, *b;
 }
 
 void
-tv_sub(tv, a, b)
-struct timeval *tv, *a, *b;
+tv_sub(struct timeval *tv, struct timeval *a, struct timeval *b)
 {
        tv->tv_sec = a->tv_sec - b->tv_sec;
        tv->tv_usec = a->tv_usec - b->tv_usec;
@@ -145,9 +140,7 @@ struct timeval *tv, *a, *b;
 }
 
 void
-tv_div(tv, a, n)
-struct timeval *tv, *a;
-int n;
+tv_div(struct timeval *tv, struct timeval *a, int n)
 {
        tv->tv_usec = (a->tv_sec % n * 1000000 + a->tv_usec + n / 2) / n;
        tv->tv_sec = a->tv_sec / n + tv->tv_usec / 1000000;
@@ -155,9 +148,7 @@ int n;
 }
 
 void
-tv_mul(tv, a, n)
-struct timeval *tv, *a;
-int n;
+tv_mul(struct timeval *tv, struct timeval *a, int n)
 {
        tv->tv_usec = a->tv_usec * n;
        tv->tv_sec = a->tv_sec * n + tv->tv_usec / 1000000;
@@ -288,9 +279,7 @@ printllval(struct tcb *tcp, const char *format, int llarg)
  * return # of flags printed.
  */
 int
-addflags(xlat, flags)
-const struct xlat *xlat;
-int flags;
+addflags(const struct xlat *xlat, int flags)
 {
        int n;
 
@@ -427,9 +416,7 @@ printfd(struct tcb *tcp, int fd)
 }
 
 void
-printuid(text, uid)
-const char *text;
-unsigned long uid;
+printuid(const char *text, unsigned long uid)
 {
        tprintf("%s", text);
        tprintf((uid == -1) ? "%ld" : "%lu", uid);
@@ -644,10 +631,7 @@ printstr(struct tcb *tcp, long addr, int len)
 
 #if HAVE_SYS_UIO_H
 void
-dumpiov(tcp, len, addr)
-struct tcb * tcp;
-int len;
-long addr;
+dumpiov(struct tcb *tcp, int len, long addr)
 {
 #if defined(LINUX) && SUPPORTED_PERSONALITIES > 1
        union {
@@ -698,10 +682,7 @@ long addr;
 #endif
 
 void
-dumpstr(tcp, addr, len)
-struct tcb *tcp;
-long addr;
-int len;
+dumpstr(struct tcb *tcp, long addr, int len)
 {
        static int strsize = -1;
        static unsigned char *str;
@@ -945,12 +926,7 @@ umovestr(struct tcb *tcp, long addr, int len, char *laddr)
 #ifdef SUNOS4
 
 static int
-uload(cmd, pid, addr, len, laddr)
-int cmd;
-int pid;
-long addr;
-int len;
-char *laddr;
+uload(int cmd, int pid, long addr, int len, char *laddr)
 {
        int peek, poke;
        int n, m;
@@ -998,20 +974,13 @@ char *laddr;
 }
 
 int
-tload(pid, addr, len, laddr)
-int pid;
-int addr, len;
-char *laddr;
+tload(int pid, int addr, int len, char *laddr)
 {
        return uload(PTRACE_WRITETEXT, pid, addr, len, laddr);
 }
 
 int
-dload(pid, addr, len, laddr)
-int pid;
-int addr;
-int len;
-char *laddr;
+dload(int pid, int addr, int len, char *laddr)
 {
        return uload(PTRACE_WRITEDATA, pid, addr, len, laddr);
 }
@@ -1021,10 +990,7 @@ char *laddr;
 #ifndef USE_PROCFS
 
 int
-upeek(tcp, off, res)
-struct tcb *tcp;
-long off;
-long *res;
+upeek(struct tcb *tcp, long off, long *res)
 {
        long val;
 
@@ -1312,7 +1278,7 @@ arg_setup(struct tcb *tcp, arg_setup_state *state)
 
 #   ifdef SYS_fork
 static int
-get_arg0 (struct tcb *tcp, arg_setup_state *state, long *valp)
+get_arg0(struct tcb *tcp, arg_setup_state *state, long *valp)
 {
        int ret;
 
@@ -1326,7 +1292,7 @@ get_arg0 (struct tcb *tcp, arg_setup_state *state, long *valp)
 }
 
 static int
-get_arg1 (struct tcb *tcp, arg_setup_state *state, long *valp)
+get_arg1(struct tcb *tcp, arg_setup_state *state, long *valp)
 {
        int ret;
 
@@ -1341,7 +1307,7 @@ get_arg1 (struct tcb *tcp, arg_setup_state *state, long *valp)
 #   endif
 
 static int
-set_arg0 (struct tcb *tcp, arg_setup_state *state, long val)
+set_arg0(struct tcb *tcp, arg_setup_state *state, long val)
 {
        int req = PTRACE_POKEDATA;
        void *ap;
@@ -1357,7 +1323,7 @@ set_arg0 (struct tcb *tcp, arg_setup_state *state, long val)
 }
 
 static int
-set_arg1 (struct tcb *tcp, arg_setup_state *state, long val)
+set_arg1(struct tcb *tcp, arg_setup_state *state, long val)
 {
        int req = PTRACE_POKEDATA;
        void *ap;
@@ -1455,13 +1421,13 @@ typedef int arg_setup_state;
     (upeek ((tcp), arg1_offset, (valp)))
 
 static int
-set_arg0 (struct tcb *tcp, void *cookie, long val)
+set_arg0(struct tcb *tcp, void *cookie, long val)
 {
        return ptrace (PTRACE_POKEUSER, tcp->pid, (char*)arg0_offset, val);
 }
 
 static int
-set_arg1 (struct tcb *tcp, void *cookie, long val)
+set_arg1(struct tcb *tcp, void *cookie, long val)
 {
        return ptrace (PTRACE_POKEUSER, tcp->pid, (char*)arg1_offset, val);
 }
@@ -1561,8 +1527,7 @@ setbpt(struct tcb *tcp)
 }
 
 int
-clearbpt(tcp)
-struct tcb *tcp;
+clearbpt(struct tcb *tcp)
 {
        arg_setup_state state;
        if (arg_setup (tcp, &state) < 0
@@ -1577,8 +1542,7 @@ struct tcb *tcp;
 # else /* !defined LINUX */
 
 int
-setbpt(tcp)
-struct tcb *tcp;
+setbpt(struct tcb *tcp)
 {
 #  ifdef SUNOS4
 #   ifdef SPARC        /* This code is slightly sparc specific */
@@ -1633,8 +1597,7 @@ struct tcb *tcp;
 }
 
 int
-clearbpt(tcp)
-struct tcb *tcp;
+clearbpt(struct tcb *tcp)
 {
 #  ifdef SUNOS4
 #   ifdef SPARC
@@ -1697,9 +1660,7 @@ struct tcb *tcp;
 #ifdef SUNOS4
 
 static int
-getex(tcp, hdr)
-struct tcb *tcp;
-struct exec *hdr;
+getex(struct tcb *tcp, struct exec *hdr)
 {
        int n;
 
@@ -1719,8 +1680,7 @@ struct exec *hdr;
 }
 
 int
-fixvfork(tcp)
-struct tcb *tcp;
+fixvfork(struct tcb *tcp)
 {
        int pid = tcp->pid;
        /*