* harbour/source/compiler/hbmain.c
! added missing pFunc initialization in symbol structure.
It was causing GPF when C code was attached to .prg file using
HB_INLINE() {} or #pragma BEGIN/ENDDUMP with HB_FUNC_STATIC()
inside. Many thanks to Andi for information about the problem.
* harbour/source/vm/runner.c
! fixed possible GPF after loading .hrb module - clear function
address if dynamic symbol does not exist
* harbour/source/compiler/hbmain.c
! fixed typo in conditional compilation in last commit
* harbour/include/hbcomp.h
* harbour/include/hbcompdf.h
* harbour/source/compiler/hbmain.c
* harbour/source/compiler/genc.c
* harbour/source/compiler/genhrb.c
+ added support for compiling multiple .prg modules into single
compilation unit with repeated static or init/exit functions
with the same name.
Now Harbour compiler compiling .prg code from different .prg modules
included by @<name>.clp or by SET PROCEDURE TO ... / DO ... [ WITH ... ]
works exactly like Clipper. It supports separated file wide definitions
for each compiled .prg module when -n switch is used and allows to
use static or init/exit functions/procedures with the same names but
in different modules.
It resolves incompatibility often reported by [x]Harbour users.
Now it's not longer necessary to update existing Clipper code.
@.clp files and SET PROCEDURE TO ... / DO ... [ WITH ... ] are
fully functional like in Clipper.
AFAIR it was the last unintentional incompatibility with Clipper.
TODO: add support for multiple static functions with the same name
in .HRB files - it's necessary to change used format so I'll
probably to that with .HRL support. Now when -gh switch is used
harbour and such functions exists then compiler generates:
Error E0002 Redefinition of procedure or function ...
TODO: modify hbmk2 to pass @<name>.clp files directly to Harbour
compiler so it can compile them just like Clipper does and
generate single output file: <name>.<ext>
* harbour/config/instsh.mk
* disabled install command echo
* harbour/include/hbcomp.h
* harbour/include/hbcompdf.h
* harbour/source/compiler/hbmain.c
* harbour/source/compiler/genc.c
* harbour/source/compiler/genhrb.c
% removed FUNCALLS internal structures and functions.
It simplifies compiler code, reduce memory usage and
increase performance due to eliminating unnecessary
structures which were update and scanned in previous.
Now we have all necessary information in symbol table.
* harbour/contrib/hbnetio/netiocli.c
+ added support for DNS addresses
* harbour/source/pp/Makefile
* harbour/source/main/Makefile
! hacked the order of linked library list to resolve problem with
potential cross references between libraries on platforms which do
not support library grouping
* harbour/source/nortl/nortl.c
! added missing include hbmemory.ch
* harbour/source/compiler/hbmain.c
! added protection against multiple init function freeing
* harbour/include/hbcomp.h
* harbour/source/compiler/hbmain.c
! fixed typo in -m parameter handling
! fixed old memory leak exploited by compile time error in code with
static variables
* harbour/include/hbcomp.h
* harbour/include/hbcompdf.h
* harbour/source/compiler/hbmain.c
* harbour/source/compiler/cmdcheck.c
* harbour/source/compiler/hbcomp.c
* harbour/source/compiler/genc.c
* harbour/source/compiler/harbour.yyc
* harbour/source/compiler/harbour.y
* harbour/source/compiler/hbdbginf.c
* harbour/source/compiler/genhrb.c
* harbour/source/compiler/gencobj.c
- removed old "AutoOpen" code used for @<name>.clp, SET PROCEDURE TO ...
and DO <func> [ WITH <args,...> ] statements
It was neither Clipper compatible not working correctly in some cases.
+ added new code for multi .prg module compilation into single unit
with support for multiple file wide declarations just like Cipper
does doe @.clp files and SET PROCEDURE TO / DO ... [ WITH ... ]
% cleaned redundant code used in harbour compiler to execute grammar
parser with different conditions. Now it's much shorter and simpler
and hb_compparse() is called only from one place.
! fixed possible multiple declarations in symbol table for ANNOUNCE
function
% rewritten C code generation to increase speed and make it independent
from some internal compiler structures. Now it's shorter and faster
but it strongly uses scope attributes in symbol table so they have
to be properly set during compilation and new code for .c file
generation should help in their validation.
% few other optimizations and cleanups
Now Harbour can compile code like:
/*** t01.prg ***/
static s_var := "main sVar"
proc main()
? procname(), "->", sVar
do t02
return
/*** t02.prg ***/
static s_var := "t02 sVar"
proc t02()
? procname(), "->", sVar
return
by simpe:
harbour -n -w -es2 t01
or using tst.clp:
t01
t02
and:
harbour -n -w -es2 @tst
in both cases it works just like Clipper. Please note that in the
second version generated file inherits (like in Clipper) name from
.clp file and is called "tst.c". The .clp file name is also used
as module handler signature.
TODO: add support for multiple static functions with the same name
but coming from different .prg modules compiled into single
unit using @.clp files or SET PROCEDURE TO / DO ... [ WITH ... ]
In above modifications I already implemented it partially but
I haven't made one very important extension which strongly
interacts with symbol table usage during compilation and can
be source of really bad problems if I made sth wrong so I plan
to finish when above changes will have been tested.
* bin/postinst.bat
! Fixed to work without HB_TOP value. Regression after recent change.
* contrib/rddsql/sddmy/mysqldd.c
* contrib/rddsql/sddpg/pgsqldd.c
* contrib/hbbtree/hb_btree.h
* contrib/hbbtree/hb_btree.c
* source/vm/macro.c
* source/vm/hvm.c
* source/common/expropt2.c
* source/compiler/complex.c
! Fixed MSVC warnings.
Please review me, especially the date related ones in core.
* LONG -> long in hb_compExprReduceTimeStampPut().
; NOTE: Number of MSVC (32-bit) -W4 warnings are reduced to 280,
all of them in RDD code. (plus just few more here and there)
* include/hbsetup.h
% Optimized out HB_OS_UNIX_COMPATIBLE. HB_OS_UNIX should be used
instead. Since the definition logic for HB_OS_UNIX was completely
different from HB_OS_UNIX_COMPATIBLE, it may be possible that
it's not 100% the same as before, although their meaning was
the same.
HB_OS_UNIX_COMPATIBLE is still available for compatibility, but
it's now marked with HB_LEGACY_LEVEL2 and will be removed in next
major release.
* include/hbapifs.h
* include/hb_io.h
* include/hbsocket.h
* source/vm/set.c
* source/debug/dbgentry.c
* source/common/hbffind.c
* source/rtl/fscopy.c
* source/rtl/fstemp.c
* source/rtl/gtstd/gtstd.c
* source/rtl/gttrm/gttrm.c
* source/rtl/version.c
* source/rtl/hbsocket.c
* source/rtl/copyfile.c
* source/rtl/filesys.c
* source/rtl/console.c
* source/rtl/cputime.c
* source/rtl/gtpca/gtpca.c
* source/rtl/fssize.c
* source/rtl/memofile.c
* source/compiler/hbcomp.c
* source/compiler/gencobj.c
* contrib/hbct/files.c
* contrib/xhb/xhbcopyf.c
* contrib/xhb/hbserv.c
* contrib/hbnf/getenvrn.c
* HB_OS_UNIX_COMPATIBLE -> HB_OS_UNIX
* config/global.cf
* HB_UNIX_COMPATIBLE -> HB_OS_UNIX
* source/pp/pplib.c
* source/compiler/hbstripl.c
+ Added HB_EXTERN_BEGIN/END plus explicit declaration of
some static functions to make SunPro C++ mode happy.
There are still *tons* of warnings messages, most of them
complaining about function declaration 'extern "C"' and
const differences, even in Harbour generated C code.
These fixes are experimental and address just the tip
of the iceberg.
Please review me.
* contrib/hbwin/wapi_winbase.c
+ Added WAPI_FORMATMESSAGE(). Unicode support implemented, but
not tested, last parameter not implemented. This should replace
limited FORMATMESSAGE() implementation found in win_prt.c.
* contrib/hbwin/hbwin.ch
* contrib/hbwin/win_tprt.prg
* contrib/hbwin/tests/testprt1.prg
* contrib/hbwin/tests/testprt2.prg
* contrib/hbwin/win_prt.c
* Functions and class renamed to have "win_" prefix.
% Other minor cleanups.
+ win_portopen() returns -1 if the port number was out of
range, so MAXSERIAL constant could be elminiated.
% INVALID_HANDLE_VALUE constant is in reality an explicit
-1 used by low-level lib layer, so I've elminiated it,
and high-level lib layer also uses plain -1 now.
Could be replaces by some macros, but it shouldn't
use a Windows specific name.
- Deleted FORMATMESSAGE().
* Using WAPI_FORMATMESSAGE() instead of local FORMATMESSAGE().
(they are not compatible)
* contrib/hbwin/wce_smsc.c
! Added TOFIX for an lstrcpy() function. This is unsafe
and can easily cause buffer overrun. Until someone
fixes this properly, I've added a workaround where input
string lenght is checked to be smaller than approriate
buffer size. Only compilation was tested using poccarm,
I have no WinCE decide.
Jose, please have a look at it.
* contrib/hbwin/olecore.c
* Minor formatting.
* INSTALL
* Minor.
* config/global.cf
+ Added screen dump of build settings. Initial version,
only settings having standard names are being shown.
+ Added some new links to comment.
! Fixed $(info ...) usage protection.
* Makefile
% Using ':=' assignments where possible.
! Fixed to choose OS/2 postinst script based on shell, not
HB_ARCHITECTURE.
* Indentation.
* make_gnu.bat
+ Added alternative GNU Make executable names in comment.
* source/compiler/cmdcheck.c
+ Added support for --help cmdline option.
* config/dir.cf
* Indentation.
* harbour/source/macro/macro.y
* harbour/source/macro/macro.yyc
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyc
% reduced INASSING definition - thanks to Xavi for information
* harbour/source/compiler/hbopt.c
! fixed stupid bug in logical expression optimization - thanks to Randy
for self contain example
* harbour/include/hbapi.h
* harbour/include/hbmacro.h
* harbour/include/hbexprb.c
* harbour/source/vm/macro.c
* harbour/source/vm/hvm.c
* harbour/source/macro/macro.y
* harbour/source/macro/macro.yyc
+ added direct support for pushing references to macro expressions.
It resolves the problem with Clipper compatibility (thanks to Alex
for information and example) in code like:
m->var := {0}
&("var[1]") += 10
and also many other things, f.e. now Harbour can cleanly compile
and execute this code:
proc main
local s
m->o := errorNew()
s:="o:tries"
? m->o:tries
? &s
? &(s+"+=2")
? m->o:tries
? &(s+":=3")
? m->o:tries
?
&s := 4
? m->o:tries
&s -= 2
? m->o:tries
&s++
? m->o:tries
?
s := "o"
m->o := 1
? &s
&s := &s + 4
? &s
? &s += 5
? --&s
?
s := "o[2]"
m->o := { 1, 2 }
? &s
&s := &s + 4
? &s
? &s += 5
? --&s
return
* harbour/utils/hbtest/Makefile
* force hbtest compilation with line numbers - information about line
numbers is important part of this test.
* include/hbcomp.h
* include/hbcompdf.h
* include/hbapifs.h
* include/hbexprop.h
* include/hbmacro.h
* include/hbapi.h
* include/hbapiitm.h
* include/hbdate.h
* source/pp/ppcore.c
* source/vm/itemapi.c
* source/vm/arrays.c
* source/vm/extend.c
* source/common/expropt1.c
* source/rtl/philes.c
* source/rtl/empty.c
* source/rtl/minmax.c
* source/rtl/dates.c
* source/rtl/filesys.c
* source/rdd/dbfnsx/dbfnsx1.c
* source/rdd/dbfcdx/dbfcdx1.c
* source/rdd/dbf1.c
* source/rdd/dbffpt/dbffpt1.c
* source/rdd/hbsix/sxdate.c
* source/compiler/hbmain.c
* source/compiler/complex.c
* source/compiler/harbour.yyc
* source/compiler/harbour.y
* contrib/hbct/files.c
* contrib/hbct/dattime2.c
* contrib/hbct/datetime.c
* contrib/xhb/filestat.c
* contrib/hbtip/utils.c
* examples/hboleold/win_ole.c
* LONG -> long for date/time related values
(julian, date, type, millisec)
; This is an effort to clean Harbour sources from
Windows/legacy-Clipper basic types and replace
them with own or ANSI C ones.
In the above case, usage wasn't consistent,
LONG and long were mixed.
* source/main/harbour.c
* source/vm/fm.c
* LONG -> long for some stat counters.
* harbour/source/compiler/genc.c
* convert any function names to unique symbol accepted by C compilers
it resolves problems with compiling without -n .prg files using some
strange characters in file name, i.e.
/*** ^co+d-e.prg ***/
? procname()
* harbour/source/compiler/hbmain.c
* extended -n2 to work also with code without starup procedure but with
local variables
* harbour/utils/hbrun/hbrun.prg
+ added -n2 to compiler parameters when .prg file is compiled and
executed. It allows to use with hbrun .prg files with and without
startup procedure
* harbour/contrib/hbct/token1.c
% use explicit constant value instead of HB_MKULONG() macro
* harbour/source/compiler/cmdcheck.c
! fixed few typos in bit manipulation used to calculate result in
PackDateTime() function by rewriting it to use bitfield union.
* utils/hbmk2/hbmk2.prg
+ Added support for hbcs= lins in .hbc files. This means
they can now be embedded. Filters and macros are accepted,
extension optional, .hbc will be added.
! Fixed wrongly calculated embedding level, counting now made
simpler.
+ Added warning message if embedding level reached the maximum,
instead of just ignoring the to be embedded files.
* COPYING
+ Added utils/hbmk2 to the COMPILER LICENSE section.
- Deleted OLD HARBOUR LICENSE section.
* source/lang/msgeu.c
* source/lang/msgsr852.c
* source/lang/msgsriso.c
* source/lang/msgsliso.c
* source/lang/msgslwin.c
* source/lang/msgsl437.c
* source/lang/msgsl852.c
* Changed copyright to new Harbour license by group (silent)
consent. Copyright holders kept intact, if that's a problem
for anyone in the future, we shall delete these files from
the repository and retranslate (or do whatever else we
decide), notice however that msgsr*.c and msgsl*.c files
were only containing translations for month and day names.
msgeu.c contained translation work spanning to 40 strings.
* source/compiler/hbusage.c
* Updated Lorenzo Fiorini's e-mail address in credit list.
* harbour/include/hbxvm.h
* harbour/source/vm/hvm.c
* harbour/source/compiler/gencc.c
! added missing RT error for wrong values used in SWITCH statement
in code generated for -gc3 output
* harbour/source/rtl/gtxwc/gtxwc.c
! fixed typo in HB_GTXVG_SQUARE shape initialization
* harbour/include/hbrddnsx.h
* harbour/include/hbrddntx.h
* harbour/source/rdd/dbfntx/dbfntx1.c
* harbour/source/rdd/dbfnsx/dbfnsx1.c
* code cleanup - use predefined #define instead of hardcoded constant
values
* harbour/source/rtl/valtoexp.prg
* added REQUEST __objSetClass
* harbour/source/compiler/gencc.c
! fixed -gc3 code generated for switch statement - thanks to Marek and
Xavi for information and self contain example
TODO: add missing RT error in -gc3 output when wrong (non integer
and non string value) is used in SWITCH statement
* utils/hbmk2/hbmk2.hu_HU.po
* utils/hbmk2/hbmk2.prg
+ Added -tshead=<file> option to create a .ch header with
build timestamp information in it: _HBMK_BUILD_DATE,
_HBMK_BUILD_TIME_, HB_BUILD_TIMESTAMP_.
* -opt/-noopt -> -optim/-nooptim to avoid name ambiguity.
+ Added feature to -vcshead= to create a locally rolled
build number if there is no version control system detected.
In this case _HBMK_VCS_TYPE_ will be defined as "hbmk"
and _HBMK_VCS_ID_ will be initialized with a string, starting
with "1" and incremented on each hbmk2 call.
* Internal change to componentize hbmk2 functionality, clearing
away all STATIC vars and some parameter passing hacks.
Work in progress, TODO added.
! Fixed cosmetic bug in debug output when making .po.
* source/rtl/mlcfunc.c
! Fixed warning appeard in latest change.
* source/rtl/trim.c
* source/compiler/hbfunchk.c
- Removed HB_EXTENSION protected second extended parameters
from RTRIM() and ALLTRIM(). If you miss this option, please
report it on the list, we may readd such functionality under
some different name.
INCOMPATIBLE for HB_EXTENSION builds.
* doc/dirstruc.txt
* bin/hb-func.sh
* utils/hbmk2/examples/contribf.hbp
- contrib/hbole
* contrib/Makefile
+ contrib/hbwin/oleinit.c
+ contrib/hbwin/olecore.c
+ contrib/hbwin/hbwinole.h
+ contrib/hbwin/oleauto.prg
+ contrib/hbwin/tests/sample.odt
* contrib/hbwin/tests/testole.prg
- contrib/hbwin/win_tole.prg
- contrib/hbwin/win_ole.c
+ contrib/examples/hboleold
+ contrib/examples/hboleold/tests
+ contrib/examples/hboleold/tests/testole.prg
+ contrib/examples/hboleold/win_tole.prg
+ contrib/examples/hboleold/win_ole.c
+ contrib/examples/hboleold/Makefile
* Replaced old hbwin OLE implementation with
new implementation in hbole. Thanks to
Mindaugas Kavaliauskas for the new implementation.
Those who need the old implementation in the
meantime for any reason, can find it in contrib/example/hboleold.
; TODO: Fill the few missing features (ActiveX/FiveWin
compatibility).
* ChangeLog
* Marked two TODO/TOFIX done.
* utils/hbmk2/hbmk2.prg
+ Added -hbrun option which will run the target without trying to
build it. If target is missing, the command will fail.
+ -run/-hbrun options will now run GUI target executable using 'start'
command on Windows platforms so that hbmk2 will return and leave
the app running.
* include/hbextern.ch
+ Added HB_GZPUTC().
* include/hbsetup.ch
- Removed HB_EXTENSION from documented list of build modified macros.
* source/common/hbverdsp.c
- Deleted HB_EXTENSION dependent part.
* source/rtl/mlcfunc.c
- Deleted HB_EXTENSION branch. Please modify your program to
use Set( _SET_EOL ) instead of passing EOLs explicitly to
memo functions. This works also in xhb.
INCOMPATIBLE when for HB_EXTENSION builds.
* source/rtl/alert.prg
! Minor in comment.
* source/rtl/saverest.c
- Removed SAVESCREEN()/RESTSCREEN() extra "lNoCheck" parameter
when HB_EXTENSION is enabled. Please report on the list
if you need this functionality.
* source/compiler/hbfunchk.c
! Fix to prev: AT() declaration.
; TODO: Clean rest of HB_EXTENSION stuff.
* harbour/include/hbcompdf.h
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyc
+ added compile time optimization for switch statements with constant
values, i.e. for code like:
proc main()
local x := 0
switch 3
case 1; x += 100; exit
case 2; x += 200
case 3; x += 300
case 4; x += 400; exit
case 5; x += 505; exit
case 6; x += 606
otherwise; x += 1000
endswitch
? x
return
* harbour/include/hbcomp.h
* harbour/source/compiler/hbmain.c
* harbour/source/compiler/hbcomp.c
* harbour/source/compiler/compi18n.c
* changed -j<path>/ and -j<file> behavior when more the one .prg file
is compiled. Now when <path>/ is used then it's respected by all
compiler .prg modules. When <file> is used then only single .pot
file is generated but it contains i18n entries from all compiled
.prg modules.
* harbour/ChangeLog
+ added two thanks notes, one to Miguel and using HeapAlloc() and
second to Walter Negro for his DATETIME work in xHarbour what gives
valuable test platform for Harbour and was important inspiration for
Harbour TIMESTAMP implementation.
* harbour/source/compiler/complex.c
! fixed bug reported by Ranier
* harbour/ChangeLog
* added information to old ChangeLog entry that the idea of parsing the
code inside #pragma begindump to detect static harbour functions in
C code inside was 1-st time implemented by Andi Jahja in xHarbour.
* harbour/include/hbcomp.h
* harbour/source/common/hbdate.c
* harbour/source/rtl/strmatch.c
* harbour/source/rtl/fssize.c
* harbour/source/rtl/hbffind.c
* harbour/source/rtl/filesys.c
* enabled some POSIX function added to 1.8 Linux OpenWatcom builds
and cleaned some workarounds not longer necessary
* harbour/source/rtl/hbproces.c
+ added hack with small sysconf() implementation which is still missing
in OpenWatcom 1.8. Now it's possible to build Harbour in Linux using
officially distributed OpenWatcom 1.8
* harbour/source/rtl/disksphb.c
* added TODO warning message
* harbour/source/compiler/cmdcheck.c
! fixed typo in memory freeing in repeated -p<path> options
* harbour/source/compiler/hbmain.c
* harbour/source/compiler/hbcomp.c
! fixed ignored -es2 compiler flag when warning is caused by startup
parameters
* harbour/source/compiler/harbour.yyc
* harbour/source/compiler/harbour.y
* pacified warning
* harbour/harbour.spec
! fixed doc/en directory name to doc/en-EN
* harbour/source/vm/Makefile
+ harbour/source/vm/maindllh
+ harbour/source/vm/maindllh/Makefile
+ added hbmaindllh library - it's necessary for some compiler to create
working harbour.dll, f.e. in OpenWatcom builds. Please updated
harbour.dll build scripts to use this library with such compilers.
MinGW based compilers do not need it.
* harbour/source/vm/Makefile
! fixed typo which broke wce builds
* harbour/source/vm/Makefile
* harbour/harbour-wce-spec
* harbour/harbour.spec
+ added mainstd mainwin maindllh maindllp to all win and wce builds
* harbour/harbour-win-spec
* harbour/harbour-wce-spec
* harbour/harbour.spec
+ added support for parallel compilation (-j make flags) in RPMs
which supports %{_smp_mflags} macro
! temporary fix: disabled harbour external libraries.
I do not know what should be the final version.
; WCE builds are still broken due to repeated macro definitions
but I'm lost with the new build time parameters and I do not
know how to fix it without breaking hbce* scripts or bad introduce
some interactions to other build/install time scripts so it will
have to be fixed by Viktor.
* harbour/include/hbexpra.c
! verify all expression POP operation for usage as LValue
* harbour/include/hbexprb.c
! fixed possible GPF in unverified send context
+ added support for IIF() usage as LValue even if it cannot be
reduced during [macro]compilation
* harbour/source/macro/macro.yyc
* harbour/source/macro/macro.y
* harbour/source/macro/macrolex.c
* removed support for some characters unsupported by Clipper in
macro expressions like chr(10) as trailing expression character, f.e.:
? &("DATE()"+chr(10))
* harbour/source/compiler/complex.c
* formatting