Commit Graph

74 Commits

Author SHA1 Message Date
Bill Meier 161eb8b6d7 Add missing g_object_unref for treeview models;
Remove not needed set_tree_model (stats_tree_stat.c)

svn path=/trunk/; revision=24230
2008-01-31 16:37:56 +00:00
Ronnie Sahlberg 2830cf2045 fix the path to include g_ascii_strcasecmp.h
svn path=/trunk/; revision=23636
2007-11-28 01:23:09 +00:00
Guy Harris 9c89cdaaa3 strcasecmp(), strncasecmp(), g_strcasecmp(), and g_strncasecmp() delenda
est.  Use g_ascii_strcasecmp() and g_ascii_strncasecmp(), and supply our
own versions if they're missing from GLib (as is the case with GLib
1.x).

In the code to build the list of named fields for Diameter, don't use
g_strdown(); do our own g_ascii_-style upper-case to lower-case mapping
in the hash function and use g_ascii_strcasecmp() in the compare
function.

We do this because there is no guarantee that toupper(), tolower(), and
functions that use them will, for example, map between "I" and "i" in
all locales; in Turkish locales, for example, there are, in both
upper case and lower case, versions of "i" with and without a dot, and
the upper-case version of "i" is "I"-with-a-dot and the lower-case
version of "I" is "i"-without-a-dot.  This causes strings that should
match not to match.

This finishes fixing bug 2010 - an earlier checkin prevented the crash
(as there are other ways to produce the same crash, e.g. a bogus
dictionary.xml file), but didn't fix the case-insensitive string matching.

svn path=/trunk/; revision=23623
2007-11-27 18:52:51 +00:00
Guy Harris 1bc049906a Add some GCC warnings to the standard set, and add some others to the
--enable-extra-gcc-checks set.

If we turn on -pedantic, try turning on -Wno-long-long as well, so that
it's not *so* pedantic that it rejects the 64-bit integral data types
that we explicitly require.

Constify a bunch of stuff, and make some other changes, to get rid of
warnings.

Clean up some indentation.

