Update GTKWave files to the latest from GTKWave CVS.
This update fixes a rare bug in the FST file creation process along with a general sync of the files.
This commit is contained in:
parent
4fae068227
commit
a359cc301c
11
vpi/fstapi.c
11
vpi/fstapi.c
|
|
@ -504,6 +504,7 @@ unsigned compress_hier : 1;
|
||||||
unsigned repack_on_close : 1;
|
unsigned repack_on_close : 1;
|
||||||
unsigned skip_writing_section_hdr : 1;
|
unsigned skip_writing_section_hdr : 1;
|
||||||
unsigned size_limit_locked : 1;
|
unsigned size_limit_locked : 1;
|
||||||
|
unsigned section_header_only : 1;
|
||||||
|
|
||||||
/* should really be semaphores, but are bytes to cut down on read-modify-write window size */
|
/* should really be semaphores, but are bytes to cut down on read-modify-write window size */
|
||||||
unsigned char already_in_flush; /* in case control-c handlers interrupt */
|
unsigned char already_in_flush; /* in case control-c handlers interrupt */
|
||||||
|
|
@ -703,6 +704,13 @@ if(xc && !xc->already_in_close && !xc->already_in_flush)
|
||||||
|
|
||||||
xc->already_in_close = 1; /* never need to zero this out as it is freed at bottom */
|
xc->already_in_close = 1; /* never need to zero this out as it is freed at bottom */
|
||||||
|
|
||||||
|
if(xc->section_header_only && xc->section_header_truncpos)
|
||||||
|
{
|
||||||
|
fstFtruncate(fileno(xc->handle), xc->section_header_truncpos);
|
||||||
|
fseeko(xc->handle, xc->section_header_truncpos, SEEK_SET);
|
||||||
|
xc->section_header_only = 0;
|
||||||
|
}
|
||||||
|
|
||||||
xc->skip_writing_section_hdr = 1;
|
xc->skip_writing_section_hdr = 1;
|
||||||
if(!xc->size_limit_locked)
|
if(!xc->size_limit_locked)
|
||||||
{
|
{
|
||||||
|
|
@ -969,6 +977,7 @@ if(xc)
|
||||||
|
|
||||||
fputc(FST_BL_SKIP, xc->handle); /* temporarily tag the section, use FST_BL_VCDATA on finalize */
|
fputc(FST_BL_SKIP, xc->handle); /* temporarily tag the section, use FST_BL_VCDATA on finalize */
|
||||||
xc->section_start = ftello(xc->handle);
|
xc->section_start = ftello(xc->handle);
|
||||||
|
xc->section_header_only = 1; /* indicates truncate might be needed */
|
||||||
fstWriterUint64(xc->handle, 0); /* placeholder = section length */
|
fstWriterUint64(xc->handle, 0); /* placeholder = section length */
|
||||||
fstWriterUint64(xc->handle, xc->is_initial_time ? xc->firsttime : xc->curtime); /* begin time of section */
|
fstWriterUint64(xc->handle, xc->is_initial_time ? xc->firsttime : xc->curtime); /* begin time of section */
|
||||||
fstWriterUint64(xc->handle, xc->curtime); /* end time of section (placeholder) */
|
fstWriterUint64(xc->handle, xc->curtime); /* end time of section (placeholder) */
|
||||||
|
|
@ -1024,6 +1033,7 @@ struct fstWriterContext *xc = (struct fstWriterContext *)ctx;
|
||||||
if((!xc)||(xc->vchn_siz <= 1)||(xc->already_in_flush)) return;
|
if((!xc)||(xc->vchn_siz <= 1)||(xc->already_in_flush)) return;
|
||||||
xc->already_in_flush = 1; /* should really do this with a semaphore */
|
xc->already_in_flush = 1; /* should really do this with a semaphore */
|
||||||
|
|
||||||
|
xc->section_header_only = 0;
|
||||||
scratchpad = malloc(xc->vchn_siz);
|
scratchpad = malloc(xc->vchn_siz);
|
||||||
|
|
||||||
fflush(xc->vchn_handle);
|
fflush(xc->vchn_handle);
|
||||||
|
|
@ -1323,7 +1333,6 @@ if(xc->dump_size_limit)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(!xc->skip_writing_section_hdr)
|
if(!xc->skip_writing_section_hdr)
|
||||||
{
|
{
|
||||||
fstWriterEmitSectionHeader(xc); /* emit next section header */
|
fstWriterEmitSectionHeader(xc); /* emit next section header */
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ union {
|
||||||
|
|
||||||
/* if htyp == FST_HT_VAR */
|
/* if htyp == FST_HT_VAR */
|
||||||
struct fstHierVar {
|
struct fstHierVar {
|
||||||
unsigned char typ; /* FST_VT_VCD_EVENT ... FST_VT_VCD_WOR */
|
unsigned char typ; /* FST_VT_VCD_EVENT ... FST_VT_VCD_REALTIME */
|
||||||
unsigned char direction; /* FST_VD_IMPLICIT ... FST_VD_INOUT */
|
unsigned char direction; /* FST_VD_IMPLICIT ... FST_VD_INOUT */
|
||||||
const char *name;
|
const char *name;
|
||||||
uint32_t length;
|
uint32_t length;
|
||||||
|
|
|
||||||
|
|
@ -996,8 +996,8 @@ if(rgh) lt_recurse_dictionary_free(lt, rgh);
|
||||||
|
|
||||||
static int lt_dictval_compare(const void *v1, const void *v2)
|
static int lt_dictval_compare(const void *v1, const void *v2)
|
||||||
{
|
{
|
||||||
const dslxt_Tree *s1 = *(const dslxt_Tree * const *)v1;
|
dslxt_Tree *s1 = *(dslxt_Tree **)v1;
|
||||||
const dslxt_Tree *s2 = *(const dslxt_Tree * const *)v2;
|
dslxt_Tree *s2 = *(dslxt_Tree **)v2;
|
||||||
|
|
||||||
if(s1->val > s2->val) return(1); else return(-1); /* they're *never* equal */
|
if(s1->val > s2->val) return(1); else return(-1); /* they're *never* equal */
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue