+static unsigned read_string_array(string **v, const char *data)
+{
+ int count;
+ unsigned pos = 0;
+ int i;
+ pos += read_int(&count, data);
+ *v = (string *)tmpalloc(count*sizeof(string));
+ for(i=0; i<count; ++i)
+ pos += read_string(*v+i, data+pos);
+ return pos;
+}
+
+#include "gensrc/gldecoder.funcs"
+
+static int decode_gldError(GlDecoder *dec, const char *data)
+{
+ unsigned pos = 0;
+ GLenum code;
+ pos += read_int((int *)&code, data);
+ if(dec->gldError)
+ dec->gldError(dec->user_data, code);
+ return pos;
+}
+
+static int decode_gldfunc(GlDecoder *dec, unsigned short func, const char *data)
+{
+ switch(func)
+ {
+ case FUNC_GLDERROR: return decode_gldError(dec, data);
+ default: return -1;
+ }
+}