From 95127f2e6ac96a4c2a9dccd9dab4ca4c00b8fd8d Mon Sep 17 00:00:00 2001 From: "Alexander S.Kresin" Date: Thu, 3 Jul 2003 06:53:15 +0000 Subject: [PATCH] 2003-07-03 10:54 UTC+0300 Alexander Kresin --- harbour/ChangeLog | 16 +++ harbour/makefile.bc | 10 ++ harbour/makefile.nt | 2 + harbour/makefile.vc | 2 + harbour/source/codepage/Makefile | 1 + harbour/source/codepage/cdpsl437.c | 99 +++++++++++++++ harbour/source/codepage/cdpsl852.c | 2 +- harbour/source/codepage/cdpsliso.c | 2 +- harbour/source/codepage/cdpslwin.c | 4 +- harbour/source/lang/Makefile | 1 + harbour/source/lang/msgsl437.c | 194 +++++++++++++++++++++++++++++ 11 files changed, 329 insertions(+), 4 deletions(-) create mode 100644 harbour/source/codepage/cdpsl437.c create mode 100644 harbour/source/lang/msgsl437.c diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 71b894c291..410614c8bb 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,22 @@ 2002-12-01 23:12 UTC+0100 Foo Bar */ +2003-07-03 10:54 UTC+0300 Alexander Kresin + + source/codepage/cdpsl437.c + + source/lang/msgsl437.c + + New codepage and lang modules for Slovenian 7bit 437, provided by + Mitja Podgornik + * source/codepage/cdpsl852.c + * source/codepage/cdpsliso.c + * source/codepage/cdpslwin.c + ! Some fixes, provided by Mitja Podgornik + * makefile.bc + * makefile.nt + * makefile.vc + * source/codepage/Makefile + * source/lang/Makefile + * Makefiles updated. + 2003-07-03 10:00 UTC+0300 Alexander Kresin * source/rdd/dbfntx/dbfntx1.c ! Bug fixed - there was memory leak after INDEX ON ... ADDITIVE if there diff --git a/harbour/makefile.bc b/harbour/makefile.bc index 036b9f2c8a..d2e3baf50e 100644 --- a/harbour/makefile.bc +++ b/harbour/makefile.bc @@ -419,6 +419,7 @@ LANG_LIB_OBJS = \ $(OBJ_DIR)\msgru866.obj \ $(OBJ_DIR)\msgruwin.obj \ $(OBJ_DIR)\msgrukoi.obj \ + $(OBJ_DIR)\msgsl437.obj \ $(OBJ_DIR)\msgsl852.obj \ $(OBJ_DIR)\msgsliso.obj \ $(OBJ_DIR)\msgslwin.obj \ @@ -441,6 +442,7 @@ CODEPAGE_LIB_OBJS = \ $(OBJ_DIR)\cdpru866.obj \ $(OBJ_DIR)\cdpruwin.obj \ $(OBJ_DIR)\cdprukoi.obj \ + $(OBJ_DIR)\cdpsl437.obj \ $(OBJ_DIR)\cdpsl852.obj \ $(OBJ_DIR)\cdpsliso.obj \ $(OBJ_DIR)\cdpslwin.obj @@ -2178,6 +2180,10 @@ $(OBJ_DIR)\msgrukoi.obj : $(LANG_DIR)\msgrukoi.c $(CC) $(CLIBFLAGS) -o$@ $** tlib $(LANG_LIB) $(ARFLAGS) -+$@,, +$(OBJ_DIR)\msgsl437.obj : $(LANG_DIR)\msgsl437.c + $(CC) $(CLIBFLAGS) -o$@ $** + tlib $(LANG_LIB) $(ARFLAGS) -+$@,, + $(OBJ_DIR)\msgsl852.obj : $(LANG_DIR)\msgsl852.c $(CC) $(CLIBFLAGS) -o$@ $** tlib $(LANG_LIB) $(ARFLAGS) -+$@,, @@ -2261,6 +2267,10 @@ $(OBJ_DIR)\cdprukoi.obj : $(CODEPAGE_DIR)\cdprukoi.c $(CC) $(CLIBFLAGS) -o$@ $** tlib $(CODEPAGE_LIB) $(ARFLAGS) -+$@,, +$(OBJ_DIR)\cdpsl437.obj : $(CODEPAGE_DIR)\cdpsl437.c + $(CC) $(CLIBFLAGS) -o$@ $** + tlib $(CODEPAGE_LIB) $(ARFLAGS) -+$@,, + $(OBJ_DIR)\cdpsl852.obj : $(CODEPAGE_DIR)\cdpsl852.c $(CC) $(CLIBFLAGS) -o$@ $** tlib $(CODEPAGE_LIB) $(ARFLAGS) -+$@,, diff --git a/harbour/makefile.nt b/harbour/makefile.nt index 270fb5d4c0..519f6df073 100644 --- a/harbour/makefile.nt +++ b/harbour/makefile.nt @@ -472,6 +472,7 @@ LANG_LIB_OBJS = \ $(OBJ_DIR)\msgru866.obj \ $(OBJ_DIR)\msgrukoi.obj \ $(OBJ_DIR)\msgruwin.obj \ + $(OBJ_DIR)\msgsl437.obj \ $(OBJ_DIR)\msgsl852.obj \ $(OBJ_DIR)\msgsliso.obj \ $(OBJ_DIR)\msgslwin.obj \ @@ -501,6 +502,7 @@ CODEPAGE_LIB_OBJS = \ $(OBJ_DIR)\cdpru866.obj \ $(OBJ_DIR)\cdprukoi.obj \ $(OBJ_DIR)\cdpruwin.obj \ + $(OBJ_DIR)\cdpsl437.obj \ $(OBJ_DIR)\cdpsl852.obj \ $(OBJ_DIR)\cdpsliso.obj \ $(OBJ_DIR)\cdpslwin.obj diff --git a/harbour/makefile.vc b/harbour/makefile.vc index cfb616a491..45053002ed 100644 --- a/harbour/makefile.vc +++ b/harbour/makefile.vc @@ -437,6 +437,7 @@ LANG_LIB_OBJS = \ $(OBJ_DIR)\msgru866.obj \ $(OBJ_DIR)\msgrukoi.obj \ $(OBJ_DIR)\msgruwin.obj \ + $(OBJ_DIR)\msgsl437.obj \ $(OBJ_DIR)\msgsl852.obj \ $(OBJ_DIR)\msgsliso.obj \ $(OBJ_DIR)\msgslwin.obj \ @@ -466,6 +467,7 @@ CODEPAGE_LIB_OBJS = \ $(OBJ_DIR)\cdpru866.obj \ $(OBJ_DIR)\cdprukoi.obj \ $(OBJ_DIR)\cdpruwin.obj \ + $(OBJ_DIR)\cdpsl437.obj \ $(OBJ_DIR)\cdpsl852.obj \ $(OBJ_DIR)\cdpsliso.obj \ $(OBJ_DIR)\cdpslwin.obj diff --git a/harbour/source/codepage/Makefile b/harbour/source/codepage/Makefile index 87f1c4c3f6..d3402be2ba 100644 --- a/harbour/source/codepage/Makefile +++ b/harbour/source/codepage/Makefile @@ -18,6 +18,7 @@ C_SOURCES=\ cdpru866.c \ cdprukoi.c \ cdpruwin.c \ + cdpsl437.c \ cdpsl852.c \ cdpsliso.c \ cdpslwin.c diff --git a/harbour/source/codepage/cdpsl437.c b/harbour/source/codepage/cdpsl437.c new file mode 100644 index 0000000000..fa34feb843 --- /dev/null +++ b/harbour/source/codepage/cdpsl437.c @@ -0,0 +1,99 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * National Collation Support Module ( SL437 ) + * + * Copyright 2002 Alexander S.Kresin + * www - http://www.harbour-project.org + * 2003 Mitja Podgornik + * + * 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: Slovenian */ +/* ISO language code (2 chars): SL */ +/* 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 = { "SL437",NUMBER_OF_CHARACTERS, + "ABC^]D\EFGHIJKLMNOPQRS[TUVWZ@XY","abc~}d|efghijklmnopqrs{tuvwz`xy", + IS_LATIN,ACCENTED_EQUAL,ACCENTED_INTERLEAVED,0,NULL,NULL,NULL,NULL,0,NULL }; + +HB_CODEPAGE_ANNOUNCE( SL437 ); + +HB_CALL_ON_STARTUP_BEGIN( hb_codepage_Init_SL437 ) + hb_cdpRegister( &s_codepage ); +HB_CALL_ON_STARTUP_END( hb_codepage_Init_SL437 ) +#if ! defined(__GNUC__) && ! defined(_MSC_VER) + #pragma startup hb_codepage_Init_SL437 +#endif + diff --git a/harbour/source/codepage/cdpsl852.c b/harbour/source/codepage/cdpsl852.c index 1c83f462be..247f34a12f 100644 --- a/harbour/source/codepage/cdpsl852.c +++ b/harbour/source/codepage/cdpsl852.c @@ -85,7 +85,7 @@ */ static HB_CODEPAGE s_codepage = { "SL852",NUMBER_OF_CHARACTERS, - "ABC¬DÑEFGHIJKLMNOPQRSæTUVWZ¦XY","abcŸdÐefghijklmnopqrsçtuvwz§xy", + "ABC¬DÑEFGHIJKLMNOPQRSæTUVWZ¦XY","abcŸ†dÐefghijklmnopqrsçtuvwz§xy", IS_LATIN,ACCENTED_EQUAL,ACCENTED_INTERLEAVED,0,NULL,NULL,NULL,NULL,0,NULL }; HB_CODEPAGE_ANNOUNCE( SL852 ); diff --git a/harbour/source/codepage/cdpsliso.c b/harbour/source/codepage/cdpsliso.c index cb6cb497ab..637512f8f9 100644 --- a/harbour/source/codepage/cdpsliso.c +++ b/harbour/source/codepage/cdpsliso.c @@ -85,7 +85,7 @@ */ static HB_CODEPAGE s_codepage = { "SLISO",NUMBER_OF_CHARACTERS, - "ABCÈÆDÐEFGHIJKLMNOPQRS©TUVWZ®XY","abcèdðefghijklmnopqrs¹tuvwz¾xy", + "ABCÈÆDÐEFGHIJKLMNOPQRS©TUVWZ®XY","abcèædðefghijklmnopqrs¹tuvwz¾xy", IS_LATIN,ACCENTED_EQUAL,ACCENTED_INTERLEAVED,0,NULL,NULL,NULL,NULL,0,NULL }; HB_CODEPAGE_ANNOUNCE( SLISO ); diff --git a/harbour/source/codepage/cdpslwin.c b/harbour/source/codepage/cdpslwin.c index a82f1b077a..679c8f3faa 100644 --- a/harbour/source/codepage/cdpslwin.c +++ b/harbour/source/codepage/cdpslwin.c @@ -53,7 +53,7 @@ /* Language name: Slovenian */ /* ISO language code (2 chars): SL */ -/* Codepage: Windows-1250 */ +/* Codepage: 1250 */ #include #include "hbapi.h" @@ -85,7 +85,7 @@ */ static HB_CODEPAGE s_codepage = { "SLWIN",NUMBER_OF_CHARACTERS, - "ABCÈÆDÐEFGHIJKLMNOPQRSŠTUVWZŽXY","abcèdðefghijklmnopqrsštuvwzžxy", + "ABCÈÆDÐEFGHIJKLMNOPQRSŠTUVWZŽXY","abcèædðefghijklmnopqrsštuvwzžxy", IS_LATIN,ACCENTED_EQUAL,ACCENTED_INTERLEAVED,0,NULL,NULL,NULL,NULL,0,NULL }; HB_CODEPAGE_ANNOUNCE( SLWIN ); diff --git a/harbour/source/lang/Makefile b/harbour/source/lang/Makefile index a9516c561f..49a1c2aa44 100644 --- a/harbour/source/lang/Makefile +++ b/harbour/source/lang/Makefile @@ -39,6 +39,7 @@ C_SOURCES=\ msgru866.c \ msgrukoi.c \ msgruwin.c \ + msgsl437.c \ msgsl852.c \ msgsliso.c \ msgslwin.c \ diff --git a/harbour/source/lang/msgsl437.c b/harbour/source/lang/msgsl437.c new file mode 100644 index 0000000000..dcec5ba897 --- /dev/null +++ b/harbour/source/lang/msgsl437.c @@ -0,0 +1,194 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * Language Support Module (SL437) + * + * Copyright 2000 Davor Siklic + * www - http://www.harbour-project.org + * 2003 Mitja Podgornik + * + * 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 of the License, or + * (at your option) any later version, with one exception: + * + * The exception is that if you link the Harbour Runtime Library (HRL) + * and/or the Harbour Virtual Machine (HVM) 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 HRL + * and/or HVM code into it. + * + * 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 program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit + * their web site at http://www.gnu.org/). + * + */ + +/* Language name: Slovenian */ +/* ISO language code (2 chars): SL */ +/* Codepage: 437 */ + +#include "hbapilng.h" + +static HB_LANG s_lang = +{ + { + /* Identification */ + + "SL437", /* ID */ + "Slovenian", /* Name (in English) */ + "Sloven{~ina", /* Name (in native language) */ + "SL", /* RFC ID */ + "437", /* Codepage */ + "$Revision$ $Date$", /* Version */ + + /* Month names */ + + "Januar", + "Februar", + "Marec", + "April", + "Maj", + "Junij", + "Julij", + "Avgust", + "September", + "Oktober", + "November", + "December", + + /* Day names */ + + "Nedelja", + "Ponedeljek", + "Torek", + "Sreda", + "^etrtek", + "Petek", + "Sobota", + + /* CA-Cl*pper compatible natmsg items */ + + "Database Files # Records Last Update Size", + "Do you want more samples?", + "Page No.", + "** Subtotal **", + "* Subsubtotal *", + "*** Total ***", + "Ins", + " ", + "Invalid date", + "Range: ", + " - ", + "D/N", + "INVALID EXPRESSION", + + /* Error description names */ + + "Unknown error", + "Argument error", + "Bound error", + "String overflow", + "Numeric overflow", + "Zero divisor", + "Numeric error", + "Syntax error", + "Operation too complex", + "", + "", + "Memory low", + "Undefined function", + "No exported method", + "Variable does not exist", + "Alias does not exist", + "No exported variable", + "Illegal characters in alias", + "Alias already in use", + "", + "Create error", + "Open error", + "Close error", + "Read error", + "Write error", + "Print error", + "", + "", + "", + "", + "Operation not supported", + "Limit exceeded", + "Corruption detected", + "Data type error", + "Data width error", + "Workarea not in use", + "Workarea not indexed", + "Exclusive required", + "Lock required", + "Write not allowed", + "Append lock failed", + "Lock Failure", + "", + "", + "", + "", + "array access", + "array assign", + "array dimension", + "not an array", + "conditional", + + /* Internal error names */ + + "Unrecoverable error %lu: ", + "Error recovery failure", + "No ERRORBLOCK() for error", + "Too many recursive error handler calls", + "RDD invalid or failed to load", + "Invalid method type from %s", + "hb_xgrab can't allocate memory", + "hb_xrealloc called with a NULL pointer", + "hb_xrealloc called with an invalid pointer", + "hb_xrealloc can't reallocate memory", + "hb_xfree called with an invalid pointer", + "hb_xfree called with a NULL pointer", + "Can\'t locate the starting procedure: \'%s\'", + "No starting procedure", + "Unsupported VM opcode", + "Symbol item expected from %s", + "Invalid symbol type for self from %s", + "Codeblock expected from %s", + "Incorrect item type on the stack trying to pop from %s", + "Stack underflow", + "An item was going to be copied to itself from %s", + "Invalid symbol item passed as memvar %s", + "Memory buffer overflow", + "hb_xgrab requested to allocate zero bytes", + "hb_xrealloc requested to resize to zero bytes", + "hb_xalloc requested to allocate zero bytes", + + /* Texts */ + + "DD-MM-LLLL", + "D", + "N" + } +}; + +HB_LANG_ANNOUNCE( SL437 ); + +HB_CALL_ON_STARTUP_BEGIN( hb_lang_Init_SL437 ) + hb_langRegister( &s_lang ); +HB_CALL_ON_STARTUP_END( hb_lang_Init_SL437 ) +#if ! defined(__GNUC__) && ! defined(_MSC_VER) + #pragma startup hb_lang_Init_SL437 +#endif