mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-11-21 03:14:19 +08:00
Move numvalue herleper into nasmlib.h
No need to duplicate implementation. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
parent
fb27fc21e7
commit
a39912dcd9
4
nasm.h
4
nasm.h
@ -400,10 +400,6 @@ extern Preproc nasmpp;
|
||||
#define isnumstart(c) ( nasm_isdigit(c) || (c)=='$' )
|
||||
#define isnumchar(c) ( nasm_isalnum(c) || (c)=='_' )
|
||||
|
||||
/* This returns the numeric value of a given 'digit'. */
|
||||
|
||||
#define numvalue(c) ((c)>='a' ? (c)-'a'+10 : (c)>='A' ? (c)-'A'+10 : (c)-'0')
|
||||
|
||||
/*
|
||||
* Data-type flags that get passed to listing-file routines.
|
||||
*/
|
||||
|
@ -291,8 +291,7 @@ char *nasm_strsep(char **stringp, const char *delim)
|
||||
#endif
|
||||
|
||||
|
||||
#define lib_isnumchar(c) (nasm_isalnum(c) || (c) == '$' || (c) == '_')
|
||||
#define numvalue(c) ((c)>='a' ? (c)-'a'+10 : (c)>='A' ? (c)-'A'+10 : (c)-'0')
|
||||
#define lib_isnumchar(c) (nasm_isalnum(c) || (c) == '$' || (c) == '_')
|
||||
|
||||
static int radix_letter(char c)
|
||||
{
|
||||
|
@ -205,6 +205,8 @@ int nasm_memicmp(const char *, const char *, size_t);
|
||||
char *nasm_strsep(char **stringp, const char *delim);
|
||||
#endif
|
||||
|
||||
/* This returns the numeric value of a given 'digit'. */
|
||||
#define numvalue(c) ((c) >= 'a' ? (c) - 'a' + 10 : (c) >= 'A' ? (c) - 'A' + 10 : (c) - '0')
|
||||
|
||||
/*
|
||||
* Convert a string into a number, using NASM number rules. Sets
|
||||
|
Loading…
Reference in New Issue
Block a user