mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-01 06:27:03 +03:00
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
This commit is contained in:
@ -4021,12 +4021,14 @@ void ReportHeader(struct lemon *lemp)
|
||||
else prefix = "";
|
||||
in = file_open(lemp,".h","rb");
|
||||
if( in ){
|
||||
int nextChar;
|
||||
for(i=1; i<lemp->nterminal && 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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user