Skip to content

Commit

Permalink
Change backslashes in include statements to forward slashes (#8205)
Browse files Browse the repository at this point in the history
Many include statements use forward slashes, while others use backwards
slashes. This is inconsistent formatting. For this reason, I changed the
backward slashes to forward slashes since that is the standard.
  • Loading branch information
N authored Nov 25, 2020
1 parent 274f5a7 commit d09fdd6
Show file tree
Hide file tree
Showing 197 changed files with 374 additions and 373 deletions.
1 change: 1 addition & 0 deletions .github/actions/spell-check/dictionary/apis.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ NCRBUTTONDBLCLK
NOAGGREGATION
NOPROGRESS
NOREDIRECTIONBITMAP
ntprivapi
oaidl
ocidl
otms
Expand Down
4 changes: 2 additions & 2 deletions doc/WIL.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ The primary usages of WIL in our code so far are...

### Smart Pointers ###

Inside [wil\resource.h](https://github.com/microsoft/wil/blob/master/include/wil/resource.h) are smart pointer like classes for many Windows OS resources like file handles, socket handles, process handles, and so on. They're of the form `wil::unique_handle` and call the appropriate/matching OS function (like `CloseHandle()` in this case) when they go out of scope.
Inside [wil/resource.h](https://github.com/microsoft/wil/blob/master/include/wil/resource.h) are smart pointer like classes for many Windows OS resources like file handles, socket handles, process handles, and so on. They're of the form `wil::unique_handle` and call the appropriate/matching OS function (like `CloseHandle()` in this case) when they go out of scope.

Another useful item is `wil::make_unique_nothrow()` which is analogous to `std::make_unique` (except without the exception which might help you integrate with existing exception-free code in the console.) This will return a `wistd::unique_ptr` (vs. a `std::unique_ptr`) which can be used in a similar manner.

### Result Handling ###

To manage the various types of result codes that come back from Windows APIs, the file [wil\result.h](https://github.com/microsoft/wil/blob/master/include/wil/result.h) provides a wealth of macros that can help.
To manage the various types of result codes that come back from Windows APIs, the file [wil/result.h](https://github.com/microsoft/wil/blob/master/include/wil/result.h) provides a wealth of macros that can help.

As an example, the method `DuplicateHandle()` returns a `BOOL` value that is `FALSE` under failure and would like you to `GetLastError()` from the operating system to find out what the actual result code is. In this circumstance, you could use the macro `RETURN_IF_WIN32_BOOL_FALSE` to wrap the call to `DuplicateHandle()` which would automatically handle this pattern for you and return the `HRESULT` equivalent on failure.

Expand Down
4 changes: 2 additions & 2 deletions src/buffer/out/precomp.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ Module Name:
#include <intsafe.h>

// private dependencies
#include "..\inc\operators.hpp"
#include "..\inc\unicode.hpp"
#include "../inc/operators.hpp"
#include "../inc/unicode.hpp"
#pragma warning(pop)

// clang-format on
6 changes: 3 additions & 3 deletions src/buffer/out/ut_textbuffer/precomp.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ Module Name:
#include <intsafe.h>

// private dependencies
#include "..\host\conddkrefs.h"
#include "..\inc\operators.hpp"
#include "..\inc\unicode.hpp"
#include "../host/conddkrefs.h"
#include "../inc/operators.hpp"
#include "../inc/unicode.hpp"
#pragma warning(pop)

// clang-format on
2 changes: 1 addition & 1 deletion src/cascadia/ShellExtension/pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@
#include <shlwapi.h>

#include <wrl.h>
#include <wrl\module.h>
#include <wrl/module.h>
2 changes: 1 addition & 1 deletion src/cascadia/TerminalApp/AppKeyBindings.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "AppKeyBindings.g.h"
#include "ShortcutActionDispatch.h"
#include "..\inc\cppwinrt_utils.h"
#include "../inc/cppwinrt_utils.h"

// fwdecl unittest classes
namespace TerminalAppLocalTests
Expand Down
2 changes: 1 addition & 1 deletion src/cascadia/TerminalApp/EmptyStringVisibilityConverter.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include "EmptyStringVisibilityConverter.g.h"
#include "..\inc\cppwinrt_utils.h"
#include "../inc/cppwinrt_utils.h"

namespace winrt::TerminalApp::implementation
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include "HasNestedCommandsVisibilityConverter.g.h"
#include "..\inc\cppwinrt_utils.h"
#include "../inc/cppwinrt_utils.h"

namespace winrt::TerminalApp::implementation
{
Expand Down
2 changes: 1 addition & 1 deletion src/cascadia/TerminalApp/IconPathConverter.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include "IconPathConverter.g.h"
#include "..\inc\cppwinrt_utils.h"
#include "../inc/cppwinrt_utils.h"

namespace winrt::TerminalApp::implementation
{
Expand Down
2 changes: 1 addition & 1 deletion src/cascadia/TerminalApp/ShortcutActionDispatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#pragma once

#include "ShortcutActionDispatch.g.h"
#include "..\inc\cppwinrt_utils.h"
#include "../inc/cppwinrt_utils.h"

// fwdecl unittest classes
namespace TerminalAppLocalTests
Expand Down
2 changes: 1 addition & 1 deletion src/cascadia/TerminalApp/pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
#include <TraceLoggingProvider.h>
#include <winmeta.h>
TRACELOGGING_DECLARE_PROVIDER(g_hTerminalAppProvider);
#include <telemetry\ProjectTelemetry.h>
#include <telemetry/ProjectTelemetry.h>
#include <TraceLoggingActivity.h>

#include <shellapi.h>
Expand Down
2 changes: 1 addition & 1 deletion src/cascadia/TerminalControl/TermControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <Utils.h>
#include <WinUser.h>
#include <LibraryResources.h>
#include "..\..\types\inc\GlyphWidth.hpp"
#include "../../types/inc/GlyphWidth.hpp"

#include "TermControl.g.cpp"
#include "TermControlAutomationPeer.h"
Expand Down
2 changes: 1 addition & 1 deletion src/cascadia/TerminalControl/TermControlAutomationPeer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "TermControlAutomationPeer.g.cpp"

#include "XamlUiaTextRange.h"
#include "..\types\UiaTracing.h"
#include "../types/UiaTracing.h"

using namespace Microsoft::Console::Types;
using namespace winrt::Windows::UI::Xaml::Automation::Peers;
Expand Down
2 changes: 1 addition & 1 deletion src/cascadia/TerminalSettingsModel/ActionAndArgs.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "ActionAndArgs.g.h"
#include "TerminalWarnings.h"
#include "..\inc\cppwinrt_utils.h"
#include "../inc/cppwinrt_utils.h"

namespace winrt::Microsoft::Terminal::Settings::Model::implementation
{
Expand Down
2 changes: 1 addition & 1 deletion src/cascadia/TerminalSettingsModel/Command.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Author(s):
#include "Command.g.h"
#include "TerminalWarnings.h"
#include "Profile.h"
#include "..\inc\cppwinrt_utils.h"
#include "../inc/cppwinrt_utils.h"
#include "SettingsTypes.h"

// fwdecl unittest classes
Expand Down
2 changes: 1 addition & 1 deletion src/cascadia/TerminalSettingsModel/KeyMapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Author(s):

#include "KeyMapping.g.h"
#include "ActionArgs.h"
#include "..\inc\cppwinrt_utils.h"
#include "../inc/cppwinrt_utils.h"

// fwdecl unittest classes
namespace SettingsModelLocalTests
Expand Down
2 changes: 1 addition & 1 deletion src/cascadia/TerminalSettingsModel/pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include <TraceLoggingProvider.h>
#include <winmeta.h>
TRACELOGGING_DECLARE_PROVIDER(g_hSettingsModelProvider);
#include <telemetry\ProjectTelemetry.h>
#include <telemetry/ProjectTelemetry.h>
#include <TraceLoggingActivity.h>

// JsonCpp
Expand Down
2 changes: 1 addition & 1 deletion src/cascadia/WindowsTerminal/pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Module Name:
#include <TraceLoggingProvider.h>
#include <winmeta.h>
TRACELOGGING_DECLARE_PROVIDER(g_hWindowsTerminalProvider);
#include <telemetry\ProjectTelemetry.h>
#include <telemetry/ProjectTelemetry.h>
#include <TraceLoggingActivity.h>

// For commandline argument processing
Expand Down
2 changes: 1 addition & 1 deletion src/cascadia/WindowsTerminalUniversal/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "pch.h"

#include "winrt\TerminalApp.h"
#include "winrt/TerminalApp.h"

int __stdcall wWinMain(HINSTANCE, HINSTANCE, PWSTR, int)
{
Expand Down
2 changes: 1 addition & 1 deletion src/cascadia/WindowsTerminalUniversal/pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
#include <winrt/Windows.UI.Input.h>
#include <winrt/Windows.UI.Xaml.h>

#include "..\..\inc\LibraryIncludes.h"
#include "../../inc/LibraryIncludes.h"
2 changes: 1 addition & 1 deletion src/host/ApiRoutines.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Revision History:

#pragma once

#include "..\server\IApiRoutines.h"
#include "../server/IApiRoutines.h"

class ApiRoutines : public IApiRoutines
{
Expand Down
2 changes: 1 addition & 1 deletion src/host/CommandListPopup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "dbcs.h"
#include "../types/inc/GlyphWidth.hpp"

#include "..\interactivity\inc\ServiceLocator.hpp"
#include "../interactivity/inc/ServiceLocator.hpp"

static constexpr size_t COMMAND_NUMBER_SIZE = 8; // size of command number buffer

Expand Down
2 changes: 1 addition & 1 deletion src/host/CommandNumberPopup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "cmdline.h"
#include "resource.h"

#include "..\interactivity\inc\ServiceLocator.hpp"
#include "../interactivity/inc/ServiceLocator.hpp"

// 5 digit number for command history
static constexpr size_t COMMAND_NUMBER_LENGTH = 5;
Expand Down
4 changes: 2 additions & 2 deletions src/host/PtySignalInputThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

#include "output.h"
#include "handle.h"
#include "..\interactivity\inc\ServiceLocator.hpp"
#include "..\terminal\adapter\DispatchCommon.hpp"
#include "../interactivity/inc/ServiceLocator.hpp"
#include "../terminal/adapter/DispatchCommon.hpp"

#define PTY_SIGNAL_RESIZE_WINDOW 8u

Expand Down
2 changes: 1 addition & 1 deletion src/host/VtInputThread.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Author(s):
--*/
#pragma once

#include "..\terminal\parser\StateMachine.hpp"
#include "../terminal/parser/StateMachine.hpp"

namespace Microsoft::Console
{
Expand Down
6 changes: 3 additions & 3 deletions src/host/VtIo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

#pragma once

#include "..\inc\VtIoModes.hpp"
#include "..\inc\ITerminalOwner.hpp"
#include "..\renderer\vt\vtrenderer.hpp"
#include "../inc/VtIoModes.hpp"
#include "../inc/ITerminalOwner.hpp"
#include "../renderer/vt/vtrenderer.hpp"
#include "VtInputThread.hpp"
#include "PtySignalInputThread.hpp"

Expand Down
2 changes: 1 addition & 1 deletion src/host/_stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "../types/inc/GlyphWidth.hpp"
#include "../types/inc/Viewport.hpp"

#include "..\interactivity\inc\ServiceLocator.hpp"
#include "../interactivity/inc/ServiceLocator.hpp"

#pragma hdrstop
using namespace Microsoft::Console::Types;
Expand Down
2 changes: 1 addition & 1 deletion src/host/_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Revision History:

#pragma once

#include "..\server\IWaitRoutine.h"
#include "../server/IWaitRoutine.h"
#include "writeData.hpp"

/*++
Expand Down
2 changes: 1 addition & 1 deletion src/host/alias.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include "ApiRoutines.h"

#include "..\interactivity\inc\ServiceLocator.hpp"
#include "../interactivity/inc/ServiceLocator.hpp"

#pragma hdrstop

Expand Down
2 changes: 1 addition & 1 deletion src/host/cmdline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include "ApiRoutines.h"

#include "..\interactivity\inc\ServiceLocator.hpp"
#include "../interactivity/inc/ServiceLocator.hpp"

#pragma hdrstop
using Microsoft::Console::Interactivity::ServiceLocator;
Expand Down
2 changes: 1 addition & 1 deletion src/host/conapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ Revision History:
#include <conmsgl2.h>
#include <conmsgl3.h>

#include "..\server\ApiMessage.h"
#include "../server/ApiMessage.h"
2 changes: 1 addition & 1 deletion src/host/conattrs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Author(s):
--*/

#include "precomp.h"
#include "..\inc\conattrs.hpp"
#include "../inc/conattrs.hpp"
#include <cmath>

// Function Description:
Expand Down
4 changes: 2 additions & 2 deletions src/host/consoleInformation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#include "output.h"
#include "srvinit.h"

#include "..\interactivity\inc\ServiceLocator.hpp"
#include "..\types\inc\convert.hpp"
#include "../interactivity/inc/ServiceLocator.hpp"
#include "../types/inc/convert.hpp"

using Microsoft::Console::Interactivity::ServiceLocator;
using Microsoft::Console::Render::BlinkingState;
Expand Down
2 changes: 1 addition & 1 deletion src/host/directio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "../types/inc/GlyphWidth.hpp"
#include "../types/inc/viewport.hpp"

#include "..\interactivity\inc\ServiceLocator.hpp"
#include "../interactivity/inc/ServiceLocator.hpp"

#pragma hdrstop

Expand Down
2 changes: 1 addition & 1 deletion src/host/exe/resource.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by Host.EXE.rc
#include "..\\resource.h"
#include "..//resource.h"
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
Expand Down
4 changes: 2 additions & 2 deletions src/host/exemain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

#include "ConsoleArguments.hpp"
#include "srvinit.h"
#include "..\server\Entrypoints.h"
#include "..\interactivity\inc\ServiceLocator.hpp"
#include "../server/Entrypoints.h"
#include "../interactivity/inc/ServiceLocator.hpp"

// Define TraceLogging provider
TRACELOGGING_DEFINE_PROVIDER(
Expand Down
2 changes: 1 addition & 1 deletion src/host/ft_host/API_InputTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include <thread>

#include "..\..\interactivity\onecore\SystemConfigurationProvider.hpp"
#include "../../interactivity/onecore/SystemConfigurationProvider.hpp"

// some assumptions have been made on this value. only change it if you have a good reason to.
#define NUMBER_OF_SCENARIO_INPUTS 10
Expand Down
2 changes: 1 addition & 1 deletion src/host/ft_host/API_OutputTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include "precomp.h"

#include "..\types\inc\viewport.hpp"
#include "../types/inc/viewport.hpp"

#include <thread>
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion src/host/ft_host/Common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Revision History:

#pragma once

#include "..\..\inc\consoletaeftemplates.hpp"
#include "../../inc/consoletaeftemplates.hpp"

class Common
{
Expand Down
2 changes: 1 addition & 1 deletion src/host/ft_host/Message_KeyPressTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include "precomp.h"

#include "..\..\inc\consoletaeftemplates.hpp"
#include "../../inc/consoletaeftemplates.hpp"

#include <memory>
#include <utility>
Expand Down
2 changes: 1 addition & 1 deletion src/host/ft_host/OneCoreDelay.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Revision History:

#pragma once

#include "..\..\inc\consoletaeftemplates.hpp"
#include "../../inc/consoletaeftemplates.hpp"

namespace OneCoreDelay
{
Expand Down
2 changes: 1 addition & 1 deletion src/host/ft_uia/Common/NativeMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ public static extern bool WriteConsoleOutputCharacter(

/// <summary>
/// The definitions within this file match the winconp.h file that is generated from wincon.w
/// Please see \windows\published\main\wincon.w
/// Please see /windows/published/main/wincon.w
/// </summary>
public static class WinConP
{
Expand Down
2 changes: 1 addition & 1 deletion src/host/getset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include "ApiRoutines.h"

#include "..\interactivity\inc\ServiceLocator.hpp"
#include "../interactivity/inc/ServiceLocator.hpp"

#pragma hdrstop

Expand Down
Loading

0 comments on commit d09fdd6

Please sign in to comment.