* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: t_names.c,v 1.46.158.2 2009/01/22 23:47:05 tbox Exp $ */
+/* $Id: t_names.c,v 1.50 2009/09/01 23:47:44 tbox Exp $ */
#include <config.h>
isc_buffer_init(binbuf, junk, BUFLEN);
dns_name_init(dns_name, NULL);
dns_name_setbuffer(dns_name, binbuf);
- result = dns_name_fromtext(dns_name, &txtbuf,
- NULL, ISC_FALSE, NULL);
+ result = dns_name_fromtext(dns_name, &txtbuf, NULL, 0, NULL);
} else {
result = ISC_R_NOSPACE;
if (junk != NULL)
isc_buffer_init(&binbuf, &junk[0], BUFLEN);
dns_name_init(&name, NULL);
dns_name_setbuffer(&name, &binbuf);
- result = dns_name_fromtext(&name, &buf, NULL, ISC_FALSE, NULL);
+ result = dns_name_fromtext(&name, &buf, NULL, 0, NULL);
if (result == ISC_R_SUCCESS) {
isabs_p = dns_name_isabsolute(&name);
if (isabs_p == expected)
static int
test_dns_name_fromtext(char *test_name1, char *test_name2, char *test_origin,
- isc_boolean_t downcase)
+ unsigned int downcase)
{
int result;
int order;
dns_name_setbuffer(&dns_name2, &binbuf2);
dns_name_setbuffer(&dns_name3, &binbuf3);
- dns_result = dns_name_fromtext(&dns_name3, &txtbuf3, NULL,
- ISC_FALSE, &binbuf3);
+ dns_result = dns_name_fromtext(&dns_name3, &txtbuf3, NULL, 0,
+ &binbuf3);
if (dns_result != ISC_R_SUCCESS) {
t_info("dns_name_fromtext(dns_name3) failed, result == %s\n",
dns_result_totext(dns_result));
return (T_FAIL);
}
- dns_result = dns_name_fromtext(&dns_name2, &txtbuf2, NULL,
- ISC_FALSE, &binbuf2);
+ dns_result = dns_name_fromtext(&dns_name2, &txtbuf2, NULL, 0,
+ &binbuf2);
if (dns_result != ISC_R_SUCCESS) {
t_info("dns_name_fromtext(dns_name2) failed, result == %s\n",
dns_result_totext(dns_result));
Tokens[2],
atoi(Tokens[3])
== 0 ?
- ISC_FALSE :
- ISC_TRUE);
+ 0 :
+ DNS_NAME_DOWNCASE);
} else {
t_info("bad format at line %d\n", line);
}
/*
* Out of the data file to dns_name1.
*/
- dns_result = dns_name_fromtext(&dns_name1, &buf1, NULL, ISC_FALSE,
- &buf2);
+ dns_result = dns_name_fromtext(&dns_name1, &buf1, NULL, 0, &buf2);
if (dns_result != ISC_R_SUCCESS) {
t_info("dns_name_fromtext failed, result == %s\n",
dns_result_totext(dns_result));
*/
dns_name_init(&dns_name2, NULL);
isc_buffer_init(&buf3, junk3, BUFLEN);
- dns_result = dns_name_fromtext(&dns_name2, &buf1, NULL, ISC_FALSE,
- &buf3);
+ dns_result = dns_name_fromtext(&dns_name2, &buf1, NULL, 0, &buf3);
if (dns_result != ISC_R_SUCCESS) {
t_info("dns_name_fromtext failed, result == %s\n",
dns_result_totext(dns_result));
isc_buffer_init(&iscbuf1, testname, len);
isc_buffer_add(&iscbuf1, len);
isc_buffer_init(&iscbuf2, buf2, BUFLEN);
- dns_result = dns_name_fromtext(&dns_name, &iscbuf1, NULL, ISC_FALSE,
- &iscbuf2);
+ dns_result = dns_name_fromtext(&dns_name, &iscbuf1, NULL, 0, &iscbuf2);
if (dns_result == ISC_R_SUCCESS) {
isc_buffer_init(&iscbuf3, buf3, buflen);
dns_result = dns_name_towire(&dns_name, &cctx, &iscbuf3);