2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

as_ulong now works.

This commit is contained in:
Mark Andrews
1999-01-18 08:04:35 +00:00
parent f957caf971
commit bc6f28fa15

View File

@@ -289,6 +289,8 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
FILE *stream; FILE *stream;
char *curr, *prev; char *curr, *prev;
size_t remaining; size_t remaining;
u_long u_long;
unsigned int i;
/* /*
* Get the next token. * Get the next token.
@@ -432,11 +434,14 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
c; c;
tokenp->type = tokenp->type =
isc_tokentype_number; isc_tokentype_number;
/* XXX convert to number */ u_long = 0;
tokenp->value.as_textregion.base = for (i = 0;
lex->data; i < lex->max_token - remaining;
tokenp->value.as_textregion.length = i++) {
lex->max_token - remaining; u_long *= 10;
u_long += lex->data[i] - '0';
}
tokenp->value.as_ulong = u_long;
done = ISC_TRUE; done = ISC_TRUE;
continue; continue;
} else } else