From 16a9c301c01be73089408ffb5b7c192cfedd30b3 Mon Sep 17 00:00:00 2001 From: "Alexander S.Kresin" Date: Tue, 19 Mar 2002 06:26:11 +0000 Subject: [PATCH] 2002-03-19 09:30 UTC+0300 Alexander Kresin --- harbour/ChangeLog | 6 ++++++ harbour/source/rdd/dbcmd.c | 17 +++++++++++------ harbour/source/rdd/dbfntx/dbfntx1.c | 4 ++-- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index e51978291e..a74438add8 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -7,6 +7,12 @@ For example: 2002-12-01 23:12 UTC+0100 Foo Bar */ + * Fix bug in PICTURE '@S' + +2002-03-19 13:07 UTC+0100 Antonio Linares + * source/vm/memvars.c + * __MVSAVE() saves all variables (publics and privates) + Of course if a public variable is overriden by a private one, the private value it is saved. I have not compared the saved files with Cl*pper ones. Once this is checked, then we may diff --git a/harbour/source/rdd/dbcmd.c b/harbour/source/rdd/dbcmd.c index dba5a94670..5070bca19f 100644 --- a/harbour/source/rdd/dbcmd.c +++ b/harbour/source/rdd/dbcmd.c @@ -2858,13 +2858,18 @@ HB_FUNC( ORDSCOPE ) SELF_SCOPEINFO( ( AREAP ) s_pCurrArea->pArea, sInfo.nScope, pScopeValue ); - if( hb_pcount() < 2 || ISNIL( 2 ) ) /* explicitly passed NIL, clear it */ - sInfo.scopeValue = NULL; - else - sInfo.scopeValue = hb_param( 2, HB_IT_ANY) ; + if( hb_pcount() > 1 ) + { + if ( ISNIL( 2 ) ) /* explicitly passed NIL, clear it */ + sInfo.scopeValue = NULL; + else + sInfo.scopeValue = hb_param( 2, HB_IT_ANY) ; - /* rdd must not alter the scopeValue item -- it's not a copy */ - SELF_SETSCOPE( ( AREAP ) s_pCurrArea->pArea, (LPDBORDSCOPEINFO) &sInfo ); + /* rdd must not alter the scopeValue item -- it's not a copy */ + SELF_SETSCOPE( ( AREAP ) s_pCurrArea->pArea, (LPDBORDSCOPEINFO) &sInfo ); + + }else + sInfo.scopeValue = NULL; hb_itemRelease( hb_itemReturn( pScopeValue ) ); } diff --git a/harbour/source/rdd/dbfntx/dbfntx1.c b/harbour/source/rdd/dbfntx/dbfntx1.c index 7ee4fe2bb3..67958fddaa 100644 --- a/harbour/source/rdd/dbfntx/dbfntx1.c +++ b/harbour/source/rdd/dbfntx/dbfntx1.c @@ -159,7 +159,7 @@ static void commonError( NTXAREAP pArea, USHORT uiGenCode, USHORT uiSubCode, cha static void hb_IncString( char* s, int slen ) { - unsigned char *ptr; + char *ptr; unsigned int nsymb; for( ptr=s+slen-1;ptr>=s;ptr-- ) @@ -167,7 +167,7 @@ static void hb_IncString( char* s, int slen ) nsymb = (unsigned int) *ptr; if( nsymb < 255 ) { - *ptr = (unsigned char) ++nsymb; + *ptr = (char) ++nsymb; break; } }