Fix the spellbot (#8259)
This commit is contained in:
parent
d28a4da596
commit
6115f8db82
|
@ -4,6 +4,7 @@ alignof
|
||||||
bitfield
|
bitfield
|
||||||
bitfields
|
bitfields
|
||||||
CLASSNOTAVAILABLE
|
CLASSNOTAVAILABLE
|
||||||
|
cmdletbinding
|
||||||
COLORPROPERTY
|
COLORPROPERTY
|
||||||
CXICON
|
CXICON
|
||||||
CYICON
|
CYICON
|
||||||
|
@ -53,6 +54,7 @@ roundf
|
||||||
RSHIFT
|
RSHIFT
|
||||||
rx
|
rx
|
||||||
schandle
|
schandle
|
||||||
|
semver
|
||||||
serializer
|
serializer
|
||||||
SIZENS
|
SIZENS
|
||||||
spsc
|
spsc
|
||||||
|
|
|
@ -62,3 +62,4 @@ SUMS$
|
||||||
^src/tools/U8U16Test/(?:fr|ru|zh)\.txt$
|
^src/tools/U8U16Test/(?:fr|ru|zh)\.txt$
|
||||||
^\.github/actions/spell-check/
|
^\.github/actions/spell-check/
|
||||||
^\.gitignore$
|
^\.gitignore$
|
||||||
|
^doc/reference/master-sequence-list.csv$
|
||||||
|
|
|
@ -355,6 +355,7 @@ consoleapi
|
||||||
CONSOLECONTROL
|
CONSOLECONTROL
|
||||||
CONSOLEENDTASK
|
CONSOLEENDTASK
|
||||||
consolegit
|
consolegit
|
||||||
|
consolehost
|
||||||
CONSOLEIME
|
CONSOLEIME
|
||||||
consoleinternal
|
consoleinternal
|
||||||
Consoleroot
|
Consoleroot
|
||||||
|
@ -636,6 +637,7 @@ dpiy
|
||||||
DRAWFRAME
|
DRAWFRAME
|
||||||
DRAWITEM
|
DRAWITEM
|
||||||
DRAWITEMSTRUCT
|
DRAWITEMSTRUCT
|
||||||
|
drcs
|
||||||
dropdown
|
dropdown
|
||||||
DROPDOWNLIST
|
DROPDOWNLIST
|
||||||
DROPFILES
|
DROPFILES
|
||||||
|
@ -2421,6 +2423,7 @@ ucdxml
|
||||||
uch
|
uch
|
||||||
UCHAR
|
UCHAR
|
||||||
ucs
|
ucs
|
||||||
|
UDK
|
||||||
UDKs
|
UDKs
|
||||||
UDM
|
UDM
|
||||||
uer
|
uer
|
||||||
|
@ -2831,4 +2834,4 @@ AAAAA
|
||||||
BBBBBCCC
|
BBBBBCCC
|
||||||
abcd
|
abcd
|
||||||
LPMINMAXINFO
|
LPMINMAXINFO
|
||||||
MINMAXINFO
|
MINMAXINFO
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Scan source code and build a list of supported VT sequences.
|
Scan source code and build a list of supported VT sequences.
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Scan source code and build a list of supported VT sequences.
|
Scan source code and build a list of supported VT sequences.
|
||||||
TODO: add more details
|
TODO: add more details
|
||||||
#>
|
#>
|
||||||
[cmdletbinding(DefaultParameterSetName="stdout")]
|
[cmdletbinding(DefaultParameterSetName="stdout")]
|
||||||
param(
|
param(
|
||||||
[parameter(ParameterSetName="file", mandatory)]
|
[parameter(ParameterSetName="file", mandatory)]
|
||||||
[string]$OutFile,
|
[string]$OutFile,
|
||||||
[parameter(ParameterSetName="file")]
|
[parameter(ParameterSetName="file")]
|
||||||
|
@ -34,7 +34,7 @@ param(
|
||||||
[string]$ConsoleAdapterPath = $(join-path $solutionRoot "src\terminal\adapter\adaptDispatch.hpp"),
|
[string]$ConsoleAdapterPath = $(join-path $solutionRoot "src\terminal\adapter\adaptDispatch.hpp"),
|
||||||
[parameter(ParameterSetName="file")]
|
[parameter(ParameterSetName="file")]
|
||||||
[parameter(ParameterSetName="stdout")]
|
[parameter(ParameterSetName="stdout")]
|
||||||
[string]$TerminalAdapterPath = $(join-path $solutionRoot "src\cascadia\terminalcore\terminaldispatch.hpp")
|
[string]$TerminalAdapterPath = $(join-path $solutionRoot "src\cascadia\terminalcore\terminalDispatch.hpp")
|
||||||
)
|
)
|
||||||
|
|
||||||
if ($PSCmdlet.ParameterSetName -eq "stdout") {
|
if ($PSCmdlet.ParameterSetName -eq "stdout") {
|
||||||
|
@ -53,10 +53,10 @@ $terminal = @{}
|
||||||
$prefix = "https://vt100.net/docs/vt510-rm/"
|
$prefix = "https://vt100.net/docs/vt510-rm/"
|
||||||
$repo = "https://github.com/oising/terminal/tree/master"
|
$repo = "https://github.com/oising/terminal/tree/master"
|
||||||
$conhostUrl = $ConsoleAdapterPath.TrimStart($SolutionRoot).replace("\", "/")
|
$conhostUrl = $ConsoleAdapterPath.TrimStart($SolutionRoot).replace("\", "/")
|
||||||
$terminalurl = $TerminalAdapterPath.TrimStart($SolutionRoot).replace("\", "/")
|
$terminalUrl = $TerminalAdapterPath.TrimStart($SolutionRoot).replace("\", "/")
|
||||||
|
|
||||||
function Read-SourceFiles {
|
function Read-SourceFiles {
|
||||||
# extract base interface
|
# extract base interface
|
||||||
$baseScanner = [regex]'(?x)virtual\s\w+\s(?<method>\w+)(?s)[^;]+;(?-s).*?(?<seq>(?<=\/\/\s).+)'
|
$baseScanner = [regex]'(?x)virtual\s\w+\s(?<method>\w+)(?s)[^;]+;(?-s).*?(?<seq>(?<=\/\/\s).+)'
|
||||||
|
|
||||||
$baseScanner.Matches(($src = get-content -raw $interfacePath)) | foreach-object {
|
$baseScanner.Matches(($src = get-content -raw $interfacePath)) | foreach-object {
|
||||||
|
@ -74,7 +74,7 @@ function Read-SourceFiles {
|
||||||
$scanner.Matches(($src = Get-Content -raw $consoleAdapterPath)) | ForEach-Object {
|
$scanner.Matches(($src = Get-Content -raw $consoleAdapterPath)) | ForEach-Object {
|
||||||
$line = (($src[0..$_.Index] -join "") -split "`n").Length
|
$line = (($src[0..$_.Index] -join "") -split "`n").Length
|
||||||
$SCRIPT:conhost[$_.groups["method"].value] = $line
|
$SCRIPT:conhost[$_.groups["method"].value] = $line
|
||||||
}
|
}
|
||||||
|
|
||||||
$scanner.Matches(($src = Get-Content -raw $terminalAdapterPath)) | ForEach-Object {
|
$scanner.Matches(($src = Get-Content -raw $terminalAdapterPath)) | ForEach-Object {
|
||||||
$line = (($src[0..$_.Index] -join "") -split "`n").Length
|
$line = (($src[0..$_.Index] -join "") -split "`n").Length
|
||||||
|
@ -85,14 +85,14 @@ function Read-SourceFiles {
|
||||||
|
|
||||||
function Get-SequenceIndexMarkdown {
|
function Get-SequenceIndexMarkdown {
|
||||||
# "Sequence","Parent","Description","Origin","Heading","Subheading", "ImplementedBy", "ConsoleHost","Terminal"
|
# "Sequence","Parent","Description","Origin","Heading","Subheading", "ImplementedBy", "ConsoleHost","Terminal"
|
||||||
|
|
||||||
$heading = $null
|
$heading = $null
|
||||||
$subheading = $null
|
$subheading = $null
|
||||||
<#
|
<#
|
||||||
Emit markdown
|
Emit markdown
|
||||||
|
|
||||||
TODO:
|
TODO:
|
||||||
- autogenerate TOC
|
- auto-generate TOC
|
||||||
#>
|
#>
|
||||||
@"
|
@"
|
||||||
# VT Function Support
|
# VT Function Support
|
||||||
|
@ -125,7 +125,7 @@ function Get-SequenceIndexMarkdown {
|
||||||
* [ANSI](#ansi)
|
* [ANSI](#ansi)
|
||||||
* [DEC Private](#dec-private)
|
* [DEC Private](#dec-private)
|
||||||
* [Editing Functions](#editing-functions)
|
* [Editing Functions](#editing-functions)
|
||||||
* [OLTP Features](#oltp-features)
|
* [OLTP Features](#OLTP-features)
|
||||||
* [Rectangular Area Operations](#rectangular-area-operations)
|
* [Rectangular Area Operations](#rectangular-area-operations)
|
||||||
* [Data Integrity](#data-integrity)
|
* [Data Integrity](#data-integrity)
|
||||||
* [Macros](#macros)
|
* [Macros](#macros)
|
||||||
|
@ -133,7 +133,7 @@ function Get-SequenceIndexMarkdown {
|
||||||
* [Cursor Save Buffer](#cursor-save-buffer)
|
* [Cursor Save Buffer](#cursor-save-buffer)
|
||||||
* [Terminal State Interrogation](#terminal-state-interrogation)
|
* [Terminal State Interrogation](#terminal-state-interrogation)
|
||||||
* [Keyboard Processing Functions](#keyboard-processing-functions)
|
* [Keyboard Processing Functions](#keyboard-processing-functions)
|
||||||
* [Soft Key Mapping (UDK)](#soft-key-mapping-udk)
|
* [Soft Key Mapping (UDK)](#soft-key-mapping-UDK)
|
||||||
* [Soft Fonts (DRCS)](#soft-fonts-drcs)
|
* [Soft Fonts (DRCS)](#soft-fonts-drcs)
|
||||||
* [Printing](#printing)
|
* [Printing](#printing)
|
||||||
* [Terminal Communication and Synchronization](#terminal-communication-and-synchronization)
|
* [Terminal Communication and Synchronization](#terminal-communication-and-synchronization)
|
||||||
|
@ -145,7 +145,7 @@ $($sequences | ForEach-Object {
|
||||||
if ($method = $base[$_.sequence]) {
|
if ($method = $base[$_.sequence]) {
|
||||||
$_.ImplementedBy = $method
|
$_.ImplementedBy = $method
|
||||||
$_.ConsoleHost = $conhost[$method]
|
$_.ConsoleHost = $conhost[$method]
|
||||||
$_.Terminal = $terminal[$method]
|
$_.Terminal = $terminal[$method]
|
||||||
}
|
}
|
||||||
# "Sequence","Associated","Description","Origin","Heading","Subheading", "ImplementedBy", "ConsoleHost","Terminal"
|
# "Sequence","Associated","Description","Origin","Heading","Subheading", "ImplementedBy", "ConsoleHost","Terminal"
|
||||||
$c0 = "[$($_.Sequence)]($prefix$($_.sequence).html ""View page on vt100.net"")"
|
$c0 = "[$($_.Sequence)]($prefix$($_.sequence).html ""View page on vt100.net"")"
|
||||||
|
@ -202,7 +202,7 @@ function Show-Summary {
|
||||||
$summary = @"
|
$summary = @"
|
||||||
`e[1mSequence Support:`e[0m
|
`e[1mSequence Support:`e[0m
|
||||||
|
|
||||||
`e[7m {0:000} `e[0m known in master-sequence-list.csv.
|
`e[7m {0:000} `e[0m known in master-sequence-list.csv.
|
||||||
`e[7m {1:000} `e[0m common members in ITermDispatch base, of which:
|
`e[7m {1:000} `e[0m common members in ITermDispatch base, of which:
|
||||||
`e[7m {2:000} `e[0m are implemented by ConsoleHost.
|
`e[7m {2:000} `e[0m are implemented by ConsoleHost.
|
||||||
`e[7m {3:000} `e[0m are implemented by Windows Terminal.
|
`e[7m {3:000} `e[0m are implemented by Windows Terminal.
|
||||||
|
@ -219,12 +219,12 @@ function Show-Summary {
|
||||||
Read-SourceFiles
|
Read-SourceFiles
|
||||||
|
|
||||||
if (-not $SummaryOnly.IsPresent) {
|
if (-not $SummaryOnly.IsPresent) {
|
||||||
|
|
||||||
$markdown = Get-SequenceIndexMarkdown
|
$markdown = Get-SequenceIndexMarkdown
|
||||||
|
|
||||||
if ($PSCmdlet.ParameterSetName -eq "file") {
|
if ($PSCmdlet.ParameterSetName -eq "file") {
|
||||||
# send to file and overwrite
|
# send to file and overwrite
|
||||||
$markdown | Out-File -FilePath $OutFile -Force:$Force.IsPresent -Encoding utf8NoBOM
|
$markdown | Out-File -FilePath $OutFile -Force:$Force.IsPresent -Encoding utf8NoBOM
|
||||||
} else {
|
} else {
|
||||||
# send to STDOUT
|
# send to STDOUT
|
||||||
$markdown
|
$markdown
|
||||||
|
|
Loading…
Reference in New Issue