changeset: 2176:bbec4f77e055
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Sun Jul 01 15:26:14 2007 -0400
summary: Fixed a bunch of issues.
diff -r 7a2d72463504 -r bbec4f77e055 cmd/util.c
--- a/cmd/util.c Sun Jul 01 07:08:30 2007 -0400
+++ b/cmd/util.c Sun Jul 01 15:26:14 2007 -0400
@@ -15,7 +15,7 @@ Vfmt(Fmt *f) {
va_list ap;
fmt = va_arg(f->args, char*);
- ap = va_arg(f->args, va_list);
+ va_copy(ap, va_arg(f->args, va_list));
return fmtvprint(f, fmt, ap);
}
diff -r 7a2d72463504 -r bbec4f77e055 cmd/wmii/message.c
--- a/cmd/wmii/message.c Sun Jul 01 07:08:30 2007 -0400
+++ b/cmd/wmii/message.c Sun Jul 01 15:26:14 2007 -0400
@@ -270,7 +270,7 @@ parse_colors(IxpMsg *m, CTuple *col) {
if(*p++ != '#')
return Ebad;
for(j = 0; j < 6 && p < (char*)m->end; j++)
- if(!ishexnumber(*p++))
+ if(!isxdigit(*p++))
return Ebad;
chartorune(&r, p);
if(i < 2 && r != ' ' || !(isspacerune(r) || *p == '\0'))
diff -r 7a2d72463504 -r bbec4f77e055 cmd/wmii/utf.h
--- a/cmd/wmii/utf.h Sun Jul 01 07:08:30 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-typedef ushort Rune; /* 16 bits */
-
-enum
-{
- UTFmax = 3, /* maximum bytes per rune */
- Runesync = 0x80, /* cannot represent part of a UTF sequence (<) */
- Runeself = 0x80, /* rune and UTF sequences are the same (<) */
- Runeerror = 0xFFFD, /* decoding error in UTF */
-};
diff -r 7a2d72463504 -r bbec4f77e055 mk/lib.mk
--- a/mk/lib.mk Sun Jul 01 07:08:30 2007 -0400
+++ b/mk/lib.mk Sun Jul 01 15:26:14 2007 -0400
@@ -18,8 +18,8 @@ printinstall:
echo ' Lib: ${LIBDIR}'
${LIB}: ${OFILES}
- @echo AR $$($(ROOT)/util/cleanname $(BASE)/$@)
- @${AR} $@ ${OFILES}
- @${RANLIB} $@
+ echo AR $$($(ROOT)/util/cleanname $(BASE)/$@)
+ mkdir ${ROOT}/lib 2>/dev/null || true
+ ${AR} $@ ${OFILES}
include ${ROOT}/mk/common.mk
diff -r 7a2d72463504 -r bbec4f77e055 util/cleanname
--- a/util/cleanname Sun Jul 01 07:08:30 2007 -0400
+++ b/util/cleanname Sun Jul 01 15:26:14 2007 -0400
@@ -1,13 +1,18 @@
#!/bin/sh -f
echo "$@" |
- awk '{
- gsub(/\/+/, "/")
- while(gsub("[^/]+/\.\.(/|$)", ""))
- ;
- while(gsub("/\.(/|$)", "/"))
- ;
- gsub(/\/+/, "/")
- print
+ awk -F'/+' '{
+ delete a
+ n = 0
+ for(i = 1; i <= NF; i++) {
+ if($i == ".." && n > 0 && a[n] != "..")
+ n--
+ else if($i != "" && $i != ".")
+ a[++n] = $i
+ }
+ s = ""
+ for(i = 1; i <= n; i++)
+ s = s "/" a[i]
+ print substr(s, 2)
}'
diff -r 7a2d72463504 -r bbec4f77e055 util/compile
--- a/util/compile Sun Jul 01 07:08:30 2007 -0400
+++ b/util/compile Sun Jul 01 15:26:14 2007 -0400
@@ -11,9 +11,10 @@ echo CC $($bin/cleanname ${BASE}$outfile
$CC -o $outfile $CFLAGS $@ 2>$xtmp
status=$?
-base=$(echo $BASE | sed 's/,/\\,/g')
+base=$(echo $BASE | sed 's/,/\\,/g; s,/$,,')
+re='\([^[:space:]/]*\..:[0-9]\)'
-cat $xtmp | sed "s,^[^/][^:]*\.c:,$base&,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
Received on Sun Jul 01 2007 - 21:27:56 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:57:26 UTC