From b1d68f0a5e0aa4e170eece529d1e52347e2e6419 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Thu, 14 Jan 2010 00:45:19 +0000 Subject: [PATCH] 2010-01-14 01:44 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/compiler/harbour.y * harbour/src/compiler/harbour.yyh * harbour/src/compiler/harbour.yyc ! pacified compile time error when ... is used as parameter in _HB_MEMBRER declaration. TODO: Remove or fix this strong typing grammar rules. * harbour/src/debug/dbgtwin.prg * harbour/src/debug/dbgtmenu.prg * harbour/src/debug/tbrwtext.prg * harbour/src/debug/debugger.prg * harbour/src/debug/dbgtinp.prg * harbour/src/rtl/tbcolumn.prg * harbour/src/rtl/listbox.prg * harbour/src/rtl/pushbtn.prg * harbour/src/rtl/treport.prg * harbour/src/rtl/radiogrp.prg * harbour/src/rtl/tthreadx.prg * harbour/src/rtl/checkbox.prg * harbour/src/rtl/tsymbol.prg * harbour/src/rtl/teditor.prg * harbour/src/rtl/tmenuitm.prg * harbour/src/rtl/tbrowse.prg * harbour/contrib/hbmysql/tmysql.prg * harbour/contrib/xhb/stream.prg * harbour/contrib/xhb/trpccli.prg * harbour/contrib/xhb/hblognet.prg * harbour/contrib/xhb/tfile.prg * harbour/contrib/xhb/tframe.prg * harbour/contrib/xhb/htjlist.prg * harbour/contrib/xhb/hblog.prg * harbour/contrib/xhb/trpc.prg * harbour/contrib/xhb/thtm.prg * harbour/contrib/xhb/tcgi.prg * harbour/contrib/xhb/ttable.prg * harbour/contrib/xhb/txml.prg * harbour/contrib/xhb/hjwindow.prg * harbour/contrib/xhb/htmutil.prg * harbour/contrib/hbodbc/todbc.prg * harbour/contrib/hbfbird/tfirebrd.prg * harbour/contrib/xpp/tthreadx.prg * harbour/contrib/hbpgsql/tpostgre.prg * harbour/contrib/hbgd/gdchart.prg * harbour/contrib/hbgd/gdimage.prg * harbour/contrib/hbgd/gdbar.prg * harbour/contrib/hbgd/gdbarcod.prg * harbour/contrib/hbmisc/twirler.prg * harbour/contrib/hbtip/thtml.prg * harbour/contrib/hbtip/cgi.prg * harbour/contrib/hbtip/httpcli.prg * harbour/contrib/hbtip/smtpcli.prg * harbour/contrib/hbtip/client.prg * harbour/contrib/hbtip/ftpcli.prg * harbour/contrib/hbtip/mail.prg * harbour/contrib/hbtip/popcli.prg * harbour/contrib/hbwin/win_tprn.prg * harbour/contrib/hbbtree/tbtree.prg * harbour/utils/hbformat/hbformat.prg ! fixed class method declarations to be synced with method implementations All of the above missdeclarations were detected by compilation with: HB_USER_PRGFLAGS=-DHB_CLS_PARAMS_ERR Few years ago in hbclass.ch I defined PP rules to force strict method declarations but I had to disable them due to problems with old PP. I defined HB_CLS_NO_PARAMS_ERR and left this note in hbclass.ch: > I have to enable this definition by default until we will not fix > preprocessor. [druzus] Current PP code works correctly so we can remove it and activate this code. Anyhow as above commit shows a lot of code has been created with wrong declarations. I fixed Harbour core code (except HBQT, HBXBP and GTWVG - I hope Pritpal or Viktor will fix it) but setting HB_CLS_PARAMS_ERR as default will exploit a lot of similar problems in user code so I would like the hear other developers' opinions about it. --- harbour/ChangeLog | 73 + harbour/contrib/hbbtree/tbtree.prg | 8 +- harbour/contrib/hbfbird/tfirebrd.prg | 6 +- harbour/contrib/hbgd/gdbar.prg | 6 +- harbour/contrib/hbgd/gdbarcod.prg | 4 +- harbour/contrib/hbgd/gdchart.prg | 10 +- harbour/contrib/hbgd/gdimage.prg | 29 +- harbour/contrib/hbmisc/twirler.prg | 2 +- harbour/contrib/hbmysql/tmysql.prg | 2 +- harbour/contrib/hbodbc/todbc.prg | 2 +- harbour/contrib/hbpgsql/tpostgre.prg | 4 +- harbour/contrib/hbtip/cgi.prg | 10 +- harbour/contrib/hbtip/client.prg | 12 +- harbour/contrib/hbtip/ftpcli.prg | 10 +- harbour/contrib/hbtip/httpcli.prg | 2 +- harbour/contrib/hbtip/mail.prg | 24 +- harbour/contrib/hbtip/popcli.prg | 8 +- harbour/contrib/hbtip/smtpcli.prg | 6 +- harbour/contrib/hbtip/thtml.prg | 48 +- harbour/contrib/hbwin/legacy.prg | 2 +- harbour/contrib/hbwin/win_tprn.prg | 16 +- harbour/contrib/xhb/hblog.prg | 40 +- harbour/contrib/xhb/hblognet.prg | 24 +- harbour/contrib/xhb/hjwindow.prg | 8 +- harbour/contrib/xhb/htjlist.prg | 4 +- harbour/contrib/xhb/htmutil.prg | 12 +- harbour/contrib/xhb/stream.prg | 4 +- harbour/contrib/xhb/tcgi.prg | 4 +- harbour/contrib/xhb/tfile.prg | 30 +- harbour/contrib/xhb/tframe.prg | 2 +- harbour/contrib/xhb/thtm.prg | 108 +- harbour/contrib/xhb/trpc.prg | 26 +- harbour/contrib/xhb/trpccli.prg | 16 +- harbour/contrib/xhb/ttable.prg | 18 +- harbour/contrib/xhb/txml.prg | 2 +- harbour/contrib/xpp/tthreadx.prg | 6 +- harbour/src/compiler/harbour.y | 11 +- harbour/src/compiler/harbour.yyc | 3564 +++++++++++++------------- harbour/src/compiler/harbour.yyh | 2 +- harbour/src/debug/dbgtinp.prg | 2 +- harbour/src/debug/dbgtmenu.prg | 6 +- harbour/src/debug/dbgtwin.prg | 4 +- harbour/src/debug/debugger.prg | 6 +- harbour/src/debug/tbrwtext.prg | 2 +- harbour/src/rtl/checkbox.prg | 2 +- harbour/src/rtl/listbox.prg | 6 +- harbour/src/rtl/pushbtn.prg | 2 +- harbour/src/rtl/radiogrp.prg | 18 +- harbour/src/rtl/tbcolumn.prg | 2 +- harbour/src/rtl/tbrowse.prg | 4 +- harbour/src/rtl/teditor.prg | 3 +- harbour/src/rtl/tmenuitm.prg | 2 +- harbour/src/rtl/treport.prg | 25 +- harbour/src/rtl/tsymbol.prg | 2 +- harbour/src/rtl/tthreadx.prg | 6 +- harbour/utils/hbformat/hbformat.prg | 4 +- 56 files changed, 2233 insertions(+), 2028 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 838ecdef03..d402d1dbb9 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,79 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-01-14 01:44 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/src/compiler/harbour.y + * harbour/src/compiler/harbour.yyh + * harbour/src/compiler/harbour.yyc + ! pacified compile time error when ... is used as parameter in _HB_MEMBRER + declaration. TODO: Remove or fix this strong typing grammar rules. + + * harbour/src/debug/dbgtwin.prg + * harbour/src/debug/dbgtmenu.prg + * harbour/src/debug/tbrwtext.prg + * harbour/src/debug/debugger.prg + * harbour/src/debug/dbgtinp.prg + * harbour/src/rtl/tbcolumn.prg + * harbour/src/rtl/listbox.prg + * harbour/src/rtl/pushbtn.prg + * harbour/src/rtl/treport.prg + * harbour/src/rtl/radiogrp.prg + * harbour/src/rtl/tthreadx.prg + * harbour/src/rtl/checkbox.prg + * harbour/src/rtl/tsymbol.prg + * harbour/src/rtl/teditor.prg + * harbour/src/rtl/tmenuitm.prg + * harbour/src/rtl/tbrowse.prg + * harbour/contrib/hbmysql/tmysql.prg + * harbour/contrib/xhb/stream.prg + * harbour/contrib/xhb/trpccli.prg + * harbour/contrib/xhb/hblognet.prg + * harbour/contrib/xhb/tfile.prg + * harbour/contrib/xhb/tframe.prg + * harbour/contrib/xhb/htjlist.prg + * harbour/contrib/xhb/hblog.prg + * harbour/contrib/xhb/trpc.prg + * harbour/contrib/xhb/thtm.prg + * harbour/contrib/xhb/tcgi.prg + * harbour/contrib/xhb/ttable.prg + * harbour/contrib/xhb/txml.prg + * harbour/contrib/xhb/hjwindow.prg + * harbour/contrib/xhb/htmutil.prg + * harbour/contrib/hbodbc/todbc.prg + * harbour/contrib/hbfbird/tfirebrd.prg + * harbour/contrib/xpp/tthreadx.prg + * harbour/contrib/hbpgsql/tpostgre.prg + * harbour/contrib/hbgd/gdchart.prg + * harbour/contrib/hbgd/gdimage.prg + * harbour/contrib/hbgd/gdbar.prg + * harbour/contrib/hbgd/gdbarcod.prg + * harbour/contrib/hbmisc/twirler.prg + * harbour/contrib/hbtip/thtml.prg + * harbour/contrib/hbtip/cgi.prg + * harbour/contrib/hbtip/httpcli.prg + * harbour/contrib/hbtip/smtpcli.prg + * harbour/contrib/hbtip/client.prg + * harbour/contrib/hbtip/ftpcli.prg + * harbour/contrib/hbtip/mail.prg + * harbour/contrib/hbtip/popcli.prg + * harbour/contrib/hbwin/win_tprn.prg + * harbour/contrib/hbbtree/tbtree.prg + * harbour/utils/hbformat/hbformat.prg + ! fixed class method declarations to be synced with method implementations + All of the above missdeclarations were detected by compilation with: + HB_USER_PRGFLAGS=-DHB_CLS_PARAMS_ERR + Few years ago in hbclass.ch I defined PP rules to force strict method + declarations but I had to disable them due to problems with old PP. + I defined HB_CLS_NO_PARAMS_ERR and left this note in hbclass.ch: + > I have to enable this definition by default until we will not fix + > preprocessor. [druzus] + Current PP code works correctly so we can remove it and activate this + code. Anyhow as above commit shows a lot of code has been created with + wrong declarations. I fixed Harbour core code (except HBQT, HBXBP and + GTWVG - I hope Pritpal or Viktor will fix it) but setting + HB_CLS_PARAMS_ERR as default will exploit a lot of similar problems in + user code so I would like the hear other developers' opinions about it. + 2010-01-14 01:35 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * src/rtl/memoedit.prg ! Fixed to set K_ESC as lastkey() if exiting with changed diff --git a/harbour/contrib/hbbtree/tbtree.prg b/harbour/contrib/hbbtree/tbtree.prg index 037d6c4153..fd2184ae58 100644 --- a/harbour/contrib/hbbtree/tbtree.prg +++ b/harbour/contrib/hbbtree/tbtree.prg @@ -58,15 +58,15 @@ CLASS TBTree STATIC ENDCLASS -METHOD New( FileName, PageSize, KeySize, nFlags, Buffers ) CLASS TBTree - ::nHandle := hb_btreenew( FileName, PageSize, KeySize, nFlags, Buffers ) +METHOD New( cFileName, nPageSize, nKeySize, nFlags, nBuffers ) CLASS TBTree + ::nHandle := hb_btreenew( cFileName, nPageSize, nKeySize, nFlags, nBuffers ) IF ::nHandle >= 1 RETURN SELF ENDIF RETURN NIL -METHOD Open( FileName, nFlags, Buffers ) CLASS TBTree - ::nHandle := hb_btreeopen( FileName, nFlags, Buffers ) +METHOD Open( cFileName, nFlags, nBuffers ) CLASS TBTree + ::nHandle := hb_btreeopen( cFileName, nFlags, nBuffers ) IF ::nHandle >= 1 RETURN SELF ENDIF diff --git a/harbour/contrib/hbfbird/tfirebrd.prg b/harbour/contrib/hbfbird/tfirebrd.prg index 316c320800..b1aed5615f 100644 --- a/harbour/contrib/hbfbird/tfirebrd.prg +++ b/harbour/contrib/hbfbird/tfirebrd.prg @@ -468,7 +468,7 @@ CREATE CLASS TFbQuery VAR aKeys VAR aTables - METHOD New( db, cQuery, nDialect ) + METHOD New( nDB, cQuery, nDialect ) METHOD Destroy() METHOD Close() INLINE ::Destroy() @@ -764,14 +764,14 @@ CREATE CLASS TFbRow VAR dialect VAR aTables - METHOD New( row, struct, db, dialect ) + METHOD New( row, struct, nDB, nDialect, aTable ) METHOD Changed(nField) METHOD GetTables() INLINE ::aTables METHOD FCount() INLINE Len(::aRow) METHOD FieldGet( nField ) METHOD FieldPut( nField, Value ) METHOD FieldName( nField ) - METHOD FieldPos( cFieldName ) + METHOD FieldPos( cField ) METHOD FieldLen( nField ) METHOD FieldDec( nField ) METHOD FieldType( nField ) diff --git a/harbour/contrib/hbgd/gdbar.prg b/harbour/contrib/hbgd/gdbar.prg index a6763c1c4d..cf863c16fc 100644 --- a/harbour/contrib/hbgd/gdbar.prg +++ b/harbour/contrib/hbgd/gdbar.prg @@ -105,9 +105,9 @@ CLASS TBarCode FROM GDImage METHOD DrawError(ptext) METHOD DrawSingleBar(pcode ) METHOD DrawSingleI25( pcode ) - METHOD DrawText() - METHOD nextX() - METHOD Finish( image_style, quality ) + METHOD DrawText( lIsI25 ) + METHOD nextX( lI25 ) + METHOD Finish( image_style, quality, nFG ) METHOD SetText( ptext ) METHOD ResetColor() METHOD CheckCode() diff --git a/harbour/contrib/hbgd/gdbarcod.prg b/harbour/contrib/hbgd/gdbarcod.prg index 4180ee333d..801db5f074 100644 --- a/harbour/contrib/hbgd/gdbarcod.prg +++ b/harbour/contrib/hbgd/gdbarcod.prg @@ -66,7 +66,7 @@ CLASS TCode FROM TBarCode DATA nType // EAN-13 ISBN - METHOD New( nType ) CONSTRUCTOR + METHOD New( nTypeCode ) CONSTRUCTOR METHOD Draw( cText ) METHOD Draw13( cText ) @@ -85,7 +85,7 @@ CLASS TCode FROM TBarCode // Utils METHOD FindCharCode( cstring, cchar ) - METHOD MixCode(bar_string) + METHOD MixCode(value) METHOD Findcode( uval ) ENDCLASS diff --git a/harbour/contrib/hbgd/gdchart.prg b/harbour/contrib/hbgd/gdchart.prg index 6219577415..3b58926d96 100644 --- a/harbour/contrib/hbgd/gdchart.prg +++ b/harbour/contrib/hbgd/gdchart.prg @@ -72,10 +72,10 @@ CLASS GDChart FROM GDImage METHOD New( sx, sy ) CONSTRUCTOR - METHOD AddData() - METHOD AddDef() - METHOD SetData() - METHOD SetDefs() + METHOD AddData( hData ) + METHOD AddDef( cDefKey, xDefVal ) + METHOD SetData( aData ) + METHOD SetDefs( hDefs ) METHOD PieChart() METHOD VerticalBarChart() @@ -86,7 +86,7 @@ CLASS GDChart FROM GDImage METHOD Clone() PROTECTED: - METHOD CloneDataFrom() + METHOD CloneDataFrom( oSrc ) ENDCLASS diff --git a/harbour/contrib/hbgd/gdimage.prg b/harbour/contrib/hbgd/gdimage.prg index 4895a961ea..a50d39cb86 100644 --- a/harbour/contrib/hbgd/gdimage.prg +++ b/harbour/contrib/hbgd/gdimage.prg @@ -157,8 +157,9 @@ CLASS GDImage METHOD Points() INLINE Len( ::aPoints ) METHOD Rectangle( x1, y1, x2, y2, lFilled, color ) - METHOD Arc( x, y, nWidth, nHeight, nStartDegree, nEndDegree, lFilled, nColor ) - METHOD Ellipse( x, y, nWidth, nHeight, lFilled, nColor ) + METHOD Arc( x, y, nWidth, nHeight, nStartDegree, nEndDegree, lFilled, color, nStyle ) + METHOD Ellipse( x, y, nWidth, nHeight, lFilled, color ) + METHOD Circle( x, y, nRadius, lFilled, nColor ) ; INLINE ::Ellipse( x, y, nRadius, nRadius, lFilled, nColor ) @@ -263,20 +264,20 @@ CLASS GDImage METHOD SetInterlaceOff() INLINE gdImageInterlace( ::pImage, .F. ) /* COPY AND RESIZING FUNCTIONS */ - METHOD Copy() - METHOD CopyResized() - METHOD CopyResampled() - METHOD CopyRotated() - METHOD CopyMerge() - METHOD CopyMergeGray() + METHOD Copy( nSrcX, nSrcY, nWidth, nHeight, nDstX, nDstY, oDestImage ) + METHOD CopyResized( nSrcX, nSrcY, nSrcWidth, nSrcHeight, nDstX, nDstY, nDstWidth, nDstHeight, oDestImage ) + METHOD CopyResampled( nSrcX, nSrcY, nSrcWidth, nSrcHeight, nDstX, nDstY, nDstWidth, nDstHeight, oDestImage ) + METHOD CopyRotated( nSrcX, nSrcY, nWidth, nHeight, nDstX, nDstY, nAngle, oDestImage ) + METHOD CopyMerge( nSrcX, nSrcY, nWidth, nHeight, nDstX, nDstY, nPerc, oDestImage ) + METHOD CopyMergeGray( nSrcX, nSrcY, nWidth, nHeight, nDstX, nDstY, nPerc, oDestImage ) /* New implemented */ METHOD Clone() - METHOD CopyZoomed() - METHOD Crop() - METHOD Zoom() - METHOD Resize() - METHOD Rotate() + METHOD CopyZoomed( nPerc, nSrcX, nSrcY, nSrcWidth, nSrcHeight ) + METHOD Crop( nX, nY, nWidth, nHeight ) + METHOD Zoom( nPerc ) + METHOD Resize( nWidth, nHeight ) + METHOD Rotate( nAngle, lInside ) METHOD RotateInside( nAngle ) INLINE ::Rotate( nAngle, .T. ) METHOD PaletteCopy( oDestImage ) INLINE gdImagePaletteCopy( oDestImage:pImage, ::pImage ) @@ -290,7 +291,7 @@ CLASS GDImage METHOD Version() INLINE gdVersion() PROTECTED: - METHOD CloneDataFrom() + METHOD CloneDataFrom( oSrc ) ENDCLASS diff --git a/harbour/contrib/hbmisc/twirler.prg b/harbour/contrib/hbmisc/twirler.prg index 9b64af21fb..c73abfdca1 100644 --- a/harbour/contrib/hbmisc/twirler.prg +++ b/harbour/contrib/hbmisc/twirler.prg @@ -18,7 +18,7 @@ class Twirler var n_Smooth var c_Chars var c_Title - method new( nRow, nCol, cTitle, cChars ) + method new( nRow, nCol, cTitle, cChars, nSmooth ) method twirl() method show() method hide() diff --git a/harbour/contrib/hbmysql/tmysql.prg b/harbour/contrib/hbmysql/tmysql.prg index e31091757d..47aaed5c03 100644 --- a/harbour/contrib/hbmysql/tmysql.prg +++ b/harbour/contrib/hbmysql/tmysql.prg @@ -1330,7 +1330,7 @@ CREATE CLASS TMySQLServer VAR lError // .T. if occurred an error VAR cCreateQuery - METHOD New( cServer, cUser, cPassword ) // Opens connection to a server, returns a server object + METHOD New( cServer, cUser, cPassword, nPort ) // Opens connection to a server, returns a server object METHOD Destroy() // Closes connection to server METHOD SelectDB( cDBName ) // Which data base I will use for subsequent queries diff --git a/harbour/contrib/hbodbc/todbc.prg b/harbour/contrib/hbodbc/todbc.prg index 1d810c7e8a..c62be3eee1 100644 --- a/harbour/contrib/hbodbc/todbc.prg +++ b/harbour/contrib/hbodbc/todbc.prg @@ -131,7 +131,7 @@ CREATE CLASS TODBC FROM HBClass METHOD ExecSQL() METHOD CLOSE() - METHOD LoadData() + METHOD LoadData( nPos ) METHOD ClearData() INLINE AEval( ::Fields, {| oField | oField:Value := NIL } ) METHOD FieldByName( cField ) diff --git a/harbour/contrib/hbpgsql/tpostgre.prg b/harbour/contrib/hbpgsql/tpostgre.prg index f5cb7d4359..5c646cb041 100644 --- a/harbour/contrib/hbpgsql/tpostgre.prg +++ b/harbour/contrib/hbpgsql/tpostgre.prg @@ -489,7 +489,7 @@ CREATE CLASS TPQQuery METHOD Destroy() METHOD Close() INLINE ::Destroy() - METHOD Refresh() + METHOD Refresh( lQuery, lMeta ) METHOD Fetch() INLINE ::Skip() METHOD Read() METHOD Skip( nRecno ) @@ -1180,7 +1180,7 @@ CREATE CLASS TPQRow METHOD FieldGet( nField ) METHOD FieldPut( nField, Value ) METHOD FieldName( nField ) - METHOD FieldPos( cFieldName ) + METHOD FieldPos( cField ) METHOD FieldLen( nField ) METHOD FieldDec( nField ) METHOD FieldType( nField ) diff --git a/harbour/contrib/hbtip/cgi.prg b/harbour/contrib/hbtip/cgi.prg index 077146448a..107f86a601 100644 --- a/harbour/contrib/hbtip/cgi.prg +++ b/harbour/contrib/hbtip/cgi.prg @@ -87,20 +87,20 @@ CREATE CLASS TIpCgi VAR lDumpHtml INIT .F. METHOD New() - METHOD Header( hOptions ) + METHOD Header( cValue ) METHOD Redirect( cUrl ) METHOD Print( cString ) METHOD Flush() - METHOD ErrHandler() + METHOD ErrHandler( xError ) METHOD StartHtml( hOptions ) METHOD EndHtml() METHOD StartFrameSet( hOptions ) - METHOD EndFrameSet() + METHOD EndFrameSet( hOptions ) METHOD SaveHtmlPage( cFile ) - METHOD StartSession() - METHOD DestroySession() + METHOD StartSession( cSID ) + METHOD DestroySession( cID ) METHOD CreateSID( cCRCKey ) INLINE ::cSID := TIP_GenerateSID( cCrcKey ) METHOD CheckCrcSID( cSID, cCRCKey ) INLINE TIP_CheckSID( cSID, cCRCKey ) METHOD SessionEncode() diff --git a/harbour/contrib/hbtip/client.prg b/harbour/contrib/hbtip/client.prg index 38374c44b3..e7e64d56a4 100644 --- a/harbour/contrib/hbtip/client.prg +++ b/harbour/contrib/hbtip/client.prg @@ -136,13 +136,13 @@ CREATE CLASS tIPClient VAR cProxyPassword METHOD New( oUrl, bTrace, oCredentials ) - METHOD Open() + METHOD Open( cUrl ) METHOD EnableTLS( lEnable ) - METHOD Read( iLen ) + METHOD Read( nLen ) METHOD ReadToFile( cFile, nMode, nSize ) - METHOD Write( cData, iLen, bCommit ) + METHOD Write( cData, nLen, bCommit ) METHOD Commit() METHOD WriteFromFile( cFile ) METHOD Reset() @@ -169,15 +169,15 @@ CREATE CLASS tIPClient /* Methods to log data if needed */ METHOD InetRecv( SocketCon, cStr1, len) - METHOD InetRecvLine( SocketCon, nLen, size ) - METHOD InetRecvAll( SocketCon, cStr1, len ) + METHOD InetRecvLine( SocketCon, nRet, size ) + METHOD InetRecvAll( SocketCon, cRet, size ) METHOD InetCount( SocketCon ) METHOD InetSendAll( SocketCon, cData, nLen ) METHOD InetErrorCode( SocketCon ) METHOD InetErrorDesc( SocketCon ) METHOD InetConnect( cServer, nPort, SocketCon ) - METHOD Log() + METHOD Log( ... ) ENDCLASS diff --git a/harbour/contrib/hbtip/ftpcli.prg b/harbour/contrib/hbtip/ftpcli.prg index 193fe30393..b09882549a 100644 --- a/harbour/contrib/hbtip/ftpcli.prg +++ b/harbour/contrib/hbtip/ftpcli.prg @@ -113,9 +113,9 @@ CREATE CLASS tIPClientFTP FROM tIPClient VAR cLogFile METHOD New( oUrl, bTrace, oCredentials ) - METHOD Open() + METHOD Open( cUrl ) METHOD Read( nLen ) - METHOD Write( nLen ) + METHOD Write( cData, nLen ) METHOD Close() METHOD TransferStart() METHOD Commit() @@ -137,8 +137,8 @@ CREATE CLASS tIPClientFTP FROM tIPClient METHOD Stor( cFile ) METHOD Quit() METHOD ScanLength() - METHOD ReadAuxPort() - METHOD mget() + METHOD ReadAuxPort( cLocalFile ) + METHOD mget( cSpec, cLocalPath ) // Method below contributed by Rafa Carmona @@ -149,7 +149,7 @@ CREATE CLASS tIPClientFTP FROM tIPClient METHOD MKD( cPath ) // new method to create an directory on ftp server METHOD RMD( cPath ) - METHOD listFiles( cList ) + METHOD listFiles( cFileSpec ) METHOD MPut METHOD StartCleanLogFile() METHOD fileSize( cFileSpec ) diff --git a/harbour/contrib/hbtip/httpcli.prg b/harbour/contrib/hbtip/httpcli.prg index 6705a123be..8ce2d35099 100644 --- a/harbour/contrib/hbtip/httpcli.prg +++ b/harbour/contrib/hbtip/httpcli.prg @@ -74,7 +74,7 @@ CREATE CLASS tIPClientHTTP FROM tIPClient METHOD New( oUrl, bTrace, oCredentials ) METHOD Get( cQuery ) METHOD Post( xPostData, cQuery ) - METHOD ReadHeaders() + METHOD ReadHeaders( lClear ) METHOD Read( nLen ) METHOD UseBasicAuth() INLINE ::cAuthMode := "Basic" METHOD ReadAll() diff --git a/harbour/contrib/hbtip/mail.prg b/harbour/contrib/hbtip/mail.prg index 471cb34955..36199a8d1d 100644 --- a/harbour/contrib/hbtip/mail.prg +++ b/harbour/contrib/hbtip/mail.prg @@ -80,13 +80,13 @@ CREATE CLASS TipMail METHOD Send( sSocket ) METHOD Recv( sSocket ) */ - METHOD FromString( cString ) + METHOD FromString( cMail, cBoundary, nPos ) METHOD ToString() - METHOD GetFieldPart( cField ) - METHOD GetFieldOption( cField ) - METHOD SetFieldPart( cField, cValue ) - METHOD SetFieldOption( cField, cValue ) + METHOD GetFieldPart( cPart ) + METHOD GetFieldOption( cPart, cOption ) + METHOD SetFieldPart( cPart, cValue ) + METHOD SetFieldOption( cPart, cOption, cValue ) METHOD SetCharset( cCharset ) INLINE ::cCharset := iif( ISCHARACTER( cCharset ), cCharset, "ISO-8859-1" ) METHOD GetContentType() INLINE ::GetFieldPart( "Content-Type" ) @@ -101,9 +101,9 @@ CREATE CLASS TipMail METHOD MakeBoundary() METHOD isMultiPart() - METHOD getMultiParts() + METHOD getMultiParts( aParts ) - METHOD setHeader( cSubject, cFrom, cTo, cCC, cBCC ) + METHOD setHeader( cSubject, cFrom, xTo, xCC, xBCC ) METHOD attachFile( cFileName ) METHOD detachFile( cPath ) METHOD getFileName() @@ -137,11 +137,11 @@ METHOD New( cBody, oEncoder ) CLASS TipMail RETURN Self -METHOD SetEncoder( cEnc ) CLASS TipMail - IF hb_isString( cEnc ) - ::oEncoder := TIp_GetEncoder( cEnc ) +METHOD SetEncoder( cEncoder ) CLASS TipMail + IF hb_isString( cEncoder ) + ::oEncoder := TIp_GetEncoder( cEncoder ) ELSE - ::oEncoder := cEnc + ::oEncoder := cEncoder ENDIF ::hHeaders[ "Content-Transfer-Encoding" ] := ::oEncoder:cName RETURN .T. @@ -653,7 +653,7 @@ METHOD detachFile( cPath ) CLASS TipMail METHOD getFileName() CLASS TipMail RETURN StrTran( ::getFieldOption( "Content-Type", "name" ), '"' ) -METHOD isMultiPart CLASS TipMail +METHOD isMultiPart() CLASS TipMail RETURN "multipart/" $ Lower( ::GetFieldPart("Content-Type") ) METHOD getMultiParts( aParts ) CLASS TipMail diff --git a/harbour/contrib/hbtip/popcli.prg b/harbour/contrib/hbtip/popcli.prg index 0e136ac2d6..543e2b00df 100644 --- a/harbour/contrib/hbtip/popcli.prg +++ b/harbour/contrib/hbtip/popcli.prg @@ -68,7 +68,7 @@ CREATE CLASS tIPClientPOP FROM tIPClient METHOD Open( cUrl ) METHOD OpenDigest( cUrl ) METHOD Close( lAutoQuit ) - METHOD Delete() + METHOD Delete( nId ) METHOD List() METHOD Noop() // Can be called repeatedly to keep-alive the connection METHOD Retrieve( nId, nLen ) @@ -79,8 +79,8 @@ CREATE CLASS tIPClientPOP FROM tIPClient METHOD UIDL( nMsgId ) // Returns Unique ID of message n or list of unique IDs of all message inside maildrop METHOD countMail() METHOD GetOK() - METHOD Read( iLen ) - METHOD retrieveAll() + METHOD Read( nLen ) + METHOD retrieveAll( lDelete ) ENDCLASS @@ -327,7 +327,7 @@ METHOD UIDL( nMsgId ) CLASS tIPClientPOP /** */ -METHOD countMail CLASS TIpClientPop +METHOD countMail() CLASS TIpClientPop LOCAL cStat IF ::isOpen diff --git a/harbour/contrib/hbtip/smtpcli.prg b/harbour/contrib/hbtip/smtpcli.prg index d7096b9eb1..f1eb48bcee 100644 --- a/harbour/contrib/hbtip/smtpcli.prg +++ b/harbour/contrib/hbtip/smtpcli.prg @@ -64,11 +64,11 @@ CREATE CLASS tIPClientSMTP FROM tIPClient METHOD New( oUrl, bTrace, oCredentials ) - METHOD Open( cUrl ) + METHOD Open( cUrl, lTLS ) METHOD Close() METHOD Write( cData, nLen, bCommit ) METHOD Mail( cFrom ) - METHOD Rcpt( cRcpt ) + METHOD Rcpt( cTo ) METHOD Data( cData ) METHOD Commit() METHOD Quit() @@ -76,7 +76,7 @@ CREATE CLASS tIPClientSMTP FROM tIPClient METHOD SendMail( oTIpMail ) /* Methods for smtp server that require login */ - METHOD OpenSecure( cUrl ) + METHOD OpenSecure( cUrl, lTLS ) METHOD Auth( cUser, cPass ) // Auth by login method METHOD AuthPlain( cUser, cPass ) // Auth by plain method METHOD ServerSuportSecure( lAuthPlain, lAuthLogin ) diff --git a/harbour/contrib/hbtip/thtml.prg b/harbour/contrib/hbtip/thtml.prg index d7cdcb48f6..ed986c980b 100644 --- a/harbour/contrib/hbtip/thtml.prg +++ b/harbour/contrib/hbtip/thtml.prg @@ -123,7 +123,7 @@ CREATE CLASS THtmlDocument MODULE FRIENDLY METHOD writeFile( cFileName ) METHOD collect() - METHOD toString( nIndent ) + METHOD toString() METHOD getNode( cTagName ) METHOD getNodes( cTagName ) METHOD findFirst( cName, cAttrib, cValue, cData ) @@ -313,7 +313,7 @@ METHOD findFirstRegex( cName, cAttrib, cValue, cData ) CLASS THtmlDocument * (Adopted from TXMLIterator -> source\rtl\txml.prg) */ CREATE CLASS THtmlIterator MODULE FRIENDLY - METHOD New( oNodeTop ) CONSTRUCTOR + METHOD New( oHtml ) CONSTRUCTOR METHOD Next() METHOD Rewind() METHOD Find( cName, cAttribute, cValue, cData ) @@ -351,7 +351,7 @@ METHOD New( oHtml ) CLASS THtmlIterator ::nLast := Len( ::aNodes ) RETURN Self -METHOD rewind CLASS THtmlIterator +METHOD rewind() CLASS THtmlIterator ::oNode := ::oTop ::nCurrent := 0 RETURN Self @@ -512,13 +512,13 @@ CREATE CLASS THtmlNode MODULE FRIENDLY VAR parent VAR htmlContent - METHOD parseHtml - METHOD parseHtmlFixed + METHOD parseHtml( parser ) + METHOD parseHtmlFixed( parser ) - METHOD _getTextNode - METHOD _setTextNode + METHOD _getTextNode() + METHOD _setTextNode( cText ) - METHOD keepFormatting + METHOD keepFormatting() EXPORTED: @@ -529,7 +529,7 @@ CREATE CLASS THtmlNode MODULE FRIENDLY METHOD New( oParent, cTagName, cAttrib, cContent ) - METHOD isType( nCM_TYPE ) + METHOD isType( nType ) ACCESS isEmpty() ACCESS isInline() ACCESS isOptional() @@ -545,8 +545,8 @@ CREATE CLASS THtmlNode MODULE FRIENDLY MESSAGE insertBelow METHOD addNode MESSAGE unlink METHOD delete - METHOD firstNode() - METHOD lastNode() + METHOD firstNode( lRoot ) + METHOD lastNode( lRoot ) ACCESS nextNode() ACCESS prevNode() @@ -559,19 +559,19 @@ CREATE CLASS THtmlNode MODULE FRIENDLY METHOD toString( nIndent ) METHOD attrToString() - METHOD collect() - METHOD getText( cCRLF ) + METHOD collect( oEndNode ) + METHOD getText( cEOL ) - METHOD getAttribute( cAttrName ) + METHOD getAttribute( cName ) METHOD getAttributes() - METHOD setAttribute( cAttrName, cAttrValue ) - METHOD setAttributes( cHtmlAttr ) + METHOD setAttribute( cName, cValue ) + METHOD setAttributes( cHtml ) - METHOD delAttribute( cAttrName ) + METHOD delAttribute( cName ) METHOD delAttributes() - METHOD isAttribute() + METHOD isAttribute( cName ) ACCESS text INLINE ::_getTextNode() ASSIGN text(x) INLINE ::_setTextNode( x ) @@ -641,27 +641,27 @@ METHOD isType( nType ) CLASS THtmlNode RETURN lRet // checks if this is a node that is always empty and never has HTML text, e.g. ,, -METHOD isEmpty CLASS THtmlNode +METHOD isEmpty() CLASS THtmlNode RETURN hb_bitAnd( ::htmlTagType[ 2 ], CM_EMPTY ) > 0 // checks if this is a node that may occur inline, eg. , -METHOD isInline CLASS THtmlNode +METHOD isInline() CLASS THtmlNode RETURN hb_bitAnd( ::htmlTagType[ 2 ], CM_INLINE ) > 0 // checks if this is a node that may appear without a closing tag, eg.

,, -METHOD isOptional CLASS THtmlNode +METHOD isOptional() CLASS THtmlNode RETURN hb_bitAnd( ::htmlTagType[ 2 ], CM_OPT ) > 0 // checks if this is a node (leafs contain no further nodes, e.g.
,


,_text_) -METHOD isNode CLASS THtmlNode +METHOD isNode() CLASS THtmlNode RETURN ISARRAY( ::htmlContent ) .AND. Len( ::htmlContent ) > 0 // checks if this is a block node that must be closed with an ending tag: eg:
,
    -METHOD isBlock CLASS THtmlNode +METHOD isBlock() CLASS THtmlNode RETURN hb_bitAnd( ::htmlTagType[ 2 ], CM_BLOCK ) > 0 // checks if this is a node whose text line formatting must be preserved:
    ,