gethostname (char *node, int nodelen)
{
	char	*p, tmp[32];

	strcpy (tmp, getenv("SYS$NODE"));	/* gets NODENAME:: */
	if (p = strchr (tmp, ':'))		/* chop off "::" */
	    *p = '\0';

	strncpy (node, tmp, nodelen);
	node[nodelen] = '\0';
}
               

syntax highlighted by Code2HTML, v. 0.9.1