diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 956aab1318..a90b98e9fc 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,51 @@ +2000-07-27 10:15 UTC+0100 Ryszard Glab + + *include/error.ch + *include/hbapilng.h + *added internal error HB_MEMOVERFLOW + *adjusted internal data for Lang API + + *source/lang/msg_tpl.c + *source/lang/msgca.c + *source/lang/msgcs852.c + *source/lang/msgcsiso.c + *source/lang/msgcskam.c + *source/lang/msgcswin.c + *source/lang/msgde.c + *source/lang/msgen.c + *source/lang/msges.c + *source/lang/msgeu.c + *source/lang/msgfr.c + *source/lang/msggl.c + *source/lang/msghe862.c + *source/lang/msghewin.c + *source/lang/msghr852.c + *source/lang/msghriso.c + *source/lang/msghu852.c + *source/lang/msghucwi.c + *source/lang/msghuwin.c + *source/lang/msgis850.c + *source/lang/msgit.c + *source/lang/msgko.c + *source/lang/msgpt.c + *source/lang/msgro.c + *source/lang/msgsr852.c + *source/lang/msgsriso.c + * added internal error message: "Memory buffer overflow" + + *source/lang/msgpl852.c + *source/lang/msgpliso.c + *source/lang/msgplmaz.c + *updated to work with current Lang API + + *source/vm/fm.c + * memory blocks are marked with a signature at the end of buffer + to check if memory was overwritten + + *source/rtl/transfrm.c + * fixed bug when "@(BX" picture was used (it caused that some + bytes were copied after the allocated buffer) + 2000-07-27 00:15 GMT -3 Luiz Rafael Culik *source/lang/msgit.c *Renamed TPL to IT diff --git a/harbour/include/error.ch b/harbour/include/error.ch index 46d3c0b692..dac9103d05 100644 --- a/harbour/include/error.ch +++ b/harbour/include/error.ch @@ -113,6 +113,7 @@ #define HB_EI_STACKUFLOW 9019 /* "Stack underflow" */ #define HB_EI_ITEMBADCOPY 9020 /* "An item was going to be copied to itself from %s" */ #define HB_EI_MVBADSYMBOL 9021 /* "Invalid symbol item passed as memvar %s" */ +#define HB_EI_XMEMOVERFLOW 9022 /* "Memory buffer overflow" */ #endif /* _ERROR_CH */ diff --git a/harbour/include/hbapilng.h b/harbour/include/hbapilng.h index 355706ef23..7c0270893c 100644 --- a/harbour/include/hbapilng.h +++ b/harbour/include/hbapilng.h @@ -51,8 +51,8 @@ extern "C" { #define HB_LANG_ITEM_BASE_NATMSG 25 #define HB_LANG_ITEM_BASE_ERRDESC 38 #define HB_LANG_ITEM_BASE_ERRINTR 89 -#define HB_LANG_ITEM_BASE_TEXT 111 -#define HB_LANG_ITEM_MAX_ 114 +#define HB_LANG_ITEM_BASE_TEXT 112 +#define HB_LANG_ITEM_MAX_ 115 /* This hack is needed to force preprocessing if id is also a macro */ #define HB_LANG_REQUEST( id ) HB_LANG_REQUEST_( id ) diff --git a/harbour/source/lang/msg_tpl.c b/harbour/source/lang/msg_tpl.c index ac7f690d94..2e410c779a 100644 --- a/harbour/source/lang/msg_tpl.c +++ b/harbour/source/lang/msg_tpl.c @@ -170,6 +170,7 @@ static HB_LANG s_lang = "Stack underflow", "An item was going to be copied to itself from %s", "Invalid symbol item passed as memvar %s", + "Memory buffer overflow", /* Texts */ diff --git a/harbour/source/lang/msgca.c b/harbour/source/lang/msgca.c index bce787fd54..cd483022e4 100644 --- a/harbour/source/lang/msgca.c +++ b/harbour/source/lang/msgca.c @@ -170,6 +170,7 @@ static HB_LANG s_lang = "Stack underflow", "An item was going to be copied to itself from %s", "Invalid symbol item passed as memvar %s", + "Memory buffer overflow", /* Texts */ diff --git a/harbour/source/lang/msgcs852.c b/harbour/source/lang/msgcs852.c index ecfbd90cee..61157870ff 100644 --- a/harbour/source/lang/msgcs852.c +++ b/harbour/source/lang/msgcs852.c @@ -171,6 +171,7 @@ static HB_LANG s_lang = "Stack underflow", "An item was going to be copied to itself from %s", "Invalid symbol item passed as memvar %s", + "Memory buffer overflow", /* Texts */ diff --git a/harbour/source/lang/msgcsiso.c b/harbour/source/lang/msgcsiso.c index f011233e79..4206ef4646 100644 --- a/harbour/source/lang/msgcsiso.c +++ b/harbour/source/lang/msgcsiso.c @@ -171,6 +171,7 @@ static HB_LANG s_lang = "Stack underflow", "An item was going to be copied to itself from %s", "Invalid symbol item passed as memvar %s", + "Memory buffer overflow", /* Texts */ diff --git a/harbour/source/lang/msgcskam.c b/harbour/source/lang/msgcskam.c index 430f677fca..e15b5647ea 100644 --- a/harbour/source/lang/msgcskam.c +++ b/harbour/source/lang/msgcskam.c @@ -171,6 +171,7 @@ static HB_LANG s_lang = "Stack underflow", "An item was going to be copied to itself from %s", "Invalid symbol item passed as memvar %s", + "Memory buffer overflow", /* Texts */ diff --git a/harbour/source/lang/msgcswin.c b/harbour/source/lang/msgcswin.c index baee7876d9..97de59581e 100644 --- a/harbour/source/lang/msgcswin.c +++ b/harbour/source/lang/msgcswin.c @@ -172,6 +172,7 @@ static HB_LANG s_lang = "Stack underflow", "An item was going to be copied to itself from %s", "Invalid symbol item passed as memvar %s", + "Memory buffer overflow", /* Texts */ diff --git a/harbour/source/lang/msgde.c b/harbour/source/lang/msgde.c index f81126402a..883b7c45fa 100644 --- a/harbour/source/lang/msgde.c +++ b/harbour/source/lang/msgde.c @@ -170,6 +170,7 @@ static HB_LANG s_lang = "Stack underflow", "An item was going to be copied to itself from %s", "Invalid symbol item passed as memvar %s", + "Memory buffer overflow", /* Texts */ diff --git a/harbour/source/lang/msgen.c b/harbour/source/lang/msgen.c index 2821abc8cf..4c49abff13 100644 --- a/harbour/source/lang/msgen.c +++ b/harbour/source/lang/msgen.c @@ -170,6 +170,7 @@ static HB_LANG s_lang = "Stack underflow", "An item was going to be copied to itself from %s", "Invalid symbol item passed as memvar %s", + "Memory buffer overflow", /* Texts */ diff --git a/harbour/source/lang/msges.c b/harbour/source/lang/msges.c index d6d054e6aa..7f54658b7f 100644 --- a/harbour/source/lang/msges.c +++ b/harbour/source/lang/msges.c @@ -170,6 +170,7 @@ static HB_LANG s_lang = "Desbordamiento negativo en la Pila", "Un item estaba siendo copiado sobre s mismo desde %s", "Smbolo item no vlido pasado como memvar %s", + "Memory buffer overflow", /* Texts */ diff --git a/harbour/source/lang/msgeu.c b/harbour/source/lang/msgeu.c index 66dbc05fc7..87654c9582 100644 --- a/harbour/source/lang/msgeu.c +++ b/harbour/source/lang/msgeu.c @@ -170,6 +170,7 @@ static HB_LANG s_lang = "Stack underflow", "An item was going to be copied to itself from %s", "Invalid symbol item passed as memvar %s", + "Memory buffer overflow", /* Texts */ diff --git a/harbour/source/lang/msgfr.c b/harbour/source/lang/msgfr.c index afeb66cad2..58a0aed918 100644 --- a/harbour/source/lang/msgfr.c +++ b/harbour/source/lang/msgfr.c @@ -170,6 +170,7 @@ static HB_LANG s_lang = "Stack underflow", "An item was going to be copied to itself from %s", "Invalid symbol item passed as memvar %s", + "Memory buffer overflow", /* Texts */ diff --git a/harbour/source/lang/msggl.c b/harbour/source/lang/msggl.c index ea702c1393..02cdbd5d6b 100644 --- a/harbour/source/lang/msggl.c +++ b/harbour/source/lang/msggl.c @@ -170,6 +170,7 @@ static HB_LANG s_lang = "Stack underflow", "An item was going to be copied to itself from %s", "Invalid symbol item passed as memvar %s", + "Memory buffer overflow", /* Texts */ diff --git a/harbour/source/lang/msghe862.c b/harbour/source/lang/msghe862.c index 50cdb833cd..3de9d283c8 100644 --- a/harbour/source/lang/msghe862.c +++ b/harbour/source/lang/msghe862.c @@ -170,6 +170,7 @@ static HB_LANG s_lang = "Stack underflow", "An item was going to be copied to itself from %s", "Invalid symbol item passed as memvar %s", + "Memory buffer overflow", /* Texts */ diff --git a/harbour/source/lang/msghewin.c b/harbour/source/lang/msghewin.c index 08962d327b..88ba650d8f 100644 --- a/harbour/source/lang/msghewin.c +++ b/harbour/source/lang/msghewin.c @@ -170,6 +170,7 @@ static HB_LANG s_lang = "Stack underflow", "An item was going to be copied to itself from %s", "Invalid symbol item passed as memvar %s", + "Memory buffer overflow", /* Texts */ diff --git a/harbour/source/lang/msghr852.c b/harbour/source/lang/msghr852.c index c9b58bc262..2ce882c0a6 100644 --- a/harbour/source/lang/msghr852.c +++ b/harbour/source/lang/msghr852.c @@ -171,6 +171,7 @@ static HB_LANG s_lang = "Stack underflow", "An item was going to be copied to itself from %s", "Invalid symbol item passed as memvar %s", + "Memory buffer overflow", /* Texts */ diff --git a/harbour/source/lang/msghriso.c b/harbour/source/lang/msghriso.c index 600629b90a..88504c0087 100644 --- a/harbour/source/lang/msghriso.c +++ b/harbour/source/lang/msghriso.c @@ -171,6 +171,7 @@ static HB_LANG s_lang = "Stack underflow", "An item was going to be copied to itself from %s", "Invalid symbol item passed as memvar %s", + "Memory buffer overflow", /* Texts */ diff --git a/harbour/source/lang/msghu852.c b/harbour/source/lang/msghu852.c index b98363b059..c654de46ad 100644 --- a/harbour/source/lang/msghu852.c +++ b/harbour/source/lang/msghu852.c @@ -170,6 +170,7 @@ static HB_LANG s_lang = "Stack underflow", "An item was going to be copied to itself from %s", "Invalid symbol item passed as memvar %s", + "Memory buffer overflow", /* Texts */ diff --git a/harbour/source/lang/msghucwi.c b/harbour/source/lang/msghucwi.c index 1528ead1ec..6c25bbe997 100644 --- a/harbour/source/lang/msghucwi.c +++ b/harbour/source/lang/msghucwi.c @@ -170,6 +170,7 @@ static HB_LANG s_lang = "Stack underflow", "An item was going to be copied to itself from %s", "Invalid symbol item passed as memvar %s", + "Memory buffer overflow", /* Texts */ diff --git a/harbour/source/lang/msghuwin.c b/harbour/source/lang/msghuwin.c index 7b8b24605a..907fdb67a1 100644 --- a/harbour/source/lang/msghuwin.c +++ b/harbour/source/lang/msghuwin.c @@ -170,6 +170,7 @@ static HB_LANG s_lang = "Stack underflow", "An item was going to be copied to itself from %s", "Invalid symbol item passed as memvar %s", + "Memory buffer overflow", /* Texts */ diff --git a/harbour/source/lang/msgis850.c b/harbour/source/lang/msgis850.c index b0848f1e63..fef3dc7793 100644 --- a/harbour/source/lang/msgis850.c +++ b/harbour/source/lang/msgis850.c @@ -171,6 +171,7 @@ static HB_LANG s_lang = "Stack underflow", "An item was going to be copied to itself from %s", "Invalid symbol item passed as memvar %s", + "Memory buffer overflow", /* Texts */ diff --git a/harbour/source/lang/msgit.c b/harbour/source/lang/msgit.c index e22070ba3a..811c38f2aa 100644 --- a/harbour/source/lang/msgit.c +++ b/harbour/source/lang/msgit.c @@ -170,6 +170,7 @@ static HB_LANG s_lang = "Stack underflow", "An item was going to be copied to itself from %s", "Invalid symbol item passed as memvar %s", + "Memory buffer overflow", /* Texts */ diff --git a/harbour/source/lang/msgko.c b/harbour/source/lang/msgko.c index 10b1af1970..78ce78f082 100644 --- a/harbour/source/lang/msgko.c +++ b/harbour/source/lang/msgko.c @@ -170,6 +170,7 @@ static HB_LANG s_lang = "Stack underflow", "An item was going to be copied to itself from %s", "Invalid symbol item passed as memvar %s", + "Memory buffer overflow", /* Texts */ diff --git a/harbour/source/lang/msgpl852.c b/harbour/source/lang/msgpl852.c index d62aa7d5ad..c8b3c71dfe 100644 --- a/harbour/source/lang/msgpl852.c +++ b/harbour/source/lang/msgpl852.c @@ -2,91 +2,190 @@ * $Id$ */ -/* Language Support Module - Polskojzyczny modu dla Harbour */ +/* + * Harbour Project source code: + * Language Support Module (PL CP-852) + * + * Copyright 1999 {list of individual authors and e-mail addresses} + * 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 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: Polish */ /* ISO language code (2 chars): PL */ -/* Codepage: Latin II - 852 */ +/* Codepage: 852 */ -#include "hbdefs.h" +#include "hbapilng.h" -char *hb_dateMonthsName[ 12 ] = +static HB_LANG s_lang = { - "Stycze", - "Luty", - "Marzec", - "Kwiecie", - "Maj", - "Czerwiec", - "Lipiec", - "Sierpie", - "Wrzesie", - "Padziernik", - "Listopad", - "Grudzie" + { + /* Identification */ + + "PL852", /* ID */ + "Polish", /* Name (in English) */ + "Polski", /* Name (in native language) */ + "PL", /* RFC ID */ + "852", /* Codepage */ + "$Revision$ $Date$", /* Version */ + + /* Month names */ + + "Stycze", + "Luty", + "Marzec", + "Kwiecie", + "Maj", + "Czerwiec", + "Lipiec", + "Sierpie", + "Wrzesie", + "Padziernik", + "Listopad", + "Grudzie", + + /* Day names */ + + "Niedziela", + "Poniedziaek", + "Wtorek", + "roda", + "Czwartek", + "Pitek", + "Sobota", + + /* CA-Cl*pper compatible natmsg items */ + + "Baza danych #Rekordw Uaktualniona Rozmiar", + "Wicej przykadw?", + "Strona", + "** Subtotal **", + "* Subsubtotal *", + "*** Total ***", + "Wst", /* wstaw */ + "Zas", /* zastap */ + "Nieprawidowa data", + "Zakres:", + " - ", + "T/N", + "Bdne wyraenie", + + /* Error description names */ + + "Bd bez opisu", + "Nieprawidowy argument", + "Bd zakresu tablicy", + "Za duy string", + "Przepenienie numeryczne", + "Dzielenie przez zero", + "Bd numeryczny", + "Nieprawidowa skadnia", + "Operacja zbyt zoona", + "", + "", + "Za mao pamici", + "Niezdefiniowana funkcja", + "Metoda jest niedostpna", + "Zmienna nie istnieje", + "Alias bazy nie istnieje", + "Zmienna jest niedostpna", + "Nieprawidowy alias bazy", + "Podany alias ju istnieje", + "", + "Bd podczas tworzenia zbioru", + "Bd podczas otwarcia zbioru", + "Bd podczas zamknicia zbioru", + "Bd podczas odczytu ze zbioru", + "Bd podczas zapisu do zbioru", + "Bd wydruku", + "", + "", + "", + "", + "Nieprawidowa operacja", + "Przekroczony limit", + "Uszkodzony indeks bazy", + "Niezgodny typ danych", + "Warto poza zakresem", + "Baza nie jest otwarta", + "Baza nie ma indeksu", + "Wymagany jest wyczny dostp do bazy", + "Wymagana blokada dostpu", + "Zapis niedozwolony", + "Brak blokady dostpu podczas dodawania rekordu", + "Nie udao si zablokowa dostpu", + "", + "", + "", + "", + "Nieprawidowa liczba argumentw", + "pobranie elementu tablicy", + "zmiana wartoci elementu tablicy", + "wymagana jest tablica", + "wymagany typ: logiczny", + + /* Internal error names */ + + "Nienaprawialny bd nr %lu: ", + "Nieudana prba naprawy bdu", + "Brak kodu obsugi ERRORBLOCK()", + "Zbyt wiele zagniedonych bdw", + "Niezaadowany lub zy RDD", + "Zy typ metody woanej z %s", + "hb_xgrab nie moe zarezerwowa pamici", + "hb_xrealloc wywoany ze wskanikiem NULL", + "hb_xrealloc wywoany ze zym wskanikiem", + "hb_xrealloc nie moe powikszy bloku pamici", + "hb_xfree wywoany ze zym wskanikiem", + "hb_xfree wywoany ze wskanikiem NULL", + "Brak definicji procedury startowej: \'%s\'", + "Brak procedury startowej", + "Nieprawidowa warto VM opcode", + "W %s wymagany jest item typu \'Symbol\'", + "W %s podano zy item dla SELF", + "W %s oczekiwany jest item typu \'Codeblock\'", + "Funkcja %s wymaga innego typu na stosie", + "Stos poniej dna", + "Item nie moe by skopiowany w %s", + "W %s podano zy item jako memvar", + "Zapis poza przydzielonym obszarem", + + /* Texts */ + + "YYYY.MM.DD", + "T", + "N" + } }; -char *hb_dateDaysName[ 7 ] = -{ - "Niedziela", - "Poniedziaek", - "Wtorek", - "roda", - "Czwartek", - "Pitek", - "Sobota" -}; +HB_LANG_ANNOUNCE( PL852 ); + +HB_CALL_ON_STARTUP_BEGIN( hb_lang_Init_PL852 ) + hb_langRegister( &s_lang ); +HB_CALL_ON_STARTUP_END( hb_lang_Init_PL852 ) +#if ! defined(__GNUC__) && ! defined(_MSC_VER) + #pragma startup hb_lang_Init_PL852 +#endif -char *hb_errorsGeneric[] = -{ - "Bd bez opisu", - "Nieprawidowy argument", - "Bd zakresu tablicy", - "Za duy string", - "Przepenienie numeryczne", - "Dzielenie przez zero", - "Bd numeryczny", - "Nieprawidowa skadnia", - "Operacja zbyt zoona", - "", - "", - "Za mao pamici", - "Niezdefiniowana funkcja", - "Metoda jest niedostpna", - "Zmienna nie istnieje", - "Alias bazy nie istnieje", - "Zmienna jest niedostpna", - "Nieprawidowy alias bazy", - "Podany alias ju istnieje", - "", - "Bd podczas tworzenia zbioru", - "Bd podczas otwarcia zbioru", - "Bd podczas zamknicia zbioru", - "Bd podczas odczytu ze zbioru", - "Bd podczas zapisu do zbioru", - "Bd wydruku", - "", - "", - "", - "", - "Nieprawidowa operacja", - "Przekroczony limit", - "Uszkodzony indeks bazy", - "Niezgodny typ danych", - "Warto poza zakresem", - "Baza jest nie otwarta", - "Baza nie ma indeksu", - "Wymagany jest wyczny dostp do bazy", - "Wymagana blokada dostpu", - "Zapis niedozwolony", - "Brak blokady dostpu podczas dodawania rekordu", - "Nie udao si zablokowa dostpu", - "", - "", - "", - "Nieprwidowa liczba argumentw", - "pobranie elementu tablicy", - "zmiana wartoci elementu tablicy", - "wymagana jest tablica", - "wymagany typ: logiczny" -}; diff --git a/harbour/source/lang/msgpliso.c b/harbour/source/lang/msgpliso.c index 24df1ff0f4..1443190e39 100644 --- a/harbour/source/lang/msgpliso.c +++ b/harbour/source/lang/msgpliso.c @@ -2,91 +2,190 @@ * $Id$ */ -/* Language Support Module - Polskojzyczny modu dla Harbour */ +/* + * Harbour Project source code: + * Language Support Module (PL ISO-8859-2) + * + * Copyright 1999 {list of individual authors and e-mail addresses} + * 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 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: Polish */ /* ISO language code (2 chars): PL */ /* Codepage: ISO-8859-2 */ -#include "hbdefs.h" +#include "hbapilng.h" -char *hb_dateMonthsName[ 12 ] = +static HB_LANG s_lang = { - "Stycze", - "Luty", - "Marzec", - "Kwiecie", - "Maj", - "Czerwiec", - "Lipiec", - "Sierpie", - "Wrzesie", - "Padziernik", - "Listopad", - "Grudzie" + { + /* Identification */ + + "PLISO", /* ID */ + "Polish", /* Name (in English) */ + "Polski", /* Name (in native language) */ + "PL", /* RFC ID */ + "ISO-8859-2", /* Codepage */ + "$Revision$ $Date$", /* Version */ + + /* Month names */ + + "Stycze", + "Luty", + "Marzec", + "Kwiecie", + "Maj", + "Czerwiec", + "Lipiec", + "Sierpie", + "Wrzesie", + "Padziernik", + "Listopad", + "Grudzie", + + /* Day names */ + + "Niedziela", + "Poniedziaek", + "Wtorek", + "roda", + "Czwartek", + "Pitek", + "Sobota", + + /* CA-Cl*pper compatible natmsg items */ + + "Baza danych #Rekordw Uaktualniona Rozmiar", + "Wicej przykadw?", + "Strona", + "** Subtotal **", + "* Subsubtotal *", + "*** Total ***", + "Wst", /* wstaw */ + "Zas", /* zastap */ + "Nieprawidowa data", + "Zakres:", + " - ", + "T/N", + "Bdne wyraenie", + + /* Error description names */ + + "Bd bez opisu", + "Nieprawidowy argument", + "Bd zakresu tablicy", + "Za duy string", + "Przepenienie numeryczne", + "Dzielenie przez zero", + "Bd numeryczny", + "Nieprawidowa skadnia", + "Operacja zbyt zoona", + "", + "", + "Za mao pamici", + "Niezdefiniowana funkcja", + "Metoda jest niedostpna", + "Zmienna nie istnieje", + "Alias bazy nie istnieje", + "Zmienna jest niedostpna", + "Nieprawidowy alias bazy", + "Podany alias ju istnieje", + "", + "Bd podczas tworzenia zbioru", + "Bd podczas otwarcia zbioru", + "Bd podczas zamknicia zbioru", + "Bd podczas odczytu ze zbioru", + "Bd podczas zapisu do zbioru", + "Bd wydruku", + "", + "", + "", + "", + "Nieprawidowa operacja", + "Przekroczony limit", + "Uszkodzony indeks bazy", + "Niezgodny typ danych", + "Warto poza zakresem", + "Baza jest nie otwarta", + "Baza nie ma indeksu", + "Wymagany jest wyczny dostp do bazy", + "Wymagana blokada dostpu", + "Zapis niedozwolony", + "Brak blokady dostpu podczas dodawania rekordu", + "Nie udao si zablokowa dostpu", + "", + "", + "", + "", + "Nieprawidowa liczba argumentw", + "pobranie elementu tablicy", + "zmiana wartoci elementu tablicy", + "wymagana jest tablica", + "wymagany typ: logiczny", + + /* Internal error names */ + + "Nienaprawialny bd nr %lu: ", + "Nieudana prba naprawy bdu", + "Brak kodu obsugi ERRORBLOCK()", + "Zbyt wiele zagniedonych bdw", + "Niezaadowany lub zy RDD", + "Zy typ metody woanej z %s", + "hb_xgrab nie moe zarezerwowa pamici", + "hb_xrealloc wywoany ze wskanikiem NULL", + "hb_xrealloc wywoany ze zym wskanikiem", + "hb_xrealloc nie moe powiekszy bloku pamici", + "hb_xfree wywoany ze zym wskanikiem", + "hb_xfree wywoany ze wskanikiem NULL", + "Brak definicja procedury startowej: \'%s\'", + "Brak procedury startowej", + "Nieprawidowa warto VM opcode", + "W %s wymagany jest item typu \'Symbol\'", + "W %s podano zy item dla SELF", + "W %s oczekiwany jest item typu \'Codeblock\'", + "Funkcja %s wymaga innego typu na stosie", + "Stos poniej dna", + "Item nie moe by skopiowany w %s", + "W %s podano zy item jako memvar", + "Zapis poza przydzielonym obszarem", + + /* Texts */ + + "YYYY.MM.DD", + "T", + "N" + } }; -char *hb_dateDaysName[ 7 ] = -{ - "Niedziela", - "Poniedziaek", - "Wtorek", - "roda", - "Czwartek", - "Pitek", - "Sobota" -}; +HB_LANG_ANNOUNCE( PLISO ); + +HB_CALL_ON_STARTUP_BEGIN( hb_lang_Init_PLISO ) + hb_langRegister( &s_lang ); +HB_CALL_ON_STARTUP_END( hb_lang_Init_PLISO ) +#if ! defined(__GNUC__) && ! defined(_MSC_VER) + #pragma startup hb_lang_Init_PLISO +#endif -char *hb_errorsGeneric[] = -{ - "Bd bez opisu", - "Nieprawidowy argument", - "Bd zakresu tablicy", - "Za duy string", - "Przepenienie numeryczne", - "Dzielenie przez zero", - "Bd numeryczny", - "Nieprawidowa skadnia", - "Operacja zbyt zoona", - "", - "", - "Za mao pamici", - "Niezdefiniowana funkcja", - "Metoda jest niedostpna", - "Zmienna nie istnieje", - "Alias bazy nie istnieje", - "Zmienna jest niedostpna", - "Nieprawidowy alias bazy", - "Podany alias ju istnieje", - "", - "Bd podczas tworzenia zbioru", - "Bd podczas otwarcia zbioru", - "Bd podczas zamknicia zbioru", - "Bd podczas odczytu ze zbioru", - "Bd podczas zapisu do zbioru", - "Bd wydruku", - "", - "", - "", - "", - "Nieprawidowa operacja", - "Przekroczony limit", - "Uszkodzony indeks bazy", - "Niezgodny typ danych", - "Warto poza zakresem", - "Baza jest nie otwarta", - "Baza nie ma indeksu", - "Wymagany jest wyczny dostp do bazy", - "Wymagana blokada dostpu", - "Zapis niedozwolony", - "Brak blokady dostpu podczas dodawania rekordu", - "Nie udao si zablokowa dostpu", - "", - "", - "", - "Nieprwidowa liczba argumentw", - "pobranie elementu tablicy", - "zmiana wartoci elementu tablicy", - "wymagana jest tablica", - "wymagany typ: logiczny" -}; diff --git a/harbour/source/lang/msgplmaz.c b/harbour/source/lang/msgplmaz.c index 702319d911..afb0242519 100644 --- a/harbour/source/lang/msgplmaz.c +++ b/harbour/source/lang/msgplmaz.c @@ -2,91 +2,190 @@ * $Id$ */ -/* Language Support Module - Polskojzyczny modu dla Harbour */ +/* + * Harbour Project source code: + * Language Support Module (PL Mazowia) + * + * Copyright 1999 {list of individual authors and e-mail addresses} + * 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 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: Polish */ /* ISO language code (2 chars): PL */ /* Codepage: Mazowia */ -#include "hbdefs.h" +#include "hbapilng.h" -char *hb_dateMonthsName[ 12 ] = +static HB_LANG s_lang = { - "Stycze", - "Luty", - "Marzec", - "Kwiecie", - "Maj", - "Czerwiec", - "Lipiec", - "Sierpie", - "Wrzesie", - "Padziernik", - "Listopad", - "Grudzie" + { + /* Identification */ + + "PLMAZ", /* ID */ + "Polish", /* Name (in English) */ + "Polski", /* Name (in native language) */ + "PL", /* RFC ID */ + "Mazowia", /* Codepage */ + "$Revision$ $Date$", /* Version */ + + /* Month names */ + + "Stycze", + "Luty", + "Marzec", + "Kwiecie", + "Maj", + "Czerwiec", + "Lipiec", + "Sierpie", + "Wrzesie", + "Padziernik", + "Listopad", + "Grudzie", + + /* Day names */ + + "Niedziela", + "Poniedziaek", + "Wtorek", + "roda", + "Czwartek", + "Pitek", + "Sobota", + + /* CA-Cl*pper compatible natmsg items */ + + "Baza danych #Rekordw Uaktualniona Rozmiar", + "Wicej przykadw?", + "Strona", + "** Subtotal **", + "* Subsubtotal *", + "*** Total ***", + "Wst", /* wstaw */ + "Zas", /* zastap */ + "Nieprawidowa data", + "Zakres:", + " - ", + "T/N", + "Bdne wyraenie", + + /* Error description names */ + + "Bd bez opisu", + "Nieprawidowy argument", + "Bd zakresu tablicy", + "Za duy string", + "Przepenienie numeryczne", + "Dzielenie przez zero", + "Bd numeryczny", + "Nieprawidowa skadnia", + "Operacja zbyt zoona", + "", + "", + "Za mao pamici", + "Niezdefiniowana funkcja", + "Metoda jest niedostpna", + "Zmienna nie istnieje", + "Alias bazy nie istnieje", + "Zmienna jest niedostpna", + "Nieprawidowy alias bazy", + "Podany alias ju istnieje", + "", + "Bd podczas tworzenia zbioru", + "Bd podczas otwarcia zbioru", + "Bd podczas zamknicia zbioru", + "Bd podczas odczytu ze zbioru", + "Bd podczas zapisu do zbioru", + "Bd wydruku", + "", + "", + "", + "", + "Nieprawidowa operacja", + "Przekroczony limit", + "Uszkodzony indeks bazy", + "Niezgodny typ danych", + "Warto poza zakresem", + "Baza jest nie otwarta", + "Baza nie ma indeksu", + "Wymagany jest wyczny dostp do bazy", + "Wymagana blokada dostpu", + "Zapis niedozwolony", + "Brak blokady dostpu podczas dodawania rekordu", + "Nie udao si zablokowa dostpu", + "", + "", + "", + "", + "Nieprawidowa liczba argumentw", + "pobranie elementu tablicy", + "zmiana wartoci elementu tablicy", + "wymagana jest tablica", + "wymagany typ: logiczny", + + /* Internal error names */ + + "Nienaprawialny bd nr %lu: ", + "Nieudana prba naprawy bdu", + "Brak kodu obsugi ERRORBLOCK()", + "Zbyt wiele zagniedonych bdw", + "Niezaadowany lub zy RDD", + "Zy typ metody woanej z %s", + "hb_xgrab nie moe zarezerwowa pamici", + "hb_xrealloc wywoany ze wskanikiem NULL", + "hb_xrealloc wywoany ze zym wskanikiem", + "hb_xrealloc nie moe powikszy bloku pamici", + "hb_xfree wywoany ze zym wskanikiem", + "hb_xfree wywoany ze wskanikiem NULL", + "Brak definicji procedury startowej: \'%s\'", + "Brak procedury startowej", + "Nieprawidowa warto VM opcode", + "W %s wymagany jest item typu \'Symbol\'", + "W %s podano zy item dla SELF", + "W %s oczekiwany jest item typu \'Codeblock\'", + "Funkcja %s wymaga innego typu na stosie", + "Stos poniej dna", + "Item nie moe by skopiowany w %s", + "W %s podano zy item jako memvar", + "Zapis poza przydzielonym obszarem", + + /* Texts */ + + "YYYY.MM.DD", + "T", + "N" + } }; -char *hb_dateDaysName[ 7 ] = -{ - "Niedziela", - "Poniedziaek", - "Wtorek", - "roda", - "Czwartek", - "Pitek", - "Sobota" -}; +HB_LANG_ANNOUNCE( PLMAZ ); + +HB_CALL_ON_STARTUP_BEGIN( hb_lang_Init_PLMAZ ) + hb_langRegister( &s_lang ); +HB_CALL_ON_STARTUP_END( hb_lang_Init_PLMAZ ) +#if ! defined(__GNUC__) && ! defined(_MSC_VER) + #pragma startup hb_lang_Init_PLMAZ +#endif -char *hb_errorsGeneric[] = -{ - "Bd bez opisu", - "Nieprawidowy argument", - "Bd zakresu tablicy", - "Za duy string", - "Przepenienie numeryczne", - "Dzielenie przez zero", - "Bd numeryczny", - "Nieprawidowa skadnia", - "Operacja zbyt zoona", - "", - "", - "Za mao pamici", - "Niezdefiniowana funkcja", - "Metoda jest niedostpna", - "Zmienna nie istnieje", - "Alias bazy nie istnieje", - "Zmienna jest niedostpna", - "Nieprawidowy alias bazy", - "Podany alias ju istnieje", - "", - "Bd podczas tworzenia zbioru", - "Bd podczas otwarcia zbioru", - "Bd podczas zamknicia zbioru", - "Bd podczas odczytu ze zbioru", - "Bd podczas zapisu do zbioru", - "Bd wydruku", - "", - "", - "", - "", - "Nieprawidowa operacja", - "Przekroczony limit", - "Uszkodzony indeks bazy", - "Niezgodny typ danych", - "Warto poza zakresem", - "Baza jest nie otwarta", - "Baza nie ma indeksu", - "Wymagany jest wyczny dostp do bazy", - "Wymagana blokada dostpu", - "Zapis niedozwolony", - "Brak blokady dostpu podczas dodawania rekordu", - "Nie udao si zablokowa dostpu", - "", - "", - "", - "Nieprwidowa liczba argumentw", - "pobranie elementu tablicy", - "zmiana wartoci elementu tablicy", - "wymagana jest tablica", - "wymagany typ: logiczny" -}; diff --git a/harbour/source/lang/msgpt.c b/harbour/source/lang/msgpt.c index 00fcbacd2d..75561e00aa 100644 --- a/harbour/source/lang/msgpt.c +++ b/harbour/source/lang/msgpt.c @@ -182,6 +182,7 @@ static HB_LANG s_lang = "Stack underflow", "Um item iria ser copiado para ele mesmo em %s", "Symbol item invlido passado como memvar %s", + "Memory buffer overflow", /* Texts */ diff --git a/harbour/source/lang/msgro.c b/harbour/source/lang/msgro.c index 49286d80a7..f1d672f7e3 100644 --- a/harbour/source/lang/msgro.c +++ b/harbour/source/lang/msgro.c @@ -170,6 +170,7 @@ static HB_LANG s_lang = "Stack underflow", "An item was going to be copied to itself from %s", "Invalid symbol item passed as memvar %s", + "Memory buffer overflow", /* Texts */ diff --git a/harbour/source/lang/msgsr852.c b/harbour/source/lang/msgsr852.c index d6c249a3a9..b9f8bf95b7 100644 --- a/harbour/source/lang/msgsr852.c +++ b/harbour/source/lang/msgsr852.c @@ -170,6 +170,7 @@ static HB_LANG s_lang = "Stack underflow", "An item was going to be copied to itself from %s", "Invalid symbol item passed as memvar %s", + "Memory buffer overflow", /* Texts */ diff --git a/harbour/source/lang/msgsriso.c b/harbour/source/lang/msgsriso.c index 3ab7dc330b..68dee61cee 100644 --- a/harbour/source/lang/msgsriso.c +++ b/harbour/source/lang/msgsriso.c @@ -170,6 +170,7 @@ static HB_LANG s_lang = "Stack underflow", "An item was going to be copied to itself from %s", "Invalid symbol item passed as memvar %s", + "Memory buffer overflow", /* Texts */ diff --git a/harbour/source/rtl/transfrm.c b/harbour/source/rtl/transfrm.c index f1edc6711c..25e0bb1012 100644 --- a/harbour/source/rtl/transfrm.c +++ b/harbour/source/rtl/transfrm.c @@ -308,8 +308,9 @@ HB_FUNC( TRANSFORM ) BOOL bFound = FALSE; hb_itemGetNLen( pValue, &iOrigWidth, &iOrigDec ); - - szResult = ( char * ) hb_xgrab( ulPicLen + 4 ); /* Grab enough */ + + /* TODO: maybe replace this 16 with something else */ + szResult = ( char * ) hb_xgrab( ulPicLen + 16 ); /* Grab enough */ *szResult = '\0'; for( i = 0; i < ulPicLen && !bFound; i++ ) /* Count number in front */ diff --git a/harbour/source/vm/fm.c b/harbour/source/vm/fm.c index ac237a3911..64e7e2d433 100644 --- a/harbour/source/vm/fm.c +++ b/harbour/source/vm/fm.c @@ -104,7 +104,7 @@ void * hb_xalloc( ULONG ulSize ) /* allocates fixed memory, returns NULL */ HB_TRACE_STEALTH(HB_TR_DEBUG, ("hb_xalloc(%lu)", ulSize)); - pMem = malloc( ulSize + sizeof( HB_MEMINFO ) ); + pMem = malloc( ulSize + sizeof( HB_MEMINFO ) + sizeof( ULONG ) ); if( ! pMem ) return pMem; @@ -123,6 +123,10 @@ void * hb_xalloc( ULONG ulSize ) /* allocates fixed memory, returns NULL ( ( PHB_MEMINFO ) pMem )->pNextBlock = NULL; ( ( PHB_MEMINFO ) pMem )->ulSignature = HB_MEMINFO_SIGNATURE; + { + ULONG *pSig = (ULONG *)( ( ( unsigned char * ) pMem ) + ulSize + sizeof(HB_MEMINFO) ); + *pSig = HB_MEMINFO_SIGNATURE; + } ( ( PHB_MEMINFO ) pMem )->ulSize = ulSize; /* size of the memory block */ if( hb_tr_level() >= HB_TR_DEBUG ) @@ -179,7 +183,7 @@ void * hb_xgrab( ULONG ulSize ) /* allocates fixed memory, exits on fail #ifdef HB_FM_STATISTICS - pMem = malloc( ulSize + sizeof( HB_MEMINFO ) ); + pMem = malloc( ulSize + sizeof( HB_MEMINFO ) + sizeof( ULONG ) ); if( ! pMem ) hb_errInternal( HB_EI_XGRABALLOC, NULL, NULL, NULL ); @@ -198,6 +202,10 @@ void * hb_xgrab( ULONG ulSize ) /* allocates fixed memory, exits on fail ( ( PHB_MEMINFO ) pMem )->pNextBlock = NULL; ( ( PHB_MEMINFO ) pMem )->ulSignature = HB_MEMINFO_SIGNATURE; + { + ULONG *pSig = (ULONG *)( ( ( unsigned char * ) pMem ) + ulSize + sizeof(HB_MEMINFO) ); + *pSig = HB_MEMINFO_SIGNATURE; + } ( ( PHB_MEMINFO ) pMem )->ulSize = ulSize; /* size of the memory block */ if( hb_tr_level() >= HB_TR_DEBUG ) @@ -252,6 +260,7 @@ void * hb_xrealloc( void * pMem, ULONG ulSize ) /* reallocates memory */ PHB_MEMINFO pMemBlock; ULONG ulMemSize; + ULONG *pSig; HB_TRACE_STEALTH(HB_TR_DEBUG, ("hb_xrealloc(%p, %lu)", pMem, ulSize)); @@ -265,7 +274,11 @@ void * hb_xrealloc( void * pMem, ULONG ulSize ) /* reallocates memory */ ulMemSize = pMemBlock->ulSize; - pMem = realloc( pMemBlock, ulSize + sizeof( HB_MEMINFO ) ); + pSig = (ULONG *)( ( ( unsigned char * ) pMem ) + ulMemSize ); + if( *pSig != HB_MEMINFO_SIGNATURE ) + hb_errInternal( HB_EI_XMEMOVERFLOW, NULL, NULL, NULL ); + + pMem = realloc( pMemBlock, ulSize + sizeof( HB_MEMINFO ) + sizeof( ULONG ) ); s_lMemoryConsumed += ( ulSize - ulMemSize ); if( s_lMemoryMaxConsumed < s_lMemoryConsumed ) @@ -275,6 +288,10 @@ void * hb_xrealloc( void * pMem, ULONG ulSize ) /* reallocates memory */ hb_errInternal( HB_EI_XREALLOC, NULL, NULL, NULL ); ( ( PHB_MEMINFO ) pMem )->ulSize = ulSize; /* size of the memory block */ + { + ULONG *pSig = (ULONG *)( ( ( unsigned char * ) pMem ) + ulSize + sizeof(HB_MEMINFO) ); + *pSig = HB_MEMINFO_SIGNATURE; + } if( ( ( PHB_MEMINFO ) pMem )->pPrevBlock ) ( ( PHB_MEMINFO ) pMem )->pPrevBlock->pNextBlock = ( PHB_MEMINFO ) pMem; if( ( ( PHB_MEMINFO ) pMem )->pNextBlock ) @@ -313,10 +330,15 @@ void hb_xfree( void * pMem ) /* frees fixed memory */ if( pMem ) { PHB_MEMINFO pMemBlock = ( PHB_MEMINFO ) ( ( char * ) pMem - sizeof( HB_MEMINFO ) ); + ULONG *pSig; if( pMemBlock->ulSignature != HB_MEMINFO_SIGNATURE ) hb_errInternal( HB_EI_XFREEINV, NULL, NULL, NULL ); + pSig = (ULONG *)( ( ( unsigned char * ) pMem ) + pMemBlock->ulSize ); + if( *pSig != HB_MEMINFO_SIGNATURE ) + hb_errInternal( HB_EI_XMEMOVERFLOW, NULL, NULL, NULL ); + s_lMemoryConsumed -= pMemBlock->ulSize; s_lMemoryBlocks--;