示例#1
0
文件: imp.go 项目: CaptainSoOmA/Uni
func delete(n uint16) {
	//
	N := name(n)
	if pseq.Length(N) > 0 {
		file := pseq.New(byte(0))
		file.Name(N)
		file.Clr()
		file.Terminate()
	}
}
示例#2
0
文件: main.go 项目: CaptainSoOmA/Uni
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)
}
示例#3
0
文件: imp.go 项目: CaptainSoOmA/Uni
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)
	}
}
示例#4
0
文件: imp.go 项目: CaptainSoOmA/Uni
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)
	}
}
示例#5
0
文件: imp.go 项目: CaptainSoOmA/Uni
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)
}
示例#6
0
文件: imp.go 项目: CaptainSoOmA/Uni
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
}