summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/aparser/templates/fn_end0.tpl8
-rw-r--r--source3/aparser/templates/prs_align2.tpl1
-rw-r--r--source3/aparser/templates/prs_align4.tpl1
-rw-r--r--source3/aparser/templates/prs_array_optional.tpl5
4 files changed, 15 insertions, 0 deletions
diff --git a/source3/aparser/templates/fn_end0.tpl b/source3/aparser/templates/fn_end0.tpl
new file mode 100644
index 0000000000..6e49a10f53
--- /dev/null
+++ b/source3/aparser/templates/fn_end0.tpl
@@ -0,0 +1,8 @@
+
+end:
+ /* the parse is OK */
+ return True;
+
+} /* @FUNCNAME@ */
+
+
diff --git a/source3/aparser/templates/prs_align2.tpl b/source3/aparser/templates/prs_align2.tpl
new file mode 100644
index 0000000000..54c569b547
--- /dev/null
+++ b/source3/aparser/templates/prs_align2.tpl
@@ -0,0 +1 @@
+ if (!io_align2(ps, @OFFSET@)) goto fail;
diff --git a/source3/aparser/templates/prs_align4.tpl b/source3/aparser/templates/prs_align4.tpl
new file mode 100644
index 0000000000..702fab1324
--- /dev/null
+++ b/source3/aparser/templates/prs_align4.tpl
@@ -0,0 +1 @@
+ if (!io_align4(ps, @OFFSET@)) goto fail;
diff --git a/source3/aparser/templates/prs_array_optional.tpl b/source3/aparser/templates/prs_array_optional.tpl
new file mode 100644
index 0000000000..38bd32861f
--- /dev/null
+++ b/source3/aparser/templates/prs_array_optional.tpl
@@ -0,0 +1,5 @@
+ if ((MARSHALLING(ps) && il->@ELEM@) ||
+ ps->data_offset < ps->buffer_size) {
+ if (!io_alloc("@ELEM@", ps, (void **)&il->@ELEM@, sizeof(*(il->@ELEM@)))) goto fail;
+ if (!io_@TYPE@("@ELEM@...", ps, depth+1, il->@ELEM@, @FLAGS@)) goto fail;
+ }