From 7b9478df7e33d584c5ef80080cc4a55032f35dfb Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sat, 15 May 2010 20:21:32 +0000 Subject: [PATCH] 2010-05-15 22:21 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * doc/howtosvn.txt * More clearing up. * contrib/hbwin/win_srv.c ! Fixed one TOFIX which was result of s&r on my part. ; TOFIX remaining: --- ../../../win_srv.c: In function 'hbwin_SrvFunction': ../../../win_srv.c:102:4: warning: passing argument 1 of 'RegisterServiceCtrlHandlerW' from incompatible pointer type f:\devl\mingw-450\bin\../lib/gcc/mingw32/4.5.0/../../../../include/winsvc.h:234:40: note: expected 'LPCWSTR' but argument is of type 'char *' ../../../win_srv.c: In function 'HB_FUN_WIN_SERVICESTART': ../../../win_srv.c:279:21: warning: assignment from incompatible pointer type ../../../win_srv.c:280:21: warning: assignment from incompatible pointer type --- --- harbour/ChangeLog | 22 +++++++++++++++++++--- harbour/contrib/hbwin/win_srv.c | 20 ++++++++++---------- harbour/doc/howtosvn.txt | 10 ++++------ 3 files changed, 33 insertions(+), 19 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index d0f1d91ef9..b6d83e4764 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,22 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-05-15 22:21 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * doc/howtosvn.txt + * More clearing up. + + * contrib/hbwin/win_srv.c + ! Fixed one TOFIX which was result of s&r on my part. + ; TOFIX remaining: + --- + ../../../win_srv.c: In function 'hbwin_SrvFunction': + ../../../win_srv.c:102:4: warning: passing argument 1 of 'RegisterServiceCtrlHandlerW' from incompatible pointer type + f:\devl\mingw-450\bin\../lib/gcc/mingw32/4.5.0/../../../../include/winsvc.h:234:40: note: expected 'LPCWSTR' but argument is of type 'char *' + ../../../win_srv.c: In function 'HB_FUN_WIN_SERVICESTART': + ../../../win_srv.c:279:21: warning: assignment from incompatible pointer type + ../../../win_srv.c:280:21: warning: assignment from incompatible pointer type + --- + 2010-05-15 21:27 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * doc/howtosvn.txt + Made it more clear that 'Chr(36)' should be replaced by '$'. @@ -46,9 +62,9 @@ ! Added some casts. % Variables declarations moved to inner scopes. ; TOFIX: - - UNICODE build problem in hbwin_SrvFunction(). - - possible memory corruption in WIN_SERVICESTART()? - - 'implicit declaration of function 'Sets_ServiceStatus'' in hbwin_SrvFunction(). + - UNICODE build problem in hbwin_SrvFunction(). [RELISTED] + - possible memory corruption in WIN_SERVICESTART()? [RELISTED] + - 'implicit declaration of function 'Sets_ServiceStatus'' in hbwin_SrvFunction(). [DONE] ; All the above are shown as mingw warnings. 2010-15-15 12:20 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) diff --git a/harbour/contrib/hbwin/win_srv.c b/harbour/contrib/hbwin/win_srv.c index fa407099f9..ac54ec5ac4 100644 --- a/harbour/contrib/hbwin/win_srv.c +++ b/harbour/contrib/hbwin/win_srv.c @@ -83,7 +83,7 @@ static void hbwin_ControlHandler( DWORD request ) } /* Report current status */ - Sets_ServiceStatus( s_hStatus, &s_ServiceStatus ); + SetServiceStatus( s_hStatus, &s_ServiceStatus ); } static void hbwin_SrvFunction( int argc, char** argv ) @@ -101,17 +101,13 @@ static void hbwin_SrvFunction( int argc, char** argv ) s_hStatus = RegisterServiceCtrlHandler( s_pszSrvName, ( LPHANDLER_FUNCTION ) hbwin_ControlHandler ); - if( s_hStatus == ( SERVICE_STATUS_HANDLE ) 0 ) - { - HB_TRACE( HB_TR_DEBUG, ( "Error registering service\n" ) ); - } - else + if( s_hStatus != ( SERVICE_STATUS_HANDLE ) 0 ) { PHB_DYNS pDynSym = hb_dynsymFindName( s_pszPrgFunction ); /* We report the running status to SCM. */ s_ServiceStatus.dwCurrentState = SERVICE_RUNNING; - Sets_ServiceStatus( s_hStatus, &s_ServiceStatus ); + SetServiceStatus( s_hStatus, &s_ServiceStatus ); if( pDynSym ) { @@ -124,6 +120,10 @@ static void hbwin_SrvFunction( int argc, char** argv ) } } } + else + { + HB_TRACE( HB_TR_DEBUG, ( "Error registering service\n" ) ); + } } #endif @@ -141,7 +141,7 @@ HB_FUNC( WIN_SERVICESETSTATUS ) /* dwStatus */ { #if ! defined( HB_OS_WIN_CE ) s_ServiceStatus.dwCurrentState = ( DWORD ) hb_parnl( 1 ); - hb_retl( Sets_ServiceStatus( s_hStatus, &s_ServiceStatus ) ); + hb_retl( SetServiceStatus( s_hStatus, &s_ServiceStatus ) ); #else hb_retl( HB_FALSE ); #endif @@ -151,7 +151,7 @@ HB_FUNC( WIN_SERVICESETEXITCODE ) /* dwExitCode */ { #if ! defined( HB_OS_WIN_CE ) s_ServiceStatus.dwWin32ExitCode = ( DWORD ) hb_parnl( 1 ); - hb_retl( Sets_ServiceStatus( s_hStatus, &s_ServiceStatus ) ); + hb_retl( SetServiceStatus( s_hStatus, &s_ServiceStatus ) ); #else hb_retl( HB_FALSE ); #endif @@ -161,7 +161,7 @@ HB_FUNC( WIN_SERVICESTOP ) { #if ! defined( HB_OS_WIN_CE ) s_ServiceStatus.dwCurrentState = SERVICE_STOPPED; - Sets_ServiceStatus( s_hStatus, &s_ServiceStatus ); + SetServiceStatus( s_hStatus, &s_ServiceStatus ); #endif } diff --git a/harbour/doc/howtosvn.txt b/harbour/doc/howtosvn.txt index e95ba0117c..e22dfeba84 100644 --- a/harbour/doc/howtosvn.txt +++ b/harbour/doc/howtosvn.txt @@ -183,16 +183,14 @@ To add one to a file lacking it simply put as first lines: * Chr(36) + "Id" + Chr(36) */ -IMPORTANT: In real code, replaces 'Chr(36)' with '$' signes. +IMPORTANT 1: In real code, replace 'Chr(36)' with '$' signes. as soon as you commit your file SVN ID string will be expanded by SVN server to full length. -Note that last dollar sign is mandatory. - -Run these commands and commit: -svn propset svn:keywords "Author Date Id Revision" "filename" -svn propset svn:eol-style native "filename" +IMPORTANT 2: Run these commands and commit: + svn propset svn:keywords "Author Date Id Revision" "filename" + svn propset svn:eol-style native "filename" [ Copyright (c) 1999-2009 Viktor Szakats (harbour.01 syenar.hu)