summaryrefslogtreecommitdiff
path: root/source3/aparser/templates
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>2000-05-29 00:15:44 +0000
committerLuke Leighton <lkcl@samba.org>2000-05-29 00:15:44 +0000
commit1f69f80dd6bacb939779689c2bf9763668de2493 (patch)
tree495c37d154f53ca4f059cb3b2c8ed37469f0276d /source3/aparser/templates
parent140523dc46786bff24d9940728baacfa3a359b80 (diff)
downloadsamba-1f69f80dd6bacb939779689c2bf9763668de2493.tar.gz
samba-1f69f80dd6bacb939779689c2bf9763668de2493.tar.bz2
samba-1f69f80dd6bacb939779689c2bf9763668de2493.zip
more templates.
(This used to be commit 4d50d3526249276e1d2eb039cb57011e7cdae867)
Diffstat (limited to 'source3/aparser/templates')
-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;
+ }