From ff61eee294124bc83f399e0027de1c9d7a9d9e86 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sat, 17 Jan 2009 18:38:12 +0000 Subject: [PATCH] Don't use [4] since they are confusing and use the right size for memset. DOH. --- Makefile | 4 ++-- tmux.h | 6 +++--- utf8.c | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index cd199c96..fa0204f2 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.94 2009-01-15 19:27:31 nicm Exp $ +# $Id: Makefile,v 1.95 2009-01-17 18:38:12 nicm Exp $ .SUFFIXES: .c .o .y .h .PHONY: clean update-index.html upload-index.html @@ -47,7 +47,7 @@ SRCS= tmux.c server.c server-msg.c server-fn.c buffer.c buffer-poll.c status.c \ CC?= cc INCDIRS+= -I. -I- -I/usr/local/include -CFLAGS+= -O0 -DMETA="'${META}'" +CFLAGS+= -DMETA="'${META}'" .ifdef PROFILE # Don't use ccache CC= /usr/bin/gcc diff --git a/tmux.h b/tmux.h index 8da7d8cf..0994c322 100644 --- a/tmux.h +++ b/tmux.h @@ -1,4 +1,4 @@ -/* $Id: tmux.h,v 1.235 2009-01-15 19:27:31 nicm Exp $ */ +/* $Id: tmux.h,v 1.236 2009-01-17 18:38:12 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -1463,8 +1463,8 @@ int session_select(struct session *, int); int session_last(struct session *); /* utf8.c */ -u_int utf8_combine(const u_char [4]); -void utf8_split(u_int, u_char [4]); +u_int utf8_combine(const u_char *); +void utf8_split(u_int, u_char *); int utf8_width(u_int); /* buffer.c */ diff --git a/utf8.c b/utf8.c index 5e1c6b94..87578a6d 100644 --- a/utf8.c +++ b/utf8.c @@ -1,4 +1,4 @@ -/* $Id: utf8.c,v 1.2 2008-09-25 20:08:56 nicm Exp $ */ +/* $Id: utf8.c,v 1.3 2009-01-17 18:38:12 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -23,7 +23,7 @@ #include "tmux.h" u_int -utf8_combine(const u_char data[4]) +utf8_combine(const u_char *data) { u_int uv; @@ -46,9 +46,9 @@ utf8_combine(const u_char data[4]) } void -utf8_split(u_int uv, u_char data[4]) +utf8_split(u_int uv, u_char *data) { - memset(data, 0xff, sizeof data); + memset(data, 0xff, 4); if (uv <= 0x7f) data[0] = uv;