Commit Graph

204 Commits

Author SHA1 Message Date
Peter Wu 0492921adc Replace lseek/fstat by ws_lseek64/ws_fstat64
lseek returns an off_t type which is system-dependent. Use ws_lseek64 in
favor of lseek as that supports 64-bit quanities.

Use ws_fstat64 instead of stat to support 64-bit file sizes on Windows.
For the majority of the changes, this makes no difference as they do not
apply to Windows ("ifndef _WIN32"; availability of st_blksize).

There are no other users of "struct stat" besides the portability code
in wsutil. Forbid the use of fstat and lseek in checkAPIs.

Change-Id: I17b930ab9543f21a9d3100f3795d250c9b9ae459
Reviewed-on: https://code.wireshark.org/review/3198
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-25 21:26:01 +00:00
Evan Huus 1387f54c58 Check for __func__ in checkAPIs.pl
Change-Id: I649c69cbf545a8de32d9142c1156db6adb076b63
Reviewed-on: https://code.wireshark.org/review/3078
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-16 01:58:03 +00:00
Jeff Morriss 5aa6cf9dd5 Update my email address in a couple more spots.
Change-Id: I787ae2651a8083bc3082e5cb85dbd849823a16ca
Reviewed-on: https://code.wireshark.org/review/2638
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-06-25 02:15:55 +00:00
Bill Meier e05dc825ba Add a few more ad-hoc validations of the hf[] FIELDCONVERT field.
Change-Id: Icd817a950331a2e7416a28c3d4a5a004d297e6f9
Reviewed-on: https://code.wireshark.org/review/1845
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-06-03 01:40:41 +00:00
Jeff Morriss 343098761f Error out if someone passes the address of a pointer to a *_string to VALS() or RVALS().
Change-Id: I85021b1cba151c16bf0a2d30169cf3dec77780f5
Reviewed-on: https://code.wireshark.org/review/1540
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-07 05:37:40 +00:00
Stig Bjørlykke bd38b3152d Support out-of-source checkapi
Always call $(top_srcdir)/tools/checkAPIs.pl with -sourcedir=$(srcdir)
from Makefile.am to allow out-of-source 'make checkapi'.

Change-Id: I60d7e0079984a8ededdacf4517a0738486fa7973
Reviewed-on: https://code.wireshark.org/review/1294
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-25 04:23:46 +00:00
Guy Harris 80011ec03c Don't se_ allocate strings when mapping addresses to column strings.
This should significantly reduce memory usage, without increasing the
CPU time required to process a capture file in TShark or Wireshark.

As a result, se_address_to_str() is no longer used; eliminate it.

Fixes bug #9949.

Change-Id: I65a112a426c82cc73a957b81384c765c3d14f2c3
Reviewed-on: https://code.wireshark.org/review/1213
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-04-19 14:20:06 +00:00
Hadriel Kaplan dd002649c3 Add tvb_get and proto_tree_add for string-encoded timestamps
This commit adds tvb_get_string_time and proto_tree_add_time_item routines for
getting nstime fields from the tvb when they are encoded in ASCII string form.

The proto_tree_add_time_item routine is also usable for normal
big/little-endian encoded time_t, and has the advantage of retrieving
the value even if there's no proto tree.

It also exposes the routines to Lua, both so that a Lua script can take
advantage of this, but also so I can write a testsuite to test the functions.

Change-Id: I955da10f68f2680e3da3a5be5ad8fdce7ed6808c
Reviewed-on: https://code.wireshark.org/review/1084
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-14 11:47:39 +00:00
Hadriel Kaplan 0a5572ea77 Fix Bug 9951: 'git commit hook isn't calling checkAPIs.pl with arguments for the dissectors'
I recently made a change to packet-rtp.c and inappropriately included
g_error() in it, which the builbots caught during their run of checkAPIs.pl.
But checkAPIs.pl is supposed to catch such things for us before we submit, by
being invoked in the git pre-commit hook.

Apparently though, buildbots call checkAPIs.pl with extra arguments for
different cases... and for packet dissectors it calls it with a '-g abort'
argument, which is how it caught the g_error.

