shithub: riscv

Download patch

ref: 358f72266a774d291c3b9c569b29152ca5595ee7
parent: 9888ead0425a9acc90853cd865b3a131534544fe
parent: e00c53cf7433c0a8562190dde75cf17cb9ae7f08
author: cinap_lenrek <[email protected]>
date: Fri Jan 25 09:20:53 EST 2013

merge

--- a/sys/man/3/cons
+++ b/sys/man/3/cons
@@ -14,6 +14,7 @@
 .B /dev/hostowner
 .B /dev/kmesg
 .B /dev/kprint
+.B /dev/mordor
 .B /dev/null
 .B /dev/osversion
 .B /dev/pgrpid
--- a/sys/src/cmd/file.c
+++ b/sys/src/cmd/file.c
@@ -1211,7 +1211,7 @@
 		return 0;
 	if((p[14] | p[15]<<8) == 0)	/* height */
 		return 0;
-	if(p[16] != 8 && p[16] != 16 && p[16] != 24 && p[16] != 32)	/* bpp */
+	if(p[16] != 8 && p[16] != 15 && p[16] != 16 && p[16] != 24 && p[16] != 32)	/* bpp */
 		return 0;
 	if(((p[2]|(1<<3)) & (~3)) != (1<<3))	/* rle flag */
 		return 0;
--- a/sys/src/cmd/jpg/readtga.c
+++ b/sys/src/cmd/jpg/readtga.c
@@ -89,6 +89,7 @@
 		}
 		break;
 	case 16:
+	case 15:
 		/* convert to 24-bit colormap */
 		if((cmap = realloc(cmap, 3*cmaplen)) == nil)
 			return -1;
@@ -245,6 +246,7 @@
 
 	switch(bpp){
 	case 16:
+	case 15:
 		for(i = 0; i < num; i++){
 			if(Bread(bp, buf, 2) != 2)
 				break;