2004-10-31 01:55 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/source/compiler/cmdcheck.c
    * replaced some free by hb_xfree

  * harbour/source/compiler/genc.c
    * replace non ID characters in name of local symbol table by '_'

  * harbour/bin/hb-func.sh
   * set proper X11 path for mixed (32/64bit) systems
This commit is contained in:
Przemyslaw Czerpak
2004-10-31 00:00:39 +00:00
parent 8859472755
commit 6aff422233
4 changed files with 41 additions and 21 deletions

View File

@@ -8,6 +8,16 @@
2002-12-01 23:12 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
2004-10-31 01:55 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/compiler/cmdcheck.c
* replaced some free by hb_xfree
* harbour/source/compiler/genc.c
* replace non ID characters in name of local symbol table by '_'
* harbour/bin/hb-func.sh
* set proper X11 path for mixed (32/64bit) systems
2004-10-24 20:10 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/config/bsd/global.cf
+ added suppot for HB_COMMERCE and HB_WITHOUT_GTSLN env vars

View File

@@ -262,6 +262,7 @@ if [ -f "\${HB_LIB_INSTALL}/libgtcrs.a" ]; then
fi
if [ "\${HB_WITHOUT_X11}" != "yes" ]; then
if [ -f "\${HB_LIB_INSTALL}/libgtxvt.a" ] || [ -f "\${HB_LIB_INSTALL}/libgtxwc.a" ]; then
[ -d "/usr/X11R6/lib64" ] && SYSTEM_LIBS="\${SYSTEM_LIBS} -L/usr/X11R6/lib64"
SYSTEM_LIBS="\${SYSTEM_LIBS} -L/usr/X11R6/lib -lX11"
fi
fi

View File

@@ -501,7 +501,7 @@ void hb_compChkEnvironVar( char * szSwitch )
}
}
free( szOption );
hb_xfree( szOption );
}
break;
@@ -522,7 +522,7 @@ void hb_compChkEnvironVar( char * szSwitch )
else
hb_compGenError( hb_comp_szErrors, 'F', HB_COMP_ERR_BADOPTION, szOption, NULL );
free( szOption );
hb_xfree( szOption );
}
break;
@@ -734,14 +734,10 @@ void hb_compChkEnvironVar( char * szSwitch )
case 'o':
case 'O':
{
unsigned int i = 0;
char * szPath = hb_strdup( s + 1 );
while( i < strlen( szPath ) )
i++;
szPath[ i ] = '\0';
hb_comp_pOutPath = hb_fsFNameSplit( szPath );
free( szPath );
hb_xfree( szPath );
}
break;
@@ -752,14 +748,9 @@ void hb_compChkEnvironVar( char * szSwitch )
hb_comp_bPPO = 0;
else
{
unsigned int i = 0;
char * szPath = hb_strdup( s + 1 );
while( i < strlen( szPath ) )
i++;
szPath[ i ] = '\0';
hb_comp_pPpoPath = hb_fsFNameSplit( szPath );
free( szPath );
hb_xfree( szPath );
hb_comp_bPPO = 1;
}
@@ -833,7 +824,7 @@ void hb_compChkEnvironVar( char * szSwitch )
hb_comp_szPrefix[ 16 ] = '\0';
strcat( hb_comp_szPrefix, "_" );
free( szPrefix );
hb_xfree( szPrefix );
}
break;

View File

@@ -47,7 +47,8 @@ typedef HB_GENC_FUNC_ * HB_GENC_FUNC_PTR;
void hb_compGenCCode( PHB_FNAME pFileName ) /* generates the C language output */
{
char szFileName[ _POSIX_PATH_MAX ];
char szFileName[ _POSIX_PATH_MAX + 1 ];
char szModulname[ _POSIX_PATH_MAX + 1 ];
PFUNCTION pFunc = hb_comp_functions.pFirst;
PCOMSYMBOL pSym = hb_comp_symbols.pFirst;
PCOMDECLARED pDeclared;
@@ -140,8 +141,25 @@ void hb_compGenCCode( PHB_FNAME pFileName ) /* generates the C language ou
/* writes the symbol table */
/* Generate the wrapper that will initialize local symbol table
*/
hb_strupr( pFileName->szName );
fprintf( yyc, "\n\nHB_INIT_SYMBOLS_BEGIN( hb_vm_SymbolInit_%s%s )\n", hb_comp_szPrefix, pFileName->szName );
hb_strncpyUpper( szModulname, pFileName->szName, _POSIX_PATH_MAX );
/* replace non ID characters in name of local symbol table by '_' */
{
int iLen = strlen( szModulname ), i;
for ( i = 0; i < iLen; i++ )
{
char c = szModulname[ i ];
if ( ! ( c >= 'A' && c <= 'Z' ) &&
! ( c >= 'a' && c <= 'z' ) &&
! ( c >= '0' && c <= '9' ) &&
! c == '_' )
{
szModulname[ i ] = '_';
}
}
}
fprintf( yyc, "\n\nHB_INIT_SYMBOLS_BEGIN( hb_vm_SymbolInit_%s%s )\n", hb_comp_szPrefix, szModulname );
while( pSym )
{
@@ -214,10 +232,10 @@ void hb_compGenCCode( PHB_FNAME pFileName ) /* generates the C language ou
"#elif ! defined(__GNUC__)\n"
" #pragma startup hb_vm_SymbolInit_%s%s\n"
"#endif\n\n",
hb_comp_szPrefix, pFileName->szName,
hb_comp_szPrefix, pFileName->szName,
hb_comp_szPrefix, pFileName->szName,
hb_comp_szPrefix, pFileName->szName );
hb_comp_szPrefix, szModulname,
hb_comp_szPrefix, szModulname,
hb_comp_szPrefix, szModulname,
hb_comp_szPrefix, szModulname );
/* Generate functions data
*/