So the "bug" is that the pre-commit hook should invoke checAPIs.pl with that
argument too, for epan/dissectors/packet-*.c files.

Change-Id: Ie8f9dcc55f2248918208dea85a04f67e6bf9829a
Reviewed-on: https://code.wireshark.org/review/953
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-04-14 00:10:20 +00:00
Alexis La Goutte 255eca0c1c Revert Remove check and inverse code to display a error if there is a $Id$
Change-Id: I7061ad312df5079924c927ca95a8fa111c756012
Reviewed-on: https://code.wireshark.org/review/498
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-04-02 08:57:22 +00:00
Hadriel Kaplan 914cbc2f3c Fix checkApis perl script false positive proto_tree_add with ENC_*
In epan/proto.c in function proto_tree_add_split_bits_crumb, the
proto_tree_add_text function is called with one of its arguments
using ENC_BIG_ENDIAN, but it's not an argument for proto_tree_add_text
itself but instead a function being called inside it. checkAPIs.pl
tries to avoid this in check_proto_tree_add_XXX_encoding, by removing
parenthesis arguments, but in this acse there are newlines between
the arguments, causing the regex to not catch them. This commit
fixes the regex.

Change-Id: I70ef79d5436ba2ec04ffdc3d9939c7aa2cdf6a1f
Reviewed-on: https://code.wireshark.org/review/902
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-01 06:09:31 +00:00
Gerald Combs 641eb36dd5 Fix value_string checks in checkAPIs.pl.
Some strings contain semicolons, which meant g36db2df was terminating
our REs too early. Try terminating them with '}' followed by ';'.

Change-Id: I97f63351ef35c91e3123d9abd47576d47fea4b2b
Reviewed-on: https://code.wireshark.org/review/638
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-03-13 17:25:41 +00:00
Gerald Combs 36db2df1c1 Add a check for newlines in value_strings.
Update checkAPIs.pl to look for newlines in value_strings and
enum_val_t's. We now have to perform the check before we strip quoted
strings. Hopefully that won't cause a problem. Rename the check since
we do more than check for NULL termination.

Add modelines.

Fixes bug 9878.

Change-Id: I39dd910db60c7028ea4bdb58e8cfdb239c094748
Reviewed-on: https://code.wireshark.org/review/628
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-03-13 15:54:09 +00:00
Guy Harris 8d234a0d8c More tvbuff API deprecation, comment expansion, and documentation updates.
Do with tvb_get_stringz() what was done with tvb_get_string().

Redo the comments for the string get routines to try to give more detail
in a fashion that's a bit less hard to read.

Warn, in comments, of the problems with using
tvb_get_string()/tvb_get_stringz() (i.e., if your strings are non-ASCII,
all bytes with the 8th bit set are going be replaced by the Unicode
REPLACEMENT CHARACTER, and displayed as such).

Warn, in a comment, of the problems with tvb_get_const_stringz() (i.e.,
it gives you raw bytes, rather than guaranteed-to-be-valid UTF-8).

Update documentation and release notes appropriately.

Change-Id: Ibd3efb92a203861f507ce71bc8d04d19d9d38a93
Reviewed-on: https://code.wireshark.org/review/327
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-02-26 22:04:08 +00:00
Evan Huus 22149c5523 TVB API deprecations and cleanup
- rename tvb_length and similar to tvb_captured_length and similar; leave
  #defines in place for backwards-compat, but mark them clearly as deprecated in
  code comments and in checkAPI
- remove tvb_get_string as C code and just leave a #define in place for
  backwards-compat; mark it clearly as deprecated in code comment and checkAPI
- update READMEs and sample dissector for all of the above
- while in the neighbourhood, make checkAPI skip (and warn) for missing files
  instead of bailing on the whole check, so subsequent files still get checked

Change-Id: I32fc437896ca86ca73e9b49d5f50400adf8ec5ad
Reviewed-on: https://code.wireshark.org/review/311
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-22 15:02:01 +00:00
Jeff Morriss d219887b44 Don't complain if files don't have $Id$ in them.
$Id$ is pretty useless in git so don't enforce it in our source code.

