Commit Graph

15 Commits

Author SHA1 Message Date
Gilbert Ramirez 0bf0d908ae More small memleak fixes.
colors.c wasn't freeing path in one place
main.c wasn't freeing rc_file
the frame_buffer fix in wtap.c didn't clear everything.

svn path=/trunk/; revision=1001
1999-11-10 19:58:54 +00:00
Guy Harris f3da72ef2f Have "dfilter_compile()" return 0 on success and 1 on failure, and
return the pointer to the compiled filter through a pointer argument.

Have it check whether the filter is a null filter and, if so, free up
the filter and supply a filter pointer, rather than obliging its callers
to check whether the filter actually has any code.  (Well, they may want
to check if the filter is null, so that they don't save a pointer to the
filter text, e.g. so that the display filter displays as "none" rather
than as a blank string in the summary box.)

In the process, fix the check in "gtk/file_dlg.c" that tests whether the
read filter compiled successfully.

svn path=/trunk/; revision=812
1999-10-12 05:01:07 +00:00
Guy Harris 3b9013d393 When a new display filter is to be applied, don't set "cf.dfilter" or
"cf.dfcode" if the new filter doesn't compile, because the filter
currently in effect will be the one that was last applied - just free up
the text of the new filter, and whatever memory was allocated for the
new filter code.

This means we allocate a new dfilter when a new filter is to be applied,
rather than recycling stuff from the old filter, as we want the old
filter code to remain around if the new filter doesn't compile.

This means that "cf.dfilter" and "cf.dfcode" will be null if there's no
filter in effect.

svn path=/trunk/; revision=803
1999-10-11 06:39:26 +00:00
Guy Harris 46def2b1d9 Phil Techau's patch to allocate colors read-only and, if we can't get
that color from the system colormap, get the best color mode from GTK+,
allocate a new colormap, and use that colormap.

svn path=/trunk/; revision=784
1999-10-07 22:50:45 +00:00
Guy Harris 0161298edd Make "create_color_sel_win()" static to "colors.c" - it's not used
outside that file.

svn path=/trunk/; revision=771
1999-10-05 18:10:34 +00:00
Gilbert Ramirez 03b75d6279 Added Santeri Paavolainen's <santtu@ssh.fi> patch to set default colors
in the color selection wheel.

Added his patch to file.c to look for bogus frame_data pointers, but made
it a g_assert().

Modified my previous patch to colors.c to skip bad color display filters.
I skipped them, but they still appeared in the color dialogue. Now bad
filtes are not put into the color filter list, so they don't appear in
the color dialogue. As a [good] side-effect, the next time you save
your color filter list, the bad filters are removed from the colorfilters
file.

svn path=/trunk/; revision=768
1999-10-05 04:34:00 +00:00
Gilbert Ramirez 29cbbd3fc1 Let color filter routines survive a bad display filter. It used to
segfault on a bad colorfilters file. This file now works as expected;
that is, the second filter is ignored:

# DO NOT EDIT THIS FILE!  It was created by Ethereal
@ipx@ipx@[65535,65535,65535][65535,19104,22902]
@bad@bad@[65535,65535,65535][65535,19104,22902]

svn path=/trunk/; revision=765
1999-10-04 15:00:20 +00:00
Laurent Deniel a8dc5a1a0c Replace wrong '}' with ')' in #ifdef code
svn path=/trunk/; revision=667
1999-09-12 14:10:00 +00:00
Gilbert Ramirez 3c49e45cf7 More shuffling of GTK-related files to gtk subdirectory.
svn path=/trunk/; revision=635
1999-09-09 02:42:40 +00:00
Gilbert Ramirez 0d9fcad21c Stop processing of colorization display filters after first match.
Remove debugging statements from colors.c.
Add blurb about Match Selected and Colorization to man page.

svn path=/trunk/; revision=607
1999-08-28 23:47:50 +00:00
Gilbert Ramirez b5ee65e1a8 Removed debug printf's.
svn path=/trunk/; revision=598
1999-08-28 02:18:15 +00:00
Guy Harris 0259c6ec29 "read_filters()" is actually called late enough in the startup process
that it can pop up a message box; have it do so.

Make the "Can't open file" message boxes in "colors.c" include the
"errno" error message in the message they put up.

Don't complain about being unable to open the color filter file if it
doesn't exist (perhaps the user just never made one).

Make the message for a failure to open the preferences file resemble
that for a failure to open a color filter file.

svn path=/trunk/; revision=575
1999-08-25 03:22:46 +00:00
Gilbert Ramirez 882b921a0a Removed unnecessary #include lines.
svn path=/trunk/; revision=569
1999-08-24 23:00:56 +00:00
Guy Harris f7f65443d2 Use "strchr()" rather than "index()" - "strchr()" is the ANSI standard
routine, it's what we use elsewhere in Ethereal, all modern UNIXes have
it, and it's declared in <string.h>, unlike "index()" which isn't
necessarily declared there (and thus we get GCC warnings about "index()"
being undeclared).

svn path=/trunk/; revision=567
1999-08-24 18:53:08 +00:00
Gilbert Ramirez e1bd4fd73f Added John McDermott's colorization routines. There's still some
debug printf's in there.

svn path=/trunk/; revision=562
1999-08-24 16:27:23 +00:00