2008-08-04 12:58 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/source/pp/ppcore.c
    * cleaned warning

  * harbour/source/rtl/set.c
    * do not attach ".prn" extension to known device names also
      in DOS and Windows builds
    * recognize "CON" as device name in DOS, Win and OS2 builds
This commit is contained in:
Przemyslaw Czerpak
2008-08-04 10:59:10 +00:00
parent 1d50a22cb2
commit c587792c98
3 changed files with 15 additions and 4 deletions

View File

@@ -8,6 +8,15 @@
2008-12-31 13:59 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
2008-08-04 12:58 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/pp/ppcore.c
* cleaned warning
* harbour/source/rtl/set.c
* do not attach ".prn" extension to known device names also
in DOS and Windows builds
* recognize "CON" as device name in DOS, Win and OS2 builds
2008-08-04 11:27 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* source/debug/debugger.prg
! Avoided __PLATFORM__* macros in core code by using

View File

@@ -1552,7 +1552,7 @@ static int hb_pp_tokenStr( PHB_PP_TOKEN pToken, PHB_MEM_BUFFER pBuffer,
hb_membufAddCh( pBuffer, ch );
hb_membufAddData( pBuffer, pToken->value, pToken->len );
hb_membufAddCh( pBuffer, ch == '[' ? ']' : ch );
hb_membufAddCh( pBuffer, ( char ) ( ch == '[' ? ']' : ch ) );
}
}
else

View File

@@ -221,11 +221,13 @@ static FHANDLE open_handle( char * file_name, BOOL bAppend, char * def_ext, HB_s
if( hb_set.HB_SET_DEFEXTENSIONS && pFilename->szExtension == NULL && def_ext )
{
#if defined(HB_OS_OS2)
#if defined(HB_OS_OS2) || defined(HB_OS_W32) || defined(HB_OS_DOS)
if( pFilename->szName )
{
int iLen = ( int ) strlen( pFilename->szName );
if( ( iLen == 3 && hb_stricmp( pFilename->szName, "PRN" ) == 0 ) ||
if( ( iLen == 3 &&
( hb_stricmp( pFilename->szName, "PRN" ) == 0 ||
hb_stricmp( pFilename->szName, "CON" ) == 0 ) ) ||
( iLen == 4 &&
( ( hb_strnicmp( pFilename->szName, "LPT", 3 ) == 0 &&
pFilename->szName[3] >= '1' && pFilename->szName[3] <= '3' ) ||
@@ -1006,7 +1008,7 @@ void hb_setInitialize( void )
hb_set.HB_SET_PRINTFILE = hb_strdup( "|lpr" );
#elif defined(HB_OS_DOS)
hb_set.HB_SET_PRINTFILE = hb_strdup( "PRN" );
#elif defined(HB_OS_WIN_32)
#elif defined(HB_OS_WIN_32) || defined(HB_OS_OS2)
hb_set.HB_SET_PRINTFILE = hb_strdup( "LPT1" );
#else
hb_set.HB_SET_PRINTFILE = hb_strdup( "PRN" ); /* TOFIX */