]> asedeno.scripts.mit.edu Git - 1ts-debian.git/commitdiff
first pass de-K&Rify lib
authorkcr <kcr@cbed1d16-5ef5-0310-b6a1-d4a37b08ba1f>
Sun, 20 Jan 2008 19:40:42 +0000 (19:40 +0000)
committerkcr <kcr@cbed1d16-5ef5-0310-b6a1-d4a37b08ba1f>
Sun, 20 Jan 2008 19:40:42 +0000 (19:40 +0000)
git-svn-id: svn://svn.1ts.org/debian/branches/zephyr-reloaded@244 cbed1d16-5ef5-0310-b6a1-d4a37b08ba1f

52 files changed:
zephyr/lib/ZAsyncLocate.c
zephyr/lib/ZCkAuth.c
zephyr/lib/ZCkIfNot.c
zephyr/lib/ZCkZAut.c
zephyr/lib/ZClosePort.c
zephyr/lib/ZCmpUID.c
zephyr/lib/ZCmpUIDP.c
zephyr/lib/ZFlsLocs.c
zephyr/lib/ZFlsSubs.c
zephyr/lib/ZFmtAuth.c
zephyr/lib/ZFmtList.c
zephyr/lib/ZFmtNotice.c
zephyr/lib/ZFmtRaw.c
zephyr/lib/ZFmtRawLst.c
zephyr/lib/ZFmtSmRLst.c
zephyr/lib/ZFmtSmRaw.c
zephyr/lib/ZFreeNot.c
zephyr/lib/ZGetLocs.c
zephyr/lib/ZGetSender.c
zephyr/lib/ZGetSubs.c
zephyr/lib/ZGetWGPort.c
zephyr/lib/ZIfNotice.c
zephyr/lib/ZInit.c
zephyr/lib/ZLocations.c
zephyr/lib/ZMakeAscii.c
zephyr/lib/ZMakeZcode.c
zephyr/lib/ZMkAuth.c
zephyr/lib/ZNewLocU.c
zephyr/lib/ZOpenPort.c
zephyr/lib/ZParseNot.c
zephyr/lib/ZPeekIfNot.c
zephyr/lib/ZPeekNot.c
zephyr/lib/ZPeekPkt.c
zephyr/lib/ZPending.c
zephyr/lib/ZReadAscii.c
zephyr/lib/ZReadZcode.c
zephyr/lib/ZRecvNot.c
zephyr/lib/ZRecvPkt.c
zephyr/lib/ZRetSubs.c
zephyr/lib/ZSendList.c
zephyr/lib/ZSendNot.c
zephyr/lib/ZSendPkt.c
zephyr/lib/ZSendRLst.c
zephyr/lib/ZSendRaw.c
zephyr/lib/ZSetDest.c
zephyr/lib/ZSetFD.c
zephyr/lib/ZSetSrv.c
zephyr/lib/ZSubs.c
zephyr/lib/ZVariables.c
zephyr/lib/ZWait4Not.c
zephyr/lib/ZhmStat.c
zephyr/lib/Zinternal.c

index d248064805d5039a6b0d8ec1c7d3b9091209338f..41ecffbc7184ebb1b49433a59b201b88313299aa 100644 (file)
 static const char rcsid_ZAsyncLocate_c[] = "$Id$";
 #endif
 
-Code_t ZRequestLocations(user, zald, kind, auth)
-     char *user;
-     register ZAsyncLocateData_t *zald;
-     ZNotice_Kind_t kind;      /* UNSAFE, UNACKED, or ACKED */
-     Z_AuthProc auth;
+Code_t
+ZRequestLocations(char *user,
+                 register ZAsyncLocateData_t *zald,
+                 ZNotice_Kind_t kind,                /* UNSAFE, UNACKED, or ACKED */
+                 Z_AuthProc auth)
 {
     int retval;
     ZNotice_t notice;
@@ -57,11 +57,11 @@ Code_t ZRequestLocations(user, zald, kind, auth)
     return(ZERR_NONE);
 }
 
-Code_t ZParseLocations(notice,zald,nlocs,user)
-     register ZNotice_t *notice;
-     register ZAsyncLocateData_t *zald;
-     int *nlocs;
-     char **user;
+Code_t
+ZParseLocations(register ZNotice_t *notice,
+               register ZAsyncLocateData_t *zald,
+               int *nlocs,
+               char **user)
 {
     char *ptr, *end;
     int i;
@@ -149,16 +149,16 @@ Code_t ZParseLocations(notice,zald,nlocs,user)
     return (ZERR_NONE);
 }
 
-int ZCompareALDPred(notice, zald)
-     ZNotice_t *notice;
-     void *zald;
+int
+ZCompareALDPred(ZNotice_t *notice,
+               void *zald)
 {
     return(ZCompareUID(&(notice->z_multiuid),
                       &(((ZAsyncLocateData_t *) zald)->uid)));
 }
 
