2012-07-10 20:23 UTC+0200 Viktor Szakats (harbour syenar.net)

* src/rtl/alert.prg
  * src/rtl/typefile.prg
    % using FOR EACH

  * src/rtl/spfiles.c
    * formatting (whitespace)
This commit is contained in:
Viktor Szakats
2012-07-10 18:24:40 +00:00
parent 446d6d6cdd
commit ffe10ac9b5
4 changed files with 29 additions and 18 deletions

View File

@@ -16,6 +16,14 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-07-10 20:23 UTC+0200 Viktor Szakats (harbour syenar.net)
* src/rtl/alert.prg
* src/rtl/typefile.prg
% using FOR EACH
* src/rtl/spfiles.c
* formatting (whitespace)
2012-07-10 10:46 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtgui/hbqtgui.ch
+ Added: few QLCD* constants.

View File

@@ -43,7 +43,7 @@ STATIC s_lNoAlert
FUNCTION Alert( cMessage, aOptions, cColorNorm )
LOCAL cColorHigh
LOCAL aOptionsOK
LOCAL nEval
LOCAL cOption
#ifdef HB_CLP_UNDOC
@@ -76,9 +76,9 @@ FUNCTION Alert( cMessage, aOptions, cColorNorm )
ENDIF
aOptionsOK := {}
FOR nEval := 1 TO Len( aOptions )
IF HB_ISSTRING( aOptions[ nEval ] ) .AND. ! Empty( aOptions[ nEval ] )
AAdd( aOptionsOK, aOptions[ nEval ] )
FOR EACH cOption IN aOptions
IF HB_ISSTRING( cOption ) .AND. ! Empty( cOption )
AAdd( aOptionsOK, cOption )
ENDIF
NEXT
@@ -100,6 +100,7 @@ FUNCTION hb_Alert( xMessage, aOptions, cColorNorm, nDelay )
LOCAL cMessage
LOCAL cColorHigh
LOCAL aOptionsOK
LOCAL cOption
LOCAL nEval
#ifdef HB_CLP_UNDOC
@@ -142,9 +143,9 @@ FUNCTION hb_Alert( xMessage, aOptions, cColorNorm, nDelay )
ENDIF
aOptionsOK := {}
FOR nEval := 1 TO Len( aOptions )
IF HB_ISSTRING( aOptions[ nEval ] ) .AND. ! Empty( aOptions[ nEval ] )
AAdd( aOptionsOK, aOptions[ nEval ] )
FOR EACH cOption IN aOptions
IF HB_ISSTRING( cOption ) .AND. ! Empty( cOption )
AAdd( aOptionsOK, cOption )
ENDIF
NEXT

View File

@@ -55,7 +55,7 @@
HB_BOOL hb_spFile( const char * pFilename, char * pRetPath )
{
char *Path;
char * Path;
HB_BOOL bIsFile = HB_FALSE;
PHB_FNAME pFilepath;
@@ -83,7 +83,7 @@ HB_BOOL hb_spFile( const char * pFilename, char * pRetPath )
bIsFile = hb_fsFile( Path );
}
if( !bIsFile && hb_setGetPath() )
if( ! bIsFile && hb_setGetPath() )
{
HB_PATHNAMES * NextPath = hb_setGetFirstSetPath();
@@ -119,7 +119,7 @@ HB_BOOL hb_spFile( const char * pFilename, char * pRetPath )
HB_BOOL hb_spFileExists( const char * pFilename, char * pRetPath )
{
char *Path;
char * Path;
HB_BOOL bIsFile = HB_FALSE;
PHB_FNAME pFilepath;
@@ -147,7 +147,7 @@ HB_BOOL hb_spFileExists( const char * pFilename, char * pRetPath )
bIsFile = hb_fsFileExists( Path );
}
if( !bIsFile && hb_setGetPath() )
if( ! bIsFile && hb_setGetPath() )
{
HB_PATHNAMES * NextPath = hb_setGetFirstSetPath();

View File

@@ -69,7 +69,7 @@ PROCEDURE __TypeFile( cFile, lPrint )
LOCAL aSaveSet[ 2 ]
LOCAL cDir, cName, cExt
LOCAL cTmp
LOCAL aPath
LOCAL cPath
LOCAL i
IF ! HB_ISLOGICAL( lPrint )
@@ -89,16 +89,18 @@ PROCEDURE __TypeFile( cFile, lPrint )
/* If no drive/dir specified, search the SET DEFAULT and PATH directories */
hb_FNameSplit( cFile, @cDir, @cName, @cExt )
IF Empty( cDir )
cTmp := Set( _SET_DEFAULT ) + ";" + Set( _SET_PATH )
cTmp := StrTran( cTmp, ",", ";" )
cTmp := StrTran( Set( _SET_DEFAULT ) + ";" + Set( _SET_PATH ), ",", ";" )
i := Len( cTmp )
DO WHILE SubStr( cTmp, i, 1 ) == ";" /* remove last ";" */
cTmp := Left( cTmp, --i )
ENDDO
aPath := hb_ATokens( cTmp, ";" )
FOR i := 1 TO Len( aPath )
IF File( cTmp := hb_FNameMerge( aPath[ i ], cName, cExt ) )
FOR EACH cPath IN hb_ATokens( cTmp, ";" )
IF File( cTmp := hb_FNameMerge( cPath, cName, cExt ) )
cFile := cTmp
EXIT
ENDIF
@@ -134,7 +136,7 @@ PROCEDURE __TypeFile( cFile, lPrint )
nSize := FSeek( nHandle, 0, FS_END )
nBuffer := Min( nSize, BUFFER_LENGTH )
FSeek( nHandle, 0 ) // go top
FSeek( nHandle, 0 ) /* go top */
/* Here we try to read a line at a time but I think we could just
display the whole buffer since it said: