See ChangeLog entry 19990507-20:15 EDT David G. Holm <dholm@jsd-llc.com>

This commit is contained in:
David G. Holm
1999-05-08 01:14:50 +00:00
parent 1491b01c39
commit 2df124bece
4 changed files with 39 additions and 6 deletions

View File

@@ -1,3 +1,10 @@
19990507-20:15 EDT David G. Holm <dholm@jsd-llc.com>
* source/compiler/harbour.l
* source/compiler/harbour.y
* source/rtl/classes.c
- Modified all three for C and C++ compatibility.
- Tested with Borland C++ 3.1 in both C and C++ modes.
19990508-00:18 Eddie Runia
* source/rtl/classes.c:
oSend( <obj>, <cMessage>, <xArg,..> added.

View File

@@ -17,7 +17,11 @@
void yyerror( char * );
void yyunput( int, char * );
#undef yywrap /* to implement our own yywrap() funtion to handle EOFs */
#ifdef __cplusplus
extern "C" int yywrap( void );
#else
int yywrap( void );
#endif
#undef YY_INPUT /* to implement our own YY_INPUT function to manage PRGs without \n at the end */
extern FILE * yyin; /* currently yacc parsed file */
int yy_lex_input( char *, int );
@@ -337,7 +341,7 @@ Separator {SpaceTab}|{Comment}|{LineCont}
PDEFINE LastDef( PDEFINE pDef )
{
while( pDef->pNext )
pDef = pDef->pNext;
pDef = (PDEFINE) pDef->pNext;
return pDef;
}
@@ -363,7 +367,7 @@ void DefineKey( char * szKey )
PDEFINE pLast = LastDef( pDefs );
if( pLast->pKeys )
LastDef( pLast->pKeys )->pNext = pDef;
LastDef( (PDEFINE) pLast->pKeys )->pNext = pDef;
else
pLast->pKeys = pDef;
@@ -384,7 +388,7 @@ PDEFINE FindDef( char * szText )
else
{
if( pDef->pNext )
pDef = pDef->pNext;
pDef = (PDEFINE) pDef->pNext;
else
return 0;
}

View File

@@ -139,12 +139,22 @@ char *MakeFilename( char *, FILENAME *); /* joins a path, a name an an extensio
void yyerror( char * ); /* parsing error management function */
int yylex( void ); /* main lex token function, called by yyparse() */
int yyparse( void ); /* main yacc parsing function */
#ifdef __cplusplus
extern "C" int yywrap( void );
#else
int yywrap( void ); /* manages the EOF of current processed file */
#endif
void AddDefine( char * szDefine, char * szValue ); /* add a new Lex define from the command line */
void * yy_create_buffer( FILE *, int ); /* yacc functions to manage multiple files */
#ifdef __cplusplus
typedef struct yy_buffer_state *YY_BUFFER_STATE;
void yy_switch_to_buffer( YY_BUFFER_STATE ); /* yacc functions to manage multiple files */
void yy_delete_buffer( YY_BUFFER_STATE ); /* yacc functions to manage multiple files */
#else
void yy_switch_to_buffer( void * ); /* yacc functions to manage multiple files */
void yy_delete_buffer( void * ); /* yacc functions to manage multiple files */
#endif
void __yy_memcpy( char * from, char * to, int count ); /* Bison prototype */
/* production related functions */
@@ -965,7 +975,7 @@ void close_on_exit( void )
{
printf( "\nClosing file: %s\n", pFile->szFileName );
fclose( pFile->handle );
pFile = pFile->pPrev;
pFile = (PFILE) pFile->pPrev;
}
}
@@ -1496,7 +1506,11 @@ int Include( char * szFileName )
pFile->pPrev = files.pLast;
files.pLast = pFile;
}
yy_switch_to_buffer( pFile->pBuffer = yy_create_buffer( yyin, 8192 * 2 ) );
#ifdef __cplusplus
yy_switch_to_buffer( (YY_BUFFER_STATE) (pFile->pBuffer = yy_create_buffer( yyin, 8192 * 2 ) ) );
#else
yy_switch_to_buffer( (pFile->pBuffer = yy_create_buffer( yyin, 8192 * 2 ) ) );
#endif
files.iFiles++;
return 1;
}
@@ -1514,11 +1528,19 @@ int yywrap( void ) /* handles the EOF of the currently processed file */
files.pLast = ( PFILE ) ( ( PFILE ) files.pLast )->pPrev;
iLine = files.pLast->iLine;
printf( "\nparsing file %s\n", files.pLast->szFileName );
#ifdef __cplusplus
yy_delete_buffer( (YY_BUFFER_STATE) ( ( PFILE ) pLast )->pBuffer );
#else
yy_delete_buffer( ( ( PFILE ) pLast )->pBuffer );
#endif
free( pLast );
files.iFiles--;
yyin = files.pLast->handle;
#ifdef __cplusplus
yy_switch_to_buffer( (YY_BUFFER_STATE) files.pLast->pBuffer );
#else
yy_switch_to_buffer( files.pLast->pBuffer );
#endif
return 0; /* we close the currently include file and continue */
}
}

View File

@@ -275,7 +275,7 @@ static HARBOUR ClassSel()
/* Create a transfer array */
for( wAt = 0; wAt < wLimit ; wAt++ )
{
pMessage = pClass->pMethods[ wAt ].pMessage;
pMessage = (PDYNSYM) pClass->pMethods[ wAt ].pMessage;
if( pMessage ) /* Hash Entry used ? */
{
pItem = _itemNew( NULL ); /* Add to array */