char nbuf[MAXDNAME];
char nbuf[MAXDNAME * 2 + 2];
res_querydomain(name, domain, class, type, answer, anslen)	const char *name, *domain;	int class, type;	/* class and type of query */	u_char *answer;		/* buffer to put answer */	int anslen;		/* size of answer */{	char nbuf[MAXDNAME];	const char *longname = nbuf;	int n;	if ((_res.options & RES_INIT) == 0 && res_init() == -1) {		__set_h_errno (NETDB_INTERNAL);		return (-1);	}#ifdef DEBUG	if (_res.options & RES_DEBUG)		printf(";; res_querydomain(%s, %s, %d, %d)\n",		       name, domain?domain:"<Nil>", class, type);#endif	if (domain == NULL) {		/*		 * Check for trailing '.';		 * copy without '.' if present.		 */		n = strlen(name) - 1;		if (n != (0 - 1) && name[n] == '.'		    && n < (int) (sizeof(nbuf) - 1)) {			bcopy(name, nbuf, n);			nbuf[n] = '\0';		} else			longname = name;	} else		sprintf(nbuf, "%.*s.%.*s", MAXDNAME, name, MAXDNAME, domain);	return (res_query(longname, class, type, answer, anslen));}