Commit Graph

484 Commits

Author SHA1 Message Date
Ulf Lamping c3187174bf replace *a lot* of file related calls by their GLib counterparts. This is necessary for the switch to GTK 2.6 (at least on WIN32).
to do this, I've added file_util.h to wiretap (would file_compat.h be a better name?), and provide compat_macros like eth_open() instead of open(). While at it, move other file related things there, like #include <io.h>, definition of O_BINARY and alike, so it's all in one place.

deleted related things from config.h.win32

As of these massive changes, I'm almost certain that this will break the Unix build. I'll keep an eye on the buildbot so hopefully everything is working again soon.

svn path=/trunk/; revision=16403
2005-11-06 22:43:25 +00:00
Ulf Lamping fafdf68095 from Richard van der Hoff:
Attached is a patch which makes the console log level (warning/message/debug etc) a configurable preference. There's no gui for setting it, but since it's pretty much only going to be useful for developers, I'm sure you'll cope...
----
I've added a small comment to the file output that it has no dialog output

svn path=/trunk/; revision=16205
2005-10-12 21:26:27 +00:00
Ronnie Sahlberg b177f170eb convert to g_snprintf()
also make range_convert_range() return an emem allocated string


svn path=/trunk/; revision=15660
2005-09-01 19:05:00 +00:00
Jörg Mayer 0b845c626f Change the default font size on Unix (etc) to 10 pt, just as it was
already on Windows.
Changed the default font to Monospace, as some Linux distributions did
that already. In case this isn't available on all platforms we will
need to change it back to "fixed medium".

svn path=/trunk/; revision=15372
2005-08-16 06:48:06 +00:00
Jörg Mayer efdd4601ce Fix more "no previous declaration" warnings
svn path=/trunk/; revision=15171
2005-08-02 04:34:35 +00:00
Jörg Mayer 54c470762a Fix 'isn't prototype' warning
svn path=/trunk/; revision=15152
2005-07-30 02:30:05 +00:00
Gerald Combs 200ff9dc52 Pick up some fixes and enhancements from
http://cvs.fedora.redhat.com/viewcvs/rpms/ethereal/FC-4/:

In the LPD dissector, make lpd_client_code a value_string so that we
don't segfault.  Do the same for lpd_server_code, although it's not
strictly necessary.

Check to see if htmlview is installed, and use it as our HTML viewer.

The Fedora RPM has other patches, but I'm not sure if they should
be applied.


svn path=/trunk/; revision=15143
2005-07-29 21:55:45 +00:00
Gerald Combs fcd6156423 Move preference initialization to its own routine and make sure it gets run
when we pass "-G defaultprefs" on the command line.

svn path=/trunk/; revision=15119
2005-07-27 16:25:44 +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
Jörg Mayer 30a8557868 More 'char*' -> 'const char*' changes to fix warnings.
svn path=/trunk/; revision=15015
2005-07-23 11:41:25 +00:00
Jörg Mayer e1c6d9ac3d Fix some warnings (and one of my previous 'fixes')
svn path=/trunk/; revision=14997
2005-07-22 17:57:40 +00:00
Jörg Mayer f67b00ad9a More 'char*' -> 'const char*' warning fixes
svn path=/trunk/; revision=14986
2005-07-22 07:55:51 +00:00
Ulf Lamping ba1d304f7a prefs.c(1218) : warning C4761: integral size mismatch in argument; conversion supplied
prefs.c(1230) : warning C4761: integral size mismatch in argument; conversion supplied
prefs.c(1240) : warning C4761: integral size mismatch in argument; conversion supplied
prefs.c(1245) : warning C4761: integral size mismatch in argument; conversion supplied

svn path=/trunk/; revision=14783
2005-06-26 11:32:02 +00:00
Guy Harris 76258fe8e3 Constify a bunch of structure members and function arguments, to squelch
compiler warnings.

Clean up indentation.

svn path=/trunk/; revision=14739
2005-06-24 01:32:42 +00:00
Gerald Combs 8de654b9ce Make a couple of variables dynamic, as suggested by Ulf.
svn path=/trunk/; revision=14723
2005-06-21 22:02:18 +00:00
Gerald Combs c62e906508 Clear out any leftover preference information. Fix up whitespace.
svn path=/trunk/; revision=14693
2005-06-18 20:57:01 +00:00
Gerald Combs 5489ce999c Change read_prefs() to use GStrings instead of (re)allocating memory
ourselves.  This fixes a potential off-by-one error found by Steve Grubb.

Add two new -G options: defaultprefs and currentprefs.  The first dumps
the default preferences to stdout and the second dumps the user's prefs
to stdout.


