[Pkg-electronics-commits] [gtkwave] 01/03: Imported Upstream version 3.3.66
أحمد المحمودي (Ahmed El-Mahmoudy)
aelmahmoudy at sabily.org
Mon Jul 13 12:02:16 UTC 2015
This is an automated email from the git hooks/post-receive script.
aelmahmoudy-guest pushed a commit to branch master
in repository gtkwave.
commit b7966b8013d598737f1c9a3bea0521fc7587d74d
Author: أحمد المحمودي (Ahmed El-Mahmoudy) <aelmahmoudy at users.sourceforge.net>
Date: Mon Jul 13 11:58:19 2015 +0200
Imported Upstream version 3.3.66
---
ChangeLog | 9 +
LICENSE.TXT | 2 +-
configure | 114 ++++--------
configure.ac | 36 ++--
contrib/bundle_for_osx/Info-gtkwave.plist | 6 +-
contrib/fsdb2vcd/fsdb2vcd_fast.cc | 2 +-
src/Makefile.in | 2 +-
src/extload.c | 284 +++++++++++++++++++++++++-----
src/fsdb_wrapper_api.cc | 9 +-
src/fsdb_wrapper_api.h | 3 +-
src/fst.c | 2 +-
src/ghw.c | 2 +-
src/globals.c | 4 +
src/globals.h | 4 +
src/helpers/fst/fstapi.c | 28 +--
src/helpers/shmidcat.c | 15 +-
src/helpers/vcd2fst.c | 5 +
src/helpers/vcd2vzt.c | 13 +-
src/helpers/vzt_read.c | 6 +-
src/helpers/vzt_write.c | 8 +-
src/main.c | 34 ++--
src/markerbox.c | 16 +-
src/menu.c | 6 +-
src/rc.c | 4 +-
src/renderopt.c | 12 +-
src/savefile.c | 4 +-
src/savefile.h | 4 +-
src/search.c | 4 +-
src/strace.c | 4 +-
src/vcd_recoder.c | 11 +-
src/vcd_saver.c | 2 +-
31 files changed, 437 insertions(+), 218 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 9f85fcb..eb27083 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1505,3 +1505,12 @@
stack overflow crashes.
Added support for synthetic clocks in FST file.
Update timetrace marking so it runs quicker for large traces.
+3.3.66 05jul15 Faster fsdb initialization.
+ Fix vcd recoder loader crash for malformed vcd if signal is
+ declared as bits and a real valued change is encountered for
+ the value change.
+ Fixed crash in vcd2vzt for vcd files with no value changes
+ (likely a malformed vcd).
+ Added fsdbReaderResetSignalList() to prevent signals from
+ loading over and over when unnecessary.
+ Compile fixes for renamed functions and defines in gtk osx.
diff --git a/LICENSE.TXT b/LICENSE.TXT
index 7bdb0c2..121cbb3 100644
--- a/LICENSE.TXT
+++ b/LICENSE.TXT
@@ -1,6 +1,6 @@
##########################################################################
-GTKWave 3.3.65 Wave Viewer is Copyright (C) 1999-2015 Tony Bybell.
+GTKWave 3.3.66 Wave Viewer is Copyright (C) 1999-2015 Tony Bybell.
Portions of GTKWave are Copyright (C) 1999-2015 Udi Finkelstein.
Context support is Copyright (C) 2007-2015 Kermin Elliott Fleming.
Trace group support is Copyright (C) 2009-2015 Donald Baltus.
diff --git a/configure b/configure
index 2d56039..a2dbe9a 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for gtkwave 3.3.65.
+# Generated by GNU Autoconf 2.69 for gtkwave 3.3.66.
#
# Report bugs to <bybell at rocketmail.com>.
#
@@ -580,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='gtkwave'
PACKAGE_TARNAME='gtkwave'
-PACKAGE_VERSION='3.3.65'
-PACKAGE_STRING='gtkwave 3.3.65'
+PACKAGE_VERSION='3.3.66'
+PACKAGE_STRING='gtkwave 3.3.66'
PACKAGE_BUGREPORT='bybell at rocketmail.com'
PACKAGE_URL=''
@@ -1383,7 +1383,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures gtkwave 3.3.65 to adapt to many kinds of systems.
+\`configure' configures gtkwave 3.3.66 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1449,7 +1449,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of gtkwave 3.3.65:";;
+ short | recursive ) echo "Configuration of gtkwave 3.3.66:";;
esac
cat <<\_ACEOF
@@ -1595,7 +1595,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-gtkwave configure 3.3.65
+gtkwave configure 3.3.66
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2239,7 +2239,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by gtkwave $as_me 3.3.65, which was
+It was created by gtkwave $as_me 3.3.66, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3106,7 +3106,7 @@ fi
# Define the identity of the package.
PACKAGE='gtkwave'
- VERSION='3.3.65'
+ VERSION='3.3.66'
cat >>confdefs.h <<_ACEOF
@@ -4197,35 +4197,13 @@ fi
EXTLOAD_CFLAGS=
if test "X$FFR" = "Xyes" ; then
- as_ac_File=`$as_echo "ac_cv_file_"$FSDBREADER_LIBS/libnffr.so"" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"$FSDBREADER_LIBS/libnffr.so\"" >&5
-$as_echo_n "checking for \"$FSDBREADER_LIBS/libnffr.so\"... " >&6; }
-if eval \${$as_ac_File+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- test "$cross_compiling" = yes &&
- as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
-if test -r ""$FSDBREADER_LIBS/libnffr.so""; then
- eval "$as_ac_File=yes"
-else
- eval "$as_ac_File=no"
-fi
-fi
-eval ac_res=\$$as_ac_File
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
- FSDB_SO=yes
-else
- FSDB_SO=no
-fi
-
-
- if test "X$FSDB_SO" = "Xyes" ; then
- FSDB_CFLAGS="-DFSDB_IS_PRESENT -I$FSDBREADER_HDRS"
- FSDB_LDADD="$FSDBREADER_LIBS/libnffr.so"
- EXTLOAD_CFLAGS="-DEXTLOAD_SUFFIX=\\\"fsdb\\\""
- else
+# AC_CHECK_FILE("$FSDBREADER_LIBS/libnffr.so", FSDB_SO=yes, FSDB_SO=no)
+#
+# if test "X$FSDB_SO" = "Xyes" ; then
+# FSDB_CFLAGS="-DFSDB_IS_PRESENT -I$FSDBREADER_HDRS"
+# FSDB_LDADD="$FSDBREADER_LIBS/libnffr.so"
+# EXTLOAD_CFLAGS="-DEXTLOAD_SUFFIX=\\\"fsdb\\\""
+# else
as_ac_File=`$as_echo "ac_cv_file_"$FSDBREADER_LIBS/libnffr.a"" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"$FSDBREADER_LIBS/libnffr.a\"" >&5
@@ -4259,37 +4237,15 @@ fi
$as_echo "$as_me: WARNING: FSDB reader library not found, skipping." >&2;}
fi
- fi
+# fi
- as_ac_File=`$as_echo "ac_cv_file_"$FSDBREADER_LIBS/libnsys.so"" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"$FSDBREADER_LIBS/libnsys.so\"" >&5
-$as_echo_n "checking for \"$FSDBREADER_LIBS/libnsys.so\"... " >&6; }
-if eval \${$as_ac_File+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- test "$cross_compiling" = yes &&
- as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
-if test -r ""$FSDBREADER_LIBS/libnsys.so""; then
- eval "$as_ac_File=yes"
-else
- eval "$as_ac_File=no"
-fi
-fi
-eval ac_res=\$$as_ac_File
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
- AFSDB_SO=yes
-else
- AFSDB_SO=no
-fi
-
-
- if test "X$AFSDB_SO" = "Xyes" ; then
- FSDB_CFLAGS="-DFSDB_NSYS_IS_PRESENT $FSDB_CFLAGS"
- FSDB_LDADD="$FSDBREADER_LIBS/libnsys.so $FSDB_LDADD"
- EXTLOAD_CFLAGS="-DEXTLOAD_SUFFIX=\\\"fsdb\\\""
- else
+# AC_CHECK_FILE("$FSDBREADER_LIBS/libnsys.so", AFSDB_SO=yes, AFSDB_SO=no)
+#
+# if test "X$AFSDB_SO" = "Xyes" ; then
+# FSDB_CFLAGS="-DFSDB_NSYS_IS_PRESENT $FSDB_CFLAGS"
+# FSDB_LDADD="$FSDBREADER_LIBS/libnsys.so $FSDB_LDADD"
+# EXTLOAD_CFLAGS="-DEXTLOAD_SUFFIX=\\\"fsdb\\\""
+# else
as_ac_File=`$as_echo "ac_cv_file_"$FSDBREADER_LIBS/libnsys.a"" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"$FSDBREADER_LIBS/libnsys.a\"" >&5
@@ -4326,7 +4282,7 @@ fi
$as_echo "$as_me: WARNING: FSDB system library not found, skipping." >&2;}
fi
- fi
+# fi
as_ac_File=`$as_echo "ac_cv_file_"$FSDBREADER_HDRS/ffrAPI.h"" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"$FSDBREADER_HDRS/ffrAPI.h\"" >&5
@@ -7319,12 +7275,12 @@ if test -n "$GTK_MAC_CFLAGS"; then
pkg_cv_GTK_MAC_CFLAGS="$GTK_MAC_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk-mac-integration\""; } >&5
- ($PKG_CONFIG --exists --print-errors "gtk-mac-integration") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk-mac-integration >= 2.0.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "gtk-mac-integration >= 2.0.0") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_GTK_MAC_CFLAGS=`$PKG_CONFIG --cflags "gtk-mac-integration" 2>/dev/null`
+ pkg_cv_GTK_MAC_CFLAGS=`$PKG_CONFIG --cflags "gtk-mac-integration >= 2.0.0" 2>/dev/null`
else
pkg_failed=yes
fi
@@ -7335,12 +7291,12 @@ if test -n "$GTK_MAC_LIBS"; then
pkg_cv_GTK_MAC_LIBS="$GTK_MAC_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk-mac-integration\""; } >&5
- ($PKG_CONFIG --exists --print-errors "gtk-mac-integration") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk-mac-integration >= 2.0.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "gtk-mac-integration >= 2.0.0") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_GTK_MAC_LIBS=`$PKG_CONFIG --libs "gtk-mac-integration" 2>/dev/null`
+ pkg_cv_GTK_MAC_LIBS=`$PKG_CONFIG --libs "gtk-mac-integration >= 2.0.0" 2>/dev/null`
else
pkg_failed=yes
fi
@@ -7358,14 +7314,14 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- GTK_MAC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gtk-mac-integration" 2>&1`
+ GTK_MAC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gtk-mac-integration >= 2.0.0" 2>&1`
else
- GTK_MAC_PKG_ERRORS=`$PKG_CONFIG --print-errors "gtk-mac-integration" 2>&1`
+ GTK_MAC_PKG_ERRORS=`$PKG_CONFIG --print-errors "gtk-mac-integration >= 2.0.0" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$GTK_MAC_PKG_ERRORS" >&5
- as_fn_error $? "Package requirements (gtk-mac-integration) were not met:
+ as_fn_error $? "Package requirements (gtk-mac-integration >= 2.0.0) were not met:
$GTK_MAC_PKG_ERRORS
@@ -10992,7 +10948,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by gtkwave $as_me 3.3.65, which was
+This file was extended by gtkwave $as_me 3.3.66, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -11058,7 +11014,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-gtkwave config.status 3.3.65
+gtkwave config.status 3.3.66
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 2079b43..10e8f70 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
-AC_INIT(gtkwave, 3.3.65, bybell at rocketmail.com)
+AC_INIT(gtkwave, 3.3.66, bybell at rocketmail.com)
AC_CONFIG_SRCDIR([src/vcd.c])
AM_INIT_AUTOMAKE
AC_CONFIG_HEADER([config.h])
@@ -356,13 +356,13 @@ FFR=no
EXTLOAD_CFLAGS=
if test "X$FFR" = "Xyes" ; then
- AC_CHECK_FILE("$FSDBREADER_LIBS/libnffr.so", FSDB_SO=yes, FSDB_SO=no)
-
- if test "X$FSDB_SO" = "Xyes" ; then
- FSDB_CFLAGS="-DFSDB_IS_PRESENT -I$FSDBREADER_HDRS"
- FSDB_LDADD="$FSDBREADER_LIBS/libnffr.so"
- EXTLOAD_CFLAGS="-DEXTLOAD_SUFFIX=\\\"fsdb\\\""
- else
+# AC_CHECK_FILE("$FSDBREADER_LIBS/libnffr.so", FSDB_SO=yes, FSDB_SO=no)
+#
+# if test "X$FSDB_SO" = "Xyes" ; then
+# FSDB_CFLAGS="-DFSDB_IS_PRESENT -I$FSDBREADER_HDRS"
+# FSDB_LDADD="$FSDBREADER_LIBS/libnffr.so"
+# EXTLOAD_CFLAGS="-DEXTLOAD_SUFFIX=\\\"fsdb\\\""
+# else
AC_CHECK_FILE("$FSDBREADER_LIBS/libnffr.a", FSDB_A=yes, FSDB_A=no)
if test "X$FSDB_A" = "Xyes" ; then
@@ -373,15 +373,15 @@ if test "X$FFR" = "Xyes" ; then
AC_MSG_WARN([FSDB reader library not found, skipping.])
fi
- fi
+# fi
- AC_CHECK_FILE("$FSDBREADER_LIBS/libnsys.so", AFSDB_SO=yes, AFSDB_SO=no)
-
- if test "X$AFSDB_SO" = "Xyes" ; then
- FSDB_CFLAGS="-DFSDB_NSYS_IS_PRESENT $FSDB_CFLAGS"
- FSDB_LDADD="$FSDBREADER_LIBS/libnsys.so $FSDB_LDADD"
- EXTLOAD_CFLAGS="-DEXTLOAD_SUFFIX=\\\"fsdb\\\""
- else
+# AC_CHECK_FILE("$FSDBREADER_LIBS/libnsys.so", AFSDB_SO=yes, AFSDB_SO=no)
+#
+# if test "X$AFSDB_SO" = "Xyes" ; then
+# FSDB_CFLAGS="-DFSDB_NSYS_IS_PRESENT $FSDB_CFLAGS"
+# FSDB_LDADD="$FSDBREADER_LIBS/libnsys.so $FSDB_LDADD"
+# EXTLOAD_CFLAGS="-DEXTLOAD_SUFFIX=\\\"fsdb\\\""
+# else
AC_CHECK_FILE("$FSDBREADER_LIBS/libnsys.a", AFSDB_A=yes, AFSDB_A=no)
if test "X$AFSDB_A" = "Xyes" ; then
@@ -395,7 +395,7 @@ if test "X$FFR" = "Xyes" ; then
AC_MSG_WARN([FSDB system library not found, skipping.])
fi
- fi
+# fi
AC_CHECK_FILE("$FSDBREADER_HDRS/ffrAPI.h", FSDB_SOY=yes, FSDB_SOY=no)
if test "X$FSDB_SOY" = "Xno" ; then
@@ -695,7 +695,7 @@ else
# removed...causes problems with gtk-1.2...
# AM_CONDITIONAL([GDK_TARGET_QUARTZ], [test x$_gdk_tgt = xquartz])
if test "x$_gdk_tgt" = xquartz; then
- PKG_CHECK_MODULES(GTK_MAC, gtk-mac-integration)
+ PKG_CHECK_MODULES(GTK_MAC, gtk-mac-integration >= 2.0.0)
AC_SUBST(GTK_MAC_LIBS)
AC_SUBST(GTK_MAC_CFLAGS)
diff --git a/contrib/bundle_for_osx/Info-gtkwave.plist b/contrib/bundle_for_osx/Info-gtkwave.plist
index e56930c..f091da7 100644
--- a/contrib/bundle_for_osx/Info-gtkwave.plist
+++ b/contrib/bundle_for_osx/Info-gtkwave.plist
@@ -8,7 +8,7 @@
<key>CFBundleExecutable</key>
<string>gtkwave</string>
<key>CFBundleGetInfoString</key>
- <string>3.3.65, (C) 1999-2015 Tony Bybell http://gtkwave.sourceforge.net</string>
+ <string>3.3.66, (C) 1999-2015 Tony Bybell http://gtkwave.sourceforge.net</string>
<key>CFBundleIconFile</key>
<string>gtkwave.icns</string>
<key>CFBundleIdentifier</key>
@@ -18,11 +18,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>3.3.65</string>
+ <string>3.3.66</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>3.3.65</string>
+ <string>3.3.66</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright 1999 - 2015 Tony Bybell, GNU General Public License.</string>
<key>LSMinimumSystemVersion</key>
diff --git a/contrib/fsdb2vcd/fsdb2vcd_fast.cc b/contrib/fsdb2vcd/fsdb2vcd_fast.cc
index 696cf0b..8748859 100644
--- a/contrib/fsdb2vcd/fsdb2vcd_fast.cc
+++ b/contrib/fsdb2vcd/fsdb2vcd_fast.cc
@@ -1,6 +1,6 @@
/*
to compile:
- g++ -o fsdb2vcd_fast -O2 fsdb2vcd_fast.cc -I /pub/FsdbReader/ /pub/FsdbReader/libnffr.a /pub/FsdbReader/libnsys.a -ldl -lpthread
+ g++ -o fsdb2vcd_fast -O2 fsdb2vcd_fast.cc -I /pub/FsdbReader/ /pub/FsdbReader/libnffr.a /pub/FsdbReader/libnsys.a -ldl -lpthread -lz
Much faster version of fsdb2vcd as compared to one bundled with Verdi.
Requires libs and headers for FsdbReader.
diff --git a/src/Makefile.in b/src/Makefile.in
index 054f3cc..e63d93a 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -408,7 +408,7 @@ gtkwave_SOURCES = \
vcd_partial.c vcd_recoder.c vcd_saver.c vcd_saver.h version.h vlist.c vlist.h vzt.c vzt.h wavealloca.h \
wavewindow.c zoombuttons.c
-gtkwave_LDADD = $(LIBCOCOA_LDADD) $(GTK_LIBS) $(LIBLZMA_LDADD) $(LIBZ_LDADD) $(LIBBZ2_LDADD) $(LIBFST_LDADD) $(AET2_LDADD) $(FSDB_LDADD) $(TCL_LDADD) $(TK_LDADD) $(LIBJUDY_LDADD) $(GTK_MAC_LIBS) $(GCONF_LIBS) $(GTK_UNIX_PRINT_LIBS) $(MINGW_LDADD)
+gtkwave_LDADD = $(LIBCOCOA_LDADD) $(GTK_LIBS) $(LIBLZMA_LDADD) $(LIBZ_LDADD) $(LIBBZ2_LDADD) $(LIBFST_LDADD) $(AET2_LDADD) $(TCL_LDADD) $(TK_LDADD) $(FSDB_LDADD) $(LIBJUDY_LDADD) $(GTK_MAC_LIBS) $(GCONF_LIBS) $(GTK_UNIX_PRINT_LIBS) $(MINGW_LDADD)
gtkwave_LDFLAGS = $(COCOA_GTK_LDFLAGS)
twinwave_SOURCES = twinwave.c
twinwave_LDADD = $(GTK_LIBS) $(GTK_MAC_LIBS) $(GCONF_LIBS)
diff --git a/src/extload.c b/src/extload.c
index 8fa2ba3..d068aeb 100644
--- a/src/extload.c
+++ b/src/extload.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) Tony Bybell 2009-2014.
+ * Copyright (c) Tony Bybell 2009-2015.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -72,6 +72,90 @@ exit(255);
#else
+/******************************************************************/
+
+/*
+ * reverse equality mem compare
+ */
+static int memrevcmp(int i, const char *s1, const char *s2)
+{
+i--;
+for(;i>=0;i--)
+ {
+ if(s1[i] != s2[i]) break;
+ }
+
+return(i+1);
+}
+
+
+
+/*
+ * fast itoa for decimal numbers
+ */
+static char* itoa_2(int value, char* result)
+{
+char* ptr = result, *ptr1 = result, tmp_char;
+int tmp_value;
+
+do {
+ tmp_value = value;
+ value /= 10;
+ *ptr++ = "9876543210123456789" [9 + (tmp_value - value * 10)];
+} while ( value );
+
+if (tmp_value < 0) *ptr++ = '-';
+result = ptr;
+*ptr-- = '\0';
+while(ptr1 < ptr) {
+ tmp_char = *ptr;
+ *ptr--= *ptr1;
+ *ptr1++ = tmp_char;
+}
+return(result);
+}
+
+
+/*
+ * preformatted sprintf statements which remove parsing latency
+ */
+static int sprintf_2_sd(char *s, char *c, int d)
+{
+char *s2 = s;
+
+while(*c)
+ {
+ *(s2++) = *(c++);
+ }
+*(s2++) = '[';
+s2 = itoa_2(d, s2);
+*(s2++) = ']';
+*s2 = 0;
+
+return(s2 - s);
+}
+
+
+static int sprintf_2_sdd(char *s, char *c, int d, int d2)
+{
+char *s2 = s;
+
+while(*c)
+ {
+ *(s2++) = *(c++);
+ }
+*(s2++) = '[';
+s2 = itoa_2(d, s2);
+*(s2++) = ':';
+s2 = itoa_2(d2, s2);
+*(s2++) = ']';
+*s2 = 0;
+
+return(s2 - s);
+}
+
+/******************************************************************/
+
#ifndef WAVE_FSDB_READER_IS_PRESENT
static int last_modification_check(void)
{
@@ -187,8 +271,15 @@ for(;;)
char *vtyp_nam;
char *cpyto;
char *pntd;
+ char *typ_src = pnt;
+ char *typ_dst = typ;
- sscanf(rc + 5, "%s", typ);
+ /* following code replaces: sscanf(rc + 5, "%s", typ) */
+ while(*typ_src && !isspace(*typ_src))
+ {
+ *(typ_dst++) = *(typ_src++);
+ }
+ *typ_dst = 0;
while(*pnt)
{
@@ -233,9 +324,28 @@ for(;;)
if(last_l)
{
unsigned int l, r;
- char s1[32];
+ /* char s1[32]; */
unsigned int d2;
- sscanf(last_l+2, "%u r:%u %s %u", &l, &r, s1, &d2);
+ /* sscanf(last_l+2, "%u r:%u %s %u", &l, &r, s1, &d2); */
+
+ char *ps = last_l+2;
+ char *l_pnt, *r_pnt, *d2_pnt;
+
+ while(*ps && isspace(*ps)) { ps++; }
+ l_pnt = ps;
+ while(*ps && !isspace(*ps)) { ps++; }
+ while(*ps && isspace(*ps)) { ps++; }
+ r_pnt = ps;
+ while(*ps && !isspace(*ps)) { ps++; }
+ while(*ps && isspace(*ps)) { ps++; }
+ /* s1_pnt = ps; */
+ while(*ps && !isspace(*ps)) { ps++; }
+ while(*ps && isspace(*ps)) { ps++; }
+ d2_pnt = ps;
+
+ l = atoi(l_pnt);
+ r = atoi(r_pnt+2);
+ d2 = atoi(d2_pnt);
GLOBALS->extload_idcodes[i] = d2;
if(GLOBALS->extload_inv_idcodes[d2] == 0) GLOBALS->extload_inv_idcodes[d2] = i+1; /* root alias */
@@ -524,6 +634,7 @@ char *str;
struct fac *f;
char *fnam;
int flen;
+int longest_nam_candidate = 0;
i = GLOBALS->extload_i;
@@ -535,22 +646,25 @@ if(i<0)
if(GLOBALS->extload_hlen)
{
- GLOBALS->extload_namecache[0]=malloc_2(GLOBALS->extload_hlen+1+flen+1);
- strcpy(GLOBALS->extload_namecache[0], GLOBALS->fst_scope_name);
- *(GLOBALS->extload_namecache[0]+GLOBALS->extload_hlen) = '.';
- strcpy(GLOBALS->extload_namecache[0]+GLOBALS->extload_hlen+1, fnam);
+ GLOBALS->extload_namecache[0 & F_NAME_MODULUS]=malloc_2(GLOBALS->extload_namecache_max[0 & F_NAME_MODULUS]=GLOBALS->extload_hlen+1+flen+1);
+ memcpy(GLOBALS->extload_namecache[0 & F_NAME_MODULUS], GLOBALS->fst_scope_name, GLOBALS->extload_hlen);
+ *(GLOBALS->extload_namecache[0 & F_NAME_MODULUS]+GLOBALS->extload_hlen) = '.';
+ strcpy(GLOBALS->extload_namecache[0 & F_NAME_MODULUS]+GLOBALS->extload_hlen+1, fnam);
+ GLOBALS->extload_namecache_lens[0 & F_NAME_MODULUS]=GLOBALS->extload_hlen + 1 + flen;
}
else
{
- GLOBALS->extload_namecache[0]=malloc_2(flen+1);
- strcpy(GLOBALS->extload_namecache[0], fnam);
+ GLOBALS->extload_namecache[0 & F_NAME_MODULUS]=malloc_2(GLOBALS->extload_namecache_max[0 & F_NAME_MODULUS]=flen+1);
+ strcpy(GLOBALS->extload_namecache[0 & F_NAME_MODULUS], fnam);
+ GLOBALS->extload_namecache_lens[0 & F_NAME_MODULUS] = flen;
}
#else
fnam = get_varname(&GLOBALS->extload_vt_prev, &GLOBALS->extload_vd_prev, 0);
flen = strlen(fnam);
- GLOBALS->extload_namecache[0]=malloc_2(flen+1);
- strcpy(GLOBALS->extload_namecache[0], fnam);
+ GLOBALS->extload_namecache[0 & F_NAME_MODULUS]=malloc_2(GLOBALS->extload_namecache_max[0 & F_NAME_MODULUS]=flen+1);
+ strcpy(GLOBALS->extload_namecache[0 & F_NAME_MODULUS], fnam);
+ GLOBALS->extload_namecache_lens[0 & F_NAME_MODULUS] = flen;
#endif
}
else
@@ -565,37 +679,59 @@ else
if(GLOBALS->extload_hlen)
{
- GLOBALS->extload_namecache[i+1]=malloc_2(GLOBALS->extload_hlen+1+flen+1);
- strcpy(GLOBALS->extload_namecache[i+1], GLOBALS->fst_scope_name);
- *(GLOBALS->extload_namecache[i+1]+GLOBALS->extload_hlen) = '.';
- strcpy(GLOBALS->extload_namecache[i+1]+GLOBALS->extload_hlen+1, fnam);
+ if(GLOBALS->extload_namecache_max[(i+1)&F_NAME_MODULUS] < (GLOBALS->extload_hlen+1+flen+1))
+ {
+ if(GLOBALS->extload_namecache[(i+1)&F_NAME_MODULUS]) free_2(GLOBALS->extload_namecache[(i+1)&F_NAME_MODULUS]);
+ GLOBALS->extload_namecache[(i+1)&F_NAME_MODULUS]=malloc_2(GLOBALS->extload_namecache_max[(i+1)&F_NAME_MODULUS] = GLOBALS->extload_hlen+1+flen+1);
+ }
+
+ memcpy(GLOBALS->extload_namecache[(i+1)&F_NAME_MODULUS], GLOBALS->fst_scope_name, GLOBALS->extload_hlen);
+ *(GLOBALS->extload_namecache[(i+1)&F_NAME_MODULUS]+GLOBALS->extload_hlen) = '.';
+ strcpy(GLOBALS->extload_namecache[(i+1)&F_NAME_MODULUS]+GLOBALS->extload_hlen+1, fnam);
+ GLOBALS->extload_namecache_lens[(i+1)&F_NAME_MODULUS] = GLOBALS->extload_hlen + 1 + flen;
}
else
{
- GLOBALS->extload_namecache[i+1]=malloc_2(flen+1);
- strcpy(GLOBALS->extload_namecache[i+1], fnam);
+ if(GLOBALS->extload_namecache_max[(i+1)&F_NAME_MODULUS] < (flen+1))
+ {
+ if(GLOBALS->extload_namecache[(i+1)&F_NAME_MODULUS])free_2(GLOBALS->extload_namecache[(i+1)&F_NAME_MODULUS]);
+ GLOBALS->extload_namecache[(i+1)&F_NAME_MODULUS]=malloc_2(GLOBALS->extload_namecache_max[(i+1)&F_NAME_MODULUS] = flen+1);
+ }
+ strcpy(GLOBALS->extload_namecache[(i+1)&F_NAME_MODULUS], fnam);
+ GLOBALS->extload_namecache_lens[(i+1)&F_NAME_MODULUS] = flen;
}
#else
fnam = get_varname(&GLOBALS->extload_vt_prev, &GLOBALS->extload_vd_prev, i+1);
flen = strlen(fnam);
- GLOBALS->extload_namecache[i+1]=malloc_2(flen+1);
- strcpy(GLOBALS->extload_namecache[i+1], fnam);
+ if(GLOBALS->extload_namecache_max[(i+1)&F_NAME_MODULUS] < (flen+1))
+ {
+ GLOBALS->extload_namecache[(i+1)&F_NAME_MODULUS]=malloc_2(GLOBALS->extload_namecache_max[(i+1)&F_NAME_MODULUS] = flen+1);
+ }
+ strcpy(GLOBALS->extload_namecache[(i+1)&F_NAME_MODULUS], fnam);
+ GLOBALS->extload_namecache_lens[(i+1)&F_NAME_MODULUS] = flen;
#endif
}
- if(i>1)
- {
- free_2(GLOBALS->extload_namecache[i-2]);
- GLOBALS->extload_namecache[i-2] = NULL;
- }
-
f=GLOBALS->mvlfacs_vzt_c_3+i;
if((f->len>1)&& (!(f->flags&(VZT_RD_SYM_F_INTEGER|VZT_RD_SYM_F_DOUBLE|VZT_RD_SYM_F_STRING))) )
{
- int len=sprintf(buf, "%s[%d:%d]", GLOBALS->extload_namecache[i],GLOBALS->extload_node_block[i].msi, GLOBALS->extload_node_block[i].lsi);
- str=malloc_2(len+1);
+ int len=sprintf_2_sdd(buf, GLOBALS->extload_namecache[i&F_NAME_MODULUS],GLOBALS->extload_node_block[i].msi, GLOBALS->extload_node_block[i].lsi);
+ longest_nam_candidate = len;
+
+ if(!GLOBALS->do_hier_compress)
+ {
+ str=malloc_2(len+1);
+ }
+ else
+ {
+ if(len > GLOBALS->f_name_build_buf_len)
+ {
+ free_2(GLOBALS->f_name_build_buf); GLOBALS->f_name_build_buf = malloc_2((GLOBALS->f_name_build_buf_len=len)+1);
+ }
+ str = GLOBALS->f_name_build_buf;
+ }
if(!GLOBALS->alt_hier_delimeter)
{
@@ -611,14 +747,28 @@ else
}
else if (
((f->len==1)&&(!(f->flags&(VZT_RD_SYM_F_INTEGER|VZT_RD_SYM_F_DOUBLE|VZT_RD_SYM_F_STRING)))&&
- ((i!=GLOBALS->numfacs-1)&&(!strcmp(GLOBALS->extload_namecache[i], GLOBALS->extload_namecache[i+1]))))
+ ((i!=GLOBALS->numfacs-1)&&(GLOBALS->extload_namecache_lens[i&F_NAME_MODULUS]==GLOBALS->extload_namecache_lens[(i+1)&F_NAME_MODULUS])&&(!memrevcmp(GLOBALS->extload_namecache_lens[i&F_NAME_MODULUS],GLOBALS->extload_namecache[i&F_NAME_MODULUS], GLOBALS->extload_namecache[(i+1)&F_NAME_MODULUS]))))
||
- (((i!=0)&&(!strcmp(GLOBALS->extload_namecache[i], GLOBALS->extload_namecache[i-1]))) &&
+ (((i!=0)&&(GLOBALS->extload_namecache_lens[i&F_NAME_MODULUS]==GLOBALS->extload_namecache_lens[(i-1)&F_NAME_MODULUS])&&(!memrevcmp(GLOBALS->extload_namecache_lens[i&F_NAME_MODULUS], GLOBALS->extload_namecache[i&F_NAME_MODULUS], GLOBALS->extload_namecache[(i-1)&F_NAME_MODULUS]))) &&
(GLOBALS->extload_node_block[i].msi!=-1)&&(GLOBALS->extload_node_block[i].lsi!=-1))
)
{
- int len = sprintf(buf, "%s[%d]", GLOBALS->extload_namecache[i],GLOBALS->extload_node_block[i].msi);
- str=malloc_2(len+1);
+ int len = sprintf_2_sd(buf, GLOBALS->extload_namecache[i&F_NAME_MODULUS],GLOBALS->extload_node_block[i].msi);
+ longest_nam_candidate = len;
+
+ if(!GLOBALS->do_hier_compress)
+ {
+ str=malloc_2(len+1);
+ }
+ else
+ {
+ if(len > GLOBALS->f_name_build_buf_len)
+ {
+ free_2(GLOBALS->f_name_build_buf); GLOBALS->f_name_build_buf = malloc_2((GLOBALS->f_name_build_buf_len=len)+1);
+ }
+ str = GLOBALS->f_name_build_buf;
+ }
+
if(!GLOBALS->alt_hier_delimeter)
{
strcpy(str, buf);
@@ -629,7 +779,7 @@ else
}
s=&GLOBALS->extload_sym_block[i];
symadd_name_exists_sym_exists(s,str,0);
- if((GLOBALS->extload_prevsym)&&(i>0)&&(!strcmp(GLOBALS->extload_namecache[i], GLOBALS->extload_namecache[i-1]))) /* allow chaining for search functions.. */
+ if((GLOBALS->extload_prevsym)&&(i>0)&&(GLOBALS->extload_namecache_lens[i&F_NAME_MODULUS]==GLOBALS->extload_namecache_lens[(i-1)&F_NAME_MODULUS])&&(!memrevcmp(GLOBALS->extload_namecache_lens[i&F_NAME_MODULUS], GLOBALS->extload_namecache[i&F_NAME_MODULUS], GLOBALS->extload_namecache[(i-1)&F_NAME_MODULUS]))) /* allow chaining for search functions.. */
{
GLOBALS->extload_prevsym->vec_root = GLOBALS->extload_prevsymroot;
GLOBALS->extload_prevsym->vec_chain = s;
@@ -643,14 +793,29 @@ else
}
else
{
- str=malloc_2(strlen(GLOBALS->extload_namecache[i])+1);
+ int len = GLOBALS->extload_namecache_lens[i&F_NAME_MODULUS];
+
+ longest_nam_candidate = len;
+ if(!GLOBALS->do_hier_compress)
+ {
+ str=malloc_2(len+1);
+ }
+ else
+ {
+ if(len > GLOBALS->f_name_build_buf_len)
+ {
+ free_2(GLOBALS->f_name_build_buf); GLOBALS->f_name_build_buf = malloc_2((GLOBALS->f_name_build_buf_len=len)+1);
+ }
+ str = GLOBALS->f_name_build_buf;
+ }
+
if(!GLOBALS->alt_hier_delimeter)
{
- strcpy(str, GLOBALS->extload_namecache[i]);
+ strcpy(str, GLOBALS->extload_namecache[i&F_NAME_MODULUS]);
}
else
{
- strcpy_vcdalt(str, GLOBALS->extload_namecache[i], GLOBALS->alt_hier_delimeter);
+ strcpy_vcdalt(str, GLOBALS->extload_namecache[i&F_NAME_MODULUS], GLOBALS->alt_hier_delimeter);
}
s=&GLOBALS->extload_sym_block[i];
symadd_name_exists_sym_exists(s,str,0);
@@ -665,6 +830,20 @@ else
}
n=&GLOBALS->extload_node_block[i];
+
+ if(longest_nam_candidate > GLOBALS->longestname) GLOBALS->longestname = longest_nam_candidate;
+
+ if(GLOBALS->do_hier_compress)
+ {
+ n->nname = compress_facility((unsigned char *)s->name, longest_nam_candidate);
+ /* free_2(s->name); ...removed as GLOBALS->f_name_build_buf is now used */
+ s->name = n->nname;
+ }
+ else
+ {
+ n->nname=s->name;
+ }
+
n->nname=s->name;
n->mv.mvlfac = GLOBALS->mvlfacs_vzt_c_3+i;
GLOBALS->mvlfacs_vzt_c_3[i].working_node = n;
@@ -965,12 +1144,25 @@ GLOBALS->max_time *= GLOBALS->time_scale;
GLOBALS->mvlfacs_vzt_c_3=(struct fac *)calloc_2(GLOBALS->numfacs,sizeof(struct fac));
GLOBALS->vzt_table_vzt_c_1=(struct lx2_entry *)calloc_2(GLOBALS->numfacs, sizeof(struct lx2_entry));
-GLOBALS->extload_namecache=(char **)calloc_2(GLOBALS->numfacs, sizeof(char *));
+GLOBALS->extload_namecache=(char **)calloc_2(F_NAME_MODULUS+1, sizeof(char *));
+GLOBALS->extload_namecache_max=(int *)calloc_2(F_NAME_MODULUS+1, sizeof(int));
+GLOBALS->extload_namecache_lens=(int *)calloc_2(F_NAME_MODULUS+1, sizeof(int));
GLOBALS->extload_sym_block = (struct symbol *)calloc_2(GLOBALS->numfacs, sizeof(struct symbol));
GLOBALS->extload_node_block=(struct Node *)calloc_2(GLOBALS->numfacs,sizeof(struct Node));
GLOBALS->extload_idcodes=(unsigned int *)calloc_2(GLOBALS->numfacs, sizeof(unsigned int));
GLOBALS->extload_inv_idcodes=(int *)calloc_2(max_idcode+1, sizeof(int));
+if(!GLOBALS->fast_tree_sort)
+ {
+ GLOBALS->do_hier_compress = 0;
+ }
+
+GLOBALS->f_name_build_buf_len = 128;
+GLOBALS->f_name_build_buf = malloc_2(GLOBALS->f_name_build_buf_len + 1);
+
+init_facility_pack();
+
+
/* SPLASH */ splash_sync(1, 5);
#ifdef WAVE_FSDB_READER_IS_PRESENT
@@ -989,7 +1181,7 @@ process_extload_variable(NULL); /* flush out final cached variable */
decorated_module_cleanup(); /* ...also now in gtk2_treesearch.c */
iter_through_comp_name_table();
-for(i=0;((i<2)&&(i<GLOBALS->numfacs));i++)
+for(i=0;i<=F_NAME_MODULUS;i++)
{
if(GLOBALS->extload_namecache[i])
{
@@ -998,6 +1190,8 @@ for(i=0;((i<2)&&(i<GLOBALS->numfacs));i++)
}
}
free_2(GLOBALS->extload_namecache); GLOBALS->extload_namecache = NULL;
+free_2(GLOBALS->extload_namecache_max); GLOBALS->extload_namecache_max = NULL;
+free_2(GLOBALS->extload_namecache_lens); GLOBALS->extload_namecache_lens = NULL;
fstReaderClose(GLOBALS->extload_xc); /* corresponds to fstReaderOpenForUtilitiesOnly() */
@@ -1025,7 +1219,7 @@ while(get_varname(&GLOBALS->extload_vt_prev, NULL, -1)); /* read through end to
decorated_module_cleanup(); /* ...also now in gtk2_treesearch.c */
iter_through_comp_name_table();
-for(i=0;((i<2)&&(i<GLOBALS->numfacs));i++)
+for(i=0;i<=F_NAME_MODULUS;i++)
{
if(GLOBALS->extload_namecache[i])
{
@@ -1034,6 +1228,8 @@ for(i=0;((i<2)&&(i<GLOBALS->numfacs));i++)
}
}
free_2(GLOBALS->extload_namecache); GLOBALS->extload_namecache = NULL;
+free_2(GLOBALS->extload_namecache_max); GLOBALS->extload_namecache_max = NULL;
+free_2(GLOBALS->extload_namecache_lens); GLOBALS->extload_namecache_lens = NULL;
pclose(GLOBALS->extload);
fstReaderClose(GLOBALS->extload_xc); /* corresponds to fstReaderOpenForUtilitiesOnly() */
@@ -1041,15 +1237,16 @@ fstReaderClose(GLOBALS->extload_xc); /* corresponds to fstReaderOpenForUtilities
#endif
/* SPLASH */ splash_sync(2, 5);
+if(GLOBALS->f_name_build_buf) { free_2(GLOBALS->f_name_build_buf); GLOBALS->f_name_build_buf = NULL; }
+freeze_facility_pack();
+
GLOBALS->facs=(struct symbol **)malloc_2(GLOBALS->numfacs*sizeof(struct symbol *));
if(GLOBALS->fast_tree_sort)
{
for(i=0;i<GLOBALS->numfacs;i++)
{
- int len;
GLOBALS->facs[i]=&GLOBALS->extload_sym_block[i];
- if((len=strlen(GLOBALS->facs[i]->name))>GLOBALS->longestname) GLOBALS->longestname=len;
}
/* SPLASH */ splash_sync(3, 5);
@@ -1058,7 +1255,9 @@ if(GLOBALS->fast_tree_sort)
init_tree();
for(i=0;i<GLOBALS->numfacs;i++)
{
- build_tree_from_name(GLOBALS->facs[i]->name, i);
+ int was_packed = HIER_DEPACK_STATIC; /* no need to free_2() afterward then */
+ char *sb = hier_decompress_flagged(GLOBALS->facs[i]->name, &was_packed);
+ build_tree_from_name(sb, i);
}
/* SPLASH */ splash_sync(4, 5);
treegraft(&GLOBALS->treeroot);
@@ -1522,6 +1721,7 @@ if(GLOBALS->extload_inv_idcodes[txidx_in_trace] > 0)
if(!GLOBALS->extload_ffr_import_count)
{
fsdbReaderUnloadSignals(GLOBALS->extload_ffr_ctx);
+ fsdbReaderResetSignalList(GLOBALS->extload_ffr_ctx);
}
GLOBALS->extload_ffr_import_count++;
diff --git a/src/fsdb_wrapper_api.cc b/src/fsdb_wrapper_api.cc
index 16e01d1..116a421 100644
--- a/src/fsdb_wrapper_api.cc
+++ b/src/fsdb_wrapper_api.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) Tony Bybell 2013-2014.
+ * Copyright (c) Tony Bybell 2013-2015.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -103,6 +103,13 @@ fsdb_obj->ffrAddToSignalList(i);
}
+extern "C" void fsdbReaderResetSignalList(void *ctx)
+{
+ffrObject *fsdb_obj = (ffrObject *)ctx;
+fsdb_obj->ffrResetSignalList();
+}
+
+
extern "C" void fsdbReaderLoadSignals(void *ctx)
{
ffrObject *fsdb_obj = (ffrObject *)ctx;
diff --git a/src/fsdb_wrapper_api.h b/src/fsdb_wrapper_api.h
index fdaebd3..5e75994 100644
--- a/src/fsdb_wrapper_api.h
+++ b/src/fsdb_wrapper_api.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) Tony Bybell 2013-2014.
+ * Copyright (c) Tony Bybell 2013-2015.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -44,6 +44,7 @@ void fsdbReaderReadScopeVarTree(void *ctx,void (*cb)(void *));
int fsdbReaderGetMaxVarIdcode(void *ctx);
struct fsdbReaderGetStatistics_t *fsdbReaderGetStatistics(void *ctx);
void fsdbReaderAddToSignalList(void *ctx, int i);
+void fsdbReaderResetSignalList(void *ctx);
void fsdbReaderLoadSignals(void *ctx);
void *fsdbReaderCreateVCTraverseHandle(void *ctx, int i);
int fsdbReaderHasIncoreVC(void *ctx, void *hdl);
diff --git a/src/fst.c b/src/fst.c
index 9dcedae..585ad29 100644
--- a/src/fst.c
+++ b/src/fst.c
@@ -1727,7 +1727,7 @@ if(np->mv.mvlfac->flags&VZT_RD_SYM_F_SYNVEC)
JRB fi = jrb_find_int(GLOBALS->synclock_jrb, txidx);
if(fi)
{
- expand_synvec(txidx+1, fi->val.s);
+ expand_synvec(GLOBALS->mvlfacs_fst_c_3[txidx].node_alias+1, fi->val.s);
import_fst_trace(np);
return; /* import_fst_trace() will construct the trailer */
}
diff --git a/src/ghw.c b/src/ghw.c
index a8b9ec5..43ae7f2 100644
--- a/src/ghw.c
+++ b/src/ghw.c
@@ -51,7 +51,7 @@ struct ghw_tree_node {
long ghw_cmp_l(void *i, void *j)
{
-long il = (long)i, jl = (long)j;
+uintptr_t il = (uintptr_t)i, jl = (uintptr_t)j;
return(il - jl);
}
diff --git a/src/globals.c b/src/globals.c
index 1514534..70f06ac 100644
--- a/src/globals.c
+++ b/src/globals.c
@@ -243,6 +243,8 @@ NULL, /* extload_inv_idcodes */
0, /* extload_already_errored */
#endif
NULL, /* extload_namecache */
+NULL, /* extload_namecache_max */
+NULL, /* extload_namecache_lens */
NULL, /* extload_sym_block */
NULL, /* extload_node_block */
NULL, /* extload_xc */
@@ -252,6 +254,8 @@ NULL, /* extload_prevsym */
0, /* extload_hlen */
0, /* extload_vt_prev */
0, /* extload_vd_prev */
+0, /* f_name_build_buf_len */
+NULL, /* f_name_build_buf */
/*
diff --git a/src/globals.h b/src/globals.h
index 92531f7..7615720 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -242,6 +242,8 @@ time_t extload_lastmod; /* from extload.c */
char extload_already_errored; /* from extload.c */
#endif
char **extload_namecache;
+int *extload_namecache_max;
+int *extload_namecache_lens;
struct symbol *extload_sym_block;
struct Node *extload_node_block;
void *extload_xc;
@@ -251,6 +253,8 @@ int extload_i;
int extload_hlen;
unsigned char extload_vt_prev;
unsigned char extload_vd_prev;
+int f_name_build_buf_len;
+char *f_name_build_buf;
/*
diff --git a/src/helpers/fst/fstapi.c b/src/helpers/fst/fstapi.c
index 5ec842d..0afd73a 100644
--- a/src/helpers/fst/fstapi.c
+++ b/src/helpers/fst/fstapi.c
@@ -1449,12 +1449,12 @@ for(i=0;i<xc->maxhandle;i++)
PPvoid_t pv = JudyHSIns(&PJHSArray, dmem, destlen, NULL);
if(*pv)
{
- uint32_t pvi = (long)(*pv);
+ uint32_t pvi = (intptr_t)(*pv);
vm4ip[2] = -pvi;
}
else
{
- *pv = (void *)(long)(i+1);
+ *pv = (void *)(intptr_t)(i+1);
#endif
fpos += fstWriterVarint(f, wrlen);
fpos += destlen;
@@ -1469,12 +1469,12 @@ for(i=0;i<xc->maxhandle;i++)
PPvoid_t pv = JudyHSIns(&PJHSArray, scratchpnt, wrlen, NULL);
if(*pv)
{
- uint32_t pvi = (long)(*pv);
+ uint32_t pvi = (intptr_t)(*pv);
vm4ip[2] = -pvi;
}
else
{
- *pv = (void *)(long)(i+1);
+ *pv = (void *)(intptr_t)(i+1);
#endif
fpos += fstWriterVarint(f, 0);
fpos += wrlen;
@@ -1504,12 +1504,12 @@ for(i=0;i<xc->maxhandle;i++)
PPvoid_t pv = JudyHSIns(&PJHSArray, dmem, rc, NULL);
if(*pv)
{
- uint32_t pvi = (long)(*pv);
+ uint32_t pvi = (intptr_t)(*pv);
vm4ip[2] = -pvi;
}
else
{
- *pv = (void *)(long)(i+1);
+ *pv = (void *)(intptr_t)(i+1);
#endif
fpos += fstWriterVarint(f, wrlen);
fpos += rc;
@@ -1524,12 +1524,12 @@ for(i=0;i<xc->maxhandle;i++)
PPvoid_t pv = JudyHSIns(&PJHSArray, scratchpnt, wrlen, NULL);
if(*pv)
{
- uint32_t pvi = (long)(*pv);
+ uint32_t pvi = (intptr_t)(*pv);
vm4ip[2] = -pvi;
}
else
{
- *pv = (void *)(long)(i+1);
+ *pv = (void *)(intptr_t)(i+1);
#endif
fpos += fstWriterVarint(f, 0);
fpos += wrlen;
@@ -1546,12 +1546,12 @@ for(i=0;i<xc->maxhandle;i++)
PPvoid_t pv = JudyHSIns(&PJHSArray, scratchpnt, wrlen, NULL);
if(*pv)
{
- uint32_t pvi = (long)(*pv);
+ uint32_t pvi = (intptr_t)(*pv);
vm4ip[2] = -pvi;
}
else
{
- *pv = (void *)(long)(i+1);
+ *pv = (void *)(intptr_t)(i+1);
#endif
fpos += fstWriterVarint(f, 0);
fpos += wrlen;
@@ -2299,22 +2299,24 @@ if(xc && path && path[0])
#ifndef _WAVE_HAVE_JUDY
const uint32_t hashmask = FST_PATH_HASHMASK;
const unsigned char *path2 = (const unsigned char *)path;
+ PPvoid_t pv;
#else
char *path2 = alloca(slen + 1); /* judy lacks const qualifier in its JudyHSIns definition */
+ PPvoid_t pv;
strcpy(path2, path);
#endif
- PPvoid_t pv = JudyHSIns(&(xc->path_array), path2, slen, NULL);
+ pv = JudyHSIns(&(xc->path_array), path2, slen, NULL);
if(*pv)
{
- sidx = (long)(*pv);
+ sidx = (intptr_t)(*pv);
}
else
{
char *rp = NULL;
sidx = ++xc->path_array_count;
- *pv = (void *)(long)(xc->path_array_count);
+ *pv = (void *)(intptr_t)(xc->path_array_count);
if(use_realpath)
{
diff --git a/src/helpers/shmidcat.c b/src/helpers/shmidcat.c
index 3045a3f..a688b90 100644
--- a/src/helpers/shmidcat.c
+++ b/src/helpers/shmidcat.c
@@ -35,6 +35,15 @@
#include <sys/types.h>
#include <unistd.h>
+#ifndef _MSC_VER
+#ifndef __MINGW32__
+#include <stdint.h>
+#else
+#include <windows.h>
+#endif
+#endif
+
+
#include "wave_locale.h"
#if !defined _MSC_VER
@@ -118,7 +127,7 @@ return(rc);
void emit_string(char *s)
{
int len = strlen(s);
-long l_top, l_curr;
+uintptr_t l_top, l_curr;
int consumed;
int blksiz;
@@ -140,8 +149,8 @@ for(;;)
}
}
- l_top = (long)buf_top;
- l_curr = (long)buf_curr;
+ l_top = (uintptr_t)buf_top;
+ l_curr = (uintptr_t)buf_curr;
if(l_curr >= l_top)
{
diff --git a/src/helpers/vcd2fst.c b/src/helpers/vcd2fst.c
index 1b85ab1..6f874fd 100644
--- a/src/helpers/vcd2fst.c
+++ b/src/helpers/vcd2fst.c
@@ -570,6 +570,11 @@ while(!feof(f))
char *nam;
unsigned int hash;
+ if(!st)
+ {
+ continue; /* variable declaration not on a single line */
+ }
+
vartype = FST_VT_VCD_WIRE;
switch(st[0])
{
diff --git a/src/helpers/vcd2vzt.c b/src/helpers/vcd2vzt.c
index 2758733..b360f56 100644
--- a/src/helpers/vcd2vzt.c
+++ b/src/helpers/vcd2vzt.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999-2014 Tony Bybell.
+ * Copyright (c) 1999-2015 Tony Bybell.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -964,8 +964,15 @@ switch(yytext[0])
}
else
{
- vzt_wr_emit_value_double(lt, v->ltsym, 0, *d);
- add_histent(current_time, v->narray[0],'g',1,(char *)d);
+ if(v->vartype == V_REAL)
+ {
+ vzt_wr_emit_value_double(lt, v->ltsym, 0, *d);
+ add_histent(current_time, v->narray[0],'g',1,(char *)d);
+ }
+ else
+ {
+ fprintf(stderr,"Near line %d, real value change for non-real '%s'\n",vcdlineno, yytext);
+ }
free_2(d);
}
diff --git a/src/helpers/vzt_read.c b/src/helpers/vzt_read.c
index 570ff32..6e556b8 100644
--- a/src/helpers/vzt_read.c
+++ b/src/helpers/vzt_read.c
@@ -319,7 +319,7 @@ vztint32_t i, j, m, num_dict_words;
/* vztint32_t *block_end = (vztint32_t *)(pnt + b->uncompressed_siz); */
vztint32_t *val_tmp;
unsigned int num_bitplanes;
-long padskip;
+uintptr_t padskip;
num_time_ticks = vzt_rd_get_v32(&pnt);
/* fprintf(stderr, "* num_time_ticks = %d\n", num_time_ticks); */
@@ -350,7 +350,7 @@ if(num_time_ticks != 0)
num_sections = vzt_rd_get_v32(&pnt);
num_dict_entries = vzt_rd_get_v32(&pnt);
-padskip = ((long)pnt)&3; pnt += (padskip) ? 4-padskip : 0; /* skip pad to next 4 byte boundary */
+padskip = ((uintptr_t)pnt)&3; pnt += (padskip) ? 4-padskip : 0; /* skip pad to next 4 byte boundary */
/* fprintf(stderr, "num_sections: %d, num_dict_entries: %d\n", num_sections, num_dict_entries); */
@@ -407,7 +407,7 @@ pnt = (char *)(val_dict + (num_dict_words = num_dict_entries * num_sections));
bpcalc:
num_bitplanes = vzt_rd_get_byte(pnt, 0) + 1; pnt++;
b->multi_state = (num_bitplanes > 1);
-padskip = ((long)pnt)&3; pnt += (padskip) ? 4-padskip : 0; /* skip pad to next 4 byte boundary */
+padskip = ((uintptr_t)pnt)&3; pnt += (padskip) ? 4-padskip : 0; /* skip pad to next 4 byte boundary */
b->vindex = (vztint32_t *)(pnt);
if(is_big_endian()) /* have to bswap the value changes on big endian machines... */
diff --git a/src/helpers/vzt_write.c b/src/helpers/vzt_write.c
index 9f22706..99f5f80 100644
--- a/src/helpers/vzt_write.c
+++ b/src/helpers/vzt_write.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2009 Tony Bybell.
+ * Copyright (c) 2003-2015 Tony Bybell.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -1223,6 +1223,12 @@ vztsint32_t k;
int val;
unsigned int numticks;
+if(!lt->emitted) /* only happens if there are no value changes */
+ {
+ vzt_wr_emitfacs(lt);
+ lt->emitted = 1;
+ }
+
if(!lt->timegranule)
{
vzt_wr_dsvzt_Tree *t=NULL;
diff --git a/src/main.c b/src/main.c
index 8eaf97a..1b7dfdd 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1522,7 +1522,11 @@ load_vcd:
}
-if(((GLOBALS->loaded_file_type != FST_FILE) && (GLOBALS->loaded_file_type != AE2_FILE)) || (!GLOBALS->fast_tree_sort))
+if(((GLOBALS->loaded_file_type != FST_FILE) && (GLOBALS->loaded_file_type != AE2_FILE)
+#if defined(EXTLOAD_SUFFIX)
+ && (GLOBALS->loaded_file_type != EXTLOAD_FILE)
+#endif
+ ) || (!GLOBALS->fast_tree_sort))
{
GLOBALS->do_hier_compress = 0; /* for now, add more file formats in the future */
}
@@ -1778,15 +1782,15 @@ if(GLOBALS->use_toolbutton_interface)
#ifdef MAC_INTEGRATION
{
-GtkOSXApplication *theApp = g_object_new(GTK_TYPE_OSX_APPLICATION, NULL);
+GtkosxApplication *theApp = g_object_new(GTKOSX_TYPE_APPLICATION, NULL);
gtk_widget_hide(menubar);
-gtk_osxapplication_set_menu_bar(theApp, GTK_MENU_SHELL(menubar));
-gtk_osxapplication_set_use_quartz_accelerators(theApp, TRUE);
-gtk_osxapplication_ready(theApp);
-gtk_osxapplication_set_dock_icon_pixbuf(theApp, dock_pb);
+gtkosx_application_set_menu_bar(theApp, GTK_MENU_SHELL(menubar));
+gtkosx_application_set_use_quartz_accelerators(theApp, TRUE);
+gtkosx_application_ready(theApp);
+gtkosx_application_set_dock_icon_pixbuf(theApp, dock_pb);
if(GLOBALS->loaded_file_type == MISSING_FILE)
{
- gtk_osxapplication_attention_request(theApp, INFO_REQUEST);
+ gtkosx_application_attention_request(theApp, INFO_REQUEST);
}
g_signal_connect(theApp, "NSApplicationOpenFile", G_CALLBACK(deal_with_finder_open), NULL);
@@ -2023,15 +2027,15 @@ g_signal_connect(theApp, "NSApplicationBlockTermination", G_CALLBACK(deal_with_t
#ifdef MAC_INTEGRATION
{
-GtkOSXApplication *theApp = g_object_new(GTK_TYPE_OSX_APPLICATION, NULL);
+GtkosxApplication *theApp = g_object_new(GTKOSX_TYPE_APPLICATION, NULL);
gtk_widget_hide(menubar);
-gtk_osxapplication_set_menu_bar(theApp, GTK_MENU_SHELL(menubar));
-gtk_osxapplication_set_use_quartz_accelerators(theApp, TRUE);
-gtk_osxapplication_ready(theApp);
-gtk_osxapplication_set_dock_icon_pixbuf(theApp, dock_pb);
+gtkosx_application_set_menu_bar(theApp, GTK_MENU_SHELL(menubar));
+gtkosx_application_set_use_quartz_accelerators(theApp, TRUE);
+gtkosx_application_ready(theApp);
+gtkosx_application_set_dock_icon_pixbuf(theApp, dock_pb);
if(GLOBALS->loaded_file_type == MISSING_FILE)
{
- gtk_osxapplication_attention_request(theApp, INFO_REQUEST);
+ gtkosx_application_attention_request(theApp, INFO_REQUEST);
}
g_signal_connect(theApp, "NSApplicationOpenFile", G_CALLBACK(deal_with_finder_open), NULL);
@@ -2904,7 +2908,7 @@ if(GLOBALS->stems_type != WAVE_ANNO_NONE)
{
char buf[64];
#ifdef MAC_INTEGRATION
- const gchar *p = quartz_application_get_executable_path();
+ const gchar *p = gtkosx_application_get_executable_path();
#endif
sprintf(buf, "%08x", shmid);
@@ -3009,7 +3013,7 @@ void optimize_vcd_file(void) {
}
else {
#ifdef MAC_INTEGRATION
- const gchar *p = quartz_application_get_executable_path();
+ const gchar *p = gtkosx_application_get_executable_path();
if(p && strstr(p, "Contents/"))
{
const char *xec = "../Resources/bin/vcd2fst";
diff --git a/src/markerbox.c b/src/markerbox.c
index e5535f1..7239f20 100644
--- a/src/markerbox.c
+++ b/src/markerbox.c
@@ -104,7 +104,7 @@ hashmask |= hashmask >> 4;
hashmask |= hashmask >> 8;
hashmask |= hashmask >> 16;
-i = ((int) (((long) which) & hashmask)) % WAVE_NUM_NAMED_MARKERS;
+i = ((int) (((intptr_t) which) & hashmask)) % WAVE_NUM_NAMED_MARKERS;
GLOBALS->dirty_markerbox_c_1 = 1;
entry_text = gtk_entry_get_text(GTK_ENTRY(entry));
@@ -138,7 +138,7 @@ hashmask |= hashmask >> 4;
hashmask |= hashmask >> 8;
hashmask |= hashmask >> 16;
-i = ((int) (((long) which) & hashmask)) % WAVE_NUM_NAMED_MARKERS;
+i = ((int) (((intptr_t) which) & hashmask)) % WAVE_NUM_NAMED_MARKERS;
GLOBALS->dirty_markerbox_c_1 = 1;
entry_text = gtk_entry_get_text(GTK_ENTRY(entry));
@@ -182,7 +182,7 @@ hashmask |= hashmask >> 4;
hashmask |= hashmask >> 8;
hashmask |= hashmask >> 16;
-ent_idx = ((int) (((long) which) & hashmask)) % WAVE_NUM_NAMED_MARKERS;
+ent_idx = ((int) (((intptr_t) which) & hashmask)) % WAVE_NUM_NAMED_MARKERS;
entry=GLOBALS->entries_markerbox_c_1[ent_idx];
@@ -237,7 +237,7 @@ hashmask |= hashmask >> 4;
hashmask |= hashmask >> 8;
hashmask |= hashmask >> 16;
-ent_idx = ((int) (((long) which) & hashmask)) % WAVE_NUM_NAMED_MARKERS;
+ent_idx = ((int) (((intptr_t) which) & hashmask)) % WAVE_NUM_NAMED_MARKERS;
entry=GLOBALS->entries_markerbox_c_1[ent_idx];
@@ -396,8 +396,8 @@ void markerbox(char *title, GtkSignalFunc func)
gtk_widget_show (hbox);
GLOBALS->entries_markerbox_c_1[i]=entry = gtk_entry_new_with_max_length (48);
- gtkwave_signal_connect(GTK_OBJECT(entry), "activate", GTK_SIGNAL_FUNC(enter_callback), (void *)((long) i));
- gtkwave_signal_connect(GTK_OBJECT(entry), "changed", GTK_SIGNAL_FUNC(change_callback), (void *)((long) i));
+ gtkwave_signal_connect(GTK_OBJECT(entry), "activate", GTK_SIGNAL_FUNC(enter_callback), (void *)((intptr_t) i));
+ gtkwave_signal_connect(GTK_OBJECT(entry), "changed", GTK_SIGNAL_FUNC(change_callback), (void *)((intptr_t) i));
if(GLOBALS->shadow_markers_markerbox_c_1[i]==-1)
{
sprintf(buf,"<None>");
@@ -415,8 +415,8 @@ void markerbox(char *title, GtkSignalFunc func)
entry = gtk_entry_new_with_max_length (48);
if(GLOBALS->shadow_marker_names[i]) gtk_entry_set_text (GTK_ENTRY (entry), GLOBALS->shadow_marker_names[i]);
gtk_widget_show (entry);
- gtkwave_signal_connect(GTK_OBJECT(entry), "activate", GTK_SIGNAL_FUNC(str_enter_callback), (void *)((long) i));
- gtkwave_signal_connect(GTK_OBJECT(entry), "changed", GTK_SIGNAL_FUNC(str_change_callback), (void *)((long) i));
+ gtkwave_signal_connect(GTK_OBJECT(entry), "activate", GTK_SIGNAL_FUNC(str_enter_callback), (void *)((intptr_t) i));
+ gtkwave_signal_connect(GTK_OBJECT(entry), "changed", GTK_SIGNAL_FUNC(str_change_callback), (void *)((intptr_t) i));
gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0);
diff --git a/src/menu.c b/src/menu.c
index abd3baa..5d9fa7d 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -2250,10 +2250,10 @@ if(GLOBALS->helpbox_is_active)
}
else
{
- const gchar *bundle_id = quartz_application_get_bundle_id();
+ const gchar *bundle_id = gtkosx_application_get_bundle_id();
if(bundle_id)
{
- const gchar *rpath = quartz_application_get_resource_path();
+ const gchar *rpath = gtkosx_application_get_resource_path();
const char *suf = "/doc/gtkwave.pdf";
char *pdfpath = NULL;
FILE *handle;
@@ -8671,7 +8671,9 @@ if(GLOBALS->loaded_file_type != LXT_FILE)
gtk_window_add_accel_group(GTK_WINDOW(window), global_accel);
#ifdef MAC_INTEGRATION
+#if defined(HAVE_LIBTCL)
gtk_widget_hide(menu_wlist[WV_MENU_TCLSEP]);
+#endif
gtk_widget_hide(menu_wlist[WV_MENU_FQY]);
#endif
diff --git a/src/rc.c b/src/rc.c
index cdda463..d31eb0e 100644
--- a/src/rc.c
+++ b/src/rc.c
@@ -1003,10 +1003,10 @@ if(!(handle=fopen(rcname,"rb")))
if(!(handle=fopen(rcpath,"rb")))
{
#ifdef MAC_INTEGRATION
- const gchar *bundle_id = quartz_application_get_bundle_id();
+ const gchar *bundle_id = gtkosx_application_get_bundle_id();
if(bundle_id)
{
- const gchar *rpath = quartz_application_get_resource_path();
+ const gchar *rpath = gtkosx_application_get_resource_path();
const char *suf = "/gtkwaverc";
rcpath = NULL;
diff --git a/src/renderopt.c b/src/renderopt.c
index d83f85d..5d569a4 100644
--- a/src/renderopt.c
+++ b/src/renderopt.c
@@ -43,7 +43,7 @@ int i;
for(i=0;i<4;i++) GLOBALS->target_mutex_renderopt_c_1[i]=0;
-i = (int)((long)which);
+i = (int)((intptr_t)which);
GLOBALS->target_mutex_renderopt_c_1[i] = 1; /* mark our choice */
DEBUG(printf("picked: %s\n", render_targets[i]));
@@ -57,7 +57,7 @@ int i;
for(i=0;i<5;i++) GLOBALS->page_mutex_renderopt_c_1[i]=0;
-GLOBALS->page_size_type_renderopt_c_1 = (int)((long)which);
+GLOBALS->page_size_type_renderopt_c_1 = (int)((intptr_t)which);
GLOBALS->page_mutex_renderopt_c_1[GLOBALS->page_size_type_renderopt_c_1] = 1; /* mark our choice */
DEBUG(printf("picked: %s\n", page_size[GLOBALS->page_size_type_renderopt_c_1]));
@@ -71,7 +71,7 @@ int i;
for(i=0;i<3;i++) GLOBALS->render_mutex_renderopt_c_1[i]=0;
-i = (int)((long)which);
+i = (int)((intptr_t)which);
GLOBALS->render_mutex_renderopt_c_1[i] = 1; /* mark our choice */
DEBUG(printf("picked: %s\n", render_type[i]));
@@ -475,7 +475,7 @@ void renderbox(char *title)
group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (menuitem));
gtk_menu_append (GTK_MENU (menu), menuitem);
gtk_widget_show (menuitem);
- gtkwave_signal_connect(GTK_OBJECT (menuitem), "activate", GTK_SIGNAL_FUNC(render_clicked), (void *)((long)i));
+ gtkwave_signal_connect(GTK_OBJECT (menuitem), "activate", GTK_SIGNAL_FUNC(render_clicked), (void *)((intptr_t)i));
}
GLOBALS->target_mutex_renderopt_c_1[0]=1; /* "ps" */
@@ -494,7 +494,7 @@ void renderbox(char *title)
group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (menuitem));
gtk_menu_append (GTK_MENU (menu), menuitem);
gtk_widget_show (menuitem);
- gtkwave_signal_connect(GTK_OBJECT (menuitem), "activate", GTK_SIGNAL_FUNC(pagesize_clicked), (void *)((long)i));
+ gtkwave_signal_connect(GTK_OBJECT (menuitem), "activate", GTK_SIGNAL_FUNC(pagesize_clicked), (void *)((intptr_t)i));
GLOBALS->page_mutex_renderopt_c_1[i]=0;
}
@@ -517,7 +517,7 @@ void renderbox(char *title)
group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (menuitem));
gtk_menu_append (GTK_MENU (menu), menuitem);
gtk_widget_show (menuitem);
- gtkwave_signal_connect(GTK_OBJECT (menuitem), "activate", GTK_SIGNAL_FUNC(rendertype_clicked), (void *)((long)i));
+ gtkwave_signal_connect(GTK_OBJECT (menuitem), "activate", GTK_SIGNAL_FUNC(rendertype_clicked), (void *)((intptr_t)i));
GLOBALS->render_mutex_renderopt_c_1[i]=0;
}
diff --git a/src/savefile.c b/src/savefile.c
index a6fed4f..aeca8c4 100644
--- a/src/savefile.c
+++ b/src/savefile.c
@@ -2716,7 +2716,7 @@ return(deal_with_rpc_open_2(path, user_data, FALSE));
/*
* block termination if in the middle of something important
*/
-gboolean deal_with_termination(GtkOSXApplication *app, gpointer user_data)
+gboolean deal_with_termination(GtkosxApplication *app, gpointer user_data)
{
(void)app;
(void)user_data;
@@ -2736,7 +2736,7 @@ return(do_not_terminate);
* Integration with Finder...
* cache name and load in later off a timer (similar to caching DnD for quartz...)
*/
-gboolean deal_with_finder_open(GtkOSXApplication *app, gchar *path, gpointer user_data)
+gboolean deal_with_finder_open(GtkosxApplication *app, gchar *path, gpointer user_data)
{
(void)app;
diff --git a/src/savefile.h b/src/savefile.h
index 4ced9f8..adc272d 100644
--- a/src/savefile.h
+++ b/src/savefile.h
@@ -28,8 +28,8 @@ int parsewavline_lx2(char *w, char *alias, int depth);
char *find_dumpfile(char *orig_save, char *orig_dump, char *this_save);
#ifdef MAC_INTEGRATION
-gboolean deal_with_finder_open(GtkOSXApplication *app, gchar *path, gpointer user_data);
-gboolean deal_with_termination(GtkOSXApplication *app, gpointer user_data);
+gboolean deal_with_finder_open(GtkosxApplication *app, gchar *path, gpointer user_data);
+gboolean deal_with_termination(GtkosxApplication *app, gpointer user_data);
#endif
gboolean deal_with_rpc_open(const gchar *path, gpointer user_data);
diff --git a/src/search.c b/src/search.c
index 5e7c331..dd2b133 100644
--- a/src/search.c
+++ b/src/search.c
@@ -181,7 +181,7 @@ int i;
for(i=0;i<5;i++) GLOBALS->regex_mutex_search_c_1[i]=0;
-GLOBALS->regex_which_search_c_1=(int)((long)which);
+GLOBALS->regex_which_search_c_1=(int)((intptr_t)which);
GLOBALS->regex_mutex_search_c_1[GLOBALS->regex_which_search_c_1] = 1; /* mark our choice */
@@ -1095,7 +1095,7 @@ void searchbox(char *title, GtkSignalFunc func)
group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (GLOBALS->menuitem_search[i]));
gtk_menu_append (GTK_MENU (menu), GLOBALS->menuitem_search[i]);
gtk_widget_show (GLOBALS->menuitem_search[i]);
- gtkwave_signal_connect(GTK_OBJECT (GLOBALS->menuitem_search[i]), "activate", GTK_SIGNAL_FUNC(regex_clicked), (void *)((long)i));
+ gtkwave_signal_connect(GTK_OBJECT (GLOBALS->menuitem_search[i]), "activate", GTK_SIGNAL_FUNC(regex_clicked), (void *)((intptr_t)i));
GLOBALS->regex_mutex_search_c_1[i]=0;
}
diff --git a/src/strace.c b/src/strace.c
index d8e766e..a5f3cf2 100644
--- a/src/strace.c
+++ b/src/strace.c
@@ -358,7 +358,7 @@ void tracesearchbox(const char *title, GtkSignalFunc func, gpointer data)
int i;
int numtraces;
- GLOBALS->strace_current_window = (int)(long)data; /* arg for which search box going in */
+ GLOBALS->strace_current_window = (int)(intptr_t)data; /* arg for which search box going in */
GLOBALS->strace_ctx = &GLOBALS->strace_windows[GLOBALS->strace_current_window];
/* fix problem where ungrab doesn't occur if button pressed + simultaneous accelerator key occurs */
@@ -1407,7 +1407,7 @@ void strace_maketimetrace(int mode)
{
TimeType basetime=GLOBALS->tims.first;
TimeType endtime =MAX_HISTENT_TIME;
-int i, notfirst=0;
+int notfirst=0;
TimeType *t;
int t_allocated;
diff --git a/src/vcd_recoder.c b/src/vcd_recoder.c
index 8a66f19..33f2ab9 100644
--- a/src/vcd_recoder.c
+++ b/src/vcd_recoder.c
@@ -395,7 +395,7 @@ while(vs)
v += vprev;
vprev = v;
- n->mv.mvlfac_vlist = (struct vlist_t *)(long)(v);
+ n->mv.mvlfac_vlist = (struct vlist_t *)(intptr_t)(v);
vs = vs->next;
}
@@ -404,7 +404,7 @@ GLOBALS->fastload_depacked = NULL;
GLOBALS->fastload_current = NULL;
/* now create the time table */
-vl = (struct vlist_t *)(long)time_vlist_vcd_recoder_write;
+vl = (struct vlist_t *)(intptr_t)time_vlist_vcd_recoder_write;
vlist_uncompress(&vl);
depacked = pnt = (char *)vlist_packer_decompress(vl, &list_size);
vlist_destroy(vl);
@@ -504,7 +504,7 @@ do {
shamt += 7;
} while(!(ch & 0x80));
-vl = (struct vlist_t *)(long)v;
+vl = (struct vlist_t *)(intptr_t)v;
vlist_uncompress(&vl);
depacked = vlist_packer_decompress(vl, &list_size);
vlist_destroy(vl);
@@ -1290,7 +1290,10 @@ process_binary:
if((v->vartype!=V_REAL) && (v->vartype!=V_STRINGTYPE))
{
- /* ok, typical case */
+ if((typ2=='R')||(typ2=='S'))
+ {
+ typ2 = 'B'; /* ok, typical case...fix as 'r' on bits variable causes recoder crash during trace extraction */
+ }
}
else
{
diff --git a/src/vcd_saver.c b/src/vcd_saver.c
index 7dd5d9c..68a46e5 100644
--- a/src/vcd_saver.c
+++ b/src/vcd_saver.c
@@ -142,7 +142,7 @@ struct vcdsav_tree_node {
static long vcdsav_cmp_l(void *i, void *j)
{
-long il = (long)i, jl = (long)j;
+intptr_t il = (intptr_t)i, jl = (intptr_t)j;
return(il - jl);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-electronics/gtkwave.git
More information about the Pkg-electronics-commits
mailing list