Change-Id: Ie8b1b9627aabbca72c9c1dd93a9a76901e6967eb
Reviewed-on: https://code.wireshark.org/review/203
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-02-13 23:23:02 +00:00
Michael Mann f882b63d97 Some proto_tree_add_xxx functions have a '_' in the function name so make sure they get counted in the proto_tree_add_text percentage.
Makes a few dissectors look a little better.

svn path=/trunk/; revision=54236
2013-12-18 22:10:59 +00:00
Evan Huus d97c9e2ff4 Implement address_to_str which is like ep_address_to_str and se_address_to_str
except it takes a wmem scope instead. Add the two emem equivalents to checkAPI
as (weakly) deprecated.

svn path=/trunk/; revision=53528
2013-11-23 22:17:27 +00:00
Michael Mann 625fbd5f9a Allow a "more complex" algorithm to finding proto_tree_add_text overuse. Disabled by default, but used when I want to go on an add filterability spree. convert_proto_tree_add_text.pl makes these easier to fix, so why not be pickier about the percentages that dissectors use.
svn path=/trunk/; revision=52392
2013-10-06 02:07:47 +00:00
Jörg Mayer 4e74f3a3c3 Don't print a warning about missing svn id when the argument is not
a file. Warn about the "wrong" filetype and continue

svn path=/trunk/; revision=52105
2013-09-16 20:30:34 +00:00
Evan Huus 464bbb1275 Tweak mq macro and checkAPI to avoid false positives - "garbage"
(like a #define) at the beginning of a line before a value_string no longer
matches so a #define that includes the beginning of a value_string doesn't
confuse the script.

svn path=/trunk/; revision=52089
2013-09-15 22:34:36 +00:00
Jörg Mayer 98baf8ba18 Add help option
List options one by one

svn path=/trunk/; revision=52068
2013-09-15 17:50:18 +00:00
Jörg Mayer 05ba7d3afc http://url is NOT a c++ style comment
svn path=/trunk/; revision=52061
2013-09-15 14:49:16 +00:00
Chris Maynard 50bcbef658 OK, all the Makefiles use -build since r41943, so add that option back for now.
svn path=/trunk/; revision=52016
2013-09-13 18:11:29 +00:00
Chris Maynard 051c082a8c Update the comments to match the current usage.
svn path=/trunk/; revision=52015
2013-09-13 18:00:32 +00:00
Chris Maynard 9c7e47fb2e Rename --build to --check-addtext/--nocheck-addtext for clarity.
Add --check-addtext/--nocheck-addtext, --check-hf/--nocheck-hf and --debug to the usage output and format the usage output a little better.

svn path=/trunk/; revision=52006
2013-09-13 16:52:08 +00:00
Evan Huus 47e241f6c4 Make checkAPI notify (warnings only, for now) about deprecated emem functions.
svn path=/trunk/; revision=51782
2013-09-05 12:50:24 +00:00
Michael Mann e2cfb1f173 Make checkAPIs.pl a little more discerning when looking for too many proto_tree_add_text()s. I believe the intent was to ignore "small" dissectors that didn't have enough fields to qualify, but the previous logic ignored dissectors that were (almost) all proto_tree_add_text and no proto_tree_add_xxx.
I'm flexible on the definition of "small" (20 "fields"), but I think checkAPIs should flag the "all proto_tree_add_text" dissectors.

svn path=/trunk/; revision=50385
2013-07-05 14:22:35 +00:00
Martin Kaiser c7dd35dffc flag up a warning if someone includes gcrypt.h instead of wsutil/wsgcrypt.h
svn path=/trunk/; revision=48340
2013-03-16 09:53:19 +00:00
Bill Meier eeb90f99b7 Tweaks:
- Remove comments from the input string before checking hf[] entries;
- Remove code under '#if 0' before doing API checks.

svn path=/trunk/; revision=47447
2013-02-02 15:13:45 +00:00
Jeff Morriss 02a69849b7 Don't do proto_tree_add_ether(..., tvb_get_ptr(...)), just use proto_tree_add_item().
svn path=/trunk/; revision=46598
2012-12-18 22:29:11 +00:00
Jeff Morriss a41c5abab1 Add SET_ADDRESS and SET_ADDRESS_HF to the list of APIs we (may--if we uncomment the code) check for being called with tvb_get_ptr().
svn path=/trunk/; revision=46326
2012-12-02 05:05:04 +00:00
Jeff Morriss 5ee917aea7 As requested by Anders on -dev: check enum_val_t's for NULL termination.
Also check that they are all const.

svn path=/trunk/; revision=46294
2012-11-29 20:25:15 +00:00
Jörg Mayer 30b7b74dde Remove #defines that provided backward source compatibility
for deprecated dissector add/remmove/... functions.

svn path=/trunk/; revision=45000
2012-09-19 07:20:49 +00:00
Bill Meier 5e4bff84d3 Use non-capturing grouping when grouping just for alternatives;
Also: improve error message slightly in the case of a missing NULL termination.

svn path=/trunk/; revision=44826
2012-09-10 01:53:23 +00:00
Jeff Morriss b1a5af9eed string_strings and range_strings must also be {0, NULL} terminated.
Also, remove some tabs.

svn path=/trunk/; revision=44824
2012-09-10 00:48:50 +00:00
Jeff Morriss 1959d4d6bf r43756 said that _snwprintf is banned. Make it so.
svn path=/trunk/; revision=43939
2012-07-23 16:57:16 +00:00
Guy Harris 41be8e4344 Add a local errorCount variable to functions that use it, have them
return it, and use the return value.

svn path=/trunk/; revision=43818
2012-07-19 07:02:00 +00:00
Guy Harris 66ed910844 Yup, that did it. Make use of ENC_ values in non-item proto_tree_add
calls an error.

Fix one case where we weren't counting an error (unregistered ett
variables).