svn path=/trunk/; revision=14624
2005-06-13 22:40:11 +00:00
Luis Ontanon 4cd25ccc5e don't use a static buffer for preference values, allocate it, and, if necessary reallocate so that
the string always fits.


svn path=/trunk/; revision=14455
2005-05-27 18:33:09 +00:00
Guy Harris af2aab9ee1 Plug some more small leaks.
svn path=/trunk/; revision=13889
2005-03-24 03:10:31 +00:00
Ulf Lamping 7ccbbdc45c Increase maximum number of characters for a preference/recent key, as the current window names in "recent" file reaches this value.
svn path=/trunk/; revision=13811
2005-03-19 18:11:44 +00:00
Guy Harris 3d5b1d5f13 From Graeme Hewson: rename the global preferences file to "preferences"
(it's now in an "ethereal" directory, so there's no need for it to have
a name that distinguishes it from files for other programs) - if it's
not found as "preferences", try "ethereal.conf" for compatibility - and
update the man pages appropriately.

Fix a typo in the section color filters (the file name is "colorfilters",
not "color filters").

svn path=/trunk/; revision=13559
2005-03-01 00:05:57 +00:00
Guy Harris 66a1da065b Map "llcgprs.ignore_cipher_bit" to "llcgprs.autodetect_cipher_bit".
svn path=/trunk/; revision=13548
2005-02-28 09:21:19 +00:00
Guy Harris 0ccf418724 Add a "get_addr_name()" routine that takes an "address *" and attempts
to resolve it to a name.

Fix up some const-pointer-to-non-const-pointer, and
function-pointer-to-void-*, conversions.

Fix some comments.

svn path=/trunk/; revision=12863
2004-12-30 02:10:24 +00:00
Guy Harris 395bb21901 From Nathan Jennings: add a preference that supplies a prefix for window
titles.

svn path=/trunk/; revision=12657
2004-12-02 11:30:24 +00:00
Guy Harris a053ee960e Have "range_convert_range()" dynamically allocate a string large enough
to hold the representation of the range, rather than imposing a
fixed-size limit on the string.

Check for overflow in "strtoul()" - and use "strtoul()" rather than
"strtol()" for range members.

Clean up indentation.

Get rid of an unnecessary include in <epan/range.h>.

svn path=/trunk/; revision=12323
2004-10-17 01:31:36 +00:00
Guy Harris 01f041efc2 "ssn_range" needs to be a copy of "global_ssn_range", so that it's not
freed if "global_ssn_range" is changed because the preference was
changed.

svn path=/trunk/; revision=12322
2004-10-17 00:51:50 +00:00
Guy Harris 727ad67453 Remove the fixed maximum number of subranges in a range_t; dynamically
allocate them to be large enough.

Add checks that the numbers in the range fit in a guint32.

Check the validity of a range before saving or printing, and report
errors in an alert box.

Clean up white space.

svn path=/trunk/; revision=12320
2004-10-16 23:32:24 +00:00
Ulf Lamping 2aca5ff0b7 fix a bug reported by Eric Wedel: Could not save preferences, as "You have not selected a font" dialog pops up, if no previous preferences file exists.
fix: the default font name for GTK1 Win32 was mispelled (at least for WinXP).

svn path=/trunk/; revision=12314
2004-10-16 09:29:15 +00:00
Guy Harris b2543fed6c Make the nranges member of a range_t be the number of ranges, not the
number of ranges - 1, and update loops that iterate over all the ranges
appropriately.

Make "range_convert_str()" return a success/failure indication, and
check it.  Rewrite it to do more checks, and not to blithely ignore
unknown characters.

svn path=/trunk/; revision=12313
2004-10-16 08:33:40 +00:00
Guy Harris abd16b297f From Jeff Morriss: PREF_RANGE preference type, for ranges of integers.
svn path=/trunk/; revision=12300
2004-10-14 23:45:09 +00:00
Guy Harris eb088099b0 Check the values of the protocol preferences before fetching them; if
any are not valid, pop up an alert box and don't dismiss the preferences
dialog.

svn path=/trunk/; revision=12269
2004-10-12 03:13:17 +00:00
Guy Harris 92ee993e82 "prefs-int.h" belongs in epan, too.
svn path=/trunk/; revision=12168
2004-10-01 08:33:53 +00:00
Guy Harris 7f5b234c5c Move the column preferences stuff to epan (the rest of the preferences
stuff is already there).

Update Gerald's e-mail address in column.h.

svn path=/trunk/; revision=12131
2004-09-29 02:54:22 +00:00
Guy Harris bbe7f89742 Move prefs.c and prefs.h into the epan subdirectory.
svn path=/trunk/; revision=12115
2004-09-27 22:55:15 +00:00