/* filters.c
* Code for reading and writing the filters file.
*
- * $Id: filters.c,v 1.14 2002/01/21 07:36:31 guy Exp $
+ * $Id$
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
- *
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
line);
continue;
}
-
+
/* Skip over separating white space, if any. */
while ((c = getc(ff)) != EOF && isspace(c)) {
if (c == '\n')
get_filter_list_first(filter_list_type_t list)
{
GList **flp;
-
+
flp = get_filter_list(list);
return g_list_first(*flp);
}
* Returns a pointer to the newly-added entry.
*/
GList *
-add_to_filter_list(filter_list_type_t list, char *name, char *expression)
+add_to_filter_list(filter_list_type_t list, const char *name,
+ const char *expression)
{
GList **flp;
filter_def *filt;
-
+
flp = get_filter_list(list);
filt = (filter_def *) g_malloc(sizeof(filter_def));
filt->name = g_strdup(name);
{
GList **flp;
filter_def *filt;
-
+
flp = get_filter_list(list);
filt = (filter_def *) fl_entry->data;
g_free(filt->name);
filter_def *filt;
FILE *ff;
guchar *p, c;
-
+
*pref_path_return = NULL; /* assume no error */
switch (list) {
return;
}
-#ifdef WIN32
+#ifdef _WIN32
/* ANSI C doesn't say whether "rename()" removes the target if it
exists; the Win32 call to rename files doesn't do so, which I
infer is the reason why the MSVC++ "rename()" doesn't do so.