1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

In lemon, allows open() using the "b" option to avoid \r problems on windows.

Ticket #897. (CVS 1956)

FossilOrigin-Name: b5b2e3db09831fe808f9f2692a836eef716df1c5
This commit is contained in:
drh
2004-09-10 00:14:04 +00:00
parent 9db55dfb98
commit 2aa6ca45c1
3 changed files with 12 additions and 12 deletions

View File

@ -1,5 +1,5 @@
C Fix\slemon\sso\sthat\sinserted\scode\salways\sends\sin\sa\snewline.\s\sTicket\s#895.\s(CVS\s1955)
D 2004-09-09T14:01:21
C In\slemon,\sallows\sopen()\susing\sthe\s"b"\soption\sto\savoid\s\\r\sproblems\son\swindows.\nTicket\s#897.\s(CVS\s1956)
D 2004-09-10T00:14:04
F Makefile.in 7f481bb8cdb032491df611526e6f4eb6af79691d
F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
@ -193,7 +193,7 @@ F test/varint.test ab7b110089a08b9926ed7390e7e97bdefeb74102
F test/view.test ca5c296989d3045f121be9a67588ff88c64874a8
F test/where.test 40dcffcb77ad0a00960cef2b5b1212c77fd02199
F tool/diffdb.c 7524b1b5df217c20cd0431f6789851a4e0cb191b
F tool/lemon.c f11acad4ccada6ffb30da3169a3f65a073371afe
F tool/lemon.c 325099f65af17c348e9e9c821815530c8bc7ce53
F tool/lempar.c 0b5e7a58634e0d448929b8e85f7981c2aa708d57
F tool/memleak.awk b744b6109566206c746d826f6ecdba34662216bc
F tool/memleak2.awk 9cc20c8e8f3c675efac71ea0721ee6874a1566e8
@ -248,7 +248,7 @@ F www/tclsqlite.tcl 560ecd6a916b320e59f2917317398f3d59b7cc25
F www/vdbe.tcl 59288db1ac5c0616296b26dce071c36cb611dfe9
F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0
F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4
P 97d63b9290ef88b3cd8012c71fdd5b3c74eebc8f
R bb12d257317660cd4957fb8523cdbaf5
P 13fba17e3f75c08142db6acc8884a78ac0bcdfd6
R c6ee5ad3367f00fcaf51226ba83b5c85
U drh
Z 4a8b506cdcdd708f7136563b17330d6b
Z 3d9fb1c59ad3fcc362d01f6a7bf10d5f

View File

@ -1 +1 @@
13fba17e3f75c08142db6acc8884a78ac0bcdfd6
b5b2e3db09831fe808f9f2692a836eef716df1c5

View File

@ -2747,7 +2747,7 @@ struct lemon *lemp;
struct action *ap;
FILE *fp;
fp = file_open(lemp,".out","w");
fp = file_open(lemp,".out","wb");
if( fp==0 ) return;
fprintf(fp," \b");
for(i=0; i<lemp->nstate; i++){
@ -2914,7 +2914,7 @@ struct lemon *lemp;
lemp->errorcnt++;
return 0;
}
in = fopen(tpltname,"r");
in = fopen(tpltname,"rb");
if( in==0 ){
fprintf(stderr,"Can't open the template file \"%s\".\n",templatename);
lemp->errorcnt++;
@ -3355,7 +3355,7 @@ int mhflag; /* Output in makeheaders format if true */
in = tplt_open(lemp);
if( in==0 ) return;
out = file_open(lemp,".c","w");
out = file_open(lemp,".c","wb");
if( out==0 ){
fclose(in);
return;
@ -3764,7 +3764,7 @@ struct lemon *lemp;
if( lemp->tokenprefix ) prefix = lemp->tokenprefix;
else prefix = "";
in = file_open(lemp,".h","r");
in = file_open(lemp,".h","rb");
if( in ){
for(i=1; i<lemp->nterminal && fgets(line,LINESIZE,in); i++){
sprintf(pattern,"#define %s%-30s %2d\n",prefix,lemp->symbols[i]->name,i);
@ -3776,7 +3776,7 @@ struct lemon *lemp;
return;
}
}
out = file_open(lemp,".h","w");
out = file_open(lemp,".h","wb");
if( out ){
for(i=1; i<lemp->nterminal; i++){
fprintf(out,"#define %s%-30s %2d\n",prefix,lemp->symbols[i]->name,i);