wok view gocr/stuff/gocr-0.52-pnm.patch @ rev 21759

mosh: use gcc83
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Jun 26 19:12:58 2019 +0200 (2019-06-26)
parents
children
line source
1 --- src/pnm.c.orig 2018-10-15 18:47:50.000000000 +0100
2 +++ src/pnm.c 2019-03-07 14:00:14.742892543 +0100
3 @@ -467,7 +467,7 @@ void addrgb(unsigned char rgb[3], int sr
4 else rgb[i]=((rgb[i]+add[i]>255)?255:rgb[i]+add[i]);
5 }
6 /*
7 - * pgmtoppm or pnmtopng, use last 3 bits for farbcoding
8 + * pgmtoppm or pnm2png, use last 3 bits for farbcoding
9 * replaces old writebmp variant
10 * 2018-10 add $opt to control coloring
11 */
12 @@ -479,11 +479,11 @@ int writeppm(char *nam, pix *p, int opt)
13 #ifdef HAVE_POPEN
14 /* be sure that nam contains hacker code like "dummy | rm -rf *" */
15 if (!f1) {
16 - strncpy(buf,"pnmtopng > ",12); /* no spaces within filenames allowed! */
17 + strncpy(buf,"pnm2png > ",12); /* no spaces within filenames allowed! */
18 strncpy(buf+11,nam,111); buf[123]=0;
19 strncpy(buf+strlen(buf),".png",5);
20 /* we dont care about win "wb" here, never debug on win systems */
21 - f1 = popen(buf, "w"); if(f1) f1t=1; else E0("popen pnmtopng");
22 + f1 = popen(buf, "w"); if(f1) f1t=1; else E0("popen pnm2png");
23 }
24 if (!f1) {
25 strncpy(buf,"gzip -c > ",11);