more clean up. use log instead of fmt.Print to stderr. bug fix for event blocking (a hack fix for now).

This commit is contained in:
Andrew Gallant (Ocelot)
2012-05-07 21:58:33 -04:00
parent daad54a5e1
commit 13d598e5e7
35 changed files with 481 additions and 309 deletions

View File

@@ -29,7 +29,12 @@ func (e *Error) Define(c *Context) {
// Let's the XGB event loop read this error.
c.Putln("func init() {")
c.Putln("newErrorFuncs[%d] = New%s", e.Number, e.ErrType())
if c.protocol.isExt() {
c.Putln("newExtErrorFuncs[\"%s\"][%d] = New%s",
c.protocol.ExtXName, e.Number, e.ErrType())
} else {
c.Putln("newErrorFuncs[%d] = New%s", e.Number, e.ErrType())
}
c.Putln("}")
c.Putln("")
}
@@ -95,7 +100,12 @@ func (e *ErrorCopy) Define(c *Context) {
// Let's the XGB know how to read this error.
c.Putln("func init() {")
c.Putln("newErrorFuncs[%d] = New%s", e.Number, e.ErrType())
if c.protocol.isExt() {
c.Putln("newExtErrorFuncs[\"%s\"][%d] = New%s",
c.protocol.ExtXName, e.Number, e.ErrType())
} else {
c.Putln("newErrorFuncs[%d] = New%s", e.Number, e.ErrType())
}
c.Putln("}")
c.Putln("")
}