diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2007-09-12 16:48:56 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2007-09-12 16:48:56 +0000 |
commit | a3efa8c85b69f79a669b8f0ae3a637d1f0d08352 (patch) | |
tree | 25e8b8e7195f7f99a0e4f8b4b6bf17b19d0603ef | |
parent | bfd577c0cb4c6b1a84dae453d1085da0db3b6b25 (diff) |
Use [:alpha:], [:lower:], [:upper:] instead of relying on ordering of A-Z, a-z in collation order
-rw-r--r-- | check-c-style.sh | 10 | ||||
-rw-r--r-- | telepathy-glib/Makefile.am | 2 | ||||
-rw-r--r-- | telepathy-glib/stable-interfaces.mk | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/check-c-style.sh b/check-c-style.sh index a2ea553cf..26322a8c8 100644 --- a/check-c-style.sh +++ b/check-c-style.sh @@ -3,7 +3,7 @@ fail=0 /bin/sh "${top_srcdir}"/check-whitespace.sh "$@" || fail=$? -if grep -n '^ *GError *\*[a-zA-Z_][a-zA-Z0-9_]* *;' "$@" +if grep -n '^ *GError *\*[[:alpha:]_][[:alnum:]_]* *;' "$@" then echo "^^^ The above files contain uninitialized GError*s - they should be" echo " initialized to NULL" @@ -15,10 +15,10 @@ fi # The second and third ignore block comments (gtkdoc uses foo() as markup). # The fourth ignores cpp so you can # #define foo(bar) (_real_foo (__FUNC__, bar)) (cpp insists on foo() style). -if grep -n '^[^"]*[a-z](' "$@" \ - | grep -v '^[-a-zA-Z0-9_./]*:[0-9]*: *\*' \ - | grep -v '^[-a-zA-Z0-9_./]*:[0-9]*: */\*' \ - | grep -v '^[-a-zA-Z0-9_./]*:[0-9]*: *#' +if grep -n '^[^"]*[[:lower:]](' "$@" \ + | grep -v '^[-[:alnum:]_./]*:[[:digit:]]*: *\*' \ + | grep -v '^[-[:alnum:]_./]*:[[:digit:]]*: */\*' \ + | grep -v '^[-[:alnum:]_./]*:[[:digit:]]*: *#' then echo "^^^ Our coding style is to use function calls like foo (), not foo()" fail=1 diff --git a/telepathy-glib/Makefile.am b/telepathy-glib/Makefile.am index ce67e7847..685c390b2 100644 --- a/telepathy-glib/Makefile.am +++ b/telepathy-glib/Makefile.am @@ -237,7 +237,7 @@ _gen/async-%.xml: _gen/%.xml ../tools/make-all-async.xsl _gen/svc-%-glue.h: _gen/async-%.xml $(DBUS_BINDING_TOOL) --mode=glib-server --output=$@ \ - --prefix=tp_svc_`echo $* | tr A-Z a-z` $< + --prefix=tp_svc_`echo $* | tr '[:upper:]' '[:lower:]'` $< _gen/svc-%.c _gen/svc-%.h _gen/svc-%-signals-marshal.list: ../spec/%.xml ../tools/genginterface.py _gen/stable-interfaces.txt Makefile.am if grep '^$*$$' _gen/stable-interfaces.txt; \ diff --git a/telepathy-glib/stable-interfaces.mk b/telepathy-glib/stable-interfaces.mk index a36d9e334..af759f605 100644 --- a/telepathy-glib/stable-interfaces.mk +++ b/telepathy-glib/stable-interfaces.mk @@ -6,7 +6,7 @@ svc_headers = \ svc-properties-interface.h extract_interfaces_expr = \ -'s@^.include <telepathy-glib/_gen/svc-\([a-zA-Z_]*\)\.h>$$@\1@p' + 's@^.include <telepathy-glib/_gen/svc-\([[:alpha:]_]*\)\.h>$$@\1@p' _gen/stable-interfaces.txt: $(svc_headers) test -d _gen || mkdir _gen |