static void GetDlgStatus( gui_window *gui ) { long tmp; unsigned old; old = NewCurrRadix( 10 ); _SwitchSet( SW_AUTO_SAVE_CONFIG, GUIIsChecked( gui, CTL_OPT_AUTO ) ); _SwitchSet( SW_BELL, GUIIsChecked( gui, CTL_OPT_BELL ) ); _SwitchSet( SW_IMPLICIT, GUIIsChecked( gui, CTL_OPT_IMPLICIT ) ); _SwitchSet( SW_RECURSE_CHECK, GUIIsChecked( gui, CTL_OPT_RECURSE ) ); _SwitchSet( SW_FLIP, GUIIsChecked( gui, CTL_OPT_FLIP ) ); _SwitchSet( SW_DONT_EXPAND_HEX, GUIIsChecked( gui, CTL_OPT_NOHEX ) ); LookCaseSet( !GUIIsChecked( gui, CTL_OPT_CASE ) ); if( DlgGetLong( gui, CTL_OPT_RADIX, &tmp ) ) { DefaultRadixSet( tmp ); old = NewCurrRadix( 10 ); } if( DlgGetLong( gui, CTL_OPT_DCLICK, &tmp ) ) { WndSetDClick( tmp ); } NewCurrRadix( old ); /* Don't change config if it is just the trap file that does not support the option! */ if( SupportsExactBreakpoints ) { _SwitchSet( SW_BREAK_ON_WRITE, GUIIsChecked( gui, CTL_OPT_BR_ON_WRITE ) ); CapabilitiesSetExactBreakpointSupport( _IsOn( SW_BREAK_ON_WRITE ) ? TRUE : FALSE ); } }
bool SetCapabilitiesExactBreakpointSupport( bool status, bool set_switch ) { /* Don't change config if it is just the trap file that does not support the option! */ if( SupportsExactBreakpoints ) { if( set_switch ) { _SwitchSet( SW_BREAK_ON_WRITE, status ); } if( _IsOn( SW_BREAK_ON_WRITE ) ) { return( CapabilitiesSetExactBreakpointSupport( status ) ); } } return( FALSE ); }
bool InitCapabilities( void ) { /* Always reset in case of trap switch */ Supports8ByteBreakpoints = FALSE; SupportsExactBreakpoints = FALSE; SuppCapabilitiesId = GetSuppId( CAPABILITIES_SUPP_NAME ); if( SuppCapabilitiesId == 0 ) return( FALSE ); CapabilitiesGet8ByteBreakpointSupport(); CapabilitiesGetExactBreakpointSupport(); if( Supports8ByteBreakpoints ) CapabilitiesSet8ByteBreakpointSupport( TRUE ); if( SupportsExactBreakpoints && _IsOn( SW_BREAK_ON_WRITE ) ) CapabilitiesSetExactBreakpointSupport( TRUE ); return( TRUE ); }