Commit Graph

37 Commits

Author SHA1 Message Date
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Guy Harris db25270df8 Move the epan/filesystem.c routines to wsutil; they're not specific to
packet dissection, they're specific to the entire Wireshark suite of
programs.

svn path=/trunk/; revision=53377
2013-11-17 02:55:14 +00:00
Jeff Morriss c2ced4a2ab Don't try to open <home>/.wireshark on Windows: Wireshark hasn't written to
that directory since 2001 and reading from that directory was only left in for
backwards compatibility with versions prior to r4702.  I think it's now safe
to remove that backwards compatibility.

This eliminates the last argument of get_persconffile_path().

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8437

svn path=/trunk/; revision=48797
2013-04-09 02:48:03 +00:00
Jeff Morriss 3551a86c36 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45015
2012-09-20 01:29:52 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Guy Harris df7289bb99 Note that, given that ws_rename() is a wrapper around ws_stdio_rename()
on Windows, and that ws_stdio_rename() uses MoveFileEx() with
MOVEFILE_REPLACE_EXISTING and should therefore remove the target if it
exists, the extra "remove the target first" stuff should not be
necessary on Windows - if we remove it, it also keeps the code from
removing the target and then having the rename fail, with the result
that the target no longer exists.

svn path=/trunk/; revision=42776
2012-05-22 10:05:01 +00:00
Michael Tüxen 59891bb9e4 Use g_list_first() to find the first element in the list.
svn path=/trunk/; revision=39409
2011-10-13 20:13:52 +00:00
Guy Harris 1affa29048 Squelch some compiler warnings.
svn path=/trunk/; revision=32313
2010-03-27 18:27:17 +00:00
Stig Bjørlykke 2f199b9d96 Made some functions static.
svn path=/trunk/; revision=30616
2009-10-19 14:21:11 +00:00
Jeff Morriss a5cee04fad Move the file utility functions from wiretap to libwsutil so that
libwireshark (and the plugins using those functions) do not depend on
wiretap on Windows.

While doing that, rename the eth_* functions to ws_*.

svn path=/trunk/; revision=25354
2008-05-22 15:46:27 +00:00
Jeff Morriss 2389b57232 get_datafile_path() and get_persconffile_path() return malloc'd memory,
free it when we're done with the file name.

svn path=/trunk/; revision=24478
2008-02-26 19:13:43 +00:00
Stig Bjørlykke a2d1e9005d This patch adds support for configuration profiles, which can be used to
configure and use more than one set of preferences and configuration files.

This can be found in the "Configuration Profiles..." menu item from the Edit
menu, or by pressing Shift-Ctrl-A.  It's also possible to start wireshark
and tshark with a named profile by using the "-C ProfileName" option.
A new status pane in the main window will show the current profile.

The configuration files currently stored in the Profiles are:
- Preferences
- Capture Filters
- Display Filters
- Coloring Rules
- Disabled Protocols
- User Accessible Tables

The recent data are by design not added to the profile.

Planned future enhancements:
- make a more convenient function to switch between profiles
- add a "clone profile" button to copy an existing profile
- make the profiles list active and accept return as OK
- save users "Decode as" in the profile
- make new, clone and deletion of profiles more secure
- make some of the recent values available in the profile

This patch also fixes:
- setting default status pane sizes
- a bug setting status pane for packets when not having main lower pane.

svn path=/trunk/; revision=24089
2008-01-14 16:40:23 +00:00
Ulf Lamping 889a082501 Change the filter dialog (capture and display filters), so it has a real Cancel button now - the former Close button didn't reverted the changes done.
svn path=/trunk/; revision=19390
2006-10-01 17:59:30 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
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 0dc9fb3d4a various code cleanup:
-use g_snprintf instead of sprintf and snprintf
-use g_strdup_printf where appropriate
-remove #include "snprintf.h" (as only g_snprintf should be used)
-replace some more alloc/realloc/calloc/free with their glib pendants

svn path=/trunk/; revision=15264
2005-08-08 18:50:39 +00:00
Guy Harris b003633f3b "read_filter_list()" and "save_filter_list()" mallocate the path string
that they return through the "pref_path_return" argument; make it a
"char **", as a pointer to a "char *" is passed to it, and the caller
has to free that.

svn path=/trunk/; revision=15249
2005-08-06 18:42:07 +00:00
Jörg Mayer 62b7cc3043 Last set of char -> const char trivial warning fixes.
svn path=/trunk/; revision=15244
2005-08-06 14:03:14 +00:00
Ulf Lamping d77f558c59 Try to read the "cfilters"/"dfilters" config files from the global path (program dir), if no personal versions of these files are available.
This is the same behaviour, as we do it for the colorfilters/preferences/... files already.

svn path=/trunk/; revision=14594
2005-06-09 06:58:03 +00:00
Guy Harris f23f4ecf04 Use _WIN32 rather than WIN32 to determine if we're compiling on Win32;
according to Gisle Vanem, WIN32 isn't a built-in in MSVC, but _WIN32 is.

svn path=/trunk/; revision=11972
2004-09-11 23:03:36 +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 64bc566ea8 In GTK+ 2.x, "gtk_entry_get_text()" returns a "const gchar *"; assign
its value to pointer-to-const variables.

