2010-01-13 15:10 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* include/hbsetup.ch
* Disabled HB_LEGACY_LEVEL2 by default.
* HB_LEGACY_OFF now controls HB_LEGACY_LEVEL3 (was HB_LEGACY_LEVEL2).
+ Added HB_LEGACY_LEVEL4
; SVN users notice: This may make your C code INCOMPATIBLE with
this version, please review required changes (documented in older
ChangeLog entries) and update your code. Look for HB_LEGACY_LEVEL2
and INCOMPATIBLE keywords.
* contrib/hbnetio/utils/netiosrv.prg
+ contrib/hbnetio/utils/modules.hbp
+ contrib/hbnetio/utils/modules
+ contrib/hbnetio/utils/modules/test.prg
+ Added simple command line to server.
+ Added list of possible feature as TODO. Most of these will
need backend support from hbnetio lib.
+ Added detailed help screen.
+ Added --version option support.
+ Added support for -rpc=file.hrb option. Although for some
reason (most likely my omission) it doesn't work yet.
+ -DHB_EXTERN will now enable inclusion of all core functions.
+ Added build file for .hrb modules.
+ Added little test module.
+ Added SETCANCEL( .F. ) to avoid irregular shutdown with Ctrl+C.
* src/rtl/memoedit.prg
! Deleted hack which explicitly set lastkey to CTRL_END/W
when exiting with changes saved. The comment said that
it was added to make DBU happy, but it doesn't seem to be
necessary anymore, at least I couldn't spot any problem
without it. Pls check it.
! Fixed MEMOEDIT() not recognizing K_ESC as exit key when
custom function is used.
This fixes DBU not recognizing K_ESC as a way to exit
memo editing. Please review, I'm not MEMOEDIT() user
and this was such an obvious omission that I wonder
if there was some real reason for it. Anyhow it was
wrong before.
* contrib/hbfimage/fi_wrp.c
* contrib/hbclipsm/num.c
* contrib/hbclipsm/numfloor.c
* contrib/hbclipsm/status.c
* contrib/hbclipsm/numceil.c
* Formatting.
This commit is contained in:
@@ -17,6 +17,53 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2010-01-13 15:10 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* include/hbsetup.ch
|
||||
* Disabled HB_LEGACY_LEVEL2 by default.
|
||||
* HB_LEGACY_OFF now controls HB_LEGACY_LEVEL3 (was HB_LEGACY_LEVEL2).
|
||||
+ Added HB_LEGACY_LEVEL4
|
||||
; SVN users notice: This may make your C code INCOMPATIBLE with
|
||||
this version, please review required changes (documented in older
|
||||
ChangeLog entries) and update your code. Look for HB_LEGACY_LEVEL2
|
||||
and INCOMPATIBLE keywords.
|
||||
|
||||
* contrib/hbnetio/utils/netiosrv.prg
|
||||
+ contrib/hbnetio/utils/modules.hbp
|
||||
+ contrib/hbnetio/utils/modules
|
||||
+ contrib/hbnetio/utils/modules/test.prg
|
||||
+ Added simple command line to server.
|
||||
+ Added list of possible feature as TODO. Most of these will
|
||||
need backend support from hbnetio lib.
|
||||
+ Added detailed help screen.
|
||||
+ Added --version option support.
|
||||
+ Added support for -rpc=file.hrb option. Although for some
|
||||
reason (most likely my omission) it doesn't work yet.
|
||||
+ -DHB_EXTERN will now enable inclusion of all core functions.
|
||||
+ Added build file for .hrb modules.
|
||||
+ Added little test module.
|
||||
+ Added SETCANCEL( .F. ) to avoid irregular shutdown with Ctrl+C.
|
||||
|
||||
* src/rtl/memoedit.prg
|
||||
! Deleted hack which explicitly set lastkey to CTRL_END/W
|
||||
when exiting with changes saved. The comment said that
|
||||
it was added to make DBU happy, but it doesn't seem to be
|
||||
necessary anymore, at least I couldn't spot any problem
|
||||
without it. Pls check it.
|
||||
! Fixed MEMOEDIT() not recognizing K_ESC as exit key when
|
||||
custom function is used.
|
||||
This fixes DBU not recognizing K_ESC as a way to exit
|
||||
memo editing. Please review, I'm not MEMOEDIT() user
|
||||
and this was such an obvious omission that I wonder
|
||||
if there was some real reason for it. Anyhow it was
|
||||
wrong before.
|
||||
|
||||
* contrib/hbfimage/fi_wrp.c
|
||||
* contrib/hbclipsm/num.c
|
||||
* contrib/hbclipsm/numfloor.c
|
||||
* contrib/hbclipsm/status.c
|
||||
* contrib/hbclipsm/numceil.c
|
||||
* Formatting.
|
||||
|
||||
2010-01-13 13:07 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/src/rdd/hbsix/sxcompat.prg
|
||||
! fixed bug reported by Stupar: OrdSetFocus() used instead of OrdNumber()
|
||||
@@ -52,6 +99,7 @@
|
||||
! fixed GPF in FILEDRIVE() function on platforms which do not support
|
||||
drive letters or when path does not contain drive.
|
||||
% small optimization in FILEPATH(), FILEBASE(), FILEEXT(), FILEDRIVE()
|
||||
[TOMERGE 2.0]
|
||||
|
||||
2010-01-11 18:12 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
* contrib/hbqt/generator/hbqtgen.prg
|
||||
@@ -61,9 +109,9 @@
|
||||
* contrib/hbqt/qtnetwork/*
|
||||
+ Implemented Linguistic Translation Mechanism base call.
|
||||
The next step is to feed translations into Qt's engine.
|
||||
This means any string sent to QWidgets will be translated
|
||||
This means any string sent to QWidgets will be translated
|
||||
through the language set with hbqt_SetCodecForTr( cCodec ).
|
||||
The translated string is in the context of the widget it
|
||||
The translated string is in the context of the widget it
|
||||
is being applied to.
|
||||
|
||||
TODO: Feed the translations from outer source.
|
||||
@@ -150,6 +198,7 @@
|
||||
* contrib/hbssl/pem.c
|
||||
! Wrapped hb_vmEvalBlockV() calls between hb_vmRequestReender()
|
||||
and hb_vmRequestRestore() call pairs.
|
||||
[TOMERGE 2.0]
|
||||
|
||||
2010-01-12 15:21 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/examples/gtwvw/gtwvw.c
|
||||
|
||||
@@ -72,9 +72,7 @@ HB_FUNC( DTOR )
|
||||
HB_FUNC( NUMASLOG10 )
|
||||
{
|
||||
if( HB_ISNUM( 1 ) )
|
||||
{
|
||||
hb_retnd( log10( hb_parnd(1) ) );
|
||||
}
|
||||
}
|
||||
|
||||
/* NumGetDecimals( <nNumber> ) --> nDecimals
|
||||
@@ -85,9 +83,7 @@ HB_FUNC( NUMGETDECIMALS )
|
||||
int iDec = 0;
|
||||
|
||||
if( HB_ISNUM( 1 ) )
|
||||
{
|
||||
hb_itemGetNLen( hb_param( 1, HB_IT_NUMERIC ), NULL, &iDec );
|
||||
}
|
||||
|
||||
hb_retnl( iDec );
|
||||
}
|
||||
|
||||
@@ -59,5 +59,5 @@
|
||||
*/
|
||||
HB_FUNC( CEILING )
|
||||
{
|
||||
hb_retnl( (long) ceil( hb_parnd( 1 ) ) );
|
||||
hb_retnl( ( long ) ceil( hb_parnd( 1 ) ) );
|
||||
}
|
||||
|
||||
@@ -59,5 +59,5 @@
|
||||
*/
|
||||
HB_FUNC( FLOOR )
|
||||
{
|
||||
hb_retnl( (long) floor( hb_parnd( 1 ) ) );
|
||||
hb_retnl( ( long ) floor( hb_parnd( 1 ) ) );
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ HB_FUNC( STATUSUPDATE )
|
||||
|
||||
if( pArray )
|
||||
{
|
||||
const char * szDisplay = "|/-\\";
|
||||
const char * szDisplay = "|/-\\";
|
||||
long lCurrent = hb_arrayGetNL( pArray, ST_CURRENT );
|
||||
char * szOldColor[ HB_CLRSTR_LEN ];
|
||||
PHB_ITEM pCurrent = hb_itemNew( NULL );
|
||||
|
||||
@@ -855,8 +855,8 @@ HB_FUNC( FI_GETIMAGETYPE )
|
||||
/* DLL_API BOOL DLL_CALLCONV FreeImage_IsLittleEndian(void); */
|
||||
HB_FUNC( FI_ISLITTLEENDIAN )
|
||||
{
|
||||
/* run function & return value */
|
||||
hb_retl( FreeImage_IsLittleEndian() );
|
||||
/* run function & return value */
|
||||
hb_retl( FreeImage_IsLittleEndian() );
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
6
harbour/contrib/hbnetio/utils/modules.hbp
Normal file
6
harbour/contrib/hbnetio/utils/modules.hbp
Normal file
@@ -0,0 +1,6 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
-gh
|
||||
modules/*.prg
|
||||
9
harbour/contrib/hbnetio/utils/modules/test.prg
Normal file
9
harbour/contrib/hbnetio/utils/modules/test.prg
Normal file
@@ -0,0 +1,9 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
FUNCTION HBNETIOSRV_RPCMAIN( sFunc, ... )
|
||||
|
||||
OutStd( "DO", sFunc:name, "WITH", ..., hb_osNewLine() )
|
||||
|
||||
RETURN sFunc:exec( ... )
|
||||
@@ -12,11 +12,28 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* The following parts are Copyright of the individual authors.
|
||||
* www - http://www.harbour-project.org
|
||||
*
|
||||
* Copyright 2010 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* ...
|
||||
*
|
||||
* See COPYING for licensing terms.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "hbhrb.ch"
|
||||
|
||||
/* netio_mtserver() needs MT HVM version */
|
||||
REQUEST HB_MT
|
||||
|
||||
#define _RPC_FILTER "HBNETIOSRV_RPCMAIN"
|
||||
|
||||
/* enable this if you need all core functions in RPC support */
|
||||
//REQUEST __HB_EXTERN__
|
||||
#ifdef HB_EXTERN
|
||||
REQUEST __HB_EXTERN__
|
||||
#endif
|
||||
|
||||
PROCEDURE Main( ... )
|
||||
LOCAL pListenSocket
|
||||
@@ -26,8 +43,12 @@ PROCEDURE Main( ... )
|
||||
LOCAL ifaddr := "0.0.0.0"
|
||||
LOCAL rootdir := hb_dirBase()
|
||||
LOCAL rpc := .F.
|
||||
LOCAL rpc_filename := NIL
|
||||
LOCAL rpc_hrb := NIL
|
||||
LOCAL passwd := NIL
|
||||
|
||||
LOCAL cCommand
|
||||
|
||||
HB_Logo()
|
||||
|
||||
FOR EACH cParam IN hb_AParams()
|
||||
@@ -40,8 +61,18 @@ PROCEDURE Main( ... )
|
||||
rootdir := SubStr( cParam, 10 )
|
||||
CASE Lower( Left( cParam, 6 ) ) == "-pass="
|
||||
passwd := SubStr( cParam, 7 )
|
||||
CASE Lower( Left( cParam, 5 ) ) == "-rpc="
|
||||
rpc_filename := SubStr( cParam, 6 )
|
||||
rpc_hrb := hb_hrbLoad( rpc_filename )
|
||||
rpc := ! Empty( rpc_hrb ) .AND. ! Empty( hb_hrbGetFunSym( rpc_hrb, _RPC_FILTER ) )
|
||||
IF ! rpc
|
||||
rpc_filename := NIL
|
||||
rpc_hrb := NIL
|
||||
ENDIF
|
||||
CASE Lower( cParam ) == "-rpc"
|
||||
rpc := .T.
|
||||
CASE Lower( cParam ) == "--version"
|
||||
RETURN
|
||||
CASE Lower( cParam ) == "-help" .OR. ;
|
||||
Lower( cParam ) == "--help"
|
||||
HB_Usage()
|
||||
@@ -51,7 +82,9 @@ PROCEDURE Main( ... )
|
||||
ENDCASE
|
||||
NEXT
|
||||
|
||||
pListenSocket := netio_mtserver( port, ifaddr, rootdir, rpc, passwd )
|
||||
SetCancel( .F. )
|
||||
|
||||
pListenSocket := netio_mtserver( port, ifaddr, rootdir, iif( Empty( rpc_hrb ), rpc, hb_hrbGetFunSym( rpc_hrb, _RPC_FILTER ) ), passwd )
|
||||
IF Empty( pListenSocket )
|
||||
OutStd( "Cannot start server." + hb_osNewLine() )
|
||||
ELSE
|
||||
@@ -59,13 +92,50 @@ PROCEDURE Main( ... )
|
||||
OutStd( "Root filesystem: " + rootdir + hb_osNewLine() )
|
||||
OutStd( "RPC support: " + iif( rpc, "enabled", "disabled" ) + hb_osNewLine() )
|
||||
OutStd( "Encryption: " + iif( passwd != NIL, "enabled", "disabled" ) + hb_osNewLine() )
|
||||
IF ! Empty( rpc_hrb )
|
||||
OutStd( "RPC filter module: " + rpc_filename + hb_osNewLine() )
|
||||
ENDIF
|
||||
|
||||
OutStd( hb_osNewLine() )
|
||||
OutStd( "Press any key to stop NETIO server." + hb_osNewLine() )
|
||||
Inkey( 0 )
|
||||
OutStd( "hbnetiosrv command prompt:", hb_osNewLine() )
|
||||
|
||||
/* Command prompt */
|
||||
DO WHILE .T.
|
||||
|
||||
OutStd( "hbnetiosrv$ " )
|
||||
ACCEPT TO cCommand
|
||||
OutStd( hb_osNewLine() )
|
||||
|
||||
/* TODO: - on the fly change of RPC filter modules
|
||||
- listing active connections
|
||||
- listing open files
|
||||
- listing active locks
|
||||
- activity meters (transferred bytes, bandwidth, etc)
|
||||
- showing number of connections
|
||||
- showing number of open files
|
||||
- listing transferred bytes
|
||||
- gracefully shutting down server by waiting for connections to close and not accept new ones
|
||||
- pausing server
|
||||
|
||||
- Command history with up/down
|
||||
- More powerful cmdline editor
|
||||
- cut/paste support */
|
||||
|
||||
DO CASE
|
||||
CASE Lower( cCommand ) == "exit"
|
||||
EXIT
|
||||
CASE Lower( cCommand ) == "help"
|
||||
OutStd( "EXIT - Stop server and exit", hb_osNewLine() )
|
||||
CASE ! Empty( cCommand )
|
||||
OutStd( "Error: Unknown command.", hb_osNewLine() )
|
||||
ENDCASE
|
||||
ENDDO
|
||||
|
||||
netio_serverstop( pListenSocket )
|
||||
pListenSocket := NIL
|
||||
|
||||
OutStd( hb_osNewLine() )
|
||||
OutStd( "Server stopped.", hb_osNewLine() )
|
||||
ENDIF
|
||||
|
||||
RETURN
|
||||
@@ -81,7 +151,22 @@ STATIC PROCEDURE HB_Logo()
|
||||
|
||||
STATIC PROCEDURE HB_Usage()
|
||||
|
||||
OutStd( "Syntax: netiosrv [-port=<port>] [-iface=<ipaddr>] [-rootdir=<rootdir>] [-rpc] [-pass=<passwd>]" + hb_osNewLine() )
|
||||
OutStd( "Syntax:" , hb_osNewLine() )
|
||||
OutStd( hb_osNewLine() )
|
||||
OutStd( " netiosrv [options]" , hb_osNewLine() )
|
||||
OutStd( hb_osNewLine() )
|
||||
OutStd( "Options:" , hb_osNewLine() )
|
||||
OutStd( hb_osNewLine() )
|
||||
OutStd( " -port=<port> accept incoming connections on IP port <port>" , hb_osNewLine() )
|
||||
OutStd( " -iface=<ipaddr> accept incoming connections on IPv4 interface <ipaddress>" , hb_osNewLine() )
|
||||
OutStd( " -rootdir=<rootdir> use <rootdir> as root directory for served file system" , hb_osNewLine() )
|
||||
OutStd( " -rpc accept RPC requests" , hb_osNewLine() )
|
||||
OutStd( " -rpc=<file.hrb> set RPC processor .hrb module to <file.hrb>" , hb_osNewLine() )
|
||||
OutStd( hb_StrFormat( " file.hrb needs to have an entry function named %1$s()", _RPC_FILTER ), hb_osNewLine() )
|
||||
OutStd( " -pass=<passwd> set server password" , hb_osNewLine() )
|
||||
OutStd( hb_osNewLine() )
|
||||
OutStd( " --version display version header only" , hb_osNewLine() )
|
||||
OutStd( " -help|--help this help" , hb_osNewLine() )
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
@@ -79,10 +79,10 @@
|
||||
* NOTE: C code using legacy Clipper (.api) headers is unaffected.
|
||||
*/
|
||||
#ifndef HB_LEGACY_OFF
|
||||
#define HB_LEGACY_LEVEL2
|
||||
#define HB_LEGACY_LEVEL3
|
||||
#endif
|
||||
|
||||
/* Future level of legacy cleanup */
|
||||
#define HB_LEGACY_LEVEL3
|
||||
#define HB_LEGACY_LEVEL4
|
||||
|
||||
#endif /* HB_SETUP_CH_ */
|
||||
|
||||
@@ -199,9 +199,13 @@ METHOD HandleUserKey( nKey, nUserKey ) CLASS HBMemoEditor
|
||||
|
||||
// HBEditor is not able to handle keys with a value higher than 256, but I have to tell him
|
||||
// that user wants to save text
|
||||
IF ( nKey <= 256 .OR. nKey == K_ALT_W )
|
||||
DO CASE
|
||||
CASE nKey == K_ESC
|
||||
::lSaved := .F.
|
||||
::lExitEdit := .T.
|
||||
CASE nKey <= 256 .OR. nKey == K_ALT_W
|
||||
::super:Edit( nKey )
|
||||
ENDIF
|
||||
ENDCASE
|
||||
|
||||
// TOFIX: Not CA-Cl*pper compatible, see teditor.prg
|
||||
CASE ( nUserKey >= 1 .AND. nUserKey <= 31 ) .OR. nUserKey == K_ALT_W
|
||||
@@ -308,8 +312,6 @@ FUNCTION MemoEdit( cString,;
|
||||
oEd:Edit()
|
||||
IF oEd:Changed()
|
||||
cString := oEd:GetText()
|
||||
// dbu tests for LastKey() == K_CTRL_END, so I try to make it happy
|
||||
HB_SetLastKey( K_CTRL_END )
|
||||
ENDIF
|
||||
SetCursor( nOldCursor )
|
||||
ENDIF
|
||||
|
||||
Reference in New Issue
Block a user