Wireshark mailing list archives

Re: Replace TRUE/FALSE with proper ENC_* in proto_tree_add_item() using a script.


From: Bill Meier <wmeier () newsguy com>
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


___________________________________________________________________________
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


Current thread: