diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 8235c3f57c..7128ebb5d4 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,26 @@ The license applies to all entries newer than 2009-04-28. */ +2012-11-09 13:08 UTC+0100 Viktor Szakats (vszakats syenar.net) + * contrib/xhb/hbcompat.ch + * contrib/xhb/htmutil.prg + * contrib/xhb/stream.prg + * contrib/xhb/tedit.prg + * contrib/xhb/tfile.prg + * contrib/xhb/tframe.prg + * contrib/xhb/thtm.prg + * contrib/xhb/trpc.prg + * contrib/xhb/ttable.prg + * contrib/xhb/xcstr.prg + * contrib/xhb/xdbmodst.prg + * contrib/xhb/xthrow.c + * extras/httpsrv/modules/cookie.prg + * extras/httpsrv/modules/info.prg + * extras/httpsrv/modules/showcounter.prg + * extras/httpsrv/modules/tableservletdb.prg + * src/rdd/usrrdd/rdds/arrayrdd.prg + * cleanups + 2012-11-09 12:39 UTC+0100 Viktor Szakats (harbour syenar.net) * bin/find.hb + show component name (core/contrib/addon) instead of diff --git a/harbour/contrib/xhb/hbcompat.ch b/harbour/contrib/xhb/hbcompat.ch index afc8822179..fae51ab54a 100644 --- a/harbour/contrib/xhb/hbcompat.ch +++ b/harbour/contrib/xhb/hbcompat.ch @@ -557,7 +557,7 @@ #xtranslate inetIsSocket( [] ) => hb_inetIsSocket( ) #xtranslate inetDestroy( [] ) => iif( hb_inetIsSocket( ), hb_inetClose( ), ) - /* THROW => generate error */ + /* Throw() => generate error */ #xtranslate Throw( ) => ( Eval( ErrorBlock(), ), Break( ) ) #endif diff --git a/harbour/contrib/xhb/htmutil.prg b/harbour/contrib/xhb/htmutil.prg index a61a6fce66..d0ba443282 100644 --- a/harbour/contrib/xhb/htmutil.prg +++ b/harbour/contrib/xhb/htmutil.prg @@ -356,9 +356,9 @@ CREATE CLASS JWindow METHOD Put() - METHOD BEGIN() + METHOD Begin() - METHOD END () + METHOD End() METHOD QOut( c ) @@ -609,7 +609,7 @@ METHOD QOut( c ) CLASS JWindow * */ -METHOD BEGIN() CLASS JWindow +METHOD Begin() CLASS JWindow LOCAL i @@ -676,7 +676,7 @@ METHOD BEGIN() CLASS JWindow * */ -METHOD END() CLASS JWindow +METHOD End() CLASS JWindow HtmlJSCmd( ::nH, ::varName + ".document.write('')" + CRLF() ) diff --git a/harbour/contrib/xhb/stream.prg b/harbour/contrib/xhb/stream.prg index a4870952ee..48c62216d6 100644 --- a/harbour/contrib/xhb/stream.prg +++ b/harbour/contrib/xhb/stream.prg @@ -54,7 +54,7 @@ #include "fileio.ch" -#xtranslate THROW() => (Eval(ErrorBlock(), ), Break()) +#xtranslate Throw( ) => ( Eval( ErrorBlock(), ), Break( ) ) #define BUFFER_SIZE 16384 diff --git a/harbour/contrib/xhb/tedit.prg b/harbour/contrib/xhb/tedit.prg index 07ed01915a..f9907e36a7 100644 --- a/harbour/contrib/xhb/tedit.prg +++ b/harbour/contrib/xhb/tedit.prg @@ -497,7 +497,7 @@ CREATE CLASS THtmlForm METHOD Put( lPutControls ) - METHOD END () + METHOD End() METHOD GetControl( cName ) diff --git a/harbour/contrib/xhb/tfile.prg b/harbour/contrib/xhb/tfile.prg index 2ae900c0a4..8ff45d11bc 100644 --- a/harbour/contrib/xhb/tfile.prg +++ b/harbour/contrib/xhb/tfile.prg @@ -66,12 +66,12 @@ CREATE CLASS TCgiFile METHOD Open( nMode ) - METHOD CLOSE() INLINE FClose( ::Handle ), ; + METHOD Close() INLINE FClose( ::Handle ), ; ::Handle := -999 - METHOD RENAME( c ) INLINE FRename( ::File, c ) == 0 + METHOD Rename( c ) INLINE FRename( ::File, c ) == 0 - METHOD ERASE() INLINE FErase( ::File ) == 0 + METHOD Erase() INLINE FErase( ::File ) == 0 METHOD Exists() INLINE hb_FileExists( ::File ) @@ -101,9 +101,9 @@ CREATE CLASS TCgiFile METHOD Eof() INLINE FPOS( ::Handle ) == ::FileSize - METHOD SEEK( n, o ) INLINE FSeek( ::Handle, n, o ) + METHOD Seek( n, o ) INLINE FSeek( ::Handle, n, o ) - METHOD CREATE( nAttr ) + METHOD Create( nAttr ) METHOD Size() @@ -121,9 +121,9 @@ CREATE CLASS TCgiFile METHOD ReadLong() - METHOD GOTO( nLine ) + METHOD Goto( nLine ) - METHOD SKIP( nLines ) + METHOD Skip( nLines ) METHOD MaxPages( nPageSize ) @@ -165,7 +165,7 @@ METHOD Open( nMode ) CLASS TCgiFile ** ::Create( [] ) --> lSuccess */ -METHOD CREATE ( nAttr ) CLASS TCgiFile +METHOD Create( nAttr ) CLASS TCgiFile LOCAL nSuccess @@ -336,7 +336,7 @@ METHOD WriteLong( nLong ) CLASS TCgiFile ** */ -METHOD GOTO( nLine ) CLASS TCgiFile +METHOD Goto( nLine ) CLASS TCgiFile LOCAL nCount := 1 LOCAL nPos := FPOS( ::Handle ) @@ -372,7 +372,7 @@ METHOD GOTO( nLine ) CLASS TCgiFile ** */ -METHOD SKIP( nLines ) CLASS TCgiFile +METHOD Skip( nLines ) CLASS TCgiFile LOCAL nCount := 0 LOCAL nPos := FPOS( ::Handle ) diff --git a/harbour/contrib/xhb/tframe.prg b/harbour/contrib/xhb/tframe.prg index 0717cff662..e7bfab41af 100644 --- a/harbour/contrib/xhb/tframe.prg +++ b/harbour/contrib/xhb/tframe.prg @@ -62,7 +62,7 @@ CREATE CLASS THtmlFrameSet METHOD EndSet() - METHOD END () + METHOD End() METHOD Frame( cName, cURL, lBorder, lResize, lScrolling, ; marginwidth, marginheight, cTarget, cScrolling ) @@ -153,7 +153,7 @@ METHOD Endset() CLASS THtmlFrameSet RETURN Self -METHOD END () CLASS THtmlFrameSet +METHOD End() CLASS THtmlFrameSet ::cStr += "" + CRLF() diff --git a/harbour/contrib/xhb/thtm.prg b/harbour/contrib/xhb/thtm.prg index ed1cf09011..3d7d9efec9 100644 --- a/harbour/contrib/xhb/thtm.prg +++ b/harbour/contrib/xhb/thtm.prg @@ -112,7 +112,7 @@ CREATE CLASS THtml METHOD SetBgImage( cImage, lBody ) INLINE Default( lBody, .T. ), ::cStr += iif( lBody, '', ' BACKGROUND="' + cImage + '" ' ) - METHOD CLOSE() + METHOD Close() METHOD SetCenter( lOn ) INLINE ::cStr += iif( lOn, "
", "
" ) @@ -122,9 +122,9 @@ CREATE CLASS THtml METHOD DefineFont( cFont, cType, nSize, cColor, lSet ) - METHOD ENDFONT() + METHOD EndFont() - METHOD SAY( str, font, size, type, color, style ) + METHOD Say( str, font, size, type, color, style ) METHOD QQOut( c ) INLINE Default( c, "" ), ::cStr += c @@ -142,7 +142,7 @@ CREATE CLASS THtml METHOD PutImage( cImage, nBorder, nHeight, cOnclick, cOnMsOver, cOnMsOut, ; cName, cAlt, cTarget, nWidth, lBreak, ID, MAP, ALING, HSPACE ) - METHOD TEXT( cText, nCols, lWrap ) INLINE Default( lWrap, .T. ), Default( nCols, 80 ), ; + METHOD Text( cText, nCols, lWrap ) INLINE Default( lWrap, .T. ), Default( nCols, 80 ), ; ::cStr += "", ">" ) + CRLF() + cText + CRLF() + "" + CRLF() METHOD MultiCol( txt, cols, gutter, width ) INLINE Default( txt, "" ), ; @@ -709,7 +709,7 @@ METHOD DefineFont( cFont, cType, nSize, cColor, lSet ) CLASS THtml * End a font definition */ -METHOD ENDFONT() CLASS THtml +METHOD EndFont() CLASS THtml ::cStr += '' + CRLF() @@ -723,7 +723,7 @@ METHOD ENDFONT() CLASS THtml * */ -METHOD SAY( str, font, size, type, color, style ) CLASS THtml +METHOD Say( str, font, size, type, color, style ) CLASS THtml LOCAL cOut := "" LOCAL lBold := .F. @@ -1195,7 +1195,7 @@ METHOD PutImage( cImage, nBorder, nHeight, ; * */ -METHOD CLOSE() CLASS THtml +METHOD Close() CLASS THtml #if 0 ::cStr += ::cStr diff --git a/harbour/contrib/xhb/trpc.prg b/harbour/contrib/xhb/trpc.prg index 37ff8cdcd5..44ca413165 100644 --- a/harbour/contrib/xhb/trpc.prg +++ b/harbour/contrib/xhb/trpc.prg @@ -223,7 +223,7 @@ CREATE CLASS TRPCFunction METHOD CheckTypes( aParams ) METHOD CheckParam( cParam ) METHOD Describe() - METHOD RUN( aParams, oClient ) + METHOD Run( aParams, oClient ) ENDCLASS @@ -298,7 +298,7 @@ METHOD SetCallable( oExec, oMeth ) CLASS TRPCFunction RETURN .T. -METHOD RUN( aParams, oClient ) CLASS TRPCFunction +METHOD Run( aParams, oClient ) CLASS TRPCFunction LOCAL nStart, nCount, xRet @@ -395,7 +395,7 @@ CREATE CLASS TRPCServeCon /* Managing async */ METHOD Start() METHOD Stop() - METHOD RUN() + METHOD Run() /* Utilty */ METHOD SendProgress( nProgress, oData ) @@ -490,7 +490,7 @@ METHOD Stop() CLASS TRPCServeCon RETURN lRet -METHOD RUN() CLASS TRPCServeCon +METHOD Run() CLASS TRPCServeCon LOCAL cCode := Space( 6 ) LOCAL lBreak := .F. @@ -1229,7 +1229,7 @@ CREATE CLASS TRPCService /* Function management */ METHOD Add( xFunction, cVersion, nLevel, oExec, oMethod ) - METHOD RUN( cName, aParams ) + METHOD Run( cName, aParams ) METHOD Describe( cName ) METHOD Find( cName ) METHOD Remove( cName ) @@ -1241,7 +1241,7 @@ CREATE CLASS TRPCService METHOD Terminating( oConnection ) /* Tcp services */ - METHOD ACCEPT() + METHOD Accept() /* UDP services */ METHOD UdpListen() @@ -1325,7 +1325,7 @@ METHOD Remove( cName ) CLASS TRPCService RETURN lRet -METHOD RUN( cName, aParams ) CLASS TRPCService +METHOD Run( cName, aParams ) CLASS TRPCService LOCAL oFunc := ::Find( cName ) LOCAL oRet := NIL @@ -1407,7 +1407,7 @@ METHOD Stop() CLASS TRPCService RETURN .T. -METHOD ACCEPT() CLASS TRPCService +METHOD Accept() CLASS TRPCService LOCAL skIn diff --git a/harbour/contrib/xhb/ttable.prg b/harbour/contrib/xhb/ttable.prg index 60abc01145..85b8934c5c 100644 --- a/harbour/contrib/xhb/ttable.prg +++ b/harbour/contrib/xhb/ttable.prg @@ -642,21 +642,21 @@ CREATE CLASS HBTable METHOD Bof() INLINE ( ::Alias )->( Bof() ) METHOD RecNo() INLINE ( ::Alias )->( RecNo() ) METHOD LastRec() INLINE ( ::Alias )->( LastRec() ) - METHOD SKIP( n ) INLINE ( ::Alias )->( dbSkip( n ) ), ; + METHOD Skip( n ) INLINE ( ::Alias )->( dbSkip( n ) ), ; ::nRecno := ( ::Alias )->( RecNo() ) - METHOD GOTO( n ) INLINE ( ::Alias )->( dbGoto( n ) ) + METHOD Goto( n ) INLINE ( ::Alias )->( dbGoto( n ) ) METHOD goTop() INLINE ( ::Alias )->( dbGoTop() ) METHOD goBottom() INLINE ( ::Alias )->( dbGoBottom() ) METHOD SetFocus() INLINE ( ::Alias )->( Select( ::ALias ) ) - METHOD APPEND( l ) INLINE iif( ::isNet, ( ::Alias )->( NetAppend( l ) ), ; + METHOD Append( l ) INLINE iif( ::isNet, ( ::Alias )->( NetAppend( l ) ), ; ( ::alias )->( dbAppend() ) ) - METHOD RECALL() INLINE ( ::Alias )->( NetRecall() ) + METHOD Recall() INLINE ( ::Alias )->( NetRecall() ) - METHOD LOCATE( bFor, bWhile, nNext, nRec, lRest ) INLINE ; + METHOD Locate( bFor, bWhile, nNext, nRec, lRest ) INLINE ; ( ::Alias )->( __dbLocate( bFor, bWhile, ; nNext, nRec, lRest ) ) - METHOD CONTINUE() INLINE ( ::Alias )->( __dbContinue() ) + METHOD Continue() INLINE ( ::Alias )->( __dbContinue() ) METHOD Found() INLINE ( ::Alias )->( Found() ) METHOD Kill() INLINE ( ::Alias )->( dbCommit() ), ; ( ::Alias )->( dbUnlock() ), ; @@ -723,15 +723,15 @@ CREATE CLASS HBTable METHOD New( cDBF, cALIAS, cOrderBag, cDRIVER, ; lNET, cPATH, lNEW, lREADONLY ) - METHOD OPEN() + METHOD Open() METHOD dbMove( nDirection ) METHOD FldInit() - METHOD READ( lKeepBuffer ) + METHOD Read( lKeepBuffer ) METHOD ReadBLANK( lKeepBuffer ) METHOD Write( lKeepBuffer ) METHOD BufWrite( aBuffer ) - MESSAGE DELETE() METHOD __oTDelete( lKeepBuffer ) // reserved word - *HAS* to be renamed... + MESSAGE Delete() METHOD __oTDelete( lKeepBuffer ) // reserved word - *HAS* to be renamed... METHOD SetMonitor( l ) METHOD Undo( nBuffer, nLevel ) @@ -806,7 +806,7 @@ METHOD New( cDBF, cALIAS, cOrderBag, cDRIVER, ; RETURN Self -METHOD OPEN() CLASS HBTable +METHOD Open() CLASS HBTable LOCAL lSuccess := .T. @@ -928,7 +928,7 @@ METHOD FldInit() CLASS HBTable RETURN oNew -METHOD PROCEDURE READ( lKeepBuffer ) CLASS HBTable +METHOD PROCEDURE Read( lKeepBuffer ) CLASS HBTable LOCAL i LOCAL nSel := Select( ::Alias ) @@ -1254,7 +1254,7 @@ METHOD AddOrder( cTag, cKey, cLabel, ; RETURN oOrd -METHOD REINDEX() CLASS HBTable +METHOD Reindex() CLASS HBTable LOCAL nSel := Select( ::Alias ) LOCAL nOrd := ( ::Alias )->( ordSetFocus( 0 ) ) @@ -1481,7 +1481,7 @@ CREATE CLASS HBOrder METHOD Alias() INLINE ::oTable:Alias METHOD New( cTag, cKey, cLabel, cFor, cWhile, lUnique, bEval, nInterval, cOrderBag ) - METHOD CREATE() + METHOD Create() METHOD SetFocus() INLINE ( ::alias )->( ordSetFocus( ::Tag, ::cOrderBag ) ) METHOD Destroy() INLINE ( ::alias )->( ordDestroy( ::Tag, ::cOrderBag ) ) diff --git a/harbour/contrib/xhb/xcstr.prg b/harbour/contrib/xhb/xcstr.prg index 7efc0fd77b..a79a798461 100644 --- a/harbour/contrib/xhb/xcstr.prg +++ b/harbour/contrib/xhb/xcstr.prg @@ -60,7 +60,7 @@ #define CRLF Chr( 13 ) + Chr( 10 ) -#xtranslate THROW( ) => ( Eval( ErrorBlock(), ), Break( ) ) +#xtranslate Throw( ) => ( Eval( ErrorBlock(), ), Break( ) ) // diff --git a/harbour/contrib/xhb/xdbmodst.prg b/harbour/contrib/xhb/xdbmodst.prg index 45e4190087..a17e00b68d 100644 --- a/harbour/contrib/xhb/xdbmodst.prg +++ b/harbour/contrib/xhb/xdbmodst.prg @@ -59,7 +59,7 @@ #define EG_RENAME 26 #endif -#xtranslate THROW( ) => ( Eval( ErrorBlock(), ), Break( ) ) +#xtranslate Throw( ) => ( Eval( ErrorBlock(), ), Break( ) ) FUNCTION dbModifyStructure( cFile ) diff --git a/harbour/contrib/xhb/xthrow.c b/harbour/contrib/xhb/xthrow.c index b1f88c6e0c..ef5603c3b5 100644 --- a/harbour/contrib/xhb/xthrow.c +++ b/harbour/contrib/xhb/xthrow.c @@ -4,7 +4,7 @@ /* * Harbour Project source code: - * THROW() compatibility function + * Throw() compatibility function * * Copyright 2007 Przemyslaw Czerpak * www - http://harbour-project.org diff --git a/harbour/extras/httpsrv/modules/cookie.prg b/harbour/extras/httpsrv/modules/cookie.prg index 3122552f80..45ffa9d223 100644 --- a/harbour/extras/httpsrv/modules/cookie.prg +++ b/harbour/extras/httpsrv/modules/cookie.prg @@ -50,13 +50,8 @@ * */ -#include "hbclass.ch" - MEMVAR _REQUEST -#xcommand TEXT INTO => #pragma __cstream|+=%s -// #pragma escapedstrings = on - FUNCTION HRBMAIN() LOCAL cHtml := "" @@ -70,7 +65,7 @@ FUNCTION HRBMAIN() hb_default( @cAction, "" ) // Sample page embedded - TEXT INTO cHtml +#pragma __cstream | cHtml += %s @@ -95,7 +90,7 @@ Pressing button you will redirect to /info page. Look at COOKIE values. - ENDTEXT +#pragma __endtext IF Empty( cAction ) // Set a simple cookie diff --git a/harbour/extras/httpsrv/modules/info.prg b/harbour/extras/httpsrv/modules/info.prg index 59efa339bd..5db7de0d75 100644 --- a/harbour/extras/httpsrv/modules/info.prg +++ b/harbour/extras/httpsrv/modules/info.prg @@ -50,14 +50,6 @@ * */ -/* - Show internal variables. - Call it with: /info -*/ - - -#include "hbclass.ch" - MEMVAR _SERVER, _REQUEST, _GET, _POST, _COOKIE, _SESSION, _HTTP_REQUEST, _HTTP_RESPONSE FUNCTION HRBMAIN() diff --git a/harbour/extras/httpsrv/modules/showcounter.prg b/harbour/extras/httpsrv/modules/showcounter.prg index 286c0d68fd..4e18238364 100644 --- a/harbour/extras/httpsrv/modules/showcounter.prg +++ b/harbour/extras/httpsrv/modules/showcounter.prg @@ -78,13 +78,9 @@ FUNCTION HRBMAIN() uhttpd_SetHeader( "Content-Type", "text/html" ) uhttpd_Write( "

