1 |
diff -up sqlite-3.6.23/tool/lemon.c.system-template sqlite-3.6.23/tool/lemon.c |
2 |
--- sqlite-3.6.23/tool/lemon.c.system-template 2010-03-10 16:40:35.000000000 +0200 |
3 |
+++ sqlite-3.6.23/tool/lemon.c 2010-03-10 16:40:39.000000000 +0200 |
4 |
@@ -3106,6 +3106,8 @@ PRIVATE FILE *tplt_open(struct lemon *le |
5 |
tpltname = buf; |
6 |
}else if( access(templatename,004)==0 ){ |
7 |
tpltname = templatename; |
8 |
+ }else if( access("/usr/share/lemon/lempar.c", R_OK)==0){ |
9 |
+ tpltname = "/usr/share/lemon/lempar.c"; |
10 |
}else{ |
11 |
tpltname = pathsearch(lemp->argv0,templatename,0); |
12 |
} |
13 |
@@ -3117,7 +3119,7 @@ PRIVATE FILE *tplt_open(struct lemon *le |
14 |
} |
15 |
in = fopen(tpltname,"rb"); |
16 |
if( in==0 ){ |
17 |
- fprintf(stderr,"Can't open the template file \"%s\".\n",templatename); |
18 |
+ fprintf(stderr,"Can't open the template file \"%s\".\n",tpltname); |
19 |
lemp->errorcnt++; |
20 |
return 0; |
21 |
} |