19990917-00:50 GMT+1

This commit is contained in:
Viktor Szakats
1999-09-16 23:06:56 +00:00
parent ded1f1389e
commit daa8bc1cb6
5 changed files with 53 additions and 15 deletions

View File

@@ -1,3 +1,15 @@
19990917-00:50 GMT+1 Victor Szel <info@szelvesz.hu>
* source/rtl/hardcr.c
! Fixed so that it doesn't modify the buffer returned by hb_parc(),
it now uses Item API calls.
* source/hbpp/stdalone/hbpp.c
+ Enhanced header.
* source/runner/stdalone/runner.prg
+ Enhanced header.
* source/runner/runlib.c
+ __HRBRUN() will now add default extension (.hrb) to the passed filename.
19990917-00:05 GMT+1 Victor Szel <info@szelvesz.hu>
* include/hbdefs.h

View File

@@ -51,6 +51,7 @@
#include <ctype.h>
#include "hbpp.h"
#include "hberrors.h"
#include "hbver.h"
extern int pp_strAt( char *, int, char *, int );
extern void pp_Stuff( char *, char *, int, int, int );
@@ -77,7 +78,10 @@ int main( int argc, char * argv[] )
DEFINES * stdef = topDefine;
COMMANDS * stcmd = topCommand;
printf( "Harbour preprocessor\n" );
printf( "Harbour Preprocessor, Build %i%s (%04d.%02d.%02d)\n",
hb_build, hb_revision, hb_year, hb_month, hb_day );
printf( "Copyright 1999, http://www.harbour-project.org\n" );
while( iArg < argc )
{
if( IS_OPT_SEP(argv[ iArg ][ 0 ]))
@@ -142,13 +146,14 @@ int main( int argc, char * argv[] )
}
else
{
printf( "Syntax: hbpp <file.prg> [options]\n"
"\nOptions: \n"
"\t/d<id>[=<val>]\t#define <id>\n"
"\t/i<path>\tadd #include file search path\n"
"\t/o\t\tcreates hbpp.out with all tables\n"
"\t/n\t\twith those only, which defined in your file\n"
"\t/w\t\tenable warnings\n" );
printf( "\nSyntax: %s <file[.prg]> [options]"
"\n"
"\nOptions: /d<id>[=<val>] #define <id>"
"\n /i<path> add #include file search path"
"\n /o creates hbpp.out with all tables"
"\n /n with those only, which defined in your file"
"\n /w enable warnings"
, argv[ 0 ] );
if( bOutTable )
OutTable( NULL, NULL );

View File

@@ -65,6 +65,7 @@
*/
#include "extend.h"
#include "itemapi.h"
#define CHR_HARD1 ( ( char ) 13 )
@@ -89,11 +90,16 @@ char * hb_strHardCR( char * pszString, ULONG ulStringLen )
HARBOUR HB_HARDCR( void )
{
if( ISCHAR( 1 ) )
{
ULONG ulStringLen = hb_parclen( 1 );
PHB_ITEM pString = hb_param( 1, IT_STRING );
hb_retclen( hb_strHardCR( hb_parc( 1 ), ulStringLen ), ulStringLen );
if( pString )
{
char * pszBuffer = hb_itemGetC( pString );
ULONG ulStringLen = hb_itemGetCLen( pString );
hb_retclen( hb_strHardCR( pszBuffer, ulStringLen ), ulStringLen );
hb_itemFreeC( pszBuffer );
}
else
hb_retc( "" );

View File

@@ -36,6 +36,7 @@
#include "extend.h"
#include "itemapi.h"
#include "errorapi.h"
#include "filesys.h"
#include "ctoharb.h"
#include "pcode.h"
@@ -128,10 +129,22 @@ HARBOUR HB___HRBRUN( void )
{
if( hb_pcount() >= 1 )
{
char * szFileName = hb_parc( 1 );
char szFileName[ _POSIX_PATH_MAX + 1 ];
PHB_FNAME pFileName;
FILE * file;
BOOL bError = FALSE;
/* Create full filename */
pFileName = hb_fsFNameSplit( hb_parc( 1 ) );
if( ! pFileName->szExtension )
pFileName->szExtension = ".hrb";
hb_fsFNameMerge( szFileName, pFileName );
hb_xfree( pFileName );
/* Open as binary */
while ( ( file = hb_hrbFileOpen( szFileName ) ) == NULL )

View File

@@ -39,11 +39,13 @@ FUNCTION Main( cHRBFile, cPar1, cPar2, cPar3, cPar4, cPar5, cPar6, cPar7, cPar8,
LOCAL xRetVal
IF Empty( cHRBFile )
?? "Syntax: runner <hrbfile.hrb> [parameter]"
?? "Harbour Runner"
? "Copyright 1999, http://www.harbour-project.org"
?
? "Syntax: runner <hrbfile[.hrb]> [parameters]"
ELSE
xRetVal := __hrbRun( cHRBFile, cPar1, cPar2, cPar3, cPar4, cPar5, cPar6, cPar7, cPar8, cPar9 )
ENDIF
RETURN xRetVal
RETURN xRetVal