vc6 build errors
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6880 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
75bb9168ba
commit
fb2accece2
3 changed files with 21 additions and 19 deletions
|
@ -3451,16 +3451,16 @@ int CEXEBuild::parse_pragma(LineParser &line)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CEXEBuild::DiagState::Push()
|
void DiagState::Push()
|
||||||
{
|
{
|
||||||
CEXEBuild::DiagState *p = new DiagState();
|
DiagState *p = new DiagState();
|
||||||
p->m_Disabled = m_Disabled; // Copy current state
|
p->m_Disabled = m_Disabled; // Copy current state
|
||||||
p->m_pStack = m_pStack, m_pStack = p;
|
p->m_pStack = m_pStack, m_pStack = p;
|
||||||
}
|
}
|
||||||
bool CEXEBuild::DiagState::Pop()
|
bool DiagState::Pop()
|
||||||
{
|
{
|
||||||
if (!m_pStack) return false;
|
if (!m_pStack) return false;
|
||||||
CEXEBuild::DiagState *pPop = m_pStack;
|
DiagState *pPop = m_pStack;
|
||||||
m_pStack = pPop->m_pStack, pPop->m_pStack = 0;
|
m_pStack = pPop->m_pStack, pPop->m_pStack = 0;
|
||||||
m_Disabled.swap(pPop->m_Disabled);
|
m_Disabled.swap(pPop->m_Disabled);
|
||||||
delete pPop;
|
delete pPop;
|
||||||
|
|
|
@ -165,6 +165,21 @@ namespace MakensisAPI {
|
||||||
|
|
||||||
#define FLAG_OFFSET(flag) (FIELD_OFFSET(exec_flags_t, flag)/sizeof(int))
|
#define FLAG_OFFSET(flag) (FIELD_OFFSET(exec_flags_t, flag)/sizeof(int))
|
||||||
|
|
||||||
|
class DiagState {
|
||||||
|
public:
|
||||||
|
DiagState() : m_pStack(0) { assert(DIAGCODE_INTERNAL_LAST <= 0xffff); }
|
||||||
|
~DiagState() { delete m_pStack; }
|
||||||
|
void Enable(DIAGCODE n) { m_Disabled.erase(static_cast<unsigned short>(n)); }
|
||||||
|
void Disable(DIAGCODE n) { m_Disabled.insert(static_cast<unsigned short>(n)); }
|
||||||
|
bool IsDisabled(DIAGCODE n) { return m_Disabled.find(static_cast<unsigned short>(n)) != m_Disabled.end(); }
|
||||||
|
void Push();
|
||||||
|
bool Pop();
|
||||||
|
static bool IsValidCode(unsigned int n) { return n >= DIAGCODE_INTERNAL_FIRST && n <= DIAGCODE_INTERNAL_LAST; }
|
||||||
|
protected:
|
||||||
|
DiagState *m_pStack;
|
||||||
|
std::set<unsigned short> m_Disabled;
|
||||||
|
};
|
||||||
|
|
||||||
class CEXEBuild {
|
class CEXEBuild {
|
||||||
public:
|
public:
|
||||||
CEXEBuild(signed char pponly);
|
CEXEBuild(signed char pponly);
|
||||||
|
@ -396,20 +411,7 @@ class CEXEBuild {
|
||||||
|
|
||||||
void print_warnings();
|
void print_warnings();
|
||||||
void warninghelper(DIAGCODE dc, bool fl, const TCHAR *fmt, va_list args);
|
void warninghelper(DIAGCODE dc, bool fl, const TCHAR *fmt, va_list args);
|
||||||
class DiagState {
|
DiagState diagstate;
|
||||||
public:
|
|
||||||
DiagState() : m_pStack(0) { assert(DIAGCODE_INTERNAL_LAST <= 0xffff); }
|
|
||||||
~DiagState() { delete m_pStack; }
|
|
||||||
void Enable(DIAGCODE n) { m_Disabled.erase(static_cast<unsigned short>(n)); }
|
|
||||||
void Disable(DIAGCODE n) { m_Disabled.insert(static_cast<unsigned short>(n)); }
|
|
||||||
bool IsDisabled(DIAGCODE n) { return m_Disabled.find(static_cast<unsigned short>(n)) != m_Disabled.end(); }
|
|
||||||
void Push();
|
|
||||||
bool Pop();
|
|
||||||
static bool IsValidCode(unsigned int n) { return n >= DIAGCODE_INTERNAL_FIRST && n <= DIAGCODE_INTERNAL_LAST; }
|
|
||||||
protected:
|
|
||||||
DiagState *m_pStack;
|
|
||||||
std::set<unsigned short> m_Disabled;
|
|
||||||
} diagstate;
|
|
||||||
|
|
||||||
/** Are we defining an uninstall version of the code?
|
/** Are we defining an uninstall version of the code?
|
||||||
* @param un Use like a boolean to define whether in uninstall mode.
|
* @param un Use like a boolean to define whether in uninstall mode.
|
||||||
|
|
|
@ -868,7 +868,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
multiple_entries_instruction=0;
|
multiple_entries_instruction=0;
|
||||||
entry ent={};
|
entry ent={0,};
|
||||||
switch (which_token)
|
switch (which_token)
|
||||||
{
|
{
|
||||||
// macro stuff
|
// macro stuff
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue