* harbour/include/hbgtcore.h
* harbour/source/rtl/hbgtcore.c
* changed BYTE bClearColor to USHORT uiClearColor
The following modifications were made by Viktor Szakats,
(2008-11-22 16:15 UTC+0100 - 2008-12-19 12:56 UTC+0100)
Many thanks. It's the first part without CP conversions in OS calls which
I will want to check yet. Please tests MS-Windows only modifications.
* harbour/make_vc.mak
* harbour/contrib/mtpl_vc.mak
+ Added support for A_USR.
* harbour/include/set.ch
* harbour/include/hbextern.ch
* harbour/source/vm/cmdarg.c
* harbour/source/vm/set.c
* harbour/source/rtl/tgetlist.prg
* harbour/source/rtl/gete.c
* harbour/contrib/hbhpdf/harupdf.c
* formatting
* harbour/source/rtl/hbffind.c
* Changed few places to use sizeof() instead of
explicit size macro.
* harbour/source/vm/extrap.c
+ Added module listing. (also supports Win64)
* harbour/source/common/hbver.c
+ Added Intel C compiler detection. (from xhb)
+ Added Wine detection (unofficial but stable looking
detection method. There intentionally doesn't exist
an official method to do this detection, yet there
are cases when this is necessary. It's also essential
for error reports.)
See also:
http://www.mail-archive.com/wine-devel@winehq.org/msg48659.html
* harbour/source/common/hbfopen.c
! Reverted recent change to use fopen_s(). fopen_s()
will always open in exclusive mode, so it could create
incompatibilities.
* harbour/source/codepage/cpbgmik.c
! Fixed BGMIK collation encoding. Someone familiar with
BG CPs please confirm this, but previously it was
almost certainly broken, as the collation was identical
to BG866.
* harbour/source/rtl/diskspac.c
* harbour/source/rtl/disksphb.c
! GetModuleHandleA() -> GetModuleHandle()
; NOTE: GetModuleHandleA() WinCE emulation in
source/common/wince.c might be unnecessary
after this change.
* harbour/source/rtl/memoedit.prg
* harbour/source/rtl/teditor.prg
! Cleaned insert handling. It now won't anymore mess up
the cursor on instantiation (in New() method). Internal
:lInsert state replaced by Set( _SET_INSERT ). Cursor
is only touched in the editing loop.
* harbour/source/rtl/version.c
! HB_VERSION( HB_VERSION_BUILD_DATE ): Fixed month
being off by one.
* harbour/contrib/hbmzip/hbmzip.c
! Fixed typo which caused timestamps stored in .zip files
to be wrong.
* harbour/contrib/hbhpdf/tests/harupdf.prg
! Minor typo in code.
* harbour/contrib/rddads/rddads.h
+ Added detection for ACE 9.10.
* harbour/contrib/hbtip/sendmail.prg
! Stricter parameter checking in hb_SendMail().
* harbour/contrib/examples/dbu/hb_dbu.dif
+ Added SET DATE ANSI and SET CENTURY ON
* harbour/source/rtl/gtxwc/gtxwc.c
+ Generating HB_K_RESIZE keystrokes on screen resize.
This way it's working similarly to gtwvt.
! Typos in comments.
* harbour/source/rtl/gtwin/gtwin.c
! Fixed HB_GTI_KBDSHIFTS not working in console mode.
Replaced GetKeyboardState() call with GetKeyState() calls.
* harbour/source/rtl/gtwvt/gtwvt.c
+ Added 'layered' window support. It's enabled on W2K
and above (and only when not in Terminal Services
environment, because it makes it perform worse). This
way the screen is also properly displayed regardless
of what the Harbour application does. It also fixes
numerous paint artifacts, when GTWVT window was in
the background and another window is moved in front
of it.
! Fixed only generate HB_K_RESIZE keystrokes when
resize mode is HB_GTI_RESIZEMODE_ROWS.
* harbour/include/hbcomp.h
* harbour/include/hbmacro.ch
* harbour/source/compiler/ppcomp.c
* harbour/source/compiler/hbusage.c
* harbour/source/compiler/cmdcheck.c
+ added -ko (allow operator optimizations) compiler switch
It's disabled by default.
* harbour/include/hbexprb.c
* removed HB_ADD_SUB_ONE_OPT macro and enable optimizations covered
by it when -ko switch is used.
* harbour/source/common/expropt2.c
* disabled <exp> + 0 => <exp>, <exp> + "" => <exp>, - - <exp> => <exp>
optimizations for default compiler settings. They can be enabled by
-ko compiler switch
+ added optimizations for numeric values and + operator which uses
standard mathematical + behavior for real numbers:
a + b + c == a + ( b + c )
a + b == b + a
It's disabled by default and can be enabled by -ko compiler switch.
There are also other similar optimizations which can be added in
this way.
* harbour/include/hbapi.h
* harbour/source/vm/itemapi.c
* harbour/source/vm/fm.c
! fixed redundant call to hb_xrealloc() in string resize operation.
Thanks to Mindaugas for locating it.
* harbour/source/common/expropt1.c
* harbour/source/common/expropt2.c
! fixed wrongly modified expression during optimization for
( <numConst> / 0.0 )
* cleaned bDec/bWidth updating in compile time optimizations
* harbour/tests/speedtst.prg
! fixed possible race condition in initialization
+ added set workarea private for xHarbour builds - thanks to Phil
* harbour/doc/cmpopt.txt
* small cleanup
* harbour/include/hbvmpub.h
* harbour/source/vm/hvm.c
% some optimizations mostly for MT mode or compilers which do
not support function autoinline optimization
* harbour/source/common/hbstr.c
! added missing call to va_end() in hb_snprintf()
* harbour/source/vm/classes.c
+ added internal helper function __objSetClass()
* harbour/source/rtl/valtoexp.prg
* set class in expressions serialized by hb_valToExp()
* harbour/source/rtl/valtostr.c
% optimized hb_strToExp()
* harbour/contrib/xhb/hbcompat.ch
! removed unnecessary conversion for HB_ISPOINTER() in xHarbour part.
* harbour/contrib/xhb/Makefile
* harbour/contrib/xhb/common.mak
+ harbour/contrib/xhb/xhbarr.c
+ added aSplice(), aRemove() and aMerge() functions - code borrowed
from xHarbour by Ron Pinkas.
! fixed GPF trap in these functions
* harbour/contrib/xhb/xhbfunc.c
+ added CSTR()
* harbour/contrib/xhb/hbcompat.ch
! changed name of xHarbour include files - they where changed few
months ago and now they are the same as in Harbour.
To xHarbour users: please update hbcompat.ch in xHarbour CVS
* harbour/contrib/xhb/filestat.c
! fixed UNICODE compilation
* harbour/contrib/xhb/hblognet.prg
* harbour/contrib/xhb/hblog.prg
* formatting
* harbour/contrib/hbnf/tempfile.prg
! do not use HB_ISBYREF() .prg function - this function does not
exist in Harbour and does not work correctly in xHarbour
* harbour/include/hbapiitm.h
* harbour/source/vm/macro.c
* harbour/source/vm/codebloc.c
* harbour/source/vm/hashes.c
* harbour/source/vm/garbage.c
* harbour/source/vm/itemapi.c
* harbour/source/vm/memvars.c
* cleanup
* harbour/contrib/gtwvg/Makefile
! fixed typo
* harbour/contrib/gtwvg/hbgtwvg.ch
* added new line at the end of file and changed non ANSI C // comments
to /* */ - this file is included by C code too.
* harbour/contrib/gtwvg/wvgwin.c
* harbour/contrib/gtwvg/wincallb.c
* pacified some warnings and fixed possible access to uninitialized data
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyc
! fixed possible double freeing of memory blocks in #line directives
TOMERGE[1.0]
* harbour/common.mak
* harbour/source/compiler/hbmain.c
+ harbour/source/compiler/compi18n.c
* moved hb_compI18n*() functions to separate file covered by GPL with
Harbour exception - Thank to Mindaugas
* harbour/include/hbcomp.h
* harbour/include/hbcompdf.h
* harbour/include/hbexpra.c
* harbour/include/hbexprop.h
* harbour/include/hbexprb.c
* harbour/source/common/expropt1.c
* harbour/source/compiler/Makefile
* harbour/source/compiler/ppcomp.c
* added support for plural forms:
hb_i18n_ngettext[_noop|_strict]( <nExp>, <cText> | <acText> ;
[, <cContext> )
<acText> is accepted only as array of literal strings even if
_strict suffix is missing - if it's a problem then we can change it.
hb_i18n_ngettext_noop() is reduced only when it has valid parameters
The default plural index expression used for reduction at compile
time is: iif( <nExp> == 1, 1, 2 )
If second parameter of hb_i18n_ngettext_noop() is <cText> or <acText>
length is 1 then it's reduced to <cText> or acText[1] else if second
parameter is <acText> with more then 1 item then it's reduced to
<acText>[ iif( <nExp> == 1, 1, 2 ) ]
and if <nExp> is literal numeric expression is farther reduced to
given array item. Otherwise is not reduced and warning is generated.
The plural forms in .pot files are generated as:
msgid ""
msgid_plural ""
msgid_plural2 ""
[...]
msgid_pluralN ""
msgstr[0] ""
Then real message ID is only msgid (with context if any) and
msgid_plural* is used only for information. When the same msgid
is used more then once in different hb_i18n_ngettext*() calls then
plural messages are merged.
Please remember that for strict gettext compatibility only two plural
forms are allowed.
* extended i18n warnings for simple types validation, f.e.:
hb_i18n_gettext( .t. )
* do not generate empty .pot file when source code does not contain any
hb_i18n_*() functions
* store in .pot files references to real source file names with paths
respecting #include directives
* use hb_compIdentifierNew() to hash i18n messages at compile time
! fixed possible bad escape encoding of i18n strings
+ added support to control -j[01] flag using #pragma directive
Before I'll begin to work on runtime support please test these
modifications and inform me about problems you can see with the
above version and missing functionality.
* source/rtl/gtwvt/gtwvt.c
! Fix to previous fix to maximize the window when the initial
size would be too big to fit on screen (stupid omission).
Now the previously cited sizing problem is alright.
* source/vm/fm.c
+ Replaced HB_NO_FM_STAT and HB_FM_STAT envvars
with HB_FM_STAT=yes|no (maybe 0|1 or on|off woud be
better or could be accepted as alternatives or
replacement). This is to avoid ambiguity when both
envvars were set or the app default is not known.
+ Added HB_FM_STATISTICS_DYN_OFF to turn off mem tracking
by default when stat module is linked in.
* source/common/hbverdsp.c
* Minor cosmetic.
* make_vc.mak
+ TOFIX added for the case when HB_CC_NAME is overridden
by user and MT/DLL targets are being created.
* common.mak
* source/common/hbver.c
% Minor opts.
* source/common/hbverdsp.c
* Streamlined the /build information screen. It's now
more compact and now show if tracing is enabled. Max
symbol length got removed, ANSI C startup also, because
it needs a custom C flag anyway.
* include/hbvmpub.h
* include/hbsetup.h
* HB_SYMBOL_NAME_LEN moved away from custom setup.
This isn't an option users should normally tinker.
* tests/run_prg.bat
* Minor.
* harbour/include/hbapi.h
* harbour/source/common/hbstr.c
+ added hb_numToStr()
* harbour/source/vm/estack.c
* harbour/source/compiler/genc.c
* harbour/source/compiler/gencc.c
* use hb_numToStr() for integer number conversions
* harbour/source/vm/dlmalloc.c
* disable #pragma warning ... in MinGW builds. If some newer MinGW
versions support it and it's useful then it can be enabled after
checking MinGW version
* make_b32.mak
* make_vc.mak
! Added hbpp.lib and hbcommon.lib to HBRUN_DLL liblist.
* include/hbapi.h
* source/vm/cmdarg.c
* source/common/hbver.c
* source/common/hbverdsp.c
* source/rtl/console.c
* source/rtl/setcolor.c
* source/rtl/setcurs.c
+ Added HB_EXPORT to some functions to make it possible
to build hbrun-dll.exe.
For other reasons, it only works if Harbour built with
set C_USR=-DHB_DYNLIB.
; TODO: Make HB_DYNLIB the default build mode, do gradual
steps to remove separate DLL building pass, and
finally to remove HB_BUILD_DLL option.
The only drawback will be about 10-100K
(currently) overhead in final executable size due
to included export table for BCC and MSVC builds.
* bin/hbmk.bat
+ Added support for 'owatcom' as HB_COMPILER.
; NOTE: If there are no objections I'll remove Harbour
support for 'watcom' HB_COMPILER, which was
used for old non-opensource version of this
compiler, but I guess it doesn't make too much
sense having them anymore.
* source/common/hbverdsp.c
* Minor change in /build output.
* include/hbver.ch
* source/rtl/version.c
* Changed ordering of parameter constants to make more sense.
* bin/hbmk.bat
* config/w32/owatcom.cf
* Removed 'debug all' linker option to make executable sizes
significantly smaller by default. If you need debug info,
use 'L_USR=debug all'.
; NOTE: I'd suggest doing the same for other platform supported
by owatcom. If there are no objections I can do this.
* source/rtl/gtwvt/gtwvt.c
* Typo, minor formatting.
* common.mak
* source/vm/Makefile
* source/vm/vmmt/Makefile
* source/common/Makefile
* source/rtl/Makefile
- source/vm/fmhb.c
+ source/rtl/fmhb.c
- source/vm/hbmem.c
+ source/common/hbmem.c
* Moved hbfm (MEMORY() .prg function) from VM to RTL.
* Moved hbmem (hb_xmem*() C functions) from VM to COMMON.
- contrib/hbziparc/hbzipcpp.old
- Removed.
* ChangeLog
+ Clarification to previous entry.
* source/common/hbgete.c
* source/common/hbfsapi.c
! Blind fix for OS/2 compiler warnings. David, please test.
* source/rtl/philes.c
* Minor (0 -> '\0').
* source/compiler/hbusage.c
! Fixed old typo in help text.
; BTW: What is missing for gettext support?
* make_vc.mak
* contrib/mtpl_vc.mak
- Removed no longer necessary '-D_CRT_SECURE_NO_DEPRECATE'
for MSVS 2005 and upper.
* include/hbsetup.h
* Mapping snprintf() calls to hb_snprintf().
; TODO: Replace the calls in source code.
* source/common/hbstr.c
! Fixed hb_snprintf(). Please verify on your platforms.
; TODO: It may need further tweaking to smooth out the
platform implementation differences.
* source/common/hbstr.c
* Some tweaks to hb_snprintf(). It still doesn't work
for some reason.
* include/hbapi.h
+ Added hb_snprintf() to header.
* source/debug/dbgentry.c
* Changed strcpy() to hb_strncpy(). Chances are high
this is wrong. Please review and test.
* source/common/hbver.c
* Changed to include bitness even for DJGPP.
* Changed "(* bit)" to "(*-bit)"
; NOTE: We have __ARCH*BIT__ but this macro is misleading
and cannot be used properly on platforms where the
compiler is able to generate multiple targets in
one build pass. Such system is Darwin/OSX.
I'd suggest to consider removing this macro, and
rather adding a function to return bitness.
Any opininons?
* source/common/hbfopen.c
* Changed hb_fopen() to use fopen_s(), secure version of
fopen() for MSVS 2005 and upper.
* source/common/hbstr.c
+ Added hb_snprintf() Harbour wrapper for snprintf() which
terminates the buffer with a '\0' char for CRTLs that
need this (like MSVC).
MSVC _snprintf() doesn't do so.
* hb_snprintf() used _snprintf_s(), secure version of
_snprintf() for MSVS 2005 and upper.
; TOFIX: There is still one strcpy() marked as non-secure
in debug lib. Could someone please take a look
at it and replace it with hb_strncpy() or something
else secure? The code is cryptic and as someone
not using the debugger, I didn't dare to touch it,
and this is the only one such call left.
; TODO: Change all snprintf() calls to hb_snprintf().
When that happens, Harbour will no more use anything
depicted as "non-secure" by MSVS 2005/2008.
; NOTE: This function may need tweaking, pls review and
fix if/where needed.
* source/vm/dlmalloc.c
! Fixed MSVC C++ mode compile error. This fix also exists
as part of the next dlmalloc version (2.8.4b).
2008-10-26 07:27 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* contrib/hbdbgfx/dbgfx.prg
* Minor cleanup.
* contrib/hbdbgfx/dbgfxc.c
! Fixed GPF when non-string parameter passed to
hb_outdebug().
* harbour/bin/hbmk.bat
* simple modification to make beginning hbmk parameters (-mt and -gui)
position independent though they still have to be used before Harbour/
C compiler switches and filenames
* harbour/source/common/hbdate.c
* harbour/source/compiler/cmdcheck.c
* harbour/source/rtl/filesys.c
* harbour/source/rtl/hbffind.c
! use MT safe localtime_r() function if it's available instead of
localtime()
TODO: clean the usage of this function and gmttime[_r]() probably
by adding our own wrappers.
* harbour/source/rtl/hbffind.c
! disabled calls to tzset() - this function should be executed
automatically by CRTL only if it's necessary. It's also not MT
safe and can cause MT applications crash.
* source/common/hbgete.c
! Fixed recent warning on Win32 platforms.
* contrib/xhb/hbcrypt.c
* Changed to just work instead of RTE-in if any
of the params are empty on non-strings. If
non-string is passed, it's considered as
empty string.
* harbour/source/common/hbgete.c
* modified hb_getenv_buffer() to return logical value indicating
that environment variable exists even if no buffer is passed
* include/hbapi.h
* source/common/hbgete.c
+ Added hb_getenv_buffer(). Similar to hb_getenv() but
this one needs a buffer+size to be passed, so no memory
allocation is done by the function. It also return
a BOOL to signal success. It doesn't signal if passed
buffer was too small to store the value.
* harbour/source/common/expropt2.c
* formatting and minor cleanup
* harbour/source/rtl/gtapi.c
% do not set and restore default color set in hb_gtPutText() and
hb_gtDrawBox() but decode colors from passed string
* include/hbapifs.h
* include/hbextern.ch
* source/common/hbfsapi.c
* source/rtl/hbfile.c
+ Added hb_fsNameExists() C level function.
+ Added hb_FNameExists() Harbour level function.
; Both will return true if any kind of directory entry
exists with the given name (IOW it doesn't matter
if it's a file or directory, or else).
* harbour/bin/hb-func.sh
* use HB_IMPORT instead of hardcoded attributes in hb* scripts
* harbour/source/common/hbver.c
* generate different info for POCC and XCC compilers
* harbour/source/rdd/dbfcdx/dbfcdx1.c
* reduce header validation to not report clipper indexes as corrupted
* harbour/source/vm/codebloc.c
* updated old and not longer valid comment
* harbour/source/vm/memvars.c
* minor code formatting
* harbour/source/common/expropt2.c
! fixed bug in power math expression optimization caused
by two lines left in the code by mistake. Many thanks to
Maurilio for locating the problem.
* harbour/include/hbstack.h
* harbour/source/vm/estack.c
* harbour/source/vm/hvm.c
% added support for buffering hb_stack TLS access be preloading
the stack pointer into C stack function local variables.
Please make speed tests for MT mode with different C compilers
and different platforms.
* harbour/include/hbvm.h
* harbour/source/vm/hvm.c
* harbour/source/vm/thread.c
+ added .prg function hb_threadSelf() -> <pThID> | NIL
It returns thread ID pointer variable or NIL when thread was
registered without it (main thread and some 3-rd party threads
created by C API)
* harbour/source/vm/hvm.c
* protect s_InitFunctions and s_ExitFunctions by mutex
* harbour/source/common/hbverdsp.c
* use hb_verBuildDate() instead of __DATE__ and __TIME__ in
hb_verBuildInfo() function to report the same time in both
cases.
* harbour/make_rpm.sh
* use rpm to test if curl-devel package is installed
* harbour/include/hbapi.h
* harbour/source/common/hbstr.c
+ added hb_strduptrim() and hb_strlentrim()
* harbour/source/rdd/dbfcdx/dbfcdx1.c
! control total length of KEY and FOR expression together
to be compatible with other CDX drivers.
Total length of both expressions cannot exceed 512 bytes
(with two trailing ASCII 0 characters)