diff options
author | davygrvy <davygrvy@pobox.com> | 2004-02-10 22:04:04 (GMT) |
---|---|---|
committer | davygrvy <davygrvy@pobox.com> | 2004-02-10 22:04:04 (GMT) |
commit | ae618b29b5f2ff3f09a41439146bfdb7ab99a5dd (patch) | |
tree | 17610c07c5b2a88aa59c478f4b0e731d98ea32fb /win | |
parent | d959c57e87fdef20e5ce0cb9b3bb134babe60bd3 (diff) | |
download | tcl-ae618b29b5f2ff3f09a41439146bfdb7ab99a5dd.zip tcl-ae618b29b5f2ff3f09a41439146bfdb7ab99a5dd.tar.gz tcl-ae618b29b5f2ff3f09a41439146bfdb7ab99a5dd.tar.bz2 |
better macro grepping logic
Diffstat (limited to 'win')
-rw-r--r-- | win/nmakehlp.c | 8 |
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)); |