[Pkg-electronics-commits] [gtkwave] 01/03: Imported Upstream version 3.3.49
أحمد المحمودي (Ahmed El-Mahmoudy)
aelmahmoudy at sabily.org
Fri Sep 13 02:56:37 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 80c59e6fe4c1847eb2ad1aa1c62d6fb3f183431c
Author: أحمد المحمودي (Ahmed El-Mahmoudy) <aelmahmoudy at sabily.org>
Date: Fri Sep 13 04:33:59 2013 +0200
Imported Upstream version 3.3.49
---
ChangeLog | 24 +
INSTALL | 370 +++++++++++++
Makefile.am | 2 +-
Makefile.in | 8 +-
configure | 38 +-
configure.ac | 16 +-
contrib/Makefile.am | 3 +-
contrib/Makefile.in | 2 +-
contrib/bundle_for_osx/Info-gtkwave.plist | 6 +-
contrib/bundle_for_osx/Makefile.am | 15 +
contrib/{ => bundle_for_osx}/Makefile.in | 266 ++--------
contrib/fst_jni/Main.java | 36 ++
contrib/fst_jni/Makefile.am | 25 +
contrib/{ => fst_jni}/Makefile.in | 276 +++-------
contrib/fst_jni/fst2Vcd.java | 147 ++++++
contrib/fst_jni/fstAPI.c | 721 ++++++++++++++++++++++++++
contrib/fst_jni/fstAPI.h | 533 +++++++++++++++++++
contrib/fst_jni/fstAPI.java | 121 +++++
contrib/fst_jni/fstArrayType.java | 39 ++
contrib/fst_jni/fstAttrType.java | 39 ++
contrib/fst_jni/fstEnumValueType.java | 51 ++
contrib/fst_jni/fstHier.java | 51 ++
contrib/fst_jni/fstHierType.java | 35 ++
contrib/fst_jni/fstMiscType.java | 36 ++
contrib/fst_jni/fstPackType.java | 39 ++
contrib/fst_jni/fstReader.java | 155 ++++++
contrib/fst_jni/fstScopeType.java | 69 +++
contrib/fst_jni/fstSupplimentalDataType.java | 52 ++
contrib/fst_jni/fstSupplimentalVarType.java | 39 ++
contrib/fst_jni/fstVarDir.java | 41 ++
contrib/fst_jni/fstVarType.java | 71 +++
contrib/fst_jni/fstWriter.java | 69 +++
contrib/fst_jni/zzz_test.csh | 32 ++
doc/gtkwave.odt | Bin 1355316 -> 1380009 bytes
src/analyzer.h | 85 ++-
src/extload.c | 15 +
src/fsdb_wrapper_api.cc | 73 ++-
src/fst.c | 76 ++-
src/globals.c | 17 +-
src/globals.h | 8 +
src/helpers/fst/fstapi.c | 45 +-
src/helpers/fst/fstapi.h | 109 +++-
src/helpers/vcd2fst.c | 263 +++++++---
src/main.c | 10 +-
src/pixmaps.c | 452 +++++++++++-----
src/tree.c | 7 +
src/tree.h | 15 +-
src/treesearch_gtk2.c | 106 +++-
src/vcd.c | 24 +
src/vcd_partial.c | 24 +
src/vcd_recoder.c | 24 +
src/wavewindow.c | 1 +
52 files changed, 4052 insertions(+), 729 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a5e2cb2..b9146b4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1325,3 +1325,27 @@
when it exists.
Added ability to store $comment in FST files via the attribute
mechanism (FST_AT_MISC/FST_MT_COMMENT).
+3.3.49 11sep13 Fix crashed caused by X11 protocol limitation for pixmap size.
+ Potential buffer overflow fix in vcd2fst.
+ Added ability to store environment variable information in
+ FST files (FST_MT_ENVVAR).
+ Fixed bad enum for FST_PT_MAX.
+ Added contrib/fst_jni directory to distribution.
+ Fixed broken "make dist" variants.
+ Added buffer and linkage data directions (future expansion
+ for VHDL) in FST and gtkwave.
+ Removed requirement for fsdbdebug in path when FsdbReader
+ is present.
+ Fixed ordering of static FSDB libraries for when dynamic ones
+ are not present.
+ Added direction filters to SST name filter search. That is,
+ adding +I+, +O+, +IO+, +B+, or +L+ before the regular
+ expression adds additional filtering criteria. Direction
+ filters are case-insensitive.
+ Relax FSDB loader to allow VHDL and mixed-language files.
+ Added VHDL hierarchy types to FST, internal VCD loaders and
+ also vcdfst/fst2vcd.
+ Added in VHDL to FST (which will also allow other languages):
+ gtkwave can process these types (e.g., signal + std_ulogic),
+ but there are currently no simulators supporting them. These
+ are written by using fstWriterCreateVar2().
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..6e90e07
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,370 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994-1996, 1999-2002, 2004-2012 Free Software Foundation,
+Inc.
+
+ Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved. This file is offered as-is,
+without warranty of any kind.
+
+Basic Installation
+==================
+
+ Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package. The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package. Some packages provide this
+`INSTALL' file but do not implement all of the features documented
+below. The lack of an optional feature in a given package is not
+necessarily a bug. More recommendations for GNU packages can be found
+in *note Makefile Conventions: (standards)Makefile Conventions.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+ It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring. Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+ The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'. You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+ The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system.
+
+ Running `configure' might take a while. While running, it prints
+ some messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package, generally using the just-built uninstalled binaries.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation. When installing into a prefix owned by root, it is
+ recommended that the package be configured and built as a regular
+ user, and only the `make install' phase executed with root
+ privileges.
+
+ 5. Optionally, type `make installcheck' to repeat any self-tests, but
+ this time using the binaries in their final installed location.
+ This target does not install anything. Running this target as a
+ regular user, particularly if the prior `make install' required
+ root privileges, verifies that the installation completed
+ correctly.
+
+ 6. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+ 7. Often, you can also type `make uninstall' to remove the installed
+ files again. In practice, not all packages have tested that
+ uninstallation works correctly, even though it is required by the
+ GNU Coding Standards.
+
+ 8. Some packages, particularly those that use Automake, provide `make
+ distcheck', which can by used by developers to test that all other
+ targets like `make install' and `make uninstall' work correctly.
+ This target is generally not run by end users.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+ You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here
+is an example:
+
+ ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+ *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you can use GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'. This
+is known as a "VPATH" build.
+
+ With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory. After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+ On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor. Like
+this:
+
+ ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CPP="gcc -E" CXXCPP="g++ -E"
+
+ This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
+Installation Names
+==================
+
+ By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc. You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX', where PREFIX must be an
+absolute file name.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them. In general, the
+default for these options is expressed in terms of `${prefix}', so that
+specifying just `--prefix' will affect all of the other directory
+specifications that were not explicitly provided.
+
+ The most portable way to affect installation locations is to pass the
+correct locations to `configure'; however, many packages provide one or
+both of the following shortcuts of passing variable assignments to the
+`make install' command line to change installation locations without
+having to reconfigure or recompile.
+
+ The first method involves providing an override variable for each
+affected directory. For example, `make install
+prefix=/alternate/directory' will choose an alternate location for all
+directory configuration variables that were expressed in terms of
+`${prefix}'. Any directories that were specified during `configure',
+but not in terms of `${prefix}', must each be overridden at install
+time for the entire installation to be relocated. The approach of
+makefile variable overrides for each directory variable is required by
+the GNU Coding Standards, and ideally causes no recompilation.
+However, some platforms have known limitations with the semantics of
+shared libraries that end up requiring recompilation when using this
+method, particularly noticeable in packages that use GNU Libtool.
+
+ The second method involves providing the `DESTDIR' variable. For
+example, `make install DESTDIR=/alternate/directory' will prepend
+`/alternate/directory' before all installation names. The approach of
+`DESTDIR' overrides is not required by the GNU Coding Standards, and
+does not work on platforms that have drive letters. On the other hand,
+it does better at avoiding recompilation issues, and works well even
+when some directory options were not specified in terms of `${prefix}'
+at `configure' time.
+
+Optional Features
+=================
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+ Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+ Some packages offer the ability to configure how verbose the
+execution of `make' will be. For these packages, running `./configure
+--enable-silent-rules' sets the default to minimal output, which can be
+overridden with `make V=1'; while running `./configure
+--disable-silent-rules' sets the default to verbose, which can be
+overridden with `make V=0'.
+
+Particular systems
+==================
+
+ On HP-UX, the default C compiler is not ANSI C compatible. If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+ ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+ HP-UX `make' updates targets which have the same time stamps as
+their prerequisites, which makes it generally unusable when shipped
+generated files such as `configure' are involved. Use GNU `make'
+instead.
+
+ On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file. The option `-nodtk' can be used as
+a workaround. If GNU CC is not installed, it is therefore recommended
+to try
+
+ ./configure CC="cc"
+
+and if that doesn't work, try
+
+ ./configure CC="cc -nodtk"
+
+ On Solaris, don't put `/usr/ucb' early in your `PATH'. This
+directory contains several dysfunctional programs; working variants of
+these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
+in your `PATH', put it _after_ `/usr/bin'.
+
+ On Haiku, software installed for all users goes in `/boot/common',
+not `/usr/local'. It is recommended to use the following options:
+
+ ./configure --prefix=/boot/common
+
+Specifying the System Type
+==========================
+
+ There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on. Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+ CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+ OS
+ KERNEL-OS
+
+ See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+ If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+ If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+ Variables not defined in a site shell script can be set in the
+environment passed to `configure'. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'. For example:
+
+ ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf limitation. Until the limitation is lifted, you can use
+this workaround:
+
+ CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+ `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+ Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+ Print a summary of the options unique to this package's
+ `configure', and exit. The `short' variant lists options used
+ only in the top level, while the `recursive' variant lists options
+ also present in any nested packages.
+
+`--version'
+`-V'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`--cache-file=FILE'
+ Enable the cache: use and save the results of the tests in FILE,
+ traditionally `config.cache'. FILE defaults to `/dev/null' to
+ disable caching.
+
+`--config-cache'
+`-C'
+ Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to `/dev/null' (any error
+ messages will still be shown).
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`--prefix=DIR'
+ Use DIR as the installation prefix. *note Installation Names::
+ for more details, including other options available for fine-tuning
+ the installation locations.
+
+`--no-create'
+`-n'
+ Run the configure checks, but stop before creating any output
+ files.
+
+`configure' also accepts some other, not widely useful, options. Run
+`configure --help' for more details.
diff --git a/Makefile.am b/Makefile.am
index 520b525..977df58 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,5 +2,5 @@
##
SUBDIRS= doc examples man src contrib share
-EXTRA_DIST= ANALOG_README.TXT CHANGELOG.TXT GNU.TXT INSTALL.TXT LICENSE.TXT MIT.TXT SYSTEMVERILOG_README.TXT \
+EXTRA_DIST= ANALOG_README.TXT ChangeLog COPYING INSTALL LICENSE.TXT MIT.TXT SYSTEMVERILOG_README.TXT README NEWS AUTHORS \
autogen.sh wave_locale.h tcl.m4
diff --git a/Makefile.in b/Makefile.in
index faf7f6d..60ac503 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -50,9 +50,9 @@ POST_UNINSTALL = :
subdir = .
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/configure $(am__configure_deps) \
- $(srcdir)/config.h.in AUTHORS COPYING ChangeLog NEWS README \
- compile config.guess config.sub depcomp install-sh missing \
- ylwrap
+ $(srcdir)/config.h.in AUTHORS COPYING ChangeLog INSTALL NEWS \
+ README compile config.guess config.sub depcomp install-sh \
+ missing ylwrap
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -308,7 +308,7 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = doc examples man src contrib share
-EXTRA_DIST = ANALOG_README.TXT CHANGELOG.TXT GNU.TXT INSTALL.TXT LICENSE.TXT MIT.TXT SYSTEMVERILOG_README.TXT \
+EXTRA_DIST = ANALOG_README.TXT ChangeLog COPYING INSTALL LICENSE.TXT MIT.TXT SYSTEMVERILOG_README.TXT README NEWS AUTHORS \
autogen.sh wave_locale.h tcl.m4
all: config.h
diff --git a/configure b/configure
index 4843442..e3d5fc0 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.48.
+# Generated by GNU Autoconf 2.69 for gtkwave 3.3.49.
#
# 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.48'
-PACKAGE_STRING='gtkwave 3.3.48'
+PACKAGE_VERSION='3.3.49'
+PACKAGE_STRING='gtkwave 3.3.49'
PACKAGE_BUGREPORT='bybell at rocketmail.com'
PACKAGE_URL=''
@@ -1380,7 +1380,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.48 to adapt to many kinds of systems.
+\`configure' configures gtkwave 3.3.49 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1446,7 +1446,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of gtkwave 3.3.48:";;
+ short | recursive ) echo "Configuration of gtkwave 3.3.49:";;
esac
cat <<\_ACEOF
@@ -1592,7 +1592,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-gtkwave configure 3.3.48
+gtkwave configure 3.3.49
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2236,7 +2236,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.48, which was
+It was created by gtkwave $as_me 3.3.49, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3103,7 +3103,7 @@ fi
# Define the identity of the package.
PACKAGE='gtkwave'
- VERSION='3.3.48'
+ VERSION='3.3.49'
cat >>confdefs.h <<_ACEOF
@@ -4182,6 +4182,8 @@ FFR=no
fi
+EXTLOAD_CFLAGS=
+
if test "X$FFR" = "Xyes" ; then
as_ac_File=`$as_echo "ac_cv_file_"$FSDBREADER_LIBS/libnffr.so"" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"$FSDBREADER_LIBS/libnffr.so\"" >&5
@@ -4210,6 +4212,7 @@ fi
if test "X$FSDB_SO" = "Xyes" ; then
FSDB_CFLAGS="-DFSDB_IS_PRESENT -I$FSDBREADER_HDRS"
FSDB_LDADD="$FSDBREADER_LIBS/libnffr.so"
+ EXTLOAD_CFLAGS="-DEXTLOAD_SUFFIX=\\\"fsdb\\\""
else
as_ac_File=`$as_echo "ac_cv_file_"$FSDBREADER_LIBS/libnffr.a"" | $as_tr_sh`
@@ -4273,6 +4276,7 @@ fi
if test "X$AFSDB_SO" = "Xyes" ; then
FSDB_CFLAGS="-DFSDB_NSYS_IS_PRESENT $FSDB_CFLAGS"
FSDB_LDADD="$FSDBREADER_LIBS/libnsys.so $FSDB_LDADD"
+ EXTLOAD_CFLAGS="-DEXTLOAD_SUFFIX=\\\"fsdb\\\""
else
as_ac_File=`$as_echo "ac_cv_file_"$FSDBREADER_LIBS/libnsys.a"" | $as_tr_sh`
@@ -4293,18 +4297,19 @@ eval ac_res=\$$as_ac_File
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
- FSDB_A=yes
+ AFSDB_A=yes
else
- FSDB_A=no
+ AFSDB_A=no
fi
if test "X$AFSDB_A" = "Xyes" ; then
FSDB_CFLAGS="-DFSDB_NSYS_IS_PRESENT $FSDB_CFLAGS"
- FSDB_LDADD="$FSDBREADER_LIBS/libnsys.a $FSDB_LDADD"
+ FSDB_LDADD="$FSDB_LDADD $FSDBREADER_LIBS/libnsys.a"
else
FSDB_CFLAGS=
FSDB_LDADD=
+ EXTLOAD_CFLAGS=
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: FSDB system library not found, skipping." >&5
$as_echo "$as_me: WARNING: FSDB system library not found, skipping." >&2;}
@@ -4337,6 +4342,7 @@ fi
if test "X$FSDB_SOY" = "Xno" ; then
FSDB_CFLAGS=
FSDB_LDADD=
+ EXTLOAD_CFLAGS=
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: FSDB header not found, skipping." >&5
$as_echo "$as_me: WARNING: FSDB header not found, skipping." >&2;}
fi
@@ -6213,7 +6219,7 @@ fi
if test "$EXTDEBUG" = "notfound" ; then
- EXTLOAD_CFLAGS=
+ EXTLOAD_CFLAGS="$EXTLOAD_CFLAGS"
else
EXTLOAD_CFLAGS="-DEXTLOAD_PATH=\\\"$EXTDEBUG\\\" -DEXTLOAD_SUFFIX=\\\"fsdb\\\""
fi
@@ -10202,7 +10208,7 @@ fi
-ac_config_files="$ac_config_files Makefile doc/Makefile contrib/Makefile contrib/pccts/IBM_VISUAL_AGE_PROJECTS/Makefile contrib/pccts/Makefile contrib/pccts/antlr/Makefile contrib/pccts/dlg/Makefile contrib/pccts/h/Makefile contrib/pccts/sorcerer/Makefile contrib/pccts/sorcerer/h/Makefile contrib/pccts/sorcerer/lib/Makefile contrib/pccts/sorcerer/test/Makefile contrib/pccts/sorcerer/test/test7/Makefile contrib/pccts/sorcerer/testcpp/Makefile contrib/pccts/support/DECmms/Makefile contrib/ [...]
+ac_config_files="$ac_config_files Makefile doc/Makefile contrib/Makefile contrib/pccts/IBM_VISUAL_AGE_PROJECTS/Makefile contrib/pccts/Makefile contrib/pccts/antlr/Makefile contrib/pccts/dlg/Makefile contrib/pccts/h/Makefile contrib/pccts/sorcerer/Makefile contrib/pccts/sorcerer/h/Makefile contrib/pccts/sorcerer/lib/Makefile contrib/pccts/sorcerer/test/Makefile contrib/pccts/sorcerer/test/test7/Makefile contrib/pccts/sorcerer/testcpp/Makefile contrib/pccts/support/DECmms/Makefile contrib/ [...]
@@ -10867,7 +10873,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.48, which was
+This file was extended by gtkwave $as_me 3.3.49, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -10933,7 +10939,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.48
+gtkwave config.status 3.3.49
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@@ -11087,6 +11093,8 @@ do
"contrib/pccts/testcpp/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/pccts/testcpp/Makefile" ;;
"contrib/rtlbrowse/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/rtlbrowse/Makefile" ;;
"contrib/vermin/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/vermin/Makefile" ;;
+ "contrib/bundle_for_osx/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/bundle_for_osx/Makefile" ;;
+ "contrib/fst_jni/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/fst_jni/Makefile" ;;
"examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
"man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
"src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
diff --git a/configure.ac b/configure.ac
index 4cd5b97..630e749 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.48, bybell at rocketmail.com)
+AC_INIT(gtkwave, 3.3.49, bybell at rocketmail.com)
AC_CONFIG_SRCDIR([src/vcd.c])
AM_INIT_AUTOMAKE
AC_CONFIG_HEADER([config.h])
@@ -346,12 +346,15 @@ fi
FFR=no
])
+EXTLOAD_CFLAGS=
+
if test "X$FFR" = "Xyes" ; then
AC_CHECK_FILE("$FSDBREADER_LIBS/libnffr.so", FSDB_SO=yes, FSDB_SO=no)
if test "X$FSDB_SO" = "Xyes" ; then
FSDB_CFLAGS="-DFSDB_IS_PRESENT -I$FSDBREADER_HDRS"
FSDB_LDADD="$FSDBREADER_LIBS/libnffr.so"
+ EXTLOAD_CFLAGS="-DEXTLOAD_SUFFIX=\\\"fsdb\\\""
else
AC_CHECK_FILE("$FSDBREADER_LIBS/libnffr.a", FSDB_A=yes, FSDB_A=no)
@@ -370,16 +373,18 @@ if test "X$FFR" = "Xyes" ; then
if test "X$AFSDB_SO" = "Xyes" ; then
FSDB_CFLAGS="-DFSDB_NSYS_IS_PRESENT $FSDB_CFLAGS"
FSDB_LDADD="$FSDBREADER_LIBS/libnsys.so $FSDB_LDADD"
+ EXTLOAD_CFLAGS="-DEXTLOAD_SUFFIX=\\\"fsdb\\\""
else
- AC_CHECK_FILE("$FSDBREADER_LIBS/libnsys.a", FSDB_A=yes, FSDB_A=no)
+ AC_CHECK_FILE("$FSDBREADER_LIBS/libnsys.a", AFSDB_A=yes, AFSDB_A=no)
if test "X$AFSDB_A" = "Xyes" ; then
FSDB_CFLAGS="-DFSDB_NSYS_IS_PRESENT $FSDB_CFLAGS"
- FSDB_LDADD="$FSDBREADER_LIBS/libnsys.a $FSDB_LDADD"
+ FSDB_LDADD="$FSDB_LDADD $FSDBREADER_LIBS/libnsys.a"
else
FSDB_CFLAGS=
FSDB_LDADD=
+ EXTLOAD_CFLAGS=
AC_MSG_WARN([FSDB system library not found, skipping.])
fi
@@ -389,6 +394,7 @@ if test "X$FFR" = "Xyes" ; then
if test "X$FSDB_SOY" = "Xno" ; then
FSDB_CFLAGS=
FSDB_LDADD=
+ EXTLOAD_CFLAGS=
AC_MSG_WARN([FSDB header not found, skipping.])
fi
@@ -414,7 +420,7 @@ AM_PROG_CC_C_O
#
AC_PATH_PROG(EXTDEBUG, [fsdbdebug], [notfound])
if test "$EXTDEBUG" = "notfound" ; then
- EXTLOAD_CFLAGS=
+ EXTLOAD_CFLAGS="$EXTLOAD_CFLAGS"
else
EXTLOAD_CFLAGS="-DEXTLOAD_PATH=\\\"$EXTDEBUG\\\" -DEXTLOAD_SUFFIX=\\\"fsdb\\\""
fi
@@ -852,6 +858,8 @@ AC_CONFIG_FILES([Makefile
contrib/pccts/testcpp/Makefile
contrib/rtlbrowse/Makefile
contrib/vermin/Makefile
+ contrib/bundle_for_osx/Makefile
+ contrib/fst_jni/Makefile
examples/Makefile
man/Makefile
src/Makefile
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
index cb4ffea..b866732 100644
--- a/contrib/Makefile.am
+++ b/contrib/Makefile.am
@@ -1,5 +1,4 @@
## -*- makefile
##
-SUBDIRS= pccts rtlbrowse vermin
-
+SUBDIRS= pccts rtlbrowse vermin bundle_for_osx fst_jni
diff --git a/contrib/Makefile.in b/contrib/Makefile.in
index 880ae9b..c1335ec 100644
--- a/contrib/Makefile.in
+++ b/contrib/Makefile.in
@@ -283,7 +283,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-SUBDIRS = pccts rtlbrowse vermin
+SUBDIRS = pccts rtlbrowse vermin bundle_for_osx fst_jni
all: all-recursive
.SUFFIXES:
diff --git a/contrib/bundle_for_osx/Info-gtkwave.plist b/contrib/bundle_for_osx/Info-gtkwave.plist
index 1be8c58..9cb48c0 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.48, (C) 1999-2013 Tony Bybell http://gtkwave.sourceforge.net</string>
+ <string>3.3.49, (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.48</string>
+ <string>3.3.49</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>3.3.48</string>
+ <string>3.3.49</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
new file mode 100644
index 0000000..0e48b62
--- /dev/null
+++ b/contrib/bundle_for_osx/Makefile.am
@@ -0,0 +1,15 @@
+## -*- makefile
+##
+
+EXTRA_DIST= \
+ gtk_diff_against_modulesets.patch \
+ gtkrc \
+ gtkwave.bundle \
+ gtkwave_files.icns \
+ gtkwave.icns \
+ gtkwave.pl \
+ gtkwave_savefiles.icns \
+ Info-gtkwave.plist \
+ launcher.sh \
+ make_bundle.sh
+
diff --git a/contrib/Makefile.in b/contrib/bundle_for_osx/Makefile.in
similarity index 58%
copy from contrib/Makefile.in
copy to contrib/bundle_for_osx/Makefile.in
index 880ae9b..fae5e05 100644
--- a/contrib/Makefile.in
+++ b/contrib/bundle_for_osx/Makefile.in
@@ -47,7 +47,7 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-subdir = contrib
+subdir = contrib/bundle_for_osx
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
@@ -71,73 +71,13 @@ am__v_at_0 = @
am__v_at_1 =
SOURCES =
DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
- ctags-recursive dvi-recursive html-recursive info-recursive \
- install-data-recursive install-dvi-recursive \
- install-exec-recursive install-html-recursive \
- install-info-recursive install-pdf-recursive \
- install-ps-recursive install-recursive installcheck-recursive \
- installdirs-recursive pdf-recursive ps-recursive \
- tags-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
-RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
- distclean-recursive maintainer-clean-recursive
-am__recursive_targets = \
- $(RECURSIVE_TARGETS) \
- $(RECURSIVE_CLEAN_TARGETS) \
- $(am__extra_recursive_targets)
-AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
- distdir
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-# Read a list of newline-separated strings from the standard input,
-# and print each of them once, without duplicates. Input order is
-# *not* preserved.
-am__uniquify_input = $(AWK) '\
- BEGIN { nonempty = 0; } \
- { items[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in items) print i; }; } \
-'
-# Make sure the list of sources is unique. This is necessary because,
-# e.g., the same source file might be shared among _SOURCES variables
-# for different programs/libraries.
-am__define_uniq_tagged_files = \
- list='$(am__tagged_files)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-am__relativize = \
- dir0=`pwd`; \
- sed_first='s,^\([^/]*\)/.*$$,\1,'; \
- sed_rest='s,^[^/]*/*,,'; \
- sed_last='s,^.*/\([^/]*\)$$,\1,'; \
- sed_butlast='s,/*[^/]*$$,,'; \
- while test -n "$$dir1"; do \
- first=`echo "$$dir1" | sed -e "$$sed_first"`; \
- if test "$$first" != "."; then \
- if test "$$first" = ".."; then \
- dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
- dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
- else \
- first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
- if test "$$first2" = "$$first"; then \
- dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
- else \
- dir2="../$$dir2"; \
- fi; \
- dir0="$$dir0"/"$$first"; \
- fi; \
- fi; \
- dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
- done; \
- reldir="$$dir2"
ACLOCAL = @ACLOCAL@
AET2_CFLAGS = @AET2_CFLAGS@
AET2_LDADD = @AET2_LDADD@
@@ -283,8 +223,19 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-SUBDIRS = pccts rtlbrowse vermin
-all: all-recursive
+EXTRA_DIST = \
+ gtk_diff_against_modulesets.patch \
+ gtkrc \
+ gtkwave.bundle \
+ gtkwave_files.icns \
+ gtkwave.icns \
+ gtkwave.pl \
+ gtkwave_savefiles.icns \
+ Info-gtkwave.plist \
+ launcher.sh \
+ make_bundle.sh
+
+all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@@ -296,9 +247,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/bundle_for_osx/Makefile'; \
$(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --foreign contrib/Makefile
+ $(AUTOMAKE) --foreign contrib/bundle_for_osx/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -317,106 +268,12 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
+tags TAGS:
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run 'make' without going through this Makefile.
-# To change the values of 'make' variables: instead of editing Makefiles,
-# (1) if the variable is set in 'config.status', edit 'config.status'
-# (which will cause the Makefiles to be regenerated when you run 'make');
-# (2) otherwise, pass the desired values on the 'make' command line.
-$(am__recursive_targets):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- dot_seen=yes; \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-ID: $(am__tagged_files)
- $(am__define_uniq_tagged_files); mkid -fID $$unique
-tags: tags-recursive
-TAGS: tags
-
-tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
- set x; \
- here=`pwd`; \
- if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
- include_option=--etags-include; \
- empty_fix=.; \
- else \
- include_option=--include; \
- empty_fix=; \
- fi; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test ! -f $$subdir/TAGS || \
- set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
- fi; \
- done; \
- $(am__define_uniq_tagged_files); \
- shift; \
- if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- if test $$# -gt 0; then \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- "$$@" $$unique; \
- else \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$unique; \
- fi; \
- fi
-ctags: ctags-recursive
-
-CTAGS: ctags
-ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
- $(am__define_uniq_tagged_files); \
- test -z "$(CTAGS_ARGS)$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && $(am__cd) $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) "$$here"
-cscopelist: cscopelist-recursive
-
-cscopelist-am: $(am__tagged_files)
- list='$(am__tagged_files)'; \
- case "$(srcdir)" in \
- [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
- *) sdir=$(subdir)/$(srcdir) ;; \
- esac; \
- for i in $$list; do \
- if test -f "$$i"; then \
- echo "$(subdir)/$$i"; \
- else \
- echo "$$sdir/$$i"; \
- fi; \
- done >> $(top_builddir)/cscope.files
+ctags CTAGS:
+
+cscope cscopelist:
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -448,45 +305,19 @@ distdir: $(DISTFILES)
|| exit 1; \
fi; \
done
- @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- $(am__make_dryrun) \
- || test -d "$(distdir)/$$subdir" \
- || $(MKDIR_P) "$(distdir)/$$subdir" \
- || exit 1; \
- dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
- $(am__relativize); \
- new_distdir=$$reldir; \
- dir1=$$subdir; dir2="$(top_distdir)"; \
- $(am__relativize); \
- new_top_distdir=$$reldir; \
- echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
- echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
- ($(am__cd) $$subdir && \
- $(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$$new_top_distdir" \
- distdir="$$new_distdir" \
- am__remove_distdir=: \
- am__skip_length_check=: \
- am__skip_mode_fix=: \
- distdir) \
- || exit 1; \
- fi; \
- done
check-am: all-am
-check: check-recursive
+check: check-am
all-am: Makefile
-installdirs: installdirs-recursive
-installdirs-am:
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-installcheck: installcheck-recursive
+installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
@@ -508,85 +339,84 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
+clean: clean-am
clean-am: clean-generic mostlyclean-am
-distclean: distclean-recursive
+distclean: distclean-am
-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-tags
+distclean-am: clean-am distclean-generic
-dvi: dvi-recursive
+dvi: dvi-am
dvi-am:
-html: html-recursive
+html: html-am
html-am:
-info: info-recursive
+info: info-am
info-am:
install-data-am:
-install-dvi: install-dvi-recursive
+install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
-install-html: install-html-recursive
+install-html: install-html-am
install-html-am:
-install-info: install-info-recursive
+install-info: install-info-am
install-info-am:
install-man:
-install-pdf: install-pdf-recursive
+install-pdf: install-pdf-am
install-pdf-am:
-install-ps: install-ps-recursive
+install-ps: install-ps-am
install-ps-am:
installcheck-am:
-maintainer-clean: maintainer-clean-recursive
+maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
-mostlyclean: mostlyclean-recursive
+mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
-pdf: pdf-recursive
+pdf: pdf-am
pdf-am:
-ps: ps-recursive
+ps: ps-am
ps-am:
uninstall-am:
-.MAKE: $(am__recursive_targets) install-am install-strip
+.MAKE: install-am install-strip
-.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
- check-am clean clean-generic cscopelist-am ctags ctags-am \
- distclean distclean-generic distclean-tags distdir dvi dvi-am \
- html html-am info info-am install install-am install-data \
+.PHONY: all all-am check check-am clean clean-generic cscopelist-am \
+ ctags-am distclean distclean-generic distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs installdirs-am maintainer-clean \
+ installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
- pdf-am ps ps-am tags tags-am uninstall uninstall-am
+ pdf-am ps ps-am tags-am uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/contrib/fst_jni/Main.java b/contrib/fst_jni/Main.java
new file mode 100644
index 0000000..43e3e3d
--- /dev/null
+++ b/contrib/fst_jni/Main.java
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+
+public class Main
+{
+public static void main(String[] argv)
+ {
+ if(argv.length == 1)
+ {
+ fst2Vcd t = new fst2Vcd(argv[0]);
+ }
+ else
+ {
+ System.out.println("Usage\n-----\njava Main inputfile.fst");
+ }
+ }
+}
diff --git a/contrib/fst_jni/Makefile.am b/contrib/fst_jni/Makefile.am
new file mode 100644
index 0000000..bc384c5
--- /dev/null
+++ b/contrib/fst_jni/Makefile.am
@@ -0,0 +1,25 @@
+## -*- makefile
+##
+
+EXTRA_DIST= \
+ fst2Vcd.java \
+ fstAPI.c \
+ fstAPI.h \
+ fstAPI.java \
+ fstArrayType.java \
+ fstAttrType.java \
+ fstEnumValueType.java \
+ fstHier.java \
+ fstHierType.java \
+ fstMiscType.java \
+ fstPackType.java \
+ fstReader.java \
+ fstScopeType.java \
+ fstSupplimentalDataType.java \
+ fstSupplimentalVarType.java \
+ fstVarDir.java \
+ fstVarType.java \
+ fstWriter.java \
+ Main.java \
+ zzz_test.csh
+
diff --git a/contrib/Makefile.in b/contrib/fst_jni/Makefile.in
similarity index 58%
copy from contrib/Makefile.in
copy to contrib/fst_jni/Makefile.in
index 880ae9b..233a83a 100644
--- a/contrib/Makefile.in
+++ b/contrib/fst_jni/Makefile.in
@@ -47,7 +47,7 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-subdir = contrib
+subdir = contrib/fst_jni
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
@@ -71,73 +71,13 @@ am__v_at_0 = @
am__v_at_1 =
SOURCES =
DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
- ctags-recursive dvi-recursive html-recursive info-recursive \
- install-data-recursive install-dvi-recursive \
- install-exec-recursive install-html-recursive \
- install-info-recursive install-pdf-recursive \
- install-ps-recursive install-recursive installcheck-recursive \
- installdirs-recursive pdf-recursive ps-recursive \
- tags-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
-RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
- distclean-recursive maintainer-clean-recursive
-am__recursive_targets = \
- $(RECURSIVE_TARGETS) \
- $(RECURSIVE_CLEAN_TARGETS) \
- $(am__extra_recursive_targets)
-AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
- distdir
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-# Read a list of newline-separated strings from the standard input,
-# and print each of them once, without duplicates. Input order is
-# *not* preserved.
-am__uniquify_input = $(AWK) '\
- BEGIN { nonempty = 0; } \
- { items[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in items) print i; }; } \
-'
-# Make sure the list of sources is unique. This is necessary because,
-# e.g., the same source file might be shared among _SOURCES variables
-# for different programs/libraries.
-am__define_uniq_tagged_files = \
- list='$(am__tagged_files)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-am__relativize = \
- dir0=`pwd`; \
- sed_first='s,^\([^/]*\)/.*$$,\1,'; \
- sed_rest='s,^[^/]*/*,,'; \
- sed_last='s,^.*/\([^/]*\)$$,\1,'; \
- sed_butlast='s,/*[^/]*$$,,'; \
- while test -n "$$dir1"; do \
- first=`echo "$$dir1" | sed -e "$$sed_first"`; \
- if test "$$first" != "."; then \
- if test "$$first" = ".."; then \
- dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
- dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
- else \
- first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
- if test "$$first2" = "$$first"; then \
- dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
- else \
- dir2="../$$dir2"; \
- fi; \
- dir0="$$dir0"/"$$first"; \
- fi; \
- fi; \
- dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
- done; \
- reldir="$$dir2"
ACLOCAL = @ACLOCAL@
AET2_CFLAGS = @AET2_CFLAGS@
AET2_LDADD = @AET2_LDADD@
@@ -283,8 +223,29 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-SUBDIRS = pccts rtlbrowse vermin
-all: all-recursive
+EXTRA_DIST = \
+ fst2Vcd.java \
+ fstAPI.c \
+ fstAPI.h \
+ fstAPI.java \
+ fstArrayType.java \
+ fstAttrType.java \
+ fstEnumValueType.java \
+ fstHier.java \
+ fstHierType.java \
+ fstMiscType.java \
+ fstPackType.java \
+ fstReader.java \
+ fstScopeType.java \
+ fstSupplimentalDataType.java \
+ fstSupplimentalVarType.java \
+ fstVarDir.java \
+ fstVarType.java \
+ fstWriter.java \
+ Main.java \
+ zzz_test.csh
+
+all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@@ -296,9 +257,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/fst_jni/Makefile'; \
$(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --foreign contrib/Makefile
+ $(AUTOMAKE) --foreign contrib/fst_jni/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -317,106 +278,12 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
+tags TAGS:
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run 'make' without going through this Makefile.
-# To change the values of 'make' variables: instead of editing Makefiles,
-# (1) if the variable is set in 'config.status', edit 'config.status'
-# (which will cause the Makefiles to be regenerated when you run 'make');
-# (2) otherwise, pass the desired values on the 'make' command line.
-$(am__recursive_targets):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- dot_seen=yes; \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-ID: $(am__tagged_files)
- $(am__define_uniq_tagged_files); mkid -fID $$unique
-tags: tags-recursive
-TAGS: tags
-
-tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
- set x; \
- here=`pwd`; \
- if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
- include_option=--etags-include; \
- empty_fix=.; \
- else \
- include_option=--include; \
- empty_fix=; \
- fi; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test ! -f $$subdir/TAGS || \
- set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
- fi; \
- done; \
- $(am__define_uniq_tagged_files); \
- shift; \
- if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- if test $$# -gt 0; then \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- "$$@" $$unique; \
- else \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$unique; \
- fi; \
- fi
-ctags: ctags-recursive
-
-CTAGS: ctags
-ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
- $(am__define_uniq_tagged_files); \
- test -z "$(CTAGS_ARGS)$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && $(am__cd) $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) "$$here"
-cscopelist: cscopelist-recursive
-
-cscopelist-am: $(am__tagged_files)
- list='$(am__tagged_files)'; \
- case "$(srcdir)" in \
- [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
- *) sdir=$(subdir)/$(srcdir) ;; \
- esac; \
- for i in $$list; do \
- if test -f "$$i"; then \
- echo "$(subdir)/$$i"; \
- else \
- echo "$$sdir/$$i"; \
- fi; \
- done >> $(top_builddir)/cscope.files
+ctags CTAGS:
+
+cscope cscopelist:
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -448,45 +315,19 @@ distdir: $(DISTFILES)
|| exit 1; \
fi; \
done
- @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- $(am__make_dryrun) \
- || test -d "$(distdir)/$$subdir" \
- || $(MKDIR_P) "$(distdir)/$$subdir" \
- || exit 1; \
- dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
- $(am__relativize); \
- new_distdir=$$reldir; \
- dir1=$$subdir; dir2="$(top_distdir)"; \
- $(am__relativize); \
- new_top_distdir=$$reldir; \
- echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
- echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
- ($(am__cd) $$subdir && \
- $(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$$new_top_distdir" \
- distdir="$$new_distdir" \
- am__remove_distdir=: \
- am__skip_length_check=: \
- am__skip_mode_fix=: \
- distdir) \
- || exit 1; \
- fi; \
- done
check-am: all-am
-check: check-recursive
+check: check-am
all-am: Makefile
-installdirs: installdirs-recursive
-installdirs-am:
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-installcheck: installcheck-recursive
+installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
@@ -508,85 +349,84 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
+clean: clean-am
clean-am: clean-generic mostlyclean-am
-distclean: distclean-recursive
+distclean: distclean-am
-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-tags
+distclean-am: clean-am distclean-generic
-dvi: dvi-recursive
+dvi: dvi-am
dvi-am:
-html: html-recursive
+html: html-am
html-am:
-info: info-recursive
+info: info-am
info-am:
install-data-am:
-install-dvi: install-dvi-recursive
+install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
-install-html: install-html-recursive
+install-html: install-html-am
install-html-am:
-install-info: install-info-recursive
+install-info: install-info-am
install-info-am:
install-man:
-install-pdf: install-pdf-recursive
+install-pdf: install-pdf-am
install-pdf-am:
-install-ps: install-ps-recursive
+install-ps: install-ps-am
install-ps-am:
installcheck-am:
-maintainer-clean: maintainer-clean-recursive
+maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
-mostlyclean: mostlyclean-recursive
+mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
-pdf: pdf-recursive
+pdf: pdf-am
pdf-am:
-ps: ps-recursive
+ps: ps-am
ps-am:
uninstall-am:
-.MAKE: $(am__recursive_targets) install-am install-strip
+.MAKE: install-am install-strip
-.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
- check-am clean clean-generic cscopelist-am ctags ctags-am \
- distclean distclean-generic distclean-tags distdir dvi dvi-am \
- html html-am info info-am install install-am install-data \
+.PHONY: all all-am check check-am clean clean-generic cscopelist-am \
+ ctags-am distclean distclean-generic distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs installdirs-am maintainer-clean \
+ installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
- pdf-am ps ps-am tags tags-am uninstall uninstall-am
+ pdf-am ps ps-am tags-am uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/contrib/fst_jni/fst2Vcd.java b/contrib/fst_jni/fst2Vcd.java
new file mode 100644
index 0000000..8f9e016
--- /dev/null
+++ b/contrib/fst_jni/fst2Vcd.java
@@ -0,0 +1,147 @@
+/*
+ * 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.
+ */
+
+public class fst2Vcd
+{
+fstReader fb;
+byte [] facType;
+long prevTime;
+long startTime, endTime;
+
+
+public void fstReaderCallback(long tim, int facidx, String value)
+{
+if(tim != prevTime)
+ {
+ System.out.println("#" + tim);
+ prevTime = tim;
+ }
+
+switch(facType[facidx])
+ {
+ case fstVarType.FST_VT_VCD_REAL:
+ case fstVarType.FST_VT_VCD_REAL_PARAMETER:
+ case fstVarType.FST_VT_VCD_REALTIME:
+ case fstVarType.FST_VT_SV_SHORTREAL:
+ System.out.println("r" + value + " " + fb.fstReaderVcdID(facidx));
+ break;
+
+ case fstVarType.FST_VT_GEN_STRING:
+ System.out.println("s" + value + " " + fb.fstReaderVcdID(facidx));
+ break;
+
+ default:if(value.length() == 1)
+ {
+ System.out.println(value + fb.fstReaderVcdID(facidx));
+ }
+ else
+ {
+ System.out.println("b" + value + " " + fb.fstReaderVcdID(facidx));
+ }
+ break;
+ }
+}
+
+
+fst2Vcd(String fnam)
+ {
+ fb = new fstReader(fnam);
+
+ startTime = fb.fstReaderGetStartTime();
+ endTime = fb.fstReaderGetEndTime();
+
+ System.out.println("$date\n\t" + fb.fstReaderGetDateString() + "\n$end");
+ System.out.println("$version\n\t" + fb.fstReaderGetVersionString() + "\n$end");
+ System.out.println("$timescale\n\t" + fb.fstReaderGetTimescaleString() + "s\n$end");
+
+ int maxHandle = fb.fstReaderGetMaxHandle();
+
+ facType = new byte[maxHandle+1];
+
+ fstHier fh = new fstHier();
+ for(;;)
+ {
+ fb.fstReaderIterateHier(fh);
+ if(!fh.valid) break;
+
+ switch(fh.htyp)
+ {
+ case fstHierType.FST_HT_SCOPE:
+ System.out.println("$scope " + fstScopeType.FST_ST_NAMESTRINGS[fh.typ] + " " + fh.name1 + " $end");
+ break;
+
+ case fstHierType.FST_HT_UPSCOPE:
+ System.out.println("$upscope $end");
+ break;
+
+ case fstHierType.FST_HT_VAR:
+ int modlen;
+ facType[fh.handle] = (byte)fh.typ;
+ switch(fh.typ)
+ {
+ case fstVarType.FST_VT_VCD_REAL:
+ case fstVarType.FST_VT_VCD_REAL_PARAMETER:
+ case fstVarType.FST_VT_VCD_REALTIME: modlen = 64; break;
+ case fstVarType.FST_VT_SV_SHORTREAL: modlen = 32; break;
+ case fstVarType.FST_VT_GEN_STRING: modlen = 0; break;
+ default: modlen = fh.length; break;
+ }
+
+ System.out.println("$var " + fstVarType.FST_VT_NAMESTRINGS[fh.typ] + " " +
+ modlen + " " +
+ fb.fstReaderVcdID(fh.handle) + " " + fh.name1 + " $end");
+ break;
+
+ case fstHierType.FST_HT_ATTRBEGIN:
+ switch(fh.typ)
+ {
+ 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;
+ }
+
+ break;
+
+ case fstHierType.FST_HT_ATTREND:
+ System.out.println("$attrend $end");
+ break;
+ }
+ }
+
+ System.out.println("$enddefinitions $end");
+
+ fb.fstReaderSetFacProcessMaskAll();
+
+ prevTime = 0;
+ fb.fstReaderIterBlocks(this);
+
+ if(prevTime != endTime)
+ {
+ System.out.println("#" + endTime);
+ }
+
+ fb.fstReaderClose();
+ }
+}
diff --git a/contrib/fst_jni/fstAPI.c b/contrib/fst_jni/fstAPI.c
new file mode 100644
index 0000000..0c0c8b6
--- /dev/null
+++ b/contrib/fst_jni/fstAPI.c
@@ -0,0 +1,721 @@
+#include <jni.h>
+#include <string.h>
+#include "fstapi.h"
+
+/*
+ * fstWriter
+ */
+
+JNIEXPORT jlong JNICALL Java_fstAPI_fstWriterCreate
+ (JNIEnv *env, jobject obj, jstring j_nam, jboolean use_compressed_hier)
+{
+void *ctx;
+const char *nam = (*env)->GetStringUTFChars(env, j_nam, 0);
+
+ctx = fstWriterCreate(nam, (int)use_compressed_hier);
+
+(*env)->ReleaseStringUTFChars(env, j_nam, nam);
+
+return((jlong)(long)ctx);
+}
+
+
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterClose
+ (JNIEnv *env, jobject obj, jlong ctx)
+{
+fstWriterClose((void *)(long)ctx);
+}
+
+
+JNIEXPORT jboolean JNICALL Java_fstAPI_fstWriterGetFseekFailed
+ (JNIEnv *env, jobject obj, jlong ctx)
+{
+int rc = fstWriterGetFseekFailed((void *)(long)ctx);
+
+return(rc != 0);
+}
+
+
+JNIEXPORT jboolean JNICALL Java_fstAPI_fstWriterGetDumpSizeLimitReached
+ (JNIEnv *env, jobject obj, jlong ctx)
+{
+int rc = fstWriterGetDumpSizeLimitReached((void *)(long)ctx);
+
+return(rc != 0);
+}
+
+
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterFlushContext
+ (JNIEnv *env, jobject obj, jlong ctx)
+{
+fstWriterFlushContext((void *)(long)ctx);
+}
+
+
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetUpscope
+ (JNIEnv *env, jobject obj, jlong ctx)
+{
+fstWriterSetUpscope((void *)(long)ctx);
+}
+
+
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetAttrEnd
+ (JNIEnv *env, jobject obj, jlong ctx)
+{
+fstWriterSetAttrEnd((void *)(long)ctx);
+}
+
+
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetPackType
+ (JNIEnv *env, jobject obj, jlong ctx, jint typ)
+{
+fstWriterSetPackType((void *)(long)ctx, (int)typ);
+}
+
+
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetRepackOnClose
+ (JNIEnv *env, jobject obj, jlong ctx, jboolean enable)
+{
+fstWriterSetRepackOnClose((void *)(long)ctx, (int)enable);
+}
+
+
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetParallelMode
+ (JNIEnv *env, jobject obj, jlong ctx, jboolean enable)
+{
+fstWriterSetParallelMode((void *)(long)ctx, (int)enable);
+}
+
+
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetTimescale
+ (JNIEnv *env, jobject obj, jlong ctx, jint ts)
+{
+fstWriterSetParallelMode((void *)(long)ctx, (int)ts);
+}
+
+
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetTimezero
+ (JNIEnv *env, jobject obj, jlong ctx, jlong tim)
+{
+fstWriterSetTimezero((void *)(long)ctx, (int64_t)tim);
+}
+
+
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetDumpSizeLimit
+ (JNIEnv *env, jobject obj, jlong ctx, jlong numbytes)
+{
+fstWriterSetDumpSizeLimit((void *)(long)ctx, (uint64_t)numbytes);
+}
+
+
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterEmitDumpActive
+ (JNIEnv *env, jobject obj, jlong ctx, jboolean enable)
+{
+fstWriterEmitDumpActive((void *)(long)ctx, (int)enable);
+}
+
+
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterEmitTimeChange
+ (JNIEnv *env, jobject obj, jlong ctx, jlong tim)
+{
+fstWriterEmitTimeChange((void *)(long)ctx, (uint64_t)tim);
+}
+
+
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetDate
+ (JNIEnv *env, jobject obj, jlong ctx, jstring j_dat)
+{
+const char *dat = (*env)->GetStringUTFChars(env, j_dat, 0);
+
+fstWriterSetDate((void *)(long)ctx, dat);
+
+(*env)->ReleaseStringUTFChars(env, j_dat, dat);
+}
+
+
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetVersion
+ (JNIEnv *env, jobject obj, jlong ctx, jstring j_vers)
+{
+const char *vers = (*env)->GetStringUTFChars(env, j_vers, 0);
+
+fstWriterSetVersion((void *)(long)ctx, vers);
+
+(*env)->ReleaseStringUTFChars(env, j_vers, vers);
+}
+
+
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetComment
+ (JNIEnv *env, jobject obj, jlong ctx, jstring j_comm)
+{
+const char *comm = (*env)->GetStringUTFChars(env, j_comm, 0);
+
+fstWriterSetComment((void *)(long)ctx, comm);
+
+(*env)->ReleaseStringUTFChars(env, j_comm, comm);
+}
+
+
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetEnvVar
+ (JNIEnv *env, jobject obj, jlong ctx, jstring j_envvar)
+{
+const char *envvar = (*env)->GetStringUTFChars(env, j_envvar, 0);
+
+fstWriterSetEnvVar((void *)(long)ctx, envvar);
+
+(*env)->ReleaseStringUTFChars(env, j_envvar, envvar);
+}
+
+
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetTimescaleFromString
+ (JNIEnv *env, jobject obj, jlong ctx, jstring j_s)
+{
+const char *s = (*env)->GetStringUTFChars(env, j_s, 0);
+
+fstWriterSetTimescaleFromString((void *)(long)ctx, s);
+
+(*env)->ReleaseStringUTFChars(env, j_s, s);
+}
+
+
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterEmitValueChange__JILjava_lang_String_2
+ (JNIEnv *env, jobject obj, jlong ctx, jint handle, jstring j_val)
+{
+const char *val = (*env)->GetStringUTFChars(env, j_val, 0);
+
+fstWriterEmitValueChange((void *)(long)ctx, (fstHandle)handle, val);
+
+(*env)->ReleaseStringUTFChars(env, j_val, val);
+}
+
+
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterEmitValueChange__JID
+ (JNIEnv *env, jobject obj, jlong ctx, jint handle, jdouble d)
+{
+fstWriterEmitValueChange((void *)(long)ctx, (fstHandle)handle, (void *)&d);
+}
+
+
+JNIEXPORT jint JNICALL Java_fstAPI_fstWriterCreateVar
+ (JNIEnv *env, jobject obj, jlong ctx, jint vt, jint vd, jint len, jstring j_nam, jint aliasHandle)
+{
+fstHandle handle;
+const char *nam = (*env)->GetStringUTFChars(env, j_nam, 0);
+
+handle = fstWriterCreateVar((void *)(long)ctx, (int)vt, (int)vd, (uint32_t)len, nam, (fstHandle)aliasHandle);
+
+(*env)->ReleaseStringUTFChars(env, j_nam, nam);
+
+return((jint)handle);
+}
+
+
+JNIEXPORT jint JNICALL Java_fstAPI_fstWriterCreateVar2
+ (JNIEnv *env, jobject obj, jlong ctx, jint vt, jint vd, jint len, jstring j_nam, jint aliasHandle, jstring j_type, jint svt, jint sdt)
+{
+fstHandle handle;
+const char *nam = (*env)->GetStringUTFChars(env, j_nam, 0);
+const char *typ = (*env)->GetStringUTFChars(env, j_type, 0);
+
+handle = fstWriterCreateVar2((void *)(long)ctx, (int)vt, (int)vd, (uint32_t)len, nam, (fstHandle)aliasHandle, typ, (int)svt, (int)sdt);
+
+(*env)->ReleaseStringUTFChars(env, j_type, typ);
+(*env)->ReleaseStringUTFChars(env, j_nam, nam);
+
+return((jint)handle);
+}
+
+
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetScope
+ (JNIEnv *env, jobject obj, jlong ctx, jint scopetype, jstring j_scopename, jstring j_scopecomp)
+{
+const char *scopename = (*env)->GetStringUTFChars(env, j_scopename, 0);
+const char *scopecomp = (*env)->GetStringUTFChars(env, j_scopecomp, 0);
+
+fstWriterSetScope((void *)(long)ctx, (int)scopetype, scopename, scopecomp);
+
+(*env)->ReleaseStringUTFChars(env, j_scopecomp, scopecomp);
+(*env)->ReleaseStringUTFChars(env, j_scopename, scopename);
+}
+
+
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterEmitVariableLengthValueChange
+ (JNIEnv *env, jobject obj, jlong ctx, jint handle, jstring j_val, jint len)
+{
+const char *val = (*env)->GetStringUTFChars(env, j_val, 0);
+
+fstWriterEmitVariableLengthValueChange((void *)(long)ctx, (fstHandle)handle, val, (uint32_t)len);
+
+(*env)->ReleaseStringUTFChars(env, j_val, val);
+}
+
+
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetAttrBegin
+ (JNIEnv *env, jobject obj, jlong ctx, jint attrtype, jint subtype, jstring j_attrname, jlong arg)
+{
+const char *attrname = (*env)->GetStringUTFChars(env, j_attrname, 0);
+
+fstWriterSetAttrBegin((void *)(long)ctx, (int)attrtype, (int)subtype, attrname, (uint64_t)arg);
+
+(*env)->ReleaseStringUTFChars(env, j_attrname, attrname);
+}
+
+
+/*
+ * fstReader
+ */
+
+JNIEXPORT jlong JNICALL Java_fstAPI_fstReaderOpen
+ (JNIEnv *env, jobject obj, jstring j_nam)
+{
+void *ctx;
+const char *nam = (*env)->GetStringUTFChars(env, j_nam, 0);
+
+ctx = fstReaderOpen(nam);
+
+(*env)->ReleaseStringUTFChars(env, j_nam, nam);
+
+return((jlong)(long)ctx);
+}
+
+
+JNIEXPORT jlong JNICALL Java_fstAPI_fstReaderOpenForUtilitiesOnly
+ (JNIEnv *env, jobject obj)
+{
+void *ctx;
+
+ctx = fstReaderOpenForUtilitiesOnly();
+
+return((jlong)(long)ctx);
+}
+
+
+JNIEXPORT void JNICALL Java_fstAPI_fstReaderClose
+ (JNIEnv *env, jobject obj, jlong ctx)
+{
+fstReaderClose((void *)(long)ctx);
+}
+
+
+JNIEXPORT jboolean JNICALL Java_fstAPI_fstReaderIterateHierRewind
+ (JNIEnv *env, jobject obj, jlong ctx)
+{
+return((jboolean)(fstReaderIterateHierRewind((void *)(long)ctx) != 0));
+}
+
+
+JNIEXPORT void JNICALL Java_fstAPI_fstReaderResetScope
+ (JNIEnv *env, jobject obj, jlong ctx)
+{
+fstReaderResetScope((void *)(long)ctx);
+}
+
+
+JNIEXPORT jint JNICALL Java_fstAPI_fstReaderGetCurrentScopeLen
+ (JNIEnv *env, jobject obj, jlong ctx)
+{
+return((jint)fstReaderGetCurrentScopeLen((void *)(long)ctx));
+}
+
+
+JNIEXPORT jlong JNICALL Java_fstAPI_fstReaderGetTimezero
+ (JNIEnv *env, jobject obj, jlong ctx)
+{
+return((jlong)fstReaderGetTimezero((void *)(long)ctx));
+}
+
+
+JNIEXPORT jlong JNICALL Java_fstAPI_fstReaderGetStartTime
+ (JNIEnv *env, jobject obj, jlong ctx)
+{
+return((jlong)fstReaderGetStartTime((void *)(long)ctx));
+}
+
+
+JNIEXPORT jlong JNICALL Java_fstAPI_fstReaderGetEndTime
+ (JNIEnv *env, jobject obj, jlong ctx)
+{
+return((jlong)fstReaderGetEndTime((void *)(long)ctx));
+}
+
+
+JNIEXPORT jlong JNICALL Java_fstAPI_fstReaderGetMemoryUsedByWriter
+ (JNIEnv *env, jobject obj, jlong ctx)
+{
+return((jlong)fstReaderGetMemoryUsedByWriter((void *)(long)ctx));
+}
+
+
+JNIEXPORT jlong JNICALL Java_fstAPI_fstReaderGetScopeCount
+ (JNIEnv *env, jobject obj, jlong ctx)
+{
+return((jlong)fstReaderGetScopeCount((void *)(long)ctx));
+}
+
+
+JNIEXPORT jlong JNICALL Java_fstAPI_fstReaderGetVarCount
+ (JNIEnv *env, jobject obj, jlong ctx)
+{
+return((jlong)fstReaderGetVarCount((void *)(long)ctx));
+}
+
+
+JNIEXPORT jint JNICALL Java_fstAPI_fstReaderGetMaxHandle
+ (JNIEnv *env, jobject obj, jlong ctx)
+{
+return((jint)fstReaderGetMaxHandle((void *)(long)ctx));
+}
+
+
+JNIEXPORT jlong JNICALL Java_fstAPI_fstReaderGetAliasCount
+ (JNIEnv *env, jobject obj, jlong ctx)
+{
+return((jlong)fstReaderGetAliasCount((void *)(long)ctx));
+}
+
+
+JNIEXPORT jlong JNICALL Java_fstAPI_fstReaderGetValueChangeSectionCount
+ (JNIEnv *env, jobject obj, jlong ctx)
+{
+return((jlong)fstReaderGetValueChangeSectionCount((void *)(long)ctx));
+}
+
+
+JNIEXPORT jboolean JNICALL Java_fstAPI_fstReaderGetFseekFailed
+ (JNIEnv *env, jobject obj, jlong ctx)
+{
+return((jboolean)(fstReaderGetFseekFailed((void *)(long)ctx) != 0));
+}
+
+
+JNIEXPORT void JNICALL Java_fstAPI_fstReaderSetUnlimitedTimeRange
+ (JNIEnv *env, jobject obj, jlong ctx)
+{
+fstReaderSetUnlimitedTimeRange((void *)(long)ctx);
+}
+
+
+JNIEXPORT void JNICALL Java_fstAPI_fstReaderSetLimitTimeRange
+ (JNIEnv *env, jobject obj, jlong ctx, jlong start_time, jlong end_time)
+{
+fstReaderSetLimitTimeRange((void *)(long)ctx, (uint64_t)start_time, (uint64_t)end_time);
+}
+
+
+JNIEXPORT jint JNICALL Java_fstAPI_fstReaderGetNumberDumpActivityChanges
+ (JNIEnv *env, jobject obj, jlong ctx)
+{
+return((jint)fstReaderGetNumberDumpActivityChanges((void *)(long)ctx));
+}
+
+
+JNIEXPORT jlong JNICALL Java_fstAPI_fstReaderGetDumpActivityChangeTime
+ (JNIEnv *env, jobject obj, jlong ctx, jint idx)
+{
+return((jlong)fstReaderGetDumpActivityChangeTime((void *)(long)ctx, (uint32_t)idx));
+}
+
+
+JNIEXPORT jboolean JNICALL Java_fstAPI_fstReaderGetFacProcessMask
+ (JNIEnv *env, jobject obj, jlong ctx, jint facidx)
+{
+return((jboolean)(fstReaderGetFacProcessMask((void *)(long)ctx, (fstHandle)facidx) != 0));
+}
+
+
+JNIEXPORT void JNICALL Java_fstAPI_fstReaderSetFacProcessMask
+ (JNIEnv *env, jobject obj, jlong ctx, jint facidx)
+{
+fstReaderSetFacProcessMask((void *)(long)ctx, (fstHandle)facidx);
+}
+
+
+JNIEXPORT void JNICALL Java_fstAPI_fstReaderClrFacProcessMask
+ (JNIEnv *env, jobject obj, jlong ctx, jint facidx)
+{
+fstReaderClrFacProcessMask((void *)(long)ctx, (fstHandle)facidx);
+}
+
+
+JNIEXPORT void JNICALL Java_fstAPI_fstReaderSetFacProcessMaskAll
+ (JNIEnv *env, jobject obj, jlong ctx)
+{
+fstReaderSetFacProcessMaskAll((void *)(long)ctx);
+}
+
+
+JNIEXPORT void JNICALL Java_fstAPI_fstReaderClrFacProcessMaskAll
+ (JNIEnv *env, jobject obj, jlong ctx)
+{
+fstReaderClrFacProcessMaskAll((void *)(long)ctx);
+}
+
+
+JNIEXPORT jstring JNICALL Java_fstAPI_fstReaderGetVersionString
+ (JNIEnv *env, jobject obj, jlong ctx)
+{
+const char *s = fstReaderGetVersionString((void *)(long)ctx);
+jstring j_s = (*env)->NewStringUTF(env, s);
+
+return(j_s);
+}
+
+
+JNIEXPORT jstring JNICALL Java_fstAPI_fstReaderGetDateString
+ (JNIEnv *env, jobject obj, jlong ctx)
+{
+const char *s = fstReaderGetDateString((void *)(long)ctx);
+jstring j_s = (*env)->NewStringUTF(env, s);
+
+return(j_s);
+}
+
+
+JNIEXPORT jstring JNICALL Java_fstAPI_fstReaderPopScope
+ (JNIEnv *env, jobject obj, jlong ctx)
+{
+const char *s = fstReaderPopScope((void *)(long)ctx);
+jstring j_s = (*env)->NewStringUTF(env, s);
+
+return(j_s);
+}
+
+
+JNIEXPORT jstring JNICALL Java_fstAPI_fstReaderGetCurrentFlatScope
+ (JNIEnv *env, jobject obj, jlong ctx)
+{
+const char *s = fstReaderGetCurrentFlatScope((void *)(long)ctx);
+jstring j_s = (*env)->NewStringUTF(env, s);
+
+return(j_s);
+}
+
+
+JNIEXPORT jstring JNICALL Java_fstAPI_fstReaderGetCurrentScopeUserInfo
+ (JNIEnv *env, jobject obj, jlong ctx)
+{
+const char *s = fstReaderGetCurrentScopeUserInfo((void *)(long)ctx);
+jstring j_s = (*env)->NewStringUTF(env, s);
+
+return(j_s);
+}
+
+
+JNIEXPORT jstring JNICALL Java_fstAPI_fstReaderPushScope
+ (JNIEnv *env, jobject obj, jlong ctx, jstring j_nam, jlong user_info)
+{
+const char *nam = (*env)->GetStringUTFChars(env, j_nam, 0);
+
+const char *s = fstReaderPushScope((void *)(long)ctx, nam, (void *)(long)user_info);
+jstring j_s = (*env)->NewStringUTF(env, s);
+
+(*env)->ReleaseStringUTFChars(env, j_nam, nam);
+
+return(j_s);
+}
+
+
+JNIEXPORT jint JNICALL Java_fstAPI_fstReaderGetTimescale
+ (JNIEnv *env, jobject obj, jlong ctx)
+{
+return((jint)fstReaderGetTimescale((void *)(long)ctx));
+}
+
+
+JNIEXPORT jboolean JNICALL Java_fstAPI_fstReaderGetDumpActivityChangeValue
+ (JNIEnv *env, jobject obj, jlong ctx, jint idx)
+{
+return((jboolean)(fstReaderGetDumpActivityChangeValue((void *)(long)ctx, (uint32_t)idx) != 0));
+}
+
+
+JNIEXPORT jstring JNICALL Java_fstAPI_fstReaderGetValueFromHandleAtTime
+ (JNIEnv *env, jobject obj, jlong ctx, jlong tim, jint facidx)
+{
+char buf[65537];
+const char *s = fstReaderGetValueFromHandleAtTime((void *)(long)ctx, (uint64_t)tim, (fstHandle)facidx, buf);
+jstring j_s = (*env)->NewStringUTF(env, s);
+
+return(j_s);
+}
+
+
+JNIEXPORT jstring JNICALL Java_fstAPI_fstUtilityBinToEsc
+ (JNIEnv *env, jclass obj, jbyteArray b_s, jint len)
+{
+jbyte* s = (*env)->GetByteArrayElements(env, b_s,NULL);
+char *d = malloc(len * 4);
+jstring j_d;
+int i;
+int rlen;
+
+d[0] = 0;
+rlen = fstUtilityBinToEsc(d, s, (int)len);
+d[rlen] = 0;
+j_d = (*env)->NewStringUTF(env, d);
+
+free(d);
+(*env)->ReleaseByteArrayElements(env, b_s, s, 0);
+
+return(j_d);
+}
+
+
+JNIEXPORT jbyteArray JNICALL Java_fstAPI_fstUtilityEscToBin
+ (JNIEnv *env, jclass obj, jstring j_s)
+{
+const char *s = (*env)->GetStringUTFChars(env, j_s, 0);
+char *d = strdup(s);
+int len = strlen(s);
+jbyteArray result;
+
+int rlen = fstUtilityEscToBin(d, d, len);
+
+(*env)->ReleaseStringUTFChars(env, j_s, s);
+
+result=(*env)->NewByteArray(env, rlen);
+
+(*env)->SetByteArrayRegion(env, result, 0, rlen, d);
+free(d);
+
+return(result);
+}
+
+
+JNIEXPORT void JNICALL Java_fstAPI_fstReaderIterateHier
+ (JNIEnv *env, jobject obj, jlong ctx, jobject obj2)
+{
+struct fstHier *fh = fstReaderIterateHier((void *)(long)ctx);
+
+jclass javaDataClass = (*env)->FindClass(env, "fstHier");
+jfieldID validField = (*env)->GetFieldID(env, javaDataClass, "valid", "Z");
+jfieldID htypField = (*env)->GetFieldID(env, javaDataClass, "htyp", "I");
+jfieldID typField = (*env)->GetFieldID(env, javaDataClass, "typ", "I");
+jfieldID subtypeField;
+jfieldID directionField;
+jfieldID lengthField;
+jfieldID handleField;
+jfieldID name1Field;
+jfieldID name2Field;
+jfieldID argField;
+jfieldID isAliasField;
+jstring j_name1;
+jstring j_name2;
+
+(*env)->SetBooleanField(env, obj2, validField, (fh != NULL));
+
+if(fh)
+ {
+ (*env)->SetIntField(env, obj2, htypField, fh->htyp);
+
+ switch(fh->htyp)
+ {
+ case FST_HT_SCOPE:
+ (*env)->SetIntField(env, obj2, typField, fh->u.scope.typ);
+
+ j_name1 = (*env)->NewStringUTF(env, fh->u.scope.name);
+ name1Field = (*env)->GetFieldID(env, javaDataClass, "name1", "Ljava/lang/String;");
+ (*env)->SetObjectField(env, obj2, name1Field, j_name1);
+
+ j_name2 = (*env)->NewStringUTF(env, fh->u.scope.component);
+ name2Field = (*env)->GetFieldID(env, javaDataClass, "name2", "Ljava/lang/String;");
+ (*env)->SetObjectField(env, obj2, name2Field, j_name2);
+ break;
+
+ case FST_HT_UPSCOPE:
+ (*env)->SetIntField(env, obj2, typField, FST_ST_VCD_UPSCOPE);
+ break;
+
+ case FST_HT_VAR:
+ (*env)->SetIntField(env, obj2, typField, fh->u.var.typ);
+
+ directionField = (*env)->GetFieldID(env, javaDataClass, "direction", "I");
+ (*env)->SetIntField(env, obj2, directionField, (jint)fh->u.var.direction);
+
+ j_name1 = (*env)->NewStringUTF(env, fh->u.var.name);
+ name1Field = (*env)->GetFieldID(env, javaDataClass, "name1", "Ljava/lang/String;");
+ (*env)->SetObjectField(env, obj2, name1Field, j_name1);
+
+ lengthField = (*env)->GetFieldID(env, javaDataClass, "length", "I");
+ (*env)->SetIntField(env, obj2, lengthField, (jint)fh->u.var.length);
+
+ handleField = (*env)->GetFieldID(env, javaDataClass, "handle", "I");
+ (*env)->SetIntField(env, obj2, handleField, (jint)fh->u.var.handle);
+
+ isAliasField = (*env)->GetFieldID(env, javaDataClass, "is_alias", "Z");
+ (*env)->SetBooleanField(env, obj2, isAliasField, (jboolean)(fh->u.var.is_alias));
+ break;
+
+ case FST_HT_ATTRBEGIN:
+ (*env)->SetIntField(env, obj2, typField, fh->u.attr.typ);
+
+ subtypeField = (*env)->GetFieldID(env, javaDataClass, "subtype", "I");
+ (*env)->SetIntField(env, obj2, subtypeField, fh->u.attr.subtype);
+
+ j_name1 = (*env)->NewStringUTF(env, fh->u.attr.name);
+ name1Field = (*env)->GetFieldID(env, javaDataClass, "name1", "Ljava/lang/String;");
+ (*env)->SetObjectField(env, obj2, name1Field, j_name1);
+
+ argField = (*env)->GetFieldID(env, javaDataClass, "arg", "J");
+ (*env)->SetLongField(env, obj2, argField, fh->u.attr.arg);
+ break;
+
+ case FST_HT_ATTREND:
+ (*env)->SetIntField(env, obj2, typField, FST_ST_GEN_ATTREND);
+ break;
+
+ default:
+ break;
+ }
+ }
+}
+
+
+struct jni_fstCB_t
+{
+JNIEnv *env;
+jobject obj;
+void *ctx;
+jobject cbobj;
+jclass cls;
+
+jmethodID mid;
+};
+
+
+static void value_change_callback2(void *user_callback_data_pointer, uint64_t time, fstHandle facidx, const unsigned char *value, uint32_t len)
+{
+struct jni_fstCB_t *jni = (struct jni_fstCB_t *)user_callback_data_pointer;
+jstring j_s = (*jni->env)->NewStringUTF(jni->env, value);
+(*jni->env)->CallVoidMethod(jni->env, jni->cbobj, jni->mid, (jlong)time, (jint)facidx, j_s);
+}
+
+static void value_change_callback(void *user_callback_data_pointer, uint64_t time, fstHandle facidx, const unsigned char *value)
+{
+value_change_callback2(user_callback_data_pointer, time, facidx, value, 0);
+}
+
+
+
+JNIEXPORT jint JNICALL Java_fstAPI_fstReaderIterBlocks
+ (JNIEnv *env, jobject obj, jlong ctx, jobject cbobj)
+{
+struct jni_fstCB_t cb;
+jint rc;
+
+jclass cls = (*env)->GetObjectClass(env, cbobj);
+jmethodID mid = (*env)->GetMethodID(env, cls, "fstReaderCallback", "(JILjava/lang/String;)V");
+
+cb.env = env;
+cb.obj = obj;
+cb.ctx = (void *)(long)ctx;
+cb.cbobj = cbobj;
+cb.cls = cls;
+cb.mid = mid;
+
+rc = fstReaderIterBlocks2((void *)(long)ctx,
+ value_change_callback,
+ value_change_callback2,
+ &cb, NULL);
+
+return(rc);
+}
diff --git a/contrib/fst_jni/fstAPI.h b/contrib/fst_jni/fstAPI.h
new file mode 100644
index 0000000..d02d4db
--- /dev/null
+++ b/contrib/fst_jni/fstAPI.h
@@ -0,0 +1,533 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class fstAPI */
+
+#ifndef _Included_fstAPI
+#define _Included_fstAPI
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class: fstAPI
+ * Method: fstWriterCreate
+ * Signature: (Ljava/lang/String;Z)J
+ */
+JNIEXPORT jlong JNICALL Java_fstAPI_fstWriterCreate
+ (JNIEnv *, jobject, jstring, jboolean);
+
+/*
+ * Class: fstAPI
+ * Method: fstWriterClose
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterClose
+ (JNIEnv *, jobject, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstWriterGetFseekFailed
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_fstAPI_fstWriterGetFseekFailed
+ (JNIEnv *, jobject, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstWriterGetDumpSizeLimitReached
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_fstAPI_fstWriterGetDumpSizeLimitReached
+ (JNIEnv *, jobject, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstWriterFlushContext
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterFlushContext
+ (JNIEnv *, jobject, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstWriterSetUpscope
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetUpscope
+ (JNIEnv *, jobject, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstWriterSetAttrEnd
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetAttrEnd
+ (JNIEnv *, jobject, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstWriterSetPackType
+ * Signature: (JI)V
+ */
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetPackType
+ (JNIEnv *, jobject, jlong, jint);
+
+/*
+ * Class: fstAPI
+ * Method: fstWriterSetRepackOnClose
+ * Signature: (JZ)V
+ */
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetRepackOnClose
+ (JNIEnv *, jobject, jlong, jboolean);
+
+/*
+ * Class: fstAPI
+ * Method: fstWriterSetParallelMode
+ * Signature: (JZ)V
+ */
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetParallelMode
+ (JNIEnv *, jobject, jlong, jboolean);
+
+/*
+ * Class: fstAPI
+ * Method: fstWriterSetTimescale
+ * Signature: (JI)V
+ */
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetTimescale
+ (JNIEnv *, jobject, jlong, jint);
+
+/*
+ * Class: fstAPI
+ * Method: fstWriterSetTimezero
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetTimezero
+ (JNIEnv *, jobject, jlong, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstWriterSetDumpSizeLimit
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetDumpSizeLimit
+ (JNIEnv *, jobject, jlong, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstWriterEmitDumpActive
+ * Signature: (JZ)V
+ */
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterEmitDumpActive
+ (JNIEnv *, jobject, jlong, jboolean);
+
+/*
+ * Class: fstAPI
+ * Method: fstWriterEmitTimeChange
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterEmitTimeChange
+ (JNIEnv *, jobject, jlong, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstWriterSetDate
+ * Signature: (JLjava/lang/String;)V
+ */
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetDate
+ (JNIEnv *, jobject, jlong, jstring);
+
+/*
+ * Class: fstAPI
+ * Method: fstWriterSetVersion
+ * Signature: (JLjava/lang/String;)V
+ */
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetVersion
+ (JNIEnv *, jobject, jlong, jstring);
+
+/*
+ * Class: fstAPI
+ * Method: fstWriterSetComment
+ * Signature: (JLjava/lang/String;)V
+ */
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetComment
+ (JNIEnv *, jobject, jlong, jstring);
+
+/*
+ * Class: fstAPI
+ * Method: fstWriterSetEnvVar
+ * Signature: (JLjava/lang/String;)V
+ */
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetEnvVar
+ (JNIEnv *, jobject, jlong, jstring);
+
+/*
+ * Class: fstAPI
+ * Method: fstWriterSetTimescaleFromString
+ * Signature: (JLjava/lang/String;)V
+ */
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetTimescaleFromString
+ (JNIEnv *, jobject, jlong, jstring);
+
+/*
+ * Class: fstAPI
+ * Method: fstWriterCreateVar
+ * Signature: (JIIILjava/lang/String;I)I
+ */
+JNIEXPORT jint JNICALL Java_fstAPI_fstWriterCreateVar
+ (JNIEnv *, jobject, jlong, jint, jint, jint, jstring, jint);
+
+/*
+ * Class: fstAPI
+ * Method: fstWriterCreateVar2
+ * Signature: (JIIILjava/lang/String;ILjava/lang/String;II)I
+ */
+JNIEXPORT jint JNICALL Java_fstAPI_fstWriterCreateVar2
+ (JNIEnv *, jobject, jlong, jint, jint, jint, jstring, jint, jstring, jint, jint);
+
+/*
+ * Class: fstAPI
+ * Method: fstWriterSetScope
+ * Signature: (JILjava/lang/String;Ljava/lang/String;)V
+ */
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetScope
+ (JNIEnv *, jobject, jlong, jint, jstring, jstring);
+
+/*
+ * Class: fstAPI
+ * Method: fstWriterEmitVariableLengthValueChange
+ * Signature: (JILjava/lang/String;I)V
+ */
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterEmitVariableLengthValueChange
+ (JNIEnv *, jobject, jlong, jint, jstring, jint);
+
+/*
+ * Class: fstAPI
+ * Method: fstWriterSetAttrBegin
+ * Signature: (JIILjava/lang/String;J)V
+ */
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterSetAttrBegin
+ (JNIEnv *, jobject, jlong, jint, jint, jstring, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstWriterEmitValueChange
+ * Signature: (JILjava/lang/String;)V
+ */
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterEmitValueChange__JILjava_lang_String_2
+ (JNIEnv *, jobject, jlong, jint, jstring);
+
+/*
+ * Class: fstAPI
+ * Method: fstWriterEmitValueChange
+ * Signature: (JID)V
+ */
+JNIEXPORT void JNICALL Java_fstAPI_fstWriterEmitValueChange__JID
+ (JNIEnv *, jobject, jlong, jint, jdouble);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderOpen
+ * Signature: (Ljava/lang/String;)J
+ */
+JNIEXPORT jlong JNICALL Java_fstAPI_fstReaderOpen
+ (JNIEnv *, jobject, jstring);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderOpenForUtilitiesOnly
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_fstAPI_fstReaderOpenForUtilitiesOnly
+ (JNIEnv *, jobject);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderClose
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_fstAPI_fstReaderClose
+ (JNIEnv *, jobject, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderIterateHierRewind
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_fstAPI_fstReaderIterateHierRewind
+ (JNIEnv *, jobject, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderResetScope
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_fstAPI_fstReaderResetScope
+ (JNIEnv *, jobject, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderGetCurrentScopeLen
+ * Signature: (J)I
+ */
+JNIEXPORT jint JNICALL Java_fstAPI_fstReaderGetCurrentScopeLen
+ (JNIEnv *, jobject, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderGetTimezero
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_fstAPI_fstReaderGetTimezero
+ (JNIEnv *, jobject, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderGetStartTime
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_fstAPI_fstReaderGetStartTime
+ (JNIEnv *, jobject, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderGetEndTime
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_fstAPI_fstReaderGetEndTime
+ (JNIEnv *, jobject, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderGetMemoryUsedByWriter
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_fstAPI_fstReaderGetMemoryUsedByWriter
+ (JNIEnv *, jobject, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderGetScopeCount
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_fstAPI_fstReaderGetScopeCount
+ (JNIEnv *, jobject, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderGetVarCount
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_fstAPI_fstReaderGetVarCount
+ (JNIEnv *, jobject, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderGetMaxHandle
+ * Signature: (J)I
+ */
+JNIEXPORT jint JNICALL Java_fstAPI_fstReaderGetMaxHandle
+ (JNIEnv *, jobject, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderGetAliasCount
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_fstAPI_fstReaderGetAliasCount
+ (JNIEnv *, jobject, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderGetValueChangeSectionCount
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_fstAPI_fstReaderGetValueChangeSectionCount
+ (JNIEnv *, jobject, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderGetFseekFailed
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_fstAPI_fstReaderGetFseekFailed
+ (JNIEnv *, jobject, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderSetUnlimitedTimeRange
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_fstAPI_fstReaderSetUnlimitedTimeRange
+ (JNIEnv *, jobject, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderSetLimitTimeRange
+ * Signature: (JJJ)V
+ */
+JNIEXPORT void JNICALL Java_fstAPI_fstReaderSetLimitTimeRange
+ (JNIEnv *, jobject, jlong, jlong, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderGetNumberDumpActivityChanges
+ * Signature: (J)I
+ */
+JNIEXPORT jint JNICALL Java_fstAPI_fstReaderGetNumberDumpActivityChanges
+ (JNIEnv *, jobject, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderGetDumpActivityChangeTime
+ * Signature: (JI)J
+ */
+JNIEXPORT jlong JNICALL Java_fstAPI_fstReaderGetDumpActivityChangeTime
+ (JNIEnv *, jobject, jlong, jint);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderGetFacProcessMask
+ * Signature: (JI)Z
+ */
+JNIEXPORT jboolean JNICALL Java_fstAPI_fstReaderGetFacProcessMask
+ (JNIEnv *, jobject, jlong, jint);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderSetFacProcessMask
+ * Signature: (JI)V
+ */
+JNIEXPORT void JNICALL Java_fstAPI_fstReaderSetFacProcessMask
+ (JNIEnv *, jobject, jlong, jint);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderClrFacProcessMask
+ * Signature: (JI)V
+ */
+JNIEXPORT void JNICALL Java_fstAPI_fstReaderClrFacProcessMask
+ (JNIEnv *, jobject, jlong, jint);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderSetFacProcessMaskAll
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_fstAPI_fstReaderSetFacProcessMaskAll
+ (JNIEnv *, jobject, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderClrFacProcessMaskAll
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_fstAPI_fstReaderClrFacProcessMaskAll
+ (JNIEnv *, jobject, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderGetVersionString
+ * Signature: (J)Ljava/lang/String;
+ */
+JNIEXPORT jstring JNICALL Java_fstAPI_fstReaderGetVersionString
+ (JNIEnv *, jobject, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderGetDateString
+ * Signature: (J)Ljava/lang/String;
+ */
+JNIEXPORT jstring JNICALL Java_fstAPI_fstReaderGetDateString
+ (JNIEnv *, jobject, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderPopScope
+ * Signature: (J)Ljava/lang/String;
+ */
+JNIEXPORT jstring JNICALL Java_fstAPI_fstReaderPopScope
+ (JNIEnv *, jobject, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderGetCurrentFlatScope
+ * Signature: (J)Ljava/lang/String;
+ */
+JNIEXPORT jstring JNICALL Java_fstAPI_fstReaderGetCurrentFlatScope
+ (JNIEnv *, jobject, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderGetCurrentScopeUserInfo
+ * Signature: (J)Ljava/lang/String;
+ */
+JNIEXPORT jstring JNICALL Java_fstAPI_fstReaderGetCurrentScopeUserInfo
+ (JNIEnv *, jobject, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderPushScope
+ * Signature: (JLjava/lang/String;J)Ljava/lang/String;
+ */
+JNIEXPORT jstring JNICALL Java_fstAPI_fstReaderPushScope
+ (JNIEnv *, jobject, jlong, jstring, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderGetTimescale
+ * Signature: (J)I
+ */
+JNIEXPORT jint JNICALL Java_fstAPI_fstReaderGetTimescale
+ (JNIEnv *, jobject, jlong);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderGetDumpActivityChangeValue
+ * Signature: (JI)Z
+ */
+JNIEXPORT jboolean JNICALL Java_fstAPI_fstReaderGetDumpActivityChangeValue
+ (JNIEnv *, jobject, jlong, jint);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderGetValueFromHandleAtTime
+ * Signature: (JJI)Ljava/lang/String;
+ */
+JNIEXPORT jstring JNICALL Java_fstAPI_fstReaderGetValueFromHandleAtTime
+ (JNIEnv *, jobject, jlong, jlong, jint);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderIterateHier
+ * Signature: (JLfstHier;)V
+ */
+JNIEXPORT void JNICALL Java_fstAPI_fstReaderIterateHier
+ (JNIEnv *, jobject, jlong, jobject);
+
+/*
+ * Class: fstAPI
+ * Method: fstReaderIterBlocks
+ * Signature: (JLjava/lang/Object;)I
+ */
+JNIEXPORT jint JNICALL Java_fstAPI_fstReaderIterBlocks
+ (JNIEnv *, jobject, jlong, jobject);
+
+/*
+ * Class: fstAPI
+ * Method: fstUtilityBinToEsc
+ * Signature: ([BI)Ljava/lang/String;
+ */
+JNIEXPORT jstring JNICALL Java_fstAPI_fstUtilityBinToEsc
+ (JNIEnv *, jclass, jbyteArray, jint);
+
+/*
+ * Class: fstAPI
+ * Method: fstUtilityEscToBin
+ * Signature: (Ljava/lang/String;)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_fstAPI_fstUtilityEscToBin
+ (JNIEnv *, jclass, jstring);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/contrib/fst_jni/fstAPI.java b/contrib/fst_jni/fstAPI.java
new file mode 100644
index 0000000..9127d65
--- /dev/null
+++ b/contrib/fst_jni/fstAPI.java
@@ -0,0 +1,121 @@
+/*
+ * 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.
+ */
+
+public class fstAPI
+{
+static
+{
+System.loadLibrary("fstAPI");
+}
+
+
+private static String bitStringInt(int i, int len)
+{
+len = Math.min(32, Math.max(len, 1));
+char[] cs = new char[len];
+for (int j = len - 1, b = 1; 0 <= j; --j, b <<= 1)
+ {
+ cs[j] = ((i & b) == 0) ? '0' : '1';
+ }
+return(new String(cs));
+}
+
+
+protected native long fstWriterCreate(String nam, boolean use_compressed_hier);
+protected native void fstWriterClose(long ctx);
+protected native boolean fstWriterGetFseekFailed(long ctx);
+protected native boolean fstWriterGetDumpSizeLimitReached(long ctx);
+protected native void fstWriterFlushContext(long ctx);
+protected native void fstWriterSetUpscope(long ctx);
+protected native void fstWriterSetAttrEnd(long ctx);
+protected native void fstWriterSetPackType(long ctx, int typ);
+protected native void fstWriterSetRepackOnClose(long ctx, boolean enable);
+protected native void fstWriterSetParallelMode(long ctx, boolean enable);
+protected native void fstWriterSetTimescale(long ctx, int ts);
+protected native void fstWriterSetTimezero(long ctx, long tim);
+protected native void fstWriterSetDumpSizeLimit(long ctx, long numbytes);
+protected native void fstWriterEmitDumpActive(long ctx, boolean enable);
+protected native void fstWriterEmitTimeChange(long ctx, long tim);
+protected native void fstWriterSetDate(long ctx, String dat);
+protected native void fstWriterSetVersion(long ctx, String vers);
+protected native void fstWriterSetComment(long ctx, String comm);
+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 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);
+protected native void fstWriterEmitValueChange(long ctx, int handle, String val);
+protected native void fstWriterEmitValueChange(long ctx, int handle, double val);
+protected void fstWriterEmitValueChange(long ctx, int handle, int val) { fstWriterEmitValueChange(ctx, handle, bitStringInt(val, 32)); }
+
+protected native long fstReaderOpen(String nam);
+protected native long fstReaderOpenForUtilitiesOnly();
+protected native void fstReaderClose(long ctx);
+protected native boolean fstReaderIterateHierRewind(long ctx);
+protected native void fstReaderResetScope(long ctx);
+protected native int fstReaderGetCurrentScopeLen(long ctx);
+protected native long fstReaderGetTimezero(long ctx);
+protected native long fstReaderGetStartTime(long ctx);
+protected native long fstReaderGetEndTime(long ctx);
+protected native long fstReaderGetMemoryUsedByWriter(long ctx);
+protected native long fstReaderGetScopeCount(long ctx);
+protected native long fstReaderGetVarCount(long ctx);
+protected native int fstReaderGetMaxHandle(long ctx);
+protected native long fstReaderGetAliasCount(long ctx);
+protected native long fstReaderGetValueChangeSectionCount(long ctx);
+protected native boolean fstReaderGetFseekFailed(long ctx);
+protected native void fstReaderSetUnlimitedTimeRange(long ctx);
+protected native void fstReaderSetLimitTimeRange(long ctx, long start_time, long end_time);
+protected native int fstReaderGetNumberDumpActivityChanges(long ctx);
+protected native long fstReaderGetDumpActivityChangeTime(long ctx, int idx);
+protected native boolean fstReaderGetFacProcessMask(long ctx, int facidx);
+protected native void fstReaderSetFacProcessMask(long ctx, int facidx);
+protected native void fstReaderClrFacProcessMask(long ctx, int facidx);
+protected native void fstReaderSetFacProcessMaskAll(long ctx);
+protected native void fstReaderClrFacProcessMaskAll(long ctx);
+protected native String fstReaderGetVersionString(long ctx);
+protected native String fstReaderGetDateString(long ctx);
+protected native String fstReaderPopScope(long ctx);
+protected native String fstReaderGetCurrentFlatScope(long ctx);
+protected native String fstReaderGetCurrentScopeUserInfo(long ctx);
+protected native String fstReaderPushScope(long ctx, String nam, long user_info);
+protected native int fstReaderGetTimescale(long ctx);
+protected native boolean fstReaderGetDumpActivityChangeValue(long ctx, int idx);
+protected native String fstReaderGetValueFromHandleAtTime(long ctx, long tim, int facidx);
+protected native void fstReaderIterateHier(long ctx, fstHier fh);
+protected native int fstReaderIterBlocks(long ctx, Object cbobj);
+
+public native static String fstUtilityBinToEsc(byte []s, int len);
+public native static byte[] fstUtilityEscToBin(String s);
+
+
+//
+// example do-nothing callback for fstReaderIterateHier()
+//
+public void fstReaderCallback(long tim, int facidx, String value)
+{
+}
+
+}
diff --git a/contrib/fst_jni/fstArrayType.java b/contrib/fst_jni/fstArrayType.java
new file mode 100644
index 0000000..c281e6b
--- /dev/null
+++ b/contrib/fst_jni/fstArrayType.java
@@ -0,0 +1,39 @@
+/*
+ * 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.
+ */
+
+public class fstArrayType
+{
+private fstArrayType() { }
+
+public static final String [] FST_AR_NAMESTRINGS =
+ { "none", "unpacked", "packed", "sparse" };
+
+public static final int FST_AR_MIN = 0;
+
+public static final int FST_AR_NONE = 0;
+public static final int FST_AR_UNPACKED = 1;
+public static final int FST_AR_PACKED =2;
+public static final int FST_AR_SPARSE = 3;
+
+public static final int FST_AR_MAX = 3;
+};
+
diff --git a/contrib/fst_jni/fstAttrType.java b/contrib/fst_jni/fstAttrType.java
new file mode 100644
index 0000000..07ecbe7
--- /dev/null
+++ b/contrib/fst_jni/fstAttrType.java
@@ -0,0 +1,39 @@
+/*
+ * 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.
+ */
+
+public class fstAttrType
+{
+private fstAttrType( ) { }
+
+public static final String [] FST_AT_NAMESTRINGS =
+ { "misc", "array", "enum", "class" };
+
+public static final int FST_AT_MIN = 0;
+
+public static final int FST_AT_MISC = 0;
+public static final int FST_AT_ARRAY = 1;
+public static final int FST_AT_ENUM = 2;
+public static final int FST_AT_PACK = 3;
+
+public static final int FST_AT_MAX = 3;
+};
+
diff --git a/contrib/fst_jni/fstEnumValueType.java b/contrib/fst_jni/fstEnumValueType.java
new file mode 100644
index 0000000..8dfca84
--- /dev/null
+++ b/contrib/fst_jni/fstEnumValueType.java
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+
+public class fstEnumValueType
+{
+private fstEnumValueType() { }
+
+public static final String [] FST_VT_NAMESTRINGS =
+ { "integer", "bit", "logic", "int", "shortint",
+ "longint", "byte", "unsigned_integer", "unsigned_bit", "unsigned_logic",
+ "unsigned_int", "unsigned_shortint", "unsigned_longint", "unsigned_byte" };
+
+public static final int FST_EV_MIN = 0;
+
+public static final int FST_EV_SV_INTEGER = 0;
+public static final int FST_EV_SV_BIT = 1;
+public static final int FST_EV_SV_LOGIC = 2;
+public static final int FST_EV_SV_INT = 3;
+public static final int FST_EV_SV_SHORTINT = 4;
+public static final int FST_EV_SV_LONGINT = 5;
+public static final int FST_EV_SV_BYTE = 6;
+public static final int FST_EV_SV_UNSIGNED_INTEGER = 7;
+public static final int FST_EV_SV_UNSIGNED_BIT = 8;
+public static final int FST_EV_SV_UNSIGNED_LOGIC = 9;
+public static final int FST_EV_SV_UNSIGNED_INT = 10;
+public static final int FST_EV_SV_UNSIGNED_SHORTINT = 11;
+public static final int FST_EV_SV_UNSIGNED_LONGINT = 12;
+public static final int FST_EV_SV_UNSIGNED_BYTE = 13;
+
+public static final int FST_EV_MAX = 13;
+};
+
diff --git a/contrib/fst_jni/fstHier.java b/contrib/fst_jni/fstHier.java
new file mode 100644
index 0000000..59191a7
--- /dev/null
+++ b/contrib/fst_jni/fstHier.java
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+
+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 fstHier()
+ {
+ valid = false;
+ htyp = 0;
+ typ = 0;
+ subtype = 0;
+ name1 = "";
+ name2 = "";
+ direction = 0;
+ handle = 0;
+ length = 0;
+ is_alias = false;
+ arg = 0;
+ };
+};
diff --git a/contrib/fst_jni/fstHierType.java b/contrib/fst_jni/fstHierType.java
new file mode 100644
index 0000000..c3e67a4
--- /dev/null
+++ b/contrib/fst_jni/fstHierType.java
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+
+public class fstHierType
+{
+private fstHierType( ) { }
+
+public static final int FST_HT_SCOPE = 0;
+public static final int FST_HT_UPSCOPE = 1;
+public static final int FST_HT_VAR = 2;
+public static final int FST_HT_ATTRBEGIN = 3;
+public static final int FST_HT_ATTREND = 4;
+
+public static final int FST_HT_MAX = 4;
+};
+
diff --git a/contrib/fst_jni/fstMiscType.java b/contrib/fst_jni/fstMiscType.java
new file mode 100644
index 0000000..cee895b
--- /dev/null
+++ b/contrib/fst_jni/fstMiscType.java
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+
+public class fstMiscType
+{
+fstMiscType( ) { }
+
+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_MAX = 3;
+};
+
diff --git a/contrib/fst_jni/fstPackType.java b/contrib/fst_jni/fstPackType.java
new file mode 100644
index 0000000..b5f66fa
--- /dev/null
+++ b/contrib/fst_jni/fstPackType.java
@@ -0,0 +1,39 @@
+/*
+ * 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.
+ */
+
+public class fstPackType
+{
+private fstPackType( ) { }
+
+public static final String [] FST_PT_NAMESTRINGS =
+ { "none", "unpacked", "packed", "sparse" };
+
+public static final int FST_PT_MIN = 0;
+
+public static final int FST_PT_NONE = 0;
+public static final int FST_PT_UNPACKED = 1;
+public static final int FST_PT_PACKED = 2;
+public static final int FST_PT_TAGGED_PACKED = 3;
+
+public static final int FST_PT_MAX = 3;
+};
+
diff --git a/contrib/fst_jni/fstReader.java b/contrib/fst_jni/fstReader.java
new file mode 100644
index 0000000..2cc18d2
--- /dev/null
+++ b/contrib/fst_jni/fstReader.java
@@ -0,0 +1,155 @@
+/*
+ * 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.
+ */
+
+public class fstReader extends fstAPI
+{
+private long ctx;
+
+fstReader(String nam)
+{
+ctx = fstReaderOpen(nam);
+}
+
+protected void finalize() throws Throwable
+{
+try {
+ fstReaderClose(ctx);
+ } finally
+ {
+ super.finalize();
+ }
+}
+
+
+public void fstReaderClose() { fstReaderClose(ctx); ctx = 0; }
+public void fstReaderClrFacProcessMaskAll() { fstReaderClrFacProcessMaskAll(ctx); }
+public void fstReaderClrFacProcessMask(int facidx) { fstReaderClrFacProcessMask(ctx, facidx); }
+public long fstReaderGetAliasCount() { return(fstReaderGetAliasCount(ctx)); }
+public String fstReaderGetCurrentFlatScope() { return(fstReaderGetCurrentFlatScope(ctx)); }
+public int fstReaderGetCurrentScopeLen() { return(fstReaderGetCurrentScopeLen(ctx)); }
+public String fstReaderGetCurrentScopeUserInfo() { return(fstReaderGetCurrentScopeUserInfo(ctx)); }
+public String fstReaderGetDateString() { return(fstReaderGetDateString(ctx)); }
+public long fstReaderGetDumpActivityChangeTime(int idx) { return(fstReaderGetDumpActivityChangeTime(ctx, idx)); }
+public boolean fstReaderGetDumpActivityChangeValue(int idx) { return(fstReaderGetDumpActivityChangeValue(ctx, idx)); }
+public long fstReaderGetEndTime() { return(fstReaderGetEndTime(ctx)); }
+public boolean fstReaderGetFacProcessMask(int facidx) { return(fstReaderGetFacProcessMask(ctx, facidx)); }
+public boolean fstReaderGetFseekFailed() { return(fstReaderGetFseekFailed(ctx)); }
+public int fstReaderGetMaxHandle() { return(fstReaderGetMaxHandle(ctx)); }
+public long fstReaderGetMemoryUsedByWriter() { return(fstReaderGetMemoryUsedByWriter(ctx)); }
+public int fstReaderGetNumberDumpActivityChanges() { return(fstReaderGetNumberDumpActivityChanges(ctx)); }
+public long fstReaderGetScopeCount() { return(fstReaderGetScopeCount(ctx)); }
+public long fstReaderGetStartTime() { return(fstReaderGetStartTime(ctx)); }
+public int fstReaderGetTimescale() { return(fstReaderGetTimescale(ctx)); }
+public long fstReaderGetTimezero() { return(fstReaderGetTimezero(ctx)); }
+public long fstReaderGetValueChangeSectionCount() { return(fstReaderGetValueChangeSectionCount(ctx)); }
+public String fstReaderGetValueFromHandleAtTime(long tim, int facidx) { return(fstReaderGetValueFromHandleAtTime(ctx, tim, facidx)); }
+public long fstReaderGetVarCount() { return(fstReaderGetVarCount(ctx)); }
+public String fstReaderGetVersionString() { return(fstReaderGetVersionString(ctx)); }
+public void fstReaderIterateHier(fstHier fh) { fstReaderIterateHier(ctx, fh); }
+public boolean fstReaderIterateHierRewind() { return(fstReaderIterateHierRewind(ctx)); }
+public int fstReaderIterBlocks(Object cbobj) { return(fstReaderIterBlocks(ctx, cbobj)); }
+public String fstReaderPopScope() { return(fstReaderPopScope(ctx)); }
+public String fstReaderPushScope(String nam, long user_info) { return(fstReaderPushScope(ctx, nam, user_info)); }
+public void fstReaderResetScope() { fstReaderResetScope(ctx); }
+public void fstReaderSetFacProcessMaskAll() { fstReaderSetFacProcessMaskAll(ctx); }
+public void fstReaderSetFacProcessMask(int facidx) { fstReaderSetFacProcessMask(ctx, facidx); }
+public void fstReaderSetLimitTimeRange(long start_time, long end_time) { fstReaderSetLimitTimeRange(ctx, start_time, end_time); }
+public void fstReaderSetUnlimitedTimeRange() { fstReaderSetUnlimitedTimeRange(ctx); }
+
+
+public String fstReaderVcdID(int value)
+{
+char []s = new char[5]; // 94 ** 5
+int vmod;
+int i;
+
+// zero is illegal for a value...it is assumed they start at one
+for(i=0;;i++)
+ {
+ vmod = (value % 94);
+ if(vmod != 0)
+ {
+ s[i] = (char) (vmod+32);
+ }
+ else
+ {
+ s[i] = '~';
+ value -= 94;
+ }
+ value = value / 94;
+ if(value == 0) { break; }
+ }
+
+return(new String(s, 0, i+1));
+}
+
+
+public String fstReaderGetTimescaleString()
+{
+int ts = fstReaderGetTimescale();
+int time_scale = 1;
+char time_dimension;
+String s;
+
+switch(ts)
+ {
+ case 2: time_scale = 100; time_dimension = ' '; break;
+ case 1: time_scale = 10;
+ case 0: time_dimension = ' '; break;
+
+ case -1: time_scale = 100; time_dimension = 'm'; break;
+ case -2: time_scale = 10;
+ case -3: time_dimension = 'm'; break;
+
+ case -4: time_scale = 100; time_dimension = 'u'; break;
+ case -5: time_scale = 10;
+ case -6: time_dimension = 'u'; break;
+
+ case -10: time_scale = 100; time_dimension = 'p'; break;
+ case -11: time_scale = 10;
+ case -12: time_dimension = 'p'; break;
+
+ case -13: time_scale = 100; time_dimension = 'f'; break;
+ case -14: time_scale = 10;
+ case -15: time_dimension = 'f'; break;
+
+ case -16: time_scale = 100; time_dimension = 'a'; break;
+ case -17: time_scale = 10;
+ case -18: time_dimension = 'a'; break;
+
+ case -19: time_scale = 100; time_dimension = 'z'; break;
+ case -20: time_scale = 10;
+ case -21: time_dimension = 'z'; break;
+
+ case -7: time_scale = 100; time_dimension = 'n'; break;
+ case -8: time_scale = 10;
+ case -9:
+ default: time_dimension = 'n'; break;
+ }
+
+s = "" + time_scale;
+s = s + time_dimension;
+
+return(s);
+}
+
+}
diff --git a/contrib/fst_jni/fstScopeType.java b/contrib/fst_jni/fstScopeType.java
new file mode 100644
index 0000000..38cd781
--- /dev/null
+++ b/contrib/fst_jni/fstScopeType.java
@@ -0,0 +1,69 @@
+/*
+ * 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.
+ */
+
+public class fstScopeType
+{
+private fstScopeType() { }
+
+public static final String [] FST_ST_NAMESTRINGS =
+ { "module", "task", "function", "begin", "fork",
+ "generate", "struct", "union", "class", "interface",
+ "package", "program",
+
+ "vhdl_architecture", "vhdl_procedure", "vhdl_function", "vhdl_record", "vhdl_process",
+ "vhdl_block", "vhdl_for_generate", "vhdl_if_generate", "vhdl_generate"
+ };
+
+public static final int FST_ST_MIN = 0;
+
+public static final int FST_ST_VCD_MODULE = 0;
+public static final int FST_ST_VCD_TASK = 1;
+public static final int FST_ST_VCD_FUNCTION = 2;
+public static final int FST_ST_VCD_BEGIN = 3;
+public static final int FST_ST_VCD_FORK = 4;
+public static final int FST_ST_VCD_GENERATE = 5;
+public static final int FST_ST_VCD_STRUCT = 6;
+public static final int FST_ST_VCD_UNION = 7;
+public static final int FST_ST_VCD_CLASS = 8;
+public static final int FST_ST_VCD_INTERFACE = 9;
+public static final int FST_ST_VCD_PACKAGE = 10;
+public static final int FST_ST_VCD_PROGRAM = 11;
+
+public static final int FST_ST_VHDL_ARCHITECTURE = 12;
+public static final int FST_ST_VHDL_PROCEDURE = 13;
+public static final int FST_ST_VHDL_FUNCTION = 14;
+public static final int FST_ST_VHDL_RECORD = 15;
+public static final int FST_ST_VHDL_PROCESS = 16;
+public static final int FST_ST_VHDL_BLOCK = 17;
+public static final int FST_ST_VHDL_FOR_GENERATE = 18;
+public static final int FST_ST_VHDL_IF_GENERATE = 19;
+public static final int FST_ST_VHDL_GENERATE = 20;
+
+public static final int FST_ST_MAX = 20;
+
+public static final int FST_ST_GEN_ATTRBEGIN = 252;
+public static final int FST_ST_GEN_ATTREND = 253;
+
+public static final int FST_ST_VCD_SCOPE = 254;
+public static final int FST_ST_VCD_UPSCOPE = 255;
+};
+
diff --git a/contrib/fst_jni/fstSupplimentalDataType.java b/contrib/fst_jni/fstSupplimentalDataType.java
new file mode 100644
index 0000000..9b9499c
--- /dev/null
+++ b/contrib/fst_jni/fstSupplimentalDataType.java
@@ -0,0 +1,52 @@
+/*
+ * 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.
+ */
+
+public class fstSupplimentalDataType
+{
+fstSupplimentalDataType( ) { }
+
+public static final int FST_SDT_MIN = 0;
+
+public static final int FST_SDT_NONE = 0;
+
+public static final int FST_SDT_VHDL_BOOLEAN = 1;
+public static final int FST_SDT_VHDL_BIT = 2;
+public static final int FST_SDT_VHDL_BIT_VECTOR = 3;
+public static final int FST_SDT_VHDL_STD_ULOGIC = 4;
+public static final int FST_SDT_VHDL_STD_ULOGIC_VECTOR = 5;
+public static final int FST_SDT_VHDL_STD_LOGIC = 6;
+public static final int FST_SDT_VHDL_STD_LOGIC_VECTOR = 7;
+public static final int FST_SDT_VHDL_UNSIGNED = 8;
+public static final int FST_SDT_VHDL_SIGNED = 9;
+public static final int FST_SDT_VHDL_INTEGER = 10;
+public static final int FST_SDT_VHDL_REAL = 11;
+public static final int FST_SDT_VHDL_NATURAL = 12;
+public static final int FST_SDT_VHDL_POSITIVE = 13;
+public static final int FST_SDT_VHDL_TIME = 14;
+public static final int FST_SDT_VHDL_CHARACTER = 15;
+public static final int FST_SDT_VHDL_STRING = 16;
+
+public static final int FST_SDT_MAX = 16;
+
+public static final int FST_SDT_SVT_SHIFT_COUNT = 10; /* FST_SVT_* is ORed in to the left after shifting FST_SDT_SVT_SHIFT_COUNT */
+public static final int FST_SDT_ABS_MAX = (1<<(FST_SDT_SVT_SHIFT_COUNT));
+};
diff --git a/contrib/fst_jni/fstSupplimentalVarType.java b/contrib/fst_jni/fstSupplimentalVarType.java
new file mode 100644
index 0000000..e515def
--- /dev/null
+++ b/contrib/fst_jni/fstSupplimentalVarType.java
@@ -0,0 +1,39 @@
+/*
+ * 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.
+ */
+
+public class fstSupplimentalVarType
+{
+fstSupplimentalVarType( ) { }
+
+public static final int FST_SVT_MIN = 0;
+
+public static final int FST_SVT_NONE = 0;
+
+public static final int FST_SVT_VHDL_SIGNAL = 1;
+public static final int FST_SVT_VHDL_VARIABLE = 2;
+public static final int FST_SVT_VHDL_CONSTANT = 3;
+public static final int FST_SVT_VHDL_FILE = 4;
+public static final int FST_SVT_VHDL_MEMORY = 5;
+
+public static final int FST_SVT_MAX = 5;
+};
+
diff --git a/contrib/fst_jni/fstVarDir.java b/contrib/fst_jni/fstVarDir.java
new file mode 100644
index 0000000..bc0071f
--- /dev/null
+++ b/contrib/fst_jni/fstVarDir.java
@@ -0,0 +1,41 @@
+/*
+ * 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.
+ */
+
+public class fstVarDir
+{
+private fstVarDir() { }
+
+public static final String [] FST_VD_NAMESTRINGS =
+ { "implicit", "input", "output", "inout", "buffer", "linkage" };
+
+public static final int FST_VD_MIN = 0;
+
+public static final int FST_VD_IMPLICIT = 0;
+public static final int FST_VD_INPUT = 1;
+public static final int FST_VD_OUTPUT = 2;
+public static final int FST_VD_INOUT = 3;
+public static final int FST_VD_BUFFER = 4;
+public static final int FST_VD_LINKAGE = 5;
+
+public static final int FST_VD_MAX = 5;
+};
+
diff --git a/contrib/fst_jni/fstVarType.java b/contrib/fst_jni/fstVarType.java
new file mode 100644
index 0000000..7339520
--- /dev/null
+++ b/contrib/fst_jni/fstVarType.java
@@ -0,0 +1,71 @@
+/*
+ * 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.
+ */
+
+public class fstVarType
+{
+private fstVarType() { }
+
+public static final String [] FST_VT_NAMESTRINGS =
+ { "event", "integer", "parameter", "real", "real_parameter",
+ "reg", "supply0", "supply1", "time", "tri",
+ "triand", "trior", "trireg", "tri0", "tri1",
+ "wand", "wire", "wor", "port", "sparray",
+ "realtime", "string", "bit", "logic", "int",
+ "shortint", "longint", "byte", "enum", "shortreal" };
+
+public static final int FST_VT_VCD_MIN = 0;
+public static final int FST_VT_VCD_EVENT = 0;
+public static final int FST_VT_VCD_INTEGER = 1;
+public static final int FST_VT_VCD_PARAMETER = 2;
+public static final int FST_VT_VCD_REAL = 3;
+public static final int FST_VT_VCD_REAL_PARAMETER = 4;
+public static final int FST_VT_VCD_REG = 5;
+public static final int FST_VT_VCD_SUPPLY0 = 6;
+public static final int FST_VT_VCD_SUPPLY1 = 7;
+public static final int FST_VT_VCD_TIME = 8;
+public static final int FST_VT_VCD_TRI = 9;
+public static final int FST_VT_VCD_TRIAND = 10;
+public static final int FST_VT_VCD_TRIOR = 11;
+public static final int FST_VT_VCD_TRIREG = 12;
+public static final int FST_VT_VCD_TRI0 = 13;
+public static final int FST_VT_VCD_TRI1 = 14;
+public static final int FST_VT_VCD_WAND = 15;
+public static final int FST_VT_VCD_WIRE = 16;
+public static final int FST_VT_VCD_WOR = 17;
+public static final int FST_VT_VCD_PORT = 18;
+public static final int FST_VT_VCD_SPARRAY = 19;
+public static final int FST_VT_VCD_REALTIME = 20;
+
+public static final int FST_VT_GEN_STRING = 21;
+
+public static final int FST_VT_SV_BIT = 22;
+public static final int FST_VT_SV_LOGIC = 23;
+public static final int FST_VT_SV_INT = 24;
+public static final int FST_VT_SV_SHORTINT = 25;
+public static final int FST_VT_SV_LONGINT = 26;
+public static final int FST_VT_SV_BYTE = 27;
+public static final int FST_VT_SV_ENUM = 28;
+public static final int FST_VT_SV_SHORTREAL = 29;
+
+public static final int FST_VT_VCD_MAX = 29;
+};
+
diff --git a/contrib/fst_jni/fstWriter.java b/contrib/fst_jni/fstWriter.java
new file mode 100644
index 0000000..43977ee
--- /dev/null
+++ b/contrib/fst_jni/fstWriter.java
@@ -0,0 +1,69 @@
+/*
+ * 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.
+ */
+
+public class fstWriter extends fstAPI
+{
+private long ctx;
+
+fstWriter(String nam, boolean use_compressed_hier)
+{
+ctx = fstWriterCreate(nam, use_compressed_hier);
+}
+
+protected void finalize() throws Throwable
+{
+try {
+ fstWriterClose(ctx);
+ } finally
+ {
+ super.finalize();
+ }
+}
+
+
+public void fstWriterClose() { fstWriterClose(ctx); ctx = 0; }
+public int fstWriterCreateVar(int vt, int vd, int len, String nam, int aliasHandle) { return(fstWriterCreateVar(ctx, vt, vd, len, nam, aliasHandle)); }
+public void fstWriterEmitDumpActive(boolean enable) { fstWriterEmitDumpActive(ctx, enable); }
+public void fstWriterEmitTimeChange(long tim) { fstWriterEmitTimeChange(ctx, tim); }
+public void fstWriterEmitValueChange(int handle, double val) { fstWriterEmitValueChange(ctx, handle, val); }
+public void fstWriterEmitValueChange(int handle, int val) { fstWriterEmitValueChange(ctx, handle, val); }
+public void fstWriterEmitValueChange(int handle, String val) { fstWriterEmitValueChange(ctx, handle, val); }
+public void fstWriterEmitVariableLengthValueChange(int handle, String val, int len) { fstWriterEmitVariableLengthValueChange(ctx, handle, val, len); }
+public void fstWriterFlushContext() { fstWriterFlushContext(ctx); }
+public boolean fstWriterGetDumpSizeLimitReached() { return(fstWriterGetDumpSizeLimitReached(ctx)); }
+public boolean fstWriterGetFseekFailed() { return(fstWriterGetFseekFailed(ctx)); }
+public void fstWriterSetAttrBegin(int attrtype, int subtype, String attrname, long arg) { fstWriterSetAttrBegin(ctx, attrtype, subtype, attrname, arg); }
+public void fstWriterSetAttrEnd() { fstWriterSetAttrEnd(ctx); }
+public void fstWriterSetComment(String comm) { fstWriterSetComment(ctx, comm); }
+public void fstWriterSetDate(String dat) { fstWriterSetDate(ctx, dat); }
+public void fstWriterSetDumpSizeLimit(long numbytes) { fstWriterSetDumpSizeLimit(ctx, numbytes); }
+public void fstWriterSetEnvVar(String envvar) { fstWriterSetEnvVar(ctx, envvar); }
+public void fstWriterSetPackType(int typ) { fstWriterSetPackType(ctx, typ); }
+public void fstWriterSetParallelMode(boolean enable) { fstWriterSetParallelMode(ctx, enable); }
+public void fstWriterSetRepackOnClose(boolean enable) { fstWriterSetRepackOnClose(ctx, enable); }
+public void fstWriterSetScope(int scopetype, String scopename, String scopecomp) { fstWriterSetScope(ctx, scopetype, scopename, scopecomp); }
+public void fstWriterSetTimescaleFromString(String s) { fstWriterSetTimescaleFromString(ctx, s); }
+public void fstWriterSetTimescale(int ts) { fstWriterSetTimescale(ctx, ts); }
+public void fstWriterSetTimezero(long tim) { fstWriterSetTimezero(ctx, tim); }
+public void fstWriterSetUpscope() { fstWriterSetUpscope(ctx); }
+public void fstWriterSetVersion(String vers) { fstWriterSetVersion(ctx, vers); }
+}
diff --git a/contrib/fst_jni/zzz_test.csh b/contrib/fst_jni/zzz_test.csh
new file mode 100755
index 0000000..89f4406
--- /dev/null
+++ b/contrib/fst_jni/zzz_test.csh
@@ -0,0 +1,32 @@
+#!/bin/csh
+
+setenv LD_LIBRARY_PATH `pwd`
+javac \
+ fstAPI.java \
+ fstArrayType.java \
+ fstAttrType.java \
+ fstEnumValueType.java \
+ fstHier.java \
+ fstHierType.java \
+ fstMiscType.java \
+ fstPackType.java \
+ fstScopeType.java \
+ fstSupplimentalDataType.java \
+ fstSupplimentalVarType.java \
+ fstVarDir.java \
+ fstVarType.java \
+ fstWriter.java \
+ fstReader.java
+
+javac \
+ fst2Vcd.java \
+ Main.java
+
+javah -jni fstAPI
+gcc -o libfstAPI.so -fPIC -shared -Wl,-soname,fstAPI.so fstAPI.c ../../src/helpers/fst/fstapi.c ../../src/helpers/fst/fastlz.c \
+ -I./ -I../../ -I../../src/helpers/fst/ -lz
+java Main /tmp/des.fst
+
+rm *.class
+rm libfstAPI.so
+
diff --git a/doc/gtkwave.odt b/doc/gtkwave.odt
index 0a6c823..dba34f5 100644
Binary files a/doc/gtkwave.odt and b/doc/gtkwave.odt differ
diff --git a/src/analyzer.h b/src/analyzer.h
index d839077..325f5e4 100644
--- a/src/analyzer.h
+++ b/src/analyzer.h
@@ -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
@@ -187,8 +187,10 @@ struct Node
unsigned int array_height, this_row;
#endif
- unsigned vardir : 2; /* see nodeVarDir, this is an internal value (currently used only by extload and FST) */
- unsigned vartype : 5; /* see nodeVarType, this is an internal value */
+ unsigned vardt : 6; /* see nodeVarDataType, this is an internal value */
+
+ unsigned vardir : 3; /* see nodeVarDir, this is an internal value (currently used only by extload and FST) */
+ unsigned vartype : 6; /* see nodeVarType, this is an internal value */
unsigned extvals : 1; /* was formerly a pointer to ExtNode "ext", now simply a flag */
};
@@ -231,6 +233,11 @@ static const char *vartype_strings[] = { \
"byte", \
"enum", \
"s_real", \
+ "signal", \
+ "var", \
+ "const", \
+ "file", \
+ "memory", \
"net", \
"alias", \
"missing" \
@@ -272,13 +279,65 @@ enum nodeVarType {
ND_SV_BYTE = 28,
ND_SV_ENUM = 29,
ND_SV_SHORTREAL = 30,
-
- ND_GEN_NET = 31, /* used for AE2 */
- ND_GEN_ALIAS = 32,
- ND_GEN_MISSING = 33,
+ ND_VHDL_SIGNAL = 31,
+ ND_VHDL_VARIABLE = 32,
+ ND_VHDL_CONSTANT = 33,
+ ND_VHDL_FILE = 34,
+ ND_VHDL_MEMORY = 35,
+
+ ND_GEN_NET = 36, /* used for AE2 */
+ ND_GEN_ALIAS = 37,
+ ND_GEN_MISSING = 38,
+
+ ND_VARTYPE_MAX = 38
+ /* if this exceeds 63, need to update struct Node's "unsigned vartype : 6" declaration */
+};
+
- ND_VARTYPE_MAX = 33
+static const char *vardatatype_strings[] = { \
+ "", \
+ "boolean", \
+ "bit", \
+ "bit_vec", \
+ "ulogic", \
+ "ulogic_v", \
+ "logic", \
+ "logic_v", \
+ "unsigned", \
+ "signed", \
+ "integer", \
+ "real", \
+ "natural", \
+ "positive", \
+ "time", \
+ "char", \
+ "string" \
+};
+
+
+enum nodeVarDataType {
+ ND_VDT_NONE = 0,
+
+ ND_VDT_VHDL_BOOLEAN = 1,
+ ND_VDT_VHDL_BIT = 2,
+ ND_VDT_VHDL_BIT_VECTOR = 3,
+ ND_VDT_VHDL_STD_ULOGIC = 4,
+ ND_VDT_VHDL_STD_ULOGIC_VECTOR = 5,
+ ND_VDT_VHDL_STD_LOGIC = 6,
+ ND_VDT_VHDL_STD_LOGIC_VECTOR = 7,
+ ND_VDT_VHDL_UNSIGNED = 8,
+ ND_VDT_VHDL_SIGNED = 9,
+ ND_VDT_VHDL_INTEGER = 10,
+ ND_VDT_VHDL_REAL = 11,
+ ND_VDT_VHDL_NATURAL = 12,
+ ND_VDT_VHDL_POSITIVE = 13,
+ ND_VDT_VHDL_TIME = 14,
+ ND_VDT_VHDL_CHARACTER = 15,
+ ND_VDT_VHDL_STRING = 16,
+
+ ND_VDT_MAX = 16
+ /* if this exceeds 63, need to update struct Node's "unsigned vardt : 6" declaration */
};
@@ -287,7 +346,9 @@ static const char *vardir_strings[] = { \
"", \
"I", \
"O", \
- "IO" \
+ "IO", \
+ "B", \
+ "L" \
};
@@ -296,8 +357,12 @@ enum nodeVarDir {
ND_DIR_IN = 1,
ND_DIR_OUT = 2,
ND_DIR_INOUT = 3,
+ ND_DIR_BUFFER = 4,
+ ND_DIR_LINKAGE = 5,
- ND_DIR_MAX = 3
+ ND_DIR_MAX = 5,
+ ND_DIR_UNSPECIFIED = 6
+ /* if ND_DIR_MAX exceeds 7, need to update struct Node's "unsigned vardir : 3" declaration */
};
typedef struct BitAttributes
diff --git a/src/extload.c b/src/extload.c
index f6b9a5b..689c89d 100644
--- a/src/extload.c
+++ b/src/extload.c
@@ -460,6 +460,21 @@ for(;;)
default: ttype = TREE_UNKNOWN; break;
}
}
+ else
+ if(!strncmp(vht, "vhdl_", 5))
+ {
+ switch(vht[5])
+ {
+ case 'a': ttype = TREE_VHDL_ST_ARCHITECTURE; break;
+ case 'r': ttype = TREE_VHDL_ST_RECORD; break;
+ case 'b': ttype = TREE_VHDL_ST_BLOCK; break;
+ case 'g': ttype = TREE_VHDL_ST_GENERATE; break;
+ case 'i': ttype = TREE_VHDL_ST_GENIF; break;
+ case 'f': ttype = (vht[6] == 'u') ? TREE_VHDL_ST_FUNCTION : TREE_VHDL_ST_GENFOR; break;
+ case 'p': ttype = (!strncmp(vht+6, "roces", 5)) ? TREE_VHDL_ST_PROCESS: TREE_VHDL_ST_PROCEDURE; break;
+ default: ttype = TREE_UNKNOWN; break;
+ }
+ }
else
{
ttype = TREE_UNKNOWN;
diff --git a/src/fsdb_wrapper_api.cc b/src/fsdb_wrapper_api.cc
index 58fa732..ea0e0b6 100644
--- a/src/fsdb_wrapper_api.cc
+++ b/src/fsdb_wrapper_api.cc
@@ -39,6 +39,8 @@ static bool_T __MyTreeCB(fsdbTreeCBType cb_type, void *client_data, void *tree_c
extern "C" void *fsdbReaderOpenFile(char *nam)
{
+fsdbFileType ft;
+
if(!ffrObject::ffrIsFSDB(nam))
{
return(NULL);
@@ -46,7 +48,7 @@ if(!ffrObject::ffrIsFSDB(nam))
ffrFSDBInfo fsdb_info;
ffrObject::ffrGetFSDBInfo(nam, fsdb_info);
-if(fsdb_info.file_type != FSDB_FT_VERILOG)
+if((fsdb_info.file_type != FSDB_FT_VERILOG) && (fsdb_info.file_type != FSDB_FT_VERILOG_VHDL) && (fsdb_info.file_type != FSDB_FT_VHDL))
{
return(NULL);
}
@@ -59,7 +61,8 @@ if(!fsdb_obj)
fsdb_obj->ffrSetTreeCBFunc(__TreeCB, NULL);
-if(fsdb_obj->ffrGetFileType() != FSDB_FT_VERILOG)
+ft = fsdb_obj->ffrGetFileType();
+if((ft != FSDB_FT_VERILOG) && (ft != FSDB_FT_VERILOG_VHDL) && (ft != FSDB_FT_VHDL))
{
fsdb_obj->ffrClose();
return(NULL);
@@ -414,6 +417,42 @@ switch (scope->type)
type = (str_T) "sv_interface";
break;
+ case FSDB_ST_VHDL_ARCHITECTURE:
+ type = (str_T) "vhdl_architecture";
+ break;
+
+ case FSDB_ST_VHDL_PROCEDURE:
+ type = (str_T) "vhdl_procedure";
+ break;
+
+ case FSDB_ST_VHDL_FUNCTION:
+ type = (str_T) "vhdl_function";
+ break;
+
+ case FSDB_ST_VHDL_RECORD:
+ type = (str_T) "vhdl_record";
+ break;
+
+ case FSDB_ST_VHDL_PROCESS:
+ type = (str_T) "vhdl_process";
+ break;
+
+ case FSDB_ST_VHDL_BLOCK:
+ type = (str_T) "vhdl_block";
+ break;
+
+ case FSDB_ST_VHDL_FOR_GENERATE:
+ type = (str_T) "vhdl_for_generate";
+ break;
+
+ case FSDB_ST_VHDL_IF_GENERATE:
+ type = (str_T) "vhdl_if_generate";
+ break;
+
+ case FSDB_ST_VHDL_GENERATE:
+ type = (str_T) "vhdl_generate";
+ break;
+
default:
type = (str_T) "unknown_scope_type";
break;
@@ -577,6 +616,36 @@ switch (var->type)
case FSDB_VT_VHDL_MEMORY:
case FSDB_VT_VCD_MEMORY_DEPTH:
case FSDB_VT_VHDL_MEMORY_DEPTH:
+ switch(var->vc_dt)
+ {
+ case FSDB_VC_DT_FLOAT:
+ case FSDB_VC_DT_DOUBLE:
+ type = (str_T) "vcd_real";
+ typelen = 8;
+ break;
+
+ case FSDB_VC_DT_UNKNOWN:
+ case FSDB_VC_DT_BYTE:
+ case FSDB_VC_DT_SHORT:
+ case FSDB_VC_DT_INT:
+ case FSDB_VC_DT_LONG:
+ case FSDB_VC_DT_HL_INT:
+ case FSDB_VC_DT_PHYSICAL:
+ default:
+ if(var->type == FSDB_VT_VHDL_SIGNAL)
+ {
+ type = (str_T) "vcd_wire";
+ typelen = 8;
+ }
+ else
+ {
+ type = (str_T) "vcd_reg";
+ typelen = 7;
+ }
+ break;
+ }
+ break;
+
default:
type = (str_T) "vcd_wire";
typelen = 8;
diff --git a/src/fst.c b/src/fst.c
index a27db9f..9caea39 100644
--- a/src/fst.c
+++ b/src/fst.c
@@ -152,6 +152,8 @@ char *pnt, *pntd, *lb_last = NULL, *col_last = NULL; /* *rb_last = NULL; */ /* s
int acc;
char *s;
unsigned char ttype;
+int sdt = FST_SDT_NONE;
+int svt = FST_SVT_NONE;
while((h = fstReaderIterateHier(xc)))
{
@@ -175,6 +177,17 @@ while((h = fstReaderIterateHier(xc)))
case FST_ST_VCD_INTERFACE: ttype = TREE_VCD_ST_INTERFACE; break;
case FST_ST_VCD_PACKAGE: ttype = TREE_VCD_ST_PACKAGE; break;
case FST_ST_VCD_PROGRAM: ttype = TREE_VCD_ST_PROGRAM; break;
+
+ case FST_ST_VHDL_ARCHITECTURE: ttype = TREE_VHDL_ST_ARCHITECTURE; break;
+ case FST_ST_VHDL_PROCEDURE: ttype = TREE_VHDL_ST_PROCEDURE; break;
+ case FST_ST_VHDL_FUNCTION: ttype = TREE_VHDL_ST_FUNCTION; break;
+ case FST_ST_VHDL_RECORD: ttype = TREE_VHDL_ST_RECORD; break;
+ case FST_ST_VHDL_PROCESS: ttype = TREE_VHDL_ST_PROCESS; break;
+ case FST_ST_VHDL_BLOCK: ttype = TREE_VHDL_ST_BLOCK; break;
+ case FST_ST_VHDL_FOR_GENERATE: ttype = TREE_VHDL_ST_GENFOR; break;
+ case FST_ST_VHDL_IF_GENERATE: ttype = TREE_VHDL_ST_GENIF; break;
+ case FST_ST_VHDL_GENERATE: ttype = TREE_VHDL_ST_GENERATE; break;
+
default: ttype = TREE_UNKNOWN; break;
}
@@ -275,10 +288,25 @@ while((h = fstReaderIterateHier(xc)))
}
}
*nam = s;
+
+ h->u.var.svt_workspace = svt;
+ h->u.var.sdt_workspace = sdt;
+
return(h);
break;
- case FST_HT_ATTRBEGIN: /* currently ignored */
+ case FST_HT_ATTRBEGIN: /* currently ignored for most cases except VHDL variable vartype/datatype creation */
+ if(h->u.attr.typ == FST_AT_MISC)
+ {
+ if(h->u.attr.subtype == FST_MT_SUPVAR)
+ {
+ svt = h->u.attr.arg >> FST_SDT_SVT_SHIFT_COUNT;
+ sdt = h->u.attr.arg & (FST_SDT_ABS_MAX-1);
+ GLOBALS->supplemental_datatypes_encountered = 1;
+ }
+ }
+ break;
+
case FST_HT_ATTREND:
break;
@@ -441,7 +469,7 @@ for(i=0;i<GLOBALS->numfacs;i++)
char *str;
struct fac *f;
int hier_len, name_len, tlen;
- unsigned char nvt, nvd;
+ unsigned char nvt, nvd, ndt;
int longest_nam_candidate = 0;
char *fnam;
@@ -511,6 +539,9 @@ for(i=0;i<GLOBALS->numfacs;i++)
case FST_VD_INPUT: nvd = ND_DIR_IN; GLOBALS->nonimplicit_direction_encountered = 1; break;
case FST_VD_OUTPUT: nvd = ND_DIR_OUT; GLOBALS->nonimplicit_direction_encountered = 1; break;
case FST_VD_INOUT: nvd = ND_DIR_INOUT; GLOBALS->nonimplicit_direction_encountered = 1; break;
+ case FST_VD_BUFFER: nvd = ND_DIR_BUFFER; GLOBALS->nonimplicit_direction_encountered = 1; break;
+ case FST_VD_LINKAGE: nvd = ND_DIR_LINKAGE; GLOBALS->nonimplicit_direction_encountered = 1; break;
+
case FST_VD_IMPLICIT:
default: nvd = ND_DIR_IMPLICIT; break;
}
@@ -747,8 +778,47 @@ for(i=0;i<GLOBALS->numfacs;i++)
n->mv.mvlfac = GLOBALS->mvlfacs_fst_c_3+i;
GLOBALS->mvlfacs_fst_c_3[i].working_node = n;
- n->vartype = nvt;
n->vardir = nvd;
+ if((h->u.var.svt_workspace == FST_SVT_NONE) && (h->u.var.sdt_workspace == FST_SDT_NONE))
+ {
+ n->vartype = nvt;
+ }
+ else
+ {
+ switch(h->u.var.svt_workspace)
+ {
+ case FST_SVT_VHDL_SIGNAL: nvt = ND_VHDL_SIGNAL; break;
+ case FST_SVT_VHDL_VARIABLE: nvt = ND_VHDL_VARIABLE; break;
+ case FST_SVT_VHDL_CONSTANT: nvt = ND_VHDL_CONSTANT; break;
+ case FST_SVT_VHDL_FILE: nvt = ND_VHDL_FILE; break;
+ case FST_SVT_VHDL_MEMORY: nvt = ND_VHDL_MEMORY; break;
+ default: break; /* keep what exists */
+ }
+ n->vartype = nvt;
+
+ switch(h->u.var.sdt_workspace)
+ {
+ case FST_SDT_VHDL_BOOLEAN: ndt = ND_VDT_VHDL_BOOLEAN; break;
+ case FST_SDT_VHDL_BIT: ndt = ND_VDT_VHDL_BIT; break;
+ case FST_SDT_VHDL_BIT_VECTOR: ndt = ND_VDT_VHDL_BIT_VECTOR; break;
+ case FST_SDT_VHDL_STD_ULOGIC: ndt = ND_VDT_VHDL_STD_ULOGIC; break;
+ case FST_SDT_VHDL_STD_ULOGIC_VECTOR: ndt = ND_VDT_VHDL_STD_ULOGIC_VECTOR; break;
+ case FST_SDT_VHDL_STD_LOGIC: ndt = ND_VDT_VHDL_STD_LOGIC; break;
+ case FST_SDT_VHDL_STD_LOGIC_VECTOR: ndt = ND_VDT_VHDL_STD_LOGIC_VECTOR; break;
+ case FST_SDT_VHDL_UNSIGNED: ndt = ND_VDT_VHDL_UNSIGNED; break;
+ case FST_SDT_VHDL_SIGNED: ndt = ND_VDT_VHDL_SIGNED; break;
+ case FST_SDT_VHDL_INTEGER: ndt = ND_VDT_VHDL_INTEGER; break;
+ case FST_SDT_VHDL_REAL: ndt = ND_VDT_VHDL_REAL; break;
+ case FST_SDT_VHDL_NATURAL: ndt = ND_VDT_VHDL_NATURAL; break;
+ case FST_SDT_VHDL_POSITIVE: ndt = ND_VDT_VHDL_POSITIVE; break;
+ case FST_SDT_VHDL_TIME: ndt = ND_VDT_VHDL_TIME; break;
+ case FST_SDT_VHDL_CHARACTER: ndt = ND_VDT_VHDL_CHARACTER; break;
+ case FST_SDT_VHDL_STRING: ndt = ND_VDT_VHDL_STRING; break;
+ default: ndt = ND_VDT_NONE; break;
+ }
+
+ n->vardt = ndt;
+ }
if((f->len>1)||(f->flags&(VZT_RD_SYM_F_DOUBLE|VZT_RD_SYM_F_STRING)))
{
diff --git a/src/globals.c b/src/globals.c
index 1ca4b5d..8cf0edb 100644
--- a/src/globals.c
+++ b/src/globals.c
@@ -314,6 +314,7 @@ NULL, /* mvlfacs_fst_rvs_alias */
NULL, /* double_curr_fst */
NULL, /* double_fini_fst */
0, /* nonimplicit_direction_encountered */
+0, /* supplemental_datatypes_encountered */
/*
@@ -671,6 +672,10 @@ NULL, /* hiericon_program_pixmap */
NULL, /* hiericon_program_mask */
NULL, /* hiericon_class_pixmap */
NULL, /* hiericon_class_mask */
+NULL, /* hiericon_record_pixmap */
+NULL, /* hiericon_record_mask */
+NULL, /* hiericon_generate_pixmap */
+NULL, /* hiericon_generate_mask */
NULL, /* hiericon_design_pixmap */
NULL, /* hiericon_design_mask */
NULL, /* hiericon_block_pixmap */
@@ -1035,6 +1040,9 @@ 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, /* filter_str_treesearch_gtk2_c_1 459 */
+ND_DIR_UNSPECIFIED, /* filter_typ_treesearch_gtk2_c_1 */
+0, /* filter_matlen_treesearch_gtk2_c_1 */
+0, /* filter_noregex_treesearch_gtk2_c_1 */
#if defined(WAVE_USE_GTK2)
NULL, /* sig_store_treesearch_gtk2_c_1 460 */
NULL, /* sig_selection_treesearch_gtk2_c_1 461 */
@@ -1940,6 +1948,9 @@ void reload_into_new_context_2(void)
strcpy2_into_new_context(new_globals, &new_globals->filter_str_treesearch_gtk2_c_1, &GLOBALS->filter_str_treesearch_gtk2_c_1);
strcpy2_into_new_context(new_globals, &new_globals->selected_hierarchy_name, &GLOBALS->selected_hierarchy_name);
+ new_globals->filter_typ_treesearch_gtk2_c_1 = GLOBALS->filter_typ_treesearch_gtk2_c_1;
+ new_globals->filter_matlen_treesearch_gtk2_c_1 = GLOBALS->filter_matlen_treesearch_gtk2_c_1;
+ new_globals->filter_noregex_treesearch_gtk2_c_1 = GLOBALS->filter_noregex_treesearch_gtk2_c_1;
/* timeentry.c */
new_globals->from_entry = GLOBALS->from_entry;
@@ -2305,7 +2316,7 @@ void reload_into_new_context_2(void)
if((GLOBALS->filter_str_treesearch_gtk2_c_1) && (GLOBALS->filter_entry))
{
gtk_entry_set_text(GTK_ENTRY(GLOBALS->filter_entry), GLOBALS->filter_str_treesearch_gtk2_c_1);
- wave_regex_compile(GLOBALS->filter_str_treesearch_gtk2_c_1, WAVE_REGEX_TREE);
+ wave_regex_compile(GLOBALS->filter_str_treesearch_gtk2_c_1 + GLOBALS->filter_matlen_treesearch_gtk2_c_1, WAVE_REGEX_TREE);
}
#endif
@@ -2865,6 +2876,10 @@ void clone_icon_pointers_across_contexts(struct Global *a, struct Global *b)
a->hiericon_program_mask = b->hiericon_program_mask;
a->hiericon_class_pixmap = b->hiericon_class_pixmap;
a->hiericon_class_mask = b->hiericon_class_mask;
+ a->hiericon_record_pixmap = b->hiericon_record_pixmap;
+ a->hiericon_record_mask = b->hiericon_record_mask;
+ a->hiericon_generate_pixmap = b->hiericon_generate_pixmap;
+ a->hiericon_generate_mask = b->hiericon_generate_mask;
a->hiericon_design_pixmap = b->hiericon_design_pixmap;
a->hiericon_design_mask = b->hiericon_design_mask;
a->hiericon_block_pixmap = b->hiericon_block_pixmap;
diff --git a/src/globals.h b/src/globals.h
index 33e0624..89c1093 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -313,6 +313,7 @@ int busycnt_fst_c_2;
double *double_curr_fst;
double *double_fini_fst;
char nonimplicit_direction_encountered;
+char supplemental_datatypes_encountered;
/*
@@ -668,6 +669,10 @@ GdkDrawable *hiericon_program_pixmap;
GdkDrawable *hiericon_program_mask;
GdkDrawable *hiericon_class_pixmap;
GdkDrawable *hiericon_class_mask;
+GdkDrawable *hiericon_record_pixmap;
+GdkDrawable *hiericon_record_mask;
+GdkDrawable *hiericon_generate_pixmap;
+GdkDrawable *hiericon_generate_mask;
GdkDrawable *hiericon_design_pixmap;
GdkDrawable *hiericon_design_mask;
GdkDrawable *hiericon_block_pixmap;
@@ -1018,6 +1023,9 @@ 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 */
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;
+unsigned char filter_noregex_treesearch_gtk2_c_1;
#if defined(WAVE_USE_GTK2)
GtkListStore *sig_store_treesearch_gtk2_c_1; /* from treesearch_gtk2.c 490 */
GtkTreeSelection *sig_selection_treesearch_gtk2_c_1; /* from treesearch_gtk2.c 491 */
diff --git a/src/helpers/fst/fstapi.c b/src/helpers/fst/fstapi.c
index 0bb79cf..ab24e64 100644
--- a/src/helpers/fst/fstapi.c
+++ b/src/helpers/fst/fstapi.c
@@ -62,6 +62,7 @@ void **JenkinsIns(void *base_i, unsigned char *mem, uint32_t length, uint32_t ha
#define FST_WRITER_STR "fstWriter"
#define FST_ID_NAM_SIZ (512)
+#define FST_ID_NAM_ATTR_SIZ (65536+4096)
#define FST_DOUBLE_ENDTEST (2.7182818284590452354)
#define FST_HDR_SIM_VERSION_SIZE (128)
#define FST_HDR_DATE_SIZE (120)
@@ -1842,7 +1843,7 @@ if(xc && vers)
}
-void fstWriterSetComment(void *ctx, const char *comm)
+static void fstWriterSetAttrGeneric(void *ctx, const char *comm, int typ, uint64_t arg)
{
struct fstWriterContext *xc = (struct fstWriterContext *)ctx;
if(xc && comm)
@@ -1856,12 +1857,24 @@ if(xc && comm)
s++;
}
- fstWriterSetAttrBegin(xc, FST_AT_MISC, FST_MT_COMMENT, sf, 0);
+ fstWriterSetAttrBegin(xc, FST_AT_MISC, typ, sf, arg);
free(sf);
}
}
+void fstWriterSetComment(void *ctx, const char *comm)
+{
+fstWriterSetAttrGeneric(ctx, comm, FST_MT_COMMENT, 0);
+}
+
+
+void fstWriterSetEnvVar(void *ctx, const char *envvar)
+{
+fstWriterSetAttrGeneric(ctx, envvar, FST_MT_ENVVAR, 0);
+}
+
+
void fstWriterSetTimescale(void *ctx, int ts)
{
struct fstWriterContext *xc = (struct fstWriterContext *)ctx;
@@ -2007,8 +2020,19 @@ return(0);
/*
- * writer attr/scope/var creation
+ * writer attr/scope/var creation:
+ * fstWriterCreateVar2() is used to dump VHDL or other languages, but the
+ * underlying variable needs to map to Verilog/SV via the proper fstVarType vt
*/
+fstHandle fstWriterCreateVar2(void *ctx, enum fstVarType vt, enum fstVarDir vd,
+ uint32_t len, const char *nam, fstHandle aliasHandle,
+ const char *type, enum fstSupplimentalVarType svt, enum fstSupplimentalDataType sdt)
+{
+fstWriterSetAttrGeneric(ctx, type ? type : "", FST_MT_SUPVAR, (svt<<FST_SDT_SVT_SHIFT_COUNT) | (sdt & (FST_SDT_ABS_MAX-1)));
+return(fstWriterCreateVar(ctx, vt, vd, len, nam, aliasHandle));
+}
+
+
fstHandle fstWriterCreateVar(void *ctx, enum fstVarType vt, enum fstVarDir vd,
uint32_t len, const char *nam, fstHandle aliasHandle)
{
@@ -2461,7 +2485,8 @@ static const char *vartypes[] = {
};
static const char *modtypes[] = {
- "module", "task", "function", "begin", "fork", "generate", "struct", "union", "class", "interface", "package", "program"
+ "module", "task", "function", "begin", "fork", "generate", "struct", "union", "class", "interface", "package", "program",
+ "vhdl_architecture", "vhdl_procedure", "vhdl_function", "vhdl_record", "vhdl_process", "vhdl_block", "vhdl_for_generate", "vhdl_if_generate", "vhdl_generate"
};
static const char *attrtypes[] = {
@@ -3220,7 +3245,8 @@ if(!(isfeof=feof(xc->fh)))
case FST_VT_SV_ENUM:
case FST_VT_SV_SHORTREAL:
xc->hier.htyp = FST_HT_VAR;
-
+ xc->hier.u.var.svt_workspace = FST_SVT_NONE;
+ xc->hier.u.var.sdt_workspace = FST_SDT_NONE;
xc->hier.u.var.typ = tag;
xc->hier.u.var.direction = fgetc(xc->fh);
xc->hier.u.var.name = pnt = xc->str_scope_nam;
@@ -3266,7 +3292,7 @@ return(!isfeof ? &xc->hier : NULL);
int fstReaderProcessHier(void *ctx, FILE *fv)
{
struct fstReaderContext *xc = (struct fstReaderContext *)ctx;
-char str[FST_ID_NAM_SIZ+1];
+char *str;
char *pnt;
int ch, scopetype;
int vartype;
@@ -3288,6 +3314,8 @@ if(!xc->fh)
}
}
+str = malloc(FST_ID_NAM_ATTR_SIZ+1);
+
if(fv)
{
char time_dimension[2] = {0, 0};
@@ -3353,7 +3381,7 @@ while(!feof(xc->fh))
{
case FST_ST_VCD_SCOPE:
scopetype = fgetc(xc->fh);
- if((scopetype < FST_ST_VCD_MIN) || (scopetype > FST_ST_MAX)) scopetype = FST_ST_VCD_MODULE;
+ if((scopetype < FST_ST_MIN) || (scopetype > FST_ST_MAX)) scopetype = FST_ST_VCD_MODULE;
pnt = str;
while((ch = fgetc(xc->fh)))
{
@@ -3379,6 +3407,8 @@ while(!feof(xc->fh))
}; /* attrname */
*pnt = 0;
+ if(!str[0]) { strcpy(str, "\"\""); }
+
attrarg = fstReaderVarint64(xc->fh);
if(fv)
@@ -3517,6 +3547,7 @@ xc->temp_signal_value_buf = malloc(xc->longest_signal_value_len + 1);
xc->var_count = xc->maxhandle + xc->num_alias;
+free(str);
return(1);
}
diff --git a/src/helpers/fst/fstapi.h b/src/helpers/fst/fstapi.h
index 8f67319..38a89c0 100644
--- a/src/helpers/fst/fstapi.h
+++ b/src/helpers/fst/fstapi.h
@@ -53,7 +53,8 @@ enum fstBlockType {
};
enum fstScopeType {
- FST_ST_VCD_MIN = 0,
+ FST_ST_MIN = 0,
+
FST_ST_VCD_MODULE = 0,
FST_ST_VCD_TASK = 1,
FST_ST_VCD_FUNCTION = 2,
@@ -66,9 +67,18 @@ enum fstScopeType {
FST_ST_VCD_INTERFACE = 9,
FST_ST_VCD_PACKAGE = 10,
FST_ST_VCD_PROGRAM = 11,
- FST_ST_VCD_MAX = 11,
- FST_ST_MAX = 11,
+ FST_ST_VHDL_ARCHITECTURE = 12,
+ FST_ST_VHDL_PROCEDURE = 13,
+ FST_ST_VHDL_FUNCTION = 14,
+ FST_ST_VHDL_RECORD = 15,
+ FST_ST_VHDL_PROCESS = 16,
+ FST_ST_VHDL_BLOCK = 17,
+ FST_ST_VHDL_FOR_GENERATE = 18,
+ FST_ST_VHDL_IF_GENERATE = 19,
+ FST_ST_VHDL_GENERATE = 20,
+
+ FST_ST_MAX = 20,
FST_ST_GEN_ATTRBEGIN = 252,
FST_ST_GEN_ATTREND = 253,
@@ -78,7 +88,8 @@ enum fstScopeType {
};
enum fstVarType {
- FST_VT_VCD_MIN = 0, /* start of VCD datatypes */
+ FST_VT_MIN = 0, /* start of vartypes */
+
FST_VT_VCD_EVENT = 0,
FST_VT_VCD_INTEGER = 1,
FST_VT_VCD_PARAMETER = 2,
@@ -112,19 +123,25 @@ enum fstVarType {
FST_VT_SV_ENUM = 28, /* declare as appropriate type range */
FST_VT_SV_SHORTREAL = 29, /* declare and emit same as FST_VT_VCD_REAL */
- FST_VT_VCD_MAX = 29 /* end of VCD datatypes */
+ FST_VT_MAX = 29 /* end of vartypes */
};
enum fstVarDir {
+ FST_VD_MIN = 0,
+
FST_VD_IMPLICIT = 0,
FST_VD_INPUT = 1,
FST_VD_OUTPUT = 2,
FST_VD_INOUT = 3,
+ FST_VD_BUFFER = 4,
+ FST_VD_LINKAGE = 5,
- FST_VD_MAX = 3
+ FST_VD_MAX = 5
};
enum fstHierType {
+ FST_HT_MIN = 0,
+
FST_HT_SCOPE = 0,
FST_HT_UPSCOPE = 1,
FST_HT_VAR = 2,
@@ -135,6 +152,8 @@ enum fstHierType {
};
enum fstAttrType {
+ FST_AT_MIN = 0,
+
FST_AT_MISC = 0,
FST_AT_ARRAY = 1,
FST_AT_ENUM = 2,
@@ -144,13 +163,19 @@ enum fstAttrType {
};
enum fstMiscType {
+ FST_MT_MIN = 0,
+
FST_MT_COMMENT = 0, /* self-contained: does not need matching FST_HT_ATTREND, use fstWriterSetComment() to emit */
- FST_MT_UNKNOWN = 1,
+ FST_MT_ENVVAR = 1, /* self-contained: does not need matching FST_HT_ATTREND, use fstWriterSetEnvVar() to emit */
+ FST_MT_SUPVAR = 2,
+ FST_MT_UNKNOWN = 3,
- FST_MT_MAX = 1
+ FST_MT_MAX = 3
};
enum fstArrayType {
+ FST_AR_MIN = 0,
+
FST_AR_NONE = 0,
FST_AR_UNPACKED = 1,
FST_AR_PACKED = 2,
@@ -184,9 +209,52 @@ enum fstPackType {
FST_PT_PACKED = 2,
FST_PT_TAGGED_PACKED = 3,
- FST_PT_MAX = 6
+ FST_PT_MAX = 3
+};
+
+enum fstSupplimentalVarType {
+ FST_SVT_MIN = 0,
+
+ FST_SVT_NONE = 0,
+
+ FST_SVT_VHDL_SIGNAL = 1,
+ FST_SVT_VHDL_VARIABLE = 2,
+ FST_SVT_VHDL_CONSTANT = 3,
+ FST_SVT_VHDL_FILE = 4,
+ FST_SVT_VHDL_MEMORY = 5,
+
+ FST_SVT_MAX = 5,
+};
+
+enum fstSupplimentalDataType {
+ FST_SDT_MIN = 0,
+
+ FST_SDT_NONE = 0,
+
+ FST_SDT_VHDL_BOOLEAN = 1,
+ FST_SDT_VHDL_BIT = 2,
+ FST_SDT_VHDL_BIT_VECTOR = 3,
+ FST_SDT_VHDL_STD_ULOGIC = 4,
+ FST_SDT_VHDL_STD_ULOGIC_VECTOR = 5,
+ FST_SDT_VHDL_STD_LOGIC = 6,
+ FST_SDT_VHDL_STD_LOGIC_VECTOR = 7,
+ FST_SDT_VHDL_UNSIGNED = 8,
+ FST_SDT_VHDL_SIGNED = 9,
+ FST_SDT_VHDL_INTEGER = 10,
+ FST_SDT_VHDL_REAL = 11,
+ FST_SDT_VHDL_NATURAL = 12,
+ FST_SDT_VHDL_POSITIVE = 13,
+ FST_SDT_VHDL_TIME = 14,
+ FST_SDT_VHDL_CHARACTER = 15,
+ FST_SDT_VHDL_STRING = 16,
+
+ FST_SDT_MAX = 16,
+
+ FST_SDT_SVT_SHIFT_COUNT = 10, /* FST_SVT_* is ORed in to the left after shifting FST_SDT_SVT_SHIFT_COUNT */
+ FST_SDT_ABS_MAX = (1<<(FST_SDT_SVT_SHIFT_COUNT))
};
+
struct fstHier
{
unsigned char htyp;
@@ -194,7 +262,7 @@ unsigned char htyp;
union {
/* if htyp == FST_HT_SCOPE */
struct fstHierScope {
- unsigned char typ; /* FST_ST_VCD_MODULE ... FST_ST_VCD_PROGRAM */
+ unsigned char typ; /* FST_ST_MIN ... FST_ST_MAX */
const char *name;
const char *component;
uint32_t name_length; /* strlen(u.scope.name) */
@@ -203,8 +271,12 @@ union {
/* if htyp == FST_HT_VAR */
struct fstHierVar {
- unsigned char typ; /* FST_VT_VCD_EVENT ... FST_VT_GEN_STRING */
- unsigned char direction; /* FST_VD_IMPLICIT ... FST_VD_INOUT */
+ unsigned char typ; /* FST_VT_MIN ... FST_VT_MAX */
+ unsigned char direction; /* FST_VD_MIN ... FST_VD_MAX */
+
+ unsigned char svt_workspace; /* zeroed out by FST reader, for client code use */
+ unsigned char sdt_workspace; /* zeroed out by FST reader, for client code use */
+
const char *name;
uint32_t length;
fstHandle handle;
@@ -214,8 +286,8 @@ union {
/* if htyp == FST_HT_ATTRBEGIN */
struct fstHierAttr {
- unsigned char typ; /* FST_AT_MISC ... FST_AT_PACK */
- unsigned char subtype; /* from fstArrayType, fstEnumValueType, fstPackType */
+ unsigned char typ; /* FST_AT_MIN ... FST_AT_MAX */
+ unsigned char subtype; /* from fstMiscType, fstArrayType, fstEnumValueType, fstPackType */
const char *name;
uint64_t arg; /* number of array elements, struct members, or some other payload (possibly ignored) */
uint32_t name_length; /* strlen(u.attr.name) */
@@ -227,9 +299,17 @@ union {
/*
* writer functions
*/
+
+/* used for Verilog/SV */
fstHandle fstWriterCreateVar(void *ctx, enum fstVarType vt, enum fstVarDir vd,
uint32_t len, const char *nam, fstHandle aliasHandle);
+/* future expansion for VHDL and other languages. The variable type, data type, etc map onto
+ the current Verilog/SV one. The "type" string is optional for a more verbose or custom description */
+fstHandle fstWriterCreateVar2(void *ctx, enum fstVarType vt, enum fstVarDir vd,
+ uint32_t len, const char *nam, fstHandle aliasHandle,
+ const char *type, enum fstSupplimentalVarType svt, enum fstSupplimentalDataType sdt);
+
void fstWriterSetPackType(void *ctx, int typ); /* type = 0 (libz), 1 (fastlz) */
void fstWriterSetRepackOnClose(void *ctx, int enable); /* type = 0 (none), 1 (libz) */
void fstWriterSetParallelMode(void *ctx, int enable);
@@ -242,6 +322,7 @@ void fstWriterClose(void *ctx);
void fstWriterSetDate(void *ctx, const char *dat);
void fstWriterSetVersion(void *ctx, const char *vers);
void fstWriterSetComment(void *ctx, const char *comm);
+void fstWriterSetEnvVar(void *ctx, const char *envvar);
void fstWriterSetTimescale(void *ctx, int ts);
void fstWriterSetTimescaleFromString(void *ctx, const char *s);
void fstWriterSetTimezero(void *ctx, int64_t tim);
diff --git a/src/helpers/vcd2fst.c b/src/helpers/vcd2fst.c
index 9b0a788..e4c89ff 100644
--- a/src/helpers/vcd2fst.c
+++ b/src/helpers/vcd2fst.c
@@ -201,6 +201,21 @@ for(;;)
default: break;
}
}
+ else
+ if(!strncmp(vht, "vhdl_", 5))
+ {
+ switch(vht[5])
+ {
+ case 'a': mtype = FST_ST_VHDL_ARCHITECTURE; break;
+ case 'r': mtype = FST_ST_VHDL_RECORD; break;
+ case 'b': mtype = FST_ST_VHDL_BLOCK; break;
+ case 'g': mtype = FST_ST_VHDL_GENERATE; break;
+ case 'i': mtype = FST_ST_VHDL_IF_GENERATE; break;
+ case 'f': mtype = (vht[6] == 'u') ? FST_ST_VHDL_FUNCTION : FST_ST_VHDL_FOR_GENERATE; break;
+ case 'p': mtype = (!strncmp(vht+6, "roces", 5)) ? FST_ST_VHDL_PROCESS: FST_ST_VHDL_PROCEDURE; break;
+ default: break;
+ }
+ }
ctype[0] = mtype + 1; /* bias for zero terminated string */
@@ -325,12 +340,23 @@ char *fgets_rc;
if(!*wbuf)
{
- *wbuf = malloc(32768);
*len = 32767;
+ *wbuf = malloc((*len) + 1);
+ (*wbuf)[*len] = 1;
}
(*wbuf)[0] = 0;
-fgets_rc = fgets(*wbuf, 32767, f);
+fgets_rc = fgets(*wbuf, (*len) + 1, f);
+while(((*wbuf)[*len] != 1) && !feof(f))
+ {
+ /* fprintf(stderr, "overflow %d\n", (int)(*len)); */
+ *wbuf = realloc(*wbuf, (*len) * 2 + 1);
+ (*wbuf)[(*len) * 2] = 1;
+
+ fgets_rc = fgets(*wbuf + (*len), (*len) + 1, f);
+ *len = 2 * (*len);
+ }
+
*buf = *wbuf;
while(*(buf)[0]==' ') { (*buf)++; } /* verilator leading spaces fix */
@@ -378,14 +404,15 @@ int fst_main(char *vname, char *fstname)
{
FILE *f;
char *buf = NULL, *wbuf = NULL;
-size_t glen;
+size_t glen = 0;
void *ctx;
int line = 0;
size_t ss;
fstHandle returnedhandle;
JRB node;
uint64_t prev_tim = 0;
-char bin_fixbuff[32769];
+size_t bin_fixbuff_len = 65537;
+char *bin_fixbuff = NULL;
int hash_kill = 0;
unsigned int hash_max = 0;
int *node_len_array = NULL;
@@ -395,6 +422,8 @@ int is_extload = 0;
void *xc = NULL;
#endif
+bin_fixbuff = malloc(bin_fixbuff_len);
+
if(!strcmp("-", vname))
{
f = stdin;
@@ -434,6 +463,7 @@ if(!strcmp("-", vname))
if(!f)
{
printf("could not open '%s', exiting.\n", vname);
+ free(bin_fixbuff); bin_fixbuff = NULL;
exit(255);
}
@@ -442,6 +472,7 @@ ctx = fstWriterCreate(fstname, 1);
if(!ctx)
{
printf("could not open '%s', exiting.\n", fstname);
+ free(bin_fixbuff); bin_fixbuff = NULL;
exit(255);
}
@@ -716,70 +747,138 @@ while(!feof(f))
if(!strncmp(buf, "$scope", 6))
{
char *st = strtok(buf+6, " \t");
- enum fstScopeType scopetype;
+ enum fstScopeType scopetype = FST_ST_VCD_MODULE;
- if(!strcmp(st, "module"))
- {
- scopetype = FST_ST_VCD_MODULE;
- }
- else
- if(!strcmp(st, "task"))
- {
- scopetype = FST_ST_VCD_TASK;
- }
- else
- if(!strcmp(st, "function"))
- {
- scopetype = FST_ST_VCD_FUNCTION;
- }
- else
- if(!strcmp(st, "begin"))
- {
- scopetype = FST_ST_VCD_BEGIN;
- }
- else
- if(!strcmp(st, "fork"))
- {
- scopetype = FST_ST_VCD_FORK;
- }
- else
- if(!strcmp(st, "generate"))
- {
- scopetype = FST_ST_VCD_GENERATE;
- }
- else
- if(!strcmp(st, "struct"))
- {
- scopetype = FST_ST_VCD_STRUCT;
- }
- else
- if(!strcmp(st, "union"))
- {
- scopetype = FST_ST_VCD_UNION;
- }
- else
- if(!strcmp(st, "class"))
- {
- scopetype = FST_ST_VCD_CLASS;
- }
- else
- if(!strcmp(st, "interface"))
- {
- scopetype = FST_ST_VCD_INTERFACE;
- }
- else
- if(!strcmp(st, "package"))
- {
- scopetype = FST_ST_VCD_PACKAGE;
- }
- else
- if(!strcmp(st, "program"))
- {
- scopetype = FST_ST_VCD_PROGRAM;
- }
- else
+ switch(st[0])
{
- scopetype = FST_ST_VCD_MODULE;
+ case 'm':
+ if(!strcmp(st, "module"))
+ {
+ }
+ break;
+
+ case 't':
+ if(!strcmp(st, "task"))
+ {
+ scopetype = FST_ST_VCD_TASK;
+ }
+ break;
+
+ case 'f':
+ if(!strcmp(st, "function"))
+ {
+ scopetype = FST_ST_VCD_FUNCTION;
+ }
+ else
+ if(!strcmp(st, "fork"))
+ {
+ scopetype = FST_ST_VCD_FORK;
+ }
+ break;
+
+ case 'b':
+ if(!strcmp(st, "begin"))
+ {
+ scopetype = FST_ST_VCD_BEGIN;
+ }
+ break;
+
+ case 'g':
+ if(!strcmp(st, "generate"))
+ {
+ scopetype = FST_ST_VCD_GENERATE;
+ }
+ break;
+
+ case 's':
+ if(!strcmp(st, "struct"))
+ {
+ scopetype = FST_ST_VCD_STRUCT;
+ }
+ break;
+
+ case 'u':
+ if(!strcmp(st, "union"))
+ {
+ scopetype = FST_ST_VCD_UNION;
+ }
+ break;
+
+ case 'c':
+ if(!strcmp(st, "class"))
+ {
+ scopetype = FST_ST_VCD_CLASS;
+ }
+ break;
+
+ case 'i':
+ if(!strcmp(st, "interface"))
+ {
+ scopetype = FST_ST_VCD_INTERFACE;
+ }
+ break;
+
+ case 'p':
+ if(!strcmp(st, "package"))
+ {
+ scopetype = FST_ST_VCD_PACKAGE;
+ }
+ else
+ if(!strcmp(st, "program"))
+ {
+ scopetype = FST_ST_VCD_PROGRAM;
+ }
+ break;
+
+ case 'v':
+ if(!strcmp(st, "vhdl_architecture"))
+ {
+ scopetype = FST_ST_VHDL_ARCHITECTURE;
+ }
+ else
+ if(!strcmp(st, "vhdl_procedure"))
+ {
+ scopetype = FST_ST_VHDL_PROCEDURE;
+ }
+ else
+ if(!strcmp(st, "vhdl_function"))
+ {
+ scopetype = FST_ST_VHDL_FUNCTION;
+ }
+ else
+ if(!strcmp(st, "vhdl_record"))
+ {
+ scopetype = FST_ST_VHDL_RECORD;
+ }
+ else
+ if(!strcmp(st, "vhdl_process"))
+ {
+ scopetype = FST_ST_VHDL_PROCESS;
+ }
+ else
+ if(!strcmp(st, "vhdl_block"))
+ {
+ scopetype = FST_ST_VHDL_BLOCK;
+ }
+ else
+ if(!strcmp(st, "vhdl_for_generate"))
+ {
+ scopetype = FST_ST_VHDL_FOR_GENERATE;
+ }
+ else
+ if(!strcmp(st, "vhdl_if_generate"))
+ {
+ scopetype = FST_ST_VHDL_IF_GENERATE;
+ }
+ else
+ if(!strcmp(st, "vhdl_generate"))
+ {
+ scopetype = FST_ST_VHDL_GENERATE;
+ }
+ break;
+
+ default:
+ break;
}
st = strtok(NULL, " \t");
@@ -1092,11 +1191,10 @@ while(!feof(f))
{
unsigned int hash;
uint64_t tim;
- size_t len;
char *nl, *sp;
double doub;
- ss = getline_replace(&wbuf, &buf, &len, f);
+ ss = getline_replace(&wbuf, &buf, &glen, f);
if(ss == -1)
{
break;
@@ -1147,13 +1245,20 @@ while(!feof(f))
int bin_len = sp - (buf + 1); /* strlen(buf+1) */
int node_len = node_len_array[hash];
- if(bin_len == node_len)
+ if(bin_len >= node_len)
{
fstWriterEmitValueChange(ctx, hash, buf+1);
}
else
{
int delta = node_len - bin_len;
+
+ if(node_len >= bin_fixbuff_len)
+ {
+ bin_fixbuff_len = node_len + 1;
+ bin_fixbuff = realloc(bin_fixbuff, bin_fixbuff_len);
+ }
+
memset(bin_fixbuff, buf[1] != '1' ? buf[1] : '0', delta);
memcpy(bin_fixbuff + delta, buf+1, bin_len);
fstWriterEmitValueChange(ctx, hash, bin_fixbuff);
@@ -1166,13 +1271,20 @@ while(!feof(f))
{
int bin_len = sp - (buf + 1); /* strlen(buf+1) */
int node_len = node->val2.i;
- if(bin_len == node_len)
+ if(bin_len >= node_len)
{
fstWriterEmitValueChange(ctx, node->val.i, buf+1);
}
else
{
int delta = node_len - bin_len;
+
+ if(node_len >= bin_fixbuff_len)
+ {
+ bin_fixbuff_len = node_len + 1;
+ bin_fixbuff = realloc(bin_fixbuff, bin_fixbuff_len);
+ }
+
memset(bin_fixbuff, buf[1] != '1' ? buf[1] : '0', delta);
memcpy(bin_fixbuff + delta, buf+1, bin_len);
fstWriterEmitValueChange(ctx, node->val.i, bin_fixbuff);
@@ -1215,8 +1327,16 @@ while(!feof(f))
case 'p':
{
char *src = buf+1;
- char *pnt = bin_fixbuff;
+ char *pnt;
int pchar = 0;
+ int p_len = strlen(src);
+
+ if(p_len >= bin_fixbuff_len)
+ {
+ bin_fixbuff_len = p_len + 1;
+ bin_fixbuff = realloc(bin_fixbuff, bin_fixbuff_len);
+ }
+ pnt = bin_fixbuff;
for(;;)
{
@@ -1351,6 +1471,7 @@ if(vcd_ids)
vcd_ids = NULL;
}
+free(bin_fixbuff); bin_fixbuff = NULL;
free(wbuf); wbuf = NULL;
free(node_len_array); node_len_array = NULL;
diff --git a/src/main.c b/src/main.c
index 17fe1bb..e6055cd 100644
--- a/src/main.c
+++ b/src/main.c
@@ -23,7 +23,7 @@
/*
#define WAVE_CRASH_ON_GTK_WARNING
-*/
+ */
#include "wave_locale.h"
@@ -210,7 +210,7 @@ for(i=0;i<GLOBALS->num_notebook_pages;i++)
static void print_help(char *nam)
{
-#ifdef EXTLOAD_SUFFIX
+#if defined(EXTLOAD_SUFFIX) && defined(EXTCONV_PATH)
int slen = strlen(EXTLOAD_SUFFIX);
char *ucase_ext = wave_alloca(slen+1);
int i;
@@ -230,7 +230,7 @@ ucase_ext[i] = 0;
#endif
#if !defined _MSC_VER && !defined __MINGW32__
-#ifdef EXTLOAD_SUFFIX
+#if defined(EXTLOAD_SUFFIX) && defined(EXTCONV_PATH)
#define VCD_GETOPT " -o, --optimize optimize VCD/%s to FST\n"
#else
#define VCD_GETOPT " -o, --optimize optimize VCD to FST\n"
@@ -335,7 +335,7 @@ SLIDEZOOM_OPT
"Report bugs to <"PACKAGE_BUGREPORT">.\n",nam
#if !defined _MSC_VER && !defined __MINGW32__
-#ifdef EXTLOAD_SUFFIX
+#if defined(EXTLOAD_SUFFIX) && defined(EXTCONV_PATH)
,ucase_ext
#endif
#endif
@@ -1292,7 +1292,7 @@ if(is_missing_file)
GLOBALS->loaded_file_type = MISSING_FILE;
}
else
-#ifdef EXTLOAD_SUFFIX
+#if defined(EXTLOAD_SUFFIX)
if(suffix_check(GLOBALS->loaded_file_name, "."EXTLOAD_SUFFIX) && !opt_vcd)
{
TimeType extload_max;
diff --git a/src/pixmaps.c b/src/pixmaps.c
index 767c6e2..d400c70 100644
--- a/src/pixmaps.c
+++ b/src/pixmaps.c
@@ -2899,6 +2899,295 @@ static char *plugin[] = {
/* XPM */
+static char *cd_img[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 131 2",
+" c #5887B8",
+". c #A5BFD9",
+"X c #94BCE7",
+"o c #96BEE7",
+"O c #96BCE8",
+"+ c #97BEE9",
+"@ c #97BDEC",
+"# c #99BFE9",
+"$ c #99BFEB",
+"% c #AAC3DC",
+"& c #AAC3DD",
+"* c #ACC4DD",
+"= c #97C0E9",
+"- c #99C0E9",
+"; c #9AC1E9",
+": c #9BC1E9",
+"> c #9BC1EB",
+", c #A1C4EA",
+"< c #A3C7EC",
+"1 c #A0C6EE",
+"2 c #A4C9ED",
+"3 c #A4C9EF",
+"4 c #B9CDE1",
+"5 c #BACEE2",
+"6 c #BBCEE2",
+"7 c #A3C1F0",
+"8 c #A4CAF2",
+"9 c #A5CBF3",
+"0 c #AECAF2",
+"q c #A9CCF0",
+"w c #ABCCF0",
+"e c #ABCDF1",
+"r c #A8CDF2",
+"t c #A8CCF3",
+"y c #A9CDF3",
+"u c #ABCFF5",
+"i c #A8CDF6",
+"p c #A9CEF6",
+"a c #B2CEF1",
+"s c #B6CDF7",
+"d c #ADD2F2",
+"f c #AED1F4",
+"g c #ACD0F6",
+"h c #ACD1F7",
+"j c #B2D2F2",
+"k c #B6D2F1",
+"l c #B2D2F4",
+"z c #B3D4F6",
+"x c #B8D6F5",
+"c c #BBD8F6",
+"v c #B2D3F9",
+"b c #B3D5F9",
+"n c #B2D6FB",
+"m c #BBDBFC",
+"M c #BADBFE",
+"N c #BBDCFC",
+"B c #C7DAF3",
+"V c #C6DEF7",
+"C c #C9DDF3",
+"Z c #CADEF3",
+"A c #CCDDF0",
+"S c #CFDFF1",
+"D c #C3DDF8",
+"F c #C4DDF8",
+"G c #C7DFFB",
+"H c #D0E0EF",
+"J c #CEE0F1",
+"K c #C2E1FF",
+"L c #C3E1FF",
+"P c #CAE1FA",
+"I c #CDE7FF",
+"U c #CFE7FF",
+"Y c #C8EDF9",
+"T c #D1E1F0",
+"R c #D1E1F1",
+"E c #D4E2F1",
+"W c #D3E3F6",
+"Q c #D2E4F6",
+"! c #D3E4F6",
+"~ c #D5E4F5",
+"^ c #D4E6F8",
+"/ c #D6E7F9",
+"( c #D1E5FC",
+") c #D3E4FF",
+"_ c #D7E9FA",
+"` c #D1E9FF",
+"' c #D1EBFF",
+"] c #D9E8F8",
+"[ c #D9EAF8",
+"{ c #D9EAFA",
+"} c #DFECF9",
+"| c #DBE8FF",
+" . c #DAECFE",
+".. c #DAECFF",
+"X. c #D8EFFF",
+"o. c #DAEEFF",
+"O. c #D1F0FD",
+"+. c #DDF0FF",
+"@. c #DDF2FF",
+"#. c #DCF4FF",
+"$. c #E4EDF4",
+"%. c #E1EDFA",
+"&. c #E4F1F8",
+"*. c #E5F3FB",
+"=. c #E4F1FF",
+"-. c #E4F2FE",
+";. c #E2F6FF",
+":. c #E5F4FF",
+">. c #E8F7FF",
+",. c #E9F7FF",
+"<. c #E9F9FF",
+"1. c #EBF8FF",
+"2. c #EDF8FF",
+"3. c #EFFCFF",
+"4. c #F0FAFF",
+"5. c #F0FDFF",
+"6. c #F1FDFF",
+"7. c #F2FCFF",
+"8. c #F3FCFF",
+"9. c #F3FDFF",
+"0. c #F1FEFF",
+"q. c #F3FFFF",
+"w. c #F7FFFF",
+"e. c #F9FEFE",
+"r. c #F9FFFF",
+"t. c #FAFEFE",
+"y. c #FCFDFE",
+"u. c #FDFFFF",
+"i. c #FEFFFF",
+"p. c #FFFFFF",
+"a. c None",
+/* pixels */
+"a.a.a.a.a. a.a.a.a.a.",
+"a.a.a. 5 E } *.$.5 a.a.a.",
+"a.a. . p.%.0 f Y w.p.t.. a.a.",
+"a. . 4.p.8.7 1 O.p.3.8.p.% a.",
+"a. %.2 .p.s @ #.w.>.8.w.t. a.",
+" 5 k > # ) .B &.3.>.8.3.4.5 ",
+" T , - + a & & 8.:.o.( T ",
+" ~ # - - Z a.a. ] j w w ! ",
+" ~ # + X Z a.a. W w 8 2 ! ",
+" H X X w o.* & D l z x S ",
+" 5 V ' ;.+.+.] ^ G u 8 t D 5 ",
+"a. t.1.O.I K N b g u 8 u ] a.",
+"a. . 3.' K M b g u 8 r P . a.",
+"a.a. . -.U m v g g c _ . a.a.",
+"a.a.a. 5 J ^ ^ S 5 a.a.a.",
+"a.a.a.a.a. a.a.a.a.a."
+};
+
+
+/* XPM */
+static char *arrow_redo[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 110 2",
+" c #215F1E",
+". c #236220",
+"X c #246220",
+"o c #266522",
+"O c #276623",
+"+ c #296925",
+"@ c #2A6B26",
+"# c #2C6C27",
+"$ c #2D6E29",
+"% c #2F702A",
+"& c #31732C",
+"* c #32752D",
+"= c #34772F",
+"- c #367930",
+"; c #387B32",
+": c #397E33",
+"> c #3B8035",
+", c #3E8337",
+"< c #3E8438",
+"1 c #3F8538",
+"2 c #41883B",
+"3 c #438A3C",
+"4 c #458D3E",
+"5 c #478F40",
+"6 c #4A9242",
+"7 c #4B9443",
+"8 c #4C9444",
+"9 c #4E9746",
+"0 c #509947",
+"q c #519C49",
+"w c #549F4B",
+"e c #55A04C",
+"r c #57A34E",
+"t c #58A34F",
+"y c #58A44F",
+"u c #5AA651",
+"i c #5BA751",
+"p c #5EAC54",
+"a c #60A259",
+"s c #60A35A",
+"d c #61A35A",
+"f c #62A35B",
+"g c #64A65D",
+"h c #67A85F",
+"j c #62B057",
+"k c #62B158",
+"l c #65B45A",
+"z c #66B55B",
+"x c #68B85D",
+"c c #6ABA5F",
+"v c #6ABB5F",
+"b c #6FAF66",
+"n c #70B268",
+"m c #71B369",
+"M c #70B16A",
+"N c #76B56E",
+"B c #73B96D",
+"V c #76B86D",
+"C c #74BB70",
+"Z c #75BB70",
+"A c #77BC71",
+"S c #7AB972",
+"D c #78BD72",
+"F c #79BD74",
+"G c #7ABD74",
+"H c #7CBC75",
+"J c #7FBC76",
+"K c #7CBE76",
+"L c #7EBF77",
+"P c #7DBF78",
+"I c #7FC178",
+"U c #80C179",
+"Y c #84C57A",
+"T c #85C57B",
+"R c #82C27C",
+"E c #85C17E",
+"W c #87C27F",
+"Q c #86C47F",
+"! c #8BC785",
+"~ c #8CC685",
+"^ c #90CA87",
+"/ c #90CA89",
+"( c #91CA8A",
+") c #93CB8B",
+"_ c #92CC88",
+"` c #93CC8A",
+"' c #94CC8D",
+"] c #95CC8D",
+"[ c #96CE8D",
+"{ c #98CE90",
+"} c #99CE90",
+"| c #99CF91",
+" . c #9ACE91",
+".. c #9ACF92",
+"X. c #9BCF93",
+"o. c #9DD193",
+"O. c #9DD094",
+"+. c #9CD194",
+"@. c #9ED195",
+"#. c #9ED196",
+"$. c #9FD297",
+"%. c #A0D396",
+"&. c #A1D398",
+"*. c #A1D399",
+"=. c #A2D499",
+"-. c #A3D49B",
+";. c #A5D59C",
+":. c #A7D69E",
+">. c #A9D7A0",
+",. c None",
+/* pixels */
+",.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.",
+",.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.",
+",.,.,.,.,.,.,.,.,.,.,.i w ,.,.,.",
+",.,.,.,.,.x z j p i e m b 8 ,.,.",
+",.,.,.c Y [ *.:.&.&.X.} [ b 1 ,.",
+",.,.c ` >.%.-.*.#.X.} [ / f 1 ,.",
+",.,.Y :.:.} V e q 8 6 g s 1 ,.,.",
+",.z ` o.} y e ,.,.,.,.2 , ,.,.,.",
+",.k #.#.J w ,.,.,.,.,.,.,.,.,.,.",
+",.p [ } S q ,.,.,.,.,.,.,.,.,.,.",
+",.i W ^ ~ 8 5 ,.,.,.,.,.,.,.,.,.",
+",.,.M ) / W u 2 , - - & $ @ ,.,.",
+",.,.8 N ! I Q R U P G A Z O ,.,.",
+",.,.,.5 s M K K K G A C B X ,.,.",
+",.,.,.,.,.: - * % $ + O . ,.,.",
+",.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,."
+};
+
+
+/* XPM */
static char *arrow_rotate_clockwise[] = {
/* columns rows colors chars-per-pixel */
"16 16 97 2",
@@ -3557,125 +3846,45 @@ static char *database[] = {
/* XPM */
-static char *lightning[] = {
+static char *signal_gtkwave[] = {
/* columns rows colors chars-per-pixel */
-"16 16 99 2",
-" c #DAA223",
-". c #DAA323",
-"X c #DBA424",
-"o c #DBA524",
-"O c #DBA625",
-"+ c #DCA726",
-"@ c #DCA927",
-"# c #DEAB2B",
-"$ c #DEAC29",
-"% c #DFAE2B",
-"& c #DFAF2B",
-"* c #DDA82C",
-"= c #DEAA2E",
-"- c #DFAE2D",
-"; c #E0B12C",
-": c #E0B22D",
-"> c #E1B42E",
-", c #E2B62F",
-"< c #EBB62F",
-"1 c #E3B831",
-"2 c #E4BB33",
-"3 c #E5BD35",
-"4 c #E4BB3D",
-"5 c #E6C036",
-"6 c #E7C238",
-"7 c #EEC238",
-"8 c #E8C43A",
-"9 c #E9C73B",
-"0 c #EFC739",
-"q c #E9C93C",
-"w c #EACA3D",
-"e c #EACB3E",
-"r c #EBCC3F",
-"t c #F0C83A",
-"y c #F0C93C",
-"u c #F0CB3D",
-"i c #F1CD3F",
-"p c #F1CE3F",
-"a c #E3B448",
-"s c #E4B64A",
-"d c #E6BA4C",
-"f c #E7BC4F",
-"g c #ECBC4A",
-"h c #E6B951",
-"j c #E7BD55",
-"k c #ECCE40",
-"l c #E7C04A",
-"z c #ECCD4F",
-"x c #F0CA40",
-"c c #F2CE41",
-"v c #F1CF45",
-"b c #F2D042",
-"n c #F3D243",
-"m c #F3D344",
-"M c #F3D445",
-"N c #F4D647",
-"B c #F3D54A",
-"V c #F4D848",
-"C c #EBC756",
-"Z c #EAC658",
-"A c #EFD45B",
-"S c #EDCB62",
-"D c #F1D964",
-"F c #F3D56E",
-"G c #EECC70",
-"H c #EFC97A",
-"J c #F0CC7C",
-"K c #F1CE7E",
-"L c #F1CF7F",
-"P c #EFD070",
-"I c #F2DA75",
-"U c #F3D77F",
-"Y c #F7E172",
-"T c #F1CE80",
-"R c #F2D283",
-"E c #F2D384",
-"W c #F3D786",
-"Q c #F4D788",
-"! c #F4D989",
-"~ c #F5DB8A",
-"^ c #F5DB8B",
-"/ c #F5DC8A",
-"( c #F5DC8C",
-") c #F6DF8E",
-"_ c #F5E180",
-"` c #F6E08D",
-"' c #F8E68E",
-"] c #F7E291",
-"[ c #F7E391",
-"{ c #F8E693",
-"} c #F8E594",
-"| c #F9E993",
-" . c #F9E897",
-".. c #F9E998",
-"X. c #F9EA99",
-"o. c #F9EB99",
-"O. c #FAEB9A",
-"+. c #FAED9A",
-"@. c None",
+"16 16 19 1",
+" c #070905",
+". c #18270A",
+"X c #243910",
+"o c #325014",
+"O c #3E6617",
+"+ c #45701A",
+"@ c #446822",
+"# c #52861F",
+"$ c #599321",
+"% c #609D24",
+"& c #69AC27",
+"* c #74905A",
+"= c #7DA05B",
+"- c #7C9861",
+"; c #82A65E",
+": c #96BA73",
+"> c #9DC279",
+", c #A2C77D",
+"< c #AAD184",
/* pixels */
-"@. at .@. at .@. at .@. at .@. at .@. at .@. at .@. at .",
-"@. at .@.k r e q 9 8 6 5 3 2 1 @. at .",
-"@. at .@.r +.o. .} ] ) ^ C 1 @. at .@.",
-"@. at .r D O.V m p t ( S 1 @. at .@. at .",
-"@. at .w | Y M c y / P 4 @. at .@. at .@.",
-"@. at .A X.N b u F U l @. at .@. at .@. at .",
-"@.9 _ ' n i 0 ( Z @. at .@. at .@. at .@.",
-"@.z ..B v x 7 ! > ; % $ @ O . @.",
-"8 I { [ ` / ~ Q E L J H a . @. at .",
-"6 5 3 2 1 , W < g T h * @. at .@.",
-"@. at .@. at .@.: G R K s o @. at .@. at .@.",
-"@. at .@. at .@.& E j = X @. at .@. at .@. at .",
-"@. at .@. at .& f d + @. at .@. at .@. at .@. at .",
-"@. at .@. at .- # O @. at .@. at .@. at .@. at .@.",
-"@. at .@.$ @ @. at .@. at .@. at .@. at .@. at .@.",
-"@. at .@. at .@. at .@. at .@. at .@. at .@. at .@. at ."
+"<::,::<::<>><>><",
+"-.XX.. at oo@X XX.-",
+"* .. o&$$&O .. *",
+"*.oX.$+..@#.XX.-",
+"=oooo&OooO&oooo;",
+"* ...#X X#... *",
+"* . oOX .Oo.. *",
+"*Xoo$OoXXoO+ooX-",
+"=.oo%oo.Xoo%oo.=",
+"* .o+ X X +o. *",
+"* .+O X X O+. *",
+"=oo%+o at Xooo+%oo=",
+"*.o%X.o..o..%o.=",
+"*o&$ X X $&o*",
+"-X at o Xo .o. o at X-",
+"<>,,,<<,><<<<<<<"
};
@@ -4605,7 +4814,7 @@ GLOBALS->hiericon_package_pixmap=gdk_pixmap_create_from_xpm_d(window->window, &G
&style->bg[GTK_STATE_NORMAL], (gchar **)box);
GLOBALS->hiericon_signal_pixmap=gdk_pixmap_create_from_xpm_d(window->window, &GLOBALS->hiericon_signal_mask,
- &style->bg[GTK_STATE_NORMAL], (gchar **)lightning);
+ &style->bg[GTK_STATE_NORMAL], (gchar **)signal_gtkwave);
GLOBALS->hiericon_portin_pixmap=gdk_pixmap_create_from_xpm_d(window->window, &GLOBALS->hiericon_portin_mask,
&style->bg[GTK_STATE_NORMAL], (gchar **)door_in);
GLOBALS->hiericon_portout_pixmap=gdk_pixmap_create_from_xpm_d(window->window, &GLOBALS->hiericon_portout_mask,
@@ -4617,6 +4826,13 @@ GLOBALS->hiericon_buffer_pixmap=gdk_pixmap_create_from_xpm_d(window->window, &GL
GLOBALS->hiericon_linkage_pixmap=wave_gdk_pixmap_create_from_xpm_d(window->window, &GLOBALS->hiericon_linkage_mask,
&style->bg[GTK_STATE_NORMAL], (gchar **)icon_link);
+/* FSDB VHDL (on top of GHW's existing) */
+GLOBALS->hiericon_record_pixmap=gdk_pixmap_create_from_xpm_d(window->window, &GLOBALS->hiericon_record_mask,
+ &style->bg[GTK_STATE_NORMAL], (gchar **)cd_img);
+GLOBALS->hiericon_generate_pixmap=gdk_pixmap_create_from_xpm_d(window->window, &GLOBALS->hiericon_generate_mask,
+ &style->bg[GTK_STATE_NORMAL], (gchar **)arrow_redo);
+
+
#ifdef WAVE_USE_GTK2
/* set icon for window manager */
gp = xg_get_pixbuf_from_pix_and_mask(GLOBALS->wave_info_pixmap, GLOBALS->wave_info_mask, NULL);
diff --git a/src/tree.c b/src/tree.c
index 819a815..4f88c9d 100644
--- a/src/tree.c
+++ b/src/tree.c
@@ -495,6 +495,13 @@ switch(mode)
case TREE_VHDL_ST_BUFFER: pxm = GLOBALS->hiericon_buffer_pixmap; msk = GLOBALS->hiericon_buffer_mask; break;
case TREE_VHDL_ST_LINKAGE: pxm = GLOBALS->hiericon_linkage_pixmap; msk = GLOBALS->hiericon_linkage_mask; break;
+ case TREE_VHDL_ST_ARCHITECTURE: pxm = GLOBALS->hiericon_module_pixmap; msk = GLOBALS->hiericon_module_mask; break; /* same as TREE_VCD_ST_MODULE */
+ case TREE_VHDL_ST_FUNCTION: pxm = GLOBALS->hiericon_function_pixmap; msk = GLOBALS->hiericon_function_mask; break; /* same as TREE_VCD_ST_FUNCTION */
+ case TREE_VHDL_ST_PROCESS: pxm = GLOBALS->hiericon_task_pixmap; msk = GLOBALS->hiericon_task_mask; break; /* same as TREE_VCD_ST_TASK */
+ case TREE_VHDL_ST_PROCEDURE: pxm = GLOBALS->hiericon_class_pixmap; msk = GLOBALS->hiericon_class_mask; break; /* same as TREE_VCD_ST_CLASS */
+ case TREE_VHDL_ST_RECORD: pxm = GLOBALS->hiericon_record_pixmap; msk = GLOBALS->hiericon_record_mask; break;
+ case TREE_VHDL_ST_GENERATE: pxm = GLOBALS->hiericon_generate_pixmap; msk = GLOBALS->hiericon_generate_mask; break;
+
default: pxm = msk = NULL; break;
}
diff --git a/src/tree.h b/src/tree.h
index 857d155..71b179f 100644
--- a/src/tree.h
+++ b/src/tree.h
@@ -68,7 +68,7 @@ enum tree_kind
TREE_VCD_ST_PACKAGE,
TREE_VCD_ST_PROGRAM,
- /* VHDL scope types */
+ /* GHW VHDL scope types */
TREE_VHDL_ST_DESIGN,
TREE_VHDL_ST_BLOCK,
TREE_VHDL_ST_GENIF,
@@ -76,14 +76,21 @@ enum tree_kind
TREE_VHDL_ST_INSTANCE,
TREE_VHDL_ST_PACKAGE,
- /* VHDL signal types (still as part of scope in GHW) */
+ /* GHW VHDL signal types (still as part of scope in GHW) */
TREE_VHDL_ST_SIGNAL,
TREE_VHDL_ST_PORTIN,
TREE_VHDL_ST_PORTOUT,
TREE_VHDL_ST_PORTINOUT,
TREE_VHDL_ST_BUFFER,
- TREE_VHDL_ST_LINKAGE
-
+ TREE_VHDL_ST_LINKAGE,
+
+ /* FSDB VHDL scope types: FSDB also reuses/defines GHW's TREE_VHDL_ST_BLOCK, TREE_VHDL_ST_GENFOR, TREE_VHDL_ST_GENIF */
+ TREE_VHDL_ST_ARCHITECTURE,
+ TREE_VHDL_ST_FUNCTION,
+ TREE_VHDL_ST_PROCEDURE,
+ TREE_VHDL_ST_RECORD,
+ TREE_VHDL_ST_PROCESS,
+ TREE_VHDL_ST_GENERATE
};
#define WAVE_T_WHICH_UNDEFINED_COMPNAME (-1)
diff --git a/src/treesearch_gtk2.c b/src/treesearch_gtk2.c
index 5262bdd..9753443 100644
--- a/src/treesearch_gtk2.c
+++ b/src/treesearch_gtk2.c
@@ -42,7 +42,7 @@ enum { VIEW_DRAG_INACTIVE, TREE_TO_VIEW_DRAG_ACTIVE, SEARCH_TO_VIEW_DRAG_ACTIVE
/* The signal area is based on a tree view which requires a store model.
This store model contains the list of signals to be displayed.
*/
-enum { NAME_COLUMN, TREE_COLUMN, TYPE_COLUMN, DIR_COLUMN, N_COLUMNS };
+enum { NAME_COLUMN, TREE_COLUMN, TYPE_COLUMN, DIR_COLUMN, DTYPE_COLUMN, N_COLUMNS };
/* list of autocoalesced (synthesized) filter names that need to be freed at some point) */
@@ -134,6 +134,8 @@ fill_sig_store (void)
int vartype;
int vardir;
int is_tname = 0;
+ int wrexm;
+ int vardt;
if(i < 0) continue;
@@ -149,6 +151,12 @@ fill_sig_store (void)
vardir = 0;
}
+ vardt = GLOBALS->facs[i]->n->vardt;
+ if((vardt < 0) || (vardt > ND_VDT_MAX))
+ {
+ vardt = 0;
+ }
+
if(!GLOBALS->facs[i]->vec_root)
{
is_tname = 1;
@@ -180,7 +188,11 @@ fill_sig_store (void)
}
}
- if (GLOBALS->filter_str_treesearch_gtk2_c_1 == NULL || wave_regex_match(t->name, WAVE_REGEX_TREE))
+ if (
+ (GLOBALS->filter_str_treesearch_gtk2_c_1 == NULL) ||
+ ((!GLOBALS->filter_noregex_treesearch_gtk2_c_1) && (wrexm = wave_regex_match(t->name, WAVE_REGEX_TREE)) && (!GLOBALS->filter_matlen_treesearch_gtk2_c_1)) ||
+ (GLOBALS->filter_matlen_treesearch_gtk2_c_1 && (GLOBALS->filter_typ_treesearch_gtk2_c_1 == vardir) && wrexm)
+ )
{
gtk_list_store_prepend (GLOBALS->sig_store_treesearch_gtk2_c_1, &iter);
if(is_tname)
@@ -189,7 +201,8 @@ fill_sig_store (void)
NAME_COLUMN, s,
TREE_COLUMN, t,
TYPE_COLUMN, vartype_strings[vartype],
- DIR_COLUMN,vardir_strings[vardir],
+ DIR_COLUMN, vardir_strings[vardir],
+ DTYPE_COLUMN, vardatatype_strings[vardt],
-1);
if(s != t->name)
@@ -208,7 +221,8 @@ fill_sig_store (void)
NAME_COLUMN, s,
TREE_COLUMN, t,
TYPE_COLUMN, vartype_strings[vartype],
- DIR_COLUMN,vardir_strings[vardir],
+ DIR_COLUMN, vardir_strings[vardir],
+ DTYPE_COLUMN, vardatatype_strings[vardt],
-1);
}
}
@@ -635,9 +649,36 @@ gboolean filter_edit_cb (GtkWidget *widget, GdkEventKey *ev, gpointer *data)
GLOBALS->filter_str_treesearch_gtk2_c_1 = NULL;
else
{
+ int i;
+
GLOBALS->filter_str_treesearch_gtk2_c_1 = malloc_2(strlen(t) + 1);
strcpy(GLOBALS->filter_str_treesearch_gtk2_c_1, t);
- wave_regex_compile(GLOBALS->filter_str_treesearch_gtk2_c_1, WAVE_REGEX_TREE);
+
+ GLOBALS->filter_typ_treesearch_gtk2_c_1 = ND_DIR_UNSPECIFIED;
+ GLOBALS->filter_matlen_treesearch_gtk2_c_1 = 0;
+ GLOBALS->filter_noregex_treesearch_gtk2_c_1 = 0;
+
+ if(GLOBALS->filter_str_treesearch_gtk2_c_1[0] == '+')
+ {
+ for(i=0;i<=ND_DIR_MAX;i++)
+ {
+ int tlen = strlen(vardir_strings[i]);
+ if(!strncasecmp(vardir_strings[i], GLOBALS->filter_str_treesearch_gtk2_c_1 + 1, tlen))
+ {
+ if(GLOBALS->filter_str_treesearch_gtk2_c_1[tlen + 1] == '+')
+ {
+ GLOBALS->filter_matlen_treesearch_gtk2_c_1 = tlen + 2;
+ GLOBALS->filter_typ_treesearch_gtk2_c_1 = i;
+ if(GLOBALS->filter_str_treesearch_gtk2_c_1[tlen + 2] == 0)
+ {
+ GLOBALS->filter_noregex_treesearch_gtk2_c_1 = 1;
+ }
+ }
+ }
+ }
+ }
+
+ wave_regex_compile(GLOBALS->filter_str_treesearch_gtk2_c_1 + GLOBALS->filter_matlen_treesearch_gtk2_c_1, WAVE_REGEX_TREE);
}
fill_sig_store ();
}
@@ -1392,11 +1433,19 @@ do_tooltips:
case VCD_FILE:
case VCD_RECODER_FILE:
case DUMPLESS_FILE:
- column = gtk_tree_view_column_new_with_attributes ("Type",
+ column = gtk_tree_view_column_new_with_attributes (GLOBALS->supplemental_datatypes_encountered ? "VType" : "Type",
renderer,
"text", TYPE_COLUMN,
NULL);
gtk_tree_view_append_column (GTK_TREE_VIEW (sig_view), column);
+ if(GLOBALS->supplemental_datatypes_encountered)
+ {
+ column = gtk_tree_view_column_new_with_attributes ("DType",
+ renderer,
+ "text", DTYPE_COLUMN,
+ NULL);
+ gtk_tree_view_append_column (GTK_TREE_VIEW (sig_view), column);
+ }
break;
default:
break;
@@ -1458,22 +1507,18 @@ do_tooltips:
if(!GLOBALS->do_dynamic_treefilter)
{
gtkwave_signal_connect(GTK_OBJECT (GLOBALS->filter_entry), "key_press_event", (GtkSignalFunc) filter_edit_cb, NULL);
- gtk_tooltips_set_tip_2(tooltips, GLOBALS->filter_entry,
- "Add a POSIX filter. "
- "'.*' matches any number of characters,"
- " '.' matches any character. Hit Return to apply.",
- NULL);
}
else
{
gtkwave_signal_connect(GTK_OBJECT(GLOBALS->filter_entry), "changed", GTK_SIGNAL_FUNC(press_callback), NULL);
- gtk_tooltips_set_tip_2(tooltips, GLOBALS->filter_entry,
- "Add a POSIX filter. "
- "'.*' matches any number of characters,"
- " '.' matches any character.",
- NULL);
}
+ gtk_tooltips_set_tip_2(tooltips, GLOBALS->filter_entry,
+ "Add a POSIX filter. "
+ "'.*' matches any number of characters,"
+ " '.' matches any character. Hit Return to apply."
+ " The filter may be preceded with the port direction if it exists such as +I+, +O+, +IO+, etc.",
+ NULL);
gtk_box_pack_start (GTK_BOX (filter_hbox), GLOBALS->filter_entry, FALSE, FALSE, 1);
@@ -1631,7 +1676,7 @@ 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);
+ 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->sig_root_treesearch_gtk2_c_1 = GLOBALS->treeroot;
fill_sig_store ();
@@ -1667,11 +1712,19 @@ GtkWidget* treeboxframe(char *title, GtkSignalFunc func)
case VCD_FILE:
case VCD_RECODER_FILE:
case DUMPLESS_FILE:
- column = gtk_tree_view_column_new_with_attributes ("Type",
+ column = gtk_tree_view_column_new_with_attributes (GLOBALS->supplemental_datatypes_encountered ? "VType" : "Type",
renderer,
"text", TYPE_COLUMN,
NULL);
gtk_tree_view_append_column (GTK_TREE_VIEW (sig_view), column);
+ if(GLOBALS->supplemental_datatypes_encountered)
+ {
+ column = gtk_tree_view_column_new_with_attributes ("DType",
+ renderer,
+ "text", DTYPE_COLUMN,
+ NULL);
+ gtk_tree_view_append_column (GTK_TREE_VIEW (sig_view), column);
+ }
break;
default:
break;
@@ -1727,22 +1780,19 @@ GtkWidget* treeboxframe(char *title, GtkSignalFunc func)
if(!GLOBALS->do_dynamic_treefilter)
{
gtkwave_signal_connect(GTK_OBJECT (GLOBALS->filter_entry), "key_press_event", (GtkSignalFunc) filter_edit_cb, NULL);
- gtk_tooltips_set_tip_2(tooltips, GLOBALS->filter_entry,
- "Add a POSIX filter. "
- "'.*' matches any number of characters,"
- " '.' matches any character. Hit Return to apply.",
- NULL);
}
else
{
gtkwave_signal_connect(GTK_OBJECT(GLOBALS->filter_entry), "changed", GTK_SIGNAL_FUNC(press_callback), NULL);
- gtk_tooltips_set_tip_2(tooltips, GLOBALS->filter_entry,
- "Add a POSIX filter. "
- "'.*' matches any number of characters,"
- " '.' matches any character.",
- NULL);
}
+ gtk_tooltips_set_tip_2(tooltips, GLOBALS->filter_entry,
+ "Add a POSIX filter. "
+ "'.*' matches any number of characters,"
+ " '.' matches any character. Hit Return to apply."
+ " The filter may be preceded with the port direction if it exists such as +I+, +O+, +IO+, etc.",
+ NULL);
+
gtk_box_pack_start (GTK_BOX (filter_hbox), GLOBALS->filter_entry, FALSE, FALSE, 1);
gtk_box_pack_start (GTK_BOX (vbox), filter_hbox, FALSE, FALSE, 1);
diff --git a/src/vcd.c b/src/vcd.c
index b163fff..6c5c06b 100644
--- a/src/vcd.c
+++ b/src/vcd.c
@@ -1152,6 +1152,30 @@ for(;;)
case 'c': ttype = TREE_VCD_ST_CLASS; break;
case 'i': ttype = TREE_VCD_ST_INTERFACE; break;
case 'p': ttype = (GLOBALS->yytext_vcd_c_1[1] == 'r') ? TREE_VCD_ST_PROGRAM : TREE_VCD_ST_PACKAGE; break;
+
+ case 'v': {
+ char *vht = GLOBALS->yytext_vcd_c_1;
+ if(!strncmp(vht, "vhdl_", 5))
+ {
+ switch(vht[5])
+ {
+ case 'a': ttype = TREE_VHDL_ST_ARCHITECTURE; break;
+ case 'r': ttype = TREE_VHDL_ST_RECORD; break;
+ case 'b': ttype = TREE_VHDL_ST_BLOCK; break;
+ case 'g': ttype = TREE_VHDL_ST_GENERATE; break;
+ case 'i': ttype = TREE_VHDL_ST_GENIF; break;
+ case 'f': ttype = (vht[6] == 'u') ? TREE_VHDL_ST_FUNCTION : TREE_VHDL_ST_GENFOR; break;
+ case 'p': ttype = (!strncmp(vht+6, "roces", 5)) ? TREE_VHDL_ST_PROCESS: TREE_VHDL_ST_PROCEDURE; break;
+ default: ttype = TREE_UNKNOWN; break;
+ }
+ }
+ else
+ {
+ ttype = TREE_UNKNOWN;
+ }
+ }
+ break;
+
default: ttype = TREE_UNKNOWN;
break;
}
diff --git a/src/vcd_partial.c b/src/vcd_partial.c
index bcdb332..ad40179 100644
--- a/src/vcd_partial.c
+++ b/src/vcd_partial.c
@@ -1102,6 +1102,30 @@ for(;;)
case 'c': ttype = TREE_VCD_ST_CLASS; break;
case 'i': ttype = TREE_VCD_ST_INTERFACE; break;
case 'p': ttype = (GLOBALS->yytext_vcd_partial_c_2[1] == 'r') ? TREE_VCD_ST_PROGRAM : TREE_VCD_ST_PACKAGE; break;
+
+ case 'v': {
+ char *vht = GLOBALS->yytext_vcd_partial_c_2;
+ if(!strncmp(vht, "vhdl_", 5))
+ {
+ switch(vht[5])
+ {
+ case 'a': ttype = TREE_VHDL_ST_ARCHITECTURE; break;
+ case 'r': ttype = TREE_VHDL_ST_RECORD; break;
+ case 'b': ttype = TREE_VHDL_ST_BLOCK; break;
+ case 'g': ttype = TREE_VHDL_ST_GENERATE; break;
+ case 'i': ttype = TREE_VHDL_ST_GENIF; break;
+ case 'f': ttype = (vht[6] == 'u') ? TREE_VHDL_ST_FUNCTION : TREE_VHDL_ST_GENFOR; break;
+ case 'p': ttype = (!strncmp(vht+6, "roces", 5)) ? TREE_VHDL_ST_PROCESS: TREE_VHDL_ST_PROCEDURE; break;
+ default: ttype = TREE_UNKNOWN; break;
+ }
+ }
+ else
+ {
+ ttype = TREE_UNKNOWN;
+ }
+ }
+ break;
+
default: ttype = TREE_UNKNOWN;
break;
}
diff --git a/src/vcd_recoder.c b/src/vcd_recoder.c
index 43eb6fc..2f71afa 100644
--- a/src/vcd_recoder.c
+++ b/src/vcd_recoder.c
@@ -1492,6 +1492,30 @@ for(;;)
case 'c': ttype = TREE_VCD_ST_CLASS; break;
case 'i': ttype = TREE_VCD_ST_INTERFACE; break;
case 'p': ttype = (GLOBALS->yytext_vcd_recoder_c_3[1] == 'r') ? TREE_VCD_ST_PROGRAM : TREE_VCD_ST_PACKAGE; break;
+
+ case 'v': {
+ char *vht = GLOBALS->yytext_vcd_recoder_c_3;
+ if(!strncmp(vht, "vhdl_", 5))
+ {
+ switch(vht[5])
+ {
+ case 'a': ttype = TREE_VHDL_ST_ARCHITECTURE; break;
+ case 'r': ttype = TREE_VHDL_ST_RECORD; break;
+ case 'b': ttype = TREE_VHDL_ST_BLOCK; break;
+ case 'g': ttype = TREE_VHDL_ST_GENERATE; break;
+ case 'i': ttype = TREE_VHDL_ST_GENIF; break;
+ case 'f': ttype = (vht[6] == 'u') ? TREE_VHDL_ST_FUNCTION : TREE_VHDL_ST_GENFOR; break;
+ case 'p': ttype = (!strncmp(vht+6, "roces", 5)) ? TREE_VHDL_ST_PROCESS: TREE_VHDL_ST_PROCEDURE; break;
+ default: ttype = TREE_UNKNOWN; break;
+ }
+ }
+ else
+ {
+ ttype = TREE_UNKNOWN;
+ }
+ }
+ break;
+
default: ttype = TREE_UNKNOWN;
break;
}
diff --git a/src/wavewindow.c b/src/wavewindow.c
index 5d5ce20..9884da4 100644
--- a/src/wavewindow.c
+++ b/src/wavewindow.c
@@ -2408,6 +2408,7 @@ GLOBALS->signal_pixmap_width=maxlen+6; /* 2 * 3 pixel pad */
if(GLOBALS->tims.marker!=-1)
{
GLOBALS->signal_pixmap_width+=(vmaxlen+6);
+ if(GLOBALS->signal_pixmap_width > 32767) GLOBALS->signal_pixmap_width = 32767; /* fixes X11 protocol limitation crash */
}
if(GLOBALS->signal_pixmap_width<60) GLOBALS->signal_pixmap_width=60;
--
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