diff options
author | Tim Potter <tpot@samba.org> | 2004-09-04 01:31:02 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:58:32 -0500 |
commit | 7c583b2adbe47ac0aa5a7e572707eeab488be8e3 (patch) | |
tree | 72004cc9103010f1674af9f9469a84532ce8c8ff /source4/build | |
parent | 26abe13ff7ed5cb3c58e6aef91a3a0632a4be3a9 (diff) | |
download | samba-7c583b2adbe47ac0aa5a7e572707eeab488be8e3.tar.gz samba-7c583b2adbe47ac0aa5a7e572707eeab488be8e3.tar.bz2 samba-7c583b2adbe47ac0aa5a7e572707eeab488be8e3.zip |
r2221: Experiment with extra properties for telling the ethereal parser what
to do. There is a patch to the grammar and idl files for this but I
won't commit that just yet.
(This used to be commit 4e155b966c6027daa34166c7daf30cbff96ff679)
Diffstat (limited to 'source4/build')
-rw-r--r-- | source4/build/pidl/eparser.pm | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/source4/build/pidl/eparser.pm b/source4/build/pidl/eparser.pm index faaf34fe27..9692a9079f 100644 --- a/source4/build/pidl/eparser.pm +++ b/source4/build/pidl/eparser.pm @@ -822,12 +822,18 @@ sub type2ft($) return "FT_BYTES"; } -sub type2base($) +# Determine the display base for an element + +sub elementbase($) { - my($t) = shift; + my($e) = shift; + + if (my $base = util::has_property($e, "display")) { + return "BASE_" . uc($base); + } - return "BASE_DEC", if ($t eq "uint32") or ($t eq "uint16") or - ($t eq "uint8"); + return "BASE_DEC", if ($e->{TYPE} eq "uint32") or + ($e->{TYPE} eq "uint16") or ($e->{TYPE} eq "uint8"); return "BASE_NONE"; } @@ -857,8 +863,8 @@ sub NeededFunction($) 'name' => field2name($e->{NAME}), 'type' => $e->{TYPE}, 'ft' => type2ft($e->{TYPE}), - 'base' => type2base($e->{TYPE}) - }; + 'base' => elementbase($e) + }, if !defined($needed{"hf_$e->{NAME}_$e->{TYPE}"}); $e->{PARENT} = $fn; } else { $needed{"ett_$e->{TYPE}"} = 1; @@ -887,7 +893,7 @@ sub NeededTypedef($) 'name' => field2name($e->{NAME}), 'type' => $e->{TYPE}, 'ft' => type2ft($e->{TYPE}), - 'base' => type2base($e->{TYPE}) + 'base' => elementbase($e) }; $e->{PARENT} = $t->{DATA}; |