mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-04-12 18:40:23 +08:00
Minor cleanup; remove duplication of names.c
This commit is contained in:
parent
fb5a599c8a
commit
2c29a0b264
@ -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"
|
||||
|
@ -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])) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user