* 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/include/hbstack.h
* harbour/include/hbapi.h
* harbour/include/hbapiitm.h
* harbour/source/vm/hashes.c
* small modifications in order of some structure members for better
alignment
* harbour/source/vm/hvm.c
* pacified BCC warnings
* harbour/contrib/rddsql/Makefile
* harbour/contrib/rddsql/sddpg/Makefile
+ harbour/contrib/rddsql/sddfb/Makefile
* updated GNU make files for new SQL RDDs - many thanks to
Mindaugas
* include/hbextern.ch
* source/rtl/seconds.c
+ implemented hb_milliseconds(). This function returns time value
from some moment in the past (not midnigth!). It does not start
to cound from zero in midnight, thus, can be safetly used to
measure time intervals.
+ tests/ticktime.c
+ Added nice test for hb_milliseconds().
Results on WinXP:
Ticks per second: 63.595
Min/avg/max interval (ms): 15.000 / 15.724 / 47.000
Loops per tick: 13035.09
Results on openSUSE on VirtualBox on WinXP:
Ticks per second: 384306.138
Min/avg/max interval (ms): 0.001 / 0.003 / 11.112
Loops per tick: 1.04
+ harbour/include/hbrddnsx.h
+ harbour/source/rdd/dbfnsx
+ harbour/source/rdd/dbfnsx/dbfnsx1.c
+ harbour/source/rdd/dbfnsx/Makefile
* harbour/config/global.cf
* harbour/make_b32.mak
* harbour/make_vc.mak
* harbour/make_gcc.mak
* harbour/common.mak
+ added new DBFNSX RDD. Those of you who knows SIX3 should also
know NSX index format. It's very interesting format and in some
cases much better then CDX. I hope you will find it interesting.
In hbrddnsx.h you can find detail information about Harbour NSX
implementation.
It's a small gift from me for Christmas ;-)
I would like to wish all of you Marry Christmas and Happy new Year.
best regards,
Przemek
* include/hberrors.h
* source/compiler/hbgenerr.c
* source/compiler/hbopt.c
+ implemented warning: Variable '%s' is never assigned in function %s(%d).
This variable can be replaced by value NIL
* source/rtl/treport.prg
% removed never assigned variable
* 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/include/hbsetup.h
* temporary disabled noreturn function attributes - we have some
code which puts references to some functions after hb_errInternal()
call to force link bindings which is fully optimized if hb_errInternal
is declared with noreturn attribute so we cannot use it as long as we
will not clean them.
* harbour/tests/speedtst.prg
* build default xHarbour binaries without support.
xHarbour needs separated version for MT and ST mode
because standard MT functions are not available in
ST libraries.
* harbour/ChangeLog
! cleaned some typos in my recent ChangeLog entries
* harbour/include/hbvm.h
* harbour/include/hbvmpub.h
* harbour/include/hbsetup.h
* harbour/include/hbapi.h
* harbour/include/hbapierr.h
* added some function attributes which can improve code optimization
or introduce some additional warnings.
Now it works only in GCC builds.
* harbour/source/vm/hvm.c
! fixed missing double decimal places initialization in some number
negating
! fixed setting number of decimal places in plus and minus operations
if integer overflow forces conversion to double item
* some minor optimizations
* harbour/source/rtl/rat.c
* formatting
* harbour/contrib/hbmysql/tmysql.prg
* harbour/contrib/hbpgsql/pgrdd.prg
* harbour/contrib/hbpgsql/tpostgre.prg
! fixed unused variables and meaningless assignment detected by new
compiler extension - many thanks to Mindaugas for it.
* harbour/include/hbsetup.h
+ added macros for some function attributes which can be used in
the future for optimizations
* harbour/source/rtl/filesys.c
* formatting
* harbour/source/rtl/hbtoken.c
* changed the behavior of " " token delimiter - now it works as
any other tokens. The old behavior can be still reach using empty
string "" as token delimiter. "" is not default token.
* harbour/utils/hbtest/hbtest.prg
* change error object to text conversion in hbtest so now it detects also
differences which were ignored by previous version, f.e. OPERATION
wrongly used instead of FILENAME or wrongly set TRIES flag.
* harbour/utils/hbtest/hbtest.prg
* harbour/utils/hbtest/rt_trans.prg
* harbour/utils/hbtest/rt_math.prg
* harbour/utils/hbtest/rt_hvm.prg
* harbour/utils/hbtest/rt_misc.prg
* harbour/utils/hbtest/rt_hvma.prg
* harbour/utils/hbtest/rt_class.prg
* harbour/utils/hbtest/rt_str.prg
* harbour/utils/hbtest/rt_stra.prg
* harbour/utils/hbtest/rt_date.prg
* harbour/utils/hbtest/rt_array.prg
* updated for extended error messages, tested with Harbour, Cl52/53
* harbour/include/hbapierr.h
* harbour/source/rtl/errorapi.c
+ added hb_errRT_FileError() used in file errors
! fixed TRIES counter updating when RETRY flag is set - it should
be done before calling error block not after - detected by new
hbtest error messages
; TOFIX: in practice all errors with RETRY flag generated by
other hb_errRT_*() functions have to be fixed because
new error object is created each time and informations
from previous one are lost, f.e. TRIES counter or CARGO
value set by user. They should be reimplemented in similar
way to hb_errRT_FileError()
* harbour/source/vm/memvars.c
* harbour/source/rtl/copyfile.c
* harbour/source/vm/set.c
! fixed wrong error messages detected by new hbtest in _SET_PRINTFILE,
_SET_ALTFILE and _SET_EXTRAFILE
; TOCHECK - Does CA-Cl*pper respect _SET_DEFAULT in above SETs?
* source/compiler/hbopt.c
! one more try to fix passing informatino about redundant variable
assignment by preprocessor rules, i.e., _nowarn_* hack removed,
using HB_SYMBOL_UNUSED() technique
* include/hbclass.ch
* include/std.ch
! fixed redundant nScope and GetList assignment
* contrib/rddado/adordd.prg
* contrib/xhb/cstruct.prg
* contrib/xhb/hblog.prg
* contrib/xhb/sprintf.prg
! fixed assigned but not used variable
* include/hbcomp.h
* source/compiler/hbmain.c
* source/compiler/hbopt.c
! fixed warnings of last commit
* contrib/hbpgsql/tpostgre.prg
! fixed assigned but not used variable
* include/hbclass.ch
* include/hbcomp.ch
* include/hberrors.h
* include/hbgenerr.c
* include/hbmain.c
* include/hbopt.c
+ PCode optimizations:
1) Self := QSELF(), Self:method -> QSELF():method
2) Declared, but unused variables are removed from code
These optimizations are enabled if jump optimizations are enabled.
+ added recursive pcode tree tracer. It is capable to generate new
warning: Variable %s is assigned, but not used.
Warning is not generated in these cases:
1) unoptimal Self := QSELF() pcode [generated by preprocessor rules]
2) if variable name starts with '_nowarn_'. This allows to
suppress warning in case unoptimal pcode is generated by
preprocessor rules
3) assigned value is NIL. This let us force garbage collection
using oVar := NIL
Warning has warning level 3.
; NOTE: if you are using -w3 -es2 in makefiles, you'll need to fix your
redundant code to compile the project
* source/rtl/achoice.prg
* source/rtl/browse.prg
* source/rtl/tbrowse.prg
* source/rtl/teditor.prg
* source/rtl/tget.prg
* source/rtl/tgetlist.prg
* source/rtl/tlabel.prg
* source/rtl/tmenusys.prg
* source/rtl/tpersist.prg
* source/rtl/treport.prg
* source/debug/dbgtmenu.prg
* source/debug/debugger.prg
* source/debug/dbgtobj.prg
* fixed 'assigned but not used' warnings
* utils/hbdoc/hbdoc.prg
* utils/hbdoc/genasc.prg
* utils/hbdoc/genhpc.prg
* utils/hbdoc/genhtm.prg
* utils/hbdoc/genchm.prg
* utils/hbdoc/genng.prg
* utils/hbdoc/genos2.prg
* utils/hbdoc/genrtf.prg
* utils/hbdoc/gentrf.prg
* utils/hbdoc/ft_funcs.prg
* utils/hbmake/hbmake.prg
* #pragma -w2
; NOTE: I've been fixing warnings in utils/hbdoc/* for 2 hours,
but only fixed half of files. There are a lot of garbage code here.
I do not thing this code is working...
I used fallback method: restored original files and used -w2
; NOTE: hbmake.prg has about 140 unused assignments.
I've also fallback to -w2, because some of unused code is complex,
ex., ASCAN() with block parameters. I'm not using hbmake, and I'm
affraid to break something important.
* compiler/hbpcode.c
- removed Ron's copyright on hb_compStrongType(). We do not have this
functions in the compiler at all. I guess this text is just a result
of .c header copy-paste from xHarbour's hbstrong.c some time ago.
* harbour/include/hbapicls.h
* harbour/source/vm/codebloc.c
* harbour/source/vm/proc.c
* harbour/source/vm/classes.c
+ added support for messages in PROCFILE()
* modified PROCFILE() and HB_METHODNAME() output - PROCFILE()
should be fully Clipper compatible and HB_METHODNAME() works
in a little bit different way for evaluated codeblocks created
in methods or associated with method and returns (b)<class>:<msg>
instead of (b)<method> so the output is more similar to xHarbour.
* harbour/contrib/gtwvg/gtwvg.h
! disabled NONAMELESSUNION - wvgwin.c uses TVINSERTSTRUCT item
member without union name what breaks MINGW compilation
* added hardcoded TVIS_EXPANDPARTIAL when it does not exist
in header files - MINGW 3.4 does not have it.
* harbour/include/hbthread.h
* harbour/source/vm/thread.c
+ added hb_atomic_set(), hb_atomic_get(), hb_atomic_inc() and
hb_atomic_dec() functions which operates on HB_COUNTER or smaller
type if it's necessary for some platforms which can be access/assign
increment/decrement in MT safe atom operations.
hb_atomic_dec() returns true if counter is 0 after decrementation
* harbour/include/hbatomic.h
! fixed compilation in Linux and OpenWatcom
* harbour/include/hbapiitm.h
* harbour/source/rtl/itemseri.c
+ make hb_itemSerialize() and hb_itemDeserialize() public functions
! fixed serialization items with internal item references
* harbour/source/vm/hvm.c
* release memvars after closing RDDs
* harbour/source/debug/dbgentry.c
! fixed buffer overflow reported by Rodrigo
* harbour/source/vm/macro.c
* harbour/source/compiler/hbmain.c
* formatting
* harbour/include/hbexprb.c
! fixed wrongly recognized functions with HB_I18N_ prefix as
HB_I18N_GETTEXT()
* harbour/include/hbapi.h
* harbour/include/hbstack.h
* harbour/include/hbthread.h
* harbour/source/vm/estack.c
* harbour/source/vm/thread.c
* harbour/source/vm/hvm.c
+ added support for I18N in HVM.
Each thread can have it's own i18n set.
When new thread is created then it inherits i18n set from parent
thread and both uses the same set (please remember about it if you
will want to make some direct modifications on active i18n set
internals).
When thread change active i18n set then it effects only this thread
and new threads which will be create later. It does not change i18n
in other existing threads.
+ added functions to set/get pointer to active i18n set in HVM
void * hb_vmI18N( void )
void hb_vmSetI18N( void * )
* harbour/include/hbapi.h
* harbour/source/rtl/hbi18n.c
+ added i18n module. Now only for internal Harbour usage without support
for optional switching to alternative implementations.
I'll add such functionality later when I will work on native gettext
support.
The following public .prg functions has been added:
HB_I18N_GETTEXT[_STRICT]( <cMsgID> [, <cContext> ] )
-> <cTranslatedMsgID> | <cMsgID>
HB_I18N_NGETTEXT[_STRICT]( <nValue>, <cMsgID> | <acMsgID> ;
[, <cContext> ] )
-> <cTranslatedMsgID> | <cMsgID> | <acMsgID>[ <nIndex> ]
This is minimal support necessary for .prg code which has to exists
in each i18n module working with Harbour.
The following functions had been added as public C API:
PHB_ITEM hb_i18n_gettext( PHB_ITEM pMsgID, PHB_ITEM pContext )
PHB_ITEM hb_i18n_ngettext( PHB_ITEM pNum,
PHB_ITEM pMsgID, PHB_ITEM pContext )
The following functions had been added as private HVM C API:
void hb_i18n_init( void )
void hb_i18n_exit( void )
void hb_i18n_release( void * cargo )
void * hb_i18n_alloc( void * cargo )
They have to be supported by alternative i18n modules
The following functions has been added to manage Harbour i18n
translations sets:
HB_I18N_CREATE()
-> <pI18N>
Creates new empty I18N translation set
HB_I18N_CODEPAGE( [<pI18N>,] [<cNewCP>], [<lBase>], [<lTranslate>] )
-> <cOldCP>
Gets or sets Harbour codepage used by translation set
<pI18N> - I18N translation set,
if it's not given then currently active I18N set is used
<cNewCP> - new CP ID. Must be linked with application
<lBase> - when it's .T. then get/set base massages CP instead of
translated massages CP
<lTranslate> - if it's .T. then translate base (<lBase>==.T.) or
final messages in I18N set from previous CP to
given one. Base messages translation in synced
with context ID translation.
HB_I18N_PLURALFORM( [<pI18N>,] [<cNewForm>|<bNewForm>], [<lBase>] )
-> <cOldForm>|<bOldForm>
Gets or sets plural form used for final or base messages
<pI18N> - I18N translation set,
if it's not given then currently active I18N set is used
<cNewForm> - language ID of plural form, f.e.: "EN", "PL", "LT".
Now only three above are supported. Please add rules
for other languages to source/rtl/hbi18n.c.
<bNewForm> - codeblock used to calculate plural form indexes.
can be used instead of character representation but
it's not storred in serialized I18N set
<lBase> - when it's .T. then get/set base massages plural form
instead of translated massages one.
HB_I18N_DESCRIPTION( [<pI18N>,] [<cNewDescription>] )
-> <cOldDescription>
Gets or sets translation set description. After serialization
up to 32 bytes is stored in header which can be easy used to
determinate type of translation file.
<pI18N> - I18N translation set,
if it's not given then currently active I18N set is used
<cNewDescription> - new description
HB_I18N_ADDTEXT( <pI18N>, <cMsgID>, <cTrans> | <acTrans> [, <cContext> ] )
-> NIL
Adds new message with translation to i18n translation set
<pI18N> - I18N translation set
<cMsgID> - original message
<cTrans> - translated message
<acTrans> - array with translated messages used for plural forms
<cContext> - message context
HB_I18N_SET( [ <pI18N> | NIL ] )
-> <lActive>
Sets given I18N translation set as default one used by
HB_I18N_[N]GETTEXT[_STRICT]() functions or remove translation
set for calling thread when passed parameter is NIL
<pI18N> - I18N translation set
Returns logical value which is .T. when i18n set is active
HB_I18N_SAVETABLE( [<pI18N>] )
-> <cTable>
Returns I18N translation as string item which can be stored
in file or database
<pI18N> - I18N translation set, if it's not given then currently
active I18N set is used
HB_I18N_RESTORETABLE( <cTable> )
-> <pI18N> | NIL
Restores I18N translation set from strin item.
<cTable> - I18N translation set in string representation
On success it returns new <pI18N> set otherwise NIL if <cTable>
is not valid item created by HB_I18N_SAVETABLE() or it's corrupted.
HB_I18N_HEADERSIZE()
-> <nHeaderSize>
Returns size of header used by i18n serialized version
HB_I18N_CHEK( <cTable> | <cHeader> [, @<cDescription> ] )
-> <lValid>
<cTable> - i18n translation set serialized by HB_I18N_SAVETABLE
<cHeader> - header of i18n translation set
( LEFT( <cTable>, HB_I18N_HEADERSIZE() )
<cDescription> - optional parameter passed by reference where
will be sored i18n translation set description
extracted from valid header
Returns logical value indicating if given table or header is
valid serialized by HB_I18N_SAVETABLE() data. It does not
decode the table though it validates size and control sums.
These functions are optional and some future alternative implementations
may not support all of them and/or may provide some other functions.
+ added unofficial .prg function __I18N_HASHTABLE() which allows to
access hash table used by i18n translation set or create new translation
set with given hash table. It's helper functions for developers which
will work on Harbour i18n tools and should not be used by Harbour users.
Unlike original gettext Harbour allows to use language with many
plural forms as base one. In such case programmer should activate
at application startup default i18n translation set with base plural
form valid for base application language, f.e. by:
pI18N := hb_i18n_create()
hb_i18n_pluralForm( pI18N, <cLangID> | <bForm>, .t. )
hb_i18n_set( pI18N )
.prg code example:
#xtranslate _( <x,...> ) => hb_i18n_gettext_strict( <x> )
#xtranslate _N( <x,...> ) => hb_i18n_ngettext_strict( <x> )
proc main()
local pI18N, i
pI18N := hb_i18n_create()
hb_i18n_pluralForm( pI18N, "PL", .t. )
hb_i18n_set( pI18N )
for i := 0 to 30
? i, _N( i, {"grosz", "grosze", "groszy"} )
if i > 0 .and. i % 10 == 0
wait
endif
next
return
In .pot files created during compilation by Harbour with -j option
for above code we have the following entries for message with plural
forms:
msgid "grosz"
msgid_plural "grosze"
msgid_plural2 "groszy"
msgstr[0] ""
The msgid_plural2 (and others if language has more plural forms)
is Harbour extension which is not gettext compatible.
The above implementation is base version but should be fully functional.
Now we will need functions to safe/read i18n files and tools to mange
.pot files: merge them, edit translations, create final binary i18n
translation sets. Because we are using gettext compatible .pot files
then for some of such jobs we can use original gettext tools but we
need at least function which will create translation set from one or
more .pot files.
We should also agree some default localization(s) for files containing
translated data, their name convention and environment variable(s)
to set default language. It's not strictly necessary and each user
can have his own implementation but it would help in adding new
translations by final users to any Harbour application which will
respect them. We can use LANG envvar to extract preferred language
and use the same path as executed application looking for files
<appname>-<lang>.hil files though it may create some problems for
OSes which support only 8.3 file names so we can also define that
HB_I18N envvar has higher priority and points to expected translation
file.
* harbour/include/hbextern.ch
- removed old __i18n_*() functions
+ added current i18n functions
* 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.
* include/hbapi.h
* source/vm/extend.c
+ Added hb_stordl() which is similar to hb_stords() but
accepts a Julian date in long numeric format similarly
to hb_retdl().
* contrib/xhb/Makefile
* contrib/xhb/common.mak
+ contrib/xhb/filestat.c
+ Added FILESTATS() function.
Work of Giancarlo Niccolai / xhb.
Minor cleanups made.
; Please test. (Only Win32/BCC platform was tested.)
* harbour/include/hbatomic.h
+ added support for built in GCC atomic functions: __sync_*()
They are present in GCC >= 4.1 if given CPU supports them. For
x86 CPU family the ones we use need at least i486 CPU. Please make
tests with other CPUs like PPC. If given platform/CPU does not support
them then GCC generate call to function __sync_*_<N>() where <N>
is size of given type used in atomic operation instead of storing
inlined assembler code.
* 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/hbcompdf.h
* harbour/source/compiler/harbour.yyc
* harbour/source/compiler/harbour.y
! fixed compile time warnings for __enum* messages used in
simpled code block variables inside FOR EACH statement,
* 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
* include/hbmath.h
! Fixed Pelles C 5.00 not having an 'inf' (HUGE_VAL) symbol
when in -Tarm-coff (~WinCE) mode. Pelles C bug (?).
; NOTE: Now core fully compiles in WinCE mode. So we have
a new port.
; TOFIX: (this is a complete list of all Pelles C WinCE problems)
[except hbmysql errors]
--- WARNINGS
POLINK: warning: Multiple '.rdata' sections found with different flags (0x40000040 and 0xc0000040).
POLINK: warning: Multiple '.rdata' sections found with different flags (0x40000040 and 0xc0000040).
../../ctnet.c(119): warning #2027: Missing prototype for 'WNetGetLastError'.
../../ctnet.c(167): warning #2027: Missing prototype for 'WNetCancelConnection'.
../../ctnet.c(208): warning #2027: Missing prototype for 'WNetAddConnection'.
../../ctnet.c(210): warning #2027: Missing prototype for 'WNetAddConnection'.
../../ctnet.c(251): warning #2027: Missing prototype for 'WNetGetProviderName'.
../../ctnet.c(271): warning #2027: Missing prototype for 'WNetGetProviderName'.
../../disk.c(127): warning #2027: Missing prototype for 'GetDriveType'.
../../disk.c(244): warning #2027: Missing prototype for 'SetVolumeLabel'.
../../disk.c(270): warning #2027: Missing prototype for 'GetVolumeInformation'.
../../disk.c(307): warning #2027: Missing prototype for 'GetVolumeInformation'.
../../disk.c(337): warning #2027: Missing prototype for 'GetFullPathName'.
../../winapi.c(194): warning #2027: Missing prototype for 'InsertMenuItem'.
../../winapi.c(219): warning #2027: Missing prototype for 'SetMenu'.
../../getenvrn.c(177): warning #2027: Missing prototype for 'GetEnvironmentStrings'.
../../getenvrn.c(246): warning #2027: Missing prototype for 'FreeEnvironmentStrings'.
contrib\hbsqlit3\sqlite3\sqlite3.c(9936): warning #2027: Missing prototype for 'localtime'.
../../tpwin32.c(75): warning #2027: Missing prototype for 'BuildCommDCB'.
../../wincorec.c(164): warning #2027: Missing prototype for 'CreateMDIWindow'.
../../fi_winfu.c(97): warning #2027: Missing prototype for 'CreateDIBitmap'.
../../fi_winfu.c(147): warning #2027: Missing prototype for 'GetDIBits'.
../../sqlbase.c(509): warning #2130: Result of unsigned comparison is constant.
--- ERRORS
contrib\gtwvg\gtwvg.h(78): fatal error #1035: Can't find include file <olectl.h>.
../../ctnet.c(119): warning #2027: Missing prototype for 'WNetGetLastError'.
../../disk.c(129): error #2048: Undeclared identifier 'DRIVE_RAMDISK'.
../../disk.c(129): error #2045: Case label must be a constant integer expression.
../../disk.c(132): error #2048: Undeclared identifier 'DRIVE_REMOVABLE'.
../../disk.c(132): error #2045: Case label must be a constant integer expression.
../../disk.c(135): error #2048: Undeclared identifier 'DRIVE_FIXED'.
../../disk.c(135): error #2045: Case label must be a constant integer expression.
../../disk.c(138): error #2048: Undeclared identifier 'DRIVE_CDROM'.
../../disk.c(138): error #2045: Case label must be a constant integer expression.
../../disk.c(141): error #2048: Undeclared identifier 'DRIVE_REMOTE'.
../../disk.c(141): error #2045: Case label must be a constant integer expression.
../../winapi.c(70): error #2048: Undeclared identifier 'CS_OWNDC'.
../../winapi.c(75): error #2048: Undeclared identifier 'IDI_APPLICATION'.
../../winapi.c(75): error #2140: Type error in argument 2 to 'LoadIconW'; found 'int', expected 'const wchar_t *'.
../../winapi.c(181): error #2048: Undeclared identifier 'MFS_DISABLED'.
../../getenvrn.c(177): error #2168: Operands of = have incompatible types 'wchar_t *' and 'int'.
../../odbc.c(94): fatal error #1035: Can't find include file <sql.h>.
contrib\hbsqlit3\sqlite3\sqlite3.c(9936): error #2168: Operands of = have incompatible types '(incomplete) struct tm *' and 'int'.
contrib\hbsqlit3\sqlite3\sqlite3.c(9937): error #2152: Unknown field 'tm_year' of '(incomplete) struct tm'.
contrib\hbsqlit3\sqlite3\sqlite3.c(9938): error #2152: Unknown field 'tm_mon' of '(incomplete) struct tm'.
contrib\hbsqlit3\sqlite3\sqlite3.c(9939): error #2152: Unknown field 'tm_mday' of '(incomplete) struct tm'.
contrib\hbsqlit3\sqlite3\sqlite3.c(9940): error #2152: Unknown field 'tm_hour' of '(incomplete) struct tm'.
contrib\hbsqlit3\sqlite3\sqlite3.c(9941): error #2152: Unknown field 'tm_min' of '(incomplete) struct tm'.
contrib\hbsqlit3\sqlite3\sqlite3.c(9942): error #2152: Unknown field 'tm_sec' of '(incomplete) struct tm'.
contrib\hbsqlit3\sqlite3\sqlite3.c(22136): error #2120: Redeclaration of 'localtime' previously declared at contrib\hbsqlit3\sqlite3\sqlite3.c(9936): found '(incomplete) struct tm * __cdecl function(const unsigned long int *)', expected 'int __cdecl function()'.
contrib\hbsqlit3\sqlite3\sqlite3.c(22137): error #2149: Undefined size for 'y' with type '(incomplete) struct tm'.
contrib\hbsqlit3\sqlite3\sqlite3.c(22137): error #2149: Undefined size for 'y' with type '(incomplete) struct tm'.
contrib\hbsqlit3\sqlite3\sqlite3.c(22147): error #2152: Unknown field 'tm_year' of '(incomplete) struct tm'.
contrib\hbsqlit3\sqlite3\sqlite3.c(22148): error #2152: Unknown field 'tm_mon' of '(incomplete) struct tm'.
contrib\hbsqlit3\sqlite3\sqlite3.c(22149): error #2152: Unknown field 'tm_wday' of '(incomplete) struct tm'.
contrib\hbsqlit3\sqlite3\sqlite3.c(22150): error #2152: Unknown field 'tm_mday' of '(incomplete) struct tm'.
contrib\hbsqlit3\sqlite3\sqlite3.c(22151): error #2152: Unknown field 'tm_hour' of '(incomplete) struct tm'.
contrib\hbsqlit3\sqlite3\sqlite3.c(22152): error #2152: Unknown field 'tm_min' of '(incomplete) struct tm'.
contrib\hbsqlit3\sqlite3\sqlite3.c(22153): error #2152: Unknown field 'tm_sec' of '(incomplete) struct tm'.
../../win_ole.c(77): fatal error #1035: Can't find include file <olectl.h>.
../../wincorec.c(150): error #2048: Undeclared identifier 'WS_MAXIMIZE'.
../../wincorec.c(166): error #2168: Operands of = have incompatible types 'HWND' and 'int'.
C:\devl\allegro-4.2.2\include\allegro\platform\almsvc.h(23): fatal error #1035: Can't find include file <malloc.h>.
../../firebird.c(456): error #2149: Undefined size for 'times' with type '(incomplete) struct tm'.
../../firebird.c(487): error #2152: Unknown field 'tm_year' of '(incomplete) struct tm'.
../../firebird.c(488): error #2152: Unknown field 'tm_mon' of '(incomplete) struct tm'.
../../firebird.c(489): error #2152: Unknown field 'tm_mday' of '(incomplete) struct tm'.
../../firebird.c(490): error #2152: Unknown field 'tm_hour' of '(incomplete) struct tm'.
../../firebird.c(491): error #2152: Unknown field 'tm_min' of '(incomplete) struct tm'.
../../firebird.c(492): error #2152: Unknown field 'tm_sec' of '(incomplete) struct tm'.
../../firebird.c(501): error #2152: Unknown field 'tm_year' of '(incomplete) struct tm'.
../../firebird.c(501): error #2152: Unknown field 'tm_mon' of '(incomplete) struct tm'.
../../firebird.c(501): error #2152: Unknown field 'tm_mday' of '(incomplete) struct tm'.
../../firebird.c(510): error #2152: Unknown field 'tm_hour' of '(incomplete) struct tm'.
../../firebird.c(511): error #2152: Unknown field 'tm_min' of '(incomplete) struct tm'.
../../firebird.c(512): error #2152: Unknown field 'tm_sec' of '(incomplete) struct tm'.
../../fi_winfu.c(98): error #2048: Undeclared identifier 'CBM_INIT'.
../../fi_winfu.c(99): error #2168: Operands of = have incompatible types 'HBITMAP' and 'int'.
* 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.
* make_vc.mak
+ Added /nxcompat linker flag for non-WinCE, non-DLL,
HB_VISUALC_VER >= 80 MSVC executables.
This should add extra safety.
* include/hbextern.ch
* source/rtl/rat.c
+ Added HB_RAT() which is similar to RAT(), but also accepts
<nStart> and <nEnd> optional paramaters, similarly to HB_AT().
; Please test.
* source/rtl/at.c
* Minor formatting.
* 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.
* harbour/include/hbset.h
* harbour/source/vm/set.c
+ added hb_setSetItem2() C function for SETs which needs two parameters
+ added support for HB_SET_DECIMALS and HB_SET_EPOCH in hb_setSetItem()
Still 22 SETs are marked as TODO
+ added internal function hb_setSetFile() for HB_SET_ALTFILE,
HB_SET_EXTRAFILE, HB_SET_PRINTFILE - function body marked as TODO.
I'll implement it later.
* harbour/include/hbwmain.c
* pacified unused variable warning
* harbour/include/hbpp.h
* harbour/source/pp/ppcore.c
! do not report #if expression errors in #if PP directives when they are
in codedis activated by parent #if[def]/#elif/#else. It allows
to compiler code like:
#ifdef DEFINE
#if DEFINE >= 0x100
...
#endif
#endif
+ added logical expression reduction to not report #if expression errors
in code like:
#ifdef DEFINE && DEFINE >= 0x100
...
#endif
! fixed possible division by 0error in #if exporessions like #if 1 / 0
Now #if expression compiler error is generated
! restored some bit operators in #if directives wrongly disabled with
xHarbour stuff
* harbour/source/vm/hashfunc.c
% removed unnecessary hb_itemUnRef()
* make_vc.mak
* -GA option only used for HB_VISUALC_VER >= 70.
Please update this if older versions also support it.
* include/hbver.ch
* source/common/hbver.c
* Some more fiddling with version number terminology and
hb_version() values:
HB_VERSION_MICRO -> HB_VERSION_RELEASE
HB_VERSION_BLD_DATE_STR -> HB_VERSION_BUILD_DATE_STR
HB_VERSION_BLD_DATE -> HB_VERSION_BUILD_DATE
HB_VERSION_BLD_TIME -> HB_VERSION_BUILD_TIME
HB_VERSION_CHANGELOG_REV -> HB_VERSION_CHANGELOG_ID
Third part of version number could also be: PATCH, MICRO, BUILD
SVN revision could also be: BUILD
BUILD is inherently connected with a physical binary, so
I dropped it, PATCH is limiting and negativ, MICRO is not
very common (otherwise good), so a finally opted for
RELEASE. REVISION kept as is.
; If there are no objections I'll HB_VER_REVISION macro to
HB_VER_RELEASE. This will be an INCOMPATIBLE change, but
I expect not too many ppl being affected.
* TODO
- Removed MT as a TODO. Thanks Przemek for the nice job.
* harbour/include/hbapi.h
* harbour/source/vm/hashes.c
* harbour/source/vm/hashfunc.c
* changed hb_hSort() to execute sorting when hash is marked as needed
resorting instead of marking hash for resorting
* harbour/source/vm/fm.c
* formatting
* harbour/contrib/hbdbgfx/dbgfxc.c
! fixed casting in ASCII build
+ added support for UNICODE builds
* harbour/contrib/gtwvg/gtwvg.c
* cover LWA_ALPHA usage by #if ( _WIN32_WINNT >= 0x0500 )
to keep at least compile time compatibility with older systems
* harbour/include/hbapi.h
* harbour/source/vm/hashfunc.c
* harbour/source/vm/hashes.c
+ added support for binary key order
% enable binary internal key order by default for new hash arrays
+ added .prg function to enable/disable/retrive binary order in hash
items:
hb_hSetBinary( <hValue>, <lOnOff> ) => <hValue>
hb_hBinary( <hValue> [, <lBinary> ] ) => <lBinary>
+ added support for hash array resorting. It's activated automatically
on 1-st key access/assign after changing binary or casematch hash
array flag
+ added .prg function hb_hSort( <hValue> ) => <hValue> which marks
hash array for sorting
* harbour/source/rtl/itemseri.c
% improved performance of hash array deserialization
TODO: add support for hash array flags and hash default value
serialization
* include/hbextern.ch
* common.mak
* source/codepage/Makefile
* source/codepage/cpeswinm.c
- source/codepage/cpes850.c
+ source/codepage/cpes850c.c
* source/codepage/cpesiso.c
+ source/codepage/cpesisoc.c
* source/codepage/cpeswin.c
+ source/codepage/cpeswinc.c
* source/codepage/cpesisom.c
* Spanish language support cleaned:
Modern collation made the default, fixed
CP linkage in ESWIN collations, Clipper
compatibility versions renamed to have an
ending 'C'
Now the following collations are supported:
ES850C - Clipper compatibility CP: IBM850
ESWINC - Clipper compatibility CP: Windows-1252
ESISOC - Clipper compatibility CP: ISO-8859-1
ESWIN - Modern CP: Windows-1252
ESISO - Modern CP: ISO-8859-1
ESMWIN - Compatibility with previous Harbour versions and xhb.
(this collation has wrong linkage, so everyone is
encouraged to use ESWIN or ESISO instead.)
Intentionally not added to hbextern.ch.
; TODO: Add ES850.
; TODO: Check whether Clipper compatibility is indeed true.
* harbour/include/hbthread.h
! fixed typo
* harbour/source/vm/Makefile
* excluded mainpm.c from OS2 builds
* harbour/source/rtl/hbinet.c
* changed the #include order for OS2 OpenWatcom builds and added some
cleanups - please test other builds.
* harbour/include/hbthread.h
* harbour/source/vm/thread.c
+ added ULONG _hb_gettid( void ) to OS2 builds - thanks to Maurilio
* harbour/source/rtl/hbinet.c
* changed a little bit the order of including header files in OS2 builds
(blink fix for OpenWatcom OS2 builds).