From 4d29fc6630e87093c67facc31cf9d8785e3325ea Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Mon, 26 May 2003 16:47:33 +0000 Subject: [PATCH] ChangeLog --- harbour/ChangeLog | 15 +++++++++++++++ harbour/source/compiler/cmdcheck.c | 2 +- harbour/source/pp/ppcore.c | 5 +++++ harbour/source/rtl/diskspac.c | 15 +++++++++++++++ 4 files changed, 36 insertions(+), 1 deletion(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index e03eaa9476..eaef325db6 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,21 @@ 2002-12-01 23:12 UTC+0100 Foo Bar */ +2003-05-26 18:40 UTC+0200 Przemyslaw Czerpak + * source/pp/ppcore.c + * allow to compile file with on *nix platforms. + It's dirty hack but works good for me and resolves one of the + most important problem with common CLIPPER and Harbour + (and other XBASE compatible compilers like FlagShip and CLIP) + sources - only Harbour cannot compile files with . + + * source/compiler/cmdcheck.c + ! fix which allow to use file names with '-' char in '-o' option + + * source/rtl/diskspac.c + + added support for diskspace on UNIX platforms + (first parameter is path name, if omitted "/" is checked) + 2003-05-26 15:50 UTC+0200 Przemyslaw Czerpak * harbour/source/rtl/cdpapi.c * small correction in s_en_codepage = { ... } diff --git a/harbour/source/compiler/cmdcheck.c b/harbour/source/compiler/cmdcheck.c index 6eea9696df..a484796eb8 100644 --- a/harbour/source/compiler/cmdcheck.c +++ b/harbour/source/compiler/cmdcheck.c @@ -706,7 +706,7 @@ void hb_compChkEnvironVar( char * szSwitch ) { unsigned int i = 0; char * szPath = hb_strdup( s + 1 ); - while( i < strlen( szPath ) && !HB_ISOPTSEP( szPath[ i ] ) ) + while( i < strlen( szPath ) ) i++; szPath[ i ] = '\0'; diff --git a/harbour/source/pp/ppcore.c b/harbour/source/pp/ppcore.c index 3d60920d00..29d67e28de 100644 --- a/harbour/source/pp/ppcore.c +++ b/harbour/source/pp/ppcore.c @@ -2995,6 +2995,11 @@ int hb_pp_RdStr( FILE * handl_i, char * buffer, int maxlen, BOOL lContinue, char cha = sBuffer[ *iBuffer ]; (*iBuffer)++; + if( cha == '\r' ) + { + cha = ' '; + } + if( cha == '\n' ) { if( ( ! hb_pp_bInline ) && s_ParseState == STATE_COMMENT && symbLast == ';' ) diff --git a/harbour/source/rtl/diskspac.c b/harbour/source/rtl/diskspac.c index c660ef92bb..8193e7f439 100644 --- a/harbour/source/rtl/diskspac.c +++ b/harbour/source/rtl/diskspac.c @@ -64,6 +64,13 @@ #include "hbapierr.h" #include "hbapifs.h" +#if defined(HB_OS_BSD) + #include + #include +#elif defined(HB_OS_UNIX) + #include +#endif + HB_FUNC( DISKSPACE ) { USHORT uiDrive = ISNUM( 1 ) ? hb_parni( 1 ) : 0; @@ -197,7 +204,15 @@ HB_FUNC( DISKSPACE ) #elif defined(HB_OS_UNIX) { + struct statfs st; + char *szName = ISCHAR( 1 ) ? hb_parc( 1 ) : "/"; + HB_SYMBOL_UNUSED( uiDrive ); + + if ( statfs( szName, &st) == 0 ) + dSpace = ( double ) st.f_blocks * ( double ) st.f_bsize; + else + bError = TRUE; } #else