aboutsummaryrefslogtreecommitdiffstats
path: root/prefs.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>1998-10-29 15:59:00 +0000
committerGerald Combs <gerald@wireshark.org>1998-10-29 15:59:00 +0000
commit80787246c01d87f6b2d600d6f20c2c3ee08b5db3 (patch)
treef1f1a3657a358bb6e46300dcc74817076a649a51 /prefs.c
parenta0fbb64bf9fffcabd5e716e65e63774081cd4c91 (diff)
* Fixes for problems with the preference initialization code (Guy)
svn path=/trunk/; revision=77
Diffstat (limited to 'prefs.c')
-rw-r--r--prefs.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/prefs.c b/prefs.c
index 92f3f06f60..e18d64535f 100644
--- a/prefs.c
+++ b/prefs.c
@@ -1,7 +1,7 @@
/* prefs.c
* Routines for handling preferences
*
- * $Id: prefs.c,v 1.8 1998/10/28 21:38:09 gerald Exp $
+ * $Id: prefs.c,v 1.9 1998/10/29 15:59:00 gerald Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -33,6 +33,9 @@
#include <gtk/gtk.h>
+#include <ctype.h>
+#include <errno.h>
+
#include "ethereal.h"
#include "packet.h"
#include "file.h"
@@ -42,7 +45,7 @@
#include "util.h"
/* Internal functions */
-static int set_prefs(gchar*, gchar*);
+static int set_pref(gchar*, gchar*);
static void write_prefs();
static void prefs_main_ok_cb(GtkWidget *, gpointer);
static void prefs_main_save_cb(GtkWidget *, gpointer);
@@ -204,8 +207,10 @@ read_prefs() {
}
if ((pf = fopen(pf_path, "r")) == NULL) {
- simple_dialog(ESD_TYPE_WARN, NULL,
- "Can't open preferences file\n\"%s\".");
+ if (errno != ENOENT) {
+ simple_dialog(ESD_TYPE_WARN, NULL,
+ "Can't open preferences file\n\"%s\".", pf_path);
+ }
return;
}
@@ -333,7 +338,7 @@ write_prefs() {
if ((pf = fopen(pf_path, "w")) == NULL) {
simple_dialog(ESD_TYPE_WARN, NULL,
- "Can't open preferences file\n\"%s\".");
+ "Can't open preferences file\n\"%s\".", pf_path);
return;
}