Commit Graph

26 Commits

Author SHA1 Message Date
Bill Meier 8112ecc321 From beroset:
remove C++ incompatibilities
 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachment #10404

Note: The following parts of the patch had been previously done:
 asn1/snmp/packet-snmp-template.c
 epan/dissectors/packet-snmp.c
 epan/dissectors/packet-x11.c

Also; hostlist_table.c: code under '#ifdef HAVE_GEOIP'
 didn't compile and needed a few additional patches.


svn path=/trunk/; revision=48447
2013-03-21 02:29:09 +00:00
Guy Harris 8ed7a73e22 Fix a bunch of warnings.
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
sizeof.

Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
strtol() and strtoul().

Change some data types to avoid those implicit conversion warnings.

When assigning a constant to a float, make sure the constant isn't a
double, by appending "f" to the constant.

Constify a bunch of variables, parameters, and return values to
eliminate warnings due to strings being given const qualifiers.  Cast
away those warnings in some cases where an API we don't control forces
us to do so.

Enable a bunch of additional warnings by default.  Note why at least
some of the other warnings aren't enabled.

randpkt.c and text2pcap.c are used to build programs, so they don't need
to be in EXTRA_DIST.

If the user specifies --enable-warnings-as-errors, add -Werror *even if
the user specified --enable-extra-gcc-flags; assume they know what
they're doing and are willing to have the compile fail due to the extra
GCC warnings being treated as errors.

svn path=/trunk/; revision=46748
2012-12-26 05:57:06 +00:00
Jakub Zawadzki 78631020b8 Add wtap_pseudo_header union to wtap_pkthdr structure.
Use pkthdr instead of pseudo_header as argument for dissecting.

svn path=/trunk/; revision=45601
2012-10-16 21:50:57 +00:00
Jakub Zawadzki 29235b9d10 Glib type checking might be cheap, but there's no need to do it twice.
(Actually many GtkTreeModel don't check types at all).

svn path=/trunk/; revision=45073
2012-09-23 18:20:42 +00:00
Jakub Zawadzki 2fc1cdeb74 Speedup loading capture files by about 20%-30% (wireshark only)
Right now packetlist model is used only by one treeview,
so we can check if packetlist->view has connected model if no, 
don't emit row-inserted signal.

svn path=/trunk/; revision=45063
2012-09-23 10:57:05 +00:00
Jeff Morriss 3729335973 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45016
2012-09-20 01:48:30 +00:00
Jörg Mayer 12a0aa4849 - Replace packet_list_recreate_visible_rows -> packet_list_recreate_visible_rows_list
- Replace new_packet_list_ -> packet_list_


svn path=/trunk/; revision=44765
2012-09-04 02:35:25 +00:00
Jakub Zawadzki d151a822e3 When inserting row there's no need to call packet_list_get_iter.
Also, don't set iter.user_data[23] in packet_list_get_iter().
We don't use them in packet_list_store.

svn path=/trunk/; revision=44752
2012-09-03 15:21:38 +00:00
Jakub Zawadzki d3537a8905 Use frame_data_compare() to compare frame numbers.
svn path=/trunk/; revision=44493
2012-08-14 16:57:32 +00:00
Jakub Zawadzki b90fabe60d Make columnized and colorized bit field.
svn path=/trunk/; revision=44034
2012-07-26 09:36:15 +00:00
Jakub Zawadzki d9b0f40749 Add checks if stamp values matches. Remove packet_list_visible_record
svn path=/trunk/; revision=44033
2012-07-26 09:20:05 +00:00
Jakub Zawadzki 937ea48213 physical_pos is now used only for checks, ifdef it in PACKET_PARANOID_CHECKS to save some memory
svn path=/trunk/; revision=44032
2012-07-26 09:19:52 +00:00
Jakub Zawadzki c5bc6afb0c Exploit short-circuit evaluation, so first check variable, later call function
svn path=/trunk/; revision=44031
2012-07-26 09:19:37 +00:00
Jakub Zawadzki 83821d08b3 Move checks outside loop
svn path=/trunk/; revision=44030
2012-07-26 09:19:22 +00:00
Jakub Zawadzki 5d14f7e7f2 Pass record to packet_list_change_record() not physical_pos
svn path=/trunk/; revision=44029
2012-07-26 09:19:03 +00:00
Jakub Zawadzki 6349999757 Allocate col_text & col_text_len only for columns not based on frame_data
svn path=/trunk/; revision=44006
2012-07-25 18:01:42 +00:00
Jakub Zawadzki 59de6c3a8f Remove packet_list->column_types
svn path=/trunk/; revision=44005
2012-07-25 18:00:38 +00:00
Jakub Zawadzki fce74c732b Make PacketListRecord structure private.
svn path=/trunk/; revision=44004
2012-07-25 17:59:56 +00:00
Jakub Zawadzki 7d900f7450 Fix bug #7347: "Resize All Columns" fails in Time Column
If column is based on frame data packet_list_get_widest_column_string() 
was constructing his own frame_data with biggest *value* for given column
(which might be not the longest string) and later fill column for it.

Which generally should work (time precision is fixed),
but in r41185 to lot col_*() function was added check if fd->flags.has_ts is set.
packet_list_get_widest_column_string() was passing frame_data with flags.has_ts unset.

To make maintaince easier, instead of fixing the problem with flags.has_ts,
generate column buffer for each frame, and find the one which has longest string.


svn path=/trunk/; revision=43991
2012-07-25 12:52:47 +00:00
Guy Harris c5ccddaa25 Need old-gtk-compat.h for gtk_widget_get_window() in older versions of
GTK+.

svn path=/trunk/; revision=43838
2012-07-19 23:08:18 +00:00
Gerald Combs 0da59a0058 Pass {delayed_}create_progress_dlg a pointer the top level window
so that we can properly associate a widget with create, update, and
destroy events. Only used by Qt so far but it should be easy enough to
add to GTK+.

Rename ui/qt/progress_dialog.{h,cpp} to progress_bar.{h,cpp}. Show a
progress bar in the status bar of the main window instead of creating
a separate dialog. Note that we still need to add a "cancel" mechanism
and display the task and item titles somewhere.

Thus began the War Against Gratuitous Dialogs.

svn path=/trunk/; revision=43833
2012-07-19 21:49:52 +00:00
Jakub Zawadzki 39f1f0bcb7 Fix r43338 once again :(
svn path=/trunk/; revision=43342
2012-06-18 21:33:08 +00:00
Jakub Zawadzki fc881f6f37 Fix r43338
svn path=/trunk/; revision=43339
2012-06-18 20:15:42 +00:00
Jakub Zawadzki 6d06c68247 Change record->col_text_len type to unsigned short.
Maximal length of column is defined as 256, for COL_INFO it's 4096, 
so limiting it to 65535 bytes in GUI is OK.

XXX To save memory more, we could make col_text_len[] member of PacketList, not PacketListRecord.

svn path=/trunk/; revision=43338
2012-06-18 19:35:34 +00:00
Guy Harris d7b2aad043 Move some headers for UI stuff, and the alert_box.c UI-specific file, to
the ui directory.  (Perhaps some other files that would be used by all
flavors of Wireshark, for any GUI toolkit or for someting such as
ncurses, and not for any command-line tool such as TShark, should be
moved there as well.)

Shuffle some #includes to put the "ui/XXX.h" includes together.

svn path=/trunk/; revision=40529
2012-01-16 01:07:52 +00:00
Jörg Mayer be706c6380 Move gtk to ui/gtk.
This looses the last checkin to gtk, will add this manually back.

svn path=/trunk/; revision=40518
2012-01-15 21:59:11 +00:00