Documentation ¶
Index ¶
Constants ¶
View Source
const CHARSTRING_KEY = 4330
View Source
const EEXEC_KEY = 55665
Variables ¶
View Source
var Ops = map[string]func(t *TypeOneI){ "+": func(t *TypeOneI) { }, "array": func(t *TypeOneI) { a := t.St.Pop() t.St.Push(t.NewArray(strm.Int(string(a), 1))) }, "begin": func(t *TypeOneI) { a := t.St.Pop() if a[0] != 'D' { panic("Wrong dictionary!\n") } t.DicSp++ t.DicSt[t.DicSp] = t.Dicts[strm.Int(string(a[1:]), 1)] }, "bind": func(t *TypeOneI) { }, "cleartomark": func(t *TypeOneI) { a := t.St.Pop() for string(a) != "mark" { a = t.St.Pop() } }, "closefile": func(t *TypeOneI) { a := t.St.Pop() t.Done = true _ = a }, "currentdict": func(t *TypeOneI) { t.St.Push(t.DicSt[t.DicSp].Name) }, "currentfile": func(t *TypeOneI) { t.St.Push([]byte{'?'}) }, "def": func(t *TypeOneI) { a := t.St.Drop(2) t.DicSt[t.DicSp].Defs[string(a[0])] = a[1] }, "definefont": func(t *TypeOneI) { a := t.St.Drop(2) t.Fonts[string(a[0])] = string(a[1]) t.St.Push(util.Bytes("<FONT>")) _ = a }, "defineresource": func(t *TypeOneI) { a := t.St.Drop(3) t.St.Push([]byte{'?'}) _ = a }, "dict": func(t *TypeOneI) { a := t.St.Pop() t.St.Push(t.NewDic()) _ = a }, "dup": func(t *TypeOneI) { a := t.St.Pop() t.St.Push(a) t.St.Push(a) }, "end": func(t *TypeOneI) { t.DicSp-- }, "exch": func(t *TypeOneI) { a := t.St.Drop(2) a0 := a[0] t.St.Push(a[1]) t.St.Push(a0) }, "executeonly": func(t *TypeOneI) { }, "findresource": func(t *TypeOneI) { a := t.St.Drop(2) t.St.Push([]byte{'?'}) _ = a }, "for": func(t *TypeOneI) { a := t.St.Drop(4) _ = a }, "get": func(t *TypeOneI) { a := t.St.Drop(2) i := strm.Int(string(a[0][1:]), 1) if a[0][0] == 'D' { t.St.Push(t.Dicts[i].Defs[string(a[1])]) } else if a[0][0] == 'A' { t.St.Push(t.Arrays[i][strm.Int(string(a[1]), 1)]) } else { panic("Can not 'get' from!\n") } }, "index": func(t *TypeOneI) { a := t.St.Pop() t.St.Push(t.St.Index(strm.Int(string(a), 1) + 1)) }, "known": func(t *TypeOneI) { a := t.St.Drop(2) t.St.Push(util.Bytes("false")) _ = a }, "noaccess": func(t *TypeOneI) { }, "pop": func(t *TypeOneI) { a := t.St.Pop() _ = a }, "put": func(t *TypeOneI) { a := t.St.Drop(3) if a[0][0] == 'D' { t.Dicts[strm.Int(string(a[0][1:]), 1)].Defs[string(a[1])] = a[2] } else if a[0][0] == 'A' { t.Arrays[strm.Int(string(a[0][1:]), 1)][strm.Int(string(a[1]), 1)] = a[2] } else { panic("Wrong dictionary or array!\n") } }, "readonly": func(t *TypeOneI) { }, "readstring": func(t *TypeOneI) { a := t.St.Drop(2) c, _ := t.Rdr.Read(a[1]) t.St.Push(a[1][0:c]) t.St.Push(util.Bytes("true")) }, "string": func(t *TypeOneI) { a := t.St.Pop() t.St.Push(make([]byte, strm.Int(string(a), 1))) }, "userdict": func(t *TypeOneI) { t.St.Push(util.Bytes("D0")) }, "where": func(t *TypeOneI) { a := t.St.Pop() t.St.Push(util.Bytes("false")) _ = a }, }
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.