Browse Source

Plan 9 from Bell Labs 2008-05-08

David du Colombier 13 years ago
parent
commit
c72009cb99
4 changed files with 20 additions and 12 deletions
  1. 4 4
      dist/replica/_plan9.db
  2. 4 4
      dist/replica/plan9.db
  3. 4 0
      dist/replica/plan9.log
  4. 8 4
      sys/src/cmd/jpg/png.c

+ 4 - 4
dist/replica/_plan9.db

@@ -176,7 +176,7 @@
 386/bin/calendar - 775 sys sys 1209614208 79071
 386/bin/cat - 775 sys sys 1148500611 37482
 386/bin/cb - 775 sys sys 1209614209 77569
-386/bin/cdfs - 775 sys sys 1208662151 173247
+386/bin/cdfs - 775 sys sys 1210131848 173239
 386/bin/cec - 775 sys sys 1193714267 75896
 386/bin/cfs - 775 sys sys 1190863294 130565
 386/bin/chgrp - 775 sys sys 1168402294 59522
@@ -235,7 +235,7 @@
 386/bin/faces - 775 sys sys 1200262755 193287
 386/bin/factor - 775 sys sys 1209614276 61640
 386/bin/fcp - 775 sys sys 1168402307 82433
-386/bin/file - 775 sys sys 1209614278 129071
+386/bin/file - 775 sys sys 1210131851 128896
 386/bin/fmt - 775 sys sys 1209614279 65508
 386/bin/fortune - 775 sys sys 1209614281 67297
 386/bin/fossil - 20000000775 sys sys 1042005470 0
@@ -12651,12 +12651,12 @@ sys/src/cmd/jpg/jpg.c - 664 sys sys 1108938203 7411
 sys/src/cmd/jpg/mkfile - 664 sys sys 1079970080 1056
 sys/src/cmd/jpg/multichan.c - 664 sys sys 1039753047 825
 sys/src/cmd/jpg/onechan.c - 664 sys sys 1039753044 3732
-sys/src/cmd/jpg/png.c - 664 sys sys 1108939730 4834
+sys/src/cmd/jpg/png.c - 664 sys sys 1210194464 5020
 sys/src/cmd/jpg/ppm.c - 664 sys sys 1108852826 4204
 sys/src/cmd/jpg/readbmp.c - 664 sys sys 1166825626 13711
 sys/src/cmd/jpg/readgif.c - 664 sys sys 1143220941 10472
 sys/src/cmd/jpg/readjpg.c - 664 sys sys 1032060302 33009
-sys/src/cmd/jpg/readpng.c - 664 sys sys 1108852825 10117
+sys/src/cmd/jpg/readpng.c - 664 sys sys 1108852545 10117
 sys/src/cmd/jpg/readppm.c - 664 sys sys 1108851603 3645
 sys/src/cmd/jpg/readyuv.c - 664 sys sys 1190832519 4180
 sys/src/cmd/jpg/rgbrgbv.c - 664 sys sys 984718829 1236

+ 4 - 4
dist/replica/plan9.db

@@ -176,7 +176,7 @@
 386/bin/calendar - 775 sys sys 1209614208 79071
 386/bin/cat - 775 sys sys 1148500611 37482
 386/bin/cb - 775 sys sys 1209614209 77569
-386/bin/cdfs - 775 sys sys 1208662151 173247
+386/bin/cdfs - 775 sys sys 1210131848 173239
 386/bin/cec - 775 sys sys 1193714267 75896
 386/bin/cfs - 775 sys sys 1190863294 130565
 386/bin/chgrp - 775 sys sys 1168402294 59522
@@ -235,7 +235,7 @@
 386/bin/faces - 775 sys sys 1200262755 193287
 386/bin/factor - 775 sys sys 1209614276 61640
 386/bin/fcp - 775 sys sys 1168402307 82433
