if (maxlen <= 0 || buf == NULL) return;
static void GetHostname (buf, maxlen)    char *buf;    int maxlen;{    int len;#ifdef USE_UNAME    struct utsname name;    uname (&name);    len = strlen (name.nodename);    if (len >= maxlen) len = maxlen;    (void) strncpy (buf, name.nodename, len);    buf[len-1] = '\0';#else    buf[0] = '\0';    (void) gethostname (buf, maxlen);    buf [maxlen - 1] = '\0';#endif}