2007-12-18 06:05 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/contrib/hbct/files.c
  * harbour/source/common/hbfsapi.c
    ! fixes in OS2 build - thanks to David
This commit is contained in:
Przemyslaw Czerpak
2007-12-18 05:06:04 +00:00
parent e55e64405a
commit 35e32d6526
3 changed files with 16 additions and 9 deletions

View File

@@ -8,6 +8,11 @@
2002-12-01 13:30 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
2007-12-18 06:05 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/hbct/files.c
* harbour/source/common/hbfsapi.c
! fixes in OS2 build - thanks to David
2007-12-17 21:40 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* bin/bld.bat
! %HB_USER_LIBS% (for bcc32) moved to the beginning of the lib list.

View File

@@ -226,8 +226,10 @@ HB_FUNC( SETFATTR )
#elif defined( HB_OS_OS2 )
FILESTATUS3 fs3;
ULONG ulAttr = FILE_NORMAL;
APIRET ulrc;
ULONG ulAttr = FILE_NORMAL;
int iAttr = hb_parni( 2 );
const char *szFile = hb_parcx( 1 );
if( iAttr & FA_READONLY )
ulAttr |= FILE_READONLY;
@@ -238,11 +240,11 @@ HB_FUNC( SETFATTR )
if( iAttr & FA_ARCHIVE )
ulAttr |= FILE_ARCHIVED;
ulrc = DosQueryPathInfo( pszPathName, FIL_STANDARD, &fs3, sizeof( fs3 ) );
ulrc = DosQueryPathInfo( szFile, FIL_STANDARD, &fs3, sizeof( fs3 ) );
if( ulrc == NO_ERROR )
{
fs3.attrFile = ulAttr;
ulrc = DosSetPathInfo( pszPathName, FIL_STANDARD,
ulrc = DosSetPathInfo( szFile, FIL_STANDARD,
&fs3, sizeof( fs3 ), DSPI_WRTTHRU );
}
hb_retni( ulrc );

View File

@@ -326,9 +326,9 @@ HB_EXPORT BOOL hb_fsFileExists( const char * pszFileName )
#elif defined( HB_OS_OS2 )
{
FILESTATUS3 fs3;
if( DosQueryPathInfo( pszFileName, FIL_STANDARD,
&fs3, sizeof( fs3 ) ) == NO_ERROR )
fExist = ( fs3.attrFile & FILE_DIRECTORY ) == 0;
fExist = DosQueryPathInfo( pszFileName, FIL_STANDARD,
&fs3, sizeof( fs3 ) ) == NO_ERROR &&
( fs3.attrFile & FILE_DIRECTORY ) == 0;
}
#elif defined( HB_OS_UNIX )
{
@@ -385,9 +385,9 @@ HB_EXPORT BOOL hb_fsDirExists( const char * pszDirName )
#elif defined( HB_OS_OS2 )
{
FILESTATUS3 fs3;
if( DosQueryPathInfo( pszDirName, FIL_STANDARD,
&fs3, sizeof( fs3 ) ) == NO_ERROR )
fExist = ( fs3.attrFile & FILE_DIRECTORY ) != 0;
fExist = DosQueryPathInfo( pszDirName, FIL_STANDARD,
&fs3, sizeof( fs3 ) ) == NO_ERROR &&
( fs3.attrFile & FILE_DIRECTORY ) != 0;
}
#elif defined( HB_OS_UNIX )
{