* 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/config/beos/gcc.mk
! fixed typo in AR_RULE
* harbour/config/bsd/gcc.mk
! added missing false command to force build interrupt when library cannot
be created
* contrib/hbide/hbide.prg
+ contrib/hbide/resources/builderror.png
* contrib/hbide/resources/gotomark.png
+ contrib/hbide/resources/modulelist.png
* contrib/hbqt/hbqt_slots.cpp
* contrib/hbqt/hbqt_slots.h
* contrib/hbqt/moc_slots.cpp
* contrib/hbxbp/xbpgeneric.prg
* contrib/hbxbp/xbptabpage.prg
+ Implemented first 4 icons operational.
Now, at least you can open/edit/save .prg .c .ch .h files.
I am interested in any bugs you may encounter in the process.
Few HBXBP calasses have also been updated in the process.
QUESTION: How good it will be to extend Xbase++ class framework ?
Is this the ripe time or we need more inputs ?
* 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.
* harbour/utils/hbtest/rt_str.prg
* modified code which tries to replicate Clipper behavior with ULONG
values also in 64bit systems where ULONG is not 32bit integer
* harbour/contrib/rddsql/sddodbc/tests/test2.prg
! fixed small error in DSN
* harbour/contrib/rddsql/sddodbc/odbcdd.c
+ added support of SQL_WCHAR, SQL_WVARCHAR, SQL_WLONGVARCHAR
; NOTE: I get more and more complains about not working sddodbc,
because of these data types. I'm unable to get such situation
in my programming environvent. So, this addition can be buggy.
Please, report any strange behavior of string types data.
* src/rtl/errapi.c
* src/rtl/philes.c
* src/rtl/dirdrive.c
* contrib/hbnf/fttext.c
* Changed back long versions of Harbour APIs to int version.
It was an oversight.
* contrib/xhb/xhbfunc.c
+ Ported CURDIRX() function from xhb.
It's not exactly the same as xhb version uses hb_fsCurDirBuffEx()
internally, and I couldn't decipher the added feature above
hb_fsCurDirBuff().
* INSTALL
* Minor formatting.
+ Added information about some commonly used, but yet useless
environment settings. These:
set HB_PATH=<Harbour root dir>
set HRB_DIR=<Some Harbour dir>
set INCLUDE=<Harbour include dir>
set LIB=<Harbour lib dir>
* Bumped copyright year.
+ Added 'documentation' section to link section.
+ Added netiquette RFC link for a start.
+ Added hbrun to required tools for cross-builds.
* bin/hb-func.sh
* harbour.spec
+ Added hbsms lib.
* src/rdd/dbfntx/dbfntx1.c
* src/rdd/dbfnsx/dbfnsx1.c
* src/rdd/dbfcdx/dbfcdx1.c
* src/rdd/dbffpt/dbffpt1.c
* contrib/xhb/xhbfunc.c
* contrib/hbnf/fttext.c
* contrib/hbbmcdx/bmdbfcdx.c
+ Changed to use HB_ERRCODE.
* contrib/hbmzip/hbmzip.c
* Minor formatting.
; NOTE/TOFIX: Here there is again 'int' used as error code.
* contrib/rddsql/sddodbc/tests/test1.prg
* contrib/rddsql/sddodbc/tests/test2.prg
! Fixed to use manifest constants instead of literals in SET() calls.
* harbour/config/win/bcc.mk
! always use \ in paths used as ilink32.exe parameters - ilink does not
accept / as path delimiter and always use them as switch separators
! enclose parameters with paths into "" to avoid \ stripping by shell
! removed old hacks used for bcc32.exe and WINE
Now BCC works again with POSIX shells and WINE.
Please test these modifications in native MS-Windows environment.
* contrib/hbxbp/tests/demoxbp.prg
* contrib/hbxbp/xbpwindow.prg
! Applied patch from Istvan Bisz, fixing some typos in recent commits.
Thank you!
* ChangeLog
* Few TODOs marked DONE.
* harbour/contrib/hbnetio/netio.h
* harbour/contrib/hbnetio/netiocli.c
* harbour/contrib/hbnetio/netiosrv.c
* changed USHORT to HB_ERRCODE as error code holder
* use 32bit integers to exchange error codes between server and
client side
* pacified warning
* 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).
* src/rtl/errapi.c
! Typo in comment.
* Deleted unnecessary casting.
% Minor opt in hb_errPutOperation() string parameter defaulting.
* ChangeLog
* contrib/hbqt/hbqt_misc.prg
* contrib/hbxbp/xbpgeneric.prg
% Minor opt.
! Fixed variable name prefixes of STATIC/THREAD STATIC vars.
! Fixed to create mutex directly in STATIC var assignment instead of INIT function.
% Fixed to use hb_releaseCPU() instead of hb_idleSleep( 0.01 ).
Notice that latter actually slows down execution unnecessarily,
so it should only be used when we do actually want to wait.
* contrib/hbxbp/tests/demoxbp.prg
! Eliminated warnings after latest changes.
* contrib/hbqt/hbqt.h
* contrib/hbqt/generator/hbqtgen.prg
* contrib/hbqt/hbqt.ch
* contrib/hbqt/hbqt_destruct.cpp
* contrib/hbqt/tests/demoqt.prg
* contrib/hbqt/hbqt_slots.cpp
* contrib/hbqt/Makefile
* contrib/hbxbp/xbpappevent.prg
* contrib/hbxbp/xbpsle.prg
* contrib/hbxbp/xbplistbox.prg
* contrib/hbxbp/xbppresspace.prg
* contrib/hbxbp/xbpcheckbox.prg
* contrib/hbxbp/xbpmenubar.prg
* contrib/hbxbp/xbpradiobutton.prg
* contrib/hbxbp/xbprtf.prg
* contrib/hbxbp/xbpfiledialog.prg
* contrib/hbxbp/tests/demoxbp.prg
* contrib/hbxbp/xbpbrowse.prg
* contrib/hbxbp/xbptabpage.prg
* contrib/hbxbp/xbpwindow.prg
* contrib/hbxbp/xbpcombobox.prg
* contrib/hbxbp/xbpstatusbar.prg
* contrib/hbxbp/xbppushbutton.prg
* contrib/hbxbp/xbpprintdialog.prg
* contrib/hbxbp/xbpbitmap.prg
* contrib/hbxbp/xbp.ch
* contrib/hbxbp/xbpprinter.prg
* contrib/hbxbp/xbpscrollbar.prg
* contrib/hbxbp/xbpfontdialog.prg
* contrib/hbxbp/xbphtmlviewer.prg
* contrib/hbxbp/xbpstatic.prg
* contrib/hbxbp/xbptreeview.prg
* contrib/hbxbp/xbpdialog.prg
* contrib/hbxbp/xbpstyle.prg
* contrib/hbxbp/xbptoolbar.prg
* contrib/hbxbp/xbp3state.prg
* contrib/hbxbp/xbpspinbutton.prg
* contrib/hbxbp/xbpdataref.prg
* contrib/hbxbp/xbpgeneric.prg
* contrib/hbxbp/xbpmle.prg
! Fixed to include hbqt.ch from xbp.ch instead of doing it in each file manually.
* Renamed __debug__ to __HB_DEBUG__
! Fixed just_debug() to work in UNICODE mode.
* Renamed hb_getMemUsed() to hbqt_getmemused()
* Renamed just_debug() to hbqt_debug()
+ Added multiple parameter support to HB_OUTDEBUG().
* Renamed HB_OUTDEBUG() to HBQT_DEBUG() in hbqt and HBXBP_DEBUG() in hbxbp.
! Fixed #include <Psapi.h> to #include <psapi.h>.
! Replaced all debug calls to use HBQT_DEBUG() / HBXBP_DEBUG().
; NOTE: After this change __HB_DEBUG__ controls debug mode in both .c and .prg mode.
Windows specific debug output can still be enabled with __HB_WINDEBUG__.
; NOTE: I didn't test any of these. Pls do so.
; NOTE: All above is temporary as it would be better add OutputDebugString() support
to our RTL trace engine (enabled with a flag), plus multiple parameter
support (preferably accepting any types) to HB_TRACESTRING().
Since my .c skill would kill this effort, or at least make it quite bumpy,
I'd kindly ask someone (Przemek, are you there? ;) to implement it.
Preferably both.
; TODO: Regenerate all hbqt sources.
* src/rtl/hbi18n1.c
! Fixed bcc warning in recent commit.
* contrib/gtwvg/tests/demoxbp.prg
! Fixed to use HB_SYMBOL_UNUSED() instead of local solution.
* contrib/gtwvg/tests/demowvg.prg
+ Added dirbase to icon filenames
* contrib/gtwvg/Makefile
+ Enabled for msvc64 and pocc64.
* contrib/hbqt/hbqt_slots.cpp
* contrib/hbqt/hbqt_slots.h
! Fixed double freeing of HbDbfModel::block because of
recalling the same function twice.
Przemek ValGrind really helped here, thanks.
* contrib/gtwvg/Makefile
* contrib/gtwvg/wvgsysw.prg
* contrib/gtwvg/wvgwing.c
* contrib/gtwvg/wvgwnd.prg
- contrib/gtwvg/wincallb.c
- contrib/gtwvg/wincback.prg
* contrib/gtwvg/tests/demoxbp.prg
! Removed 32 bits only code which made GTWVG unusable on 64 bits
opering systems. I just discoved a way to assign WndProc to
system dialogs and hence this major change is effected.
Viktor, please let me know if GTWVG now compiles fine on 64 bits.
* contrib/hbqt/hbqt_destruct.cpp
! Fixed the way windows.h is included.
! Fixed to exclude Windows stuff on non-Windows systems (in debug mode).
; PLEASE KEEP IT THIS WAY.
* contrib/hbsms/Makefile
! Fixed dependency on tpathy headers.
* contrib/hbsms/hbsms.prg
* contrib/hbsms/hbsms.hbc
- Deleted implementation based on hbwin com port support.
* config/global.mk
* config/win/bcc.mk
+ Added hack to hack so that bcc autoconfiguration works
even when bcc is explicitly selected.
Now I wonder what will be the next corner case bcc users
will come up with.
* config/win/bcc.mk
+ Changed to use ilink32 directly to link executables instead of
relying on bcc32.
This changed synced this details with hbmk2.
Please test, especially on Linux+Wine.
Also please don't hesitate to make adjustments to this change
if needed. BCC isn't my bread and butter and I didn't make
extensive tests.
* contrib/hbqt/hbqt.ch
* contrib/hbqt/tests/demoqt.prg
+ Changed to use same .prg level debug trace call method as in hbxbp.
Enable it with __HB_OUTDEBUG__.
On Windows to use OutputDebugString() instead of regular Harbour
trace calls, also #define __HB_WINDEBUG__. In this case, also link
hbwin lib (not xhb lib).
* Moved QT_PTROF() macro from demo code to header.