Use tr [:lower:] [:upper:] instead of the a-z one

The 'old' tr call produced garbled output with sun's tr.

The current common/tokenize.gperf file only uses a-z, 1-5 and _. Thus the
dropped conversions don't hurt atm. If they should ever become necessary again,
we need to find another, more portable way to doing this.

Thanks to evocallaghan aka Edward O'Callaghan for trying to build awesome on
SunOS and providing some hints on how to fix it.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2009-05-09 20:12:20 +02:00 committed by Julien Danjou
parent 886d62fb59
commit 02e39eb8e0
1 changed files with 2 additions and 2 deletions

View File

@ -50,7 +50,7 @@ do_h() {
typedef enum awesome_token_t {
A_TK_UNKNOWN,
`tr 'a-z-./ ' 'A-Z____' | sed -e "s/^[^/].*/ A_TK_&,/"`
`tr '[:lower:]' '[:upper:]' | sed -e "s/^[^/].*/ A_TK_&,/"`
} awesome_token_t;
__attribute__((pure)) enum awesome_token_t a_tokenize(const char *s, int len);
@ -63,7 +63,7 @@ do_tokens() {
case "$tok" in
"") continue;;
*)
echo "$tok, A_TK_`echo $tok | tr 'a-z-./ ' 'A-Z____'`"
echo "$tok, A_TK_`echo $tok | tr '[:lower:]' '[:upper:]'`"
;;
esac
done