From ae466d178d4389abc340403067a56a2b26b3c0be Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Wed, 16 Aug 2006 13:25:27 +0000 Subject: [PATCH] 2006-08-16 15:12 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/common.mak * harbour/source/codepage/Makefile + harbour/source/codepage/cpfrdos.c + harbour/source/codepage/cphr1250.c + harbour/source/codepage/cphr437.c + harbour/source/codepage/cphr852.c + harbour/source/codepage/cpit437.c + harbour/source/codepage/cpit850.c + harbour/source/codepage/cpitisb.c + harbour/source/codepage/cpitiso.c + harbour/source/codepage/cpltwin.c + harbour/source/codepage/cpua866.c + harbour/source/codepage/cpuakoi.c + harbour/source/codepage/cpuawin.c + added codepages from xHarbour * harbour/source/vm/garbage.c * harbour/source/vm/hvm.c * formatting and code cleanup --- harbour/ChangeLog | 21 ++++++ harbour/common.mak | 12 ++++ harbour/source/codepage/Makefile | 13 ++++ harbour/source/codepage/cpfrdos.c | 107 ++++++++++++++++++++++++++++ harbour/source/codepage/cphr1250.c | 108 +++++++++++++++++++++++++++++ harbour/source/codepage/cphr437.c | 106 ++++++++++++++++++++++++++++ harbour/source/codepage/cphr852.c | 108 +++++++++++++++++++++++++++++ harbour/source/codepage/cpit437.c | 104 +++++++++++++++++++++++++++ harbour/source/codepage/cpit850.c | 106 ++++++++++++++++++++++++++++ harbour/source/codepage/cpitisb.c | 106 ++++++++++++++++++++++++++++ harbour/source/codepage/cpitiso.c | 106 ++++++++++++++++++++++++++++ harbour/source/codepage/cpltwin.c | 108 +++++++++++++++++++++++++++++ harbour/source/codepage/cpua866.c | 81 ++++++++++++++++++++++ harbour/source/codepage/cpuakoi.c | 80 +++++++++++++++++++++ harbour/source/codepage/cpuawin.c | 81 ++++++++++++++++++++++ harbour/source/vm/garbage.c | 59 ---------------- harbour/source/vm/hvm.c | 18 ++--- 17 files changed, 1256 insertions(+), 68 deletions(-) create mode 100644 harbour/source/codepage/cpfrdos.c create mode 100644 harbour/source/codepage/cphr1250.c create mode 100644 harbour/source/codepage/cphr437.c create mode 100644 harbour/source/codepage/cphr852.c create mode 100644 harbour/source/codepage/cpit437.c create mode 100644 harbour/source/codepage/cpit850.c create mode 100644 harbour/source/codepage/cpitisb.c create mode 100644 harbour/source/codepage/cpitiso.c create mode 100644 harbour/source/codepage/cpltwin.c create mode 100644 harbour/source/codepage/cpua866.c create mode 100644 harbour/source/codepage/cpuakoi.c create mode 100644 harbour/source/codepage/cpuawin.c diff --git a/harbour/ChangeLog b/harbour/ChangeLog index fd6101bd65..e195974fde 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,27 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ +2006-08-16 15:12 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/common.mak + * harbour/source/codepage/Makefile + + harbour/source/codepage/cpfrdos.c + + harbour/source/codepage/cphr1250.c + + harbour/source/codepage/cphr437.c + + harbour/source/codepage/cphr852.c + + harbour/source/codepage/cpit437.c + + harbour/source/codepage/cpit850.c + + harbour/source/codepage/cpitisb.c + + harbour/source/codepage/cpitiso.c + + harbour/source/codepage/cpltwin.c + + harbour/source/codepage/cpua866.c + + harbour/source/codepage/cpuakoi.c + + harbour/source/codepage/cpuawin.c + + added codepages from xHarbour + + * harbour/source/vm/garbage.c + * harbour/source/vm/hvm.c + * formatting and code cleanup + 2006-08-16 12:55 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/include/hbstack.h * harbour/source/vm/estack.c diff --git a/harbour/common.mak b/harbour/common.mak index b1cefbb8b6..2661df1908 100644 --- a/harbour/common.mak +++ b/harbour/common.mak @@ -566,11 +566,20 @@ CODEPAGE_LIB_OBJS = \ $(OBJ_DIR)\cpesdos.obj \ $(OBJ_DIR)\cpesmwi.obj \ $(OBJ_DIR)\cpeswin.obj \ + $(OBJ_DIR)\cpfrdos.obj \ $(OBJ_DIR)\cpgedos.obj \ $(OBJ_DIR)\cpgewin.obj \ + $(OBJ_DIR)\cphr1250.obj \ + $(OBJ_DIR)\cphr437.obj \ + $(OBJ_DIR)\cphr852.obj \ $(OBJ_DIR)\cphu852.obj \ $(OBJ_DIR)\cphuiso.obj \ $(OBJ_DIR)\cphuwin.obj \ + $(OBJ_DIR)\cpit437.obj \ + $(OBJ_DIR)\cpit850.obj \ + $(OBJ_DIR)\cpitisb.obj \ + $(OBJ_DIR)\cpitiso.obj \ + $(OBJ_DIR)\cpltwin.obj \ $(OBJ_DIR)\cppl852.obj \ $(OBJ_DIR)\cppliso.obj \ $(OBJ_DIR)\cpplmaz.obj \ @@ -585,6 +594,9 @@ CODEPAGE_LIB_OBJS = \ $(OBJ_DIR)\cpsliso.obj \ $(OBJ_DIR)\cpslwin.obj \ $(OBJ_DIR)\cpsrwin.obj \ + $(OBJ_DIR)\cpua866.obj \ + $(OBJ_DIR)\cpuakoi.obj \ + $(OBJ_DIR)\cpuawin.obj \ $(OBJ_DIR)\uc1250.obj \ $(OBJ_DIR)\uc1251.obj \ $(OBJ_DIR)\uc1253.obj \ diff --git a/harbour/source/codepage/Makefile b/harbour/source/codepage/Makefile index ac26af3c4a..645e460811 100644 --- a/harbour/source/codepage/Makefile +++ b/harbour/source/codepage/Makefile @@ -4,6 +4,7 @@ ROOT = ../../ + C_SOURCES=\ cpbg866.c \ cpbgiso.c \ @@ -13,11 +14,20 @@ C_SOURCES=\ cpesdos.c \ cpeswin.c \ cpesmwi.c \ + cpfrdos.c \ cpgedos.c \ cpgewin.c \ + cphr1250.c \ + cphr437.c \ + cphr852.c \ cphu852.c \ cphuiso.c \ cphuwin.c \ + cpit437.c \ + cpit850.c \ + cpitisb.c \ + cpitiso.c \ + cpltwin.c \ cppl852.c \ cppliso.c \ cpplmaz.c \ @@ -32,6 +42,9 @@ C_SOURCES=\ cpsliso.c \ cpslwin.c \ cpsrwin.c \ + cpua866.c \ + cpuakoi.c \ + cpuawin.c \ uc1250.c \ uc1251.c \ uc1253.c \ diff --git a/harbour/source/codepage/cpfrdos.c b/harbour/source/codepage/cpfrdos.c new file mode 100644 index 0000000000..342fa079c5 --- /dev/null +++ b/harbour/source/codepage/cpfrdos.c @@ -0,0 +1,107 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * National Collation Support Module ( French MS-DOS cp-850 ) + * + * Copyright 2002 Alexander S.Kresin + * www - http://www.harbour-project.org + * French collating sequence (FR) done by + * Przemyslaw Czerpak < druzus /at/ priv.onet.pl > + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ + +/* Language name: French */ +/* ISO language code (2 chars): FR */ +/* Codepage: 850 */ + +#include +#include "hbapi.h" +#include "hbapicdp.h" + +#define NUMBER_OF_CHARACTERS 46 /* The number of single characters in the + alphabet, two-as-one aren't considered + here, accented - are considered. */ +#define IS_LATIN 1 /* 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 = { "FR", + CPID_850, UNITB_850, NUMBER_OF_CHARACTERS, + "AAAAABCDEEEEEFGHIIIIIJKLMNOOOOOPQRSTUUUUUVWXYZ", + "abcdefghijklmnopqrstuvwxyz", + IS_LATIN, ACCENTED_EQUAL, ACCENTED_INTERLEAVED, 0, 0, NULL, NULL, NULL, NULL, 0, NULL }; + +HB_CODEPAGE_INIT( FR ) + +#if defined(HB_PRAGMA_STARTUP) + #pragma startup hb_codepage_Init_FR +#elif defined(HB_MSC_STARTUP) + #if _MSC_VER >= 1010 + #pragma data_seg( ".CRT$XIY" ) + #pragma comment( linker, "/Merge:.CRT=.data" ) + #else + #pragma data_seg( "XIY" ) + #endif + static HB_$INITSYM hb_vm_auto_hb_codepage_Init_FR = hb_codepage_Init_FR; + #pragma data_seg() +#endif diff --git a/harbour/source/codepage/cphr1250.c b/harbour/source/codepage/cphr1250.c new file mode 100644 index 0000000000..ad3df2d0c3 --- /dev/null +++ b/harbour/source/codepage/cphr1250.c @@ -0,0 +1,108 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * National Collation Support Module ( HR1250 ) + * + * Copyright 2002 Alexander S.Kresin + * www - http://www.harbour-project.org + * 2003 Mitja Podgornik + * 2003 Vlado Miholic + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ + +/* Language name: Croatien */ +/* ISO language code (2 chars): HR */ +/* Codepage: 1250 */ + +#include +#include "hbapi.h" +#include "hbapicdp.h" + +#define NUMBER_OF_CHARACTERS 31 /* The number of single characters in the + alphabet, two-as-one aren't considered + here, accented - are considered. */ +#define IS_LATIN 1 /* 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 = { "HR1250", + CPID_1250,UNITB_1250,NUMBER_OF_CHARACTERS, + "ABCCCDEFGHIJKLMNOPQRSTUVWZXY", + "abcccddefghijklmnopqrstuvwzxy", + IS_LATIN, ACCENTED_EQUAL, ACCENTED_INTERLEAVED, 0, 0, NULL, NULL, NULL, NULL, 0, NULL }; + +HB_CODEPAGE_INIT( HR1250 ) + +#if defined(HB_PRAGMA_STARTUP) + #pragma startup hb_codepage_Init_HR1250 +#elif defined(HB_MSC_STARTUP) + #if _MSC_VER >= 1010 + #pragma data_seg( ".CRT$XIY" ) + #pragma comment( linker, "/Merge:.CRT=.data" ) + #else + #pragma data_seg( "XIY" ) + #endif + static HB_$INITSYM hb_vm_auto_hb_codepage_Init_HR1250 = hb_codepage_Init_HR1250; + #pragma data_seg() +#endif + diff --git a/harbour/source/codepage/cphr437.c b/harbour/source/codepage/cphr437.c new file mode 100644 index 0000000000..3f460a56e7 --- /dev/null +++ b/harbour/source/codepage/cphr437.c @@ -0,0 +1,106 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * National Collation Support Module ( HR437 ) + * + * Copyright 2003 Vlado Miholic + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ + +/* Language name: Croatien */ +/* ISO language code (2 chars): HR */ +/* Codepage: 437 */ + +#include +#include "hbapi.h" +#include "hbapicdp.h" + +#define NUMBER_OF_CHARACTERS 31 /* The number of single characters in the + alphabet, two-as-one aren't considered + here, accented - are considered. */ +#define IS_LATIN 1 /* 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 = { "HR437", + CPID_437,UNITB_437,NUMBER_OF_CHARACTERS, + "ABC]^D\\EFGHIJKLMNOPQRS[TUVWZ@XY", + "abc}~d|efghijklmnopqrs{tuvwz`xy", + IS_LATIN, ACCENTED_EQUAL, ACCENTED_INTERLEAVED, 0, 0, NULL, NULL, NULL, NULL, 0, NULL }; + +HB_CODEPAGE_INIT( HR437 ) + +#if defined(HB_PRAGMA_STARTUP) + #pragma startup hb_codepage_Init_HR437 +#elif defined(HB_MSC_STARTUP) + #if _MSC_VER >= 1010 + #pragma data_seg( ".CRT$XIY" ) + #pragma comment( linker, "/Merge:.CRT=.data" ) + #else + #pragma data_seg( "XIY" ) + #endif + static HB_$INITSYM hb_vm_auto_hb_codepage_Init_HR437 = hb_codepage_Init_HR437; + #pragma data_seg() +#endif + diff --git a/harbour/source/codepage/cphr852.c b/harbour/source/codepage/cphr852.c new file mode 100644 index 0000000000..dcfcab7148 --- /dev/null +++ b/harbour/source/codepage/cphr852.c @@ -0,0 +1,108 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * National Collation Support Module ( HR852 ) + * + * Copyright 2002 Alexander S.Kresin + * www - http://www.harbour-project.org + * 2003 Mitja Podgornik + * 2003 Vlado Miholic + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ + +/* Language name: Croatien */ +/* ISO language code (2 chars): HR */ +/* Codepage: 852 */ + +#include +#include "hbapi.h" +#include "hbapicdp.h" + +#define NUMBER_OF_CHARACTERS 31 /* The number of single characters in the + alphabet, two-as-one aren't considered + here, accented - are considered. */ +#define IS_LATIN 1 /* 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 = { "HR852", + CPID_852,UNITB_852,NUMBER_OF_CHARACTERS, + "ABCDEFGHIJKLMNOPQRSTUVWZXY", + "abcdefghijklmnopqrstuvwzxy", + IS_LATIN, ACCENTED_EQUAL, ACCENTED_INTERLEAVED, 0, 0, NULL, NULL, NULL, NULL, 0, NULL }; + +HB_CODEPAGE_INIT( HR852 ) + +#if defined(HB_PRAGMA_STARTUP) + #pragma startup hb_codepage_Init_HR852 +#elif defined(HB_MSC_STARTUP) + #if _MSC_VER >= 1010 + #pragma data_seg( ".CRT$XIY" ) + #pragma comment( linker, "/Merge:.CRT=.data" ) + #else + #pragma data_seg( "XIY" ) + #endif + static HB_$INITSYM hb_vm_auto_hb_codepage_Init_HR852 = hb_codepage_Init_HR852; + #pragma data_seg() +#endif + diff --git a/harbour/source/codepage/cpit437.c b/harbour/source/codepage/cpit437.c new file mode 100644 index 0000000000..c43b49021d --- /dev/null +++ b/harbour/source/codepage/cpit437.c @@ -0,0 +1,104 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * National Collation Support Module ( Italian MS-DOS cp 437 ) + * + * Copyright 2004 Maurilio Longo - + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ + +/* Language name: Italian */ +/* ISO language code (2 chars): IT */ +/* Codepage: 437 */ + +#include +#include "hbapi.h" +#include "hbapicdp.h" + +#define NUMBER_OF_CHARACTERS 40 /* The number of single characters in the + alphabet, two-as-one aren't considered + here, accented - are considered. */ +#define IS_LATIN 1 /* 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 = { "IT437", + CPID_437, UNITB_437, NUMBER_OF_CHARACTERS, + "AAAAABCDEEFGHIIIJKLMNOOOPQRSTUUUVWXYZ", + "aabcdefghijklmnopqrstuvwxyz", + IS_LATIN, ACCENTED_EQUAL, ACCENTED_INTERLEAVED, 0, 0, NULL, NULL, NULL, NULL, 0, NULL }; + +HB_CODEPAGE_INIT( IT437 ) + +#if defined(HB_PRAGMA_STARTUP) + #pragma startup hb_codepage_Init_IT437 +#elif defined(HB_MSC_STARTUP) + #if _MSC_VER >= 1010 + #pragma data_seg( ".CRT$XIY" ) + #pragma comment( linker, "/Merge:.CRT=.data" ) + #else + #pragma data_seg( "XIY" ) + #endif + static HB_$INITSYM hb_vm_auto_hb_codepage_Init_IT437 = hb_codepage_Init_IT437; + #pragma data_seg() +#endif diff --git a/harbour/source/codepage/cpit850.c b/harbour/source/codepage/cpit850.c new file mode 100644 index 0000000000..8fc4b003b5 --- /dev/null +++ b/harbour/source/codepage/cpit850.c @@ -0,0 +1,106 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * National Collation Support Module ( Spanish MS-DOS ) + * + * Copyright 2002 Alexander S.Kresin + * www - http://www.harbour-project.org + * Spanish MS-DOS support by Antonio Linares + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ + +/* Language name: Italian */ +/* ISO language code (2 chars): IT */ +/* Codepage: 850 */ + +#include +#include "hbapi.h" +#include "hbapicdp.h" + +#define NUMBER_OF_CHARACTERS 40 /* The number of single characters in the + alphabet, two-as-one aren't considered + here, accented - are considered. */ +#define IS_LATIN 1 /* 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 = { "IT850", + CPID_850, UNITB_850, NUMBER_OF_CHARACTERS, + "AǎBCDEԐFGHIJKLMNOPQRSTUVWXYZ", + "aƄbcdefghijklmnopqrstuvwxyz", + IS_LATIN, ACCENTED_EQUAL, ACCENTED_INTERLEAVED, 0, 0, NULL, NULL, NULL, NULL, 0, NULL }; + +HB_CODEPAGE_INIT( IT850 ) + +#if defined(HB_PRAGMA_STARTUP) + #pragma startup hb_codepage_Init_IT850 +#elif defined(HB_MSC_STARTUP) + #if _MSC_VER >= 1010 + #pragma data_seg( ".CRT$XIY" ) + #pragma comment( linker, "/Merge:.CRT=.data" ) + #else + #pragma data_seg( "XIY" ) + #endif + static HB_$INITSYM hb_vm_auto_hb_codepage_Init_IT850 = hb_codepage_Init_IT850; + #pragma data_seg() +#endif diff --git a/harbour/source/codepage/cpitisb.c b/harbour/source/codepage/cpitisb.c new file mode 100644 index 0000000000..5c76bbc9a5 --- /dev/null +++ b/harbour/source/codepage/cpitisb.c @@ -0,0 +1,106 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * National Collation Support Module ( Spanish MS-DOS ) + * + * Copyright 2002 Alexander S.Kresin + * www - http://www.harbour-project.org + * Spanish MS-DOS support by Antonio Linares + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ + +/* Language name: Italian */ +/* ISO language code (2 chars): IT */ +/* Codepage: ISO-8859-1b (with BOX characters) */ + +#include +#include "hbapi.h" +#include "hbapicdp.h" + +#define NUMBER_OF_CHARACTERS 40 /* The number of single characters in the + alphabet, two-as-one aren't considered + here, accented - are considered. */ +#define IS_LATIN 1 /* 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 = { "ITISB", + CPID_8859_1B, UNITB_8859_1B, NUMBER_OF_CHARACTERS, + "ABCDEFGHIJKLMNOPQRSTUVWXYZ", + "abcdefghijklmnopqrstuvwxyz", + IS_LATIN, ACCENTED_EQUAL, ACCENTED_INTERLEAVED, 0, 0, NULL, NULL, NULL, NULL, 0, NULL }; + +HB_CODEPAGE_INIT( ITISB ) + +#if defined(HB_PRAGMA_STARTUP) + #pragma startup hb_codepage_Init_ITISB +#elif defined(HB_MSC_STARTUP) + #if _MSC_VER >= 1010 + #pragma data_seg( ".CRT$XIY" ) + #pragma comment( linker, "/Merge:.CRT=.data" ) + #else + #pragma data_seg( "XIY" ) + #endif + static HB_$INITSYM hb_vm_auto_hb_codepage_Init_ITISB = hb_codepage_Init_ITISB; + #pragma data_seg() +#endif diff --git a/harbour/source/codepage/cpitiso.c b/harbour/source/codepage/cpitiso.c new file mode 100644 index 0000000000..3ca740673c --- /dev/null +++ b/harbour/source/codepage/cpitiso.c @@ -0,0 +1,106 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * National Collation Support Module ( Spanish MS-DOS ) + * + * Copyright 2002 Alexander S.Kresin + * www - http://www.harbour-project.org + * Spanish MS-DOS support by Antonio Linares + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ + +/* Language name: Italian */ +/* ISO language code (2 chars): IT */ +/* Codepage: ISO-8859-1 */ + +#include +#include "hbapi.h" +#include "hbapicdp.h" + +#define NUMBER_OF_CHARACTERS 40 /* The number of single characters in the + alphabet, two-as-one aren't considered + here, accented - are considered. */ +#define IS_LATIN 1 /* 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 = { "ITISO", + CPID_8859_1, UNITB_8859_1, NUMBER_OF_CHARACTERS, + "ABCDEFGHIJKLMNOPQRSTUVWXYZ", + "abcdefghijklmnopqrstuvwxyz", + IS_LATIN, ACCENTED_EQUAL, ACCENTED_INTERLEAVED, 0, 0, NULL, NULL, NULL, NULL, 0, NULL }; + +HB_CODEPAGE_INIT( ITISO ) + +#if defined(HB_PRAGMA_STARTUP) + #pragma startup hb_codepage_Init_ITISO +#elif defined(HB_MSC_STARTUP) + #if _MSC_VER >= 1010 + #pragma data_seg( ".CRT$XIY" ) + #pragma comment( linker, "/Merge:.CRT=.data" ) + #else + #pragma data_seg( "XIY" ) + #endif + static HB_$INITSYM hb_vm_auto_hb_codepage_Init_ITISO = hb_codepage_Init_ITISO; + #pragma data_seg() +#endif diff --git a/harbour/source/codepage/cpltwin.c b/harbour/source/codepage/cpltwin.c new file mode 100644 index 0000000000..48a69e9a2b --- /dev/null +++ b/harbour/source/codepage/cpltwin.c @@ -0,0 +1,108 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * National Collation Support Module ( LT ) + * + * Copyright 2002 Alexander S.Kresin + * www - http://www.harbour-project.org + * Lithuanian collation sequence + * 2003, by Mindaugas Kavaliauskas + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ + +/* Language name: Lithuanian */ +/* ISO language code (2 chars): LT */ +/* Codepage: Windows-1257 */ + +#include +#include "hbapi.h" +#include "hbapicdp.h" + +#define NUMBER_OF_CHARACTERS 35 /* The number of single characters in the + alphabet, two-as-one aren't considered + here, accented - are considered. */ +#define IS_LATIN 1 /* 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 = { "LT", + CPID_1257,UNITB_1257,NUMBER_OF_CHARACTERS, + "ABCDEFGHIYJKLMNOPQRSTUVWXZ", + "abcdefghiyjklmnopqrstuvwxz", + IS_LATIN, ACCENTED_EQUAL, ACCENTED_INTERLEAVED, 0, 0, NULL, NULL, NULL, NULL, 0, NULL }; + +HB_CODEPAGE_INIT( LT ) + +#if defined(HB_PRAGMA_STARTUP) + #pragma startup hb_codepage_Init_LT +#elif defined(HB_MSC_STARTUP) + #if _MSC_VER >= 1010 + #pragma data_seg( ".CRT$XIY" ) + #pragma comment( linker, "/Merge:.CRT=.data" ) + #else + #pragma data_seg( "XIY" ) + #endif + static HB_$INITSYM hb_vm_auto_hb_codepage_Init_LT = hb_codepage_Init_LT; + #pragma data_seg() +#endif + diff --git a/harbour/source/codepage/cpua866.c b/harbour/source/codepage/cpua866.c new file mode 100644 index 0000000000..eb4ae00166 --- /dev/null +++ b/harbour/source/codepage/cpua866.c @@ -0,0 +1,81 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * National Collation Support Module (UA866) + * + * Copyright 2004 Pavel Tsarenko + * www - http://www.xharbour.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ + +/* Language name: Ukrainian */ +/* ISO language code (2 chars): UA */ +/* Codepage: 866 */ + +#include +#include "hbapi.h" +#include "hbapicdp.h" + +static HB_CODEPAGE s_codepage = { "UA866", + CPID_866,UNITB_866,36, + "򆇈I􉊋", + "󦧨i", + 0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL }; + +HB_CODEPAGE_INIT( UA866 ) + +#if defined(HB_PRAGMA_STARTUP) + #pragma startup hb_codepage_Init_UA866 +#elif defined(HB_MSC_STARTUP) + #if _MSC_VER >= 1010 + #pragma data_seg( ".CRT$XIY" ) + #pragma comment( linker, "/Merge:.CRT=.data" ) + #else + #pragma data_seg( "XIY" ) + #endif + static HB_$INITSYM hb_vm_auto_hb_codepage_Init_UA866 = hb_codepage_Init_UA866; + #pragma data_seg() +#endif + diff --git a/harbour/source/codepage/cpuakoi.c b/harbour/source/codepage/cpuakoi.c new file mode 100644 index 0000000000..a9c5601d6a --- /dev/null +++ b/harbour/source/codepage/cpuakoi.c @@ -0,0 +1,80 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * National Collation Support Module (UAKOI-8) + * + * Copyright 2004 Pavel Tsarenko + * www - http://www.xharbour.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ + +/* Language name: Ukrainian */ +/* ISO language code (2 chars): UA */ +/* Codepage: KOI-8U */ + +#include +#include "hbapi.h" +#include "hbapicdp.h" + +static HB_CODEPAGE s_codepage = { "UAKOI8", + CPID_KOI_8,UNITB_KOI_8,36, + "峴鶷", + "ţɦ", + 0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL }; + +HB_CODEPAGE_INIT( UAKOI8 ) + +#if defined(HB_PRAGMA_STARTUP) + #pragma startup hb_codepage_Init_UAKOI8 +#elif defined(HB_MSC_STARTUP) + #if _MSC_VER >= 1010 + #pragma data_seg( ".CRT$XIY" ) + #pragma comment( linker, "/Merge:.CRT=.data" ) + #else + #pragma data_seg( "XIY" ) + #endif + static HB_$INITSYM hb_vm_auto_hb_codepage_Init_UAKOI8 = hb_codepage_Init_UAKOI8; + #pragma data_seg() +#endif diff --git a/harbour/source/codepage/cpuawin.c b/harbour/source/codepage/cpuawin.c new file mode 100644 index 0000000000..24cfcc2835 --- /dev/null +++ b/harbour/source/codepage/cpuawin.c @@ -0,0 +1,81 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * National Collation Support Module (UAWIN) + * + * Copyright 2004 Pavel Tsarenko + * www - http://www.xharbour.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ + +/* Language name: Ukrainian */ +/* ISO language code (2 chars): UA */ +/* Codepage: Windows-1251 */ + +#include +#include "hbapi.h" +#include "hbapicdp.h" + +static HB_CODEPAGE s_codepage = { "UA1251", + CPID_1251,UNITB_1251,36, + "ŨȲ", + "帺賿", + 0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL }; + +HB_CODEPAGE_INIT( UA1251 ) + +#if defined(HB_PRAGMA_STARTUP) + #pragma startup hb_codepage_Init_UA1251 +#elif defined(HB_MSC_STARTUP) + #if _MSC_VER >= 1010 + #pragma data_seg( ".CRT$XIY" ) + #pragma comment( linker, "/Merge:.CRT=.data" ) + #else + #pragma data_seg( "XIY" ) + #endif + static HB_$INITSYM hb_vm_auto_hb_codepage_Init_UA1251 = hb_codepage_Init_UA1251; + #pragma data_seg() +#endif + diff --git a/harbour/source/vm/garbage.c b/harbour/source/vm/garbage.c index df9438e95f..8dbbeb641c 100644 --- a/harbour/source/vm/garbage.c +++ b/harbour/source/vm/garbage.c @@ -615,65 +615,6 @@ void hb_gcCollectAll( void ) } while( s_pDeletedBlock ); } - -#if 0 - pAlloc = s_pCurrBlock; - do - { - if( s_pCurrBlock->used == s_uUsedFlag ) - { - /* call a cleanup function */ - s_pCurrBlock->used |= HB_GC_DELETE; - if( s_pCurrBlock->pFunc ) - { - ( s_pCurrBlock->pFunc )( HB_MEM_PTR( s_pCurrBlock ) ); - } - } - - s_pCurrBlock = s_pCurrBlock->pNext; - - } while ( s_pCurrBlock && (pAlloc != s_pCurrBlock) ); - - pAlloc = s_pCurrBlock; - do - { - NewTopBlock: - - if( s_pCurrBlock->used & HB_GC_DELETE ) - { - pDelete = s_pCurrBlock; - hb_gcUnlink( &s_pCurrBlock, s_pCurrBlock ); - - /* - Releasing the top block in the list, so we must mark the new top into pAlloc - but we still need to process this new top. Without this goto, the while - condition will immediatly fail. Using extra flags, and new conditions - will adversly effect performance. - */ - if( pDelete == pAlloc ) - { - pAlloc = s_pCurrBlock; - HB_GARBAGE_FREE( pDelete ); - - if( s_pCurrBlock ) - { - goto NewTopBlock; - } - } - else - { - HB_GARBAGE_FREE( pDelete ); - } - } - else - { - s_pCurrBlock = s_pCurrBlock->pNext; - } - } while ( s_pCurrBlock && ( pAlloc != s_pCurrBlock ) ); - - s_pCurrBlock = pAlloc; -#endif - /* Step 4 - flip flag */ /* Reverse used/unused flag so we don't have to mark all blocks * during next collecting diff --git a/harbour/source/vm/hvm.c b/harbour/source/vm/hvm.c index e696099850..e39f79ada6 100644 --- a/harbour/source/vm/hvm.c +++ b/harbour/source/vm/hvm.c @@ -379,8 +379,8 @@ HB_EXPORT void hb_vmInit( BOOL bStartMainProc ) { #if defined(HB_OS_OS2) - EXCEPTIONREGISTRATIONRECORD RegRec = {0}; /* Exception Registration Record */ - APIRET rc = NO_ERROR; /* Return code */ + EXCEPTIONREGISTRATIONRECORD RegRec; /* Exception Registration Record */ + APIRET rc; /* Return code */ #endif HB_TRACE(HB_TR_DEBUG, ("hb_vmInit()")); @@ -409,7 +409,6 @@ HB_EXPORT void hb_vmInit( BOOL bStartMainProc ) hb_clsInit(); /* initialize Classy/OO system */ /* Set the language to the default */ - /* This trick is needed to stringify the macro value */ hb_langSelectID( HB_MACRO2STRING( HB_LANG_DEFAULT ) ); @@ -485,10 +484,11 @@ HB_EXPORT void hb_vmInit( BOOL bStartMainProc ) } #if defined(HB_OS_OS2) /* Add OS2TermHandler to this thread's chain of exception handlers */ - - RegRec.ExceptionHandler = (ERR)OS2TermHandler; + memset( &RegRec, 0, sizeof( RegRec ) ); + RegRec.ExceptionHandler = ( ERR ) OS2TermHandler; rc = DosSetExceptionHandler( &RegRec ); - if (rc != NO_ERROR) { + if( rc != NO_ERROR ) + { hb_errInternal( HB_EI_ERRUNRECOV, "Unable to setup exception handler (DosSetExceptionHandler())", NULL, NULL ); } #endif @@ -530,7 +530,7 @@ HB_EXPORT int hb_vmQuit( void ) hb_vmDoExitFunctions(); /* process defined EXIT functions */ #ifdef HB_MACRO_STATEMENTS - hb_pp_Free(); + hb_pp_Free(); #endif /* process AtExit registered functions */ @@ -558,7 +558,7 @@ HB_EXPORT int hb_vmQuit( void ) /* hb_gcReleaseAll(); */ /* release all known garbage */ - if ( hb_xquery( HB_MEM_USEDMAX ) ) /* check if fmstat is ON */ + if( hb_xquery( HB_MEM_USEDMAX ) ) /* check if fmstat is ON */ hb_gcCollectAll(); else hb_gcReleaseAll(); @@ -5830,7 +5830,7 @@ void hb_vmForceLink( void ) { HB_TRACE(HB_TR_DEBUG, ("hb_vmForceLink()")); - HB_FUNCNAME( SYSINIT )(); + HB_FUNC_EXEC( SYSINIT ); } /* ----------------------------- */