build: go 1.24

We were running behind and there were quite some deprecations to update.
This was mostly in the upstream copy/pasta package but seems quite
minimal.
This commit is contained in:
2025-03-16 12:04:32 +01:00
parent a2b678caf6
commit 1723025fbf
822 changed files with 25433 additions and 197407 deletions

View File

@ -8,7 +8,7 @@ const (
NoneAction Action = iota
ClearAction
CollectAction
MarkerAction
PrefixAction
DispatchAction
ExecuteAction
StartAction // Start of a data string
@ -24,7 +24,7 @@ var ActionNames = []string{
"NoneAction",
"ClearAction",
"CollectAction",
"MarkerAction",
"PrefixAction",
"DispatchAction",
"ExecuteAction",
"StartAction",

View File

@ -4,9 +4,9 @@ import "math"
// Shift and masks for sequence parameters and intermediates.
const (
MarkerShift = 8
PrefixShift = 8
IntermedShift = 16
CommandMask = 0xff
FinalMask = 0xff
HasMoreFlag = math.MinInt32
ParamMask = ^HasMoreFlag
MissingParam = ParamMask
@ -22,12 +22,12 @@ const (
DefaultParamValue = 0
)
// Marker returns the marker byte of the sequence.
// Prefix returns the prefix byte of the sequence.
// This is always gonna be one of the following '<' '=' '>' '?' and in the
// range of 0x3C-0x3F.
// Zero is returned if the sequence does not have a marker.
func Marker(cmd int) int {
return (cmd >> MarkerShift) & CommandMask
// Zero is returned if the sequence does not have a prefix.
func Prefix(cmd int) int {
return (cmd >> PrefixShift) & FinalMask
}
// Intermediate returns the intermediate byte of the sequence.
@ -36,12 +36,12 @@ func Marker(cmd int) int {
// ',', '-', '.', '/'.
// Zero is returned if the sequence does not have an intermediate byte.
func Intermediate(cmd int) int {
return (cmd >> IntermedShift) & CommandMask
return (cmd >> IntermedShift) & FinalMask
}
// Command returns the command byte of the CSI sequence.
func Command(cmd int) int {
return cmd & CommandMask
return cmd & FinalMask
}
// Param returns the parameter at the given index.

View File

@ -178,7 +178,7 @@ func GenerateTransitionTable() TransitionTable {
table.AddRange(0x20, 0x2F, DcsEntryState, CollectAction, DcsIntermediateState)
// Dcs_entry -> Dcs_param
table.AddRange(0x30, 0x3B, DcsEntryState, ParamAction, DcsParamState)
table.AddRange(0x3C, 0x3F, DcsEntryState, MarkerAction, DcsParamState)
table.AddRange(0x3C, 0x3F, DcsEntryState, PrefixAction, DcsParamState)
// Dcs_entry -> Dcs_passthrough
table.AddRange(0x08, 0x0D, DcsEntryState, PutAction, DcsStringState) // Follows ECMA-48 § 8.3.27
// XXX: allows passing ESC (not a ECMA-48 standard) this to allow for
@ -254,7 +254,7 @@ func GenerateTransitionTable() TransitionTable {
table.AddRange(0x20, 0x2F, CsiEntryState, CollectAction, CsiIntermediateState)
// Csi_entry -> Csi_param
table.AddRange(0x30, 0x3B, CsiEntryState, ParamAction, CsiParamState)
table.AddRange(0x3C, 0x3F, CsiEntryState, MarkerAction, CsiParamState)
table.AddRange(0x3C, 0x3F, CsiEntryState, PrefixAction, CsiParamState)
// Osc_string
table.AddRange(0x00, 0x06, OscStringState, IgnoreAction, OscStringState)