[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: Re: koffice/kexi/kexiutils
From: Michael Thaler <michael.thaler () physik ! tu-muenchen ! de>
Date: 2010-03-07 21:07:56
Message-ID: 201003072207.56276.michael.thaler () physik ! tu-muenchen ! de
[Download RAW message or body]
Hi,
works for me, thanks (the previous one also worked).
Greetings,
Michael
On Sunday 07 March 2010, Jarosław Staniek wrote:
> SVN commit 1100561 by staniek:
>
> make transliteration_table local function symbol, maybe this helps
> CCMAIL:michael.thaler@physik.tu-muenchen.de
>
>
> M +7 -4 generate_transliteration_table.sh
> M +1 -1 identifier.cpp
> M +4 -2 transliteration_table.cpp
> M transliteration_table.cpp.orig.bz2
> M +1 -1 transliteration_table.h
>
>
> --- trunk/koffice/kexi/kexiutils/generate_transliteration_table.sh
> #1100560:1100561 @@ -27,7 +27,7 @@
> out_h="transliteration_table.h"
> max=65534
>
> -decl="const char *const transliteration_table[TRANSLITERATION_TABLE_SIZE +
> 1]" +decl="const char *const transliteration_table"
>
> header=\
> "/* Transliteration table of `expr $max + 1` unicode characters
> @@ -37,12 +37,12 @@
> "
> echo "$header
> #define TRANSLITERATION_TABLE_SIZE `expr $max + 1`
> -extern $decl;
> +const char* const* transliteration_table();
> " > $out_h
>
> echo "$header
> #include \"$out_h\"
> -$decl = {
> +static const char *const
> g_transliteration_table[TRANSLITERATION_TABLE_SIZE + 1] = { " > $out_cpp
>
> for i in `seq 0 $max` ; do
> @@ -72,6 +72,9 @@
> fi
> done >> $out_cpp
>
> -echo "0};" >> $out_cpp;
> +echo "0};
>
> +const char* const* transliteration_table() { return
> g_transliteration_table; } +" >> $out_cpp;
> +
> bzip2 -9 $out_cpp || exit 1
> --- trunk/koffice/kexi/kexiutils/identifier.cpp #1100560:1100561
> @@ -48,7 +48,7 @@
> {
> if (c.unicode() >= TRANSLITERATION_TABLE_SIZE)
> return QString(QChar('_'));
> - const char *const s = transliteration_table[c.unicode()];
> + const char *const s = transliteration_table()[c.unicode()];
> return s ? QString::fromLatin1(s) : QString(QChar('_'));
> }
>
> --- trunk/koffice/kexi/kexiutils/transliteration_table.cpp #1100560:1100561
> @@ -4,7 +4,7 @@
>
>
> #include "transliteration_table.h"
> -const char *const transliteration_table[TRANSLITERATION_TABLE_SIZE + 1] =
> { +static const char *const
> g_transliteration_table[TRANSLITERATION_TABLE_SIZE + 1] = {
>
>
> /*0000*/0/*_*/,0/*_*/,0/*_*/,0/*_*/,0/*_*/,0/*_*/,0/*_*/,0/*_*/,
> @@ -8198,4 +8198,6 @@
> /*ffe0*/0/*ï¿ */,0/*ï¿¡*/,0/*ï¿¢*/,0/*ï¿£*/,0/*¦*/,0/*ï¿¥*/,0/*₩*/,0/*￧*/,
> /*ffe8*/0/*│*/,0/*ï¿©*/,0/*↑*/,0/*ï¿«*/,0/*↓*/,0/*ï¿*/,0/*ï¿®*/,0/*￯*/,
> /*fff0*/0/*￰*/,0/*￱*/,0/*￲*/,0/*￳*/,0/*￴*/,0/*￵*/,0/*￶*/,0/*￷*/,
> -/*fff8*/0/*￸*/,0/**/,0/**/,0/**/,0/**/,0/*�*/,0/*�*/,0};
> +/*fff8*/0/*￸*/,0/**/,0/**/,0/**/,0/**/,0/*�*/,0/*�*/,0};
> +
> +const char* const* transliteration_table() { return
> g_transliteration_table; } ---
> trunk/koffice/kexi/kexiutils/transliteration_table.h #1100560:1100561 @@
> -4,5 +4,5 @@
>
>
> #define TRANSLITERATION_TABLE_SIZE 65535
> -extern const char *const transliteration_table[TRANSLITERATION_TABLE_SIZE
> + 1]; +const char* const* transliteration_table();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic