* harbour/include/hbthread.h
* harbour/source/vm/thread.c
! fixed a bug on OS/2 MT implementation adding a new function,
_hb_cond_timed_wait() because when a semaphore gets posted it has
to be reset, otherwise it does not stop new threads entering it in a wait.
* harbour/include/hbpp.h
* harbour/source/pp/hbpp.c
* harbour/source/pp/ppcore.c
* harbour/source/compiler/hbmain.c
+ added support for dynamically calculated #define results
! removed old code which was adding __FILE__ #define constant
It was not working correctly like in other compilers ignoring
#include
+ added __FILE__ and __LINE__ #define directives using dynamically
calculated results - now it works as expected respecting #include
directives and the implementation is local to PP without any hacks
in core compiler code.
* harbour/contrib/hbct/files.c
* added support for optional milliseconds part in HB_FSETDATETIME()/
HB_FGETDATETIME().
* harbour/source/rtl/philes.c
! minor fix in return value
* include/hbdefs.h
* contrib/gtwvg/gtwvg.h
* contrib/gtwvg/wvggui.h
* contrib/examples/terminal/trm_client.prg
+ Added HB_EXTERN_START/END.
* include/hbdefs.h
+ Added some comments from the original mail from Przemek.
* harbour/contrib/gtwvg/wvgcore.c
! Fixed hb_wvt_Get|SetStringAttrib()s to respect return errcode.
+ harbour/contrib/examples/terminal
+ harbour/contrib/examples/terminal/terminal.prg
+ harbour/contrib/examples/terminal/terminal.ch
+ harbour/contrib/examples/terminal/trm_server.prg
+ harbour/contrib/examples/terminal/trm_client.prg
+ harbour/contrib/examples/terminal/trm_appn.prg
+ harbour/contrib/examples/terminal/reame.txt
+ Added components for Harbour Terminal Protocol
Welcome in the world of Harbour Terminal Protocol
=================================================
Harbour Terminal Protocol is build on three components:
1) Terminal Server
2) Terminal Client
3) The Harbour Application
Terminal Server
===============
Source => trm_server.prg
Link => GTWVG
Run => trm_server.exe 2011
Parameter => <TCP/IP Port number - [D] 8085 ]
Mode => MT ( Multi Threaded )
Terminal Server will reside on the same machine or network ( as of now )
where Harbour Application resides. Harbour Application must be able
to be run by ShellExecute() WINAPI function issued by the Terminal Server.
Terminal Client
===============
Source => trm_client.prg
Link => GTWVG
Run => trm_client.exe <IP - 127.0.0.1 | vouch.dynalias.com>
<Port where Terminal Server is Listening - 2011>
<Harbour Application - c:\harbour\contrib\examples\terminal\trm_appn.exe>
[Parameters - Norammly Supplied to Appln - Separated by SPACE ]
[InitDirectory - Harbour Application's Startup Folder ]
Mode => ST ( Single Threaded )
Terminal Client can be distributed anywhere there is ACCESS TO designated TCP/IP port,
be it a network clinet or any computer having internet avalable.
Parameters supplied TO Harbour Client can be on command line or as an .ini file.
.Ini file may contain these entries:
ServerIP = 127.0.0.1 | vouch.dynalias.com
ServerPort = 2011
Application = c:\harbour\contrib\examples\terminal\trm_appn.exe
Parameters = any number of parameters separated by a space
InitDirectory = Complete Folder path from where Harbour Appln will be invoked.
IF parameters are supplied as .ini file, then .ini filename ( without path ) will be the
only parameter - note - only one parameter passed on the command line.
Harbour Application
===================
Source(s) => trm_appn.prg | Your program sources +
terminal.prg +
terminal.ch
Link => GTWVG
Run => No
Mode => ST ( Single Thread )
Main() FUNCTION in Harbour Application will have TO be modified TO accept
one additional parameter <cServerInfo> at the END of the usual parameters
your application is accepting as ususal. And make sure that you send the same
number of parameter either on the command line or through .ini file.
<cServerInfo> parameter is supplied by Harbour Terminal Server.
At just start of the Harbour Application, immediately after variable definitions
in main() add these lines:
FUNCTION Main( [p1] [, p2] [, p3], cServerInfo )
LOCAL x, y
// Required it initialize the GTWVG window
SetColor( 'N/W,W/B,W+/N' )
CLS
? ' '
#ifdef __REMOTE__
// cServerInfo will be supplied by the Remote Server
//
RmtSvrSetInfo( cServerInfo )
IF ( nServerPort := RmtSvrSetInfo( 1 ) ) <> NIL .and. nServerPort > 0
IF !RmtSvrInitialize( NTRIM( nServerPort ), 60/*nTimeoutClient*/, 0.5 /*nTimeRefresh*/ )
Quit
ENDIF
ENDIF
#endif
...
...
RETURN
Must remember to issue - ANNOUNCE HB_NOSTARTUPWINDOW - somewhere in your sources
Please note that we do not want to show up the Harbour console on the server so
HB_NOSTARTUPWINDOW symbol must be defined.
And this is the only requirement for your appln to be NET ready.
Technical Overview
==================
Client connects to Server.
Server looks for a free port - 45000+.
Server invokes Harbour Application with client supplied parameters + <cSerrverInfo==45000+>.
Harbour Application itself behaves as server on start listening on designated port.
Server informs back to Client about this port where Harbour Application is listening.
Client connects to Harbour Application on designated port.
If connection is successful, Server closes the connection from Client and Application.
Client and Application then have the direct communication.
Client transmits the keystrokes and Application reacts TO those events as IF supplied via keyboard.
Application transmits the screen buffer back TO client IF there have been any changes.
Application also transmits special commands, call them 'Remote Procedure Calls'.
Client responds TO received buffer according TO instruction it contains.
Client retrieves buffer per command basis.
Events are not serialized.
The Bottom Line
===============
The protocol above works as expected but is not as sophisticated as it should be.
GTNET as Przemek has been talking about will be the perfect solution though this
can be the basis FOR future enhancements. A lot can be improved, i.e., remote
printing, etc., which I hope you Gurus can implement in no times.
It is my humble contribution TO the Harbour world.
Regards
Pritpal Bedi <pritpal@vouchcac.com>
a student of software analysis & design
+ harbour/include/hbwapi.h
As this header will be required fot many libraries in contrib
I have placed it in core folder. It will pave me the way to
isolated WINAPI wrappers as discussed earlier. Before I begin to
shift functions in harbour/contrib/hbwin please feel free to
include in this header whatever you feel will be required
for such transition.
* source/lang/msgrukoi.c
* source/lang/msgruwin.c
* source/lang/msguakoi.c
* source/lang/msguawin.c
* source/lang/msgru866.c
* source/lang/msgua866.c
! Fixed date format to be DD.MM.YYYY.
* harbour/contrib/gtwvg/wvgwin.c
* harbour/contrib/gtwvg/wvgsink.c
* harbour/contrib/gtwvg/wvgax.prg
* harbour/contrib/gtwvg/wvgdlg.prg
* harbour/contrib/gtwvg/wvgmenub.prg
* harbour/contrib/gtwvg/wvgparts.ch
* harbour/contrib/gtwvg/wvgphdlr.prg
* harbour/contrib/gtwvg/wvgstatc.prg
* harbour/contrib/gtwvg/wvgtoolb.prg
* harbour/contrib/gtwvg/wvgwnd.prg
! Numerous enhancements and fixes, difficult to remember as
most are spread over a long time and where I had no means
to update them. But all are synchronized with changes
effected till date by others.
* source/rtl/binnumx.c
* Added rewritten versions of these functions:
a proper license: BIN2U(), W2BIN(), U2BIN()
; Work of Przemek.
* source/rtl/binnum.c
! Readded old copyright holder as co-holder.
* COPYING
* doc/license.txt
* source/rtl/binnum.c
* Added rewritten versions of these functions, now with
a proper license: BIN2W(), BIN2I(), BIN2L(), I2BIN(), L2BIN()
; Thanks to Przemek.
* COPYING
* source/rtl/philes.c
! Fixed license to have the Harbour exception, in agreement
with the group and main copyright holders.
* Minor cleanup to HB_FGETDATETIME().
* harbour/include/hbextern.ch
* harbour/source/rtl/philes.c
+ added HB_FGETDATETIME(). A "brother" of function HB_FGETDATETIME().
; TODO: BTW, hb_fs*() functions can get a better precision
(milliseconds). It would be nice to support it also at .prg level.
* contrib/gtwvg/wvgutils.c
! Applied fixes done to WIN_APPENDMENU() to the exact
same function named WVT_APPENDMENU().
% Converted WVT_APPENDMENU() to a simple stub redirecting
the call to WIN_APPENDMENU().
* contrib/gtwvg/wvgwin.c
! Fixed to use hb_snprintf() instead of unsafe sprintf().
! Fixed WIN_APPENDMENU() to not directly modify Harbour string buffer
(when compiled in non-Unicode mode).
! Fixed WIN_APPENDMENU() to modify string _before_ converting it to Unicode.
(when compiled in Unicode mode).
; This clears the GPF previously reported by me.
* harbour/contrib/gtwvg/wvgwin.c
* harbour/contrib/gtwvg/wvgsink.c
* pacified MinGW warnings. This one:
../../wvgsink.c:368: warning: comparison of unsigned expression < 0
is always false
Should be checked by author. Pritpal can you look at it?
'count' is declared as WORD so it cannot be negative.
* source/rtl/gtwvt/gtwvt.c
* BYTE -> CHAR (Windows) - UNDONE.
* include/hbdefs.h
+ Added (commented) new types. Work in progress, incomplete.
* contrib/hbssl/ssl.c
- Temporary disabled SSL_GET_READ_AHEAD() as a workaround for
BCC linking problem with SSL_get_read_ahead() OpenSSL
library function (symbol is unresolved due to missing
leading underscore in implib generated ssleay32.lib file).
* source/vm/set.c
% hb_fsFile() -> hb_fsFileExists()
* source/rtl/hbffind.c
* HB_WIN_32_MATCH -> HB_WIN_MATCH
* doc/whatsnew.txt
* include/hbsetup.h
* source/vm/fm.c
* #define HB_FM_WIN32_ALLOC renamed to HB_FM_WIN_ALLOC.
; INCOMPATIBLE: For those who are using this switch, please
update your make files.
* source/rtl/tpopup.prg
! Fixed to draw separator lines with BOX GT attributes,
so that they appear properly.
* harbour/include/hbapi.h
* harbour/source/vm/cmdarg.c
+ added const char * hb_cmdargARGVN( int argc )
* harbour/source/vm/cmdarg.c
* try to convert executable file name argument in argv[0] to
absolute path if it's relative one. Respect PATH envvar it necessary.
* harbour/source/common/hbdate.c
* formatting
* harbour/source/rtl/philes.c
* harbour/source/rtl/errorint.c
* harbour/source/rtl/filesys.c
! use hb_cmdargARGVN(n) instead of hb_cmdargARGV()[n] to avoid
possible GPF if some function will be called before argument
initialization
* removed additional logic which tries to convert relative paths
in file name from hb_fsBaseDirBuff() and HB_PROGNAME() functions
* contrib/hbssl/Makefile
+ Added new detection dir.
* source/rtl/gtwvt/gtwvt.c
+ Added support for HB_GTI_BOXCP.
(available for UNICODE builds only).
* source/rtl/filesys.c
+ Added (untested) support for *NIX system to
hb_fsBaseDirBuff() / HB_DIRBASE().
* harbour/source/vm/classes.c
* covered some old functions marked as deprecated long time ago
by HB_LEGACY_LEVEL2 macro
* harbour/source/rtl/hbgtcore.c
* harbour/contrib/hbct/ctwin.c
* harbour/contrib/hbct/keyset.c
* harbour/contrib/hbct/misc3.c
* harbour/contrib/hbnf/numlock.c
* harbour/contrib/hbnf/shift.c
* harbour/contrib/hbnf/alt.c
* harbour/contrib/hbnf/ctrl.c
* harbour/contrib/hbnf/caplock.c
* use memset( >Info, 0, sizeof( gtInfo ) ); to initialize
HB_GT_INFO structure - it also fixes possible problems with
uninitialized pNewVal2 member in few cases.
* doc/whatsnew.txt
* include/hbextern.ch
* source/vm/runner.c
* source/rdd/dbcmd.c
* __HRB*() functions marked as HB_LEGACY_LEVEL2 compatibility,
please update your code to use HB_HRB*().
* __RDDGETTEMPALIAS() marked as HB_LEGACY_LEVEL2 compatibility,
please update your code to use HB_RDDGETTEMPALIAS().
; I've permanently remove these symbols from hbextern.ch, so
regardless of the legacy setting, hbrun won't have them
anymore. This is merely technical, as it would need some
hacks in the make system to push through HB_LEGACY_OFF
to pptable.c generation. If someone wants to deal with
this, even better.
* include/hbstdgen.ch
* Added #undef __FILE__.
* include/hbsetup.ch
* Minor.
* doc/whatsnew.txt
* include/clipdefs.h
* include/filesys.api
* include/gt.api
* include/hbapi.h
* include/hbapierr.h
* include/hbapifs.h
* include/hbapigt.h
* include/hbapiitm.h
* include/hbapirdd.h
* include/hbdefs.h
* include/hbgfxdef.ch
* include/hbgtinfo.ch
* include/hbsetup.ch
* include/hbsetup.h
* include/item.api
* include/rdd.api
* source/rtl/errorapi.c
* source/rtl/filesys.c
* source/vm/cmdarg.c
* common.mak
- source/vm/debugold.c
* source/vm/Makefile
* source/vm/vmmt/Makefile
- Permanently disabled HB_LEGACY_LEVEL support.
+ Added HB_LEGACY_LEVEL2 support to protect some
recently made incompatible changes. Old methods
are supported until Harbour 1.2. Please update
your code until then. To test your code for
compatibility with recent changes, you can turn
off legacy support manually by #defining HB_LEGACY_OFF.
(HB_USER_CFLAGS=-DHB_LEGACY_OFF)
This is recommended on local systems for all
Harbour developers.
* harbour/contrib/examples/uhttpd/uhttpd.prg
* Updated uHTTPD (Work in progress)
+ Added support for Sessions
* Fixed ini file support
* harbour/contrib/examples/uhttpd/cgifunc.prg
* Fixed some functions
+ harbour/contrib/examples/uhttpd/session.prg
+ Session class
* harbour/contrib/examples/uhttpd/modules/info.prg
+ Added display of SESSION vars
+ Added a simple example of SESSIONS
* harbour/contrib/examples/uhttpd/hbmk_b32.bat
* harbour/contrib/examples/uhttpd/hbmk_b32.bat
+ Added new files
+ harbour/contrib/examples/uhttpd/sessions
+ Added folder used in samples
* include/hbapigt.h
* source/rtl/gtfunc.c
+ Extended HB_GT_INFO structure with nPCount member.
* include/hbgtinfo.ch
* include/hbgtcore.h
* source/rtl/hbgtcore.c
+ Added HB_GTI_CARGO. This can be used to store whatever
user defined value on a per GT basis.
HB_GTINFO( HB_GTI_CARGO[, <xValue ] ) -> <xPrevValue>
* source/rtl/hbgtcore.c
! hb_gt_def_Alert() fixed to also initialize pNewVal2 with NULL.
(didn't cause any real-world harm).
* contrib/hbwin/win_tprn.prg
% Minor optimizations.
* harbour/source/rdd/hsx/hsx.c
* keep HSX indexes in global table synced by mutex instead of
using thread storage data (TSD) on HVM stack. It allows to
move HSX indexes between threads, f.e. when workarea is moved
by HB_DEATCH()/HB_REQUEST()
* source/rtl/fstemp.c
! Added cast for MSVC warning. (this code part was
formerly only active for non-Windows builds)
* include/hbapifs.h
* source/rtl/fstemp.c
* source/rtl/filebuf.c
* UCHAR -> BYTE in new FS functions, for consistency.
* include/hbapifs.h
* source/rtl/spfiles.c
+ Added hb_spFileExists(). Same as hb_spFile(), but uses
the more efficient (especially on networks) hb_fsFileExists()
call to check for file exitance.
[ not very elegant solution, as I've just copied the
whole function, and changed the file existance call, maybe
a worker function + passing the check function pointer
could help, but the hb_fsFile() and hb_fsFileExists() workings
differ slightly. ]
* source/rdd/dbfntx/dbfntx1.c
* source/rdd/dbfnsx/dbfnsx1.c
* source/rdd/dbfcdx/dbfcdx1.c
* source/rdd/dbf1.c
% Using hb_spFileExists() instead of hb_spFile().
This API also works for dirs where use doesn't have file listing
rights, which may create a slight incompatibility by finding
files which weren't found by former method (and by Clipper).
C:\WINDOWS\TEMP\*.* were such when logged in as non-admin user,
but this dir is only used as a default TEMP dir for DOS programs.
Please speak up if you find this issue (or something else) to
be problem.
* source/rtl/file.c
* File naming standardized.
* doc/whatsnew.txt
* Minor updates.