]> git.mdlowis.com Git - projs/tide.git/commitdiff
fixed some warnings
authorMichael D. Lowis <mike@mdlowis.com>
Fri, 11 Aug 2017 01:59:39 +0000 (21:59 -0400)
committerMichael D. Lowis <mike@mdlowis.com>
Fri, 11 Aug 2017 01:59:39 +0000 (21:59 -0400)
inc/win.h
lib/x11.c

index 70f73b96aed9569843b2880dd4414108af677556..6a4f5c73eb0f32f8778c761d0faa56bd381dfe5a 100644 (file)
--- a/inc/win.h
+++ b/inc/win.h
@@ -39,6 +39,8 @@ typedef struct {
 } MouseConfig;
 
 void win_window(char* name, bool isdialog, void (*errfn)(char*));
+void win_load(char* path);
+void win_save(char* path);
 void win_loop(void);
 void win_settext(WinRegion id, char* text);
 void win_setlinenums(bool enable);
index e184b83ad2425d2b8eaab1cac1bc49df9cbace86..3fe41ab11b2ecb9dd7591e24933a7f2af79b18a8 100644 (file)
--- a/lib/x11.c
+++ b/lib/x11.c
@@ -169,7 +169,7 @@ void x11_window(char* name, int width, int height) {
     Atom prop = XInternAtom(X.display, "TIDE_WINDOWS", False);
     XChangeProperty(X.display, X.root, prop, XA_WINDOW, 32, PropModeAppend, (unsigned char*)&X.self, 1);
     prop = XInternAtom(X.display, "TIDE_COMM", False);
-    XChangeProperty(X.display, X.self, prop, XA_STRING, 8, PropModeReplace, "", 0);
+    XChangeProperty(X.display, X.self, prop, XA_STRING, 8, PropModeReplace, (unsigned char*)"", 0);
 }
 
 void x11_dialog(char* name, int height, int width) {
@@ -645,7 +645,7 @@ static void propnotify(XEvent* evnt) {
 
 void x11_prop_set(char* name, char* val) {
     Atom prop = XInternAtom(X.display, name, False);
-    XChangeProperty(X.display, X.self, prop, XA_STRING, 8, PropModeReplace, val, strlen(val)+1);
+    XChangeProperty(X.display, X.self, prop, XA_STRING, 8, PropModeReplace, (unsigned char*)val, strlen(val)+1);
 }
 
 char* x11_prop_get(char* name) {
@@ -653,6 +653,6 @@ char* x11_prop_get(char* name) {
     unsigned long format = 0, nitems = 0, nleft = 0, nread = 0;
     unsigned char* data = NULL;
     XGetWindowProperty(X.display, X.self, prop, 0, -1, False, XA_STRING, &rtype,
-                       &format, &nitems, &nleft, &data);
-    return data;
+                       (int*)&format, &nitems, &nleft, &data);
+    return (char*)data;
 }