2004-12-28 10:30 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/harbour.spec
* harbour/hbgtmk.sh
* harbour/make_rpm.sh
* harbour/bin/pack_src.sh
* updated for recent changes in make process
* harbour/contrib/Makefile
* added odbc lib for Linux compilation
* harbour/contrib/btree/Makefile
* changed lib name from hb_btree to hbtree
* harbour/contrib/btree/hb_btree.api
* harbour/contrib/btree/hb_btree.c
* fixed GCC compilation in HB_TR_DEBUG mode
* harbour/contrib/hbzlib/hbzip.h
* harbour/contrib/hbzlib/include/hbzip.h
* harbour/include/hbapi.h
* harbour/include/hbapicdp.h
* harbour/include/hbapierr.h
* harbour/include/hbapifs.h
* harbour/include/hbapigt.h
* harbour/include/hbapiitm.h
* harbour/include/hbapilng.h
* harbour/include/hbapirdd.h
* harbour/include/hbcomp.h
* harbour/include/hbdate.h
* harbour/include/hbdbsort.h
* harbour/include/hberrors.h
* harbour/include/hbexprb.c
* harbour/include/hbexprop.h
* harbour/include/hbhash.h
* harbour/include/hbinit.h
* harbour/include/hbmacro.h
* harbour/include/hbpp.h
* harbour/include/hbrdddel.h
* harbour/include/hbrddntx.h
* harbour/include/hbrddsdf.h
* harbour/include/hbrddwrk.h
* harbour/include/hbset.h
* harbour/include/hbstack.h
* harbour/include/hbtrace.h
* harbour/include/hbvm.h
* harbour/include/hbvmpub.h
* changed #if defined (HB_EXTERN_C) to HB_EXTERN_BEGIN / HB_EXTERN_END
macros for easier manipulation with different ABI
* added HB_IS_BADITEM() macro for debugging
* synced CDP with xHarbour - added basic Unicode support
* synced RDD with xHarbour
* harbour/source/codepage/Makefile
* harbour/source/codepage/cdp_tpl.c
* harbour/source/codepage/cdpeldos.c
* harbour/source/codepage/cdpelwin.c
* harbour/source/codepage/cdpesdos.c
* harbour/source/codepage/cdpeswin.c
* harbour/source/codepage/cdpgedos.c
* harbour/source/codepage/cdpgewin.c
* harbour/source/codepage/cdphu852.c
* harbour/source/codepage/cdphuwin.c
* harbour/source/codepage/cdppl852.c
* harbour/source/codepage/cdppliso.c
* harbour/source/codepage/cdpplmaz.c
* harbour/source/codepage/cdpplwin.c
* harbour/source/codepage/cdppt850.c
* harbour/source/codepage/cdpptiso.c
* harbour/source/codepage/cdpru866.c
* harbour/source/codepage/cdprukoi.c
* harbour/source/codepage/cdpruwin.c
* harbour/source/codepage/cdpsl437.c
* harbour/source/codepage/cdpsl852.c
* harbour/source/codepage/cdpsliso.c
* harbour/source/codepage/cdpslwin.c
* harbour/source/codepage/cdpsrwin.c
+ harbour/source/codepage/uc1250.c
+ harbour/source/codepage/uc1251.c
+ harbour/source/codepage/uc1253.c
+ harbour/source/codepage/uc1257.c
+ harbour/source/codepage/uc737.c
+ harbour/source/codepage/uc850.c
+ harbour/source/codepage/uc852.c
+ harbour/source/codepage/uc866.c
+ harbour/source/codepage/uc88591b.c
+ harbour/source/codepage/uc8859_1.c
+ harbour/source/codepage/uc8859_2.c
+ harbour/source/codepage/uckoi8.c
+ harbour/source/codepage/uckoi8u.c
+ harbour/source/codepage/ucmaz.c
* harbour/source/rtl/cdpapi.c
* synced HB CDP API with xHarbour - added basic Unicode support
* harbour/source/common/expropt2.c
* harbour/source/common/hbstr.c
* removed unnecessary initialization to avoid BCC warnings
* harbour/source/compiler/harbour.c
* formatting
hb_compCodeBlockStop() looks like work in progress or is has
some old unused code - Ryszard, can you look at it?
* harbour/source/macro/macro.y
* removed hack for GCC and old Bison versions
* harbour/source/pp/ppcore.c
* removed unnecessary initialization to avoid BCC warnings
* harbour/source/pp/pptable.c
+ added some sets for RDD synchronization with xHarbour
* harbour/source/rdd/dbcmd.c
+ added __RDDGETTEMPALIAS
* harbour/source/rdd/dbf1.c
* harbour/source/rdd/dbfuncs.prg
* harbour/source/rdd/dbnubs.c
* harbour/source/rdd/dbstrux.prg
* harbour/source/rdd/hbdbsort.c
* harbour/source/rdd/rddord.prg
* harbour/source/rdd/workarea.c
* harbour/source/rdd/dbfcdx/dbfcdx1.c
* harbour/source/rdd/dbfdbt/dbfdbt1.c
* harbour/source/rdd/dbffpt/dbffpt1.c
* harbour/source/rdd/dbfntx/dbfntx1.c
* synchronized with xHarbour - still dbcmd.c has to be synced yet
! fixed all known bugs
Alexander, please look at DBFNTX - I hope all is correct.
* harbour/source/vm/codebloc.c
* formatting
* harbour/source/vm/fm.c
+ added HB_PARANOID_MEM_CHECK to force reallocations in hb_xrealloc
and fill allocated and freed memory with HB_MEMFILER (0xff by default)
It's for debugging only.
* harbour/source/vm/hvm.c
! fixed hb_vmTopNumber() declaration for BCC
* use hb_gcCollectAll() at HVM exit instead of hb_gcReleaseAll() to
report allocated and not freed items - It could caused that some
programs begin to report memory leaks.
* harbour/source/vm/itemapi.c
* check for HB_IS_BADITEM inside hb_itemClear() when compiled with
HB_PARANOID_MEM_CHECK for debugging
* harbour/source/vm/memvars.c
* formatting
! fixed pItem initialization in hb_memvarDetachLocal()
BTW - is this really necessary? I copy it form hb_itemUnRef()
but in fact it cannot detect all possible item reference cycles
if they appear - can they appear?
This commit is contained in:
@@ -8,6 +8,161 @@
|
||||
2002-12-01 23:12 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2004-12-28 10:30 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/harbour.spec
|
||||
* harbour/hbgtmk.sh
|
||||
* harbour/make_rpm.sh
|
||||
* harbour/bin/pack_src.sh
|
||||
* updated for recent changes in make process
|
||||
|
||||
* harbour/contrib/Makefile
|
||||
* added odbc lib for Linux compilation
|
||||
|
||||
* harbour/contrib/btree/Makefile
|
||||
* changed lib name from hb_btree to hbtree
|
||||
|
||||
* harbour/contrib/btree/hb_btree.api
|
||||
* harbour/contrib/btree/hb_btree.c
|
||||
* fixed GCC compilation in HB_TR_DEBUG mode
|
||||
|
||||
* harbour/contrib/hbzlib/hbzip.h
|
||||
* harbour/contrib/hbzlib/include/hbzip.h
|
||||
* harbour/include/hbapi.h
|
||||
* harbour/include/hbapicdp.h
|
||||
* harbour/include/hbapierr.h
|
||||
* harbour/include/hbapifs.h
|
||||
* harbour/include/hbapigt.h
|
||||
* harbour/include/hbapiitm.h
|
||||
* harbour/include/hbapilng.h
|
||||
* harbour/include/hbapirdd.h
|
||||
* harbour/include/hbcomp.h
|
||||
* harbour/include/hbdate.h
|
||||
* harbour/include/hbdbsort.h
|
||||
* harbour/include/hberrors.h
|
||||
* harbour/include/hbexprb.c
|
||||
* harbour/include/hbexprop.h
|
||||
* harbour/include/hbhash.h
|
||||
* harbour/include/hbinit.h
|
||||
* harbour/include/hbmacro.h
|
||||
* harbour/include/hbpp.h
|
||||
* harbour/include/hbrdddel.h
|
||||
* harbour/include/hbrddntx.h
|
||||
* harbour/include/hbrddsdf.h
|
||||
* harbour/include/hbrddwrk.h
|
||||
* harbour/include/hbset.h
|
||||
* harbour/include/hbstack.h
|
||||
* harbour/include/hbtrace.h
|
||||
* harbour/include/hbvm.h
|
||||
* harbour/include/hbvmpub.h
|
||||
* changed #if defined (HB_EXTERN_C) to HB_EXTERN_BEGIN / HB_EXTERN_END
|
||||
macros for easier manipulation with different ABI
|
||||
* added HB_IS_BADITEM() macro for debugging
|
||||
* synced CDP with xHarbour - added basic Unicode support
|
||||
* synced RDD with xHarbour
|
||||
|
||||
* harbour/source/codepage/Makefile
|
||||
* harbour/source/codepage/cdp_tpl.c
|
||||
* harbour/source/codepage/cdpeldos.c
|
||||
* harbour/source/codepage/cdpelwin.c
|
||||
* harbour/source/codepage/cdpesdos.c
|
||||
* harbour/source/codepage/cdpeswin.c
|
||||
* harbour/source/codepage/cdpgedos.c
|
||||
* harbour/source/codepage/cdpgewin.c
|
||||
* harbour/source/codepage/cdphu852.c
|
||||
* harbour/source/codepage/cdphuwin.c
|
||||
* harbour/source/codepage/cdppl852.c
|
||||
* harbour/source/codepage/cdppliso.c
|
||||
* harbour/source/codepage/cdpplmaz.c
|
||||
* harbour/source/codepage/cdpplwin.c
|
||||
* harbour/source/codepage/cdppt850.c
|
||||
* harbour/source/codepage/cdpptiso.c
|
||||
* harbour/source/codepage/cdpru866.c
|
||||
* harbour/source/codepage/cdprukoi.c
|
||||
* harbour/source/codepage/cdpruwin.c
|
||||
* harbour/source/codepage/cdpsl437.c
|
||||
* harbour/source/codepage/cdpsl852.c
|
||||
* harbour/source/codepage/cdpsliso.c
|
||||
* harbour/source/codepage/cdpslwin.c
|
||||
* harbour/source/codepage/cdpsrwin.c
|
||||
+ harbour/source/codepage/uc1250.c
|
||||
+ harbour/source/codepage/uc1251.c
|
||||
+ harbour/source/codepage/uc1253.c
|
||||
+ harbour/source/codepage/uc1257.c
|
||||
+ harbour/source/codepage/uc737.c
|
||||
+ harbour/source/codepage/uc850.c
|
||||
+ harbour/source/codepage/uc852.c
|
||||
+ harbour/source/codepage/uc866.c
|
||||
+ harbour/source/codepage/uc88591b.c
|
||||
+ harbour/source/codepage/uc8859_1.c
|
||||
+ harbour/source/codepage/uc8859_2.c
|
||||
+ harbour/source/codepage/uckoi8.c
|
||||
+ harbour/source/codepage/uckoi8u.c
|
||||
+ harbour/source/codepage/ucmaz.c
|
||||
* harbour/source/rtl/cdpapi.c
|
||||
* synced HB CDP API with xHarbour - added basic Unicode support
|
||||
|
||||
* harbour/source/common/expropt2.c
|
||||
|
||||
* harbour/source/common/hbstr.c
|
||||
* removed unnecessary initialization to avoid BCC warnings
|
||||
|
||||
* harbour/source/compiler/harbour.c
|
||||
* formatting
|
||||
hb_compCodeBlockStop() looks like work in progress or is has
|
||||
some old unused code - Ryszard, can you look at it?
|
||||
|
||||
* harbour/source/macro/macro.y
|
||||
* removed hack for GCC and old Bison versions
|
||||
|
||||
* harbour/source/pp/ppcore.c
|
||||
* removed unnecessary initialization to avoid BCC warnings
|
||||
|
||||
* harbour/source/pp/pptable.c
|
||||
+ added some sets for RDD synchronization with xHarbour
|
||||
|
||||
* harbour/source/rdd/dbcmd.c
|
||||
+ added __RDDGETTEMPALIAS
|
||||
|
||||
* harbour/source/rdd/dbf1.c
|
||||
* harbour/source/rdd/dbfuncs.prg
|
||||
* harbour/source/rdd/dbnubs.c
|
||||
* harbour/source/rdd/dbstrux.prg
|
||||
* harbour/source/rdd/hbdbsort.c
|
||||
* harbour/source/rdd/rddord.prg
|
||||
* harbour/source/rdd/workarea.c
|
||||
* harbour/source/rdd/dbfcdx/dbfcdx1.c
|
||||
* harbour/source/rdd/dbfdbt/dbfdbt1.c
|
||||
* harbour/source/rdd/dbffpt/dbffpt1.c
|
||||
* harbour/source/rdd/dbfntx/dbfntx1.c
|
||||
* synchronized with xHarbour - still dbcmd.c has to be synced yet
|
||||
! fixed all known bugs
|
||||
Alexander, please look at DBFNTX - I hope all is correct.
|
||||
|
||||
* harbour/source/vm/codebloc.c
|
||||
* formatting
|
||||
|
||||
* harbour/source/vm/fm.c
|
||||
+ added HB_PARANOID_MEM_CHECK to force reallocations in hb_xrealloc
|
||||
and fill allocated and freed memory with HB_MEMFILER (0xff by default)
|
||||
It's for debugging only.
|
||||
|
||||
* harbour/source/vm/hvm.c
|
||||
! fixed hb_vmTopNumber() declaration for BCC
|
||||
* use hb_gcCollectAll() at HVM exit instead of hb_gcReleaseAll() to
|
||||
report allocated and not freed items - It could caused that some
|
||||
programs begin to report memory leaks.
|
||||
|
||||
* harbour/source/vm/itemapi.c
|
||||
* check for HB_IS_BADITEM inside hb_itemClear() when compiled with
|
||||
HB_PARANOID_MEM_CHECK for debugging
|
||||
|
||||
* harbour/source/vm/memvars.c
|
||||
* formatting
|
||||
! fixed pItem initialization in hb_memvarDetachLocal()
|
||||
BTW - is this really necessary? I copy it form hb_itemUnRef()
|
||||
but in fact it cannot detect all possible item reference cycles
|
||||
if they appear - can they appear?
|
||||
|
||||
2004-12-27 10:37 UTC+0100 Ryszard Glab <rglab@imid.med.pl>
|
||||
* source/vm/memvars.c
|
||||
* changed algorithm for recycling of unused memvar values
|
||||
|
||||
@@ -268,6 +268,12 @@ $hb_collect contrib/libct/*.[ch]
|
||||
$hb_collect contrib/libct/*.prg
|
||||
$hb_collect contrib/libct/*.ch
|
||||
|
||||
# CONTRIB\LIBNF
|
||||
$hb_collect contrib/libnf/Makefile
|
||||
$hb_collect contrib/libnf/*.[ch]
|
||||
$hb_collect contrib/libnf/*.prg
|
||||
$hb_collect contrib/libnf/*.ch
|
||||
|
||||
# CONTRIB\DOT
|
||||
$hb_collect contrib/dot/*.prg
|
||||
$hb_collect contrib/dot/*.ch
|
||||
@@ -280,6 +286,15 @@ $hb_collect contrib/odbc/*.ch
|
||||
$hb_collect contrib/odbc/*.prg
|
||||
$hb_collect contrib/odbc/*.txt
|
||||
|
||||
# CONTRIB\BTREE
|
||||
$hb_collect contrib/btree/[mM]akefile*
|
||||
$hb_collect contrib/btree/*.[ch]
|
||||
$hb_collect contrib/btree/*.api
|
||||
$hb_collect contrib/btree/*.ch
|
||||
$hb_collect contrib/btree/*.prg
|
||||
$hb_collect contrib/btree/*.bat
|
||||
$hb_collect contrib/btree/doc/*.txt
|
||||
|
||||
# CONTRIB\HTMLLIB
|
||||
$hb_collect contrib/htmllib/[mM]akefile*
|
||||
$hb_collect contrib/htmllib/*.ch
|
||||
@@ -290,19 +305,18 @@ $hb_collect contrib/htmllib/*.bat
|
||||
$hb_collect contrib/libgt/[Mm]akefile*
|
||||
$hb_collect contrib/libgt/*.[ch]
|
||||
$hb_collect contrib/libgt/*.bat
|
||||
|
||||
# CONTRIB\LIBGT\DOC
|
||||
$hb_collect contrib/libgt/doc/gen*
|
||||
$hb_collect contrib/libgt/doc/lib*
|
||||
|
||||
# CONTRIB\LIBGT\DOC\EN
|
||||
$hb_collect contrib/libgt/doc/*.txt
|
||||
$hb_collect contrib/libgt/doc/en/*.txt
|
||||
|
||||
# CONTRIB\LIBMISC
|
||||
$hb_collect contrib/libmisc/[mM]akefile*
|
||||
$hb_collect contrib/libmisc/*.[ch]
|
||||
$hb_collect contrib/libmisc/*.ch
|
||||
$hb_collect contrib/libmisc/*.prg
|
||||
$hb_collect contrib/libmisc/doc/gen*
|
||||
$hb_collect contrib/libmisc/doc/lib*
|
||||
$hb_collect contrib/libmisc/doc/en/*.txt
|
||||
|
||||
# CONTRIB\SAMPLES
|
||||
$hb_collect contrib/samples/[mM]akefile*
|
||||
|
||||
@@ -53,6 +53,7 @@ ifeq ($(HB_ARCHITECTURE),linux)
|
||||
|
||||
DIRS +=\
|
||||
rdd_ads \
|
||||
odbc \
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -16,6 +16,6 @@ PRG_SOURCES=\
|
||||
PRG_HEADERS=\
|
||||
hb_btree.ch
|
||||
|
||||
LIBNAME=hb_btree
|
||||
LIBNAME=hbbtree
|
||||
|
||||
include $(TOP)$(ROOT)config/lib.cf
|
||||
|
||||
@@ -53,9 +53,7 @@
|
||||
#ifndef HB_BTREE_API
|
||||
#define HB_BTREE_API
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
extern "C" {
|
||||
#endif
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
#include "hb_btree.ch"
|
||||
|
||||
@@ -74,8 +72,6 @@ const BYTE * hb_BTreeKey( struct hb_BTree * pBTree );
|
||||
LONG hb_BTreeData( struct hb_BTree * pBTree );
|
||||
PHB_ITEM hb_BTreeDataItem( struct hb_BTree * pBTree );
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
}
|
||||
#endif
|
||||
HB_EXTERN_END
|
||||
|
||||
#endif
|
||||
|
||||
@@ -186,9 +186,7 @@ see ChangeLog 2002-07-14 14:14 UTC+0500 April White <awhite@mail.rosecom.ca>
|
||||
|
||||
#include "hb_btree.api"
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
extern "C" {
|
||||
#endif
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
#if !defined( DEBUG ) && !defined( NDEBUG )
|
||||
#define NDEBUG
|
||||
@@ -199,13 +197,15 @@ extern "C" {
|
||||
|
||||
#if defined( __GNUC__ )
|
||||
|
||||
#if 1
|
||||
#if 0
|
||||
#define STRINGIFY_2( n ) #n
|
||||
#define STRINGIFY_1( n ) STRINGIFY_2( n )
|
||||
#define SRCLINENO __FUNCTION__ " (" STRINGIFY_1( __LINE__ ) ")"
|
||||
#define FILESRCLINENO __FILE__ "." SRCLINENO
|
||||
#else
|
||||
#elif 0
|
||||
#define SRCLINENO __FUNCTION__
|
||||
#else
|
||||
#define SRCLINENO "%s (%d)", __FUNCTION__, __LINE__
|
||||
#endif
|
||||
|
||||
#else
|
||||
@@ -2017,6 +2017,4 @@ HB_INIT_SYMBOLS_BEGIN( hb_BTree_Initialize_Terminate )
|
||||
{ "hb_BTree_Terminate" , HB_FS_EXIT, {hb_BTree_Terminate} , NULL },
|
||||
HB_INIT_SYMBOLS_END( hb_BTree_Initialize_Terminate )
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
}
|
||||
#endif
|
||||
HB_EXTERN_END
|
||||
|
||||
@@ -62,9 +62,9 @@
|
||||
#include <hbvm.h>
|
||||
#include "zip.h"
|
||||
#include "unzip.h"
|
||||
#if defined(HB_EXTERN_C)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
#define filePos 1
|
||||
#define Lenght 2
|
||||
#define Method 3
|
||||
@@ -84,8 +84,7 @@ extern void hb____ChangeFileDate(char *filename,uLong dosdate,tm_unz tmu_date);
|
||||
extern int hb___MakeDir(char *szNewDirectory);
|
||||
extern int hb___GetNumbersofFilestoUnzip(char *szFile);
|
||||
extern PHB_ITEM hb___GetFilesNamesFromZip(char *szFile,BOOL iMode);
|
||||
#if defined(HB_EXTERN_C)
|
||||
}
|
||||
#endif
|
||||
|
||||
HB_EXTERN_END
|
||||
|
||||
#endif /* HB_APIEXT_H_ */
|
||||
|
||||
@@ -62,9 +62,9 @@
|
||||
#include <hbvm.h>
|
||||
#include "zip.h"
|
||||
#include "unzip.h"
|
||||
#if defined(HB_EXTERN_C)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
#define filePos 1
|
||||
#define Lenght 2
|
||||
#define Method 3
|
||||
@@ -84,8 +84,7 @@ extern void hb____ChangeFileDate(char *filename,uLong dosdate,tm_unz tmu_date);
|
||||
extern int hb___MakeDir(char *szNewDirectory);
|
||||
extern int hb___GetNumbersofFilestoUnzip(char *szFile);
|
||||
extern PHB_ITEM hb___GetFilesNamesFromZip(char *szFile,BOOL iMode);
|
||||
#if defined(HB_EXTERN_C)
|
||||
}
|
||||
#endif
|
||||
|
||||
HB_EXTERN_END
|
||||
|
||||
#endif /* HB_APIEXT_H_ */
|
||||
|
||||
@@ -10,38 +10,68 @@
|
||||
# See doc/license.txt for licensing terms.
|
||||
# ---------------------------------------------------------------
|
||||
|
||||
######################################################################
|
||||
# Conditional build:
|
||||
# --with static - link all binaries with static libs
|
||||
# --with adsrdd - build ads RDD
|
||||
# --with mysql - build mysql lib (unused)
|
||||
# --with pgsql - build pgsql lib (unused)
|
||||
# --with odbc - build build odbc lib
|
||||
# --without nf - do not build nanforum lib
|
||||
# --without x11 - do not build GTXVT and GTXWC
|
||||
# --without gpm - build GTSLN and GTCRS without GPM support
|
||||
# --without gtsln - do not build GTSLN
|
||||
######################################################################
|
||||
|
||||
######################################################################
|
||||
## Definitions.
|
||||
######################################################################
|
||||
|
||||
%define platform %(release=$(rpm -q --queryformat='.%{VERSION}' mandrake-release 2>/dev/null) && echo "mdk$release"|tr -d ".")
|
||||
# please add your distro suffix if it not belong to the one recognized below
|
||||
# and remember that order checking can be important
|
||||
|
||||
%define platform %(release=$(rpm -q --queryformat='%{VERSION}' mandrake-release 2>/dev/null) && echo "mdk$release"|tr -d ".")
|
||||
%if "%{platform}" == ""
|
||||
%define platform %(release=$(rpm -q --queryformat='.%{VERSION}' redhat-release 2>/dev/null) && echo "rh$release"|tr -d ".")
|
||||
%define platform %(release=$(rpm -q --queryformat='%{VERSION}' redhat-release 2>/dev/null) && echo "rh$release"|tr -d ".")
|
||||
%if "%{platform}" == ""
|
||||
%define platform %(release=$(rpm -q --queryformat='%{VERSION}' fedora-release 2>/dev/null) && echo "fc$release"|tr -d ".")
|
||||
%if "%{platform}" == ""
|
||||
%define platform %(release=$(rpm -q --queryformat='%{VERSION}' suse-release 2>/dev/null) && echo "sus$release"|tr -d ".")
|
||||
%if "%{platform}" == ""
|
||||
%define platform %(release=$(rpm -q --queryformat='%{VERSION}' conectiva-release 2>/dev/null) && echo "cl$release"|tr -d ".")
|
||||
%if "%{platform}" == ""
|
||||
%define platform %(release=$(rpm -q --queryformat='%{VERSION}' aurox-release 2>/dev/null) && echo "aur$release"|tr -d ".")
|
||||
%if "%{platform}" == ""
|
||||
%define platform %([ -f /etc/pld-release ] && cat /etc/pld-release|sed -e '/1/ !d' -e 's/[^0-9]//g' -e 's/^/pld/')
|
||||
%endif
|
||||
%endif
|
||||
%endif
|
||||
%endif
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%define name harbour
|
||||
%define dname Harbour
|
||||
%define version 0.44.0
|
||||
%define releasen 0
|
||||
%define prefix /usr
|
||||
%define hb_pref hb
|
||||
%define hb_gt crs
|
||||
%define hb_gpm yes
|
||||
%define hb_mt no
|
||||
%define hb_mgt no
|
||||
%define hb_lnkso yes
|
||||
%define hb_libs vm pp rtl rdd dbfdbt dbffpt dbfcdx dbfntx macro common lang codepage gtnul gtcrs gtsln gtcgi gtstd gtpca odbc ct debug profiler
|
||||
%define hb_arch export HB_ARCHITECTURE=linux
|
||||
%define hb_cc export HB_COMPILER=gcc
|
||||
%define hb_cflag export C_USR="-DHB_FM_STATISTICS_OFF -O2"
|
||||
%define hb_arch export HB_ARCHITECTURE=linux
|
||||
%define hb_cmt export HB_MT=%{hb_mt}
|
||||
%define hb_cgt export HB_GT_LIB=gt%{hb_gt}
|
||||
%define hb_cgpm export HB_GPM_MOUSE=%{hb_gpm}
|
||||
%define hb_cmgt export HB_MULTI_GT=%{hb_mgt}
|
||||
%define hb_bdir export HB_BIN_INSTALL=%{prefix}/bin
|
||||
%define hb_idir export HB_INC_INSTALL=%{prefix}/include/%{name}
|
||||
%define hb_ldir export HB_LIB_INSTALL=%{prefix}/lib/%{name}
|
||||
%define hb_env %{hb_cc} ; %{hb_cflag} ; %{hb_arch} ; %{hb_cmt} ; %{hb_cgt} ; %{hb_cgpm} ; %{hb_cmgt} ; %{hb_bdir} ; %{hb_idir} ; %{hb_ldir}
|
||||
%define hb_lflag export L_USR=%{?_with_static:-static}
|
||||
%define hb_mt export HB_MT=no
|
||||
%define hb_mgt export HB_MULTI_GT=no
|
||||
%define hb_gt export HB_GT_LIB=gtcrs
|
||||
%define hb_gpm export HB_GPM_MOUSE=%{!?_without_gpm:yes}
|
||||
%define hb_sln export HB_WITHOUT_GTSLN=%{?_without_gtsln:yes}
|
||||
%define hb_x11 export HB_WITHOUT_X11=%{?_without_x11:yes}
|
||||
%define hb_bdir export HB_BIN_INSTALL=%{_bindir}
|
||||
%define hb_idir export HB_INC_INSTALL=%{_includedir}/%{name}
|
||||
%define hb_ldir export HB_LIB_INSTALL=%{_libdir}/%{name}
|
||||
%define hb_opt export HB_GTALLEG=%{?_with_allegro:yes}
|
||||
%define hb_cmrc export HB_COMMERCE=no
|
||||
%define hb_env %{hb_arch} ; %{hb_cc} ; %{hb_cflag} ; %{hb_lflag} ; %{hb_mt} ; %{hb_gt} ; %{hb_gpm} ; %{hb_sln} ; %{hb_x11} ; %{hb_mgt} ; %{hb_bdir} ; %{hb_idir} ; %{hb_ldir} ; %{hb_opt} ; %{hb_cmrc}
|
||||
|
||||
%define hb_host www.harbour-project.org
|
||||
%define readme README.RPM
|
||||
######################################################################
|
||||
@@ -51,17 +81,17 @@
|
||||
Summary: Free software Clipper compatible compiler
|
||||
Summary(pl): Darmowy kompilator kompatybilny z jêzykiem Clipper.
|
||||
Summary(pt_BR): Um compilador Clipper compativel Gratis
|
||||
Summary(ru): ó×ÏÂÏÄÎÙÊ ËÏÍÐÉÌÑÔÏÒ, ÓÏ×ÍÅÓÔÉÍÙÊ Ó ÑÚÙËÏÍ Clipper.
|
||||
Name: %{name}
|
||||
Version: %{version}
|
||||
Release: %{releasen}%{platform}
|
||||
Prefix: %{prefix}
|
||||
Copyright: GPL (plus exception)
|
||||
Group: Development/Languages
|
||||
Vendor: %{hb_host}
|
||||
URL: http://%{hb_host}/
|
||||
Source: %{name}-%{version}.src.tar.gz
|
||||
Packager: Przemys³aw Czerpak <druzus@polbox.com> Luiz Rafael Culik Guimaraes <culikr@uol.com.br>
|
||||
BuildPrereq: gcc binutils bash bison ncurses ncurses-devel slang-devel gpm-devel
|
||||
BuildPrereq: gcc binutils bash bison ncurses ncurses-devel %{!?_without_gpm: gpm-devel}
|
||||
Requires: gcc binutils bash sh-utils %{name}-lib = %{version}
|
||||
Provides: %{name} harbour
|
||||
BuildRoot: /tmp/%{name}-%{version}-root
|
||||
@@ -81,8 +111,13 @@ zbiory nag
|
||||
|
||||
%description -l pt_BR
|
||||
%{dname} ‚ um compilador Clipper compativel para multiplas plataformas.
|
||||
Esse pacote contem um compilador ,um pr‚-processador, arquivos de cabe‡alho
|
||||
uma maquina virtual e documenta‡Æo
|
||||
Esse pacote contem um compilador, um pr‚-processador, arquivos de cabe‡alho
|
||||
uma maquina virtual e documenta‡Æo.
|
||||
|
||||
%description -l ru
|
||||
%{dname} - ÍÎÏÇÏÐÌÁÔÆÏÒÍÅÎÎÙÊ ËÏÍÐÉÌÑÔÏÒ, ÓÏ×ÍÅÓÔÉÍÙÊ Ó ÑÚÙËÏÍ CA-Clipper.
|
||||
üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ËÏÍÐÉÌÑÔÏÒ, ÐÒÅÐÒÏÃÅÓÓÏÒ, ÆÁÊÌÙ ÚÁÇÏÌÏ×ËÏ×, ×ÉÒÔÕÁÌØÎÕÀ
|
||||
ÍÁÛÉÎÕ É ÄÏËÕÍÅÎÔÁÃÉÀ.
|
||||
|
||||
|
||||
######################################################################
|
||||
@@ -92,6 +127,7 @@ uma maquina virtual e documenta
|
||||
%package lib
|
||||
Summary: Shared runtime libaries for %{dname} compiler
|
||||
Summary(pl): Dzielone bilioteki dla kompilatora %{dname}
|
||||
Summary(ru): óÏ×ÍÅÓÔÎÏ ÉÓÐÏÌØÚÕÅÍÙÅ ÂÉÂÌÉÏÔÅËÉ ÄÌÑ ËÏÍÐÉÌÑÔÏÒÁ %{dname}
|
||||
Group: Development/Languages
|
||||
Provides: lib%{name}.so lib%{name}mt.so
|
||||
|
||||
@@ -108,7 +144,12 @@ dla program
|
||||
%description -l pt_BR lib
|
||||
%{dname} ‚ um compilador compativel com o Clipper.
|
||||
Esse pacote %{dname} provem as bibliotecas compartilhadas para programas
|
||||
linkados dinamicamente
|
||||
linkados dinamicamente.
|
||||
|
||||
%description -l ru lib
|
||||
%{dname} - ËÏÍÐÉÌÑÔÏÒ, ÓÏ×ÍÅÓÔÉÍÙÊ Ó ÑÚÙËÏÍ CA-Clipper.
|
||||
üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÓÏ×ÍÅÓÔÎÏ ÉÓÐÏÌØÚÕÅÍÙÅ ÂÉÂÌÉÏÔÅËÉ %{dname},
|
||||
ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ ÒÁÂÏÔÙ ÄÉÎÁÍÉÞÅÓËÉ ÓËÏÍÐÏÎÏ×ÁÎÎÙÈ ÐÒÏÇÒÁÍÍ.
|
||||
|
||||
|
||||
######################################################################
|
||||
@@ -118,6 +159,7 @@ linkados dinamicamente
|
||||
%package static
|
||||
Summary: Static runtime libaries for %{dname} compiler
|
||||
Summary(pl): Statyczne bilioteki dla kompilatora %{dname}
|
||||
Summary(ru): óÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ ÄÌÑ ËÏÍÐÉÌÑÔÏÒÁ %{dname}
|
||||
Group: Development/Languages
|
||||
Requires: %{name} = %{version}
|
||||
|
||||
@@ -136,6 +178,38 @@ niezb
|
||||
Esse pacote %{dname} provem as bibliotecas de run time staticas para linkagem
|
||||
dos os programas
|
||||
|
||||
%description -l ru static
|
||||
%{dname} - ËÏÍÐÉÌÑÔÏÒ, ÓÏ×ÍÅÓÔÉÍÙÊ Ó ÑÚÙËÏÍ CA-Clipper.
|
||||
üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ ËÏÍÐÉÌÑÔÏÒÁ %{dname},
|
||||
ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ ÓÔÁÔÉÞÅÓËÏÊ ËÏÍÐÏÎÏ×ËÉ ÐÒÏÇÒÁÍÍ.
|
||||
|
||||
|
||||
%package contrib
|
||||
Summary: Contrib runtime libaries for %{dname} compiler
|
||||
Summary(pl): Bilioteki z drzewa contrib dla kompilatora %{dname}
|
||||
Summary(pt_BR): Libs contrib para %{dname}
|
||||
Summary(ru): âÉÂÌÉÏÔÅËÉ ÉÚ ÄÅÒÅ×Á contrib ÄÌÑ ËÏÍÐÉÌÑÔÏÒÁ %{dname}
|
||||
Group: Development/Languages
|
||||
Requires: %{name} = %{version}
|
||||
|
||||
%description contrib
|
||||
%{dname} is a Clipper compatible compiler.
|
||||
This package provides %{dname} contrib libraries for program linking.
|
||||
|
||||
%description -l pl contrib
|
||||
%{dname} to kompatybilny z jêzykiem CA-Clipper kompilator.
|
||||
Ten pakiet udostêpnia statyczne bilioteki z drzewa contrib dla
|
||||
kompilatora %{dname}.
|
||||
|
||||
%description -l pt_BR contrib
|
||||
%{dname} ‚ um compilador compativel com o clippe.
|
||||
Esse pacote %{dname} provem as bibliotecas contrib para linkagem
|
||||
dos programas.
|
||||
|
||||
%description -l ru contrib
|
||||
%{dname} - ËÏÍÐÉÌÑÔÏÒ, ÓÏ×ÍÅÓÔÉÍÙÊ Ó ÑÚÙËÏÍ CA-Clipper.
|
||||
üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ %{dname} ÉÚ ÄÅÒÅ×Á contrib.
|
||||
|
||||
|
||||
######################################################################
|
||||
## PP
|
||||
@@ -144,6 +218,7 @@ dos os programas
|
||||
%package pp
|
||||
Summary: Clipper/Harbour/xBase compatible Pre-Processor, DOT prompt and interpreter
|
||||
Summary(pl): Kompatybilny z Clipper/Harbour/xBase Preprocesor i interpreter
|
||||
Summary(ru): óÏ×ÍÅÓÔÉÍÙÊ Ó Clipper/Harbour/xBase ÐÒÅÐÒÏÃÅÓÓÏÒ É ÉÎÔÅÒÐÒÅÔÁÔÏÒ
|
||||
Copyright: GPL
|
||||
Group: Development/Languages
|
||||
Requires: %{name} = %{version}
|
||||
@@ -182,6 +257,18 @@ uma da outra.
|
||||
Voce pode escrever seus proprios scritps em .prg ao adicionar as seus arquivos
|
||||
.prg #!/usr/bin/pprun
|
||||
|
||||
%description -l ru pp
|
||||
%{dname} - ËÏÍÐÉÌÑÔÏÒ, ÓÏ×ÍÅÓÔÉÍÙÊ Ó ÑÚÙËÏÍ CA-Clipper.
|
||||
üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÐÒÅÐÒÏÃÅÓÓÏÒ %{dname}, ËÏÔÏÒÙÊ ÓÏÓÔÏÉÔ ÉÚ ÔÒÅÈ ÔÅÓÎÏ
|
||||
Ó×ÑÚÁÎÎÙÈ ÞÁÓÔÅÊ.
|
||||
1. 100%-ÓÏ×ÍÅÓÔÉÍÙÊ Ó Clipper ÐÒÅÐÒÏÃÅÓÓÏÒ (Ó ÎÅËÏÔÏÒÙÍÉ ÒÁÓÛÉÒÅÎÉÑÍÉ).
|
||||
2. DOT Prompt, × ËÏÔÏÒÏÍ ÍÏÖÎÏ ÉÓÐÏÌØÚÏ×ÁÔØ ÂÏÌØÛÉÎÓÔ×Ï ËÏÎÓÔÒÕËÃÉÊ Clipper.
|
||||
3. ëÒÏÍÅ ÔÏÇÏ, PP - ÏÇÒÁÎÉÞÅÎÎÙÊ ÉÎÔÅÒÐÒÅÔÁÔÏÒ Clipper. úÁ ÉÓËÌÀÞÅÎÉÅÍ
|
||||
ÎÅÓËÏÌØËÉÈ ÏÐÉÓÁÎÎÙÈ ÏÇÒÁÎÉÞÅÎÉÊ, ÏÎ ÍÏÖÅÔ ×ÙÐÏÌÎÑÔØ ÂÏÌØÛÉÎÓÔ×Ï
|
||||
ËÏÎÓÔÒÕËÃÉÊ Harbour. íÏÖÎÏ ÓÏÚÄÁ×ÁÔØ ÓÏÂÓÔ×ÅÎÎÙÅ xBase-ÓËÒÉÐÔÙ ÐÕÔÅÍ
|
||||
ÄÏÂÁ×ÌÅÎÉÑ × ÎÁÞÁÌÏ .prg-ÆÁÊÌÁ ÓÔÒÏËÉ:
|
||||
#!/usr/bin/pprun
|
||||
|
||||
|
||||
######################################################################
|
||||
## Preperation.
|
||||
@@ -198,12 +285,7 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%build
|
||||
%{hb_env}
|
||||
|
||||
make
|
||||
|
||||
# build CT lib
|
||||
pushd contrib/libct
|
||||
make
|
||||
popd
|
||||
make -r
|
||||
|
||||
######################################################################
|
||||
## Install.
|
||||
@@ -215,7 +297,9 @@ popd
|
||||
|
||||
%{hb_env}
|
||||
|
||||
_DEFAULT_INC_DIR=$HB_INC_INSTALL
|
||||
export _DEFAULT_BIN_DIR=$HB_BIN_INSTALL
|
||||
export _DEFAULT_INC_DIR=$HB_INC_INSTALL
|
||||
export _DEFAULT_LIB_DIR=$HB_LIB_INSTALL
|
||||
export HB_BIN_INSTALL=$RPM_BUILD_ROOT/$HB_BIN_INSTALL
|
||||
export HB_INC_INSTALL=$RPM_BUILD_ROOT/$HB_INC_INSTALL
|
||||
export HB_LIB_INSTALL=$RPM_BUILD_ROOT/$HB_LIB_INSTALL
|
||||
@@ -223,330 +307,18 @@ export HB_LIB_INSTALL=$RPM_BUILD_ROOT/$HB_LIB_INSTALL
|
||||
mkdir -p $HB_BIN_INSTALL
|
||||
mkdir -p $HB_INC_INSTALL
|
||||
mkdir -p $HB_LIB_INSTALL
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/lib
|
||||
|
||||
make -i install
|
||||
make -r -i install
|
||||
|
||||
# install CT lib
|
||||
pushd contrib/libct
|
||||
make -i install
|
||||
popd
|
||||
|
||||
# build fm lib with memory statistic
|
||||
pushd source/vm
|
||||
TMP_C_USR=$C_USR
|
||||
C_USR=${C_USR//-DHB_FM_STATISTICS_OFF/-DHB_PARANOID_MEM_CHECK}
|
||||
rm -f fm.o
|
||||
make fm.o
|
||||
ar -r $HB_LIB_INSTALL/libfm.a fm.o
|
||||
rm -f fm.o
|
||||
if [ $HB_MT = "MT" ]; then
|
||||
make fm.o 'HB_LIBCOMP_MT=YES'
|
||||
ar -r $HB_LIB_INSTALL/libfmmt.a fm.o
|
||||
rm -f fm.o
|
||||
fi
|
||||
C_USR=$TMP_C_USR
|
||||
popd
|
||||
[ "%{?_without_gtsln:1}" ] && rm -f $HB_LIB_INSTALL/libgtsln.a
|
||||
[ "%{?_with_odbc:1}" ] || rm -f $HB_LIB_INSTALL/libhbodbc.a
|
||||
[ "%{?_with_allegro:1}" ] || rm -f $HB_LIB_INSTALL/libgtalleg.a
|
||||
|
||||
# Keep the size of the binaries to a minimim.
|
||||
strip $HB_BIN_INSTALL/harbour
|
||||
# Keep the size of the libraries to a minimim.
|
||||
strip --strip-debug $HB_LIB_INSTALL/*
|
||||
|
||||
install -m755 bin/hb-mkslib.sh $HB_BIN_INSTALL/hb-mkslib
|
||||
|
||||
pushd $HB_LIB_INSTALL
|
||||
LIBS=""
|
||||
LIBSMT=""
|
||||
for l in %{hb_libs}
|
||||
do
|
||||
case $l in
|
||||
debug|profiler) ;;
|
||||
*)
|
||||
ls="lib${l}.a"
|
||||
if [ -f lib${l}mt.a ]
|
||||
then
|
||||
lm="lib${l}mt.a"
|
||||
else
|
||||
lm="${ls}"
|
||||
fi
|
||||
if [ "${HB_MULTI_GT}" = "yes" ] || \
|
||||
[ "${l#gt}" = "${l}" ] || \
|
||||
[ "${l}" == "${HB_GT_LIB}" ]
|
||||
then
|
||||
if [ -f $ls ]
|
||||
then
|
||||
LIBS="$LIBS $ls"
|
||||
fi
|
||||
if [ -f $lm ]
|
||||
then
|
||||
LIBSMT="$LIBSMT $lm"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
$HB_BIN_INSTALL/hb-mkslib lib%{name}-%{version}.so $LIBS
|
||||
[ $HB_MT != "MT" ] || $HB_BIN_INSTALL/hb-mkslib lib%{name}mt-%{version}.so $LIBSMT
|
||||
for l in lib%{name}-%{version}.so lib%{name}mt-%{version}.so
|
||||
do
|
||||
if [ -f $l ]
|
||||
then
|
||||
ll=${l%%-%{version}.so}.so
|
||||
ln -s $l $ll && ln -s %{name}/$l $RPM_BUILD_ROOT/usr/lib/$ll
|
||||
fi
|
||||
done
|
||||
#export LD_LIBRARY_PATH="$HB_LIB_INSTALL:$LD_LIBRARY_PATH"
|
||||
popd
|
||||
|
||||
# Add a harbour compiler wrapper.
|
||||
cat > $HB_BIN_INSTALL/%{hb_pref}-build <<EOF
|
||||
#!/bin/bash
|
||||
|
||||
if [ \$# == 0 ]; then
|
||||
echo "syntax: \$0 [<options,...>] <file>[.prg|.o]
|
||||
|
||||
\"%{hb_pref}cc\", \"%{hb_pref}cmp\", \"%{hb_pref}lnk\" and \"%{hb_pref}mk\" parameters:
|
||||
-o<outputfilename> # output file name
|
||||
\"%{hb_pref}lnk\" and \"%{hb_pref}mk\" parameters:
|
||||
-static # link with static %{dname} libs
|
||||
-fullstatic # link with all static libs
|
||||
-shared # link with shared libs (default)
|
||||
-mt # link with multi-thread libs
|
||||
-gt<hbgt> # link with <hbgt> GT driver, can be repeated to
|
||||
# link with more GTs. The first one will be
|
||||
# the default at runtime
|
||||
-fmstat # link with the memory statistics lib
|
||||
-nofmstat # do not link with the memory statistics lib (default)
|
||||
-main=<main_func> # set the name of main program function/procedure.
|
||||
# if not set then 'MAIN' is used or if it doesn't
|
||||
# exist the name of first public function/procedure
|
||||
# in first linked object module (link)
|
||||
"
|
||||
exit 1
|
||||
elif [ "\$*" == "mk-links" ]; then
|
||||
DIR="\${0%/*}"
|
||||
NAME="\${0##*/}"
|
||||
if [ "\${DIR}" != "\${NAME}" ]; then
|
||||
for n in %{hb_pref}cc %{hb_pref}cmp %{hb_pref}mk %{hb_pref}lnk gharbour harbour-link; do
|
||||
ln -sf "\${NAME}" "\${DIR}/\${n}"
|
||||
done
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
|
||||
## default parameters
|
||||
HB_STATIC="no"
|
||||
HB_MT=""
|
||||
HB_GT="%{hb_gt}"
|
||||
HB_MG="%{hb_mgt}"
|
||||
|
||||
HB_GT_REQ=""
|
||||
HB_FM_REQ=""
|
||||
HB_MAIN_FUNC=""
|
||||
_TMP_FILE_="/tmp/hb-build-\$USER-\$\$.c"
|
||||
|
||||
## parse params
|
||||
P=( "\$@" ); n=0; DIROUT="."; FILEOUT=""
|
||||
while [ \$n -lt \${#P[@]} ]; do
|
||||
v=\${P[\$n]}; p=""
|
||||
case "\$v" in
|
||||
-o*)
|
||||
d="\${v#-o}"; p="\${v}"
|
||||
if [ -d "\${d}" ]; then
|
||||
DIROUT="\${d%/}"
|
||||
elif [ -d "\${d%/*}" ]; then
|
||||
DIROUT="\${d%/*}"; FILEOUT="\${d##*/}"; p="-o\${d%.*}"
|
||||
elif [ -n "\${d}" ]; then
|
||||
FILEOUT="\${d}"; p="-o\${d%.*}"
|
||||
fi ;;
|
||||
-static) HB_STATIC="yes" ;;
|
||||
-fullstatic) HB_STATIC="full" ;;
|
||||
-shared) HB_STATIC="no" ;;
|
||||
-mt) HB_MT="MT" ;;
|
||||
-gt*) HB_GT_REQ="\${HB_GT_REQ} \${v#-gt}" ;;
|
||||
-fmstat) HB_FM_REQ="STAT" ;;
|
||||
-nofmstat) HB_FM_REQ="NOSTAT" ;;
|
||||
-main=*) HB_MAIN_FUNC="\${v#*=}" ;;
|
||||
-*) p="\${v}" ;;
|
||||
*) [ -z \${FILEOUT} ] && FILEOUT="\${v##*/}"; p="\${v}" ;;
|
||||
esac
|
||||
[ -n "\$p" ] && PP[\$n]="\$p"
|
||||
n=\$[\$n + 1]
|
||||
done
|
||||
P=( "\${PP[@]}" )
|
||||
|
||||
case "\${HB_MT}" in
|
||||
[Mm][Tt]|[Yy][Ee][Ss]|1) HB_MT="MT";;
|
||||
*) HB_MT="";;
|
||||
esac
|
||||
|
||||
SYSTEM_LIBS="-lm -lncurses -lslang -lgpm"
|
||||
# use pthread system library for MT programs
|
||||
if [ "\${HB_MT}" = "MT" ]; then
|
||||
SYSTEM_LIBS="-lpthread \${SYSTEM_LIBS}"
|
||||
fi
|
||||
|
||||
HB_GT_STAT=""
|
||||
[ -z "\${HB_GT_REQ}" ] && HB_GT_REQ="\${HB_GT}"
|
||||
if [ "\${HB_MG}" != "yes" ]; then
|
||||
[ "\${HB_STATIC}" = "yes" ] && HB_GT_STAT=\`echo \${HB_GT_REQ}|tr A-Z a-z\`
|
||||
HB_GT_REQ=""
|
||||
else
|
||||
HB_GT_REQ=\`echo \${HB_GT_REQ}|tr a-z A-Z\`
|
||||
fi
|
||||
HB_MAIN_FUNC=\`echo \${HB_MAIN_FUNC}|tr a-z A-Z\`
|
||||
|
||||
# set environment variables
|
||||
%{hb_arch}
|
||||
%{hb_cc}
|
||||
[ -z "\${HB_BIN_INSTALL}" ] && %{hb_bdir}
|
||||
[ -z "\${HB_INC_INSTALL}" ] && %{hb_idir}
|
||||
[ -z "\${HB_LIB_INSTALL}" ] && %{hb_ldir}
|
||||
|
||||
# be sure that %{name} binaries are in your path
|
||||
export PATH="\${HB_BIN_INSTALL}:\${PATH}"
|
||||
|
||||
HB_PATHS="-I\${HB_INC_INSTALL}"
|
||||
GCC_PATHS="\${HB_PATHS} -L\${HB_LIB_INSTALL}"
|
||||
LINK_OPT=""
|
||||
if [ "\${HB_STATIC}" = "full" ]; then
|
||||
LINK_OPT="\${LINK_OPT} -static"
|
||||
HB_STATIC="yes"
|
||||
fi
|
||||
|
||||
HARBOUR_LIBS=""
|
||||
if [ "\${HB_STATIC}" = "yes" ]; then
|
||||
libs="%{hb_libs}"
|
||||
else
|
||||
l="%{name}"
|
||||
[ "\${HB_MT}" = "MT" ] && [ -f "\${HB_LIB_INSTALL}/lib\${l}mt.so" ] && l="\${l}mt"
|
||||
[ -f "\${HB_LIB_INSTALL}/lib\${l}.so" ] && HARBOUR_LIBS="\${HARBOUR_LIBS} -l\${l}"
|
||||
libs="debug profiler"
|
||||
fi
|
||||
for l in \${libs}
|
||||
do
|
||||
if [ "\${HB_MG}" = "yes" ] || [ "\${l#gt}" = "\${l}" ] || [ "\${l}" == "gt\${HB_GT_STAT}" ]; then
|
||||
[ "\${HB_MT}" = "MT" ] && [ -f "\${HB_LIB_INSTALL}/lib\${l}mt.a" ] && l="\${l}mt"
|
||||
[ -f "\${HB_LIB_INSTALL}/lib\${l}.a" ] && HARBOUR_LIBS="\${HARBOUR_LIBS} -l\${l}"
|
||||
fi
|
||||
done
|
||||
HARBOUR_LIBS="-Wl,--start-group \${HARBOUR_LIBS} -Wl,--end-group"
|
||||
l="fm"
|
||||
[ "\${HB_MT}" = "MT" ] && [ -f "\${HB_LIB_INSTALL}/lib\${l}mt.a" ] && l="\${l}mt"
|
||||
if [ -f "\${HB_LIB_INSTALL}/lib\${l}.a" ]; then
|
||||
if [ "\${HB_STATIC}" = "yes" ] && [ "\${HB_FM_REQ}" = "STAT" ]; then
|
||||
HARBOUR_LIBS="-l\${l} \${HARBOUR_LIBS}"
|
||||
else
|
||||
HARBOUR_LIBS="\${HARBOUR_LIBS} -l\${l}"
|
||||
fi
|
||||
fi
|
||||
|
||||
FOUTC="\${DIROUT}/\${FILEOUT%.*}.c"
|
||||
FOUTO="\${DIROUT}/\${FILEOUT%.*}.o"
|
||||
FOUTE="\${DIROUT}/\${FILEOUT%.[Pp][Rr][Gg]}"
|
||||
FOUTE="\${FOUTE%.[oc]}"
|
||||
|
||||
hb_cc()
|
||||
{
|
||||
harbour "\$@" \${HB_PATHS} && [ -f "\${FOUTC}" ]
|
||||
}
|
||||
|
||||
hb_link()
|
||||
{
|
||||
if [ -n "\${HB_MAIN_FUNC}" ]; then
|
||||
HB_MAIN_FUNC="@\${HB_MAIN_FUNC}"
|
||||
elif [ -f "\${FOUTO}" ]; then
|
||||
HB_MAIN_FUNC=\`hb_lnk_main "\${FOUTO}"\`
|
||||
fi
|
||||
if [ -n "\${HB_GT_REQ}" ] || [ -n "\${HB_FM_REQ}" ] || [ -n "\${HB_MAIN_FUNC}" ]; then
|
||||
hb_lnk_request > \${_TMP_FILE_} && \\
|
||||
gcc "\$@" "\${_TMP_FILE_}" \${LINK_OPT} \${GCC_PATHS} \${HARBOUR_LIBS} \${SYSTEM_LIBS} -o "\${FOUTE}"
|
||||
else
|
||||
gcc "\$@" \${LINK_OPT} \${GCC_PATHS} \${HARBOUR_LIBS} \${SYSTEM_LIBS} -o "\${FOUTE}"
|
||||
fi
|
||||
}
|
||||
|
||||
hb_cmp()
|
||||
{
|
||||
hb_cc "\$@" && \\
|
||||
gcc -g -c "\${FOUTC}" -o "\${FOUTO}" \${GCC_PATHS} && \\
|
||||
rm -f "\${FOUTC}"
|
||||
}
|
||||
|
||||
hb_lnk_request()
|
||||
{
|
||||
echo "#include \\"hbapi.h\\""
|
||||
if [ "\${HB_STATIC}" = "yes" ] || [ -n "\${HB_FM_REQ}" ]; then
|
||||
for gt in \${HB_GT_REQ}; do
|
||||
echo "extern HB_FUNC( HB_GT_\${gt} );"
|
||||
done
|
||||
if [ -n "\${HB_FM_REQ}" ]; then
|
||||
echo "extern HB_FUNC( HB_FM_\${HB_FM_REQ} );"
|
||||
fi
|
||||
echo "void hb_lnk_ForceLink_build( void )"
|
||||
echo "{"
|
||||
for gt in \${HB_GT_REQ}; do
|
||||
echo " HB_FUNCNAME( HB_GT_\${gt} )();"
|
||||
done
|
||||
if [ -n "\${HB_FM_REQ}" ]; then
|
||||
echo " HB_FUNCNAME( HB_FM_\${HB_FM_REQ} )();"
|
||||
fi
|
||||
echo "}"
|
||||
fi
|
||||
gt="\${HB_GT_REQ%%%% *}"
|
||||
if [ -n "\$gt" ] || [ -n "\${HB_MAIN_FUNC}" ]; then
|
||||
echo "#include \\"hbinit.h\\""
|
||||
echo "extern char * s_defaultGT;"
|
||||
echo "extern char * s_pszLinkedMain;"
|
||||
echo "HB_CALL_ON_STARTUP_BEGIN( hb_lnk_SetDefault_build )"
|
||||
if [ -n "\$gt" ]; then
|
||||
echo " s_defaultGT = \\"\$gt\\";"
|
||||
fi
|
||||
if [ -n "\${HB_MAIN_FUNC}" ]; then
|
||||
echo " s_pszLinkedMain = \\"\${HB_MAIN_FUNC}\\";"
|
||||
fi
|
||||
echo "HB_CALL_ON_STARTUP_END( hb_lnk_SetDefault_build )"
|
||||
fi
|
||||
}
|
||||
|
||||
hb_lnk_main()
|
||||
{
|
||||
# (nm \$1 -g -n --defined-only|sed -e '/HB_FUN_/ ! d' -e 's/^[0-9a-fA-F]* T HB_FUN_//'|head -1|grep -v '^MAIN\$')2>/dev/null
|
||||
(nm \$1 -n --defined-only|sed -e '/HB_FUN_/ ! d' -e 's/^[0-9a-fA-F]* [Tt] HB_FUN_//'|head -1|grep -v '^MAIN\$')2>/dev/null
|
||||
}
|
||||
|
||||
hb_cleanup()
|
||||
{
|
||||
rm -f "\${_TMP_FILE_}"
|
||||
}
|
||||
|
||||
trap hb_cleanup EXIT &>/dev/null
|
||||
|
||||
## get basename
|
||||
HB="\${0##*/}"
|
||||
|
||||
case "\${HB}" in
|
||||
*cc)
|
||||
hb_cc "\${P[@]}"
|
||||
;;
|
||||
*cmp|gharbour)
|
||||
hb_cmp "\${P[@]}"
|
||||
;;
|
||||
*lnk|harbour-link)
|
||||
hb_link "\${P[@]}"
|
||||
;;
|
||||
*mk)
|
||||
hb_cmp "\${P[@]}" && \\
|
||||
hb_link "\${FOUTO}" && \\
|
||||
strip "\${FOUTE}" && \\
|
||||
rm -f "\${FOUTO}"
|
||||
;;
|
||||
esac
|
||||
EOF
|
||||
chmod 755 $HB_BIN_INSTALL/%{hb_pref}-build
|
||||
$HB_BIN_INSTALL/%{hb_pref}-build mk-links
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/harbour
|
||||
#install -m644 source/rtl/gtcrs/hb-charmap.def $RPM_BUILD_ROOT/etc/harbour/hb-charmap.def
|
||||
cat > $RPM_BUILD_ROOT/etc/harbour.cfg <<EOF
|
||||
@@ -565,15 +337,16 @@ install -m644 rp_dot.ch $HB_INC_INSTALL/
|
||||
popd
|
||||
|
||||
# check if we should rebuild tools with shared libs
|
||||
if [ "%{hb_lnkso}" = yes ]
|
||||
if [ "%{!?_with_static:1}" ]
|
||||
then
|
||||
export L_USR="-L${HB_LIB_INSTALL} -l%{name} -lncurses -lslang -lgpm"
|
||||
unset HB_GTALLEG
|
||||
export L_USR="-L${HB_LIB_INSTALL} -l%{name} -lncurses %{!?_without_gtsln:-lslang} %{!?_without_gpm:-lgpm} %{!?_without_x11:-L/usr/X11R6/%{_lib} -lX11}"
|
||||
|
||||
for utl in hbmake hbrun hbpp hbdoc
|
||||
do
|
||||
pushd utils/${utl}
|
||||
rm -fR "./${HB_ARCHITECTURE}"
|
||||
make install
|
||||
make -r install
|
||||
strip ${HB_BIN_INSTALL}/${utl}
|
||||
popd
|
||||
done
|
||||
@@ -585,7 +358,7 @@ rm -f ${HB_BIN_INSTALL}/hbdoc ${HB_BIN_INSTALL}/hbtest
|
||||
# Create a README file for people using this RPM.
|
||||
cat > doc/%{readme} <<EOF
|
||||
This RPM distribution of %{dname} includes extra commands to make compiling
|
||||
and linking with harbour a little easier. There are compiler and linker
|
||||
and linking with %{dname} a little easier. There are compiler and linker
|
||||
wrappers called "%{hb_pref}cc", "%{hb_pref}cmp", "%{hb_pref}lnk" and "%{hb_pref}mk".
|
||||
|
||||
"%{hb_pref}cc" is a wrapper to the harbour compiler only. It only sets environment
|
||||
@@ -724,40 +497,66 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%doc doc/es/
|
||||
|
||||
%dir /etc/harbour
|
||||
/etc/harbour.cfg
|
||||
#/etc/harbour/hb-charmap.def
|
||||
%{prefix}/bin/harbour
|
||||
%{prefix}/bin/hb-mkslib
|
||||
%{prefix}/bin/%{hb_pref}-build
|
||||
%{prefix}/bin/%{hb_pref}cc
|
||||
%{prefix}/bin/%{hb_pref}cmp
|
||||
%{prefix}/bin/%{hb_pref}lnk
|
||||
%{prefix}/bin/%{hb_pref}mk
|
||||
%{prefix}/bin/gharbour
|
||||
%{prefix}/bin/harbour-link
|
||||
#%{prefix}/bin/hbtest
|
||||
%{prefix}/bin/hbrun
|
||||
%{prefix}/bin/hbpp
|
||||
%{prefix}/bin/hbmake
|
||||
%dir %{prefix}/include/%{name}
|
||||
%{prefix}/include/%{name}/*
|
||||
%verify(not md5 mtime) %config /etc/harbour.cfg
|
||||
#%verify(not md5 mtime) %config /etc/harbour/hb-charmap.def
|
||||
%{_bindir}/harbour
|
||||
%{_bindir}/hb-mkslib
|
||||
%{_bindir}/%{hb_pref}-build
|
||||
%{_bindir}/%{hb_pref}cc
|
||||
%{_bindir}/%{hb_pref}cmp
|
||||
%{_bindir}/%{hb_pref}lnk
|
||||
%{_bindir}/%{hb_pref}mk
|
||||
%{_bindir}/gharbour
|
||||
%{_bindir}/harbour-link
|
||||
#%{_bindir}/hbtest
|
||||
%{_bindir}/hbrun
|
||||
%{_bindir}/hbpp
|
||||
%{_bindir}/hbmake
|
||||
%dir %{_includedir}/%{name}
|
||||
%{_includedir}/%{name}/*
|
||||
|
||||
%files static
|
||||
%defattr(-,root,root,755)
|
||||
%dir %{prefix}/lib/%{name}
|
||||
%{prefix}/lib/%{name}/*.a
|
||||
%dir %{_libdir}/%{name}
|
||||
%{_libdir}/%{name}/libcodepage.a
|
||||
%{_libdir}/%{name}/libcommon.a
|
||||
%{_libdir}/%{name}/libdb*.a
|
||||
%{_libdir}/%{name}/libdebug.a
|
||||
%{_libdir}/%{name}/libfm*.a
|
||||
%{_libdir}/%{name}/libgt*.a
|
||||
%{_libdir}/%{name}/liblang.a
|
||||
%{_libdir}/%{name}/libmacro*.a
|
||||
%{_libdir}/%{name}/libnulsys*.a
|
||||
%{_libdir}/%{name}/libpp*.a
|
||||
%{_libdir}/%{name}/librdd*.a
|
||||
%{_libdir}/%{name}/librtl*.a
|
||||
%{_libdir}/%{name}/libsamples.a
|
||||
%{_libdir}/%{name}/libvm*.a
|
||||
|
||||
%files contrib
|
||||
%defattr(-,root,root,755)
|
||||
%dir %{_libdir}/%{name}
|
||||
%{?_with_odbc: %{_libdir}/%{name}/libhbodbc.a}
|
||||
%{!?_without_nf: %{_libdir}/%{name}/libnf*.a}
|
||||
%{?_with_adsrdd: %{_libdir}/%{name}/librddads*.a}
|
||||
#%{?_with_mysql: %{_libdir}/%{name}/libmysql*.a}
|
||||
#%{?_with_pgsql: %{_libdir}/%{name}/libpgsql*.a}
|
||||
%{_libdir}/%{name}/libhbbtree.a
|
||||
%{_libdir}/%{name}/libhtml.a
|
||||
%{_libdir}/%{name}/libmisc.a
|
||||
%{_libdir}/%{name}/libct.a
|
||||
|
||||
%files lib
|
||||
%defattr(-,root,root,755)
|
||||
%dir %{prefix}/lib/%{name}
|
||||
%{prefix}/lib/%{name}/*.so
|
||||
%{prefix}/lib/*.so
|
||||
%dir %{_libdir}/%{name}
|
||||
%{_libdir}/%{name}/*.so
|
||||
%{_libdir}/*.so
|
||||
|
||||
%files pp
|
||||
%defattr(-,root,root,755)
|
||||
%doc contrib/dot/pp.txt
|
||||
%{prefix}/bin/pp
|
||||
%{prefix}/bin/pprun
|
||||
%{_bindir}/pp
|
||||
%{_bindir}/pprun
|
||||
|
||||
######################################################################
|
||||
## Spec file Changelog.
|
||||
|
||||
@@ -14,16 +14,16 @@
|
||||
|
||||
# ssh is not necessary for anonymous access on SourceForge
|
||||
# export CVS_RSH=ssh
|
||||
export CVSROOT=":pserver:anonymous@cvs.harbour-project.sourceforge.net:/cvsroot/harbour"
|
||||
export CVSROOT=":pserver:anonymous@cvs.sourceforge.net:/cvsroot/harbour-project"
|
||||
export PROJECT=harbour
|
||||
|
||||
test_reqrpm()
|
||||
{
|
||||
rpm -q "$1" &> /dev/null
|
||||
rpm -q --whatprovides "$1" &> /dev/null
|
||||
}
|
||||
|
||||
TOINST_LST=""
|
||||
for i in cvs gcc binutils bash bison ncurses ncurses-devel slang-devel gpm-devel
|
||||
for i in cvs gcc binutils bash bison ncurses ncurses-devel
|
||||
do
|
||||
test_reqrpm "$i" || TOINST_LST="${TOINST_LST} $i"
|
||||
done
|
||||
|
||||
@@ -60,9 +60,7 @@
|
||||
|
||||
#include "hbvmpub.h"
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
extern "C" {
|
||||
#endif
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
#define HB_MAX_MACRO_ARGS 16
|
||||
|
||||
@@ -108,6 +106,7 @@ extern "C" {
|
||||
#define HB_IS_NUMERIC( p ) ( ( p )->type & HB_IT_NUMERIC )
|
||||
#define HB_IS_NUMINT( p ) ( ( p )->type & HB_IT_NUMINT )
|
||||
#define HB_IS_COMPLEX( p ) ( ( p )->type & HB_IT_COMPLEX )
|
||||
#define HB_IS_BADITEM( p ) ( ( p )->type & HB_IT_COMPLEX && ( p )->type & ~( HB_IT_COMPLEX | HB_IT_MEMOFLAG ) )
|
||||
|
||||
#if defined(__GNUC__)
|
||||
# define HB_ITEM_NIL { HB_IT_NIL, {} }
|
||||
@@ -293,9 +292,9 @@ typedef struct _HB_CODEBLOCK
|
||||
|
||||
typedef struct _HB_VALUE
|
||||
{
|
||||
HB_ITEM_PTR pVarItem;
|
||||
ULONG counter;
|
||||
HB_HANDLE hPrevMemvar;
|
||||
HB_ITEM_PTR pVarItem;
|
||||
HB_COUNTER counter;
|
||||
HB_HANDLE hPrevMemvar;
|
||||
} HB_VALUE, * PHB_VALUE, * HB_VALUE_PTR;
|
||||
|
||||
typedef struct _HB_NESTED_CLONED
|
||||
@@ -574,7 +573,7 @@ extern void hb_memvarNewParameter( PHB_SYMB pSymbol, PHB_ITEM pValue );
|
||||
extern char * hb_memvarGetStrValuePtr( char * szVarName, ULONG *pulLen );
|
||||
extern void hb_memvarCreateFromItem( PHB_ITEM pMemvar, BYTE bScope, PHB_ITEM pValue );
|
||||
extern int hb_memvarScope( char * szVarName, ULONG ulLength ); /* retrieve scope of a dynamic variable symbol */
|
||||
extern HB_ITEM_PTR hb_memvarDetachLocal( HB_ITEM_PTR pLocal ); /* Detach a local variable from the eval stack */
|
||||
extern HB_ITEM_PTR hb_memvarDetachLocal( HB_ITEM_PTR pLocal ); /* Detach a local variable from the eval stack */
|
||||
|
||||
/* console I/O subsystem */
|
||||
extern void hb_conInit( void ); /* initialize the console API system */
|
||||
@@ -695,8 +694,6 @@ extern char * hb_getenv( const char * name );
|
||||
/* Dummy define for start */
|
||||
#define HB_I_( x ) x
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
}
|
||||
#endif
|
||||
HB_EXTERN_END
|
||||
|
||||
#endif /* HB_APIEXT_H_ */
|
||||
|
||||
@@ -50,6 +50,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef HB_CDP_SUPPORT_OFF
|
||||
|
||||
#ifndef HB_APICDP_H_
|
||||
#define HB_APICDP_H_
|
||||
|
||||
@@ -57,23 +59,29 @@
|
||||
#include "hbapi.h"
|
||||
#include "hbinit.h"
|
||||
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
/* This hack is needed to force preprocessing if id is also a macro */
|
||||
#define HB_CODEPAGE_REQUEST( id ) HB_CODEPAGE_REQUEST_( id )
|
||||
#define HB_CODEPAGE_REQUEST_( id ) \
|
||||
extern HB_FUNC( HB_CODEPAGE_##id ); \
|
||||
void hb_codepage_ForceLink( void ) \
|
||||
{ \
|
||||
HB_FUNCNAME( HB_CODEPAGE_##id )(); \
|
||||
}
|
||||
#define HB_CODEPAGE_REQUEST( id ) HB_CODEPAGE_REQUEST_( id )
|
||||
#define HB_CODEPAGE_REQUEST_( id ) HB_FUNC_EXTERN( HB_CODEPAGE_##id ); \
|
||||
void hb_codepage_ForceLink_##id( void ) \
|
||||
{ \
|
||||
HB_FUNCNAME( HB_CODEPAGE_##id )(); \
|
||||
}
|
||||
#define HB_CODEPAGE_ANNOUNCE( id ) HB_FUNC( HB_CODEPAGE_##id ) {}
|
||||
|
||||
#define HB_CODEPAGE_ANNOUNCE( id ) HB_FUNC( HB_CODEPAGE_##id ) {}
|
||||
|
||||
#define HB_CODEPAGE_INIT( id ) \
|
||||
HB_CODEPAGE_ANNOUNCE( id ); \
|
||||
HB_CALL_ON_STARTUP_BEGIN( hb_codepage_Init_##id ) \
|
||||
hb_cdpRegister( &s_codepage ); \
|
||||
HB_CALL_ON_STARTUP_END( hb_codepage_Init_##id )
|
||||
#define HB_CODEPAGE_INIT( id ) HB_CODEPAGE_ANNOUNCE( id ); \
|
||||
HB_CALL_ON_STARTUP_BEGIN( hb_codepage_Init_##id ) \
|
||||
hb_cdpRegister( &s_codepage ); \
|
||||
HB_CALL_ON_STARTUP_END( hb_codepage_Init_##id )
|
||||
|
||||
typedef struct _HB_UNITABLE
|
||||
{
|
||||
char *uniID;
|
||||
int nChars;
|
||||
BOOL lMulti;
|
||||
USHORT *uniCodes;
|
||||
} HB_UNITABLE, * PHB_UNITABLE;
|
||||
|
||||
typedef struct _HB_MULTICHAR
|
||||
{
|
||||
@@ -84,31 +92,95 @@ typedef struct _HB_MULTICHAR
|
||||
|
||||
typedef struct _HB_CODEPAGE
|
||||
{
|
||||
char *id;
|
||||
int nChars;
|
||||
char *CharsUpper;
|
||||
char *CharsLower;
|
||||
BOOL lLatin;
|
||||
BOOL lAccEqual;
|
||||
BOOL lAccInterleave;
|
||||
BOOL lSort;
|
||||
BYTE *s_chars;
|
||||
BYTE *s_upper;
|
||||
BYTE *s_lower;
|
||||
BYTE *s_accent;
|
||||
int nMulti;
|
||||
PHB_MULTICHAR multi;
|
||||
char * id;
|
||||
char * uniID;
|
||||
PHB_UNITABLE uniTable;
|
||||
int nChars;
|
||||
char * CharsUpper;
|
||||
char * CharsLower;
|
||||
BOOL lLatin;
|
||||
BOOL lAccEqual;
|
||||
BOOL lAccInterleave;
|
||||
BOOL lSort;
|
||||
BYTE * s_chars;
|
||||
BYTE * s_upper;
|
||||
BYTE * s_lower;
|
||||
BYTE * s_accent;
|
||||
int nMulti;
|
||||
PHB_MULTICHAR multi;
|
||||
} HB_CODEPAGE, * PHB_CODEPAGE;
|
||||
|
||||
extern BOOL hb_cdpRegister( PHB_CODEPAGE );
|
||||
extern char * hb_cdpSelectID( char * );
|
||||
extern PHB_CODEPAGE hb_cdpSelect( PHB_CODEPAGE );
|
||||
extern PHB_CODEPAGE hb_cdpFind( char * );
|
||||
extern void hb_cdpTranslate( char*, PHB_CODEPAGE, PHB_CODEPAGE );
|
||||
extern void hb_cdpnTranslate( char*, PHB_CODEPAGE, PHB_CODEPAGE, unsigned int );
|
||||
extern int hb_cdpcmp( char*, char*, ULONG, PHB_CODEPAGE, ULONG* );
|
||||
extern int hb_cdpchrcmp( char cFirst, char cSecond, PHB_CODEPAGE cdpage );
|
||||
extern BOOL HB_EXPORT hb_cdpRegister( PHB_CODEPAGE );
|
||||
extern char * HB_EXPORT hb_cdpSelectID( char * );
|
||||
extern PHB_CODEPAGE HB_EXPORT hb_cdpSelect( PHB_CODEPAGE );
|
||||
extern PHB_CODEPAGE HB_EXPORT hb_cdpFind( char * );
|
||||
extern void HB_EXPORT hb_cdpTranslate( char*, PHB_CODEPAGE, PHB_CODEPAGE );
|
||||
extern void HB_EXPORT hb_cdpnTranslate( char*, PHB_CODEPAGE, PHB_CODEPAGE, unsigned int );
|
||||
extern int HB_EXPORT hb_cdpcmp( char*, char*, ULONG, PHB_CODEPAGE, ULONG* );
|
||||
extern int HB_EXPORT hb_cdpchrcmp( char, char, PHB_CODEPAGE );
|
||||
extern void HB_EXPORT hb_cdpReleaseAll( void );
|
||||
|
||||
extern USHORT HB_EXPORT hb_cdpGetU16( PHB_CODEPAGE, BYTE );
|
||||
extern BOOL HB_EXPORT hb_cdpGetFromUTF8( PHB_CODEPAGE cdp, BYTE ch, int * n, USHORT * uc );
|
||||
extern ULONG HB_EXPORT hb_cdpStrnToUTF( PHB_CODEPAGE, BYTE*, ULONG, BYTE* );
|
||||
extern ULONG HB_EXPORT hb_cdpStrnToU16( PHB_CODEPAGE, BYTE*, ULONG, BYTE* );
|
||||
|
||||
extern PHB_CODEPAGE hb_cdp_page;
|
||||
|
||||
#define CPID_437 "cp437"
|
||||
#define CPID_737 "cp737"
|
||||
#define CPID_850 "cp850"
|
||||
#define CPID_852 "cp852"
|
||||
#define CPID_866 "cp866"
|
||||
#define CPID_1250 "cp1250"
|
||||
#define CPID_1251 "cp1251"
|
||||
#define CPID_1253 "cp1253"
|
||||
#define CPID_1257 "cp1257"
|
||||
#define CPID_8859_1 "iso8859-1"
|
||||
#define CPID_8859_1B "iso8859-1b"
|
||||
#define CPID_8859_2 "iso8859-2"
|
||||
#define CPID_KOI_8 "koi-8"
|
||||
#define CPID_KOI_8U "koi-8u"
|
||||
#define CPID_MAZ "plmaz"
|
||||
#define UNITB_437 &hb_uniTbl_437
|
||||
#define UNITB_737 &hb_uniTbl_737
|
||||
#define UNITB_850 &hb_uniTbl_850
|
||||
#define UNITB_852 &hb_uniTbl_852
|
||||
#define UNITB_866 &hb_uniTbl_866
|
||||
#define UNITB_1250 &hb_uniTbl_1250
|
||||
#define UNITB_1251 &hb_uniTbl_1251
|
||||
#define UNITB_1253 &hb_uniTbl_1253
|
||||
#define UNITB_1257 &hb_uniTbl_1257
|
||||
#define UNITB_8859_1 &hb_uniTbl_8859_1
|
||||
#define UNITB_8859_1B &hb_uniTbl_8859_1b
|
||||
#define UNITB_8859_2 &hb_uniTbl_8859_2
|
||||
#define UNITB_KOI_8 &hb_uniTbl_KOI_8
|
||||
#define UNITB_KOI_8U &hb_uniTbl_KOI_8U
|
||||
#define UNITB_MAZ &hb_uniTbl_mazovia
|
||||
#define UNITB_UNDEF NULL /* ((PHB_UNITABLE) (-1)) */
|
||||
|
||||
extern HB_UNITABLE hb_uniTbl_437;
|
||||
extern HB_UNITABLE hb_uniTbl_737;
|
||||
extern HB_UNITABLE hb_uniTbl_850;
|
||||
extern HB_UNITABLE hb_uniTbl_852;
|
||||
extern HB_UNITABLE hb_uniTbl_866;
|
||||
extern HB_UNITABLE hb_uniTbl_1250;
|
||||
extern HB_UNITABLE hb_uniTbl_1251;
|
||||
extern HB_UNITABLE hb_uniTbl_1253;
|
||||
extern HB_UNITABLE hb_uniTbl_1257;
|
||||
extern HB_UNITABLE hb_uniTbl_8859_1;
|
||||
extern HB_UNITABLE hb_uniTbl_8859_1b;
|
||||
extern HB_UNITABLE hb_uniTbl_8859_2;
|
||||
extern HB_UNITABLE hb_uniTbl_KOI_8;
|
||||
extern HB_UNITABLE hb_uniTbl_KOI_8U;
|
||||
extern HB_UNITABLE hb_uniTbl_mazovia;
|
||||
|
||||
HB_EXTERN_END
|
||||
|
||||
#endif /* HB_APICDP_H_ */
|
||||
|
||||
#else
|
||||
|
||||
#define PHB_CODEPAGE void*
|
||||
|
||||
#endif /* HB_CDP_SUPPORT_OFF */
|
||||
|
||||
@@ -56,9 +56,7 @@
|
||||
#include "hbapi.h"
|
||||
#include "error.ch"
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
extern "C" {
|
||||
#endif
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
/* Error codes (returned from hb_errLaunch()) */
|
||||
|
||||
@@ -173,8 +171,6 @@ typedef struct HB_ERROR_INFO_
|
||||
/* set/get current error handler */
|
||||
extern HB_ERROR_INFO_PTR hb_errorHandler( HB_ERROR_INFO_PTR pNewHandler );
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
}
|
||||
#endif
|
||||
HB_EXTERN_END
|
||||
|
||||
#endif /* HB_APIERR_H_ */
|
||||
|
||||
@@ -56,9 +56,7 @@
|
||||
#include "hbapi.h"
|
||||
#include "fileio.ch"
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
extern "C" {
|
||||
#endif
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
#define FS_ERROR F_ERROR
|
||||
#if defined(X__WIN32__)
|
||||
@@ -204,8 +202,6 @@ extern char * hb_fsAttrDecode( USHORT uiAttr, char * szAttr );
|
||||
extern BYTE * hb_filecase ( char * ); /* Convert string to environment case */
|
||||
extern BYTE HB_EXPORT * hb_fileNameConv(char *str) ;
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
}
|
||||
#endif
|
||||
HB_EXTERN_END
|
||||
|
||||
#endif /* HB_APIFS_H_ */
|
||||
|
||||
@@ -325,8 +325,6 @@ extern void hb_setkeyExit( void );
|
||||
|
||||
/* none as of yet */
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
}
|
||||
#endif
|
||||
HB_EXTERN_END
|
||||
|
||||
#endif /* HB_APIGT_H_ */
|
||||
|
||||
@@ -55,9 +55,7 @@
|
||||
|
||||
#include "hbapi.h"
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
extern "C" {
|
||||
#endif
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
#define HB_EVAL_PARAM_MAX_ 9
|
||||
|
||||
@@ -143,8 +141,6 @@ extern PHB_ITEM hb_itemValToStr ( PHB_ITEM pItem ); /* Convert any scalar to a s
|
||||
extern char * hb_itemPadConv ( PHB_ITEM pItem, ULONG * pulSize, BOOL * bFreeReq );
|
||||
extern void hb_itemSwap ( PHB_ITEM pItem1, PHB_ITEM pItem2 );
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
}
|
||||
#endif
|
||||
HB_EXTERN_END
|
||||
|
||||
#endif /* HB_APIITM_H_ */
|
||||
|
||||
@@ -59,9 +59,7 @@
|
||||
|
||||
#include "hblang.ch" /* Base values for the unified language item table */
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
extern "C" {
|
||||
#endif
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
/* This hack is needed to force preprocessing if id is also a macro */
|
||||
#define HB_LANG_REQUEST( id ) HB_LANG_REQUEST_( id )
|
||||
@@ -97,9 +95,7 @@ extern char * hb_langName ( void );
|
||||
|
||||
extern char * hb_langDGetErrorDesc ( ULONG ulIndex );
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
}
|
||||
#endif
|
||||
HB_EXTERN_END
|
||||
|
||||
#endif /* HB_APILNG_H_ */
|
||||
|
||||
|
||||
@@ -57,9 +57,7 @@
|
||||
#include "dbinfo.ch" /* Constants for SELF_ORDINFO, SELF_INFO(), SELF_RECINFO() */
|
||||
#include "dbstruct.ch" /* Constants for SELF_FIELDINFO() */
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
extern "C" {
|
||||
#endif
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
#define HARBOUR_MAX_RDD_DRIVERNAME_LENGTH 32
|
||||
#define HARBOUR_MAX_RDD_ALIAS_LENGTH 32
|
||||
@@ -90,6 +88,7 @@ extern void hb_rddShutDown( void );
|
||||
#define EDBCMD_USE_BADPARAMETER 1005
|
||||
#define EDBCMD_REL_BADPARAMETER 1006
|
||||
#define EDBCMD_FIELDNAME_BADPARAMETER 1009
|
||||
#define EDBCMD_BADALIAS 1010
|
||||
#define EDBCMD_DUPALIAS 1011
|
||||
#define EDBCMD_DBCMDBADPARAMETER 1014
|
||||
#define EDBCMD_BADPARAMETER 1015
|
||||
@@ -558,15 +557,15 @@ typedef USHORT ( * DBENTRYP_SVL )( AREAP area, USHORT index, ULONG * param );
|
||||
typedef USHORT ( * DBENTRYP_SSI )( AREAP area, USHORT p1, USHORT p2, PHB_ITEM p3 );
|
||||
typedef USHORT ( * DBENTRYP_ISI )( AREAP area, PHB_ITEM p1, USHORT p2, PHB_ITEM p3 );
|
||||
typedef USHORT ( * DBENTRYP_BIB )( AREAP area, BOOL p1, PHB_ITEM p2, BOOL p3 );
|
||||
typedef USHORT ( * DBENTRYP_VPL )( AREAP area, void * p1, LONG p2);
|
||||
typedef USHORT ( * DBENTRYP_VPLP )( AREAP area, void * p1, LONG * p2);
|
||||
typedef USHORT ( * DBENTRYP_LSP )( AREAP area, LONG p1, USHORT * p2);
|
||||
typedef USHORT ( * DBENTRYP_VPL )( AREAP area, void * p1, LONG p2 );
|
||||
typedef USHORT ( * DBENTRYP_VPLP )( AREAP area, void * p1, LONG * p2 );
|
||||
typedef USHORT ( * DBENTRYP_LSP )( AREAP area, LONG p1, USHORT * p2 );
|
||||
|
||||
/* this methods DO USE take a Workarea but an RDDNODE */
|
||||
|
||||
typedef USHORT ( * DBENTRYP_I0 )( void );
|
||||
typedef USHORT ( * DBENTRYP_I1 )( PHB_ITEM p1);
|
||||
typedef USHORT ( * DBENTRYP_I2 )( PHB_ITEM p1, PHB_ITEM p2);
|
||||
typedef USHORT ( * DBENTRYP_I1 )( PHB_ITEM p1 );
|
||||
typedef USHORT ( * DBENTRYP_I2 )( PHB_ITEM p1, PHB_ITEM p2 );
|
||||
/*--------------------* Virtual Method Table *----------------------*/
|
||||
|
||||
typedef struct _RDDFUNCS
|
||||
@@ -723,6 +722,7 @@ typedef struct _RDDNODE
|
||||
char szName[ HARBOUR_MAX_RDD_DRIVERNAME_LENGTH + 1 ]; /* Name of RDD */
|
||||
USHORT uiType; /* Type of RDD */
|
||||
RDDFUNCS pTable; /* Table of functions */
|
||||
RDDFUNCS pSuperTable; /* Table of super functions */
|
||||
USHORT uiAreaSize; /* Size of the WorkArea */
|
||||
struct _RDDNODE * pNext; /* Next RDD in the list */
|
||||
} RDDNODE;
|
||||
@@ -882,7 +882,7 @@ typedef RDDNODE * LPRDDNODE;
|
||||
#define SELF_TABLEEXT(w, fp) ((*(w)->lprfsHost->info)(w, DBI_TABLEEXT, fp))
|
||||
|
||||
|
||||
/* non WorkArea functions */
|
||||
/* non WorkArea functions */
|
||||
#define SELF_EXIT(r) ((*(r)->pTable.exit)())
|
||||
#define SELF_DROP(r, i) ((*(r)->pTable.drop)(i))
|
||||
#define SELF_EXISTS(r, it, ii) ((*(r)->pTable.exists)(it,ii))
|
||||
@@ -1013,7 +1013,7 @@ typedef RDDNODE * LPRDDNODE;
|
||||
#define SUPER_GETLOCKS(w, g) ((*(SUPERTABLE)->info)(w, DBI_GETLOCKARRAY, g))
|
||||
#define SUPER_RAWLOCK(w, i, l) ((*(SUPERTABLE)->rawlock)(w, i, l))
|
||||
#define SUPER_LOCK(w, sp) ((*(SUPERTABLE)->lock)(w, sp))
|
||||
#define SUPER_UNLOCK(w,l) ((*(SUPERTABLE)->unlock)(w,l))
|
||||
#define SUPER_UNLOCK(w,l) ((*(SUPERTABLE)->unlock)(w,l))
|
||||
|
||||
|
||||
/* Memofile functions */
|
||||
@@ -1033,17 +1033,17 @@ typedef RDDNODE * LPRDDNODE;
|
||||
|
||||
/* Info operations */
|
||||
|
||||
#define SUPER_RECSIZE(w, lp) ((*(SUPERTABLE)->info)(w, DBI_GETRECSIZE, lp))
|
||||
#define SUPER_HEADERSIZE(w, fp) ((*(SUPERTABLE)->info)(w, DBI_GETHEADERSIZE, fp))
|
||||
#define SUPER_LUPDATE(w, fp) ((*(SUPERTABLE)->info)(w, DBI_LASTUPDATE, fp ))
|
||||
#define SUPER_SETDELIM(w, fp) ((*(SUPERTABLE)->info)(w, DBI_SETDELIMITER, fp))
|
||||
#define SUPER_GETDELIM(w, fp) ((*(SUPERTABLE)->info)(w, DBI_GETDELIMITER, fp))
|
||||
#define SUPER_TABLEEXT(w, fp) ((*(SUPERTABLE)->info)(w, DBI_TABLEEXT, fp))
|
||||
#define SUPER_RECSIZE(w, lp) ((*(SUPERTABLE)->info)(w, DBI_GETRECSIZE, lp))
|
||||
#define SUPER_HEADERSIZE(w, fp) ((*(SUPERTABLE)->info)(w, DBI_GETHEADERSIZE, fp))
|
||||
#define SUPER_LUPDATE(w, fp) ((*(SUPERTABLE)->info)(w, DBI_LASTUPDATE, fp ))
|
||||
#define SUPER_SETDELIM(w, fp) ((*(SUPERTABLE)->info)(w, DBI_SETDELIMITER, fp))
|
||||
#define SUPER_GETDELIM(w, fp) ((*(SUPERTABLE)->info)(w, DBI_GETDELIMITER, fp))
|
||||
#define SUPER_TABLEEXT(w, fp) ((*(SUPERTABLE)->info)(w, DBI_TABLEEXT, fp))
|
||||
|
||||
/* non WorkArea functions */
|
||||
#define SUPER_EXIT() ((*(SUPERTABLE)->exit)())
|
||||
#define SUPER_DROP(i) ((*(SUPERTABLE)->drop)(i))
|
||||
#define SUPER_EXISTS(it, ii) ((*(SUPERTABLE)->exists)(it, ii))
|
||||
/* non WorkArea functions */
|
||||
#define SUPER_EXIT() ((*(SUPERTABLE)->exit)())
|
||||
#define SUPER_DROP(i) ((*(SUPERTABLE)->drop)(i))
|
||||
#define SUPER_EXISTS(it, ii) ((*(SUPERTABLE)->exists)(it, ii))
|
||||
|
||||
/*
|
||||
* PROTOTYPES
|
||||
@@ -1059,8 +1059,6 @@ extern ERRCODE hb_rddIterateWorkAreas ( WACALLBACK pCallBack, int data );
|
||||
USHORT hb_rddFieldIndex( AREAP pArea, char * szName);
|
||||
ERRCODE hb_rddGetTempAlias( char * szAliasTmp );
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
}
|
||||
#endif
|
||||
HB_EXTERN_END
|
||||
|
||||
#endif /* HB_APIRDD_H_ */
|
||||
|
||||
@@ -70,9 +70,7 @@
|
||||
#include "hbpcode.h"
|
||||
#include "hbhash.h"
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
extern "C" {
|
||||
#endif
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
/* compiler related declarations */
|
||||
|
||||
@@ -555,9 +553,7 @@ extern ULONG hb_comp_Supported;
|
||||
#define HB_COMP_ISSUPPORTED(flag) ( hb_comp_Supported & (flag) )
|
||||
#endif
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
}
|
||||
#endif
|
||||
HB_EXTERN_END
|
||||
|
||||
#endif /* HB_COMP_H_ */
|
||||
|
||||
|
||||
@@ -55,9 +55,7 @@
|
||||
|
||||
#include "hbsetup.h"
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
extern "C" {
|
||||
#endif
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
extern double hb_dateSeconds( void );
|
||||
extern void hb_dateToday( int * piYear, int * piMonth, int * piDay );
|
||||
@@ -73,8 +71,6 @@ extern void hb_dateStrGet( const char * szDate, int * piYear, int * piMonth,
|
||||
extern char * hb_dateDecStr( char * szDate, long lJulian );
|
||||
extern long hb_dateEncStr( char * szDate );
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
}
|
||||
#endif
|
||||
HB_EXTERN_END
|
||||
|
||||
#endif /* HB_DATE_H_ */
|
||||
|
||||
@@ -53,11 +53,10 @@
|
||||
#ifndef HB_DBSORT_H_
|
||||
#define HB_DBSORT_H_
|
||||
|
||||
#define HB_EXTERNAL_RDDDBF_USE
|
||||
#include "hbrdddbf.h"
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
extern "C" {
|
||||
#endif
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
/*
|
||||
* DBQUICKSORT
|
||||
@@ -90,8 +89,6 @@ extern void hb_dbQSortExit( LPDBQUICKSORT pQuickSort );
|
||||
extern BOOL hb_dbQSortAdvance( LPDBQUICKSORT pQuickSort, USHORT uiCount );
|
||||
extern void hb_dbQSortComplete( LPDBQUICKSORT pQuickSort );
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
}
|
||||
#endif
|
||||
HB_EXTERN_END
|
||||
|
||||
#endif /* HB_DBSORT_H_ */
|
||||
|
||||
@@ -55,9 +55,7 @@
|
||||
|
||||
#include "hbsetup.h"
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
extern "C" {
|
||||
#endif
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
/*
|
||||
* Errors generated by Harbour compiler
|
||||
@@ -176,8 +174,6 @@ extern "C" {
|
||||
extern void hb_compGenError( char * szErrors[], char cPrefix, int iError, const char * szError1, const char * szError2 ); /* generic parsing error management function */
|
||||
extern void hb_compGenWarning( char * szWarnings[], char cPrefix, int iWarning, const char * szWarning1, const char * szWarning2); /* generic parsing warning management function */
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
}
|
||||
#endif
|
||||
HB_EXTERN_END
|
||||
|
||||
#endif /* HB_ERRORS_H_ */
|
||||
|
||||
@@ -565,7 +565,7 @@ static void hb_compExprCodeblockEarly( HB_EXPR_PTR pSelf )
|
||||
char *szDupl;
|
||||
BOOL bUseTextSubst;
|
||||
|
||||
HB_EXPR_PCODE0( hb_compCodeBlockStart );
|
||||
HB_EXPR_PCODE0( hb_compCodeBlockStart );
|
||||
|
||||
szDupl = hb_strupr( hb_strdup( pSelf->value.asCodeblock.string ) );
|
||||
if( !hb_compExprIsValidMacro( szDupl, &bUseTextSubst, HB_MACRO_PARAM ) )
|
||||
@@ -577,7 +577,7 @@ static void hb_compExprCodeblockEarly( HB_EXPR_PTR pSelf )
|
||||
pNew = hb_compExprNewMacro( hb_compExprNewString(pSelf->value.asCodeblock.string), 0, NULL );
|
||||
HB_EXPR_USE( pNew, HB_EA_PUSH_PCODE );
|
||||
hb_compExprDelete( pNew );
|
||||
HB_EXPR_PCODE0( hb_compCodeBlockStop );
|
||||
HB_EXPR_PCODE0( hb_compCodeBlockStop );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -55,9 +55,7 @@
|
||||
|
||||
#include "hbapi.h"
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
extern "C" {
|
||||
#endif
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
/* value types seen at language level
|
||||
*/
|
||||
@@ -413,8 +411,6 @@ HB_EXPR_PTR hb_compExprSetGetBlock( HB_EXPR_PTR pExpr );
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
}
|
||||
#endif
|
||||
HB_EXTERN_END
|
||||
|
||||
#endif /* HB_EXPROP_H_ */
|
||||
|
||||
@@ -55,9 +55,7 @@
|
||||
|
||||
#include "hbapi.h"
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
extern "C" {
|
||||
#endif
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
#define HB_HASH_FUNC( hbfunc ) ULONG hbfunc( void *Value, void *Cargo )
|
||||
typedef HB_HASH_FUNC( HB_HASH_FUNC_ );
|
||||
@@ -90,8 +88,6 @@ extern BOOL hb_hashTableAdd( HB_HASH_TABLE_PTR pTable, void *pValue ); /* add a
|
||||
extern void * hb_hashTableFind( HB_HASH_TABLE_PTR pTable, void *pValue ); /* return the pointer to item's value or NULL if not found */
|
||||
extern HB_HASH_TABLE_PTR hb_hashTableResize( HB_HASH_TABLE_PTR pTable, ULONG ulNewSize ); /* resize the hash table */
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
}
|
||||
#endif
|
||||
HB_EXTERN_END
|
||||
|
||||
#endif /* HB_HASH_H_ */
|
||||
|
||||
@@ -55,9 +55,7 @@
|
||||
|
||||
#include "hbsetup.h"
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
extern "C" {
|
||||
#endif
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
extern void HB_EXPORT hb_vmProcessSymbols( PHB_SYMB pSymbols, USHORT uiSymbols ); /* statics symbols initialization */
|
||||
|
||||
@@ -177,8 +175,6 @@ extern void HB_EXPORT hb_vmProcessSymbols( PHB_SYMB pSymbols, USHORT uiSymbols )
|
||||
#define HB_PRAGMA_STARTUP
|
||||
#endif
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
}
|
||||
#endif
|
||||
HB_EXTERN_END
|
||||
|
||||
#endif /* HB_INIT_H_ */
|
||||
|
||||
@@ -74,9 +74,7 @@
|
||||
#include "hbpcode.h"
|
||||
#include "hbmacro.ch"
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
extern "C" {
|
||||
#endif
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
/* flags for compilation process
|
||||
*/
|
||||
@@ -155,8 +153,6 @@ extern void hb_compGenPushString( char * szText, ULONG ulStrLen, HB_BISON_PTR pM
|
||||
extern void hb_compCodeBlockStart( HB_BISON_PTR pMacro );
|
||||
extern void hb_compCodeBlockEnd( HB_BISON_PTR pMacro );
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
}
|
||||
#endif
|
||||
HB_EXTERN_END
|
||||
|
||||
#endif /* HB_MACRO_H_ */
|
||||
|
||||
@@ -58,9 +58,7 @@
|
||||
#include "hberrors.h"
|
||||
#include "hbver.h"
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
extern "C" {
|
||||
#endif
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
struct _DEFINES;
|
||||
typedef struct _DEFINES
|
||||
@@ -129,9 +127,7 @@ extern COMMANDS * hb_pp_topTranslate;
|
||||
|
||||
extern void hb_pp_ParsePragma( char * szline );
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
}
|
||||
#endif
|
||||
HB_EXTERN_END
|
||||
|
||||
#endif /* HB_PP_H_ */
|
||||
|
||||
|
||||
@@ -55,9 +55,7 @@
|
||||
|
||||
#include "hbapirdd.h"
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
extern "C" {
|
||||
#endif
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
/*
|
||||
* -- DELIMITED METHODS --
|
||||
@@ -159,8 +157,6 @@ extern "C" {
|
||||
#define hb_delimExists NULL
|
||||
#define hb_delimWhoCares NULL
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
}
|
||||
#endif
|
||||
HB_EXTERN_END
|
||||
|
||||
#endif /* HB_RDDDEL_H_ */
|
||||
|
||||
@@ -55,15 +55,13 @@
|
||||
|
||||
#include "hbapirdd.h"
|
||||
#include "hbdbferr.h"
|
||||
#ifndef HB_CDP_SUPPORT_OFF
|
||||
#include "hbapicdp.h"
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
/* DBFNTX default extensions */
|
||||
#define NTX_MEMOEXT ".dbt"
|
||||
#define NTX_INDEXEXT ".ntx"
|
||||
|
||||
/* DBFNTX constants declarations */
|
||||
@@ -75,6 +73,7 @@ extern "C" {
|
||||
|
||||
#define NTX_MAX_KEY 256 /* Max len of key */
|
||||
#define NTXBLOCKSIZE 1024 /* Size of block in NTX file */
|
||||
#define NTX_MAX_TAGNAME 12 /* Max len of tag name */
|
||||
#define NTX_LOCK_OFFSET 1000000000
|
||||
#define NTX_PAGES_PER_TAG 32
|
||||
|
||||
@@ -167,6 +166,7 @@ typedef struct _NTXINDEX
|
||||
LONG NextAvail;
|
||||
struct _NTXAREA * Owner;
|
||||
FHANDLE DiskFile;
|
||||
BOOL fFlush;
|
||||
LPTAGINFO CompoundTag;
|
||||
struct _NTXINDEX * pNext; /* The next index in the list */
|
||||
} NTXINDEX;
|
||||
@@ -177,22 +177,22 @@ typedef NTXINDEX * LPNTXINDEX;
|
||||
|
||||
typedef struct _NTXHEADER /* Header of NTX file */
|
||||
{
|
||||
USHORT type;
|
||||
USHORT version;
|
||||
ULONG root;
|
||||
ULONG next_page;
|
||||
USHORT item_size;
|
||||
USHORT key_size;
|
||||
USHORT key_dec;
|
||||
USHORT max_item;
|
||||
USHORT half_page;
|
||||
UINT16 type;
|
||||
UINT16 version;
|
||||
UINT32 root;
|
||||
UINT32 next_page;
|
||||
UINT16 item_size;
|
||||
UINT16 key_size;
|
||||
UINT16 key_dec;
|
||||
UINT16 max_item;
|
||||
UINT16 half_page;
|
||||
char key_expr[ NTX_MAX_KEY ];
|
||||
char unique;
|
||||
char unknown1;
|
||||
char descend;
|
||||
char unknown2;
|
||||
char for_expr[ NTX_MAX_KEY ];
|
||||
char tag_name[ 12 ];
|
||||
char tag_name[ NTX_MAX_TAGNAME ];
|
||||
char custom;
|
||||
} NTXHEADER;
|
||||
|
||||
@@ -201,16 +201,16 @@ typedef NTXHEADER * LPNTXHEADER;
|
||||
typedef struct _NTXBUFFER /* Header of each block in NTX file (only block
|
||||
with header has other format */
|
||||
{
|
||||
USHORT item_count;
|
||||
USHORT item_offset[ 1 ];
|
||||
UINT16 item_count;
|
||||
UINT16 item_offset[ 1 ];
|
||||
} NTXBUFFER;
|
||||
|
||||
typedef NTXBUFFER * LPNTXBUFFER;
|
||||
|
||||
typedef struct _NTXITEM /* each item in NTX block has following format */
|
||||
{
|
||||
ULONG page; /* subpage (each key in subpage has < value like this key */
|
||||
ULONG rec_no; /* RecNo of record with this key */
|
||||
UINT32 page; /* subpage (each key in subpage has < value like this key */
|
||||
UINT32 rec_no; /* RecNo of record with this key */
|
||||
char key[ 1 ]; /* value of key */
|
||||
} NTXITEM;
|
||||
|
||||
@@ -293,7 +293,9 @@ typedef struct _NTXAREA
|
||||
BYTE bLockType; /* Type of locking shemes */
|
||||
ULONG * pLocksPos; /* List of records locked */
|
||||
ULONG ulNumLocksPos; /* Number of records locked */
|
||||
#ifndef HB_CDP_SUPPORT_OFF
|
||||
PHB_CODEPAGE cdPage; /* Area's codepage pointer */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* NTX's additions to the workarea structure
|
||||
@@ -343,7 +345,7 @@ static ERRCODE ntxSkipRaw( NTXAREAP pArea, LONG lToSkip );
|
||||
#define ntxFieldDisplay NULL
|
||||
#define ntxFieldInfo NULL
|
||||
#define ntxFieldName NULL
|
||||
#define ntxFlush NULL
|
||||
static ERRCODE ntxFlush( NTXAREAP pArea );
|
||||
#define ntxGetRec NULL
|
||||
#define ntxGetValue NULL
|
||||
#define ntxGetVarLen NULL
|
||||
@@ -425,8 +427,6 @@ static ERRCODE ntxSetScope( NTXAREAP pArea, LPDBORDSCOPEINFO sInfo );
|
||||
#define ntxExists NULL
|
||||
#define ntxWhoCares NULL
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
}
|
||||
#endif
|
||||
HB_EXTERN_END
|
||||
|
||||
#endif /* HB_RDDNTX_H_ */
|
||||
|
||||
@@ -55,9 +55,7 @@
|
||||
|
||||
#include "hbapirdd.h"
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
extern "C" {
|
||||
#endif
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
/*
|
||||
* -- SDF METHODS --
|
||||
@@ -159,8 +157,6 @@ extern "C" {
|
||||
#define hb_sdfExists NULL
|
||||
#define hb_sdfWhoCares NULL
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
}
|
||||
#endif
|
||||
HB_EXTERN_END
|
||||
|
||||
#endif /* HB_RDDSDF_H_ */
|
||||
|
||||
@@ -55,9 +55,7 @@
|
||||
|
||||
#include "hbapirdd.h"
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
extern "C" {
|
||||
#endif
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
/*
|
||||
* -- METHODS --
|
||||
@@ -130,7 +128,7 @@ extern ERRCODE hb_waSetRel( AREAP pArea, LPDBRELINFO pRelInfo );
|
||||
extern ERRCODE hb_waOrderCondition( AREAP pArea, LPDBORDERCONDINFO param );
|
||||
#define hb_waOrderCreate ( DBENTRYP_VOC ) hb_waUnsupported
|
||||
#define hb_waOrderDestroy ( DBENTRYP_OI ) hb_waUnsupported
|
||||
//#define hb_waOrderInfo ( DBENTRYP_OII ) hb_waNull
|
||||
/* #define hb_waOrderInfo ( DBENTRYP_OII ) hb_waNull */
|
||||
extern ERRCODE hb_waOrderInfo( AREAP pArea, USHORT index, LPDBORDERINFO param );
|
||||
extern ERRCODE hb_waClearFilter( AREAP pArea );
|
||||
extern ERRCODE hb_waClearLocate( AREAP pArea );
|
||||
@@ -162,8 +160,6 @@ extern ERRCODE hb_waEvalBlock( AREAP pArea, PHB_ITEM pBlock );
|
||||
|
||||
#define hb_waWhoCares ( DBENTRYP_SVP ) hb_waUnsupported
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
}
|
||||
#endif
|
||||
HB_EXTERN_END
|
||||
|
||||
#endif /* HB_RDDWRK_H_ */
|
||||
|
||||
@@ -57,9 +57,7 @@
|
||||
#include "hbapifs.h"
|
||||
#include "hbapigt.h"
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
extern "C" {
|
||||
#endif
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
typedef enum
|
||||
{
|
||||
@@ -226,8 +224,6 @@ extern int hb_setListenerAdd( HB_SET_LISTENER_CALLBACK * );
|
||||
extern void hb_setListenerNotify( HB_set_enum, HB_set_listener_enum );
|
||||
extern int hb_setListenerRemove( int );
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
}
|
||||
#endif
|
||||
HB_EXTERN_END
|
||||
|
||||
#endif /* HB_SET_H_ */
|
||||
|
||||
@@ -60,9 +60,7 @@
|
||||
|
||||
#include "hbvmpub.h"
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
extern "C" {
|
||||
#endif
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
#ifndef HB_NO_DEFAULT_STACK_MACROS
|
||||
#define HB_STACK_MACROS
|
||||
@@ -152,8 +150,6 @@ extern void hb_stackRemove( LONG lUntilPos );
|
||||
extern HB_ITEM_PTR hb_stackNewFrame( HB_STACK_STATE * pStack, USHORT uiParams );
|
||||
extern void hb_stackOldFrame( HB_STACK_STATE * pStack );
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
}
|
||||
#endif
|
||||
HB_EXTERN_END
|
||||
|
||||
#endif /* HB_STACK_H_ */
|
||||
|
||||
@@ -55,9 +55,7 @@
|
||||
|
||||
#include "hbsetup.h"
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
extern "C" {
|
||||
#endif
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
/*
|
||||
* Tracing levels.
|
||||
@@ -224,8 +222,6 @@ extern int hb_tracelevel( int new_level );
|
||||
extern int hb_tr_level( void );
|
||||
extern void hb_tr_trace( char * fmt, ... );
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
}
|
||||
#endif
|
||||
HB_EXTERN_END
|
||||
|
||||
#endif /* HB_TRACE_H_ */
|
||||
|
||||
@@ -55,9 +55,7 @@
|
||||
|
||||
#include "hbapi.h"
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
extern "C" {
|
||||
#endif
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
/* Harbour virtual machine init/exit functions */
|
||||
extern void HB_EXPORT hb_vmInit( BOOL bStartMainProc );
|
||||
@@ -113,8 +111,6 @@ extern void hb_vmPushPointer( void * ); /* push an item of HB_IT_POINTER type
|
||||
|
||||
extern ULONG hb_vmFlagEnabled( ULONG flag);
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
}
|
||||
#endif
|
||||
HB_EXTERN_END
|
||||
|
||||
#endif /* HB_VM_H_ */
|
||||
|
||||
@@ -55,9 +55,7 @@
|
||||
|
||||
#include "hbdefs.h"
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
extern "C" {
|
||||
#endif
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
struct _HB_DYNS;
|
||||
|
||||
@@ -107,8 +105,6 @@ typedef HB_DYNS_FUNC( PHB_DYNS_FUNC );
|
||||
|
||||
extern void HB_EXPORT hb_vmExecute( const BYTE * pCode, PHB_SYMB pSymbols ); /* invokes the virtual machine */
|
||||
|
||||
#if defined(HB_EXTERN_C)
|
||||
}
|
||||
#endif
|
||||
HB_EXTERN_END
|
||||
|
||||
#endif /* HB_VMPUB_H_ */
|
||||
|
||||
@@ -10,47 +10,147 @@
|
||||
# See doc/license.txt for licensing terms.
|
||||
# ---------------------------------------------------------------
|
||||
|
||||
######################################################################
|
||||
# Conditional build:
|
||||
# --with static - link all binaries with static libs
|
||||
# --with adsrdd - build ads RDD
|
||||
# --with mysql - build mysql lib
|
||||
# --with pgsql - build pgsql lib
|
||||
# --with odbc - build build odbc lib
|
||||
# --with allegro - build GTALLEG - Allegro based GT driver
|
||||
# --without nf - do not build nanforum lib
|
||||
# --without x11 - do not build GTXVT
|
||||
# --without gpm - build GTSLN and GTCRS without GPM support
|
||||
# --without gtsln - do not build GTSLN
|
||||
######################################################################
|
||||
|
||||
test_reqrpm()
|
||||
{
|
||||
rpm -q --whatprovides "$1" &> /dev/null
|
||||
}
|
||||
|
||||
get_rpmmacro()
|
||||
{
|
||||
local R X Y
|
||||
|
||||
R=`rpm --showrc|sed -e "/^-14:.${1}[^a-z0-9A-Z_]/ !d" -e "s/^-14: ${1}.//"`
|
||||
X=`echo "${R}"|sed -e "s/.*\(%{\([^}]*\)}\).*/\2/"`
|
||||
while [ "${X}" != "${R}" ]
|
||||
do
|
||||
Y=`get_rpmmacro "$X"`
|
||||
if [ -n "${Y}" ]
|
||||
then
|
||||
R=`echo "${R}"|sed -e "s!%{${X}}!${Y}!g"`
|
||||
X=`echo "${R}"|sed -e "s/.*\(%{\([^}]*\)}\).*/\2/"`
|
||||
else
|
||||
X="${R}"
|
||||
fi
|
||||
done
|
||||
echo -n "${R}"
|
||||
}
|
||||
|
||||
NEED_RPM="gcc binutils bash bison ncurses ncurses-devel"
|
||||
|
||||
FORCE=""
|
||||
BUGGY_RPM=""
|
||||
if [ -f /etc/conectiva-release ]
|
||||
then
|
||||
BUGGY_RPM="yes"
|
||||
fi
|
||||
|
||||
LAST=""
|
||||
while [ $# -gt 0 ]
|
||||
do
|
||||
if [ "$1" = "--force" ]
|
||||
then
|
||||
FORCE="yes"
|
||||
else
|
||||
INST_PARAM="${INST_PARAM} $1"
|
||||
if [ "${LAST}" = "--with" ]
|
||||
then
|
||||
if [ -f /etc/conectiva-release ]
|
||||
then
|
||||
[ "$1" = "mysql" ] && NEED_RPM="${NEED_RPM} MySQL-devel"
|
||||
[ "$1" = "odbc" ] && NEED_RPM="${NEED_RPM} unixodbc-devel"
|
||||
else
|
||||
[ "$1" = "mysql" ] && NEED_RPM="${NEED_RPM} mysql-devel"
|
||||
[ "$1" = "odbc" ] && NEED_RPM="${NEED_RPM} unixODBC-devel"
|
||||
fi
|
||||
[ "$1" = "pgsql" ] && NEED_RPM="${NEED_RPM} postgresql-devel"
|
||||
[ "$1" = "allegro" ] && NEED_RPM="${NEED_RPM} allegro-devel"
|
||||
fi
|
||||
fi
|
||||
LAST="$1"
|
||||
shift
|
||||
done
|
||||
|
||||
if test_reqrpm "MySQL-devel" || test_reqrpm "mysql-devel"
|
||||
then
|
||||
INST_PARAM="${INST_PARAM} --with mysql"
|
||||
fi
|
||||
if test_reqrpm "postgresql-devel"
|
||||
then
|
||||
INST_PARAM="${INST_PARAM} --with pgsql"
|
||||
fi
|
||||
if test_reqrpm "unixodbc-devel" || test_reqrpm "unixODBC-devel"
|
||||
then
|
||||
INST_PARAM="${INST_PARAM} --with odbc"
|
||||
fi
|
||||
if test_reqrpm "allegro-devel"
|
||||
then
|
||||
INST_PARAM="${INST_PARAM} --with allegro"
|
||||
fi
|
||||
if ! test_reqrpm "gpm-devel"
|
||||
then
|
||||
INST_PARAM="${INST_PARAM} --without gpm"
|
||||
fi
|
||||
|
||||
TOINST_LST=""
|
||||
for i in gcc binutils bash bison ncurses ncurses-devel slang-devel gpm-devel
|
||||
for i in ${NEED_RPM}
|
||||
do
|
||||
test_reqrpm "$i" || TOINST_LST="${TOINST_LST} $i"
|
||||
done
|
||||
|
||||
if [ -z "${TOINST_LST}" ] || [ "$1" = "--force" ]
|
||||
if [ -z "${TOINST_LST}" ] || [ "${FORCE}" = "yes" ]
|
||||
then
|
||||
. ./bin/pack_src.sh
|
||||
stat="$?"
|
||||
if [ -z "${hb_filename}" ]
|
||||
then
|
||||
echo "The script ./bin/pack_src.sh doesn't set archive name to \${hb_filename}"
|
||||
exit 1
|
||||
echo "The script ./bin/pack_src.sh doesn't set archive name to \${hb_filename}"
|
||||
exit 1
|
||||
elif [ "${stat}" != 0 ]
|
||||
then
|
||||
echo "Error during packing the sources in ./bin/pack_src.sh"
|
||||
exit 1
|
||||
echo "Error during packing the sources in ./bin/pack_src.sh"
|
||||
exit 1
|
||||
elif [ -f ${hb_filename} ]
|
||||
then
|
||||
if [ `id -u` != 0 ] && [ ! -f ${HOME}/.rpmmacros ]
|
||||
then
|
||||
RPMDIR="${HOME}/RPM"
|
||||
mkdir -p ${RPMDIR}/SOURCES ${RPMDIR}/RPMS ${RPMDIR}/SRPMS \
|
||||
${RPMDIR}/BUILD ${RPMDIR}/SPECS
|
||||
echo "%_topdir ${RPMDIR}" > ${HOME}/.rpmmacros
|
||||
fi
|
||||
if which rpmbuild &>/dev/null
|
||||
then
|
||||
rpmbuild -ta ${hb_filename} --rmsource
|
||||
else
|
||||
rpm -ta ${hb_filename} --rmsource
|
||||
fi
|
||||
if [ `id -u` != 0 ] && [ ! -f ${HOME}/.rpmmacros ]
|
||||
then
|
||||
RPMDIR="${HOME}/RPM"
|
||||
mkdir -p ${RPMDIR}/SOURCES ${RPMDIR}/RPMS ${RPMDIR}/SRPMS \
|
||||
${RPMDIR}/BUILD ${RPMDIR}/SPECS
|
||||
echo "%_topdir ${RPMDIR}" > ${HOME}/.rpmmacros
|
||||
else
|
||||
RPMDIR=`get_rpmmacro "_topdir"`
|
||||
fi
|
||||
if [ "${BUGGY_RPM}" = "yes" ]
|
||||
then
|
||||
cp ${hb_filename} ${RPMDIR}/SOURCES
|
||||
cp harbour.spec ${RPMDIR}/SPECS
|
||||
fi
|
||||
if [ "${BUGGY_RPM}" = "yes" ]
|
||||
then
|
||||
rpm -ba harbour.spec ${INST_PARAM}
|
||||
elif which rpmbuild &>/dev/null
|
||||
then
|
||||
rpmbuild -ta ${hb_filename} --rmsource ${INST_PARAM}
|
||||
else
|
||||
rpm -ta ${hb_filename} --rmsource ${INST_PARAM}
|
||||
fi
|
||||
else
|
||||
echo "Cannot find archive file: ${hb_filename}"
|
||||
exit 1
|
||||
echo "Cannot find archive file: ${hb_filename}"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "If you want to build Harbour compiler"
|
||||
|
||||
@@ -26,7 +26,21 @@ C_SOURCES=\
|
||||
cdpsl852.c \
|
||||
cdpsliso.c \
|
||||
cdpslwin.c \
|
||||
cdpsrwin.c
|
||||
cdpsrwin.c \
|
||||
uc1250.c \
|
||||
uc1251.c \
|
||||
uc1253.c \
|
||||
uc1257.c \
|
||||
uc737.c \
|
||||
uc850.c \
|
||||
uc852.c \
|
||||
uc866.c \
|
||||
uc8859_1.c \
|
||||
uc88591b.c \
|
||||
uc8859_2.c \
|
||||
uckoi8.c \
|
||||
uckoi8u.c \
|
||||
ucmaz.c \
|
||||
|
||||
LIBNAME=codepage
|
||||
|
||||
|
||||
@@ -83,7 +83,8 @@
|
||||
same excepting the characters case, of course.
|
||||
*/
|
||||
|
||||
static HB_CODEPAGE s_codepage = { "EN",NUMBER_OF_CHARACTERS,
|
||||
static HB_CODEPAGE s_codepage = { "EN",
|
||||
CPID_437,UNITB_437,NUMBER_OF_CHARACTERS,
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZ","abcdefghijklmnopqrstuvwxyz",
|
||||
IS_LATIN,ACCENTED_EQUAL,ACCENTED_INTERLEAVED,0,NULL,NULL,NULL,NULL,0,NULL };
|
||||
|
||||
|
||||
@@ -83,7 +83,8 @@
|
||||
same excepting the characters case, of course.
|
||||
*/
|
||||
|
||||
static HB_CODEPAGE s_codepage = { "EL",NUMBER_OF_CHARACTERS,
|
||||
static HB_CODEPAGE s_codepage = { "EL",
|
||||
CPID_737, UNITB_737, NUMBER_OF_CHARACTERS,
|
||||
"€~ê<>‚ƒ„ë…†~쇈~퉊‹Œ<E280B9>Ž~î<><C3AE>‘‘’“~–—~ð","˜~ᙚ›œ~â<>ž~㟠~å¡¢£¤¥¦~槨©ª«¬~箯à~é",
|
||||
IS_LATIN,ACCENTED_EQUAL,ACCENTED_INTERLEAVED,0,NULL,NULL,NULL,NULL,0,NULL };
|
||||
|
||||
|
||||
@@ -84,7 +84,8 @@
|
||||
same excepting the characters case, of course.
|
||||
*/
|
||||
|
||||
static HB_CODEPAGE s_codepage = { "ELWIN",NUMBER_OF_CHARACTERS,
|
||||
static HB_CODEPAGE s_codepage = { "ELWIN",
|
||||
CPID_1253, UNITB_1253, NUMBER_OF_CHARACTERS,
|
||||
"Á~¢ÂÃÄŸÆÇ~¹ÈÉ~ºÊËÌÍÎÏ~¼ÐÑÓÓÔÕ~¾ÖרÙ~¿","á~Üâãäå~Ýæç~Þèé~ßêëìíîï~üðñóòôõ~ýö÷øù~þ",
|
||||
IS_LATIN,ACCENTED_EQUAL,ACCENTED_INTERLEAVED,0,NULL,NULL,NULL,NULL,0,NULL };
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
*/
|
||||
|
||||
static HB_CODEPAGE s_codepage = { "ES",
|
||||
NUMBER_OF_CHARACTERS,
|
||||
CPID_850, UNITB_850, NUMBER_OF_CHARACTERS,
|
||||
"AµBCDE<EFBFBD>FGHIÖJKLMN¥OàPQRSTUéšVWXYZ",
|
||||
"a bcde‚fghi¡jklmn¤o¢pqrstu£<EFBFBD>vwxyz",
|
||||
IS_LATIN,
|
||||
|
||||
@@ -51,9 +51,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* Language name: Spanish WIN */
|
||||
/* Language name: Spanish */
|
||||
/* ISO language code (2 chars): ES (please look it up in /doc/lang_id.txt) */
|
||||
/* Codepage: ES */
|
||||
/* Codepage: ISO-8859-1 */
|
||||
|
||||
#include <ctype.h>
|
||||
#include "hbapi.h"
|
||||
@@ -84,7 +84,8 @@
|
||||
same excepting the characters case, of course.
|
||||
*/
|
||||
|
||||
static HB_CODEPAGE s_codepage = { "ESWIN", NUMBER_OF_CHARACTERS,
|
||||
static HB_CODEPAGE s_codepage = { "ESWIN",
|
||||
CPID_8859_1, UNITB_8859_1, NUMBER_OF_CHARACTERS,
|
||||
"AÁBCDEÉFGHIÍJKLMNÑOÓPQRSTUÚÜVWXYZ", "aábcdeéfghiíjklmnñoópqrstuúüvwxyz",
|
||||
IS_LATIN, ACCENTED_EQUAL, ACCENTED_INTERLEAVED, 0,NULL, NULL,NULL,NULL,0,NULL };
|
||||
|
||||
|
||||
@@ -84,7 +84,8 @@
|
||||
same excepting the characters case, of course.
|
||||
*/
|
||||
|
||||
static HB_CODEPAGE s_codepage = { "DE",NUMBER_OF_CHARACTERS,
|
||||
static HB_CODEPAGE s_codepage = { "DE",
|
||||
CPID_850, UNITB_850, NUMBER_OF_CHARACTERS,
|
||||
"AŽBCDEFGHIJKLMNO™PQRSáTUšVWXYZ","a„bcdefghijklmno”pqrsátu<EFBFBD>vwxyz",
|
||||
IS_LATIN,ACCENTED_EQUAL,ACCENTED_INTERLEAVED,0,NULL,NULL,NULL,NULL,0,NULL };
|
||||
|
||||
|
||||
@@ -51,9 +51,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* Language name: German WIN*/
|
||||
/* Language name: German */
|
||||
/* ISO language code (2 chars): DE (please look it up in /doc/lang_id.txt) */
|
||||
/* Codepage: DE */
|
||||
/* Codepage: ISO-8859-1 */
|
||||
|
||||
#include <ctype.h>
|
||||
#include "hbapi.h"
|
||||
@@ -84,7 +84,8 @@
|
||||
same excepting the characters case, of course.
|
||||
*/
|
||||
|
||||
static HB_CODEPAGE s_codepage = { "DEWIN",NUMBER_OF_CHARACTERS,
|
||||
static HB_CODEPAGE s_codepage = { "DEWIN",
|
||||
CPID_8859_1, UNITB_8859_1, NUMBER_OF_CHARACTERS,
|
||||
"AÄBCDEFGHIJKLMNOÖPQRSßTUÜVWXYZ","aäbcdefghijklmnoöpqrsßtuüvwxyz",
|
||||
IS_LATIN,ACCENTED_EQUAL,ACCENTED_INTERLEAVED,0,NULL,NULL,NULL,NULL,0,NULL };
|
||||
|
||||
|
||||
@@ -83,7 +83,8 @@
|
||||
same excepting the characters case, of course.
|
||||
*/
|
||||
|
||||
static HB_CODEPAGE s_codepage = { "HU852", NUMBER_OF_CHARACTERS,
|
||||
static HB_CODEPAGE s_codepage = { "HU852",
|
||||
CPID_852, UNITB_852, NUMBER_OF_CHARACTERS,
|
||||
"AµBCDE<EFBFBD>FGHIÖJKLMNOà™ŠPQRSTUéšëVWXYZ","a bcde‚fghi¡jklmno¢”‹pqrstu£<EFBFBD>ûvwxyz",
|
||||
IS_LATIN,ACCENTED_EQUAL,ACCENTED_INTERLEAVED,0,NULL,NULL,NULL,NULL,0,NULL };
|
||||
|
||||
|
||||
@@ -51,8 +51,8 @@
|
||||
*/
|
||||
|
||||
/* Language name: <Your language> */
|
||||
/* ISO language code (2 chars): (please look it up in /doc/lang_id.txt) */
|
||||
/* Codepage: <Your codepage> */
|
||||
/* ISO language code (2 chars): HU */
|
||||
/* Codepage: 1250 */
|
||||
|
||||
#include <ctype.h>
|
||||
#include "hbapi.h"
|
||||
@@ -83,7 +83,8 @@
|
||||
same excepting the characters case, of course.
|
||||
*/
|
||||
|
||||
static HB_CODEPAGE s_codepage = { "HUWIN", NUMBER_OF_CHARACTERS,
|
||||
static HB_CODEPAGE s_codepage = { "HUWIN",
|
||||
CPID_1250, UNITB_1250, NUMBER_OF_CHARACTERS,
|
||||
"AÁBCDEÉFGHIÍJKLMNOÓÖÕPQRSTUÚÜÛVWXYZ","aábcdeéfghiíjklmnoóöõpqrstuúüûvwxyz",
|
||||
IS_LATIN,ACCENTED_EQUAL,ACCENTED_INTERLEAVED,0,NULL,NULL,NULL,NULL,0,NULL };
|
||||
|
||||
|
||||
@@ -84,7 +84,8 @@
|
||||
same excepting the characters case, of course.
|
||||
*/
|
||||
|
||||
static HB_CODEPAGE s_codepage = { "PL852",NUMBER_OF_CHARACTERS,
|
||||
static HB_CODEPAGE s_codepage = { "PL852",
|
||||
CPID_852, UNITB_852, NUMBER_OF_CHARACTERS,
|
||||
"A¤BC<EFBFBD>DE¨FGHIJKL<EFBFBD>MNãOàPQRS—TUVWXYZ<EFBFBD>½","a¥bc†de©fghijklˆmnäo¢pqrs˜tuvwxyz«¾",
|
||||
IS_LATIN,ACCENTED_EQUAL,ACCENTED_INTERLEAVED,0,NULL,NULL,NULL,NULL,0,NULL };
|
||||
|
||||
|
||||
@@ -84,7 +84,8 @@
|
||||
same excepting the characters case, of course.
|
||||
*/
|
||||
|
||||
static HB_CODEPAGE s_codepage = { "PLISO",NUMBER_OF_CHARACTERS,
|
||||
static HB_CODEPAGE s_codepage = { "PLISO",
|
||||
CPID_8859_2, UNITB_8859_2, NUMBER_OF_CHARACTERS,
|
||||
"A¡BCÆDEÊFGHIJKL£MNÑOÓPQRS¦TUVWXYZ¬¯","a±bcædeêfghijkl³mnñoópqrs¶tuvwxyz¼¿",
|
||||
IS_LATIN,ACCENTED_EQUAL,ACCENTED_INTERLEAVED,0,NULL,NULL,NULL,NULL,0,NULL };
|
||||
|
||||
|
||||
@@ -84,7 +84,8 @@
|
||||
same excepting the characters case, of course.
|
||||
*/
|
||||
|
||||
static HB_CODEPAGE s_codepage = { "PLMAZ",NUMBER_OF_CHARACTERS,
|
||||
static HB_CODEPAGE s_codepage = { "PLMAZ",
|
||||
CPID_MAZ, UNITB_MAZ, NUMBER_OF_CHARACTERS,
|
||||
"A<EFBFBD>BC•DE<EFBFBD>FGHIJKLœMN¥O£PQRS˜TUVWXYZ ¡","a†bc<EFBFBD>de‘fghijkl’mn¤o¢pqrsžtuvwxyz¦§",
|
||||
IS_LATIN,ACCENTED_EQUAL,ACCENTED_INTERLEAVED,0,NULL,NULL,NULL,NULL,0,NULL };
|
||||
|
||||
|
||||
@@ -84,7 +84,8 @@
|
||||
same excepting the characters case, of course.
|
||||
*/
|
||||
|
||||
static HB_CODEPAGE s_codepage = { "PLWIN",NUMBER_OF_CHARACTERS,
|
||||
static HB_CODEPAGE s_codepage = { "PLWIN",
|
||||
CPID_1250, UNITB_1250, NUMBER_OF_CHARACTERS,
|
||||
"A¥BCÆDEÊFGHIJKL£MNÑOÓPQRSŒTUVWXYZ<EFBFBD>¯","a¹bcædeêfghijkl³mnñoópqrsœtuvwxyzŸ¿",
|
||||
IS_LATIN,ACCENTED_EQUAL,ACCENTED_INTERLEAVED,0,NULL,NULL,NULL,NULL,0,NULL };
|
||||
|
||||
|
||||
@@ -85,7 +85,8 @@
|
||||
same excepting the characters case, of course.
|
||||
*/
|
||||
|
||||
static HB_CODEPAGE s_codepage = { "PT850",NUMBER_OF_CHARACTERS,
|
||||
static HB_CODEPAGE s_codepage = { "PT850",
|
||||
CPID_850, UNITB_850, NUMBER_OF_CHARACTERS,
|
||||
"Aµ·¶ÇŽBC€DE<EFBFBD>ÔÒFGHIÖÞרJKLMN¥Oàãâå™PQRSTUéëêšVWXYZ","a …ƒÆ„bc‡de‚Šˆfghi¡<EFBFBD>Œ‹jklmn¤o¢•“ä”pqrstu£—–<EFBFBD>vwxyz",
|
||||
IS_LATIN,ACCENTED_EQUAL,ACCENTED_INTERLEAVED,0,NULL,NULL,NULL,NULL,0,NULL };
|
||||
|
||||
|
||||
@@ -85,7 +85,8 @@
|
||||
same excepting the characters case, of course.
|
||||
*/
|
||||
|
||||
static HB_CODEPAGE s_codepage = { "PTISO",NUMBER_OF_CHARACTERS,
|
||||
static HB_CODEPAGE s_codepage = { "PTISO",
|
||||
CPID_8859_1, UNITB_8859_1, NUMBER_OF_CHARACTERS,
|
||||
"AÁÀÂÃÄBCÇDEÉÈÊFGHIÍÌÎÏJKLMNÑOÓÒÔÕÖPQRSTUÚÙÛÜVWXYZ","aáàâãäbcçdeéèêfghiíìîïjklmnñoóòôõöpqrstuúùûüvwxyz",
|
||||
IS_LATIN,ACCENTED_EQUAL,ACCENTED_INTERLEAVED,0,NULL,NULL,NULL,NULL,0,NULL };
|
||||
|
||||
|
||||
@@ -58,7 +58,8 @@
|
||||
#include "hbapi.h"
|
||||
#include "hbapicdp.h"
|
||||
|
||||
static HB_CODEPAGE s_codepage = { "RU866",32,
|
||||
static HB_CODEPAGE s_codepage = { "RU866",
|
||||
CPID_866, UNITB_866, 32,
|
||||
"€<EFBFBD>‚ƒ„…†‡ˆ‰Š‹Œ<EFBFBD>Ž<EFBFBD><EFBFBD>‘’“”•–—˜™š›œ<EFBFBD>žŸ"," ¡¢£¤¥¦§¨©ª«¬®¯àáâãäåæçèéêëìíîï",
|
||||
0,0,0,0,NULL,NULL,NULL,NULL,0,NULL };
|
||||
|
||||
|
||||
@@ -58,7 +58,8 @@
|
||||
#include "hbapi.h"
|
||||
#include "hbapicdp.h"
|
||||
|
||||
static HB_CODEPAGE s_codepage = { "RUKOI8",32,
|
||||
static HB_CODEPAGE s_codepage = { "RUKOI8",
|
||||
CPID_KOI_8, UNITB_KOI_8, 32,
|
||||
"áâ÷çäåöúéêëìíîïðòóôõæèãþûýÿùøüàñ","ÁÂ×ÇÄÅÖÚÉÊËÌÍÎÏÐÒÓÔÕÆÈÃÞÛÝßÙØÜÀÑ",
|
||||
0,0,0,0,NULL,NULL,NULL,NULL,0,NULL };
|
||||
|
||||
|
||||
@@ -58,7 +58,8 @@
|
||||
#include "hbapi.h"
|
||||
#include "hbapicdp.h"
|
||||
|
||||
static HB_CODEPAGE s_codepage = { "RU1251",32,
|
||||
static HB_CODEPAGE s_codepage = { "RU1251",
|
||||
CPID_1251, UNITB_1251, 32,
|
||||
"ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞß","àáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ",
|
||||
0,0,0,0,NULL,NULL,NULL,NULL,0,NULL };
|
||||
|
||||
|
||||
@@ -84,7 +84,8 @@
|
||||
same excepting the characters case, of course.
|
||||
*/
|
||||
|
||||
static HB_CODEPAGE s_codepage = { "SL437",NUMBER_OF_CHARACTERS,
|
||||
static HB_CODEPAGE s_codepage = { "SL437",
|
||||
CPID_437, UNITB_437, 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 };
|
||||
|
||||
|
||||
@@ -84,7 +84,8 @@
|
||||
same excepting the characters case, of course.
|
||||
*/
|
||||
|
||||
static HB_CODEPAGE s_codepage = { "SL852",NUMBER_OF_CHARACTERS,
|
||||
static HB_CODEPAGE s_codepage = { "SL852",
|
||||
CPID_852, UNITB_852, NUMBER_OF_CHARACTERS,
|
||||
"ABC¬<EFBFBD>DÑEFGHIJKLMNOPQRSæTUVWZ¦XY","abcŸ†dÐefghijklmnopqrsçtuvwz§xy",
|
||||
IS_LATIN,ACCENTED_EQUAL,ACCENTED_INTERLEAVED,0,NULL,NULL,NULL,NULL,0,NULL };
|
||||
|
||||
|
||||
@@ -84,7 +84,8 @@
|
||||
same excepting the characters case, of course.
|
||||
*/
|
||||
|
||||
static HB_CODEPAGE s_codepage = { "SLISO",NUMBER_OF_CHARACTERS,
|
||||
static HB_CODEPAGE s_codepage = { "SLISO",
|
||||
CPID_8859_2, UNITB_8859_2, 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 };
|
||||
|
||||
|
||||
@@ -84,7 +84,8 @@
|
||||
same excepting the characters case, of course.
|
||||
*/
|
||||
|
||||
static HB_CODEPAGE s_codepage = { "SLWIN",NUMBER_OF_CHARACTERS,
|
||||
static HB_CODEPAGE s_codepage = { "SLWIN",
|
||||
CPID_1250, UNITB_1250, 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 };
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
*/
|
||||
|
||||
static HB_CODEPAGE s_codepage = { "SRWIN",
|
||||
NUMBER_OF_CHARACTERS,
|
||||
CPID_1251, UNITB_1251, NUMBER_OF_CHARACTERS,
|
||||
"ÀÁÂÃĀůÇÈ£ÊËŠÌÍŒÎÏÐÑÒŽÓÔÕÖ×<EFBFBD>Ø",
|
||||
"àáâãä<EFBFBD>åæçè¼êëšìíœîïðñòžóôõö÷Ÿø",
|
||||
IS_LATIN,
|
||||
|
||||
93
harbour/source/codepage/uc1250.c
Normal file
93
harbour/source/codepage/uc1250.c
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* xHarbour Project source code:
|
||||
*
|
||||
*
|
||||
* Copyright 2003 Przemyslaw Czerpak <druzus@acn.waw.pl>
|
||||
* 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] = {
|
||||
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
|
||||
0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
|
||||
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
|
||||
0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
|
||||
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,
|
||||
0x20AC, 0x0000, 0x201A, 0x0000, 0x201E, 0x2026, 0x2020, 0x2021,
|
||||
0x0000, 0x2030, 0x0160, 0x2039, 0x015A, 0x0164, 0x017D, 0x0179,
|
||||
0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
|
||||
0x0000, 0x2122, 0x0161, 0x203A, 0x015B, 0x0165, 0x017E, 0x017A,
|
||||
0x00A0, 0x02C7, 0x02D8, 0x0141, 0x00A4, 0x0104, 0x00A6, 0x00A7,
|
||||
0x00A8, 0x00A9, 0x015E, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x017B,
|
||||
0x00B0, 0x00B1, 0x02DB, 0x0142, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
|
||||
0x00B8, 0x0105, 0x015F, 0x00BB, 0x013D, 0x02DD, 0x013E, 0x017C,
|
||||
0x0154, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0139, 0x0106, 0x00C7,
|
||||
0x010C, 0x00C9, 0x0118, 0x00CB, 0x011A, 0x00CD, 0x00CE, 0x010E,
|
||||
0x0110, 0x0143, 0x0147, 0x00D3, 0x00D4, 0x0150, 0x00D6, 0x00D7,
|
||||
0x0158, 0x016E, 0x00DA, 0x0170, 0x00DC, 0x00DD, 0x0162, 0x00DF,
|
||||
0x0155, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x013A, 0x0107, 0x00E7,
|
||||
0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F,
|
||||
0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7,
|
||||
0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9,
|
||||
};
|
||||
|
||||
HB_UNITABLE hb_uniTbl_1250 = { CPID_1250, NUMBER_OF_CHARS, FALSE, uniCodes };
|
||||
93
harbour/source/codepage/uc1251.c
Normal file
93
harbour/source/codepage/uc1251.c
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* xHarbour Project source code:
|
||||
*
|
||||
*
|
||||
* Copyright 2003 Przemyslaw Czerpak <druzus@acn.waw.pl>
|
||||
* 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] = {
|
||||
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
|
||||
0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
|
||||
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
|
||||
0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
|
||||
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,
|
||||
0x0402, 0x0403, 0x201A, 0x0453, 0x201E, 0x2026, 0x2020, 0x2021,
|
||||
0x20AC, 0x2030, 0x0409, 0x2039, 0x040A, 0x040C, 0x040B, 0x040F,
|
||||
0x0452, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
|
||||
0x0000, 0x2122, 0x0459, 0x203A, 0x045A, 0x045C, 0x045B, 0x045F,
|
||||
0x00A0, 0x040E, 0x045E, 0x0408, 0x00A4, 0x0490, 0x00A6, 0x00A7,
|
||||
0x0401, 0x00A9, 0x0404, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x0407,
|
||||
0x00B0, 0x00B1, 0x0406, 0x0456, 0x0491, 0x00B5, 0x00B6, 0x00B7,
|
||||
0x0451, 0x2116, 0x0454, 0x00BB, 0x0458, 0x0405, 0x0455, 0x0457,
|
||||
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,
|
||||
0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
|
||||
0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F,
|
||||
};
|
||||
|
||||
HB_UNITABLE hb_uniTbl_1251 = { CPID_1251, NUMBER_OF_CHARS, FALSE, uniCodes };
|
||||
93
harbour/source/codepage/uc1253.c
Normal file
93
harbour/source/codepage/uc1253.c
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* xHarbour Project source code:
|
||||
*
|
||||
*
|
||||
* Copyright 2003 Przemyslaw Czerpak <druzus@acn.waw.pl>
|
||||
* 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] = {
|
||||
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
|
||||
0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
|
||||
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
|
||||
0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
|
||||
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,
|
||||
0x20AC, 0x0081, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
|
||||
0x0088, 0x2030, 0x008A, 0x2039, 0x008C, 0x008D, 0x008E, 0x008F,
|
||||
0x0090, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
|
||||
0x0098, 0x2122, 0x009A, 0x203A, 0x009C, 0x009D, 0x009E, 0x009F,
|
||||
0x00A0, 0x0385, 0x0386, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
|
||||
0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x2015,
|
||||
0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x0384, 0x00B5, 0x00B6, 0x00B7,
|
||||
0x0388, 0x0389, 0x038A, 0x00BB, 0x038C, 0x00BD, 0x038E, 0x038F,
|
||||
0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397,
|
||||
0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F,
|
||||
0x03A0, 0x03A1, 0x00D2, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7,
|
||||
0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x03AC, 0x03AD, 0x03AE, 0x03AF,
|
||||
0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7,
|
||||
0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
|
||||
0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7,
|
||||
0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, 0x00FF,
|
||||
};
|
||||
|
||||
HB_UNITABLE hb_uniTbl_1253 = { CPID_1253, NUMBER_OF_CHARS, FALSE, uniCodes };
|
||||
93
harbour/source/codepage/uc1257.c
Normal file
93
harbour/source/codepage/uc1257.c
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* xHarbour Project source code:
|
||||
*
|
||||
*
|
||||
* Copyright 2003 Przemyslaw Czerpak <druzus@acn.waw.pl>
|
||||
* 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] = {
|
||||
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
|
||||
0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
|
||||
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
|
||||
0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
|
||||
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,
|
||||
0x20AC, 0x0000, 0x201A, 0x0000, 0x201E, 0x2026, 0x2020, 0x2021,
|
||||
0x0000, 0x2030, 0x0000, 0x2039, 0x0000, 0x00A8, 0x02C7, 0x00B8,
|
||||
0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
|
||||
0x0000, 0x2122, 0x0000, 0x203A, 0x0000, 0x00AF, 0x02DB, 0x0000,
|
||||
0x00A0, 0x0000, 0x00A2, 0x00A3, 0x00A4, 0x0000, 0x00A6, 0x00A7,
|
||||
0x00D8, 0x00A9, 0x0156, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00C6,
|
||||
0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
|
||||
0x00F8, 0x00B9, 0x0157, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00E6,
|
||||
0x0104, 0x012E, 0x0100, 0x0106, 0x00C4, 0x00C5, 0x0118, 0x0112,
|
||||
0x010C, 0x00C9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012A, 0x013B,
|
||||
0x0160, 0x0143, 0x0145, 0x00D3, 0x014C, 0x00D5, 0x00D6, 0x00D7,
|
||||
0x0172, 0x0141, 0x015A, 0x016A, 0x00DC, 0x017B, 0x017D, 0x00DF,
|
||||
0x0105, 0x012F, 0x0101, 0x0107, 0x00E4, 0x00E5, 0x0119, 0x0113,
|
||||
0x010D, 0x00E9, 0x017A, 0x0117, 0x0123, 0x0137, 0x012B, 0x013C,
|
||||
0x0161, 0x0144, 0x0146, 0x00F3, 0x014D, 0x00F5, 0x00F6, 0x00F7,
|
||||
0x0173, 0x0142, 0x015B, 0x016B, 0x00FC, 0x017C, 0x017E, 0x02D9,
|
||||
};
|
||||
|
||||
HB_UNITABLE hb_uniTbl_1257 = { CPID_1257, NUMBER_OF_CHARS, FALSE, uniCodes };
|
||||
93
harbour/source/codepage/uc737.c
Normal file
93
harbour/source/codepage/uc737.c
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* xHarbour Project source code:
|
||||
*
|
||||
*
|
||||
* Copyright 2003 Przemyslaw Czerpak <druzus@acn.waw.pl>
|
||||
* 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] = {
|
||||
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
|
||||
0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
|
||||
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
|
||||
0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
|
||||
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,
|
||||
0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398,
|
||||
0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F, 0x03A0,
|
||||
0x03A1, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, 0x03A8, 0x03A9,
|
||||
0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, 0x03B8,
|
||||
0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, 0x03C0,
|
||||
0x03C1, 0x03C3, 0x03C2, 0x03C4, 0x03C5, 0x03C6, 0x03C7, 0x03C8,
|
||||
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,
|
||||
0x03C9, 0x03AC, 0x03AD, 0x03AE, 0x03CA, 0x03AF, 0x03CC, 0x03CD,
|
||||
0x03CB, 0x03CE, 0x0386, 0x0388, 0x0389, 0x038A, 0x038C, 0x038E,
|
||||
0x038F, 0x00B1, 0x2265, 0x2264, 0x03AA, 0x03AB, 0x00F7, 0x2248,
|
||||
0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0,
|
||||
};
|
||||
|
||||
HB_UNITABLE hb_uniTbl_737 = { CPID_737, NUMBER_OF_CHARS, FALSE, uniCodes };
|
||||
93
harbour/source/codepage/uc850.c
Normal file
93
harbour/source/codepage/uc850.c
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* xHarbour Project source code:
|
||||
*
|
||||
*
|
||||
* Copyright 2003 Przemyslaw Czerpak <druzus@acn.waw.pl>
|
||||
* 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] = {
|
||||
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
|
||||
0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
|
||||
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
|
||||
0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
|
||||
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,
|
||||
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, 0x00F8, 0x00A3, 0x00D8, 0x00D7, 0x0192,
|
||||
0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA,
|
||||
0x00BF, 0x00AE, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB,
|
||||
0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00C1, 0x00C2, 0x00C0,
|
||||
0x00A9, 0x2563, 0x2551, 0x2557, 0x255D, 0x00A2, 0x00A5, 0x2510,
|
||||
0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x00E3, 0x00C3,
|
||||
0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x00A4,
|
||||
0x00F0, 0x00D0, 0x00CA, 0x00CB, 0x00C8, 0x0131, 0x00CD, 0x00CE,
|
||||
0x00CF, 0x2518, 0x250C, 0x2588, 0x2584, 0x00A6, 0x00CC, 0x2580,
|
||||
0x00D3, 0x00DF, 0x00D4, 0x00D2, 0x00F5, 0x00D5, 0x00B5, 0x00FE,
|
||||
0x00DE, 0x00DA, 0x00DB, 0x00D9, 0x00FD, 0x00DD, 0x00AF, 0x00B4,
|
||||
0x00AD, 0x00B1, 0x2017, 0x00BE, 0x00B6, 0x00A7, 0x00F7, 0x00B8,
|
||||
0x00B0, 0x00A8, 0x00B7, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0,
|
||||
};
|
||||
|
||||
HB_UNITABLE hb_uniTbl_850 = { CPID_850, NUMBER_OF_CHARS, FALSE, uniCodes };
|
||||
93
harbour/source/codepage/uc852.c
Normal file
93
harbour/source/codepage/uc852.c
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* xHarbour Project source code:
|
||||
*
|
||||
*
|
||||
* Copyright 2003 Przemyslaw Czerpak <druzus@acn.waw.pl>
|
||||
* 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] = {
|
||||
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
|
||||
0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
|
||||
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
|
||||
0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
|
||||
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,
|
||||
0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x016F, 0x0107, 0x00E7,
|
||||
0x0142, 0x00EB, 0x0150, 0x0151, 0x00EE, 0x0179, 0x00C4, 0x0106,
|
||||
0x00C9, 0x0139, 0x013A, 0x00F4, 0x00F6, 0x013D, 0x013E, 0x015A,
|
||||
0x015B, 0x00D6, 0x00DC, 0x0164, 0x0165, 0x0141, 0x00D7, 0x010D,
|
||||
0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x0104, 0x0105, 0x017D, 0x017E,
|
||||
0x0118, 0x0119, 0x00AC, 0x017A, 0x010C, 0x015F, 0x00AB, 0x00BB,
|
||||
0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00C1, 0x00C2, 0x011A,
|
||||
0x015E, 0x2563, 0x2551, 0x2557, 0x255D, 0x017B, 0x017C, 0x2510,
|
||||
0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x0102, 0x0103,
|
||||
0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x00A4,
|
||||
0x0111, 0x0110, 0x010E, 0x00CB, 0x010F, 0x0147, 0x00CD, 0x00CE,
|
||||
0x011B, 0x2518, 0x250C, 0x2588, 0x2584, 0x0162, 0x016E, 0x2580,
|
||||
0x00D3, 0x00DF, 0x00D4, 0x0143, 0x0144, 0x0148, 0x0160, 0x0161,
|
||||
0x0154, 0x00DA, 0x0155, 0x0170, 0x00FD, 0x00DD, 0x0163, 0x00B4,
|
||||
0x00AD, 0x02DD, 0x02DB, 0x02C7, 0x02D8, 0x00A7, 0x00F7, 0x00B8,
|
||||
0x00B0, 0x00A8, 0x02D9, 0x0171, 0x0158, 0x0159, 0x25A0, 0x00A0,
|
||||
};
|
||||
|
||||
HB_UNITABLE hb_uniTbl_852 = { CPID_852, NUMBER_OF_CHARS, FALSE, uniCodes };
|
||||
93
harbour/source/codepage/uc866.c
Normal file
93
harbour/source/codepage/uc866.c
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* xHarbour Project source code:
|
||||
*
|
||||
*
|
||||
* Copyright 2003 Przemyslaw Czerpak <druzus@acn.waw.pl>
|
||||
* 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] = {
|
||||
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
|
||||
0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
|
||||
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
|
||||
0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
|
||||
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, 0x0404, 0x0454, 0x0407, 0x0457, 0x040E, 0x045E,
|
||||
0x00B0, 0x2219, 0x00B7, 0x221A, 0x2116, 0x00A4, 0x25A0, 0x00A0,
|
||||
};
|
||||
|
||||
HB_UNITABLE hb_uniTbl_866 = { CPID_866, NUMBER_OF_CHARS, FALSE, uniCodes };
|
||||
93
harbour/source/codepage/uc88591b.c
Normal file
93
harbour/source/codepage/uc88591b.c
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* xHarbour Project source code:
|
||||
*
|
||||
*
|
||||
* Copyright 2003 Przemyslaw Czerpak <druzus@acn.waw.pl>
|
||||
* 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] = {
|
||||
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
|
||||
0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
|
||||
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
|
||||
0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
|
||||
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,
|
||||
0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
|
||||
0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
|
||||
0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
|
||||
0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
|
||||
0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
|
||||
0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
|
||||
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,
|
||||
0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
|
||||
0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
|
||||
0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
|
||||
0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF,
|
||||
};
|
||||
|
||||
HB_UNITABLE hb_uniTbl_8859_1b = { CPID_8859_1B, NUMBER_OF_CHARS, FALSE, uniCodes };
|
||||
93
harbour/source/codepage/uc8859_1.c
Normal file
93
harbour/source/codepage/uc8859_1.c
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* xHarbour Project source code:
|
||||
*
|
||||
*
|
||||
* Copyright 2003 Przemyslaw Czerpak <druzus@acn.waw.pl>
|
||||
* 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] = {
|
||||
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
|
||||
0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
|
||||
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
|
||||
0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
|
||||
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,
|
||||
0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
|
||||
0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
|
||||
0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
|
||||
0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
|
||||
0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
|
||||
0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
|
||||
0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
|
||||
0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
|
||||
0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
|
||||
0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
|
||||
0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
|
||||
0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,
|
||||
0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
|
||||
0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
|
||||
0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
|
||||
0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF,
|
||||
};
|
||||
|
||||
HB_UNITABLE hb_uniTbl_8859_1 = { CPID_8859_1, NUMBER_OF_CHARS, FALSE, uniCodes };
|
||||
93
harbour/source/codepage/uc8859_2.c
Normal file
93
harbour/source/codepage/uc8859_2.c
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* xHarbour Project source code:
|
||||
*
|
||||
*
|
||||
* Copyright 2003 Przemyslaw Czerpak <druzus@acn.waw.pl>
|
||||
* 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] = {
|
||||
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
|
||||
0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
|
||||
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
|
||||
0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
|
||||
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,
|
||||
0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
|
||||
0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
|
||||
0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
|
||||
0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
|
||||
0x00A0, 0x0104, 0x02D8, 0x0141, 0x00A4, 0x013D, 0x015A, 0x00A7,
|
||||
0x00A8, 0x0160, 0x015E, 0x0164, 0x0179, 0x00AD, 0x017D, 0x017B,
|
||||
0x00B0, 0x0105, 0x02DB, 0x0142, 0x00B4, 0x013E, 0x015B, 0x02C7,
|
||||
0x00B8, 0x0161, 0x015F, 0x0165, 0x017A, 0x02DD, 0x017E, 0x017C,
|
||||
0x0154, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0139, 0x0106, 0x00C7,
|
||||
0x010C, 0x00C9, 0x0118, 0x00CB, 0x011A, 0x00CD, 0x00CE, 0x010E,
|
||||
0x0110, 0x0143, 0x0147, 0x00D3, 0x00D4, 0x0150, 0x00D6, 0x00D7,
|
||||
0x0158, 0x016E, 0x00DA, 0x0170, 0x00DC, 0x00DD, 0x0162, 0x00DF,
|
||||
0x0155, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x013A, 0x0107, 0x00E7,
|
||||
0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F,
|
||||
0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7,
|
||||
0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9,
|
||||
};
|
||||
|
||||
HB_UNITABLE hb_uniTbl_8859_2 = { CPID_8859_2, NUMBER_OF_CHARS, FALSE, uniCodes };
|
||||
93
harbour/source/codepage/uckoi8.c
Normal file
93
harbour/source/codepage/uckoi8.c
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* xHarbour Project source code:
|
||||
*
|
||||
*
|
||||
* Copyright 2003 Przemyslaw Czerpak <druzus@acn.waw.pl>
|
||||
* 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] = {
|
||||
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
|
||||
0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
|
||||
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
|
||||
0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
|
||||
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,
|
||||
0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524,
|
||||
0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590,
|
||||
0x2591, 0x2592, 0x2593, 0x2320, 0x25A0, 0x2219, 0x221A, 0x2248,
|
||||
0x2264, 0x2265, 0x00A0, 0x2321, 0x00B0, 0x00B2, 0x00B7, 0x00F7,
|
||||
0x2550, 0x2551, 0x2552, 0x0451, 0x2553, 0x2554, 0x2555, 0x2556,
|
||||
0x2557, 0x2558, 0x2559, 0x255A, 0x255B, 0x255C, 0x255D, 0x255E,
|
||||
0x255F, 0x2560, 0x2561, 0x0401, 0x2562, 0x2563, 0x2564, 0x2565,
|
||||
0x2566, 0x2567, 0x2568, 0x2569, 0x256A, 0x256B, 0x256C, 0x00A9,
|
||||
0x044E, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433,
|
||||
0x0445, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E,
|
||||
0x043F, 0x044F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432,
|
||||
0x044C, 0x044B, 0x0437, 0x0448, 0x044D, 0x0449, 0x0447, 0x044A,
|
||||
0x042E, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413,
|
||||
0x0425, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E,
|
||||
0x041F, 0x042F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412,
|
||||
0x042C, 0x042B, 0x0417, 0x0428, 0x042D, 0x0429, 0x0427, 0x042A,
|
||||
};
|
||||
|
||||
HB_UNITABLE hb_uniTbl_KOI_8 = { CPID_KOI_8, NUMBER_OF_CHARS, FALSE, uniCodes };
|
||||
93
harbour/source/codepage/uckoi8u.c
Normal file
93
harbour/source/codepage/uckoi8u.c
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* xHarbour Project source code:
|
||||
*
|
||||
*
|
||||
* Copyright 2004 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] = {
|
||||
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
|
||||
0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
|
||||
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
|
||||
0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
|
||||
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,
|
||||
0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524,
|
||||
0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590,
|
||||
0x2591, 0x2592, 0x2593, 0x2320, 0x25A0, 0x2219, 0x221A, 0x2248,
|
||||
0x2264, 0x2265, 0x00A0, 0x2321, 0x00B0, 0x00B2, 0x00B7, 0x00F7,
|
||||
0x2550, 0x2551, 0x2552, 0x0451, 0x0454, 0x2554, 0x0456, 0x0457,
|
||||
0x2557, 0x2558, 0x2559, 0x255A, 0x255B, 0x0491, 0x255D, 0x255E,
|
||||
0x255F, 0x2560, 0x2561, 0x0401, 0x0404, 0x2563, 0x0406, 0x0407,
|
||||
0x2566, 0x2567, 0x2568, 0x2569, 0x256A, 0x0490, 0x256C, 0x00A9,
|
||||
0x044E, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433,
|
||||
0x0445, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E,
|
||||
0x043F, 0x044F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432,
|
||||
0x044C, 0x044B, 0x0437, 0x0448, 0x044D, 0x0449, 0x0447, 0x044A,
|
||||
0x042E, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413,
|
||||
0x0425, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E,
|
||||
0x041F, 0x042F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412,
|
||||
0x042C, 0x042B, 0x0417, 0x0428, 0x042D, 0x0429, 0x0427, 0x042A,
|
||||
};
|
||||
|
||||
HB_UNITABLE hb_uniTbl_KOI_8U = { CPID_KOI_8U, NUMBER_OF_CHARS, FALSE, uniCodes };
|
||||
93
harbour/source/codepage/ucmaz.c
Normal file
93
harbour/source/codepage/ucmaz.c
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* xHarbour Project source code:
|
||||
*
|
||||
*
|
||||
* Copyright 2003 Przemyslaw Czerpak <druzus@acn.waw.pl>
|
||||
* 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] = {
|
||||
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
|
||||
0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
|
||||
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
|
||||
0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
|
||||
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,
|
||||
0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x0105, 0x00E7,
|
||||
0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x0107, 0x00C4, 0x0104,
|
||||
0x0118, 0x0119, 0x0142, 0x00F4, 0x00F6, 0x0106, 0x00FB, 0x00F9,
|
||||
0x015A, 0x00D6, 0x00DC, 0x00A2, 0x0141, 0x00A5, 0x015B, 0x0192,
|
||||
0x0179, 0x017B, 0x00F3, 0x00D3, 0x0144, 0x0143, 0x017A, 0x017C,
|
||||
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_mazovia = { CPID_MAZ, NUMBER_OF_CHARS, FALSE, uniCodes };
|
||||
@@ -1090,8 +1090,8 @@ HB_EXPR_PTR hb_compExprReduceIIF( HB_EXPR_PTR pSelf, HB_MACRO_DECL )
|
||||
( pExpr->ExprType == HB_ET_CODEBLOCK ) ||
|
||||
( pExpr->ExprType == HB_ET_SELF ) ||
|
||||
( pExpr->ExprType == HB_ET_ARRAY ) )
|
||||
{
|
||||
hb_compExprErrorType( pExpr, HB_MACRO_PARAM );
|
||||
{
|
||||
hb_compExprErrorType( pExpr, HB_MACRO_PARAM );
|
||||
}
|
||||
return pSelf;
|
||||
}
|
||||
@@ -1123,55 +1123,55 @@ HB_EXPR_PTR hb_compExprListStrip( HB_EXPR_PTR pSelf, HB_MACRO_DECL )
|
||||
|
||||
BOOL hb_compExprReduceAT( HB_EXPR_PTR pSelf, HB_MACRO_DECL )
|
||||
{
|
||||
HB_EXPR_PTR pParms = pSelf->value.asFunCall.pParms;
|
||||
HB_EXPR_PTR pSub = pParms->value.asList.pExprList;
|
||||
HB_EXPR_PTR pText = pSub->pNext;
|
||||
HB_EXPR_PTR pParms = pSelf->value.asFunCall.pParms;
|
||||
HB_EXPR_PTR pSub = pParms->value.asList.pExprList;
|
||||
HB_EXPR_PTR pText = pSub->pNext;
|
||||
HB_EXPR_PTR pReduced;
|
||||
|
||||
if( pSub->ExprType == HB_ET_STRING && pText->ExprType == HB_ET_STRING )
|
||||
{
|
||||
if( pSub->value.asString.string[0] == '\0' )
|
||||
{
|
||||
pReduced = hb_compExprNewLong( 1 );
|
||||
pReduced = hb_compExprNewLong( 1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
pReduced = hb_compExprNewLong( hb_strAt( pSub->value.asString.string, pSub->ulLength, pText->value.asString.string, pText->ulLength ) );
|
||||
pReduced = hb_compExprNewLong( hb_strAt( pSub->value.asString.string, pSub->ulLength, pText->value.asString.string, pText->ulLength ) );
|
||||
}
|
||||
|
||||
hb_compExprFree( pSelf->value.asFunCall.pFunName, HB_MACRO_PARAM );
|
||||
hb_compExprFree( pSelf->value.asFunCall.pFunName, HB_MACRO_PARAM );
|
||||
hb_compExprFree( pSelf->value.asFunCall.pParms, HB_MACRO_PARAM );
|
||||
|
||||
memcpy( pSelf, pReduced, sizeof( HB_EXPR ) );
|
||||
hb_compExprClear( pReduced );
|
||||
return TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL hb_compExprReduceCHR( HB_EXPR_PTR pSelf, HB_MACRO_DECL )
|
||||
{
|
||||
HB_EXPR_PTR pParms = pSelf->value.asFunCall.pParms;
|
||||
HB_EXPR_PTR pParms = pSelf->value.asFunCall.pParms;
|
||||
HB_EXPR_PTR pArg = pParms->value.asList.pExprList;
|
||||
HB_EXPR_PTR pExpr = NULL;
|
||||
/* try to change it into a string */
|
||||
|
||||
/* try to change it into a string */
|
||||
if( pArg->ExprType == HB_ET_NUMERIC )
|
||||
{
|
||||
/* NOTE: CA-Cl*pper's compiler optimizer will be wrong for those
|
||||
CHR() cases where the passed parameter is a constant which
|
||||
can be divided by 256 but it's not zero, in this case it
|
||||
will return an empty string instead of a Chr(0). [vszakats] */
|
||||
/* NOTE: CA-Cl*pper's compiler optimizer will be wrong for those
|
||||
CHR() cases where the passed parameter is a constant which
|
||||
can be divided by 256 but it's not zero, in this case it
|
||||
will return an empty string instead of a Chr(0). [vszakats] */
|
||||
|
||||
pExpr = hb_compExprNew( HB_ET_STRING );
|
||||
pExpr->ValType = HB_EV_STRING;
|
||||
if( pArg->value.asNum.NumType == HB_ET_LONG )
|
||||
HB_EXPR_PTR pExpr = hb_compExprNew( HB_ET_STRING );
|
||||
|
||||
pExpr->ValType = HB_EV_STRING;
|
||||
if( pArg->value.asNum.NumType == HB_ET_LONG )
|
||||
{
|
||||
BYTE bVal;
|
||||
bVal = ( pArg->value.asNum.lVal % 256 );
|
||||
|
||||
if( bVal == 0 && pArg->value.asNum.lVal != 0 )
|
||||
BYTE bVal;
|
||||
bVal = ( pArg->value.asNum.lVal % 256 );
|
||||
|
||||
if( bVal == 0 && pArg->value.asNum.lVal != 0 )
|
||||
{
|
||||
pExpr->value.asString.string = ( char * ) hb_xgrab( 1 );
|
||||
pExpr->value.asString.string[ 0 ] = '\0';
|
||||
@@ -1183,7 +1183,7 @@ BOOL hb_compExprReduceCHR( HB_EXPR_PTR pSelf, HB_MACRO_DECL )
|
||||
pExpr->value.asString.string = ( char * ) hb_xgrab( 2 );
|
||||
pExpr->value.asString.string[ 0 ] = bVal;
|
||||
pExpr->value.asString.string[ 1 ] = '\0';
|
||||
pExpr->value.asString.dealloc = TRUE;
|
||||
pExpr->value.asString.dealloc = TRUE;
|
||||
pExpr->ulLength = 1;
|
||||
}
|
||||
}
|
||||
@@ -1208,7 +1208,7 @@ BOOL hb_compExprReduceCHR( HB_EXPR_PTR pSelf, HB_MACRO_DECL )
|
||||
|
||||
BOOL hb_compExprReduceLEN( HB_EXPR_PTR pSelf, HB_MACRO_DECL )
|
||||
{
|
||||
HB_EXPR_PTR pParms = pSelf->value.asFunCall.pParms;
|
||||
HB_EXPR_PTR pParms = pSelf->value.asFunCall.pParms;
|
||||
HB_EXPR_PTR pArg = pParms->value.asList.pExprList;
|
||||
|
||||
if( pArg->ExprType == HB_ET_STRING || pArg->ExprType == HB_ET_ARRAY )
|
||||
@@ -1220,13 +1220,13 @@ BOOL hb_compExprReduceLEN( HB_EXPR_PTR pSelf, HB_MACRO_DECL )
|
||||
memcpy( pSelf, pExpr, sizeof( HB_EXPR ) );
|
||||
hb_compExprClear( pExpr );
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL hb_compExprReduceASC( HB_EXPR_PTR pSelf, HB_MACRO_DECL )
|
||||
{
|
||||
HB_EXPR_PTR pParms = pSelf->value.asFunCall.pParms;
|
||||
HB_EXPR_PTR pParms = pSelf->value.asFunCall.pParms;
|
||||
HB_EXPR_PTR pArg = pParms->value.asList.pExprList;
|
||||
|
||||
if( pArg->ExprType == HB_ET_STRING )
|
||||
@@ -1238,6 +1238,6 @@ BOOL hb_compExprReduceASC( HB_EXPR_PTR pSelf, HB_MACRO_DECL )
|
||||
memcpy( pSelf, pExpr, sizeof( HB_EXPR ) );
|
||||
hb_compExprClear( pExpr );
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -406,9 +406,9 @@ double hb_numInt( double dNum )
|
||||
|
||||
static BOOL hb_str2number( BOOL fPCode, const char* szNum, ULONG ulLen, HB_LONG * lVal, double * dVal, int * piDec, int * piWidth )
|
||||
{
|
||||
BOOL fDbl = FALSE, fDec = FALSE, fNeg = FALSE, fHex = FALSE;
|
||||
BOOL fDbl = FALSE, fDec = FALSE, fNeg, fHex = FALSE;
|
||||
ULONG ulPos = 0;
|
||||
int c, iWidth = 0, iDec = 0, iDecR = 0;
|
||||
int c, iWidth, iDec = 0, iDecR = 0;
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_str2number(%d, %p, %ul %p, %p, %p, %p)", (int) fPCode, szNum, ulLen, lVal, dVal, piDec, piWidth ));
|
||||
|
||||
|
||||
@@ -3919,8 +3919,8 @@ void hb_compCodeBlockEnd( void )
|
||||
void hb_compCodeBlockStop( void )
|
||||
{
|
||||
PFUNCTION pCodeblock; /* pointer to the current codeblock */
|
||||
PFUNCTION pFunc;/* pointer to a function that owns a codeblock */
|
||||
USHORT wLocals = 0; /* number of referenced local variables */
|
||||
PFUNCTION pFunc; /* pointer to a function that owns a codeblock */
|
||||
USHORT wLocals = 0; /* number of referenced local variables */
|
||||
USHORT wUsed;
|
||||
PVAR pVar, pFree;
|
||||
|
||||
@@ -3960,7 +3960,7 @@ void hb_compCodeBlockStop( void )
|
||||
hb_xfree( ( void * ) pFree );
|
||||
}
|
||||
|
||||
hb_compGenPCodeN( pCodeblock->pCode, pCodeblock->lPCodePos, ( BOOL ) 0 );
|
||||
hb_compGenPCodeN( pCodeblock->pCode, pCodeblock->lPCodePos, FALSE );
|
||||
hb_xfree( ( void * ) pCodeblock->pCode );
|
||||
hb_xfree( ( void * ) pCodeblock );
|
||||
}
|
||||
|
||||
@@ -87,10 +87,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#undef __GNUC__
|
||||
#endif
|
||||
|
||||
/* yacc/lex related definitions
|
||||
*/
|
||||
#undef YYPARSE_PARAM
|
||||
|
||||
@@ -624,7 +624,6 @@ int hb_pp_ParseDefine( char * sLine )
|
||||
sLine++;
|
||||
HB_SKIPTABSPACES( sLine );
|
||||
|
||||
i = 0;
|
||||
npars = 0;
|
||||
while( *sLine && *sLine != ')' )
|
||||
{
|
||||
@@ -695,7 +694,7 @@ int hb_pp_ParseDefine( char * sLine )
|
||||
iPar = strlen( tmp );
|
||||
memcpy( pars, tmp, iPar );
|
||||
pars[ iPar ] = '\0';
|
||||
iPos = iOldPos = 0;
|
||||
iOldPos = 0;
|
||||
while( (iPos = md_strAt( pars+1, iPar-1, sLine+iOldPos, TRUE, FALSE, FALSE )) )
|
||||
{
|
||||
if( sLine[iOldPos+iPos] != '\001' )
|
||||
|
||||
@@ -125,6 +125,9 @@ void hb_pp_Table( void )
|
||||
static DEFINES sD___54 = {"_SET_DIRCASE",NULL,-1,"103", &sD___53 };
|
||||
static DEFINES sD___55 = {"_SET_DIRSEPARATOR",NULL,-1,"104", &sD___54 };
|
||||
static DEFINES sD___56 = {"_SET_EOF",NULL,-1,"105", &sD___55 };
|
||||
static DEFINES sD___57 = {"_SET_HARDCOMMIT",NULL,-1,"106", &sD___56 };
|
||||
static DEFINES sD___58 = {"_SET_FORCEOPT",NULL,-1,"107", &sD___57 };
|
||||
static DEFINES sD___59 = {"_SET_DBFLOCKSCHEME",NULL,-1,"108", &sD___58 };
|
||||
|
||||
static COMMANDS sC___1 = {0,"NOTE","\1A30",NULL,NULL };
|
||||
static COMMANDS sC___2 = {0,"DO","WHILE \1A00","while \1A00",&sC___1 };
|
||||
@@ -442,8 +445,12 @@ void hb_pp_Table( void )
|
||||
static COMMANDS sC___257 = {0,"SET","AUTORDER TO","Set( _SET_AUTORDER, 0 )",&sC___256 };
|
||||
static COMMANDS sC___258 = {0,"SET","STRICTREAD \1A20 ON,OFF,&>","Set(_SET_STRICTREAD,\1A30 )",&sC___257 };
|
||||
static COMMANDS sC___259 = {0,"SET","STRICTREAD (\1A00)","Set(_SET_STRICTREAD,\1A00 )",&sC___258 };
|
||||
static COMMANDS sC___260 = {0,"SET","HARDCOMMIT \1A20 ON,OFF,&>","Set(_SET_HARDCOMMIT,\1A30 )",&sC___259 };
|
||||
static COMMANDS sC___261 = {0,"SET","HARDCOMMIT (\1A00)","Set(_SET_HARDCOMMIT,\1A00 )",&sC___260 };
|
||||
static COMMANDS sC___262 = {0,"SET","DBFLOCKSCHEME TO \1A00","Set(_SET_DBFLOCKSCHEME, \1A00 )",&sC___261 };
|
||||
static COMMANDS sC___263 = {0,"SET","DBFLOCKSCHEME TO","Set(_SET_DBFLOCKSCHEME, 0 )",&sC___262 };
|
||||
|
||||
hb_pp_topDefine = &sD___56;
|
||||
hb_pp_topCommand = &sC___259;
|
||||
hb_pp_topDefine = &sD___59;
|
||||
hb_pp_topCommand = &sC___263;
|
||||
hb_pp_topTranslate = NULL;
|
||||
}
|
||||
|
||||
@@ -4104,3 +4104,13 @@ ERRCODE hb_rddGetTempAlias( char * szAliasTmp )
|
||||
return SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
HB_FUNC( __RDDGETTEMPALIAS )
|
||||
{
|
||||
char szAliasTmp[ HARBOUR_MAX_RDD_ALIAS_LENGTH + 1 ];
|
||||
|
||||
if ( hb_rddGetTempAlias( szAliasTmp ) == FAILURE )
|
||||
hb_ret();
|
||||
else
|
||||
hb_retc( szAliasTmp );
|
||||
}
|
||||
|
||||
@@ -799,6 +799,8 @@ static ERRCODE hb_dbfGoTo( DBFAREAP pArea, ULONG ulRecNo )
|
||||
if( SELF_GOCOLD( ( AREAP ) pArea ) == FAILURE )
|
||||
return FAILURE;
|
||||
|
||||
if( pArea->lpdbPendingRel && pArea->lpdbPendingRel->isScoped )
|
||||
SELF_FORCEREL( ( AREAP ) pArea );
|
||||
/* Reset parent rel struct */
|
||||
pArea->lpdbPendingRel = NULL;
|
||||
|
||||
|
||||
@@ -4953,7 +4953,6 @@ static BOOL hb_cdxCurKeyRefresh( CDXAREAP pArea, LPCDXTAG pTag )
|
||||
/* not found, create new key from DBF and if differs seek again */
|
||||
if ( !fBuf || memcmp( buf, pKey->val, pKey->len ) != 0 )
|
||||
{
|
||||
fBuf = TRUE;
|
||||
memcpy( buf, pKey->val, pKey->len );
|
||||
hb_cdxTagKeyFind( pTag, pKey );
|
||||
}
|
||||
@@ -5797,6 +5796,9 @@ static ERRCODE hb_cdxGoBottom( CDXAREAP pArea )
|
||||
if ( ! pTag )
|
||||
return SUPER_GOBOTTOM( ( AREAP ) pArea );
|
||||
|
||||
if( pArea->lpdbPendingRel && pArea->lpdbPendingRel->isScoped )
|
||||
SELF_FORCEREL( ( AREAP ) pArea );
|
||||
|
||||
hb_cdxIndexLockRead( pTag->pIndex );
|
||||
|
||||
hb_cdxTagGoBottom( pTag );
|
||||
@@ -5839,6 +5841,9 @@ static ERRCODE hb_cdxGoTop( CDXAREAP pArea )
|
||||
if ( ! pTag )
|
||||
return SUPER_GOTOP( ( AREAP ) pArea );
|
||||
|
||||
if( pArea->lpdbPendingRel && pArea->lpdbPendingRel->isScoped )
|
||||
SELF_FORCEREL( ( AREAP ) pArea );
|
||||
|
||||
hb_cdxIndexLockRead( pTag->pIndex );
|
||||
|
||||
hb_cdxTagGoTop( pTag );
|
||||
@@ -5882,6 +5887,9 @@ static ERRCODE hb_cdxSeek( CDXAREAP pArea, BOOL fSoftSeek, PHB_ITEM pKeyItm, BOO
|
||||
BOOL fEOF = FALSE, fLast;
|
||||
ULONG ulRec;
|
||||
|
||||
if( pArea->lpdbPendingRel && pArea->lpdbPendingRel->isScoped )
|
||||
SELF_FORCEREL( ( AREAP ) pArea );
|
||||
|
||||
pArea->fTop = pArea->fBottom = FALSE;
|
||||
pArea->fEof = FALSE;
|
||||
|
||||
@@ -6426,7 +6434,7 @@ static ERRCODE hb_cdxPack( CDXAREAP pArea )
|
||||
|
||||
if ( SUPER_PACK( ( AREAP ) pArea ) == SUCCESS )
|
||||
{
|
||||
return hb_cdxOrderListRebuild( pArea );
|
||||
return SELF_ORDLSTREBUILD( ( AREAP ) pArea );
|
||||
}
|
||||
else
|
||||
return FAILURE;
|
||||
@@ -6445,10 +6453,9 @@ static ERRCODE hb_cdxZap ( CDXAREAP pArea )
|
||||
if ( FAST_GOCOLD( ( AREAP ) pArea ) == FAILURE )
|
||||
return FAILURE;
|
||||
|
||||
hb_cdxOrderListRebuild( pArea );
|
||||
if ( SUPER_ZAP( ( AREAP ) pArea ) == SUCCESS )
|
||||
{
|
||||
return hb_cdxOrderListRebuild( pArea );
|
||||
return SELF_ORDLSTREBUILD( ( AREAP ) pArea );
|
||||
}
|
||||
else
|
||||
return FAILURE;
|
||||
@@ -7494,6 +7501,9 @@ static ERRCODE hb_cdxClearScope( CDXAREAP pArea )
|
||||
|
||||
if ( pTag )
|
||||
{
|
||||
/* resolve any pending scope relations first */
|
||||
if( pArea->lpdbPendingRel && pArea->lpdbPendingRel->isScoped )
|
||||
SELF_FORCEREL( ( AREAP ) pArea );
|
||||
hb_cdxTagClearScope( pTag, 0);
|
||||
hb_cdxTagClearScope( pTag, 1);
|
||||
}
|
||||
@@ -7528,6 +7538,10 @@ static ERRCODE hb_cdxScopeInfo( CDXAREAP pArea, USHORT nScope, PHB_ITEM pItem )
|
||||
{
|
||||
PHB_ITEM *pScope;
|
||||
|
||||
/* resolve any pending scope relations first */
|
||||
if( pArea->lpdbPendingRel && pArea->lpdbPendingRel->isScoped )
|
||||
SELF_FORCEREL( ( AREAP ) pArea );
|
||||
|
||||
pScope = ( pTag->UsrAscend ? nScope == 0 : nScope != 0 ) ?
|
||||
&(pTag->topScope) : &(pTag->bottomScope);
|
||||
if ( *pScope )
|
||||
@@ -7556,6 +7570,10 @@ static ERRCODE hb_cdxSetScope( CDXAREAP pArea, LPDBORDSCOPEINFO sInfo )
|
||||
|
||||
if ( pTag )
|
||||
{
|
||||
/* resolve any pending scope relations first */
|
||||
if( pArea->lpdbPendingRel && pArea->lpdbPendingRel->isScoped )
|
||||
SELF_FORCEREL( ( AREAP ) pArea );
|
||||
|
||||
if ( !sInfo->scopeValue )
|
||||
{
|
||||
hb_cdxTagClearScope( pTag, sInfo->nScope );
|
||||
|
||||
@@ -270,12 +270,18 @@ static BOOL hb_dbtFileLockEx( DBTAREAP pArea )
|
||||
{
|
||||
BOOL fRet;
|
||||
|
||||
do
|
||||
if ( !pArea->fShared )
|
||||
{
|
||||
fRet = hb_fsLock( pArea->hMemoFile, DBT_LOCKPOS, DBT_LOCKSIZE,
|
||||
FL_LOCK | FLX_EXCLUSIVE | FLX_WAIT );
|
||||
} while ( !fRet );
|
||||
|
||||
fRet = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
do
|
||||
{
|
||||
fRet = hb_fsLock( pArea->hMemoFile, DBT_LOCKPOS, DBT_LOCKSIZE,
|
||||
FL_LOCK | FLX_EXCLUSIVE | FLX_WAIT );
|
||||
} while ( !fRet );
|
||||
}
|
||||
return fRet;
|
||||
}
|
||||
|
||||
@@ -286,12 +292,18 @@ static BOOL hb_dbtFileLockSh( DBTAREAP pArea )
|
||||
{
|
||||
BOOL fRet;
|
||||
|
||||
do
|
||||
if ( !pArea->fShared )
|
||||
{
|
||||
fRet = hb_fsLock( pArea->hMemoFile, DBT_LOCKPOS, DBT_LOCKSIZE,
|
||||
FL_LOCK | FLX_SHARED | FLX_WAIT );
|
||||
} while ( !fRet );
|
||||
|
||||
fRet = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
do
|
||||
{
|
||||
fRet = hb_fsLock( pArea->hMemoFile, DBT_LOCKPOS, DBT_LOCKSIZE,
|
||||
FL_LOCK | FLX_SHARED | FLX_WAIT );
|
||||
} while ( !fRet );
|
||||
}
|
||||
return fRet;
|
||||
}
|
||||
|
||||
@@ -300,7 +312,7 @@ static BOOL hb_dbtFileLockSh( DBTAREAP pArea )
|
||||
*/
|
||||
static BOOL hb_dbtFileUnLock( DBTAREAP pArea )
|
||||
{
|
||||
return hb_fsLock( pArea->hMemoFile, DBT_LOCKPOS, DBT_LOCKSIZE, FL_UNLOCK );
|
||||
return !pArea->fShared || hb_fsLock( pArea->hMemoFile, DBT_LOCKPOS, DBT_LOCKSIZE, FL_UNLOCK );
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -320,11 +332,13 @@ static ULONG hb_dbtGetMemoLen( DBTAREAP pArea, USHORT uiIndex )
|
||||
ulBlock = 0;
|
||||
do
|
||||
{
|
||||
hb_fsRead( pArea->hMemoFile, pBlock, DBT_BLOCKSIZE );
|
||||
uiIndex = 0;
|
||||
while( uiIndex < DBT_BLOCKSIZE && pBlock[ uiIndex ] != 0x1A )
|
||||
uiIndex++;
|
||||
ulBlock += uiIndex;
|
||||
if ( hb_fsRead( pArea->hMemoFile, pBlock, DBT_BLOCKSIZE ) == DBT_BLOCKSIZE )
|
||||
{
|
||||
while( uiIndex < DBT_BLOCKSIZE && pBlock[ uiIndex ] != 0x1A )
|
||||
uiIndex++;
|
||||
ulBlock += uiIndex;
|
||||
}
|
||||
} while( uiIndex == DBT_BLOCKSIZE );
|
||||
return ulBlock;
|
||||
}
|
||||
|
||||
@@ -380,7 +380,7 @@ static BOOL hb_fptFileLockSh( FPTAREAP pArea, BOOL fWait )
|
||||
*/
|
||||
static BOOL hb_fptFileUnLock( FPTAREAP pArea )
|
||||
{
|
||||
return hb_fsLock( pArea->hMemoFile, FPT_LOCKPOS, FPT_LOCKSIZE, FL_UNLOCK );
|
||||
return !pArea->fShared || hb_fsLock( pArea->hMemoFile, FPT_LOCKPOS, FPT_LOCKSIZE, FL_UNLOCK );
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2071,7 +2071,7 @@ static ERRCODE hb_fptGetVarLen( FPTAREAP pArea, USHORT uiIndex, ULONG * pLength
|
||||
if( pArea->fHasMemo && pArea->hMemoFile != FS_ERROR &&
|
||||
pArea->lpFields[ uiIndex - 1 ].uiType == HB_IT_MEMO )
|
||||
{
|
||||
ERRCODE uiError = SUCCESS;
|
||||
ERRCODE uiError;
|
||||
BOOL bLocked, bDeleted;
|
||||
#if defined( HB_FPT_USE_READLOCK )
|
||||
ULONG ulOffset;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -56,8 +56,8 @@ FUNCTION DBCLEARFIL()
|
||||
FUNCTION DBSETDRIVE(cDriver)
|
||||
Return DBSETDRIVER(cDriver)
|
||||
|
||||
FUNCTION DBSETRELAT(xArea,bRelation,cRelation)
|
||||
Return DBSETRELATION(xArea,bRelation,cRelation)
|
||||
FUNCTION DBSETRELAT(xArea,bRelation,cRelation,lScoped)
|
||||
Return DBSETRELATION(xArea,bRelation,cRelation,lScoped)
|
||||
|
||||
FUNCTION DBRLOCKLIS()
|
||||
Return DBRLOCKLIST()
|
||||
|
||||
@@ -54,29 +54,29 @@
|
||||
|
||||
#ifdef HB_C52_UNDOC
|
||||
|
||||
extern HB_FUNC( DBSEEK );
|
||||
extern HB_FUNC( DBSKIP );
|
||||
extern HB_FUNC( DBGOTOP );
|
||||
extern HB_FUNC( DBGOBOTTOM );
|
||||
extern HB_FUNC( DBGOTO );
|
||||
extern HB_FUNC( DBAPPEND );
|
||||
extern HB_FUNC( DBDELETE );
|
||||
extern HB_FUNC( DBRECALL );
|
||||
extern HB_FUNC( DBCOMMITALL );
|
||||
extern HB_FUNC( DBUNLOCK );
|
||||
extern HB_FUNC( DBUNLOCKALL );
|
||||
extern HB_FUNC( DBSETFILTER );
|
||||
extern HB_FUNC( DBCLEARRELATION );
|
||||
extern HB_FUNC( DBSETRELATION );
|
||||
extern HB_FUNC( DBREINDEX );
|
||||
extern HB_FUNC( DBCREATEINDEX );
|
||||
extern HB_FUNC( DBCLEARINDEX );
|
||||
extern HB_FUNC( DBSETINDEX );
|
||||
extern HB_FUNC( DBSETORDER );
|
||||
extern HB_FUNC( DBCLOSEALL );
|
||||
extern HB_FUNC( DBCLOSEAREA );
|
||||
extern HB_FUNC( DBUSEAREA );
|
||||
extern HB_FUNC( DBSELECTAREA );
|
||||
HB_FUNC_EXTERN( DBSEEK );
|
||||
HB_FUNC_EXTERN( DBSKIP );
|
||||
HB_FUNC_EXTERN( DBGOTOP );
|
||||
HB_FUNC_EXTERN( DBGOBOTTOM );
|
||||
HB_FUNC_EXTERN( DBGOTO );
|
||||
HB_FUNC_EXTERN( DBAPPEND );
|
||||
HB_FUNC_EXTERN( DBDELETE );
|
||||
HB_FUNC_EXTERN( DBRECALL );
|
||||
HB_FUNC_EXTERN( DBCOMMITALL );
|
||||
HB_FUNC_EXTERN( DBUNLOCK );
|
||||
HB_FUNC_EXTERN( DBUNLOCKALL );
|
||||
HB_FUNC_EXTERN( DBSETFILTER );
|
||||
HB_FUNC_EXTERN( DBCLEARRELATION );
|
||||
HB_FUNC_EXTERN( DBSETRELATION );
|
||||
HB_FUNC_EXTERN( DBREINDEX );
|
||||
HB_FUNC_EXTERN( DBCREATEINDEX );
|
||||
HB_FUNC_EXTERN( DBCLEARINDEX );
|
||||
HB_FUNC_EXTERN( DBSETINDEX );
|
||||
HB_FUNC_EXTERN( DBSETORDER );
|
||||
HB_FUNC_EXTERN( DBCLOSEALL );
|
||||
HB_FUNC_EXTERN( DBCLOSEAREA );
|
||||
HB_FUNC_EXTERN( DBUSEAREA );
|
||||
HB_FUNC_EXTERN( DBSELECTAREA );
|
||||
|
||||
HB_FUNC( __DBSEEK )
|
||||
{
|
||||
|
||||
@@ -62,6 +62,7 @@ FUNCTION __dbCopyXStruct( cFileName )
|
||||
LOCAL nOldArea
|
||||
LOCAL oError
|
||||
LOCAL aStruct
|
||||
local cTmpAlias
|
||||
|
||||
IF Empty( aStruct := dbStruct() )
|
||||
RETURN .F.
|
||||
@@ -70,9 +71,10 @@ FUNCTION __dbCopyXStruct( cFileName )
|
||||
nOldArea := Select()
|
||||
|
||||
BEGIN SEQUENCE
|
||||
cTmpAlias := __rddGetTempAlias()
|
||||
|
||||
dbSelectArea( 0 )
|
||||
__dbCreate( cFileName, NIL, NIL, .F., NIL )
|
||||
__dbCreate( cFileName, NIL, NIL, .F., cTmpAlias )
|
||||
|
||||
AEval( aStruct, {| aField | iif( aField[ DBS_TYPE ] == "C" .AND. aField[ DBS_LEN ] > 255, ;
|
||||
( aField[ DBS_DEC ] := Int( aField[ DBS_LEN ] / 256 ), aField[ DBS_LEN ] := aField[ DBS_LEN ] % 256 ), NIL ) } )
|
||||
@@ -84,7 +86,7 @@ FUNCTION __dbCopyXStruct( cFileName )
|
||||
FIELD->FIELD_DEC := aField[ DBS_DEC ] } )
|
||||
|
||||
/* NOTE: CA-Cl*pper has a bug, where only a plain RECOVER statement is
|
||||
used here (without the USING keyword), so oError will always be
|
||||
used here (without the USING keyword), so oError will always be
|
||||
NIL. */
|
||||
RECOVER USING oError
|
||||
END SEQUENCE
|
||||
@@ -104,6 +106,7 @@ FUNCTION __dbCreate( cFileName, cFileFrom, cRDDName, lNew, cAlias, cdpId )
|
||||
LOCAL nOldArea := Select()
|
||||
LOCAL aStruct := {}
|
||||
LOCAL oError
|
||||
local cTmpAlias
|
||||
|
||||
DEFAULT lNew TO .F.
|
||||
|
||||
@@ -124,7 +127,9 @@ FUNCTION __dbCreate( cFileName, cFileFrom, cRDDName, lNew, cAlias, cdpId )
|
||||
|
||||
ELSE
|
||||
|
||||
dbUseArea( lNew,, cFileFrom )
|
||||
cTmpAlias := __rddGetTempAlias()
|
||||
|
||||
dbUseArea( lNew,, cFileFrom, cTmpAlias )
|
||||
|
||||
dbEval( {|| AAdd( aStruct, { Rtrim(FIELD->FIELD_NAME) ,;
|
||||
Rtrim(FIELD->FIELD_TYPE) ,;
|
||||
@@ -137,10 +142,11 @@ FUNCTION __dbCreate( cFileName, cFileFrom, cRDDName, lNew, cAlias, cdpId )
|
||||
ENDIF
|
||||
|
||||
AEval( aStruct, {| aField | iif( aField[ DBS_TYPE ] == "C" .AND. aField[ DBS_DEC ] != 0, ;
|
||||
aField[ DBS_LEN ] := aField[ DBS_LEN ] + aField[ DBS_DEC ] * 256, NIL ) } )
|
||||
( aField[ DBS_LEN ] += aField[ DBS_DEC ] * 256, ;
|
||||
aField[ DBS_DEC ] := 0 ), NIL ) } )
|
||||
|
||||
dbCreate( cFileName, aStruct, cRDDName )
|
||||
dbUseArea( lNew, cRDDName, cFileName, cAlias,,,cdpId )
|
||||
dbUseArea( lNew, cRDDName, cFileName, cAlias,,, cdpId )
|
||||
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -50,7 +50,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#define HB_EXTERNAL_RDDDBF_USE
|
||||
#include "hbdbsort.h"
|
||||
|
||||
BOOL hb_dbQSortInit( LPDBQUICKSORT pQuickSort, LPDBSORTINFO pSortInfo, USHORT uiRecordLen )
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
*/
|
||||
|
||||
#include "common.ch"
|
||||
#include "dbinfo.ch"
|
||||
|
||||
/* NOTE: The fifth parameters (cOrderName) is undocumented. */
|
||||
|
||||
@@ -105,4 +106,29 @@ FUNCTION ORDSETFOCU( xOrder, cFile )
|
||||
RETURN ORDSETFOCUS( xOrder, cFile )
|
||||
|
||||
FUNCTION ORDSETRELA( xArea, bRelation, cRelation )
|
||||
RETURN ORDSETRELATION( xArea, bRelation, cRelation, .T. )
|
||||
RETURN ORDSETRELATION( xArea, bRelation, cRelation )
|
||||
|
||||
FUNCTION ORDWILDSEEK( cPattern, lCont, lBack )
|
||||
LOCAL lFound := .F.
|
||||
|
||||
IF VALTYPE( lCont ) != "L"
|
||||
lCont := .F.
|
||||
ENDIF
|
||||
IF VALTYPE( lBack ) != "L"
|
||||
lBack := .F.
|
||||
ENDIF
|
||||
|
||||
IF ! lCont
|
||||
IF lBack
|
||||
DBGOBOTTOM()
|
||||
ELSE
|
||||
DBGOTOP()
|
||||
ENDIF
|
||||
lFound := WildMatch( cPattern, ORDKEYVAL() )
|
||||
ENDIF
|
||||
|
||||
IF ! lFound
|
||||
lFound := DBORDERINFO( IIF( lBack, DBOI_SKIPWILDBACK, DBOI_SKIPWILD ),,, cPattern )
|
||||
ENDIF
|
||||
|
||||
RETURN lFound
|
||||
|
||||
@@ -486,30 +486,9 @@ ERRCODE hb_waAlias( AREAP pArea, BYTE * szAlias )
|
||||
}
|
||||
|
||||
/*
|
||||
* Close the table in the WorkArea.
|
||||
* Close the table in the WorkArea - helper function
|
||||
*/
|
||||
short hb_waCloseAux ( AREAP pArea, int nChildArea );
|
||||
|
||||
ERRCODE hb_waClose( AREAP pArea )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_waClose(%p)", pArea));
|
||||
|
||||
/* Clear items */
|
||||
SELF_CLEARFILTER( pArea );
|
||||
SELF_CLEARREL( pArea );
|
||||
SELF_CLEARLOCATE( pArea );
|
||||
|
||||
if( pArea->uiParents > 0 )
|
||||
{
|
||||
/* Clear relations that has this area as a child */
|
||||
hb_rddIterateWorkAreas ( hb_waCloseAux, pArea->uiArea );
|
||||
}
|
||||
|
||||
( ( PHB_DYNS ) pArea->atomAlias )->hArea = 0;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
short hb_waCloseAux ( AREAP pArea, int nChildArea )
|
||||
static short hb_waCloseAux( AREAP pArea, int nChildArea )
|
||||
{
|
||||
USHORT uiPrevArea, uiArea;
|
||||
LPDBRELINFO lpdbRelation, lpdbRelPrev, lpdbRelTmp;
|
||||
@@ -550,6 +529,28 @@ short hb_waCloseAux ( AREAP pArea, int nChildArea )
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Close the table in the WorkArea.
|
||||
*/
|
||||
ERRCODE hb_waClose( AREAP pArea )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_waClose(%p)", pArea));
|
||||
|
||||
/* Clear items */
|
||||
SELF_CLEARFILTER( pArea );
|
||||
SELF_CLEARREL( pArea );
|
||||
SELF_CLEARLOCATE( pArea );
|
||||
|
||||
if( pArea->uiParents > 0 )
|
||||
{
|
||||
/* Clear relations that has this area as a child */
|
||||
hb_rddIterateWorkAreas ( hb_waCloseAux, pArea->uiArea );
|
||||
}
|
||||
|
||||
( ( PHB_DYNS ) pArea->atomAlias )->hArea = 0;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* Retrieve information about the current driver.
|
||||
*/
|
||||
|
||||
@@ -58,11 +58,174 @@
|
||||
|
||||
#define HB_CDP_MAX_ 64
|
||||
|
||||
static HB_CODEPAGE s_en_codepage = { "EN",0,NULL,NULL,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL };
|
||||
static PHB_CODEPAGE s_cdpList[ HB_CDP_MAX_ ];
|
||||
#define NUMBER_OF_CHARS 256
|
||||
|
||||
static USHORT uniCodes[NUMBER_OF_CHARS] = {
|
||||
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
|
||||
0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
|
||||
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
|
||||
0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
|
||||
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,
|
||||
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_437 = { CPID_437, NUMBER_OF_CHARS, FALSE, uniCodes };
|
||||
|
||||
static HB_CODEPAGE s_en_codepage = { "EN",CPID_437,UNITB_437,0,NULL,NULL,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL };
|
||||
static PHB_CODEPAGE s_cdpList[ HB_CDP_MAX_ ];
|
||||
PHB_CODEPAGE hb_cdp_page = &s_en_codepage;
|
||||
|
||||
|
||||
static int u16toutf8( BYTE *szUTF8, USHORT uc )
|
||||
{
|
||||
int n;
|
||||
|
||||
if ( uc < 0x0080 )
|
||||
{
|
||||
szUTF8[0] = uc & 0xff;
|
||||
n = 1;
|
||||
}
|
||||
else if ( uc < 0x0800 )
|
||||
{
|
||||
szUTF8[0] = 0xc0 | ( ( uc >> 6 ) & 0x1f );
|
||||
szUTF8[1] = 0x80 | ( uc & 0x3f );
|
||||
n = 2;
|
||||
}
|
||||
else /* if ( uc <= 0xffff ) */
|
||||
{
|
||||
szUTF8[0] = 0xe0 | ( ( uc >> 12 ) & 0x0f);
|
||||
szUTF8[1] = 0x80 | ( ( uc >> 6 ) & 0x3f);
|
||||
szUTF8[2] = 0x80 | ( uc & 0x3f );
|
||||
n = 3;
|
||||
}
|
||||
/*
|
||||
else
|
||||
{
|
||||
n = 0;
|
||||
}
|
||||
*/
|
||||
return n;
|
||||
}
|
||||
|
||||
static BOOL utf8tou16nextchar( BYTE byChar, int * n, USHORT * uc )
|
||||
{
|
||||
if ( *n > 0 )
|
||||
{
|
||||
if ( ( byChar & 0xc0 ) != 0x80 )
|
||||
return FALSE;
|
||||
*uc = ( *uc << 6 ) | ( byChar & 0x3f );
|
||||
(*n)--;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
*n = 0;
|
||||
*uc = byChar;
|
||||
if ( byChar >= 0xc0 )
|
||||
{
|
||||
if ( byChar < 0xe0 )
|
||||
{
|
||||
*uc &= 0x1f;
|
||||
*n = 1;
|
||||
}
|
||||
else if ( byChar < 0xf0 )
|
||||
{
|
||||
*uc &= 0x0f;
|
||||
*n = 2;
|
||||
}
|
||||
else if ( byChar < 0xf8 )
|
||||
{
|
||||
*uc &= 0x07;
|
||||
*n = 3;
|
||||
}
|
||||
else if ( byChar < 0xfc )
|
||||
{
|
||||
*uc &= 0x03;
|
||||
*n = 4;
|
||||
}
|
||||
else if ( byChar < 0xfe )
|
||||
{
|
||||
*uc &= 0x01;
|
||||
*n = 5;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#if 0 /* currently unused, it will in the future */
|
||||
static int utf8tou16( BYTE *szUTF8, USHORT *uc )
|
||||
{
|
||||
int n = 1, m = 1;
|
||||
UINT32 u32;
|
||||
|
||||
u32 = *szUTF8;
|
||||
if ( u32 >= 0xc0 )
|
||||
{
|
||||
if ( u32 < 0xe0 )
|
||||
{
|
||||
u32 &= 0x1f;
|
||||
m = 2;
|
||||
}
|
||||
else if ( u32 < 0xf0 )
|
||||
{
|
||||
u32 &= 0x0f;
|
||||
m = 3;
|
||||
}
|
||||
else if ( u32 < 0xf8 )
|
||||
{
|
||||
u32 &= 0x07;
|
||||
m = 4;
|
||||
}
|
||||
else if ( u32 < 0xfc )
|
||||
{
|
||||
u32 &= 0x03;
|
||||
m = 5;
|
||||
}
|
||||
else if ( u32 < 0xfe )
|
||||
{
|
||||
u32 &= 0x01;
|
||||
m = 6;
|
||||
}
|
||||
while ( n < m && ( szUTF8[n] & 0xc0 ) == 0x80 )
|
||||
{
|
||||
u32 = ( u32 << 6 ) | ( szUTF8[n++] & 0x3f );
|
||||
}
|
||||
if ( n < m )
|
||||
{
|
||||
u32 <<= 6 * (m - n);
|
||||
}
|
||||
}
|
||||
|
||||
*uc = (USHORT) u32;
|
||||
return n;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int hb_cdpFindPos( char * pszID )
|
||||
{
|
||||
int iPos;
|
||||
@@ -79,7 +242,7 @@ static int hb_cdpFindPos( char * pszID )
|
||||
return -1;
|
||||
}
|
||||
|
||||
BOOL hb_cdpRegister( PHB_CODEPAGE cdpage )
|
||||
BOOL HB_EXPORT hb_cdpRegister( PHB_CODEPAGE cdpage )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_cdpRegister(%p)", cdpage));
|
||||
|
||||
@@ -228,7 +391,7 @@ BOOL hb_cdpRegister( PHB_CODEPAGE cdpage )
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
PHB_CODEPAGE hb_cdpFind( char * pszID )
|
||||
PHB_CODEPAGE HB_EXPORT hb_cdpFind( char * pszID )
|
||||
{
|
||||
int iPos;
|
||||
|
||||
@@ -239,7 +402,7 @@ PHB_CODEPAGE hb_cdpFind( char * pszID )
|
||||
return ( iPos != -1 ) ? s_cdpList[ iPos ] : NULL;
|
||||
}
|
||||
|
||||
PHB_CODEPAGE hb_cdpSelect( PHB_CODEPAGE cdpage )
|
||||
PHB_CODEPAGE HB_EXPORT hb_cdpSelect( PHB_CODEPAGE cdpage )
|
||||
{
|
||||
PHB_CODEPAGE cdpOld = hb_cdp_page;
|
||||
|
||||
@@ -253,7 +416,7 @@ PHB_CODEPAGE hb_cdpSelect( PHB_CODEPAGE cdpage )
|
||||
return cdpOld;
|
||||
}
|
||||
|
||||
char * hb_cdpSelectID( char * pszID )
|
||||
char HB_EXPORT * hb_cdpSelectID( char * pszID )
|
||||
{
|
||||
char * pszIDOld = hb_cdp_page->id;
|
||||
|
||||
@@ -264,7 +427,7 @@ char * hb_cdpSelectID( char * pszID )
|
||||
return pszIDOld;
|
||||
}
|
||||
|
||||
void hb_cdpTranslate( char* psz, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut )
|
||||
void HB_EXPORT hb_cdpTranslate( char* psz, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut )
|
||||
{
|
||||
int n;
|
||||
|
||||
@@ -274,9 +437,9 @@ void hb_cdpTranslate( char* psz, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut )
|
||||
for( ; *psz; psz++ )
|
||||
{
|
||||
n = (int)cdpIn->s_chars[ ((int)*psz)&255 ];
|
||||
if( ( n != 0 ) &&
|
||||
( ( n <= cdpIn->nChars ) || ( ( n > (cdpOut->nChars+nAddLower) ) &&
|
||||
( n <= (cdpOut->nChars*2+nAddLower) ) ) ) )
|
||||
if( n != 0 &&
|
||||
( n <= cdpOut->nChars || ( n > (cdpOut->nChars+nAddLower) &&
|
||||
n <= (cdpOut->nChars*2+nAddLower) ) ) )
|
||||
{
|
||||
n--;
|
||||
*psz = ( n >= (cdpOut->nChars+nAddLower) )?
|
||||
@@ -286,7 +449,7 @@ void hb_cdpTranslate( char* psz, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut )
|
||||
}
|
||||
}
|
||||
|
||||
void hb_cdpnTranslate( char* psz, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut, unsigned int nChars )
|
||||
void HB_EXPORT hb_cdpnTranslate( char* psz, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut, unsigned int nChars )
|
||||
{
|
||||
int n;
|
||||
unsigned int i;
|
||||
@@ -297,9 +460,9 @@ void hb_cdpnTranslate( char* psz, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut, unsi
|
||||
for( i=0; i<nChars; i++,psz++ )
|
||||
{
|
||||
n = (int)cdpIn->s_chars[ ((int)*psz)&255 ];
|
||||
if( ( n != 0 ) &&
|
||||
( ( n <= cdpIn->nChars ) || ( ( n > (cdpOut->nChars+nAddLower) ) &&
|
||||
( n <= (cdpOut->nChars*2+nAddLower) ) ) ) )
|
||||
if( n != 0 &&
|
||||
( n <= cdpOut->nChars || ( n > (cdpOut->nChars+nAddLower) &&
|
||||
n <= (cdpOut->nChars*2+nAddLower) ) ) )
|
||||
{
|
||||
n--;
|
||||
*psz = ( n >= (cdpOut->nChars+nAddLower) )?
|
||||
@@ -309,7 +472,126 @@ void hb_cdpnTranslate( char* psz, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut, unsi
|
||||
}
|
||||
}
|
||||
|
||||
int hb_cdpchrcmp( char cFirst, char cSecond, PHB_CODEPAGE cdpage )
|
||||
USHORT HB_EXPORT hb_cdpGetU16( PHB_CODEPAGE cdp, BYTE ch )
|
||||
{
|
||||
USHORT u;
|
||||
|
||||
if ( cdp && cdp->uniTable && cdp->uniTable->uniCodes && ch < cdp->uniTable->nChars )
|
||||
{
|
||||
u = cdp->uniTable->uniCodes[ ch ];
|
||||
}
|
||||
else
|
||||
{
|
||||
u = ch;
|
||||
}
|
||||
return u;
|
||||
}
|
||||
|
||||
BOOL HB_EXPORT hb_cdpGetFromUTF8( PHB_CODEPAGE cdp, BYTE ch, int * n, USHORT * uc )
|
||||
{
|
||||
if ( utf8tou16nextchar( ch, n, uc ) )
|
||||
{
|
||||
if ( *n == 0 && cdp && cdp->uniTable && cdp->uniTable->uniCodes && *uc >= 0x100 )
|
||||
{
|
||||
int i;
|
||||
for ( i = 0; i < cdp->uniTable->nChars; i++ )
|
||||
{
|
||||
if ( cdp->uniTable->uniCodes[ i ] == *uc )
|
||||
{
|
||||
*uc = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
ULONG HB_EXPORT hb_cdpStrnToUTF( PHB_CODEPAGE cdp, BYTE* pSrc, ULONG ulLen, BYTE* pDst )
|
||||
{
|
||||
USHORT u, *uniCodes, nChars;
|
||||
ULONG i, n;
|
||||
|
||||
if ( cdp && cdp->uniTable )
|
||||
{
|
||||
if ( cdp->nMulti || cdp->uniTable->lMulti )
|
||||
{
|
||||
/*
|
||||
* TODO: this translation is bad, please fix me!!!
|
||||
*/
|
||||
for ( i = 0, n = 0; i < ulLen; i++ )
|
||||
{
|
||||
u = hb_cdpGetU16( cdp, pSrc[ i ] );
|
||||
n += u16toutf8( &pDst[n], u );
|
||||
}
|
||||
return n;
|
||||
}
|
||||
else
|
||||
{
|
||||
uniCodes = cdp->uniTable->uniCodes;
|
||||
nChars = cdp->uniTable->nChars;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
nChars = 0;
|
||||
uniCodes = NULL;
|
||||
}
|
||||
|
||||
for ( i = 0, n = 0; i < ulLen; i++ )
|
||||
{
|
||||
u = pSrc[ i ];
|
||||
if ( uniCodes && u < nChars )
|
||||
u = uniCodes[ u ];
|
||||
n += u16toutf8( &pDst[n], u );
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
ULONG HB_EXPORT hb_cdpStrnToU16( PHB_CODEPAGE cdp, BYTE* pSrc, ULONG ulLen, BYTE* pDst )
|
||||
{
|
||||
USHORT u, *uniCodes, nChars;
|
||||
ULONG i;
|
||||
|
||||
if ( cdp && cdp->uniTable )
|
||||
{
|
||||
if ( cdp->nMulti || cdp->uniTable->lMulti )
|
||||
{
|
||||
/*
|
||||
* TODO: this translation is bad, please fix me!!!
|
||||
*/
|
||||
for ( i = 0; i < ulLen; i++, pDst += 2 )
|
||||
{
|
||||
u = hb_cdpGetU16( cdp, pSrc[ i ] );
|
||||
HB_PUT_BE_UINT16( pDst, u );
|
||||
}
|
||||
return i<<1;
|
||||
}
|
||||
else
|
||||
{
|
||||
uniCodes = cdp->uniTable->uniCodes;
|
||||
nChars = cdp->uniTable->nChars;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
nChars = 0;
|
||||
uniCodes = NULL;
|
||||
}
|
||||
|
||||
for ( i = 0; i < ulLen; i++, pDst += 2 )
|
||||
{
|
||||
u = pSrc[ i ];
|
||||
if ( uniCodes && u < nChars )
|
||||
u = uniCodes[ u ];
|
||||
HB_PUT_BE_UINT16( pDst, u );
|
||||
}
|
||||
return i<<1;
|
||||
}
|
||||
|
||||
int HB_EXPORT hb_cdpchrcmp( char cFirst, char cSecond, PHB_CODEPAGE cdpage )
|
||||
{
|
||||
int n1, n2;
|
||||
|
||||
@@ -324,7 +606,7 @@ int hb_cdpchrcmp( char cFirst, char cSecond, PHB_CODEPAGE cdpage )
|
||||
|
||||
}
|
||||
|
||||
int hb_cdpcmp( char* szFirst, char* szSecond, ULONG ulLen, PHB_CODEPAGE cdpage, ULONG* piCounter )
|
||||
int HB_EXPORT hb_cdpcmp( char* szFirst, char* szSecond, ULONG ulLen, PHB_CODEPAGE cdpage, ULONG* piCounter )
|
||||
{
|
||||
ULONG ul;
|
||||
int iRet = 0, n1, n2;
|
||||
@@ -408,7 +690,7 @@ int hb_cdpcmp( char* szFirst, char* szSecond, ULONG ulLen, PHB_CODEPAGE cdpage,
|
||||
return iRet;
|
||||
}
|
||||
|
||||
void hb_cdpReleaseAll( void )
|
||||
void HB_EXPORT hb_cdpReleaseAll( void )
|
||||
{
|
||||
int iPos = 0;
|
||||
|
||||
|
||||
@@ -111,9 +111,6 @@ HB_CODEBLOCK_PTR hb_codeblockNew( BYTE * pBuffer,
|
||||
pLocalPosTable += 2;
|
||||
|
||||
pLocal = hb_memvarDetachLocal( pLocal );
|
||||
/* Increment the reference counter so this value will not be
|
||||
* released if other codeblock will be deleted
|
||||
*/
|
||||
memcpy( pCBlock->pLocals + ui, pLocal, sizeof( HB_ITEM ) );
|
||||
/* Increment the reference counter so this value will not be
|
||||
* released if other codeblock will be deleted
|
||||
@@ -121,7 +118,6 @@ HB_CODEBLOCK_PTR hb_codeblockNew( BYTE * pBuffer,
|
||||
hb_memvarValueIncRef( pLocal->item.asMemvar.value );
|
||||
++ui;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -84,12 +84,21 @@
|
||||
#include "hbapierr.h"
|
||||
#include "hbmemory.ch"
|
||||
|
||||
/* #define HB_PARANOID_MEM_CHECK */
|
||||
|
||||
#ifndef HB_FM_STATISTICS
|
||||
# undef HB_PARANOID_MEM_CHECK
|
||||
#endif
|
||||
|
||||
#if defined(HB_FM_STATISTICS) && !defined(HB_TR_LEVEL)
|
||||
#define HB_TR_LEVEL HB_TR_ERROR
|
||||
#endif
|
||||
|
||||
#ifdef HB_FM_STATISTICS
|
||||
|
||||
#ifndef HB_MEMFILER
|
||||
# define HB_MEMFILER 0xff
|
||||
#endif
|
||||
#define HB_MEMINFO_SIGNATURE 0x19730403
|
||||
|
||||
typedef struct _HB_MEMINFO
|
||||
@@ -188,6 +197,9 @@ void HB_EXPORT * hb_xalloc( ULONG ulSize ) /* allocates fixed memory, re
|
||||
if( s_lMemoryMaxBlocks < s_lMemoryBlocks )
|
||||
s_lMemoryMaxBlocks = s_lMemoryBlocks;
|
||||
|
||||
#ifdef HB_PARANOID_MEM_CHECK
|
||||
memset( ( char * ) pMem + HB_MEMINFO_SIZE, HB_MEMFILER, ulSize );
|
||||
#endif
|
||||
return ( void * ) ( ( BYTE * ) pMem + HB_MEMINFO_SIZE );
|
||||
|
||||
#else
|
||||
@@ -270,6 +282,9 @@ void HB_EXPORT * hb_xgrab( ULONG ulSize ) /* allocates fixed memory, exi
|
||||
if( s_lMemoryMaxBlocks < s_lMemoryBlocks )
|
||||
s_lMemoryMaxBlocks = s_lMemoryBlocks;
|
||||
|
||||
#ifdef HB_PARANOID_MEM_CHECK
|
||||
memset( ( char * ) pMem + HB_MEMINFO_SIZE, HB_MEMFILER, ulSize );
|
||||
#endif
|
||||
return ( void * ) ( ( BYTE * ) pMem + HB_MEMINFO_SIZE );
|
||||
|
||||
#else
|
||||
@@ -311,7 +326,23 @@ void HB_EXPORT * hb_xrealloc( void * pMem, ULONG ulSize ) /* reallocates m
|
||||
|
||||
HB_PUT_LONG( ( ( BYTE * ) pMem ) + ulMemSize, 0 );
|
||||
|
||||
#ifdef HB_PARANOID_MEM_CHECK
|
||||
pMem = malloc( ulSize + HB_MEMINFO_SIZE + sizeof( ULONG ) );
|
||||
if ( pMem )
|
||||
{
|
||||
if ( ulSize > ulMemSize )
|
||||
{
|
||||
memcpy( pMem, pMemBlock, ulMemSize + HB_MEMINFO_SIZE );
|
||||
memset( ( char * ) pMem + HB_MEMINFO_SIZE + ulMemSize, HB_MEMFILER, ulSize - ulMemSize );
|
||||
}
|
||||
else
|
||||
memcpy( pMem, pMemBlock, ulSize + HB_MEMINFO_SIZE );
|
||||
}
|
||||
memset( pMemBlock, HB_MEMFILER, ulMemSize + HB_MEMINFO_SIZE + sizeof( ULONG ) );
|
||||
free( pMemBlock );
|
||||
#else
|
||||
pMem = realloc( pMemBlock, ulSize + HB_MEMINFO_SIZE + sizeof( ULONG ) );
|
||||
#endif
|
||||
|
||||
s_lMemoryConsumed += ( ulSize - ulMemSize );
|
||||
if( s_lMemoryMaxConsumed < s_lMemoryConsumed )
|
||||
@@ -386,6 +417,9 @@ void HB_EXPORT hb_xfree( void * pMem ) /* frees fixed memory */
|
||||
pMemBlock->ulSignature = 0;
|
||||
HB_PUT_LONG( ( ( BYTE * ) pMem ) + pMemBlock->ulSize, 0 );
|
||||
|
||||
#ifdef HB_PARANOID_MEM_CHECK
|
||||
memset( pMemBlock, HB_MEMFILER, pMemBlock->ulSize + HB_MEMINFO_SIZE + sizeof( ULONG ) );
|
||||
#endif
|
||||
free( ( void * ) pMemBlock );
|
||||
}
|
||||
else
|
||||
|
||||
@@ -83,6 +83,8 @@
|
||||
#include "inkey.ch"
|
||||
#include "hbdebug.ch"
|
||||
|
||||
#include "hbmemory.ch"
|
||||
|
||||
#ifdef HB_MACRO_STATEMENTS
|
||||
#include "hbpp.h"
|
||||
#endif
|
||||
@@ -196,7 +198,7 @@ static void hb_vmPopLocal( SHORT iLocal ); /* pops the stack latest value
|
||||
static void hb_vmPopStatic( USHORT uiStatic ); /* pops the stack latest value onto a static */
|
||||
|
||||
/* Take the value from stack top without POP */
|
||||
static double hb_vmTopNumber(); /* pops the stack latest value and returns its numeric value */
|
||||
static double hb_vmTopNumber( void ); /* take the stack latest value and returns its numeric value */
|
||||
|
||||
/* misc */
|
||||
static void hb_vmDoInitStatics( void ); /* executes all _INITSTATICS functions */
|
||||
@@ -488,8 +490,13 @@ void HB_EXPORT hb_vmQuit( void )
|
||||
hb_memvarsRelease(); /* clear all PUBLIC variables */
|
||||
|
||||
/* release all known garbage */
|
||||
hb_gcReleaseAll();
|
||||
/* hb_gcCollectAll(); */
|
||||
/* hb_gcReleaseAll(); */
|
||||
|
||||
/* release all known garbage */
|
||||
if ( hb_xquery( HB_MEM_USEDMAX ) ) /* check if fmstat is ON */
|
||||
hb_gcCollectAll();
|
||||
else
|
||||
hb_gcReleaseAll();
|
||||
|
||||
hb_memvarsFree(); /* free memory allocated for memvars table */
|
||||
hb_stackFree();
|
||||
|
||||
@@ -1126,6 +1126,11 @@ void HB_EXPORT hb_itemClear( PHB_ITEM pItem )
|
||||
else if( HB_IS_MEMVAR( pItem ) )
|
||||
hb_memvarValueDecRef( pItem->item.asMemvar.value );
|
||||
|
||||
#if defined( HB_FM_STATISTICS ) && defined( HB_PARANOID_MEM_CHECK )
|
||||
else if( HB_IS_BADITEM( pItem ) )
|
||||
hb_errInternal( HB_EI_VMPOPINVITEM, NULL, "hb_itemClear()", NULL );
|
||||
#endif
|
||||
|
||||
pItem->type = HB_IT_NIL;
|
||||
}
|
||||
|
||||
@@ -1212,8 +1217,9 @@ PHB_ITEM hb_itemUnRef( PHB_ITEM pItem )
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_itemUnRef(%p)", pItem));
|
||||
|
||||
do {
|
||||
pItem = hb_itemUnRefOnce( pItem );
|
||||
do
|
||||
{
|
||||
pItem = hb_itemUnRefOnce( pItem );
|
||||
}
|
||||
while( HB_IS_BYREF( pItem ) && (pRef != pItem) );
|
||||
|
||||
|
||||
@@ -233,12 +233,7 @@ HB_ITEM_PTR hb_memvarDetachLocal( HB_ITEM_PTR pLocal )
|
||||
|
||||
if( HB_IS_BYREF( pLocal ) && ! HB_IS_MEMVAR( pLocal ) )
|
||||
{
|
||||
/* Change the value only if this variable is not referenced
|
||||
* by another codeblock yet.
|
||||
* In this case we have to copy the current value to a global memory
|
||||
* pool so it can be shared by codeblocks
|
||||
*/
|
||||
HB_ITEM_PTR pItem;
|
||||
HB_ITEM_PTR pItem = pLocal;
|
||||
|
||||
do
|
||||
{
|
||||
@@ -247,13 +242,18 @@ HB_ITEM_PTR hb_memvarDetachLocal( HB_ITEM_PTR pLocal )
|
||||
while( HB_IS_BYREF( pLocal ) && ! HB_IS_MEMVAR( pLocal ) && ( pLocal != pItem ) );
|
||||
}
|
||||
|
||||
if( ! HB_IS_MEMVAR( pLocal ) )
|
||||
/* Change the value only if this variable is not referenced
|
||||
* by another codeblock yet.
|
||||
* In this case we have to copy the current value to a global memory
|
||||
* pool so it can be shared by codeblocks
|
||||
*/
|
||||
if ( ! HB_IS_MEMVAR( pLocal ) )
|
||||
{
|
||||
HB_HANDLE hMemvar = hb_memvarValueNew( pLocal, FALSE );
|
||||
HB_HANDLE hMemvar = hb_memvarValueNew( pLocal, FALSE );
|
||||
|
||||
pLocal->type = HB_IT_BYREF | HB_IT_MEMVAR;
|
||||
pLocal->item.asMemvar.itemsbase = &s_globalTable;
|
||||
pLocal->item.asMemvar.value = hMemvar;
|
||||
pLocal->type = HB_IT_BYREF | HB_IT_MEMVAR;
|
||||
pLocal->item.asMemvar.itemsbase = &s_globalTable;
|
||||
pLocal->item.asMemvar.value = hMemvar;
|
||||
}
|
||||
return pLocal;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user