summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordavygrvy <davygrvy@noemail.net>2004-02-10 22:04:03 (GMT)
committerdavygrvy <davygrvy@noemail.net>2004-02-10 22:04:03 (GMT)
commitac12b05f7fecac1f6826765ec16fd3655a562755 (patch)
tree17610c07c5b2a88aa59c478f4b0e731d98ea32fb
parentdd6ae9896b23168a6160f9e23d96f925e50d9dc4 (diff)
downloadtcl-ac12b05f7fecac1f6826765ec16fd3655a562755.zip
tcl-ac12b05f7fecac1f6826765ec16fd3655a562755.tar.gz
tcl-ac12b05f7fecac1f6826765ec16fd3655a562755.tar.bz2
better macro grepping logic
FossilOrigin-Name: e404be82ccc6af21cfc1cf7bb8f363b1559a9074
-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));