svn path=/trunk/; revision=43817
2012-07-19 04:16:15 +00:00
Jeff Morriss 3d1b5e3474 As suggested by Jakub in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7429#c4 :
Add checks for calls to proto_tree_add_XXX (where XXX != item and a few other
functions) with an encoding (ENC_*) argument.


Also add a comment to checkAddTextCalls() about why 3 loops are used.

svn path=/trunk/; revision=43563
2012-07-03 21:55:55 +00:00
Jakub Zawadzki b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
Jeff Morriss 41242190b0 Prohibit strtod() (as per r 43212).
Replace tabs with spaces (for consistency).

svn path=/trunk/; revision=43213
2012-06-11 19:42:05 +00:00
Anders Broman 3ae9cc81c4 Add more depricated functions
svn path=/trunk/; revision=43040
2012-06-03 18:03:51 +00:00
Jeff Morriss ea9e7c2359 Look only for calls to strlen() within an snprintf() call (not for any file
that has the string "strlen" somewhere after a call to snprintf()).

svn path=/trunk/; revision=42950
2012-05-31 21:19:39 +00:00
Gerald Combs 35c22ed068 If we're feeding the output of strlen to an snprintf-style function
there's a good chance we're doing something wrong.

svn path=/trunk/; revision=42947
2012-05-31 20:12:27 +00:00
Jeff Morriss 7f1ccd46ec Followup to r42823: check for RVALS used without BASE_RANGE_STRING.
Also: identify problematic fields by hf_variable_name instead of name or
abbreviation (the variable name is sure to be unique).

svn path=/trunk/; revision=42826
2012-05-24 14:52:06 +00:00
Jeff Morriss 75c3c92f19 Add a "-build" argument to checkAPIs.pl. Use that argument when building
from makefiles (and thus from the buildbot).

The intention is to be able to tell when a human is running the tool so we
can provide more code-review guidance.

As a starter, enable the "too many proto_tree_add_text() calls" check when
a human is running the tool.

svn path=/trunk/; revision=41943
2012-04-04 20:46:49 +00:00
Bill Meier 3b9d2fcb93 Revise and enable test for hf[] FT_BOOLEAN fields with a non-zero bit mask and with BASE_... in the 'display' field.
svn path=/trunk/; revision=41399
2012-03-07 16:19:24 +00:00
Bill Meier 7504e53a5e Add test for correct usage of hf[] FT_BOOLEAN 'display' field;
(Commented out until all the incorrect usages in Wireshark have been fixed).

