aboutsummaryrefslogtreecommitdiff
path: root/nexgb
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2013-08-11 20:54:15 -0400
committerPřemysl Janouch <p@janouch.name>2018-09-08 16:49:18 +0200
commit38b293e74db6631873d5dfd74cf731eb7b76737d (patch)
treeaca66c5633a1c2e823318efdd05ff5ff996f4021 /nexgb
parentb06a8ca97625c1134449c3af65d9ac3fb251a613 (diff)
downloadhaven-38b293e74db6631873d5dfd74cf731eb7b76737d.tar.gz
haven-38b293e74db6631873d5dfd74cf731eb7b76737d.tar.xz
haven-38b293e74db6631873d5dfd74cf731eb7b76737d.zip
Padding on a list is on the length of the list.
There was a bug where padding was being computed on each element of the list. Close #5.
Diffstat (limited to 'nexgb')
-rw-r--r--nexgb/dri2/dri2.go8
-rw-r--r--nexgb/randr/randr.go36
-rw-r--r--nexgb/record/record.go20
-rw-r--r--nexgb/render/render.go64
-rw-r--r--nexgb/res/res.go8
-rw-r--r--nexgb/sync/sync.go16
-rw-r--r--nexgb/xevie/xevie.go4
-rw-r--r--nexgb/xf86dri/xf86dri.go4
-rw-r--r--nexgb/xf86vidmode/xf86vidmode.go4
-rw-r--r--nexgb/xgbgen/go_struct.go4
-rw-r--r--nexgb/xinerama/xinerama.go4
-rw-r--r--nexgb/xinput/xinput.go152
-rw-r--r--nexgb/xprint/xprint.go4
-rw-r--r--nexgb/xproto/xproto.go80
-rw-r--r--nexgb/xselinux/xselinux.go4
-rw-r--r--nexgb/xv/xv.go28
-rw-r--r--nexgb/xvmc/xvmc.go4
17 files changed, 222 insertions, 222 deletions
diff --git a/nexgb/dri2/dri2.go b/nexgb/dri2/dri2.go
index 1561832..df13661 100644
--- a/nexgb/dri2/dri2.go
+++ b/nexgb/dri2/dri2.go
@@ -86,9 +86,9 @@ func AttachFormatListBytes(buf []byte, list []AttachFormat) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
const (
@@ -291,9 +291,9 @@ func DRI2BufferListBytes(buf []byte, list []DRI2Buffer) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
const (
diff --git a/nexgb/randr/randr.go b/nexgb/randr/randr.go
index 8891f98..9eb8dc9 100644
--- a/nexgb/randr/randr.go
+++ b/nexgb/randr/randr.go
@@ -295,9 +295,9 @@ func CrtcChangeListBytes(buf []byte, list []CrtcChange) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type Mode uint32
@@ -453,11 +453,17 @@ func ModeInfoListBytes(buf []byte, list []ModeInfo) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
+const (
+ NotifyCrtcChange = 0
+ NotifyOutputChange = 1
+ NotifyOutputProperty = 2
+)
+
// Notify is the event number for a NotifyEvent.
const Notify = 1
@@ -526,12 +532,6 @@ func init() {
xgb.NewExtEventFuncs["RANDR"][1] = NotifyEventNew
}
-const (
- NotifyCrtcChange = 0
- NotifyOutputChange = 1
- NotifyOutputProperty = 2
-)
-
// NotifyDataUnion is a represention of the NotifyDataUnion union type.
// Note that to *create* a Union, you should *never* create
// this struct directly (unless you know what you're doing).
@@ -809,9 +809,9 @@ func OutputChangeListBytes(buf []byte, list []OutputChange) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type OutputProperty struct {
@@ -889,9 +889,9 @@ func OutputPropertyListBytes(buf []byte, list []OutputProperty) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type RefreshRates struct {
@@ -950,9 +950,9 @@ func RefreshRatesListBytes(buf []byte, list []RefreshRates) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// RefreshRatesListSize computes the size (bytes) of a list of RefreshRates values.
@@ -1174,9 +1174,9 @@ func ScreenSizeListBytes(buf []byte, list []ScreenSize) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
const (
diff --git a/nexgb/record/record.go b/nexgb/record/record.go
index 8cb495e..2644f13 100644
--- a/nexgb/record/record.go
+++ b/nexgb/record/record.go
@@ -143,9 +143,9 @@ func ClientInfoListBytes(buf []byte, list []ClientInfo) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// ClientInfoListSize computes the size (bytes) of a list of ClientInfo values.
@@ -232,9 +232,9 @@ func ExtRangeListBytes(buf []byte, list []ExtRange) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
const (
@@ -378,9 +378,9 @@ func RangeListBytes(buf []byte, list []Range) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type Range16 struct {
@@ -432,9 +432,9 @@ func Range16ListBytes(buf []byte, list []Range16) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type Range8 struct {
@@ -486,9 +486,9 @@ func Range8ListBytes(buf []byte, list []Range8) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// Skipping definition for base type 'Bool'
diff --git a/nexgb/render/render.go b/nexgb/render/render.go
index 7851e02..7185d18 100644
--- a/nexgb/render/render.go
+++ b/nexgb/render/render.go
@@ -86,9 +86,9 @@ func AnimcursoreltListBytes(buf []byte, list []Animcursorelt) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type Color struct {
@@ -154,9 +154,9 @@ func ColorListBytes(buf []byte, list []Color) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
const (
@@ -266,9 +266,9 @@ func DirectformatListBytes(buf []byte, list []Directformat) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type Fixed int32
@@ -444,9 +444,9 @@ func GlyphinfoListBytes(buf []byte, list []Glyphinfo) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type Glyphset uint32
@@ -529,9 +529,9 @@ func IndexvalueListBytes(buf []byte, list []Indexvalue) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type Linefix struct {
@@ -589,9 +589,9 @@ func LinefixListBytes(buf []byte, list []Linefix) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// BadPictFormat is the error number for a BadPictFormat.
@@ -812,9 +812,9 @@ func PictdepthListBytes(buf []byte, list []Pictdepth) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// PictdepthListSize computes the size (bytes) of a list of Pictdepth values.
@@ -914,9 +914,9 @@ func PictforminfoListBytes(buf []byte, list []Pictforminfo) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type Pictscreen struct {
@@ -974,9 +974,9 @@ func PictscreenListBytes(buf []byte, list []Pictscreen) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// PictscreenListSize computes the size (bytes) of a list of Pictscreen values.
@@ -1097,9 +1097,9 @@ func PictvisualListBytes(buf []byte, list []Pictvisual) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type Pointfix struct {
@@ -1151,9 +1151,9 @@ func PointfixListBytes(buf []byte, list []Pointfix) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
const (
@@ -1229,9 +1229,9 @@ func SpanfixListBytes(buf []byte, list []Spanfix) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
const (
@@ -1341,9 +1341,9 @@ func TransformListBytes(buf []byte, list []Transform) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type Trap struct {
@@ -1401,9 +1401,9 @@ func TrapListBytes(buf []byte, list []Trap) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type Trapezoid struct {
@@ -1475,9 +1475,9 @@ func TrapezoidListBytes(buf []byte, list []Trapezoid) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type Triangle struct {
@@ -1545,9 +1545,9 @@ func TriangleListBytes(buf []byte, list []Triangle) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// Skipping definition for base type 'Bool'
diff --git a/nexgb/res/res.go b/nexgb/res/res.go
index be0d6ce..20da54a 100644
--- a/nexgb/res/res.go
+++ b/nexgb/res/res.go
@@ -86,9 +86,9 @@ func ClientListBytes(buf []byte, list []Client) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type Type struct {
@@ -140,9 +140,9 @@ func TypeListBytes(buf []byte, list []Type) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// Skipping definition for base type 'Bool'
diff --git a/nexgb/sync/sync.go b/nexgb/sync/sync.go
index 93fb2b7..3234d60 100644
--- a/nexgb/sync/sync.go
+++ b/nexgb/sync/sync.go
@@ -483,9 +483,9 @@ func Int64ListBytes(buf []byte, list []Int64) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type Systemcounter struct {
@@ -558,9 +558,9 @@ func SystemcounterListBytes(buf []byte, list []Systemcounter) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// SystemcounterListSize computes the size (bytes) of a list of Systemcounter values.
@@ -645,9 +645,9 @@ func TriggerListBytes(buf []byte, list []Trigger) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
const (
@@ -710,9 +710,9 @@ func WaitconditionListBytes(buf []byte, list []Waitcondition) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// Skipping definition for base type 'Bool'
diff --git a/nexgb/xevie/xevie.go b/nexgb/xevie/xevie.go
index a8303a2..6da9158 100644
--- a/nexgb/xevie/xevie.go
+++ b/nexgb/xevie/xevie.go
@@ -82,9 +82,9 @@ func EventListBytes(buf []byte, list []Event) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// Skipping definition for base type 'Bool'
diff --git a/nexgb/xf86dri/xf86dri.go b/nexgb/xf86dri/xf86dri.go
index 5180b76..46fabca 100644
--- a/nexgb/xf86dri/xf86dri.go
+++ b/nexgb/xf86dri/xf86dri.go
@@ -100,9 +100,9 @@ func DrmClipRectListBytes(buf []byte, list []DrmClipRect) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// Skipping definition for base type 'Bool'
diff --git a/nexgb/xf86vidmode/xf86vidmode.go b/nexgb/xf86vidmode/xf86vidmode.go
index 55ca67b..5a3f63d 100644
--- a/nexgb/xf86vidmode/xf86vidmode.go
+++ b/nexgb/xf86vidmode/xf86vidmode.go
@@ -418,9 +418,9 @@ func ModeInfoListBytes(buf []byte, list []ModeInfo) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// BadModeUnsuitable is the error number for a BadModeUnsuitable.
diff --git a/nexgb/xgbgen/go_struct.go b/nexgb/xgbgen/go_struct.go
index 984a336..0f18084 100644
--- a/nexgb/xgbgen/go_struct.go
+++ b/nexgb/xgbgen/go_struct.go
@@ -93,9 +93,9 @@ func (s *Struct) WriteList(c *Context) {
c.Putln("for _, item := range list {")
c.Putln("structBytes = item.Bytes()")
c.Putln("copy(buf[b:], structBytes)")
- c.Putln("b += xgb.Pad(len(structBytes))")
+ c.Putln("b += len(structBytes)")
c.Putln("}")
- c.Putln("return b")
+ c.Putln("return xgb.Pad(b)")
c.Putln("}")
c.Putln("")
}
diff --git a/nexgb/xinerama/xinerama.go b/nexgb/xinerama/xinerama.go
index 7426e8e..28410c6 100644
--- a/nexgb/xinerama/xinerama.go
+++ b/nexgb/xinerama/xinerama.go
@@ -100,9 +100,9 @@ func ScreenInfoListBytes(buf []byte, list []ScreenInfo) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// Skipping definition for base type 'Bool'
diff --git a/nexgb/xinput/xinput.go b/nexgb/xinput/xinput.go
index 931216e..30d5271 100644
--- a/nexgb/xinput/xinput.go
+++ b/nexgb/xinput/xinput.go
@@ -93,9 +93,9 @@ func AxisInfoListBytes(buf []byte, list []AxisInfo) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type BellFeedbackCtl struct {
@@ -180,9 +180,9 @@ func BellFeedbackCtlListBytes(buf []byte, list []BellFeedbackCtl) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type BellFeedbackState struct {
@@ -267,9 +267,9 @@ func BellFeedbackStateListBytes(buf []byte, list []BellFeedbackState) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type ButtonInfo struct {
@@ -328,9 +328,9 @@ func ButtonInfoListBytes(buf []byte, list []ButtonInfo) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type ButtonState struct {
@@ -402,9 +402,9 @@ func ButtonStateListBytes(buf []byte, list []ButtonState) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// ButtonStateListSize computes the size (bytes) of a list of ButtonState values.
@@ -678,9 +678,9 @@ func DeviceAbsAreaCtrlListBytes(buf []byte, list []DeviceAbsAreaCtrl) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type DeviceAbsAreaState struct {
@@ -774,9 +774,9 @@ func DeviceAbsAreaStateListBytes(buf []byte, list []DeviceAbsAreaState) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type DeviceAbsCalibCtl struct {
@@ -884,9 +884,9 @@ func DeviceAbsCalibCtlListBytes(buf []byte, list []DeviceAbsCalibCtl) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type DeviceAbsCalibState struct {
@@ -994,9 +994,9 @@ func DeviceAbsCalibStateListBytes(buf []byte, list []DeviceAbsCalibState) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// BadDeviceBusy is the error number for a BadDeviceBusy.
@@ -1260,9 +1260,9 @@ func DeviceCoreCtrlListBytes(buf []byte, list []DeviceCoreCtrl) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type DeviceCoreState struct {
@@ -1333,9 +1333,9 @@ func DeviceCoreStateListBytes(buf []byte, list []DeviceCoreState) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type DeviceCtl struct {
@@ -1387,9 +1387,9 @@ func DeviceCtlListBytes(buf []byte, list []DeviceCtl) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type DeviceEnableCtrl struct {
@@ -1453,9 +1453,9 @@ func DeviceEnableCtrlListBytes(buf []byte, list []DeviceEnableCtrl) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type DeviceEnableState struct {
@@ -1519,9 +1519,9 @@ func DeviceEnableStateListBytes(buf []byte, list []DeviceEnableState) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type DeviceInfo struct {
@@ -1592,9 +1592,9 @@ func DeviceInfoListBytes(buf []byte, list []DeviceInfo) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
const (
@@ -2183,9 +2183,9 @@ func DeviceResolutionCtlListBytes(buf []byte, list []DeviceResolutionCtl) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// DeviceResolutionCtlListSize computes the size (bytes) of a list of DeviceResolutionCtl values.
@@ -2295,9 +2295,9 @@ func DeviceResolutionStateListBytes(buf []byte, list []DeviceResolutionState) in
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// DeviceResolutionStateListSize computes the size (bytes) of a list of DeviceResolutionState values.
@@ -2358,9 +2358,9 @@ func DeviceStateListBytes(buf []byte, list []DeviceState) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// DeviceStateNotify is the event number for a DeviceStateNotifyEvent.
@@ -2533,9 +2533,9 @@ func DeviceTimeCoordListBytes(buf []byte, list []DeviceTimeCoord) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
const (
@@ -2755,9 +2755,9 @@ func FeedbackCtlListBytes(buf []byte, list []FeedbackCtl) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type FeedbackState struct {
@@ -2816,9 +2816,9 @@ func FeedbackStateListBytes(buf []byte, list []FeedbackState) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// FocusIn is the event number for a FocusInEvent.
@@ -3012,9 +3012,9 @@ func InputClassInfoListBytes(buf []byte, list []InputClassInfo) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type InputInfo struct {
@@ -3066,9 +3066,9 @@ func InputInfoListBytes(buf []byte, list []InputInfo) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type InputState struct {
@@ -3127,9 +3127,9 @@ func InputStateListBytes(buf []byte, list []InputState) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type IntegerFeedbackCtl struct {
@@ -3195,9 +3195,9 @@ func IntegerFeedbackCtlListBytes(buf []byte, list []IntegerFeedbackCtl) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type IntegerFeedbackState struct {
@@ -3277,9 +3277,9 @@ func IntegerFeedbackStateListBytes(buf []byte, list []IntegerFeedbackState) int
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type KbdFeedbackCtl struct {
@@ -3394,9 +3394,9 @@ func KbdFeedbackCtlListBytes(buf []byte, list []KbdFeedbackCtl) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type KbdFeedbackState struct {
@@ -3525,9 +3525,9 @@ func KbdFeedbackStateListBytes(buf []byte, list []KbdFeedbackState) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// KbdFeedbackStateListSize computes the size (bytes) of a list of KbdFeedbackState values.
@@ -3616,9 +3616,9 @@ func KeyInfoListBytes(buf []byte, list []KeyInfo) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type KeyState struct {
@@ -3690,9 +3690,9 @@ func KeyStateListBytes(buf []byte, list []KeyState) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// KeyStateListSize computes the size (bytes) of a list of KeyState values.
@@ -3774,9 +3774,9 @@ func LedFeedbackCtlListBytes(buf []byte, list []LedFeedbackCtl) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type LedFeedbackState struct {
@@ -3849,9 +3849,9 @@ func LedFeedbackStateListBytes(buf []byte, list []LedFeedbackState) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// BadMode is the error number for a BadMode.
@@ -4075,9 +4075,9 @@ func PtrFeedbackCtlListBytes(buf []byte, list []PtrFeedbackCtl) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type PtrFeedbackState struct {
@@ -4162,9 +4162,9 @@ func PtrFeedbackStateListBytes(buf []byte, list []PtrFeedbackState) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type StringFeedbackCtl struct {
@@ -4249,9 +4249,9 @@ func StringFeedbackCtlListBytes(buf []byte, list []StringFeedbackCtl) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// StringFeedbackCtlListSize computes the size (bytes) of a list of StringFeedbackCtl values.
@@ -4347,9 +4347,9 @@ func StringFeedbackStateListBytes(buf []byte, list []StringFeedbackState) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// StringFeedbackStateListSize computes the size (bytes) of a list of StringFeedbackState values.
@@ -4437,9 +4437,9 @@ func ValuatorInfoListBytes(buf []byte, list []ValuatorInfo) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// ValuatorInfoListSize computes the size (bytes) of a list of ValuatorInfo values.
@@ -4533,9 +4533,9 @@ func ValuatorStateListBytes(buf []byte, list []ValuatorState) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// ValuatorStateListSize computes the size (bytes) of a list of ValuatorState values.
diff --git a/nexgb/xprint/xprint.go b/nexgb/xprint/xprint.go
index 48557fe..be9f2e8 100644
--- a/nexgb/xprint/xprint.go
+++ b/nexgb/xprint/xprint.go
@@ -394,9 +394,9 @@ func PrinterListBytes(buf []byte, list []Printer) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// PrinterListSize computes the size (bytes) of a list of Printer values.
diff --git a/nexgb/xproto/xproto.go b/nexgb/xproto/xproto.go
index f775a81..1e5f4bb 100644
--- a/nexgb/xproto/xproto.go
+++ b/nexgb/xproto/xproto.go
@@ -189,9 +189,9 @@ func ArcListBytes(buf []byte, list []Arc) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
const (
@@ -613,9 +613,9 @@ func Char2bListBytes(buf []byte, list []Char2b) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type Charinfo struct {
@@ -695,9 +695,9 @@ func CharinfoListBytes(buf []byte, list []Charinfo) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
const (
@@ -1199,9 +1199,9 @@ func ColoritemListBytes(buf []byte, list []Coloritem) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type Colormap uint32
@@ -1918,9 +1918,9 @@ func DepthInfoListBytes(buf []byte, list []DepthInfo) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// DepthInfoListSize computes the size (bytes) of a list of DepthInfo values.
@@ -2590,9 +2590,9 @@ func FontpropListBytes(buf []byte, list []Fontprop) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type Format struct {
@@ -2656,9 +2656,9 @@ func FormatListBytes(buf []byte, list []Format) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// BadGContext is the error number for a BadGContext.
@@ -3063,9 +3063,9 @@ func HostListBytes(buf []byte, list []Host) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// HostListSize computes the size (bytes) of a list of Host values.
@@ -4283,9 +4283,9 @@ func PointListBytes(buf []byte, list []Point) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
const (
@@ -4466,9 +4466,9 @@ func RectangleListBytes(buf []byte, list []Rectangle) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// ReparentNotify is the event number for a ReparentNotifyEvent.
@@ -4791,9 +4791,9 @@ func RgbListBytes(buf []byte, list []Rgb) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type ScreenInfo struct {
@@ -4957,9 +4957,9 @@ func ScreenInfoListBytes(buf []byte, list []ScreenInfo) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// ScreenInfoListSize computes the size (bytes) of a list of ScreenInfo values.
@@ -5039,9 +5039,9 @@ func SegmentListBytes(buf []byte, list []Segment) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// SelectionClear is the event number for a SelectionClearEvent.
@@ -5396,9 +5396,9 @@ func SetupAuthenticateListBytes(buf []byte, list []SetupAuthenticate) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// SetupAuthenticateListSize computes the size (bytes) of a list of SetupAuthenticate values.
@@ -5491,9 +5491,9 @@ func SetupFailedListBytes(buf []byte, list []SetupFailed) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// SetupFailedListSize computes the size (bytes) of a list of SetupFailed values.
@@ -5699,9 +5699,9 @@ func SetupInfoListBytes(buf []byte, list []SetupInfo) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// SetupInfoListSize computes the size (bytes) of a list of SetupInfo values.
@@ -5815,9 +5815,9 @@ func SetupRequestListBytes(buf []byte, list []SetupRequest) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// SetupRequestListSize computes the size (bytes) of a list of SetupRequest values.
@@ -5890,9 +5890,9 @@ func StrListBytes(buf []byte, list []Str) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// StrListSize computes the size (bytes) of a list of Str values.
@@ -5969,9 +5969,9 @@ func TimecoordListBytes(buf []byte, list []Timecoord) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type Timestamp uint32
@@ -6312,9 +6312,9 @@ func VisualInfoListBytes(buf []byte, list []VisualInfo) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
type Visualid uint32
diff --git a/nexgb/xselinux/xselinux.go b/nexgb/xselinux/xselinux.go
index 757a285..f24f5d7 100644
--- a/nexgb/xselinux/xselinux.go
+++ b/nexgb/xselinux/xselinux.go
@@ -115,9 +115,9 @@ func ListItemListBytes(buf []byte, list []ListItem) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// ListItemListSize computes the size (bytes) of a list of ListItem values.
diff --git a/nexgb/xv/xv.go b/nexgb/xv/xv.go
index 0a88632..5eefe77 100644
--- a/nexgb/xv/xv.go
+++ b/nexgb/xv/xv.go
@@ -130,9 +130,9 @@ func AdaptorInfoListBytes(buf []byte, list []AdaptorInfo) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// AdaptorInfoListSize computes the size (bytes) of a list of AdaptorInfo values.
@@ -223,9 +223,9 @@ func AttributeInfoListBytes(buf []byte, list []AttributeInfo) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// AttributeInfoListSize computes the size (bytes) of a list of AttributeInfo values.
@@ -474,9 +474,9 @@ func EncodingInfoListBytes(buf []byte, list []EncodingInfo) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// EncodingInfoListSize computes the size (bytes) of a list of EncodingInfo values.
@@ -542,9 +542,9 @@ func FormatListBytes(buf []byte, list []Format) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
const (
@@ -662,9 +662,9 @@ func ImageListBytes(buf []byte, list []Image) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// ImageListSize computes the size (bytes) of a list of Image values.
@@ -892,9 +892,9 @@ func ImageFormatInfoListBytes(buf []byte, list []ImageFormatInfo) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// ImageFormatInfoListSize computes the size (bytes) of a list of ImageFormatInfo values.
@@ -1062,9 +1062,9 @@ func RationalListBytes(buf []byte, list []Rational) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
const (
diff --git a/nexgb/xvmc/xvmc.go b/nexgb/xvmc/xvmc.go
index f0988eb..5ab7108 100644
--- a/nexgb/xvmc/xvmc.go
+++ b/nexgb/xvmc/xvmc.go
@@ -166,9 +166,9 @@ func SurfaceInfoListBytes(buf []byte, list []SurfaceInfo) int {
for _, item := range list {
structBytes = item.Bytes()
copy(buf[b:], structBytes)
- b += xgb.Pad(len(structBytes))
+ b += len(structBytes)
}
- return b
+ return xgb.Pad(b)
}
// Skipping definition for base type 'Bool'