diff --git a/samples/ConPTY/EchoCon/EchoCon/EchoCon.cpp b/samples/ConPTY/EchoCon/EchoCon/EchoCon.cpp index 904ea5b890..428f1e3e28 100644 --- a/samples/ConPTY/EchoCon/EchoCon/EchoCon.cpp +++ b/samples/ConPTY/EchoCon/EchoCon/EchoCon.cpp @@ -1,5 +1,5 @@ -// EchoCon.cpp : Entry point for the EchoCon Pseudo-Consle sample application. -// Copyright © 2018, Microsoft +// EchoCon.cpp : Entry point for the EchoCon Pseudo-Console sample application. +// Copyright © 2018, Microsoft #include "stdafx.h" #include diff --git a/src/host/CommandListPopup.cpp b/src/host/CommandListPopup.cpp index 5522de1c7c..f95704fd2e 100644 --- a/src/host/CommandListPopup.cpp +++ b/src/host/CommandListPopup.cpp @@ -515,7 +515,7 @@ void CommandListPopup::_update(const SHORT originalDelta, const bool wrap) } // Routine Description: -// - Adjusts the highligted line in a list of commands +// - Adjusts the highlighted line in a list of commands // Arguments: // - OldCurrentCommand - The previous command highlighted // - NewCurrentCommand - The new command to be highlighted. diff --git a/src/host/ConsoleArguments.cpp b/src/host/ConsoleArguments.cpp index 930d92553b..1d06001da4 100644 --- a/src/host/ConsoleArguments.cpp +++ b/src/host/ConsoleArguments.cpp @@ -102,7 +102,7 @@ void ConsoleArguments::s_ConsumeArg(_Inout_ std::vector& args, _In // args: A collection of wstrings representing command-line arguments // index: the index of the argument of which to get the value for. The value // should be at (index+1). index will be decremented by one on success. -// pSetting: recieves the string at index+1 +// pSetting: receives the string at index+1 // Return Value: // S_OK if we parsed the string successfully, otherwise E_INVALIDARG indicating // failure. @@ -132,7 +132,7 @@ HRESULT ConsoleArguments::s_GetArgumentValue(_Inout_ std::vector& // args: A collection of wstrings representing command-line arguments // index: the index of the argument of which to get the value for. The value // should be at (index+1). index will be decremented by one on success. -// pSetting: recieves the string at index+1 +// pSetting: receives the string at index+1 // Return Value: // S_OK if we parsed the string successfully, otherwise E_INVALIDARG indicating // failure. @@ -163,7 +163,7 @@ HRESULT ConsoleArguments::s_HandleFeatureValue(_Inout_ std::vector // args: A collection of wstrings representing command-line arguments // index: the index of the argument of which to get the value for. The value // should be at (index+1). index will be decremented by one on success. -// pSetting: recieves the short at index+1 +// pSetting: receives the short at index+1 // Return Value: // S_OK if we parsed the short successfully, otherwise E_INVALIDARG indicating // failure. This could be the case for non-numeric arguments, or for >SHORT_MAX args. @@ -420,7 +420,7 @@ HRESULT ConsoleArguments::ParseCommandline() } // TODO: handle the rest of the possible params (MSFT:13271366, MSFT:13631640) // TODO: handle invalid args - // eg "conhost --foo bar" should not make the clientCommandline "--foo bar" + // e.g. "conhost --foo bar" should not make the clientCommandline "--foo bar" else { // If we encounter something that doesn't match one of our other @@ -547,7 +547,7 @@ bool ConsoleArguments::GetInheritCursor() const // Method Description: // - Tell us to use a different size than the one parsed as the size of the -// console. This is called by the PtySignalInputThread when it recieves a +// console. This is called by the PtySignalInputThread when it receives a // resize before the first client has connected. Because there's no client, // there's also no buffer yet, so it has nothing to resize. // However, we shouldn't just discard that first resize message. Instead, diff --git a/src/host/alias.cpp b/src/host/alias.cpp index 36f3a092d9..5991e03045 100644 --- a/src/host/alias.cpp +++ b/src/host/alias.cpp @@ -294,7 +294,7 @@ HRESULT ApiRoutines::GetConsoleAliasWImpl(const std::wstring_view source, CATCH_RETURN(); } -// These variables define the seperator character and the length of the string. +// These variables define the separator character and the length of the string. // They will be used to as the joiner between source and target strings when returning alias data in list form. static std::wstring aliasesSeparator(L"="); @@ -325,11 +325,11 @@ HRESULT GetConsoleAliasesLengthWImplHelper(const std::wstring_view exeName, size_t cchNeeded = 0; - // Each of the aliases will be made up of the source, a seperator, the target, then a null character. + // Each of the aliases will be made up of the source, a separator, the target, then a null character. // They are of the form "Source=Target" when returned. size_t const cchNull = 1; size_t cchSeperator = aliasesSeparator.size(); - // If we're counting how much multibyte space will be needed, trial convert the seperator before we add. + // If we're counting how much multibyte space will be needed, trial convert the separator before we add. if (!countInUnicode) { cchSeperator = GetALengthFromW(codepage, aliasesSeparator); @@ -465,7 +465,7 @@ HRESULT GetConsoleAliasesWImplHelper(const std::wstring_view exeName, LPWSTR AliasesBufferPtrW = aliasBuffer.has_value() ? aliasBuffer.value().data() : nullptr; size_t cchTotalLength = 0; // accumulate the characters we need/have copied as we walk the list - // Each of the alises will be made up of the source, a seperator, the target, then a null character. + // Each of the alises will be made up of the source, a separator, the target, then a null character. // They are of the form "Source=Target" when returned. size_t const cchNull = 1; diff --git a/src/host/cmdline.cpp b/src/host/cmdline.cpp index b83187e2b4..b0dc2a32de 100644 --- a/src/host/cmdline.cpp +++ b/src/host/cmdline.cpp @@ -720,7 +720,7 @@ COORD CommandLine::_moveCursorLeftByWord(COOKED_READ_DATA& cookedReadData) noexc // LastWord is currently pointing to the last character // of the previous word, unless it backed up to the beginning // of the buffer. - // Let's increment LastWord so that it points to the expeced + // Let's increment LastWord so that it points to the expected // insertion point. ++LastWord; } diff --git a/src/host/conattrs.cpp b/src/host/conattrs.cpp index 453fcb1c79..42583d3289 100644 --- a/src/host/conattrs.cpp +++ b/src/host/conattrs.cpp @@ -32,7 +32,7 @@ struct _HSL const auto diff = max - min; const auto sum = max + min; - // Luminence + // Luminance l = max / 255.0; // Saturation @@ -147,7 +147,7 @@ WORD Xterm256ToWindowsIndex(const size_t xtermTableEntry) noexcept } // Function Description: -// - Converts the value of a pair of xterm color table indicies to the legacy attr equivalent. +// - Converts the value of a pair of xterm color table indices to the legacy attr equivalent. // Arguments: // - xtermForeground: the xterm color table foreground index // - xtermBackground: the xterm color table background index @@ -190,7 +190,7 @@ bool FindTableIndex(const COLORREF Color, // - Get a COLORREF for the foreground component of the given legacy attributes. // Arguments: // - wLegacyAttrs - The legacy attributes to get the foreground color from. -// - ColorTable - The array of colors to to get the color from. +// - ColorTable - The array of colors to get the color from. // - cColorTable - The number of elements in ColorTable // Return Value: // - the COLORREF for the foreground component @@ -209,7 +209,7 @@ COLORREF ForegroundColor(const WORD wLegacyAttrs, // - Get a COLORREF for the background component of the given legacy attributes. // Arguments: // - wLegacyAttrs - The legacy attributes to get the background color from. -// - ColorTable - The array of colors to to get the color from. +// - ColorTable - The array of colors to get the color from. // - cColorTable - The number of elements in ColorTable // Return Value: // - the COLORREF for the background component diff --git a/src/host/consoleInformation.cpp b/src/host/consoleInformation.cpp index 065a90b5c2..277252ff21 100644 --- a/src/host/consoleInformation.cpp +++ b/src/host/consoleInformation.cpp @@ -270,7 +270,7 @@ void CONSOLE_INFORMATION::SetTitle(const std::wstring_view newTitle) // Method Description: // - Set the console title's prefix, and trigger a renderer update of the title. -// This is the part of the title shuch as "Mark", "Select", or "Scroll" +// This is the part of the title such as "Mark", "Select", or "Scroll" // Arguments: // - newTitlePrefix: The new value to use for the title prefix // Return Value: diff --git a/src/host/dbcs.cpp b/src/host/dbcs.cpp index c64edaae3c..9e39a03ffe 100644 --- a/src/host/dbcs.cpp +++ b/src/host/dbcs.cpp @@ -109,7 +109,7 @@ bool IsDBCSLeadByteConsole(const CHAR ch, const CPINFO * const pCPInfo) unsigned char const uchComparison = (unsigned char)ch; int i = 0; - // this is ok because the the array is guaranteed to have 2 + // this is ok because the array is guaranteed to have 2 // null bytes at the end. while (pCPInfo->LeadByte[i]) { diff --git a/src/host/directio.cpp b/src/host/directio.cpp index 567be17961..a8da906b2c 100644 --- a/src/host/directio.cpp +++ b/src/host/directio.cpp @@ -571,7 +571,7 @@ HRESULT DoSrvPrivatePrependConsoleInput(_Inout_ InputBuffer* const pInputBuffer, // Arguments: // - pInputBuffer - the input buffer to write to. Currently unused, as // HandleGenericKeyEvent just gets the global input buffer, but all -// ConGetSet API's require a input or output object. +// ConGetSet API's require an input or output object. // - key - The keyevent to send to the console. // Return Value: // - HRESULT indicating success or failure @@ -865,7 +865,7 @@ static HRESULT _ReadConsoleOutputWImplHelper(const SCREEN_INFORMATION& context, auto sourceIter = storageBuffer.GetCellDataAt(sourcePoint, clippedRequestRectangle); // Walk through every cell of the target, advancing the buffer. - // Validate that we always still have a valid iterator to the backgin store, + // Validate that we always still have a valid iterator to the backing store, // that we always are writing inside the user's buffer (before the end) // and we're always targeting the user's buffer inside its original bounds. while (sourceIter && targetIter < targetBuffer.end()) diff --git a/src/host/getset.cpp b/src/host/getset.cpp index d2ec5be426..74ca471b74 100644 --- a/src/host/getset.cpp +++ b/src/host/getset.cpp @@ -127,7 +127,7 @@ void ApiRoutines::GetConsoleScreenBufferInfoExImpl(const SCREEN_INFORMATION& con &data.dwMaximumWindowSize, &data.wPopupAttributes, data.ColorTable); - // Callers of this function expect to recieve an exclusive rect, not an inclusive one. + // Callers of this function expect to receive an exclusive rect, not an inclusive one. data.srWindow.Right += 1; data.srWindow.Bottom += 1; } @@ -201,7 +201,7 @@ void ApiRoutines::GetNumberOfConsoleMouseButtonsImpl(ULONG& buttons) noexcept } // Routine Description: -// - Retrieves information about the a known font based on index +// - Retrieves information about a known font based on index // Arguments: // - context - The output buffer concerned // - index - We only accept 0 now as we don't keep a list of fonts in memory. @@ -837,7 +837,7 @@ HRESULT ApiRoutines::ScrollConsoleScreenBufferWImpl(SCREEN_INFORMATION& context, // attributes, they likely wanted to use the full version of // our current attributes, whether that be RGB or _default_ colored. // This could create a scenario where someone emitted RGB with VT, - // THEN used the API to ScrollConsoleOutput with the legacy attrs, + // THEN used the API to ScrollConsoleOutput with the legacy attrs, // and DIDN'T want the RGB color. As in FillConsoleOutputAttribute, // this scenario is highly unlikely, and we can reasonably do this // on their behalf. @@ -1439,7 +1439,7 @@ HRESULT DoSrvMoveCursorVertically(SCREEN_INFORMATION& screenInfo, const short li } // Routine Description: -// - A private API call for swaping to the alternate screen buffer. In virtual terminals, there exists both a "main" +// - A private API call for swapping to the alternate screen buffer. In virtual terminals, there exists both a "main" // screen buffer and an alternate. ASBSET creates a new alternate, and switches to it. If there is an already // existing alternate, it is discarded. // Parameters: @@ -1470,7 +1470,7 @@ void DoSrvPrivateUseMainScreenBuffer(SCREEN_INFORMATION& screenInfo) // Parameters: // // Return value: -// - STATUS_SUCCESS if handled successfully. Otherwise, an approriate status code indicating the error. +// - STATUS_SUCCESS if handled successfully. Otherwise, an appropriate status code indicating the error. [[nodiscard]] NTSTATUS DoSrvPrivateHorizontalTabSet() { @@ -1490,12 +1490,12 @@ NTSTATUS DoSrvPrivateHorizontalTabSet() } // Routine Description: -// - A private helper for excecuting a number of tabs. +// - A private helper for executing a number of tabs. // Parameters: // sNumTabs - The number of tabs to execute // fForward - whether to tab forward or backwards // Return value: -// - STATUS_SUCCESS if handled successfully. Otherwise, an approriate status code indicating the error. +// - STATUS_SUCCESS if handled successfully. Otherwise, an appropriate status code indicating the error. [[nodiscard]] NTSTATUS DoPrivateTabHelper(const SHORT sNumTabs, _In_ bool fForward) { @@ -1524,7 +1524,7 @@ NTSTATUS DoPrivateTabHelper(const SHORT sNumTabs, _In_ bool fForward) // Parameters: // - sNumTabs - The number of tabs to perform. // Return value: -// - STATUS_SUCCESS if handled successfully. Otherwise, an approriate status code indicating the error. +// - STATUS_SUCCESS if handled successfully. Otherwise, an appropriate status code indicating the error. [[nodiscard]] NTSTATUS DoSrvPrivateForwardTab(const SHORT sNumTabs) { @@ -1537,7 +1537,7 @@ NTSTATUS DoSrvPrivateForwardTab(const SHORT sNumTabs) // Parameters: // - sNumTabs - The number of tabs to perform. // Return value: -// - STATUS_SUCCESS if handled successfully. Otherwise, an approriate status code indicating the error. +// - STATUS_SUCCESS if handled successfully. Otherwise, an appropriate status code indicating the error. [[nodiscard]] NTSTATUS DoSrvPrivateBackwardsTab(const SHORT sNumTabs) { @@ -1548,7 +1548,7 @@ NTSTATUS DoSrvPrivateBackwardsTab(const SHORT sNumTabs) // - A private API call for clearing the VT tabs that have been set. // Parameters: // - fClearAll - If false, only clears the tab in the current column (if it exists) -// otherwise clears all set tabs. (and reverts to lecacy 8-char tabs behavior.) +// otherwise clears all set tabs. (and reverts to legacy 8-char tabs behavior.) // Return value: // - None void DoSrvPrivateTabClear(const bool fClearAll) @@ -2046,7 +2046,7 @@ NTSTATUS DoSrvPrivateSuppressResizeRepaint() // Routine Description: // - An API call for checking if the console host is acting as a pty. // Parameters: -// - isPty: recieves the bool indicating whether or not we're in pty mode. +// - isPty: receives the bool indicating whether or not we're in pty mode. // Return value: // void DoSrvIsConsolePty(_Out_ bool* const pIsPty) @@ -2145,7 +2145,7 @@ void DoSrvPrivateMoveToBottom(SCREEN_INFORMATION& screenInfo) // Return Value: // - E_INVALIDARG if index is >= 256, else S_OK // Notes: -// Does not take a buffer paramenter. The color table for a console and for +// Does not take a buffer parameter. The color table for a console and for // terminals as well is global, not per-screen-buffer. [[nodiscard]] HRESULT DoSrvPrivateSetColorTableEntry(const short index, const COLORREF value) noexcept diff --git a/src/host/history.cpp b/src/host/history.cpp index f8de3462ae..c90f91a659 100644 --- a/src/host/history.cpp +++ b/src/host/history.cpp @@ -760,7 +760,7 @@ HRESULT ApiRoutines::GetConsoleCommandHistoryLengthWImpl(const std::wstring_view } // Routine Description: -// - Retrieves a the full command history for a given EXE name known to the console. +// - Retrieves the full command history for a given EXE name known to the console. // - It is permitted to call this function without having a target buffer. Use the result to allocate // the appropriate amount of space and call again. // - This behavior exists to allow the A version of the function to help allocate the right temp buffer for conversion of @@ -835,7 +835,7 @@ HRESULT GetConsoleCommandHistoryWImplHelper(const std::wstring_view exeName, } // Routine Description: -// - Retrieves a the full command history for a given EXE name known to the console. +// - Retrieves the full command history for a given EXE name known to the console. // - Converts inputs from A to W, calls the W version of this method, and then converts the resulting text W to A. // Arguments: // - exeName - The client EXE application attached to the host whose set we should check @@ -899,7 +899,7 @@ HRESULT ApiRoutines::GetConsoleCommandHistoryAImpl(const std::string_view exeNam } // Routine Description: -// - Retrieves a the full command history for a given EXE name known to the console. +// - Retrieves the full command history for a given EXE name known to the console. // - Converts inputs from A to W, calls the W version of this method, and then converts the resulting text W to A. // Arguments: // - exeName - The client EXE application attached to the host whose set we should check diff --git a/src/interactivity/base/InteractivityFactory.cpp b/src/interactivity/base/InteractivityFactory.cpp index 7566afec45..8262e80752 100644 --- a/src/interactivity/base/InteractivityFactory.cpp +++ b/src/interactivity/base/InteractivityFactory.cpp @@ -338,7 +338,7 @@ NTSTATUS InteractivityFactory::CreateInputServices(_Inout_ std::unique_ptr