summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authordavygrvy <davygrvy@pobox.com>2004-02-10 22:04:04 (GMT)
committerdavygrvy <davygrvy@pobox.com>2004-02-10 22:04:04 (GMT)
commitae618b29b5f2ff3f09a41439146bfdb7ab99a5dd (patch)
tree17610c07c5b2a88aa59c478f4b0e731d98ea32fb /win
parentd959c57e87fdef20e5ce0cb9b3bb134babe60bd3 (diff)
downloadtcl-ae618b29b5f2ff3f09a41439146bfdb7ab99a5dd.zip
tcl-ae618b29b5f2ff3f09a41439146bfdb7ab99a5dd.tar.gz
tcl-ae618b29b5f2ff3f09a41439146bfdb7ab99a5dd.tar.bz2
better macro grepping logic
Diffstat (limited to 'win')
-rw-r--r--win/nmakehlp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/win/nmakehlp.c b/win/nmakehlp.c
index b444696..4599315 100644
--- a/win/nmakehlp.c
+++ b/win/nmakehlp.c
@@ -9,13 +9,14 @@
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* ----------------------------------------------------------------------------
- * RCS: @(#) $Id: nmakehlp.c,v 1.6 2004/02/01 10:28:18 davygrvy Exp $
+ * RCS: @(#) $Id: nmakehlp.c,v 1.7 2004/02/10 22:04:04 davygrvy Exp $
* ----------------------------------------------------------------------------
*/
#include <windows.h>
#pragma comment (lib, "user32.lib")
#pragma comment (lib, "kernel32.lib")
#include <stdio.h>
+#include <math.h>
/* protos */
int CheckForCompilerFeature (const char *option);
@@ -345,7 +346,10 @@ GrepForDefine (const char *file, const char *string)
fclose(f);
/* add 1 past first double quote char. "8.5" */
d1 = atof(s3 + 1); /* 8.5 */
- return ((int) (d1 * 10) & 0xFF); /* 85 */
+ while (floor(d1) != d1) {
+ d1 *= 10.0;
+ }
+ return ((int) d1); /* 85 */
}
}
} while (!feof(f));