projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d66aa3c
)
awk: support hex constants
author
Denis Vlasenko
<vda.linux@googlemail.com>
Thu, 28 Aug 2008 22:59:23 +0000
(22:59 -0000)
committer
Denis Vlasenko
<vda.linux@googlemail.com>
Thu, 28 Aug 2008 22:59:23 +0000
(22:59 -0000)
editors/awk.c
patch
|
blob
|
history
diff --git
a/editors/awk.c
b/editors/awk.c
index 571d68193a6d9cf88395400e1ac76fba75214a98..19f48401e5c18faa30aeee42d2f07d370254faa1 100644
(file)
--- a/
editors/awk.c
+++ b/
editors/awk.c
@@
-973,7
+973,12
@@
static uint32_t next_token(uint32_t expected)
} else if (*p == '.' || isdigit(*p)) {
/* it's a number */
- t_double = strtod(p, &p);
+#if ENABLE_DESKTOP
+ if (p[0] == '0' && (p[1] | 0x20) == 'x')
+ t_double = strtoll(p, &p, 0);
+ else
+#endif
+ t_double = strtod(p, &p);
if (*p == '.')
syntax_error(EMSG_UNEXP_TOKEN);
tc = TC_NUMBER;