Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile CalcManager project with or without precompiled headers #436

Merged
merged 12 commits into from
Apr 18, 2019
Merged
2 changes: 1 addition & 1 deletion src/CalcManager/CEngine/CalcInput.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#include "pch.h"
#include <sstream>
#include "Header Files/CalcEngine.h"

using namespace std;
Expand Down
1 change: 0 additions & 1 deletion src/CalcManager/CEngine/CalcUtils.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#include "pch.h"
#include "Header Files/CalcEngine.h"
#include "Header Files/CalcUtils.h"

Expand Down
1 change: 0 additions & 1 deletion src/CalcManager/CEngine/History.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#include "pch.h"
#include "Header Files/CalcEngine.h"
#include "Command.h"
#include "CalculatorVector.h"
Expand Down
2 changes: 1 addition & 1 deletion src/CalcManager/CEngine/Number.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.

#include "pch.h"
#include <algorithm>
#include "Header Files/Number.h"

using namespace std;
Expand Down
2 changes: 1 addition & 1 deletion src/CalcManager/CEngine/Rational.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.

#include "pch.h"
#include <intsafe.h>
#include "Header Files/Rational.h"

using namespace std;
Expand Down
1 change: 0 additions & 1 deletion src/CalcManager/CEngine/RationalMath.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#include "pch.h"
#include "Header Files/RationalMath.h"

using namespace std;
Expand Down
3 changes: 1 addition & 2 deletions src/CalcManager/CEngine/calc.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#include "pch.h"
#include <cassert>
#include "Header Files/CalcEngine.h"

#include "CalculatorResource.h"

using namespace std;
Expand Down
3 changes: 2 additions & 1 deletion src/CalcManager/CEngine/scicomm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
*
* Author:
\****************************************************************************/
#include "pch.h"

#include <string>
#include "Header Files/CalcEngine.h"
#include "Header Files/CalcUtils.h"

Expand Down
4 changes: 3 additions & 1 deletion src/CalcManager/CEngine/scidisp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
*
* Author:
\****************************************************************************/
#include "pch.h"

#include <sstream>
#include <regex>
#include "Header Files/CalcEngine.h"

using namespace std;
Expand Down
1 change: 0 additions & 1 deletion src/CalcManager/CEngine/scifunc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
/*** ***/
/*** ***/
/**************************************************************************/
#include "pch.h"
#include "Header Files/CalcEngine.h"

using namespace std;
Expand Down
1 change: 0 additions & 1 deletion src/CalcManager/CEngine/scioper.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#include "pch.h"
#include "Header Files/CalcEngine.h"

using namespace CalcEngine;
Expand Down
1 change: 0 additions & 1 deletion src/CalcManager/CEngine/sciset.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#include "pch.h"
#include "Header Files/CalcEngine.h"

using namespace CalcEngine;
Expand Down
9 changes: 8 additions & 1 deletion src/CalcManager/CalcManager.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@
<AdditionalIncludeDirectories>$(SolutionDir)..\src\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<ForcedIncludeFiles>pch.h</ForcedIncludeFiles>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand All @@ -173,6 +174,7 @@
<AdditionalIncludeDirectories>$(SolutionDir)..\src\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<ForcedIncludeFiles>pch.h</ForcedIncludeFiles>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand All @@ -189,6 +191,7 @@
<AdditionalIncludeDirectories>$(SolutionDir)..\src\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<ForcedIncludeFiles>pch.h</ForcedIncludeFiles>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand All @@ -205,6 +208,7 @@
<AdditionalIncludeDirectories>$(SolutionDir)..\src\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<ForcedIncludeFiles>pch.h</ForcedIncludeFiles>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand All @@ -222,6 +226,7 @@
<AdditionalIncludeDirectories>$(SolutionDir)..\src\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<ForcedIncludeFiles>pch.h</ForcedIncludeFiles>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand All @@ -238,6 +243,7 @@
<AdditionalIncludeDirectories>$(SolutionDir)..\src\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<ForcedIncludeFiles>pch.h</ForcedIncludeFiles>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand All @@ -254,6 +260,7 @@
<AdditionalIncludeDirectories>$(SolutionDir)..\src\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<ForcedIncludeFiles>pch.h</ForcedIncludeFiles>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand All @@ -270,6 +277,7 @@
<AdditionalIncludeDirectories>$(SolutionDir)..\src\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<ForcedIncludeFiles>pch.h</ForcedIncludeFiles>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand All @@ -278,7 +286,6 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="CalcException.h" />
<ClInclude Include="CalculatorHistory.h" />
<ClInclude Include="CalculatorManager.h" />
<ClInclude Include="CalculatorResource.h" />
Expand Down
4 changes: 2 additions & 2 deletions src/CalcManager/CalculatorHistory.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#include "pch.h"
#include <cassert>
#include "CalculatorHistory.h"

using namespace std;
Expand Down
2 changes: 1 addition & 1 deletion src/CalcManager/CalculatorManager.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#include "pch.h"
#include <climits> // for UCHAR_MAX
#include "Header Files/CalcEngine.h"
danbelcher-MSFT marked this conversation as resolved.
Show resolved Hide resolved
#include "CalculatorManager.h"
#include "CalculatorResource.h"
Expand Down
7 changes: 6 additions & 1 deletion src/CalcManager/CalculatorVector.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#pragma once

#include <string>
#include <vector>
#include <winerror.h>
#include "Ratpack/CalcErr.h"
danbelcher-MSFT marked this conversation as resolved.
Show resolved Hide resolved
#include <stdexcept> // for std::out_of_range
#include <sal.h> // for SAL

