summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorGravatar Karl Ramm <kcr@1ts.org>2009-08-09 18:42:32 +0000
committerGravatar Karl Ramm <kcr@1ts.org>2009-08-09 18:42:32 +0000
commit3bbec09537ba319a377be133ecaba1554743a07a (patch)
tree60bf1978061eb542b4df31eb421240d81b12a20c /server
parent1bf07a2719d3a1aa24e07921d455489e1f3e435c (diff)
it is the TWENTY-FIRST CENTURY, we can STOP USING K&R
Diffstat (limited to 'server')
-rw-r--r--server/access.c6
-rw-r--r--server/access.h6
-rw-r--r--server/acl.h10
-rw-r--r--server/class.c12
-rw-r--r--server/dispatch.c10
-rw-r--r--server/server.c50
-rw-r--r--server/timer.h10
-rw-r--r--server/uloc.c43
-rw-r--r--server/zstring.h12
9 files changed, 78 insertions, 81 deletions
diff --git a/server/access.c b/server/access.c
index a516f3d..9285b32 100644
--- a/server/access.c
+++ b/server/access.c
@@ -48,9 +48,9 @@ static const char rcsid_access_c[] =
#define ACL_IWS 4
#define ACL_IUI 8
-static void check_acl __P((Acl *acl));
-static void check_acl_type __P((Acl *acl, Access accesstype, int typeflag));
-static void access_setup __P((int first));
+static void check_acl(Acl *acl);
+static void check_acl_type(Acl *acl, Access accesstype, int typeflag);
+static void access_setup(int first);
/*
* check access. return 1 if ok, 0 if not ok.
diff --git a/server/access.h b/server/access.h
index fb26f37..d9802d0 100644
--- a/server/access.h
+++ b/server/access.h
@@ -31,11 +31,11 @@ typedef struct _Acl {
} Acl;
/* found in access.c */
-void access_init __P((void));
-void access_reinit __P((void));
+void access_init(void);
+void access_reinit(void);
/* found in acl_files.c */
-int acl_load __P((char *));
+int acl_load(char *);
/* external data relevant */
extern int zdebug;
diff --git a/server/acl.h b/server/acl.h
index 003c9f9..3e5984f 100644
--- a/server/acl.h
+++ b/server/acl.h
@@ -15,11 +15,11 @@
#ifndef __ACL__
#define __ACL__
-int acl_add __P((char *, char *));
-int acl_check __P((char *, char *));
-int acl_delete __P((char *, char *));
-int acl_initialize __P((char *, int));
-void acl_cache_reset __P((void));
+int acl_add(char *, char *);
+int acl_check(char *, char *);
+int acl_delete(char *, char *);
+int acl_initialize(char *, int);
+void acl_cache_reset(void);
#endif /* __ACL__ */
diff --git a/server/class.c b/server/class.c
index 63e4cbc..2f91934 100644
--- a/server/class.c
+++ b/server/class.c
@@ -80,13 +80,11 @@ static const char rcsid_class_c[] =
static Triplet *triplet_bucket[HASHSIZE]; /* the hash table of pointers */
-static Code_t remove_client __P((Triplet *triplet, Client *client,
- ZRealm *realm));
-static Code_t insert_client __P((Triplet *triplet, Client *client,
- ZRealm *realm));
-static Triplet *triplet_alloc __P((String *classname, String *inst,
- String *recipient));
-static void free_triplet __P((Triplet *));
+static Code_t remove_client(Triplet *triplet, Client *client, ZRealm *realm);
+static Code_t insert_client(Triplet *triplet, Client *client, ZRealm *realm);
+static Triplet *triplet_alloc(String *classname, String *inst,
+ String *recipient);
+static void free_triplet(Triplet *);
/* public routines */
diff --git a/server/dispatch.c b/server/dispatch.c
index 40a870d..cdc589c 100644
--- a/server/dispatch.c
+++ b/server/dispatch.c
@@ -76,11 +76,11 @@ String *class_control, *class_admin, *class_hm, *class_ulogin, *class_ulocate;
int rexmit_times[] = REXMIT_TIMES;
-static void nack_cancel __P((ZNotice_t *, struct sockaddr_in *));
-static void dispatch __P((ZNotice_t *, int, struct sockaddr_in *, int));
-static int send_to_dest __P((ZNotice_t *, int, Destination *dest, int, int));
-static void hostm_deathgram __P((struct sockaddr_in *, Server *));
-static char *hm_recipient __P((void));
+static void nack_cancel(ZNotice_t *, struct sockaddr_in *);
+static void dispatch(ZNotice_t *, int, struct sockaddr_in *, int);
+static int send_to_dest(ZNotice_t *, int, Destination *dest, int, int);
+static void hostm_deathgram(struct sockaddr_in *, Server *);
+static char *hm_recipient(void);
Statistic realm_notices = {0, "inter-realm notices"};
Statistic interserver_notices = {0, "inter-server notices"};
diff --git a/server/server.c b/server/server.c
index 2c170a7..b3b5911 100644
--- a/server/server.c
+++ b/server/server.c
@@ -72,31 +72,31 @@ srv_nacktab_hashval(int which, ZUnique_Id_t uid) {
* void server_reset();
*/
-static void server_flush __P((Server *));
-static void hello_respond __P((struct sockaddr_in *, int, int));
-static void srv_responded __P((struct sockaddr_in *));
-static void send_msg __P((struct sockaddr_in *, char *, int));
-static void send_msg_list __P((struct sockaddr_in *, char *, char **, int,
- int));
-static void srv_nack_cancel __P((ZNotice_t *, struct sockaddr_in *));
-static void srv_nack_release __P((Server *));
-static void srv_nack_renumber __P((int *));
-static void send_stats __P((struct sockaddr_in *));
-static void server_queue __P((Server *, int, void *, int,
- struct sockaddr_in *));
-static void server_hello __P((Server *, int));
-static void setup_server __P((Server *, struct in_addr *));
-static void srv_rexmit __P((void *));
-static void server_forw_reliable __P((Server *, caddr_t, int, ZNotice_t *));
-static Code_t admin_dispatch __P((ZNotice_t *, int, struct sockaddr_in *,
- Server *));
-static Code_t kill_clt __P((ZNotice_t *, Server *));
-static Code_t extract_addr __P((ZNotice_t *, struct sockaddr_in *));
-
-static struct in_addr *get_server_addrs __P((int *number));
-static char **get_server_list __P((char *file));
-static char **get_single_server __P((void));
-static void free_server_list __P((char **list));
+static void server_flush(Server *);
+static void hello_respond(struct sockaddr_in *, int, int);
+static void srv_responded(struct sockaddr_in *);
+static void send_msg(struct sockaddr_in *, char *, int);
+static void send_msg_list(struct sockaddr_in *, char *, char **, int,
+ int);
+static void srv_nack_cancel(ZNotice_t *, struct sockaddr_in *);
+static void srv_nack_release(Server *);
+static void srv_nack_renumber (int *);
+static void send_stats(struct sockaddr_in *);
+static void server_queue(Server *, int, void *, int,
+ struct sockaddr_in *);
+static void server_hello(Server *, int);
+static void setup_server(Server *, struct in_addr *);
+static void srv_rexmit(void *);
+static void server_forw_reliable(Server *, caddr_t, int, ZNotice_t *);
+static Code_t admin_dispatch(ZNotice_t *, int, struct sockaddr_in *,
+ Server *);
+static Code_t kill_clt(ZNotice_t *, Server *);
+static Code_t extract_addr(ZNotice_t *, struct sockaddr_in *);
+
+static struct in_addr *get_server_addrs(int *number);
+static char **get_server_list(char *file);
+static char **get_single_server(void);
+static void free_server_list(char **list);
static Unacked *srv_nacktab[SRV_NACKTAB_HASHSIZE];
Server *otherservers; /* points to an array of the known
diff --git a/server/timer.h b/server/timer.h
index 77595be..67ec93f 100644
--- a/server/timer.h
+++ b/server/timer.h
@@ -44,11 +44,11 @@ typedef struct _Timer {
void *arg;
} Timer;
-Timer *timer_set_rel __P((long, timer_proc, void *));
-Timer *timer_set_abs __P((long, timer_proc, void *));
-void timer_reset __P((Timer *));
-void timer_process __P((void));
-struct timeval *timer_timeout __P((struct timeval *tvbuf));
+Timer *timer_set_rel(long, timer_proc, void *);
+Timer *timer_set_abs(long, timer_proc, void *);
+void timer_reset(Timer *);
+void timer_process(void);
+struct timeval *timer_timeout(struct timeval *tvbuf);
#endif /* __TIMER_H */
diff --git a/server/uloc.c b/server/uloc.c
index cb19b6c..a85df05 100644
--- a/server/uloc.c
+++ b/server/uloc.c
@@ -83,28 +83,27 @@ typedef struct _Location {
#define QUIET -1
#define UNAUTH -2
-static void ulogin_locate __P((ZNotice_t *notice, struct sockaddr_in *who,
- int auth)),
-ulogin_flush_user __P((ZNotice_t *notice));
-static Location *ulogin_find __P((char *user, struct in_addr *host,
- unsigned int port));
-static Location *ulogin_find_user __P((char *user));
-static int ulogin_setup __P((ZNotice_t *notice, Location *locs,
- Exposure_type exposure, struct sockaddr_in *who)),
-ulogin_add_user __P((ZNotice_t *notice, Exposure_type exposure,
- struct sockaddr_in *who)),
-ulogin_parse __P((ZNotice_t *notice, Location *locs));
-static Exposure_type ulogin_remove_user __P((ZNotice_t *notice,
- struct sockaddr_in *who,
- int *err_return));
-static void login_sendit __P((ZNotice_t *notice, int auth,
- struct sockaddr_in *who, int external));
-static char **ulogin_marshal_locs __P((ZNotice_t *notice, int *found,
- int auth));
-
-static void free_loc __P((Location *loc));
-static void ulogin_locate_forward __P((ZNotice_t *notice,
- struct sockaddr_in *who, ZRealm *realm));
+static void ulogin_locate(ZNotice_t *notice, struct sockaddr_in *who,
+ int auth);
+static void ulogin_flush_user(ZNotice_t *notice);
+static Location *ulogin_find(char *user, struct in_addr *host,
+ unsigned int port);
+static Location *ulogin_find_user(char *user);
+static int ulogin_setup(ZNotice_t *notice, Location *locs,
+ Exposure_type exposure, struct sockaddr_in *who);
+static int ulogin_add_user(ZNotice_t *notice, Exposure_type exposure,
+ struct sockaddr_in *who);
+static int ulogin_parse(ZNotice_t *notice, Location *locs);
+static Exposure_type ulogin_remove_user(ZNotice_t *notice,
+ struct sockaddr_in *who,
+ int *err_return);
+static void login_sendit(ZNotice_t *notice, int auth,
+ struct sockaddr_in *who, int external);
+static char **ulogin_marshal_locs(ZNotice_t *notice, int *found, int auth);
+
+static void free_loc(Location *loc);
+static void ulogin_locate_forward(ZNotice_t *notice, struct sockaddr_in *who,
+ ZRealm *realm);
static Location *locations = NULL; /* ptr to first in array */
static int num_locs = 0; /* number in array */
diff --git a/server/zstring.h b/server/zstring.h
index f0889a6..127c95b 100644
--- a/server/zstring.h
+++ b/server/zstring.h
@@ -22,12 +22,12 @@ typedef struct _String
struct _String *next, *prev; /* for linking in hash table */
} String;
-String *make_string __P((char *s, int downcase));
-void free_string __P((String *z));
-String *find_string __P((char *s, int downcase));
-String *dup_string __P((String *z));
-int comp_string __P((String *a, String *b));
-void print_string_table __P((FILE *f));
+String *make_string(char *s, int downcase);
+void free_string(String *z);
+String *find_string(char *s, int downcase);
+String *dup_string(String *z);
+int comp_string(String *a, String *b);
+void print_string_table(FILE *f);
#endif /* __zstring_h */