Skip to content

Commit

Permalink
Updateing to latest files from GTKWave
Browse files Browse the repository at this point in the history
  • Loading branch information
caryr committed Aug 17, 2024
1 parent 676b36e commit ff9a520
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion vpi/fstapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ void **JenkinsIns(void *base_i, const unsigned char *mem, uint32_t length, uint3
#define FST_HDR_TIMEZERO_SIZE (8)
#define FST_GZIO_LEN (32768)
#define FST_HDR_FOURPACK_DUO_SIZE (4*1024*1024)
#define FST_ZWRAPPER_HDR_SIZE (1+8+8)

#if defined(__APPLE__) && defined(__MACH__)
#define FST_MACOSX
Expand Down Expand Up @@ -4633,9 +4634,14 @@ if(sectype == FST_BL_ZWRAPPER)
}
#endif

fstReaderFseeko(xc, xc->f, 1+8+8, SEEK_SET);
fstReaderFseeko(xc, xc->f, FST_ZWRAPPER_HDR_SIZE, SEEK_SET);
#ifndef __MINGW32__
fflush(xc->f);
#else
/* Windows UCRT runtime library reads one byte ahead in the file
even with buffering disabled and does not synchronise the
file position after fseek. */
_lseek(fileno(xc->f), FST_ZWRAPPER_HDR_SIZE, SEEK_SET);
#endif

zfd = dup(fileno(xc->f));
Expand Down Expand Up @@ -6185,7 +6191,9 @@ struct fstReaderContext *xc = (struct fstReaderContext *)ctx;
fst_off_t blkpos = 0, prev_blkpos;
uint64_t beg_tim, end_tim, beg_tim2, end_tim2;
int sectype;
#ifdef FST_DEBUG
unsigned int secnum = 0;
#endif
uint64_t seclen;
uint64_t tsec_uclen = 0, tsec_clen = 0;
uint64_t tsec_nitems;
Expand Down Expand Up @@ -6277,7 +6285,9 @@ for(;;)
}

blkpos += seclen;
#ifdef FST_DEBUG
secnum++;
#endif
}

xc->rvat_beg_tim = beg_tim;
Expand Down

0 comments on commit ff9a520

Please sign in to comment.