svn path=/trunk/; revision=41380
2012-03-06 20:56:51 +00:00
Jeff Morriss 4cd18234d6 Prohibit using anything other than FT_BOOLEANs with true_false_strings.
Prohibit using FT_BOOLEANS with value_strings.

svn path=/trunk/; revision=41364
2012-03-06 02:27:29 +00:00
Bill Meier d0e9923506 g_fprintf() & g_vfprintf() should not be used....
svn path=/trunk/; revision=41181
2012-02-24 19:02:28 +00:00
Jeff Morriss e8ff75961f As suggested by Joerg on the -dev list yesterday: count up the number of
proto_tree_add_text() calls and compare that to the number of
proto_tree_add_<something else>() calls and complain if more than 50%
of the calls are add_text()'s.

proto_tree_add_text() calls whose returned proto_item is used are not counted
as hanging a subtree off a text item is an appropriate use for text items.

I chose 50% because even at that level there are many dissectors with "too many"
proto_tree_add_text()'s.

The function to do all of this is commented out for now for the same reason
plus the fact that it's pretty slow.

svn path=/trunk/; revision=40930
2012-02-08 14:15:01 +00:00
Bill Meier cffa41f052 Update list of deprecated GLib fcns;
Add comment about Wireshark build defines G_DISABLE_DEPRECATED.

svn path=/trunk/; revision=40584
2012-01-19 14:22:46 +00:00
Bill Meier 0908f1c81c Fix a typo; Remove a dup.
svn path=/trunk/; revision=40572
2012-01-18 21:37:55 +00:00
Bill Meier 5940047af0 Update:
- Mark GDK functions which aren't used as 'E'
 - Add GTK functions deprecated after GTK 2.20
 - Add some comments about use of GTK_DISABLE_DEPRECATED
 - reformat
   ...

svn path=/trunk/; revision=40569
2012-01-18 21:08:18 +00:00
Bill Meier 5f2cf1a036 The last GMemChunk usage in Wireshark has been replaced; Error out for any such usage.
svn path=/trunk/; revision=40548
2012-01-16 19:31:44 +00:00
Gerald Combs 5520a452b5 The MSDN page for ZeroMemory recommends using SecureZeroMemory instead,
so do so. Add ZeroMemory to checkAPIs.pl.

svn path=/trunk/; revision=38584
2011-08-17 16:54:24 +00:00
Jörg Mayer 91ad1c8086 Using gtk_tree_view_column_get_cell_renderers is an error now.
svn path=/trunk/; revision=38357
2011-08-05 10:40:45 +00:00
Anders Broman 3e446c629c Update comments.
svn path=/trunk/; revision=38202
2011-07-25 15:55:27 +00:00
Guy Harris 494f9820fb Use gtk_widget_get_has_window() as a wrapper around
GTK_WIDGET_NO_WINDOW() in pre-2.18 versions of GTK+.  Treat calls to
GTK_WIDGET_NO_WINDOW() as an error in checkAPIs.pl.

svn path=/trunk/; revision=38197
2011-07-25 06:40:01 +00:00
Anders Broman a5efd9b3b2 Fix a couple of typos and 'E'' mark functions mapped in old-gtk-compat.h
svn path=/trunk/; revision=38196
2011-07-25 04:13:46 +00:00
Anders Broman 1c09e4a694 Replace deprecated functions.
Udate comments in CheckAPIs

svn path=/trunk/; revision=38185
2011-07-24 16:50:55 +00:00
Anders Broman 6814cd03ee Replace deprecated gdk_pixmap_unref() with g_object_unref().
Update checkAPIs.

svn path=/trunk/; revision=38013
2011-07-14 08:11:16 +00:00
Anders Broman 1f923105f8 Fix more tooltips, mark gtk_tooltips_new with 'E' in checkapi.
svn path=/trunk/; revision=37976
2011-07-11 20:01:28 +00:00
Stig Bjørlykke 8443bbbf75 Replace all strerror() with g_strerror().
Remove our local strerror implementation.
Mark strerror as locale unsafe API.

This fixes bug 5715.

