diff --git a/src/include/ngspice/lxt2_write.h b/src/include/ngspice/lxt2_write.h index 7f2c6d134..21769798d 100644 --- a/src/include/ngspice/lxt2_write.h +++ b/src/include/ngspice/lxt2_write.h @@ -33,17 +33,10 @@ extern "C" { #include #include #include -#ifdef HAVE_INTTYPES_H #include -#endif #include -#ifndef HAVE_FSEEKO -#define fseeko fseek -#define ftello ftell -#endif - -#include +#define wave_alloca alloca #define LXT2_WR_HDRID (0x1380) #define LXT2_WR_VERSION (0x0001) @@ -260,6 +253,8 @@ unsigned int chg[LXT2_WR_GRANULE_SIZE]; #define LXT2_WR_SYM_F_WIRE (1<<15) #define LXT2_WR_SYM_F_REG (1<<16) +void lxt2_init(runDesc *run); +void lxt2_end(runDesc *run); /* file I/O */ struct lxt2_wr_trace * lxt2_wr_init(const char *name); @@ -309,6 +304,16 @@ int lxt2_wr_emit_value_double(struct lxt2_wr_trace *lt, struct lxt2_wr_symbol int lxt2_wr_emit_value_string(struct lxt2_wr_trace *lt, struct lxt2_wr_symbol *s, unsigned int row, char *value); int lxt2_wr_emit_value_bit_string(struct lxt2_wr_trace *lt, struct lxt2_wr_symbol *s, unsigned int row, char *value); +typedef struct lxt2_s { + struct lxt2_wr_trace *file; + struct lxt2_wr_symbol **evt_table; + int *evt_indexmap; + int evt_num; + struct lxt2_wr_symbol **kvl_table; + int *kvl_indexmap; + int kvl_num; +} lxt2_t; + #ifdef __cplusplus } #endif diff --git a/src/spicelib/analysis/lxt2_write.c b/src/spicelib/analysis/lxt2_write.c index b50aa2359..3519023f1 100644 --- a/src/spicelib/analysis/lxt2_write.c +++ b/src/spicelib/analysis/lxt2_write.c @@ -24,8 +24,8 @@ #pragma alloca #endif -#include -#include "lxt2_write.h" +#include "ngspice/ngspice.h" +#include "ngspice/lxt2_write.h" static char *lxt2_wr_vcd_truncate_bitvec(char *s)