2010-01-18 15:40 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/include/hbwince.h
  * harbour/src/common/hbwince.c
    - disabled not longer necessary in WinCE builds system() and strerror()
      functions
This commit is contained in:
Przemyslaw Czerpak
2010-01-18 14:41:12 +00:00
parent f2d2214ef5
commit ea0937ea3e
3 changed files with 57 additions and 50 deletions

View File

@@ -17,6 +17,12 @@
past entries belonging to author(s): Viktor Szakats.
*/
2010-01-18 15:40 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbwince.h
* harbour/src/common/hbwince.c
- disabled not longer necessary in WinCE builds system() and strerror()
functions
2010-01-18 15:30 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbwin/tests/testprn.prg
+ Brings up printer setup dialog if run with 'ask' cmdline parameter.

View File

@@ -65,10 +65,10 @@ HB_EXTERN_BEGIN
#if defined( __MINGW32CE__ ) && 0
typedef long clock_t;
extern clock_t clock( void );
#endif
extern int access( const char *filename, int mode )
extern int system( const char * string );
extern char * strerror( int errnum );
#endif
#if defined( HB_OS_WIN_USED )

View File

@@ -130,53 +130,6 @@ void hb_wctombget( char *dstA, const wchar_t *srcW, HB_SIZE ulLen )
#if defined( HB_OS_WIN_CE )
int system( const char *cmd )
{
LPWSTR wcmd;
STARTUPINFOW si;
PROCESS_INFORMATION pi;
BOOL b;
memset( &si, '\0', sizeof( si ) );
si.cb = sizeof( si );
memset( &pi, '\0', sizeof( pi ) );
wcmd = hb_mbtowc( cmd );
/* Start the child process. */
b = CreateProcessW( NULL, /* No module name (use command line) */
wcmd, /* Command line */
NULL, /* Process handle not inheritable */
NULL, /* Thread handle not inheritable */
FALSE, /* Set handle inheritance to FALSE */
0, /* No creation flags */
NULL, /* Use parent's environment block */
NULL, /* Use parent's starting directory */
&si, /* Pointer to STARTUPINFO structure */
&pi ); /* Pointer to PROCESS_INFORMATION structure */
hb_xfree( wcmd );
if( b )
{
/* Wait until child process exits. */
WaitForSingleObject( pi.hProcess, INFINITE );
/* Close process and thread handles. */
CloseHandle( pi.hProcess );
CloseHandle( pi.hThread );
}
return b ? 0 : -1;
}
char * strerror( int errnum )
{
HB_SYMBOL_UNUSED( errnum );
return ( char * ) "";
}
DWORD WINAPI GetEnvironmentVariableW( LPCWSTR name, LPWSTR value, DWORD size )
{
/* use registry instead of "environment variable". */
@@ -252,7 +205,7 @@ DWORD WINAPI GetCurrentDirectoryW( DWORD len, LPWSTR buffer )
if( len && buffer )
buffer[ 0 ] = '\0';
return FALSE;
return 0;
}
BOOL WINAPI SetCurrentDirectoryW( LPCWSTR dirname )
@@ -474,6 +427,54 @@ clock_t clock( void )
return ( ( clock_t ) hb_dateEncode( st.wYear, st.wMonth, st.wDay ) - 2451545 ) * 86400000 +
( ( st.wHour * 60 + st.wMinute ) * 60 + st.wSecond ) * 1000 + st.wMilliseconds;
}
int system( const char *cmd )
{
LPWSTR wcmd;
STARTUPINFOW si;
PROCESS_INFORMATION pi;
BOOL b;
memset( &si, '\0', sizeof( si ) );
si.cb = sizeof( si );
memset( &pi, '\0', sizeof( pi ) );
wcmd = hb_mbtowc( cmd );
/* Start the child process. */
b = CreateProcessW( NULL, /* No module name (use command line) */
wcmd, /* Command line */
NULL, /* Process handle not inheritable */
NULL, /* Thread handle not inheritable */
FALSE, /* Set handle inheritance to FALSE */
0, /* No creation flags */
NULL, /* Use parent's environment block */
NULL, /* Use parent's starting directory */
&si, /* Pointer to STARTUPINFO structure */
&pi ); /* Pointer to PROCESS_INFORMATION structure */
hb_xfree( wcmd );
if( b )
{
/* Wait until child process exits. */
WaitForSingleObject( pi.hProcess, INFINITE );
/* Close process and thread handles. */
CloseHandle( pi.hProcess );
CloseHandle( pi.hThread );
}
return b ? 0 : -1;
}
char * strerror( int errnum )
{
HB_SYMBOL_UNUSED( errnum );
return ( char * ) "";
}
#endif /* __MINGW32CE__ */
#endif /* 0 */