svn path=/trunk/; revision=37812
2011-06-28 09:00:11 +00:00
Anders Broman ca9bb67aa6 Add GDK deprecated functions.
svn path=/trunk/; revision=37765
2011-06-23 13:04:19 +00:00
Jeff Morriss 8ce306faa0 Inspired by one of the changes from r37406 and bug 2794: detect hf abbreviations
with two or more periods in a row.  Fix one case of that.

svn path=/trunk/; revision=37407
2011-05-26 13:32:04 +00:00
Anders Broman 73c91d6fa0 "Upgrade" gtk_combo to 'E'.
svn path=/trunk/; revision=36746
2011-04-21 06:05:55 +00:00
Jeff Morriss 892d734975 Prohibit (memory-unsafe) g_sprintf() and g_vsprintf().
svn path=/trunk/; revision=36390
2011-03-29 01:27:20 +00:00
Anders Broman 49ac7b9759 W -> E for g_clist funktions.
svn path=/trunk/; revision=36171
2011-03-08 19:55:22 +00:00
Jeff Morriss 1e425a1d66 As suggested by Anders: when we detect non-ASCII characters, print the line
number on which we found them.

svn path=/trunk/; revision=36122
2011-03-02 17:18:34 +00:00
Jeff Morriss 2620f18569 There is a better (and faster) way to see if all the members of one list are
in another list: convert the 2nd list to a hash.  This speeds checking for ett_
variables up considerably.

Store the pattern to match ett_ variable names in a variable (since it's used 3
times).

Only match ett_ variable declarations that start on their own line (hopefully to
speed things up a bit).

svn path=/trunk/; revision=35929
2011-02-12 03:53:29 +00:00
Jeff Morriss e13389a2b7 Add a function to verify that ett_ variables are registered (or at least
stored in an array which will hopefully be registered).

This is a work-in-progress, so the function is not called.

