+ harbout/contrib/hbzlib
+ added support for zlib library and zip files (based on
minizip)
+ harbour/contrib/hbzlib/zconf.h
+ harbour/contrib/hbzlib/zlib.h
+ zlib include files
+ harbour/contrib/hbzlib/zip.h
+ harbour/contrib/hbzlib/unzip.h
+ minizip include files
+ harbour/contrib/hbzlib/ioapi.c
+ harbour/contrib/hbzlib/zip.c
+ harbour/contrib/hbzlib/unzip.c
+ minizip source files. Some fixes are applied to avoid compile
time warning and errors, see readme.txt for list
; I've compiled with BCC only, please, check other compilers
+ harbour/contrib/hbzlib/hbzlib.c
+ zlib wrapper functions. Przemyslaw Czerpak is author of this code.
The file was posted to developers mailing list on 2007-05-17.
I think licence statments in the begining of file gives permission
to include it into SVN.
* HB_UNCOMPRESSLEN() function added. Source copied from Przemyslaw's
email on 2008-01-10.
+ harbour/contrib/hbzlib/hbmzip.c
+ wrapper functions for minizip library
Function names uses convention:
- HB_ZIP*() - manages compression of .zip file:
HB_ZIPOPEN(), HB_ZIPCLOSE()
- HB_ZIPFILE*() - manages compression of files inside .zip:
HB_ZIPFILECREATE(), HB_ZIPFILEWRITE(), HB_ZIPFILECLOSE()
- HB_UNZIP*() - manages decompression of .zip fileL
HB_UNZIPOPEN(), HB_UNZIPCLOSE()
- HB_UNZIPFILE*() - manages decompression of files inside .zip
HB_UNZIPFILEOPEN(), HB_UNZIPFILEREAD(), HB_UNZIPFILECLOSE(),
HB_UNZIPFILEFIRST(), HB_UNZIPFILENEXT(), HB_UNZIPFILEPOS(),
HB_UNZIPFILEGOTO(), HB_UNZIPFILEINFO()
Parameters of functions are documented inside source files.
+ implemented some higher level functions. These function are not
wrapper of minizip:
HB_ZIPSTOREFILE(), HB_UNZIPEXTRACTCURRENTFILE()
; minizip gives low level access on zip files. This could be a
problem if you not going to put your fingers on internals, but
just want to compress/decompress files. Because managing of
file attributes is a little complicated. These higher level
functions do the job.
; please test code under linux. Source is written using docs only,
without test or deeper knowledge.
+ harbour/contrib/hbzlib/hbzlib.ch
+ defines for zlib and minizip libraries
; I've used HB_ZLIB_* and HB_ZIP_* prefixes, because some original
names of minizip library are too general, ex., APPEND_STATUS_CREATE
If you want to use original define names we change this.
+ harbour/contrib/hbzlib/readme.txt
* some comments on the source of libraries and ChangeLog for minizip
files
+ harbour/contrib/hbzlib/tests/myzip.prg
+ harbour/contrib/hbzlib/tests/myunzip.prg
+ tiny compression/decompression utilities written in Harbour
+ harbour/contrib/hbzlib/Makefile
+ harbour/contrib/hbzlib/make_b32.bat
+ harbour/contrib/hbzlib/make_vc.bat
+ makefiles written using another contrib's makefiles as template
; I'm not makefiles guru, please test it. I've also used command line
parameters: -DNOCRYPT -DNOUNCRYPT, to compile minizip. I don't know
howto include these to our makefiles
* 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/contrib/hbct/files.c
! added missing 'return;' - in OS2 builds - it should fix value
returned by SETFDATI(), many thanks to David for his tests,
now SETFDATI() should be fully functional in OS2 builds.
* harbour/contrib/xhb/Makefile
* harbour/contrib/xhb/common.mak
+ harbour/contrib/xhb/xhbqself.c
+ added xHarbour compatible HB_QSELF() function
* harbour/contrib/xhb/xhbfunc.c
* removed HB_QSELF() redirecting to Class(y) compatible __SENDER()
function
* harbour/contrib/xhb/xhbcomp.prg
! fixed scalar classes overloading, do not enable extended messages
for basic types if user haven't requested it (ENABLE TYPE CLASS ...),
use scalar classes defined in RTL
* 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/contrib/hbrddads/adsfunc.c
+ ADSGetServerName()
* harbour/contrib/hbrddads/make_b32.bat
* harbour/contrib/hbrddads/make_vc.bat
! Fixed variable names in help screen
* Added setting to ADS_REQUIRE_VERSION by value of ADS_VER