summaryrefslogtreecommitdiff
path: root/debian/patches/02-lemon-snprintf.patch
diff options
context:
space:
mode:
authorHans-Christoph Steiner <hans@eds.org>2012-03-30 20:45:41 -0400
committerHans-Christoph Steiner <hans@eds.org>2012-03-30 23:14:35 -0400
commit116cdd1cbeb1d845e575e523f3e39835d176b547 (patch)
tree3dbad6ffdcfab1cb957e5348378394dadda9349a /debian/patches/02-lemon-snprintf.patch
parent671ca275d802d345225d8b99ccccbb9aa313e98d (diff)
remove 'lemon' package
Diffstat (limited to 'debian/patches/02-lemon-snprintf.patch')
-rw-r--r--debian/patches/02-lemon-snprintf.patch83
1 files changed, 0 insertions, 83 deletions
diff --git a/debian/patches/02-lemon-snprintf.patch b/debian/patches/02-lemon-snprintf.patch
deleted file mode 100644
index 67c8600..0000000
--- a/debian/patches/02-lemon-snprintf.patch
+++ /dev/null
@@ -1,83 +0,0 @@
---- sqlite3-3.6.10.orig/tool/lemon.c 2010-03-13 17:12:20.004507610 +0000
-+++ sqlite3-3.6.10/tool/lemon.c 2010-03-13 17:25:51.799607483 +0000
-@@ -2347,7 +2347,7 @@
- for(z=psp->filename, nBack=0; *z; z++){
- if( *z=='\\' ) nBack++;
- }
-- sprintf(zLine, "#line %d ", psp->tokenlineno);
-+ snprintf(zLine,sizeof zLine, "#line %d ", psp->tokenlineno);
- nLine = lemonStrlen(zLine);
- n += nLine + lemonStrlen(psp->filename) + nBack;
- }
-@@ -2916,7 +2916,7 @@
- while( cfp ){
- char buf[20];
- if( cfp->dot==cfp->rp->nrhs ){
-- sprintf(buf,"(%d)",cfp->rp->index);
-+ snprintf(buf,sizeof buf,"(%d)",cfp->rp->index);
- fprintf(fp," %5s ",buf);
- }else{
- fprintf(fp," ");
-@@ -2970,6 +2970,7 @@
- char *pathbufptr;
- char *pathbuf;
- char *path,*cp;
-+ size_t pathsz;
- char c;
-
- #ifdef __WIN32__
-@@ -3087,14 +3121,16 @@
-
- cp = strrchr(lemp->filename,'.');
- if( cp ){
-- sprintf(buf,"%.*s.lt",(int)(cp-lemp->filename),lemp->filename);
-+ snprintf(buf,sizeof buf,"%.*s.lt",(int)(cp-lemp->filename),lemp->filename);
- }else{
-- sprintf(buf,"%s.lt",lemp->filename);
-+ snprintf(buf,sizeof buf,"%s.lt",lemp->filename);
- }
- if( access(buf,004)==0 ){
- tpltname = buf;
- }else if( access(templatename,004)==0 ){
- tpltname = templatename;
-+ }else if( access("/usr/share/lemon/lempar.c",004)==0 ){
-+ tpltname = "/usr/share/lemon/lempar.c";
- }else{
- tpltname = pathsearch(lemp->argv0,templatename,0);
- }
-@@ -3106,7 +3109,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;
- }
-@@ -3240,7 +3243,7 @@
- while( n-- > 0 ){
- c = *(zText++);
- if( c=='%' && n>0 && zText[0]=='d' ){
-- sprintf(zInt, "%d", p1);
-+ snprintf(zInt,sizeof zInt, "%d", p1);
- p1 = p2;
- strcpy(&z[used], zInt);
- used += lemonStrlen(&z[used]);
-@@ -3856,7 +3859,7 @@
- /* Generate a table containing the symbolic name of every symbol
- */
- for(i=0; i<lemp->nsymbol; i++){
-- sprintf(line,"\"%s\",",lemp->symbols[i]->name);
-+ snprintf(line,sizeof line,"\"%s\",",lemp->symbols[i]->name);
- fprintf(out," %-15s",line);
- if( (i&3)==3 ){ fprintf(out,"\n"); lineno++; }
- }
-@@ -4022,7 +4023,7 @@
- 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);
-+ snprintf(pattern,sizeof pattern,"#define %s%-30s %2d\n",prefix,lemp->symbols[i]->name,i);
- if( strcmp(line,pattern) ) break;
- }
- fclose(in);