* harbour/src/rtl/hbini.prg
! fixed stripping last character when the last line in ini file
does not contain valid EOL - thanks to Mario H. Sabado for information
about the problem
* harbour/src/rtl/dateshb.c
! fixed HB_TTOD() and HB_DTOT() results - they were reverted by mistake
+ added support for optional second parameter in HB_DTOT() function with
time as numeric value in second() like representation or as character
string with HH:MM[:S[S][.f[f[f[f]]]]] [PM|AM] representation, i.e.:
? HB_DATETIME()
? HB_DTOT( date(), seconds() )
? HB_DTOT( date(), time() )
+ added support for optional second parameter passed by reference in
HB_TTOD() function. If given then this functions stores in it number
of seconds in given day specified by timestamp value, i.e.:
dDate := HB_TTOD( HB_DATETIME(), @nSec )
gives similar functionality to:
dDate := date()
nSec := seconds()
+ added support for optional 3-rd parameter in HB_TTOD() functions
with timestamp format. If given then this function stores time
part in second parameter as formatted string value. For empty
string _SET_TIMEFORMAT is used, i.e.:
dDate := HB_TTOD( HB_DATETIME(), @cTime, "hh:mm:ss" )
* harbour/src/common/hbwince.c
+ added GetEnvironmentVariableW() - it fixes WinCE builds after recent
ANSI to UNICODE function conversions. In WINCE such functions do not
exist.
* harbour/src/rtl/gtclip.c
* pacified MinGWCE warnings
* harbour/src/rtl/dateshb.c
+ added HB_TTOD() and HB_DTOT() functions
* harbour/src/rtl/cdpapi.c
* harbour/include/hbapicdp.h
+ added new functions: hb_cdpStrnToU16LE() and hb_cdpStringInU16Length()
* harbour/contrib/rddads/rddads.h
! define (if not defined) x64 macro in all 64bit builds not only for
MinGW64
* define (if not defined) unix macro in all HB_OS_UNIX builds not only
for Linux. TOCHECK: CygWIN builds.
* harbour/src/rtl/Makefile
+ harbour/src/rtl/hbbfish.c
* harbour/include/Makefile
+ harbour/include/hbbfish.h
+ added support for BlowFish encryption at C level:
hb_blowfishInit(), hb_blowfishEncrypt(), hb_blowfishDecrypt()
This code implements BlowFish algorithm designed by Bruce Schneier.
The description of BlowFish algorithm can be found at:
http://www.schneier.com/paper-blowfish-fse.html
This code uses for initial s-boxes and p-array values PI hex digits
taken from tables public at:
http://www.schneier.com/blowfish.html
which can be downloaded from:
http://www.schneier.com/code/constants.txt
This should be quite fast implementation (probably much faster
then reference one) but please remember that in BlowFish algorithm
startup initialization of encryption tables is intentionally
designed to be expensive to strongly reduce the efficiency of
brute force attacks so call hb_blowfishInit() once for each
new password and then reuse initialized encryption tables in
hb_blowfishEncrypt() and hb_blowfishDecrypt().
I'll add .prg functions later.
TODO: add some asymmetric key encryption.
* harbour/src/compiler/genc.c
* harbour/src/compiler/compi18n.c
* use "w' instead of "wb" in hb_fopen flags. It causes that in some
systems like DOS or Windows if CRTL supports it then all \n in
generated files will be automatically translated to native EOLs
(\r\n).
This modification should make .pot and .c files generated by
Harbour compiler more readable for DOS and Windows users.
* harbour/src/compiler/gencobj.c
! fixed wrong hb_fopen() flags 't' is not documented fopen() flag
so some systems may refuse to open files when it's used.
* src/common/hbver.c
* src/rtl/fstemp.c
* contrib/hbwin/win_prn2.c
+ Changed to use native instead of fixed ANSI version of win API calls.
; Please review me, all these are critical low level functions,
so any mistakes can be deadly.
; TODO: Remaining dynamic versions, although maybe for dynamically
loaded win API functions it's better to stay with ANSI
version for compatibility.
* harbour/src/rdd/dbfcdx/dbfcdx1.c
* removed old unused macros
* harbour/include/hbcompdf.h
* harbour/src/compiler/hbmain.c
* harbour/src/compiler/cmdcheck.c
* harbour/src/compiler/complex.c
* harbour/src/compiler/hbcomp.c
* harbour/src/compiler/gencobj.c
* harbour/src/compiler/hbusage.c
+ added support for -gd[.<destExt>] switch.
When used Harbour compiler generates also .d file with dependencies
list in the form like for make systems:
<destFile>: <sourceFiles,...>
optional .<destExt> parameter value can be used to replace default
extension in <destFile>.
Now users can generate .d files without additional overhead in the
same pass as normal compilation by simple adding -gd[.<destExt>]
switch to compilation command instead of executing harbour compiler
second time with -sm switch.
* harbour/doc/man/harbour.1
* updated man page
* harbour/utils/hbmk2/hbmk2.prg
* removed -kj switch - it's not longer necessary to improve -sm
* minor formatting
* src/rtl/filesys.c
! hb_fsIsDrv() changed on win platform to use GetLogicalDrives() API
instead of GetDriveTypeA(). This should fix existing TOFIX.
Thanks for Saulius Zrelskis for the suggestion.
I'd like to ask users to make side-by-side comparisons with
CA-Cl*pper to see if we're compatible.
! Fixed hb_fsIsDrv() on non-win platforms to always set
internal error to zero. CA-Cl*pper does the same.
* utils/hbmk2/hbmk2.pt_BR.po
* utils/hbmk2/hbmk2.hu_HU.po
* utils/hbmk2/hbmk2.prg
* Renamed header parsing mode 'real' to 'native'.
Looks to be the final.
! Fixed minor error in prev: one debug message was always on.
! Turn off native .prg header parsing in -xhb and -hb10 operating
modes.
; TODO: for .prg header parsing use one compiler call instead of
one for each .prg.
; TODO: with gcc family compilers use 'gcc -MM' mode for header
parsing. Probably needs separate control, as (at first)
it seems to be much slower than current simple method.
* src/codepage/cpes850c.c
! Updated to be compatible with CA-Cl*pper.
Submitted by Maurizio Faccio.
* src/codepage/cpesisoc.c
* src/codepage/cpeswinc.c
* Synced with cpes850c.
* contrib/hbwin/tests/testole.prg
* Minor cleanups.
* harbour/src/compiler/cmdcheck.c
* minor formatting
* harbour/src/compiler/complex.c
% disabled lexer when -sm is used with -m switch.
In Harbour compiler lexer is only simple translator between PP and
grammar parser tokens so the overhead is rather small anyhow it
eliminates executing some unnecessary code.
If -sm switch is used then we need lexer to detect files included by
statements like:
DO <file> [WITH ... ]
_procReq_( <file> )
_procReq_( <file> + <ext> )
-m switch disable including such files so we can fully eliminate
lexer and preprocess PP tokens directly in a loop.
Now the cost of -sm switch is reduced to the PP cost plus some
minor static overhead.
* harbour/include/hbpp.h
* harbour/include/hbcompdf.h
* harbour/src/pp/ppcore.c
* harbour/src/compiler/hbmain.c
* harbour/src/compiler/cmdcheck.c
* harbour/src/compiler/ppcomp.c
* harbour/src/compiler/hbusage.c
* harbour/doc/man/harbour.1
+ added support for new compiler switch -sm which can be used to
generate dependencies list.
* modified HB_COMPILEBUF() function to return dependencies list
instead of .HRB file body when -sm switch is used. Files in
single module are separated by spaces and modules are separated
by TABs (chr(9))
To reduce overhead I suggest to use in programs like hbmk2
together with -sm also -kj switch - it disables some time
consuming optimizations in compiler code.
* harbour/src/rtl/hbini.prg
* Changed hb_IniString() function name to hb_IniReadStr()
+ Added hb_IniWriteStr() that returns a string from an Ini hash
hb_iniWriteStr( hIni, cCommentBegin, cCommentEnd, lAutoMain )
-> cData | NIL
! Fixed a previous error in logic in case of hIni with missing MAIN section
* harbour/include/hbextern.ch
- Removed hb_IniString() declaration
+ Added hb_IniReadStr() and hb_IniWriteStr() external declarations
* harbour/tests/parseini.prg
+ Added samples of hb_IniReadStr() and hb_IniWriteStr() functions
* harbour/src/rtl/hbini.prg
* Splitted hb_IniRdLow() internal function into two functions:
hb_IniFileLow( cFileSpec ) -> cData
hb_IniStringLow( hIni, cData, lKeyCaseSens, cSplitters, lAutoMain ) -> hIni
+ Added new hb_IniString() funtion
hb_IniString( cData, lKeyCaseSens, cSplitters, lAutoMain ) -> hIni
that reads directly from a string.
So hb_IniRead() read from a file, hb_IniString() read from memory string.
* harbour/include/hbapicdp.h
* harbour/src/rtl/cdpapi.c
* harbour/src/rtl/is.c
* moved hb_charIs*() functions to cdpapi.c file for easier updating
in the future
% optimized memory allocation for new codepages
* harbour/contrib/hbct/pos1.c
* use hb_charIs*() functions instead of accessing HB_CODEPAGE
structure members
- source
+ src
* src/Makefile
* src/dynlib/mt/Makefile
* src/dynlib/Makefile
* INSTALL
* Makefile
* ChangeLog
* harbour.spec
* mpkg_tgz.sh
* Renamed 'source' dir to 'src' to move closer to other FOSS
projects. It's also easier to type, plus it has the side
effect that some cmdlines will be shorter in the
build process.