template <typename TType>
class CalculatorVector
Expand Down
2 changes: 1 addition & 1 deletion src/CalcManager/Command.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#pragma once
Expand Down
2 changes: 1 addition & 1 deletion src/CalcManager/ExpressionCommand.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#include "pch.h"
#include <string>
#include "Header Files/CCommand.h"
#include "CalculatorVector.h"
#include "ExpressionCommand.h"
Expand Down
4 changes: 3 additions & 1 deletion src/CalcManager/ExpressionCommandInterface.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#pragma once

#include <memory> // for std::shared_ptr
#include "CalculatorVector.h"
#include "Command.h"

Expand Down
2 changes: 2 additions & 0 deletions src/CalcManager/Header Files/CCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
*
\****************************************************************************/

#pragma once

// The following are the valid id's which can be passed to CCalcEngine::ProcessCommand

#define IDM_HEX 313
Expand Down
5 changes: 5 additions & 0 deletions src/CalcManager/Header Files/EngineStrings.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
* Created: 13-Feb-2008
*
\****************************************************************************/

#pragma once

#include <string>

inline constexpr auto IDS_ERRORS_FIRST = 99;

// This is the list of error strings corresponding to SCERR_DIVIDEZERO..
Expand Down
1 change: 1 addition & 0 deletions src/CalcManager/Header Files/History.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#pragma once

#include <array>
#include "ICalcDisplay.h"
#include "IHistoryDisplay.h"
#include "Rational.h"
Expand Down
1 change: 1 addition & 0 deletions src/CalcManager/Header Files/Number.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#pragma once

#include <vector>
#include "Ratpack/ratpak.h"

namespace CalcEngine
Expand Down
2 changes: 1 addition & 1 deletion src/CalcManager/Ratpack/basex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
// internal base is a power of 2.
//
//-----------------------------------------------------------------------------
#include "pch.h"
#include "ratpak.h"
danbelcher-MSFT marked this conversation as resolved.
Show resolved Hide resolved
#include <cstring> // for memmove

void _mulnumx( PNUMBER *pa, PNUMBER b );

Expand Down
5 changes: 4 additions & 1 deletion src/CalcManager/Ratpack/conv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
//
//---------------------------------------------------------------------------

#include "pch.h"
#include <algorithm>
#include <winerror.h>
#include <sstream>
danbelcher-MSFT marked this conversation as resolved.
Show resolved Hide resolved
#include <cstring> // for memmove, memcpy
#include "ratpak.h"

using namespace std;
Expand Down
1 change: 0 additions & 1 deletion src/CalcManager/Ratpack/exp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
//
//
//-----------------------------------------------------------------------------
#include "pch.h"
#include "ratpak.h"


Expand Down
1 change: 0 additions & 1 deletion src/CalcManager/Ratpack/fact.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// Contains fact(orial) and supporting _gamma functions.
//
//-----------------------------------------------------------------------------
#include "pch.h"
#include "ratpak.h"


Expand Down
1 change: 0 additions & 1 deletion src/CalcManager/Ratpack/itrans.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
// Special Information
//
//-----------------------------------------------------------------------------
#include "pch.h"
#include "ratpak.h"


Expand Down
1 change: 0 additions & 1 deletion src/CalcManager/Ratpack/itransh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
//
//
//-----------------------------------------------------------------------------
#include "pch.h"
#include "ratpak.h"


Expand Down
1 change: 0 additions & 1 deletion src/CalcManager/Ratpack/logic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// Contains routines for and, or, xor, not and other support
//
//---------------------------------------------------------------------------
#include "pch.h"
#include "ratpak.h"

using namespace std;
Expand Down
3 changes: 2 additions & 1 deletion src/CalcManager/Ratpack/num.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
//
//
//-----------------------------------------------------------------------------
#include "pch.h"
#include <list>
danbelcher-MSFT marked this conversation as resolved.
Show resolved Hide resolved
#include <cstring> // for memmove
#include "ratpak.h"

using namespace std;
Expand Down
1 change: 0 additions & 1 deletion src/CalcManager/Ratpack/rat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
//
//-----------------------------------------------------------------------------

#include "pch.h"
#include "ratpak.h"

using namespace std;
Expand Down
4 changes: 4 additions & 0 deletions src/CalcManager/Ratpack/ratpak.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
//
//-----------------------------------------------------------------------------

#include <algorithm>
#include <string>
#include "CalcErr.h"
danbelcher-MSFT marked this conversation as resolved.
Show resolved Hide resolved
#include <cstring> // for memmove
#include <sal.h> // for SAL

static constexpr uint32_t BASEXPWR = 31L;// Internal log2(BASEX)
static constexpr uint32_t BASEX = 0x80000000; // Internal radix used in calculations, hope to raise
Expand Down
6 changes: 4 additions & 2 deletions src/CalcManager/Ratpack/support.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

//----------------------------------------------------------------------------
Expand All @@ -18,7 +18,9 @@
//
//----------------------------------------------------------------------------

#include "pch.h"
#include <string>
danbelcher-MSFT marked this conversation as resolved.
Show resolved Hide resolved
#include <cstring> // for memmove
#include <iostream> // for wostream
#include "ratpak.h"

using namespace std;
Expand Down
1 change: 0 additions & 1 deletion src/CalcManager/Ratpack/trans.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
//
//----------------------------------------------------------------------------

#include "pch.h"
#include "ratpak.h"


Expand Down
1 change: 0 additions & 1 deletion src/CalcManager/Ratpack/transh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
//
//
//-----------------------------------------------------------------------------
#include "pch.h"
#include "ratpak.h"


Expand Down
Loading