Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Replace TRUE/FALSE with proper ENC_* in proto_tree_add_item(

From: Bill Meier <wmeier@xxxxxxxxxxx>
Date: Tue, 04 Oct 2011 16:33:46 -0400
On 10/4/2011 4:08 PM, Jeff Morriss wrote:

I had a fair amount of luck with the (currently not run)
checkAPIsCalledWithTvbGetPtr() function in checkAPIs.pl . It
definitely is not 100%, but it served my purposes well. It avoids
dealing with parenthesis by assuming the only semi-colon it will find
is the end of the function call ;-).

I imagine regexp'ing for

proto_tree_add_item[^;]*[TRUE|FALSE]\s*\)\s*;

would be sufficient to find offenders.

Yep: I started with the regexp in in checkAPIs.pl:check_hf_entries
(which you did) to get the list of hf_* entries and their types and then went from there in a similar manner as above to find the proto_tree_add_item() entries to be changed.

The code is working nicely.

Thanks !

Bill