*** empty log message ***

This commit is contained in:
Viktor Szakats
1999-06-18 16:27:26 +00:00
parent ee56fca483
commit 1ad06f0e48
6 changed files with 56 additions and 26 deletions

View File

@@ -1,17 +1,13 @@
19990618-04:35 PST Ron Pinkas <Ron@Profit-Master.com>
* hberrors.h
+added define WARN_ASSIGN_TYPE and WARN_ASSIGN_SUSPECTED
* compiler.h
+added struct STACK_VAL_TYPE *PSTAC_VAL_TYPE
* harbour.l
+added support for tokens AS NUMERIC, AS CHARACTER, AS LOGICAL, AS DATE, AS ARRAY, AS OBJECT
*modified iLine to initialize to 0 rather than 1
* harbour.y
+added support for extended variable declaration with strong typing
+added logic to support warnings on incompatible and suspecious variable assignments
19990618-17:00 CET Victor Szel <info@szelvesz.hu>
* Fixed some GCC warnings in:
source/compiler/harbour.y
* Some left _parc()/_parni()/_parnl() prefixed with hb_
source/rtl/dir.c
source/rtl/files.c
* Fixed PADR(), PADL(), PADC() when called with a width
less than the length of the string.
Submitted by Matthew Hamilton <MHamilton@bunge.com.au>
source/rtl/strings.c
19990618-13:40 Alexander Kresin
updated:

View File

@@ -1,4 +1,5 @@
rem build for djgpp for dos enviroment
make -fmakefile.dos %1 %2 %3 %4 %5 %6 %7 %8 %9 >a.a
make -fmakefile.dos %1 %2 %3 %4 %5 %6 %7 %8 %9
rem >a.a

View File

@@ -2627,7 +2627,9 @@ PFUNCTION KillFunction( PFUNCTION pFunc )
OurFree( pVar->szName );
if( pVar->szAlias )
{
OurFree( pVar->szAlias );
}
OurFree( pVar );
}
@@ -3099,15 +3101,23 @@ void PopId( char * szVarName ) /* generates the pcode to pop a value from the vi
pFree = pStackValType;
if( pVarType && pStackValType && pVarType->cType != ' ' && pStackValType->cType == ' ' )
{
GenWarning( WARN_ASSIGN_SUSPECTED, szVarName, NULL );
}
else if( pVarType && pStackValType && pVarType->cType != ' ' && pVarType->cType != pStackValType->cType )
{
GenWarning( WARN_ASSIGN_TYPE, szVarName, NULL );
}
if( pVarType )
{
OurFree( pVarType );
}
if( pFree )
{
OurFree( pFree );
}
}
}
else if( ( wVar = GetStaticVarPos( szVarName ) ) )
@@ -3124,15 +3134,23 @@ void PopId( char * szVarName ) /* generates the pcode to pop a value from the vi
pFree = pStackValType;
if( pVarType && pStackValType && pVarType->cType != ' ' && pStackValType->cType == ' ' )
{
GenWarning( WARN_ASSIGN_SUSPECTED, szVarName, NULL );
}
else if( pVarType && pStackValType && pVarType->cType != ' ' && pVarType->cType != pStackValType->cType )
{
GenWarning( WARN_ASSIGN_TYPE, szVarName, NULL );
}
if( pVarType )
{
OurFree( pVarType );
}
if( pFree )
{
OurFree( pFree );
}
}
}
else

View File

@@ -143,7 +143,7 @@ HARBOUR HB_DIRECTORY( void )
if( arg1_it )
{
strcpy(string, _parc(1));
strcpy(string, hb_parc(1));
pos = strrchr(string,OS_PATH_DELIMITER);
if( pos )
{

View File

@@ -513,7 +513,7 @@ HARBOUR HB_FOPEN( void )
else
open_flags = 0;
file_handle = hb_fsOpen( (BYTEP)_parc(1), open_flags );
file_handle = hb_fsOpen( (BYTEP)hb_parc(1), open_flags );
}
hb_retni(file_handle);
@@ -535,7 +535,7 @@ HARBOUR HB_FCREATE( void )
else
create_flags = 0;
file_handle = hb_fsCreate( (BYTEP)_parc(1), create_flags );
file_handle = hb_fsCreate( (BYTEP)hb_parc(1), create_flags );
}
hb_retni(file_handle);
@@ -552,7 +552,7 @@ HARBOUR HB_FREAD( void )
if( arg1_it && arg2_it && arg3_it )
{
bytes = hb_fsRead(_parni(1), (BYTEP)_parc(2), _parnl(3) );
bytes = hb_fsRead(hb_parni(1), (BYTEP)hb_parc(2), hb_parnl(3) );
}
hb_retnl(bytes);
@@ -569,8 +569,8 @@ HARBOUR HB_FWRITE( void )
if( arg1_it && arg2_it )
{
bytes = (arg3_it ? _parnl(3) : arg2_it->wLength );
bytes = hb_fsWrite( _parni(1), (BYTEP)_parc(2), bytes);
bytes = (arg3_it ? hb_parnl(3) : arg2_it->wLength );
bytes = hb_fsWrite( hb_parni(1), (BYTEP)hb_parc(2), bytes);
}
hb_retnl(bytes);
@@ -602,7 +602,7 @@ HARBOUR HB_FERASE( void )
if( arg1_it )
{
hb_fsDelete( (BYTEP)_parc(1) );
hb_fsDelete( (BYTEP)hb_parc(1) );
}
hb_retni(last_error=0);
@@ -616,7 +616,7 @@ HARBOUR HB_FRENAME( void )
if( arg1_it && arg2_it )
{
hb_fsRename( (BYTEP)_parc(1), (BYTEP)_parc(2) );
hb_fsRename( (BYTEP)hb_parc(1), (BYTEP)hb_parc(2) );
}
hb_retni(last_error);

View File

@@ -265,7 +265,12 @@ HARBOUR HB_PADR( void )
hb_xfree(szResult);
}
else
hb_retclen(szText, (long)hb_parclen(1) );
{
if( lLen < 0 )
lLen = 0;
hb_retclen(szText, lLen);
}
}
else
hb_retc("");
@@ -306,7 +311,12 @@ HARBOUR HB_PADL( void )
hb_xfree(szResult);
}
else
hb_retclen(szText, (long)hb_parclen(1) );
{
if( lLen < 0 )
lLen = 0;
hb_retclen(szText, lLen);
}
}
else
hb_retc("");
@@ -344,7 +354,12 @@ HARBOUR HB_PADC( void )
hb_xfree(szResult);
}
else
hb_retclen(szText, (long)hb_parclen(1) );
{
if( lLen < 0 )
lLen = 0;
hb_retclen(szText, lLen);
}
}
else
hb_retc("");