2009-07-14 12:15 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* source/vm/extend.c
    ! Fixed hb_parvcx() to return "" instead of NULL when dealing
      with array parameters out of bound or non-string.
      (Borrowed from xhb by Ron Pinkas. Although the fix is
      implemented differently in Harbour)

  * source/rtl/gttrm/Makefile
    * CFLAGS -> HB_USER_CFLAGS

  * include/hbapicdp.h
  * include/hbextern.ch
  * source/lang/Makefile
  * source/codepage/Makefile
  + source/codepage/cpua1125.c
  + source/codepage/uc1125.c
    + Added DOS Ukrainian 1125 codepage
      (Borrowed from xhb. Work of Pavel Tsarenko)

  * utils/hbmk2/hbmk2.prg
    * OS/2 embedded compiler autodetection order fixed.
This commit is contained in:
Viktor Szakats
2009-07-14 10:16:48 +00:00
parent 4499e22e7d
commit 61962be0dd
10 changed files with 323 additions and 122 deletions

View File

@@ -17,6 +17,28 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-07-14 12:15 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* source/vm/extend.c
! Fixed hb_parvcx() to return "" instead of NULL when dealing
with array parameters out of bound or non-string.
(Borrowed from xhb by Ron Pinkas. Although the fix is
implemented differently in Harbour)
* source/rtl/gttrm/Makefile
* CFLAGS -> HB_USER_CFLAGS
* include/hbapicdp.h
* include/hbextern.ch
* source/lang/Makefile
* source/codepage/Makefile
+ source/codepage/cpua1125.c
+ source/codepage/uc1125.c
+ Added DOS Ukrainian 1125 codepage
(Borrowed from xhb. Work of Pavel Tsarenko)
* utils/hbmk2/hbmk2.prg
* OS/2 embedded compiler autodetection order fixed.
2009-07-14 11:30 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/rtl/gtcrs/gtcrs.c
* harbour/source/rtl/gtcrs/gtcrs.h

View File

@@ -127,6 +127,7 @@ typedef struct _HB_CODEPAGE
#define HB_CPID_866 "cp866"
#define HB_CPID_869 "cp869"
#define HB_CPID_874 "cp874"
#define HB_CPID_1125 "cp1125"
#define HB_CPID_1250 "cp1250"
#define HB_CPID_1251 "cp1251"
#define HB_CPID_1252 "cp1252"
@@ -190,6 +191,7 @@ typedef struct _HB_CODEPAGE
#define HB_UNITB_866 &hb_uniTbl_866
#define HB_UNITB_869 &hb_uniTbl_869
#define HB_UNITB_874 &hb_uniTbl_874
#define HB_UNITB_1125 &hb_uniTbl_1125
#define HB_UNITB_1250 &hb_uniTbl_1250
#define HB_UNITB_1251 &hb_uniTbl_1251
#define HB_UNITB_1252 &hb_uniTbl_1252
@@ -254,6 +256,7 @@ extern HB_UNITABLE hb_uniTbl_865;
extern HB_UNITABLE hb_uniTbl_866;
extern HB_UNITABLE hb_uniTbl_869;
extern HB_UNITABLE hb_uniTbl_874;
extern HB_UNITABLE hb_uniTbl_1125;
extern HB_UNITABLE hb_uniTbl_1250;
extern HB_UNITABLE hb_uniTbl_1251;
extern HB_UNITABLE hb_uniTbl_1252;

View File

@@ -1101,6 +1101,7 @@ EXTERNAL HB_CODEPAGE_SVISO
EXTERNAL HB_CODEPAGE_SVWIN
EXTERNAL HB_CODEPAGE_TR857
EXTERNAL HB_CODEPAGE_TRWIN
EXTERNAL HB_CODEPAGE_UA1125
EXTERNAL HB_CODEPAGE_UA1251
EXTERNAL HB_CODEPAGE_UA866
EXTERNAL HB_CODEPAGE_UAKOI8

View File