-386/bin/file - 775 sys sys 1209614278 129071
+386/bin/file - 775 sys sys 1210131851 128896
 386/bin/fmt - 775 sys sys 1209614279 65508
 386/bin/fortune - 775 sys sys 1209614281 67297
 386/bin/fossil - 20000000775 sys sys 1042005470 0
@@ -12651,12 +12651,12 @@ sys/src/cmd/jpg/jpg.c - 664 sys sys 1108938203 7411
 sys/src/cmd/jpg/mkfile - 664 sys sys 1079970080 1056
 sys/src/cmd/jpg/multichan.c - 664 sys sys 1039753047 825
 sys/src/cmd/jpg/onechan.c - 664 sys sys 1039753044 3732
-sys/src/cmd/jpg/png.c - 664 sys sys 1108939730 4834
+sys/src/cmd/jpg/png.c - 664 sys sys 1210194464 5020
 sys/src/cmd/jpg/ppm.c - 664 sys sys 1108852826 4204
 sys/src/cmd/jpg/readbmp.c - 664 sys sys 1166825626 13711
 sys/src/cmd/jpg/readgif.c - 664 sys sys 1143220941 10472
 sys/src/cmd/jpg/readjpg.c - 664 sys sys 1032060302 33009
-sys/src/cmd/jpg/readpng.c - 664 sys sys 1108852825 10117
+sys/src/cmd/jpg/readpng.c - 664 sys sys 1108852545 10117
 sys/src/cmd/jpg/readppm.c - 664 sys sys 1108851603 3645
 sys/src/cmd/jpg/readyuv.c - 664 sys sys 1190832519 4180
 sys/src/cmd/jpg/rgbrgbv.c - 664 sys sys 984718829 1236

+ 4 - 0
dist/replica/plan9.log

@@ -19344,3 +19344,7 @@
 1210120210 4 c sys/lib/lp/process/ppost - 775 sys sys 1210119088 2873
 1210120210 5 c sys/lib/lp/process/tiffpost - 775 sys sys 1210119088 2333
 1210120210 6 c sys/src/cmd/file.c - 664 sys sys 1210118716 28919
+1210132807 0 c 386/bin/cdfs - 775 sys sys 1210131848 173239
+1210132807 1 c 386/bin/file - 775 sys sys 1210131851 128896
+1210195812 0 c sys/src/cmd/jpg/png.c - 664 sys sys 1210194464 5020
+1210195812 1 c sys/src/cmd/jpg/readpng.c - 664 sys sys 1108852545 10117

+ 8 - 4
sys/src/cmd/jpg/png.c

@@ -96,7 +96,7 @@ main(int argc, char *argv[])
 			outchan = CMAP8;
 		break;
 	default:
-		fprint(2, "usage: png -39cdekrtv [file.png ...]\n");
+		fprint(2, "usage: png [-39cdekrtv] [file.png ...]\n");
 		exits("usage");
 	}ARGEND;
 
@@ -136,12 +136,12 @@ char*
 show(int fd, char *name, int outc)
 {
 	Rawimage **array, *r, *c;
-	static int inited;
-	Image *i;
-	Image *i2;
+	Image *i, *i2;
 	int j, ch, outchan;
+	long len;
 	Biobuf b;
 	char buf[32];
+	static int inited;
 
 	if(Binit(&b, fd, OREAD) < 0)
 		return nil;
@@ -212,6 +212,10 @@ show(int fd, char *name, int outc)
 	}
 	if(nineflag){
 		chantostr(buf, outchan);
+		len = (c->r.max.x - c->r.min.x) * (c->r.max.y - c->r.min.y);
+		if(c->chanlen != len)
+			fprint(2, "%s: writing %d bytes for len %ld chan %s\n",
+				argv0, c->chanlen, len, buf);
 		print("%11s %11d %11d %11d %11d ", buf,
 			c->r.min.x, c->r.min.y, c->r.max.x, c->r.max.y);
 		if(write(1, c->chans[0], c->chanlen) != c->chanlen){