libsqlite/libsqlite-3.6.23.1-lemon-system-template.patch

22 lines
668 B
Diff
Raw Normal View History

--- tool/lemon.c 2010-03-23 14:06:21.000000000 +0100
+++ tool/lemon.c-gil 2010-05-14 06:55:06.000000000 +0200
@@ -3106,6 +3106,8 @@
tpltname = buf;
}else if( access(templatename,004)==0 ){
tpltname = templatename;
+ }else if( access("/usr/share/lemon/lempar.c", R_OK)==0){
+ tpltname = "/usr/share/lemon/lempar.c";
}else{
tpltname = pathsearch(lemp->argv0,templatename,0);
}
@@ -3117,7 +3119,7 @@
}
in = fopen(tpltname,"rb");
if( in==0 ){
- fprintf(stderr,"Can't open the template file \"%s\".\n",templatename);
+ fprintf(stderr,"Can't open the template file \"%s\".\n",tpltname);
lemp->errorcnt++;
return 0;
}