ChangeLogTag:Mon May 10 19:32:34 1999 Gonzalo A. Diethelm <Gonzalo.Diethelm@jda.cl>

This commit is contained in:
Gonzalo A. Diethelm
1999-05-11 00:41:55 +00:00
parent d4f00d4238
commit da95a8a38b
5 changed files with 399 additions and 366 deletions

View File

@@ -1,3 +1,17 @@
Mon May 10 19:32:34 1999 Gonzalo A. Diethelm <Gonzalo.Diethelm@jda.cl>
* makefile.b32:
Added source/compiler/harbour.c to this makefile.
* source/compiler/Makefile:
Added genobj32.c.
* source/compiler/genobj32.c:
Got rid of warnings.
* source/compiler/harbour.y:
Added '/' as path separator.
19990510-11:30 Eddie Runia
* source/rtl/classes.c
Function IsMessage() added

View File

@@ -68,12 +68,13 @@ tclass.c : tclass.prg harbour.exe
bcc32 -c -O2 -I.\include -o$@ $<
tlib .\libs\b32\harbour.lib -+$@,,
harbour.exe : y_tab.c lexyy.c genobj32.c compiler.h
harbour.exe : y_tab.c lexyy.c genobj32.obj harbour.obj compiler.h
bcc32 -O2 -ebin\harbour.exe -Iinclude;source\compiler \
source\compiler\y_tab.c source\compiler\lexyy.c source\compiler\genobj32.c
source\compiler\y_tab.c source\compiler\lexyy.c \
source\compiler\genobj32.obj \
source\compiler\harbour.obj \
del y_tab.obj
del lexyy.obj
del compiler.obj
y_tab.c : harbour.y
bison -d -v -y -osource\compiler\y_tab.c source\compiler\harbour.y
@@ -81,6 +82,10 @@ y_tab.c : harbour.y
lexyy.c : harbour.l
flex -i -8 -osource\compiler\lexyy.c source\compiler\harbour.l
genobj32.obj : genobj32.c
bcc32 -c -O2 -I.\include -osource\compiler\genobj32.obj \
source\compiler\genobj32.c
harbour.obj : harbour.c
bcc32 -c -O2 -I.\include -osource\compiler\harbour.obj \
source\compiler\harbour.c

View File

@@ -8,6 +8,9 @@ YACC_SOURCE=harbour.y
LEX_SOURCE=harbour.l
C_SOURCES=\
genobj32.c \
C_MAIN=harbour.c
include $(TOP)$(ROOT)config/bin.cf

File diff suppressed because it is too large Load Diff

View File

@@ -28,9 +28,12 @@
#endif
/* TODO: #define this for various platforms */
#define PATH_DELIMITER "\\"
#define PATH_DELIMITER "/\\"
#define IS_PATH_SEP( c ) (strchr(PATH_DELIMITER, (c))!=NULL)
#define OPT_DELIMITER "/-"
#define IS_OPT_SEP( c ) (strchr(OPT_DELIMITER, (c))!=NULL)
extern FILE * yyin; /* currently yacc parsed file */
extern int iLine; /* currently parsed file line number */
@@ -113,7 +116,10 @@ void yy_delete_buffer( YY_BUFFER_STATE ); /* yacc functions to manage multiple f
void yy_switch_to_buffer( void * ); /* yacc functions to manage multiple files */
void yy_delete_buffer( void * ); /* yacc functions to manage multiple files */
#endif
#if 0
static void __yy_memcpy( char * from, char * to, int count ); /* Bison prototype */
#endif
/* production related functions */
PFUNCTION AddFunCall( char * szFuntionName );
@@ -942,22 +948,19 @@ void EXTERNAL_LINKAGE close_on_exit( void )
}
}
int main( int argc, char * argv[] )
int harbour_main( int argc, char * argv[] )
{
int iStatus = 0, iArg = 1;
char szFileName[ _POSIX_PATH_MAX ]; /* filename to parse */
char *szPath ="";
FILENAME *pFileName =NULL;
if( !_iQuiet )
printf( "Harbour compiler\nbuild %i Spring 1999\n", BUILD );
if( argc > 1 )
{
/* Command line options */
while( iArg < argc )
{
if( argv[ iArg ][ 0 ] == '/' || argv[ iArg ][ 0 ] == '-' )
if( IS_OPT_SEP(argv[ iArg ][ 0 ]))
{
switch( argv[ iArg ][ 1 ] )
{
@@ -1070,6 +1073,9 @@ int main( int argc, char * argv[] )
iArg++;
}
if( !_iQuiet )
printf( "Harbour compiler\nbuild %i Spring 1999\n", BUILD );
if( pFileName )
{
if( !pFileName->extension )
@@ -1270,6 +1276,13 @@ FILENAME *SplitFilename( char *szFilename )
*/
char *MakeFilename( char *szFileName, FILENAME *pFileName )
{
#if 0
fprintf(stderr, "path: |%s|\n"
"name: |%s|\n"
" ext: |%s|\n",
pFileName->path, pFileName->name, pFileName->extension);
#endif
if( pFileName->path && pFileName->path[ 0 ] )
{
/* we have not empty path specified */