diff --git a/API_GdbObjAttribs.cpp b/API_GdbObjAttribs.cpp index cccd2b0..a5795db 100644 --- a/API_GdbObjAttribs.cpp +++ b/API_GdbObjAttribs.cpp @@ -159,7 +159,7 @@ __stdcall EgtSetColor( int nId, const int ObjCol[4], BOOL bSetAlpha) // sistemo il colore Color cCol( ObjCol) ; // eseguo - return ( ExeSetColor( vIds, cCol, (bSetAlpha != FALSE)) ? TRUE : FALSE) ; + return ( ExeSetColor( vIds, cCol, ( bSetAlpha != FALSE)) ? TRUE : FALSE) ; } //----------------------------------------------------------------------------- @@ -259,6 +259,13 @@ __stdcall EgtSetInfo( int nId, const wchar_t* wsKey, const wchar_t* wsInfo) return ( ExeSetInfo( nId, wstrztoA( wsKey), string( wstrztoA( wsInfo))) ? TRUE : FALSE) ; } +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtSetInfoBool( int nId, const wchar_t* wsKey, BOOL bInfo) +{ + return ( ExeSetInfo( nId, wstrztoA( wsKey), ( bInfo != FALSE)) ? TRUE : FALSE) ; +} + //----------------------------------------------------------------------------- BOOL __stdcall EgtSetInfoInt( int nId, const wchar_t* wsKey, int nInfo) @@ -297,6 +304,21 @@ __stdcall EgtGetInfo( int nId, const wchar_t* wsKey, wchar_t*& wsInfo) return (( wsInfo == nullptr) ? FALSE : TRUE) ; } +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtGetInfoBool( int nId, const wchar_t* wsKey, BOOL* pbInfo) +{ + // verifico il parametro + if ( pbInfo == nullptr) + return FALSE ; + // recupero info + bool bInfo ; + if ( ! ExeGetInfo( nId, wstrztoA( wsKey), bInfo)) + return FALSE ; + *pbInfo = ( bInfo ? TRUE : FALSE) ; + return TRUE ; +} + //----------------------------------------------------------------------------- BOOL __stdcall EgtGetInfoInt( int nId, const wchar_t* wsKey, int* pnInfo) diff --git a/API_Lua.cpp b/API_Lua.cpp index 6d2057d..1ea5bda 100644 --- a/API_Lua.cpp +++ b/API_Lua.cpp @@ -31,7 +31,7 @@ __stdcall EgtLuaCreateGlobTable( const wchar_t* wsVar) BOOL __stdcall EgtLuaSetGlobBoolVar( const wchar_t* wsVar, BOOL bVal) { - return ( ExeLuaSetGlobBoolVar( wstrztoA( wsVar), ( bVal != FALSE ? true : false)) ? TRUE : FALSE) ; + return ( ExeLuaSetGlobBoolVar( wstrztoA( wsVar), ( bVal != FALSE)) ? TRUE : FALSE) ; } //----------------------------------------------------------------------------- diff --git a/API_MachMgr.cpp b/API_MachMgr.cpp index d868082..a4f976d 100644 --- a/API_MachMgr.cpp +++ b/API_MachMgr.cpp @@ -906,7 +906,7 @@ __stdcall EgtSetAllOperationsMode( BOOL bActive) BOOL __stdcall EgtSetOperationStatus( int nId, BOOL bShow) { - return ( ExeSetOperationStatus( nId, bShow != FALSE) ? TRUE : FALSE) ; + return ( ExeSetOperationStatus( nId, ( bShow != FALSE)) ? TRUE : FALSE) ; } //----------------------------------------------------------------------------- @@ -953,7 +953,7 @@ __stdcall EgtGetPhaseDisposition( int nPhase) BOOL __stdcall EgtSpecialApplyDisposition( int nId, BOOL bRecalc) { - return ( ExeSpecialApplyDisposition( nId, bRecalc != FALSE) ? TRUE : FALSE) ; + return ( ExeSpecialApplyDisposition( nId, ( bRecalc != FALSE)) ? TRUE : FALSE) ; } //----------------------------------------------------------------------------- diff --git a/API_Nesting.cpp b/API_Nesting.cpp index cfbbaa6..cebd220 100644 --- a/API_Nesting.cpp +++ b/API_Nesting.cpp @@ -45,7 +45,7 @@ BOOL __stdcall EgtPackBox( int nId, double dXmin, double dYmin, double dXmax, double dYmax, double dOffs, BOOL bBottomUp) { - return ( ExePackBox( nId, dXmin, dYmin, dXmax, dYmax, dOffs, bBottomUp != FALSE) ? TRUE : FALSE) ; + return ( ExePackBox( nId, dXmin, dYmin, dXmax, dYmax, dOffs, ( bBottomUp != FALSE)) ? TRUE : FALSE) ; } //----------------------------------------------------------------------------- diff --git a/EgtInterface.rc b/EgtInterface.rc index 7d2f845..84322e8 100644 Binary files a/EgtInterface.rc and b/EgtInterface.rc differ