X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgldecoder.funcs.t;h=e02c1e815277fca0833a47489ff0aff3e5fe0e74;hb=ca49785159e6a7cfd2d999a99041fa1567575a24;hp=055a272ae3e60c60c51d7fa84ba8c58060108bd4;hpb=2e4973ec66cd8ae12d4253e3c3ad9e36a8a4bca6;p=gldbg.git diff --git a/source/gldecoder.funcs.t b/source/gldecoder.funcs.t index 055a272..e02c1e8 100644 --- a/source/gldecoder.funcs.t +++ b/source/gldecoder.funcs.t @@ -1,8 +1,5 @@ # $Id$ -^typemap gl.tm -^iomap gl.io -^spec gl gl.spec -wl('static unsigned decode_%s(GlDecoder *dec, const char *data)', func.name) +wl('static unsigned decode_%s(GlDecoder *dec, const char *data __attribute__((unused)))', func.name) wl('{') wl(' unsigned pos = 0;') if ret.ctype!="void": @@ -10,10 +7,12 @@ if ret.ctype!="void": for p in params: wl(' %s p_%s;', p.ctype, p.name) if ret.ctype!="void": - wl(' pos += read_%s(&ret, data+pos);', ret.io[0]) + wl(' pos += read_%s((%s *)&ret, data+pos);', ret.io[0].replace(' ', '_'), ret.io[0]) for p in params: if p.kind=="value": - wl(' pos += read_%s(&p_%s, data+pos);', p.io[0], p.name) + wl(' pos += read_%s((%s *)&p_%s, data+pos);', p.io[0].replace(' ', '_'), p.io[0], p.name) + elif p.kind=="array" and p.io and p.io[0]=="string": + wl(' pos += read_string_array(&p_%s, data+pos);', p.name) elif p.csize: wl(' pos += read_data((const void **)&p_%s, data+pos);', p.name) else: @@ -27,7 +26,7 @@ for p in params: wl(');') wl(' return pos;') wl('}') -:static int decode_func(GlDecoder *dec, short func, const char *data) +:static int decode_func(GlDecoder *dec, unsigned short func, const char *data) :{ : switch(func) : {