Remove the (long deprecated) proto_tree_add_*_hidden() functions
[obnox/wireshark/wip.git] / wiretap / toshiba.c
index 086ed50be8e49caf77a14ddf5573ffb94baf6201..a6d67900fef4419eabad29cbced6eca9a70b783e 100644 (file)
@@ -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]) {
@@ -226,15 +226,16 @@ int toshiba_open(wtap *wth, int *err, gchar **err_info _U_)
        wth->snapshot_length = 0; /* not known */
        wth->subtype_read = toshiba_read;
        wth->subtype_seek_read = toshiba_seek_read;
+       wth->tsprecision = WTAP_FILE_TSPREC_CSEC;
 
        return 1;
 }
 
 /* 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;
 
@@ -264,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)
 {
@@ -353,8 +354,8 @@ parse_toshiba_rec_hdr(wtap *wth, FILE_T fh,
        }
 
        if (wth) {
-               wth->phdr.ts.tv_sec = hr * 3600 + min * 60 + sec;
-               wth->phdr.ts.tv_usec = csec * 10000;
+               wth->phdr.ts.secs = hr * 3600 + min * 60 + sec;
+               wth->phdr.ts.nsecs = csec * 10000000;
                wth->phdr.caplen = pkt_len;
                wth->phdr.len = pkt_len;
        }