wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit cebba5d10c81326c86bf0d9071ef389cd0af91f7
parent ea557c933877d2ddf080e25f0668c7ff702b6272
Author: Kris Maglione <jg@suckless.org>
Date:   Sun,  1 Jul 2007 17:43:27 -0400

-DVERSION only once.

Diffstat:
cmd/util.c | 6+++++-
cmd/wmii/Makefile | 2+-
cmd/wmii/dat.h | 8++++++++
cmd/wmii/fns.h | 4++++
util/compile | 4++--
5 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/cmd/util.c b/cmd/util.c @@ -13,10 +13,14 @@ static int Vfmt(Fmt *f) { char *fmt; va_list ap; + int i; fmt = va_arg(f->args, char*); va_copy(ap, va_arg(f->args, va_list)); - return fmtvprint(f, fmt, ap); + + i = fmtvprint(f, fmt, ap); + va_end(ap); + return i; } void diff --git a/cmd/wmii/Makefile b/cmd/wmii/Makefile @@ -9,7 +9,7 @@ HFILES= dat.h fns.h x11.h LIB = ${LIBIXP} LDFLAGS += -lm ${LIBX11} -lXext ${LIBICONV} -lregexp9 -lbio -lfmt -lutf -CFLAGS += ${INCX11} ${INCICONV} -DVERSION=\"${VERSION}\" +CFLAGS += ${INCX11} ${INCICONV} OBJ = area \ bar \ client \ diff --git a/cmd/wmii/dat.h b/cmd/wmii/dat.h @@ -14,6 +14,14 @@ #define FOCUSCOLORS "#ffffff #335577 #447799" #define NORMCOLORS "#222222 #eeeeee #666666" +#ifdef VARARGCK +# pragma varargck type "C" Client* +# pragma varargck type "W" Window* +# pragma varargck type "P" Point +# pragma varargck type "R" Rectangle +# pragma varargck type "r" void +#endif + typedef struct CTuple CTuple; enum Align { diff --git a/cmd/wmii/fns.h b/cmd/wmii/fns.h @@ -2,6 +2,10 @@ * See LICENSE file for license details. */ +#ifdef VARARGCK +# pragma varargck argpos write_event 1 +#endif + /* area.c */ char *area_name(Area *a); uint area_idx(Area *a); diff --git a/util/compile b/util/compile @@ -11,10 +11,10 @@ echo CC $($bin/cleanname ${BASE}$outfile) $CC -o $outfile $CFLAGS $@ 2>$xtmp status=$? -base=$(echo $BASE | sed 's/,/\\,/g; s,/$,,') +base=$(echo $BASE | sed 's/,/\\,/g') re='\([^[:space:]/]*\..:[0-9]\)' -cat $xtmp | sed "s,^$re,$base/&,g; s,\([[:space:]]\)$re,\1$base/\2,g" | +cat $xtmp | sed "s,^$re,$base&,g; s,\([[:space:]]\)$re,\1$base\2,g" | egrep -v ': error: .Each undeclared identifier|: error: for each function it appears|is dangerous, better use|is almost always misused|: In function |: At top level:|support .long long.|use of C99 long long|ISO C forbids conversion' | sed 's/ .first use in this function.$//; s/\"\([^\"][^\"]*\)\", line \([0-9][0-9]*\)/\1:\2/g' | uniq 1>&2