aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/asn1
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2005-11-06 22:43:25 +0000
committerUlf Lamping <ulf.lamping@web.de>2005-11-06 22:43:25 +0000
commitc3187174bfe39f05c8aa8c6b411952e4b502477d (patch)
tree0eb95991cb932d74ca534ed0df29a3f2f256b1b8 /plugins/asn1
parent4e954caec384454ebf4eb61140c466e8787daabe (diff)
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
Diffstat (limited to 'plugins/asn1')
-rw-r--r--plugins/asn1/packet-asn1.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/asn1/packet-asn1.c b/plugins/asn1/packet-asn1.c
index 090e62e654..43135fc5e4 100644
--- a/plugins/asn1/packet-asn1.c
+++ b/plugins/asn1/packet-asn1.c
@@ -83,6 +83,7 @@
#include <epan/report_err.h>
#include <epan/dissectors/packet-tcp.h>
#include <epan/asn1.h>
+#include "file_util.h"
#ifdef DISSECTOR_WITH_GUI
#include <gtk/gtk.h>
@@ -2729,7 +2730,7 @@ static char eol[] = "\r\n";
(void) log_domain; (void) log_level; (void) user_data; /* make references */
if (logf == NULL && asn1_logfile) {
- logf = fopen(asn1_logfile, "w");
+ logf = eth_fopen(asn1_logfile, "w");
}
if (logf) {
fputs(message, logf);
@@ -2749,7 +2750,7 @@ read_asn1_type_table(const char *filename)
if ((filename == 0) || (strlen(filename) == 0))
return; /* no filename provided */
- f = fopen(filename, "rb");
+ f = eth_fopen(filename, "rb");
if (f == 0) {
/*
* Ignore "file not found" errors if it's the old default
@@ -3858,7 +3859,7 @@ create_message_window(void)
model = gtk_tree_store_new(N_COLUMNS, G_TYPE_STRING, G_TYPE_INT, G_TYPE_INT,
G_TYPE_STRING, G_TYPE_STRING);
- namelist = fopen("namelist.txt", "w");
+ namelist = eth_fopen("namelist.txt", "w");
build_tree_view(model, PDUtree, NULL);
fclose(namelist);
namelist = 0;