2015-02-21 15:33 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

* ChangeLog.txt
  * src/compiler/hbmain.c
  * src/nortl/nortl.c
    ! save and restore SETs which can be modified by -fn[:[l|u]|-],
      -fd[:[l|u]|-], -fp[:<char>] and -fs[-] compiler flags.
      It fixes problem with HBMK2 so now above switches can be used
      with HBMK2.
This commit is contained in:
Przemysław Czerpak
2015-02-21 15:33:22 +01:00
parent fff0da51ab
commit 86d8fd5915
3 changed files with 53 additions and 21 deletions

View File

@@ -10,6 +10,15 @@
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
*/
2015-02-21 15:33 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* ChangeLog.txt
* src/compiler/hbmain.c
* src/nortl/nortl.c
! save and restore SETs which can be modified by -fn[:[l|u]|-],
-fd[:[l|u]|-], -fp[:<char>] and -fs[-] compiler flags.
It fixes problem with HBMK2 so now above switches can be used
with HBMK2.
2015-02-21 14:34 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rdd/delim1.c
* src/rdd/sdf1.c
@@ -208,7 +217,7 @@
which are not compatible with names used later by harbour
compiler when above switches are activated. HBMK2 should
parse parameters and update SET FILECASE / SET DIRCASE before
it creates temporary files.
it creates temporary files [fixed by compiler modification]
2015-02-15 21:31 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rdd/dbf1.c

View File

@@ -49,6 +49,7 @@
#include "hbcomp.h"
#include "hbhash.h"
#include "hbset.h"
static int hb_compCompile( HB_COMP_DECL, const char * szPrg, const char * szBuffer, int iStartLine );
static HB_BOOL hb_compRegisterFunc( HB_COMP_DECL, PHB_HFUNC pFunc, HB_BOOL fError );
@@ -62,12 +63,18 @@ int hb_compMainExt( int argc, const char * const argv[],
PHB_PP_MSG_FUNC pMsgFunc )
{
HB_COMP_DECL;
int iStatus = EXIT_SUCCESS;
HB_BOOL bAnyFiles = HB_FALSE;
int iStatus = EXIT_SUCCESS, iFileCount = 0;
int iFileCase, iDirCase, iDirSep;
HB_BOOL fTrimFN;
int i;
HB_TRACE( HB_TR_DEBUG, ( "hb_compMain()" ) );
iFileCase = hb_setGetFileCase();
iDirCase = hb_setGetDirCase();
iDirSep = hb_setGetDirSeparator();
fTrimFN = hb_setGetTrimFileName();
if( pBufPtr && pnSize )
{
*pBufPtr = NULL;
@@ -115,12 +122,6 @@ int hb_compMainExt( int argc, const char * const argv[],
if( HB_COMP_PARAM->fCredits )
hb_compPrintCredits( HB_COMP_PARAM );
if( HB_COMP_PARAM->fBuildInfo || HB_COMP_PARAM->fCredits )
{
hb_comp_free( HB_COMP_PARAM );
return iStatus;
}
/* Set Search Path */
if( HB_COMP_PARAM->fINCLUDE )
hb_compChkAddIncPaths( HB_COMP_PARAM );
@@ -134,7 +135,7 @@ int hb_compMainExt( int argc, const char * const argv[],
if( szSource )
{
bAnyFiles = HB_TRUE;
iFileCount++;
iStatus = hb_compCompile( HB_COMP_PARAM, "{SOURCE}", szSource, iStartLine );
}
else
@@ -145,7 +146,7 @@ int hb_compMainExt( int argc, const char * const argv[],
HB_TRACE( HB_TR_DEBUG, ( "main LOOP(%i,%s)", i, argv[ i ] ) );
if( ! HB_ISOPTSEP( argv[ i ][ 0 ] ) )
{
bAnyFiles = HB_TRUE;
iFileCount++;
iStatus = hb_compCompile( HB_COMP_PARAM, argv[ i ], NULL, 0 );
if( iStatus != EXIT_SUCCESS )
break;
@@ -153,28 +154,35 @@ int hb_compMainExt( int argc, const char * const argv[],
}
}
if( ! bAnyFiles && ! HB_COMP_PARAM->fQuiet && ! HB_COMP_PARAM->fExit )
if( iFileCount == 0 && ! HB_COMP_PARAM->fQuiet && ! HB_COMP_PARAM->fExit &&
! HB_COMP_PARAM->fBuildInfo && ! HB_COMP_PARAM->fCredits )
{
hb_compPrintUsage( HB_COMP_PARAM, argv[ 0 ] );
iStatus = EXIT_FAILURE;
}
if( HB_COMP_PARAM->iErrorCount > 0 )
else if( HB_COMP_PARAM->iErrorCount > 0 )
iStatus = EXIT_FAILURE;
if( iStatus == EXIT_SUCCESS )
if( iFileCount > 0 && iStatus == EXIT_SUCCESS )
{
hb_compI18nSave( HB_COMP_PARAM, HB_TRUE );
if( pBufPtr && pnSize && iStatus == EXIT_SUCCESS )
{
*pBufPtr = HB_COMP_PARAM->pOutBuf;
*pnSize = HB_COMP_PARAM->nOutBufSize;
HB_COMP_PARAM->pOutBuf = NULL;
HB_COMP_PARAM->nOutBufSize = 0;
if( pBufPtr && pnSize && iStatus == EXIT_SUCCESS )
{
*pBufPtr = HB_COMP_PARAM->pOutBuf;
*pnSize = HB_COMP_PARAM->nOutBufSize;
HB_COMP_PARAM->pOutBuf = NULL;
HB_COMP_PARAM->nOutBufSize = 0;
}
}
hb_comp_free( HB_COMP_PARAM );
hb_setSetFileCase( iFileCase );
hb_setSetDirCase( iDirCase );
hb_setSetDirSeparator( iDirSep );
hb_setSetTrimFileName( fTrimFN );
return iStatus;
}

View File

@@ -686,11 +686,26 @@ HB_WCHAR * hb_fsNameConvU16( const char * szFileName )
}
#endif
int hb_setGetFileCase( void )
{
return s_iFileCase;
}
int hb_setGetDirCase( void )
{
return s_iDirCase;
}
int hb_setGetDirSeparator( void )
{
return s_cDirSep;
}
HB_BOOL hb_setGetTrimFileName( void )
{
return s_fFnTrim;
}
void hb_setSetFileCase( int iFileCase )
{
s_iFileCase = iFileCase;