From d801e352af4a7e8ce1b4880170a74ee130426dbc Mon Sep 17 00:00:00 2001 From: Bruno Cantero Date: Sat, 2 Sep 2000 08:25:12 +0000 Subject: [PATCH] 2000-09-02 10:19 GMT+1 Bruno Cantero --- harbour/ChangeLog | 9 +++++++++ harbour/include/hbset.h | 4 ++-- harbour/source/rdd/dbfcdx/dbfcdx1.c | 1 - harbour/source/rtl/set.c | 12 +++++++++--- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index dfa3bb324a..0c97207431 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,12 @@ +2000-09-02 10:19 GMT+1 Bruno Cantero + * include/hbset.h + * source/rtl/set.c + * source/rdd/dbfcdx/dbfcdx1.c + ! Changed SET_AUTOSHARE, now accept three values: + 0: AUTOSHARE disabled. + 1: AUTOSHARE enabled. + 2: force exclusive mode. + 2000-09-02 09:37 GMT+1 Bruno Cantero * contrib/rdd_ads/rddads.h * contrib/rdd_ads/ads1.c diff --git a/harbour/include/hbset.h b/harbour/include/hbset.h index 82bf1632cb..68140c454c 100644 --- a/harbour/include/hbset.h +++ b/harbour/include/hbset.h @@ -159,7 +159,7 @@ typedef struct BOOL HB_SET_OPTIMIZE; BOOL HB_SET_AUTOPEN; BOOL HB_SET_AUTORDER; - BOOL HB_SET_AUTOSHARE; + int HB_SET_AUTOSHARE; int HB_SET_VIDEOMODE; } HB_SET_STRUCT; @@ -172,4 +172,4 @@ extern void hb_setRelease( void ); } #endif -#endif /* HB_SET_H_ */ +#endif /* HB_SET_H_ */ \ No newline at end of file diff --git a/harbour/source/rdd/dbfcdx/dbfcdx1.c b/harbour/source/rdd/dbfcdx/dbfcdx1.c index f29bf55bc7..d346261b75 100644 --- a/harbour/source/rdd/dbfcdx/dbfcdx1.c +++ b/harbour/source/rdd/dbfcdx/dbfcdx1.c @@ -713,7 +713,6 @@ ERRCODE hb_cdxOpen( CDXAREAP pArea, LPDBOPENINFO pOpenInfo ) { HB_TRACE(HB_TR_DEBUG, ("hb_cdxOpen(%p, %p)", pArea, pOpenInfo)); - /* Force exclusive mode */ if( hb_set.HB_SET_AUTOSHARE == 2 ) pOpenInfo->fShared = FALSE; diff --git a/harbour/source/rtl/set.c b/harbour/source/rtl/set.c index 4ec408968c..258da27f15 100644 --- a/harbour/source/rtl/set.c +++ b/harbour/source/rtl/set.c @@ -355,8 +355,14 @@ HB_FUNC( SET ) if( args > 1 ) hb_set.HB_SET_AUTORDER = set_logical( pArg2 ); break; case HB_SET_AUTOSHARE : - hb_retl( hb_set.HB_SET_AUTOSHARE ); - if( args > 1 ) hb_set.HB_SET_AUTOSHARE = set_logical( pArg2 ); + hb_retni( hb_set.HB_SET_AUTOSHARE ); + if( args > 1 ) + { + if( set_number( pArg2, hb_set.HB_SET_AUTOSHARE ) < 0 ) + hb_errRT_BASE( EG_ARG, 2020, NULL, "SET" ); + else + hb_set.HB_SET_MARGIN = set_number( pArg2, hb_set.HB_SET_AUTOSHARE ); + } break; case HB_SET_BELL : hb_retl( hb_set.HB_SET_BELL ); @@ -626,7 +632,7 @@ void hb_setInitialize( void ) hb_set.hb_set_althan = FS_ERROR; hb_set.HB_SET_AUTOPEN = FALSE; hb_set.HB_SET_AUTORDER = FALSE; - hb_set.HB_SET_AUTOSHARE = FALSE; + hb_set.HB_SET_AUTOSHARE = 0; hb_set.HB_SET_BELL = FALSE; hb_set.HB_SET_CANCEL = TRUE; hb_set.hb_set_century = FALSE;