code: drawterm

Download patch

ref: 46bd8d37d2e7579a751a82fcf792ecf568c312fe
parent: 347c54dbd3495d7414c6149c828d276efd232f7d
author: Russ Cox <rsc@swtch.com>
date: Mon Jul 14 12:48:16 EDT 2008

memrchr -> mymemrchr for FreeBSD

--- a/kern/chan.c
+++ b/kern/chan.c
@@ -1010,7 +1010,7 @@
 }
 
 void*
-memrchr(void *va, int c, long n)
+mymemrchr(void *va, int c, long n)
 {
 	uchar *a, *e;
 
@@ -1150,7 +1150,7 @@
 		strcpy(tmperrbuf, up->errstr);
 	NameError:
 		len = prefix+e.off[npath];
-		if(len < ERRMAX/3 || (name=memrchr(aname, '/', len))==nil || name==aname)
+		if(len < ERRMAX/3 || (name=mymemrchr(aname, '/', len))==nil || name==aname)
 			snprint(up->genbuf, sizeof up->genbuf, "%.*s", len, aname);
 		else
 			snprint(up->genbuf, sizeof up->genbuf, "...%.*s", (int)(len-(name-aname)), name);