diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2006-11-05 22:46:44 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2006-11-05 22:46:44 +0000 |
commit | 59d6c8ea33b703a4282ac6694f2797202b64dfcb (patch) | |
tree | a4abb83c0c20eafb12ab250bcf7f32f74f281b44 /wiretap/toshiba.c | |
parent | ed837bc7a517040020da2717b392a0ca086e276a (diff) |
change all file offsets from long to gint64 so we can - theoretically - handle files > 2GB correct.
Please distclean Win32 builds!
svn path=/trunk/; revision=19814
Diffstat (limited to 'wiretap/toshiba.c')
-rw-r--r-- | wiretap/toshiba.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/wiretap/toshiba.c b/wiretap/toshiba.c index 824b0a1591..a6d67900fe 100644 --- a/wiretap/toshiba.c +++ b/wiretap/toshiba.c @@ -110,8 +110,8 @@ static const char toshiba_rec_magic[] = { '[', 'N', 'o', '.' }; #define TOSHIBA_MAX_PACKET_LEN 16384 static gboolean toshiba_read(wtap *wth, int *err, gchar **err_info, - long *data_offset); -static gboolean toshiba_seek_read(wtap *wth, long seek_off, + gint64 *data_offset); +static gboolean toshiba_seek_read(wtap *wth, gint64 seek_off, union wtap_pseudo_header *pseudo_header, guint8 *pd, int len, int *err, gchar **err_info); static gboolean parse_single_hex_dump_line(char* rec, guint8 *buf, @@ -123,11 +123,11 @@ static int parse_toshiba_rec_hdr(wtap *wth, FILE_T fh, /* Seeks to the beginning of the next packet, and returns the byte offset. Returns -1 on failure, and sets "*err" to the error. */ -static long toshiba_seek_next_packet(wtap *wth, int *err) +static gint64 toshiba_seek_next_packet(wtap *wth, int *err) { int byte; guint level = 0; - long cur_off; + gint64 cur_off; while ((byte = file_getc(wth->fh)) != EOF) { if (byte == toshiba_rec_magic[level]) { @@ -233,9 +233,9 @@ int toshiba_open(wtap *wth, int *err, gchar **err_info _U_) /* Find the next packet and parse it; called from wtap_read(). */ static gboolean toshiba_read(wtap *wth, int *err, gchar **err_info, - long *data_offset) + gint64 *data_offset) { - long offset; + gint64 offset; guint8 *buf; int pkt_len; @@ -265,7 +265,7 @@ static gboolean toshiba_read(wtap *wth, int *err, gchar **err_info, /* Used to read packets in random-access fashion */ static gboolean -toshiba_seek_read (wtap *wth, long seek_off, +toshiba_seek_read (wtap *wth, gint64 seek_off, union wtap_pseudo_header *pseudo_header, guint8 *pd, int len, int *err, gchar **err_info) { |