Build with clang-cl
This commit is contained in:
parent
215e5ac8e5
commit
1f1f4e4b90
|
@ -114,15 +114,6 @@
|
||||||
#define HAVE_AVX512
|
#define HAVE_AVX512
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_CPUID) && \
|
|
||||||
CLANG_PREREQ(3, 8) && \
|
|
||||||
__has_attribute(target) && \
|
|
||||||
(!defined(_MSC_VER) || defined(__AVX2__)) && \
|
|
||||||
(!defined(__apple_build_version__) || __apple_build_version__ >= 8000000)
|
|
||||||
#define HAVE_AVX2
|
|
||||||
#define HAVE_AVX512
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -47,9 +47,9 @@ enum class DelimiterClass
|
||||||
class CharRow final
|
class CharRow final
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using glyph_type = typename wchar_t;
|
using glyph_type = wchar_t;
|
||||||
using value_type = typename CharRowCell;
|
using value_type = CharRowCell;
|
||||||
using reference = typename CharRowCellReference;
|
using reference = CharRowCellReference;
|
||||||
|
|
||||||
CharRow(CharRowCell* buffer, size_t rowWidth, ROW* const pParent) noexcept;
|
CharRow(CharRowCell* buffer, size_t rowWidth, ROW* const pParent) noexcept;
|
||||||
|
|
||||||
|
|
|
@ -68,9 +68,8 @@ OutputCellIterator::OutputCellIterator(const wchar_t& wch, const TextAttribute&
|
||||||
// - fillLimit - How many times to allow this value to be viewed/filled. Infinite if 0.
|
// - fillLimit - How many times to allow this value to be viewed/filled. Infinite if 0.
|
||||||
OutputCellIterator::OutputCellIterator(const CHAR_INFO& charInfo, const size_t fillLimit) noexcept :
|
OutputCellIterator::OutputCellIterator(const CHAR_INFO& charInfo, const size_t fillLimit) noexcept :
|
||||||
_mode(Mode::Fill),
|
_mode(Mode::Fill),
|
||||||
_currentView(s_GenerateView(charInfo)),
|
|
||||||
_run(),
|
|
||||||
_attr(InvalidTextAttribute),
|
_attr(InvalidTextAttribute),
|
||||||
|
_currentView(s_GenerateView(charInfo)),
|
||||||
_pos(0),
|
_pos(0),
|
||||||
_distance(0),
|
_distance(0),
|
||||||
_fillLimit(fillLimit)
|
_fillLimit(fillLimit)
|
||||||
|
@ -83,9 +82,9 @@ OutputCellIterator::OutputCellIterator(const CHAR_INFO& charInfo, const size_t f
|
||||||
// - utf16Text - UTF-16 text range
|
// - utf16Text - UTF-16 text range
|
||||||
OutputCellIterator::OutputCellIterator(const std::wstring_view utf16Text) noexcept :
|
OutputCellIterator::OutputCellIterator(const std::wstring_view utf16Text) noexcept :
|
||||||
_mode(Mode::LooseTextOnly),
|
_mode(Mode::LooseTextOnly),
|
||||||
_currentView(s_GenerateView(utf16Text)),
|
|
||||||
_run(utf16Text),
|
_run(utf16Text),
|
||||||
_attr(InvalidTextAttribute),
|
_attr(InvalidTextAttribute),
|
||||||
|
_currentView(s_GenerateView(utf16Text)),
|
||||||
_pos(0),
|
_pos(0),
|
||||||
_distance(0),
|
_distance(0),
|
||||||
_fillLimit(0)
|
_fillLimit(0)
|
||||||
|
@ -99,11 +98,11 @@ OutputCellIterator::OutputCellIterator(const std::wstring_view utf16Text) noexce
|
||||||
// - attribute - Color to apply over the entire range
|
// - attribute - Color to apply over the entire range
|
||||||
OutputCellIterator::OutputCellIterator(const std::wstring_view utf16Text, const TextAttribute attribute) noexcept :
|
OutputCellIterator::OutputCellIterator(const std::wstring_view utf16Text, const TextAttribute attribute) noexcept :
|
||||||
_mode(Mode::Loose),
|
_mode(Mode::Loose),
|
||||||
_currentView(s_GenerateView(utf16Text, attribute)),
|
|
||||||
_run(utf16Text),
|
_run(utf16Text),
|
||||||
_attr(attribute),
|
_attr(attribute),
|
||||||
_distance(0),
|
_currentView(s_GenerateView(utf16Text, attribute)),
|
||||||
_pos(0),
|
_pos(0),
|
||||||
|
_distance(0),
|
||||||
_fillLimit(0)
|
_fillLimit(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -114,11 +113,11 @@ OutputCellIterator::OutputCellIterator(const std::wstring_view utf16Text, const
|
||||||
// - legacyAttrs - One legacy color item per cell
|
// - legacyAttrs - One legacy color item per cell
|
||||||
OutputCellIterator::OutputCellIterator(const gsl::span<const WORD> legacyAttrs) noexcept :
|
OutputCellIterator::OutputCellIterator(const gsl::span<const WORD> legacyAttrs) noexcept :
|
||||||
_mode(Mode::LegacyAttr),
|
_mode(Mode::LegacyAttr),
|
||||||
_currentView(s_GenerateViewLegacyAttr(til::at(legacyAttrs, 0))),
|
|
||||||
_run(legacyAttrs),
|
_run(legacyAttrs),
|
||||||
_attr(InvalidTextAttribute),
|
_attr(InvalidTextAttribute),
|
||||||
_distance(0),
|
_currentView(s_GenerateViewLegacyAttr(til::at(legacyAttrs, 0))),
|
||||||
_pos(0),
|
_pos(0),
|
||||||
|
_distance(0),
|
||||||
_fillLimit(0)
|
_fillLimit(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -129,11 +128,11 @@ OutputCellIterator::OutputCellIterator(const gsl::span<const WORD> legacyAttrs)
|
||||||
// - charInfos - Multiple cell with unicode text and legacy color data.
|
// - charInfos - Multiple cell with unicode text and legacy color data.
|
||||||
OutputCellIterator::OutputCellIterator(const gsl::span<const CHAR_INFO> charInfos) noexcept :
|
OutputCellIterator::OutputCellIterator(const gsl::span<const CHAR_INFO> charInfos) noexcept :
|
||||||
_mode(Mode::CharInfo),
|
_mode(Mode::CharInfo),
|
||||||
_currentView(s_GenerateView(til::at(charInfos, 0))),
|
|
||||||
_run(charInfos),
|
_run(charInfos),
|
||||||
_attr(InvalidTextAttribute),
|
_attr(InvalidTextAttribute),
|
||||||
_distance(0),
|
_currentView(s_GenerateView(til::at(charInfos, 0))),
|
||||||
_pos(0),
|
_pos(0),
|
||||||
|
_distance(0),
|
||||||
_fillLimit(0)
|
_fillLimit(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -144,11 +143,11 @@ OutputCellIterator::OutputCellIterator(const gsl::span<const CHAR_INFO> charInfo
|
||||||
// - cells - Multiple cells in a run
|
// - cells - Multiple cells in a run
|
||||||
OutputCellIterator::OutputCellIterator(const gsl::span<const OutputCell> cells) :
|
OutputCellIterator::OutputCellIterator(const gsl::span<const OutputCell> cells) :
|
||||||
_mode(Mode::Cell),
|
_mode(Mode::Cell),
|
||||||
_currentView(s_GenerateView(til::at(cells, 0))),
|
|
||||||
_run(cells),
|
_run(cells),
|
||||||
_attr(InvalidTextAttribute),
|
_attr(InvalidTextAttribute),
|
||||||
_distance(0),
|
_currentView(s_GenerateView(til::at(cells, 0))),
|
||||||
_pos(0),
|
_pos(0),
|
||||||
|
_distance(0),
|
||||||
_fillLimit(0)
|
_fillLimit(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ OutputCellView::OutputCellView(const std::wstring_view view,
|
||||||
// - Reference to UTF-16 character data
|
// - Reference to UTF-16 character data
|
||||||
// C26445 - suppressed to enable the `TextBufferTextIterator::operator->` method which needs a non-temporary memory location holding the wstring_view.
|
// C26445 - suppressed to enable the `TextBufferTextIterator::operator->` method which needs a non-temporary memory location holding the wstring_view.
|
||||||
// TODO: GH 2681 - remove this suppression by reconciling the probably bad design of the iterators that leads to this being required.
|
// TODO: GH 2681 - remove this suppression by reconciling the probably bad design of the iterators that leads to this being required.
|
||||||
[[gsl::suppress(26445)]] const std::wstring_view& OutputCellView::Chars() const noexcept
|
[[gsl::suppress("26445")]] const std::wstring_view& OutputCellView::Chars() const noexcept
|
||||||
{
|
{
|
||||||
static constexpr std::wstring_view emptyBufferCell{ L"\0", 1 };
|
static constexpr std::wstring_view emptyBufferCell{ L"\0", 1 };
|
||||||
static constexpr std::wstring_view spaceBufferCell{ L" ", 1 };
|
static constexpr std::wstring_view spaceBufferCell{ L" ", 1 };
|
||||||
|
|
|
@ -30,21 +30,12 @@ Revision History:
|
||||||
class TextAttribute final
|
class TextAttribute final
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
constexpr TextAttribute() noexcept :
|
constexpr TextAttribute() noexcept = default;
|
||||||
_wAttrLegacy{ 0 },
|
|
||||||
_foreground{},
|
|
||||||
_background{},
|
|
||||||
_extendedAttrs{ ExtendedAttributes::Normal },
|
|
||||||
_hyperlinkId{ 0 }
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
explicit constexpr TextAttribute(const WORD wLegacyAttr) noexcept :
|
explicit TextAttribute(const WORD wLegacyAttr) noexcept :
|
||||||
_wAttrLegacy{ gsl::narrow_cast<WORD>(wLegacyAttr & META_ATTRS) },
|
_wAttrLegacy{ gsl::narrow_cast<WORD>(wLegacyAttr & META_ATTRS) },
|
||||||
_foreground{ s_LegacyIndexOrDefault(wLegacyAttr & FG_ATTRS, s_legacyDefaultForeground) },
|
_foreground{ s_LegacyIndexOrDefault(wLegacyAttr & FG_ATTRS, s_legacyDefaultForeground) },
|
||||||
_background{ s_LegacyIndexOrDefault((wLegacyAttr & BG_ATTRS) >> 4, s_legacyDefaultBackground) },
|
_background{ s_LegacyIndexOrDefault((wLegacyAttr & BG_ATTRS) >> 4, s_legacyDefaultBackground) }
|
||||||
_extendedAttrs{ ExtendedAttributes::Normal },
|
|
||||||
_hyperlinkId{ 0 }
|
|
||||||
{
|
{
|
||||||
// If we're given lead/trailing byte information with the legacy color, strip it.
|
// If we're given lead/trailing byte information with the legacy color, strip it.
|
||||||
WI_ClearAllFlags(_wAttrLegacy, COMMON_LVB_SBCSDBCS);
|
WI_ClearAllFlags(_wAttrLegacy, COMMON_LVB_SBCSDBCS);
|
||||||
|
@ -52,11 +43,8 @@ public:
|
||||||
|
|
||||||
constexpr TextAttribute(const COLORREF rgbForeground,
|
constexpr TextAttribute(const COLORREF rgbForeground,
|
||||||
const COLORREF rgbBackground) noexcept :
|
const COLORREF rgbBackground) noexcept :
|
||||||
_wAttrLegacy{ 0 },
|
|
||||||
_foreground{ rgbForeground },
|
_foreground{ rgbForeground },
|
||||||
_background{ rgbBackground },
|
_background{ rgbBackground }
|
||||||
_extendedAttrs{ ExtendedAttributes::Normal },
|
|
||||||
_hyperlinkId{ 0 }
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -170,11 +158,11 @@ private:
|
||||||
static BYTE s_legacyDefaultForeground;
|
static BYTE s_legacyDefaultForeground;
|
||||||
static BYTE s_legacyDefaultBackground;
|
static BYTE s_legacyDefaultBackground;
|
||||||
|
|
||||||
uint16_t _wAttrLegacy; // sizeof: 2, alignof: 2
|
uint16_t _wAttrLegacy = 0; // sizeof: 2, alignof: 2
|
||||||
uint16_t _hyperlinkId; // sizeof: 2, alignof: 2
|
uint16_t _hyperlinkId = 0; // sizeof: 2, alignof: 2
|
||||||
TextColor _foreground; // sizeof: 4, alignof: 1
|
TextColor _foreground; // sizeof: 4, alignof: 1
|
||||||
TextColor _background; // sizeof: 4, alignof: 1
|
TextColor _background; // sizeof: 4, alignof: 1
|
||||||
ExtendedAttributes _extendedAttrs; // sizeof: 1, alignof: 1
|
ExtendedAttributes _extendedAttrs = ExtendedAttributes::Normal; // sizeof: 1, alignof: 1
|
||||||
|
|
||||||
#ifdef UNIT_TESTING
|
#ifdef UNIT_TESTING
|
||||||
friend class TextBufferTests;
|
friend class TextBufferTests;
|
||||||
|
|
|
@ -49,26 +49,26 @@ struct TextColor
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
constexpr TextColor() noexcept :
|
constexpr TextColor() noexcept :
|
||||||
_meta{ ColorType::IsDefault },
|
|
||||||
_red{ 0 },
|
_red{ 0 },
|
||||||
_green{ 0 },
|
_green{ 0 },
|
||||||
_blue{ 0 }
|
_blue{ 0 },
|
||||||
|
_meta{ ColorType::IsDefault }
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr TextColor(const BYTE index, const bool isIndex256) noexcept :
|
constexpr TextColor(const BYTE index, const bool isIndex256) noexcept :
|
||||||
_meta{ isIndex256 ? ColorType::IsIndex256 : ColorType::IsIndex16 },
|
|
||||||
_index{ index },
|
_index{ index },
|
||||||
_green{ 0 },
|
_green{ 0 },
|
||||||
_blue{ 0 }
|
_blue{ 0 },
|
||||||
|
_meta{ isIndex256 ? ColorType::IsIndex256 : ColorType::IsIndex16 }
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr TextColor(const COLORREF rgb) noexcept :
|
constexpr TextColor(const COLORREF rgb) noexcept :
|
||||||
_meta{ ColorType::IsRgb },
|
|
||||||
_red{ GetRValue(rgb) },
|
_red{ GetRValue(rgb) },
|
||||||
_green{ GetGValue(rgb) },
|
_green{ GetGValue(rgb) },
|
||||||
_blue{ GetBValue(rgb) }
|
_blue{ GetBValue(rgb) },
|
||||||
|
_meta{ ColorType::IsRgb }
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,6 @@ Cursor::Cursor(const ULONG ulSize, TextBuffer& parentBuffer) noexcept :
|
||||||
_fHaveDeferredCursorRedraw(false),
|
_fHaveDeferredCursorRedraw(false),
|
||||||
_ulSize(ulSize),
|
_ulSize(ulSize),
|
||||||
_cursorType(CursorType::Legacy),
|
_cursorType(CursorType::Legacy),
|
||||||
_fUseColor(false),
|
|
||||||
_color(s_InvertCursorColor)
|
_color(s_InvertCursorColor)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,6 +117,5 @@ private:
|
||||||
void _RedrawCursorAlways() noexcept;
|
void _RedrawCursorAlways() noexcept;
|
||||||
|
|
||||||
CursorType _cursorType;
|
CursorType _cursorType;
|
||||||
bool _fUseColor;
|
|
||||||
COLORREF _color;
|
COLORREF _color;
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,6 +9,15 @@
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(SolutionDir)src\common.build.pre.props" />
|
<Import Project="$(SolutionDir)src\common.build.pre.props" />
|
||||||
|
<PropertyGroup Label="Configuration">
|
||||||
|
<PlatformToolset>ClangCL</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup>
|
||||||
|
<ClCompile>
|
||||||
|
<AdditionalOptions>-O3 -Wno-microsoft-include -Wno-c++11-narrowing %(AdditionalOptions)</AdditionalOptions>
|
||||||
|
<LanguageStandard>stdcpplatest</LanguageStandard>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\AttrRow.cpp" />
|
<ClCompile Include="..\AttrRow.cpp" />
|
||||||
<ClCompile Include="..\cursor.cpp" />
|
<ClCompile Include="..\cursor.cpp" />
|
||||||
|
|
|
@ -55,7 +55,7 @@ filling in the last row, and updating the screen.
|
||||||
#include "Row.hpp"
|
#include "Row.hpp"
|
||||||
#include "TextAttribute.hpp"
|
#include "TextAttribute.hpp"
|
||||||
#include "UnicodeStorage.hpp"
|
#include "UnicodeStorage.hpp"
|
||||||
#include "../types/inc/Viewport.hpp"
|
#include "../types/inc/viewport.hpp"
|
||||||
|
|
||||||
#include "../buffer/out/textBufferCellIterator.hpp"
|
#include "../buffer/out/textBufferCellIterator.hpp"
|
||||||
#include "../buffer/out/textBufferTextIterator.hpp"
|
#include "../buffer/out/textBufferTextIterator.hpp"
|
||||||
|
|
|
@ -31,13 +31,13 @@ TextBufferCellIterator::TextBufferCellIterator(const TextBuffer& buffer, COORD p
|
||||||
// - pos - Starting position to retrieve text data from (within screen buffer bounds)
|
// - pos - Starting position to retrieve text data from (within screen buffer bounds)
|
||||||
// - limits - Viewport limits to restrict the iterator within the buffer bounds (smaller than the buffer itself)
|
// - limits - Viewport limits to restrict the iterator within the buffer bounds (smaller than the buffer itself)
|
||||||
TextBufferCellIterator::TextBufferCellIterator(const TextBuffer& buffer, COORD pos, const Viewport limits) :
|
TextBufferCellIterator::TextBufferCellIterator(const TextBuffer& buffer, COORD pos, const Viewport limits) :
|
||||||
_buffer(buffer),
|
_view({}, {}, {}, TextAttributeBehavior::Stored),
|
||||||
_pos(pos),
|
|
||||||
_pRow(s_GetRow(buffer, pos)),
|
_pRow(s_GetRow(buffer, pos)),
|
||||||
|
_attrIter(s_GetRow(buffer, pos)->GetAttrRow().cbegin()),
|
||||||
|
_buffer(buffer),
|
||||||
_bounds(limits),
|
_bounds(limits),
|
||||||
_exceeded(false),
|
_exceeded(false),
|
||||||
_view({}, {}, {}, TextAttributeBehavior::Stored),
|
_pos(pos)
|
||||||
_attrIter(s_GetRow(buffer, pos)->GetAttrRow().cbegin())
|
|
||||||
{
|
{
|
||||||
// Throw if the bounds rectangle is not limited to the inside of the given buffer.
|
// Throw if the bounds rectangle is not limited to the inside of the given buffer.
|
||||||
THROW_HR_IF(E_INVALIDARG, !buffer.GetSize().IsInBounds(limits));
|
THROW_HR_IF(E_INVALIDARG, !buffer.GetSize().IsInBounds(limits));
|
||||||
|
|
|
@ -26,7 +26,7 @@ TextBufferTextIterator::TextBufferTextIterator(const TextBufferCellIterator& cel
|
||||||
// Return Value:
|
// Return Value:
|
||||||
// - Read only UTF-16 text data
|
// - Read only UTF-16 text data
|
||||||
// TODO GH 2682, fix design so this doesn't have to be suppressed.
|
// TODO GH 2682, fix design so this doesn't have to be suppressed.
|
||||||
[[gsl::suppress(26434)]] const std::wstring_view TextBufferTextIterator::operator*() const noexcept
|
[[gsl::suppress("26434")]] const std::wstring_view TextBufferTextIterator::operator*() const noexcept
|
||||||
{
|
{
|
||||||
return _view.Chars();
|
return _view.Chars();
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ TextBufferTextIterator::TextBufferTextIterator(const TextBufferCellIterator& cel
|
||||||
// Return Value:
|
// Return Value:
|
||||||
// - Read only UTF-16 text data
|
// - Read only UTF-16 text data
|
||||||
// TODO GH 2682, fix design so this doesn't have to be suppressed.
|
// TODO GH 2682, fix design so this doesn't have to be suppressed.
|
||||||
[[gsl::suppress(26434)]] const std::wstring_view* TextBufferTextIterator::operator->() const noexcept
|
[[gsl::suppress("26434")]] const std::wstring_view* TextBufferTextIterator::operator->() const noexcept
|
||||||
{
|
{
|
||||||
return &_view.Chars();
|
return &_view.Chars();
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,10 +92,10 @@
|
||||||
<ItemDefinitionGroup>
|
<ItemDefinitionGroup>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
<WarningLevel>Level4</WarningLevel>
|
<WarningLevel>Level1</WarningLevel>
|
||||||
<TreatSpecificWarningsAsErrors>4189;4100;4242;4389;4244</TreatSpecificWarningsAsErrors>
|
<TreatSpecificWarningsAsErrors>4189;4100;4242;4389;4244</TreatSpecificWarningsAsErrors>
|
||||||
<!--<WarningLevel>EnableAllWarnings</WarningLevel>-->
|
<!--<WarningLevel>EnableAllWarnings</WarningLevel>-->
|
||||||
<TreatWarningAsError>true</TreatWarningAsError>
|
<TreatWarningAsError>false</TreatWarningAsError>
|
||||||
<!--
|
<!--
|
||||||
C4103: alignment changed after including header, may be due to missing #pragma pack(pop)
|
C4103: alignment changed after including header, may be due to missing #pragma pack(pop)
|
||||||
Caused by a regression in VS 16.10, it detects the use of /pshpack[1248].h/ in system headers.
|
Caused by a regression in VS 16.10, it detects the use of /pshpack[1248].h/ in system headers.
|
||||||
|
|
|
@ -56,7 +56,6 @@ Abstract:
|
||||||
#include <intsafe.h>
|
#include <intsafe.h>
|
||||||
#pragma prefast(pop)
|
#pragma prefast(pop)
|
||||||
#include <strsafe.h>
|
#include <strsafe.h>
|
||||||
#include <cwchar>
|
|
||||||
#include <mmsystem.h>
|
#include <mmsystem.h>
|
||||||
#include "utils.hpp"
|
#include "utils.hpp"
|
||||||
|
|
||||||
|
|
|
@ -23,12 +23,16 @@ typedef NTSTATUS *PNTSTATUS;
|
||||||
|
|
||||||
// End From ntdef.h
|
// End From ntdef.h
|
||||||
|
|
||||||
#define INLINE_NTSTATUS_FROM_WIN32 1 // Must use inline NTSTATUS or it will call the wrapped function twice.
|
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
#pragma warning(disable:4430) // Must disable 4430 "default int" warning for C++ because ntstatus.h is inflexible SDK definition.
|
#pragma warning(disable:4430) // Must disable 4430 "default int" warning for C++ because ntstatus.h is inflexible SDK definition.
|
||||||
#include <ntstatus.h>
|
#include <ntstatus.h>
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
|
|
||||||
|
#undef NTSTATUS_FROM_WIN32
|
||||||
|
inline long NTSTATUS_FROM_WIN32(long x) {
|
||||||
|
return x <= 0 ? (NTSTATUS)x : (NTSTATUS) (((x) & 0x0000FFFF) | (FACILITY_NTWIN32 << 16) | ERROR_SEVERITY_ERROR);
|
||||||
|
}
|
||||||
|
|
||||||
#include <initguid.h>
|
#include <initguid.h>
|
||||||
|
|
||||||
#ifdef EXTERNAL_BUILD
|
#ifdef EXTERNAL_BUILD
|
||||||
|
|
|
@ -51,8 +51,8 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
// WIL
|
// WIL
|
||||||
#include <wil/Common.h>
|
#include <wil/common.h>
|
||||||
#include <wil/Result.h>
|
#include <wil/result.h>
|
||||||
#include <wil/nt_result_macros.h>
|
#include <wil/nt_result_macros.h>
|
||||||
#include <wil/resource.h>
|
#include <wil/resource.h>
|
||||||
#include <wil/wistd_memory.h>
|
#include <wil/wistd_memory.h>
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
#include <gsl/span_ext>
|
#include <gsl/span_ext>
|
||||||
|
|
||||||
// CppCoreCheck
|
// CppCoreCheck
|
||||||
#include <CppCoreCheck/Warnings.h>
|
#include <CppCoreCheck/warnings.h>
|
||||||
|
|
||||||
// Chromium Numerics (safe math)
|
// Chromium Numerics (safe math)
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
|
|
|
@ -15,16 +15,16 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
constexpr _rectangle_const_iterator(point topLeft, point bottomRight) :
|
constexpr _rectangle_const_iterator(point topLeft, point bottomRight) :
|
||||||
|
_current(topLeft),
|
||||||
_topLeft(topLeft),
|
_topLeft(topLeft),
|
||||||
_bottomRight(bottomRight),
|
_bottomRight(bottomRight)
|
||||||
_current(topLeft)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr _rectangle_const_iterator(point topLeft, point bottomRight, point start) :
|
constexpr _rectangle_const_iterator(point topLeft, point bottomRight, point start) :
|
||||||
|
_current(start),
|
||||||
_topLeft(topLeft),
|
_topLeft(topLeft),
|
||||||
_bottomRight(bottomRight),
|
_bottomRight(bottomRight)
|
||||||
_current(start)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
|
||||||
public:
|
public:
|
||||||
template<typename... Args>
|
template<typename... Args>
|
||||||
constexpr explicit presorted_static_map(const Args&... args) noexcept :
|
constexpr explicit presorted_static_map(const Args&... args) noexcept :
|
||||||
static_map{ args... } {};
|
static_map<K, V, Compare, N, details::presorted_input_t>{ args... } {};
|
||||||
};
|
};
|
||||||
|
|
||||||
// this is a deduction guide that ensures two things:
|
// this is a deduction guide that ensures two things:
|
||||||
|
|
|
@ -34,9 +34,6 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
|
||||||
template<typename T, typename Traits>
|
template<typename T, typename Traits>
|
||||||
constexpr bool starts_with(const std::basic_string_view<T, Traits>& str, const std::basic_string_view<T, Traits>& prefix) noexcept
|
constexpr bool starts_with(const std::basic_string_view<T, Traits>& str, const std::basic_string_view<T, Traits>& prefix) noexcept
|
||||||
{
|
{
|
||||||
#ifdef __cpp_lib_starts_ends_with
|
|
||||||
#error This code can be replaced in C++20, which natively supports .starts_with().
|
|
||||||
#endif
|
|
||||||
return str.size() >= prefix.size() && Traits::compare(str.data(), prefix.data(), prefix.size()) == 0;
|
return str.size() >= prefix.size() && Traits::compare(str.data(), prefix.data(), prefix.size()) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,9 +51,6 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
|
||||||
template<typename T, typename Traits>
|
template<typename T, typename Traits>
|
||||||
constexpr bool ends_with(const std::basic_string_view<T, Traits>& str, const std::basic_string_view<T, Traits>& prefix) noexcept
|
constexpr bool ends_with(const std::basic_string_view<T, Traits>& str, const std::basic_string_view<T, Traits>& prefix) noexcept
|
||||||
{
|
{
|
||||||
#ifdef __cpp_lib_ends_ends_with
|
|
||||||
#error This code can be replaced in C++20, which natively supports .ends_with().
|
|
||||||
#endif
|
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
#pragma warning(disable : 26481) // Don't use pointer arithmetic. Use span instead (bounds.1).
|
#pragma warning(disable : 26481) // Don't use pointer arithmetic. Use span instead (bounds.1).
|
||||||
return str.size() >= prefix.size() && Traits::compare(str.data() + (str.size() - prefix.size()), prefix.data(), prefix.size()) == 0;
|
return str.size() >= prefix.size() && Traits::compare(str.data() + (str.size() - prefix.size()), prefix.data(), prefix.size()) == 0;
|
||||||
|
|
|
@ -17,12 +17,16 @@ typedef NTSTATUS* PNTSTATUS;
|
||||||
/*lint -restore */ // Resume checking for different typedefs.
|
/*lint -restore */ // Resume checking for different typedefs.
|
||||||
#define NT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0)
|
#define NT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0)
|
||||||
|
|
||||||
#define INLINE_NTSTATUS_FROM_WIN32 1 // Must use inline NTSTATUS or it will call the wrapped function twice.
|
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
#pragma warning(disable : 4430) // Must disable 4430 "default int" warning for C++ because ntstatus.h is inflexible SDK definition.
|
#pragma warning(disable : 4430) // Must disable 4430 "default int" warning for C++ because ntstatus.h is inflexible SDK definition.
|
||||||
#include <ntstatus.h>
|
#include <ntstatus.h>
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
|
|
||||||
|
#undef NTSTATUS_FROM_WIN32
|
||||||
|
inline long NTSTATUS_FROM_WIN32(long x) {
|
||||||
|
return x <= 0 ? (NTSTATUS)x : (NTSTATUS) (((x) & 0x0000FFFF) | (FACILITY_NTWIN32 << 16) | ERROR_SEVERITY_ERROR);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef EXTERNAL_BUILD
|
#ifdef EXTERNAL_BUILD
|
||||||
#include <ShlObj.h>
|
#include <ShlObj.h>
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -9,6 +9,15 @@
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(SolutionDir)src\common.build.pre.props" />
|
<Import Project="$(SolutionDir)src\common.build.pre.props" />
|
||||||
|
<PropertyGroup Label="Configuration">
|
||||||
|
<PlatformToolset>ClangCL</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup>
|
||||||
|
<ClCompile>
|
||||||
|
<AdditionalOptions>-O3 -Wno-microsoft-include -Wno-c++11-narrowing %(AdditionalOptions)</AdditionalOptions>
|
||||||
|
<LanguageStandard>stdcpplatest</LanguageStandard>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="pch.cpp">
|
<ClCompile Include="pch.cpp">
|
||||||
<PrecompiledHeader>Create</PrecompiledHeader>
|
<PrecompiledHeader>Create</PrecompiledHeader>
|
||||||
|
|
|
@ -9,6 +9,15 @@
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(SolutionDir)src\common.build.pre.props" />
|
<Import Project="$(SolutionDir)src\common.build.pre.props" />
|
||||||
|
<PropertyGroup Label="Configuration">
|
||||||
|
<PlatformToolset>ClangCL</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup>
|
||||||
|
<ClCompile>
|
||||||
|
<AdditionalOptions>-O3 -Wno-microsoft-include -Wno-c++11-narrowing %(AdditionalOptions)</AdditionalOptions>
|
||||||
|
<LanguageStandard>stdcpplatest</LanguageStandard>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\BlinkingState.cpp" />
|
<ClCompile Include="..\BlinkingState.cpp" />
|
||||||
<ClCompile Include="..\Cluster.cpp" />
|
<ClCompile Include="..\Cluster.cpp" />
|
||||||
|
|
|
@ -1002,7 +1002,7 @@ try
|
||||||
{
|
{
|
||||||
// Enable shader effects if the path isn't empty. Otherwise leave it untouched.
|
// Enable shader effects if the path isn't empty. Otherwise leave it untouched.
|
||||||
_terminalEffectsEnabled = value.empty() ? _terminalEffectsEnabled : true;
|
_terminalEffectsEnabled = value.empty() ? _terminalEffectsEnabled : true;
|
||||||
_pixelShaderPath = { value };
|
_pixelShaderPath = value;
|
||||||
_recreateDeviceRequested = true;
|
_recreateDeviceRequested = true;
|
||||||
LOG_IF_FAILED(InvalidateAll());
|
LOG_IF_FAILED(InvalidateAll());
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,15 @@
|
||||||
</Midl>
|
</Midl>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<Import Project="$(SolutionDir)src\common.build.pre.props" />
|
<Import Project="$(SolutionDir)src\common.build.pre.props" />
|
||||||
|
<PropertyGroup Label="Configuration">
|
||||||
|
<PlatformToolset>ClangCL</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup>
|
||||||
|
<ClCompile>
|
||||||
|
<AdditionalOptions>-O3 -Wno-microsoft-include -Wno-c++11-narrowing %(AdditionalOptions)</AdditionalOptions>
|
||||||
|
<LanguageStandard>stdcpplatest</LanguageStandard>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\BoxDrawingEffect.cpp" />
|
<ClCompile Include="..\BoxDrawingEffect.cpp" />
|
||||||
<ClCompile Include="..\CustomTextLayout.cpp" />
|
<ClCompile Include="..\CustomTextLayout.cpp" />
|
||||||
|
|
|
@ -6,9 +6,18 @@
|
||||||
<RootNamespace>vt</RootNamespace>
|
<RootNamespace>vt</RootNamespace>
|
||||||
<ProjectName>RendererVt</ProjectName>
|
<ProjectName>RendererVt</ProjectName>
|
||||||
<TargetName>ConRenderVt</TargetName>
|
<TargetName>ConRenderVt</TargetName>
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(SolutionDir)src\common.build.pre.props"/>
|
<Import Project="$(SolutionDir)src\common.build.pre.props"/>
|
||||||
|
<PropertyGroup Label="Configuration">
|
||||||
|
<PlatformToolset>ClangCL</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup>
|
||||||
|
<ClCompile>
|
||||||
|
<AdditionalOptions>-O3 -Wno-microsoft-include -Wno-c++11-narrowing %(AdditionalOptions)</AdditionalOptions>
|
||||||
|
<LanguageStandard>stdcpplatest</LanguageStandard>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
<!-- DONT ADD NEW FILES HERE, ADD THEM TO vt-renderer-common.vcxitems -->
|
<!-- DONT ADD NEW FILES HERE, ADD THEM TO vt-renderer-common.vcxitems -->
|
||||||
<Import Project="$(SolutionDir)src\renderer\vt\vt-renderer-common.vcxitems" />
|
<Import Project="$(SolutionDir)src\renderer\vt\vt-renderer-common.vcxitems" />
|
||||||
<!-- Careful reordering these. Some default props (contained in these files) are order sensitive. -->
|
<!-- Careful reordering these. Some default props (contained in these files) are order sensitive. -->
|
||||||
|
|
|
@ -9,6 +9,15 @@
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(SolutionDir)src\common.build.pre.props" />
|
<Import Project="$(SolutionDir)src\common.build.pre.props" />
|
||||||
|
<PropertyGroup Label="Configuration">
|
||||||
|
<PlatformToolset>ClangCL</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup>
|
||||||
|
<ClCompile>
|
||||||
|
<AdditionalOptions>-O3 -Wno-microsoft-include -Wno-c++11-narrowing %(AdditionalOptions)</AdditionalOptions>
|
||||||
|
<LanguageStandard>stdcpplatest</LanguageStandard>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\ApiDispatchers.cpp" />
|
<ClCompile Include="..\ApiDispatchers.cpp" />
|
||||||
<ClCompile Include="..\ApiDispatchersInternal.cpp" />
|
<ClCompile Include="..\ApiDispatchersInternal.cpp" />
|
||||||
|
|
|
@ -44,20 +44,10 @@ typedef long NTSTATUS;
|
||||||
|
|
||||||
#define FACILITY_NTWIN32 0x7
|
#define FACILITY_NTWIN32 0x7
|
||||||
|
|
||||||
#define __NTSTATUS_FROM_WIN32(x) ((NTSTATUS)(x) <= 0 ? ((NTSTATUS)(x)) : ((NTSTATUS)(((x)&0x0000FFFF) | (FACILITY_NTWIN32 << 16) | ERROR_SEVERITY_ERROR)))
|
#undef NTSTATUS_FROM_WIN32
|
||||||
|
inline long NTSTATUS_FROM_WIN32(long x) {
|
||||||
#ifdef INLINE_NTSTATUS_FROM_WIN32
|
return x <= 0 ? (NTSTATUS)x : (NTSTATUS) (((x) & 0x0000FFFF) | (FACILITY_NTWIN32 << 16) | ERROR_SEVERITY_ERROR);
|
||||||
#ifndef __midl
|
|
||||||
__inline NTSTATUS_FROM_WIN32(long x)
|
|
||||||
{
|
|
||||||
return x <= 0 ? (NTSTATUS)x : (NTSTATUS)(((x)&0x0000FFFF) | (FACILITY_NTWIN32 << 16) | ERROR_SEVERITY_ERROR);
|
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
#define NTSTATUS_FROM_WIN32(x) __NTSTATUS_FROM_WIN32(x)
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
#define NTSTATUS_FROM_WIN32(x) __NTSTATUS_FROM_WIN32(x)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//#include <ntstatus.h>
|
//#include <ntstatus.h>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT license.
|
// Licensed under the MIT license.
|
||||||
|
|
||||||
#include <precomp.h>
|
#include "precomp.h"
|
||||||
|
|
||||||
#include "adaptDispatch.hpp"
|
#include "adaptDispatch.hpp"
|
||||||
#include "conGetSet.hpp"
|
#include "conGetSet.hpp"
|
||||||
|
|
|
@ -9,6 +9,15 @@
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(SolutionDir)src\common.build.pre.props" />
|
<Import Project="$(SolutionDir)src\common.build.pre.props" />
|
||||||
|
<PropertyGroup Label="Configuration">
|
||||||
|
<PlatformToolset>ClangCL</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup>
|
||||||
|
<ClCompile>
|
||||||
|
<AdditionalOptions>-O3 -Wno-microsoft-include -Wno-c++11-narrowing %(AdditionalOptions)</AdditionalOptions>
|
||||||
|
<LanguageStandard>stdcpplatest</LanguageStandard>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\adaptDispatch.cpp" />
|
<ClCompile Include="..\adaptDispatch.cpp" />
|
||||||
<ClCompile Include="..\DispatchCommon.cpp" />
|
<ClCompile Include="..\DispatchCommon.cpp" />
|
||||||
|
@ -49,4 +58,4 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<!-- Careful reordering these. Some default props (contained in these files) are order sensitive. -->
|
<!-- Careful reordering these. Some default props (contained in these files) are order sensitive. -->
|
||||||
<Import Project="$(SolutionDir)src\common.build.post.props" />
|
<Import Project="$(SolutionDir)src\common.build.post.props" />
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT license.
|
// Licensed under the MIT license.
|
||||||
|
|
||||||
#include <precomp.h>
|
#include "precomp.h"
|
||||||
|
|
||||||
#include "telemetry.hpp"
|
#include "telemetry.hpp"
|
||||||
|
|
|
@ -9,6 +9,15 @@
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(SolutionDir)src\common.build.pre.props" />
|
<Import Project="$(SolutionDir)src\common.build.pre.props" />
|
||||||
|
<PropertyGroup Label="Configuration">
|
||||||
|
<PlatformToolset>ClangCL</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup>
|
||||||
|
<ClCompile>
|
||||||
|
<AdditionalOptions>-O3 -Wno-microsoft-include -Wno-c++11-narrowing %(AdditionalOptions)</AdditionalOptions>
|
||||||
|
<LanguageStandard>stdcpplatest</LanguageStandard>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\mouseInput.cpp" />
|
<ClCompile Include="..\mouseInput.cpp" />
|
||||||
<ClCompile Include="..\mouseInputState.cpp" />
|
<ClCompile Include="..\mouseInputState.cpp" />
|
||||||
|
@ -28,4 +37,4 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<!-- Careful reordering these. Some default props (contained in these files) are order sensitive. -->
|
<!-- Careful reordering these. Some default props (contained in these files) are order sensitive. -->
|
||||||
<Import Project="$(SolutionDir)src\common.build.post.props" />
|
<Import Project="$(SolutionDir)src\common.build.post.props" />
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -387,7 +387,7 @@ bool InputStateMachineEngine::ActionCsiDispatch(const VTID id, const VTParameter
|
||||||
DWORD buttonState = 0;
|
DWORD buttonState = 0;
|
||||||
DWORD eventFlags = 0;
|
DWORD eventFlags = 0;
|
||||||
const size_t firstParameter = parameters.at(0).value_or(0);
|
const size_t firstParameter = parameters.at(0).value_or(0);
|
||||||
const til::point uiPos{ parameters.at(1) - 1, parameters.at(2) - 1 };
|
const til::point uiPos{ parameters.at(1).value_or(0) - 1, parameters.at(2).value_or(0) - 1 };
|
||||||
|
|
||||||
modifierState = _GetSGRMouseModifierState(firstParameter);
|
modifierState = _GetSGRMouseModifierState(firstParameter);
|
||||||
success = _UpdateSGRMouseButtonState(id, firstParameter, buttonState, eventFlags, uiPos);
|
success = _UpdateSGRMouseButtonState(id, firstParameter, buttonState, eventFlags, uiPos);
|
||||||
|
|
|
@ -6,9 +6,18 @@
|
||||||
<RootNamespace>parser</RootNamespace>
|
<RootNamespace>parser</RootNamespace>
|
||||||
<ProjectName>TerminalParser</ProjectName>
|
<ProjectName>TerminalParser</ProjectName>
|
||||||
<TargetName>ConTermParser</TargetName>
|
<TargetName>ConTermParser</TargetName>
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(SolutionDir)src\common.build.pre.props"/>
|
<Import Project="$(SolutionDir)src\common.build.pre.props"/>
|
||||||
|
<PropertyGroup Label="Configuration">
|
||||||
|
<PlatformToolset>ClangCL</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup>
|
||||||
|
<ClCompile>
|
||||||
|
<AdditionalOptions>-O3 -Wno-microsoft-include -Wno-c++11-narrowing %(AdditionalOptions)</AdditionalOptions>
|
||||||
|
<LanguageStandard>stdcpplatest</LanguageStandard>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
<!-- ONLY ADD CLOSED-SOURCE FILES HERE, OPEN-SOURCE FILES GO IN parser-common.vcxitems -->
|
<!-- ONLY ADD CLOSED-SOURCE FILES HERE, OPEN-SOURCE FILES GO IN parser-common.vcxitems -->
|
||||||
<Import Project="$(SolutionDir)src\terminal\parser\parser-common.vcxitems" />
|
<Import Project="$(SolutionDir)src\terminal\parser\parser-common.vcxitems" />
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -1743,7 +1743,7 @@ void StateMachine::ProcessCharacter(const wchar_t wch)
|
||||||
}
|
}
|
||||||
else if (_state < VTStates::TotalStates)
|
else if (_state < VTStates::TotalStates)
|
||||||
{
|
{
|
||||||
static constexpr alignas(64) void (StateMachine::*funcs[])(wchar_t) = {
|
alignas(64) static constexpr void (StateMachine::*funcs[])(wchar_t) = {
|
||||||
&StateMachine::_EventGround, // VTStates::Ground
|
&StateMachine::_EventGround, // VTStates::Ground
|
||||||
&StateMachine::_EventEscape, // VTStates::Escape
|
&StateMachine::_EventEscape, // VTStates::Escape
|
||||||
&StateMachine::_EventEscapeIntermediate, // VTStates::EscapeIntermediate
|
&StateMachine::_EventEscapeIntermediate, // VTStates::EscapeIntermediate
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT license.
|
// Licensed under the MIT license.
|
||||||
|
|
||||||
#include <precomp.h>
|
#include "precomp.h"
|
||||||
|
|
||||||
#include "telemetry.hpp"
|
#include "telemetry.hpp"
|
||||||
|
|
||||||
|
|
|
@ -148,7 +148,7 @@ void TermControlUiaTextRange::_TranslatePointFromScreen(LPPOINT screenPoint) con
|
||||||
screenPoint->y = includeOffsets(screenPoint->y, boundingRect.top, padding.top, scaleFactor);
|
screenPoint->y = includeOffsets(screenPoint->y, boundingRect.top, padding.top, scaleFactor);
|
||||||
}
|
}
|
||||||
|
|
||||||
const COORD TermControlUiaTextRange::_getScreenFontSize() const
|
const COORD TermControlUiaTextRange::_getScreenFontSize() const noexcept
|
||||||
{
|
{
|
||||||
// Do NOT get the font info from IRenderData. It is a dummy font info.
|
// Do NOT get the font info from IRenderData. It is a dummy font info.
|
||||||
// Instead, the font info is saved in the TermControl. So we have to
|
// Instead, the font info is saved in the TermControl. So we have to
|
||||||
|
|
|
@ -57,6 +57,6 @@ namespace Microsoft::Terminal
|
||||||
protected:
|
protected:
|
||||||
void _TranslatePointToScreen(LPPOINT clientPoint) const override;
|
void _TranslatePointToScreen(LPPOINT clientPoint) const override;
|
||||||
void _TranslatePointFromScreen(LPPOINT screenPoint) const override;
|
void _TranslatePointFromScreen(LPPOINT screenPoint) const override;
|
||||||
const COORD _getScreenFontSize() const override;
|
const COORD _getScreenFontSize() const noexcept override;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,15 @@
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(SolutionDir)src\common.build.pre.props" />
|
<Import Project="$(SolutionDir)src\common.build.pre.props" />
|
||||||
|
<PropertyGroup Label="Configuration">
|
||||||
|
<PlatformToolset>ClangCL</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup>
|
||||||
|
<ClCompile>
|
||||||
|
<AdditionalOptions>-O3 -Wno-microsoft-include -Wno-c++11-narrowing %(AdditionalOptions)</AdditionalOptions>
|
||||||
|
<LanguageStandard>stdcpplatest</LanguageStandard>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\CodepointWidthDetector.cpp" />
|
<ClCompile Include="..\CodepointWidthDetector.cpp" />
|
||||||
<ClCompile Include="..\convert.cpp" />
|
<ClCompile Include="..\convert.cpp" />
|
||||||
|
|
|
@ -9,6 +9,15 @@
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(SolutionDir)src\common.build.pre.props" />
|
<Import Project="$(SolutionDir)src\common.build.pre.props" />
|
||||||
|
<PropertyGroup Label="Configuration">
|
||||||
|
<PlatformToolset>ClangCL</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup>
|
||||||
|
<ClCompile>
|
||||||
|
<AdditionalOptions>-O3 -Wno-microsoft-include -Wno-c++11-narrowing %(AdditionalOptions)</AdditionalOptions>
|
||||||
|
<LanguageStandard>stdcpplatest</LanguageStandard>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="../winconpty.cpp" />
|
<ClCompile Include="../winconpty.cpp" />
|
||||||
<ClCompile Include="../precomp.cpp">
|
<ClCompile Include="../precomp.cpp">
|
||||||
|
|
|
@ -33,12 +33,16 @@ typedef NTSTATUS* PNTSTATUS;
|
||||||
|
|
||||||
// End From ntdef.h
|
// End From ntdef.h
|
||||||
|
|
||||||
#define INLINE_NTSTATUS_FROM_WIN32 1 // Must use inline NTSTATUS or it will call the wrapped function twice.
|
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
#pragma warning(disable : 4430) // Must disable 4430 "default int" warning for C++ because ntstatus.h is inflexible SDK definition.
|
#pragma warning(disable : 4430) // Must disable 4430 "default int" warning for C++ because ntstatus.h is inflexible SDK definition.
|
||||||
#include <ntstatus.h>
|
#include <ntstatus.h>
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
|
|
||||||
|
#undef NTSTATUS_FROM_WIN32
|
||||||
|
inline long NTSTATUS_FROM_WIN32(long x) {
|
||||||
|
return x <= 0 ? (NTSTATUS)x : (NTSTATUS) (((x) & 0x0000FFFF) | (FACILITY_NTWIN32 << 16) | ERROR_SEVERITY_ERROR);
|
||||||
|
}
|
||||||
|
|
||||||
#include <strsafe.h>
|
#include <strsafe.h>
|
||||||
|
|
||||||
#include "../host/conddkrefs.h"
|
#include "../host/conddkrefs.h"
|
||||||
|
|
Loading…
Reference in a new issue