wok-current annotate gocr/stuff/gocr-0.52-pnm.patch @ rev 22039
updated tmate (2.2.1 -> 2.3.1)
author | Hans-G?nter Theisgen |
---|---|
date | Mon Oct 21 16:50:24 2019 +0100 (2019-10-21) |
parents | |
children |
rev | line source |
---|---|
Hans-G?nter@20987 | 1 --- src/pnm.c.orig 2018-10-15 18:47:50.000000000 +0100 |
Hans-G?nter@20987 | 2 +++ src/pnm.c 2019-03-07 14:00:14.742892543 +0100 |
Hans-G?nter@20987 | 3 @@ -467,7 +467,7 @@ void addrgb(unsigned char rgb[3], int sr |
Hans-G?nter@20987 | 4 else rgb[i]=((rgb[i]+add[i]>255)?255:rgb[i]+add[i]); |
Hans-G?nter@20987 | 5 } |
Hans-G?nter@20987 | 6 /* |
Hans-G?nter@20987 | 7 - * pgmtoppm or pnmtopng, use last 3 bits for farbcoding |
Hans-G?nter@20987 | 8 + * pgmtoppm or pnm2png, use last 3 bits for farbcoding |
Hans-G?nter@20987 | 9 * replaces old writebmp variant |
Hans-G?nter@20987 | 10 * 2018-10 add $opt to control coloring |
Hans-G?nter@20987 | 11 */ |
Hans-G?nter@20987 | 12 @@ -479,11 +479,11 @@ int writeppm(char *nam, pix *p, int opt) |
Hans-G?nter@20987 | 13 #ifdef HAVE_POPEN |
Hans-G?nter@20987 | 14 /* be sure that nam contains hacker code like "dummy | rm -rf *" */ |
Hans-G?nter@20987 | 15 if (!f1) { |
Hans-G?nter@20987 | 16 - strncpy(buf,"pnmtopng > ",12); /* no spaces within filenames allowed! */ |
Hans-G?nter@20987 | 17 + strncpy(buf,"pnm2png > ",12); /* no spaces within filenames allowed! */ |
Hans-G?nter@20987 | 18 strncpy(buf+11,nam,111); buf[123]=0; |
Hans-G?nter@20987 | 19 strncpy(buf+strlen(buf),".png",5); |
Hans-G?nter@20987 | 20 /* we dont care about win "wb" here, never debug on win systems */ |
Hans-G?nter@20987 | 21 - f1 = popen(buf, "w"); if(f1) f1t=1; else E0("popen pnmtopng"); |
Hans-G?nter@20987 | 22 + f1 = popen(buf, "w"); if(f1) f1t=1; else E0("popen pnm2png"); |
Hans-G?nter@20987 | 23 } |
Hans-G?nter@20987 | 24 if (!f1) { |
Hans-G?nter@20987 | 25 strncpy(buf,"gzip -c > ",11); |