diff --git a/harbour/ChangeLog b/harbour/ChangeLog
index fd6488e581..7419f61c0b 100644
--- a/harbour/ChangeLog
+++ b/harbour/ChangeLog
@@ -16,6 +16,34 @@
The license applies to all entries newer than 2009-04-28.
*/
+2012-10-04 13:20 UTC+0200 Viktor Szakats (harbour syenar.net)
+ - tests/testtok.prg
+ - deleted obsolete token test code
+
+ * contrib/hbformat/hbfmtcls.prg
+ * contrib/hbgd/tests/test_out.prg
+ * contrib/hbhttpd/core.prg
+ * contrib/hbmxml/tests/custom.prg
+ * contrib/hbmxml/tests/testmxml.prg
+ * contrib/hbnf/ftround.prg
+ * contrib/hbpgsql/tpostgre.prg
+ * contrib/hbtip/ftpcli.prg
+ * extras/gfspell/spell.prg
+ * extras/gtwvw/tests/ebtest7.prg
+ * extras/hbvpdf/hbvpdf.prg
+ * extras/hbvpdf/hbvpdft.prg
+ * extras/httpsrv/cgifunc.prg
+ * extras/httpsrv/session.prg
+ * extras/httpsrv/uhttpd.prg
+ * src/debug/dbgtmenu.prg
+ * src/debug/debugger.prg
+ * tests/db_brows.prg
+ * tests/inherit.prg
+ * tests/rto_tb.prg
+ * tests/stripem.prg
+ * utils/hbi18n/hbi18n.prg
+ ! fixed/avoided != operator on strings
+
2012-10-04 12:47 UTC+0200 Viktor Szakats (harbour syenar.net)
* src/rtl/tget.prg
! fixed regression from 2012-01-29 17:22 UTC+0100
diff --git a/harbour/contrib/hbformat/hbfmtcls.prg b/harbour/contrib/hbformat/hbfmtcls.prg
index d2fa700218..dabba0eb82 100644
--- a/harbour/contrib/hbformat/hbfmtcls.prg
+++ b/harbour/contrib/hbformat/hbfmtcls.prg
@@ -155,7 +155,7 @@ METHOD New( aParams, cIniName ) CLASS HBFORMATCODE
NEXT
ENDIF
- IF Right( ::cCommands, 1 ) != ","
+ IF !( Right( ::cCommands, 1 ) == "," )
::cCommands += ","
ENDIF
::cCommands += "IF,ELSEIF,ELSE,ENDIF,END,DO,WHILE,ENDDO,WITH,CASE,OTHERWISE,ENDCASE,BEGIN," +;
@@ -165,7 +165,7 @@ METHOD New( aParams, cIniName ) CLASS HBFORMATCODE
"LOOP,MENU,NEXT,PACK,PRINT,QUIT,READ,RECALL,REINDEX,RELEASE,RENAME,REQUEST,REPLACE,RESTORE," +;
"RUN,SAVE,SEEK,SELECT,SET,SKIP,SORT,STORE,SUM,TEXT,TOTAL,UNLOCK,USE,WAIT,ZAP,"
- IF Right( ::cClauses, 1 ) != ","
+ IF !( Right( ::cClauses, 1 ) == "," )
::cClauses += ","
ENDIF
::cClauses += "ADDITIVE,ALIAS,ALL,BLANK,BOTTOM,BOX,COLOR,DATE,DELETED,EACH,EXTENDED,EXCLUSIVE,FROM,GET," +;
@@ -173,7 +173,7 @@ METHOD New( aParams, cIniName ) CLASS HBFORMATCODE
"EXACT,EXCLUSIVE,FILTER,FIXED,FORMAT,INTENSITY,KEY,LIKE,MARGIN,MESSAGE,NEW,OFF,ON,ORDER,PATH,PICTURE,PRINTER,PROMPT," +;
"PROTECTED,RELATION,SCOREBOARD,SEQUENCE,SOFTSEEK,STEP,STRUCTURE,TYPEAHEAD,UNIQUE,WRAP,TAG,TO,TOP,VALID,WHEN,"
- IF Right( ::cFunctions, 1 ) != ","
+ IF !( Right( ::cFunctions, 1 ) == "," )
::cFunctions += ","
ENDIF
IF !( ",STR," $ Upper( ::cFunctions ) )
@@ -289,7 +289,7 @@ METHOD Reformat( aFile ) CLASS HBFORMATCODE
nLineSegment := 1
DO WHILE .T.
nPos := nPosSep
- IF Left( aFile[ i ], 1 ) != "#" .AND. ;
+ IF !( Left( aFile[ i ], 1 ) == "#" ) .AND. ;
( nPosSep := FindNotQuoted( ";", aFile[ i ], nPosSep ) ) != 0 .AND. ;
nPosSep < Len( aFile[ i ] ) .AND. ( nPosComment == 0 .OR. nPosSep < nPosComment )
cLine := SubStr( aFile[ i ], nPos, nPosSep - nPos + 1 )
@@ -581,7 +581,7 @@ METHOD FormatLine( cLine, lContinued ) CLASS HBFORMATCODE
nA := i
ENDIF
nState := FL_STATE_ANY
- ELSEIF c == "!" .AND. SubStr( cLine, i + 1, 1 ) != "="
+ ELSEIF c == "!" .AND. !( SubStr( cLine, i + 1, 1 ) == "=" )
IF nState == FL_STATE_STRING
IF nEnd == nBegin
nEnd := i
@@ -610,12 +610,12 @@ METHOD FormatLine( cLine, lContinued ) CLASS HBFORMATCODE
lFirst := .F.
ENDIF
IF !( "|" + SubStr( cLine, nB, 2 ) + "|" $ "|--|++|->|" )
- IF nA != 0 .AND. ::lSpaces .AND. nA < nLen .AND. SubStr( cLine, nA + 1, 1 ) != " "
+ IF nA != 0 .AND. ::lSpaces .AND. nA < nLen .AND. !( SubStr( cLine, nA + 1, 1 ) == " " )
cLine := Left( cLine, nA ) + " " + SubStr( cLine, nA + 1 )
nLen++
i++
ENDIF
- IF nB != 0 .AND. ::lSpaces .AND. nB > 1 .AND. SubStr( cLine, nB - 1, 1 ) != " "
+ IF nB != 0 .AND. ::lSpaces .AND. nB > 1 .AND. !( SubStr( cLine, nB - 1, 1 ) == " " )
cLine := Left( cLine, nB - 1 ) + " " + SubStr( cLine, nB )
nLen++
i++
@@ -747,7 +747,7 @@ METHOD SetOption( cLine, i, aIni ) CLASS HBFORMATCODE
ELSE
::nErr := 3
ENDIF
- IF ::nErr == 0 .AND. ValType( xRes ) != Left( cToken1, 1 )
+ IF ::nErr == 0 .AND. !( ValType( xRes ) == Left( cToken1, 1 ) )
::nErr := 4
ENDIF
ELSE
@@ -774,7 +774,7 @@ METHOD ReadIni( cIniName ) CLASS HBFORMATCODE
nLen := Len( aIni )
FOR i := 1 TO nLen
IF ! Empty( aIni[ i ] := AllTrim( aIni[ i ] ) ) .AND. ;
- ( c := Left( aIni[ i ], 1 ) ) != ";" .AND. c != "#"
+ !( ( c := Left( aIni[ i ], 1 ) ) == ";" ) .AND. !( c == "#" )
IF ! ::SetOption( aIni[ i ], @i, aIni )
EXIT
ENDIF
@@ -807,14 +807,14 @@ METHOD Array2File( cFileName, aFile ) CLASS HBFORMATCODE
cName := iif( ( i := RAt( ".", cFileName ) ) == 0, cFileName, SubStr( cFileName, 1, i - 1 ) )
IF Empty( ::cExtSave )
- cBakName := cName + iif( Left( ::cExtBack, 1 ) != ".", ".", "" ) + ::cExtBack
+ cBakName := cName + iif( Left( ::cExtBack, 1 ) == ".", "", "." ) + ::cExtBack
IF hb_FCopy( cFileName, cBakName ) == F_ERROR
RETURN .F.
ENDIF
ENDIF
IF ! Empty( ::cExtSave )
- cFileName := cName + iif( Left( ::cExtSave, 1 ) != ".", ".", "" ) + ::cExtSave
+ cFileName := cName + iif( Left( ::cExtSave, 1 ) == ".", "", "." ) + ::cExtSave
ENDIF
IF ::lFCaseLow
cPath := iif( ( i := RAt( "\", cFileName ) ) == 0, ;
diff --git a/harbour/contrib/hbgd/tests/test_out.prg b/harbour/contrib/hbgd/tests/test_out.prg
index 43a7732204..2ca4387d8c 100644
--- a/harbour/contrib/hbgd/tests/test_out.prg
+++ b/harbour/contrib/hbgd/tests/test_out.prg
@@ -67,19 +67,19 @@ PROCEDURE Main( ... )
//
- //hb_default( @cText, "Testo di Prova" )
+ //hb_default( @cText, "Testo di Prova" )
hb_default( @nPt, 30 )
IF cImg != NIL
- //OutJpg( cImg, nPt )
+ //OutJpg( cImg, nPt )
OutPhoto( cImg, nWidth, nHeight )
ELSEIF cPhoto != NIL
StartHTML()
- //OutHTML ValToPrg( hParams ) + "
"
- //OutHTML ValToPrg( cParams ) + "
"
- //OutHTML ValToPrg( cQuery ) + "
"
- //OutHTML "
" + "
"
+ //OutHTML ValToPrg( hParams ) + "
"
+ //OutHTML ValToPrg( cParams ) + "
"
+ //OutHTML ValToPrg( cQuery ) + "
"
+ //OutHTML "
" + "
"
OutHTML "
"
OutHTML ""
OutHTML " " + " "
@@ -95,9 +95,9 @@ PROCEDURE Main( ... )
OutHTML " |
"
OutHTML "
"
OutHTML "
"
- //OutHTML "
" + "
"
- //OutHTML OS() + "
"
- //OutHTML iif( OS_ISWINNT(), "WIN NT", "NON WIN NT" ) + "
"
+ //OutHTML "
" + "
"
+ //OutHTML OS() + "
"
+ //OutHTML iif( OS_ISWINNT(), "WIN NT", "NON WIN NT" ) + "
"
EndHTML()
ELSE
StartHTML()
@@ -180,10 +180,10 @@ PROCEDURE OutJpg( cText, nPitch )
oI := GDImage( 400, 100 )
/* Allocate background */
- // cyan := oI:SetColor( 0, 255, 255 )
+// cyan := oI:SetColor( 0, 255, 255 )
/* Allocate drawing color */
- // blue := oI:SetColor( 0, 0, 200 )
+// blue := oI:SetColor( 0, 0, 200 )
//oI:SetTransparent( blue )
oI:SetFontName( cFont )
@@ -293,10 +293,10 @@ FUNCTION GetParams( aParams )
RETURN hHashVars
- //***********************************************************
- // Decoding URL
- // Can return both a string or a number
- //
+//***********************************************************
+// Decoding URL
+// Can return both a string or a number
+//
FUNCTION URLDecode( cStr )
@@ -321,7 +321,7 @@ FUNCTION URLDecode( cStr )
ENDCASE
- // IF (cRet[ i ] > "9" .or. cRet[ i ] < "0") .and. cRet[ i ] != "."
+ // IF ( cRet[ i ] > "9" .or. cRet[ i ] < "0" ) .AND. !( cRet[ i ] == "." )
// lNumeric := .F.
// ENDIF
NEXT
diff --git a/harbour/contrib/hbhttpd/core.prg b/harbour/contrib/hbhttpd/core.prg
index e60cc7170e..f3ba02811a 100644
--- a/harbour/contrib/hbhttpd/core.prg
+++ b/harbour/contrib/hbhttpd/core.prg
@@ -87,7 +87,7 @@ METHOD RUN( hConfig ) CLASS UHttpd
"FirewallFilter" => "0.0.0.0/0" }
FOR EACH xValue IN hConfig
- IF ! HB_HHasKey( Self:hConfig, xValue:__enumKey ) .OR. ValType( xValue ) != ValType( Self:hConfig[xValue:__enumKey] )
+ IF ! HB_HHasKey( Self:hConfig, xValue:__enumKey ) .OR. !( ValType( xValue ) == ValType( Self:hConfig[ xValue:__enumKey ] ) )
Self:cError := "Invalid config option '" + xValue:__enumKey + "'"
RETURN .F.
ENDIF
@@ -1440,7 +1440,7 @@ PROCEDURE UProcFiles( cFileName, lIndex )
UWrite( HB_MEMOREAD( UOsFileName(cFileName ) ) )
ENDIF
ELSEIF HB_DirExists( UOsFileName( cFileName ) )
- IF Right( cFileName, 1 ) != "/"
+ IF !( Right( cFileName, 1 ) == "/" )
URedirect( "http://" + server["HTTP_HOST"] + server["SCRIPT_NAME"] + "/" )
RETURN
ENDIF
@@ -1551,14 +1551,14 @@ STATIC FUNCTION parse_data( aData, aCode, hConfig )
cExtend := NIL
cRet := ""
FOR EACH aInstr IN aCode
- SWITCH aInstr[1]
+ SWITCH aInstr[ 1 ]
CASE "txt"
- cRet += aInstr[2]
+ cRet += aInstr[ 2 ]
EXIT
CASE "="
- IF HB_HHasKey( aData, aInstr[2] )
- xValue := aData[aInstr[2]]
+ IF HB_HHasKey( aData, aInstr[ 2 ] )
+ xValue := aData[ aInstr[ 2 ] ]
IF HB_ISSTRING( xValue )
cRet += UHtmlEncode( xValue )
ELSEIF HB_ISNUMERIC( xValue )
@@ -1573,13 +1573,13 @@ STATIC FUNCTION parse_data( aData, aCode, hConfig )
Eval( hConfig[ "Trace" ], HB_STRFORMAT( "Template error: invalid type '%s'", ValType( xValue ) ) )
ENDIF
ELSE
- Eval( hConfig[ "Trace" ], HB_STRFORMAT( "Template error: variable '%s' not found", aInstr[2] ) )
+ Eval( hConfig[ "Trace" ], HB_STRFORMAT( "Template error: variable '%s' not found", aInstr[ 2 ] ) )
ENDIF
EXIT
CASE ":"
- IF HB_HHasKey( aData, aInstr[2] )
- xValue := aData[aInstr[2]]
+ IF HB_HHasKey( aData, aInstr[ 2 ] )
+ xValue := aData[ aInstr[ 2 ] ]
IF HB_ISSTRING( xValue )
cRet += xValue
ELSEIF HB_ISNUMERIC( xValue )
@@ -1594,44 +1594,44 @@ STATIC FUNCTION parse_data( aData, aCode, hConfig )
Eval( hConfig[ "Trace" ], HB_STRFORMAT( "Template error: invalid type '%s'", ValType( xValue ) ) )
ENDIF
ELSE
- Eval( hConfig[ "Trace" ], HB_STRFORMAT( "Template error: variable '%s' not found", aInstr[2] ) )
+ Eval( hConfig[ "Trace" ], HB_STRFORMAT( "Template error: variable '%s' not found", aInstr[ 2 ] ) )
ENDIF
EXIT
CASE "if"
- xValue := iif( HB_HHasKey( aData, aInstr[2] ), aData[aInstr[2]], NIL )
+ xValue := iif( HB_HHasKey( aData, aInstr[ 2 ] ), aData[ aInstr[ 2 ] ], NIL )
IF ! Empty( xValue )
- cRet += parse_data( aData, aInstr[3], hConfig )
+ cRet += parse_data( aData, aInstr[ 3 ], hConfig )
ELSE
- cRet += parse_data( aData, aInstr[4], hConfig )
+ cRet += parse_data( aData, aInstr[ 4 ], hConfig )
ENDIF
EXIT
CASE "loop"
- IF HB_HHasKey( aData, aInstr[2] ) .AND. HB_ISARRAY( aValue := aData[aInstr[2]] )
+ IF HB_HHasKey( aData, aInstr[ 2 ] ) .AND. HB_ISARRAY( aValue := aData[ aInstr[ 2 ] ] )
FOR EACH xValue IN aValue
aData2 := HB_HCLONE( aData )
- HB_HEVAL( xValue, {| k, v | aData2[aInstr[2] + "." + k] := v } )
- aData2[aInstr[2] + ".__index"] := xValue:__enumIndex
- cRet += parse_data( aData2, aInstr[3], hConfig )
+ HB_HEVAL( xValue, {| k, v | aData2[ aInstr[ 2 ] + "." + k ] := v } )
+ aData2[ aInstr[ 2 ] + ".__index"] := xValue:__enumIndex
+ cRet += parse_data( aData2, aInstr[ 3 ], hConfig )
aData2 := NIL
NEXT
ELSE
- Eval( hConfig[ "Trace" ], HB_STRFORMAT( "Template error: loop variable '%s' not found", aInstr[2] ) )
+ Eval( hConfig[ "Trace" ], HB_STRFORMAT( "Template error: loop variable '%s' not found", aInstr[ 2 ] ) )
ENDIF
EXIT
CASE "extend"
- cExtend := aInstr[2]
+ cExtend := aInstr[ 2 ]
EXIT
CASE "include"
- cRet += parse_data( aData, compile_file( aInstr[2], hConfig ), hConfig )
+ cRet += parse_data( aData, compile_file( aInstr[ 2 ], hConfig ), hConfig )
EXIT
ENDSWITCH
NEXT
IF cExtend != NIL
- aData[""] := cRet
+ aData[ "" ] := cRet
cRet := ""
aCode := compile_file( cExtend, hConfig )
ENDIF
diff --git a/harbour/contrib/hbmxml/tests/custom.prg b/harbour/contrib/hbmxml/tests/custom.prg
index 67011bd47f..7d6ccfd2ff 100644
--- a/harbour/contrib/hbmxml/tests/custom.prg
+++ b/harbour/contrib/hbmxml/tests/custom.prg
@@ -30,7 +30,7 @@ PROCEDURE main()
RETURN
ENDIF
- IF hb_md5( _ENCODE( node ) ) != mxmlElementGetAttr( node, "checksum" )
+ IF !( hb_md5( _ENCODE( node ) ) == mxmlElementGetAttr( node, "checksum" ) )
OutErr( "Custom data of element is corrupted!" )
mxmlDelete( tree )
diff --git a/harbour/contrib/hbmxml/tests/testmxml.prg b/harbour/contrib/hbmxml/tests/testmxml.prg
index c7ad5751c7..54758a6079 100644
--- a/harbour/contrib/hbmxml/tests/testmxml.prg
+++ b/harbour/contrib/hbmxml/tests/testmxml.prg
@@ -82,7 +82,7 @@ PROCEDURE Main( cFileArg )
ENDIF
cStr := mxmlGetElement( hTree )
- IF cStr != "element"
+ IF !( cStr == "element" )
OutErr( hb_strFormat( "ERROR: Parent value is '%s', expected 'element'", cStr ) + hb_eol() )
mxmlDelete( hTree )
@@ -215,7 +215,7 @@ PROCEDURE Main( cFileArg )
ENDIF
cStr := mxmlGetText( hNode, @nNum )
- IF nNum != 1 .OR. Empty( cStr ) .OR. cStr != "text"
+ IF nNum != 1 .OR. Empty( cStr ) .OR. !( cStr == "text" )
OutErr( hb_strFormat( "ERROR: Fourth child value is %d, '%s', expected 1, 'text'!", ;
nNum, cStr ) + hb_eol() )
@@ -259,7 +259,7 @@ PROCEDURE Main( cFileArg )
mxmlDelete( hTree )
ErrorLevel( 1 )
QUIT
- ELSEIF mxmlGetType( hNode ) != MXML_OPAQUE .OR. mxmlGetOpaque( hNode ) != "value"
+ ELSEIF mxmlGetType( hNode ) != MXML_OPAQUE .OR. !( mxmlGetOpaque( hNode ) == "value" )
OutErr( "ERROR: Bad value for '*/two'." + hb_eol() )
mxmlDelete( hTree )
@@ -274,7 +274,7 @@ PROCEDURE Main( cFileArg )
mxmlDelete( hTree )
ErrorLevel( 1 )
QUIT
- ELSEIF mxmlGetType( hNode ) != MXML_OPAQUE .OR. mxmlGetOpaque( hNode ) != "value"
+ ELSEIF mxmlGetType( hNode ) != MXML_OPAQUE .OR. !( mxmlGetOpaque( hNode ) == "value" )
OutErr( "ERROR: Bad value for 'foo/*/two'." + hb_eol() )
mxmlDelete( hTree )
@@ -289,7 +289,7 @@ PROCEDURE Main( cFileArg )
mxmlDelete( hTree )
ErrorLevel( 1 )
QUIT
- ELSEIF mxmlGetType( hNode ) != MXML_OPAQUE .OR. mxmlGetOpaque( hNode ) != "value"
+ ELSEIF mxmlGetType( hNode ) != MXML_OPAQUE .OR. !( mxmlGetOpaque( hNode ) == "value" )
OutErr( "ERROR: Bad value for 'foo/bar/one/two'." + hb_eol() )
mxmlDelete( hTree )
diff --git a/harbour/contrib/hbnf/ftround.prg b/harbour/contrib/hbnf/ftround.prg
index ad1420de3a..0a7913d571 100644
--- a/harbour/contrib/hbnf/ftround.prg
+++ b/harbour/contrib/hbnf/ftround.prg
@@ -44,8 +44,8 @@ FUNCTION FT_ROUND( nNumber, nRoundToAmount, cRoundType, cRoundDirection, ;
// Are We Rounding to the Nearest Whole
// Number or to Zero Decimal Places??
- IF ( Left( cRoundType, 1 ) != NEAREST_WHOLE_NUMBER .AND. ;
- ( nRoundToAmount := Int( nRoundToAmount ) ) != 0 )
+ IF !( Left( cRoundType, 1 ) == NEAREST_WHOLE_NUMBER ) .AND. ;
+ ( nRoundToAmount := Int( nRoundToAmount ) ) != 0
// No, Are We Rounding to the Nearest
// Decimal Place??
@@ -58,8 +58,7 @@ FUNCTION FT_ROUND( nNumber, nRoundToAmount, cRoundType, cRoundDirection, ;
// Are We Already Within the Acceptable
// Error Factor??
- IF ( Abs( Int( nResult * nRoundToAmount ) - ( nResult * nRoundToAmount ) ) > ;
- nAcceptableError )
+ IF Abs( Int( nResult * nRoundToAmount ) - ( nResult * nRoundToAmount ) ) > nAcceptableError
// No, Are We Rounding Down??
nResult -= iif( Left( cRoundDirection, 1 ) == ROUND_DOWN, ;
; // Yes, Make Downward Adjustment
diff --git a/harbour/contrib/hbpgsql/tpostgre.prg b/harbour/contrib/hbpgsql/tpostgre.prg
index c59ea4f04a..a557afd81d 100644
--- a/harbour/contrib/hbpgsql/tpostgre.prg
+++ b/harbour/contrib/hbpgsql/tpostgre.prg
@@ -509,7 +509,7 @@ CREATE CLASS TPQQuery
METHOD Append( oRow )
METHOD SetKey()
- METHOD Changed( nField ) INLINE ::aRow[ nField ] != ::aOld[ nField ]
+ METHOD Changed( nField ) INLINE !( ::aRow[ nField ] == ::aOld[ nField ] )
METHOD Blank() INLINE ::GetBlankRow()
METHOD Struct()
diff --git a/harbour/contrib/hbtip/ftpcli.prg b/harbour/contrib/hbtip/ftpcli.prg
index 89732ce1f2..987c368c11 100644
--- a/harbour/contrib/hbtip/ftpcli.prg
+++ b/harbour/contrib/hbtip/ftpcli.prg
@@ -215,7 +215,7 @@ METHOD GetReply() CLASS tIPClientFTP
ENDDO
// 4 and 5 are error codes
- IF ::InetErrorCode( ::SocketCon ) != 0 .OR. Left( ::cReply, 1 ) >= "4"
+ IF ::InetErrorCode( ::SocketCon ) != 0 .OR. Val( Left( ::cReply, 1 ) ) >= 4
RETURN .F.
ENDIF
diff --git a/harbour/extras/gfspell/spell.prg b/harbour/extras/gfspell/spell.prg
index de072c0281..1610ea2872 100644
--- a/harbour/extras/gfspell/spell.prg
+++ b/harbour/extras/gfspell/spell.prg
@@ -1588,8 +1588,8 @@ else
if nPatSize == nStrSize
lMatch := .T.
for y := 1 to nPatSize
- if substr(cPattern,y,1)!="?" .and. ;
- substr(cPattern,y,1)!= substr(cString,y,1)
+ if !(substr(cPattern,y,1)=="?") .and. ;
+ !(substr(cPattern,y,1)== substr(cString,y,1))
lMatch := .F.
exit
endif
diff --git a/harbour/extras/gtwvw/tests/ebtest7.prg b/harbour/extras/gtwvw/tests/ebtest7.prg
index 190cda1d0a..1654df84d8 100644
--- a/harbour/extras/gtwvw/tests/ebtest7.prg
+++ b/harbour/extras/gtwvw/tests/ebtest7.prg
@@ -531,7 +531,7 @@ return NIL
/************* borrowed and modified from minigui *************/
//from h_textbox.prg
-static PROCEDURE ProcessCharMask ( mnwinnum, mnebid, mcvaltype, mcpict )
+static PROCEDURE ProcessCharMask( mnwinnum, mnebid, mcvaltype, mcpict )
Local InBuffer , OutBuffer := '' , icp , x , CB , CM , BadEntry := .F. , InBufferLeft , InBufferRight , Mask , OldChar , BackInbuffer
Local pc := 0
Local fnb := 0
@@ -560,28 +560,28 @@ Local ol := 0
pFlag := .F. //x for clarity
if mcvaltype=="N"
// RL 104
- If Left ( AllTrim(InBuffer) , 1 ) == '-' .And. Val(InBuffer) == 0
+ If Left( AllTrim(InBuffer) , 1 ) == '-' .And. Val(InBuffer) == 0
NegativeZero := .T.
EndIf
If Pcount() > 1
// Point Count For Numeric InputMask
- For x := 1 To Len ( InBuffer )
- CB := SubStr (InBuffer , x , 1 )
+ For x := 1 To Len( InBuffer )
+ CB := SubStr(InBuffer , x , 1 )
If CB == '.' .or. CB == ','
pc++
EndIf
Next x
// RL 89
- If left (InBuffer,1) == '.' .or. left (InBuffer,1) == ','
+ If left( InBuffer, 1 ) == '.' .or. left( InBuffer, 1 ) == ','
pFlag := .T.
EndIf
// Find First Non-Blank Position
- For x := 1 To Len ( InBuffer )
- CB := SubStr (InBuffer , x , 1 )
- If CB != ' '
+ For x := 1 To Len( InBuffer )
+ CB := SubStr( InBuffer , x , 1 )
+ If !( CB == " " )
fnb := x
Exit
EndIf
@@ -591,12 +591,12 @@ Local ol := 0
BackInBuffer := InBuffer
- OldChar := SubStr ( InBuffer , icp+1 , 1 )
+ OldChar := SubStr( InBuffer , icp+1 , 1 )
- If Len ( InBuffer ) < Len ( Mask )
- InBufferLeft := Left ( InBuffer , icp )
+ If Len( InBuffer ) < Len( Mask )
+ InBufferLeft := Left( InBuffer , icp )
- InBufferRight := Right ( InBuffer , Len (InBuffer) - icp )
+ InBufferRight := Right( InBuffer , Len(InBuffer) - icp )
if CharMaskTekstOK(InBufferLeft + ' ' + InBufferRight,mcvaltype, Mask) .and. ;
!CharMaskTekstOK(InBufferLeft + InBufferRight,mcvaltype,Mask)
@@ -606,12 +606,12 @@ Local ol := 0
endif
EndIf
- If Len ( InBuffer ) > Len ( Mask ) .and.;
+ If Len( InBuffer ) > Len( Mask ) .and.;
len(Mask)>0
- InBufferLeft := Left ( InBuffer , icp )
+ InBufferLeft := Left( InBuffer , icp )
- InBufferRight := Right ( InBuffer , Len (InBuffer) - icp - 1 )
+ InBufferRight := Right( InBuffer , Len(InBuffer) - icp - 1 )
InBuffer := InBufferLeft + InBufferRight
EndIf
@@ -619,13 +619,13 @@ Local ol := 0
// Process Mask
OutBuffer := "" //x for clarity
BadEntry := .F. //x for clarity
- For x := 1 To Len (Mask)
- CB := SubStr (InBuffer , x , 1 )
- CM := SubStr (Mask , x , 1 )
+ For x := 1 To Len(Mask)
+ CB := SubStr(InBuffer , x , 1 )
+ CM := SubStr(Mask , x , 1 )
Do Case
Case (CM) == 'A' .or. (CM) == '!'
- If IsAlpha ( CB ) .Or. CB == ' '
+ If IsAlpha( CB ) .Or. CB == ' '
if (CM)=="!"
OutBuffer := OutBuffer + UPPER(CB)
else
@@ -641,7 +641,7 @@ Local ol := 0
EndIf
Case CM == '9'
- If IsDigit ( CB ) .Or. CB == ' ' .Or.;
+ If IsDigit( CB ) .Or. CB == ' ' .Or.;
( mcvaltype=="N" .and.; //x
CB == '-' .And. x == fnb .And. Pcount() > 1 )
@@ -687,7 +687,7 @@ Local ol := 0
// RL 104
If NegativeZero == .T.
- Output := Transform ( GetValFromText ( wvw_ebgettext(mnwinnum, mnebid) , mcvaltype ) , Mask )
+ Output := Transform( GetValFromText( wvw_ebgettext(mnwinnum, mnebid) , mcvaltype ) , Mask )
//x better:
ol := len(Output)
@@ -697,13 +697,13 @@ Local ol := 0
wvw_ebsettext(mnwinnum, mnebid, Output)
wvw_ebsetsel(mnwinnum, mnebid, at('.',OutBuffer) + dc, at('.',OutBuffer) + dc)
Else
- wvw_ebsettext(mnwinnum, mnebid, Transform ( GetValFromText ( wvw_ebgettext(mnwinnum, mnebid) , mcvaltype ) , Mask ))
+ wvw_ebsettext(mnwinnum, mnebid, Transform( GetValFromText( wvw_ebgettext(mnwinnum, mnebid) , mcvaltype ) , Mask ))
wvw_ebsetsel(mnwinnum, mnebid, at('.',OutBuffer) + dc, at('.',OutBuffer) + dc)
EndIf
Else
If pFlag == .T.
- ncp := at ( '.' , wvw_ebgettext(mnwinnum, mnebid) )
+ ncp := at( '.' , wvw_ebgettext(mnwinnum, mnebid) )
wvw_ebsetsel(mnwinnum, mnebid, ncp, ncp)
Else
// Restore Initial CaretPos
@@ -714,9 +714,9 @@ Local ol := 0
wvw_ebsetsel(mnwinnum, mnebid, icp, icp)
// Skip Protected Characters
- For x := 1 To Len (OutBuffer)
- CB := SubStr ( OutBuffer , icp+x , 1 )
- CM := SubStr ( Mask , icp+x , 1 )
+ For x := 1 To Len(OutBuffer)
+ CB := SubStr( OutBuffer , icp+x , 1 )
+ CM := SubStr( Mask , icp+x , 1 )
If !IsDigit(CB) .And. !IsAlpha(CB) .And.;
( !( CB == ' ' ) .or. ( CB == ' ' .and. CM == ' ' ) )
@@ -735,11 +735,11 @@ Local lPassed:=.T.,CB,CM,x
//x BEGIN
if cvaltype=="D"
For x := 1 To min(Len(cString),Len(cMask))
- CB := SubStr ( cString , x , 1 )
- CM := SubStr ( cMask , x , 1 )
+ CB := SubStr( cString , x , 1 )
+ CM := SubStr( cMask , x , 1 )
Do Case
Case CM == '9'
- If IsDigit ( CB ) .Or. CB == ' '
+ If IsDigit( CB ) .Or. CB == ' '
* lPassed:=.T.
Else
Return .F.
@@ -753,18 +753,18 @@ Local lPassed:=.T.,CB,CM,x
//x END
For x := 1 To min(Len(cString),Len(cMask))
- CB := SubStr ( cString , x , 1 )
- CM := SubStr ( cMask , x , 1 )
+ CB := SubStr( cString , x , 1 )
+ CM := SubStr( cMask , x , 1 )
Do Case
// JK
Case (CM) == 'A' .or. (CM) == '!'
- If IsAlpha ( CB ) .Or. CB == ' '
+ If IsAlpha( CB ) .Or. CB == ' '
* lPassed:=.T.
Else
Return .F.
EndIf
Case CM == '9'
- If IsDigit ( CB ) .Or. CB == ' '
+ If IsDigit( CB ) .Or. CB == ' '
* lPassed:=.T.
Else
Return .F.
@@ -782,7 +782,7 @@ Local lPassed:=.T.,CB,CM,x
Return .T. //lPassed
//from h_textbox.prg
-static Function GetValFromText ( Text , mcvaltype )
+static Function GetValFromText( Text , mcvaltype )
* eg. GetValFromText( "999,999.99" ) --> 999999.99
Local x , c , s
@@ -799,7 +799,7 @@ Local x , c , s
* ASSUME numeric
s := ''
- For x := 1 To Len ( Text )
+ For x := 1 To Len( Text )
c := SubStr(Text,x,1)
//If c='0' .or. c='1' .or. c='2' .or. c='3' .or. c='4' .or. c='5' .or. c='6' .or. c='7' .or. c='8' .or. c='9' .or. c='.' .or. c='-'
If c $ '0123456789' .or. c $ '.-'
@@ -807,17 +807,17 @@ Local x , c , s
EndIf
Next x
- If Left ( AllTrim(Text) , 1 ) == '(' .OR. Right ( AllTrim(Text) , 2 ) == 'DB'
+ If Left( AllTrim(Text) , 1 ) == '(' .OR. Right( AllTrim(Text) , 2 ) == 'DB'
s := '-' + s
EndIf
//useless!
- //s := Transform ( Val(s) , Getnummask(s_cmask, mcvaltype) )
+ //s := Transform( Val(s) , Getnummask(s_cmask, mcvaltype) )
Return Val(s)
//from h_textbox.prg
-static Function GetNumMask ( Text, mcvaltype )
+static Function GetNumMask( Text, mcvaltype )
* eg. GetNumMask("999,999.99") --> "999999.99"
Local i , c , s
//x BEGIN
@@ -828,7 +828,7 @@ Local i , c , s
//x END
s := ''
- For i := 1 To Len ( Text )
+ For i := 1 To Len( Text )
c := SubStr(Text,i,1)
If c='9' .or. c='.'
s := s + c
diff --git a/harbour/extras/hbvpdf/hbvpdf.prg b/harbour/extras/hbvpdf/hbvpdf.prg
index 7a3027271b..e7522b4525 100644
--- a/harbour/extras/hbvpdf/hbvpdf.prg
+++ b/harbour/extras/hbvpdf/hbvpdf.prg
@@ -2470,7 +2470,7 @@ if hFile == NIL
endif
cData := space(3)
fRead(hFile,@cData,3)
- if left(cData,1) != 'A'
+ if !( left(cData,1) == 'A' )
return aRay
endif
nLen := bin2i(right(cData,2))
@@ -2483,7 +2483,7 @@ do while nDepth < nLen
endif
cType:= padl(cData,1)
nDataLen:= bin2i(right(cData,2))
- if cType != 'A'
+ if !( cType == 'A' )
cData := space(nDataLen)
nBytes:= fRead(hFile,@cData,nDataLen)
if nBytesid);
- // $send_cookie = true;
- // $define_sid = true;
- // }
+ // IF !(trim($url['host']) == $GLOBALS['SERVER_NAME'])
+ // unset(session->id)
+ // send_cookie := .T.
+ // define_sid := .T.
ENDIF
// Do we have an existing session ID?
@@ -751,8 +750,8 @@ STATIC FUNCTION FT_ELAPSED(dStart, dEnd, cTimeStart, cTimeEnd)
dEnd := DATE()
ENDIF
- iif( VALTYPE(cTimeStart) != 'C', cTimeStart := '00:00:00', )
- iif( VALTYPE(cTimeEnd) != 'C', cTimeEnd := '00:00:00', )
+ iif( ! HB_ISSTRING(cTimeStart), cTimeStart := '00:00:00', )
+ iif( ! HB_ISSTRING(cTimeEnd) , cTimeEnd := '00:00:00', )
nTotalSec := (dEnd - dStart) * 86400 + ;
VAL(cTimeEnd) * 3600 + ;
diff --git a/harbour/extras/httpsrv/uhttpd.prg b/harbour/extras/httpsrv/uhttpd.prg
index 3e2091dd79..7a26158528 100644
--- a/harbour/extras/httpsrv/uhttpd.prg
+++ b/harbour/extras/httpsrv/uhttpd.prg
@@ -407,7 +407,7 @@ FUNCTION Main( ... )
IF HB_ISSTRING( cApplicationRoot )
cI := cApplicationRoot
IF HB_DirExists( cI )
- IF RIGHT( cI, 1 ) == "/" .AND. LEN(cI) > 2 .AND. SUBSTR( cI, LEN( cI ) - 2, 1 ) != ":"
+ IF RIGHT( cI, 1 ) == "/" .AND. LEN(cI) > 2 .AND. !( SUBSTR( cI, LEN( cI ) - 2, 1 ) == ":" )
s_cApplicationRoot := LEFT( cI, LEN( cI ) - 1 )
ELSE
s_cApplicationRoot := cI
@@ -431,7 +431,7 @@ FUNCTION Main( ... )
//cI := STRTRAN( SUBSTR( cDocumentRoot, 2 ), "\", "/" )
cI := cDocumentRoot
IF HB_DirExists( cI )
- IF RIGHT( cI, 1 ) == "/" .AND. LEN(cI) > 2 .AND. SUBSTR( cI, LEN( cI ) - 2, 1 ) != ":"
+ IF RIGHT( cI, 1 ) == "/" .AND. LEN(cI) > 2 .AND. !( SUBSTR( cI, LEN( cI ) - 2, 1 ) == ":" )
s_cDocumentRoot := LEFT( cI, LEN( cI ) - 1 )
ELSE
s_cDocumentRoot := cI
@@ -1120,8 +1120,9 @@ STATIC FUNCTION ParseRequest( cRequest )
WriteToConsole( aRequest[ 1 ] )
aLine := uhttpd_split( " ", aRequest[ 1 ] )
IF LEN( aLine ) != 3 .OR. ;
- ( aLine[1] != "GET" .AND. aLine[ 1 ] != "POST" ) .OR. ; // Sorry, we support GET and POST only
- LEFT( aLine[ 3 ], 5 ) != "HTTP/"
+ ( !( Left( aLine[ 1 ], 3 ) == "GET" ) .AND. ;
+ !( Left( aLine[ 1 ], 4 ) == "POST" ) ) .OR. ; // Sorry, we support GET and POST only
+ !( LEFT( aLine[ 3 ], 5 ) == "HTTP/" )
// Set status code
t_nStatusCode := 501 // Not Implemented
RETURN .F.
@@ -1619,10 +1620,10 @@ STATIC FUNCTION CGIKill( hProc, hmtxCGIKill )
********************************************************************/
FUNCTION uhttpd_OSFileName( cFileName )
- IF hb_ps() != "/"
- RETURN STRTRAN( cFileName, "/", hb_ps() )
+ IF hb_ps() == "/"
+ RETURN cFileName
ENDIF
- RETURN cFileName
+ RETURN STRTRAN( cFileName, "/", hb_ps() )
PROCEDURE uhttpd_SetStatusCode(nStatusCode)
t_nStatusCode := nStatusCode
@@ -1888,7 +1889,7 @@ STATIC FUNCTION uproc_default()
ELSEIF HB_DirExists( uhttpd_OSFileName( cFileName ) )
// if it exists as folder and it is missing trailing slash I add it and redirect to it
- IF RIGHT( cFileName, 1 ) != "/"
+ IF !( RIGHT( cFileName, 1 ) == "/" )
uhttpd_SetHeader( "Location", "http://" + _SERVER[ "HTTP_HOST" ] + _SERVER[ "SCRIPT_NAME" ] + "/" )
RETURN MakeResponse()
ENDIF
diff --git a/harbour/src/debug/dbgtmenu.prg b/harbour/src/debug/dbgtmenu.prg
index e2c73989e3..d29f7f4211 100644
--- a/harbour/src/debug/dbgtmenu.prg
+++ b/harbour/src/debug/dbgtmenu.prg
@@ -186,7 +186,7 @@ METHOD Build() CLASS HBDbMenu
::nRight := nPos + 1
::nBottom := ::nTop + Len( ::aItems ) + 1
FOR n := 1 TO Len( ::aItems )
- IF ::aItems[ n ]:cPrompt != "-"
+ IF !( Left( ::aItems[ n ]:cPrompt, 1 ) == "-" )
::aItems[ n ]:cPrompt := " " + PadR( ::aItems[ n ]:cPrompt, ::nRight - ::nLeft - 1 )
ENDIF
NEXT
diff --git a/harbour/src/debug/debugger.prg b/harbour/src/debug/debugger.prg
index 2cc5342516..0f427be826 100644
--- a/harbour/src/debug/debugger.prg
+++ b/harbour/src/debug/debugger.prg
@@ -1092,7 +1092,7 @@ METHOD EditColor( nColor, oBrwColors ) CLASS HBDebugger
oBrwColors:ForceStable()
IF __dbgInput( Row(), Col() + 15,, @cColor, ;
- {| cColor | iif( Type( cColor ) != "C", ;
+ {| cColor | iif( !( Type( cColor ) == "C" ), ;
( __dbgAlert( "Must be string" ), .F. ), .T. ) }, ;
SubStr( ::ClrModal(), 5 ) )
::aColors[ nColor ] := &cColor
@@ -1112,7 +1112,7 @@ METHOD EditSet( nSet, oBrwSets ) CLASS HBDebugger
oBrwSets:ForceStable()
IF __dbgInput( Row(), Col() + 13,, @cSet, ;
- {| cSet | iif( Type( cSet ) != cType, ;
+ {| cSet | iif( !( Type( cSet ) == cType ), ;
( __dbgAlert( "Must be of type '" + cType + "'" ), .F. ), .T. ) }, ;
SubStr( ::ClrModal(), 5 ) )
Set( nSet, &cSet )
@@ -1511,7 +1511,7 @@ METHOD InputBox( cMsg, uValue, bValid, lEditable ) CLASS HBDebugger
IF lEditable
- IF cType != "C" .OR. Len( uValue ) < nWidth
+ IF !( cType == "C" ) .OR. Len( uValue ) < nWidth
uTemp := PadR( uValue, nWidth )
ENDIF
__dbgInput( nTop + 1, nLeft + 1, nWidth, @uTemp, bValid, ;
diff --git a/harbour/tests/db_brows.prg b/harbour/tests/db_brows.prg
index 30588345c8..e8f84df682 100644
--- a/harbour/tests/db_brows.prg
+++ b/harbour/tests/db_brows.prg
@@ -375,7 +375,7 @@ FUNCTION DBFLIST( mslist, x1, y1, x2, y2, title, maskey )
CASE ( xkey == K_ENTER .OR. ! Empty( hb_keyChar( xkey ) ) ) .AND. predit > 1
fipos := LI_COLPOS + LI_NLEFT - 1 - LI_FREEZE
IF LI_WHEN == NIL .OR. Len( LI_WHEN ) < fipos .OR. LI_WHEN[ fipos ] == NIL .OR. Eval( LI_WHEN[ fipos ] )
- IF ValType( LI_MSED ) != "N"
+ IF !( ValType( LI_MSED ) == "N" )
vartmp := iif( Len( LI_MSED ) < fipos, 1, LI_MSED[ fipos ] )
IF ValType( vartmp ) == "N"
IF vartmp != 2
diff --git a/harbour/tests/inherit.prg b/harbour/tests/inherit.prg
index 0d6813acc4..7aa1495f8d 100644
--- a/harbour/tests/inherit.prg
+++ b/harbour/tests/inherit.prg
@@ -214,7 +214,7 @@ FUNCTION READ()
IF ::hFile == F_ERROR
? "DosFile:Read : No file open"
- ELSEIF ::cMode != "R"
+ ELSEIF !( ::cMode == "R" )
? "File ", ::cFileName, " not open for reading"
ELSEIF ! ::lEoF
diff --git a/harbour/tests/rto_tb.prg b/harbour/tests/rto_tb.prg
index 6a913c2a79..896622b476 100644
--- a/harbour/tests/rto_tb.prg
+++ b/harbour/tests/rto_tb.prg
@@ -823,7 +823,7 @@ FUNCTION __eInstVar53( oVar, cMethod, xValue, cType, nSubCode, bValid )
LOCAL oError
- IF VALTYPE( xValue ) != cType .OR. ;
+ IF !( VALTYPE( xValue ) == cType ) .OR. ;
( bValid != NIL .AND. !EVAL( bValid, oVar, xValue ) )
oError := ErrorNew()
oError:description := HB_LANGERRMSG( 1 )
@@ -835,7 +835,7 @@ FUNCTION __eInstVar53( oVar, cMethod, xValue, cType, nSubCode, bValid )
oError:subcode := nSubCode
oError:args := { xValue }
xValue := EVAL( ERRORBLOCK(), oError )
- IF VALTYPE( xValue ) != cType
+ IF !( VALTYPE( xValue ) == cType )
__errInHandler()
ENDIF
ENDIF
diff --git a/harbour/tests/stripem.prg b/harbour/tests/stripem.prg
index e117957e45..d4aec9b76e 100644
--- a/harbour/tests/stripem.prg
+++ b/harbour/tests/stripem.prg
@@ -158,7 +158,7 @@ FUNCTION READ()
IF ::hFile == F_ERROR
? "DosFile:Read : No file open"
- ELSEIF ::cMode != "R"
+ ELSEIF !( ::cMode == "R" )
? "File ", ::cFileName, " not open for reading"
ELSEIF ! ::lEoF
diff --git a/harbour/tests/testtok.prg b/harbour/tests/testtok.prg
deleted file mode 100644
index fbcccc9331..0000000000
--- a/harbour/tests/testtok.prg
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * $Id$
- */
-
-#include "set.ch"
-
-PROCEDURE Main()
-
- LOCAL a
- LOCAL i
-
- SET( _SET_EXACT, .T. )
-
- a := strtoarray( "this is a great big test of strtoken" )
- FOR i := 1 TO Len( a )
- ? a[ i ] )
- NEXT
-
- RETURN
-
-FUNCTION strtoarray( s )
-
- LOCAL aResult := {}
- LOCAL t, l
-
- DO WHILE s != ""
- t := StrToken( s, 1, , @l )
- AAdd( aResult, t )
- s := SubStr( s, l + 2 ) /* skip the delimiter */
-
- ? t, Str( l ), s )
- ENDDO
-
- RETURN aResult
diff --git a/harbour/utils/hbi18n/hbi18n.prg b/harbour/utils/hbi18n/hbi18n.prg
index 455ca3250a..ddc599c511 100644
--- a/harbour/utils/hbi18n/hbi18n.prg
+++ b/harbour/utils/hbi18n/hbi18n.prg
@@ -101,7 +101,7 @@ PROCEDURE Main( ... )
ELSEIF LEFTEQUAL( param, "o" )
IF !Empty( param := SubStr( param, 2 ) )
cFileOut := param
- ELSEIF n < Len( aParams ) .AND. aParams[ n + 1 ] != "-"
+ ELSEIF n < Len( aParams ) .AND. ! LEFTEQUAL( aParams[ n + 1 ], "-" )
cFileOut := aParams[ ++n ]
ELSE
lError := .T.