wok diff gocr/stuff/gocr-0.52-pnm.patch @ rev 23730
updated wavemon (0.9.0 -> 0.9.1)
author | Hans-G?nter Theisgen |
---|---|
date | Fri May 01 07:20:00 2020 +0100 (2020-05-01) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gocr/stuff/gocr-0.52-pnm.patch Fri May 01 07:20:00 2020 +0100 1.3 @@ -0,0 +1,25 @@ 1.4 +--- src/pnm.c.orig 2018-10-15 18:47:50.000000000 +0100 1.5 ++++ src/pnm.c 2019-03-07 14:00:14.742892543 +0100 1.6 +@@ -467,7 +467,7 @@ void addrgb(unsigned char rgb[3], int sr 1.7 + else rgb[i]=((rgb[i]+add[i]>255)?255:rgb[i]+add[i]); 1.8 + } 1.9 + /* 1.10 +- * pgmtoppm or pnmtopng, use last 3 bits for farbcoding 1.11 ++ * pgmtoppm or pnm2png, use last 3 bits for farbcoding 1.12 + * replaces old writebmp variant 1.13 + * 2018-10 add $opt to control coloring 1.14 + */ 1.15 +@@ -479,11 +479,11 @@ int writeppm(char *nam, pix *p, int opt) 1.16 + #ifdef HAVE_POPEN 1.17 + /* be sure that nam contains hacker code like "dummy | rm -rf *" */ 1.18 + if (!f1) { 1.19 +- strncpy(buf,"pnmtopng > ",12); /* no spaces within filenames allowed! */ 1.20 ++ strncpy(buf,"pnm2png > ",12); /* no spaces within filenames allowed! */ 1.21 + strncpy(buf+11,nam,111); buf[123]=0; 1.22 + strncpy(buf+strlen(buf),".png",5); 1.23 + /* we dont care about win "wb" here, never debug on win systems */ 1.24 +- f1 = popen(buf, "w"); if(f1) f1t=1; else E0("popen pnmtopng"); 1.25 ++ f1 = popen(buf, "w"); if(f1) f1t=1; else E0("popen pnm2png"); 1.26 + } 1.27 + if (!f1) { 1.28 + strncpy(buf,"gzip -c > ",11);