Get rid of merge_n_files() - it's only called in one place now, and
[obnox/wireshark/wip.git] / filters.c
index 5aaaeb04073de103e89cbfeb2cdb5d7d231e6f9e..cd8d33f0802d53c0e1f18ff9ffc763a752f8f577 100644 (file)
--- a/filters.c
+++ b/filters.c
@@ -1,22 +1,22 @@
 /* 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.
@@ -247,7 +247,7 @@ read_filter_list(filter_list_type_t list, char **pref_path_return,
                line);
       continue;
     }
-         
+
     /* Skip over separating white space, if any. */
     while ((c = getc(ff)) != EOF && isspace(c)) {
       if (c == '\n')
@@ -354,7 +354,7 @@ GList *
 get_filter_list_first(filter_list_type_t list)
 {
   GList      **flp;
-  
+
   flp = get_filter_list(list);
   return g_list_first(*flp);
 }
@@ -364,11 +364,12 @@ get_filter_list_first(filter_list_type_t list)
  * 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);
@@ -385,7 +386,7 @@ remove_from_filter_list(filter_list_type_t list, GList *fl_entry)
 {
   GList      **flp;
   filter_def *filt;
-  
+
   flp = get_filter_list(list);
   filt = (filter_def *) fl_entry->data;
   g_free(filt->name);
@@ -412,7 +413,7 @@ save_filter_list(filter_list_type_t list, char **pref_path_return,
   filter_def *filt;
   FILE       *ff;
   guchar     *p, c;
-  
+
   *pref_path_return = NULL;    /* assume no error */
 
   switch (list) {
@@ -483,7 +484,7 @@ save_filter_list(filter_list_type_t list, char **pref_path_return,
     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.