From c43d4580a99e3cf95a83a2d925591c2c56f63a7b Mon Sep 17 00:00:00 2001 From: Ryszard Glab Date: Thu, 22 Jul 1999 14:43:59 +0000 Subject: [PATCH] ChangeLog 19990722-16:30 GMT+2 --- harbour/ChangeLog | 25 +++++++++++++++++++++++++ harbour/source/compiler/harbour.y | 8 ++++---- harbour/source/hbpp/harb.h | 7 +++---- harbour/source/hbpp/hbppmain.c | 1 - harbour/source/hbpp/preproc.c | 2 +- harbour/tests/working/Makefile | 3 --- 6 files changed, 33 insertions(+), 13 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 12197220a1..314f92d7dd 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,28 @@ +19990722-16:30 GMT+2 Ryszard Glab + + *source/compiler/harbour.y + * symbol names are no longer released for the second time + (it caused that DJGPP hanged in 'free' function) + + *source/hbpp/makefile + + added preproc.c + + *source/hbpp/harb.h + - changed to definie LONG and ULONG typedefs if there is no + HB_DEFS_H_ defined (these typedefs are defined in hbdefs.h) + + *source/hbpp/preproc.c + - removed nested /* */ + + *tests/working/Makefile + - removed statics1.prg and statics2.prg because these file have to + be linked together into an executable (we should change Makefile + architecture to support it) + - removed testpre.prg (it requires hbpp library however this library + cannot be linked because of duplicated symbol 'hb_strAt' defined + in rtl library also) -the changes in source/hbpp/*.c was an attempt + to get it working. + 19990722-14:30 CET Matthew Hamilton * tests/working/inifiles.prg cFile -> @cFile in fRead statement diff --git a/harbour/source/compiler/harbour.y b/harbour/source/compiler/harbour.y index 1be5e6196f..ca24ca587c 100644 --- a/harbour/source/compiler/harbour.y +++ b/harbour/source/compiler/harbour.y @@ -1743,12 +1743,12 @@ void AddVar( char * szVarName ) pLastVar = pLastVar->pNext; pLastVar->pNext = pVar; } - AddSymbol( szVarName ); switch( iVarScope ) { case VS_MEMVAR: /* variable declared in MEMVAR statement */ + AddSymbol( yy_strdup(szVarName) ); break; case (VS_PARAMETER | VS_PRIVATE): { @@ -1761,7 +1761,7 @@ void AddVar( char * szVarName ) { PCOMSYMBOL pSym; - pSym =AddSymbol( szVarName ); + pSym =AddSymbol( yy_strdup(szVarName) ); pSym->cScope =VS_MEMVAR; wPos =GetSymbolPos( szVarName ); } @@ -1774,14 +1774,14 @@ void AddVar( char * szVarName ) symbols.pLast->cScope = VS_MEMVAR; PushSymbol(yy_strdup("__PRIVATE"), 1); PushNil(); - PushSymbol( szVarName, 0 ); + PushSymbol( yy_strdup(szVarName), 0 ); Do( 1 ); break; case VS_PUBLIC: symbols.pLast->cScope = VS_MEMVAR; PushSymbol(yy_strdup("__PUBLIC"), 1); PushNil(); - PushSymbol( szVarName, 0 ); + PushSymbol( yy_strdup(szVarName), 0 ); Do( 1 ); break; } diff --git a/harbour/source/hbpp/harb.h b/harbour/source/hbpp/harb.h index 421f86fcf4..238c3d8e33 100644 --- a/harbour/source/hbpp/harb.h +++ b/harbour/source/hbpp/harb.h @@ -11,12 +11,11 @@ /* * Note: I don't think it is such a great idea to undef LONG... */ -#if defined(LONG) -#undef LONG /* 4 bytes unsigned */ -#endif - +#if ! defined(HB_DEFS_H_) typedef long LONG; typedef unsigned long ULONG; +#endif + #define PATH_DELIMITER "/\\" #define IS_PATH_SEP( c ) (strchr(PATH_DELIMITER, (c))!=NULL) #define OPT_DELIMITER "/-" diff --git a/harbour/source/hbpp/hbppmain.c b/harbour/source/hbpp/hbppmain.c index 2644223cec..4ec71251e5 100644 --- a/harbour/source/hbpp/hbppmain.c +++ b/harbour/source/hbpp/hbppmain.c @@ -401,4 +401,3 @@ void GenError( char* _szErrors[], char cPrefix, int iError, char * szError1, cha sprintf( szLine, _szErrors[ iError - 1 ], szError1, szError2 ); printf( "%s\n\n", szLine ); exit( 1 ); -} \ No newline at end of file diff --git a/harbour/source/hbpp/preproc.c b/harbour/source/hbpp/preproc.c index cb0fec04cb..54dc02473e 100644 --- a/harbour/source/hbpp/preproc.c +++ b/harbour/source/hbpp/preproc.c @@ -86,7 +86,7 @@ HARBOUR HB_PREPROCESS(void) void GenError( char* _szErrors[], char cPrefix, int iError, char * szError1, char * szError2 ) { - /*char * szLine = ( char * ) OurMalloc( 160 ); /*2 lines of text */ + /*char * szLine = ( char * ) OurMalloc( 160 );*/ /*2 lines of text */ char * szLine = ( char * ) _xgrab( 160 ); /*2 lines of text */ /* printf( "\r%s(%i) ", files.pLast->szFileName, iLine ); */ printf( "Error %c%i ", cPrefix, iError ); diff --git a/harbour/tests/working/Makefile b/harbour/tests/working/Makefile index 3068274f58..039188730a 100644 --- a/harbour/tests/working/Makefile +++ b/harbour/tests/working/Makefile @@ -87,8 +87,6 @@ PRG_SOURCES=\ set_test.prg \ statfun.prg \ statics.prg \ - statics1.prg \ - statics2.prg \ strcmp.prg \ strdelim.prg \ strings.prg \ @@ -109,7 +107,6 @@ PRG_SOURCES=\ testhtml.prg \ testinc.prg \ testmem.prg \ - testpre.prg \ teststr.prg \ testtok.prg \ testvars.prg \