19990914-17:30 GMT+1

This commit is contained in:
Viktor Szakats
1999-09-14 15:40:29 +00:00
parent 920f3c13fc
commit 01de609658
4 changed files with 65 additions and 11 deletions

View File

@@ -1,3 +1,14 @@
19990914-17:30 GMT+1 Victor Szel <info@szelvesz.hu>
* config/rules.cf
* Harbour flag /q changed to /q0 to omit the compiler header.
* source/rtl/do.c
! DO() fixed to use hb_dynsymFind() instead of hb_dynsymGet(),
now it properly displays when the passed string is not a symbol, rather
then throwing an internal error.
* source/compiler/harbour.y
+ /CREDITS command line switch to display the development team. Like in
Clipper.
19990914-13:15 GMT+1 Victor Szel <info@szelvesz.hu>
* source/compiler/harbour.y
source/compiler/gen*.c

View File

@@ -20,7 +20,7 @@ HB := $(HB_BIN_COMPILE)/
endif
HB := $(HB)harbour$(EXE_EXT)
HB_FLAGS = -n -q -I$(TOP) -I$(HB_INC_COMPILE)
HB_FLAGS = -n -q0 -I$(TOP) -I$(HB_INC_COMPILE)
# The rule to link an executable.
ifeq ($(LD_RULE),)

View File

@@ -264,8 +264,10 @@ extern void GenObj32( PHB_FNAME ); /* generates OBJ 32 bits */
/* argument checking */
void CheckArgs( char *, int );
static BOOL SwitchCmp( char * szString, char * szSwitch );
void PrintUsage( char * );
void PrintCredits( void );
#define YYDEBUG 1 /* Parser debug information support */
@@ -427,6 +429,7 @@ int iFunctions = 0;
BOOL _bStartProc = TRUE; /* holds if we need to create the starting procedure */
BOOL _bLineNumbers = TRUE; /* holds if we need pcodes with line numbers */
BOOL _bCredits = FALSE; /* print credits */
BOOL _bLogo = TRUE; /* print logo */
BOOL _bQuiet = FALSE; /* quiet mode */
BOOL _bSyntaxCheckOnly = FALSE; /* syntax check only */
@@ -1348,13 +1351,14 @@ int harbour_main( int argc, char * argv[] )
for( iArg = 1; iArg < argc; iArg++ )
{
if( IS_OPT_SEP( argv[ iArg ][ 0 ] ) &&
( argv[ iArg ][ 1 ] == 'q' || argv[ iArg ][ 1 ] == 'Q' ) &&
argv[ iArg ][ 2 ] == '0' )
{
if( SwitchCmp( argv[ iArg ], "Q0" ) )
_bLogo = FALSE;
break;
}
else if( SwitchCmp( argv[ iArg ], "CREDITS" ) ||
SwitchCmp( argv[ iArg ], "CREDIT" ) ||
SwitchCmp( argv[ iArg ], "CREDI" ) ||
SwitchCmp( argv[ iArg ], "CRED" ) )
_bCredits = TRUE;
}
if( _bLogo )
@@ -1364,6 +1368,12 @@ int harbour_main( int argc, char * argv[] )
printf( "Copyright 1999, http://www.harbour-project.org\n" );
}
if( _bCredits )
{
PrintCredits();
return iStatus;
}
if( argc > 1 )
{
char szFileName[ _POSIX_PATH_MAX ]; /* filename to parse */
@@ -1803,6 +1813,15 @@ void PrintUsage( char * szSelf )
, szSelf );
}
/*
* Prints credits
*/
void PrintCredits( void )
{
printf( "\nCredits: The Harbour Team at www.harbour-project.com"
);
}
/*
* Function that adds specified path to the list of pathnames to search
*/
@@ -4190,7 +4209,7 @@ void GenPCode1( BYTE byte )
else if( pOperand2 && pOperand2->cType == ' ' )
GenWarning( _szCWarnings, 'W', WARN_NUMERIC_SUSPECT, NULL, NULL );
/* compile time 2nd. operand has to be released */
/* compile time 2nd. operand has to be released */
if( pOperand2 )
{
hb_xfree( ( void * ) pOperand2 );
@@ -4235,7 +4254,7 @@ void GenPCode1( BYTE byte )
else
cType = pOperand1->cType;
/* compile time 2nd. operand has to be released */
/* compile time 2nd. operand has to be released */
if( pOperand2 )
{
hb_xfree( ( void * ) pOperand2 );
@@ -4279,7 +4298,7 @@ void GenPCode1( BYTE byte )
else if( pOperand1 && pOperand2 && pOperand1->cType != ' ' && pOperand2->cType == ' ' )
GenWarning( _szCWarnings, 'W', WARN_OPERAND_SUSPECT, sType1, NULL );
/* compile time 2nd. operand has to be released */
/* compile time 2nd. operand has to be released */
if( pOperand2 )
{
hb_xfree( ( void * ) pOperand2 );
@@ -5170,3 +5189,27 @@ static ULONG PackDateTime( void )
return MKLONG( szString[ 3 ], szString[ 2 ], szString[ 1 ], szString[ 0 ] );
}
static BOOL SwitchCmp( char * szString, char * szSwitch )
{
if( IS_OPT_SEP( *szString ) )
{
szString++;
if( strlen( szString ) == strlen( szSwitch ) )
{
while( *szString != '\0' )
{
if( toupper( *szString ) != *szSwitch )
return FALSE;
szString++;
szSwitch++;
}
return TRUE;
}
}
return FALSE;
}

View File

@@ -94,7 +94,7 @@ HARBOUR HB_DO( void )
if( IS_STRING( pItem ) )
{
PHB_DYNS pDynSym = hb_dynsymGet( hb_itemGetCPtr( pItem ) );
PHB_DYNS pDynSym = hb_dynsymFind( hb_itemGetCPtr( pItem ) );
if( pDynSym )
{