/* ethereal.c
*
- * $Id: ethereal.c,v 1.9 1998/10/28 21:38:07 gerald Exp $
+ * $Id: ethereal.c,v 1.10 1998/10/29 15:58:59 gerald Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
cf.snap = 68;
cf.count = 0;
- read_prefs();
-
/* Let GTK get its args */
gtk_init (&argc, &argv);
+ read_prefs();
+
/* Now get our args */
while ((opt = getopt(argc, argv, "b:B:c:hi:m:nP:r:s:t:T:w:v")) != EOF) {
switch (opt) {
/* 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>
#include <gtk/gtk.h>
+#include <ctype.h>
+#include <errno.h>
+
#include "ethereal.h"
#include "packet.h"
#include "file.h"
#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);
}
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;
}
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;
}