@@ -5,99 +5,101 @@
ROOT = ../../
C_SOURCES=\
cpbg866.c \
cpbgiso.c \
cpbgmik.c \
cpbgwin.c \
cpcs852.c \
cpcsiso.c \
cpcskam.c \
cpcswin.c \
cpde850.c \
cpdeiso.c \
cpdewin.c \
cpel737.c \
cpelwin.c \
cpes850.c \
cpbg866.c \
cpbgiso.c \
cpbgmik.c \
cpbgwin.c \
cpcs852.c \
cpcsiso.c \
cpcskam.c \
cpcswin.c \
cpde850.c \
cpdeiso.c \
cpdewin.c \
cpel737.c \
cpelwin.c \
cpes850.c \
cpes850c.c \
cpesiso.c \
cpesiso.c \
cpesisoc.c \
cpeswin.c \
cpeswin.c \
cpeswinc.c \
cpeswinm.c \
cpfr850.c \
cpfriso.c \
cpfrwin.c \
cphr437.c \
cphr852.c \
cphrwin.c \
cphu852.c \
cpfr850.c \
cpfriso.c \
cpfrwin.c \
cphr437.c \
cphr852.c \
cphrwin.c \
cphu852.c \
cphu852s.c \
cphuiso.c \
cphuiso.c \
cphuisos.c \
cphuwin.c \
cphuwin.c \
cphuwins.c \
cpit437.c \
cpit850.c \
cpitisb.c \
cpitiso.c \
cpitwin.c \
cpltwin.c \
cppl852.c \
cppliso.c \
cpplmaz.c \
cpplwin.c \
cppt850.c \
cpptiso.c \
cpro852.c \
cproiso.c \
cprowin.c \
cpru866.c \
cpruiso.c \
cprukoi.c \
cpruwin.c \
cpsk852.c \
cpskiso.c \
cpskkam.c \
cpskwin.c \
cpsl437.c \
cpsl852.c \
cpsliso.c \
cpslwin.c \
cpsrwin.c \
cpsv850.c \
cpit437.c \
cpit850.c \
cpitisb.c \
cpitiso.c \
cpitwin.c \
cpltwin.c \
cppl852.c \
cppliso.c \
cpplmaz.c \
cpplwin.c \
cppt850.c \
cpptiso.c \
cpro852.c \
cproiso.c \
cprowin.c \
cpru866.c \
cpruiso.c \
cprukoi.c \
cpruwin.c \
cpsk852.c \
cpskiso.c \
cpskkam.c \
cpskwin.c \
cpsl437.c \
cpsl852.c \
cpsliso.c \
cpslwin.c \
cpsrwin.c \
cpsv850.c \
cpsvclip.c \
cpsviso.c \
cpsvwin.c \
cptr857.c \
cptrwin.c \
cpua866.c \
cpuakoi.c \
cpuawin.c \
uc1250.c \
uc1251.c \
uc1252.c \
uc1253.c \
uc1254.c \
uc1255.c \
uc1256.c \
uc1257.c \
uc1258.c \
uc737.c \
uc775.c \
uc850.c \
uc852.c \
uc855.c \
uc857.c \
uc860.c \
uc861.c \
uc862.c \
uc863.c \
uc864.c \
uc865.c \
uc866.c \
uc869.c \
uc874.c \
cpsviso.c \
cpsvwin.c \
cptr857.c \
cptrwin.c \
cpua1125.c \
cpua866.c \
cpuakoi.c \
cpuawin.c \
uc1125.c \
uc1250.c \
uc1251.c \
uc1252.c \
uc1253.c \
uc1254.c \
uc1255.c \
uc1256.c \
uc1257.c \
uc1258.c \
uc737.c \
uc775.c \
uc850.c \
uc852.c \
uc855.c \
uc857.c \
uc860.c \
uc861.c \
uc862.c \
uc863.c \
uc864.c \
uc865.c \
uc866.c \
uc869.c \
uc874.c \
uc8859_1.c \
uc88591b.c \
uc8859_2.c \
@@ -114,27 +116,27 @@ C_SOURCES=\
uc885914.c \
uc885915.c \
uc885916.c \
uckam.c \
uckoi8.c \
uckoi8u.c \
ucmaz.c \
ucmik.c \
uc037.c \
uc1006.c \
uc1026.c \
uc424.c \
uc500.c \
uc856.c \
uc875.c \
ucascii.c \
ucatari.c \
ucmacce.c \
uckam.c \
uckoi8.c \
uckoi8u.c \
ucmaz.c \
ucmik.c \
uc037.c \
uc1006.c \
uc1026.c \
uc424.c \
uc500.c \
uc856.c \
uc875.c \
ucascii.c \
ucatari.c \
ucmacce.c \
ucmaccyr.c \
ucmacgrk.c \
ucmacice.c \
ucmacrom.c \
ucmactrk.c \
ucnext.c \
ucnext.c \
LIBNAME=hbcpage

