r29: setting version
[Samba.git] / source / aparser / templates / prs_array_remainder.tpl
blobc8b1e2ab5af44b2d27def2134193c0f5a4e354fa
1         if (UNMARSHALLING(ps))
2         {
3                 int i;
4                 for (i=0;ps->data_offset < ps->buffer_size;i++) {
5                 if (!io_alloc("@ELEM@", ps, (void **)&il->@ELEM@, sizeof(*(il->@ELEM@))*(i+1))) goto fail;
6                 if (!io_@TYPE@("@ELEM@...", ps, depth+1, &il->@ELEM@[i], @FLAGS@)) goto fail;
7                 }
8         }
9         else
10         {
11                 int i = -1;
12                 /* HACK ALERT! */
13                 do {
14                 i++;
15                 if (!io_@TYPE@("@ELEM@...", ps, depth+1, &il->@ELEM@[i], @FLAGS@)) goto fail;
16                 } while (il->@ELEM@[i].tag2 != 0);
17         }