Update lxt/lxt2 files to latest from GTKWave.
This patch updated the four file lxt_write.{c,h} and
lxt2_write.{c,h} to the latest ones from GTKWave. This
required adding the wavealloc.h include file and an
update to configure.in and vpi/vpi_config.h.in to add
checks/definitions for ALLOCA and FSEEKO.
This commit is contained in:
parent
dba2a6e434
commit
b6f7354cee
|
|
@ -86,6 +86,11 @@ AC_CHECK_LIB(bz2, BZ2_bzdopen, HAVE_LIBBZ2=yes, HAVE_LIBBZ2=no)
|
|||
fi
|
||||
AC_SUBST(HAVE_LIBBZ2)
|
||||
|
||||
# The lxt/lxt2 files from GTKWave use these...
|
||||
|
||||
AC_FUNC_ALLOCA
|
||||
AC_FUNC_FSEEKO
|
||||
|
||||
# valgrind checks
|
||||
AC_ARG_WITH([valgrind], [AC_HELP_STRING([--with-valgrind],
|
||||
[Add valgrind hooks])],
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003-2007 Tony Bybell.
|
||||
* Copyright (c) 2003-2008 Tony Bybell.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -1385,17 +1385,17 @@ if((lt->timegranule>=lt->maxgranule)||(do_finalize)||(early_flush))
|
|||
|
||||
if(using_partial_zip)
|
||||
{
|
||||
off_t clen;
|
||||
off_t c_len;
|
||||
|
||||
gzflush_buffered(lt, 1);
|
||||
fseeko(lt->handle, 0L, SEEK_END);
|
||||
lt->position=ftello(lt->handle);
|
||||
|
||||
clen = lt->position - current_iter_pos - 12;
|
||||
c_len = lt->position - current_iter_pos - 12;
|
||||
fseeko(lt->handle, current_iter_pos, SEEK_SET);
|
||||
|
||||
lt->zpackcount_cumulative+=lt->zpackcount;
|
||||
lxt2_wr_emit_u32(lt, clen);
|
||||
lxt2_wr_emit_u32(lt, c_len);
|
||||
lxt2_wr_emit_u32(lt, lt->zpackcount);
|
||||
}
|
||||
else
|
||||
|
|
@ -2179,3 +2179,18 @@ if(lt)
|
|||
sprintf(lt->zmode, "wb%d", depth);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* $Id: lxt2_write.c,v 1.2 2008/12/20 05:08:26 gtkwave Exp $
|
||||
* $Log: lxt2_write.c,v $
|
||||
* Revision 1.2 2008/12/20 05:08:26 gtkwave
|
||||
* -Wshadow warning cleanups
|
||||
*
|
||||
* Revision 1.1.1.1 2007/05/30 04:28:21 gtkwave
|
||||
* Imported sources
|
||||
*
|
||||
* Revision 1.2 2007/04/20 02:08:18 gtkwave
|
||||
* initial release
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -3,19 +3,19 @@
|
|||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
|
@ -32,12 +32,12 @@
|
|||
#include <inttypes.h>
|
||||
#include <zlib.h>
|
||||
|
||||
#if defined _MSC_VER || defined __MINGW32__
|
||||
#ifndef HAVE_FSEEKO
|
||||
#define fseeko fseek
|
||||
#define ftello ftell
|
||||
#endif
|
||||
|
||||
#define wave_alloca alloca
|
||||
#include <wavealloca.h>
|
||||
|
||||
#define LXT2_WR_HDRID (0x1380)
|
||||
#define LXT2_WR_VERSION (0x0001)
|
||||
|
|
@ -51,7 +51,7 @@
|
|||
#define LXT2_WR_GRAN_SECT_TIME_PARTIAL 2
|
||||
|
||||
#define LXT2_WR_GZWRITE_BUFFER 4096
|
||||
#define LXT2_WR_SYMPRIME 65519
|
||||
#define LXT2_WR_SYMPRIME 500009
|
||||
|
||||
typedef uint64_t lxttime_t;
|
||||
|
||||
|
|
@ -76,12 +76,12 @@ typedef unsigned long long granmsk_t;
|
|||
#define LXT2_WR_GRAN_1VAL (LXT2_WR_ULLDESC(1))
|
||||
#else
|
||||
typedef unsigned int granmsk_t;
|
||||
#define LXT2_WR_GRAN_0VAL (0)
|
||||
#define LXT2_WR_GRAN_0VAL (0)
|
||||
#define LXT2_WR_GRAN_1VAL (1)
|
||||
#endif
|
||||
|
||||
|
||||
enum LXT2_WR_Encodings {
|
||||
enum LXT2_WR_Encodings {
|
||||
LXT2_WR_ENC_0,
|
||||
LXT2_WR_ENC_1,
|
||||
LXT2_WR_ENC_INV,
|
||||
|
|
@ -125,12 +125,12 @@ struct lxt2_wr_ds_tree_node {
|
|||
*/
|
||||
typedef struct lxt2_wr_dslxt_tree_node lxt2_wr_dslxt_Tree;
|
||||
struct lxt2_wr_dslxt_tree_node {
|
||||
lxt2_wr_dslxt_Tree * left, * right;
|
||||
lxt2_wr_dslxt_Tree * left, * right;
|
||||
char *item;
|
||||
unsigned int val;
|
||||
lxt2_wr_dslxt_Tree * next;
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct lxt2_wr_trace
|
||||
{
|
||||
|
|
@ -301,3 +301,15 @@ int lxt2_wr_emit_value_string(struct lxt2_wr_trace *lt, struct lxt2_wr_symbol
|
|||
int lxt2_wr_emit_value_bit_string(struct lxt2_wr_trace *lt, struct lxt2_wr_symbol *s, unsigned int row, char *value);
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* $Id: lxt2_write.h,v 1.1.1.1 2007/05/30 04:28:25 gtkwave Exp $
|
||||
* $Log: lxt2_write.h,v $
|
||||
* Revision 1.1.1.1 2007/05/30 04:28:25 gtkwave
|
||||
* Imported sources
|
||||
*
|
||||
* Revision 1.2 2007/04/20 02:08:18 gtkwave
|
||||
* initial release
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
|||
100
vpi/lxt_write.c
100
vpi/lxt_write.c
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2001-7 Tony Bybell.
|
||||
* Copyright (c) 2001-9 Tony Bybell.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -1178,7 +1178,7 @@ if(lt)
|
|||
lt_emit_u8(lt, lt->initial_value);
|
||||
}
|
||||
|
||||
if((lt->timescale>-129)&(lt->timescale<128))
|
||||
if((lt->timescale>-129)&&(lt->timescale<128))
|
||||
{
|
||||
lt->timescale_offset = lt->position;
|
||||
lt_emit_u8(lt, lt->timescale);
|
||||
|
|
@ -1214,45 +1214,45 @@ if(lt)
|
|||
lt_emit_u8(lt, LT_SECTION_END);
|
||||
|
||||
/* Version 1 */
|
||||
if(lt->change_field_offset) { lt_emit_u32(lt, lt->change_field_offset); lt_emit_u8(lt, LT_SECTION_CHG); }
|
||||
if(lt->sync_table_offset) { lt_emit_u32(lt, lt->sync_table_offset); lt_emit_u8(lt, LT_SECTION_SYNC_TABLE); }
|
||||
if(lt->facname_offset) { lt_emit_u32(lt, lt->facname_offset); lt_emit_u8(lt, LT_SECTION_FACNAME); }
|
||||
if(lt->facgeometry_offset) { lt_emit_u32(lt, lt->facgeometry_offset); lt_emit_u8(lt, LT_SECTION_FACNAME_GEOMETRY); }
|
||||
if(lt->timescale_offset) { lt_emit_u32(lt, lt->timescale_offset); lt_emit_u8(lt, LT_SECTION_TIMESCALE); }
|
||||
if(lt->time_table_offset) { lt_emit_u32(lt, lt->time_table_offset); lt_emit_u8(lt, is64 ? LT_SECTION_TIME_TABLE64 : LT_SECTION_TIME_TABLE); }
|
||||
if(lt->initial_value_offset) { lt_emit_u32(lt, lt->initial_value_offset); lt_emit_u8(lt, LT_SECTION_INITIAL_VALUE); }
|
||||
if(lt->double_test_offset) { lt_emit_u32(lt, lt->double_test_offset); lt_emit_u8(lt, LT_SECTION_DOUBLE_TEST); }
|
||||
if(lt->change_field_offset) { lt_emit_u32(lt, lt->change_field_offset); lt_emit_u8(lt, LT_SECTION_CHG); lt->change_field_offset = 0; }
|
||||
if(lt->sync_table_offset) { lt_emit_u32(lt, lt->sync_table_offset); lt_emit_u8(lt, LT_SECTION_SYNC_TABLE); lt->sync_table_offset = 0; }
|
||||
if(lt->facname_offset) { lt_emit_u32(lt, lt->facname_offset); lt_emit_u8(lt, LT_SECTION_FACNAME); lt->facname_offset = 0; }
|
||||
if(lt->facgeometry_offset) { lt_emit_u32(lt, lt->facgeometry_offset); lt_emit_u8(lt, LT_SECTION_FACNAME_GEOMETRY); lt->facgeometry_offset = 0; }
|
||||
if(lt->timescale_offset) { lt_emit_u32(lt, lt->timescale_offset); lt_emit_u8(lt, LT_SECTION_TIMESCALE); lt->timescale_offset = 0; }
|
||||
if(lt->time_table_offset) { lt_emit_u32(lt, lt->time_table_offset); lt_emit_u8(lt, is64 ? LT_SECTION_TIME_TABLE64 : LT_SECTION_TIME_TABLE); lt->time_table_offset = 0; }
|
||||
if(lt->initial_value_offset) { lt_emit_u32(lt, lt->initial_value_offset); lt_emit_u8(lt, LT_SECTION_INITIAL_VALUE); lt->initial_value_offset = 0; }
|
||||
if(lt->double_test_offset) { lt_emit_u32(lt, lt->double_test_offset); lt_emit_u8(lt, LT_SECTION_DOUBLE_TEST); lt->double_test_offset = 0; }
|
||||
|
||||
/* Version 2 adds */
|
||||
if(lt->zfacname_predec_size) { lt_emit_u32(lt, lt->zfacname_predec_size); lt_emit_u8(lt, LT_SECTION_ZFACNAME_PREDEC_SIZE); }
|
||||
if(lt->zfacname_size) { lt_emit_u32(lt, lt->zfacname_size); lt_emit_u8(lt, LT_SECTION_ZFACNAME_SIZE); }
|
||||
if(lt->zfacgeometry_size) { lt_emit_u32(lt, lt->zfacgeometry_size); lt_emit_u8(lt, LT_SECTION_ZFACNAME_GEOMETRY_SIZE); }
|
||||
if(lt->zsync_table_size) { lt_emit_u32(lt, lt->zsync_table_size); lt_emit_u8(lt, LT_SECTION_ZSYNC_SIZE); }
|
||||
if(lt->ztime_table_size) { lt_emit_u32(lt, lt->ztime_table_size); lt_emit_u8(lt, LT_SECTION_ZTIME_TABLE_SIZE); }
|
||||
if(lt->chg_table_size) { lt_emit_u32(lt, lt->chg_table_size); lt_emit_u8(lt, LT_SECTION_ZCHG_PREDEC_SIZE); }
|
||||
if(lt->zchg_table_size) { lt_emit_u32(lt, lt->zchg_table_size); lt_emit_u8(lt, LT_SECTION_ZCHG_SIZE); }
|
||||
if(lt->zfacname_predec_size) { lt_emit_u32(lt, lt->zfacname_predec_size); lt_emit_u8(lt, LT_SECTION_ZFACNAME_PREDEC_SIZE); lt->zfacname_predec_size = 0; }
|
||||
if(lt->zfacname_size) { lt_emit_u32(lt, lt->zfacname_size); lt_emit_u8(lt, LT_SECTION_ZFACNAME_SIZE); lt->zfacname_size = 0; }
|
||||
if(lt->zfacgeometry_size) { lt_emit_u32(lt, lt->zfacgeometry_size); lt_emit_u8(lt, LT_SECTION_ZFACNAME_GEOMETRY_SIZE); lt->zfacgeometry_size = 0; }
|
||||
if(lt->zsync_table_size) { lt_emit_u32(lt, lt->zsync_table_size); lt_emit_u8(lt, LT_SECTION_ZSYNC_SIZE); lt->zsync_table_size = 0; }
|
||||
if(lt->ztime_table_size) { lt_emit_u32(lt, lt->ztime_table_size); lt_emit_u8(lt, LT_SECTION_ZTIME_TABLE_SIZE); lt->ztime_table_size = 0; }
|
||||
if(lt->chg_table_size) { lt_emit_u32(lt, lt->chg_table_size); lt_emit_u8(lt, LT_SECTION_ZCHG_PREDEC_SIZE); lt->chg_table_size = 0; }
|
||||
if(lt->zchg_table_size) { lt_emit_u32(lt, lt->zchg_table_size); lt_emit_u8(lt, LT_SECTION_ZCHG_SIZE); lt->zchg_table_size = 0; }
|
||||
|
||||
/* Version 4 adds */
|
||||
if(lt->dictionary_offset) { lt_emit_u32(lt, lt->dictionary_offset); lt_emit_u8(lt, LT_SECTION_ZDICTIONARY); }
|
||||
if(lt->zdictionary_size) { lt_emit_u32(lt, lt->zdictionary_size); lt_emit_u8(lt, LT_SECTION_ZDICTIONARY_SIZE); }
|
||||
if(lt->dictionary_offset) { lt_emit_u32(lt, lt->dictionary_offset); lt_emit_u8(lt, LT_SECTION_ZDICTIONARY); lt->dictionary_offset = 0; }
|
||||
if(lt->zdictionary_size) { lt_emit_u32(lt, lt->zdictionary_size); lt_emit_u8(lt, LT_SECTION_ZDICTIONARY_SIZE); lt->zdictionary_size = 0; }
|
||||
|
||||
/* Version 5 adds */
|
||||
if(lt->exclude_offset) { lt_emit_u32(lt, lt->exclude_offset); lt_emit_u8(lt, LT_SECTION_EXCLUDE_TABLE); }
|
||||
if(lt->exclude_offset) { lt_emit_u32(lt, lt->exclude_offset); lt_emit_u8(lt, LT_SECTION_EXCLUDE_TABLE); lt->exclude_offset = 0; }
|
||||
|
||||
/* suffix */
|
||||
lt_emit_u8(lt, LT_TRLID);
|
||||
|
||||
if(lt->symchain)
|
||||
{
|
||||
struct lt_symbol *s = lt->symchain;
|
||||
struct lt_symbol *sc = lt->symchain;
|
||||
struct lt_symbol *s2;
|
||||
|
||||
while(s)
|
||||
while(sc)
|
||||
{
|
||||
free(s->name);
|
||||
s2=s->symchain;
|
||||
free(s);
|
||||
s=s2;
|
||||
free(sc->name);
|
||||
s2=sc->symchain;
|
||||
free(sc);
|
||||
sc=s2;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2288,16 +2288,16 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
|
|||
int legal = 0;
|
||||
int ivalue = 0;
|
||||
int i;
|
||||
char *pnt = value;
|
||||
char *pntv = value;
|
||||
int delta1, delta2;
|
||||
|
||||
for(i=0;i<len;i++)
|
||||
{
|
||||
if((*pnt!='0')&&(*pnt!='1'))
|
||||
if((*pntv!='0')&&(*pntv!='1'))
|
||||
{
|
||||
if((!*pnt)&&(i>0))
|
||||
if((!*pntv)&&(i>0))
|
||||
{
|
||||
pnt--;
|
||||
pntv--;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -2307,9 +2307,9 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
|
|||
}
|
||||
|
||||
ivalue = (((unsigned int)ivalue) << 1);
|
||||
ivalue |= (*pnt & 1);
|
||||
ivalue |= (*pntv & 1);
|
||||
legal = 1;
|
||||
pnt++;
|
||||
pntv++;
|
||||
}
|
||||
s->clk_mask <<= 1;
|
||||
s->clk_mask |= legal;
|
||||
|
|
@ -2585,7 +2585,7 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
|
|||
|
||||
if(!tagadd)
|
||||
{
|
||||
int len = ((s->flags)<_SYM_F_INTEGER) ? 32 : s->len;
|
||||
int len2 = ((s->flags)<_SYM_F_INTEGER) ? 32 : s->len;
|
||||
if((mvl & (LT_MVL_2|LT_MVL_4|LT_MVL_9)) == LT_MVL_2)
|
||||
{
|
||||
int i;
|
||||
|
|
@ -2595,7 +2595,7 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
|
|||
|
||||
pnt = value;
|
||||
|
||||
if((lt->dictmode)&&(len>lt->mindictwidth))
|
||||
if((lt->dictmode)&&(len2>lt->mindictwidth))
|
||||
{
|
||||
char *vpnt = value;
|
||||
while ( (*vpnt == '0') && (*(vpnt+1)) ) vpnt++;
|
||||
|
|
@ -2652,7 +2652,7 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
|
|||
}
|
||||
}
|
||||
else
|
||||
for(i=0;i<len;i++)
|
||||
for(i=0;i<len2;i++)
|
||||
{
|
||||
if(*pnt)
|
||||
{
|
||||
|
|
@ -2661,7 +2661,7 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
|
|||
}
|
||||
outval |= (thisval<<bitpos);
|
||||
bitpos--;
|
||||
if((bitpos==-1)||(i==len-1))
|
||||
if((bitpos==-1)||(i==len2-1))
|
||||
{
|
||||
lt->lt_emit_u8(lt, outval);
|
||||
outval = 0;
|
||||
|
|
@ -2679,7 +2679,7 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
|
|||
|
||||
pnt = value;
|
||||
|
||||
for(i=0;i<len;i++)
|
||||
for(i=0;i<len2;i++)
|
||||
{
|
||||
if(*pnt)
|
||||
{
|
||||
|
|
@ -2695,7 +2695,7 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
|
|||
}
|
||||
outval |= (thisval<<bitpos);
|
||||
bitpos-=2;
|
||||
if((bitpos==-2)||(i==len-1))
|
||||
if((bitpos==-2)||(i==len2-1))
|
||||
{
|
||||
lt->lt_emit_u8(lt, outval);
|
||||
outval = 0;
|
||||
|
|
@ -2713,7 +2713,7 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
|
|||
|
||||
pnt = value;
|
||||
|
||||
for(i=0;i<len;i++)
|
||||
for(i=0;i<len2;i++)
|
||||
{
|
||||
if(*pnt)
|
||||
{
|
||||
|
|
@ -2739,7 +2739,7 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
|
|||
}
|
||||
outval |= (thisval<<bitpos);
|
||||
bitpos-=4;
|
||||
if((bitpos==-4)||(i==len-1))
|
||||
if((bitpos==-4)||(i==len2-1))
|
||||
{
|
||||
lt->lt_emit_u8(lt, outval);
|
||||
outval = 0;
|
||||
|
|
@ -2812,3 +2812,23 @@ if((lt)&&(lt->dumpoff_active))
|
|||
lt->dumpoff_active = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* $Id: lxt_write.c,v 1.4 2009/03/29 00:50:00 gtkwave Exp $
|
||||
* $Log: lxt_write.c,v $
|
||||
* Revision 1.4 2009/03/29 00:50:00 gtkwave
|
||||
* update lt_close() to zero out written section offset/size.
|
||||
*
|
||||
* Revision 1.3 2009/03/29 00:05:23 gtkwave
|
||||
* fixed & to && in if() comparison
|
||||
*
|
||||
* Revision 1.2 2008/12/20 05:08:26 gtkwave
|
||||
* -Wshadow warning cleanups
|
||||
*
|
||||
* Revision 1.1.1.1 2007/05/30 04:28:14 gtkwave
|
||||
* Imported sources
|
||||
*
|
||||
* Revision 1.2 2007/04/20 02:08:18 gtkwave
|
||||
* initial release
|
||||
*
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -3,19 +3,19 @@
|
|||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
#include <zlib.h>
|
||||
#include <bzlib.h>
|
||||
|
||||
#if defined _MSC_VER || defined __MINGW32__
|
||||
#ifndef HAVE_FSEEKO
|
||||
#define fseeko fseek
|
||||
#define ftello ftell
|
||||
#endif
|
||||
|
|
@ -40,11 +40,11 @@
|
|||
|
||||
typedef struct dslxt_tree_node dslxt_Tree;
|
||||
struct dslxt_tree_node {
|
||||
dslxt_Tree * left, * right;
|
||||
dslxt_Tree * left, * right;
|
||||
char *item;
|
||||
unsigned int val;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#define LT_HDRID (0x0138)
|
||||
#define LT_VERSION (0x0004)
|
||||
|
|
@ -73,7 +73,7 @@ unsigned int position;
|
|||
};
|
||||
|
||||
|
||||
#define LT_SYMPRIME 65519
|
||||
#define LT_SYMPRIME 500009
|
||||
|
||||
#define LT_SECTION_END (0)
|
||||
#define LT_SECTION_CHG (1)
|
||||
|
|
@ -162,7 +162,7 @@ unsigned double_used : 1;
|
|||
unsigned do_strip_brackets : 1;
|
||||
unsigned clock_compress : 1;
|
||||
unsigned dictmode : 1; /* dictionary compression enabled */
|
||||
unsigned zmode : 2; /* for value changes */
|
||||
unsigned zmode : 2; /* for value changes */
|
||||
unsigned emitted : 1; /* gate off change field zmode changes when set */
|
||||
};
|
||||
|
||||
|
|
@ -233,9 +233,9 @@ void lt_set_dumpoff(struct lt_trace *lt);
|
|||
void lt_set_dumpon(struct lt_trace *lt);
|
||||
|
||||
/*
|
||||
* value change functions..note that if the value string len for
|
||||
* lt_emit_value_bit_string() is shorter than the symbol length
|
||||
* it will be left justified with the rightmost character used as
|
||||
* value change functions..note that if the value string len for
|
||||
* lt_emit_value_bit_string() is shorter than the symbol length
|
||||
* it will be left justified with the rightmost character used as
|
||||
* a repeat value that will be propagated to pad the value string out:
|
||||
*
|
||||
* "10x" for 8 bits becomes "10xxxxxx"
|
||||
|
|
@ -247,3 +247,15 @@ int lt_emit_value_string(struct lt_trace *lt, struct lt_symbol *s, unsigned i
|
|||
int lt_emit_value_bit_string(struct lt_trace *lt, struct lt_symbol *s, unsigned int row, char *value);
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* $Id: lxt_write.h,v 1.1.1.1 2007/05/30 04:28:15 gtkwave Exp $
|
||||
* $Log: lxt_write.h,v $
|
||||
* Revision 1.1.1.1 2007/05/30 04:28:15 gtkwave
|
||||
* Imported sources
|
||||
*
|
||||
* Revision 1.2 2007/04/20 02:08:18 gtkwave
|
||||
* initial release
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
|
||||
/* The vpi_config.h include must be before the lxt_write.h include! */
|
||||
# include "vpi_config.h"
|
||||
# include "lxt_write.h"
|
||||
# include "sys_priv.h"
|
||||
# include "vcd_priv.h"
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
|
||||
/* The vpi_config.h include must be before the lxt2_write.h include! */
|
||||
# include "vpi_config.h"
|
||||
# include "lxt2_write.h"
|
||||
# include "sys_priv.h"
|
||||
# include "vcd_priv.h"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef __vpi_config_H
|
||||
#define __vpi_config_H
|
||||
/*
|
||||
* Copyright (c) 2004-2008 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2004-2009 Stephen Williams (steve@icarus.com)
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
* and/or modify it in source code form under the terms of the GNU
|
||||
|
|
@ -27,6 +27,10 @@
|
|||
# undef HAVE_FMAX
|
||||
# undef WORDS_BIGENDIAN
|
||||
|
||||
/* These two are needed by the lxt and lxt2 files (copied from GTKWave). */
|
||||
# undef HAVE_ALLOCA_H
|
||||
# undef HAVE_FSEEKO
|
||||
|
||||
# undef _LARGEFILE_SOURCE
|
||||
#ifdef _LARGEFILE_SOURCE
|
||||
# define _FILE_OFFSET_BITS 64
|
||||
|
|
|
|||
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* Copyright (c) Tony Bybell 1999.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#ifndef WAVE_ALLOCA_H
|
||||
#define WAVE_ALLOCA_H
|
||||
#include <stdlib.h>
|
||||
#if HAVE_ALLOCA_H
|
||||
#include <alloca.h>
|
||||
#elif defined(__GNUC__)
|
||||
#ifndef __MINGW32__
|
||||
#ifndef alloca
|
||||
#define alloca __builtin_alloca
|
||||
#endif
|
||||
#endif
|
||||
#elif defined(_MSC_VER)
|
||||
#include <malloc.h>
|
||||
#define alloca _alloca
|
||||
#endif
|
||||
#define wave_alloca alloca
|
||||
#endif
|
||||
|
||||
/*
|
||||
* $Id: wavealloca.h,v 1.2 2007/08/26 21:35:50 gtkwave Exp $
|
||||
* $Log: wavealloca.h,v $
|
||||
* Revision 1.2 2007/08/26 21:35:50 gtkwave
|
||||
* integrated global context management from SystemOfCode2007 branch
|
||||
*
|
||||
* Revision 1.1.1.1.2.1 2007/08/06 03:50:50 gtkwave
|
||||
* globals support for ae2, gtk1, cygwin, mingw. also cleaned up some machine
|
||||
* generated structs, etc.
|
||||
*
|
||||
* Revision 1.1.1.1 2007/05/30 04:27:29 gtkwave
|
||||
* Imported sources
|
||||
*
|
||||
* Revision 1.2 2007/04/20 02:08:18 gtkwave
|
||||
* initial release
|
||||
*
|
||||
*/
|
||||
|
||||
Loading…
Reference in New Issue