]> git.tdb.fi Git - gldbg.git/blobdiff - source/gldecoder.c
Print the contents of arrays and references
[gldbg.git] / source / gldecoder.c
index 6e903736f726a5840c9252056858c52b910d0592..863be925aeaaf55eee6961c9114ddaae7e0e3ebf 100644 (file)
@@ -130,6 +130,18 @@ static unsigned read_string(const unsigned char **v, const char *data)
        return read_data((const void **)v, data);
 }
 
+static unsigned read_string_array(const unsigned char ***v, const char *data)
+{
+       int count;
+       unsigned pos = 0;
+       int i;
+       pos += read_int(&count, data);
+       *v = (const unsigned char **)tmpalloc(count*sizeof(const unsigned char *));
+       for(i=0; i<count; ++i)
+               pos += read_string(*v+i, data+pos);
+       return pos;
+}
+
 #include "gldecoder.funcs"
 
 static int decode_gldError(GlDecoder *dec, const char *data)