use int8 instead of uint8
This commit is contained in:
parent
4fcd80d8c1
commit
c7d02dc356
|
@ -453,7 +453,7 @@ func (d *AttributeDecoder) decodeDate() ([]int, error) {
|
|||
}
|
||||
|
||||
is := make([]int, length)
|
||||
var ti uint8
|
||||
var ti int8
|
||||
|
||||
for i := int16(0); i < length; i++ {
|
||||
if err = binary.Read(d.reader, binary.BigEndian, &ti); err != nil {
|
||||
|
@ -489,7 +489,7 @@ func (d *AttributeDecoder) decodeRange() ([]int, error) {
|
|||
type Resolution struct {
|
||||
Height int
|
||||
Width int
|
||||
Depth uint8
|
||||
Depth int8
|
||||
}
|
||||
|
||||
func (d *AttributeDecoder) decodeResolution() (res Resolution, err error) {
|
||||
|
|
34
constants.go
34
constants.go
|
@ -231,27 +231,27 @@ const (
|
|||
)
|
||||
|
||||
const (
|
||||
JobStatePending uint8 = 0x03
|
||||
JobStateHeld uint8 = 0x04
|
||||
JobStateProcessing uint8 = 0x05
|
||||
JobStateStopped uint8 = 0x06
|
||||
JobStateCanceled uint8 = 0x07
|
||||
JobStateAborted uint8 = 0x08
|
||||
JobStateCompleted uint8 = 0x09
|
||||
JobStatePending int8 = 0x03
|
||||
JobStateHeld int8 = 0x04
|
||||
JobStateProcessing int8 = 0x05
|
||||
JobStateStopped int8 = 0x06
|
||||
JobStateCanceled int8 = 0x07
|
||||
JobStateAborted int8 = 0x08
|
||||
JobStateCompleted int8 = 0x09
|
||||
)
|
||||
|
||||
const (
|
||||
DocumentStatePending uint8 = 0x03
|
||||
DocumentStateProcessing uint8 = 0x05
|
||||
DocumentStateCanceled uint8 = 0x07
|
||||
DocumentStateAborted uint8 = 0x08
|
||||
DocumentStateCompleted uint8 = 0x08
|
||||
DocumentStatePending int8 = 0x03
|
||||
DocumentStateProcessing int8 = 0x05
|
||||
DocumentStateCanceled int8 = 0x07
|
||||
DocumentStateAborted int8 = 0x08
|
||||
DocumentStateCompleted int8 = 0x08
|
||||
)
|
||||
|
||||
const (
|
||||
PrinterStateIdle uint8 = 0x0003
|
||||
PrinterStateProcessing uint8 = 0x0004
|
||||
PrinterStateStopped uint8 = 0x0005
|
||||
PrinterStateIdle int8 = 0x0003
|
||||
PrinterStateProcessing int8 = 0x0004
|
||||
PrinterStateStopped int8 = 0x0005
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -270,8 +270,8 @@ const (
|
|||
const (
|
||||
CharsetLanguage = "en-US"
|
||||
Charset = "utf-8"
|
||||
ProtocolVersionMajor = uint8(2)
|
||||
ProtocolVersionMinor = uint8(0)
|
||||
ProtocolVersionMajor = int8(2)
|
||||
ProtocolVersionMinor = int8(0)
|
||||
|
||||
DefaultJobPriority = 50
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@ import (
|
|||
)
|
||||
|
||||
type Request struct {
|
||||
ProtocolVersionMajor uint8
|
||||
ProtocolVersionMinor uint8
|
||||
ProtocolVersionMajor int8
|
||||
ProtocolVersionMinor int8
|
||||
|
||||
Operation int16
|
||||
RequestId int32
|
||||
|
|
|
@ -11,8 +11,8 @@ import (
|
|||
type Attributes map[string][]Attribute
|
||||
|
||||
type Response struct {
|
||||
ProtocolVersionMajor uint8
|
||||
ProtocolVersionMinor uint8
|
||||
ProtocolVersionMajor int8
|
||||
ProtocolVersionMinor int8
|
||||
|
||||
StatusCode int16
|
||||
RequestId int32
|
||||
|
|
Loading…
Reference in New Issue