2012-06-04 11:51 UTC+0200 Viktor Szakats (harbour syenar.net)
* tests/rddtest/adscl52.prg
* tests/rddtest/adscl53.prg
* tests/rddtest/ntxcl52.prg
* tests/rddtest/ntxcl53.prg
* tests/rddtest/cdxcl52.prg
* tests/rddtest/cdxcl53.prg
* examples/gfspell/spell.prg
* examples/httpsrv/uhttpd.prg
* examples/httpsrv/cookie.prg
* examples/httpsrv/cgifunc.prg
* examples/httpsrv/session.prg
* examples/terminal/trm_cli.prg
* examples/terminal/terminal.prg
* examples/terminal/trm_srv.prg
* examples/terminal/trm_app.prg
* examples/terminal/readme.txt
* examples/gtwvw/tests/wvwmouse.prg
* examples/gtwvw/tests/cbtest1.prg
* examples/gtwvw/tests/maincoor.prg
* examples/gtwvw/tests/cbtest6.prg
* examples/gtwvw/tests/wvwtest9.prg
* examples/gtwvw/tests/ebtest7.prg
* examples/gtwvw/tests/maximize.prg
* examples/gtwvw/tests/inpfocus.prg
* '<>' -> '!='
This commit is contained in:
@@ -442,7 +442,7 @@ FUNCTION uhttpd_AddSecondsToTime( cTime, nSecsToAdd, nDaysAdded )
|
||||
DEFAULT nSecsToAdd TO 0
|
||||
DEFAULT nDaysAdded TO 0 // nDaysAdded can be already valued, so below i add to this value
|
||||
|
||||
IF nSecsToAdd <> 0
|
||||
IF nSecsToAdd != 0
|
||||
nSecs := Secs( cTime ) + nSecsToAdd
|
||||
nDaysAdded += Int( nSecs / nOneDaySeconds ) // Attention! nDaysAdded can be already filled
|
||||
nSecs := nSecs - nDaysAdded
|
||||
@@ -631,7 +631,7 @@ RETURN uhttpd_HtmlConvertChars( cString, cQuote_style, aTranslations )
|
||||
|
||||
PROCEDURE uhttpd_Die( cError )
|
||||
LOCAL oErr, lError
|
||||
IF cError <> NIL //THEN OutStd( cError )
|
||||
IF cError != NIL //THEN OutStd( cError )
|
||||
//__OutDebug( "cError: ", cError )
|
||||
//IF !oCGI:HeaderSent()
|
||||
// oCGI:WriteLN( CRLF2BR( cError ), CRLF2BR( CRLF() ) )
|
||||
@@ -713,7 +713,7 @@ PROCEDURE uhttpd_WriteToLogFile( cString, cLog, lCreate )
|
||||
DEFAULT cLog TO cSep + "tmp" + cSep + "logfile.log"
|
||||
DEFAULT lCreate TO .F.
|
||||
|
||||
IF cLog <> NIL
|
||||
IF cLog != NIL
|
||||
|
||||
IF !lCreate .AND. FILE( cLog )
|
||||
nHandle := FOpen( cLog, FO_READWRITE + FO_SHARED )
|
||||
@@ -835,7 +835,7 @@ FUNCTION uhttpd_GetField( cVar, cType )
|
||||
IF Empty( xVal )
|
||||
xVal := NIL
|
||||
ENDIF
|
||||
IF cType <> NIL .AND. cType $ "NLD"
|
||||
IF cType != NIL .AND. cType $ "NLD"
|
||||
xVal := uhttpd_CStrToVal( xVal, cType )
|
||||
ENDIF
|
||||
ENDIF
|
||||
@@ -850,7 +850,7 @@ RETURN xVal
|
||||
FUNCTION uhttpd_HGetValue( hHash, cKey )
|
||||
LOCAL nPos
|
||||
LOCAL xVal
|
||||
IF hHash <> NIL
|
||||
IF hHash != NIL
|
||||
xVal := IIF( ( nPos := hb_HPos( hHash, cKey )) == 0, NIL, hb_HValueAt( hHash, nPos) )
|
||||
ENDIF
|
||||
//RETURN IIF( cKey IN hHash:Keys, hHash[ cKey ], NIL )
|
||||
|
||||
@@ -90,10 +90,10 @@ ENDCLASS
|
||||
// ------------------------------ ***************************** -----------------------------------
|
||||
|
||||
METHOD SetCookieDefaults( cDomain, cPath, nExpireDays, nExpireSecs ) CLASS uhttpd_Cookie
|
||||
IF cDomain <> NIL THEN ::cDomain := cDomain
|
||||
IF cPath <> NIL THEN ::cPath := cPath
|
||||
IF nExpireDays <> NIL THEN ::nExpireDays := nExpireDays
|
||||
IF nExpireSecs <> NIL THEN ::nExpireSecs := nExpireSecs
|
||||
IF cDomain != NIL THEN ::cDomain := cDomain
|
||||
IF cPath != NIL THEN ::cPath := cPath
|
||||
IF nExpireDays != NIL THEN ::nExpireDays := nExpireDays
|
||||
IF nExpireSecs != NIL THEN ::nExpireSecs := nExpireSecs
|
||||
RETURN NIL
|
||||
|
||||
METHOD SetCookie( cCookieName, xValue, cDomain, cPath, cExpires, lSecure, lHttpOnly ) CLASS uhttpd_Cookie
|
||||
@@ -127,13 +127,13 @@ METHOD SetCookie( cCookieName, xValue, cDomain, cPath, cExpires, lSecure, lHttpO
|
||||
|
||||
//cStr := cCookieName + "=" + uhttpd_UrlEncode( hb_cStr( xValue ) )
|
||||
|
||||
IF cDomain <> NIL
|
||||
IF cDomain != NIL
|
||||
cStr += "; domain=" + cDomain
|
||||
ENDIF
|
||||
IF cPath <> NIL
|
||||
IF cPath != NIL
|
||||
cStr += "; path=" + cPath
|
||||
ENDIF
|
||||
IF cExpires <> NIL
|
||||
IF cExpires != NIL
|
||||
cStr += "; expires=" + cExpires
|
||||
ENDIF
|
||||
IF ValType( lSecure ) == "L" .AND. lSecure
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
#command IF <lexpr> THEN <statement1> ELSE <statement2> =>;
|
||||
IF (<lexpr>) ; <statement1> ; ELSE ; <statement2> ; END
|
||||
|
||||
#xtranslate SetNewValueReturnOld( <p>, <v> ) => LOCAL xOld, xOld := <p>, IIF( <v> <> NIL, <p> := <v>, ), xOld
|
||||
#xtranslate SetNewValueReturnOld( <p>, <v> ) => LOCAL xOld, xOld := <p>, IIF( <v> != NIL, <p> := <v>, ), xOld
|
||||
#xtranslate DEFAULT( <p>, <v> ) => ( <p> := IIF( <p> == NIL, <v>, <p> ) )
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@ METHOD Start( cSID ) CLASS uhttpd_Session
|
||||
LOCAL xVal, nRand, nPos
|
||||
LOCAL hUrl
|
||||
|
||||
IF cSID <> NIL
|
||||
IF cSID != NIL
|
||||
::cSID := cSID
|
||||
ENDIF
|
||||
|
||||
@@ -211,7 +211,7 @@ METHOD Start( cSID ) CLASS uhttpd_Session
|
||||
|
||||
//TraceLog( "Active Sessions : " + hb_cStr( ::nActiveSessions ) )
|
||||
|
||||
IF ::nActiveSessions <> 0
|
||||
IF ::nActiveSessions != 0
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
|
||||
@@ -372,7 +372,7 @@ RETURN lRegistered
|
||||
|
||||
METHOD CacheLimiter( cNewLimiter ) CLASS uhttpd_Session
|
||||
LOCAL cOldLimiter := ::cCache_Limiter
|
||||
IF cNewLimiter <> NIL
|
||||
IF cNewLimiter != NIL
|
||||
IF cNewLimiter $ "none/nocache/private/private_no_expire/public"
|
||||
::cCache_Limiter := cNewLimiter
|
||||
ELSE
|
||||
@@ -382,10 +382,10 @@ METHOD CacheLimiter( cNewLimiter ) CLASS uhttpd_Session
|
||||
RETURN cOldLimiter
|
||||
|
||||
METHOD SetCookieParams( nLifeTime, cPath, cDomain, lSecure ) CLASS uhttpd_Session
|
||||
IF nLifeTime <> NIL THEN ::nCookie_LifeTime := nLifeTime
|
||||
IF cPath <> NIL THEN ::cCookie_Path := cPath
|
||||
IF cDomain <> NIL THEN ::cCookie_Domain := cDomain
|
||||
IF lSecure <> NIL THEN ::lCookie_Secure := lSecure
|
||||
IF nLifeTime != NIL THEN ::nCookie_LifeTime := nLifeTime
|
||||
IF cPath != NIL THEN ::cCookie_Path := cPath
|
||||
IF cDomain != NIL THEN ::cCookie_Domain := cDomain
|
||||
IF lSecure != NIL THEN ::lCookie_Secure := lSecure
|
||||
RETURN NIL
|
||||
|
||||
METHOD RegenerateID() CLASS uhttpd_Session
|
||||
@@ -566,18 +566,18 @@ RETURN lOk
|
||||
// -------------------------------*************************-----------------------------------------
|
||||
|
||||
METHOD SetSaveHandler( bOpen, bClose, bRead, bWrite, bDestroy, bGC ) CLASS uhttpd_Session
|
||||
IF bOpen <> NIL THEN ::bOpen := bOpen
|
||||
IF bClose <> NIL THEN ::bClose := bClose
|
||||
IF bRead <> NIL THEN ::bRead := bRead
|
||||
IF bWrite <> NIL THEN ::bWrite := bWrite
|
||||
IF bDestroy <> NIL THEN ::bDestroy := bDestroy
|
||||
IF bGC <> NIL THEN ::bGC := bGC
|
||||
IF bOpen != NIL THEN ::bOpen := bOpen
|
||||
IF bClose != NIL THEN ::bClose := bClose
|
||||
IF bRead != NIL THEN ::bRead := bRead
|
||||
IF bWrite != NIL THEN ::bWrite := bWrite
|
||||
IF bDestroy != NIL THEN ::bDestroy := bDestroy
|
||||
IF bGC != NIL THEN ::bGC := bGC
|
||||
RETURN NIL
|
||||
|
||||
METHOD SessionOpen( cPath, cName ) CLASS uhttpd_Session
|
||||
//TraceLog( "SessionOpen() - cName", cName )
|
||||
IF cPath <> NIL THEN ::cSavePath := cPath
|
||||
IF cName <> NIL THEN ::cName := cName
|
||||
IF cPath != NIL THEN ::cSavePath := cPath
|
||||
IF cName != NIL THEN ::cName := cName
|
||||
|
||||
RETURN .T.
|
||||
|
||||
@@ -598,14 +598,14 @@ METHOD SessionRead( cID ) CLASS uhttpd_Session
|
||||
//TraceLog( "SessionRead: cFile", cFile )
|
||||
IF File( cFile )
|
||||
DO WHILE nRetry++ <= ::nFileRetry
|
||||
IF ( nH := FOpen( cFile, FO_READ + FO_DENYWRITE ) ) <> -1
|
||||
IF ( nH := FOpen( cFile, FO_READ + FO_DENYWRITE ) ) != -1
|
||||
|
||||
nRetry := 0
|
||||
DO WHILE nRetry++ <= ::nFileRetry
|
||||
nFileSize := FSeek( nH, 0, FS_END )
|
||||
FSeek( nH, 0, FS_SET )
|
||||
cBuffer := Space( nFileSize )
|
||||
IF ( FRead( nH, @cBuffer, nFileSize ) ) <> nFileSize
|
||||
IF ( FRead( nH, @cBuffer, nFileSize ) ) != nFileSize
|
||||
//uhttpd_Die( "ERROR: On reading session file : " + cFile + ", File error : " + hb_cStr( FError() ) )
|
||||
hb_idleSleep( ::nFileWait / 1000 )
|
||||
LOOP
|
||||
@@ -642,8 +642,8 @@ METHOD SessionWrite( cID, cData ) CLASS uhttpd_Session
|
||||
//TraceLog( "SessionWrite() - cFile", cFile )
|
||||
IF nFileSize > 0
|
||||
DO WHILE nRetry++ <= ::nFileRetry
|
||||
IF ( nH := hb_FCreate( cFile, FC_NORMAL, FO_READWRITE + FO_DENYWRITE ) ) <> -1
|
||||
IF ( FWrite( nH, @cData, nFileSize ) ) <> nFileSize
|
||||
IF ( nH := hb_FCreate( cFile, FC_NORMAL, FO_READWRITE + FO_DENYWRITE ) ) != -1
|
||||
IF ( FWrite( nH, @cData, nFileSize ) ) != nFileSize
|
||||
uhttpd_Die( "ERROR: On writing session file : " + cFile + ", File error : " + hb_cStr( FError() ) )
|
||||
ELSE
|
||||
lOk := .T.
|
||||
@@ -786,7 +786,7 @@ METHOD Encode() CLASS uhttpd_Session
|
||||
|
||||
FOR EACH cKey IN _SESSION:Keys
|
||||
xVal := _SESSION[ cKey ]
|
||||
IF xVal <> NIL THEN aAdd( aSerial, { cKey, xVal } )
|
||||
IF xVal != NIL THEN aAdd( aSerial, { cKey, xVal } )
|
||||
NEXT
|
||||
|
||||
ENDIF
|
||||
@@ -802,7 +802,7 @@ METHOD Decode( cData ) CLASS uhttpd_Session
|
||||
//TraceLog( "Decode - cSerial", cSerial )
|
||||
//::oCGI:ToLogFile( "Decode - cSerial = " + hb_cStr( cSerial ), "/pointtoit/tmp/log.txt" )
|
||||
|
||||
DO WHILE ( xVal := HB_Deserialize( @cSerial ) ) <> NIL
|
||||
DO WHILE ( xVal := HB_Deserialize( @cSerial ) ) != NIL
|
||||
//TraceLog( "Decode - xVal", DumpValue( xVal ) )
|
||||
//::oCGI:ToLogFile( "Decode - xVal = " + hb_cStr( xVal ) + ", ValType( xVal ) = " + ValType( xVal ), "/pointtoit/tmp/log.txt" )
|
||||
|
||||
|
||||
@@ -2294,13 +2294,13 @@ STATIC FUNCTION ParseIni( cConfig )
|
||||
|
||||
IF cSection == "SCRIPTALIASES"
|
||||
xVal := hSect[ cKey ]
|
||||
IF xVal <> NIL
|
||||
IF xVal != NIL
|
||||
hDefault[ cSection ][ cKey ] := xVal
|
||||
ENDIF
|
||||
|
||||
ELSEIF cSection == "ALIASES"
|
||||
xVal := hSect[ cKey ]
|
||||
IF xVal <> NIL
|
||||
IF xVal != NIL
|
||||
hDefault[ cSection ][ cKey ] := xVal
|
||||
ENDIF
|
||||
|
||||
@@ -2361,7 +2361,7 @@ STATIC FUNCTION ParseIni( cConfig )
|
||||
xVal := Val( cVal )
|
||||
ENDCASE
|
||||
ENDCASE
|
||||
IF xVal <> NIL
|
||||
IF xVal != NIL
|
||||
hDefault[ cSection ][ cKey ] := xVal
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
Reference in New Issue
Block a user