summaryrefslogtreecommitdiff
path: root/source3/aparser/templates
diff options
context:
space:
mode:
Diffstat (limited to 'source3/aparser/templates')
-rw-r--r--source3/aparser/templates/prs_array_remainder.tpl7
-rw-r--r--source3/aparser/templates/prs_array_remainder.tpl~7
-rw-r--r--source3/aparser/templates/prs_uint8s.tpl2
-rw-r--r--source3/aparser/templates/prs_uint8s_fixed.tpl2
-rw-r--r--source3/aparser/templates/prs_wstring_fixed.tpl2
5 files changed, 20 insertions, 0 deletions
diff --git a/source3/aparser/templates/prs_array_remainder.tpl b/source3/aparser/templates/prs_array_remainder.tpl
new file mode 100644
index 0000000000..80c5d8b9af
--- /dev/null
+++ b/source3/aparser/templates/prs_array_remainder.tpl
@@ -0,0 +1,7 @@
+ {
+ int i;
+ for (i=0;ps->data_offset < ps->buffer_size;i++) {
+ if (!io_alloc("@ELEM@", ps, (void **)&il->@ELEM@, sizeof(*(il->@ELEM@))*(i+1))) goto fail;
+ if (!io_@TYPE@("@ELEM@...", ps, depth+1, &il->@ELEM@[i], @FLAGS@)) goto fail;
+ }
+ }
diff --git a/source3/aparser/templates/prs_array_remainder.tpl~ b/source3/aparser/templates/prs_array_remainder.tpl~
new file mode 100644
index 0000000000..8050903f06
--- /dev/null
+++ b/source3/aparser/templates/prs_array_remainder.tpl~
@@ -0,0 +1,7 @@
+ {
+ int i;
+ for (i=0;ps->data_offset < ps->buffer_size;i++) {
+ if (!io_alloc("@ELEM@", ps, (void **)&il->@ELEM@, sizeof(*(il->@ELEM@))*(i+1)) goto fail;
+ if (!io_@TYPE@("@ELEM@...", ps, depth+1, &il->@ELEM@[i], @FLAGS@)) goto fail;
+ }
+ }
diff --git a/source3/aparser/templates/prs_uint8s.tpl b/source3/aparser/templates/prs_uint8s.tpl
new file mode 100644
index 0000000000..cfc4bab1d2
--- /dev/null
+++ b/source3/aparser/templates/prs_uint8s.tpl
@@ -0,0 +1,2 @@
+ if (!io_alloc("@ELEM@", ps, (void **)&il->@ELEM@, sizeof(*(il->@ELEM@))*il->@ARRAY_LEN@)) goto fail;
+ if (!io_uint8s("@ELEM@", ps, depth+1, il->@ELEM@, il->@ARRAY_LEN@, @FLAGS@)) goto fail;
diff --git a/source3/aparser/templates/prs_uint8s_fixed.tpl b/source3/aparser/templates/prs_uint8s_fixed.tpl
new file mode 100644
index 0000000000..c8f5581130
--- /dev/null
+++ b/source3/aparser/templates/prs_uint8s_fixed.tpl
@@ -0,0 +1,2 @@
+ if (!io_alloc("@ELEM@", ps, (void **)&il->@ELEM@, sizeof(*(il->@ELEM@))*@ARRAY_LEN@)) goto fail;
+ if (!io_uint8s("@ELEM@", ps, depth+1, il->@ELEM@, @ARRAY_LEN@, @FLAGS@)) goto fail;
diff --git a/source3/aparser/templates/prs_wstring_fixed.tpl b/source3/aparser/templates/prs_wstring_fixed.tpl
new file mode 100644
index 0000000000..bf2539b216
--- /dev/null
+++ b/source3/aparser/templates/prs_wstring_fixed.tpl
@@ -0,0 +1,2 @@
+ if (!io_alloc("@ELEM@", ps, (void **)&il->@ELEM@, sizeof(*(il->@ELEM@))*@ARRAY_LEN@)) goto fail;
+ if (!io_wstring("@ELEM@", ps, depth+1, il->@ELEM@, @ARRAY_LEN@, @FLAGS@)) goto fail;