ref: 4c4fbdf78cbd747839f1ced5eea82e66b83bfc1f
parent: 3cccb8fb124b3dffd9124551d74c13b4531dc3f2
parent: 1d760c9b3ea8eb5d7d0484cb66527c6a9d4eb5ea
author: cinap_lenrek <[email protected]>
date: Sun May 12 15:05:51 EDT 2013
merge
--- a/sys/src/cmd/file.c
+++ b/sys/src/cmd/file.c
@@ -828,7 +828,11 @@
"OggS", "ogg audio", 4, "audio/ogg",
".snd", "sun audio", 4, "audio/basic",
"\211PNG", "PNG image", 4, "image/png",
+ "P1\n", "ppm", 3, "image/ppm",
+ "P2\n", "ppm", 3, "image/ppm",
"P3\n", "ppm", 3, "image/ppm",
+ "P4\n", "ppm", 3, "image/ppm",
+ "P5\n", "ppm", 3, "image/ppm",
"P6\n", "ppm", 3, "image/ppm",
"/* XPM */\n", "xbm", 10, "image/xbm",
".HTML ", "troff -ms input", 6, "text/troff",
--- a/sys/src/cmd/jpg/writeppm.c
+++ b/sys/src/cmd/jpg/writeppm.c
@@ -70,7 +70,7 @@
pix = (data[i]>>depth*((xmask-x)&xmask))&pmask;
if(((x+1)&xmask) == 0)
i++;
- col += Bprint(fd, "%d ", pix);
+ col += Bprint(fd, "%d", pix);
if(col >= MAXLINE-(2+1)){
Bprint(fd, "\n");
col = 0;
@@ -81,7 +81,7 @@
break;
case GREY8:
for(i=0; i<ndata; i++){
- col += Bprint(fd, "%d ", data[i]);
+ col += Bprint(fd, "%d", data[i]);
if(col >= MAXLINE-(4+1)){
Bprint(fd, "\n");
col = 0;