From 1f69f80dd6bacb939779689c2bf9763668de2493 Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Mon, 29 May 2000 00:15:44 +0000 Subject: more templates. (This used to be commit 4d50d3526249276e1d2eb039cb57011e7cdae867) --- source3/aparser/templates/fn_end0.tpl | 8 ++++++++ source3/aparser/templates/prs_align2.tpl | 1 + source3/aparser/templates/prs_align4.tpl | 1 + source3/aparser/templates/prs_array_optional.tpl | 5 +++++ 4 files changed, 15 insertions(+) create mode 100644 source3/aparser/templates/fn_end0.tpl create mode 100644 source3/aparser/templates/prs_align2.tpl create mode 100644 source3/aparser/templates/prs_align4.tpl create mode 100644 source3/aparser/templates/prs_array_optional.tpl (limited to 'source3/aparser') 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; + } -- cgit