From 8ba0d1cbca6ffd8f0fb93de1d5b51451591b0500 Mon Sep 17 00:00:00 2001 From: drh Date: Sat, 16 Jun 2012 15:26:31 +0000 Subject: [PATCH] In Lemon, when comparing the output to the *.h file to see if it has changed, make sure that the proposed new output and the preexisting output are the same size before deciding that they are the same. FossilOrigin-Name: 0c2fb18d25217ada7e75dcab8b342bbc632875d8 --- manifest | 15 ++++++--------- manifest.uuid | 2 +- tool/lemon.c | 4 +++- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/manifest b/manifest index 8e0fdc7786..1043803b95 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Version\s3.7.13 -D 2012-06-11T02:05:22.539 +C In\sLemon,\swhen\scomparing\sthe\soutput\sto\sthe\s*.h\sfile\sto\ssee\sif\sit\shas\schanged,\nmake\ssure\sthat\sthe\sproposed\snew\soutput\sand\sthe\spreexisting\soutput\sare\sthe\nsame\ssize\sbefore\sdeciding\sthat\sthey\sare\sthe\ssame. +D 2012-06-16T15:26:31.082 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in d17fddaa4e81f93a7c9c7c0808aacb3fc95f79f4 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -973,7 +973,7 @@ F tool/fragck.tcl 5265a95126abcf6ab357f7efa544787e5963f439 F tool/genfkey.README cf68fddd4643bbe3ff8e31b8b6d8b0a1b85e20f4 F tool/genfkey.test 4196a8928b78f51d54ef58e99e99401ab2f0a7e5 F tool/getlock.c f4c39b651370156cae979501a7b156bdba50e7ce -F tool/lemon.c 90f46af31c92b940fec25b491f39409fd95dcdfa +F tool/lemon.c 8b7afc12a6671e3a932a5209a9e64abbfbd0f025 F tool/lempar.c 01ca97f87610d1dac6d8cd96ab109ab1130e76dc F tool/mkkeywordhash.c bb52064aa614e1426445e4b2b9b00eeecd23cc79 F tool/mkopts.tcl 66ac10d240cc6e86abd37dc908d50382f84ff46e @@ -1005,10 +1005,7 @@ F tool/tostr.awk e75472c2f98dd76e06b8c9c1367f4ab07e122d06 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 -P 0ae0ce630a2e11f81dca50a9cfb04c4a41c03b2d -R 45dae5fdb66a9a88c8595b45bd7db627 -T +bgcolor * #d0c0ff -T +sym-release * -T +sym-version-3.7.13 * +P f5b5a13f7394dc143aa136f1d4faba6839eaa6dc +R 1f8bdd1a411e91223aef9522ba34a3e6 U drh -Z c0babe9c1caac24f66a10b2544a508b6 +Z 53f96406b6eec20edfa4ee33fc7d7346 diff --git a/manifest.uuid b/manifest.uuid index 168458e2bb..0425283c18 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -f5b5a13f7394dc143aa136f1d4faba6839eaa6dc \ No newline at end of file +0c2fb18d25217ada7e75dcab8b342bbc632875d8 \ No newline at end of file diff --git a/tool/lemon.c b/tool/lemon.c index 5d96995335..2786e01dcd 100644 --- a/tool/lemon.c +++ b/tool/lemon.c @@ -4021,12 +4021,14 @@ void ReportHeader(struct lemon *lemp) else prefix = ""; in = file_open(lemp,".h","rb"); if( in ){ + int nextChar; for(i=1; interminal && fgets(line,LINESIZE,in); i++){ sprintf(pattern,"#define %s%-30s %2d\n",prefix,lemp->symbols[i]->name,i); if( strcmp(line,pattern) ) break; } + nextChar = fgetc(in); fclose(in); - if( i==lemp->nterminal ){ + if( i==lemp->nterminal && nextChar==EOF ){ /* No change in the file. Don't rewrite it. */ return; } -- 2.47.2