code: drawterm

Download patch

ref: f3fbc0b2c0a3aa5a4317b3c3e4555708e9211395
parent: 3e20c04178c0017769e38a9138bf72097b2ad7d6
parent: bb68e06552f6aac9b448cdc76b10a073061c0838
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Mon Jul 23 13:31:15 EDT 2018

merge

--- a/Make.osx-cocoa
+++ b/Make.osx-cocoa
@@ -13,11 +13,8 @@
 TARG=drawterm
 AUDIO=none
 
-all: default gui-cocoa/drawterm.app/drawterm
+all: default
 
 libmachdep.a:
 	arch=`uname -m|sed 's/i.86/386/;s/x86_64/amd64/'`; \
 	(cd posix-$$arch &&  make)
-
-gui-cocoa/drawterm.app/drawterm: drawterm
-	cp $< $@
--- a/README
+++ b/README
@@ -16,6 +16,8 @@
 
 To build on Mac OS X with X11 (xquartz), run CONF=osx-x11 make.
 
+To build on Mac OS X with Cocoa, run CONF=osx-cocoa make and "cp drawterm gui-cocoa/drawterm.app/".
+
 
 BINARIES
 ---------
--- a/cpu.c
+++ b/cpu.c
@@ -813,7 +813,7 @@
 static int
 findkey(Authkey *key, char *user, char *dom, char *proto)
 {
-	char buf[1024], *f[50], *p, *ep, *nextp, *hex, *pass, *id, *role;
+	char buf[8192], *f[50], *p, *ep, *nextp, *hex, *pass, *id, *role;
 	int nf, haveproto,  havedom, i;
 
 	for(p=secstorebuf; *p; p=nextp){
--- a/gui-x11/x11.c
+++ b/gui-x11/x11.c
@@ -1150,11 +1150,11 @@
 		if(name){
 			if(strcmp(name, "TIMESTAMP") == 0){
 				/* nothing */
-			}else if(strncmp(name, "image/", 6) == 0){
+			}else if(strncasecmp(name, "image/", 6) == 0){
 				/* nothing */
-			}else if(strcmp(name, "text/html") == 0){
+			}else if(strcasecmp(name, "text/html") == 0){
 				/* nothing */
-			}else if(strcmp(name, "text/plain") == 0 || strcmp(name, "text/plain;charset=UTF-8") == 0){
+			}else if(strcasecmp(name, "text/plain") == 0 || strcasecmp(name, "text/plain;charset=UTF-8") == 0){
 				goto text;
 			}else
 				iprint("cannot handle selection request for '%s' (%d)\n", name, (int)xe->target);