This commit is contained in:
Andi Jahja
2002-01-02 02:03:10 +00:00
parent ccc3242ad1
commit 5d2d8f5deb
7 changed files with 87 additions and 12 deletions

View File

@@ -7,6 +7,35 @@
For example:
2002-12-01 23:12 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
open :(
2002-01-03 00:40 UTC-0300 Luiz Rafael Culik <culik@sl.conex.net>
* include/hbfsapi.h
* under Win32 FHANDLE is typedef to long
* source/rtl/filesys.c
* Replaced all X__WIN32__ with __WIN32__
* hb_fscommit() now used true Win32 Api calls
* No more file limit on Win32
2002-01-02 09:40 UTC+0200 Chen Kedem <niki@actcom.co.il>
* doc/dirstruc.txt
+ Add description for newly added directories
2002-01-02 10:03 UTC+0700 Andi Jahja <harbour@cbn.net.id>
* source/compiler/cmdcheck.c
! harbour did not obey "set clippercmd=/n" -> fixed ( my fault, sorry )
2002-01-02 09:06 UTC+0700 Andi Jahja <harbour@cbn.net.id>
* source\vm\fm.c
* function hb_xalloc() - Prevention for same symptom as noted on hb_xgrab():
(see ChangeLog : 2002-01-01 11:15 UTC+0700 Andi Jahja <harbour@cbn.net.id> )
modify memory allocation by adding extra bytes to be allocated
in line with byte alignment.
* include/hbcomp.h
+ BOOL hb_comp_bNoStartUp, public variable for generating C-source with for
no_startup option. TRUE = no_startup. FALSE = with_startup
- remove definition of HB_COMPGENC_NO_STARTUP
* source/compiler/cmdcheck.c
- remove /gc3 switch
! add additional arguments to switch /n :

View File

@@ -451,6 +451,7 @@ extern BOOL hb_comp_bForceMemvars;
extern BOOL hb_comp_bDebugInfo;
extern char hb_comp_szPrefix[ 20 ];
extern int hb_comp_iGenCOutput;
extern BOOL hb_comp_bNoStartUp;
extern int hb_comp_iExitLevel;
extern int hb_comp_iFunctionCnt;
extern char hb_comp_cVarType;
@@ -503,7 +504,6 @@ extern ULONG hb_comp_Supported;
#define HB_COMPGENC_COMPACT 0
#define HB_COMPGENC_NORMAL 1
#define HB_COMPGENC_VERBOSE 2
#define HB_COMPGENC_NO_STARTUP 3
/* /ES command line setting types */
#define HB_EXITLEVEL_DEFAULT 0

View File

@@ -106,6 +106,10 @@ static ULONG PackDateTime( void )
void hb_compChkCompilerSwitch( int iArg, char * Args[] )
{
/* Generates implicit startup procedure
*/
hb_comp_bStartProc = TRUE;
/* If iArg is passed check the command line options */
if( iArg )
{
@@ -275,6 +279,25 @@ void hb_compChkCompilerSwitch( int iArg, char * Args[] )
j = strlen( Args[i] );
continue;
case 'n' :
case 'N' :
/* Required argument */
if ( Args[i][j + 1] )
{
/* Optional argument */
Switch[2] = Args[i][j + 1];
Switch[3] = '\0';
j += 2;
}
else
{
/* No optional argument */
Switch[2] = '\0';
j += 1;
}
hb_compChkEnvironVar( (char*) Switch );
continue;
case 'o' :
case 'O' :
Args[i] += (j - 1);
@@ -534,10 +557,6 @@ void hb_compChkEnvironVar( char * szSwitch )
{
case '\0':
case '3':
hb_comp_iGenCOutput = HB_COMPGENC_NO_STARTUP;
break;
case '2':
hb_comp_iGenCOutput = HB_COMPGENC_VERBOSE;
break;
@@ -661,10 +680,29 @@ void hb_compChkEnvironVar( char * szSwitch )
case 'n':
case 'N':
if( *( s + 1 ) == '-' )
hb_comp_bStartProc = TRUE;
else
/*
-n1 no start up procedure and no implicit start up procedure
*/
if( *( s + 1 ) == '1' )
{
hb_comp_bStartProc = FALSE;
hb_comp_bNoStartUp = TRUE;
}
/*
-n or -n0 no implicit start up procedure
*/
else if ( ( *( s + 1 ) == '0' ) || ( *( s + 1 ) == '\0' ) )
hb_comp_bStartProc = FALSE;
/*
-n- ceates implicit start up procedure
*/
else if( *( s + 1 ) == '-' )
hb_comp_bStartProc = TRUE;
/*
invalid command
*/
else
hb_compGenError( hb_comp_szErrors, 'F', HB_COMP_ERR_BADOPTION, s, NULL );
break;
case 'o':

View File

@@ -156,7 +156,7 @@ void hb_compGenCCode( PHB_FNAME pFileName ) /* generates the C language ou
if( ( pSym->cScope != HB_FS_MESSAGE ) && ( pSym->cScope & HB_FS_MESSAGE ) ) /* only for non public symbols */
fprintf( yyc, " | HB_FS_MESSAGE" );
if ( ( pSym->cScope & HB_FS_FIRST ) && ( hb_comp_iGenCOutput != HB_COMPGENC_NO_STARTUP ) )
if ( ( pSym->cScope & HB_FS_FIRST ) && ( ! hb_comp_bNoStartUp ) )
fprintf( yyc, " | HB_FS_FIRST" );
/* specify the function address if it is a defined function or an

View File

@@ -113,6 +113,7 @@ BOOL hb_comp_bForceMemvars = FALSE; /* holds if memvars ar
BOOL hb_comp_bDebugInfo = FALSE; /* holds if generate debugger required info */
char hb_comp_szPrefix[ 20 ] = { '\0' }; /* holds the prefix added to the generated symbol init function name (in C output currently) */
int hb_comp_iGenCOutput = HB_COMPGENC_VERBOSE; /* C code generation should be verbose (use comments) or not */
BOOL hb_comp_bNoStartUp = FALSE ; /* C code generation embed HB_FS_FIRST or not */
int hb_comp_iExitLevel = HB_EXITLEVEL_DEFAULT; /* holds if there was any warning during the compilation process */
HB_PATHNAMES * hb_comp_pIncludePath = NULL;
int hb_comp_iFunctionCnt;

View File

@@ -67,7 +67,7 @@ void hb_compPrintUsage( char * szSelf )
"\n %ces[<level>] set exit severity",
"\n %cg<type> output type generated is <type> (see below)",
"\n %cgc[<type>] output type: C source (.c) (default)",
"\n <type>: 0=compact\n 1=normal\n 2=verbose (default)\n 3=no start up code",
"\n <type>: 0=compact 1=normal 2=verbose (default)",
"\n %cgo output type: Platform dependant object module",
"\n %cgw output type: Windows/DOS OBJ32 (.obj)",
"\n %cgh output type: Harbour Portable Object (.hrb)",
@@ -76,7 +76,9 @@ void hb_compPrintUsage( char * szSelf )
"\n %ck compilation mode (type -k? for more data)",
"\n %cl suppress line number information",
"\n %cm compile module only",
"\n %cn no implicit starting procedure",
"\n %cn[<type>] no implicit starting procedure (default)",
"\n <type>: 0=no implicit starting procedure",
"\n 1=no starting procedure at all",
"\n %co<path> object file drive and/or path",
"\n %cp generate pre-processed output (.ppo) file",
"\n %cq quiet",

View File

@@ -185,7 +185,12 @@ void HB_EXPORT * hb_xalloc( ULONG ulSize ) /* allocates fixed memory, re
HB_TRACE(HB_TR_DEBUG, ("hb_xalloc(%lu)", ulSize));
return malloc( ulSize );
#define ALIGN_SIZE sizeof (double)
#define RESERVE_SIZE (((sizeof (ulSize) + (ALIGN_SIZE - 1)) \
/ ALIGN_SIZE) * ALIGN_SIZE)
return malloc( ulSize + RESERVE_SIZE );
/* return malloc( ulSize ); */
#endif
}