2008-06-05 13:42 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/source/pp/hbppgen.c
    + added -d<id>[=<val>] command line switch

  * harbour/source/compiler/cmdcheck.c
    * cleaned processing -d<id>[=<val>] switches
This commit is contained in:
Przemyslaw Czerpak
2008-06-05 11:42:26 +00:00
parent 27e1488484
commit 21f44f12b5
3 changed files with 38 additions and 19 deletions

View File

@@ -8,6 +8,13 @@
2008-12-31 13:59 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
2008-06-05 13:42 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/pp/hbppgen.c
+ added -d<id>[=<val>] command line switch
* harbour/source/compiler/cmdcheck.c
* cleaned processing -d<id>[=<val>] switches
2008-06-05 12:57 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/bin/hb-func.sh
+ added get_hbverstat function to extract build status from hbver.h

View File

@@ -1004,21 +1004,16 @@ static void hb_compChkDefineSwitch( HB_COMP_DECL, char *pszSwitch )
{
if( pszSwitch[1] == 'd' || pszSwitch[1] == 'D' )
{
char *szDefText = hb_strdup( pszSwitch + 2 ), *pAssign;
unsigned int i = 0;
while( szDefText[i] /*&& !HB_ISOPTSEP( szDefText[i] )*/ )
i++;
szDefText[i] = '\0';
if( szDefText )
if( pszSwitch[2] )
{
pAssign = strchr( szDefText, '=' );
if( pAssign )
*pAssign++ = '\0';
hb_pp_addDefine( HB_COMP_PARAM->pLex->pPP, szDefText, pAssign );
char *szDefText = hb_strdup( pszSwitch + 2 ), *szAssign;
szAssign = strchr( szDefText, '=' );
if( szAssign )
*szAssign++ = '\0';
hb_pp_addDefine( HB_COMP_PARAM->pLex->pPP, szDefText, szAssign );
hb_xfree( szDefText );
}
hb_xfree( szDefText );
}
else if( pszSwitch[1] && toupper( pszSwitch[1] ) == 'U' &&
pszSwitch[2] && toupper( pszSwitch[2] ) == 'N' &&

View File

@@ -498,12 +498,13 @@ static void hb_pp_usage( char * szName )
{
printf( "\n" );
printf( "Syntax: %s <file[.prg]> [options]\n\n", szName );
printf( "Options: -i<path> \tadd #include file search path\n"
" -c[<file>]\tlook for ChangeLog file\n"
" -o<file> \tcreates .c file with PP rules\n"
" -v<file> \tcreates .h file with version information\n"
" -w \twrite preprocessed (.ppo) input file\n"
" -q \tdisable information messages\n" );
printf( "Options: -d<id>[=<val>]\t#define <id>\n"
" -i<path> \tadd #include file search path\n"
" -c[<file>] \tlook for ChangeLog file\n"
" -o<file> \tcreates .c file with PP rules\n"
" -v<file> \tcreates .h file with version information\n"
" -w \twrite preprocessed (.ppo) input file\n"
" -q \tdisable information messages\n" );
}
int main( int argc, char * argv[] )
@@ -540,6 +541,22 @@ int main( int argc, char * argv[] )
fQuiet = TRUE;
break;
case 'd':
case 'D':
if( !argv[i][2] )
szFile = NULL;
else
{
char *szDefText = hb_strdup( argv[i] + 2 ), *szAssign;
szAssign = strchr( szDefText, '=' );
if( szAssign )
*szAssign++ = '\0';
hb_pp_addDefine( pState, szDefText, szAssign );
hb_xfree( szDefText );
}
break;
case 'w':
case 'W':
if( argv[i][2] )