diff options
| author | Andrew Gallant (Ocelot) <Andrew.Gallant@tufts.edu> | 2012-05-03 01:00:01 -0400 | 
|---|---|---|
| committer | Andrew Gallant (Ocelot) <Andrew.Gallant@tufts.edu> | 2012-05-03 01:00:01 -0400 | 
| commit | 5cdae5950c357564300c0ee3fb4dc9e7bbf4946b (patch) | |
| tree | 1ca6c09455b060b9f607c3e275ac14b5c57bbdc1 /nexgb/xgbgen/representation.go | |
| parent | 39507f86ab0468292c24081a80f41c1799d6b477 (diff) | |
| download | haven-5cdae5950c357564300c0ee3fb4dc9e7bbf4946b.tar.gz haven-5cdae5950c357564300c0ee3fb4dc9e7bbf4946b.tar.xz haven-5cdae5950c357564300c0ee3fb4dc9e7bbf4946b.zip | |
holy toldeo... things might actually be working
Diffstat (limited to 'nexgb/xgbgen/representation.go')
| -rw-r--r-- | nexgb/xgbgen/representation.go | 19 | 
1 files changed, 18 insertions, 1 deletions
| diff --git a/nexgb/xgbgen/representation.go b/nexgb/xgbgen/representation.go index e5d2202..ef62157 100644 --- a/nexgb/xgbgen/representation.go +++ b/nexgb/xgbgen/representation.go @@ -65,6 +65,10 @@ func (r *Request) ReplyName() string {  	return fmt.Sprintf("%sReply", r.SrcName())  } +func (r *Request) ReqName() string { +	return fmt.Sprintf("%sRequest", r.SrcName()) +} +  // Size for Request needs a context.  // Namely, if this is an extension, we need to account for *four* bytes  // of a header (extension opcode, request opcode, and the sequence number). @@ -80,7 +84,20 @@ func (r *Request) Size(c *Context) Size {  	}  	for _, field := range r.Fields { -		size = size.Add(field.Size()) +		switch field.(type) { +		case *LocalField: +			continue +		case *SingleField: +			// mofos!!! +			if r.SrcName() == "ConfigureWindow" && +				field.SrcName() == "ValueMask" { + +				continue +			} +			size = size.Add(field.Size()) +		default: +			size = size.Add(field.Size()) +		}  	}  	return size  } | 
