summaryrefslogtreecommitdiffstats
path: root/win/nmakehlp.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-09-19 12:33:25 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-09-19 12:33:25 (GMT)
commit562176ad5a881a5f92f2985feab5401c375d559a (patch)
treea7583828161f3fa6868e69c2c9f818f83c503037 /win/nmakehlp.c
parent87baa038943501504fc76d2f330ad6987b384602 (diff)
downloadtcl-562176ad5a881a5f92f2985feab5401c375d559a.zip
tcl-562176ad5a881a5f92f2985feab5401c375d559a.tar.gz
tcl-562176ad5a881a5f92f2985feab5401c375d559a.tar.bz2
Let "nmakehlp -V" start searching digits after the found match (suggested by Harald Oehlmann)
Diffstat (limited to 'win/nmakehlp.c')
-rw-r--r--win/nmakehlp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/win/nmakehlp.c b/win/nmakehlp.c
index d0edcf0..b1a1517 100644
--- a/win/nmakehlp.c
+++ b/win/nmakehlp.c
@@ -498,9 +498,10 @@ GetVersionFromFile(
p = strstr(szBuffer, match);
if (p != NULL) {
/*
- * Skip to first digit.
+ * Skip to first digit after the match.
*/
+ p += strlen(match);
while (*p && !isdigit(*p)) {
++p;
}
@@ -630,11 +631,11 @@ SubstituteFile(
}
}
#endif
-
+
/*
* Run the substitutions over each line of the input
*/
-
+
while (fgets(szBuffer, cbBuffer, fp) != NULL) {
list_item_t *p = NULL;
for (p = substPtr; p != NULL; p = p->nextPtr) {
@@ -654,7 +655,7 @@ SubstituteFile(
}
printf(szBuffer);
}
-
+
list_free(&substPtr);
}
fclose(fp);