Evaluated eval [wget https://dpaste.com/42YDYQULE.txt]
This commit is contained in:
committed by
dupa dup

parent
fdf2dfff87
commit
322c3fc022
31
procs/dfc48b42a115fab2be7d88319176e80432aaa6e0
Normal file
31
procs/dfc48b42a115fab2be7d88319176e80432aaa6e0
Normal file
@ -0,0 +1,31 @@
|
||||
{str {state {}}} {
|
||||
if {$state eq ""} {
|
||||
array set f [empty_formatting]
|
||||
} else {
|
||||
array set f $state
|
||||
}
|
||||
set f(c) [set f(o) 0]
|
||||
switch -- [string index $str 0] [list \
|
||||
\003 {
|
||||
regexp {^\003((\d*)(,(\d*))?)?} $str {} a b {} c
|
||||
if {$a eq ""} {
|
||||
set f(fg) [set f(bg) -1]
|
||||
set f(c) 1
|
||||
}
|
||||
if {!($b eq "")} {
|
||||
set f(fg) $b
|
||||
}
|
||||
if {!($c eq "")} {
|
||||
set f(bg) $c
|
||||
}
|
||||
} \002 {
|
||||
set f(b) [expr !$f(b)]
|
||||
} \037 {
|
||||
set f(u) [expr !$f(u)]
|
||||
} \026 {
|
||||
set f(r) [expr !$f(r)]
|
||||
} \017 {
|
||||
set f(o) 1
|
||||
}]
|
||||
array get f
|
||||
}
|
Reference in New Issue
Block a user