svn path=/trunk/; revision=21526
2007-04-23 10:59:26 +00:00
Stephen Fisher 2ec727ba76 Fix "Gtk-CRITICAL **: gtk_tree_selection_get_selected: assertion
`selection->type != GTK_SELECTION_MULTIPLE' failed" error when
opening the User Specified Decodes with multiple decodes setup.
The problem is caused by the selection mode for the list being
set to multiple.  I changed it to none so that the user doesn't
get the false impression that you can select only certain items
and clear them (the clear button clears them all).


svn path=/trunk/; revision=21287
2007-03-30 22:14:33 +00:00
Graeme Lunt 2fd7d2c620 New "decode as ..." feature for BER-encoded files (WTAP_FILE_BER).
A BER-encoded file can be dissected as one of a number of registered syntaxes (registered using register_ber_syntax_dissector()). 
Syntaxes may also be associated with OIDs (or other strings) using register_ber_oid_syntax(). 

A default syntax with which to dissect a BER-encoded file is determined from its filename (extension). For example, ".cer" and ".crt" files will be dissected as "Certificate".


svn path=/trunk/; revision=20414
2007-01-13 12:59:27 +00:00
Ulf Lamping a1b7a22a8e from Stephen Fisher:
Here is a patch for spelling typos in comments and strings in the gtk/ 
directories.

svn path=/trunk/; revision=19568
2006-10-17 01:29:55 +00:00
Guy Harris 92552c2d76 Get rid of a bunch of "Ethereal"s and "ethereal"s in comments, GUI
strings, and function names.

svn path=/trunk/; revision=18205
2006-05-22 07:29:40 +00:00
Ulf Lamping eafbbbcabb renamed ui_util.c/.h to gui_utils.c/.h to prevent confusion with identical named ui_util.h in / dir
svn path=/trunk/; revision=15465
2005-08-20 12:09:48 +00:00
Ulf Lamping d28861b607 removed tons of MSVC const related warnings.
This might at some places interfere with the changes for gcc4, we might have to negotiate in that case :-)

Please note that a lot of these warnings were GTK1.x related only!

svn path=/trunk/; revision=15286
2005-08-10 19:49:45 +00:00
Guy Harris b8bb6b495c Squelch more const pointer warnings.
svn path=/trunk/; revision=15242
2005-08-06 10:31:27 +00:00
Jörg Mayer 4e1f4b18ab More char -> const char warning fixes.
Removed (very few) casts that only change the warning message
  but don't remove it (with gcc-4).

svn path=/trunk/; revision=15227
2005-08-05 20:59:08 +00:00
Jörg Mayer e9ea42eed9 Fix more "no previous declaration" warnings
svn path=/trunk/; revision=15173
2005-08-02 04:47:15 +00:00
Guy Harris 554f620001 Constify to remove a bunch of warnings. Add some casts to squelch
(presumably-)harmless-but-otherwise-unremovable const-to-nonconst
warnings.

In the TACACS dissector, clean up the variables used in option parsing
to avoid some const-to-nonconst warnings.

Clean up some white space.

svn path=/trunk/; revision=15043
2005-07-24 19:01:28 +00:00
Ulf Lamping 0861927ce3 huge cleanup of capture file API (functions in file.c/file.h).
This includes: all functions in file.h now have a cf_ prefix, will have doxygen tags, will have the capture_file *cf as the first parameter and I tried to generalize the return values for non trivial functions.

Hopefully, I didn't introduced any new bugs, as I had to change a lot of files...

svn path=/trunk/; revision=13289
2005-02-04 18:44:44 +00:00
Ulf Lamping 66ce7f3623 add some more online help functionality and help buttons at various dialog boxes, if a help page *is* available. However, the new help system needs a lot more work before completed.
svn path=/trunk/; revision=13152
2005-01-20 23:17:23 +00:00
Ulf Lamping 5bcad85d01 Again, some warnings removed.
svn path=/trunk/; revision=12842
2004-12-27 13:17:20 +00:00
Michael Tüxen aa4c473ba1 Fix bugs to get it working on gtk1 and gtk2.
Some clean ups.

svn path=/trunk/; revision=12297
2004-10-14 16:23:11 +00:00
Michael Tüxen d2b8a466a0 Support PPID and port number based selection for SCTP. From Irene Ruengeler.
svn path=/trunk/; revision=12284
2004-10-12 18:18:44 +00:00
Guy Harris eaadcc4c62 Move various tables into the epan directory.
svn path=/trunk/; revision=12130
2004-09-29 00:52:45 +00:00
Guy Harris 6ad89dda90 The list of protocols should be sorted in a case-insensitive fashion, so
giFT, iSCSI, and iSNS don't show up at the end.  Protocol short names
are ASCII, so just use "g_ascii_strcasecmp()".

Clean up white space.

svn path=/trunk/; revision=12020
2004-09-16 21:30:51 +00:00
Ulf Lamping f5ba8a6971 sort_iter_compare_func() only needed with GTK2
svn path=/trunk/; revision=11937
2004-09-08 05:55:21 +00:00
Guy Harris bf3516fb3f Squelch a compiler warning.
svn path=/trunk/; revision=11933
2004-09-07 20:10:35 +00:00
Ulf Lamping 62cde11b8b added a Clear button to the Decode As dialog, also added some tooltips
svn path=/trunk/; revision=11929
2004-09-07 19:42:52 +00:00
Ulf Lamping 61d6b8a1ab replace the Cancel with a Close button, as pressing it will not rewind any previously applied operations
svn path=/trunk/; revision=11928
2004-09-07 19:22:17 +00:00
Ulf Lamping 3a51628c0f two bugfixes: sort items in alphabetical order and don't do a OBJECT_GET_DATA on a NULL pointer
svn path=/trunk/; revision=11925
2004-09-07 18:50:26 +00:00
Ulf Lamping 26afcbd9cc First working implementation of "Decode As" for DCE-RPC interface bindings. Ethereal needs to capture the DCE-RPC bind sequence, to get a relationsship between the interface UUID and the current conversation. If this binding wasn't captured, one can use "Decode As" and choose the interface from a list corresponding to a specific conversation. Currently "only" implemented for connectionoriented (TCP) DCE-RPC, but connectionless is a work in progress.
svn path=/trunk/; revision=11924
2004-09-07 16:19:56 +00:00
Ulf Lamping 976a4d9113 next steps for a "Decode As" for DCE-RPC interfaces (commented out)
svn path=/trunk/; revision=11917
2004-09-06 19:56:36 +00:00
Michael Tüxen 3ae576310c Add the capability to chose to remap the fist two PPIDS in each SCTP packet to a different dissector.
svn path=/trunk/; revision=11912
2004-09-06 15:04:27 +00:00
Guy Harris 57d15574ef From Francisco Alcoba: fix a crashing bug caused if you change the
dissection for a given transport protocol port and there's no packet
currently selected.

svn path=/trunk/; revision=11843
2004-08-28 09:54:04 +00:00
Guy Harris f122136663 Don't free something we haven't allocated.
svn path=/trunk/; revision=11829
2004-08-25 05:12:58 +00:00
Michael Tüxen a013213e21 Added initial SCTP support: You can chose how PPID 0 will be handled.
svn path=/trunk/; revision=11769
2004-08-18 14:11:25 +00:00
Guy Harris 8a8b883450 Set the svn:eol-style property on all text files to "native", so that
they have LF at the end of the line on UN*X and CR/LF on Windows;
hopefully this means that if a CR/LF version is checked in on Windows,
the CRs will be stripped so that they show up only when checked out on
Windows, not on UN*X.

svn path=/trunk/; revision=11400
2004-07-18 00:24:25 +00:00
Guy Harris f2cf0c1e0f From Stas Grabois: don't show disabled protocols in the "Add Expression"
and "Decode As" dialogs (so that you can cut down the size of the
protocol lists in those dialogs by disabling "uninteresting" protocols).

svn path=/trunk/; revision=11132
2004-06-10 09:47:25 +00:00
Ulf Lamping 7d37fc9d23 more code cleanup from dialog things:
changed window_xy (dialog) function calling in a lot of gtk files
cleanup of file selection code
cleanup in dlg_utils/file_dlg/ui_util
Please report any problems!!!

svn path=/trunk/; revision=11003
2004-05-26 03:49:24 +00:00
Ulf Lamping 7b62a629e8 replaced sprintf / snprintf by g_snprintf,
various other string related changes

svn path=/trunk/; revision=10373
2004-03-13 15:15:26 +00:00
Ulf Lamping 47b176f983 various string related changes
svn path=/trunk/; revision=10372
2004-03-13 14:07:14 +00:00
Ulf Lamping 5297f06717 replaced every appearance of gtk_scrolled_window_new() with
scrolled_window_new().
added gtk_scrolled_window_set_policy(AUTOMATIC,AUTOMATIC) to
scrolled_window_new()
added GTK2's gtk_scrolled_window_set_shadow(GTK_SHADOW_IN)
to every place needed

svn path=/trunk/; revision=9999
2004-02-06 19:19:12 +00:00
Guy Harris 1980fa5dbf Pass ESD_BTN_OK rather than NULL as a second argument to
"simple_dialog()"; NULL might be #defined to be a pointer expression on
some platforms, causing compiler warnings (and, on platforms where a
null pointer doesn't have all its bits 0, possibly causing misbehavior,
although I don't think there are any such platforms on which Ethereal
runs).

Don't allow 0 as button mask argument to "simple_dialog()".

Squelch a compiler warning.

Report fatal problems as errors, not warnings.

Report file I/O errors with "file_open_error_message()".

Report file write errors (including those reported by "close()", e.g.
some errors writing to an NFS server) when saving raw packet data to a
file.

svn path=/trunk/; revision=9915
2004-01-31 03:22:42 +00:00
Ulf Lamping 8e2a930023 implemented dlg_button_row_new to get a standard function for
layouting the dialog buttons, and use it where appropriate.
This will help us with the GTK1/2 conflict on button layouts and
will also result in a more consistent look of the dialogs at all.

svn path=/trunk/; revision=9771
2004-01-21 21:19:34 +00:00
Ulf Lamping 949f1f2d07 using button compatibility macros
svn path=/trunk/; revision=9636
2004-01-10 16:27:43 +00:00
Guy Harris 31bce668bd More int vs. uint.
svn path=/trunk/; revision=8409
2003-09-07 00:59:07 +00:00
Guy Harris f6c0519c0a Support string dissector tables in the Tethereal "decode as" stuff.
Make the Ethereal "decode as" stuff not blow up with string dissector
tables.

Selectors for uint dissector tables are unsigned, not signed.

svn path=/trunk/; revision=8408
2003-09-07 00:47:57 +00:00
Laurent Deniel 9c27b912d6 Add an "Apply" button to "Decode As" window.
svn path=/trunk/; revision=7243
2003-03-01 13:08:59 +00:00
Olivier Abad 3cd4fed22d Use gtk1/gtk2 compatibility macros.
svn path=/trunk/; revision=6616
2002-11-11 18:57:00 +00:00
Olivier Abad 048ab33a26 Use gtk1/gtk2 compatibility macros to reduce #ifdefs.
svn path=/trunk/; revision=6597
2002-11-09 20:52:39 +00:00
Olivier Abad 05ef1fc475 Merge gtk and gtk2 directories.
svn path=/trunk/; revision=6552
2002-11-03 17:38:45 +00:00
Jörg Mayer 34141201f2 Add (back) some #include <string.h>
svn path=/trunk/; revision=6394
2002-10-10 01:49:21 +00:00
Jörg Mayer e4a2e2cefe Include cleanups in gtk and gtk2:
Remove unneded includes
Add include wrappers where missing

svn path=/trunk/; revision=6191
2002-09-05 18:48:52 +00:00
Jörg Mayer 7c4176d868 Removed trailing whitespaces from .h and .c files using the
winapi_cleanup tool written by Patrik Stridvall for the wine
project.

svn path=/trunk/; revision=6117
2002-08-28 21:04:11 +00:00