示例#1
0
文件: imp.go 项目: CaptainSoOmA/Uni
func error2Pos(s string, n uint, s1 string, n1 uint, l, c uint) {
	//
	str.Lat1(&s)
	str.Lat1(&s1)
	if n > 0 {
		s = s + " " + nat.String(n)
	}
	if n1 > 0 {
		s1 = s1 + " " + nat.String(n1)
	}
	errorPos(s+s1, 0, l, c)
}
示例#2
0
文件: imp.go 项目: CaptainSoOmA/Uni
func error2(s string, n uint, s1 string, n1 uint) {
	//
	str.Lat1(&s)
	str.Lat1(&s1)
	if n > 0 {
		s = s + " " + nat.String(n)
	}
	if n1 > 0 {
		s1 = s1 + " " + nat.String(n1)
	}
	error(s+" "+s1, 0)
}
示例#3
0
文件: imp.go 项目: CaptainSoOmA/Uni
func hint(s string) {
	//
	delHint()
	pre()
	w := NColumns()
	str.Lat1(&s)
	str.Center(&s, w)
	l := NLines() - 1
	Save(l, 0, w, 1)
	hintbox.Wd(w)
	hintbox.Write(s, l, 0)
	hintWritten = true
	post()
}
示例#4
0
文件: imp.go 项目: CaptainSoOmA/Uni
func error(s string, n uint) {
	//
	pre()
	if n > 0 {
		s += " " + nat.String(n) + " "
	}
	str.Lat1(&s)
	str.Center(&s, NColumns())
	l := NLines() - 1
	Save(l, 0, NColumns(), 1)
	errorbox.Wd(NColumns())
	errorbox.Write(s, l, 0)
	kbd.Wait(false)
	Restore(l, 0, NColumns(), 1)
	post()
}
示例#5
0
文件: imp.go 项目: CaptainSoOmA/Uni
func errorPos(s string, n, l, c uint) {
	//
	pre()
	str.Lat1(&s)
	if n > 0 {
		s = s + " " + nat.String(n)
	}
	if l >= NLines() {
		l = NLines() - 1
	}
	w := uint(len(s))
	if c+w >= NColumns() {
		c = NColumns() - w
	}
	Save(l, c, w, 1)
	errorbox.Wd(w)
	errorbox.Write(s, l, c)
	kbd.Wait(false)
	Restore(l, c, w, 1)
	post()
}