]> git.sur5r.net Git - i3/i3/commitdiff
Fix warnings, update DEPENDS, update Makefile for NetBSD
authorMichael Stapelberg <michael+git@stapelberg.de>
Sun, 8 Mar 2009 16:30:17 +0000 (17:30 +0100)
committerMichael Stapelberg <michael+git@stapelberg.de>
Sun, 8 Mar 2009 16:30:17 +0000 (17:30 +0100)
DEPENDS
Makefile
include/util.h
src/handlers.c
src/util.c

diff --git a/DEPENDS b/DEPENDS
index 21e6877ec2e05feb3ef228447fb11532a7d438b4..10ba2e4de32d7bb4638608baceda8ab21b0692ce 100644 (file)
--- a/DEPENDS
+++ b/DEPENDS
@@ -6,6 +6,7 @@ In that case, please try using the versions mentioned below until a fix is provi
  * libxcb-1.1.93 (2008-12-11)
  * xcb-util-0.3.3 (2009-01-31)
  * Xlib, the one that comes with your X-Server
+ * asciidoc >= 8.3.0 for docs/hacking-howto
 
 Get the libraries from:
 http://xcb.freedesktop.org/dist/xcb-proto-1.3.tar.bz2
index e7477f5d5149380e17f26e02c545c69fc3f00f82..e9e24072b2586930ceac6e1fcf6acc42f0b20f53 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@ LDFLAGS += -lX11
 LDFLAGS += -L/usr/local/lib -L/usr/pkg/lib
 ifeq ($(UNAME),NetBSD)
 CFLAGS += -I/usr/pkg/include
-LDFLAGS += -Wl,-rpath,/usr/local/lib -Wl,-rpath,/usr/pkg/lib
+LDFLAGS += -liconv -Wl,-rpath,/usr/local/lib -Wl,-rpath,/usr/pkg/lib
 endif
 
 ifeq ($(UNAME),Linux)
index 31beeb80aad23b7056af82ffd9e4c4fe3f1b74a8..4d6d2bceb364478cdfd57a99c4c724fcc51c3e0a 100644 (file)
@@ -34,7 +34,7 @@ void *scalloc(size_t size);
 char *sstrdup(const char *str);
 void start_application(const char *command);
 void check_error(xcb_connection_t *conn, xcb_void_cookie_t cookie, char *err_message);
-char *convert_utf8_to_ucs2(char *input, int *real_strlen);
+char *convert_utf8_to_ucs2(const char *input, int *real_strlen);
 void remove_client_from_container(xcb_connection_t *conn, Client *client, Container *container);
 void set_focus(xcb_connection_t *conn, Client *client);
 void leave_stack_mode(xcb_connection_t *conn, Container *container);
index 3158a551cf066d1a1d47f487bb400dc4e16dc594..1c88268815758ca0ee7f4cccd316b7e347c5ce38 100644 (file)
@@ -486,7 +486,7 @@ int handle_windowname_change(void *data, xcb_connection_t *conn, uint8_t state,
         if (client->name != NULL)
                 free(client->name);
 
-        asprintf(&(client->name), "%.*s", xcb_get_property_value_length(prop), xcb_get_property_value(prop));
+        asprintf(&(client->name), "%.*s", xcb_get_property_value_length(prop), (char*)xcb_get_property_value(prop));
         LOG("rename to \"%s\".\n", client->name);
 
         if (client->container->mode == MODE_STACK)
index 388d1d00b8548bbc8e5a201fc3539db3527e16f1..8de4d665853a02fe0f2f2c98e61141723813bdfa 100644 (file)
@@ -145,7 +145,7 @@ void check_error(xcb_connection_t *conn, xcb_void_cookie_t cookie, char *err_mes
  * returned. It has to be freed when done.
  *
  */
-char *convert_utf8_to_ucs2(char *input, int *real_strlen) {
+char *convert_utf8_to_ucs2(const char *input, int *real_strlen) {
        size_t input_size = strlen(input) + 1;
        /* UCS-2 consumes exactly two bytes for each glyph */
        int buffer_size = input_size * 2;