It is also EXTREMELY slow on big files.  (Or maybe it's looping...
I haven't yet had the patience to let it finish processing packet-rrc.c .)

svn path=/trunk/; revision=35923
2011-02-11 22:44:29 +00:00
Jeff Morriss d8659693ef Check for places where tvb_bytes_to_str() or tvb_get_bytes_to_str_punct()
should be used (instead of the non-tvb functions with a call to tvb_get_ptr()).

Use those functions in a bunch of places.

svn path=/trunk/; revision=35911
2011-02-11 02:43:07 +00:00
Jeff Morriss 8d03f63e17 Oops, put a comma back
svn path=/trunk/; revision=35910
2011-02-11 02:29:45 +00:00
Jeff Morriss 1a0287a486 Clean up indentation
svn path=/trunk/; revision=35909
2011-02-11 02:27:33 +00:00
Jeff Morriss 7be63e199b Add (commented-out for now) code to check certain function calls for embedded
(in the argument list) calls to tvb_get_ptr().

svn path=/trunk/; revision=35906
2011-02-10 22:53:48 +00:00
Anders Broman 6f598e72e1 White space changes.
svn path=/trunk/; revision=35825
2011-02-04 16:22:37 +00:00
Anders Broman 583d2776f5 Add GTK 2.22 deprecated functions
svn path=/trunk/; revision=35759
2011-02-02 17:11:26 +00:00
Jeff Morriss f09b22e600 Revert 35447 and 35364: remove comments and strings in one regex (so it doesn't get confused by things like /* inside a string). And don't remove comments+strings before checking the hf's.
svn path=/trunk/; revision=35453
2011-01-10 14:43:29 +00:00
Jeff Morriss d6393bba6e Remove the comments and strings separately so that we can check the hf's when the comments are gone but the strings are not.
svn path=/trunk/; revision=35447
2011-01-10 03:04:26 +00:00
Jeff Morriss b0beaec6a1 Prohibit strtoull(): Windows doesn't have it. (Putting this in just saves waiting for the buildbot to complain.)
svn path=/trunk/; revision=35410
2011-01-06 23:23:28 +00:00
Guy Harris e3e9007f28 Let's discourage the use of g_warning in dissectors. Either use one of
the dissector-bug macros, or try your best to dissect a packet that's
"wrong".

svn path=/trunk/; revision=35409
2011-01-06 23:04:48 +00:00
Jeff Morriss 7a5c44beed Check hf entries *after* removing comments (in case there are commented-out entries).
svn path=/trunk/; revision=35364
2011-01-04 18:48:26 +00:00
Jeff Morriss c18d15f9f7 Detect (and error on) NULL or empty abbreviations. Wireshark aborts on the former and warns on the latter.
svn path=/trunk/; revision=35363
2011-01-04 18:43:24 +00:00
Jeff Morriss 67aba31f94 Deprecate dissector_add(), dissector_change(), dissector_delete(),
dissector_get_port_handle(), dissector_reset(), dissector_try_port(),
dissector_try_port_new(), and next_tvb_add_port().

Re-tabify the file.

svn path=/trunk/; revision=35229
2010-12-20 16:39:09 +00:00
Jeff Morriss 9dcabb82c9 Make the hf_ checks errors (they've been running clean for a while now anyway).
svn path=/trunk/; revision=34711
2010-10-30 13:23:58 +00:00
Jeff Morriss 052825d8e6 Fix the blurb regexp (sigh)
svn path=/trunk/; revision=34418
2010-10-08 00:29:17 +00:00
Jeff Morriss 390252fa29 Escape the pipe (alternation) in the display regexp.
svn path=/trunk/; revision=34406
2010-10-07 16:51:25 +00:00
Jeff Morriss 77327f1b6f Tighten the blurb regexp. Check for leading/trailing white space in blurbs. Check for any white space in the abbreviation.
svn path=/trunk/; revision=34405
2010-10-07 16:40:22 +00:00
Jeff Morriss 8947fc6a89 Enable hf checks by default. Add a check to see if the abbreviation is equal to the hf_variable_name.
svn path=/trunk/; revision=34398
2010-10-06 21:54:01 +00:00
Jeff Morriss 4dc93213e3 Don't use a regexp to compare the name to the blurb, just convert them both to lower case before doing the comparison.
svn path=/trunk/; revision=34324
2010-10-02 01:47:16 +00:00
Jeff Morriss c39f840519 When checking hf, do a case-insensitive comparison between the name and the blurb.
svn path=/trunk/; revision=34323
2010-10-02 01:34:31 +00:00
Jeff Morriss d7b10fbe55 Inspired by https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3548 :
Add the option to check hf entries for various problems.  This is disabled by
default for the moment as it's quite noisy.

The regexps may need some additional fine tuning (or maybe simplification),
but they seem to work pretty well.

Arguably this might make more sense in checkhf.pl but it was easier to integrate
into this script.

svn path=/trunk/; revision=34240
2010-09-24 20:26:29 +00:00
Jeff Morriss 2b52159449 Follow up to bug 5209 and rev 34115:
%hh is C99 so remove it from packet-ssl-utils and add it to the banned list
(similar to %ll) in checkAPIs.pl .


svn path=/trunk/; revision=34120
2010-09-15 14:10:25 +00:00
Bill Meier df29b59def All use of deprecated GtkOptionMenu functions fixed: Error if any usage found.
Warn instead of Error for several deprecated GTK functions used recently
 in Wireshark source (1 GtkCombo function and 2 GtkItemFactory functions).
 (ToDo: replace remaining use of GtkCombo and all use of GtkItemFactory).

svn path=/trunk/; revision=33598
2010-07-20 23:58:56 +00:00
Bill Meier eb232c3954 Add a few deprecated GObject fcns;
Fix some typos and capitalization.

svn path=/trunk/; revision=33254
2010-06-18 22:17:43 +00:00
Bill Meier 459eb4eed7 Add deprecated from GLib 2.24
svn path=/trunk/; revision=33247
2010-06-17 18:12:46 +00:00
Bill Meier e636286b3c Add GTK deprecated from GTK 2.20.
svn path=/trunk/; revision=33246
2010-06-17 17:51:52 +00:00
Jeff Morriss ca2a2b6298 Fix the value_string regexp so it doesn't match value_string_ext (which we don't have to check for NULL termination and the like)
svn path=/trunk/; revision=32937
2010-05-24 22:31:51 +00:00