-void ZFreeALD(zald)
-     register ZAsyncLocateData_t *zald;
+void
+ZFreeALD(register ZAsyncLocateData_t *zald)
 {
    if (!zald) return;
 
index 4c83e6a4850d12f3a7299e7b371898c696d9a37d..040b198d828f6683f403290bf421634595d30483 100644 (file)
@@ -29,9 +29,9 @@ static char rcsid_ZCheckAuthentication_c[] =
    When not using Kerberos, return true if the notice claims to be authentic.
    Only used by clients; the server uses its own routine.
  */
-Code_t ZCheckAuthentication(notice, from)
-    ZNotice_t *notice;
-    struct sockaddr_in *from;
+Code_t
+ZCheckAuthentication(ZNotice_t *notice,
+                    struct sockaddr_in *from)
 {
 #if 0
 #if defined(HAVE_KRB4) || defined(HAVE_KRB5)
index fcc9546ae1c6217841a570b2bc622ed047631d85..e8fcaf21f2c8e4f80becde8533c43ee6ccd772da 100644 (file)
 static const char rcsid_ZCheckIfNotice_c[] = "$Id$";
 #endif
 
-Code_t ZCheckIfNotice(notice, from, predicate, args)
-    ZNotice_t *notice;
-    struct sockaddr_in *from;
-    register int (*predicate) __P((ZNotice_t *, void *));
-    void *args;
+Code_t
+ZCheckIfNotice(ZNotice_t *notice,
+              struct sockaddr_in *from,
+              register int (*predicate)(ZNotice_t *, void *),
+              void *args)
 {
     ZNotice_t tmpnotice;
     Code_t retval;
index 069c1ea83e2c976cd7c3b7398b2550509ed55f1e..470e20d9dc0b9e413851dff01faa15a8184b3d16 100644 (file)
@@ -31,9 +31,8 @@ static char rcsid_ZCheckAuthentication_c[] =
    When not using Kerberos, return true if the notice claims to be authentic.
    Only used by clients; the server uses its own routine.
  */
-Code_t ZCheckZcodeAuthentication(notice, from)
-    ZNotice_t *notice;
-    struct sockaddr_in *from;
+Code_t ZCheckZcodeAuthentication(ZNotice_t *notice,
+                                struct sockaddr_in *from)
 {      
     /* If the value is already known, return it. */
     if (notice->z_checked_auth != ZAUTH_UNSET)
index f2498692c444ce75e3c5cd7b21e37c087e5542bc..bd212b4844a52b73d9c0e06ec6e736f67f548759 100644 (file)
@@ -16,7 +16,8 @@
 static const char rcsid_ZClosePort_c[] = "$Id$";
 #endif
 
-Code_t ZClosePort()
+Code_t
+ZClosePort(void)
 {
     if (__Zephyr_fd >= 0 && __Zephyr_open)
        (void) close(__Zephyr_fd);
index 96ad9783c2dad1dc846c7c654c9ea1531ac0a0b5..53ef45056679ea4f514368960279054eb928a508 100644 (file)
@@ -16,8 +16,9 @@ static char rcsid_ZCompareUID_c[] = "$Id$";
 
 #include <internal.h>
 
-int ZCompareUID(uid1, uid2)
-    ZUnique_Id_t *uid1, *uid2;
+int
+ZCompareUID(ZUnique_Id_t *uid1,
+           ZUnique_Id_t *uid2)
 {
     return (!memcmp((char *)uid1, (char *)uid2, sizeof (*uid1)));
 }
index 19cbc167606ebaf9f6042c0eafddb200d7b5af04..087fc33359cee32b63ecc16b3d07b65412bdfe59 100644 (file)
@@ -16,16 +16,16 @@ static char rcsid_ZCompareUIDPred_c[] = "$Id$";
 
 #include <internal.h>
 
-int ZCompareUIDPred(notice, uid)
-    ZNotice_t *notice;
-    void *uid;
+int
+ZCompareUIDPred(ZNotice_t *notice,
+               void *uid)
 {
     return (ZCompareUID(&notice->z_uid, (ZUnique_Id_t *) uid));
 }
 
-int ZCompareMultiUIDPred(notice, uid)
-    ZNotice_t *notice;
-    void *uid;
+int
+ZCompareMultiUIDPred(ZNotice_t *notice,
+                    void *uid)
 {
     return (ZCompareUID(&notice->z_multiuid, (ZUnique_Id_t *) uid));
 }
index 58c33465975008036889a6b6dfcbbe4656455906..0e533ae8717bd83d91e9925fb88e66c62ed72e55 100644 (file)
@@ -16,7 +16,8 @@ static char rcsid_ZFlushLocations_c[] = "$Id$";
 
 #include <internal.h>
 
-Code_t ZFlushLocations()
+Code_t
+ZFlushLocations(void)
 {
        int i;
        
index 7ea5ef4a8f6fc511f6da71bd9d710f6b0d2f4745..ae379494655f71a699aae79217c102f489f7e32b 100644 (file)
@@ -16,7 +16,8 @@
 static const char rcsid_ZFlushSubscriptions_c[] = "$Id$";
 #endif
 
-Code_t ZFlushSubscriptions()
+Code_t
+ZFlushSubscriptions(void)
 {
        register int i;
        
index 97a70f25c861630b9f6798bcb23c239100fa78e5..1e19f2f6c9e2c74f94751728ef5afb30da6c0ad4 100644 (file)
@@ -17,12 +17,12 @@ static char rcsid_ZFormatAuthenticNotice_c[] = "$Id$";
 #include <internal.h>
 
 #if defined(HAVE_KRB4) || defined(HAVE_KRB5)
-Code_t ZFormatAuthenticNotice(notice, buffer, buffer_len, len, session)
-    ZNotice_t *notice;
-    register char *buffer;
-    register int buffer_len;
-    int *len;
-    C_Block session;
+Code_t
+ZFormatAuthenticNotice(ZNotice_t *notice,
+                      register char *buffer,
+                      register int buffer_len,
+                      int *len,
+                      C_Block session)
 {
     ZNotice_t newnotice;
     char *ptr;
@@ -64,12 +64,12 @@ Code_t ZFormatAuthenticNotice(notice, buffer, buffer_len, len, session)
 #endif
 
 #ifdef HAVE_KRB5
-Code_t ZFormatAuthenticNoticeV5(notice, buffer, buffer_len, len, keyblock)
-    ZNotice_t *notice;
-    register char *buffer;
-    register int buffer_len;
-    int *len;
-    krb5_keyblock *keyblock;
+Code_t
+ZFormatAuthenticNoticeV5(ZNotice_t *notice,
+                        register char *buffer,
+                        register int buffer_len,
+                        int *len,
+                        krb5_keyblock *keyblock)
 {
     ZNotice_t newnotice;
     char *ptr;
index d0adbdc8df50be32a9c5d053983dab70d299f789..adad0fba1b88f0af439b635b5bcf9455aa8dfe60 100644 (file)
@@ -17,14 +17,13 @@ static const char rcsid_ZFormatNoticeList_c[] =
     "$Id$";
 #endif
 
-Code_t ZFormatNoticeList(notice, list, nitems, buffer, ret_len, 
-                        cert_routine)
-    ZNotice_t *notice;
-    register char **list;
-    int nitems;
-    char **buffer;
-    int *ret_len;
-    Z_AuthProc cert_routine;
+Code_t
+ZFormatNoticeList(ZNotice_t *notice,
+                 register char **list,
+                 int nitems,
+                 char **buffer,
+                 int *ret_len, 
+                 Z_AuthProc cert_routine)
 {
     char header[Z_MAXHEADERLEN];
     register int i;
index 0b9ca39aec07e835dec458dc7ada7aa3ad0e35e5..f0ad059867cd58d37d82dfabc04e160aa26e15b3 100644 (file)
@@ -16,11 +16,11 @@ static char rcsid_ZFormatNotice_c[] = "$Id$";
 
 #include <internal.h>
 
-Code_t ZFormatNotice(notice, buffer, ret_len, cert_routine)
-    register ZNotice_t *notice;
-    char **buffer;
-    int *ret_len;
-    Z_AuthProc cert_routine;
+Code_t
+ZFormatNotice(register ZNotice_t *notice,
+             char **buffer,
+             int *ret_len,
+             Z_AuthProc cert_routine)
 {
     char header[Z_MAXHEADERLEN];
     int hdrlen;
@@ -42,11 +42,11 @@ Code_t ZFormatNotice(notice, buffer, ret_len, cert_routine)
     return (ZERR_NONE);
 }
 
-Code_t ZNewFormatNotice(notice, buffer, ret_len, cert_routine)
-    register ZNotice_t *notice;
-    char **buffer;
-    int *ret_len;
-    Z_AuthProc cert_routine;
+Code_t
+ZNewFormatNotice(register ZNotice_t *notice,
+                char **buffer,
+                int *ret_len,
+                Z_AuthProc cert_routine)
 {
     char header[Z_MAXHEADERLEN];
     int hdrlen;
index 2940f98f30647668db9d65969dc01a5e0c948828..c56d747fbc5831830e9cc4ea372c6c8ea92608ad 100644 (file)
@@ -16,10 +16,10 @@ static char rcsid_ZFormatRawNotice_c[] = "$Id$";
 
 #include <internal.h>
 
-Code_t ZFormatRawNotice(notice, buffer, ret_len)
-    register ZNotice_t *notice;
-    char **buffer;
-    int *ret_len;
+Code_t
+ZFormatRawNotice(register ZNotice_t *notice,
+                char **buffer,
+                int *ret_len)
 {
     char header[Z_MAXHEADERLEN];
     int hdrlen;
index 7d83f71149186950946187188253c813d800a813..470b01f769a7f27c938bd6b2dd7a078d74546869 100644 (file)
@@ -16,12 +16,12 @@ static char rcsid_ZFormatRawNoticeList_c[] = "$Id$";
 
 #include <internal.h>
 
-Code_t ZFormatRawNoticeList(notice, list, nitems, buffer, ret_len)
-    ZNotice_t *notice;
-    char *list[];
-    int nitems;
-    char **buffer;
-    int *ret_len;
+Code_t
+ZFormatRawNoticeList(ZNotice_t *notice,
+                    char *list[],
+                    int nitems,
+                    char **buffer,
+                    int *ret_len)
 {
     char header[Z_MAXHEADERLEN];
     int hdrlen, i, size;
index 6e412853129450f35f3a77f1375c99f505d812e2..cc5177afc599c880f6c2570a659e500696e48ede 100644 (file)
@@ -16,12 +16,12 @@ static char rcsid_ZFormatRawNoticeList_c[] = "$Id$";
 
 #include <internal.h>
 
-Code_t ZFormatSmallRawNoticeList(notice, list, nitems, buffer, ret_len)
-    ZNotice_t *notice;
-    char *list[];
-    int nitems;
-    ZPacket_t buffer;
-    int *ret_len;
+Code_t
+ZFormatSmallRawNoticeList(ZNotice_t *notice,
+                         char *list[],
+                         int nitems,
+                         ZPacket_t buffer,
+                         int *ret_len)
 {
     Code_t retval;
     int hdrlen, i, size;
index 0fcd74ca15cf26c5d660cd71926549f4e6f3bc71..3f23d62ba4a12da0993413b21777fed084c964bd 100644 (file)
@@ -16,10 +16,10 @@ static char rcsid_ZFormatRawNotice_c[] = "$Id$";
 
 #include <internal.h>
 
-Code_t ZFormatSmallRawNotice(notice, buffer, ret_len)
-    ZNotice_t *notice;
-    ZPacket_t buffer;
-    int *ret_len;
+Code_t
+ZFormatSmallRawNotice(ZNotice_t *notice,
+                     ZPacket_t buffer,
+                     int *ret_len)
 {
     Code_t retval;
     int hdrlen;
@@ -38,10 +38,10 @@ Code_t ZFormatSmallRawNotice(notice, buffer, ret_len)
     return (ZERR_NONE);
 }
 
-Code_t ZNewFormatSmallRawNotice(notice, buffer, ret_len)
-     ZNotice_t *notice;
-     ZPacket_t buffer;
-     int *ret_len;
+Code_t
+ZNewFormatSmallRawNotice(ZNotice_t *notice,
+                        ZPacket_t buffer,
+                        int *ret_len)
 {
   Code_t retval;
   int hdrlen;
index f5ce36098ed22791a3bbf6fd86bed1032690f1c9..355d0e3e03b9b8744222758c0481e33471318dd6 100644 (file)
@@ -16,8 +16,8 @@ static char rcsid_ZFreeNotice_c[] = "$Id$";
 
 #include <internal.h>
 
-Code_t ZFreeNotice(notice)
-    ZNotice_t *notice;
+Code_t
+ZFreeNotice(ZNotice_t *notice)
 {
     free(notice->z_packet);
     return 0;
index d32d53cae35a758beafcfd0bdb3e011e5cd062a9..cbc07fb022d73c83b216c3881bb6f71c6b48de21 100644 (file)
@@ -18,9 +18,9 @@ static char rcsid_ZGetLocations_c[] = "$Id$";
 
 #define min(a,b) ((a)<(b)?(a):(b))
        
-Code_t ZGetLocations(location, numlocs)
-    ZLocations_t *location;
-    int *numlocs;
+Code_t
+ZGetLocations(ZLocations_t *location,
+             int *numlocs)
 {
     int i;
        
index f62619d8ce2137b19c15f9f35f993bd1e63b9697..09ca742237ff1dfd637112ed5bede79cf39716a5 100644 (file)
@@ -19,7 +19,8 @@ static const char rcsid_ZGetSender_c[] =
 
 #include <pwd.h>
 
-char *ZGetSender()
+char *
+ZGetSender(void)
 {
     struct passwd *pw;
     static char *sender = NULL;
index b0c29b1305404bc57273850851cf5aa572ad73ae..a76226228a0fd79e85abdc9e561b2eb7adce9658 100644 (file)
@@ -18,9 +18,9 @@ static char rcsid_ZGetSubscriptions_c[] = "$Id$";
 
 #define min(a,b) ((a)<(b)?(a):(b))
        
-Code_t ZGetSubscriptions(subscription, numsubs)
-    ZSubscription_t *subscription;
-    int *numsubs;
+Code_t
+ZGetSubscriptions(ZSubscription_t *subscription,
+                 int *numsubs)
 {
     int i;
        
index 8f8fcc9db9794dc22ebe02a3effa4dc052710de3..ad3b483a539e738e66ecd7744b8bffa5908bcc8a 100644 (file)
@@ -16,7 +16,8 @@ static char rcsid_ZGetWGPort_c[] = "$Id$";
 
 #include <internal.h>
 
-int ZGetWGPort()
+int
+ZGetWGPort(void)
 {
     char *envptr, name[128];
     FILE *fp;
index b42138ec5e1d113e08dc4da63f9ff4d7105f4aab..a3652b5610abefdc58f42c96b898d0562516bd04 100644 (file)
 static const char rcsid_ZIfNotice_c[] = "$Id$";
 #endif
 
-Code_t ZIfNotice(notice, from, predicate, args)
-    ZNotice_t *notice;
-    struct sockaddr_in *from;
-    int (*predicate) __P((ZNotice_t *, void *));
-    void *args;
+Code_t
+ZIfNotice(ZNotice_t *notice,
+         struct sockaddr_in *from,
+         int (*predicate)(ZNotice_t *, void *),
+         void *args)
 {
     ZNotice_t tmpnotice;
     Code_t retval;
index 16d266ebdff417b383db20cd1c0d5c65e2eda991..d14543ca3e3321c833571a994749a2d133f8fdb2 100644 (file)
@@ -32,7 +32,8 @@ static char rcsid_ZInitialize_c[] =
 #define INADDR_NONE 0xffffffff
 #endif
 
-Code_t ZInitialize()
+Code_t
+ZInitialize(void)
 {
     struct servent *hmserv;
     struct hostent *hostent;
index e157342f5785137600231c990188116cc2718c12..9b580bcb7ed1bbd360a8b8a051f1c2abdb018f1a 100644 (file)
@@ -23,9 +23,9 @@ static char rcsid_ZLocations_c[] =
 static char host[MAXHOSTNAMELEN], mytty[MAXPATHLEN];
 static int location_info_set = 0;
 
-Code_t ZInitLocationInfo(hostname, tty)
-    char *hostname;
-    char *tty;
+Code_t
+ZInitLocationInfo(char *hostname,
+                 char *tty)
 {
     char *ttyp, *p;
     struct hostent *hent;
@@ -56,26 +56,28 @@ Code_t ZInitLocationInfo(hostname, tty)
     return (ZERR_NONE);
 }
 
-Code_t ZSetLocation(exposure)
-    char *exposure;
+Code_t
+ZSetLocation(char *exposure)
 {
     return (Z_SendLocation(LOGIN_CLASS, exposure, ZAUTH, 
                           "$sender logged in to $1 on $3 at $2"));
 }
 
-Code_t ZUnsetLocation()
+Code_t
+ZUnsetLocation(void)
 {
     return (Z_SendLocation(LOGIN_CLASS, LOGIN_USER_LOGOUT, ZNOAUTH, 
                           "$sender logged out of $1 on $3 at $2"));
 }
 
-Code_t ZFlushMyLocations()
+Code_t
+ZFlushMyLocations(void)
 {
     return (Z_SendLocation(LOGIN_CLASS, LOGIN_USER_FLUSH, ZAUTH, ""));
 }
 
-char *ZParseExposureLevel(text)
-     char *text;
+char *
+ZParseExposureLevel(char *text)
 {
     if (!strcasecmp(text, EXPOSE_NONE))
        return (EXPOSE_NONE);
@@ -93,11 +95,11 @@ char *ZParseExposureLevel(text)
        return(NULL);
 }
 
-Code_t Z_SendLocation(class, opcode, auth, format)
-    char *class;
-    char *opcode;
-    Z_AuthProc auth;
-    char *format;
+Code_t
+Z_SendLocation(char *class,
+              char *opcode,
+              Z_AuthProc auth,
+              char *format)
 {
     int retval;
     time_t ourtime;
index d188536c6a81807ac6f98669de4e3ab4b4181ffc..cd0e24bef69e2df443cdfca9f69ef479b00c1e7e 100644 (file)
@@ -19,11 +19,11 @@ static const char rcsid_ZMakeAscii_c[] = "$Id$";
 
 static char *itox_chars = "0123456789ABCDEF";
 
-Code_t ZMakeAscii(ptr, len, field, num)
-    register char *ptr;
-    int len;
-    unsigned char *field;
-    int num;
+Code_t
+ZMakeAscii(register char *ptr,
+          int len,
+          unsigned char *field,
+          int num)
 {
     int i;
 
@@ -52,10 +52,10 @@ Code_t ZMakeAscii(ptr, len, field, num)
     return ZERR_NONE;
 }
 
-Code_t ZMakeAscii32(ptr, len, value)
-    register char *ptr;
-    int len;
-    unsigned long value;
+Code_t
+ZMakeAscii32(register char *ptr,
+            int len,
+            unsigned long value)
 {
     if (len < 11)
        return ZERR_FIELDLEN;
@@ -73,10 +73,10 @@ Code_t ZMakeAscii32(ptr, len, value)
     return ZERR_NONE;
 }
 
-Code_t ZMakeAscii16(ptr, len, value)
-    register char *ptr;
-    int len;
-    unsigned int value;
+Code_t
+ZMakeAscii16(register char *ptr,
+            int len,
+            unsigned int value)
 {
     if (len < 7)
        return ZERR_FIELDLEN;
index 6229bef544710fbdcef07089d48f2cedc1a32c41..85c6f9dd66f8db4eac403a40d8c01d846ee2114e 100644 (file)
 static const char rcsid_ZMakeZcode_c[] = "$Id$";
 #endif
 
-Code_t ZMakeZcode32(ptr, len, val)
-    char *ptr;
-    int len;
-    unsigned long val;
+Code_t
+ZMakeZcode32(char *ptr,
+            int len,
+            unsigned long val)
 {
     unsigned char buf[4];
     buf[0] = (val >> 24) & 0xff;
@@ -30,11 +30,11 @@ Code_t ZMakeZcode32(ptr, len, val)
     return ZMakeZcode(ptr, len, buf, 4);
 }
 
-Code_t ZMakeZcode(ptr, len, field, num)
-    register char *ptr;
-    int len;
-    unsigned char *field;
-    int num;
+Code_t
+ZMakeZcode(register char *ptr,
+          int len,
+          unsigned char *field,
+          int num)
 {
     int i;
 
index 92d0bd3a5944113cd0ede058512b4f95da4ce954..468bc0535968be33650de2fc7c82ecaa0bf26bb6 100644 (file)
@@ -24,15 +24,17 @@ static const char rcsid_ZMakeAuthentication_c[] = "$Id$";
 #define krb5_free_data(ctx, dat) free((dat)->data)
 #endif
 
-Code_t ZResetAuthentication () {
+Code_t
+ZResetAuthentication(void)
+{
     return ZERR_NONE;
 }
 
-Code_t ZMakeAuthentication(notice, buffer, buffer_len, len)
-    register ZNotice_t *notice;
-    char *buffer;
-    int buffer_len;
-    int *len;
+Code_t
+ZMakeAuthentication(register ZNotice_t *notice,
+                   char *buffer,
+                   int buffer_len,
+                   int *len)
 {
 #if 1
     return ZMakeZcodeAuthentication(notice, buffer, buffer_len, len/*?XXX*/);
@@ -119,23 +121,22 @@ Code_t ZMakeAuthentication(notice, buffer, buffer_len, len)
 #endif
 }
 
-Code_t ZMakeZcodeAuthentication(notice, buffer, buffer_len, phdr_len)
-    register ZNotice_t *notice;
-    char *buffer;
-    int buffer_len;
-    int *phdr_len;
+Code_t
+ZMakeZcodeAuthentication(register ZNotice_t *notice,
+                        char *buffer,
+                        int buffer_len,
+                        int *phdr_len)
 {
     return ZMakeZcodeRealmAuthentication(notice, buffer, buffer_len, phdr_len,
                                         __Zephyr_realm);
 }
 
-Code_t ZMakeZcodeRealmAuthentication(notice, buffer, buffer_len, phdr_len, 
-                                    realm)
-    register ZNotice_t *notice;
-    char *buffer;
-    int buffer_len;
-    int *phdr_len;
-    char *realm;
+Code_t
+ZMakeZcodeRealmAuthentication(register ZNotice_t *notice,
+                             char *buffer,
+                             int buffer_len,
+                             int *phdr_len, 
+                             char *realm)
 {
 #ifdef HAVE_KRB5
     krb5_error_code result;
@@ -221,11 +222,16 @@ Code_t ZMakeZcodeRealmAuthentication(notice, buffer, buffer_len, phdr_len,
 }
 
 #ifdef HAVE_KRB5
-int ZGetCreds(krb5_creds **creds_out) {
+int
+ZGetCreds(krb5_creds **creds_out)
+{
   return ZGetCredsRealm(creds_out, __Zephyr_realm);
 }
 
-int ZGetCredsRealm(krb5_creds **creds_out, char *realm) {
+int
+ZGetCredsRealm(krb5_creds **creds_out,
+              char *realm)
+{
   krb5_creds creds_in;
   krb5_ccache ccache; /* XXX make this a global or static?*/
   int result;
index 9ad620d5ce734d8ec16dab0c9c6b272797e3bb07..c598c2695f2b222984e96492be9ea9a795d8d7b0 100644 (file)
@@ -17,10 +17,10 @@ static const char rcsid_ZNewLocateUser_c[] =
     "$Id$";
 #endif
 
-Code_t ZLocateUser(user, nlocs, auth)
-    char *user;
-    int *nlocs;
-    Z_AuthProc auth;
+Code_t
+ZLocateUser(char *user,
+           int *nlocs,
+           Z_AuthProc auth)
 {
     Code_t retval;
     ZNotice_t notice;
index 75cec22736c6e301cea699e58c2884609a0cf45f..44bf871496587591e9a77751813d6f7df713f533 100644 (file)
@@ -17,8 +17,8 @@ static char rcsid_ZOpenPort_c[] = "$Id$";
 #include <internal.h>
 #include <sys/socket.h>
 
-Code_t ZOpenPort(port)
-    u_short *port;
+Code_t
+ZOpenPort(u_short *port)
 {
     struct sockaddr_in bindin;
     int len;
index a1988450f00bd03cee9c264658be93f7b1b85d2f..7202c472361b795c7d6af15f8f256f336b5bd840 100644 (file)
@@ -18,8 +18,9 @@ static char rcsid_ZParseNotice_c[] =
 #include <internal.h>
 
 /* Skip to the next NUL-terminated field in the packet. */
-static char *next_field(ptr, end)
-    char *ptr, *end;
+static char *
+next_field(char *ptr,
+          char *end)
 {
     while (ptr < end && *ptr != '\0')
        ptr++;
@@ -28,10 +29,10 @@ static char *next_field(ptr, end)
     return (ptr);
 }
 
-Code_t ZParseNotice(buffer, len, notice)
-    char *buffer;
-    int len;
-    ZNotice_t *notice;
+Code_t
+ZParseNotice(char *buffer,
+            int len,
+            ZNotice_t *notice)
 {
     char *ptr, *end;
     unsigned long temp;
index b63b57c9e5ba96bc65d26e27a079adec7678ef0a..bd643f8f5bcc81b8a383fc62f119a74a3d363cae 100644 (file)
@@ -16,11 +16,11 @@ static char rcsid_ZPeekIfNotice_c[] = "$Id$";
 
 #include <internal.h>
 
-Code_t ZPeekIfNotice(notice, from, predicate, args)
-    ZNotice_t *notice;
-    struct sockaddr_in *from;
-    int (*predicate)();
-    char *args;
+Code_t
+ZPeekIfNotice(ZNotice_t *notice,
+             struct sockaddr_in *from,
+             int (*predicate)(ZNotice_t *, char *),
+             char *args)
 {
     ZNotice_t tmpnotice;
     Code_t retval;
index f97e8553e0e6d32eeb897e3c0ca9e207dfd3c7c9..679382e7e35b933c456577e79ed3204df68e3a2d 100644 (file)
@@ -16,9 +16,9 @@ static char rcsid_ZPeekNotice_c[] = "$Id$";
 
 #include <internal.h>
 
-Code_t ZPeekNotice(notice, from)
-    ZNotice_t *notice;
-    struct sockaddr_in *from;
+Code_t
+ZPeekNotice(ZNotice_t *notice,
+           struct sockaddr_in *from)
 {
     char *buffer;
     int len;
index 2d9375891331aeb773c6661351d91203be2c2bad..6b89f9ea57fb9332e35440ed0bf608142f7adc5a 100644 (file)
@@ -16,10 +16,10 @@ static char rcsid_ZPeekPacket_c[] = "$Id$";
 
 #include <internal.h>
 
-Code_t ZPeekPacket(buffer, ret_len, from)
-    char **buffer;
-    int *ret_len;
-    struct sockaddr_in *from;
+Code_t
+ZPeekPacket(char **buffer,
+           int *ret_len,
+           struct sockaddr_in *from)
 {
     Code_t retval;
     struct _Z_InputQ *nextq;
index 05c8ba0c199d210cfaeb9ec4207b699ee83aea86..b6cd5374f66f2182d4a5b2d97ea3cd87bf4e44e0 100644 (file)
@@ -16,7 +16,8 @@ static char rcsid_ZPending_c[] = "$Id$";
 
 #include <internal.h>
 
-int ZPending()
+int
+ZPending(void)
 {
        int retval;
        
index 53037cb86428bae165232a6b8f6488b612cd6866..ee45b9c915226ab92d36c7dc14f9f368910025f8 100644 (file)
@@ -34,11 +34,11 @@ Z_cnvt_xtoi (char c)
 
 #define Z_cnvt_xtoi(c)  ((temp=(c)-'0'),(temp<10)?temp:((temp-='A'-'9'-1),(temp<16)?temp:-1))
 
-Code_t ZReadAscii(ptr, len, field, num)
-    char *ptr;
-    int len;
-    unsigned char *field;
-    int num;
+Code_t
+ZReadAscii(char *ptr,
+          int len,
+          unsigned char *field,
+          int num)
 {
     int i;
     unsigned int hexbyte;
@@ -71,10 +71,10 @@ Code_t ZReadAscii(ptr, len, field, num)
     return *ptr ? ZERR_BADFIELD : ZERR_NONE;
 }
 
-Code_t ZReadAscii32(ptr, len, value_ptr)
-    char *ptr;
-    int len;
-    unsigned long *value_ptr;
+Code_t
+ZReadAscii32(char *ptr,
+            int len,
+            unsigned long *value_ptr)
 {
     unsigned char buf[4];
     Code_t retval;
@@ -86,10 +86,10 @@ Code_t ZReadAscii32(ptr, len, value_ptr)
     return ZERR_NONE;
 }
 
-Code_t ZReadAscii16(ptr, len, value_ptr)
-    char *ptr;
-    int len;
-    unsigned short *value_ptr;
+Code_t
+ZReadAscii16(char *ptr,
+            int len,
+            unsigned short *value_ptr)
 {
     unsigned char buf[2];
     Code_t retval;
index ed3a283172ce452b9771ec4779cf9d43631db91a..93d651d5922b7cbcb16916ce2cc81363a2353e6f 100644 (file)
@@ -20,7 +20,10 @@ static char rcsid_ZReadZcode_c[] = "$Id$";
 
 #if 0
 Code_t
-ZReadAsciiOrZcode(char *buf, int buflen, unsigned char *data, int datalen)
+ZReadAsciiOrZcode(char *buf,
+                 int buflen,
+                 unsigned char *data,
+                 int datalen)
 {
     if (buf[0] == 'Z')
         return ZReadZcode(buf, buflen, data, datalen);
@@ -28,19 +31,19 @@ ZReadAsciiOrZcode(char *buf, int buflen, unsigned char *data, int datalen)
         return ZReadAscii(buf, buflen, data, datalen);
 }
 
-Code_t ZReadZcode32(ptr, value_ptr)
-    unsigned char *ptr;
-    unsigned long *value_ptr;
+Code_t
+ZReadZcode32(unsigned char *ptr,
+            unsigned long *value_ptr)
 {
     abort();
 }
 #endif
 
-Code_t ZReadZcode(ptr, field, max, len)
-    unsigned char *ptr;
-    unsigned char *field;
-    int max;
-    int *len;
+Code_t
+ZReadZcode(unsigned char *ptr,
+          unsigned char *field,
+          int max,
+          int *len)
 {
     int n = 0;
 
index 27cba29605a0f85d1bba22bc82b6c5cdac9e9a03..b6bc4427c95eca036a453877c11cd865c655fdb6 100644 (file)
@@ -16,9 +16,9 @@ static char rcsid_ZReceiveNotice_c[] = "$Id$";
 
 #include <internal.h>
 
-Code_t ZReceiveNotice(notice, from)
-    ZNotice_t *notice;
-    struct sockaddr_in *from;
+Code_t
+ZReceiveNotice(ZNotice_t *notice,
+              struct sockaddr_in *from)
 {
     char *buffer;
     struct _Z_InputQ *nextq;
index 593793428bf8b9e096c427e03aa9952fc29ba2f9..467268e7611268617e35f31e8311d3fa1333144a 100644 (file)
@@ -16,10 +16,10 @@ static char rcsid_ZReceivePacket_c[] = "$Id$";
 
 #include <internal.h>
 
-Code_t ZReceivePacket(buffer, ret_len, from)
-    ZPacket_t buffer;
-    int *ret_len;
-    struct sockaddr_in *from;
+Code_t
+ZReceivePacket(ZPacket_t buffer,
+              int *ret_len,
+              struct sockaddr_in *from)
 {
     Code_t retval;
     struct _Z_InputQ *nextq;
index bd2cf5d89b600aabeeeab90f756eb796284aa19d..9926171bf584393b59032a281f2dc0be10e36756 100644 (file)
@@ -18,16 +18,12 @@ static const char rcsid_ZRetrieveSubscriptions_c[] =
     "$Id$";
 #endif
 
-static Code_t Z_RetSubs ();
+static Code_t Z_RetSubs (register ZNotice_t *, int *, Z_AuthProc);
 
 /* Need STDC definition when possible for unsigned short argument. */
-#ifdef __STDC__
-Code_t ZRetrieveSubscriptions(unsigned short port, int *nsubs)
-#else
-Code_t ZRetrieveSubscriptions(port,nsubs)
-       unsigned short port;
-       int *nsubs;
-#endif
+Code_t
+ZRetrieveSubscriptions(unsigned short port,
+                      int *nsubs)
 {
        int retval;
        ZNotice_t notice;
@@ -48,8 +44,8 @@ Code_t ZRetrieveSubscriptions(port,nsubs)
        return(Z_RetSubs(&notice, nsubs, ZAUTH));
 }
 
-Code_t ZRetrieveDefaultSubscriptions(nsubs)
-       int *nsubs;
+Code_t
+ZRetrieveDefaultSubscriptions(int *nsubs)
 {
        ZNotice_t notice;
 
@@ -62,10 +58,10 @@ Code_t ZRetrieveDefaultSubscriptions(nsubs)
 
 }
 
-static Code_t Z_RetSubs(notice, nsubs, auth_routine)
-       register ZNotice_t *notice;
-       int *nsubs;
-       Z_AuthProc auth_routine;
+static Code_t
+Z_RetSubs(register ZNotice_t *notice,
+         int *nsubs,
+         Z_AuthProc auth_routine)
 {
        register int i;
        int retval,nrecv,gimmeack;
index 323bb5d19ad5bd87049cc1ccf00d3d8f5f3c3254..27176fa8dbeefaa52e17aa5248cf5fa50311b79e 100644 (file)
@@ -16,21 +16,20 @@ static char rcsid_ZSendList_c[] = "$Id$";
 
 #include <internal.h>
 
-Code_t ZSendList(notice, list, nitems, cert_routine)
-    ZNotice_t *notice;
-    char *list[];
-    int nitems;
-    Z_AuthProc cert_routine;
+Code_t ZSendList(ZNotice_t *notice,
+                char *list[],
+                int nitems,
+                Z_AuthProc cert_routine)
 {
     return(ZSrvSendList(notice, list, nitems, cert_routine, Z_XmitFragment));
 }
 
-Code_t ZSrvSendList(notice, list, nitems, cert_routine, send_routine)
-    ZNotice_t *notice;
-    char *list[];
-    int nitems;
-    Z_AuthProc cert_routine;
-    Code_t (*send_routine)();
+Code_t
+ZSrvSendList(ZNotice_t *notice,
+            char *list[],
+            int nitems,
+            Z_AuthProc cert_routine,
+            Code_t (*send_routine)(ZNotice_t *, char *, int, int))
 {
     Code_t retval;
     ZNotice_t newnotice;
index 4f3b996e3ad73ffab9290dfb91348435edf05e45..9f59fd3dae9b78b68259e4bb4d9f5174de3ecf6c 100644 (file)
@@ -16,17 +16,17 @@ static char rcsid_ZSendNotice_c[] = "$Id$";
 
 #include <internal.h>
 
-Code_t ZSendNotice(notice, cert_routine)
-    ZNotice_t *notice;
-    Z_AuthProc cert_routine;
+Code_t
+ZSendNotice(ZNotice_t *notice,
+           Z_AuthProc cert_routine)
 {
     return(ZSrvSendNotice(notice, cert_routine, Z_XmitFragment));
 }
 
-Code_t ZSrvSendNotice(notice, cert_routine, send_routine)
-    ZNotice_t *notice;
-    Z_AuthProc cert_routine;
-    Code_t (*send_routine)();
+Code_t
+ZSrvSendNotice(ZNotice_t *notice,
+              Z_AuthProc cert_routine,
+              Code_t (*send_routine)(ZNotice_t *, char *, int, int))
 {    
     Code_t retval;
     ZNotice_t newnotice;
index 66a25729662b8218874c6ced88d1ab5ef1dfe735..e542c79f19bb37533bf0c168428dc6348201c766 100644 (file)
@@ -18,12 +18,12 @@ static char rcsid_ZSendPacket_c[] =
 #include <internal.h>
 #include <sys/socket.h>
 
-static int wait_for_hmack();
+static int wait_for_hmack(ZNotice_t *, void *);
 
-Code_t ZSendPacket(packet, len, waitforack)
-    char *packet;
-    int len;
-    int waitforack;
+Code_t
+ZSendPacket(char *packet,
+           int len,
+           int waitforack)
 {
     Code_t retval;
     struct sockaddr_in dest;
@@ -51,8 +51,8 @@ Code_t ZSendPacket(packet, len, waitforack)
     if ((retval = ZParseNotice(packet, len, &notice)) != ZERR_NONE)
        return (retval);
     
-    retval = Z_WaitForNotice (&acknotice, wait_for_hmack, &notice.z_uid,
-                             HM_TIMEOUT);
+    retval = Z_WaitForNotice(&acknotice, wait_for_hmack, &notice.z_uid,
+                            HM_TIMEOUT);
     if (retval == ETIMEDOUT)
       return ZERR_HMDEAD;
     if (retval == ZERR_NONE)
@@ -60,9 +60,9 @@ Code_t ZSendPacket(packet, len, waitforack)
     return retval;
 }
 
-static int wait_for_hmack(notice, uid)
-    ZNotice_t *notice;
-    ZUnique_Id_t *uid;
+static int
+wait_for_hmack(ZNotice_t *notice,
+              void *uid)
 {
-    return (notice->z_kind == HMACK && ZCompareUID(&notice->z_uid, uid));
+    return (notice->z_kind == HMACK && ZCompareUID(&notice->z_uid, (ZUnique_Id_t *)uid));
 }
index 56f282ee18db52d233ac86f66af36cb74a85162a..d4d6b7dde6646958de85e628c492c46aca86a971 100644 (file)
@@ -16,19 +16,17 @@ static char rcsid_ZSendRawList_c[] = "$Id$";
 
 #include <internal.h>
 
-Code_t ZSendRawList(notice, list, nitems)
-    ZNotice_t *notice;
-    char *list[];
-    int nitems;
+Code_t ZSendRawList(ZNotice_t *notice,
+                   char *list[],
+                   int nitems)
 {
     return(ZSrvSendRawList(notice, list, nitems, Z_XmitFragment));
 }
 
-Code_t ZSrvSendRawList(notice, list, nitems, send_routine)
-    ZNotice_t *notice;
-    char *list[];
-    int nitems;
-    Code_t (*send_routine)();
+Code_t ZSrvSendRawList(ZNotice_t *notice,
+                      char *list[],
+                      int nitems,
+                      Code_t (*send_routine)(ZNotice_t *, char *, int, int))
 {
     Code_t retval;
     ZNotice_t newnotice;
index 2ea95d14cf18b332ce9bcf6e8dbd96f222f80b9d..1cd0438fd768223e40c5f481c2734a20ea9f19e2 100644 (file)
@@ -16,8 +16,8 @@ static char rcsid_ZSendRawNotice_c[] = "$Id$";
 
 #include <internal.h>
 
-Code_t ZSendRawNotice(notice)
-    ZNotice_t *notice;
+Code_t
+ZSendRawNotice(ZNotice_t *notice)
 {
     Code_t retval;
     ZNotice_t newnotice;
index 7190dcd3e8894db1f6077a70fa8a4fe24d743de0..23f75de6e308b4cba475c78f6abd1511bcd65563 100644 (file)
@@ -16,8 +16,8 @@ static char rcsid_ZSetDestAddr_c[] = "$Id$";
 
 #include <internal.h>
 
-Code_t ZSetDestAddr(addr)
-       struct  sockaddr_in *addr;
+Code_t
+ZSetDestAddr(struct sockaddr_in *addr)
 {
        __HM_addr = *addr;
 
index c22f66faf1f8ceb3ee63514b58d52781d4772a2d..be16f659be68b6ad2a76f42d615853a53c4b2b79 100644 (file)
@@ -16,8 +16,8 @@ static char rcsid_ZSetFD_c[] = "$Id$";
 
 #include <internal.h>
 
-Code_t ZSetFD(fd)
-       int     fd;
+Code_t
+ZSetFD(int fd)
 {
        (void) ZClosePort();
 
index 3f7d873f80f451795b526c0672f93e93edc09690..8b273e14d957a7dc63e2d371f1e15a42673d67d4 100644 (file)
@@ -16,8 +16,8 @@ static char rcsid_ZSetServerState_c[] = "$Id$";
 
 #include <internal.h>
 
-Code_t ZSetServerState(state)
-       int     state;
+Code_t
+ZSetServerState(int state)
 {
        __Zephyr_server = state;
        
index 15a5a91a8382a86c270080e959c06694971661b8..e8519fe69a7a054185498d2db431385768f275a7 100644 (file)
 static const char rcsid_ZSubscriptions_c[] = "$Id$";
 #endif
 
-static Code_t Z_Subscriptions __P((register ZSubscription_t *sublist,
-                                  int nitems, unsigned int port,
-                                  char *opcode, int authit));
-static Code_t subscr_sendoff __P((ZNotice_t *notice, char **lyst, int num,
-                                 int authit));
-
-Code_t ZSubscribeTo(sublist, nitems, port)
-    ZSubscription_t *sublist;
-    int nitems;
-    unsigned int port;
+static Code_t Z_Subscriptions(register ZSubscription_t *sublist,
+                             int nitems, unsigned int port,
+                             char *opcode, int authit);
+static Code_t subscr_sendoff(ZNotice_t *notice, char **lyst, int num,
+                            int authit);
+
+Code_t
+ZSubscribeTo(ZSubscription_t *sublist,
+            int nitems,
+            unsigned int port)
 {
     return (Z_Subscriptions(sublist, nitems, port, CLIENT_SUBSCRIBE, 1));
 }
 
-Code_t ZSubscribeToSansDefaults(sublist, nitems, port)
-    ZSubscription_t *sublist;
-    int nitems;
-    unsigned int port;
+Code_t
+ZSubscribeToSansDefaults(ZSubscription_t *sublist,
+                        int nitems,
+                        unsigned int port)
 {
     return (Z_Subscriptions(sublist, nitems, port, CLIENT_SUBSCRIBE_NODEFS,
                            1));
 }
 
-Code_t ZUnsubscribeTo(sublist, nitems, port)
-    ZSubscription_t *sublist;
-    int nitems;
-    unsigned int port;
+Code_t
+ZUnsubscribeTo(ZSubscription_t *sublist,
+              int nitems,
+              unsigned int port)
 {
     return (Z_Subscriptions(sublist, nitems, port, CLIENT_UNSUBSCRIBE, 1));
 }
 
-Code_t ZCancelSubscriptions(port)
-    unsigned int port;
+Code_t
+ZCancelSubscriptions(unsigned int port)
 {
     return (Z_Subscriptions((ZSubscription_t *)0, 0, port,
                            CLIENT_CANCELSUB, 0));
@@ -62,12 +62,11 @@ Code_t ZCancelSubscriptions(port)
  */
 
 static Code_t
-Z_Subscriptions(sublist, nitems, port, opcode, authit)
-    register ZSubscription_t *sublist;
-    int nitems;
-    unsigned int port;
-    char *opcode;
-    int authit;
+Z_Subscriptions(register ZSubscription_t *sublist,
+               int nitems,
+               unsigned int port,
+               char *opcode,
+               int authit)
 {
     register int i, j;
     int retval;
@@ -167,11 +166,10 @@ Z_Subscriptions(sublist, nitems, port, opcode, authit)
 }
 
 static Code_t
-subscr_sendoff(notice, lyst, num, authit)
-ZNotice_t *notice;
-char **lyst;
-int num;
-int authit;
+subscr_sendoff(ZNotice_t *notice,
+              char **lyst,
+              int num,
+              int authit)
 {
     register Code_t retval;
     ZNotice_t retnotice;
index 735286020b15511ccd793422d735060183557203..56e13da6792ce5ec5d2c83ea95662f3a6ed01f42 100644 (file)
@@ -20,15 +20,14 @@ static char rcsid_ZVariables_c[] = "$Id$";
 #include <ctype.h>
 #include <pwd.h>
 
-static int get_localvarfile __P((char *bfr));
-static char *get_varval __P((char *fn, char *val));
-static int varline __P((char *bfr, char *var));
+static int get_localvarfile(char *bfr);
+static char *get_varval(char *fn, char *val);
+static int varline(char *bfr, char *var);
 
-char *ZGetVariable(var)
-    char *var;
+char *
+ZGetVariable(char *var)
 {
     char varfile[128], *ret;
-    char *get_varval();
 
     if (get_localvarfile(varfile))
        return ((char *)0);
@@ -40,9 +39,8 @@ char *ZGetVariable(var)
     return (get_varval(varfile, var));
 }
 
-Code_t ZSetVariable(var, value)
-    char *var;
-    char *value;
+Code_t
+ZSetVariable(char *var, char *value)
 {
     int written;
     FILE *fpin, *fpout;
@@ -80,8 +78,8 @@ Code_t ZSetVariable(var, value)
     return (ZERR_NONE);
 }      
 
-Code_t ZUnsetVariable(var)
-    char *var;
+Code_t
+ZUnsetVariable(char *var)
 {
     FILE *fpin, *fpout;
     char varfile[128], varfilebackup[128], varbfr[512];
@@ -110,8 +108,8 @@ Code_t ZUnsetVariable(var)
     return (ZERR_NONE);
 }      
 
-static int get_localvarfile(bfr)
-    char *bfr;
+static int
+get_localvarfile(char *bfr)
 {
     char *envptr;
     struct passwd *pwd;
@@ -137,9 +135,8 @@ static int get_localvarfile(bfr)
     return (0);
 } 
        
-static char *get_varval(fn, var)
-    char *fn;
-    char *var;
+static char *
+get_varval(char *fn, char *var)
 {
     FILE *fp;
     static char varbfr[512];
@@ -163,9 +160,8 @@ static char *get_varval(fn, var)
 
 /* If the variable in the line bfr[] is the same as var, return index to
    the variable value, else return 0. */
-static int varline(bfr, var)
-    char *bfr;
-    char *var;
+static int
+varline(char *bfr, char *var)
 {
     register char *cp;
        
index 2313e2e58b4d818bcc8bbfc16630d744c40cbb43..c30dd065d50b81d8384526f53db9b140d044c139 100644 (file)
@@ -20,11 +20,11 @@ static char rcsid_ZWaitForNotice_c[] = "$Id$";
 #include <internal.h>
 #include <sys/socket.h>
 
-Code_t Z_WaitForNotice (notice, pred, arg, timeout)
-     ZNotice_t *notice;
-     int (*pred) __P((ZNotice_t *, void *));
-     void *arg;
-     int timeout;
+Code_t
+Z_WaitForNotice(ZNotice_t *notice,
+               int (*pred) __P((ZNotice_t *, void *)),
+               void *arg,
+               int timeout)
 {
   Code_t retval;
   struct timeval tv, t0;
index 916db54bf61c455b28b1250b4e8331fea76ceb4f..f6e764cd4d4a41779d1fc9d5e52408edb126910c 100644 (file)
@@ -17,9 +17,9 @@
 #define INADDR_LOOPBACK 0x7f000001
 #endif
 
-Code_t ZhmStat(hostaddr, notice)
-    struct in_addr *hostaddr;
-    ZNotice_t *notice;
+Code_t
+ZhmStat(struct in_addr *hostaddr,
+       ZNotice_t *notice)
 {
     struct servent *sp;
     struct sockaddr_in sin;
index 169eb6735e46bffcd851ff33729ff9ec38918792..3398a4c3819f9fbbfb7e8b61ad37e14098c0b9a1 100644 (file)
@@ -23,8 +23,6 @@ static const char copyright[] =
   "Copyright (c) 1987,1988,1991 by the Massachusetts Institute of Technology.";
 #endif
 
-extern char *inet_ntoa ();
-
 int __Zephyr_fd = -1;
 int __Zephyr_open;
 int __Zephyr_port = -1;
@@ -84,7 +82,9 @@ static struct cksum_map_s {
 };
 #define N_CKSUM_MAP (sizeof(cksum_map) / sizeof(struct cksum_map_s))
 
-Code_t Z_krb5_lookup_cksumtype(krb5_enctype e, krb5_cksumtype *c)
+Code_t
+Z_krb5_lookup_cksumtype(krb5_enctype e,
+                       krb5_cksumtype *c)
 {
   int i;
 
@@ -101,25 +101,25 @@ Code_t Z_krb5_lookup_cksumtype(krb5_enctype e, krb5_cksumtype *c)
 char __Zephyr_realm[REALM_SZ];
 
 #ifdef Z_DEBUG
-void (*__Z_debug_print) __P((const char *fmt, va_list args, void *closure));
+void (*__Z_debug_print)(const char *fmt, va_list args, void *closure);
 void *__Z_debug_print_closure;
 #endif
 
 #define min(a,b) ((a)<(b)?(a):(b))
 
-static int Z_AddField __P((char **ptr, char *field, char *end));
-static int find_or_insert_uid __P((ZUnique_Id_t *uid, ZNotice_Kind_t kind));
-static Code_t Z_ZcodeFormatRawHeader __P((ZNotice_t *, char *, int, int *, char **, 
-                                 int *, char **, char **, int cksumtype));
+static int Z_AddField(char **ptr, char *field, char *end);
+static int find_or_insert_uid(ZUnique_Id_t *uid, ZNotice_Kind_t kind);
+static Code_t Z_ZcodeFormatRawHeader(ZNotice_t *, char *, int, int *, char **, 
+                                    int *, char **, char **, int cksumtype);
 
 /* Find or insert uid in the old uids buffer.  The buffer is a sorted
  * circular queue.  We make the assumption that most packets arrive in
  * order, so we can usually search for a uid or insert it into the buffer
  * by looking back just a few entries from the end.  Since this code is
  * only executed by the client, the implementation isn't microoptimized. */
-static int find_or_insert_uid(uid, kind)
-    ZUnique_Id_t *uid;
-    ZNotice_Kind_t kind;
+static int
+find_or_insert_uid(ZUnique_Id_t *uid,
+                  ZNotice_Kind_t kind)
 {
     static struct _filter {
        ZUnique_Id_t    uid;
@@ -187,7 +187,8 @@ static int find_or_insert_uid(uid, kind)
 
 /* Return 1 if there is a packet waiting, 0 otherwise */
 
-int Z_PacketWaiting()
+int
+Z_PacketWaiting(void)
 {
     struct timeval tv;
     fd_set read;
@@ -201,7 +202,8 @@ int Z_PacketWaiting()
 
 /* Wait for a complete notice to become available */
 
-Code_t Z_WaitForComplete()
+Code_t
+Z_WaitForComplete(void)
 {
     Code_t retval;
 
@@ -218,7 +220,8 @@ Code_t Z_WaitForComplete()
 
 /* Read any available packets and enqueue them */
 
-Code_t Z_ReadEnqueue()
+Code_t
+Z_ReadEnqueue(void)
 {
     Code_t retval;
 
@@ -238,9 +241,9 @@ Code_t Z_ReadEnqueue()
  * notices that haven't been touched in a while
  */
 
-struct _Z_InputQ *Z_SearchQueue(uid, kind)
-    ZUnique_Id_t *uid;
-    ZNotice_Kind_t kind;
+struct _Z_InputQ *
+Z_SearchQueue(ZUnique_Id_t *uid,
+             ZNotice_Kind_t kind)
 {
     register struct _Z_InputQ *qptr;
     struct _Z_InputQ *next;
@@ -270,7 +273,8 @@ struct _Z_InputQ *Z_SearchQueue(uid, kind)
  * returns.
  */
 
-Code_t Z_ReadWait()
+Code_t
+Z_ReadWait(void)
 {
     register struct _Z_InputQ *qptr;
     ZNotice_t notice;
@@ -515,10 +519,10 @@ Code_t Z_ReadWait()
 
 /* Fragment management routines - compliments, more or less, of RFC815 */
 
-Code_t Z_AddNoticeToEntry(qptr, notice, part)
-    struct _Z_InputQ *qptr;
-    ZNotice_t *notice;
-    int part;
+Code_t
+Z_AddNoticeToEntry(struct _Z_InputQ *qptr,
+                  ZNotice_t *notice,
+                  int part)
 {
     int last, oldfirst, oldlast;
     struct _Z_Hole *hole, *lasthole;
@@ -633,7 +637,9 @@ Code_t Z_AddNoticeToEntry(qptr, notice, part)
     return (ZERR_NONE);
 }
 
-void Z_gettimeofday(struct _ZTimeval *ztv, struct timezone *tz)
+void
+Z_gettimeofday(struct _ZTimeval *ztv,
+              struct timezone *tz)
 {
         struct timeval tv;
         (void) gettimeofday(&tv, tz); /* yeah, yeah, I know */
@@ -641,12 +647,12 @@ void Z_gettimeofday(struct _ZTimeval *ztv, struct timezone *tz)
         ztv->tv_usec=tv.tv_usec;
 }
 
-Code_t Z_FormatHeader(notice, buffer, buffer_len, len, cert_routine)
-    ZNotice_t *notice;
-    char *buffer;
-    int buffer_len;
-    int *len;
-    Z_AuthProc cert_routine;
+Code_t
+Z_FormatHeader(ZNotice_t *notice,
+              char *buffer,
+              int buffer_len,
+              int *len,
+              Z_AuthProc cert_routine)
 {
     Code_t retval;
     static char version[BUFSIZ]; /* default init should be all \0 */
@@ -686,12 +692,12 @@ Code_t Z_FormatHeader(notice, buffer, buffer_len, len, cert_routine)
     return Z_FormatAuthHeader(notice, buffer, buffer_len, len, cert_routine);
 }
 
-Code_t Z_NewFormatHeader(notice, buffer, buffer_len, len, cert_routine)
-    ZNotice_t *notice;
-    char *buffer;
-    int buffer_len;
-    int *len;
-    Z_AuthProc cert_routine;
+Code_t
+Z_NewFormatHeader(ZNotice_t *notice,
+                 char *buffer,
+                 int buffer_len,
+                 int *len,
+                 Z_AuthProc cert_routine)
 {
     Code_t retval;
     static char version[BUFSIZ]; /* default init should be all \0 */
@@ -732,12 +738,12 @@ Code_t Z_NewFormatHeader(notice, buffer, buffer_len, len, cert_routine)
     return Z_NewFormatAuthHeader(notice, buffer, buffer_len, len, cert_routine);
 }
 
-Code_t Z_FormatAuthHeader(notice, buffer, buffer_len, len, cert_routine)
-    ZNotice_t *notice;
-    char *buffer;
-    int buffer_len;
-    int *len;
-    Z_AuthProc cert_routine;
+Code_t
+Z_FormatAuthHeader(ZNotice_t *notice,
+                  char *buffer,
+                  int buffer_len,
+                  int *len,
+                  Z_AuthProc cert_routine)
 {
     if (!cert_routine) {
        notice->z_auth = 0;
@@ -749,14 +755,14 @@ Code_t Z_FormatAuthHeader(notice, buffer, buffer_len, len, cert_routine)
     }
     
     return ((*cert_routine)(notice, buffer, buffer_len, len));
-} 
-       
-Code_t Z_NewFormatAuthHeader(notice, buffer, buffer_len, len, cert_routine)
-    ZNotice_t *notice;
-    char *buffer;
-    int buffer_len;
-    int *len;
-    Z_AuthProc cert_routine;
+}
+
+Code_t
+Z_NewFormatAuthHeader(ZNotice_t *notice,
+                     char *buffer,
+                     int buffer_len,
+                     int *len,
+                     Z_AuthProc cert_routine)
 {
     if (!cert_routine) {
        notice->z_auth = 0;
@@ -764,50 +770,50 @@ Code_t Z_NewFormatAuthHeader(notice, buffer, buffer_len, len, cert_routine)
        notice->z_ascii_authent = "";
        notice->z_checksum = 0;
        return (Z_FormatRawHeader(notice, buffer, buffer_len,
-                                    len, NULL, NULL));
+                                 len, NULL, NULL));
     }
     
     return ((*cert_routine)(notice, buffer, buffer_len, len));
 } 
        
-Code_t Z_NewFormatRawHeader(notice, buffer, buffer_len, hdr_len,
-                         cksum_start, cksum_len, cstart, cend)
-    ZNotice_t *notice;
-    char *buffer;
-    int buffer_len;
-    int *hdr_len;
-    char **cksum_start;
-    int *cksum_len;
-    char **cstart, **cend;
+Code_t
+Z_NewFormatRawHeader(ZNotice_t *notice,
+                    char *buffer,
+                    int buffer_len,
+                    int *hdr_len,
+                    char **cksum_start,
+                    int *cksum_len,
+                    char **cstart,
+                    char **cend)
 {
    return(Z_ZcodeFormatRawHeader(notice, buffer, buffer_len, hdr_len,
                                 cksum_start, cksum_len, cstart, cend, 0));
 }
 
-Code_t Z_AsciiFormatRawHeader(notice, buffer, buffer_len, hdr_len,
-                             cksum_start, cksum_len, cstart, cend)
-    ZNotice_t *notice;
-    char *buffer;
-    int buffer_len;
-    int *hdr_len;
-    char **cksum_start;
-    int *cksum_len;
-    char **cstart, **cend;
+Code_t
+Z_AsciiFormatRawHeader(ZNotice_t *notice,
+                      char *buffer,
+                      int buffer_len,
+                      int *hdr_len,
+                      char **cksum_start,
+                      int *cksum_len,
+                      char **cstart,
+                      char **cend)
 {
    return(Z_ZcodeFormatRawHeader(notice, buffer, buffer_len, hdr_len,
                                 cksum_start, cksum_len, cstart, cend, 1));
 }
 
-static Code_t Z_ZcodeFormatRawHeader(notice, buffer, buffer_len, hdr_len, cksum_start,
-                             cksum_len, cstart, cend, cksumstyle)
-    ZNotice_t *notice;
-    char *buffer;
-    int buffer_len;
-    int *hdr_len;
-    char **cksum_start;
-    int *cksum_len;
-    char **cstart, **cend;
-    int cksumstyle;
+static Code_t
+Z_ZcodeFormatRawHeader(ZNotice_t *notice,
+                      char *buffer,
+                      int buffer_len,
+                      int *hdr_len,
+                      char **cksum_start,
+                      int *cksum_len,
+                      char **cstart,
+                      char **cend,
+                      int cksumstyle)
 {
     static char version_nogalaxy[BUFSIZ]; /* default init should be all \0 */
     char newrecip[BUFSIZ];
@@ -955,12 +961,13 @@ static Code_t Z_ZcodeFormatRawHeader(notice, buffer, buffer_len, hdr_len, cksum_
     return (ZERR_NONE);
 }
 
-Code_t Z_FormatRawHeader(notice, buffer, buffer_len, len, cstart, cend)
-    ZNotice_t *notice;
-    char *buffer;
-    int buffer_len;
-    int *len;
-    char **cstart, **cend;
+Code_t
+Z_FormatRawHeader(ZNotice_t *notice,
+                 char *buffer,
+                 int buffer_len,
+                 int *len,
+                 char **cstart,
+                 char **cend)
 {
     char newrecip[BUFSIZ];
     char *ptr, *end;
@@ -1068,8 +1075,9 @@ Code_t Z_FormatRawHeader(notice, buffer, buffer_len, len, cstart, cend)
 }
 
 static int
-Z_AddField(ptr, field, end)
-    char **ptr, *field, *end;
+Z_AddField(char **ptr,
+          char *field,
+          char *end)
 {
     register int len;
 
@@ -1086,7 +1094,8 @@ Z_AddField(ptr, field, end)
     return 0;
 }
 
-struct _Z_InputQ *Z_GetFirstComplete()
+struct _Z_InputQ *
+Z_GetFirstComplete(void)
 {
     struct _Z_InputQ *qptr;
 
@@ -1101,8 +1110,8 @@ struct _Z_InputQ *Z_GetFirstComplete()
     return ((struct _Z_InputQ *)0);
 }
 
-struct _Z_InputQ *Z_GetNextComplete(qptr)
-    struct _Z_InputQ *qptr;
+struct _Z_InputQ *
+Z_GetNextComplete(struct _Z_InputQ *qptr)
 {
     qptr = qptr->next;
     while (qptr) {
@@ -1114,8 +1123,8 @@ struct _Z_InputQ *Z_GetNextComplete(qptr)
     return ((struct _Z_InputQ *)0);
 }
 
-void Z_RemQueue(qptr)
-    struct _Z_InputQ *qptr;
+void
+Z_RemQueue(struct _Z_InputQ *qptr)
 {
     struct _Z_Hole *hole, *nexthole;
     
@@ -1163,11 +1172,11 @@ void Z_RemQueue(qptr)
     return;
 }
 
-Code_t Z_SendFragmentedNotice(notice, len, cert_func, send_func)
-    ZNotice_t *notice;
-    int len;
-    Z_AuthProc cert_func;
-    Z_SendProc send_func;
+Code_t
+Z_SendFragmentedNotice(ZNotice_t *notice,
+                      int len,
+                      Z_AuthProc cert_func,
+                      Z_SendProc send_func)
 {
     ZNotice_t partnotice;
     ZPacket_t buffer;
@@ -1219,13 +1228,12 @@ Code_t Z_SendFragmentedNotice(notice, len, cert_func, send_func)
 }
 
 /*ARGSUSED*/
-Code_t Z_XmitFragment(notice, buf, len, wait)
-ZNotice_t *notice;
-char *buf;
-int len;
-int wait;
+Code_t Z_XmitFragment(ZNotice_t *notice,
+                     char *buf,
+                     int len,
+                     int wait)
 {
-       return(ZSendPacket(buf, len, wait));
+    return(ZSendPacket(buf, len, wait));
 }
 
 #ifdef Z_DEBUG
@@ -1239,8 +1247,8 @@ const char *const ZNoticeKinds[] = {
 #ifdef Z_DEBUG
 
 #undef Z_debug
-#ifdef HAVE_STDARG_H
-void Z_debug (const char *format, ...)
+void
+Z_debug(const char *format, ...)
 {
     va_list pvar;
     if (!__Z_debug_print)
@@ -1249,24 +1257,11 @@ void Z_debug (const char *format, ...)
     (*__Z_debug_print) (format, pvar, __Z_debug_print_closure);
     va_end (pvar);
 }
-#else /* stdarg */
-void Z_debug (va_alist) va_dcl
-{
-    va_list pvar;
-    char *format;
-    if (!__Z_debug_print)
-      return;
-    va_start (pvar);
-    format = va_arg (pvar, char *);
-    (*__Z_debug_print) (format, pvar, __Z_debug_print_closure);
-    va_end (pvar);
-}
-#endif
 
-void Z_debug_stderr (format, args, closure)
-     const char *format;
-     va_list args;
-     void *closure;
+void
+Z_debug_stderr(const char *format,
+              va_list args,
+              void *closure)
 {
 #ifdef HAVE_VPRINTF
     vfprintf (stderr, format, args);
@@ -1277,21 +1272,21 @@ void Z_debug_stderr (format, args, closure)
 }
 
 #undef ZGetFD
-int ZGetFD () { return __Zephyr_fd; }
+int ZGetFD (void) { return __Zephyr_fd; }
 
 #undef ZQLength
-int ZQLength () { return __Q_CompleteLength; }
+int ZQLength (void) { return __Q_CompleteLength; }
 
 #undef ZGetDestAddr
-struct sockaddr_in ZGetDestAddr () { return __HM_addr; }
+struct sockaddr_in ZGetDestAddr (void) { return __HM_addr; }
 
 #undef ZGetRealm
-Zconst char * ZGetRealm () { return __Zephyr_realm; }
+Zconst char * ZGetRealm (void) { return __Zephyr_realm; }
 
 #undef ZSetDebug
-void ZSetDebug(proc, arg)
-    void (*proc) __P((const char *, va_list, void *));
-    char *arg;
+void
+ZSetDebug(void (*proc) __P((const char *, va_list, void *)),
+         char *arg)
 {
     __Z_debug_print = proc;
     __Z_debug_print_closure = arg;
@@ -1299,9 +1294,13 @@ void ZSetDebug(proc, arg)
 #endif /* Z_DEBUG */
 
 #ifdef HAVE_KRB5
-Code_t Z_Checksum(krb5_data *cksumbuf, krb5_keyblock *keyblock, 
-                  krb5_cksumtype cksumtype, 
-                  char **asn1_data, int *asn1_len) {
+Code_t
+Z_Checksum(krb5_data *cksumbuf,
+          krb5_keyblock *keyblock, 
+          krb5_cksumtype cksumtype, 
+          char **asn1_data,
+          int *asn1_len)
+{
     krb5_error_code result;
     char *data;
     int len;
@@ -1360,9 +1359,14 @@ Code_t Z_Checksum(krb5_data *cksumbuf, krb5_keyblock *keyblock,
 }
 
 Code_t
-Z_InsertZcodeChecksum(krb5_keyblock *keyblock, ZNotice_t *notice, 
-                      char *buffer, char *cksum_start, int cksum_len, 
-                      char *cstart, char *cend, int buffer_len, 
+Z_InsertZcodeChecksum(krb5_keyblock *keyblock,
+                     ZNotice_t *notice, 
+                      char *buffer,
+                     char *cksum_start,
+                     int cksum_len, 
+                      char *cstart,
+                     char *cend,
+                     int buffer_len, 
                       int *length_adjust)
 {
      int plain_len;   /* length of part not to be checksummed */
@@ -1423,8 +1427,10 @@ Z_InsertZcodeChecksum(krb5_keyblock *keyblock, ZNotice_t *notice,
 }
 
 Code_t
-Z_ExtractEncCksum(krb5_keyblock *keyblock, krb5_enctype *enctype, 
-                  krb5_cksumtype *cksumtype) {
+Z_ExtractEncCksum(krb5_keyblock *keyblock,
+                 krb5_enctype *enctype, 
+                  krb5_cksumtype *cksumtype)
+{
     *enctype  = Z_enctype(keyblock); 
     return Z_krb5_lookup_cksumtype(*enctype, cksumtype); 
 }
@@ -1433,9 +1439,12 @@ Z_ExtractEncCksum(krb5_keyblock *keyblock, krb5_enctype *enctype,
 #ifdef HAVE_KRB5
 /* returns 0 if invalid or losing, 1 if valid, *sigh* */
 int
-Z_krb5_verify_cksum(krb5_keyblock *keyblock, krb5_data *cksumbuf, 
-                    krb5_cksumtype cksumtype, char *asn1_data, 
-                    int asn1_len) {
+Z_krb5_verify_cksum(krb5_keyblock *keyblock,
+                   krb5_data *cksumbuf, 
+                    krb5_cksumtype cksumtype,
+                   char *asn1_data, 
+                    int asn1_len)
+{
     krb5_error_code result;
 #if HAVE_KRB5_C_MAKE_CHECKSUM
     krb5_checksum checksum;