updated on Fri Jan 6 00:09:29 UTC 2012
[aur-mirror.git] / lemon / lemon_share.diff
blob993f7a3d8c7f8db14e8f205c5b71e042cac99909
1 --- lemon.c~ 2008-12-20 18:30:37.000000000 +0000
2 +++ lemon.c 2008-12-20 18:34:26.000000000 +0000
3 @@ -3086,6 +3086,10 @@
4 tpltname = pathsearch(lemp->argv0,templatename,0);
6 if( tpltname==0 ){
7 + sprintf(buf,"/usr/share/lemon/%s",templatename);
8 + tpltname = buf;
9 + }
10 + if( tpltname==0 ){
11 fprintf(stderr,"Can't find the parser driver template file \"%s\".\n",
12 templatename);
13 lemp->errorcnt++;
14 --- lemon.c~ 2009-05-31 18:01:34.000000000 +0100
15 +++ lemon.c 2009-05-31 18:04:49.000000000 +0100
16 @@ -3097,7 +3097,7 @@
18 in = fopen(tpltname,"rb");
19 if( in==0 ){
20 - fprintf(stderr,"Can't open the template file \"%s\".\n",templatename);
21 + fprintf(stderr,"Can't open the template file \"%s\".\n",tpltname);
22 lemp->errorcnt++;
23 return 0;
25 --- lemon.c~ 2009-05-31 18:05:15.000000000 +0100
26 +++ lemon.c 2009-05-31 18:09:32.000000000 +0100
27 @@ -3097,9 +3097,14 @@
29 in = fopen(tpltname,"rb");
30 if( in==0 ){
31 - fprintf(stderr,"Can't open the template file \"%s\".\n",tpltname);
32 - lemp->errorcnt++;
33 - return 0;
34 + sprintf(buf,"/usr/share/lemon/%s",templatename);
35 + tpltname = buf;
36 + in = fopen(tpltname,"rb");
37 + if( in==0 ){
38 + fprintf(stderr,"Can't open the template file \"%s\".\n",tpltname);
39 + lemp->errorcnt++;
40 + return 0;
41 + }
43 return in;