* src/rtl/philes.c
* include/hbextern.ch
+ Added HB_FISDEVICE()
; NOTE: Didn't add anything to hbmk2 yet, as after testing I found it
weird and unusual that the output is different when redirected,
but we may think of some other solution, like user option or else.
* harbour/doc/en-EN/hb_apifs.txt
* harbour/include/hbapifs.h
* harbour/src/rtl/filesys.c
* changed:
BOOL hb_fsSetDevMode( HB_FHANDLE hFileHandle, USHORT uiDevMode )
to:
int hb_fsSetDevMode( HB_FHANDLE hFileHandle, int iDevMode )
Now it returns previous mode for hFileHandle or -1 on error.
if iDevMode == 0 then it does not change device mode.
* harbour/src/rtl/philes.c
* modified HB_FSETDEVMODE() function to work with new hb_fsSetDevMode()
Current syntax is:
HB_FSETDEVMODE( <hFile> [, <nNewMode> ] ) -> <nOldMode>
It may return FD_BINARY, FD_TEXT or FS_ERROR.
* harbour/src/rtl/philes53.c
* modified FSETDEVMOD() function to work with new hb_fsSetDevMode()
It's similar to HB_FSETDEVMODE() but returns FD_BINARY instead of
FS_ERROR. Such behavior is more closer to CL53.
* harbour/src/rtl/console.c
* set also STDIN into binary mode
* src/rtl/philes.c
* src/rtl/philes53.c
* include/hbextern.ch
+ Added HB_FSETDEVMODE(). Documented, always available
equivalent of C5.3 undocumented function FSETDEVMOD().
* utils/hbmk2/hbmk2.prg
* Changed to use HB_FSETDEVMODE().
* harbour/include/hbwince.h
* harbour/contrib/hbwin/axcore.c
* moved HBTEXT macro definition from axcore.c to hbwince.h
* harbour/contrib/hbwin/wapi_shellapi.c
! use HBTEXT() macro for literal constants used as second parameter
of GetProcAddress(). It fixes WINCE builds where whole API uses
only UNICODE strings.
* utils/hbmk2/hbmk2.prg
+ Added -hbmake=<hbmake file> option which will attempt to
read hbmake project file and save it as .hbp file.
This is experimental and I'd like to ask hbmake users to
update/extend this converter code as I'm not hbmake user.
This feature is to aid users to migrate from hbmake to hbmk2.
Notice that along the same line converter could be written
for .xbp and xMate project files too.
* src/compiler/Makefile
- src/compiler/gencobj.c
* src/compiler/hbmain.c
* src/compiler/cmdcheck.c
* src/compiler/hbusage.c
* include/hbcompdf.h
* debian/rules
* mpkg_src.sh
* mpkg_tgz.sh
* harbour.spec
- Deleted support for harbour.cfg / compiler -go mode.
This was scheduled to be done after release, but since
hbmk2 seems to be a very solid tool now with visible
acceptance from users, it seems safe to make the move
now. This will mean that one less Harbour file will
"pollute" system locations, which is always a good
thing. Plus this part had a few bugs, which are now
also a thing of the past.
- examples/hbmake
- Deleted hbmake tool. This wasn't really working anyway,
and require -go mode, which was deleted.
Use hbmk2 instead.
* mpkg_src.sh
* mpkg_tgz.sh
! Fixed indentation to be consistent 4 chars.
* include/hbextern.ch
! HB_SETCODEPAGE() reference also guarded with HB_LEGACY_LEVEL2.
* tests/wcecon.prg
* tests/gtkeys.prg
* examples/terminal/trm_cli.prg
* HB_SETCODEPAGE() -> HB_CDPSELECT().
* contrib/hbwin/win_prn2.c
+ Added comment.
* contrib/hbwin/legacy.prg
+ Guarded with HB_WIN_LEGACY_LEVEL_OFF.
* contrib/hbmysql/mysqlold.c
* contrib/hbodbc/odbcold.c
* contrib/hbwin/legacycd.c
* contrib/hbwin/legacyco.c
* contrib/hbwin/legacycp.c
* contrib/hbwin/legacycv.c
* contrib/hbwin/legacy.prg
+ Guarded with HB_LEGACY_LEVEL3.
This means these will be removed after major release.
Please upgrade your code to use new function names.
* harbour/src/vm/garbage.c
% small improvement in HB_GC_AUTO code
* harbour/include/hbdefs.h
! reverted the hack which casted file handles to unsigned values
I added two weeks ago - it was also converting FS_ERROR value
from -1 to 4294967295. Please remember that on some platforms
negative handles can exist and are valid. Only -1 indicates an
error.
* harbour/utils/hbtest/rt_file.prg
+ added regression test for FOPEN() FS_ERROR value
* harbour/contrib/hbwin/legacycd.c
* harbour/contrib/hbwin/legacyco.c
* added missing EOL at EOF
* harbour/include/hbapi.h
* harbour/include/hbvm.h
* harbour/include/hbvmpub.h
* harbour/include/hbstack.h
* harbour/src/vm/hvm.c
* harbour/src/vm/estack.c
* harbour/src/vm/fm.c
* harbour/src/vm/garbage.c
+ added new function hb_xclean() executed by GC just before resuming
suspended threads - it can be used by memory manager to clean
internal structures and release unused memory to OS.
% release unused memory to OS in hb_xclean() when DLMALLOC is used
% release unused memory in all mspaces to OS in hb_xclean() when
HB_FM_DLMT_ALLOC is used
% release unused memory in mspace when last thread detach it
% balance used mspaces between threads in hb_xclean() when
HB_FM_DLMT_ALLOC is used
* harbour/src/vm/dlmalloc.c
% use harbour spin locks if available by default in all builds
* harbour/include/hbatomic.h
* removed HB_SPINLOCK_SLEEP macro and enable code to always yield
the processor in spin locks
* cover double spin lock setting by HB_SPINLOCK_REPEAT
* harbour/src/vm/garbage.c
* removed unused HB_SPINLOCK_SLEEP macro
* harbour/include/hbstack.h
* harbour/src/vm/estack.c
+ added new internal function hb_stackAllocator()
* disable hb_stackTotalItems() stack macro so this function can be
used also in internal HVM code to check if stack is initialized
* harbour/src/vm/fm.c
! use hb_stackAllocator() to access pointer to DLMALLOC mspace
It should fix GPF when DLMT was used in OS2 builds - please test.
+ harbour/config/linux/clang.mk
+ added support for CLANG in LINUX builds
* harbour/include/hbatomic.h
+ added assembler code for SPINLOCKs in WATCOM x86 builds
* harbour/src/vm/fm.c
* enabled HB_FM_DLMT_ALLOC by default in MT HVM if HB_FM_DL_ALLOC is
also enabled
* harbour/src/vm/dlmalloc.c
* modifications for non MS-Windows WATCOM builds
TOFIX: now it compiles in Linux and OS2 builds but it still does not
work
* include/hbdefs.h
* Removed reliance on old type when defining some new types.
* contrib/hbcurl/hbcurl.c
* contrib/hbssl/ssl.c
* contrib/hbssl/evpmd.c
* Changed ULONG to HB_SIZE.
(HB_SIZE currently is the same as ULONG)
* contrib/hbssl/evp.c
* Changed ULONG to size_t in one place.
* harbour/src/rtl/gtcrs/gtcrs.c
* pacified warning caused by wrong tigetnum() declarations in some
curses versions
* harbour/src/rtl/gtsln/gtsln.c
! fixed non ANSI-C variable declarations
* harbour/include/hbsetup.h
+ added macros for PURE and CONST function attributes
* harbour/contrib/hbct/ctc.c
* modified variable names
* harbour/include/hbthread.h
* minor cleanup in comment
* harbour/src/vm/dlmalloc.c
* use harbour spinlocks in windows builds to eliminate calling
InterlockedCompareExchange[Pointer]() function
* harbour/include/hbstack.h
! disabled TLS ASM inline code which seems to not work with Win9x.
* include/hbapi.h
* Changed HB_ERRCODE to be 'insigned int' (was USHORT).
; You'll need to rebuild all sources.
* utils/hbmk2/hbmk2.prg
% Turned off line numbers (for hbmk2 itself).
* INSTALL
* Minor formatting.
* harbour/include/Makefile
+ harbour/include/hbapistr.h
* harbour/src/vm/Makefile
* harbour/src/vm/hvmall.c
+ harbour/src/vm/strapi.c
+ added new C functions to extract strings in different encoding:
void * hb_itemGetStr( PHB_ITEM pItem, void * cdp,
const char ** pStrPtr, ULONG * pulLen );
void * hb_itemGetStrUTF8( PHB_ITEM pItem,
const char ** pStrPtr, ULONG * pulLen );
void * hb_itemGetStrU16( PHB_ITEM pItem, int iEndian,
const HB_WCHAR ** pStrPtr, ULONG * pulLen );
extract from given item string in requested encoding and store pointer
to this string and its size in characters in last two parameters.
These functions return handler which is used to lock memory buffer
with result or NULL if given item does not contain string. All not NULL
handles returned by above functions have to be free by hb_strfree()
function:
void hb_strfree( void * hString );
As long as they are not freed memory buffer set in pStrPtr is valid
even if other code overwrote given item.
The second parameter in hb_itemGetStr() can specify expected CP
encoding, i.e.:
hStr = hb_itemGetStr( pItem, hb_setGetOSCP(), &pszText, &ulLen );
if( hStr )
{
...
hb_strfree( hStr );
}
extracts string in encoding set by Set( _SET_OSCODEPAGE, <cCPID> )
The second parameter in hb_itemGetStrU16() define endian encoding
and can be one of the following values:
#define HB_CDP_ENDIAN_NATIVE 0
#define HB_CDP_ENDIAN_LITTLE 1
#define HB_CDP_ENDIAN_BIG 2
defined in hbapicdp.h
+ added new C functions to copy part of strings to given buffers in
different encoding:
ULONG hb_itemCopyStr( PHB_ITEM pItem, void * cdp,
char * pStrBuffer, ULONG ulSize );
ULONG hb_itemCopyStrUTF8( PHB_ITEM pItem,
char * pStrBuffer, ULONG ulSize );
ULONG hb_itemCopyStrU16( PHB_ITEM pItem, int iEndian,
HB_WCHAR * pStrBuffer, ULONG ulSize );
hb_itemCopyStr*() functions works in similar way to hb_itemGetStr*()
ones but they copy the strings to given buffer and return the number
of characters (not bytes) copied to the buffer.
+ added new C functions to store given strings in different encoding in
HVM item:
PHB_ITEM hb_itemPutStrLen( PHB_ITEM pItem, void * cdp,
const char * pStr, ULONG ulLen );
PHB_ITEM hb_itemPutStrLenUTF8( PHB_ITEM pItem,
const char * pStr, ULONG ulLen );
PHB_ITEM hb_itemPutStrLenU16( PHB_ITEM pItem, int iEndian,
const HB_WCHAR * pStr, ULONG ulLen );
These functions accepts strings in different encoding, made some
conversions (if necessary and internal string representation in HVM is
different) and then store them as HVM string items.
+ added few extended API functions to operate on strings in different
encoding:
void * hb_parstr( int iParam, void * cdp,
const char ** pStrPtr, ULONG * pulLen );
void * hb_parstr_utf8( int iParam,
const char ** pStrPtr, ULONG * pulLen );
void * hb_parstr_u16( int iParam, int iEndian,
const HB_WCHAR ** pStrPtr, ULONG * pulLen );
void hb_retstr( void * cdp, const char * szText );
void hb_retstr_utf8( const char * szText );
void hb_retstr_u16( int iEndian, const HB_WCHAR * szText );
void hb_retstrlen( void * cdp, const char * szText, ULONG ulLen );
void hb_retstrlen_utf8( const char * szText, ULONG ulLen );
void hb_retstrlen_u16( int iEndian,
const HB_WCHAR * szText, ULONG ulLen );
int hb_storstr( void * cdp, const char * szText, int iParam );
int hb_storstr_utf8( const char * szText, int iParam );
int hb_storstr_u16( int iEndian,
const HB_WCHAR * szText, int iParam );
int hb_storstrlen( void * cdp,
const char * szText, ULONG ulLen, int iParam );
int hb_storstrlen_utf8( const char * szText, ULONG ulLen, int iParam );
int hb_storstrlen_u16( int iEndian,
const HB_WCHAR * szText, ULONG ulLen, int iParam );
They can be used instead of hb_parc*()/hb_retc*()/hb_storc*() ones and
allow to easy create code which operates on strings in different
encoding, i.e.:
HB_FUNC( MY_STRTOUTF8 )
{
const char * str;
ULONG len;
void * h;
h = hb_parstr_utf8( 1, &str, &len );
if( h )
{
hb_retclen( str, len );
hb_strfree( h );
}
}
The above functions allows to create code which operates on different
string encoding, i.e. UTF8, UCS2/UTF16, some CPs and such code is
independent from internal HVM string representation so we can use
internally Unicode or not and it will not effect existing code.
* src/common/hbffind.c
* src/rtl/fscopy.c
* src/rtl/fserr.c
* src/rtl/hbfeof.c
* src/rtl/errapi.c
* src/rtl/hbsocket.c
* src/rtl/filesys.c
* src/rtl/philes.c
* src/rtl/dirdrive.c
* src/rtl/filebuf.c
* src/rtl/hbproces.c
* include/hbstack.h
* include/hbapifs.h
* include/hbapierr.h
* Changed USHORT type for error codes to HB_ERRCODE.
+ More or less changed int type of Extend/Item API call to
long type to prepare for HB_ERRCODE change to ULONG.
; TODO: Rename variables to reflect new type.
; TODO: Change internal error code from ULONG to HB_ERRCODE.
; TODO: Inspect rest of Harbour like above. I've only dealt with
rtl, vm.
; TODO: hbnetio protocol needs to be modified to pass errcode
as 32 bit value.
; NOTE: There is still disagreement in code in few places
in error type and 'int' is used internally, f.e.
sockets, some internal OS code conversion funtions.
; TODO: Different topic, but we use a lot of USHORTs to
store modes, tries, severity, operation, flags and
few other things which would better be stored as
simple int probably.
; Please review me.
* include/hbdefs.h
- Deleted HB_ERRCODE. It already existed as HB_ERRCODE,
mainly used in RDD. That makes this change a bit more
complicated than I thought. Plus two more issues:
1) Some places use ULONG already to pass error code,
changing these to HB_ERRCODE will instantly break
binary compatibility.
2) I wonder if DOSERROR() and friends will stay compatible
after moving to ULONG HB_ERRCODE.
; Please comment.
* include/hbdefs.h
+ Added HB_ERRCODE. Currently the same as USHORT. Will be
changed to 'unsigned int' once all USHORT types have been
converted to HB_ERRCODE (where applicable).
* harbour/include/hbdefs.h
* added small hack to eliminate negative handles from 32 bit windows
builds. Please remember that this trick can work only in 32 bit
windows version. In 64 bit ones valid handle after casting to integer
value can give negative 64 bit number so checking for wrong handle
please compare them with FS_ERROR (-1) instead of using < 0 or sth
like that. Otherwise your code may not work properly with some new
windows versions or may even suddenly stop to work with existing
ones even if they worked for some time without problems.
* harbour/src/rdd/dbf1.c
* pacified warning after adding above hack
* harbour/tests/cpinfo.prg
! removed unnecessary EOL reported by Viktor
* harbour/include/hbcdpreg.h
* use macro instead of direct value
* harbour/tests/cpinfo.prg
+ generate .c files with CP definition in human readable form
when it's can be safely use or with optional binary table when
it should be verified if such form is acceptable.
* harbour/tests/cpinfo.prg
* harbour/include/hbapicdp.h
* harbour/include/hbcdpreg.h
* modified format used for CP definition using binary tables
+ added Latin character striping from non Latin based CPs
* changed warning message to be more clear. In most of cases when
this message is shown:
Warning: irregular CP which needs verification for human
readable definition in Harbour
it should be possible to create human non binary CP definition.
Usually it should be enough to copy HB_CP_UPPER and HB_CP_LOWER
strings and verify if final result are compatible by comparing
automatically generated .c file with binary tables. If you will
find some CPs where it's not compatible then please inform me
about it and I'll try to update cpinfo.prg
When this message is shown:
Warning: irregular CP which needs special definition in Harbour
using binary tables generated by this program
then binary tables have to be used to replicate exact CP conditions.
If no warning message is shown then human readable form of CP
definition can be used without (I hope ;)) additional verification.
* harbour/src/codepage/cpno865.c
* harbour/src/codepage/cpit850m.c
* harbour/src/codepage/cpis850.c
* harbour/src/codepage/cpfr850.c
* harbour/src/codepage/cpes850c.c
* harbour/src/codepage/cpsv850m.c
* harbour/src/codepage/cpde850m.c
* harbour/src/codepage/cppt860.c
* harbour/src/codepage/cpnl850m.c
* harbour/src/codepage/cpnl850.c
* harbour/src/codepage/cpde850.c
* harbour/src/codepage/cpfi850.c
* harbour/src/codepage/cpit850.c
* harbour/src/codepage/cpis861.c
* harbour/src/codepage/cpes850m.c
* harbour/src/codepage/cpfr850m.c
* harbour/src/codepage/cpsv437c.c
* harbour/src/codepage/cpdk865.c
* harbour/src/codepage/cpgr437.c
* updated for new format
* include/hbextcdp.ch
* Updated to reflect recent couple of commits.
* src/codepage/Makefile
+ src/codepage/cpit850m.c
+ src/codepage/cpde850m.c
+ src/codepage/cpsv850m.c
+ src/codepage/cpnl850m.c
+ src/codepage/cpes850m.c
+ src/codepage/cpfr850m.c
+ Added mdx*.obj compatible CPs, created by cpinfo.prg.
; TOFIX: I didn't added mdxuk and mdxusa, simply because
it cannot fit in current filename scheme, which
uses only two chars to denote language.
* src/codepage/cphu852.c
+ src/codepage/cphu852c.c
- src/codepage/cphu852s.c
* src/codepage/Makefile
* include/hbextcdp.ch
* Changed HU852 CP to be the same as HUISO and HUWIN.
I kept the extra non-Hungarian char, which makes this CP
fully compatible with sixhu852.obj.
+ Added HU852C which is fully C5.2e compatible, this file
was generated by cpinfo using C5.2e Intl + ntxhu852.obj.
This may fix some C5.2e incompatibilities that existed
in former HU852 CP.
- Deleted HU852S, it's now called HU852.
; NOTE: Since there is no 'default' HU852 CP in Harbour I
find it ok to provide C5.2e compatible CP by the
name 'HU852C'. If this seems bothering to Hungarian
users in general, we may think out something.
* harbour/src/rtl/cdpapi.c
* harbour/include/hbapicdp.h
+ added new C functions:
hb_cdpU16AsStrLen(), hb_cdpU16ToStr(),
hb_cdpStrAsU16Len(), hb_cdpStrToU16()
* harbour/contrib/gtwvg/wvgutils.c
! fixed NULL used by mistake instead of 0
* harbour/ChangeLog
* marked last TOFIX note as [DONE] - thanks to Mindaugas
* harbour/src/rtl/cdpapi.c
* use 1-st upper<->lower conversion pair instead of last one
if more then one conversion pair exist - it's more natural
form in most of cases
% skip translation code when two different CDP modules use
the same Unicode table
* harbour/tests/cpinfo.prg
+ detect CPs which have corresponding upper or lower characters
for non alpha characters and inform about it.
Such situations is in NTXSPA.OBJ so such CP can be fully
replicated in Harbour using alternative CP definition only
which uses static tables.
* harbour/src/codepage/cpes850c.c
* harbour/src/codepage/cpesisoc.c
* harbour/src/codepage/cpeswinc.c
! removed the hack with changed order for characters which do not
have corresponding upper latter.
Now there is only one difference between ES850C and Clipper NTXSPA.OBJ
In NTXSPA 'UPPER( Chr( 163 ) )' gives "U" though Chr( 163 ) is not
marked as letter and not sorted with other letters. For me it looks
like a bug anyhow if you want to fully replicate NTXSPA.OBJ in Harbour
then current cpes850c.c code should be replaced by code generated
using tests/cpinfo.prg compiler by clipper and linked with ntxspa.obj.
Such code should be generated using:
cpinfo.exe es850c "Spanish CP-850 (ntxspa.obj compatible)" 850
Now translations can be done between CPs using different number of
letters or even defined for different languages so I have question
to Spanish users: Do you need ESISOC and ESWINC for anything?
If not then I would like to remove them.
Similar situation is with HUISOS and HUWINS.
* harbour/include/hbapicdp.h
* harbour/src/rtl/cdpapi.c
* harbour/src/codepage/ucmacce.c
* harbour/src/codepage/uckoi8.c
* harbour/src/codepage/uc885910.c
* harbour/src/codepage/ucmacice.c
* harbour/src/codepage/uc885914.c
* harbour/src/codepage/uc874.c
* harbour/src/codepage/uc857.c
* harbour/src/codepage/uc1250.c
* harbour/src/codepage/uc1254.c
* harbour/src/codepage/uc1258.c
* harbour/src/codepage/uckoi8u.c
* harbour/src/codepage/uckam.c
* harbour/src/codepage/uc424.c
* harbour/src/codepage/ucmacrom.c
* harbour/src/codepage/uc862.c
* harbour/src/codepage/cpesisoc.c
* harbour/src/codepage/uc866.c
* harbour/src/codepage/uc8859_3.c
* harbour/src/codepage/cpes850c.c
* harbour/src/codepage/uc8859_7.c
* harbour/src/codepage/ucmacgrk.c
* harbour/src/codepage/uc037.c
* harbour/src/codepage/uc850.c
* harbour/src/codepage/uc885911.c
* harbour/src/codepage/uc885915.c
* harbour/src/codepage/uc875.c
* harbour/src/codepage/uc1251.c
* harbour/src/codepage/uc1255.c
* harbour/src/codepage/uc863.c
* harbour/src/codepage/ucmaz.c
* harbour/src/codepage/uc1026.c
* harbour/src/codepage/uc8859_4.c
* harbour/src/codepage/uc8859_8.c
* harbour/src/codepage/uc855.c
* harbour/src/codepage/cpeswinc.c
* harbour/src/codepage/uc885916.c
* harbour/src/codepage/ucascii.c
* harbour/src/codepage/uc1252.c
* harbour/src/codepage/uc1256.c
* harbour/src/codepage/ucatari.c
* harbour/src/codepage/uc860.c
* harbour/src/codepage/ucmaccyr.c
* harbour/src/codepage/ucmik.c
* harbour/src/codepage/uc864.c
* harbour/src/codepage/uc1006.c
* harbour/src/codepage/uc1125.c
* harbour/src/codepage/uc8859_1.c
* harbour/src/codepage/uc88591b.c
* harbour/src/codepage/uc8859_5.c
* harbour/src/codepage/uc8859_9.c
* harbour/src/codepage/uc852.c
* harbour/src/codepage/ucnext.c
* harbour/src/codepage/uc737.c
* harbour/src/codepage/uc885913.c
* harbour/src/codepage/ucmactrk.c
* harbour/src/codepage/uc856.c
* harbour/src/codepage/uc775.c
* harbour/src/codepage/uc1253.c
* harbour/src/codepage/uc1257.c
* harbour/src/codepage/uc500.c
* harbour/src/codepage/uc861.c
* harbour/src/codepage/uc865.c
* harbour/src/codepage/uc869.c
* harbour/src/codepage/uc8859_2.c
* harbour/src/codepage/uc8859_6.c
% declare Unicode tables with 'const' qualifier
* harbour/config/win/bcc.mk
* increased library page size for 64 to 96
* harbour/src/vm/thread.c
* harbour/include/hbthread.h
% removed 'BOOL fSync' parameter from hb_threadMutexCreate().
This parameter was added in the past to emulate xbase++ behavior
when oSignal:wait() is called from SYNC method but real life tests
shows that such feature works in xbase++ in different way then
it was initially described and Harbour code was updated to use
different solution making above parameter unusable.
* harbour/src/vm/hvm.c
* harbour/src/vm/thread.c
* harbour/src/vm/classes.c
* harbour/src/rtl/hbgtcore.c
* harbour/contrib/hbnetio/netiocli.c
* harbour/contrib/hbqt/hbqt_slots.cpp
* updated to use hb_threadMutexCreate() without parameters
* harbour/include/hbdefs.h
! fixed PHB_FUNC declaration. 'extern "C"' can be removed only for
BORLAND and other buggy compilers which may not accept it but
not for. In some platforms it's very important to keep correct
declarations because without this flag final binaries will not
work.
* include/hbdefs.h
! Fixed compiling of .cpp sources in BCC55 by removing prefix declaration
HB_EXTERN_C_ from "typedef HARBOUR" and "typedef PHB_FUNC" declarations
* harbour/src/vm/set.c
! fixed small typos in returned values (FALSE instead of NULL and 0)
* harbour/src/vm/estack.c
* make calling hb_stackTotalItems() safe in MT mode when stack is not
initialized - now this function can be used to check if HVM stack
exists and is initialized in ST and MT mode
* harbour/src/rtl/errintlo.c
! fixed at least 4 GPF traps exploited when hb_errInternal() was called
and HVM stack was not initialized
* harbour/include/Makefile
+ harbour/include/hbcdpreg.h
* harbour/include/hbapicdp.h
* harbour/src/rtl/cdpapi.c
+ added new CDP API which fixes many errors and limitations in old
implementation.
Warning !!! some very serious bugs in national sorting have been
fixed. It may cause that old indexes using some national
sorting will not be compatible. Please rebuild existing
indexes.
* harbour/src/vm/itemapi.c
* harbour/src/rdd/hsx/hsx.c
* harbour/src/rdd/dbfntx/dbfntx1.c
* harbour/src/rdd/dbfnsx/dbfnsx1.c
* harbour/src/rdd/dbfcdx/dbfcdx1.c
* harbour/contrib/hbbmcdx/bmdbfcdx.c
* harbour/contrib/rddads/adsx.c
* harbour/contrib/rddsql/sqlmix.c
* updated to work with new CDP API
TOFIX: update adsx.c and sqlmix.c to use hb_cdpcmp() which resepcts
sorting with accented and mulitybyts characters.
Mindaugas, can you update above code?
* harbour/src/codepage/cpbg866.c
* harbour/src/codepage/cpbgiso.c
* harbour/src/codepage/cpbgmik.c
* harbour/src/codepage/cpbgwin.c
* harbour/src/codepage/cpcs852.c
* harbour/src/codepage/cpcsiso.c
* harbour/src/codepage/cpcskam.c
* harbour/src/codepage/cpcswin.c
* harbour/src/codepage/cpde850.c
* harbour/src/codepage/cpdeiso.c
* harbour/src/codepage/cpdewin.c
* harbour/src/codepage/cpel737.c
* harbour/src/codepage/cpeliso.c
* harbour/src/codepage/cpelwin.c
* harbour/src/codepage/cpes850.c
* harbour/src/codepage/cpes850c.c
* harbour/src/codepage/cpesiso.c
* harbour/src/codepage/cpesisoc.c
* harbour/src/codepage/cpeswin.c
* harbour/src/codepage/cpeswinc.c
* harbour/src/codepage/cpeswinm.c
* harbour/src/codepage/cpfr850.c
* harbour/src/codepage/cpfriso.c
* harbour/src/codepage/cpfrwin.c
* harbour/src/codepage/cphr437.c
* harbour/src/codepage/cphr852.c
* harbour/src/codepage/cphrwin.c
* harbour/src/codepage/cphu852.c
* harbour/src/codepage/cphu852s.c
* harbour/src/codepage/cphuiso.c
* harbour/src/codepage/cphuisos.c
* harbour/src/codepage/cphuwin.c
* harbour/src/codepage/cphuwins.c
* harbour/src/codepage/cpit437.c
* harbour/src/codepage/cpit850.c
* harbour/src/codepage/cpitisb.c
* harbour/src/codepage/cpitiso.c
* harbour/src/codepage/cpitwin.c
* harbour/src/codepage/cpltwin.c
* harbour/src/codepage/cppl852.c
* harbour/src/codepage/cppliso.c
* harbour/src/codepage/cpplmaz.c
* harbour/src/codepage/cpplwin.c
* harbour/src/codepage/cppt850.c
* harbour/src/codepage/cpptiso.c
* harbour/src/codepage/cpro852.c
* harbour/src/codepage/cproiso.c
* harbour/src/codepage/cprowin.c
* harbour/src/codepage/cpru866.c
* harbour/src/codepage/cpruiso.c
* harbour/src/codepage/cprukoi.c
* harbour/src/codepage/cpruwin.c
* harbour/src/codepage/cpsk852.c
* harbour/src/codepage/cpskiso.c
* harbour/src/codepage/cpskkam.c
* harbour/src/codepage/cpskwin.c
* harbour/src/codepage/cpsl437.c
* harbour/src/codepage/cpsl852.c
* harbour/src/codepage/cpsliso.c
* harbour/src/codepage/cpslwin.c
* harbour/src/codepage/cpsrwin.c
* harbour/src/codepage/cpsv850.c
* harbour/src/codepage/cpsvclip.c
* harbour/src/codepage/cpsviso.c
* harbour/src/codepage/cpsvwin.c
* harbour/src/codepage/cptr857.c
* harbour/src/codepage/cptriso.c
* harbour/src/codepage/cptrwin.c
* harbour/src/codepage/cpua1125.c
* harbour/src/codepage/cpua866.c
* harbour/src/codepage/cpuakoi.c
* harbour/src/codepage/cpuawin.c
* harbour/src/codepage/uc037.c
* harbour/src/codepage/uc1006.c
* harbour/src/codepage/uc1026.c
* harbour/src/codepage/uc1125.c
* harbour/src/codepage/uc1250.c
* harbour/src/codepage/uc1251.c
* harbour/src/codepage/uc1252.c
* harbour/src/codepage/uc1253.c
* harbour/src/codepage/uc1254.c
* harbour/src/codepage/uc1255.c
* harbour/src/codepage/uc1256.c
* harbour/src/codepage/uc1257.c
* harbour/src/codepage/uc1258.c
* harbour/src/codepage/uc424.c
* harbour/src/codepage/uc500.c
* harbour/src/codepage/uc737.c
* harbour/src/codepage/uc775.c
* harbour/src/codepage/uc850.c
* harbour/src/codepage/uc852.c
* harbour/src/codepage/uc855.c
* harbour/src/codepage/uc856.c
* harbour/src/codepage/uc857.c
* harbour/src/codepage/uc860.c
* harbour/src/codepage/uc861.c
* harbour/src/codepage/uc862.c
* harbour/src/codepage/uc863.c
* harbour/src/codepage/uc864.c
* harbour/src/codepage/uc865.c
* harbour/src/codepage/uc866.c
* harbour/src/codepage/uc869.c
* harbour/src/codepage/uc874.c
* harbour/src/codepage/uc875.c
* harbour/src/codepage/uc885910.c
* harbour/src/codepage/uc885911.c
* harbour/src/codepage/uc885913.c
* harbour/src/codepage/uc885914.c
* harbour/src/codepage/uc885915.c
* harbour/src/codepage/uc885916.c
* harbour/src/codepage/uc88591b.c
* harbour/src/codepage/uc8859_1.c
* harbour/src/codepage/uc8859_2.c
* harbour/src/codepage/uc8859_3.c
* harbour/src/codepage/uc8859_4.c
* harbour/src/codepage/uc8859_5.c
* harbour/src/codepage/uc8859_6.c
* harbour/src/codepage/uc8859_7.c
* harbour/src/codepage/uc8859_8.c
* harbour/src/codepage/uc8859_9.c
* harbour/src/codepage/ucascii.c
* harbour/src/codepage/ucatari.c
* harbour/src/codepage/uckam.c
* harbour/src/codepage/uckoi8.c
* harbour/src/codepage/uckoi8u.c
* harbour/src/codepage/ucmacce.c
* harbour/src/codepage/ucmaccyr.c
* harbour/src/codepage/ucmacgrk.c
* harbour/src/codepage/ucmacice.c
* harbour/src/codepage/ucmacrom.c
* harbour/src/codepage/ucmactrk.c
* harbour/src/codepage/ucmaz.c
* harbour/src/codepage/ucmik.c
* harbour/src/codepage/ucnext.c
* updated for new CP API
Warning: please test all national CPs. I'm not able to test unknown for
me national character conditions so it's possible that I made
something wrong. Additionally current CP API does not have
some limitations which existed in the old one so now some hacks
or workarounds can be cleaned. I.e. now all translations are
done using Unicode tables so it's not necessary to use the
same number of characters to make them working.
Updating CP files I've found the following potential problems
in definitions which I haven't fixed or fixed only partially:
cpes850c.c - update for new format removing hacks for old CP
implementation
cpesisoc.c > remove, it's not longer necessary
cpeswinc.c /
cpeswinm.c - it is the same as cpesiso.c so it should be removed
cphu852.c \
cphu852s.c \
cphuiso.c > update for new format removing hacks for old CP
cphuwin.c / implementation
cphuisos.c > remove, it's not longer necessary
cphuwins.c /
cphr437.c > does it really use CP-437? and ^]\[@~}|{` instead of
cpsl437.c / nationalletters or it uses different then 437 CP for
7-bit Croatian characters encoding. It's important
because without valid unicode table translations will
not work.
cpit437.c - update for new version if necessary (upper characters)
cpsv850.c \
cpsviso.c > they had ACCENTED_INTERLEAVED but without ACCENTED_EQUAL
cpsvwin.c / so this setting was ignored. Now it's not ignored.
cpsvclip.c - update for new format to be fully not only
"almost compatible with Clipper's NTXSWE.OBJ"
For sure these are not all problems inherited from old CP
implementation so please verify all existing CPs.
* harbour/src/codepage/cp_tpl.c
+ added new example for CP definition. Working on new CPs please read
this description:
If accented characters need special sorting ( HB_CDP_ACSORT_EQUAL or
HB_CDP_ACSORT_INTERLEAVE ) then you need to mark the accented
characters with the symbol '~' before each of them, for example:
a~_
If there is two-character sequence, which is considered as one, it
should be marked with '.' before and after it, for example:
... h.ch.i ...
if such multibyte character has its own Unicode representation then
this Unicode value can be set using '=' symbol, for example:
....h.ch=2A7C.i
and it will be used in translations.
The Upper case string and the Lower case string should use the
same letters. If some characters does not have corresponding upper
or lower letter then space ' ' can be used as dummy character, for
example in German CPs there is no upper case 'scharfes S' letter
so space is used as dummy character.
HB_CP_LATIN should be 1 if the national alphabet is based on Latin
otherwise 0
Please note that now you can use two versions of CP definition.
The 1-st one which uses human readable form similar to the old CP
definition and 2-nd which uses directly final CP tables so it
allows to replicate any conditions which existed in Clipper or
any other compatible language which uses static tables.
tests/cpinfo.prg can generate automatically .c files with new CP
definition in the 2-nd version. Now if user wants to create new
Harbour CP which is fully Clipper compatible he only has to
compile and link cpinfo.prg with given national sorting module
and then execute it with new Harbour CP name as 1-st parameter.
cp<cpname>.c file is generated which can be added to Harbour
repository. Optional 2-nd parameter is CP description and 3-rd
is Harbour Unicode table ID (if not given 437 is used and should
be updated by user in .c file). This method should definitely
resolve any problems with creating Clipper compatible CP definition.
It also allows to easy verify if CP definitions are compatible. It's
enough to compare generated .c files.
* harbour/src/codepage/uckam.c
! fixed Kamenicky Unicode table definition - it was Mazovia CP :)
* harbour/src/codepage/cpde850.c
* harbour/src/codepage/cpdeiso.c
* harbour/src/codepage/cpdewin.c
! fixed CP wrongly encoded CP due to limitations in old CP definition.
Now it's possible to define different number of upper an lower
characters (space " " can be used as dummy character) and I used
it to eliminate hack for 'scharfes S' which does not exists as upper
case.
Please clean other CPs which contain similar hacks.
* harbour/src/codepage/cphu852.c
* harbour/src/codepage/cphuiso.c
* harbour/src/codepage/cphuwin.c
* harbour/src/codepage/cpua866.c
* removed dummy letters introduced for old translation code
* harbour/src/rtl/natmsg.c
* harbour/src/rtl/cdpapi.c
* harbour/include/hbextern.ch
+ added HB_CDPINFO() function
* redirected _NATSORTVER() function to HB_CDPINFO()
To All,
Please check your national sorting in current version and make
any updates if necessary or inform me about found problems.
I've checked that Polish CPs are working fine and all existing
CPs passes my test program which verified some technical aspects
of CP implementation. But I cannot verify if this definitions
satisfy users in different countries.
* harbour/src/rtl/strcase.c
* harbour/src/rtl/cdpapi.c
* moved some CP dependent functions from strcase.c to cdpapi.c
They will be reimplemented in new CDP code.
* harbour/src/rtl/cdpapi.c
* harbour/include/hbapicdp.h
+ added new C functions to eliminate direct access to HB_CODEPAGE
structure by non core code
* harbour/src/rtl/gtcgi/gtcgi.c
* harbour/src/rtl/gtpca/gtpca.c
* harbour/src/rtl/gtstd/gtstd.c
* harbour/src/rtl/gtcrs/gtcrs.c
* harbour/src/rtl/gtsln/gtsln.c
* harbour/src/rtl/gttrm/gttrm.c
* harbour/src/rtl/gtxwc/gtxwc.c
* harbour/src/rtl/gtdos/gtdos.c
* harbour/src/rtl/gtwin/gtwin.c
* harbour/src/rtl/gtwvt/gtwvt.c
* harbour/contrib/gtwvg/gtwvg.c
* harbour/contrib/gtqtc/gtqtc.cpp
* updated to eliminate direct access to HB_CODEPAGE structure
* harbour/src/rtl/cdpapi.c
* harbour/include/hbapicdp.h
+ added two new functions hb_cdpU16ToStr() and hb_cdpU16LEToStr()
* harbour/doc/xhb-diff.txt
! fixed typo in code example reported by Guy Roussin
! fixed some other typos - i.e. in detached local description
* include/hbdefs.h
* Changed HB_SIZE to ULONG. Added TOFIX to later change it
to 'long'. With its current setup it's possible to gradually
change 'ULONG' usages to 'HB_SIZE' when used as string/array
length ot index. This can be a gradual process.
* include/hbdefs.h
+ Added HB_MAX[U]INT as new name for HB_[U]LONG.
+ Added HB_[U]LONG to new type list with TOFIX note.
* Changed HB_ATTR to not rely on Windows type.
- Deleted hb[Type] style types from planning.