Minor cleanup; remove duplication of names.c

This commit is contained in:
H. Peter Anvin 2007-08-31 00:16:10 +00:00
parent fb5a599c8a
commit 2c29a0b264
2 changed files with 4 additions and 10 deletions

View File

@ -686,14 +686,8 @@ void saa_fpwrite(struct SAA *s, FILE * fp)
}
/*
* Register, instruction, condition-code and prefix keywords used
* by the scanner.
* Common list of prefix names
*/
#include "names.c"
static const char *special_names[] = {
"abs", "byte", "dword", "far", "long", "near", "nosplit", "qword", "rel",
"short", "strict", "to", "tword", "word"
};
static const char *prefix_names[] = {
"a16", "a32", "lock", "o16", "o32", "rep", "repe", "repne",
"repnz", "repz", "times"

View File

@ -74,8 +74,8 @@ int stdscan(void *private_data, struct tokenval *tv)
if (isidstart(*stdscan_bufptr) ||
(*stdscan_bufptr == '$' && isidstart(stdscan_bufptr[1]))) {
/* now we've got an identifier */
uint32_t i;
int is_sym = FALSE;
int t;
if (*stdscan_bufptr == '$') {
is_sym = TRUE;
@ -99,8 +99,8 @@ int stdscan(void *private_data, struct tokenval *tv)
*r = '\0';
/* right, so we have an identifier sitting in temp storage. now,
* is it actually a register or instruction name, or what? */
if (nasm_token_hash(ourcopy, tv) != -1)
return tv->t_type;
if ((t = nasm_token_hash(ourcopy, tv)) != -1)
return t;
else
return tv->t_type = TOKEN_ID;
} else if (*stdscan_bufptr == '$' && !isnumchar(stdscan_bufptr[1])) {