ref: eb5816af80f3f1e0b0fba8f976d8e97691305841
parent: f0eb756ce2ca698dc70c42c24dce5421db75680d
	author: cinap_lenrek <cinap_lenrek@felloff.net>
	date: Sun Feb  9 07:42:04 EST 2025
	
jpg: don't put newline in sysfatal() or werrstr()
--- a/sys/src/cmd/jpg/readpng.c
+++ b/sys/src/cmd/jpg/readpng.c
@@ -486,7 +486,7 @@
err = inflatezlib(&zw, zwrite, &zr, zread);
if(err)
-		sysfatal("inflatezlib %s\n", flateerr(err));+		sysfatal("inflatezlib %s", flateerr(err));free(buf);
free(zw.scan);
--- a/sys/src/cmd/jpg/readtga.c
+++ b/sys/src/cmd/jpg/readtga.c
@@ -331,7 +331,7 @@
w = Dx(ar->r);
h = Dy(ar->r);
 	if((t = malloc(w)) == nil){-		werrstr("ReadTGA: no memory - %r\n");+		werrstr("ReadTGA: no memory - %r");return -1;
}
@@ -410,12 +410,12 @@
array = nil;
 	if((ar = calloc(1, sizeof(Rawimage))) == nil){-		werrstr("ReadTGA: no memory - %r\n");+		werrstr("ReadTGA: no memory - %r");goto Error;
}
 	if((array = calloc(2, sizeof(Rawimage *))) == nil){-		werrstr("ReadTGA: no memory - %r\n");+		werrstr("ReadTGA: no memory - %r");goto Error;
}
array[0] = ar;
@@ -444,7 +444,7 @@
ar->r = Rect(0, 0, h->width, h->height);
for(c = 0; c < ar->nchans; c++)
 		if((ar->chans[c] = malloc(h->width*h->height)) == nil){-			werrstr("ReadTGA: no memory - %r\n");+			werrstr("ReadTGA: no memory - %r");goto Error;
}
r = ar->chans[0];
@@ -473,12 +473,12 @@
n = luma_rle(bp, h->bpp, r, num);
break;
default:
-		werrstr("ReadTGA: type=%d (%s) unsupported\n", h->datatype, datatype[h->datatype]);+		werrstr("ReadTGA: type=%d (%s) unsupported", h->datatype, datatype[h->datatype]);goto Error;
}
 	if(n != num){-		werrstr("ReadTGA: decode fail (%d!=%d) - %r\n", n, num);+		werrstr("ReadTGA: decode fail (%d!=%d) - %r", n, num);goto Error;
}
if((h->descriptor&(1<<4)) != 0)
--- a/sys/src/cmd/jpg/readtif.c
+++ b/sys/src/cmd/jpg/readtif.c
@@ -1520,7 +1520,7 @@
readval = readlong;
break;
default:
-		werrstr("unsupported type\n");+		werrstr("unsupported type");return -1;
}
if((f->val = malloc(f->cnt*sizeof *f->val)) == nil)
--- a/sys/src/cmd/jpg/readv210.c
+++ b/sys/src/cmd/jpg/readv210.c
@@ -92,7 +92,7 @@
}
 	if(looksize("/lib/video.specs", sz, &pixels, &lines, &chunk) == -1){-		werrstr("file spec not in /lib/video.specs\n");+		werrstr("file spec not in /lib/video.specs");return nil;
}
--
⑨