wireshark-dev October 2011 archive
Main Archive Page > Month Archives  > wireshark-dev archives
wireshark-dev: Re: [Wireshark-dev] Replace TRUE/FALSE with prope

Re: [Wireshark-dev] Replace TRUE/FALSE with proper ENC_* in proto_tree_add_item() using a script.

From: Bill Meier <wmeier_at_nospam>
Date: Tue Oct 04 2011 - 20:33:46 GMT
To: Developer support list for Wireshark <wireshark-dev@wireshark.org>

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

___________________________________________________________________________
Sent via: Wireshark-dev mailing list <wireshark-dev@wireshark.org>
Archives: http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@wireshark.org?subject=unsubscribe