View File

@@ -0,0 +1,78 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* National Collation Support Module (UA1125)
*
* Copyright 2009 Pavel Tsarenko <tpe2@mail.ru>
* 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: 1125 */
#include "hbapi.h"
#include "hbapicdp.h"
static HB_CODEPAGE s_codepage = { "UA1125",
HB_CPID_1125, HB_UNITB_1125, 36,
"<EFBFBD>ƒ„…ðô†‡ˆöø‰ŠŒ<EFBFBD>Ž<EFBFBD><EFBFBD>“”•˜™šœ<EFBFBD>žŸ",
" ¡¢£¤¥ñõ¦§¨÷ù©ª«¬­®¯àáâãäåæçèéêëìíîï",
0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL };
HB_CODEPAGE_INIT( UA1125 )
#if defined( HB_PRAGMA_STARTUP )
#pragma startup hb_codepage_Init_UA1125
#elif defined( HB_MSC_STARTUP )
#if defined( HB_OS_WIN_64 )
#pragma section( HB_MSC_START_SEGMENT, long, read )
#endif
#pragma data_seg( HB_MSC_START_SEGMENT )
static HB_$INITSYM hb_vm_auto_hb_codepage_Init_UA1125 = hb_codepage_Init_UA1125;
#pragma data_seg()
#endif

View File

@@ -0,0 +1,94 @@
/*
* $Id$
*/
/*
* xHarbour Project source code:
* DOS Ukrainian (RUSCII) cp1125 <-> Unicode conversion table
*
* Copyright 2009 Pavel Tsarenko <tpe2@mail.ru>
* 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.
*
*/
#include "hbapi.h"
#include "hbapicdp.h"
#define NUMBER_OF_CHARS 256
static USHORT 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,
0x0040, 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, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
0x0060, 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, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F,
0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
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,
0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F,
0x0401, 0x0451, 0x0490, 0x0491, 0x0404, 0x0454, 0x0406, 0x0456,
0x0407, 0x0457, 0x00B7, 0x221A, 0x2116, 0x00A4, 0x25A0, 0x00A0
};
HB_UNITABLE hb_uniTbl_1125 = { HB_CPID_1125, NUMBER_OF_CHARS, FALSE, uniCodes };

View File

@@ -11,21 +11,21 @@ C_SOURCES=\
msgbgiso.c \
msgbgmik.c \
msgbgwin.c \
msgca.c \
msgca.c \
msgcs852.c \
msgcsiso.c \
msgcskam.c \
msgcswin.c \
msgde.c \
msgde.c \
msgdewin.c \
msgel.c \
msgel.c \
msgelwin.c \
msgeo.c \
msges.c \
msgeo.c \
msges.c \
msgeswin.c \
msgeu.c \
msgfr.c \
msggl.c \
msgeu.c \
msgfr.c \
msggl.c \
msghe862.c \
msghewin.c \
msghr437.c \
@@ -36,19 +36,19 @@ C_SOURCES=\
msghucwi.c \
msghuiso.c \
msghuwin.c \
msgid.c \
msgid.c \
msgis850.c \
msgit.c \
msgko.c \
msgit.c \
msgko.c \
msgltwin.c \
msgnl.c \
msgnl.c \
msgpl852.c \
msgpliso.c \
msgplmaz.c \
msgplwin.c \
msgpt.c \
msgpt.c \
msgptiso.c \
msgro.c \
msgro.c \
msgru866.c \
msgrukoi.c \
msgruwin.c \
@@ -68,8 +68,8 @@ C_SOURCES=\
msgua866.c \
msguakoi.c \
msguawin.c \
msgzhb5.c \
msgzhgb.c \
msgzhb5.c \
msgzhgb.c \
LIBNAME=hblang

View File

@@ -40,9 +40,9 @@ endif
endif
ifneq ($(strip $(HB_INC_GPM_OK)),)
CFLAGS += -DHAVE_GPM_H
HB_USER_CFLAGS += -DHAVE_GPM_H
ifeq ($(HB_GPM_NOICE_DISABLE),yes)
CFLAGS += -DHB_GPM_NOICE_DISABLE
HB_USER_CFLAGS += -DHB_GPM_NOICE_DISABLE
endif
endif

View File

