* make_gnu.bat
+ Minor adjustment to support OS/2 cross-builds.
* source/rtl/gtwvt/gtwvt.c
* Minor adjustment to casting to Windows type.
* contrib/hbfimage/Makefile
- Disabled for OS/2.
* bin/postinst.cmd
+ Synced with .bat. 'copy' replaced by 'xcopy'.
* config/os2/watcom.cf
+ Added fix (from win/watcom.cf) to swap dirseps
for wcc386 as it cannot accept forward slashes.
Przemek, please adapt this for Linux, as it's
probably not needed there.
* harbour/config/os2/watcom.cf
* harbour/config/os2/dir.cf
* harbour/config/os2/install.cf
* small cleanup for builds with *nix like shells and cross builds
* harbour/contrib/rddads/Makefile
! disabld from OS2 builds - if ADS supports OS2 then please speak-up
* harbour/include/hbthread.h
* added small hack as workaround for missing OS2 declarations
* harbour/source/rtl/filesys.c
! fixed typo in OS2 builds
* harbour/source/rtl/hbproces.c
! fixed non GCC OS2 builds
* harbour/contrib/hbtpathy/tpos2.c
! fixed casting in OS2 builds
* harbour/contrib/xhb/hbserv.c
! disabled from OS2 non GCC builds
Now I can create OS2 OpenWatcom build in my Linux box using this simple
script:
#!/bin/sh
if [ -z "${WATCOM}" ]; then
export WATCOM="/opt/lng/watcom"
export INCLUDE="${WATCOM}/h:${WATCOM}/h/os2"
export PATH="${WATCOM}/binl:$PATH"
fi
export HB_ARCHITECTURE=os2
export HB_COMPILER=watcom
export HB_INSTALL_PREFIX="$(pwd)/hb-os2/watcom"
#cross build settings
# this should be fixed and we should use HB_PPGEN_PATH as direct
# reference to hbpp binaries and HB_COMP_PATH as direct reference
# to harbour binaries in all builds. Otherwise we have to create
# some hacks to create platform specific names for above binaries
# i.e. in *nixes links with .exe extension.
export HB_PPGEN_PATH="/tmp/cros-hb"
export HB_BIN_COMPILE="/tmp/cros-hb"
export HB_USER_PRGFLAGS="${HB_USER_PRGFLAGS} -D__PLATFORM__OS2"
export HB_USER_PRGFLAGS="${HB_USER_PRGFLAGS} -undef:__PLATFORM__UNIX"
export HB_USER_PRGFLAGS="${HB_USER_PRGFLAGS} -undef:__PLATFORM__LINUX"
# eliminate libraries which scans for local host header files
export HB_XBUILD=yes
./make_gnu.sh "$@"
It should work also in Windows with MSys.
This should resolve the problem with testing OS2 builds, at least
for OpenWatcom. I do not know if GCC for OS2 is available as cross
build environment.
I think that Viktor can quite easy adopt hbmk2 for OS2 cross compilation.
* source/common/hbver.c
% Deleted unnecessary casts.
* examples/hbmsql/msql.c
* Fixed const warnings.
* examples/hbmake/hbmake.hbp
- examples/hbmake/hbmakec.c
* examples/hbmake/hbmake.prg
* Using portable HB_USERLANG() instead of local Windows-only solution.
- examples/hboleold
- Deleted. It's no longer easy to fix with new const usage.
- examples/hbgf
- Deleted. We have much better GUI examples these days then these
very early ones.
* examples/httpsrv/uhttpdc.c
* Minor formatting.
* include/hbextern.ch
+ Added HB_SETCLSHANDLE().
* source/vm/evalhb.c
* source/vm/eval.c
* source/vm/dynlibhb.c
! Fixed old int <-> USHORT conversion MSVC warnings.
; TOFIX: ? There is a disagreement between different APIs
and Harbour program parts on the size and type of
number of parameters, it can be int, USHORT, ULONG,
and in some places there is also BYTE limit.
* source/common/hbver.c
* Minor formatting.
* source/vm/fm.c
! Fixed bcc C++ build errors by enabling USE_DL_PREFIX in this case.
Only this warning remain:
Warning W8008 ../../fm.c 386: Condition is always true in function dlmalloc_destroy()
* contrib/hbxbp/xbpdev.ch
+ Added SVN ID.
* source/rtl/hbinet.c
+ Added hbU16 casts to silence very old warnings.
* source/rtl/gtapiu.c
* Tweaked type and constant usage.
* include/hbgtcore.h
* include/hbapigt.h
* source/rtl/gtapi.c
* source/rtl/hbgtcore.c
* contrib/hbct/ctwin.c
* contrib/hbct/screen1.c
* contrib/hbct/ctwfunc.c
* GetClearChar/SetClearChar changed to use USHORT for char
(was int). This resolves all remaining MSVC warnings.
* _HB_GT_BASE structure adapted to latest changes, three
vars changed from USHORT to int, one renamed to reflect
int type.
+ Added var names to a few functions declarations.
% Minor optimizations.
* hb_gtScrollEx() modified to not do parameter evaluation,
just pass them to low-level.
; Przemek, please review me, I've again encountered UCHARs
in hbct / SETCLEARB().
* source/rtl/idle.c
* SHORT -> int.
* Minor formatting.
* harbour/include/hbgtcore.h
* harbour/source/rtl/hbgtcore.c
* changed BYTE to USHORT in few functions which expected character
for GTs with UNICODE screen buffer
* harbour/source/rtl/gtcgi/gtcgi.c
* harbour/source/rtl/gtstd/gtstd.c
* harbour/source/rtl/gttrm/gttrm.c
* updated for USHORT used as character holder
* harbour/source/rtl/gtwvt/gtwvt.c
% minor modification
* harbour/source/rtl/gtxwc/gtxwc.c
* harbour/contrib/gtwvg/gtwvg.c
* harbour/contrib/gtwvg/wvgcore.c
* harbour/contrib/gtalleg/gtalleg.c
* updated for BYTE to int as color holder modification
* harbour/contrib/hbct/screen1.c
* harbour/contrib/hbct/screen2.c
* harbour/contrib/hbct/ctwfunc.c
* harbour/contrib/hbnf/ftattr.c
! fixed casting changing values or added casting to force strict
translation
* modified to accept color and character values with wider ranges
* harbour/contrib/hbct/ctwin.c
! removed unnecessary stripping to BYTE in character and color values
* harbour/source/rtl/console.c
* pacified warning
* include/hbgtcore.h
* include/hbapigt.h
* source/rtl/gtdos/gtdos.c
* source/rtl/gtwin/gtwin.c
* source/rtl/gtxwc/gtxwc.c
* source/rtl/gtcrs/gtcrs.c
* source/rtl/gtstd/gtstd.c
* source/rtl/gttrm/gttrm.c
* source/rtl/gtcgi/gtcgi.c
* source/rtl/gtapi.c
* source/rtl/gtos2/gtos2.c
* source/rtl/hbgtcore.c
* source/rtl/gtsln/gtsln.c
* source/rtl/gtpca/gtpca.c
* source/rtl/gtwvt/gtwvt.c
* contrib/hbct/screen2.c
* contrib/hbct/ctwin.c
* contrib/hbct/screen1.c
* contrib/hbnf/ftattr.c
* Changed color representation to be 'int' in all places.
This means changes in high level and low level GT interfaces.
; QUESTION: In hbct UCHAR is used in a few places, I didn't want to
touch it.
; Please test and review.
; TODO: Clean char type usage (from int, UCHAR, BYTE, USHORT to what?)
; TODO: Clean attr type usage to be hbU8, or HB_ATTR, or else?
* include/hbapigt.h
* source/rtl/gtapi.c
! Fixed a few byAttr parameter names which should really be named bColor.
; TOFIX: ? hb_gtSetAttribute() and *SETATTRIBUTE interfaces
have a misleading name, as they're really setting
color, not attribute. (we called color as attr in
the beginning when no separate attr info was
implemented)
* harbour/source/rtl/gtwvt/gtwvt.c
% small optimization in non unicode builds - do not divide text
output and reduce number of hdc settings if the same font is
used for box and normal characters
* include/hbdefs.h
+ Added HB_RESULT. This is meant to replace current USHORT used
to store result (or "error" values).
* source/rtl/console.c
* USHORT -> int (printer coordinates).
* source/rtl/gtwin/gtwin.c
* source/rtl/gtwvt/gtwvt.h
* source/rtl/gtwvt/gtwvt.c
* Updated to use ints instead of [U]SHORTs internally.
; Please review me and correct any possible mistakes.
* contrib/xhb/xhbscr.c
% Deleted explicit casts.
* harbour/include/hbapigt.h
* harbour/source/rtl/gtapi.c
* changed last parameter of hb_gtRepChar() from USHORT uiCount to
ULONG ulCount
* removed basic parameter validation from hb_gtScroll() - such
things should be done by GT driver
* minor cleanup
* harbour/source/rtl/hbgtcore.c
% moved pbyBuffer initialization outside the loop in Rest/Save methods
* minor cleanup in casting
* harbour/source/rtl/mouse53.c
% minor optimization
* harbour/source/rtl/gtdos/gtdos.c
* changed buffer type in Mouse{Save,Restore}State methods from char *
to void *
* harbour/source/rtl/gtxwc/gtxwc.c
* harbour/source/rtl/gtcrs/gtcrs.c
! fixed casting
* harbour/source/rtl/xhelp.c
* harbour/source/rtl/console.c
% use 'int' instead of 'USHORT'
* harbour/source/rtl/saverest.c
* removed explicit casting
* harbour/source/rtl/scroll.c
* harbour/source/rtl/console.c
* harbour/contrib/hbct/screen1.c
* harbour/contrib/hbct/screen2.c
! fixed casting from 'char *' items which was wrongly changing
the results.
* harbour/contrib/hbct/screen1.c
* harbour/contrib/hbct/screen2.c
% eliminated not longer necessary intermediate variables used for
passing by reference in previous version with [U]SHORT casting
* harbour/contrib/hbnf/dispc.c
* harbour/contrib/hbnf/ftattr.c
* harbour/contrib/hbnf/ftshadow.c
* changed screen coordinates from [U]SHORT to int
* include/hbgtcore.h
* include/hbapigt.h
* include/hbapi.h
* source/rtl/scroll.c
* source/rtl/maxrow.c
* source/rtl/gtapi.c
* source/rtl/saverest.c
* source/rtl/console.c
* source/rtl/oldclear.c
* source/rtl/hbgtcore.c
* source/rtl/scrrow.c
* source/rtl/shadow.c
* source/rtl/setcurs.c
* source/rtl/mouse53.c
* source/rtl/gx.c
* source/rtl/mouseapi.c
* contrib/hbct/cursor.c
* contrib/hbct/ctwfunc.c
* contrib/hbclipsm/gauge.c
* Changed all USHORT to int in high-level GT API layer which
already had an int representation on the low-level.
Please review me. It's possible that some extra checks (or else)
need to be added since signedness has changed.
* Change mouse state buffer from char * to void *.
; TODO: Review remaining BYTE/USHORT usage for attr, color
and char. Char is sometimes represented by UCHAR,
sometimes by char and sometimes by USHORT. Color is
represented by both int and BYTE. attr is BYTE, which
can be changed to hbU8.
* include/hbgtcore.h
* source/rtl/gtapi.c
* source/rtl/hbgtcore.c
* Changed low level GT SAVE/REST method buffer parameter type
to void * from BYTE *. Some explicit casts removed.
* Few more BYTE *s to char *.
* include/hbextern.ch
* source/rtl/Makefile
+ source/rtl/base64c.c
+ source/rtl/base64.prg
+ Added HB_BASE64ENCODE(), HB_BASE64DECODE() to core.
They were copied from hbtip and hbvpdf and currently
the decoder is .prg code while encoding is .c code.
Latter has one TOFIX for an error situation.
* contrib/hbtip/encurl.prg
* contrib/hbtip/thtml.prg
* contrib/hbtip/sessid.prg
* contrib/hbtip/popcln.prg
* contrib/hbtip/sendmail.prg
* contrib/hbtip/tip.ch
* contrib/hbtip/cgi.prg
* contrib/hbtip/url.prg
* contrib/hbtip/encqp.prg
* contrib/hbtip/base64x.c
* contrib/hbtip/httpcln.prg
* contrib/hbtip/client.prg
* contrib/hbtip/encoder.prg
* contrib/hbtip/smtpcln.prg
* contrib/hbtip/encb64.prg
* contrib/hbtip/mail.prg
* contrib/hbtip/credent.prg
* contrib/hbtip/ftpcln.prg
+ Added TOFIXes, QUESTIONs
! Fixed to use hb_MemoRead() instead of MemoRead() in one place.
! Fixed a wrong error checks after FCreate() calls.
! Fixed to use Len( hb_inetCRLF ) instead of hardwired length.
! Using hb_ntos() instead of Str() in POP3 commands.
* Changed explicit values to manifest constants (F_ERROR)
* Changed high ASCII chars in source to Chr() representation,
now source can be edited with any editor.
! Added missing copyright header to tip.ch. Although this header
seems to be unnecessary.
! TipMail:MakeBoundary() to not add any date punctuations in the ID.
! Fixed tIPClientFTP:fileSize() to not return permantent zero.
% Heavier optimizations and cleanup in TIpClientSmtp().
% Optimizations.
* Formatting.
; Please test.
* harbour/include/hbexpra.c
% reduce macro expressions used in POP operation.
It allows to use code like: &("((M->VAR))") := 1
* harbour/include/hbexprb.c
+ added support for iif() used in macro expressions passed by references:
proc MAIN()
local s := "IIF( lVar, xVar1, xVar2 )"
M->xVar1 := 1
M->xVar2 := 2
M->lVar := .T.
? M->xVar1, M->xVar2
P( @&s )
? M->xVar1, M->xVar2
proc P(x)
x+=1000
* harbour/source/vm/hvm.c
! fixed possible assign value lost in extended references
* harbour/source/rdd/dbfntx/dbfntx1.c
* harbour/source/rdd/dbfnsx/dbfnsx1.c
* harbour/source/rdd/dbfcdx/dbfcdx1.c
* harbour/source/rdd/dbf1.c
! cleaned initialization code - use INIT method to make independent
from initialization code. It fixes default memo type setting in
DBFNSX (SMT) and DBFNTX (DBT) on some platforms
* contrib/xhb/xhbat.c
* contrib/hbtip/utils.c
* Moved ATI() function to xhb lib.
ATI() is different from HB_ATI() since it doesn't support
national chars, but it supports negative start/end values in
xhb style.
* contrib/hbtip/thtml.prg
* Changed to use core HB_ATI() instead of xhb specific ATI().
To me it looks that negative positions aren't used by hbtip code,
also respect for national chars is fine, so this replacement is okay.
Please review me and correct it if needed.
* contrib/xhb/xhbfunc.c
* contrib/hbtip/legacy.prg
* Moved HB_EXEC() to xhb lib. Restored the C version.
* contrib/hbtip/Makefile
- contrib/hbtip/legacy.prg
- Deleted. No longer necessary.
* include/hbextern.ch
* source/rtl/Makefile
+ source/rtl/ati.c
+ Added HB_ATI() function. This is the same as HB_AT(), but
case-insensitive. It supports national chars.
* harbour/source/rtl/gttrm/gttrm.c
! do not catch SIGCHLD
* harbour/include/hbapifs.h
* harbour/source/rtl/hbproces.c
+ added C function: hb_fsProcessRun()
* harbour/source/rtl/hbprocfn.c
+ added .prg function:
hb_processRun( <cCommand>, [ <cStdIn> ], [ @<cStdOut> ], ;
[ @<cStdErr> ], [ <lDetach> ] ) -> <nResult>
This function is implemented for all builds also in DOS ones where
temporary files are used to simulate pipes.
TODO: in OS2 builds it should be possible to implement this function
without temporary files just like in *nixes and MS-Windows builds.
I would like to ask OS2 users to make it.
* utils/hbmk2/hbmk2.prg
+ Added app bundle generation for OS X targets in -gui mode.
It's experimental yet. (f.e. clean will not clean it f.e.)
Thanks to Teo Fonrouge for the hints.
* Using escapting function (instead of manual escaping) when
launching Windows apps on NT.
; TOFIX: hb_FCopy()
* source/rtl/fscopy.c
+ Now it will copy flags on *nix systems (just like __COPYFILE()).
* source/rtl/copyfile.c
* Minor formatting.
; TODO: Add generic app icon support. Possible?
* INSTALL
- Deleted QT version number from example settings to
ease on maintenance without making the doc look outdated.
* source/rtl/hbmd5.c
! Minor typo in comment.
* config/win/global.cf
* config/wce/global.cf
% Removed unnecessary @ chars.
* contrib/hbmisc/Makefile
+ contrib/hbmisc/fcomma.prg
- source/rdd/usrrdd/rdds/fcomma.prg
* source/rdd/usrrdd/rdds/Makefile
* fcomma.prg moved to hbmisc, since it depends on
hbmisc features.
* examples/hbextern/hbextern.prg
- Removed special treatment of fcomma.prg.
+ harbour/include/hbtask.h
+ harbour/source/vm/task.c
* harbour/include/hbthread.h
* harbour/include/hbatomic.h
* harbour/source/vm/thread.c
* harbour/source/vm/hvm.c
* harbour/source/vm/fm.c
* harbour/source/rtl/idle.c
* harbour/source/rtl/filesys.c
+ implemented OS independent task switching system - it gives PTHREAD
compatible basic API so it can be used in HVM as alternative MT support
which does not use any OS threads. As long as Harbour does not call
any blocking OS function then it's possible to create and execute
simultaneously many threads though only one CPU is used and switched
between HVM threads. It gives similar scalability to xbase++ threads
and also similar behavior in item protection at .prg level.
Now it's possible to use HVM threads in any OS.
Of course it does not mean that Harbour adds in some magic way
thread support to OS-es which does not support threads like DOS.
It only means that HVM supports threads for .prg code just like
in native MT environment as long as some C code does not block
task switching or process execution will not be frozen by sth, i.e.
executing other process (__run()) in single process OS like DOS.
In some cases it can be interesting alternative even in OS which
have native thread support.
All tests/mttest*.prg programs and speedtst --thread=<n> --scale
are executed correctly with new task switching just like with
OS native MT support.
Compilation with task switching in hbvmmt library can be forced
by HB_TASK_THREAD macro which also disable native OS threads
support.
For task context switching two alternative methods are used:
1) getcontext()/makecontext()/swapcontext() (SUSv2, POSIX.1-2001)
which is preferable because does not need any additional
hacks but not all OS-es supports these functions.
It's enabled by default in Linux builds.
2) setjmp()/longjmp() (POSIX, ISO 9899 (C99)) otherwise.
These functions are supported by most of C compilers
but there is no function to set new stack in saved context
so it's necessary to introduce for each architecure/C compiler
peace of code which makes it. Macro HB_TASK_STACK_INIT() in
task.c makes it. I defined this macro for x86@32 in DJGPP
Linux GCC and OpenWatcom builds. I tested OpenWatcom builds only
in DOS and Linux but probably it works in all x86@32 builds.
If someone is interesting in adding support for some other
platforms which does not support ucontext.h and 1-st methods
then please define above macro for them.
Have a fun with new toy ;-)
* harbour/source/vm/Makefile
* enabled hbvmmt in DJGPP and OpenWatcom DOS builds. It works well.
Viktor if possible please add support for -mt switch in hbmk2
in all builds even if we do not compile hbvmmt by default so
it can be used with DJGPP and OW and any other builds for which
someone enable hbtask.c though OS does not support threads.
* harbour/contrib/hbmzip/hbmzip.c
! fixed '[const] char|BYTE *' casting in DOS and OS2 builds