From bbd5bcb2e205d6b086d28f999f6aa9c9665f2a11 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Wed, 30 Dec 2009 20:23:35 +0000 Subject: [PATCH] 2009-12-30 21:22 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/nortl/nortl.c ! added hb_xtraced() * harbour/src/common/hbstr.c * do not fill unused part of buffer with '\0' bytes in hb_strncpy(), hb_strncpyLower(), hb_strncpyUpper(), hb_strncpyUpperTrim(), hb_strncpyTrim() * harbour/src/common/hbtrace.c % small optimization in building Unicode OutputDebugString() message * harbour/src/codepage/Makefile * harbour/include/hbapicdp.h + harbour/src/codepage/ucyuscii.c + added YUSCII unicode table * harbour/src/codepage/cphr437.c * harbour/src/codepage/cpsl437.c ! fixed unicode table used in HR437 and SL437 Harbour CPs. It's not CP-437 but YUSCII - removed my old note "TOFIX: is it really CP-437?" TOFIX: change Harbour names of above CPs, i.e. to HRYU and SLYU * harbour/src/codepage/uckam.c * removed TOFIX note I forgot to remove when committed correct Kamenicky Unicode table. * harbour/src/codepage/uckoi8.c * harbour/src/codepage/uc857.c * harbour/src/codepage/uc1250.c * harbour/src/codepage/uc1254.c * harbour/src/codepage/uc866.c * harbour/src/codepage/uc850.c * harbour/src/codepage/uc1251.c * harbour/src/codepage/ucmaz.c * harbour/src/codepage/uc1252.c * harbour/src/codepage/uc8859_1.c * harbour/src/codepage/uc88591b.c * harbour/src/codepage/uc852.c * harbour/src/codepage/uc737.c * harbour/src/codepage/uc1253.c * harbour/src/codepage/uc1257.c * harbour/src/codepage/uc8859_2.c * updated some of my old copyright messages --- harbour/ChangeLog | 46 ++++++++++++++++ harbour/include/hbapicdp.h | 3 ++ harbour/src/codepage/Makefile | 1 + harbour/src/codepage/cphr437.c | 6 +-- harbour/src/codepage/cpsl437.c | 4 +- harbour/src/codepage/uc1250.c | 4 +- harbour/src/codepage/uc1251.c | 4 +- harbour/src/codepage/uc1252.c | 4 +- harbour/src/codepage/uc1253.c | 4 +- harbour/src/codepage/uc1254.c | 4 +- harbour/src/codepage/uc1257.c | 4 +- harbour/src/codepage/uc737.c | 4 +- harbour/src/codepage/uc850.c | 4 +- harbour/src/codepage/uc852.c | 4 +- harbour/src/codepage/uc857.c | 4 +- harbour/src/codepage/uc866.c | 4 +- harbour/src/codepage/uc88591b.c | 4 +- harbour/src/codepage/uc8859_1.c | 4 +- harbour/src/codepage/uc8859_2.c | 4 +- harbour/src/codepage/uckam.c | 2 - harbour/src/codepage/uckoi8.c | 4 +- harbour/src/codepage/ucmaz.c | 7 ++- harbour/src/codepage/ucyuscii.c | 93 +++++++++++++++++++++++++++++++++ harbour/src/common/hbstr.c | 25 +-------- harbour/src/common/hbtrace.c | 4 +- harbour/src/nortl/nortl.c | 5 ++ 26 files changed, 189 insertions(+), 67 deletions(-) create mode 100644 harbour/src/codepage/ucyuscii.c diff --git a/harbour/ChangeLog b/harbour/ChangeLog index b39db8a105..41e3cf0e99 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,52 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-12-30 21:22 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/src/nortl/nortl.c + ! added hb_xtraced() + + * harbour/src/common/hbstr.c + * do not fill unused part of buffer with '\0' bytes in + hb_strncpy(), hb_strncpyLower(), hb_strncpyUpper(), + hb_strncpyUpperTrim(), hb_strncpyTrim() + + * harbour/src/common/hbtrace.c + % small optimization in building Unicode OutputDebugString() message + + * harbour/src/codepage/Makefile + * harbour/include/hbapicdp.h + + harbour/src/codepage/ucyuscii.c + + added YUSCII unicode table + + * harbour/src/codepage/cphr437.c + * harbour/src/codepage/cpsl437.c + ! fixed unicode table used in HR437 and SL437 Harbour CPs. + It's not CP-437 but YUSCII + - removed my old note "TOFIX: is it really CP-437?" + TOFIX: change Harbour names of above CPs, i.e. to HRYU and SLYU + + * harbour/src/codepage/uckam.c + * removed TOFIX note I forgot to remove when committed correct + Kamenicky Unicode table. + + * harbour/src/codepage/uckoi8.c + * harbour/src/codepage/uc857.c + * harbour/src/codepage/uc1250.c + * harbour/src/codepage/uc1254.c + * harbour/src/codepage/uc866.c + * harbour/src/codepage/uc850.c + * harbour/src/codepage/uc1251.c + * harbour/src/codepage/ucmaz.c + * harbour/src/codepage/uc1252.c + * harbour/src/codepage/uc8859_1.c + * harbour/src/codepage/uc88591b.c + * harbour/src/codepage/uc852.c + * harbour/src/codepage/uc737.c + * harbour/src/codepage/uc1253.c + * harbour/src/codepage/uc1257.c + * harbour/src/codepage/uc8859_2.c + * updated some of my old copyright messages + 2009-12-30 12:07 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbide/ideactions.prg * contrib/hbide/ideeditor.prg diff --git a/harbour/include/hbapicdp.h b/harbour/include/hbapicdp.h index c5fdf00032..7893603490 100644 --- a/harbour/include/hbapicdp.h +++ b/harbour/include/hbapicdp.h @@ -179,6 +179,7 @@ typedef struct _HB_CODEPAGE #define HB_CPID_ATARIST "atarist" #define HB_CPID_NEXTSTEP "nextstep" #define HB_CPID_USASCII "us-ascii" +#define HB_CPID_YUSCII "yuscii" #define HB_UNITB_437 &hb_uniTbl_437 #define HB_UNITB_737 &hb_uniTbl_737 @@ -243,6 +244,7 @@ typedef struct _HB_CODEPAGE #define HB_UNITB_ATARIST &hb_uniTbl_ATARIST #define HB_UNITB_NEXTSTEP &hb_uniTbl_NEXTSTEP #define HB_UNITB_USASCII &hb_uniTbl_USASCII +#define HB_UNITB_YUSCII &hb_uniTbl_YUSCII #define HB_UNITB_UNDEF NULL /* ((PHB_UNITABLE) (-1)) */ extern HB_UNITABLE hb_uniTbl_437; @@ -308,6 +310,7 @@ extern HB_UNITABLE hb_uniTbl_10081; extern HB_UNITABLE hb_uniTbl_ATARIST; extern HB_UNITABLE hb_uniTbl_NEXTSTEP; extern HB_UNITABLE hb_uniTbl_USASCII; +extern HB_UNITABLE hb_uniTbl_YUSCII; extern HB_EXPORT PHB_CODEPAGE hb_vmCDP( void ); extern HB_EXPORT void hb_vmSetCDP( PHB_CODEPAGE pCDP ); diff --git a/harbour/src/codepage/Makefile b/harbour/src/codepage/Makefile index 161ff4dd88..63b8ae0d47 100644 --- a/harbour/src/codepage/Makefile +++ b/harbour/src/codepage/Makefile @@ -150,6 +150,7 @@ C_SOURCES := \ ucmacrom.c \ ucmactrk.c \ ucnext.c \ + ucyuscii.c \ LIBNAME := hbcpage diff --git a/harbour/src/codepage/cphr437.c b/harbour/src/codepage/cphr437.c index 999fb777c6..2f8f42c7c8 100644 --- a/harbour/src/codepage/cphr437.c +++ b/harbour/src/codepage/cphr437.c @@ -51,13 +51,11 @@ */ #define HB_CP_ID HR437 -#define HB_CP_INFO "Croatian CP-437" -#define HB_CP_UNITB HB_UNITB_437 +#define HB_CP_INFO "Croatian YUSCII" +#define HB_CP_UNITB HB_UNITB_YUSCII #define HB_CP_ACSORT HB_CDP_ACSORT_NONE #define HB_CP_UPPER "ABC^]D\\EFGHIJKLMNOPQRS[TUVWZ@XY" #define HB_CP_LOWER "abc~}d|efghijklmnopqrs{tuvwz`xy" /* include CP registration code */ #include "hbcdpreg.h" - -/* TOFIX: is it really CP-437? */ diff --git a/harbour/src/codepage/cpsl437.c b/harbour/src/codepage/cpsl437.c index 22ba0d877e..1696f8385f 100644 --- a/harbour/src/codepage/cpsl437.c +++ b/harbour/src/codepage/cpsl437.c @@ -52,8 +52,8 @@ */ #define HB_CP_ID SL437 -#define HB_CP_INFO "Slovenian CP-437" -#define HB_CP_UNITB HB_UNITB_437 +#define HB_CP_INFO "Slovenian YUSCII" +#define HB_CP_UNITB HB_UNITB_YUSCII #define HB_CP_ACSORT HB_CDP_ACSORT_NONE #define HB_CP_UPPER "ABC^]D\\EFGHIJKLMNOPQRS[TUVWZ@XY" #define HB_CP_LOWER "abc~}d|efghijklmnopqrs{tuvwz`xy" diff --git a/harbour/src/codepage/uc1250.c b/harbour/src/codepage/uc1250.c index 7e32392e9d..057f93ac24 100644 --- a/harbour/src/codepage/uc1250.c +++ b/harbour/src/codepage/uc1250.c @@ -6,8 +6,8 @@ * Harbour Project source code: * Windows-1250 <-> Unicode conversion table * - * Copyright 2003 Przemyslaw Czerpak - * www - http://www.xharbour.org + * Copyright 2003 Przemyslaw Czerpak + * 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 diff --git a/harbour/src/codepage/uc1251.c b/harbour/src/codepage/uc1251.c index 6aeb350567..8fea1764c1 100644 --- a/harbour/src/codepage/uc1251.c +++ b/harbour/src/codepage/uc1251.c @@ -6,8 +6,8 @@ * Harbour Project source code: * Windows-1251 <-> Unicode conversion table * - * Copyright 2003 Przemyslaw Czerpak - * www - http://www.xharbour.org + * Copyright 2003 Przemyslaw Czerpak + * 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 diff --git a/harbour/src/codepage/uc1252.c b/harbour/src/codepage/uc1252.c index 216cb987ab..3d804aad23 100644 --- a/harbour/src/codepage/uc1252.c +++ b/harbour/src/codepage/uc1252.c @@ -6,8 +6,8 @@ * Harbour Project source code: * Windows-1252 <-> Unicode conversion table * - * Copyright 2003 Przemyslaw Czerpak - * www - http://www.xharbour.org + * Copyright 2003 Przemyslaw Czerpak + * 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 diff --git a/harbour/src/codepage/uc1253.c b/harbour/src/codepage/uc1253.c index c0a122430b..2c312354fa 100644 --- a/harbour/src/codepage/uc1253.c +++ b/harbour/src/codepage/uc1253.c @@ -6,8 +6,8 @@ * Harbour Project source code: * Windows-1253 <-> Unicode conversion table * - * Copyright 2003 Przemyslaw Czerpak - * www - http://www.xharbour.org + * Copyright 2003 Przemyslaw Czerpak + * 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 diff --git a/harbour/src/codepage/uc1254.c b/harbour/src/codepage/uc1254.c index 1e80f225e0..fa1bc54fa3 100644 --- a/harbour/src/codepage/uc1254.c +++ b/harbour/src/codepage/uc1254.c @@ -6,8 +6,8 @@ * Harbour Project source code: * Windows-1254 <-> Unicode conversion table * - * Copyright 2003 Przemyslaw Czerpak - * www - http://www.xharbour.org + * Copyright 2003 Przemyslaw Czerpak + * 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 diff --git a/harbour/src/codepage/uc1257.c b/harbour/src/codepage/uc1257.c index 824a0eac2b..2c2e7dd964 100644 --- a/harbour/src/codepage/uc1257.c +++ b/harbour/src/codepage/uc1257.c @@ -6,8 +6,8 @@ * Harbour Project source code: * Windows-1257 <-> Unicode conversion table * - * Copyright 2003 Przemyslaw Czerpak - * www - http://www.xharbour.org + * Copyright 2003 Przemyslaw Czerpak + * 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 diff --git a/harbour/src/codepage/uc737.c b/harbour/src/codepage/uc737.c index 32ddd490e1..cd8ada76a7 100644 --- a/harbour/src/codepage/uc737.c +++ b/harbour/src/codepage/uc737.c @@ -6,8 +6,8 @@ * Harbour Project source code: * IBM737 <-> Unicode conversion table * - * Copyright 2003 Przemyslaw Czerpak - * www - http://www.xharbour.org + * Copyright 2003 Przemyslaw Czerpak + * 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 diff --git a/harbour/src/codepage/uc850.c b/harbour/src/codepage/uc850.c index 720081000f..cc3a677037 100644 --- a/harbour/src/codepage/uc850.c +++ b/harbour/src/codepage/uc850.c @@ -6,8 +6,8 @@ * Harbour Project source code: * IBM850 <-> Unicode conversion table * - * Copyright 2003 Przemyslaw Czerpak - * www - http://www.xharbour.org + * Copyright 2003 Przemyslaw Czerpak + * 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 diff --git a/harbour/src/codepage/uc852.c b/harbour/src/codepage/uc852.c index ae57b983bf..749c9755d3 100644 --- a/harbour/src/codepage/uc852.c +++ b/harbour/src/codepage/uc852.c @@ -6,8 +6,8 @@ * Harbour Project source code: * IBM852 <-> Unicode conversion table * - * Copyright 2003 Przemyslaw Czerpak - * www - http://www.xharbour.org + * Copyright 2003 Przemyslaw Czerpak + * 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 diff --git a/harbour/src/codepage/uc857.c b/harbour/src/codepage/uc857.c index be5eed598a..ce37e50477 100644 --- a/harbour/src/codepage/uc857.c +++ b/harbour/src/codepage/uc857.c @@ -6,8 +6,8 @@ * Harbour Project source code: * IBM857 <-> Unicode conversion table * - * Copyright 2003 Przemyslaw Czerpak - * www - http://www.xharbour.org + * Copyright 2003 Przemyslaw Czerpak + * 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 diff --git a/harbour/src/codepage/uc866.c b/harbour/src/codepage/uc866.c index 2dc371d2dd..642d35592c 100644 --- a/harbour/src/codepage/uc866.c +++ b/harbour/src/codepage/uc866.c @@ -6,8 +6,8 @@ * Harbour Project source code: * IBM866 <-> Unicode conversion table * - * Copyright 2003 Przemyslaw Czerpak - * www - http://www.xharbour.org + * Copyright 2003 Przemyslaw Czerpak + * 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 diff --git a/harbour/src/codepage/uc88591b.c b/harbour/src/codepage/uc88591b.c index f2acfa8d29..613ab51c8d 100644 --- a/harbour/src/codepage/uc88591b.c +++ b/harbour/src/codepage/uc88591b.c @@ -6,8 +6,8 @@ * Harbour Project source code: * ISO-8859-1b <-> Unicode conversion table * - * Copyright 2003 Przemyslaw Czerpak - * www - http://www.xharbour.org + * Copyright 2003 Przemyslaw Czerpak + * 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 diff --git a/harbour/src/codepage/uc8859_1.c b/harbour/src/codepage/uc8859_1.c index f2b2032c99..628075dc07 100644 --- a/harbour/src/codepage/uc8859_1.c +++ b/harbour/src/codepage/uc8859_1.c @@ -6,8 +6,8 @@ * Harbour Project source code: * ISO-8859-1 <-> Unicode conversion table * - * Copyright 2003 Przemyslaw Czerpak - * www - http://www.xharbour.org + * Copyright 2003 Przemyslaw Czerpak + * 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 diff --git a/harbour/src/codepage/uc8859_2.c b/harbour/src/codepage/uc8859_2.c index 40f1220a2d..d0bd2e3162 100644 --- a/harbour/src/codepage/uc8859_2.c +++ b/harbour/src/codepage/uc8859_2.c @@ -6,8 +6,8 @@ * Harbour Project source code: * ISO-8859-2 <-> Unicode conversion table * - * Copyright 2003 Przemyslaw Czerpak - * www - http://www.xharbour.org + * Copyright 2003 Przemyslaw Czerpak + * 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 diff --git a/harbour/src/codepage/uckam.c b/harbour/src/codepage/uckam.c index e520a96cc6..47ccecc190 100644 --- a/harbour/src/codepage/uckam.c +++ b/harbour/src/codepage/uckam.c @@ -55,8 +55,6 @@ #define NUMBER_OF_CHARS 256 -/* TOFIX: it's Mazovia CP not Kamenicky */ - static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, diff --git a/harbour/src/codepage/uckoi8.c b/harbour/src/codepage/uckoi8.c index 10455734b9..c372b06775 100644 --- a/harbour/src/codepage/uckoi8.c +++ b/harbour/src/codepage/uckoi8.c @@ -7,8 +7,8 @@ * KOI8 <-> Unicode conversion table * * - * Copyright 2003 Przemyslaw Czerpak - * www - http://www.xharbour.org + * Copyright 2003 Przemyslaw Czerpak + * 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 diff --git a/harbour/src/codepage/ucmaz.c b/harbour/src/codepage/ucmaz.c index 9b0dc5ad84..d9f2b29f86 100644 --- a/harbour/src/codepage/ucmaz.c +++ b/harbour/src/codepage/ucmaz.c @@ -3,12 +3,11 @@ */ /* - * xHarbour Project source code: + * Harbour Project source code: * Mazowia <-> Unicode conversion table * - * - * Copyright 2003 Przemyslaw Czerpak - * www - http://www.xharbour.org + * Copyright 2003 Przemyslaw Czerpak + * 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 diff --git a/harbour/src/codepage/ucyuscii.c b/harbour/src/codepage/ucyuscii.c new file mode 100644 index 0000000000..a9a1798ff0 --- /dev/null +++ b/harbour/src/codepage/ucyuscii.c @@ -0,0 +1,93 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * YUSCII <-> Unicode conversion table + * + * Copyright 2009 Przemyslaw Czerpak + * 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. + * + */ + +#include "hbapicdp.h" + +#define NUMBER_OF_CHARS 256 + +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +{ + 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, + 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, + 0x25BA, 0x25C4, 0x2195, 0x203C, 0x00B6, 0x00A7, 0x25AC, 0x21A8, + 0x2191, 0x2193, 0x2192, 0x2190, 0x2319, 0x2194, 0x25B2, 0x25BC, + 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, + 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F, + 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, + 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F, + 0x017D, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, + 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F, + 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, + 0x0058, 0x0059, 0x005A, 0x0160, 0x0110, 0x0106, 0x010C, 0x005F, + 0x017E, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, + 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F, + 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, + 0x0078, 0x0079, 0x007A, 0x0161, 0x0111, 0x0107, 0x010D, 0x007F, + 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7, + 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5, + 0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9, + 0x00FF, 0x00D6, 0x00DC, 0x00A2, 0x00A3, 0x00A5, 0x20A7, 0x0192, + 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA, + 0x00BF, 0x2310, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB, + 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, + 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510, + 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, + 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567, + 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, + 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580, + 0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4, + 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229, + 0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248, + 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0 +}; + +HB_UNITABLE hb_uniTbl_YUSCII = { HB_CPID_YUSCII, s_uniCodes, NULL, 0 }; diff --git a/harbour/src/common/hbstr.c b/harbour/src/common/hbstr.c index 2e5a367472..7d242acc89 100644 --- a/harbour/src/common/hbstr.c +++ b/harbour/src/common/hbstr.c @@ -804,9 +804,6 @@ char * hb_strncpy( char * pDest, const char * pSource, ULONG ulLen ) while( ulLen && ( *pDest++ = *pSource++ ) != '\0' ) ulLen--; - while( ulLen-- ) - *pDest++ = '\0'; - return pBuf; } @@ -832,12 +829,6 @@ char * hb_strncat( char * pDest, const char * pSource, ULONG ulLen ) while( ulLen && ( *pDest++ = *pSource++ ) != '\0' ) ulLen--; -/* if someone will need this then please uncomment the cleaning the rest of - buffer. */ -/* - while(ulLen--) - *pDest++ = '\0'; -*/ return pBuf; } @@ -862,9 +853,6 @@ char * hb_strncpyLower( char * pDest, const char * pSource, ULONG ulLen ) pSource++; } - while( ulLen-- ) - *pDest++ = '\0'; - return pBuf; } @@ -889,9 +877,6 @@ char * hb_strncpyUpper( char * pDest, const char * pSource, ULONG ulLen ) pSource++; } - while( ulLen-- ) - *pDest++ = '\0'; - return pBuf; } @@ -916,8 +901,6 @@ char * hb_strncpyUpperTrim( char * pDest, const char * pSource, ULONG ulLen ) while( ulSLen && pSource[ ulSLen - 1 ] == ' ') ulSLen--; - pDest[ ulLen ] = '\0'; - while( ulLen && ulSLen && ( *pDest++ = ( char ) HB_TOUPPER( ( UCHAR ) *pSource ) ) != '\0' ) { @@ -926,8 +909,7 @@ char * hb_strncpyUpperTrim( char * pDest, const char * pSource, ULONG ulLen ) pSource++; } - while( ulLen-- ) - *pDest++ = '\0'; + *pDest = '\0'; return pBuf; } @@ -951,16 +933,13 @@ char * hb_strncpyTrim( char * pDest, const char * pSource, ULONG ulLen ) while( ulSLen && pSource[ ulSLen - 1 ] == ' ' ) ulSLen--; - pDest[ ulLen ] = '\0'; - while( ulLen && ulSLen && ( *pDest++ = *pSource++ ) != '\0' ) { ulSLen--; ulLen--; } - while( ulLen-- ) - *pDest++ = '\0'; + *pDest = '\0'; return pBuf; } diff --git a/harbour/src/common/hbtrace.c b/harbour/src/common/hbtrace.c index 07d5f9e6cb..48368e566a 100644 --- a/harbour/src/common/hbtrace.c +++ b/harbour/src/common/hbtrace.c @@ -246,8 +246,8 @@ static void hb_tracelog_( int level, const char * file, int line, const char * p file, line, pszLevel, message ); #if defined( UNICODE ) - memcpy( message, buf.psz, sizeof( message ) ); - MultiByteToWideChar( CP_ACP, 0, message, -1, buf.lp, HB_SIZEOFARRAY( buf.lp ) ); + MultiByteToWideChar( CP_ACP, 0, hb_strncpy( message, buf.psz, sizeof( message ) - 1 ), -1, + buf.lp, HB_SIZEOFARRAY( buf.lp ) ); #endif OutputDebugString( buf.lp ); } diff --git a/harbour/src/nortl/nortl.c b/harbour/src/nortl/nortl.c index 4c6f4ead40..d1e3063922 100644 --- a/harbour/src/nortl/nortl.c +++ b/harbour/src/nortl/nortl.c @@ -323,6 +323,11 @@ void hb_xexit( void ) #endif } +HB_BOOL hb_xtraced( void ) +{ + return HB_FALSE; +} + /* NOTE: Use as minimal calls from here, as possible. Don't allocate memory from this function. [vszakats] */ void hb_errInternal( HB_ERRCODE errCode, const char * szText, const char * szPar1, const char * szPar2 )