@@ -666,7 +666,8 @@ const char * hb_parvcx( int iParam, ... )
ulArrayIndex = va_arg( va, ULONG );
va_end( va );
return hb_arrayGetCPtr( pItem, ulArrayIndex );
pItem = hb_arrayGetItemPtr( pItem, ulArrayIndex );
return pItem && HB_IS_STRING( pItem ) ? hb_itemGetCPtr( pItem ) : "";
}
}

View File

@@ -1121,9 +1121,9 @@ FUNCTION hbmk( aArgs, /* @ */ lPause, /* @ */ lUTF8 )
#elif defined( __PLATFORM__OS2 )
AAdd( aCOMPDET_EMBED, { {| cPrefix | tmp1 := PathNormalize( DirAddPathSep( l_cHB_INSTALL_PREFIX ) + _COMPEMBED_BASE_ + "watcom" + hb_osPathSeparator() + "binp" ), iif( hb_FileExists( tmp1 + hb_osPathSeparator() + cPrefix + "wpp386.exe" ), tmp1, NIL ) }, "dos" , "watcom" , "" , {| cARCH, cCOMP, cPathBin | hbmk_COMP_Setup( cARCH, cCOMP, cPathBin + hb_osPathSeparator() + ".." ) } } )
AAdd( aCOMPDET_EMBED, { {| cPrefix | tmp1 := PathNormalize( DirAddPathSep( l_cHB_INSTALL_PREFIX ) + _COMPEMBED_BASE_ + "watcom" + hb_osPathSeparator() + "binp" ), iif( hb_FileExists( tmp1 + hb_osPathSeparator() + cPrefix + "wpp386.exe" ), tmp1, NIL ) }, "win" , "watcom" , "" , {| cARCH, cCOMP, cPathBin | hbmk_COMP_Setup( cARCH, cCOMP, cPathBin + hb_osPathSeparator() + ".." ) } } )
AAdd( aCOMPDET_EMBED, { {| cPrefix | tmp1 := PathNormalize( DirAddPathSep( l_cHB_INSTALL_PREFIX ) + _COMPEMBED_BASE_ + "watcom" + hb_osPathSeparator() + "binp" ), iif( hb_FileExists( tmp1 + hb_osPathSeparator() + cPrefix + "wpp386.exe" ), tmp1, NIL ) }, "os2" , "watcom" , "" , {| cARCH, cCOMP, cPathBin | hbmk_COMP_Setup( cARCH, cCOMP, cPathBin + hb_osPathSeparator() + ".." ) } } )
AAdd( aCOMPDET_EMBED, { {| cPrefix | tmp1 := PathNormalize( DirAddPathSep( l_cHB_INSTALL_PREFIX ) + _COMPEMBED_BASE_ + "watcom" + hb_osPathSeparator() + "binp" ), iif( hb_FileExists( tmp1 + hb_osPathSeparator() + cPrefix + "wpp386.exe" ), tmp1, NIL ) }, "win" , "watcom" , "" , {| cARCH, cCOMP, cPathBin | hbmk_COMP_Setup( cARCH, cCOMP, cPathBin + hb_osPathSeparator() + ".." ) } } )
AAdd( aCOMPDET_EMBED, { {| cPrefix | tmp1 := PathNormalize( DirAddPathSep( l_cHB_INSTALL_PREFIX ) + _COMPEMBED_BASE_ + "watcom" + hb_osPathSeparator() + "binp" ), iif( hb_FileExists( tmp1 + hb_osPathSeparator() + cPrefix + "wpp386.exe" ), tmp1, NIL ) }, "dos" , "watcom" , "" , {| cARCH, cCOMP, cPathBin | hbmk_COMP_Setup( cARCH, cCOMP, cPathBin + hb_osPathSeparator() + ".." ) } } )
AAdd( aCOMPDET_EMBED, { {| cPrefix | tmp1 := PathNormalize( DirAddPathSep( l_cHB_INSTALL_PREFIX ) + _COMPEMBED_BASE_ + "watcom" + hb_osPathSeparator() + "binp" ), iif( hb_FileExists( tmp1 + hb_osPathSeparator() + cPrefix + "wpp386.exe" ), tmp1, NIL ) }, "linux", "watcom" , "" , {| cARCH, cCOMP, cPathBin | hbmk_COMP_Setup( cARCH, cCOMP, cPathBin + hb_osPathSeparator() + ".." ) } } )
#elif defined( __PLATFORM__UNIX )