Error: No image created

" ) ENDIF - - ELSE - uhttpd_SetHeader( "Content-Type", "text/html" ) uhttpd_Write( "

Error: no parameters passed

" ) - ENDIF RETURN .T. @@ -93,22 +89,19 @@ STATIC FUNCTION CreateCounter( cValue, cBaseImage ) LOCAL oI, oIDigits, nWidth, nHeight, nDigits, nNumWidth, oTemp -// LOCAL black, white, blue, red, green, cyan, gray -// LOCAL white +#if 0 + LOCAL black, white, blue, red, green, cyan, gray + LOCAL white +#endif LOCAL aNumberImages := {} LOCAL n, nValue -// LOCAL cFile // A value if not passed - hb_default( @cValue , Str( hb_RandomInt( 1, 10 ^ DISPLAY_NUM ), DISPLAY_NUM ) ) + hb_default( @cValue, Str( hb_RandomInt( 1, 10 ^ DISPLAY_NUM ), DISPLAY_NUM ) ) hb_default( @cBaseImage, "57chevy.gif" ) IF ! hb_FileExists( IMAGES_IN + cBaseImage ) - // hb_ToOutDebug( "ERROR: Base Image File '" + IMAGES_IN + cBaseImage + "' not found" ) - // THROW( "ERROR: Base Image File '" + IMAGES_IN + cBaseImage + "' not found" ) RETURN NIL - // ELSE - // hb_ToOutDebug( "ERROR: Base Image File '" + IMAGES_IN + cBaseImage + "' FOUND" ) ENDIF nValue := Val( cValue ) @@ -120,14 +113,14 @@ STATIC FUNCTION CreateCounter( cValue, cBaseImage ) cValue := StrZero( nValue, DISPLAY_NUM ) -// ? "Value = ", cValue +#if 0 + ? "Value = ", cValue // Check output directory - /* IF ! hb_DirExists( IMAGES_OUT ) DirMake( IMAGES_OUT ) ENDIF - */ +#endif /* Load a digits image in memory from file */ oIDigits := GDImage():LoadFromGif( IMAGES_IN + cBaseImage ) @@ -151,12 +144,13 @@ STATIC FUNCTION CreateCounter( cValue, cBaseImage ) ENDCASE nNumWidth := nWidth / nDigits -// ? "nNumWidth, nWidth, nHeight, nDigits = ", nNumWidth, nWidth, nHeight, nDigits +#if 0 + ? "nNumWidth, nWidth, nHeight, nDigits = ", nNumWidth, nWidth, nHeight, nDigits +#endif /* extracts single digits */ FOR n := 1 TO nDigits oTemp := oIDigits:Copy( ( n - 1 ) * nNumWidth, 0, nNumWidth, nHeight ) - // oTemp:SaveGif( IMAGES_OUT + StrZero( n - 1, 2 ) + ".gif" ) // Here I have to clone the image, otherwise on var destruction I loose // the image in memory AAdd( aNumberImages, oTemp:Clone() ) @@ -164,20 +158,22 @@ STATIC FUNCTION CreateCounter( cValue, cBaseImage ) /* Create counter image in memory */ oI := GDImage():New( nNumWidth * DISPLAY_NUM, nHeight ) // the counter -// ? "Image dimensions: ", oI:Width(), oI:Height() +#if 0 + ? "Image dimensions: ", oI:Width(), oI:Height() /* Allocate background */ -// white := oI:SetColor( 255, 255, 255 ) + white := oI:SetColor( 255, 255, 255 ) /* Allocate drawing color */ -// black := oI:SetColor( 0, 0, 0 ) -// blue := oI:SetColor( 0, 0, 255 ) -// red := oI:SetColor( 255, 0, 0 ) -// green := oI:SetColor( 0, 255, 0 ) -// cyan := oI:SetColor( 0, 255, 255 ) + black := oI:SetColor( 0, 0, 0 ) + blue := oI:SetColor( 0, 0, 255 ) + red := oI:SetColor( 255, 0, 0 ) + green := oI:SetColor( 0, 255, 0 ) + cyan := oI:SetColor( 0, 255, 255 ) /* Draw rectangle */ -// oI:Rectangle( 0, 0, 200, 30, , blue ) + oI:Rectangle( 0, 0, 200, 30,, blue ) +#endif /* Draw Digits */ FOR n := 1 TO Len( cValue ) @@ -191,18 +187,14 @@ STATIC FUNCTION CreateCounter( cValue, cBaseImage ) oI:Rectangle( ( n - 1 ) * nNumWidth, 0, ( n - 1 ) * nNumWidth + nNumWidth, nHeight, .T., gdTiled ) NEXT +#if 0 /* Write Final Counter Image */ -// cFile := "counter" + StrZero( hb_RandomInt( 1, 99 ), 2 ) + ".gif" -// oI:SaveGif( IMAGES_OUT + cFile ) + oI:SaveGif( IMAGES_OUT + "counter" + StrZero( hb_RandomInt( 1, 99 ), 2 ) + ".gif" ) - /* Destroy images in memory */ - // Class does it automatically - -// ? -// ? "Look at " + IMAGES_OUT + " folder for output images" -// ? - -// RETURN cFile + ? + ? "Look at " + IMAGES_OUT + " folder for output images" + ? +#endif RETURN oI:ToStringGif() diff --git a/harbour/extras/httpsrv/modules/tableservletdb.prg b/harbour/extras/httpsrv/modules/tableservletdb.prg index 1d8ee9d648..00dbdf7c12 100644 --- a/harbour/extras/httpsrv/modules/tableservletdb.prg +++ b/harbour/extras/httpsrv/modules/tableservletdb.prg @@ -61,9 +61,7 @@ FUNCTION HRBMAIN() LOCAL cXml, cPage, cCount, nCount LOCAL oTM - LOCAL hGets - - hGets := _REQUEST + LOCAL hGets := _REQUEST hb_default( @hGets, { => } ) @@ -71,15 +69,11 @@ FUNCTION HRBMAIN() cPage := hGets[ "page" ] - oTM := TableManager():New() - + oTM := TableManager():New() IF oTM:Open() - oTM:Read() cXml := oTM:getXmlData( Val( cPage ) ) - oTM:Close() - ENDIF ELSEIF hb_HHasKey( hGets, "count" ) @@ -87,37 +81,25 @@ FUNCTION HRBMAIN() cCount := hGets[ "count" ] IF cCount == "true" - oTM := TableManager():New() - - IF ( oTM:Open() ) - + IF oTM:Open() nCount := oTM:getLastRec() cXml := oTM:getXmlCount( nCount ) - oTM:Close() - ENDIF - ENDIF ENDIF - IF ! Empty( cXml ) - uhttpd_SetHeader( "Content-Type", "text/xml" ) // cache control uhttpd_SetHeader( "Cache-Control", "no-cache, must-revalidate" ) uhttpd_SetHeader( "Expires", "Mon, 26 Jul 1997 05:00:00 GMT" ) - uhttpd_Write( cXml ) - ELSE - uhttpd_SetHeader( "Content-Type", "text/xml" ) uhttpd_Write( '' ) uhttpd_Write( "No Data" ) - ENDIF RETURN .T. // I Handle HTML Output @@ -126,7 +108,7 @@ FUNCTION HRBMAIN() TableManager */ -CLASS TableManager +CREATE CLASS TableManager CLASS VAR ROWS_PER_PAGE INIT 23 @@ -137,8 +119,8 @@ CLASS TableManager METHOD New() METHOD Open() - METHOD CLOSE() INLINE iif( ::lOpened, ( table->( dbCloseArea() ), ::lOpened := .F. ), ) - METHOD READ() + METHOD Close() INLINE iif( ::lOpened, ( table->( dbCloseArea() ), ::lOpened := .F. ), ) + METHOD Read() METHOD getLastRec() INLINE table->( LastRec() ) METHOD getXmlData( page ) METHOD getXmlCount( ncount ) @@ -169,12 +151,11 @@ METHOD Open() CLASS TableManager RETURN ::lOpened -METHOD READ() CLASS TableManager +METHOD Read() CLASS TableManager LOCAL hMap, lOk := .F. #ifdef SIMULATE_SLOW_REPLY - // force slow connection to simulate long reply hb_idleSleep( 0.5 ) #endif @@ -391,12 +372,12 @@ METHOD xmlEncode( input ) CLASS TableManager RETURN out -CLASS BasicXML +CREATE CLASS BasicXML VAR aData INIT {} METHOD New() CONSTRUCTOR - METHOD APPEND( cString ) INLINE AAdd( ::aData, cString ) + METHOD append( cString ) INLINE AAdd( ::aData, cString ) METHOD ToString() ENDCLASS diff --git a/harbour/src/rdd/usrrdd/rdds/arrayrdd.prg b/harbour/src/rdd/usrrdd/rdds/arrayrdd.prg index c4bb2e3e31..14d639dac3 100644 --- a/harbour/src/rdd/usrrdd/rdds/arrayrdd.prg +++ b/harbour/src/rdd/usrrdd/rdds/arrayrdd.prg @@ -70,7 +70,7 @@ #include "hbtrace.ch" -#xtranslate THROW( ) => ( Eval( ErrorBlock(), ), Break( ) ) +#xtranslate Throw( ) => ( Eval( ErrorBlock(), ), Break( ) ) ANNOUNCE ARRAYRDD