[Pkg-electronics-commits] [gtkwave] 01/04: Imported Upstream version 3.3.51
أحمد المحمودي (Ahmed El-Mahmoudy)
aelmahmoudy at sabily.org
Fri Nov 22 15:32:35 UTC 2013
This is an automated email from the git hooks/post-receive script.
aelmahmoudy-guest pushed a commit to branch master
in repository gtkwave.
commit cc31bc167176e5d5b2b23dee995e2b5cd81874af
Author: أحمد المحمودي (Ahmed El-Mahmoudy) <aelmahmoudy at sabily.org>
Date: Wed Nov 6 10:12:40 2013 +0200
Imported Upstream version 3.3.51
---
AUTHORS | 13 +
ChangeLog | 15 +
Makefile.in | 2 +
configure | 78 +++-
configure.ac | 16 +-
contrib/Makefile.in | 2 +
contrib/bundle_for_osx/Info-gtkwave.plist | 6 +-
contrib/bundle_for_osx/Makefile.am | 2 +
contrib/bundle_for_osx/Makefile.in | 4 +
.../gtk_diff_against_modulesets_2.patch | 30 ++
contrib/bundle_for_osx/gtkwave.bundle | 20 +-
contrib/bundle_for_osx/gtkwaverc | 4 +
contrib/fst_jni/Makefile.in | 2 +
contrib/fst_jni/fst2Vcd.java | 27 +-
contrib/fst_jni/fstAPI.c | 48 ++
contrib/fst_jni/fstAPI.h | 16 +
contrib/fst_jni/fstAPI.java | 3 +-
contrib/fst_jni/fstHier.java | 24 +-
contrib/fst_jni/fstMiscType.java | 8 +-
contrib/pccts/IBM_VISUAL_AGE_PROJECTS/Makefile.in | 2 +
contrib/pccts/Makefile.in | 2 +
contrib/pccts/antlr/Makefile.in | 2 +
contrib/pccts/dlg/Makefile.in | 2 +
contrib/pccts/h/Makefile.in | 2 +
contrib/pccts/sorcerer/Makefile.in | 2 +
contrib/pccts/sorcerer/h/Makefile.in | 2 +
contrib/pccts/sorcerer/lib/Makefile.in | 2 +
contrib/pccts/sorcerer/test/Makefile.in | 2 +
contrib/pccts/sorcerer/test/test7/Makefile.in | 2 +
contrib/pccts/sorcerer/testcpp/Makefile.in | 2 +
contrib/pccts/support/DECmms/Makefile.in | 2 +
contrib/pccts/support/Makefile.in | 2 +
contrib/pccts/support/genmk/Makefile.in | 2 +
contrib/pccts/support/rexpr/Makefile.in | 2 +
contrib/pccts/support/set/Makefile.in | 2 +
contrib/pccts/support/sym/Makefile.in | 2 +
contrib/pccts/testcpp/Makefile.in | 2 +
contrib/rtlbrowse/Makefile.in | 2 +
contrib/vermin/Makefile.in | 2 +
contrib/vermin/preproc.c | 2 +-
doc/Makefile.in | 2 +
doc/gtkwave.odt | Bin 1390832 -> 1391267 bytes
examples/Makefile.am | 2 +-
examples/Makefile.in | 4 +-
examples/des.fst | Bin 0 -> 158102 bytes
examples/des.gtkw | 20 +-
examples/des.vzt | Bin 68801 -> 0 bytes
examples/gtkwaverc | 32 ++
man/Makefile.in | 2 +
man/gtkwaverc.5 | 8 +-
share/Makefile.in | 2 +
share/applications/Makefile.in | 2 +
share/icons/Makefile.in | 2 +
share/icons/gnome/16x16/Makefile.in | 2 +
share/icons/gnome/16x16/mimetypes/Makefile.in | 2 +
share/icons/gnome/32x32/Makefile.in | 2 +
share/icons/gnome/32x32/mimetypes/Makefile.in | 2 +
share/icons/gnome/48x48/Makefile.in | 2 +
share/icons/gnome/48x48/mimetypes/Makefile.in | 2 +
share/icons/gnome/Makefile.in | 2 +
share/mime/Makefile.in | 2 +
share/mime/packages/Makefile.in | 2 +
src/Makefile.am | 2 +-
src/Makefile.in | 4 +-
src/cocoa/Makefile.in | 2 +
src/currenttime.h | 2 +-
src/extload.c | 2 +-
src/fst.c | 109 ++++-
src/globals.c | 18 +
src/globals.h | 16 +
src/helpers/Makefile.in | 2 +
src/helpers/fst/Makefile.in | 2 +
src/helpers/fst/fstapi.c | 22 +-
src/helpers/fst/fstapi.h | 6 +-
src/helpers/vcd2fst.c | 50 ++-
src/libbz2/Makefile.in | 2 +
src/liblzma/Makefile.in | 2 +
src/libz/Makefile.in | 2 +
src/main.c | 5 +-
src/menu.c | 465 +++++++++++++++++++-
src/menu.h | 5 +
src/rc.c | 30 +-
src/savefile.c | 23 +-
src/savefile.h | 3 +-
src/tree.c | 8 +-
src/tree.h | 10 +-
src/treesearch.h | 2 +-
src/treesearch_gtk2.c | 30 +-
src/vcd.c | 2 +-
src/vcd_partial.c | 2 +-
src/vcd_recoder.c | 2 +-
91 files changed, 1171 insertions(+), 115 deletions(-)
diff --git a/AUTHORS b/AUTHORS
index e69de29..15083f7 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -0,0 +1,13 @@
+GTKWave Wave Viewer is Copyright (C) 1999-2013 Tony Bybell.
+Windows compatibility and PS/MIF routines are Copyright (C) 1999-2013 Udi Finkelstein.
+Context support is Copyright (C) 2007-2013 Kermin Elliott Fleming.
+Trace group support is Copyright (C) 2009-2013 Donald Baltus.
+GHW and additional GUI support is Copyright (C) 2005-2013 Tristan Gingold.
+Analog support is Copyright (C) 2005-2013 Thomas Sailer.
+External DnD support is Copyright (C) 2008-2013 Concept Engineering GmbH.
+FastLZ is Copyright (C) 2005-2013 Ariya Hidayat.
+PCCTS 1.33MR is Copyright (C) 1989-2013 Terence Parr, Russell Quong, Will Cohen, Hank Dietz, and Thomas Moog.
+Some public domain clip art by contributors at http://www.sxc.hu/ website.
+Hierarchy marker icons from the Silk icons set by Mark James found at the http://www.famfamfam.com/lab/icons/silk/ website.
+Portions of the TCL implementation, tcl_np.c and tcl_np.h are copyrighted by the Regents of the University of California, Sun Microsystems, Inc., Scriptics Corporation, ActiveState Corporation, and other parties.
+NSAlert is Copyright (C) 2011-2013 Philipp Mayerhofer.
diff --git a/ChangeLog b/ChangeLog
index c8368cf..70eebd4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1370,3 +1370,18 @@
Added gtkwave_bin_launcher.sh script to set up environment
variables on OSX for running the bin/ directory files from
a terminal rather than as an app invocation.
+3.3.51 27oct13 MAINTAINERS: Please add gedit to the list of dependencies
+ for gtkwave in order to enable new function that Icarus
+ Verilog dumps into FST files.
+ Fix "/File/Grab To File" on OSX with an OSX patch as the
+ _gdk_quartz_image_copy_to_image() function in the GTK
+ toolkit for Quartz is broken.
+ Updated examples/gtkwaverc accel options to reflect the
+ current state of the gtkwave main window main menu.
+ Added "Open Source Definition" and "Open Source Instantiation"
+ options that invoke .gtkwaverc variable "editor" (or
+ $GTKWAVE_EDITOR or gedit or open -t [OSX]) on sourcecode when
+ source stems are present in the dumpfile (currently FST only).
+ Fixed timezero in vcd2fst as it was only parsing unsigned
+ numbers.
+ Fixed Open Hierarchy crash on blank signals.
diff --git a/Makefile.in b/Makefile.in
index 60ac503..7a78980 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -200,6 +200,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/configure b/configure
index c0a35aa..2890ed4 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.50.
+# Generated by GNU Autoconf 2.69 for gtkwave 3.3.51.
#
# 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.50'
-PACKAGE_STRING='gtkwave 3.3.50'
+PACKAGE_VERSION='3.3.51'
+PACKAGE_STRING='gtkwave 3.3.51'
PACKAGE_BUGREPORT='bybell at rocketmail.com'
PACKAGE_URL=''
@@ -664,6 +664,8 @@ EXTLOAD_CFLAGS
EXTDEBUG3
EXTDEBUG2
EXTDEBUG
+GEDIT_CFLAGS
+GEDITTEST
RANLIB
LEXLIB
LEX_OUTPUT_ROOT
@@ -1380,7 +1382,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.50 to adapt to many kinds of systems.
+\`configure' configures gtkwave 3.3.51 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1446,7 +1448,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of gtkwave 3.3.50:";;
+ short | recursive ) echo "Configuration of gtkwave 3.3.51:";;
esac
cat <<\_ACEOF
@@ -1592,7 +1594,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-gtkwave configure 3.3.50
+gtkwave configure 3.3.51
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2236,7 +2238,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.50, which was
+It was created by gtkwave $as_me 3.3.51, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3103,7 +3105,7 @@ fi
# Define the identity of the package.
PACKAGE='gtkwave'
- VERSION='3.3.50'
+ VERSION='3.3.51'
cat >>confdefs.h <<_ACEOF
@@ -6175,6 +6177,58 @@ fi
#
+# for "Open Hierarchy Source"
+#
+# Extract the first word of "gedit", so it can be a program name with args.
+set dummy gedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_GEDITTEST+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $GEDITTEST in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GEDITTEST="$GEDITTEST" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_GEDITTEST="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_GEDITTEST" && ac_cv_path_GEDITTEST="notfound"
+ ;;
+esac
+fi
+GEDITTEST=$ac_cv_path_GEDITTEST
+if test -n "$GEDITTEST"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GEDITTEST" >&5
+$as_echo "$GEDITTEST" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+if test "$GEDITTEST" = "notfound" ; then
+ GEDIT_CFLAGS=
+else
+ GEDIT_CFLAGS="-DGEDIT_PATH=\\\"$GEDITTEST\\\""
+fi
+
+
+
+#
# only needed if user wishes to process various files with an external reader
#
# Extract the first word of "fsdbdebug", so it can be a program name with args.
@@ -10269,6 +10323,8 @@ ac_config_files="$ac_config_files Makefile doc/Makefile contrib/Makefile contrib
GTK_UNIX_PRINT_CFLAGS : $GTK_UNIX_PRINT_CFLAGS
GTK_UNIX_PRINT_LIBS : $GTK_UNIX_PRINT_LIBS
+
+ GEDIT_CFLAGS : $GEDIT_CFLAGS
--------------------------------------------
" >&5
$as_echo "$as_me:
@@ -10328,6 +10384,8 @@ $as_echo "$as_me:
GTK_UNIX_PRINT_CFLAGS : $GTK_UNIX_PRINT_CFLAGS
GTK_UNIX_PRINT_LIBS : $GTK_UNIX_PRINT_LIBS
+
+ GEDIT_CFLAGS : $GEDIT_CFLAGS
--------------------------------------------
" >&6;}
@@ -10873,7 +10931,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.50, which was
+This file was extended by gtkwave $as_me 3.3.51, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -10939,7 +10997,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.50
+gtkwave config.status 3.3.51
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index c52414f..ac6f9d7 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.50, bybell at rocketmail.com)
+AC_INIT(gtkwave, 3.3.51, bybell at rocketmail.com)
AC_CONFIG_SRCDIR([src/vcd.c])
AM_INIT_AUTOMAKE
AC_CONFIG_HEADER([config.h])
@@ -416,6 +416,18 @@ AC_PROG_RANLIB
AM_PROG_CC_C_O
#
+# for "Open Hierarchy Source"
+#
+AC_PATH_PROG(GEDITTEST, [gedit], [notfound])
+if test "$GEDITTEST" = "notfound" ; then
+ GEDIT_CFLAGS=
+else
+ GEDIT_CFLAGS="-DGEDIT_PATH=\\\"$GEDITTEST\\\""
+fi
+
+AC_SUBST(GEDIT_CFLAGS)
+
+#
# only needed if user wishes to process various files with an external reader
#
AC_PATH_PROG(EXTDEBUG, [fsdbdebug], [notfound])
@@ -941,6 +953,8 @@ AC_MSG_NOTICE([
GTK_UNIX_PRINT_CFLAGS : $GTK_UNIX_PRINT_CFLAGS
GTK_UNIX_PRINT_LIBS : $GTK_UNIX_PRINT_LIBS
+
+ GEDIT_CFLAGS : $GEDIT_CFLAGS
--------------------------------------------
])
diff --git a/contrib/Makefile.in b/contrib/Makefile.in
index c1335ec..aa10584 100644
--- a/contrib/Makefile.in
+++ b/contrib/Makefile.in
@@ -176,6 +176,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/contrib/bundle_for_osx/Info-gtkwave.plist b/contrib/bundle_for_osx/Info-gtkwave.plist
index b89797f..dcd3f65 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.50, (C) 1999-2013 Tony Bybell http://gtkwave.sourceforge.net</string>
+ <string>3.3.51, (C) 1999-2013 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.50</string>
+ <string>3.3.51</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>3.3.50</string>
+ <string>3.3.51</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright 1999 - 2013 Tony Bybell, GNU General Public License.</string>
<key>LSMinimumSystemVersion</key>
diff --git a/contrib/bundle_for_osx/Makefile.am b/contrib/bundle_for_osx/Makefile.am
index 0e48b62..cfca52c 100644
--- a/contrib/bundle_for_osx/Makefile.am
+++ b/contrib/bundle_for_osx/Makefile.am
@@ -3,7 +3,9 @@
EXTRA_DIST= \
gtk_diff_against_modulesets.patch \
+ gtk_diff_against_modulesets_2.patch \
gtkrc \
+ gtkwaverc \
gtkwave.bundle \
gtkwave_files.icns \
gtkwave.icns \
diff --git a/contrib/bundle_for_osx/Makefile.in b/contrib/bundle_for_osx/Makefile.in
index fae5e05..21c839a 100644
--- a/contrib/bundle_for_osx/Makefile.in
+++ b/contrib/bundle_for_osx/Makefile.in
@@ -116,6 +116,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
@@ -225,7 +227,9 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = \
gtk_diff_against_modulesets.patch \
+ gtk_diff_against_modulesets_2.patch \
gtkrc \
+ gtkwaverc \
gtkwave.bundle \
gtkwave_files.icns \
gtkwave.icns \
diff --git a/contrib/bundle_for_osx/gtk_diff_against_modulesets_2.patch b/contrib/bundle_for_osx/gtk_diff_against_modulesets_2.patch
new file mode 100644
index 0000000..61389fc
--- /dev/null
+++ b/contrib/bundle_for_osx/gtk_diff_against_modulesets_2.patch
@@ -0,0 +1,30 @@
+--- gtk+/gdk/quartz/gdkimage-quartz.c 2011-12-03 14:24:03.000000000 -0600
++++ gtk+664894/gdk/quartz/gdkimage-quartz.c 2013-10-15 18:52:24.000000000 -0500
+@@ -150,6 +150,10 @@ _gdk_quartz_image_copy_to_image (GdkDraw
+ data = [rep bitmapData];
+ size = [rep size];
+
++ int bpr = [rep bytesPerRow];
++ int wid = size.width;
++ int bpx = bpr/wid;
++
+ for (y = 0; y < size.height; y++)
+ {
+ guchar *src = data + y * [rep bytesPerRow];
+@@ -158,12 +162,15 @@ _gdk_quartz_image_copy_to_image (GdkDraw
+ {
+ gint32 pixel;
+
++ if (bpx == 4) // fix gdk_pixbuf_get_from_drawable "yellow stripes"
++ pixel = src[0] << 16 | src[1] << 8 | src[2];
++ else
+ if (image->byte_order == GDK_LSB_FIRST)
+ pixel = src[0] << 8 | src[1] << 16 |src[2] << 24;
+ else
+ pixel = src[0] << 16 | src[1] << 8 |src[2];
+
+- src += 3;
++ src += bpx;
+
+ gdk_image_put_pixel (image, dest_x + x, dest_y + y, pixel);
+ }
diff --git a/contrib/bundle_for_osx/gtkwave.bundle b/contrib/bundle_for_osx/gtkwave.bundle
index 9ade42d..ff6e17a 100644
--- a/contrib/bundle_for_osx/gtkwave.bundle
+++ b/contrib/bundle_for_osx/gtkwave.bundle
@@ -242,8 +242,8 @@
<!-- Examples files
-->
- <data dest="${bundle}/Contents/Resources/examples/des.vzt">
- ${project}/../../examples/des.vzt
+ <data dest="${bundle}/Contents/Resources/examples/des.fst">
+ ${project}/../../examples/des.fst
</data>
<data dest="${bundle}/Contents/Resources/examples/des.gtkw">
${project}/../../examples/des.gtkw
@@ -265,6 +265,12 @@
${project}/../../examples/transaction
</data>
+ <!-- Empty config file
+ -->
+ <data dest="${bundle}/Contents/Resources/gtkwaverc">
+ ${project}/gtkwaverc
+ </data>
+
<!-- Copy in the patches so users can recreate gtk from source.
This might be obsolete in future versions of gtk.
@@ -274,5 +280,15 @@
${project}/gtk_diff_against_modulesets.patch
</data>
+ <!-- Copy in the patches so users can recreate gtk from source.
+ This might be obsolete in future versions of gtk.
+ No bug reported yet: this fixes yellow bars from gdk_pixbuf_get_from_drawable()
+ which invokes _gdk_quartz_image_copy_to_image() that attempts to use 24-bit
+ RGB pixels instead of 32-bit RGBA ones.
+ -->
+ <data dest="${bundle}/Contents/Resources/share/patches/gtk_diff_against_modulesets_2.patch">
+ ${project}/gtk_diff_against_modulesets_2.patch
+ </data>
+
</app-bundle>
diff --git a/contrib/bundle_for_osx/gtkwaverc b/contrib/bundle_for_osx/gtkwaverc
new file mode 100644
index 0000000..b90819d
--- /dev/null
+++ b/contrib/bundle_for_osx/gtkwaverc
@@ -0,0 +1,4 @@
+#
+# Empty. See ${bundle}/Contents/Resources/examples/gtkwaverc
+# for example file
+#
diff --git a/contrib/fst_jni/Makefile.in b/contrib/fst_jni/Makefile.in
index e1b5926..e9ac76c 100644
--- a/contrib/fst_jni/Makefile.in
+++ b/contrib/fst_jni/Makefile.in
@@ -116,6 +116,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/contrib/fst_jni/fst2Vcd.java b/contrib/fst_jni/fst2Vcd.java
index 8f9e016..ef8019b 100644
--- a/contrib/fst_jni/fst2Vcd.java
+++ b/contrib/fst_jni/fst2Vcd.java
@@ -112,16 +112,27 @@ fst2Vcd(String fnam)
break;
case fstHierType.FST_HT_ATTRBEGIN:
- switch(fh.typ)
+
+ if(fh.typ == fstAttrType.FST_AT_MISC)
{
- case fstMiscType.FST_MT_COMMENT:
- System.out.println("$comment\n\t" + fh.name1 + "\n$end");
- break;
- default:
- System.out.println("$attrbegin " + fh.name1 + " " + fh.arg + " $end");
- break;
+ switch(fh.subtype)
+ {
+ case fstMiscType.FST_MT_COMMENT:
+ System.out.println("$comment\n\t" + fh.name1 + "\n$end");
+ break;
+
+ case fstMiscType.FST_MT_SOURCESTEM:
+ case fstMiscType.FST_MT_SOURCEISTEM:
+ System.out.println("$attrbegin " + fstAttrType.FST_AT_NAMESTRINGS[fh.typ] + " " +
+ Integer.toHexString(fh.subtype) + " " + fh.arg_from_name + " " + fh.arg + " $end");
+ break;
+
+ default:
+ System.out.println("$attrbegin " + fstAttrType.FST_AT_NAMESTRINGS[fh.typ] + " " +
+ Integer.toHexString(fh.subtype) + " " + fh.name1 + " " + fh.arg + " $end");
+ break;
+ }
}
-
break;
case fstHierType.FST_HT_ATTREND:
diff --git a/contrib/fst_jni/fstAPI.c b/contrib/fst_jni/fstAPI.c
index e745570..6e974f2 100644
--- a/contrib/fst_jni/fstAPI.c
+++ b/contrib/fst_jni/fstAPI.c
@@ -1,3 +1,25 @@
+/*
+ * Copyright (c) 2013 Tony Bybell.
+ *
+ * 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:
+ *
+ * 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
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * 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.
+ */
+
#include <jni.h>
#include <string.h>
#include "fstapi.h"
@@ -232,6 +254,28 @@ return((jint)handle);
}
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetSourceStem
+ (JNIEnv *env, jobject obj, jlong ctx, jstring j_path, jint line, jboolean use_realpath)
+{
+const char *path = (*env)->GetStringUTFChars(env, j_path, 0);
+
+fstWriterSetSourceStem((void *)(long)ctx, path, line, use_realpath);
+
+(*env)->ReleaseStringUTFChars(env, j_path, path);
+}
+
+
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetSourceInstantiationStem
+ (JNIEnv *env, jobject obj, jlong ctx, jstring j_path, jint line, jboolean use_realpath)
+{
+const char *path = (*env)->GetStringUTFChars(env, j_path, 0);
+
+fstWriterSetSourceInstantiationStem((void *)(long)ctx, path, line, use_realpath);
+
+(*env)->ReleaseStringUTFChars(env, j_path, path);
+}
+
+
JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetScope
(JNIEnv *env, jobject obj, jlong ctx, jint scopetype, jstring j_scopename, jstring j_scopecomp)
{
@@ -611,6 +655,7 @@ jfieldID handleField;
jfieldID name1Field;
jfieldID name2Field;
jfieldID argField;
+jfieldID arg_from_nameField;
jfieldID isAliasField;
jstring j_name1;
jstring j_name2;
@@ -671,6 +716,9 @@ if(fh)
argField = (*env)->GetFieldID(env, javaDataClass, "arg", "J");
(*env)->SetLongField(env, obj2, argField, fh->u.attr.arg);
+
+ arg_from_nameField = (*env)->GetFieldID(env, javaDataClass, "arg_from_name", "J");
+ (*env)->SetLongField(env, obj2, arg_from_nameField, fh->u.attr.arg_from_name);
break;
case FST_HT_ATTREND:
diff --git a/contrib/fst_jni/fstAPI.h b/contrib/fst_jni/fstAPI.h
index 485fb9c..dd22430 100644
--- a/contrib/fst_jni/fstAPI.h
+++ b/contrib/fst_jni/fstAPI.h
@@ -193,6 +193,22 @@ JNIEXPORT jint JNICALL Java_fstAPI_fstWriterCreateVar2
/*
* Class: fstAPI
+ * Method: fstWriterSetSourceStem
+ * Signature: (JLjava/lang/String;IZ)V
+ */
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetSourceStem
+ (JNIEnv *, jobject, jlong, jstring, jint, jboolean);
+
+/*
+ * Class: fstAPI
+ * Method: fstWriterSetSourceInstantiationStem
+ * Signature: (JLjava/lang/String;IZ)V
+ */
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetSourceInstantiationStem
+ (JNIEnv *, jobject, jlong, jstring, jint, jboolean);
+
+/*
+ * Class: fstAPI
* Method: fstWriterSetScope
* Signature: (JILjava/lang/String;Ljava/lang/String;)V
*/
diff --git a/contrib/fst_jni/fstAPI.java b/contrib/fst_jni/fstAPI.java
index 0b13020..4963431 100644
--- a/contrib/fst_jni/fstAPI.java
+++ b/contrib/fst_jni/fstAPI.java
@@ -63,7 +63,8 @@ protected native void fstWriterSetEnvVar(long ctx, String envvar);
protected native void fstWriterSetTimescaleFromString(long ctx, String s);
protected native int fstWriterCreateVar(long ctx, int vt, int vd, int len, String nam, int aliasHandle);
protected native int fstWriterCreateVar2(long ctx, int vt, int vd, int len, String nam, int aliasHandle, String type, int svt, int sdt);
-
+protected native void fstWriterSetSourceStem(long ctx, String path, int line, boolean use_realpath);
+protected native void fstWriterSetSourceInstantiationStem(long ctx, String path, int line, boolean use_realpath);
protected native void fstWriterSetScope(long ctx, int scopetype, String scopename, String scopecomp);
protected native void fstWriterEmitVariableLengthValueChange(long ctx, int handle, String val, int len);
protected native void fstWriterSetAttrBegin(long ctx, int attrtype, int subtype, String attrname, long arg);
diff --git a/contrib/fst_jni/fstHier.java b/contrib/fst_jni/fstHier.java
index 59191a7..17728d8 100644
--- a/contrib/fst_jni/fstHier.java
+++ b/contrib/fst_jni/fstHier.java
@@ -22,17 +22,18 @@
public class fstHier
{
-public boolean valid; // all types
-public int htyp; // FST_HT_SCOPE, FST_HT_UPSCOPE, FST_HT_VAR, FST_HT_ATTRBEGIN, FST_HT_ATTREND
-public int typ; // appropriate FST_ST_* type for htyp, vartype, etc.
-public int subtype; // FST_HT_ATTRBEGIN
-public String name1; // FST_HT_SCOPE, FST_HT_VAR, FST_HT_ATTRBEGIN
-public String name2; // FST_HT_SCOPE
-public int direction; // FST_HT_VAR
-public int handle; // FST_HT_VAR
-public int length; // FST_HT_VAR
-public boolean is_alias;// FST_HT_VAR
-public long arg; // FST_HT_ATTRBEGIN
+public boolean valid; // all types
+public int htyp; // FST_HT_SCOPE, FST_HT_UPSCOPE, FST_HT_VAR, FST_HT_ATTRBEGIN, FST_HT_ATTREND
+public int typ; // appropriate FST_ST_* type for htyp, vartype, etc.
+public int subtype; // FST_HT_ATTRBEGIN
+public String name1; // FST_HT_SCOPE, FST_HT_VAR, FST_HT_ATTRBEGIN
+public String name2; // FST_HT_SCOPE
+public int direction; // FST_HT_VAR
+public int handle; // FST_HT_VAR
+public int length; // FST_HT_VAR
+public boolean is_alias; // FST_HT_VAR
+public long arg; // FST_HT_ATTRBEGIN
+public long arg_from_name; // FST_HT_ATTRBEGIN
public fstHier()
{
@@ -47,5 +48,6 @@ public fstHier()
length = 0;
is_alias = false;
arg = 0;
+ arg_from_name = 0;
};
};
diff --git a/contrib/fst_jni/fstMiscType.java b/contrib/fst_jni/fstMiscType.java
index cee895b..d8bc49d 100644
--- a/contrib/fst_jni/fstMiscType.java
+++ b/contrib/fst_jni/fstMiscType.java
@@ -29,8 +29,12 @@ public static final int FST_MT_MIN = 0;
public static final int FST_MT_COMMENT = 0;
public static final int FST_MT_ENVVAR = 1;
public static final int FST_MT_SUPVAR = 2;
-public static final int FST_MT_UNKNOWN = 3;
+public static final int FST_MT_PATHNAME = 3;
+public static final int FST_MT_SOURCESTEM = 4;
+public static final int FST_MT_SOURCEISTEM = 5;
-public static final int FST_MT_MAX = 3;
+public static final int FST_MT_UNKNOWN = 6;
+
+public static final int FST_MT_MAX = 6;
};
diff --git a/contrib/pccts/IBM_VISUAL_AGE_PROJECTS/Makefile.in b/contrib/pccts/IBM_VISUAL_AGE_PROJECTS/Makefile.in
index e5c1fd0..34e86f2 100644
--- a/contrib/pccts/IBM_VISUAL_AGE_PROJECTS/Makefile.in
+++ b/contrib/pccts/IBM_VISUAL_AGE_PROJECTS/Makefile.in
@@ -116,6 +116,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/contrib/pccts/Makefile.in b/contrib/pccts/Makefile.in
index 286115d..8b68ec4 100644
--- a/contrib/pccts/Makefile.in
+++ b/contrib/pccts/Makefile.in
@@ -176,6 +176,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/contrib/pccts/antlr/Makefile.in b/contrib/pccts/antlr/Makefile.in
index ff0fed2..696edbf 100644
--- a/contrib/pccts/antlr/Makefile.in
+++ b/contrib/pccts/antlr/Makefile.in
@@ -165,6 +165,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/contrib/pccts/dlg/Makefile.in b/contrib/pccts/dlg/Makefile.in
index 6415b09..8ac539c 100644
--- a/contrib/pccts/dlg/Makefile.in
+++ b/contrib/pccts/dlg/Makefile.in
@@ -163,6 +163,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/contrib/pccts/h/Makefile.in b/contrib/pccts/h/Makefile.in
index a06f26b..4d03526 100644
--- a/contrib/pccts/h/Makefile.in
+++ b/contrib/pccts/h/Makefile.in
@@ -116,6 +116,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/contrib/pccts/sorcerer/Makefile.in b/contrib/pccts/sorcerer/Makefile.in
index 6c85656..ddbc8b1 100644
--- a/contrib/pccts/sorcerer/Makefile.in
+++ b/contrib/pccts/sorcerer/Makefile.in
@@ -205,6 +205,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/contrib/pccts/sorcerer/h/Makefile.in b/contrib/pccts/sorcerer/h/Makefile.in
index a6a2a01..e70e491 100644
--- a/contrib/pccts/sorcerer/h/Makefile.in
+++ b/contrib/pccts/sorcerer/h/Makefile.in
@@ -116,6 +116,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/contrib/pccts/sorcerer/lib/Makefile.in b/contrib/pccts/sorcerer/lib/Makefile.in
index 002833c..3de0c4f 100644
--- a/contrib/pccts/sorcerer/lib/Makefile.in
+++ b/contrib/pccts/sorcerer/lib/Makefile.in
@@ -120,6 +120,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/contrib/pccts/sorcerer/test/Makefile.in b/contrib/pccts/sorcerer/test/Makefile.in
index cdded32..621cdde 100644
--- a/contrib/pccts/sorcerer/test/Makefile.in
+++ b/contrib/pccts/sorcerer/test/Makefile.in
@@ -176,6 +176,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/contrib/pccts/sorcerer/test/test7/Makefile.in b/contrib/pccts/sorcerer/test/test7/Makefile.in
index 2cca819..d822901 100644
--- a/contrib/pccts/sorcerer/test/test7/Makefile.in
+++ b/contrib/pccts/sorcerer/test/test7/Makefile.in
@@ -116,6 +116,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/contrib/pccts/sorcerer/testcpp/Makefile.in b/contrib/pccts/sorcerer/testcpp/Makefile.in
index 9c4171e..998d14b 100644
--- a/contrib/pccts/sorcerer/testcpp/Makefile.in
+++ b/contrib/pccts/sorcerer/testcpp/Makefile.in
@@ -189,6 +189,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/contrib/pccts/support/DECmms/Makefile.in b/contrib/pccts/support/DECmms/Makefile.in
index 75e91aa..682a7c3 100644
--- a/contrib/pccts/support/DECmms/Makefile.in
+++ b/contrib/pccts/support/DECmms/Makefile.in
@@ -116,6 +116,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/contrib/pccts/support/Makefile.in b/contrib/pccts/support/Makefile.in
index 99f2c22..717f35c 100644
--- a/contrib/pccts/support/Makefile.in
+++ b/contrib/pccts/support/Makefile.in
@@ -176,6 +176,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/contrib/pccts/support/genmk/Makefile.in b/contrib/pccts/support/genmk/Makefile.in
index 14b4566..aa6f4da 100644
--- a/contrib/pccts/support/genmk/Makefile.in
+++ b/contrib/pccts/support/genmk/Makefile.in
@@ -157,6 +157,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/contrib/pccts/support/rexpr/Makefile.in b/contrib/pccts/support/rexpr/Makefile.in
index e0d4531..aaa500c 100644
--- a/contrib/pccts/support/rexpr/Makefile.in
+++ b/contrib/pccts/support/rexpr/Makefile.in
@@ -157,6 +157,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/contrib/pccts/support/set/Makefile.in b/contrib/pccts/support/set/Makefile.in
index 637affd..dd2cd1a 100644
--- a/contrib/pccts/support/set/Makefile.in
+++ b/contrib/pccts/support/set/Makefile.in
@@ -116,6 +116,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/contrib/pccts/support/sym/Makefile.in b/contrib/pccts/support/sym/Makefile.in
index b21c9fc..018f8b3 100644
--- a/contrib/pccts/support/sym/Makefile.in
+++ b/contrib/pccts/support/sym/Makefile.in
@@ -116,6 +116,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/contrib/pccts/testcpp/Makefile.in b/contrib/pccts/testcpp/Makefile.in
index 584f51f..424a226 100644
--- a/contrib/pccts/testcpp/Makefile.in
+++ b/contrib/pccts/testcpp/Makefile.in
@@ -116,6 +116,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/contrib/rtlbrowse/Makefile.in b/contrib/rtlbrowse/Makefile.in
index e3e776e..7ad40c9 100644
--- a/contrib/rtlbrowse/Makefile.in
+++ b/contrib/rtlbrowse/Makefile.in
@@ -221,6 +221,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/contrib/vermin/Makefile.in b/contrib/vermin/Makefile.in
index 7d38635..ea8072b 100644
--- a/contrib/vermin/Makefile.in
+++ b/contrib/vermin/Makefile.in
@@ -161,6 +161,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/contrib/vermin/preproc.c b/contrib/vermin/preproc.c
index 846eb65..fa252ee 100644
--- a/contrib/vermin/preproc.c
+++ b/contrib/vermin/preproc.c
@@ -331,7 +331,7 @@ struct macro_stack_t *mac;
static char inside_skip = 0;
static int prevrc = 0;
-if((mac_nest_head)&&(!(--mac_nest_head->remaining)))
+if((mac_nest_head) /* &&(!(--mac_nest_head->remaining)) */)
{
free(mac_nest_head->macname);
free(mac_nest_head->deftext);
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 969feb1..a7ce848 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -147,6 +147,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/doc/gtkwave.odt b/doc/gtkwave.odt
index 80ce565..bc41927 100644
Binary files a/doc/gtkwave.odt and b/doc/gtkwave.odt differ
diff --git a/examples/Makefile.am b/examples/Makefile.am
index a5e0f13..9302afe 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -1,6 +1,6 @@
## -*- makefile -*-
##
-dist_examples_DATA= des.gtkw des.tcl des.v des.vzt transaction.fst transaction.gtkw transaction.c gtkwaverc
+dist_examples_DATA= des.gtkw des.tcl des.v des.fst transaction.fst transaction.gtkw transaction.c gtkwaverc
examplesdir= $(pkgdatadir)/examples
diff --git a/examples/Makefile.in b/examples/Makefile.in
index ac26a1c..9b029cf 100644
--- a/examples/Makefile.in
+++ b/examples/Makefile.in
@@ -147,6 +147,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
@@ -254,7 +256,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-dist_examples_DATA = des.gtkw des.tcl des.v des.vzt transaction.fst transaction.gtkw transaction.c gtkwaverc
+dist_examples_DATA = des.gtkw des.tcl des.v des.fst transaction.fst transaction.gtkw transaction.c gtkwaverc
examplesdir = $(pkgdatadir)/examples
all: all-am
diff --git a/examples/des.fst b/examples/des.fst
new file mode 100644
index 0000000..614e862
Binary files /dev/null and b/examples/des.fst differ
diff --git a/examples/des.gtkw b/examples/des.gtkw
index d2f1fc9..c646b56 100644
--- a/examples/des.gtkw
+++ b/examples/des.gtkw
@@ -1,16 +1,16 @@
[*]
-[*] GTKWave Analyzer v3.3.29 (w)1999-2012 BSI
-[*] Wed Dec 14 23:53:03 2011
+[*] GTKWave Analyzer v3.3.51 (w)1999-2013 BSI
+[*] Sun Oct 27 23:53:49 2013
[*]
-[dumpfile] "/Users/OSXUser/gtkwave/gtkwave3/examples/des.vzt"
-[dumpfile_mtime] "Fri Feb 4 20:50:48 2011"
-[dumpfile_size] 68801
-[savefile] "/Users/OSXUser/gtkwave/gtkwave3/examples/des.gtkw"
+[dumpfile] "/home/bybell/gtkwave/gtkwave-code/gtkwave3/examples/des.fst"
+[dumpfile_mtime] "Sun Oct 27 23:53:05 2013"
+[dumpfile_size] 158102
+[savefile] "/home/bybell/gtkwave/gtkwave-code/gtkwave3/examples/des.gtkw"
[timestart] 0
[size] 1000 600
-[pos] -3 -1
+[pos] -1 -1
*-3.973790 10 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
-[sst_width] 214
+[sst_width] 220
[signals_width] 107
[sst_expanded] 1
[sst_vpaned_height] 152
@@ -19,16 +19,12 @@ top.clk
@22
[color] 1
top.ct[1:64]
-[color] 2
-top.i[31:0]
[color] 3
top.key[1:64]
[color] 4
top.pt[1:64]
[color] 5
top.ct[1:64]
-[color] 6
-top.i[31:0]
[color] 7
top.clk
[pattern_trace] 1
diff --git a/examples/des.vzt b/examples/des.vzt
deleted file mode 100644
index ff68eb4..0000000
Binary files a/examples/des.vzt and /dev/null differ
diff --git a/examples/gtkwaverc b/examples/gtkwaverc
index 91ebf85..7ae4d6d 100644
--- a/examples/gtkwaverc
+++ b/examples/gtkwaverc
@@ -3,6 +3,19 @@
# (rename to .gtkwaverc and copy
# to home directory to be loaded automatically)
#
+
+# NOTE: env var GTKWAVE_EDITOR can also be used for this, however the rc file overrides it
+# %d is line number (can be combined inside a string as shown for vimx)
+# %s is filename (must stand by itself, can't add anything to it)
+#
+# editor "vimx -g +%d %s"
+# editor "gedit +%d %s"
+# editor "emacs +%d %s"
+
+# For OSX
+# editor "mate -l %d %s"
+
+
use_standard_trace_select no
highlight_wavewindow no
alt_wheel_mode yes
@@ -114,6 +127,7 @@ accel "/File/Export/Write TIM File As" (null)
accel "/File/Close" <Control>W
accel "/File/<separator>" (null)
accel "/File/Print To File" <Control>P
+accel "/File/Grab To File" (null)
accel "/File/<separator>" (null)
accel "/File/Read Save File" <Control>O
accel "/File/Write Save File" <Control>S
@@ -150,6 +164,8 @@ accel "/Edit/Data Format/Binary" <Alt>B
accel "/Edit/Data Format/Octal" <Alt>O
accel "/Edit/Data Format/ASCII" (null)
accel "/Edit/Data Format/BitsToReal" (null)
+accel "/Edit/Data Format/RealToBits/On" (null)
+accel "/Edit/Data Format/RealToBits/Off" (null)
accel "/Edit/Data Format/Right Justify/On" <Alt>J
accel "/Edit/Data Format/Right Justify/Off" <Shift><Alt>J
accel "/Edit/Data Format/Invert/On" <Alt>I
@@ -160,6 +176,8 @@ accel "/Edit/Data Format/Translate Filter File/Disable" (null)
accel "/Edit/Data Format/Translate Filter File/Enable and Select" (null)
accel "/Edit/Data Format/Translate Filter Process/Disable" (null)
accel "/Edit/Data Format/Translate Filter Process/Enable and Select" (null)
+accel "/Edit/Data Format/Transaction Filter Process/Disable" (null)
+accel "/Edit/Data Format/Transaction Filter Process/Enable and Select" (null)
accel "/Edit/Data Format/Analog/Off" (null)
accel "/Edit/Data Format/Analog/Step" (null)
accel "/Edit/Data Format/Analog/Interpolated" (null)
@@ -180,6 +198,7 @@ accel "/Edit/Color Format/Green" (null)
accel "/Edit/Color Format/Blue" (null)
accel "/Edit/Color Format/Indigo" (null)
accel "/Edit/Color Format/Violet" (null)
+accel "/Edit/Color Format/Cycle" (null)
accel "/Edit/Color Format/<separator>" (null)
accel "/Edit/Color Format/Keep xz Colors" (null)
accel "/Edit/Show-Change All Highlighted" (null)
@@ -211,10 +230,16 @@ accel "/Search/Signal Search Regexp" <Alt>S
accel "/Search/Signal Search Hierarchy" <Alt>T
accel "/Search/Signal Search Tree" <Shift><Alt>T
accel "/Search/<separator>" (null)
+accel "/Search/Open Source Definition" (null)
+accel "/Search/Open Source Instantiation" (null)
+accel "/Search/Open Scope" (null)
+accel "/Search/<separator>" (null)
accel "/Search/Autocoalesce" (null)
accel "/Search/Autocoalesce Reversal" (null)
accel "/Search/Autoname Bundles" (null)
accel "/Search/Search Hierarchy Grouping" (null)
+accel "/Search/<separator>" (null)
+accel "/Search/Set Pattern Search Repeat Count" (null)
accel "/Time/Move To Time" F1
accel "/Time/Zoom/Zoom Amount" F2
accel "/Time/Zoom/Zoom Base" <Shift>F2
@@ -238,11 +263,15 @@ accel "/Markers/Show-Change Marker Data" <Alt>M
accel "/Markers/Drop Named Marker" <Alt>N
accel "/Markers/Collect Named Marker" <Shift><Alt>N
accel "/Markers/Collect All Named Markers" <Shift><Control><Alt>N
+accel "/Markers/Copy Primary->B Marker" (null)
+accel "/Markers/Copy Primary->B Marker" B
accel "/Markers/Delete Primary Marker" <Shift><Alt>M
accel "/Markers/<separator>" (null)
accel "/Markers/Find Previous Edge" (null)
accel "/Markers/Find Next Edge" (null)
accel "/Markers/<separator>" (null)
+accel "/Markers/Alternate Wheel Mode" (null)
+accel "/Markers/<separator>" (null)
accel "/Markers/Wave Scrolling" F9
accel "/Markers/Locking/Lock to Lesser Named Marker" Q
accel "/Markers/Locking/Lock to Greater Named Marker" W
@@ -253,6 +282,8 @@ accel "/View/Show Mouseover" (null)
accel "/View/<separator>" (null)
accel "/View/Show Base Symbols" <Alt>F1
accel "/View/<separator>" (null)
+accel "/View/Standard Trace Select" (null)
+accel "/View/<separator>" (null)
accel "/View/Dynamic Resize" <Alt>9
accel "/View/<separator>" (null)
accel "/View/Center Zooms" F8
@@ -288,4 +319,5 @@ accel "/View/Scale To Time Dimension/ns" (null)
accel "/View/Scale To Time Dimension/ps" (null)
accel "/View/Scale To Time Dimension/fs" (null)
accel "/Help/WAVE Help" <Control>H
+accel "/Help/WAVE User Manual" (null)
accel "/Help/Wave Version" (null)
diff --git a/man/Makefile.in b/man/Makefile.in
index 9068373..a64f542 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -149,6 +149,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/man/gtkwaverc.5 b/man/gtkwaverc.5
index 42012ae..bef9af5 100644
--- a/man/gtkwaverc.5
+++ b/man/gtkwaverc.5
@@ -1,4 +1,4 @@
-.TH "GTKWAVERC" "5" "3.3.28" "Anthony Bybell" "GTKWave Configuration File"
+.TH "GTKWAVERC" "5" "3.3.51" "Anthony Bybell" "GTKWave Configuration File"
.SH "NAME"
.LP
gtkwaverc \- GTKWave Configuration File
@@ -180,6 +180,12 @@ A nonzero value indicates that the trace should initially be crunched to fit the
.TP
\fBdynamic_resizing\fR <\fIvalue\fP>
A nonzero value indicates that dynamic resizing should be initially enabled (default). A zero value indicates that dynamic resizing should be initially disabled.
+
+.TP
+\fBeditor\fR <\fI"value"\fP>
+This is used to specify a string (quotes mandatory) for when gtkwave invokes a text editor (e.g., Open Source Definition). Examples are:
+editor "vimx -g +%d %s", editor "gedit +%d %s", editor "emacs +%d %s", and for OSX, editor "mate -l %d %s". The %d may be combined with other characters in a string such as +, etc. The %s argument must stand by itself. Note that if this rc variable is not set,
+then the environment variable GTKWAVE_EDITOR will be consulted next, then finally gedit will be used (if found).
.TP
\fBenable_fast_exit\fR <\fIvalue\fP>
Allows exit without bringing up a confirmation requester. The default is nonzero/yes.
diff --git a/share/Makefile.in b/share/Makefile.in
index dc112c3..917b281 100644
--- a/share/Makefile.in
+++ b/share/Makefile.in
@@ -176,6 +176,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/share/applications/Makefile.in b/share/applications/Makefile.in
index ce978f7..4716504 100644
--- a/share/applications/Makefile.in
+++ b/share/applications/Makefile.in
@@ -146,6 +146,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/share/icons/Makefile.in b/share/icons/Makefile.in
index 529821d..cead50d 100644
--- a/share/icons/Makefile.in
+++ b/share/icons/Makefile.in
@@ -206,6 +206,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/share/icons/gnome/16x16/Makefile.in b/share/icons/gnome/16x16/Makefile.in
index 37f261a..4a8b5dd 100644
--- a/share/icons/gnome/16x16/Makefile.in
+++ b/share/icons/gnome/16x16/Makefile.in
@@ -176,6 +176,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/share/icons/gnome/16x16/mimetypes/Makefile.in b/share/icons/gnome/16x16/mimetypes/Makefile.in
index 0f20dc5..daca6d7 100644
--- a/share/icons/gnome/16x16/mimetypes/Makefile.in
+++ b/share/icons/gnome/16x16/mimetypes/Makefile.in
@@ -146,6 +146,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/share/icons/gnome/32x32/Makefile.in b/share/icons/gnome/32x32/Makefile.in
index 5bb6d1f..11fb5c2 100644
--- a/share/icons/gnome/32x32/Makefile.in
+++ b/share/icons/gnome/32x32/Makefile.in
@@ -176,6 +176,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/share/icons/gnome/32x32/mimetypes/Makefile.in b/share/icons/gnome/32x32/mimetypes/Makefile.in
index 29becf4..5e7e4f8 100644
--- a/share/icons/gnome/32x32/mimetypes/Makefile.in
+++ b/share/icons/gnome/32x32/mimetypes/Makefile.in
@@ -146,6 +146,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/share/icons/gnome/48x48/Makefile.in b/share/icons/gnome/48x48/Makefile.in
index 66e8716..7b5b1da 100644
--- a/share/icons/gnome/48x48/Makefile.in
+++ b/share/icons/gnome/48x48/Makefile.in
@@ -176,6 +176,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/share/icons/gnome/48x48/mimetypes/Makefile.in b/share/icons/gnome/48x48/mimetypes/Makefile.in
index ba884f7..9bd4644 100644
--- a/share/icons/gnome/48x48/mimetypes/Makefile.in
+++ b/share/icons/gnome/48x48/mimetypes/Makefile.in
@@ -146,6 +146,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/share/icons/gnome/Makefile.in b/share/icons/gnome/Makefile.in
index ed022dd..7fc6163 100644
--- a/share/icons/gnome/Makefile.in
+++ b/share/icons/gnome/Makefile.in
@@ -176,6 +176,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/share/mime/Makefile.in b/share/mime/Makefile.in
index de24086..8472dfb 100644
--- a/share/mime/Makefile.in
+++ b/share/mime/Makefile.in
@@ -176,6 +176,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/share/mime/packages/Makefile.in b/share/mime/packages/Makefile.in
index fac3f37..727c81c 100644
--- a/share/mime/packages/Makefile.in
+++ b/share/mime/packages/Makefile.in
@@ -146,6 +146,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/src/Makefile.am b/src/Makefile.am
index 26a58de..b5644ad 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -16,7 +16,7 @@ bin_PROGRAMS= gtkwave twinwave
AM_CFLAGS= -I$(srcdir)/.. -I$(srcdir)/helpers $(FASTTREE_CFLAGS) $(GTK_CFLAGS) $(LIBLZMA_CFLAGS) \
$(LIBZ_CFLAGS) $(LIBBZ2_CFLAGS) $(LIBFST_CFLAGS) $(AET2_CFLAGS) $(FSDB_CFLAGS) $(TCL_INCLUDE_SPEC) \
- $(TCL_DEFADD) $(TK_INCLUDE_SPEC) $(EXTLOAD_CFLAGS) $(LIBJUDY_CFLAGS) $(INLINE_ASM) \
+ $(TCL_DEFADD) $(TK_INCLUDE_SPEC) $(EXTLOAD_CFLAGS) $(GEDIT_CFLAGS) $(LIBJUDY_CFLAGS) $(INLINE_ASM) \
$(GTK_MAC_CFLAGS) $(GCONF_CFLAGS) $(LIBCOCOA_CFLAGS) $(GTK_UNIX_PRINT_CFLAGS)
AM_CXXFLAGS= $(AM_CFLAGS)
diff --git a/src/Makefile.in b/src/Makefile.in
index f51110c..8bc3587 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -259,6 +259,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
@@ -376,7 +378,7 @@ LIBCOCOA_CFLAGS = -I$(srcdir)/cocoa
LIBCOCOA_LDADD = ./cocoa/libgtkwmacintegration.a $(COCOA_GTK_LDADD)
AM_CFLAGS = -I$(srcdir)/.. -I$(srcdir)/helpers $(FASTTREE_CFLAGS) $(GTK_CFLAGS) $(LIBLZMA_CFLAGS) \
$(LIBZ_CFLAGS) $(LIBBZ2_CFLAGS) $(LIBFST_CFLAGS) $(AET2_CFLAGS) $(FSDB_CFLAGS) $(TCL_INCLUDE_SPEC) \
- $(TCL_DEFADD) $(TK_INCLUDE_SPEC) $(EXTLOAD_CFLAGS) $(LIBJUDY_CFLAGS) $(INLINE_ASM) \
+ $(TCL_DEFADD) $(TK_INCLUDE_SPEC) $(EXTLOAD_CFLAGS) $(GEDIT_CFLAGS) $(LIBJUDY_CFLAGS) $(INLINE_ASM) \
$(GTK_MAC_CFLAGS) $(GCONF_CFLAGS) $(LIBCOCOA_CFLAGS) $(GTK_UNIX_PRINT_CFLAGS)
AM_CXXFLAGS = $(AM_CFLAGS)
diff --git a/src/cocoa/Makefile.in b/src/cocoa/Makefile.in
index c6632bd..91aceff 100644
--- a/src/cocoa/Makefile.in
+++ b/src/cocoa/Makefile.in
@@ -169,6 +169,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/src/currenttime.h b/src/currenttime.h
index ba05a68..b68fcfe 100644
--- a/src/currenttime.h
+++ b/src/currenttime.h
@@ -70,11 +70,11 @@ void exponent_to_time_scale(signed char scale);
#include "status.h"
#include "strace.h"
#include "timeentry.h"
+#include "tree.h"
#include "treesearch.h"
#include "vcd_partial.h"
#include "wavewindow.h"
#include "zoombuttons.h"
-#include "tree.h"
#include "hiersearch.h"
#endif
diff --git a/src/extload.c b/src/extload.c
index 689c89d..18cff3c 100644
--- a/src/extload.c
+++ b/src/extload.c
@@ -480,7 +480,7 @@ for(;;)
ttype = TREE_UNKNOWN;
}
- allocate_and_decorate_module_tree_node(ttype, cname, ctype, strlen(cname), strlen(ctype));
+ allocate_and_decorate_module_tree_node(ttype, cname, ctype, strlen(cname), strlen(ctype), 0, 0);
}
}
else
diff --git a/src/fst.c b/src/fst.c
index c7a6674..73c6093 100644
--- a/src/fst.c
+++ b/src/fst.c
@@ -193,7 +193,10 @@ while((h = fstReaderIterateHier(xc)))
default: ttype = TREE_UNKNOWN; break;
}
- allocate_and_decorate_module_tree_node(ttype, h->u.scope.name, h->u.scope.component, h->u.scope.name_length, h->u.scope.component_length);
+ allocate_and_decorate_module_tree_node(ttype, h->u.scope.name, h->u.scope.component, h->u.scope.name_length, h->u.scope.component_length,
+ GLOBALS->stem_valid ? GLOBALS->stem_struct_base_siz : 0,
+ GLOBALS->istem_valid ? GLOBALS->istem_struct_base_siz : 0);
+ GLOBALS->stem_valid = GLOBALS->istem_valid = 0;
break;
case FST_HT_UPSCOPE:
GLOBALS->mod_tree_parent = fstReaderGetCurrentScopeUserInfo(xc);
@@ -360,6 +363,83 @@ while((h = fstReaderIterateHier(xc)))
GLOBALS->supplemental_datatypes_encountered = 1;
GLOBALS->supplemental_vartypes_encountered |= ((svt != FST_SVT_NONE) && (svt != FST_SVT_VHDL_SIGNAL));
}
+ else
+ if(h->u.attr.subtype == FST_MT_SOURCEISTEM)
+ {
+ uint32_t istem_path_number = (uint32_t)h->u.attr.arg_from_name;
+ uint32_t istem_line_number = (uint32_t)h->u.attr.arg;
+
+ if(istem_path_number <= GLOBALS->stem_path_string_table_siz) /* prevent overflows from malformed writers */
+ {
+ GLOBALS->istem_valid = 1;
+ if(!GLOBALS->istem_struct_base)
+ {
+ GLOBALS->istem_struct_base_siz_alloc = 1;
+ GLOBALS->istem_struct_base_siz = 0;
+ GLOBALS->istem_struct_base = malloc_2(GLOBALS->istem_struct_base_siz_alloc * sizeof(struct stem_struct_t));
+ }
+
+ if(GLOBALS->istem_struct_base_siz == GLOBALS->istem_struct_base_siz_alloc)
+ {
+ GLOBALS->istem_struct_base_siz_alloc *= 2;
+ GLOBALS->istem_struct_base = realloc_2(GLOBALS->istem_struct_base, GLOBALS->istem_struct_base_siz_alloc * sizeof(struct stem_struct_t));
+ }
+
+ GLOBALS->istem_struct_base[GLOBALS->istem_struct_base_siz].stem_idx = istem_path_number - 1;
+ GLOBALS->istem_struct_base[GLOBALS->istem_struct_base_siz].stem_line_number = istem_line_number;
+ GLOBALS->istem_struct_base_siz++;
+ }
+ }
+ else
+ if(h->u.attr.subtype == FST_MT_SOURCESTEM)
+ {
+ uint32_t stem_path_number = (uint32_t)h->u.attr.arg_from_name;
+ uint32_t stem_line_number = (uint32_t)h->u.attr.arg;
+
+ if(stem_path_number <= GLOBALS->stem_path_string_table_siz) /* prevent overflows from malformed writers */
+ {
+ GLOBALS->stem_valid = 1;
+ if(!GLOBALS->stem_struct_base)
+ {
+ GLOBALS->stem_struct_base_siz_alloc = 1;
+ GLOBALS->stem_struct_base_siz = 0;
+ GLOBALS->stem_struct_base = malloc_2(GLOBALS->stem_struct_base_siz_alloc * sizeof(struct stem_struct_t));
+ }
+
+ if(GLOBALS->stem_struct_base_siz == GLOBALS->stem_struct_base_siz_alloc)
+ {
+ GLOBALS->stem_struct_base_siz_alloc *= 2;
+ GLOBALS->stem_struct_base = realloc_2(GLOBALS->stem_struct_base, GLOBALS->stem_struct_base_siz_alloc * sizeof(struct stem_struct_t));
+ }
+
+ GLOBALS->stem_struct_base[GLOBALS->stem_struct_base_siz].stem_idx = stem_path_number - 1;
+ GLOBALS->stem_struct_base[GLOBALS->stem_struct_base_siz].stem_line_number = stem_line_number;
+ GLOBALS->stem_struct_base_siz++;
+ }
+ }
+ else
+ if(h->u.attr.subtype == FST_MT_PATHNAME)
+ {
+ if(h->u.attr.name && ((GLOBALS->stem_path_string_table_siz+1) == h->u.attr.arg))
+ {
+ /* == check against h->u.attr.arg is a sanity check against the writer */
+ if(!GLOBALS->stem_path_string_table)
+ {
+ GLOBALS->stem_path_string_table_alloc = 1;
+ GLOBALS->stem_path_string_table_siz = 0;
+ GLOBALS->stem_path_string_table = malloc_2(GLOBALS->stem_path_string_table_alloc * sizeof(char *));
+ }
+
+ if(GLOBALS->stem_path_string_table_siz == GLOBALS->stem_path_string_table_alloc)
+ {
+ GLOBALS->stem_path_string_table_alloc *= 2;
+ GLOBALS->stem_path_string_table = realloc_2(GLOBALS->stem_path_string_table, GLOBALS->stem_path_string_table_alloc * sizeof(char *));
+ }
+
+ GLOBALS->stem_path_string_table[GLOBALS->stem_path_string_table_siz] = strdup_2(h->u.attr.name);
+ GLOBALS->stem_path_string_table_siz++;
+ }
+ }
}
break;
@@ -935,6 +1015,33 @@ if(GLOBALS->subvar_jrb_count) /* generate lookup table for typenames explicitly
}
}
+if(GLOBALS->istem_struct_base)
+ {
+ if(GLOBALS->istem_struct_base_siz != GLOBALS->istem_struct_base_siz_alloc)
+ {
+ GLOBALS->istem_struct_base_siz_alloc = GLOBALS->istem_struct_base_siz;
+ GLOBALS->istem_struct_base = realloc_2(GLOBALS->istem_struct_base, GLOBALS->istem_struct_base_siz_alloc * sizeof(struct stem_struct_t));
+ }
+ }
+
+if(GLOBALS->stem_struct_base)
+ {
+ if(GLOBALS->stem_struct_base_siz != GLOBALS->stem_struct_base_siz_alloc)
+ {
+ GLOBALS->stem_struct_base_siz_alloc = GLOBALS->stem_struct_base_siz;
+ GLOBALS->stem_struct_base = realloc_2(GLOBALS->stem_struct_base, GLOBALS->stem_struct_base_siz_alloc * sizeof(struct stem_struct_t));
+ }
+ }
+
+if(GLOBALS->stem_path_string_table)
+ {
+ if(GLOBALS->stem_path_string_table_siz != GLOBALS->stem_path_string_table_alloc)
+ {
+ GLOBALS->stem_path_string_table_alloc = GLOBALS->stem_path_string_table_siz;
+ GLOBALS->stem_path_string_table = realloc_2(GLOBALS->stem_path_string_table, GLOBALS->stem_path_string_table_alloc * sizeof(char *));
+ }
+ }
+
decorated_module_cleanup(); /* ...also now in gtk2_treesearch.c */
freeze_facility_pack();
iter_through_comp_name_table();
diff --git a/src/globals.c b/src/globals.c
index b508205..c4a856e 100644
--- a/src/globals.c
+++ b/src/globals.c
@@ -322,6 +322,19 @@ NULL, /* subvar_jrb */
NULL, /* subvar_pnt */
0, /* fst_filetype */
0, /* subvar_jrb_count_locked */
+0, /* stem_file_idx */
+0, /* stem_line_number */
+NULL, /* stem_path_string_table */
+NULL, /* stem_struct_base */
+NULL, /* istem_struct_base */
+0, /* stem_path_string_table_siz */
+0, /* stem_path_string_table_alloc */
+0, /* stem_struct_base_siz */
+0, /* stem_struct_base_siz_alloc */
+0, /* istem_struct_base_siz */
+0, /* istem_struct_base_siz_alloc */
+0, /* stem_valid */
+0, /* istem_valid */
/*
@@ -613,6 +626,7 @@ NULL, /* filesel_tim_writesave */
0, /* lock_menu_c_2 252 */
NULL, /* buf_menu_c_1 253 128 */
NULL, /* signal_popup_menu */
+NULL, /* sst_signal_popup_menu */
/*
* mouseover.c
@@ -742,6 +756,7 @@ NULL, /* clist_ptranslate_c_2 316 */
*/
0, /* rc_line_no 318 */
1, /* possibly_use_rc_defaults 319 */
+NULL, /* editor_string */
/*
@@ -1047,6 +1062,7 @@ NULL, /* entry_a_treesearch_gtk2_c_2 455 */
NULL, /* entrybox_text_local_treesearch_gtk2_c_3 456 */
NULL, /* cleanup_e_treesearch_gtk2_c_3 457 */
NULL, /* sig_root_treesearch_gtk2_c_1 458 */
+NULL, /* sst_sig_root_treesearch_gtk2_c_1 */
NULL, /* filter_str_treesearch_gtk2_c_1 459 */
ND_DIR_UNSPECIFIED, /* filter_typ_treesearch_gtk2_c_1 */
0, /* filter_matlen_treesearch_gtk2_c_1 */
@@ -1882,6 +1898,7 @@ void reload_into_new_context_2(void)
new_globals->logfiles = GLOBALS->logfiles; /* this value is a ** chameleon! malloc'd region is outside debug.c control! */
strcpy2_into_new_context(new_globals, &new_globals->argvlist, &GLOBALS->argvlist);
+ strcpy2_into_new_context(new_globals, &new_globals->editor_name, &GLOBALS->editor_name);
strcpy2_into_new_context(new_globals, &new_globals->fontname_logfile, &GLOBALS->fontname_logfile);
strcpy2_into_new_context(new_globals, &new_globals->fontname_signals, &GLOBALS->fontname_signals);
strcpy2_into_new_context(new_globals, &new_globals->fontname_waves, &GLOBALS->fontname_waves);
@@ -1922,6 +1939,7 @@ void reload_into_new_context_2(void)
strcpy2_into_new_context(new_globals, &new_globals->filesel_writesave, &GLOBALS->filesel_writesave);
new_globals->save_success_menu_c_1 = GLOBALS->save_success_menu_c_1;
new_globals->signal_popup_menu = GLOBALS->signal_popup_menu;
+ new_globals->sst_signal_popup_menu = GLOBALS->sst_signal_popup_menu;
strcpy2_into_new_context(new_globals, &new_globals->filesel_vcd_writesave, &GLOBALS->filesel_vcd_writesave);
strcpy2_into_new_context(new_globals, &new_globals->filesel_lxt_writesave, &GLOBALS->filesel_lxt_writesave);
diff --git a/src/globals.h b/src/globals.h
index fae9a0c..03ec0a3 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -321,6 +321,19 @@ unsigned int subvar_jrb_count;
char **subvar_pnt;
unsigned char fst_filetype;
unsigned subvar_jrb_count_locked : 1;
+uint32_t stem_file_idx;
+uint32_t stem_line_number;
+char **stem_path_string_table;
+struct stem_struct_t *stem_struct_base;
+struct stem_struct_t *istem_struct_base;
+uint32_t stem_path_string_table_siz;
+uint32_t stem_path_string_table_alloc;
+uint32_t stem_struct_base_siz;
+uint32_t stem_struct_base_siz_alloc;
+uint32_t istem_struct_base_siz;
+uint32_t istem_struct_base_siz_alloc;
+unsigned stem_valid : 1;
+unsigned istem_valid : 1;
/*
@@ -609,6 +622,7 @@ int lock_menu_c_1; /* from menu.c 268 */
int lock_menu_c_2; /* from menu.c 269 */
char *buf_menu_c_1; /* from menu.c 270 */
GtkWidget *signal_popup_menu; /* from menu.c */
+GtkWidget *sst_signal_popup_menu; /* from menu.c */
/*
@@ -739,6 +753,7 @@ GtkWidget *clist_ptranslate_c_2; /* from ptranslate.c 334 */
*/
int rc_line_no; /* from rc.c 336 */
int possibly_use_rc_defaults; /* from rc.c 337 */
+char *editor_name; /* from rc.c */
/*
@@ -1030,6 +1045,7 @@ GtkWidget *entry_a_treesearch_gtk2_c_2; /* from treesearch_gtk2.c 485 */
char *entrybox_text_local_treesearch_gtk2_c_3; /* from treesearch_gtk2.c 486 */
void (*cleanup_e_treesearch_gtk2_c_3)(void); /* from treesearch_gtk2.c 487 */
struct tree *sig_root_treesearch_gtk2_c_1; /* from treesearch_gtk2.c 488 */
+struct tree *sst_sig_root_treesearch_gtk2_c_1; /* from treesearch_gtk2.c */
char *filter_str_treesearch_gtk2_c_1; /* from treesearch_gtk2.c 489 */
int filter_typ_treesearch_gtk2_c_1;
int filter_matlen_treesearch_gtk2_c_1;
diff --git a/src/helpers/Makefile.in b/src/helpers/Makefile.in
index 3975ee3..fa4f541 100644
--- a/src/helpers/Makefile.in
+++ b/src/helpers/Makefile.in
@@ -224,6 +224,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/src/helpers/fst/Makefile.in b/src/helpers/fst/Makefile.in
index 65ad7a3..34836a8 100644
--- a/src/helpers/fst/Makefile.in
+++ b/src/helpers/fst/Makefile.in
@@ -163,6 +163,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/src/helpers/fst/fstapi.c b/src/helpers/fst/fstapi.c
index 8c7c075..a2d0045 100644
--- a/src/helpers/fst/fstapi.c
+++ b/src/helpers/fst/fstapi.c
@@ -1979,7 +1979,7 @@ if(xc && comm)
}
-void fstWriterSetSourceStem(void *ctx, const char *path, unsigned int line, unsigned int use_realpath)
+static void fstWriterSetSourceStem_2(void *ctx, const char *path, unsigned int line, unsigned int use_realpath, int typ)
{
struct fstWriterContext *xc = (struct fstWriterContext *)ctx;
@@ -2028,11 +2028,23 @@ if(xc && path && path[0])
}
}
- fstWriterSetAttrDoubleArgGeneric(xc, FST_MT_SOURCESTEM, sidx, line);
+ fstWriterSetAttrDoubleArgGeneric(xc, typ, sidx, line);
}
}
+void fstWriterSetSourceStem(void *ctx, const char *path, unsigned int line, unsigned int use_realpath)
+{
+fstWriterSetSourceStem_2(ctx, path, line, use_realpath, FST_MT_SOURCESTEM);
+}
+
+
+void fstWriterSetSourceInstantiationStem(void *ctx, const char *path, unsigned int line, unsigned int use_realpath)
+{
+fstWriterSetSourceStem_2(ctx, path, line, use_realpath, FST_MT_SOURCEISTEM);
+}
+
+
void fstWriterSetComment(void *ctx, const char *comm)
{
fstWriterSetAttrGeneric(ctx, comm, FST_MT_COMMENT, 0);
@@ -3390,8 +3402,8 @@ if(!(isfeof=feof(xc->fh)))
xc->hier.u.attr.arg = fstReaderVarint64(xc->fh);
if(xc->hier.u.attr.typ == FST_AT_MISC)
- {
- if(xc->hier.u.attr.subtype == FST_MT_SOURCESTEM)
+ {
+ if((xc->hier.u.attr.subtype == FST_MT_SOURCESTEM)||(xc->hier.u.attr.subtype == FST_MT_SOURCEISTEM))
{
int sidx_skiplen_dummy = 0;
xc->hier.u.attr.arg_from_name = fstGetVarint64((unsigned char *)xc->str_scope_nam, &sidx_skiplen_dummy);
@@ -3622,7 +3634,7 @@ while(!feof(xc->fh))
}
else
{
- if(subtype == FST_MT_SOURCESTEM)
+ if((subtype == FST_MT_SOURCESTEM)||(subtype == FST_MT_SOURCEISTEM))
{
int sidx_skiplen_dummy = 0;
uint64_t sidx = fstGetVarint64((unsigned char *)str, &sidx_skiplen_dummy);
diff --git a/src/helpers/fst/fstapi.h b/src/helpers/fst/fstapi.h
index 6e7fb84..9ace034 100644
--- a/src/helpers/fst/fstapi.h
+++ b/src/helpers/fst/fstapi.h
@@ -181,9 +181,10 @@ enum fstMiscType {
FST_MT_SUPVAR = 2, /* use fstWriterCreateVar2() to emit */
FST_MT_PATHNAME = 3, /* reserved for fstWriterSetSourceStem() string -> number management */
FST_MT_SOURCESTEM = 4, /* use fstWriterSetSourceStem() to emit */
- FST_MT_UNKNOWN = 5,
+ FST_MT_SOURCEISTEM = 5, /* use fstWriterSetSourceInstantiationStem() to emit */
+ FST_MT_UNKNOWN = 6,
- FST_MT_MAX = 5
+ FST_MT_MAX = 6
};
enum fstArrayType {
@@ -342,6 +343,7 @@ void fstWriterSetParallelMode(void *ctx, int enable);
void fstWriterSetRepackOnClose(void *ctx, int enable); /* type = 0 (none), 1 (libz) */
void fstWriterSetScope(void *ctx, enum fstScopeType scopetype,
const char *scopename, const char *scopecomp);
+void fstWriterSetSourceInstantiationStem(void *ctx, const char *path, unsigned int line, unsigned int use_realpath);
void fstWriterSetSourceStem(void *ctx, const char *path, unsigned int line, unsigned int use_realpath);
void fstWriterSetTimescale(void *ctx, int ts);
void fstWriterSetTimescaleFromString(void *ctx, const char *s);
diff --git a/src/helpers/vcd2fst.c b/src/helpers/vcd2fst.c
index 1c3aa42..823ca51 100644
--- a/src/helpers/vcd2fst.c
+++ b/src/helpers/vcd2fst.c
@@ -334,7 +334,31 @@ if(comp_name_jrb)
/*** ^^^ extload component type name determination ^^^ ***/
/*********************************************************/
-size_t getline_replace(char **wbuf, char **buf, size_t *len, FILE *f)
+static uint64_t atoi_2(const unsigned char *s)
+{
+uint64_t res = 0;
+unsigned char ch;
+
+ch = *s - '0';
+while(*s && (ch > 9))
+ {
+ s++;
+ ch = *s - '0';
+ }
+
+while(ch < 10)
+ {
+ s++;
+ res *= 10;
+ res += ch;
+ ch = *s - '0';
+ }
+
+return(res);
+}
+
+
+int getline_replace(char **wbuf, char **buf, size_t *len, FILE *f)
{
char *fgets_rc;
@@ -362,7 +386,7 @@ while(*(buf)[0]==' ') { (*buf)++; } /* verilator leading spaces fix */
if((!(*buf)[0])||(!fgets_rc))
{
- return(-1);
+ return(0);
}
else
{
@@ -407,7 +431,7 @@ char *buf = NULL, *wbuf = NULL;
size_t glen = 0;
void *ctx;
int line = 0;
-size_t ss;
+int ss;
fstHandle returnedhandle;
JRB node;
uint64_t prev_tim = 0;
@@ -493,7 +517,7 @@ while(!feof(f))
char *buf1;
ss = getline_replace(&wbuf, &buf, &glen, f);
- if(ss == -1)
+ if(!ss)
{
break;
}
@@ -987,17 +1011,17 @@ while(!feof(f))
if((pnt = strstr(buf, "$end")))
{
*pnt = 0;
- sscanf(buf+10, "%"SCNu64, &tzero);
+ sscanf(buf+10, "%"SCNd64, &tzero);
}
else
{
ss = getline_replace(&wbuf, &buf, &glen, f);
- if(ss == -1)
+ if(!ss)
{
break;
}
line++;
- sscanf(buf, "%"SCNu64, &tzero);
+ sscanf(buf, "%"SCNd64, &tzero);
}
fstWriterSetTimezero(ctx, tzero);
@@ -1019,7 +1043,7 @@ while(!feof(f))
if(!num)
{
ss = getline_replace(&wbuf, &buf, &glen, f);
- if(ss == -1)
+ if(!ss)
{
break;
}
@@ -1105,7 +1129,7 @@ while(!feof(f))
if(!found)
{
ss = getline_replace(&wbuf, &buf, &glen, f);
- if(ss == -1)
+ if(!ss)
{
break;
}
@@ -1142,7 +1166,7 @@ while(!feof(f))
else
{
ss = getline_replace(&wbuf, &buf, &glen, f);
- if(ss == -1)
+ if(!ss)
{
break;
}
@@ -1194,7 +1218,7 @@ if((!hash_kill) && (vcd_ids))
hash_kill = 1; /* scan-build */
}
-while(!feof(f))
+for(;;) /* was while(!feof(f)) */
{
unsigned int hash;
uint64_t tim;
@@ -1202,7 +1226,7 @@ while(!feof(f))
double doub;
ss = getline_replace(&wbuf, &buf, &glen, f);
- if(ss == -1)
+ if(!ss)
{
break;
}
@@ -1431,7 +1455,7 @@ while(!feof(f))
break;
case '#':
- sscanf(buf+1, "%"SCNu64, &tim);
+ tim = atoi_2((unsigned char *)(buf+1));
if((tim >= prev_tim)||(!prev_tim))
{
prev_tim = tim;
diff --git a/src/libbz2/Makefile.in b/src/libbz2/Makefile.in
index 3c9f7a6..47192d0 100644
--- a/src/libbz2/Makefile.in
+++ b/src/libbz2/Makefile.in
@@ -165,6 +165,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/src/liblzma/Makefile.in b/src/liblzma/Makefile.in
index 4666283..a4206cc 100644
--- a/src/liblzma/Makefile.in
+++ b/src/liblzma/Makefile.in
@@ -163,6 +163,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/src/libz/Makefile.in b/src/libz/Makefile.in
index c15103e..27a0afd 100644
--- a/src/libz/Makefile.in
+++ b/src/libz/Makefile.in
@@ -168,6 +168,8 @@ FSDB_CFLAGS = @FSDB_CFLAGS@
FSDB_LDADD = @FSDB_LDADD@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GEDITTEST = @GEDITTEST@
+GEDIT_CFLAGS = @GEDIT_CFLAGS@
GPERF = @GPERF@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
diff --git a/src/main.c b/src/main.c
index e6055cd..4295d45 100644
--- a/src/main.c
+++ b/src/main.c
@@ -23,7 +23,7 @@
/*
#define WAVE_CRASH_ON_GTK_WARNING
- */
+*/
#include "wave_locale.h"
@@ -650,6 +650,7 @@ if(!GLOBALS)
GLOBALS->make_vcd_save_file = old_g->make_vcd_save_file;
GLOBALS->strace_repeat_count = old_g->strace_repeat_count;
+ strcpy2_into_new_context(GLOBALS, &GLOBALS->editor_name, &old_g->editor_name);
strcpy2_into_new_context(GLOBALS, &GLOBALS->fontname_logfile, &old_g->fontname_logfile);
strcpy2_into_new_context(GLOBALS, &GLOBALS->fontname_signals, &old_g->fontname_signals);
strcpy2_into_new_context(GLOBALS, &GLOBALS->fontname_waves, &old_g->fontname_waves);
@@ -2247,7 +2248,7 @@ if(GLOBALS->treeopen_chain_head)
{
if(GLOBALS->ctree_main)
{
- force_open_tree_node(t->str, 0);
+ force_open_tree_node(t->str, 0, NULL);
}
t2 = t->next;
diff --git a/src/menu.c b/src/menu.c
index eadc2f6..93088f2 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -5085,23 +5085,235 @@ colorformat(WAVE_COLOR_CYCLE);
}
/**/
-void
-menu_open_hierarchy(gpointer null_data, guint callback_action, GtkWidget *widget)
+char **grow_array(char ***src, int *siz, char *str)
+{
+if(!*src)
+ {
+ *src = malloc_2(sizeof(char *));
+ (*src)[0] = str;
+ *siz = 1;
+ }
+ else
+ {
+ *src = realloc_2(*src, (*siz + 1) * sizeof(char *));
+ (*src)[*siz] = str;
+ *siz = *siz + 1;
+ }
+
+return(*src);
+}
+
+
+static void open_index_in_forked_editor(uint32_t idx, int typ)
+{
+if(idx)
+ {
+ int lineno = 1;
+ char *edname = getenv("GTKWAVE_EDITOR");
+ char *fname = NULL;
+ FILE *ftest = NULL;
+
+ if(GLOBALS->editor_name)
+ {
+ edname = GLOBALS->editor_name; /* rcfile "editor" variable first */
+ }
+ else
+ {
+ if(edname)
+ {
+ /* ok, env var GTKWAVE_EDITOR second */
+ }
+#ifdef GEDIT_PATH
+ else
+ {
+ /* fallback */
+ edname = GEDIT_PATH;
+ }
+#endif
+ }
+
+#ifdef MAC_INTEGRATION
+ if(!edname)
+ {
+ edname = "open -t"; /* Use OSX TextEdit as editor of last resort */
+ }
+#endif
+
+ idx--;
+ if(typ == FST_MT_SOURCESTEM)
+ {
+ lineno = GLOBALS->stem_struct_base[idx].stem_line_number;
+ fname = GLOBALS->stem_path_string_table[GLOBALS->stem_struct_base[idx].stem_idx];
+ }
+ else
+ {
+ lineno = GLOBALS->istem_struct_base[idx].stem_line_number;
+ fname = GLOBALS->stem_path_string_table[GLOBALS->istem_struct_base[idx].stem_idx];
+ }
+
+#ifdef __MINGW32__
+ {
+ fprintf(stderr, "GTKWAVE | Not supported in Windows!\n");
+ }
+#else
+
+ if(!(ftest = fopen(fname, "rb")))
+ {
+ char *rp = get_relative_adjusted_name(GLOBALS->loaded_file_name, fname, GLOBALS->loaded_file_name);
+ if(!rp)
+ {
+ int clen = strlen(fname);
+ int wid = clen * 10;
+
+ if(wid < 400) wid = 400;
+
+ simplereqbox("Could not open file!", wid, fname, "OK", NULL, NULL, 1);
+ return;
+ }
+
+ fname = wave_alloca(strlen(rp) + 1);
+ strcpy(fname, rp);
+ free_2(rp);
+ }
+ else
+ {
+ fclose(ftest); ftest = NULL;
+ }
+
+ {
+ pid_t pid=fork();
+
+ if(((int)pid) < 0)
+ {
+ /* can't do anything about this */
+ }
+ else
+ {
+ if(pid) /* parent==original server_pid */
+ {
+ }
+ else
+ {
+ char *str = strdup_2(edname);
+ char nbuf[32];
+
+ char *saveptr1 = NULL;
+ char *str1, *token, *sd_token;
+ const char *delim = " \t";
+ int num_seen = 0;
+ int fn_seen = 0;
+
+ char **ar = NULL;
+ int siz = 0;
+
+ for(str1 = str;;str1 = NULL)
+ {
+ token = strtok_r(str1, delim, &saveptr1);
+ if(!token) break;
+
+ if(strstr(token, "%d"))
+ {
+ sprintf(nbuf, token, lineno);
+ sd_token = strdup_2(nbuf);
+ num_seen = 1;
+ }
+ else if(!strcmp(token, "%s"))
+ {
+ sd_token = strdup_2(fname);
+ fn_seen = 1;
+ }
+ else
+ {
+ sd_token = strdup_2(token);
+ }
+ grow_array(&ar, &siz, sd_token);
+ }
+
+ if(ar && edname)
+ {
+ if(!num_seen)
+ {
+ if((strstr(ar[0], "vi")) || (strstr(ar[0], "emacs")) || (strstr(ar[0], "gedit")))
+ {
+ sprintf(nbuf, "+%d", lineno);
+ sd_token = strdup_2(nbuf);
+ grow_array(&ar, &siz, sd_token);
+ }
+ }
+
+ if(!fn_seen)
+ {
+ sd_token = strdup_2(fname);
+ grow_array(&ar, &siz, sd_token);
+ }
+
+ grow_array(&ar, &siz, NULL);
+
+ execvp(ar[0], ar);
+ }
+
+ fprintf(stderr, "GTKWAVE | Could not find editor executable!\n");
+ exit(255); /* control never gets here if successful */
+ }
+ }
+ }
+#endif
+ }
+ else
+ {
+ simplereqbox("Open Source", 400, "Source stem not present!", "OK", NULL, NULL, 1);
+ }
+}
+
+
+static void
+menu_open_hierarchy_2(gpointer null_data, guint callback_action, GtkWidget *widget, int typ)
{
Trptr t;
int fix=0;
+struct tree *t_forced = NULL;
if(GLOBALS->helpbox_is_active)
{
- help_text_bold("\n\nOpen Hierarchy");
- help_text(
+ if((typ == FST_MT_SOURCESTEM) || (typ == FST_MT_SOURCEISTEM))
+ {
+ if(typ == FST_MT_SOURCESTEM)
+ {
+ help_text_bold("\n\nOpen Source Definition");
+ }
+ else
+ {
+ help_text_bold("\n\nOpen Source Instantiation");
+ }
+ help_text(
#if WAVE_USE_GTK2
- " opens and selects the appropriate level of hierarchy in the SST"
- " for the first selected signal."
+ " opens and selects the appropriate level of hierarchy in the SST"
+ " for the first selected signal and also invokes the editor specified by the"
+ " \"editor\" gtkwaverc variable, that specified by the environment variable $GTKWAVE_EDITOR,"
+#ifndef MAC_INTEGRATION
+
+ " or gedit (if found during ./configure)"
#else
- " is not available with this build. Please build against GTK 2."
+ " gedit (if found during ./configure), or lastly open -t"
#endif
- );
+ " on the appropriate source unit. This is currently only supported by FST."
+#else
+ " is not available with this build. Please build against GTK 2."
+#endif
+ );
+ }
+ else
+ {
+ help_text_bold("\n\nOpen Scope");
+ help_text(
+#if WAVE_USE_GTK2
+ " opens and selects the appropriate level of hierarchy in the SST"
+ " for the first selected signal."
+#else
+ " is not available with this build. Please build against GTK 2."
+#endif
+ );
+ }
return;
}
@@ -5115,6 +5327,11 @@ if((t=GLOBALS->traces.first))
{
char *tname = NULL;
+ if(!HasWave(t))
+ {
+ break;
+ }
+
if (HasAlias(t))
{
tname = strdup_2(t->name_full);
@@ -5127,6 +5344,11 @@ if((t=GLOBALS->traces.first))
{
int flagged = HIER_DEPACK_ALLOC;
+ if(!t->n.nd)
+ {
+ break; /* additional guard on top of !HasWave(t) */
+ }
+
tname = hier_decompress_flagged(t->n.nd->nname, &flagged);
if(!flagged)
{
@@ -5144,7 +5366,7 @@ if((t=GLOBALS->traces.first))
lasthier++; /* zero out character after hierarchy */
*lasthier = 0;
tname_copy = strdup_2(tname); /* force_open_tree_node() is destructive */
- if(!force_open_tree_node(tname_copy, 1))
+ if(force_open_tree_node(tname_copy, 1, &t_forced) >= 0)
{
if(GLOBALS->selected_hierarchy_name)
{
@@ -5176,10 +5398,130 @@ if((t=GLOBALS->traces.first))
}
+if(((typ == FST_MT_SOURCESTEM) || (typ == FST_MT_SOURCEISTEM)) && t_forced)
+ {
+ uint32_t idx = (typ == FST_MT_SOURCESTEM) ? t_forced->t_stem : t_forced->t_istem;
+
+ if(!GLOBALS->stem_path_string_table)
+ {
+ fprintf(stderr, "GTKWAVE | Could not find stems information in this file!\n");
+ }
+ else
+ {
+ if(!idx && (typ == FST_MT_SOURCEISTEM) && GLOBALS->istem_struct_base)
+ {
+ /* handle top level where istem == stem and istem is deliberately not specified */
+ typ = FST_MT_SOURCESTEM;
+ idx = t_forced->t_stem;
+ }
+
+ open_index_in_forked_editor(idx, typ);
+ }
+ }
+
#endif
}
+static void
+menu_open_hierarchy_2a(gpointer null_data, guint callback_action, GtkWidget *widget, int typ)
+{
+Trptr t;
+int fix=0;
+if(GLOBALS->helpbox_is_active)
+ {
+ if((typ == FST_MT_SOURCESTEM) || (typ == FST_MT_SOURCEISTEM))
+ {
+ if(typ == FST_MT_SOURCESTEM)
+ {
+ help_text_bold("\n\nOpen Source Definition");
+ }
+ else
+ {
+ help_text_bold("\n\nOpen Source Instantiation");
+ }
+ help_text(
+#if WAVE_USE_GTK2
+ " invokes $GTKWAVE_EDITOR or gedit (if found) on the appropriate source unit."
+#else
+ " is not available with this build. Please build against GTK 2."
+#endif
+ );
+ }
+ else
+ {
+ help_text_bold("\n\nOpen Scope");
+ help_text(
+#if WAVE_USE_GTK2
+ " opens and selects the appropriate level of hierarchy in the SST"
+ " for the first selected signal."
+#else
+ " is not available with this build. Please build against GTK 2."
+#endif
+ );
+ }
+ return;
+ }
+
+#if WAVE_USE_GTK2
+
+if((typ == FST_MT_SOURCESTEM) || (typ == FST_MT_SOURCEISTEM))
+ {
+ struct tree *t_forced = GLOBALS->sst_sig_root_treesearch_gtk2_c_1;
+
+ if(t_forced)
+ {
+ uint32_t idx = (typ == FST_MT_SOURCESTEM) ? t_forced->t_stem : t_forced->t_istem;
+
+ if(!GLOBALS->stem_path_string_table)
+ {
+ fprintf(stderr, "GTKWAVE | Could not find stems information in this file!\n");
+ }
+ else
+ {
+ if(!idx && (typ == FST_MT_SOURCEISTEM) && GLOBALS->istem_struct_base)
+ {
+ /* handle top level where istem == stem and istem is deliberately not specified */
+ typ = FST_MT_SOURCESTEM;
+ idx = t_forced->t_stem;
+ }
+
+ open_index_in_forked_editor(idx, typ);
+ }
+ }
+ }
+
+#endif
+}
+
+
+void menu_open_hierarchy(gpointer null_data, guint callback_action, GtkWidget *widget)
+{
+menu_open_hierarchy_2(null_data, callback_action, widget, FST_MT_MIN); /* zero for regular open */
+}
+
+
+void menu_open_hierarchy_source(gpointer null_data, guint callback_action, GtkWidget *widget)
+{
+menu_open_hierarchy_2(null_data, callback_action, widget, FST_MT_SOURCESTEM); /* for definition source */
+}
+
+void menu_open_hierarchy_isource(gpointer null_data, guint callback_action, GtkWidget *widget)
+{
+menu_open_hierarchy_2(null_data, callback_action, widget, FST_MT_SOURCEISTEM); /* for instantiation source */
+}
+
+
+void menu_open_sst_hierarchy_source(gpointer null_data, guint callback_action, GtkWidget *widget)
+{
+menu_open_hierarchy_2a(null_data, callback_action, widget, FST_MT_SOURCESTEM); /* for definition source */
+}
+
+void menu_open_sst_hierarchy_isource(gpointer null_data, guint callback_action, GtkWidget *widget)
+{
+menu_open_hierarchy_2a(null_data, callback_action, widget, FST_MT_SOURCEISTEM); /* for instantiation source */
+}
+
/**/
@@ -6325,7 +6667,11 @@ static gtkwave_mlist_t menu_items[] =
WAVE_GTKIFE("/Search/Signal Search Hierarchy", "<Alt>T", menu_hiersearch, WV_MENU_SSH, "<Item>"),
WAVE_GTKIFE("/Search/Signal Search Tree", "<Shift><Alt>T", menu_treesearch, WV_MENU_SST, "<Item>"),
WAVE_GTKIFE("/Search/<separator>", NULL, NULL, WV_MENU_SEP7, "<Separator>"),
- WAVE_GTKIFE("/Search/Open Hierarchy", NULL, menu_open_hierarchy, WV_MENU_OPENH, "<Item>"),
+#if !defined __MINGW32__ && !defined _MSC_VER
+ WAVE_GTKIFE("/Search/Open Source Definition", NULL, menu_open_hierarchy_source, WV_MENU_OPENHS, "<Item>"),
+ WAVE_GTKIFE("/Search/Open Source Instantiation", NULL, menu_open_hierarchy_isource, WV_MENU_OPENIHS, "<Item>"),
+#endif
+ WAVE_GTKIFE("/Search/Open Scope", NULL, menu_open_hierarchy, WV_MENU_OPENH, "<Item>"),
WAVE_GTKIFE("/Search/<separator>", NULL, NULL, WV_MENU_SEP7D, "<Separator>"),
WAVE_GTKIFE("/Search/Autocoalesce", NULL, menu_autocoalesce, WV_MENU_ACOL, "<ToggleItem>"),
WAVE_GTKIFE("/Search/Autocoalesce Reversal", NULL, menu_autocoalesce_reversal, WV_MENU_ACOLR, "<ToggleItem>"),
@@ -6840,8 +7186,8 @@ if(!path) return(1);
path++;
if(!*path) return(1);
-pathend = strchr(path+1, '\"');
-if(!path) return(1);
+pathend = strchr(path, '\"');
+if(!pathend) return(1);
*pathend = 0;
@@ -6952,7 +7298,13 @@ static gtkwave_mlist_t popmenu_items[] =
WAVE_GTKIFE("/Copy", NULL, menu_copy_traces, WV_MENU_ECY, "<Item>"),
WAVE_GTKIFE("/Paste", NULL, menu_paste_traces, WV_MENU_EP, "<Item>"),
WAVE_GTKIFE("/<separator>", NULL, NULL, WV_MENU_SEP4, "<Separator>"),
- WAVE_GTKIFE("/Open Hierarchy", NULL, menu_open_hierarchy, WV_MENU_OPENH, "<Item>")
+ WAVE_GTKIFE("/Open Scope", NULL, menu_open_hierarchy, WV_MENU_OPENH, "<Item>")
+#if !defined __MINGW32__ && !defined _MSC_VER
+ ,
+ /* see do_popup_menu() for specific patch for this for if(!GLOBALS->stem_path_string_table) ... */
+ WAVE_GTKIFE("/Open Source Definition", NULL, menu_open_hierarchy_source, WV_MENU_OPENHS, "<Item>"),
+ WAVE_GTKIFE("/Open Source Instantiation", NULL, menu_open_hierarchy_isource, WV_MENU_OPENIHS, "<Item>")
+#endif
};
@@ -6964,6 +7316,21 @@ void do_popup_menu (GtkWidget *my_widget, GdkEventButton *event)
if(!GLOBALS->signal_popup_menu)
{
int nmenu_items = sizeof(popmenu_items) / sizeof(popmenu_items[0]);
+
+#if !defined __MINGW32__ && !defined _MSC_VER
+ if(!GLOBALS->stem_path_string_table)
+ {
+ nmenu_items = nmenu_items - 2; /* to remove WV_MENU_OPENHS, WV_MENU_OPENIHS -> keep at end of list! */
+ }
+ else
+ {
+ if(!GLOBALS->istem_struct_base)
+ {
+ nmenu_items--; /* remove "/Open Source Instantiation" if not present */
+ }
+ }
+#endif
+
#ifdef WAVE_USE_MLIST_T
GLOBALS->signal_popup_menu = menu = alt_menu(popmenu_items, nmenu_items, NULL, NULL, FALSE);
#else
@@ -6996,6 +7363,78 @@ void do_popup_menu (GtkWidget *my_widget, GdkEventButton *event)
button, event_time);
}
+/***************************/
+/*** sst popup menu code ***/
+/***************************/
+
+#if !defined __MINGW32__ && !defined _MSC_VER
+static gtkwave_mlist_t sst_popmenu_items[] =
+{
+ WAVE_GTKIFE("/Open Source Definition", NULL, menu_open_sst_hierarchy_source, WV_MENU_OPENHS, "<Item>"),
+ WAVE_GTKIFE("/Open Source Instantiation", NULL, menu_open_sst_hierarchy_isource, WV_MENU_OPENIHS, "<Item>")
+};
+
+
+void do_sst_popup_menu (GtkWidget *my_widget, GdkEventButton *event)
+{
+ GtkWidget *menu;
+ int button, event_time;
+
+ if(!GLOBALS->stem_path_string_table)
+ {
+ return; /* no stems so no popup */
+ }
+
+ if(!GLOBALS->sst_signal_popup_menu)
+ {
+ int nmenu_items = sizeof(sst_popmenu_items) / sizeof(sst_popmenu_items[0]);
+
+ if(!GLOBALS->istem_struct_base)
+ {
+ nmenu_items--; /* remove "/Open Source Instantiation" if not present */
+ }
+
+#ifdef WAVE_USE_MLIST_T
+ GLOBALS->sst_signal_popup_menu = menu = alt_menu(sst_popmenu_items, nmenu_items, NULL, NULL, FALSE);
+#else
+ GtkItemFactory *item_factory = gtk_item_factory_new (GTK_TYPE_MENU, "<main>", NULL);
+ gtk_item_factory_create_items (item_factory, nmenu_items, sst_popmenu_items, NULL);
+ GLOBALS->sst_signal_popup_menu = menu = gtk_item_factory_get_widget (item_factory, "<main>");
+#endif
+ }
+ else
+ {
+ menu = GLOBALS->sst_signal_popup_menu;
+ }
+
+ if (event)
+ {
+ button = event->button;
+ event_time = event->time;
+ }
+ else
+ {
+ button = 0;
+#if WAVE_USE_GTK2
+ event_time = gtk_get_current_event_time ();
+#else
+ return; /* disabled in GTK1.2 */
+#endif
+ }
+
+ gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL,
+ button, event_time);
+}
+
+#else
+
+void do_sst_popup_menu (GtkWidget *my_widget, GdkEventButton *event)
+{
+/* nothing */
+}
+#endif
+
+
void SetTraceScrollbarRowValue(int row, unsigned location)
{
if(row >= 0)
diff --git a/src/menu.h b/src/menu.h
index afff673..c07025e 100644
--- a/src/menu.h
+++ b/src/menu.h
@@ -30,6 +30,7 @@
#include "main.h"
void do_popup_menu (GtkWidget *my_widget, GdkEventButton *event);
+void do_sst_popup_menu (GtkWidget *my_widget, GdkEventButton *event);
void get_main_menu (GtkWidget *, GtkWidget **menubar);
void menu_set_sensitive(void);
int file_quit_cmd_callback (GtkWidget *widget, gpointer data);
@@ -203,6 +204,10 @@ WV_MENU_SSR,
WV_MENU_SSH,
WV_MENU_SST,
WV_MENU_SEP7,
+#if !defined __MINGW32__ && !defined _MSC_VER
+WV_MENU_OPENHS,
+WV_MENU_OPENIHS,
+#endif
WV_MENU_OPENH,
WV_MENU_SEP7D,
WV_MENU_ACOL,
diff --git a/src/rc.c b/src/rc.c
index c529ee3..691d123 100644
--- a/src/rc.c
+++ b/src/rc.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) Tony Bybell 1999-2012.
+ * Copyright (c) Tony Bybell 1999-2013.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -192,6 +192,31 @@ GLOBALS->do_resize_signals=atoi_64(str)?1:0;
return(0);
}
+int f_editor(char *str)
+{
+char *path, *pathend;
+
+DEBUG(printf("f_editor(\"%s\")\n",str));
+
+path = strchr(str, '\"');
+if(path)
+ {
+ path++;
+ if(*path)
+ {
+ pathend = strchr(path, '\"');
+ if(pathend)
+ {
+ *pathend = 0;
+ if(GLOBALS->editor_name) free_2(GLOBALS->editor_name);
+ GLOBALS->editor_name=(char *)strdup_2(path);
+ }
+ }
+ }
+
+return(0);
+}
+
int f_enable_fast_exit(char *str)
{
DEBUG(printf("f_enable_fast_exit(\"%s\")\n",str));
@@ -815,6 +840,7 @@ static struct rc_entry rcitems[]=
{ "disable_tooltips", f_disable_tooltips },
{ "do_initial_zoom_fit", f_do_initial_zoom_fit },
{ "dynamic_resizing", f_dynamic_resizing },
+{ "editor", f_editor },
{ "enable_fast_exit", f_enable_fast_exit },
{ "enable_ghost_marker", f_enable_ghost_marker },
{ "enable_horiz_grid", f_enable_horiz_grid },
@@ -977,7 +1003,7 @@ if(!(handle=fopen(rcname,"rb")))
if(bundle_id)
{
const gchar *rpath = quartz_application_get_resource_path();
- const char *suf = "/examples/gtkwaverc";
+ const char *suf = "/gtkwaverc";
rcpath = NULL;
if(rpath)
diff --git a/src/savefile.c b/src/savefile.c
index fe0384f..e855233 100644
--- a/src/savefile.c
+++ b/src/savefile.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) Tony Bybell 2012.
+ * Copyright (c) Tony Bybell 2012-2013.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -588,7 +588,7 @@ if(GLOBALS->sfn)
}
-static char *get_relative_adjusted_name(char *sfn, char *dfn, char *lcname)
+char *get_relative_adjusted_name(char *sfn, char *dfn, char *lcname)
{
char *rp = NULL;
FILE *f;
@@ -601,13 +601,16 @@ FILE *f;
free(can);
- f = fopen(fdf, "rb");
- if(f)
- {
- rp = fdf;
- fclose(f);
- goto bot;
- }
+ if(fdf)
+ {
+ f = fopen(fdf, "rb");
+ if(f)
+ {
+ rp = fdf;
+ fclose(f);
+ goto bot;
+ }
+ }
}
#endif
@@ -1589,7 +1592,7 @@ else if (*w2 == '[')
if(GLOBALS->ctree_main)
{
- force_open_tree_node(w, 0);
+ force_open_tree_node(w, 0, NULL);
}
else
{
diff --git a/src/savefile.h b/src/savefile.h
index e20f3d0..4ced9f8 100644
--- a/src/savefile.h
+++ b/src/savefile.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) Tony Bybell 2012.
+ * Copyright (c) Tony Bybell 2012-2013.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -42,5 +42,6 @@ void read_save_helper_relative_init(char *wname);
int suffix_check(const char *s, const char *sfx);
char *extract_dumpname_from_save_file(char *lcname, gboolean *modified, int *opt_vcd);
+char *get_relative_adjusted_name(char *sfn, char *dfn, char *lcname);
#endif
diff --git a/src/tree.c b/src/tree.c
index 6b1d82e..8f1fcbe 100644
--- a/src/tree.c
+++ b/src/tree.c
@@ -140,7 +140,7 @@ return(1);
/*
* decorated module add
*/
-void allocate_and_decorate_module_tree_node(unsigned char ttype, const char *scopename, const char *compname, uint32_t scopename_len, uint32_t compname_len)
+void allocate_and_decorate_module_tree_node(unsigned char ttype, const char *scopename, const char *compname, uint32_t scopename_len, uint32_t compname_len, uint32_t t_stem, uint32_t t_istem)
{
struct tree *t;
int mtyp = WAVE_T_WHICH_UNDEFINED_COMPNAME;
@@ -233,6 +233,8 @@ t_allocated:
strcpy(t->name, scopename);
t->kind = ttype;
t->t_which = mtyp;
+ t->t_stem = t_stem;
+ t->t_istem = t_istem;
if(GLOBALS->mod_tree_parent->child)
{
@@ -258,6 +260,8 @@ t_allocated:
strcpy(t->name, scopename);
t->kind = ttype;
t->t_which = mtyp;
+ t->t_stem = t_stem;
+ t->t_istem = t_istem;
t->next = GLOBALS->treeroot;
GLOBALS->mod_tree_parent = GLOBALS->treeroot = t;
@@ -269,6 +273,8 @@ t_allocated:
strcpy(t->name, scopename);
t->kind = ttype;
t->t_which = mtyp;
+ t->t_stem = t_stem;
+ t->t_istem = t_istem;
GLOBALS->mod_tree_parent = GLOBALS->treeroot = t;
}
diff --git a/src/tree.h b/src/tree.h
index 61dd907..cc54199 100644
--- a/src/tree.h
+++ b/src/tree.h
@@ -102,11 +102,19 @@ enum tree_kind
#pragma pack(1)
#endif
+struct stem_struct_t
+{
+uint32_t stem_idx; /* in stem_path_string_table */
+uint32_t stem_line_number;
+};
+
struct tree
{
struct tree *next;
struct tree *child;
int t_which; /* 'i' for facs[i] table, value of < 0 means not a full signame */
+uint32_t t_stem; /* source stem (if >0) for Open Hierarchy Source Def, see stem_struct_t */
+uint32_t t_istem; /* source stem (if >0) for Open Hierarchy Source Inst, see stem_struct_t */
unsigned kind : 7; /* Kind of the leaf: ghwlib reads this as val & 0x7f so only 7 bits needed */
unsigned children_in_gui : 1; /* indicates that the child nodes are in the gtk2 tree, but gets borrowed during tree creation for fast judy sort */
@@ -145,7 +153,7 @@ void maketree2(GtkCTreeNode *subtree, struct tree *t, int depth, GtkCTreeNode *g
#endif
char *leastsig_hiername(char *nam);
-void allocate_and_decorate_module_tree_node(unsigned char ttype, const char *scopename, const char *compname, uint32_t scopename_len, uint32_t compname_len);
+void allocate_and_decorate_module_tree_node(unsigned char ttype, const char *scopename, const char *compname, uint32_t scopename_len, uint32_t compname_len, uint32_t t_stem, uint32_t t_istem);
int decorated_module_cleanup(void);
void treesort(struct tree *t, struct tree *p);
diff --git a/src/treesearch.h b/src/treesearch.h
index 54b3328..9e596f1 100644
--- a/src/treesearch.h
+++ b/src/treesearch.h
@@ -14,7 +14,7 @@ void treebox(char *title, GtkSignalFunc func, GtkWidget *old_window);
GtkWidget* treeboxframe(char *title, GtkSignalFunc func);
void mkmenu_treesearch_cleanup(GtkWidget *widget, gpointer data);
void dump_open_tree_nodes(FILE *wave, xl_Tree *t);
-int force_open_tree_node(char *name, int keep_path_nodes_open);
+int force_open_tree_node(char *name, int keep_path_nodes_open, struct tree **t_pnt);
void select_tree_node(char *name);
void dnd_setup(GtkWidget *src, GtkWidget *widget, int enable_receive); /* dnd from gtk2 tree to signalwindow */
void treeview_select_all_callback(void); /* gtk2 */
diff --git a/src/treesearch_gtk2.c b/src/treesearch_gtk2.c
index 4239465..f706e0b 100644
--- a/src/treesearch_gtk2.c
+++ b/src/treesearch_gtk2.c
@@ -296,7 +296,7 @@ if(node)
}
-int force_open_tree_node(char *name, int keep_path_nodes_open) {
+int force_open_tree_node(char *name, int keep_path_nodes_open, struct tree **t_pnt) {
GtkCTree *ctree = GLOBALS->ctree_main;
int rv = 1 ; /* can possible open */
if(ctree) {
@@ -315,6 +315,7 @@ int force_open_tree_node(char *name, int keep_path_nodes_open) {
}
for(;;) {
struct tree *t = gctr->row.data;
+ if(t_pnt) { *t_pnt = t; }
while(*zap) {
if(*zap != GLOBALS->hier_delimeter) {
zap++;
@@ -544,6 +545,7 @@ if(ctree)
/* printf("[treeselectnode] '%s' ok\n", name); */
gtk_ctree_select(ctree, node);
+ GLOBALS->sst_sig_root_treesearch_gtk2_c_1 = t;
GLOBALS->sig_root_treesearch_gtk2_c_1 = t->child;
fill_sig_store ();
@@ -619,6 +621,7 @@ if(node)
t=(struct tree *)gtk_clist_get_row_data(GTK_CLIST(GLOBALS->ctree_main), row);
DEBUG(printf("TS: %08x %s\n",t,t->name));
+ GLOBALS->sst_sig_root_treesearch_gtk2_c_1 = t;
GLOBALS->sig_root_treesearch_gtk2_c_1 = t->child;
fill_sig_store ();
gtkwavetcl_setvar(WAVE_TCLCB_TREE_SELECT, GLOBALS->selected_hierarchy_name, WAVE_TCLCB_TREE_SELECT_FLAGS);
@@ -642,6 +645,7 @@ if(t)
/* unused */
}
DEBUG(printf("TU: %08x %s\n",t,t->name));
+ GLOBALS->sst_sig_root_treesearch_gtk2_c_1 = NULL;
GLOBALS->sig_root_treesearch_gtk2_c_1 = GLOBALS->treeroot;
fill_sig_store ();
}
@@ -1311,6 +1315,20 @@ if(event->type == GDK_2BUTTON_PRESS)
return(FALSE);
}
+static gint hier_top_button_press_event_std(GtkWidget *widget, GdkEventButton *event)
+{
+if((event->button == 3) && (event->type == GDK_BUTTON_PRESS))
+ {
+ if(GLOBALS->sst_sig_root_treesearch_gtk2_c_1)
+ {
+ do_sst_popup_menu (widget, event);
+ return(TRUE);
+ }
+ }
+
+return(FALSE);
+}
+
/**********************************************************************/
/*
@@ -1372,6 +1390,8 @@ do_tooltips:
GLOBALS->treesearch_gtk2_window_vbox = vbox = gtk_vbox_new (FALSE, 1);
gtk_widget_show (vbox);
+ gtkwave_signal_connect(GTK_OBJECT(vbox), "button_press_event",GTK_SIGNAL_FUNC(hier_top_button_press_event_std), NULL);
+
vpan = gtk_vpaned_new ();
gtk_widget_show (vpan);
gtk_box_pack_start (GTK_BOX (vbox), vpan, TRUE, TRUE, 1);
@@ -1415,11 +1435,13 @@ do_tooltips:
/* Signal names. */
- GLOBALS->sig_store_treesearch_gtk2_c_1 = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_STRING, G_TYPE_STRING);
+ GLOBALS->sig_store_treesearch_gtk2_c_1 = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
+ GLOBALS->sst_sig_root_treesearch_gtk2_c_1 = NULL;
GLOBALS->sig_root_treesearch_gtk2_c_1 = GLOBALS->treeroot;
fill_sig_store ();
sig_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (GLOBALS->sig_store_treesearch_gtk2_c_1));
+ gtkwave_signal_connect(GTK_OBJECT(sig_view), "button_press_event",GTK_SIGNAL_FUNC(hier_top_button_press_event_std), NULL);
/* The view now holds a reference. We can get rid of our own reference */
g_object_unref (G_OBJECT (GLOBALS->sig_store_treesearch_gtk2_c_1));
@@ -1648,6 +1670,8 @@ GtkWidget* treeboxframe(char *title, GtkSignalFunc func)
vbox = gtk_vbox_new (FALSE, 1);
gtk_widget_show (vbox);
+ gtkwave_signal_connect(GTK_OBJECT(vbox), "button_press_event",GTK_SIGNAL_FUNC(hier_top_button_press_event_std), NULL);
+
vpan = gtk_vpaned_new (); /* GLOBALS->sst_vpaned is to be used to clone position over during reload */
GLOBALS->sst_vpaned = (GtkPaned *)vpan;
if(GLOBALS->vpanedwindow_size_cache)
@@ -1695,10 +1719,12 @@ GtkWidget* treeboxframe(char *title, GtkSignalFunc func)
/* Signal names. */
GLOBALS->sig_store_treesearch_gtk2_c_1 = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
+ GLOBALS->sst_sig_root_treesearch_gtk2_c_1 = NULL;
GLOBALS->sig_root_treesearch_gtk2_c_1 = GLOBALS->treeroot;
fill_sig_store ();
sig_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (GLOBALS->sig_store_treesearch_gtk2_c_1));
+ gtkwave_signal_connect(GTK_OBJECT(sig_view), "button_press_event",GTK_SIGNAL_FUNC(hier_top_button_press_event_std), NULL);
/* The view now holds a reference. We can get rid of our own reference */
g_object_unref (G_OBJECT (GLOBALS->sig_store_treesearch_gtk2_c_1));
diff --git a/src/vcd.c b/src/vcd.c
index 6c5c06b..361d8d3 100644
--- a/src/vcd.c
+++ b/src/vcd.c
@@ -1191,7 +1191,7 @@ for(;;)
strcpy(s->str, GLOBALS->yytext_vcd_c_1);
s->mod_tree_parent = GLOBALS->mod_tree_parent;
- allocate_and_decorate_module_tree_node(ttype, GLOBALS->yytext_vcd_c_1, NULL, GLOBALS->yylen_vcd_c_1, 0);
+ allocate_and_decorate_module_tree_node(ttype, GLOBALS->yytext_vcd_c_1, NULL, GLOBALS->yylen_vcd_c_1, 0, 0, 0);
if(GLOBALS->slistcurr)
{
diff --git a/src/vcd_partial.c b/src/vcd_partial.c
index ad40179..4e5f6e4 100644
--- a/src/vcd_partial.c
+++ b/src/vcd_partial.c
@@ -1140,7 +1140,7 @@ for(;;)
strcpy(s->str, GLOBALS->yytext_vcd_partial_c_2);
s->mod_tree_parent = GLOBALS->mod_tree_parent;
- allocate_and_decorate_module_tree_node(ttype, GLOBALS->yytext_vcd_partial_c_2, NULL, GLOBALS->yylen_vcd_partial_c_2, 0);
+ allocate_and_decorate_module_tree_node(ttype, GLOBALS->yytext_vcd_partial_c_2, NULL, GLOBALS->yylen_vcd_partial_c_2, 0, 0, 0);
if(GLOBALS->slistcurr)
{
diff --git a/src/vcd_recoder.c b/src/vcd_recoder.c
index 2f71afa..65fe030 100644
--- a/src/vcd_recoder.c
+++ b/src/vcd_recoder.c
@@ -1530,7 +1530,7 @@ for(;;)
strcpy(s->str, GLOBALS->yytext_vcd_recoder_c_3);
s->mod_tree_parent = GLOBALS->mod_tree_parent;
- allocate_and_decorate_module_tree_node(ttype, GLOBALS->yytext_vcd_recoder_c_3, NULL, GLOBALS->yylen_vcd_recoder_c_3, 0);
+ allocate_and_decorate_module_tree_node(ttype, GLOBALS->yytext_vcd_recoder_c_3, NULL, GLOBALS->yylen_vcd_recoder_c_3, 0, 0, 0);
if(GLOBALS->slistcurr)
{
--
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