svn commit: trunk/busybox/editors
vda at busybox.net
vda at busybox.net
Thu Aug 28 22:59:23 UTC 2008
Author: vda
Date: 2008-08-28 15:59:23 -0700 (Thu, 28 Aug 2008)
New Revision: 23279
Log:
awk: support hex constants
Modified:
trunk/busybox/editors/awk.c
Changeset:
Modified: trunk/busybox/editors/awk.c
===================================================================
--- trunk/busybox/editors/awk.c 2008-08-28 22:42:52 UTC (rev 23278)
+++ trunk/busybox/editors/awk.c 2008-08-28 22:59:23 UTC (rev 23279)
@@ -973,7 +973,12 @@
} 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;
More information about the busybox-cvs
mailing list