Commit add40433 authored by Brian Wellington's avatar Brian Wellington
Browse files

The identical gettoken() routines in rdata.c, hex.c, and base64.c have

been replaced with isc_lex_getmastertoken().
parent 4b5a9213
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rdata.c,v 1.117 2000/11/07 23:44:33 bwelling Exp $ */
/* $Id: rdata.c,v 1.118 2000/11/08 01:55:25 bwelling Exp $ */
#include <config.h>
#include <ctype.h>
......@@ -132,10 +132,6 @@ uint16_fromregion(isc_region_t *region);
static isc_uint8_t
uint8_fromregion(isc_region_t *region);
static isc_result_t
gettoken(isc_lex_t *lexer, isc_token_t *token, isc_tokentype_t expect,
isc_boolean_t eol);
static isc_result_t
mem_tobuffer(isc_buffer_t *target, void *base, unsigned int length);
......@@ -561,8 +557,8 @@ dns_rdata_fromtextgeneric(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
st = *target;
region.base = (unsigned char *)(target->base) + target->used;
result = gettoken(lexer, &token, isc_tokentype_number,
ISC_FALSE);
result = isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ISC_FALSE);
if (result == ISC_R_SUCCESS && token.value.as_ulong > 65535)
result = ISC_R_RANGE;
if (result == ISC_R_SUCCESS)
......@@ -666,8 +662,9 @@ dns_rdata_fromtext(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
FROMTEXTSWITCH
if (use_default) {
result = gettoken(lexer, &token, isc_tokentype_number,
ISC_FALSE);
result = isc_lex_getmastertoken(lexer, &token,
isc_tokentype_number,
ISC_FALSE);
if (result == ISC_R_SUCCESS && token.value.as_ulong > 65535)
result = ISC_R_RANGE;
if (result == ISC_R_SUCCESS)
......@@ -1526,48 +1523,6 @@ uint8_fromregion(isc_region_t *region) {
return (region->base[0]);
}
static isc_result_t
gettoken(isc_lex_t *lexer, isc_token_t *token, isc_tokentype_t expect,
isc_boolean_t eol)
{
unsigned int options = ISC_LEXOPT_EOL | ISC_LEXOPT_EOF |
ISC_LEXOPT_DNSMULTILINE | ISC_LEXOPT_ESCAPE;
isc_result_t result;
if (expect == isc_tokentype_qstring)
options |= ISC_LEXOPT_QSTRING;
else if (expect == isc_tokentype_number)
options |= ISC_LEXOPT_NUMBER;
result = isc_lex_gettoken(lexer, options, token);
switch (result) {
case ISC_R_SUCCESS:
break;
case ISC_R_NOMEMORY:
return (ISC_R_NOMEMORY);
case ISC_R_NOSPACE:
return (ISC_R_NOSPACE);
default:
UNEXPECTED_ERROR(__FILE__, __LINE__,
"isc_lex_gettoken() failed: %s",
isc_result_totext(result));
return (ISC_R_UNEXPECTED);
}
if (eol && ((token->type == isc_tokentype_eol) ||
(token->type == isc_tokentype_eof)))
return (ISC_R_SUCCESS);
if (token->type == isc_tokentype_string &&
expect == isc_tokentype_qstring)
return (ISC_R_SUCCESS);
if (token->type != expect) {
isc_lex_ungettoken(lexer, token);
if (token->type == isc_tokentype_eol ||
token->type == isc_tokentype_eof)
return (ISC_R_UNEXPECTEDEND);
return (ISC_R_UNEXPECTEDTOKEN);
}
return (ISC_R_SUCCESS);
}
static isc_result_t
mem_tobuffer(isc_buffer_t *target, void *base, unsigned int length) {
isc_region_t tr;
......@@ -1751,7 +1706,8 @@ atob_tobuffer(isc_lex_t *lexer, isc_buffer_t *target) {
Ceor = Csum = Crot = word = bcount = 0;
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE));
while (token.value.as_textregion.length != 0) {
if ((c = token.value.as_textregion.base[0]) == 'x') {
break;
......@@ -1763,14 +1719,16 @@ atob_tobuffer(isc_lex_t *lexer, isc_buffer_t *target) {
/*
* Number of bytes.
*/
RETERR(gettoken(lexer, &token, isc_tokentype_number, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ISC_FALSE));
if ((token.value.as_ulong % 4) != 0)
isc_buffer_subtract(target, 4 - (token.value.as_ulong % 4));
/*
* Checksum.
*/
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE));
oeor = strtol(token.value.as_pointer, &e, 16);
if (*e != 0)
return (DNS_R_SYNTAX);
......@@ -1778,7 +1736,8 @@ atob_tobuffer(isc_lex_t *lexer, isc_buffer_t *target) {
/*
* Checksum.
*/
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE));
osum = strtol(token.value.as_pointer, &e, 16);
if (*e != 0)
return (DNS_R_SYNTAX);
......@@ -1786,14 +1745,15 @@ atob_tobuffer(isc_lex_t *lexer, isc_buffer_t *target) {
/*
* Checksum.
*/
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE));
orot = strtol(token.value.as_pointer, &e, 16);
if (*e != 0)
return (DNS_R_SYNTAX);
if ((oeor != Ceor) || (osum != Csum) || (orot != Crot))
return(DNS_R_BADCKSUM);
return(ISC_R_SUCCESS);
return (ISC_R_SUCCESS);
}
/*
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: tsig_250.c,v 1.44 2000/10/25 05:43:26 marka Exp $ */
/* $Id: tsig_250.c,v 1.45 2000/11/08 01:55:31 bwelling Exp $ */
/* Reviewed: Thu Mar 16 13:39:43 PST 2000 by gson */
......@@ -41,7 +41,8 @@ fromtext_any_tsig(ARGS_FROMTEXT) {
/*
* Algorithm Name.
*/
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE));
dns_name_init(&name, NULL);
buffer_fromregion(&buffer, &token.value.as_region);
origin = (origin != NULL) ? origin : dns_rootname;
......@@ -50,7 +51,8 @@ fromtext_any_tsig(ARGS_FROMTEXT) {
/*
* Time Signed: 48 bits.
*/
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE));
sigtime = isc_string_touint64(token.value.as_pointer, &e, 10);
if (*e != 0)
return (DNS_R_SYNTAX);
......@@ -62,7 +64,8 @@ fromtext_any_tsig(ARGS_FROMTEXT) {
/*
* Fudge.
*/
RETERR(gettoken(lexer, &token, isc_tokentype_number, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ISC_FALSE));
if (token.value.as_ulong > 0xffff)
return (ISC_R_RANGE);
RETERR(uint16_tobuffer(token.value.as_ulong, target));
......@@ -70,7 +73,8 @@ fromtext_any_tsig(ARGS_FROMTEXT) {
/*
* Signature Size.
*/
RETERR(gettoken(lexer, &token, isc_tokentype_number, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ISC_FALSE));
if (token.value.as_ulong > 0xffff)
return (ISC_R_RANGE);
RETERR(uint16_tobuffer(token.value.as_ulong, target));
......@@ -83,7 +87,8 @@ fromtext_any_tsig(ARGS_FROMTEXT) {
/*
* Original ID.
*/
RETERR(gettoken(lexer, &token, isc_tokentype_number, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ISC_FALSE));
if (token.value.as_ulong > 0xffff)
return (ISC_R_RANGE);
RETERR(uint16_tobuffer(token.value.as_ulong, target));
......@@ -91,7 +96,8 @@ fromtext_any_tsig(ARGS_FROMTEXT) {
/*
* Error.
*/
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE));
if (dns_tsigrcode_fromtext(&rcode, &token.value.as_textregion)
!= ISC_R_SUCCESS)
{
......@@ -107,7 +113,8 @@ fromtext_any_tsig(ARGS_FROMTEXT) {
/*
* Other Len.
*/
RETERR(gettoken(lexer, &token, isc_tokentype_number, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ISC_FALSE));
if (token.value.as_ulong > 0xffff)
return (ISC_R_RANGE);
RETERR(uint16_tobuffer(token.value.as_ulong, target));
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: afsdb_18.c,v 1.32 2000/10/25 05:43:27 marka Exp $ */
/* $Id: afsdb_18.c,v 1.33 2000/11/08 01:55:33 bwelling Exp $ */
/* Reviewed: Wed Mar 15 14:59:00 PST 2000 by explorer */
......@@ -39,7 +39,8 @@ fromtext_afsdb(ARGS_FROMTEXT) {
/*
* Subtype.
*/
RETERR(gettoken(lexer, &token, isc_tokentype_number, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ISC_FALSE));
if (token.value.as_ulong > 0xffff)
return (ISC_R_RANGE);
RETERR(uint16_tobuffer(token.value.as_ulong, target));
......@@ -47,7 +48,8 @@ fromtext_afsdb(ARGS_FROMTEXT) {
/*
* Hostname.
*/
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE));
dns_name_init(&name, NULL);
buffer_fromregion(&buffer, &token.value.as_region);
origin = (origin != NULL) ? origin : dns_rootname;
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: cert_37.c,v 1.33 2000/10/25 05:43:28 marka Exp $ */
/* $Id: cert_37.c,v 1.34 2000/11/08 01:55:34 bwelling Exp $ */
/* Reviewed: Wed Mar 15 21:14:32 EST 2000 by tale */
......@@ -41,14 +41,16 @@ fromtext_cert(ARGS_FROMTEXT) {
/*
* Cert type.
*/
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE));
RETERR(dns_cert_fromtext(&cert, &token.value.as_textregion));
RETERR(uint16_tobuffer(cert, target));
/*
* Key tag.
*/
RETERR(gettoken(lexer, &token, isc_tokentype_number, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ISC_FALSE));
if (token.value.as_ulong > 0xffff)
return (ISC_R_RANGE);
RETERR(uint16_tobuffer(token.value.as_ulong, target));
......@@ -56,7 +58,8 @@ fromtext_cert(ARGS_FROMTEXT) {
/*
* Algorithm.
*/
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE));
RETERR(dns_secalg_fromtext(&secalg, &token.value.as_textregion));
RETERR(mem_tobuffer(target, &secalg, 1));
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: cname_5.c,v 1.36 2000/10/25 05:43:29 marka Exp $ */
/* $Id: cname_5.c,v 1.37 2000/11/08 01:55:35 bwelling Exp $ */
/* reviewed: Wed Mar 15 16:48:45 PST 2000 by brister */
......@@ -26,7 +26,7 @@
(DNS_RDATATYPEATTR_EXCLUSIVE | DNS_RDATATYPEATTR_SINGLETON)
static inline isc_result_t
fromtext_cname(ARGS_FROMTEXT) {
fromtext_cname(ARGS_FROMTEXT) {
isc_token_t token;
dns_name_t name;
isc_buffer_t buffer;
......@@ -35,7 +35,8 @@ static inline isc_result_t
UNUSED(rdclass);
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE));
dns_name_init(&name, NULL);
buffer_fromregion(&buffer, &token.value.as_region);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dname_39.c,v 1.26 2000/10/25 05:43:30 marka Exp $ */
/* $Id: dname_39.c,v 1.27 2000/11/08 01:55:36 bwelling Exp $ */
/* Reviewed: Wed Mar 15 16:52:38 PST 2000 by explorer */
......@@ -36,7 +36,8 @@ fromtext_dname(ARGS_FROMTEXT) {
REQUIRE(type == 39);
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE));
dns_name_init(&name, NULL);
buffer_fromregion(&buffer, &token.value.as_region);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: gpos_27.c,v 1.25 2000/10/25 05:43:31 marka Exp $ */
/* $Id: gpos_27.c,v 1.26 2000/11/08 01:55:38 bwelling Exp $ */
/* reviewed: Wed Mar 15 16:48:45 PST 2000 by brister */
......@@ -38,8 +38,9 @@ fromtext_gpos(ARGS_FROMTEXT) {
UNUSED(downcase);
for (i = 0; i < 3 ; i++) {
RETERR(gettoken(lexer, &token, isc_tokentype_qstring,
ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token,
isc_tokentype_qstring,
ISC_FALSE));
RETERR(txt_fromtext(&token.value.as_textregion, target));
}
return (ISC_R_SUCCESS);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: hinfo_13.c,v 1.30 2000/10/25 05:43:33 marka Exp $ */
/* $Id: hinfo_13.c,v 1.31 2000/11/08 01:55:39 bwelling Exp $ */
/*
* Reviewed: Wed Mar 15 16:47:10 PST 2000 by halley.
......@@ -38,8 +38,9 @@ fromtext_hinfo(ARGS_FROMTEXT) {
REQUIRE(type == 13);
for (i = 0; i < 2 ; i++) {
RETERR(gettoken(lexer, &token, isc_tokentype_qstring,
ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token,
isc_tokentype_qstring,
ISC_FALSE));
RETERR(txt_fromtext(&token.value.as_textregion, target));
}
return (ISC_R_SUCCESS);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: isdn_20.c,v 1.23 2000/10/25 05:43:34 marka Exp $ */
/* $Id: isdn_20.c,v 1.24 2000/11/08 01:55:40 bwelling Exp $ */
/* Reviewed: Wed Mar 15 16:53:11 PST 2000 by bwelling */
......@@ -37,11 +37,13 @@ fromtext_isdn(ARGS_FROMTEXT) {
REQUIRE(type == 20);
/* ISDN-address */
RETERR(gettoken(lexer, &token, isc_tokentype_qstring, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_qstring,
ISC_FALSE));
RETERR(txt_fromtext(&token.value.as_textregion, target));
/* sa: optional */
RETERR(gettoken(lexer, &token, isc_tokentype_qstring, ISC_TRUE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_qstring,
ISC_TRUE));
if (token.type != isc_tokentype_string &&
token.type != isc_tokentype_qstring) {
isc_lex_ungettoken(lexer, &token);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: key_25.c,v 1.33 2000/10/31 20:12:32 bwelling Exp $ */
/* $Id: key_25.c,v 1.34 2000/11/08 01:55:41 bwelling Exp $ */
/*
* Reviewed: Wed Mar 15 16:47:10 PST 2000 by halley.
......@@ -44,17 +44,20 @@ fromtext_key(ARGS_FROMTEXT) {
REQUIRE(type == 25);
/* flags */
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE));
RETERR(dns_keyflags_fromtext(&flags, &token.value.as_textregion));
RETERR(uint16_tobuffer(flags, target));
/* protocol */
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE));
RETERR(dns_secproto_fromtext(&proto, &token.value.as_textregion));
RETERR(mem_tobuffer(target, &proto, 1));
/* algorithm */
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE));
RETERR(dns_secalg_fromtext(&alg, &token.value.as_textregion));
RETERR(mem_tobuffer(target, &alg, 1));
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: loc_29.c,v 1.24 2000/10/25 05:43:37 marka Exp $ */
/* $Id: loc_29.c,v 1.25 2000/11/08 01:55:42 bwelling Exp $ */
/* Reviewed: Wed Mar 15 18:13:09 PST 2000 by explorer */
......@@ -69,14 +69,16 @@ fromtext_loc(ARGS_FROMTEXT) {
/*
* Degrees.
*/
RETERR(gettoken(lexer, &token, isc_tokentype_number, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ISC_FALSE));
if (token.value.as_ulong > 90)
return (ISC_R_RANGE);
d1 = (int)token.value.as_ulong;
/*
* Minutes.
*/
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE));
if (strcasecmp(token.value.as_pointer, "N") == 0)
north = ISC_TRUE;
if (north || strcasecmp(token.value.as_pointer, "S") == 0)
......@@ -92,7 +94,8 @@ fromtext_loc(ARGS_FROMTEXT) {
/*
* Seconds.
*/
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE));
if (strcasecmp(token.value.as_pointer, "N") == 0)
north = ISC_TRUE;
if (north || strcasecmp(token.value.as_pointer, "S") == 0)
......@@ -124,7 +127,8 @@ fromtext_loc(ARGS_FROMTEXT) {
/*
* Direction.
*/
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE));
if (strcasecmp(token.value.as_pointer, "N") == 0)
north = ISC_TRUE;
if (!north && strcasecmp(token.value.as_pointer, "S") != 0)
......@@ -134,7 +138,8 @@ fromtext_loc(ARGS_FROMTEXT) {
/*
* Degrees.
*/
RETERR(gettoken(lexer, &token, isc_tokentype_number, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ISC_FALSE));
if (token.value.as_ulong > 180)
return (ISC_R_RANGE);
d2 = (int)token.value.as_ulong;
......@@ -142,7 +147,8 @@ fromtext_loc(ARGS_FROMTEXT) {
/*
* Minutes.
*/
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE));
if (strcasecmp(token.value.as_pointer, "E") == 0)
east = ISC_TRUE;
if (east || strcasecmp(token.value.as_pointer, "W") == 0)
......@@ -158,7 +164,8 @@ fromtext_loc(ARGS_FROMTEXT) {
/*
* Seconds.
*/
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE));
if (strcasecmp(token.value.as_pointer, "E") == 0)
east = ISC_TRUE;
if (east || strcasecmp(token.value.as_pointer, "W") == 0)
......@@ -190,7 +197,8 @@ fromtext_loc(ARGS_FROMTEXT) {
/*
* Direction.
*/
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE));
if (strcasecmp(token.value.as_pointer, "E") == 0)
east = ISC_TRUE;
if (!east && strcasecmp(token.value.as_pointer, "W") != 0)
......@@ -200,7 +208,8 @@ fromtext_loc(ARGS_FROMTEXT) {
/*
* Altitude.
*/
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE));
m = strtol(token.value.as_pointer, &e, 10);
if (*e != 0 && *e != '.' && *e != 'm')
return (DNS_R_SYNTAX);
......@@ -241,7 +250,8 @@ fromtext_loc(ARGS_FROMTEXT) {
/*
* Size: optional.
*/
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_TRUE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_TRUE));
if (token.type == isc_tokentype_eol ||
token.type == isc_tokentype_eof) {
isc_lex_ungettoken(lexer, &token);
......@@ -293,7 +303,8 @@ fromtext_loc(ARGS_FROMTEXT) {
/*
* Horizontal precision: optional.
*/
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_TRUE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_TRUE));
if (token.type == isc_tokentype_eol ||
token.type == isc_tokentype_eof) {
isc_lex_ungettoken(lexer, &token);
......@@ -343,7 +354,8 @@ fromtext_loc(ARGS_FROMTEXT) {
/*
* Vertical precision: optional.
*/
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_TRUE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_TRUE));
if (token.type == isc_tokentype_eol ||
token.type == isc_tokentype_eof) {
isc_lex_ungettoken(lexer, &token);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: mb_7.c,v 1.34 2000/10/25 05:43:38 marka Exp $ */
/* $Id: mb_7.c,v 1.35 2000/11/08 01:55:44 bwelling Exp $ */
/* Reviewed: Wed Mar 15 17:31:26 PST 2000 by bwelling */
......@@ -34,7 +34,8 @@ fromtext_mb(ARGS_FROMTEXT) {
REQUIRE(type == 7);
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE));
dns_name_init(&name, NULL);
buffer_fromregion(&buffer, &token.value.as_region);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: md_3.c,v 1.36 2000/10/25 05:43:39 marka Exp $ */
/* $Id: md_3.c,v 1.37 2000/11/08 01:55:45 bwelling Exp $ */
/* Reviewed: Wed Mar 15 17:48:20 PST 2000 by bwelling */
......@@ -34,7 +34,8 @@ fromtext_md(ARGS_FROMTEXT) {
REQUIRE(type == 3);
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE));
dns_name_init(&name, NULL);
buffer_fromregion(&buffer, &token.value.as_region);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: mf_4.c,v 1.34 2000/10/25 05:43:40 marka Exp $ */
/* $Id: mf_4.c,v 1.35 2000/11/08 01:55:46 bwelling Exp $ */
/* reviewed: Wed Mar 15 17:47:33 PST 2000 by brister */
......@@ -34,7 +34,8 @@ fromtext_mf(ARGS_FROMTEXT) {