[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lemon: fix lempar.c search #4227

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
lemon: fix lempar.c search
  • Loading branch information
aikawayataro committed Dec 4, 2023
commit 8962cf230b4d199c105a8368dd70b10c6f30c073
33 changes: 15 additions & 18 deletions sqlite/0010-sqlite-3.34.0-lemon.patch
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
--- lemon.c.orig 2020-12-01 21:30:32.470000000 +0100
+++ lemon.c 2020-12-01 21:28:20.268940000 +0100
@@ -3672,6 +3672,10 @@
toFree = tpltname = pathsearch(lemp->argv0,templatename,0);
--- lemon.c.orig 2023-12-04 17:56:38.260892600 +0100
+++ lemon.c 2023-12-04 19:20:21.727095900 +0100
@@ -3688,11 +3688,19 @@
tpltname = templatename;
}else{
toFree = tpltname = pathsearch(lemp->argv[0],templatename,0);
+ if ( tpltname==0 || access(tpltname,004)!=0 ) {
+ tpltname = 0;
+ sprintf(buf,"/usr/share/lemon/%s",templatename);
+ if ( access(buf,004)==0 ) {
+ tpltname = buf;
+ }
+ }
}
if( tpltname==0 ){
+ sprintf(buf,"/usr/share/lemon/%s",templatename);
+ tpltname = buf;
+ }
+ if( tpltname==0 ){
fprintf(stderr,"Can't find the parser driver template file \"%s\".\n",
templatename);
lemp->errorcnt++;
@@ -3679,6 +3683,11 @@
+ free(toFree);
return 0;
}
in = fopen(tpltname,"rb");
if( in==0 ){
+ sprintf(buf,"/usr/share/lemon/%s",tpltname);
+ tpltname = buf;
+ in = fopen(tpltname,"rb");
+ }
+ if( in==0 ){
fprintf(stderr,"Can't open the template file \"%s\".\n",tpltname);
lemp->errorcnt++;
}
4 changes: 2 additions & 2 deletions sqlite/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ _sqlite_year=2023
_srcver=3440200
_docver=${_srcver}
pkgver=3.44.2
pkgrel=1
pkgrel=2
pkgdesc="A C library that implements an SQL database engine"
arch=('i686' 'x86_64')
license=(PublicDomain)
Expand All @@ -29,7 +29,7 @@ source=(https://www.sqlite.org/${_sqlite_year}/sqlite-src-${_srcver}.zip
sha256sums=('73187473feb74509357e8fa6cb9fd67153b2d010d00aeb2fddb6ceeb18abaf27'
'62e51962552fb204ef0a541d51f8f721499d1a3fffae6e86558d251c96084fcf'
'0b76663a90e034f3d7f2af5bfada4cedec5ebc275361899eccc5c18e6f01ff1f'
'ee6bdd979a97205a1a2dd760e90c8588f45523cecb5256c0d927f24494f7fc9f'
'99804c57f4affc213681badd0f0332de16921f1f2484e13f4ef8d0cf233cd680'
'589b7182343dba3dd8225c13ff1d7d275e5f714e7793bac1c88f7cfdd569d9e0'
'b717c73804be44b82048d90bbb8e0c61ff081339a5757194e9769bd4d9c048e5'
'10f30378e83423f8b84462c1dd5b58501913816865cfd595f69a7b9ddd7e4e2b'
Expand Down