diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 607ea6f97a..c79dbae04f 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,17 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-10-27 19:49 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/src/codepage/cpru866.c + * harbour/src/codepage/cpruiso.c + * harbour/src/codepage/cprukoi.c + * harbour/src/codepage/cpruwin.c + * harbour/src/codepage/cpua1125.c + * harbour/src/codepage/cpua866.c + * harbour/src/codepage/cpuakoi.c + * harbour/src/codepage/cpuawin.c + * use macros in codepage definition instead of direct constant values + 2009-10-27 17:36 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbwin/axcore.c * Replaced duplicated constant with HB_SIZEOFARRAY() macro. diff --git a/harbour/src/codepage/cpru866.c b/harbour/src/codepage/cpru866.c index a7675bcc3e..cdb6ff0cea 100644 --- a/harbour/src/codepage/cpru866.c +++ b/harbour/src/codepage/cpru866.c @@ -57,11 +57,36 @@ #include "hbapi.h" #include "hbapicdp.h" +#define NUMBER_OF_CHARACTERS 32 /* The number of single characters in the + alphabet, two-as-one aren't considered + here, accented - are considered. */ +#define IS_LATIN 0 /* Should be 1, if the national alphabet + is based on Latin */ +#define ACCENTED_EQUAL 0 /* Should be 1, if accented character + has the same weight as appropriate + unaccented. */ +#define ACCENTED_INTERLEAVED 0 /* Should be 1, if accented characters + sort after their unaccented counterparts + only if the unaccented versions of all + characters being compared are the same + ( interleaving ) */ + +/* If ACCENTED_EQUAL or ACCENTED_INTERLEAVED is 1, you need to mark the + accented characters with the symbol '~' before each of them, for example: + a~ + If there is two-character sequence, which is considered as one, it should + be marked with '.' before and after it, for example: + ... h.ch.i ... + + The Upper case string and the Lower case string should be absolutely the + same excepting the characters case, of course. + */ + static HB_CODEPAGE s_codepage = { "RU866", - HB_CPID_866, HB_UNITB_866, 32, + HB_CPID_866, HB_UNITB_866, NUMBER_OF_CHARACTERS, "", "", - 0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL }; + IS_LATIN, ACCENTED_EQUAL, ACCENTED_INTERLEAVED, 0, 0, NULL, NULL, NULL, NULL, 0, NULL }; HB_CODEPAGE_INIT( RU866 ) diff --git a/harbour/src/codepage/cpruiso.c b/harbour/src/codepage/cpruiso.c index c29ff7bbd2..17b4d05e18 100644 --- a/harbour/src/codepage/cpruiso.c +++ b/harbour/src/codepage/cpruiso.c @@ -57,11 +57,36 @@ #include "hbapi.h" #include "hbapicdp.h" +#define NUMBER_OF_CHARACTERS 36 /* The number of single characters in the + alphabet, two-as-one aren't considered + here, accented - are considered. */ +#define IS_LATIN 0 /* Should be 1, if the national alphabet + is based on Latin */ +#define ACCENTED_EQUAL 0 /* Should be 1, if accented character + has the same weight as appropriate + unaccented. */ +#define ACCENTED_INTERLEAVED 0 /* Should be 1, if accented characters + sort after their unaccented counterparts + only if the unaccented versions of all + characters being compared are the same + ( interleaving ) */ + +/* If ACCENTED_EQUAL or ACCENTED_INTERLEAVED is 1, you need to mark the + accented characters with the symbol '~' before each of them, for example: + a~ + If there is two-character sequence, which is considered as one, it should + be marked with '.' before and after it, for example: + ... h.ch.i ... + + The Upper case string and the Lower case string should be absolutely the + same excepting the characters case, of course. + */ + static HB_CODEPAGE s_codepage = { "RUISO", - HB_CPID_8859_5, HB_UNITB_8859_5, 36, + HB_CPID_8859_5, HB_UNITB_8859_5, NUMBER_OF_CHARACTERS, "ϡ", "", - 0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL }; + IS_LATIN, ACCENTED_EQUAL, ACCENTED_INTERLEAVED, 0, 0, NULL, NULL, NULL, NULL, 0, NULL }; HB_CODEPAGE_INIT( RUISO ) diff --git a/harbour/src/codepage/cprukoi.c b/harbour/src/codepage/cprukoi.c index 7b04dd51c5..f022eb7eb4 100644 --- a/harbour/src/codepage/cprukoi.c +++ b/harbour/src/codepage/cprukoi.c @@ -57,11 +57,36 @@ #include "hbapi.h" #include "hbapicdp.h" +#define NUMBER_OF_CHARACTERS 32 /* The number of single characters in the + alphabet, two-as-one aren't considered + here, accented - are considered. */ +#define IS_LATIN 0 /* Should be 1, if the national alphabet + is based on Latin */ +#define ACCENTED_EQUAL 0 /* Should be 1, if accented character + has the same weight as appropriate + unaccented. */ +#define ACCENTED_INTERLEAVED 0 /* Should be 1, if accented characters + sort after their unaccented counterparts + only if the unaccented versions of all + characters being compared are the same + ( interleaving ) */ + +/* If ACCENTED_EQUAL or ACCENTED_INTERLEAVED is 1, you need to mark the + accented characters with the symbol '~' before each of them, for example: + a~ + If there is two-character sequence, which is considered as one, it should + be marked with '.' before and after it, for example: + ... h.ch.i ... + + The Upper case string and the Lower case string should be absolutely the + same excepting the characters case, of course. + */ + static HB_CODEPAGE s_codepage = { "RUKOI8", - HB_CPID_KOI_8, HB_UNITB_KOI_8, 32, + HB_CPID_KOI_8, HB_UNITB_KOI_8, NUMBER_OF_CHARACTERS, "", "", - 0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL }; + IS_LATIN, ACCENTED_EQUAL, ACCENTED_INTERLEAVED, 0, 0, NULL, NULL, NULL, NULL, 0, NULL }; HB_CODEPAGE_INIT( RUKOI8 ) diff --git a/harbour/src/codepage/cpruwin.c b/harbour/src/codepage/cpruwin.c index 2431ed87d3..b0d855c64e 100644 --- a/harbour/src/codepage/cpruwin.c +++ b/harbour/src/codepage/cpruwin.c @@ -57,11 +57,36 @@ #include "hbapi.h" #include "hbapicdp.h" +#define NUMBER_OF_CHARACTERS 32 /* The number of single characters in the + alphabet, two-as-one aren't considered + here, accented - are considered. */ +#define IS_LATIN 0 /* Should be 1, if the national alphabet + is based on Latin */ +#define ACCENTED_EQUAL 0 /* Should be 1, if accented character + has the same weight as appropriate + unaccented. */ +#define ACCENTED_INTERLEAVED 0 /* Should be 1, if accented characters + sort after their unaccented counterparts + only if the unaccented versions of all + characters being compared are the same + ( interleaving ) */ + +/* If ACCENTED_EQUAL or ACCENTED_INTERLEAVED is 1, you need to mark the + accented characters with the symbol '~' before each of them, for example: + a~ + If there is two-character sequence, which is considered as one, it should + be marked with '.' before and after it, for example: + ... h.ch.i ... + + The Upper case string and the Lower case string should be absolutely the + same excepting the characters case, of course. + */ + static HB_CODEPAGE s_codepage = { "RU1251", - HB_CPID_1251, HB_UNITB_1251, 32, + HB_CPID_1251, HB_UNITB_1251, NUMBER_OF_CHARACTERS, "", "", - 0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL }; + IS_LATIN, ACCENTED_EQUAL, ACCENTED_INTERLEAVED, 0, 0, NULL, NULL, NULL, NULL, 0, NULL }; HB_CODEPAGE_INIT( RU1251 ) diff --git a/harbour/src/codepage/cpua1125.c b/harbour/src/codepage/cpua1125.c index 65e768ce92..202bd174dc 100644 --- a/harbour/src/codepage/cpua1125.c +++ b/harbour/src/codepage/cpua1125.c @@ -57,11 +57,36 @@ #include "hbapi.h" #include "hbapicdp.h" +#define NUMBER_OF_CHARACTERS 37 /* The number of single characters in the + alphabet, two-as-one aren't considered + here, accented - are considered. */ +#define IS_LATIN 0 /* Should be 1, if the national alphabet + is based on Latin */ +#define ACCENTED_EQUAL 0 /* Should be 1, if accented character + has the same weight as appropriate + unaccented. */ +#define ACCENTED_INTERLEAVED 0 /* Should be 1, if accented characters + sort after their unaccented counterparts + only if the unaccented versions of all + characters being compared are the same + ( interleaving ) */ + +/* If ACCENTED_EQUAL or ACCENTED_INTERLEAVED is 1, you need to mark the + accented characters with the symbol '~' before each of them, for example: + a~ + If there is two-character sequence, which is considered as one, it should + be marked with '.' before and after it, for example: + ... h.ch.i ... + + The Upper case string and the Lower case string should be absolutely the + same excepting the characters case, of course. + */ + static HB_CODEPAGE s_codepage = { "UA1125", - HB_CPID_1125, HB_UNITB_1125, 37, + HB_CPID_1125, HB_UNITB_1125, NUMBER_OF_CHARACTERS, "􆇈", "", - 0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL }; + IS_LATIN, ACCENTED_EQUAL, ACCENTED_INTERLEAVED, 0, 0, NULL, NULL, NULL, NULL, 0, NULL }; HB_CODEPAGE_INIT( UA1125 ) diff --git a/harbour/src/codepage/cpua866.c b/harbour/src/codepage/cpua866.c index f51597c57a..73d85bd352 100644 --- a/harbour/src/codepage/cpua866.c +++ b/harbour/src/codepage/cpua866.c @@ -57,11 +57,36 @@ #include "hbapi.h" #include "hbapicdp.h" +#define NUMBER_OF_CHARACTERS 37 /* The number of single characters in the + alphabet, two-as-one aren't considered + here, accented - are considered. */ +#define IS_LATIN 0 /* Should be 1, if the national alphabet + is based on Latin */ +#define ACCENTED_EQUAL 0 /* Should be 1, if accented character + has the same weight as appropriate + unaccented. */ +#define ACCENTED_INTERLEAVED 0 /* Should be 1, if accented characters + sort after their unaccented counterparts + only if the unaccented versions of all + characters being compared are the same + ( interleaving ) */ + +/* If ACCENTED_EQUAL or ACCENTED_INTERLEAVED is 1, you need to mark the + accented characters with the symbol '~' before each of them, for example: + a~ + If there is two-character sequence, which is considered as one, it should + be marked with '.' before and after it, for example: + ... h.ch.i ... + + The Upper case string and the Lower case string should be absolutely the + same excepting the characters case, of course. + */ + static HB_CODEPAGE s_codepage = { "UA866", - HB_CPID_866, HB_UNITB_866, 37, + HB_CPID_866, HB_UNITB_866, NUMBER_OF_CHARACTERS, "򆇈I􉊋", "󦧨i", - 0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL }; + IS_LATIN, ACCENTED_EQUAL, ACCENTED_INTERLEAVED, 0, 0, NULL, NULL, NULL, NULL, 0, NULL }; HB_CODEPAGE_INIT( UA866 ) diff --git a/harbour/src/codepage/cpuakoi.c b/harbour/src/codepage/cpuakoi.c index 8b1b8c0a25..424294ea1a 100644 --- a/harbour/src/codepage/cpuakoi.c +++ b/harbour/src/codepage/cpuakoi.c @@ -57,11 +57,36 @@ #include "hbapi.h" #include "hbapicdp.h" +#define NUMBER_OF_CHARACTERS 37 /* The number of single characters in the + alphabet, two-as-one aren't considered + here, accented - are considered. */ +#define IS_LATIN 0 /* Should be 1, if the national alphabet + is based on Latin */ +#define ACCENTED_EQUAL 0 /* Should be 1, if accented character + has the same weight as appropriate + unaccented. */ +#define ACCENTED_INTERLEAVED 0 /* Should be 1, if accented characters + sort after their unaccented counterparts + only if the unaccented versions of all + characters being compared are the same + ( interleaving ) */ + +/* If ACCENTED_EQUAL or ACCENTED_INTERLEAVED is 1, you need to mark the + accented characters with the symbol '~' before each of them, for example: + a~ + If there is two-character sequence, which is considered as one, it should + be marked with '.' before and after it, for example: + ... h.ch.i ... + + The Upper case string and the Lower case string should be absolutely the + same excepting the characters case, of course. + */ + static HB_CODEPAGE s_codepage = { "UAKOI8", - HB_CPID_KOI_8U, HB_UNITB_KOI_8U, 37, + HB_CPID_KOI_8U, HB_UNITB_KOI_8U, NUMBER_OF_CHARACTERS, "峴鶷", "ǭţɦ", - 0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL }; + IS_LATIN, ACCENTED_EQUAL, ACCENTED_INTERLEAVED, 0, 0, NULL, NULL, NULL, NULL, 0, NULL }; HB_CODEPAGE_INIT( UAKOI8 ) diff --git a/harbour/src/codepage/cpuawin.c b/harbour/src/codepage/cpuawin.c index 28a3cca06a..852538f5cb 100644 --- a/harbour/src/codepage/cpuawin.c +++ b/harbour/src/codepage/cpuawin.c @@ -57,11 +57,36 @@ #include "hbapi.h" #include "hbapicdp.h" +#define NUMBER_OF_CHARACTERS 37 /* The number of single characters in the + alphabet, two-as-one aren't considered + here, accented - are considered. */ +#define IS_LATIN 0 /* Should be 1, if the national alphabet + is based on Latin */ +#define ACCENTED_EQUAL 0 /* Should be 1, if accented character + has the same weight as appropriate + unaccented. */ +#define ACCENTED_INTERLEAVED 0 /* Should be 1, if accented characters + sort after their unaccented counterparts + only if the unaccented versions of all + characters being compared are the same + ( interleaving ) */ + +/* If ACCENTED_EQUAL or ACCENTED_INTERLEAVED is 1, you need to mark the + accented characters with the symbol '~' before each of them, for example: + a~ + If there is two-character sequence, which is considered as one, it should + be marked with '.' before and after it, for example: + ... h.ch.i ... + + The Upper case string and the Lower case string should be absolutely the + same excepting the characters case, of course. + */ + static HB_CODEPAGE s_codepage = { "UA1251", - HB_CPID_1251, HB_UNITB_1251, 37, + HB_CPID_1251, HB_UNITB_1251, NUMBER_OF_CHARACTERS, "åŨȲ", "帺賿", - 0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL }; + IS_LATIN, ACCENTED_EQUAL, ACCENTED_INTERLEAVED, 0, 0, NULL, NULL, NULL, NULL, 0, NULL }; HB_CODEPAGE_INIT( UA1251 )