From d812a6806306f9240be88fbf4c33a11191007e26 Mon Sep 17 00:00:00 2001 From: imp Date: Thu, 7 Feb 2002 04:39:05 +0000 Subject: o __P removal. o Use new prototypes and function definitions only. --- libexec/xtend/packet.c | 6 ++---- libexec/xtend/status.c | 9 +++++---- libexec/xtend/user.c | 14 +++++--------- libexec/xtend/xtend.c | 47 ++++++++++++++++++++++++++--------------------- libexec/xtend/xtend.h | 2 +- 5 files changed, 39 insertions(+), 39 deletions(-) (limited to 'libexec') diff --git a/libexec/xtend/packet.c b/libexec/xtend/packet.c index f3a4e04..9826cfb 100644 --- a/libexec/xtend/packet.c +++ b/libexec/xtend/packet.c @@ -59,8 +59,7 @@ char *X10cmdnames[] = { */ void -logpacket(p) -unsigned char *p; +logpacket(unsigned char *p) { fprintf(Log, "%s: %s %s ", thedate(), X10housenames[p[1]], X10cmdnames[p[2]]); @@ -77,8 +76,7 @@ unsigned char *p; */ void -processpacket(p) -unsigned char *p; +processpacket(unsigned char *p) { int i, j, h, k; STATUS *s; diff --git a/libexec/xtend/status.c b/libexec/xtend/status.c index 538f30b..3c26259 100644 --- a/libexec/xtend/status.c +++ b/libexec/xtend/status.c @@ -42,14 +42,14 @@ static const char rcsid[] = #include "xten.h" #include "paths.h" -void printstatus __P((FILE *, STATUS *)); +void printstatus(FILE *, STATUS *); /* * Initialize the status table from the status files */ void -initstatus() +initstatus(void) { if(lseek(status, 0, SEEK_SET) != 0) { fprintf(Log, "%s: Seek error on status file\n", thedate()); @@ -67,7 +67,7 @@ initstatus() */ void -checkpoint_status() +checkpoint_status(void) { int h, i, k, offset; @@ -108,7 +108,8 @@ checkpoint_status() int client; -void clientgone() +void +clientgone(void) { fprintf(Log, "%s: Deleting monitor table entry %d, client gone\n", thedate(), client); fclose(Monitor[client].user); diff --git a/libexec/xtend/user.c b/libexec/xtend/user.c index f2c0190..1200dd9 100644 --- a/libexec/xtend/user.c +++ b/libexec/xtend/user.c @@ -46,15 +46,15 @@ static const char rcsid[] = MONENTRY Monitor[MAXMON]; -int find __P((char *, char *[])); -void printstatus __P((FILE *, STATUS *)); +int find(char *, char *[]); +void printstatus(FILE *, STATUS *); /* * Process a user command */ int -user_command() +user_command(void) { char h; char *m; @@ -149,9 +149,7 @@ user_command() } int -find(s, tab) -char *s; -char *tab[]; +find(char *s, char *tab[]) { int i; @@ -162,9 +160,7 @@ char *tab[]; } void -printstatus(f, s) -FILE *f; -STATUS *s; +printstatus(FILE *f, STATUS *s) { fprintf(f, "%s:%d", s->onoff ? "On" : "Off", s->brightness); switch(s->selected) { diff --git a/libexec/xtend/xtend.c b/libexec/xtend/xtend.c index c136d63..c36aa88 100644 --- a/libexec/xtend/xtend.c +++ b/libexec/xtend/xtend.c @@ -75,22 +75,20 @@ volatile sig_atomic_t hup_flag; /* received SIGHUP flag */ volatile sig_atomic_t term_flag; /* received SIGTERM flag */ volatile sig_atomic_t pipe_flag; /* received SIGPIPE flag */ -void checkpoint_status __P((void)); -void dohup __P((void)); -void dopipe __P((void)); -void doterm __P((void)); -void initstatus __P((void)); -void logpacket __P((unsigned char *)); -void onhup __P((int)); -void onpipe __P((int)); -void onterm __P((int)); -void processpacket __P((unsigned char *)); -int user_command __P((void)); +void checkpoint_status(void); +void dohup(void); +void dopipe(void); +void doterm(void); +void initstatus(void); +void logpacket(unsigned char *); +void onhup(int); +void onpipe(int); +void onterm(int); +void processpacket(unsigned char *); +int user_command(void); int -main(argc, argv) -int argc; -char *argv[]; +main(int argc, char *argv[]) { const char *twpath = TWPATH; const char *sockpath = SOCKPATH; @@ -322,7 +320,8 @@ char *argv[]; /* Not reached */ } -char *thedate(void) +char * +thedate(void) { char *cp, *cp1; time_t tod; @@ -334,19 +333,22 @@ char *thedate(void) return(cp); } -void onhup(int signo) +void +onhup(int signo) { hup_flag = 1; } -void onterm(int signo) +void +onterm(int signo) { term_flag = 1; } -void onpipe(int signo) +void +onpipe(int signo) { pipe_flag = 1; @@ -356,7 +358,8 @@ void onpipe(int signo) * When SIGHUP received, close and reopen the Log file */ -void dohup(void) +void +dohup(void) { char logpath[MAXPATHLEN+1]; @@ -376,7 +379,8 @@ void dohup(void) * When SIGTERM received, just exit normally */ -void doterm(void) +void +doterm(void) { fprintf(Log, "%s: SIGTERM received, shutting down\n", thedate()); fclose(Log); @@ -388,7 +392,8 @@ void doterm(void) * When SIGPIPE received, reset user connection */ -void dopipe(void) +void +dopipe(void) { fprintf(Log, "%s: SIGPIPE received, resetting user connection\n", thedate()); diff --git a/libexec/xtend/xtend.h b/libexec/xtend/xtend.h index e338603..55f9c57 100644 --- a/libexec/xtend/xtend.h +++ b/libexec/xtend/xtend.h @@ -76,4 +76,4 @@ extern int status; /* Status file descriptor */ extern int tw523; /* tw523 controller */ extern MONENTRY Monitor[MAXMON];/* Monitor table */ -extern char *thedate(); +extern char *thedate(void); -- cgit v1.1