2007-11-02 12:48 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/source/common/hbfsapi.c
  * harbour/source/common/hbwince.c
    ! fixed hb_fsFileExists() in W32 Unicode builds and WinCE
This commit is contained in:
Przemyslaw Czerpak
2007-11-02 11:48:44 +00:00
parent 803f57740e
commit 7c710e5226
3 changed files with 27 additions and 8 deletions

View File

@@ -8,6 +8,11 @@
2002-12-01 13:30 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
2007-11-02 12:48 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/common/hbfsapi.c
* harbour/source/common/hbwince.c
! fixed hb_fsFileExists() in W32 Unicode builds and WinCE
2007-11-02 21:32 UTC+0100 Miguel Angel Marchuet Frutos <miguelangel@marchuet.net>
* contrib/bmdbfcdx/bmdbfcdx1.c
! fixed acces to set variables.

View File

@@ -284,7 +284,7 @@ HB_EXPORT BOOL hb_fsFileExists( const char * pszFileName )
if( pszFileName == NULL )
return FALSE;
#if defined( HB_OS_DOS )
#if defined( HB_OS_DOS )
{
union REGS regs;
struct SREGS sregs;
@@ -297,19 +297,19 @@ HB_EXPORT BOOL hb_fsFileExists( const char * pszFileName )
return regs.x.cflag == 0;
}
#elif defined( HB_OS_WIN_32 )
#elif defined( HB_OS_WIN_32 )
{
return GetFileAttributes( pszFileName ) != INVALID_FILE_ATTRIBUTES;
return GetFileAttributesA( pszFileName ) != INVALID_FILE_ATTRIBUTES;
}
#elif defined( HB_OS_UNIX )
#elif defined( HB_OS_UNIX )
{
struct stat statbuf;
return stat( pszFileName, &statbuf ) == 0;
}
#else
#else
{
return FALSE;
}
#endif
#endif
}

View File

@@ -446,13 +446,15 @@ BOOL WINAPI CreateDirectoryA( LPCSTR path, LPSECURITY_ATTRIBUTES attr )
BOOL WINAPI CharToOemBuffA( LPCSTR src, LPSTR dst, DWORD len )
{
hb_strncpy( dst, src, len );
if( len )
hb_strncpy( dst, src, len - 1 );
return TRUE;
}
BOOL WINAPI OemToCharBuffA( LPCSTR src, LPSTR dst, DWORD len )
{
hb_strncpy( dst, src, len );
if( len )
hb_strncpy( dst, src, len - 1 );
return TRUE;
}
@@ -500,6 +502,18 @@ BOOL WINAPI FindNextFileA( HANDLE handle, WIN32_FIND_DATAA * data )
return b;
}
DWORD WINAPI GetFileAttributesA( LPCSTR path )
{
LPWSTR wpath;
DWORD dw;
wpath = hb_mbtowc( path );
dw = GetFileAttributesW( wpath );
hb_xfree( wpath );
return dw;
}
BOOL WINAPI GetVersionExA( OSVERSIONINFOA * v )
{
OSVERSIONINFOW wv;