* harbour/source/vm/macro.c
! make macro substitution before macro compilation - Clipper
compatible behavior - fix borrowed from xHarbour
! do not overwrite 1-st error object by others which can appear
during macro TYPE() checking
* harbour/common.mak
* replaced TAB with SPACEs
* harbour/source/rdd/dbcmd.c
* changed hb_retnl() in LASTREC() to hb_retnint() to increase maximum
record number to 2^32 - unsigned 32bit integer instead of signed one.
* harbour/source/rdd/dbf1.c
! fixed possible memory leak/GPF when sx_DBFencrypt() is called when
table already has password set
* added support for password passing in sx_DBFdecrypt() - it's accepted
only when table has no password
* harbour/source/rdd/hbsix/sxcompat.prg
- removed SX_SETPASS()
* harbour/source/rdd/hbsix/sxtable.c
+ added new SX_SETPASS() implementation which supports
some undocumented SIX3 actions
! fixed problem with setting password for currently open table
with SX_SETPASS( <cPass> )
* harbour/ChangeLog
* harbour/include/hbapiitm.h
* harbour/source/vm/itemapi.c
- removed hb_itemLockReadCPtr()/hb_itemLockWriteCPtr()/hb_itemUnLockCPtr()
Whole modification which will address all different aspects it to
complex to introduce it now. I'll return to this problem after
1.0 release
* harbour/include/hbapiitm.h
* harbour/source/vm/itemapi.c
+ added new functions:
BOOL hb_itemParamStore( USHORT uiParam, PHB_ITEM pItem )
BOOL hb_itemParamStoreForward( USHORT uiParam, PHB_ITEM pItem )
They copy/move pItem body to parameter passed by reference and
return TRUE when operation was done successfully (uiParam was passed
by reference)
+ added new functions for string manipulation:
char * hb_itemLockReadCPtr( PHB_ITEM pItem, ULONG * pulLen );
char * hb_itemLockWriteCPtr( PHB_ITEM pItem, ULONG * pulLen );
void hb_itemUnLockCPtr( char * pszString );
It's recommended to use them instead of hb_itemGetCPtr().
Pointer to string buffer returned by hb_itemLockReadCPtr() will
be always valid even if source item will be cleared, destroyed or
overwritten until hb_itemUnLockCPtr() is called. Each locked string
has to be unlocked to avoid memory leaks. After unlocking the string
pointer cannot be longer used.
hb_itemLockWriteCPtr() works like hb_itemLockReadCPtr() but string
pointer returned by this function is writable so user can change
the body of string item. It's the _ONLY_ one way when it's possible.
Modifying string items using pointers returned by hb_parc() or
hb_itemGetCPtr() or extracted directly from HB_ITEM body is _FORBIDDEN_
and can cause unpredictable results (GPF when constant/readonly memory
pages are changed, changing many different items which share the same
memory buffer, etc.).
This is code illustrates how to use hb_itemLockReadCPtr()/
hb_itemUnLockCPtr() and it's also good example why hb_itemGetCPtr()
is very danger function and cannot be used in such case - if you
replace hb_itemLockReadCPtr() with hb_itemGetCPtr() and remove
hb_itemUnLockCPtr() then you will have buggy code.
HB_FUNC( MYFUNC )
{
PHB_ITEM pObject = hb_param( 1, HB_IT_OBJECT )
if( pObject )
{
char * pszName1, * pszName2;
PHB_ITEM pResult;
pResult = hb_objSendMsg( pObject, "POP", 0 );
pszName1 = hb_itemLockReadCPtr( pResult, NULL );
pResult = hb_objSendMsg( pObject, "POP", 0 );
pszName2 = hb_itemLockReadCPtr( pResult, NULL );
if( pszName1 && pszName2 )
hb_retc_buffer( hb_xstrcpy( NULL,
"[", pszName1, "]-[", pszName2, "]", NULL ) );
hb_itemUnLockCPtr( pszName1 );
hb_itemUnLockCPtr( pszName2 );
}
}
This code shows how to use hb_itemLockWriteCPtr():
proc main()
local cVal, cVal2
cVal := cVal2 := "ABC"
STRPUT( @cVal2, 2, 42 )
? cVal, cVal2
return
#pragma begindump
#include "hbapiitm.h"
HB_FUNC( STRPUT )
{
PHB_ITEM pString = hb_param( 1, HB_IT_STRING );
ULONG ulAt = hb_parnl( 2 );
if( pString && ulAt && ISNUM( 3 ) )
{
ULONG ulLen;
char * pszValue;
pszValue = hb_itemLockWriteCPtr( pString, &ulLen );
if( pszValue )
{
if( ulAt <= ulLen )
pszValue[ ulAt - 1 ] = ( char ) hb_parni( 3 );
hb_itemUnLockCPtr( pszValue );
}
}
}
#pragma enddump
* harbour/include/hbcompdf.h
* harbour/include/hbexprop.h
* harbour/include/hbexprb.c
* harbour/source/compiler/hbmain.c
* harbour/source/compiler/cmdcheck.c
* harbour/source/compiler/hbusage.c
* removed HB_I18N_SUPPORT macro and enabled I18N code in default build
* harbour/include/hbexprb.c
* harbour/source/compiler/hbmain.c
! added string escaping before to i18n .pot files
+ added hb_i18n_gettext_strict() support for compiler. This function
generates warning if argument is not literal string. See discussion
on mailing list from 2007-11-23 to 2007-11-29, for details.
* harbour/source/vm/estack.c
* added missing static to s_initSymbol declaration
* harbour/include/hbgtinfo.ch
* harbour/source/rtl/scroll.c
* formatting
* harbour/common.mak
* added empty line necessary for some make systems (f.e. wmake)
* harbour/bin/hb-func.sh
* changed system libs order to avoid problems on some platforms
* harbour/bin/pack_src.sh
* collect information about repository files using 'svn status -v'
command instead of scanning .svn/entries files to avoid problems
with different formats used by SVN
* harbour/include/hbchksum.h
* harbour/include/hbset.h
! added missing extern in few function prototypes
* harbour/include/hbclass.ch
* use HB_CLS_PARAM_LIST macro instead of ... for strict C52 mode
* harbour/source/common/hbfsapi.c
+ added missing const to one declaration
* harbour/source/common/hbstr.c
* minor cleanup in hb_stricmp()
* harbour/source/rtl/inkey.c
! casting to avoid negative values during char to int translation
* harbour/source/rtl/mouse53.c
* added one internal definition
* harbour/source/rtl/philes.c
* removed unnecessary #include(s)
* added missing const to one declaration
* harbour/source/rtl/valtype.c
* harbour/source/vm/hashfunc.c
* cleanup RT error call to eliminate hb_paramError() function
* harbour/source/pp/pplib.c
* harbour/source/vm/runner.c
* harbour/source/vm/debug.c
* harbour/source/vm/arrayshb.c
* harbour/source/vm/classes.c
* harbour/source/vm/hvm.c
* harbour/source/rtl/hbgtcore.c
* harbour/source/rtl/gtfunc.c
* harbour/source/rtl/hbinet.c
* harbour/source/rtl/hbregex.c
* harbour/source/rtl/idle.c
* harbour/source/rtl/errorapi.c
* harbour/source/rtl/hbtoken.c
* harbour/source/rtl/direct.c
* harbour/source/rdd/dbcmd.c
* harbour/source/rdd/dbcmd53.c
* harbour/source/rdd/fieldhb.c
* harbour/source/rdd/hbsix/sxcompr.c
* harbour/source/rdd/hbsix/sxcrypt.c
* harbour/source/compiler/hbcmplib.c
* harbour/contrib/hbrddads/adsfunc.c
* harbour/contrib/hbrddads/adsmgmnt.c
- removed unnecessary calls to hb_ret()
% replaced hb_itemRelease( hb_itemReturn( pItem ) ) with
hb_itemReturnRelease( pItem )
% replaced hb_itemPut*( hb_arrayGetItemPtr( pArray, ... ), ... ) with
hb_arraySetNI( pArray, ... )
* harbour/source/macro/macro.y
* harbour/source/macro/macro.yyc
* harbour/contrib/xhb/cstructc.c
* harbour/contrib/hbw32/w32_ole.c
* harbour/contrib/hbgtwvg/wvtcore.c
* cleaned typos with double ;;
* harbour/source/vm/extend.c
* harbour/source/rtl/math.c
* cleaned HB_EXPORT usage
* harbour/source/pp/ppcore.c
! fixed Harbour extension which allows to use match marker
at the beginning of rule definition
* harbour/source/main/harbour.c
! fixed hex conversion in FM log module - fix done by Phil Krylov
in xHarbour
* harbour/source/rdd/nulsys/nulsys.c
+ added dummy version of DBEVAL() and DBFILTER() - these functions
are used in RTL
* harbour/contrib/hbct/bitnum.c
+ added INTNEG(), INTPOS()
+ harbour/contrib/hbct/ctrand.prg
+ added RANDOM(), RAND() - borrowd from xHarbour by Pavel Tsarenko
+ harbour/contrib/hbct/setrc.c
+ added SETRC()
* harbour/contrib/hbct/getinput.prg
% minor optimization
* harbour/contrib/hbct/Makefile
* harbour/contrib/hbct/common.mak
* updated for new files
* harbour/contrib/hbnf/tempfile.prg
* use HB_FTempCreate() - modification borrowed from xHarbour
TOFIX this function uses hb_isbyref() which does not exist
in Harbour
* harbour/config/w32/msvc.cf
+ added -nologo flag for cl.exe (Phil Krylov's modification borrowed
from xHarbour
* harbour/config/w32/mingw32.cf
- removed repeated definitions
* harbour/config/w32/install.cf
! added alternative install rule for command.com with max line size limit
* include/hbclass.ch
! Enabling HB_CLS_NO_DECORATION if compiled with HB_C52_STRICT,
since in strict mode some PP extensions required by the
decoration feature are not available.
(Thanks Przemek for the tip)
* source/rtl/tpopup.prg
! Fixed typo in POPUPMENU():getAccel(), causing wrong
position being returned. Reported by Jose Miguel.
* source/rtl/ttopbar.prg
! Changed HB_C52_STRICT guards to HB_EXTENSION.
* harbour/bin/hb-mkslib.sh
+ added -fPIC to GCC parameters - it's necessary on some platforms
+ use .sl suffix for shared library in HP-UX
* harbour/bin/hb-func.sh
+ use .sl suffix for shared library in HP-UX
* harbour/bin/postinst.bat
* removed < > from email address
* harbour/include/hbgtcore.h
* harbour/source/rtl/gtkeycod.c
* harbour/source/rtl/gtdos/gtdos.c
* harbour/source/rtl/gtos2/gtos2.c
* harbour/source/rtl/gtstd/gtstd.c
* harbour/source/rtl/gtpca/gtpca.c
* fixed typo in function name - it should be hb_gt_dos_keyCodeTranslate()
not hb_gt_dos_keyCodeTanslate()
* harbour/make_tgz.sh
* updated for non GNU tar versions
* harbour/ChangeLog
* replaced TABs with SPACEs
* harbour/bin/pack_src.sh
* try to detect GNU tar
* harbour/make_xmingw.sh
* added new default location for MinGW cross-compiler in Gentoo
distribution
* added auto detection of MinGW cross-compiler installation which
should work in most cases when default location test fails
* harbour/make_tgz.sh
* try to detect GNU make and GNU tar
* harbour/source/rtl/gtwvt/gtwvt.c
* call hb_gt_wvt_InitWindow explicitly to eliminate problems
with ignored WM_CREATE message when new window handler is not
yet registered
* harbour/bin/hb-func.sh
* added system libraries necessary for linking some of harbour
contrib libs in WinCE
* minor cleanup
* harbour/source/rtl/gtxwc/gtxwc.c
* added missing 'const' in declaration
* harbour/include/hbmath.h
* harbour/source/rtl/math.c
* cleaned matherr API, now it works in the same way on all
platforms - this modification fixes also some strange
results when math functions were called with wrong arguments
on some platforms
* harbour/contrib/hbct/trig.c
* harbour/contrib/hbct/finan.c
* harbour/contrib/hbct/ctmath2.c
* updated for new matherr API and cleaned some minor problems
* harbour/contrib/hbct/files.c
! use DATE and TIME parameters formated like for DOS in OS2
version of SETFDATI() - David, if possible please repeat
the test from my previous commit, thank you.
* harbour/ChangeLog
* reverted conversion to UTF8 of national characters (svn diff)
* harbour/include/hbdate.h
* harbour/source/common/hbdate.c
+ added hb_timeStrGet()
* harbour/contrib/hbct/files.c
* use hb_timeStrGet() instead of sscanf()
+ added OS2 version of SETFDATI() - please test it !!!
I'm interesting in results of this code compiled with OS2
Harbour build:
proc main()
local cFile:="_tst.tmp"
FCLOSE(FCREATE(cFile))
? FILEDATE(cFile), FILETIME(cFile)
? SETFDATI(cFile,STOD("20061129"),"12:34:45")
? FILEDATE(cFile), FILETIME(cFile)
? SETFDATI(cFile)
? FILEDATE(cFile), FILETIME(cFile)
FERASE(cFile)
return
* bin/bld.bat
! %HB_USER_LIBS% (for bcc32) moved to the beginning of the lib list.
* contrib/mtpl_b32.mak
! Fixed preprocessor error in line 190 when HB_INSTALL_PREFIX != HB_ROOT
* source/rtl/getsys53.prg
* source/rtl/getsys.prg
! Moved ReadStats() to getsys52.prg
* ChangeLog
! Removed UTF-8 signature from the beginning of the file.
Unfortunately accented chars got converted to UTF8, which
would need to fixed.
Pritpal, please turn off this feature on your editor for Harbour.
* harbour/source/common/hbfsapi.c
+ added OS2 version of hb_fsFileExists() and hb_fsDirExists()
Please test - I do not have OS2
* harbour/source/rdd/dbf1.c
! removed unnecessary printf() message I left by mistake
* harbour/contrib/hbct/files.c
+ added OS2 version of SETFATTR()
Please test - I do not have OS2
* harbour/config/os2/global.cf
+ added temporary workaround for possible problems with some
GNU make versions
* harbour/make_deb.sh
+ build hbpgsql when libpq-dev is installed
* harbour/include/clipdefs.h
* do not define PBYTE, PSHORT, PUSHORT, PLONG, PULONG, PBOOL, PVOID
when HB_OS_OS2 && HB_DONT_DEFINE_BASIC_TYPES is defined
* harbour/source/rtl/hbgtcore.c
* formatting
* harbour/source/vm/hvm.c
! fixed typo in HB_TRACE message
* harbour/source/rtl/gtwvt/gtwvt.h
* harbour/source/rtl/gtwvt/gtwvt.c
* updated for multi window usage
* harbour/source/vm/maindllp.c
* use MessageBox() instead of hb_errInternal() - thanks to Jon Jagger
for information about the problem
* harbour/source/rtl/gtwvt/gtwvt.h
* harbour/source/rtl/gtwvt/gtwvt.c
* harbour/contrib/hbgtwvg/gtwvt.h
* harbour/contrib/hbgtwvg/gtwvt.c
* moved RGB definition of used colors to terminal window structure,
now each window can use different palette
* harbour/include/hbgtcore.h
* harbour/source/rtl/hbgtcore.c
* harbour/source/rtl/gtapi.c
* harbour/source/rtl/inkeyapi.c
* harbour/source/rtl/mouseapi.c
- removed hb_gt_*(), hb_inkey_*(), hb_mouse_*() functions
+ implemented HB_GTSELF_*() functions and changed HB_GTSUPER_*()
ones to operate on GT context passed ad 1-st parameter.
Now GT API allows to create many GTs working simultaneously
+ added hb_gt_Base() core function which returns GT context
it will be extended soon to allow using many GT contexts,
setting thread default one or switch between them using some
.prg function.
* harbour/source/rtl/gtstd/gtstd.c
* harbour/source/rtl/gtcgi/gtcgi.c
* harbour/source/rtl/gtpca/gtpca.c
* harbour/source/rtl/gttrm/gttrm.c
* harbour/source/rtl/gtxwc/gtxwc.c
* harbour/source/rtl/gtcrs/gtcrs.c
* harbour/source/rtl/gtcrs/gtcrs.h
* harbour/source/rtl/gtsln/gtsln.c
* harbour/source/rtl/gtsln/gtsln.h
* harbour/source/rtl/gtsln/kbsln.c
* harbour/source/rtl/gtsln/mousesln.c
* harbour/source/rtl/gtalleg/gtalleg.c
* harbour/source/rtl/gtgui/gtgui.c
* harbour/source/rtl/gtwin/gtwin.c
* harbour/source/rtl/gtwvt/gtwvt.h
* harbour/source/rtl/gtwvt/gtwvt.c
* harbour/contrib/hbct/ctwin.c
* harbour/contrib/hbct/ctwin.h
* harbour/contrib/hbct/ctwfunc.c
* harbour/contrib/hbgtwvg/gtwvt.h
* harbour/contrib/hbgtwvg/gtwvt.c
* updated GT code for new GT API. I still haven't added GT cloning
to them and only GTTRM is ready to use in multi window MT programs
but now they can be systematically modified and it can be done
locally without core code modifications.
* harbour/contrib/hbgtwvg/wvtutils.c
! fixed some memory leaks in Unicode conversions
* harbour/source/lang/msgltwin.c
* more changes from LT to LTWIN
* harbour/common.mak
* restored missing msgltwin.c
* harbour/include/hbapi.h
* harbour/source/vm/hashes.c
+ added hash key support for pointer type
* include/hbextern.ch
* common.mak
* source/codepage/Makefile
- source/codepage/cpdedos.c
+ source/codepage/cpde850.c
- source/codepage/cpeldos.c
+ source/codepage/cpel737.c
- source/codepage/cpesdos.c
+ source/codepage/cpes850.c
- source/codepage/cpfrdos.c
+ source/codepage/cpfr850.c
- source/codepage/cptrdos.c
+ source/codepage/cptr857.c
! Renamed some codepage modules to include the
actual DOS codepage number instead of nothing
or generic "dos" name.
* common.mak
* source/lang/Makefile
+ source/lang/msgtr857.c
- source/lang/msgtrdos.c
! Rename one language module to be in sync with
proper internal ID.
* doc/howtosvn.txt
! Fixed the SVN propset command to include all needed keywords,
not just "Id".
* common.mak
* source/codepage/Makefile
- source/codepage/cpgedos.c
- source/codepage/cpgeiso.c
+ source/codepage/cpdedos.c
+ source/codepage/cpdeiso.c
! Renamed to be in sync with rules and content.
* source/lang/msgnl.c
! svn propset svn:keywords "Author Date Id Revision".
(to correct my prev commit)
* include/hbextern.ch
! Adjusted CP/MSG module names.
* source/codepage/cphuwins.c
* source/codepage/cphuiso.c
* source/codepage/cphuwin.c
* source/codepage/cphuisos.c
! Fixed sloppy wording in comment. (Thanks Chen)
* common.mak
* source/codepage/Makefile
+ source/codepage/cpgeiso.c
- source/codepage/cpgewin.c
* Renamed to ISO to be in sync with the actual codepage used.
(Thanks Chen)
; Might be a good idea to readd the "real" WIN version to stay
compatible. Anyone?
* harbour/include/hbgtcore.h
+ added some missing HB_GTSUPER_* functions
* harbour/contrib/hbgtwvg/wvtcore.c
* use hb_gt*() functions instead of hb_gt_*() ones
* harbour/contrib/hbgtwvg/wvtutils.c
* harbour/contrib/hbgtwvg/gtwvt.c
* harbour/source/rtl/gtwin/gtwin.c
* harbour/source/rtl/gtgui/gtgui.c
* harbour/source/rtl/gtwvt/gtwvt.c
* harbour/source/rtl/gttone.c
* harbour/source/rtl/gtclip.c
* minor cleanup in hb_gt_w32_*() function names
* harbour/source/rtl/hbgtcore.c
* harbour/source/rtl/gtclip.c
* use common for all GT internal Clipboard buffer - thanks to Pritpal
for a note
* harbour/common.mak
* harbour/source/rtl/Makefile
* harbour/include/hbgtcore.h
* harbour/source/rtl/hbgtcore.c
* harbour/source/rtl/inkey.c
+ harbour/source/rtl/inkeyapi.c
* moved hb_inkey*() functions to GT subsystem so now they can be
overloaded by GT drivers and/or operate on different GT context
* harbour/source/rtl/mouse53.c
* eliminated to unused static variables
* harbour/source/rtl/mouseapi.c
* do not include unnecessary header files
* harbour/source/rtl/gtchrmap.c
* replaced // comment by /* ... */
* harbour/common.mak
* harbour/make_gcc.mak
* harbour/make_gcc.sh
+ Added the possibility to build dll/so of Harbour VM+RTL
(tested om MingW, Cygwin, FC8/64)
* harbour/make_b32.mak
* harbour/make_vc.mak
* harbour/make_vcce.mak
+ Added HB_ARCHITECTURE definition (to be used in a future)
* harbour/source/rtl/gtchrmap.c
! Fixed compilation under Linux using make_gcc.sh