svn path=/trunk/; revision=9161
2003-12-04 00:45:39 +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
Guy Harris ee5ca25d31 Include files from the "epan" directory and subdirectories thereof with
"epan/..." pathnames, so as to avoid collisions with header files in any
of the directories in which we look (e.g., "proto.h", as some other
package has its own "proto.h" file which it installs in the top-level
include directory).

Don't add "-I" flags to search "epan", as that's no longer necessary
(and we want includes of "epan" headers to fail if the "epan/" is left
out, so that we don't re-introduce includes lacking "epan/").

svn path=/trunk/; revision=4586
2002-01-21 07:37:49 +00:00
Guy Harris 509f30374e Have a routine that takes a file name for a personal configuration file
and generates the path name; have it, if the file is to be opened for
reading on Win32, check whether it exists and, if not, check for it in
the old home directory-based configuration directory and, if so, return
that path instead, so that files saved with earlier versions of Ethereal
will be seen.

svn path=/trunk/; revision=4072
2001-10-24 07:18:39 +00:00
Guy Harris cf5a1d86e7 Add a new routine to create the ".ethereal" directory for a user.
Use that routine rather than duplicating that code in the routines to
write out the preference file and filter files.

Use it in the code for the color filter dialog, so that the directory in
question is created if necessary.

As that routine returns an error indication, have the code that calls
that routine put up a message box if the attempt fails.

svn path=/trunk/; revision=4065
2001-10-23 05:01:02 +00:00
Guy Harris e4db9c4b64 Add a routine to get the directory in which personal configuration files
reside.  Use it, rather than concatenating the user's home directory and
".ethereal" in a number of files.

Fix up some additional places to use G_DIR_SEPARATOR_S as the pathname
separator.

svn path=/trunk/; revision=4061
2001-10-22 22:59:26 +00:00
Guy Harris e980dd9d3b Use G_DIR_SEPARATOR_S rather than "/" as a pathname separator in format
strings used to generate pathnames.

Move the definition of PF_DIR from <epan/epan.h> to <epan/filesystem.h>,
so that files requiring only the definition of PF_DIR don't have to
include <epan/epan.h>, and get rid of no-longer-necessary includes of
<epan/epan.h>.

Add a routine to get the directory for "system files" such as
"/etc/ethers" - it's "/etc" on UNIX, and the datafile directory on
Windows (as there's no "/etc" on Windows).  Use that to construct the
pathname of the ethers and ipxnet files.

svn path=/trunk/; revision=4056
2001-10-21 21:48:00 +00:00
Guy Harris 65dc469326 "get_home_dir()", in "epan/filesystem.c", uses
"find_last_pathname_separator()" on Win32; move the other pathname
manipulation routines from "util.c" into "epan/filesystem.c".

Remove from "util.h" the declarations of routines not defined in
"util.c", and put them into "epan/filesystem.h" if they're not already
there.

Adjust #includes to make the above work.

svn path=/trunk/; revision=3241
2001-04-02 09:53:46 +00:00
Guy Harris c31f1a54a6 Win32 doesn't have an "atomic rename" operation of the sort that UNIX
has - or, if it does, it's not "MoveFile()", and "rename()" doesn't use
it, so you have to make sure the target of a rename doesn't exist before
doing the rename.

svn path=/trunk/; revision=3134
2001-03-15 09:50:39 +00:00
Guy Harris d820905672 It's generally considered Bad Form to free something up if you've handed
it to somebody else to use; don't do that.

svn path=/trunk/; revision=3127
2001-03-13 21:25:48 +00:00
Guy Harris cacd37893a Increment the line number for every line seen.
Fix the handling of one error case.

svn path=/trunk/; revision=2981
2001-02-03 06:10:11 +00:00
Guy Harris 0910e8317f Allow filter names and expressions of arbitrary length, and, in the
filter files, escape quotes and backslashes so that quotes and
backslashes in filter names work.

svn path=/trunk/; revision=2980
2001-02-03 06:03:42 +00:00
Guy Harris 22a76b4ca6 Include <direct.h>, if we have it, to declare "mkdir()" on Windows.
svn path=/trunk/; revision=2953
2001-01-28 22:28:31 +00:00
Guy Harris ceef26d2c1 Have separate capture and display filter lists; some filter dialog boxes
use the capture filter lists, and others use the display filter list, as
appropriate.

Have separate menu items for editing the capture and display filter
lists.

Have separate "~/.ethereal/cfilters" and "~/.ethereal/dfilters" files
for the two lists; if either of those files isn't found, we try
"~/.ethereal/filters", which means that you will start out with two
identical lists holding all your filters - if certain filters belong
only in one list, you'll have to delete them by hand from the other
list.

Do I/O error checking when reading and writing filter lists; when
writing a filter list, write it to a new file, and then rename the new
file on top of the old file, so that you don't lose your old filter list
if, for example, you run out of disk space or disk quota.

svn path=/trunk/; revision=2948
2001-01-28 09:13:10 +00:00
Guy Harris 3c596f5d71 Call "get_filter_list()" when Ethereal starts up.
Have it free up any list of filters we already have before reading in
new filters.

svn path=/trunk/; revision=2947
2001-01-28 04:52:29 +00:00
Guy Harris c8639c08ee Pull the stuff to read and write the list of filter expressions up into
a file in the top-level directory.

svn path=/trunk/; revision=2946
2001-01-28 04:43:26 +00:00