#include <stdio.h>
#ifdef WIN32
#include <io.h>
#include <fcntl.h>
#endif

int
gethost_main()
{
	extern	char	*sccs_gethost();
	char 	*host;

#ifdef WIN32
	setmode(1, _O_BINARY);
#endif
	host = sccs_gethost();
	if ((host == NULL) || (*host == '\0')) return (1);
	printf("%s\n", host);
	return (0);
}

#include <stdio.h>
#ifdef WIN32
#include <io.h>
#include <fcntl.h>
#endif

int
gethost_main()
{
	extern	char	*sccs_gethost();
	char 	*host;

#ifdef WIN32
	setmode(1, _O_BINARY);
#endif
	host = sccs_gethost();
	if ((host == NULL) || (*host == '\0')) return (1);
	printf("%s\n", host);
	/* make isure we have a good domain name */
	if (strchr(host, '.') == NULL) return (1);
	return (0);
}

Add two more check to x.chk_env a) make sure host name have at least one dot b) add a http test
Add two more check to x.chk_env
a) make sure host name have at least one dot
b) add a http test

bk: 39466063LfKperUt13MbGKJrzx5juA