From 13d361f2187556f44cc5e93cbda75b437516d97f Mon Sep 17 00:00:00 2001 From: Meep-Eep Date: Fri, 12 Jan 2007 23:48:36 +0000 Subject: [PATCH] Workaround around the Turkish language. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2658 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/ChangeLog | 1 + sc2/build/unix/config_functions | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/sc2/ChangeLog b/sc2/ChangeLog index 9daede03e..9015b0565 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Unix build scripts now work under LC_CTYPE=tr_TR - SvdB - Flush write buffer when doing a uio_fclose() after doing only uio_fwrite() operations. - SvdB - Major rewrite of the SwapBuffers commands -- screen compositing logic diff --git a/sc2/build/unix/config_functions b/sc2/build/unix/config_functions index df4b78089..cee17ac87 100644 --- a/sc2/build/unix/config_functions +++ b/sc2/build/unix/config_functions @@ -636,7 +636,10 @@ EOF # Arguments: $1 - the name of the symbol define_have_symbol() { local NAME VALUE - NAME=`$TR "[:lower:]" "[:upper:]" << EOF + + # Why not "tr [:lower:] [:upper:]"? Because the capital "i" is not + # "I" in Turkish... An alternative would be setting LC_CTYPE to POSIX. + NAME=`$TR "abcdefghijklmnopqrstuvwxyz" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" << EOF $1 EOF ` @@ -655,7 +658,10 @@ EOF # Arguments: $1 - the name of the symbol define_have_type() { local NAME VALUE - NAME=`$TR "[:lower:]" "[:upper:]" << EOF + + # Why not "tr [:lower:] [:upper:]"? Because the capital "i" is not + # "I" in Turkish... An alternative would be setting LC_CTYPE to POSIX. + NAME=`$TR "abcdefghijklmnopqrstuvwxyz" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" << EOF $1 EOF ` @@ -698,7 +704,10 @@ EOF # Arguments: $1 - the name of the header file define_have_header() { local NAME VALUE - NAME=`$TR /.[:lower:] __[:upper:] << EOF + + # Why not "tr [:lower:] [:upper:]"? Because the capital "i" is not + # "I" in Turkish... An alternative would be setting LC_CTYPE to POSIX. + NAME=`$TR "/.abcdefghijklmnopqrstuvwxyz" "__ABCDEFGHIJKLMNOPQRSTUVWXYZ" << EOF $1 EOF ` @@ -913,7 +922,7 @@ substitute_vars() { for VAR in $VARS; do # Escape all / in VAR so that we can use / as seperator char for sed eval VALUE=\"\$$VAR\" - VALUE=$(echo "$VALUE" | $SED 's,\([\&/]\),\\\1,g') + VALUE=$(echo "$VALUE" | $SED -e 's,\([\&/]\),\\\1,g') cat << EOF s/@${VAR}@/${VALUE}/g EOF