From 782c05f9c9a526b6646666587229e7a3bc60f30d Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Sat, 27 May 2000 11:08:05 +0000 Subject: optional (0of or 1of) with "[+]" semantics. (This used to be commit 55a3e4b5922eff4110970a2ed2372c431ac70918) --- source3/aparser/cifs.struct | 2 +- source3/aparser/parsefn.awk | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/source3/aparser/cifs.struct b/source3/aparser/cifs.struct index 7274ce60f6..d3cee42e68 100644 --- a/source3/aparser/cifs.struct +++ b/source3/aparser/cifs.struct @@ -101,7 +101,7 @@ typedef struct { /* security package if CAP_EXTENDED_SECURITY is */ /* on in the Capabilities field; else challenge */ /* for CIFS challenge/response authentication. */ - string OemDomainName; /*The name of the domain (in OEM chars); not */ + string OemDomainName[+]; /*The name of the domain (in OEM chars); not */ /* present if CAP_EXTENDED_SECURITY is on in the */ /* Capabilities field */ } R_NEGPROT_17; diff --git a/source3/aparser/parsefn.awk b/source3/aparser/parsefn.awk index bff4521ba6..8d8f810319 100644 --- a/source3/aparser/parsefn.awk +++ b/source3/aparser/parsefn.awk @@ -16,6 +16,11 @@ function parse_array(f, v, elnum, flags, v["FLAGS"] = flags; v["ARRAY_LEN"] = array_len; + if (array_len=="+") { + print_template(f,"prs_array_optional.tpl", v); + return; + } + if (array_len=="*") { print_template(f,"prs_array_remainder.tpl", v); return; -- cgit