func delete(n uint16) { // N := name(n) if pseq.Length(N) > 0 { file := pseq.New(byte(0)) file.Name(N) file.Clr() file.Terminate() } }
func load(f *seq.Imp, N string) { // n := pseq.Length(N) if n == 0 { return } buf := make([]byte, n) file := pseq.New(buf) file.Name(N) buf = file.Get().([]byte) file.Terminate() f.Decode(buf) }
func (x *Imp) Name(s string) { // x.name = s str.Move(&x.name, true) str.RemSpaces(&x.name) n := pseq.Length(x.name) if n > 0 { buf := make([]byte, n) f := pseq.New(buf) f.Name(x.name) buf = f.Get().([]byte) f.Terminate() x.Decode(buf) } }
func (x *Imp) Rename(s string) { // x.name = s str.Move(&x.name, true) str.RemSpaces(&x.name) // rest of implementation TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO n := pseq.Length(x.name) if n > 0 { buf := make([]byte, n) f := pseq.New(buf) f.Rename(x.name) // buf = f.Get ().([]byte) f.Terminate() // x.Decode (buf) } }
func get(n string, x, y uint) { // const tst = true if str.Empty(n) { return } str.RemSpaces(&n) filename := n + suffix l := pseq.Length(filename) if l == 0 { return } buf := make([]byte, l) file := pseq.New(buf) file.Name(filename) buf = file.Get().([]byte) file.Terminate() scr.P6Decode(x, y, buf) }
func size_(n string) (uint, uint) { // w, h := uint(0), uint(0) if str.Empty(n) { return w, h } str.RemSpaces(&n) filename := n + suffix l := pseq.Length(filename) if l == 0 { return w, h } buf := make([]byte, l) file := pseq.New(buf) file.Name(filename) buf = file.Get().([]byte) file.Terminate() w, h = scr.P6Size(buf) return w, h }