Merged in default (pull request #637)
Cleanup some Zephyr code
Approved-by: Gary Kramlich
--- a/libpurple/protocols/zephyr/ZAsyncLocate.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZAsyncLocate.c Mon Nov 11 02:38:00 2019 +0000
@@ -11,11 +11,10 @@
-Code_t ZRequestLocations(user, zald, kind, auth)
- ZAsyncLocateData_t *zald;
- ZNotice_Kind_t kind; /* UNSAFE, UNACKED, or ACKED */
+ZRequestLocations(const char *user, ZAsyncLocateData_t *zald, + ZNotice_Kind_t kind, /* UNSAFE, UNACKED, or ACKED */ @@ -55,11 +54,9 @@
-Code_t ZParseLocations(notice,zald,nlocs,user)
- ZAsyncLocateData_t *zald;
+ZParseLocations(ZNotice_t *notice, ZAsyncLocateData_t *zald, int *nlocs, @@ -150,16 +147,15 @@
-int ZCompareALDPred(notice, zald)
+ZCompareALDPred(ZNotice_t *notice, void *zald) return(ZCompareUID(&(notice->z_multiuid),
&(((ZAsyncLocateData_t *) zald)->uid)));
- ZAsyncLocateData_t *zald;
+ZFreeALD(ZAsyncLocateData_t *zald) --- a/libpurple/protocols/zephyr/ZCkAuth.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZCkAuth.c Mon Nov 11 02:38:00 2019 +0000
@@ -18,9 +18,8 @@
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)
- struct sockaddr_in *from;
+ZCheckAuthentication(ZNotice_t *notice, struct sockaddr_in *from) #ifdef ZEPHYR_USES_KERBEROS
--- a/libpurple/protocols/zephyr/ZCkIfNot.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZCkIfNot.c Mon Nov 11 02:38:00 2019 +0000
@@ -10,11 +10,9 @@
-Code_t ZCheckIfNotice(notice, from, predicate, args)
- struct sockaddr_in *from;
- register int (*predicate)(ZNotice_t *, void *);
+ZCheckIfNotice(ZNotice_t *notice, struct sockaddr_in *from, + register int (*predicate)(ZNotice_t *, void *), void *args) --- a/libpurple/protocols/zephyr/ZClosePort.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZClosePort.c Mon Nov 11 02:38:00 2019 +0000
@@ -10,7 +10,8 @@
if (__Zephyr_fd >= 0 && __Zephyr_open)
(void) close(__Zephyr_fd);
--- a/libpurple/protocols/zephyr/ZCmpUID.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZCmpUID.c Mon Nov 11 02:38:00 2019 +0000
@@ -10,8 +10,8 @@
-int ZCompareUID(uid1, uid2)
- ZUnique_Id_t *uid1, *uid2;
+ZCompareUID(ZUnique_Id_t *uid1, ZUnique_Id_t *uid2) return (!memcmp((char *)uid1, (char *)uid2, sizeof (*uid1)));
--- a/libpurple/protocols/zephyr/ZCmpUIDP.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZCmpUIDP.c Mon Nov 11 02:38:00 2019 +0000
@@ -10,16 +10,14 @@
-int ZCompareUIDPred(notice, uid)
+ZCompareUIDPred(ZNotice_t *notice, void *uid) return (ZCompareUID(¬ice->z_uid, (ZUnique_Id_t *) uid));
-int ZCompareMultiUIDPred(notice, uid)
+ZCompareMultiUIDPred(ZNotice_t *notice, void *uid) return (ZCompareUID(¬ice->z_multiuid, (ZUnique_Id_t *) uid));
--- a/libpurple/protocols/zephyr/ZFlsLocs.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZFlsLocs.c Mon Nov 11 02:38:00 2019 +0000
@@ -10,7 +10,8 @@
-Code_t ZFlushLocations()
--- a/libpurple/protocols/zephyr/ZFlsSubs.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZFlsSubs.c Mon Nov 11 02:38:00 2019 +0000
@@ -10,7 +10,8 @@
-Code_t ZFlushSubscriptions()
+ZFlushSubscriptions(void) --- a/libpurple/protocols/zephyr/ZFmtAuth.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZFmtAuth.c Mon Nov 11 02:38:00 2019 +0000
@@ -11,12 +11,9 @@
#ifdef ZEPHYR_USES_KERBEROS
-Code_t ZFormatAuthenticNotice(notice, buffer, buffer_len, len, session)
- register int buffer_len;
+ZFormatAuthenticNotice(ZNotice_t *notice, register char *buffer, + register int buffer_len, int *len, C_Block session) --- a/libpurple/protocols/zephyr/ZFmtList.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZFmtList.c Mon Nov 11 02:38:00 2019 +0000
@@ -10,14 +10,9 @@
-Code_t ZFormatNoticeList(notice, list, nitems, buffer, ret_len,
- Z_AuthProc cert_routine;
+ZFormatNoticeList(ZNotice_t *notice, register char **list, int nitems, + char **buffer, int *ret_len, Z_AuthProc cert_routine) char header[Z_MAXHEADERLEN];
--- a/libpurple/protocols/zephyr/ZFmtNotice.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZFmtNotice.c Mon Nov 11 02:38:00 2019 +0000
@@ -10,11 +10,9 @@
-Code_t ZFormatNotice(notice, buffer, ret_len, cert_routine)
- register ZNotice_t *notice;
- Z_AuthProc cert_routine;
+ZFormatNotice(register ZNotice_t *notice, char **buffer, int *ret_len, + Z_AuthProc cert_routine) char header[Z_MAXHEADERLEN];
--- a/libpurple/protocols/zephyr/ZFmtRaw.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZFmtRaw.c Mon Nov 11 02:38:00 2019 +0000
@@ -10,10 +10,8 @@
-Code_t ZFormatRawNotice(notice, buffer, ret_len)
- register ZNotice_t *notice;
+ZFormatRawNotice(register ZNotice_t *notice, char **buffer, int *ret_len) char header[Z_MAXHEADERLEN];
--- a/libpurple/protocols/zephyr/ZFmtRawLst.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZFmtRawLst.c Mon Nov 11 02:38:00 2019 +0000
@@ -10,12 +10,9 @@
-Code_t ZFormatRawNoticeList(notice, list, nitems, buffer, ret_len)
+ZFormatRawNoticeList(ZNotice_t *notice, char *list[], int nitems, char **buffer, char header[Z_MAXHEADERLEN];
--- a/libpurple/protocols/zephyr/ZFmtSmRaw.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZFmtSmRaw.c Mon Nov 11 02:38:00 2019 +0000
@@ -10,10 +10,8 @@
-Code_t ZFormatSmallRawNotice(notice, buffer, ret_len)
+ZFormatSmallRawNotice(ZNotice_t *notice, ZPacket_t buffer, int *ret_len) --- a/libpurple/protocols/zephyr/ZFreeNot.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZFreeNot.c Mon Nov 11 02:38:00 2019 +0000
@@ -10,8 +10,8 @@
-Code_t ZFreeNotice(notice)
+ZFreeNotice(ZNotice_t *notice) --- a/libpurple/protocols/zephyr/ZGetSender.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZGetSender.c Mon Nov 11 02:38:00 2019 +0000
@@ -14,7 +14,8 @@
#ifdef ZEPHYR_USES_KERBEROS
--- a/libpurple/protocols/zephyr/ZGetWGPort.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZGetWGPort.c Mon Nov 11 02:38:00 2019 +0000
@@ -10,7 +10,8 @@
--- a/libpurple/protocols/zephyr/ZIfNotice.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZIfNotice.c Mon Nov 11 02:38:00 2019 +0000
@@ -10,11 +10,9 @@
-Code_t ZIfNotice(notice, from, predicate, args)
- struct sockaddr_in *from;
- int (*predicate)(ZNotice_t *, void *);
+ZIfNotice(ZNotice_t *notice, struct sockaddr_in *from, + int (*predicate)(ZNotice_t *, void *), void *args) --- a/libpurple/protocols/zephyr/ZInit.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZInit.c Mon Nov 11 02:38:00 2019 +0000
@@ -29,7 +29,8 @@
#define INADDR_NONE 0xffffffff
@@ -44,12 +45,8 @@
char d1[ANAME_SZ], d2[INST_SZ];
- /* initialize_krb_error_table(); */
- initialize_zeph_error_table();
(void) memset((char *)&__HM_addr, 0, sizeof(__HM_addr));
__HM_addr.sin_family = AF_INET;
--- a/libpurple/protocols/zephyr/ZLocations.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZLocations.c Mon Nov 11 02:38:00 2019 +0000
@@ -19,20 +19,22 @@
-Code_t ZSetLocation(exposure)
+ZSetLocation(char *exposure) return (Z_SendLocation(LOGIN_CLASS, exposure, ZAUTH,
"$sender logged in to $1 on $3 at $2"));
return (Z_SendLocation(LOGIN_CLASS, LOGIN_USER_LOGOUT, ZNOAUTH,
"$sender logged out of $1 on $3 at $2"));
-Code_t ZFlushMyLocations()
return (Z_SendLocation(LOGIN_CLASS, LOGIN_USER_FLUSH, ZAUTH, ""));
@@ -41,11 +43,8 @@
static char *mytty = NULL;
-Code_t Z_SendLocation(class, opcode, auth, format)
+Z_SendLocation(char *class, char *opcode, Z_AuthProc auth, char *format) --- a/libpurple/protocols/zephyr/ZMakeAscii.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZMakeAscii.c Mon Nov 11 02:38:00 2019 +0000
@@ -12,11 +12,8 @@
static char *itox_chars = "0123456789ABCDEF";
-Code_t ZMakeAscii(ptr, len, field, num)
+ZMakeAscii(register char *ptr, int len, unsigned char *field, int num) @@ -45,10 +42,8 @@
-Code_t ZMakeAscii32(ptr, len, value)
+ZMakeAscii32(register char *ptr, int len, unsigned long value) @@ -66,10 +61,8 @@
-Code_t ZMakeAscii16(ptr, len, value)
+ZMakeAscii16(register char *ptr, int len, unsigned int value) --- a/libpurple/protocols/zephyr/ZMkAuth.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZMkAuth.c Mon Nov 11 02:38:00 2019 +0000
@@ -24,11 +24,9 @@
static KTEXT_ST last_authent;
-Code_t ZMakeAuthentication(notice, buffer, buffer_len, len)
- register ZNotice_t *notice;
+ZMakeAuthentication(register ZNotice_t *notice, char *buffer, int buffer_len, #ifdef ZEPHYR_USES_KERBEROS
--- a/libpurple/protocols/zephyr/ZNewLocU.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZNewLocU.c Mon Nov 11 02:38:00 2019 +0000
@@ -10,10 +10,8 @@
-Code_t ZLocateUser(user, nlocs, auth)
+ZLocateUser(char *user, int *nlocs, Z_AuthProc auth) --- a/libpurple/protocols/zephyr/ZOpenPort.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZOpenPort.c Mon Nov 11 02:38:00 2019 +0000
@@ -16,8 +16,8 @@
+ZOpenPort(unsigned short *port) struct sockaddr_in bindin;
--- a/libpurple/protocols/zephyr/ZParseNot.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZParseNot.c Mon Nov 11 02:38:00 2019 +0000
@@ -60,10 +60,8 @@
#define next_field(ptr) ptr=next_field_1(ptr)
-Code_t ZParseNotice(buffer, len, notice)
+ZParseNotice(char *buffer, int len, ZNotice_t *notice) --- a/libpurple/protocols/zephyr/ZPeekNot.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZPeekNot.c Mon Nov 11 02:38:00 2019 +0000
@@ -10,9 +10,8 @@
-Code_t ZPeekNotice(notice, from)
- struct sockaddr_in *from;
+ZPeekNotice(ZNotice_t *notice, struct sockaddr_in *from) --- a/libpurple/protocols/zephyr/ZPeekPkt.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZPeekPkt.c Mon Nov 11 02:38:00 2019 +0000
@@ -10,10 +10,8 @@
-Code_t ZPeekPacket(buffer, ret_len, from)
- struct sockaddr_in *from;
+ZPeekPacket(char **buffer, int *ret_len, struct sockaddr_in *from) --- a/libpurple/protocols/zephyr/ZPending.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZPending.c Mon Nov 11 02:38:00 2019 +0000
@@ -10,7 +10,8 @@
--- a/libpurple/protocols/zephyr/ZReadAscii.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZReadAscii.c Mon Nov 11 02:38:00 2019 +0000
@@ -12,11 +12,8 @@
#define Z_cnvt_xtoi(c) ((temp=(c)-'0'),(temp<10)?(int)temp:((temp-='A'-'9'-1),(temp<16)?(int)temp:-1))
-Code_t ZReadAscii(ptr, len, field, num)
+ZReadAscii(char *ptr, int len, unsigned char *field, int num) @@ -52,10 +49,8 @@
return *ptr ? ZERR_BADFIELD : ZERR_NONE;
-Code_t ZReadAscii32(ptr, len, value_ptr)
- unsigned long *value_ptr;
+ZReadAscii32(char *ptr, int len, unsigned long *value_ptr) @@ -72,10 +67,8 @@
-Code_t ZReadAscii16(ptr, len, value_ptr)
- unsigned short *value_ptr;
+ZReadAscii16(char *ptr, int len, unsigned short *value_ptr) --- a/libpurple/protocols/zephyr/ZRecvNot.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZRecvNot.c Mon Nov 11 02:38:00 2019 +0000
@@ -10,9 +10,8 @@
-Code_t ZReceiveNotice(notice, from)
- struct sockaddr_in *from;
+ZReceiveNotice(ZNotice_t *notice, struct sockaddr_in *from) --- a/libpurple/protocols/zephyr/ZRecvPkt.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZRecvPkt.c Mon Nov 11 02:38:00 2019 +0000
@@ -10,10 +10,8 @@
-Code_t ZReceivePacket(buffer, ret_len, from)
- struct sockaddr_in *from;
+ZReceivePacket(ZPacket_t buffer, int *ret_len, struct sockaddr_in *from) --- a/libpurple/protocols/zephyr/ZRetSubs.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZRetSubs.c Mon Nov 11 02:38:00 2019 +0000
@@ -35,10 +35,8 @@
return(Z_RetSubs(¬ice, nsubs, ZAUTH));
-static Code_t Z_RetSubs(notice, nsubs, auth_routine)
- register ZNotice_t *notice;
- Z_AuthProc auth_routine;
+Z_RetSubs(register ZNotice_t *notice, int *nsubs, Z_AuthProc auth_routine) int retval,nrecv,gimmeack;
--- a/libpurple/protocols/zephyr/ZSendList.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZSendList.c Mon Nov 11 02:38:00 2019 +0000
@@ -10,21 +10,15 @@
-Code_t ZSendList(notice, list, nitems, cert_routine)
- Z_AuthProc cert_routine;
+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)
- Z_AuthProc cert_routine;
- Code_t (*send_routine)();
+ZSrvSendList(ZNotice_t *notice, char *list[], int nitems, + Z_AuthProc cert_routine, Code_t (*send_routine)()) --- a/libpurple/protocols/zephyr/ZSendNot.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZSendNot.c Mon Nov 11 02:38:00 2019 +0000
@@ -10,17 +10,15 @@
-Code_t ZSendNotice(notice, cert_routine)
- Z_AuthProc cert_routine;
+ZSendNotice(ZNotice_t *notice, Z_AuthProc cert_routine) return(ZSrvSendNotice(notice, cert_routine, Z_XmitFragment));
-Code_t ZSrvSendNotice(notice, cert_routine, send_routine)
- Z_AuthProc cert_routine;
- Code_t (*send_routine)();
+ZSrvSendNotice(ZNotice_t *notice, Z_AuthProc cert_routine, + Code_t (*send_routine)()) --- a/libpurple/protocols/zephyr/ZSendPkt.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZSendPkt.c Mon Nov 11 02:38:00 2019 +0000
@@ -17,10 +17,8 @@
static int wait_for_hmack(ZNotice_t *notice, void *uid);
-Code_t ZSendPacket(packet, len, waitforack)
+ZSendPacket(char *packet, int len, int waitforack) --- a/libpurple/protocols/zephyr/ZSetDest.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZSetDest.c Mon Nov 11 02:38:00 2019 +0000
@@ -10,8 +10,8 @@
-Code_t ZSetDestAddr(addr)
- struct sockaddr_in *addr;
+ZSetDestAddr(struct sockaddr_in *addr) --- a/libpurple/protocols/zephyr/ZSetFD.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZSetFD.c Mon Nov 11 02:38:00 2019 +0000
@@ -10,8 +10,8 @@
--- a/libpurple/protocols/zephyr/ZSetSrv.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZSetSrv.c Mon Nov 11 02:38:00 2019 +0000
@@ -10,8 +10,8 @@
-Code_t ZSetServerState(state)
+ZSetServerState(int state) --- a/libpurple/protocols/zephyr/ZSubs.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZSubs.c Mon Nov 11 02:38:00 2019 +0000
@@ -16,33 +16,28 @@
static Code_t subscr_sendoff(ZNotice_t *notice, char **lyst, int num,
-Code_t ZSubscribeTo(sublist, nitems, port)
- ZSubscription_t *sublist;
+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;
+ZSubscribeToSansDefaults(ZSubscription_t *sublist, int nitems, return (Z_Subscriptions(sublist, nitems, port, CLIENT_SUBSCRIBE_NODEFS,
-Code_t ZUnsubscribeTo(sublist, nitems, port)
- ZSubscription_t *sublist;
+ZUnsubscribeTo(ZSubscription_t *sublist, int nitems, unsigned int port) return (Z_Subscriptions(sublist, nitems, port, CLIENT_UNSUBSCRIBE, 1));
-Code_t ZCancelSubscriptions(port)
+ZCancelSubscriptions(unsigned int port) return (Z_Subscriptions((ZSubscription_t *)0, 0, port,
@@ -55,12 +50,8 @@
-Z_Subscriptions(sublist, nitems, port, opcode, authit)
- register ZSubscription_t *sublist;
+Z_Subscriptions(register ZSubscription_t *sublist, int nitems, + unsigned int port, char *opcode, int authit) @@ -160,11 +151,7 @@
-subscr_sendoff(notice, lyst, num, authit)
+subscr_sendoff(ZNotice_t *notice, char **lyst, int num, int authit) --- a/libpurple/protocols/zephyr/ZVariables.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZVariables.c Mon Nov 11 02:38:00 2019 +0000
@@ -47,9 +47,8 @@
-Code_t ZSetVariable(var, value)
+ZSetVariable(char *var, char *value) @@ -97,8 +96,8 @@
-Code_t ZUnsetVariable(var)
+ZUnsetVariable(char *var) char *varfile, *varfilebackup, varbfr[512];
--- a/libpurple/protocols/zephyr/ZWait4Not.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZWait4Not.c Mon Nov 11 02:38:00 2019 +0000
@@ -30,11 +30,9 @@
-Code_t Z_WaitForNotice (notice, pred, arg, timeout)
- int (*pred)(ZNotice_t *, void *);
+Z_WaitForNotice(ZNotice_t *notice, int (*pred)(ZNotice_t *, void *), void *arg, --- a/libpurple/protocols/zephyr/ZhmStat.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/ZhmStat.c Mon Nov 11 02:38:00 2019 +0000
@@ -20,9 +20,8 @@
#define INADDR_LOOPBACK 0x7f000001
-Code_t ZhmStat(hostaddr, notice)
- struct in_addr *hostaddr;
+ZhmStat(struct in_addr *hostaddr, ZNotice_t *notice) --- a/libpurple/protocols/zephyr/Zinternal.c Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/Zinternal.c Mon Nov 11 02:38:00 2019 +0000
@@ -69,9 +69,8 @@
* 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)
+find_or_insert_uid(ZUnique_Id_t *uid, ZNotice_Kind_t kind) @@ -170,7 +169,8 @@
/* Read any available packets and enqueue them */
@@ -220,7 +220,8 @@
register struct _Z_InputQ *qptr;
@@ -468,10 +469,8 @@
/* Fragment management routines - compliments, more or less, of RFC815 */
-Code_t Z_AddNoticeToEntry(qptr, notice, part)
- struct _Z_InputQ *qptr;
+Z_AddNoticeToEntry(struct _Z_InputQ *qptr, ZNotice_t *notice, int part) int last, oldfirst, oldlast;
struct _Z_Hole *hole, *lasthole;
@@ -585,12 +584,9 @@
-Code_t Z_FormatHeader(notice, buffer, buffer_len, len, cert_routine)
- Z_AuthProc cert_routine;
+Z_FormatHeader(ZNotice_t *notice, char *buffer, int buffer_len, int *len, + Z_AuthProc cert_routine) static char version[BUFSIZ]; /* default init should be all \0 */
@@ -630,12 +626,9 @@
return Z_FormatAuthHeader(notice, buffer, buffer_len, len, cert_routine);
-Code_t Z_FormatAuthHeader(notice, buffer, buffer_len, len, cert_routine)
- Z_AuthProc cert_routine;
+Z_FormatAuthHeader(ZNotice_t *notice, char *buffer, int buffer_len, int *len, + Z_AuthProc cert_routine) @@ -649,12 +642,9 @@
return ((*cert_routine)(notice, buffer, buffer_len, len));
-Code_t Z_FormatRawHeader(notice, buffer, buffer_len, len, cstart, cend)
+Z_FormatRawHeader(ZNotice_t *notice, char *buffer, gsize buffer_len, int *len, + char **cstart, char **cend) @@ -779,7 +769,8 @@
-struct _Z_InputQ *Z_GetFirstComplete()
+Z_GetFirstComplete(void) @@ -794,8 +785,8 @@
return ((struct _Z_InputQ *)0);
-struct _Z_InputQ *Z_GetNextComplete(qptr)
- struct _Z_InputQ *qptr;
+Z_GetNextComplete(struct _Z_InputQ *qptr) @@ -807,8 +798,8 @@
return ((struct _Z_InputQ *)0);
- struct _Z_InputQ *qptr;
+Z_RemQueue(struct _Z_InputQ *qptr) struct _Z_Hole *hole, *nexthole;
@@ -852,11 +843,9 @@
-Code_t Z_SendFragmentedNotice(notice, len, cert_func, send_func)
+Z_SendFragmentedNotice(ZNotice_t *notice, int len, Z_AuthProc cert_func, @@ -908,11 +897,8 @@
-Code_t Z_XmitFragment(notice, buf, len, wait)
+Z_XmitFragment(ZNotice_t *notice, char *buf, int len, int wait) return(ZSendPacket(buf, len, wait));
@@ -938,31 +924,44 @@
-void Z_debug_stderr (format, args, closure)
+Z_debug_stderr(const char *format, va_list args, void *closure) vfprintf (stderr, format, args);
-int ZGetFD () { return __Zephyr_fd; }
-int ZQLength () { return __Q_CompleteLength; }
+ return __Q_CompleteLength; -struct sockaddr_in ZGetDestAddr () { return __HM_addr; }
-Zconst char * ZGetRealm () { return __Zephyr_realm; }
-void ZSetDebug(proc, arg)
- void (*proc)(const char *, va_list, void *);
+ZSetDebug(void (*proc)(const char *, va_list, void *), char *arg) __Z_debug_print_closure = arg;
--- a/libpurple/protocols/zephyr/com_err.h Sun Nov 10 09:52:48 2019 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
- * Header file for common error description library.
- * Copyright 1988, Student Information Processing Board of the
- * Massachusetts Institute of Technology.
- * For copyright and distribution info, see the documentation supplied
-#ifndef PURPLE_ZEPHYR_COM_ERR_H
-#define PURPLE_ZEPHYR_COM_ERR_H
-#define COM_ERR_BUF_LEN 25
-typedef void (*error_handler_t)(const char *, long, const char *, va_list);
-extern error_handler_t com_err_hook;
-void com_err(const char *, long, const char *, ...);
-const char *error_message(long);
-const char *error_message_r(long, char *);
-error_handler_t set_com_err_hook(error_handler_t);
-error_handler_t reset_com_err_hook(void);
-#endif /* PURPLE_ZEPHYR_COM_ERR_H */
--- a/libpurple/protocols/zephyr/error_message.c Sun Nov 10 09:52:48 2019 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
- * Copyright 1987 by the Student Information Processing Board
- * of the Massachusetts Institute of Technology
- * For copyright info, see "mit-sipb-copyright.h".
-#include "error_table.h"
-char *error_table_name_r(int, char *);
-struct et_list * _et_list = (struct et_list *) NULL;
-const char * error_message (code)
- static char buf[COM_ERR_BUF_LEN];
- return(error_message_r(code, buf));
-const char * error_message_r (code, buf)
- offset = code & ((1<<ERRCODE_RANGE)-1);
- table_num = code - offset;
- return strerror(offset);
- for (et = _et_list; et; et = et->next) {
- if (et->table->base == table_num) {
- /* This is the right table */
- if (et->table->n_msgs <= offset)
- return(et->table->msgs[offset]);
- strcpy (buf, "Unknown code ");
- strcat (buf, error_table_name_r (table_num, namebuf));
- for (cp = buf; *cp; cp++)
- *cp++ = '0' + offset / 100;
- if (started || offset >= 10) {
- *cp++ = '0' + offset / 10;
--- a/libpurple/protocols/zephyr/error_table.h Sun Nov 10 09:52:48 2019 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
- * Copyright 1988 by the Student Information Processing Board of the
- * Massachusetts Institute of Technology.
- * For copyright info, see mit-sipb-copyright.h.
-#ifndef PURPLE_ZEPHYR_ERROR_TABLE_H
-#define PURPLE_ZEPHYR_ERROR_TABLE_H
- char const * const * msgs;
- const struct error_table *table;
-extern struct et_list * _et_list;
-#define ERRCODE_RANGE 8 /* # of bits to shift table number */
-#define BITS_PER_CHAR 6 /* # bits to shift per character in name */
-const char *error_table_name(void);
-#endif /* PURPLE_ZEPHYR_ERROR_TABLE_H */
--- a/libpurple/protocols/zephyr/et_name.c Sun Nov 10 09:52:48 2019 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
- * Copyright 1987 by MIT Student Information Processing Board
- * For copyright info, see mit-sipb-copyright.h.
-#define ERRCODE_RANGE 8 /* # of bits to shift table number */
-#define BITS_PER_CHAR 6 /* # bits to shift per character in name */
-static const char char_set[] =
- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_";
-/* Prototypes for -Wmissing-prototypes */
-const char * error_table_name(int num);
-const char * error_table_name_r(int num, char *buf);
-const char * error_table_name_r(int num, char *buf)
- /* num = aa aaa abb bbb bcc ccc cdd ddd d?? ??? ??? */
- /* num = ?? ??? ??? aaa aaa bbb bbb ccc ccc ddd ddd */
- /* num = 00 000 000 aaa aaa bbb bbb ccc ccc ddd ddd */
- for (i = 4; i >= 0; i--) {
- ch = (num >> BITS_PER_CHAR * i) & ((1 << BITS_PER_CHAR) - 1);
-const char * error_table_name(int num)
- return(error_table_name_r(num, buf));
--- a/libpurple/protocols/zephyr/init_et.c Sun Nov 10 09:52:48 2019 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
- * Copyright 1986, 1987, 1988 by MIT Information Systems and
- * the MIT Student Information Processing Board.
- * For copyright info, see mit-sipb-copyright.h.
-extern struct et_list * _et_list;
--- a/libpurple/protocols/zephyr/meson.build Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/meson.build Mon Nov 11 02:38:00 2019 +0000
@@ -44,16 +44,10 @@
--- a/libpurple/protocols/zephyr/sysdep.h Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/sysdep.h Mon Nov 11 02:38:00 2019 +0000
@@ -76,14 +76,8 @@
-# ifndef HAVE_KRB_GET_ERR_TEXT
-# define krb_get_err_text(n) krb_err_txt[n]
#endif /* ZEPHYR_USES_KERBEROS */
--- a/libpurple/protocols/zephyr/zephyr_err.c Sun Nov 10 09:52:48 2019 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-static const char * const text[] = {
- "Packet too long or buffer too small",
- "Notice header too large",
- "Illegal value in notice",
- "Can't get host manager port",
- "Incompatible version numbers",
- "No notices match criteria",
- "Input queue too long",
- "Hostmanager not responding",
- "No previous call to ZLocateUser",
- "No more locations available",
- "Field too long for buffer",
- "Improperly formatted field",
- "Server could not verify authentication",
- "No previous call to ZRetrieveSubscriptions",
- "No more subscriptions available",
- "Too many subscriptions to transmit",
- "End of file detected during read",
- char const * const * msgs;
- const struct error_table * table;
-extern struct et_list *_et_list;
-static const struct error_table et = { text, -772103680L, 23 };
-static struct et_list link = { 0, 0 };
-initialize_zeph_error_table(void)
--- a/libpurple/protocols/zephyr/zephyr_err.h Sun Nov 10 09:52:48 2019 +0000
+++ b/libpurple/protocols/zephyr/zephyr_err.h Mon Nov 11 02:38:00 2019 +0000
@@ -25,9 +25,4 @@
#define ZERR_NOMORESUBSCRIPTIONS (-772103660L)
#define ZERR_TOOMANYSUBS (-772103659L)
#define ZERR_EOF (-772103658L)
-void initialize_zeph_error_table (void);
#define ERROR_TABLE_BASE_zeph (-772103680L)
-/* for compatibility with older versions... */
-#define init_zeph_err_tbl initialize_zeph_error_table
-#define zeph_err_base ERROR_TABLE_BASE_zeph