code: drawterm

Download patch

ref: 964d0bdc5761cc09733b34b7bf65851eab3cd7cd
parent: 083b5a0e40e7eb56469ac1705ae437f4353d15ee
author: Russ Cox <rsc@swtch.com>
date: Wed May 24 11:24:14 EDT 2006

silly sun

--- a/kern/devcons.c
+++ b/kern/devcons.c
@@ -141,7 +141,7 @@
 			qwrite(kprintoq, str, n);
 		else
 			qiwrite(kprintoq, str, n);
-	}else if(screenputs != nil)
+	}else if(screenputs != 0)
 		screenputs(str, n);
 }
 
@@ -1177,7 +1177,7 @@
 	va_start(arg, fmt);
 	n = vseprint(buf, buf+sizeof(buf), fmt, arg) - buf;
 	va_end(arg);
-	if(screenputs != nil && iprintscreenputs)
+	if(screenputs != 0 && iprintscreenputs)
 		screenputs(buf, n);
 #undef write
 	write(2, buf, n);
--- a/libmemlayer/unload.c
+++ b/libmemlayer/unload.c
@@ -35,7 +35,7 @@
 	 * src is an obscured layer or data is unaligned
 	 */
 	if(dl->save && dx==0){
-		if(dl->refreshfn != nil)
+		if(dl->refreshfn != 0)
 			return -1;	/* can't unload window if it's not Refbackup */
 		if(n > 0)
 			memlhide(src, r);