From eed962c787400641c4e4de55da84d1694ae18b9d Mon Sep 17 00:00:00 2001 From: Cary R Date: Fri, 30 Apr 2010 10:07:39 -0700 Subject: [PATCH] Update lxt_write.h and lxt2_write.h from GTKWave This patch updates the lxt_write.h and lxt2_write.h header files to the latest ones from GTKWave CVS. It also adds HAVE_INTTYPES_H to the vpi_config.h.in header. (cherry picked from commit bf54c838a649392d6c78120519b6f989f74dcd1a) --- vpi/lxt2_write.h | 21 ++++++++++++++++++--- vpi/lxt_write.h | 30 ++++++++++++++++++++++++++++-- vpi/vpi_config.h.in | 3 ++- 3 files changed, 48 insertions(+), 6 deletions(-) diff --git a/vpi/lxt2_write.h b/vpi/lxt2_write.h index eae14e178..3def28424 100644 --- a/vpi/lxt2_write.h +++ b/vpi/lxt2_write.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2004 Tony Bybell. + * Copyright (c) 2003-2010 Tony Bybell. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -23,13 +23,19 @@ #ifndef DEFS_LXTW_H #define DEFS_LXTW_H +#ifdef __cplusplus +extern "C" { +#endif + #include #include #include #include #include #include +#ifdef HAVE_INTTYPES_H #include +#endif #include #ifndef HAVE_FSEEKO @@ -300,11 +306,21 @@ 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); +#ifdef __cplusplus +} +#endif + #endif /* - * $Id: lxt2_write.h,v 1.1.1.1 2007/05/30 04:28:25 gtkwave Exp $ + * $Id: lxt2_write.h,v 1.3 2010/04/27 23:10:56 gtkwave Exp $ * $Log: lxt2_write.h,v $ + * Revision 1.3 2010/04/27 23:10:56 gtkwave + * made inttype.h inclusion conditional + * + * Revision 1.2 2010/02/18 17:27:07 gtkwave + * extern "C" headers / version bump + * * Revision 1.1.1.1 2007/05/30 04:28:25 gtkwave * Imported sources * @@ -312,4 +328,3 @@ int lxt2_wr_emit_value_bit_string(struct lxt2_wr_trace *lt, struct lxt2_wr_sy * initial release * */ - diff --git a/vpi/lxt_write.h b/vpi/lxt_write.h index 76f00b353..8e174303b 100644 --- a/vpi/lxt_write.h +++ b/vpi/lxt_write.h @@ -23,6 +23,10 @@ #ifndef DEFS_LXT_H #define DEFS_LXT_H +#ifdef __cplusplus +extern "C" { +#endif + #include #include #include @@ -31,6 +35,9 @@ #include #include #include +#ifdef HAVE_INTTYPES_H +#include +#endif #ifndef HAVE_FSEEKO #define fseeko fseek @@ -62,8 +69,14 @@ struct dslxt_tree_node { enum lt_zmode_types { LT_ZMODE_NONE, LT_ZMODE_GZIP, LT_ZMODE_BZIP2 }; -typedef unsigned long long lxttime_t; +#ifndef _MSC_VER +typedef uint64_t lxttime_t; #define ULLDescriptor(x) x##ULL +#else +typedef unsigned __int64 lxttime_t; +#define ULLDescriptor(x) x##i64 +#endif + struct lt_timetrail { @@ -246,11 +259,24 @@ int lt_emit_value_double(struct lt_trace *lt, struct lt_symbol *s, unsigned i int lt_emit_value_string(struct lt_trace *lt, struct lt_symbol *s, unsigned int row, char *value); int lt_emit_value_bit_string(struct lt_trace *lt, struct lt_symbol *s, unsigned int row, char *value); +#ifdef __cplusplus +} +#endif + #endif /* - * $Id: lxt_write.h,v 1.1.1.1 2007/05/30 04:28:15 gtkwave Exp $ + * $Id: lxt_write.h,v 1.4 2010/04/27 23:10:56 gtkwave Exp $ * $Log: lxt_write.h,v $ + * Revision 1.4 2010/04/27 23:10:56 gtkwave + * made inttype.h inclusion conditional + * + * Revision 1.3 2010/03/18 17:12:37 gtkwave + * pedantic warning cleanups + * + * Revision 1.2 2010/02/18 17:27:07 gtkwave + * extern "C" headers / version bump + * * Revision 1.1.1.1 2007/05/30 04:28:15 gtkwave * Imported sources * diff --git a/vpi/vpi_config.h.in b/vpi/vpi_config.h.in index eeb3cf4fd..5765e4215 100644 --- a/vpi/vpi_config.h.in +++ b/vpi/vpi_config.h.in @@ -1,7 +1,7 @@ #ifndef __vpi_config_H #define __vpi_config_H /* - * Copyright (c) 2004-2009 Stephen Williams (steve@icarus.com) + * Copyright (c) 2004-2010 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 @@ -21,6 +21,7 @@ # undef HAVE_LIBIBERTY_H # undef HAVE_MALLOC_H +# undef HAVE_INTTYPES_H # undef HAVE_LIBZ # undef HAVE_LIBBZ2 # undef HAVE_FMIN