summaryrefslogtreecommitdiffstats
path: root/source/aparser
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
commit4d50d3526249276e1d2eb039cb57011e7cdae867 (patch)
treecb0bd234b05cd07734a894d1d954d721b37f6506 /source/aparser
parent82e47e268ca33dd7e692c5e6d0571428307b5287 (diff)
downloadsamba-4d50d3526249276e1d2eb039cb57011e7cdae867.tar.gz
samba-4d50d3526249276e1d2eb039cb57011e7cdae867.tar.xz
samba-4d50d3526249276e1d2eb039cb57011e7cdae867.zip
more templates.
Diffstat (limited to 'source/aparser')
-rw-r--r--source/aparser/templates/fn_end0.tpl8
-rw-r--r--source/aparser/templates/prs_align2.tpl1
-rw-r--r--source/aparser/templates/prs_align4.tpl1
-rw-r--r--source/aparser/templates/prs_array_optional.tpl5
4 files changed, 15 insertions, 0 deletions
diff --git a/source/aparser/templates/fn_end0.tpl b/source/aparser/templates/fn_end0.tpl
new file mode 100644
index 00000000000..6e49a10f538
--- /dev/null
+++ b/source/aparser/templates/fn_end0.tpl
@@ -0,0 +1,8 @@
+
+end:
+ /* the parse is OK */
+ return True;
+
+} /* @FUNCNAME@ */
+
+
diff --git a/source/aparser/templates/prs_align2.tpl b/source/aparser/templates/prs_align2.tpl
new file mode 100644
index 00000000000..54c569b547b
--- /dev/null
+++ b/source/aparser/templates/prs_align2.tpl
@@ -0,0 +1 @@
+ if (!io_align2(ps, @OFFSET@)) goto fail;
diff --git a/source/aparser/templates/prs_align4.tpl b/source/aparser/templates/prs_align4.tpl
new file mode 100644
index 00000000000..702fab13243
--- /dev/null
+++ b/source/aparser/templates/prs_align4.tpl
@@ -0,0 +1 @@
+ if (!io_align4(ps, @OFFSET@)) goto fail;
diff --git a/source/aparser/templates/prs_array_optional.tpl b/source/aparser/templates/prs_array_optional.tpl
new file mode 100644
index 00000000000..38bd32861f7
--- /dev/null
+++ b/source/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;
+ }