summaryrefslogtreecommitdiffstats
path: root/win/nmakehlp.c
diff options
context:
space:
mode:
authordavygrvy <davygrvy@pobox.com>2009-01-19 19:54:19 (GMT)
committerdavygrvy <davygrvy@pobox.com>2009-01-19 19:54:19 (GMT)
commit0536b0c076360cf5725363e59e202d6dea76be13 (patch)
tree10fc07c3329a1f919f4b7dd70eab0856581bd18f /win/nmakehlp.c
parent6fb271b7c3cfc363fb177cc58fdebcfe3cfe6f47 (diff)
downloadtcl-0536b0c076360cf5725363e59e202d6dea76be13.zip
tcl-0536b0c076360cf5725363e59e202d6dea76be13.tar.gz
tcl-0536b0c076360cf5725363e59e202d6dea76be13.tar.bz2
* win/build.vc.bat: Improved tools detection and error message.
* win/makefile.vc: Reorganized the $(TCLOBJ) file list into seperate parts for easier maintenance. Matched all source built using -GL to both $(lib) and $(link) to use -LTCG and avoid a warning message. * win/nmakehlp.c: Removed -g option and GrepForDefine() func as it isn't being used anymore. The -V option method is much better.
Diffstat (limited to 'win/nmakehlp.c')
-rw-r--r--win/nmakehlp.c72
1 files changed, 1 insertions, 71 deletions
diff --git a/win/nmakehlp.c b/win/nmakehlp.c
index 65777aa..e75f92c 100644
--- a/win/nmakehlp.c
+++ b/win/nmakehlp.c
@@ -11,7 +11,7 @@
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* ----------------------------------------------------------------------------
- * RCS: @(#) $Id: nmakehlp.c,v 1.22 2008/05/15 00:04:10 patthoyts Exp $
+ * RCS: @(#) $Id: nmakehlp.c,v 1.23 2009/01/19 19:54:19 davygrvy Exp $
* ----------------------------------------------------------------------------
*/
@@ -43,7 +43,6 @@
int CheckForCompilerFeature(const char *option);
int CheckForLinkerFeature(const char *option);
int IsIn(const char *string, const char *substring);
-int GrepForDefine(const char *file, const char *string);
int SubstituteFile(const char *substs, const char *filename);
const char * GetVersionFromFile(const char *filename, const char *match);
DWORD WINAPI ReadFromPipe(LPVOID args);
@@ -128,18 +127,6 @@ main(
} else {
return IsIn(argv[2], argv[3]);
}
- case 'g':
- if (argc == 2) {
- chars = snprintf(msg, sizeof(msg) - 1,
- "usage: %s -g <file> <string>\n"
- "grep for a #define\n"
- "exitcodes: integer of the found string (no decimals)\n",
- argv[0]);
- WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars,
- &dwWritten, NULL);
- return 2;
- }
- return GrepForDefine(argv[2], argv[3]);
case 's':
if (argc == 2) {
chars = snprintf(msg, sizeof(msg) - 1,
@@ -469,63 +456,6 @@ IsIn(
}
/*
- * Find a specified #define by name.
- *
- * If the line is '#define TCL_VERSION "8.5"', it returns 85 as the result.
- */
-
-int
-GrepForDefine(
- const char *file,
- const char *string)
-{
- char s1[51], s2[51], s3[51];
- FILE *f = fopen(file, "rt");
-
- if (f == NULL) {
- return 0;
- }
-
- do {
- int r = fscanf(f, "%50s", s1);
-
- if (r == 1 && !strcmp(s1, "#define")) {
- /*
- * Get next two words.
- */
-
- r = fscanf(f, "%50s %50s", s2, s3);
- if (r != 2) {
- continue;
- }
-
- /*
- * Is the first word what we're looking for?
- */
-
- if (!strcmp(s2, string)) {
- double d1;
-
- fclose(f);
-
- /*
- * Add 1 past first double quote char. "8.5"
- */
-
- d1 = atof(s3 + 1); /* 8.5 */
- while (floor(d1) != d1) {
- d1 *= 10.0;
- }
- return ((int) d1); /* 85 */
- }
- }
- } while (!feof(f));
-
- fclose(f);
- return 0;
-}
-
-/*
* GetVersionFromFile --
* Looks for a match string in a file and then returns the version
* following the match where a version is anything acceptable to