shithub: drawterm-fdroid

Download patch

ref: 76af4ec0e6d869e8ccc2757904375daf6470bd92
parent: 181023b05de82ca87676e5a2e34d630defedc99e
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Feb 28 05:51:35 EST 2016

win32: fix warnings

--- a/gui-win32/r16.c
+++ b/gui-win32/r16.c
@@ -1,8 +1,8 @@
 #define _WIN32_WINNT 0x0500
 #include <windows.h>
 
-#include <u.h>
-#include <libc.h>
+#include "u.h"
+#include "lib.h"
 #include "r16.h"
 
 #define Bit(i) (7-(i))
@@ -138,7 +138,7 @@
 	wchar_t *ws;
 
 	n = utflen(s) + 1;
-	ws = smalloc(n*sizeof(wchar_t));
+	ws = malloc(n*sizeof(wchar_t));
 	utftorunes16(ws, s, n);
 	return ws;
 }
@@ -151,7 +151,7 @@
 	int n;
 
 	n = widebytes(ws);
-	s = smalloc(n);
+	s = malloc(n);
 	runes16toutf(s, ws, n);
 	return s;
 }
--- a/gui-win32/screen.c
+++ b/gui-win32/screen.c
@@ -555,12 +555,12 @@
 }
 
 
-uchar*
+char*
 clipreadunicode(HANDLE h)
 {
 	Rune16 *p;
 	int n;
-	uchar *q;
+	char *q;
 
 	p = GlobalLock(h);
 	n = rune16nlen(p, runes16len(p)+1);
@@ -571,10 +571,10 @@
 	return q;
 }
 
-uchar *
+char*
 clipreadutf(HANDLE h)
 {
-	uchar *p;
+	char *p;
 
 	p = GlobalLock(h);
 	p = strdup(p);
@@ -587,9 +587,9 @@
 clipread(void)
 {
 	HANDLE h;
-	uchar *p;
+	char *p;
 
-	if(!OpenClipboard(window)) {
+	if(!OpenClipboard(window)){
 		oserror();
 		return strdup("");
 	}
@@ -600,7 +600,7 @@
 		p = clipreadutf(h);
 	else {
 		oserror();
-		p = strdup("");
+		return strdup("");
 	}
 	
 	CloseClipboard();
@@ -611,7 +611,7 @@
 clipwrite(char *buf)
 {
 	HANDLE h;
-	char *p, *e;
+	char *p;
 	Rune16 *rp;
 	int n = strlen(buf);