@program proto-bitmap.muf 1 1000 d i lvar param $libdef bmp : bmp ( s -- s ) " " "." subst "%ci%ch%cw " "F" subst "%ci%ch%cc " "E" subst "%ci%ch%cm " "D" subst "%ci%ch%cb " "C" subst "%ci%ch%cy " "B" subst "%ci%ch%cg " "A" subst "%ci%ch%cr " "9" subst "%ci%ch%cx " "8" subst "%cn%cW " "7" subst "%cn%cC " "6" subst "%cn%cM " "5" subst "%cn%cB " "4" subst "%cn%cY " "3" subst "%cn%cG " "2" subst "%cn%cR " "1" subst "%cn%cX " "0" subst 2 parse_ansi ; PUBLIC bmp $libdef bmparray : bmparray ( d s -- a ) array_get_proplist { swap foreach swap pop bmp repeat } array_make ; PUBLIC bmparray $libdef getbmp : getbmp ( d s -- s ) array_get_proplist "\r" array_join bmp ; PUBLIC getbmp : main param ! command @ "*mpi*" smatch if param @ bmp then ; . c q @set proto-bitmap=L @reg proto-bitmap=lib/bmp @set #0=_msgmacs/bmp:{parse_ansi:2,{muf:$lib/bmp,{:1}}}