From 282c6ee70fb6a551652c6bdecfe32a605c741f00 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 9 Jun 2005 16:04:09 +0000 Subject: [PATCH] 2005-06-09 18:09 UTC+0100 Viktor Szakats * source/rtl/tget.prg ! :displat fixed (again) to always call VarGet block to be CA-Cl*pper compatible. * config/w32/global.cf ! Fixed to properly create the obj directories when compiling using GCC under XP. This broke in the near past. * source/pp/ppcore.c ! Fixed two compiler warnings. ; Please review one of them if you made the change, since I'm not sure what the intention was, here's the code snippet: ... lenreal = IsMacroVar( *ptri, com_or_tra ); /* THIS LINE IS NOW COMMENTED OUT */ *ptri +=1; lenreal = getExpReal( expreal+2, ptri, FALSE, maxlenreal, FALSE ); ... * source/codepage/cdphu852.c ! HU sorting order fixed to be more compatible with CA-Cl*pper. (Still missing some non-852 chars though) * source/common/hbver.c ! Fixed forming NT version number (5.01.2600 -> 5.1.2600) * source/compiler/hbusage.c + Copyright year updated. * harbour/source/rtl/idle.c * Cleaned up a platform dependent code part. --- harbour/ChangeLog | 34 ++++++++++++++++++++++++++ harbour/config/w32/global.cf | 1 + harbour/source/codepage/cdphu852.c | 9 ++++--- harbour/source/common/hbver.c | 2 +- harbour/source/compiler/hbusage.c | 2 +- harbour/source/pp/ppcore.c | 5 ++-- harbour/source/rtl/idle.c | 24 +++++++++++-------- harbour/source/rtl/tget.prg | 38 ++++++++++++++++++------------ 8 files changed, 83 insertions(+), 32 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 567401e70b..d75f2ec64d 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,40 @@ 2002-12-01 23:12 UTC+0100 Foo Bar */ +2005-06-09 18:09 UTC+0100 Viktor Szakats + + * source/rtl/tget.prg + ! :displat fixed (again) to always call VarGet block + to be CA-Cl*pper compatible. + + * config/w32/global.cf + ! Fixed to properly create the obj directories when compiling + using GCC under XP. This broke in the near past. + + * source/pp/ppcore.c + ! Fixed two compiler warnings. + ; Please review one of them if you made the change, since + I'm not sure what the intention was, here's the code snippet: + + ... + lenreal = IsMacroVar( *ptri, com_or_tra ); /* THIS LINE IS NOW COMMENTED OUT */ + *ptri +=1; + lenreal = getExpReal( expreal+2, ptri, FALSE, maxlenreal, FALSE ); + ... + + * source/codepage/cdphu852.c + ! HU sorting order fixed to be more compatible with CA-Cl*pper. + (Still missing some non-852 chars though) + + * source/common/hbver.c + ! Fixed forming NT version number (5.01.2600 -> 5.1.2600) + + * source/compiler/hbusage.c + + Copyright year updated. + + * harbour/source/rtl/idle.c + * Cleaned up a platform dependent code part. + 2005-05-25 09:55 UTC+0300 Alexander Kresin * include/hbver.h * doc/whatsnew.txt diff --git a/harbour/config/w32/global.cf b/harbour/config/w32/global.cf index 7fd400fada..a04c3a4349 100644 --- a/harbour/config/w32/global.cf +++ b/harbour/config/w32/global.cf @@ -41,6 +41,7 @@ MD = md dirbase:: -@for %%d in ($(HB_ARCHITECTURE) $(ARCH_DOS)) do if not exist %%d\. $(MD) %%d + -@for %d in ($(HB_ARCHITECTURE) $(ARCH_DOS)) do if not exist %d\. $(MD) %d clean:: -@for %%f in ($(ARCH_DOS)\*.* *.bak *.obj *.o *.tds) do $(RM) %%f diff --git a/harbour/source/codepage/cdphu852.c b/harbour/source/codepage/cdphu852.c index 48cab13f93..0f6341ab52 100644 --- a/harbour/source/codepage/cdphu852.c +++ b/harbour/source/codepage/cdphu852.c @@ -58,7 +58,7 @@ #include "hbapi.h" #include "hbapicdp.h" -#define NUMBER_OF_CHARACTERS 35 /* The number of single characters in the +#define NUMBER_OF_CHARACTERS 36 /* The number of single characters in the alphabet, two-as-one aren't considered here, accented - are considered. */ #define IS_LATIN 1 /* Should be 1, if the national alphabet @@ -83,10 +83,13 @@ same excepting the characters case, of course. */ +/* NOTE: Ž/„ has been added to make it more compatible with sixhu852 for C52 + and [vszakats] */ + static HB_CODEPAGE s_codepage = { "HU852", CPID_852, UNITB_852, NUMBER_OF_CHARACTERS, - "AµBCDEFGHIÖJKLMNOà™ŠPQRSTUéšëVWXYZ", - "a bcde‚fghiĦjklmno˘”‹pqrstu£ûvwxyz", + "AµŽBCDEFGHIÖJKLMNOà™ŠPQRSTUéšëVWXYZ", + "a „bcde‚fghiĦjklmno˘”‹pqrstu£ûvwxyz", IS_LATIN, ACCENTED_EQUAL, ACCENTED_INTERLEAVED, 0, 0, NULL, NULL, NULL, NULL, 0, NULL }; HB_CODEPAGE_INIT( HU852 ); diff --git a/harbour/source/common/hbver.c b/harbour/source/common/hbver.c index cef9348335..a7b95314b6 100644 --- a/harbour/source/common/hbver.c +++ b/harbour/source/common/hbver.c @@ -239,7 +239,7 @@ char * hb_verPlatform( void ) break; } - sprintf( pszPlatform, "%s %lu.%02lu.%04d", + sprintf( pszPlatform, "%s %lu.%lu.%04d", pszName, ( ULONG ) osVer.dwMajorVersion, ( ULONG ) osVer.dwMinorVersion, diff --git a/harbour/source/compiler/hbusage.c b/harbour/source/compiler/hbusage.c index 32e05f5bf2..832793ed66 100644 --- a/harbour/source/compiler/hbusage.c +++ b/harbour/source/compiler/hbusage.c @@ -187,5 +187,5 @@ void hb_compPrintLogo( void ) { printf( "Harbour Compiler Alpha build %d.%d (%s)\n", HB_VER_MINOR, HB_VER_REVISION, HB_VER_LEX ); - printf( "Copyright 1999-2004, http://www.harbour-project.org/\n" ); + printf( "Copyright 1999-2005, http://www.harbour-project.org/\n" ); } diff --git a/harbour/source/pp/ppcore.c b/harbour/source/pp/ppcore.c index b2ecbec466..9ed00d62ff 100644 --- a/harbour/source/pp/ppcore.c +++ b/harbour/source/pp/ppcore.c @@ -697,7 +697,7 @@ int hb_pp_ParseDefine( char * sLine ) memcpy( pars, tmp, iPar ); pars[ iPar ] = '\0'; iOldPos = 0; - while( (iPos = md_strAt( pars+1, iPar-1, sLine+iOldPos, TRUE, FALSE, FALSE, MD_STR_AT_IGNORECASE )) ) + while( (iPos = md_strAt( pars+1, iPar-1, sLine+iOldPos, TRUE, FALSE, FALSE, MD_STR_AT_IGNORECASE )) != 0 ) { if( sLine[iOldPos+iPos] != '\001' ) { @@ -2101,7 +2101,8 @@ static int WorkMarkers( char ** ptrmp, char ** ptri, char * ptro, int * lenres, HB_SKIPTABSPACES( *ptri ); if( **ptri == '(' ) /* macro expression &( expr ) */ { - lenreal = IsMacroVar( *ptri, com_or_tra ); +/* Commented out this line to avoid a compiler warning. Please review. [vszakats] */ +/* lenreal = IsMacroVar( *ptri, com_or_tra ); */ *ptri +=1; lenreal = getExpReal( expreal+2, ptri, FALSE, maxlenreal, FALSE ); if( **ptri == ')' ) diff --git a/harbour/source/rtl/idle.c b/harbour/source/rtl/idle.c index 39f1ffc57f..4bb75646c5 100644 --- a/harbour/source/rtl/idle.c +++ b/harbour/source/rtl/idle.c @@ -135,19 +135,23 @@ void hb_releaseCPU( void ) HB_DOS_INT86( 0x2F, ®s, ®s ); } -#elif defined(HB_OS_DARWIN) - { - usleep( 1 ); - } #elif defined(HB_OS_UNIX) - { - static struct timespec nanosecs = { 0, 1000 }; - /* NOTE: it will sleep at least 10 miliseconds (forced by kernel) */ - nanosleep( &nanosecs, NULL ); - } + + #ifdef defined(HB_OS_DARWIN) + { + usleep( 1 ); + } + #else + { + static struct timespec nanosecs = { 0, 1000 }; + /* NOTE: it will sleep at least 10 miliseconds (forced by kernel) */ + nanosleep( &nanosecs, NULL ); + } + #endif + #else - /* Do nothing */ + /* Do nothing */ #endif } diff --git a/harbour/source/rtl/tget.prg b/harbour/source/rtl/tget.prg index 92bb40f044..cf31177da4 100644 --- a/harbour/source/rtl/tget.prg +++ b/harbour/source/rtl/tget.prg @@ -375,13 +375,19 @@ METHOD Display( lForced ) CLASS Get DEFAULT lForced TO .t. + // ; VarGet() has to be called everytime here to stay + // CA-Cl*pper compatible, please take care of that. [vszakats] + if ::buffer == nil ::Original := ::VarGet() ::Type := ValType( ::Original ) - ::picture := ::cPicture //this sets also ::buffer + ::picture := ::cPicture + ::buffer := ::PutMask( ::Original, .f. ) + else + ::buffer := ::PutMask( ::VarGet(), .f. ) endif - xBuffer := ::buffer //::PutMask( ::VarGet(), .f. ) + xBuffer := ::buffer if ::Type == 'N' .AND. ::hasFocus .AND. ! ::lMinusPrinted .and. ; ! Empty( ::DecPos ) .and. ::minus .AND. ; @@ -494,7 +500,7 @@ METHOD SetFocus() CLASS Get ::Original := ::VarGet() ::type := ValType( ::Original ) ::Picture := ::cPicture - ::buffer := ::PutMask( ::VarGet(), .f. ) + ::buffer := ::PutMask( ::Original, .f. ) ::changed := .f. ::clear := ( "K" $ ::cPicFunc .or. ::type == "N") // ::nMaxLen := IIF( ::buffer == NIL, 0, Len( ::buffer ) ) @@ -553,18 +559,19 @@ return Self //---------------------------------------------------------------------------// METHOD VarPut( xValue, lReFormat ) CLASS Get -LOCAL aSubs, nLen, aValue -LOCAL i + + LOCAL aSubs, nLen, aValue + LOCAL i DEFAULT lReFormat TO .t. - if ValType( ::Block ) == 'B' + if ValType( ::bBlock ) == "B" IF ::SubScript == NIL - Eval( ::Block, xValue ) + Eval( ::bBlock, xValue ) ELSE aSubs := ::SubScript nLen := Len( aSubs ) - aValue := Eval( ::Block ) + aValue := Eval( ::bBlock ) FOR i:=1 TO nLen - 1 aValue := aValue[ aSubs[ i ] ] NEXT @@ -586,18 +593,19 @@ return xValue //---------------------------------------------------------------------------// METHOD VarGet() CLASS Get -LOCAL aSubs, nLen, aValue -LOCAL i -LOCAL xValue - IF ValType( ::Block ) == 'B' + LOCAL aSubs, nLen, aValue + LOCAL i + LOCAL xValue + + IF ValType( ::bBlock ) == "B" IF ::SubScript == NIL - xValue := Eval( ::Block ) + xValue := Eval( ::bBlock ) ELSE aSubs := ::SubScript nLen := Len( aSubs ) - aValue := Eval( ::Block ) - FOR i:=1 TO nLen - 1 + aValue := Eval( ::bBlock ) + FOR i := 1 TO nLen - 1 aValue := aValue[ aSubs[ i ] ] NEXT xValue := aValue[ aSubs[ i ] ]