2009-10-14 21:37 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* utils/hbmk2/hbmk2.prg
    + Added .d file parsing routines contributed by Przemek.
      with few minor adaptations for hbmk2 and formatting.
    ; NOTE: Not yet used.

  * contrib/hbwin/tests/testole.prg
    + Added PocketSOAP example. Contributed by Toninho.
This commit is contained in:
Viktor Szakats
2009-10-14 19:38:47 +00:00
parent 2d330ec865
commit 190bb357f6
3 changed files with 100 additions and 5 deletions

View File

@@ -17,6 +17,15 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-10-14 21:37 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* utils/hbmk2/hbmk2.prg
+ Added .d file parsing routines contributed by Przemek.
with few minor adaptations for hbmk2 and formatting.
; NOTE: Not yet used.
* contrib/hbwin/tests/testole.prg
+ Added PocketSOAP example. Contributed by Toninho.
2009-10-14 20:09 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/gtwvt/gtwvt.c
+ Added _SET_OSCODEPAGE support for HB_GTINFO( HB_GTI_WINTITLE )

View File

@@ -32,7 +32,8 @@ PROCEDURE Main()
? "8) OpenOffice Open"
? "9) Send mail via CDO"
? "a) Read ADODB table"
? "b) SOAP client"
? "b) SOAP Toolkit client"
? "c) PocketSOAP client"
? "0) Quit"
? "> "
@@ -61,6 +62,8 @@ PROCEDURE Main()
Exm_ADODB()
ELSEIF nOption == Asc( "b" )
Exm_SOAP()
ELSEIF nOption == Asc( "c" )
Exm_PocketSOAP()
ELSEIF nOption == Asc( "0" )
EXIT
ENDIF
@@ -445,3 +448,23 @@ STATIC PROCEDURE Exm_SOAP()
ENDIF
RETURN
STATIC PROCEDURE Exm_PocketSOAP()
LOCAL oEnvelope := win_oleCreateObject( "PocketSOAP.Envelope.2" )
LOCAL oHttp := win_oleCreateObject( "PocketSOAP.HTTPTransport.2" )
IF ! Empty( oEnvelope ) .OR. ! Empty( oHttp )
oEnvelope:EncodingStyle := ""
oEnvelope:SetMethod( "InvertStringCase", "http://www.dataaccess.com/webservicesserver/" )
oEnvelope:Parameters:Create( "sAString", "lower UPPER" )
oHttp:Send( "http://www.dataaccess.com/webservicesserver/textcasing.wso?WSDL", oEnvelope:Serialize() )
oEnvelope:Parse( oHttp )
? oEnvelope:Parameters:Item( 0 ):Value
ELSE
? "Error: PocketSOAP not available.", win_oleErrorText()
ENDIF
RETURN

View File

@@ -377,17 +377,17 @@ PROCEDURE Main( ... )
FOR EACH tmp IN aArgsProc
DO CASE
CASE Lower( FN_ExtGet( tmp ) ) == ".hbp" .AND. ! lHadTarget
nTarget++
++nTarget
IF nTarget == nTargetTODO
AAdd( aArgsTarget, tmp )
ENDIF
CASE Lower( Left( tmp, Len( "-target=" ) ) ) == "-target="
nTarget++
++nTarget
IF nTarget == nTargetTODO
AAdd( aArgsTarget, SubStr( tmp, Len( "-target=" ) + 1 ) )
ENDIF
CASE Lower( tmp ) == "-target"
nTarget++
++nTarget
lHadTarget := .T.
CASE Lower( tmp ) == "-alltarget"
lHadTarget := .F.
@@ -411,7 +411,7 @@ PROCEDURE Main( ... )
EXIT
ENDIF
nTargetTODO++
++nTargetTODO
ENDDO
IF nResult != 0 .AND. lPause
@@ -4756,6 +4756,69 @@ STATIC FUNCTION FindNewerHeaders( hbmk, cFileName, cParentDir, tTimeParent, lInc
RETURN headstate[ _HEADSTATE_lAnyNewer ]
STATIC FUNCTION deplst_read( cFileName )
LOCAL cFileBody := MemoRead( cFileName )
LOCAL cList := "", cLine
LOCAL nLine := 0
LOCAL hDeps := {=>}
cFileBody := StrTran( cFileBody, Chr( 13 ) + Chr( 10 ), Chr( 10 ) )
cFileBody := StrTran( cFileBody, Chr( 9 ), Chr( 32 ) )
FOR EACH cLine IN hb_ATokens( cFileBody, Chr( 10 ) )
++nLine
cLine := AllTrim( cLine )
IF cLine == "\" .OR. right( cLine, 2 ) == " \"
cList += Left( cLine, Len( cLine ) - 1 )
ELSE
cList += cLine
IF ! deplst_add( hDeps, cList )
hbmk_OutErr( hb_StrFormat( I_( "Error: In %1$s at line %2$s %3$s:" ), cFileName, hb_ntos( nLine ), cList ) )
RETURN NIL
ENDIF
cList := ""
ENDIF
NEXT
IF ! deplst_add( hDeps, cList )
hbmk_OutErr( hb_StrFormat( I_( "Error: In %1$s at line %2$s %3$s:" ), cFileName, hb_ntos( nLine ), cList ) )
RETURN NIL
ENDIF
RETURN hDeps
STATIC FUNCTION deplst_add( hDeps, cList )
LOCAL cFile
LOCAL aList
LOCAL n
IF ! Empty( cList )
n := At( ":", cList )
IF n != 0 .AND. ! Empty( cFile := AllTrim( Left( cList, n - 1 ) ) )
aList := hb_ATokens( SubStr( cList, n + 1 ) )
IF cFile $ hDeps
AMerge( hDeps[ cFile ], aList )
ELSE
hDeps[ cFile ] := aList
ENDIF
ELSE
RETURN .F.
ENDIF
ENDIF
RETURN .T.
STATIC FUNCTION AMerge( aDst, aSrc )
LOCAL ITEM
FOR EACH item IN aSrc
IF hb_AScan( aDst, item,,, .T. ) == 0
AAdd( aDst, item )
ENDIF
NEXT
RETURN aDst
STATIC FUNCTION FindHeader( hbmk, cFileName, cParentDir, aINCTRYPATH )
LOCAL cDir