From a39912dcd9ad21cba4bf1748200126dce3c011bf Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Wed, 13 Apr 2011 14:11:15 +0400 Subject: Move numvalue herleper into nasmlib.h No need to duplicate implementation. Signed-off-by: Cyrill Gorcunov --- nasmlib.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'nasmlib.h') diff --git a/nasmlib.h b/nasmlib.h index 2c335e1..e571159 100644 --- a/nasmlib.h +++ b/nasmlib.h @@ -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 -- cgit v1.2.3