err = AddrToStr(addr->hostinfo.addr[0], mybuf); buf[0] = '\0'; if (err != noErr) strncat(buf, mybuf, buflen - 1);
if (addr->resolved) {  err = AddrToStr(addr->hostinfo.addr[0], mybuf); buf[0] = '\0'; if (err != noErr) strncat(buf, mybuf, buflen - 1); } else { buf[0] = '\0'; strncat(buf, addr->hostname, buflen - 1); }
void sk_getaddr(SockAddr addr, char *buf, int buflen){    char mybuf[16];    OSErr err;    /* XXX only return first address */    err = AddrToStr(addr->hostinfo.addr[0], mybuf);    buf[0] = '\0';    if (err != noErr)	strncat(buf, mybuf, buflen - 1);}