[Pkg-electronics-commits] [gtkwave] 01/03: Imported Upstream version 3.3.60

أحمد المحمودي (Ahmed El-Mahmoudy) aelmahmoudy at sabily.org
Thu Jun 5 09:38:09 UTC 2014


This is an automated email from the git hooks/post-receive script.

aelmahmoudy-guest pushed a commit to branch master
in repository gtkwave.

commit 01e8a653d903b8e207cfff39b371fce9634c4760
Author: أحمد المحمودي (Ahmed El-Mahmoudy) <aelmahmoudy at sabily.org>
Date:   Thu Jun 5 11:16:48 2014 +0300

    Imported Upstream version 3.3.60
---
 ChangeLog                        |   3 +
 configure                        |  20 +-
 configure.ac                     |   2 +-
 contrib/rtlbrowse/fgetdynamic.c  |   4 +-
 contrib/rtlbrowse/fgetdynamic.h  |   2 +-
 contrib/rtlbrowse/jrb.c          | 140 +++++------
 contrib/rtlbrowse/jrb.h          |  16 +-
 contrib/rtlbrowse/logfile.c      | 186 +++++++-------
 contrib/rtlbrowse/splay.c        |   2 +-
 contrib/rtlbrowse/stem_recurse.c |  50 ++--
 contrib/rtlbrowse/tcl_helper.c   |  24 +-
 contrib/rtlbrowse/tree_widget.c  |  10 +-
 contrib/rtlbrowse/vlex.c         |   8 +-
 src/ae2.c                        | 126 +++++-----
 src/ae2.h                        |   2 +-
 src/analyzer.c                   |  90 +++----
 src/analyzer.h                   |  36 +--
 src/baseconvert.c                | 218 ++++++++--------
 src/bitvec.c                     | 120 ++++-----
 src/bsearch.c                    |  22 +-
 src/bsearch.h                    |   2 +-
 src/busy.c                       |  14 +-
 src/busy.h                       |   2 +-
 src/clipping.c                   |   6 +-
 src/color.c                      |   6 +-
 src/color.h                      |   2 +-
 src/currenttime.c                |  46 ++--
 src/currenttime.h                |   2 +-
 src/debug.c                      |  30 +--
 src/debug.h                      |   6 +-
 src/discardbuttons.c             |   6 +-
 src/edgebuttons.c                |  52 ++--
 src/edgebuttons.h                |   2 +-
 src/entry.c                      |   2 +-
 src/extload.c                    | 126 +++++-----
 src/extload.h                    |   2 +-
 src/fetchbuttons.c               |  18 +-
 src/fgetdynamic.c                |   8 +-
 src/fgetdynamic.h                |   2 +-
 src/file.c                       |  36 +--
 src/fonts.c                      |  24 +-
 src/fonts.h                      |   6 +-
 src/fsdb_wrapper_api.cc          |   8 +-
 src/fsdb_wrapper_api.h           |   4 +-
 src/fst.c                        | 158 ++++++------
 src/fst.h                        |   2 +-
 src/gconf.c                      |   6 +-
 src/ghw.c                        |  64 ++---
 src/ghw.h                        |   2 +-
 src/ghwlib.c                     |  30 +--
 src/ghwlib.h                     |   4 +-
 src/globals.c                    | 178 ++++++-------
 src/globals.h                    |  42 ++--
 src/help.c                       |  18 +-
 src/helpers/evcd2vcd.c           |  58 ++---
 src/helpers/fst/fastlz.c         |  18 +-
 src/helpers/fst/fastlz.h         |  26 +-
 src/helpers/fst/fstapi.c         | 531 ++++++++++++++++++++-------------------
 src/helpers/fst/fstapi.h         |   4 +-
 src/helpers/fst2vcd.c            |  24 +-
 src/helpers/fstminer.c           |  30 +--
 src/helpers/ghwdump.c            |   6 +-
 src/helpers/lxt2_read.c          | 134 +++++-----
 src/helpers/lxt2_read.h          |  10 +-
 src/helpers/lxt2_write.c         | 120 ++++-----
 src/helpers/lxt2_write.h         |  22 +-
 src/helpers/lxt2miner.c          |  24 +-
 src/helpers/lxt2vcd.c            |  44 ++--
 src/helpers/lxt_write.c          | 154 ++++++------
 src/helpers/lxt_write.h          |  26 +-
 src/helpers/scopenav.c           |  16 +-
 src/helpers/shmidcat.c           |  14 +-
 src/helpers/v2l_analyzer.h       |  20 +-
 src/helpers/v2l_analyzer_lxt2.h  |  20 +-
 src/helpers/v2l_debug.c          |  28 +--
 src/helpers/v2l_debug.h          |  20 +-
 src/helpers/v2l_debug_lxt2.c     |  28 +--
 src/helpers/v2l_debug_lxt2.h     |  18 +-
 src/helpers/vcd2fst.c            |  96 +++----
 src/helpers/vcd2lxt.c            | 188 +++++++-------
 src/helpers/vcd2lxt2.c           | 176 ++++++-------
 src/helpers/vcd2vzt.c            | 178 ++++++-------
 src/helpers/vzt2vcd.c            |  46 ++--
 src/helpers/vzt_read.c           | 146 +++++------
 src/helpers/vzt_read.h           |  10 +-
 src/helpers/vzt_write.c          | 108 ++++----
 src/helpers/vzt_write.h          |  22 +-
 src/helpers/vztminer.c           |  26 +-
 src/hierpack.c                   |  18 +-
 src/hierpack.h                   |   2 +-
 src/hiersearch.c                 | 114 ++++-----
 src/interp.c                     |  10 +-
 src/jrb.c                        | 140 +++++------
 src/jrb.h                        |  16 +-
 src/logfile.c                    |  34 +--
 src/lx2.c                        |  74 +++---
 src/lx2.h                        |   2 +-
 src/lxt.c                        | 196 +++++++--------
 src/lxt.h                        |   4 +-
 src/main.c                       | 162 ++++++------
 src/main.h                       |   2 +-
 src/markerbox.c                  |  24 +-
 src/menu.c                       | 343 +++++++++++++------------
 src/menu.h                       |   6 +-
 src/mouseover.c                  |  28 +--
 src/mouseover_sigs.c             |  30 +--
 src/pagebuttons.c                |  10 +-
 src/pipeio.c                     |   2 +-
 src/pipeio.h                     |   2 +-
 src/pixmaps.c                    |  20 +-
 src/pixmaps.h                    |   2 +-
 src/print.c                      | 100 ++++----
 src/print.h                      |   2 +-
 src/ptranslate.c                 |  22 +-
 src/ptranslate.h                 |   2 +-
 src/rc.c                         |   2 +-
 src/rc.h                         |   2 +-
 src/regex.c                      |   6 +-
 src/renderopt.c                  |  42 ++--
 src/savefile.c                   | 148 +++++------
 src/search.c                     |  96 +++----
 src/shiftbuttons.c               |   8 +-
 src/showchange.c                 |   6 +-
 src/signalwindow.c               | 108 ++++----
 src/simplereq.c                  |   2 +-
 src/splash.c                     |  30 +--
 src/status.c                     |  24 +-
 src/strace.c                     | 104 ++++----
 src/strace.h                     |  54 ++--
 src/symbol.c                     |  52 ++--
 src/symbol.h                     |   4 +-
 src/tcl_commands.c               | 196 +++++++--------
 src/tcl_helper.c                 | 178 ++++++-------
 src/tcl_helper.h                 |   4 +-
 src/tcl_np.c                     |  90 +++----
 src/tcl_support_commands.c       |  64 ++---
 src/tcl_support_commands.h       |  12 +-
 src/timeentry.c                  |  40 +--
 src/translate.c                  |  22 +-
 src/translate.h                  |   2 +-
 src/tree.c                       |  40 +--
 src/tree.h                       |   2 +-
 src/tree_component.c             |   4 +-
 src/treesearch.c                 |   2 +-
 src/treesearch.h                 |   2 +-
 src/treesearch_gtk1.c            |  54 ++--
 src/treesearch_gtk2.c            | 130 +++++-----
 src/ttranslate.c                 | 106 ++++----
 src/ttranslate.h                 |   2 +-
 src/twinwave.c                   |  20 +-
 src/vcd.c                        | 184 +++++++-------
 src/vcd.h                        |  12 +-
 src/vcd_partial.c                | 228 ++++++++---------
 src/vcd_recoder.c                | 244 +++++++++---------
 src/vcd_saver.c                  | 122 ++++-----
 src/version.h                    |   2 +-
 src/vlist.c                      |  90 +++----
 src/vlist.h                      |   6 +-
 src/vzt.c                        |  84 +++----
 src/vzt.h                        |   2 +-
 src/wavealloca.h                 |   6 +-
 src/wavewindow.c                 | 472 +++++++++++++++++-----------------
 src/wavewindow.h                 |   2 +-
 src/zoombuttons.c                |  28 +--
 164 files changed, 4451 insertions(+), 4444 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 42a8df0..fe23cc6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1471,3 +1471,6 @@
 		Updated man page for gtkwave.1 indicating that XID is in hex.
 		Allow decimal conversions on popcnt filtered vectors that are
 		greater than 64 bits (they will never overflow).
+3.3.60	14may14	Fix MinGW tmpfile_open() patch from previous release as it
+		was using the wrong filename.
+		Harden fsdb reader against xtags that move backward in time.
diff --git a/configure b/configure
index cb17732..1a86f7c 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.59.
+# Generated by GNU Autoconf 2.69 for gtkwave 3.3.60.
 #
 # 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.59'
-PACKAGE_STRING='gtkwave 3.3.59'
+PACKAGE_VERSION='3.3.60'
+PACKAGE_STRING='gtkwave 3.3.60'
 PACKAGE_BUGREPORT='bybell at rocketmail.com'
 PACKAGE_URL=''
 
@@ -1382,7 +1382,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures gtkwave 3.3.59 to adapt to many kinds of systems.
+\`configure' configures gtkwave 3.3.60 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1448,7 +1448,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of gtkwave 3.3.59:";;
+     short | recursive ) echo "Configuration of gtkwave 3.3.60:";;
    esac
   cat <<\_ACEOF
 
@@ -1593,7 +1593,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-gtkwave configure 3.3.59
+gtkwave configure 3.3.60
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2237,7 +2237,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.59, which was
+It was created by gtkwave $as_me 3.3.60, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3104,7 +3104,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='gtkwave'
- VERSION='3.3.59'
+ VERSION='3.3.60'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -10959,7 +10959,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.59, which was
+This file was extended by gtkwave $as_me 3.3.60, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -11025,7 +11025,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.59
+gtkwave config.status 3.3.60
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index 99c7742..a87aae3 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.59, bybell at rocketmail.com)
+AC_INIT(gtkwave, 3.3.60, bybell at rocketmail.com)
 AC_CONFIG_SRCDIR([src/vcd.c])
 AM_INIT_AUTOMAKE
 AC_CONFIG_HEADER([config.h])
diff --git a/contrib/rtlbrowse/fgetdynamic.c b/contrib/rtlbrowse/fgetdynamic.c
index b61400f..3268c96 100644
--- a/contrib/rtlbrowse/fgetdynamic.c
+++ b/contrib/rtlbrowse/fgetdynamic.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999.
  *
  * This program is free software; you can redistribute it and/or
@@ -56,7 +56,7 @@ for(;;)
 		}
 	}
 
-if(!fgetmalloc_len) 
+if(!fgetmalloc_len)
 	{
 	return(NULL);
 	}
diff --git a/contrib/rtlbrowse/fgetdynamic.h b/contrib/rtlbrowse/fgetdynamic.h
index c538894..c387742 100644
--- a/contrib/rtlbrowse/fgetdynamic.h
+++ b/contrib/rtlbrowse/fgetdynamic.h
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999.
  *
  * This program is free software; you can redistribute it and/or
diff --git a/contrib/rtlbrowse/jrb.c b/contrib/rtlbrowse/jrb.c
index dee6359..7a8e580 100644
--- a/contrib/rtlbrowse/jrb.c
+++ b/contrib/rtlbrowse/jrb.c
@@ -12,19 +12,19 @@
 
 /* Original code by Jim Plank (plank at cs.utk.edu) */
 /* modified for THINK C 6.0 for Macintosh by Chris Bartley */
- 
+
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <ctype.h>
 #include "jrb.h"
- 
+
 static void mk_new_int(JRB l, JRB r, JRB p, int il);
 static JRB lprev(JRB n);
 static JRB rprev(JRB n);
 static void recolor(JRB n);
 static void single_rotate(JRB y, int l);
- 
+
 #define isred(n) (n->red)
 #define isblack(n) (!isred(n))
 #define isleft(n) (n->left)
@@ -47,19 +47,19 @@ static void single_rotate(JRB y, int l);
 #define setext(n) n->internal = 0
 #define setnormal(n) n->roothead = 0
 #define sibling(n) ((isleft(n)) ? n->parent->blink : n->parent->flink)
- 
+
 static void insert(JRB item, JRB list)	/* Inserts to the end of a list */
 {
   JRB last_node;
- 
+
   last_node = list->blink;
- 
+
   list->blink = item;
   last_node->flink = item;
   item->blink = last_node;
   item->flink = list;
 }
- 
+
 static void delete_item(JRB item)		/* Deletes an arbitrary iterm */
 {
   item->flink->blink = item->blink;
@@ -74,11 +74,11 @@ static void delete_item(JRB item)		/* Deletes an arbitrary iterm */
   setblack(new);\
   setnormal(new);\
 }
- 
+
 static void mk_new_int(JRB l, JRB r, JRB p, int il)
 {
   JRB newnode;
- 
+
   newnode = (JRB) calloc(1, sizeof(struct jrb_node));
   setint(newnode);
   setred(newnode);
@@ -103,9 +103,9 @@ static void mk_new_int(JRB l, JRB r, JRB p, int il)
     p->blink = newnode;
   }
   recolor(newnode);
-}  
-  
-   
+}
+
+
 JRB lprev(JRB n)
 {
   if (ishead(n)) return n;
@@ -115,7 +115,7 @@ JRB lprev(JRB n)
   }
   return n->parent;
 }
- 
+
 JRB rprev(JRB n)
 {
   if (ishead(n)) return n;
@@ -125,11 +125,11 @@ JRB rprev(JRB n)
   }
   return n->parent;
 }
- 
+
 JRB make_jrb(void)
 {
   JRB head;
- 
+
   head = (JRB) calloc (1, sizeof(struct jrb_node));
   head->flink = head;
   head->blink = head;
@@ -138,11 +138,11 @@ JRB make_jrb(void)
   sethead(head);
   return head;
 }
- 
+
 JRB jrb_find_gte_str(JRB n, char *key, int *fnd)
 {
   int cmp;
- 
+
   *fnd = 0;
   if (!ishead(n)) {
     fprintf(stderr, "jrb_find_gte_str called on non-head 0x%p\n", (void *)n);
@@ -152,9 +152,9 @@ JRB jrb_find_gte_str(JRB n, char *key, int *fnd)
   cmp = strcmp(key, n->blink->key.s);
   if (cmp == 0) {
     *fnd = 1;
-    return n->blink; 
+    return n->blink;
   }
-  if (cmp > 0) return n; 
+  if (cmp > 0) return n;
   else n = n->parent;
   while (1) {
     if (isext(n)) return n;
@@ -166,7 +166,7 @@ JRB jrb_find_gte_str(JRB n, char *key, int *fnd)
     if (cmp < 0) n = n->flink ; else n = n->blink;
   }
 }
- 
+
 JRB jrb_find_str(JRB n, char *key)
 {
   int fnd;
@@ -174,7 +174,7 @@ JRB jrb_find_str(JRB n, char *key)
   j = jrb_find_gte_str(n, key, &fnd);
   if (fnd) return j; else return NULL;
 }
- 
+
 JRB jrb_find_gte_int(JRB n, int ikey, int *fnd)
 {
   *fnd = 0;
@@ -185,9 +185,9 @@ JRB jrb_find_gte_int(JRB n, int ikey, int *fnd)
   if (n->parent == n) return n;
   if (ikey == n->blink->key.i) {
     *fnd = 1;
-    return n->blink; 
+    return n->blink;
   }
-  if (ikey > n->blink->key.i) return n; 
+  if (ikey > n->blink->key.i) return n;
   else n = n->parent;
   while (1) {
     if (isext(n)) return n;
@@ -198,7 +198,7 @@ JRB jrb_find_gte_int(JRB n, int ikey, int *fnd)
     n = (ikey < getlext(n)->key.i) ? n->flink : n->blink;
   }
 }
- 
+
 JRB jrb_find_int(JRB n, int ikey)
 {
   int fnd;
@@ -218,9 +218,9 @@ JRB jrb_find_gte_vptr(JRB n, void *vkey, int *fnd)
   if (n->parent == n) return n;
   if ((char *)vkey == (char *)n->blink->key.v) {
     *fnd = 1;
-    return n->blink; 
+    return n->blink;
   }
-  if ((char *)vkey > (char *)n->blink->key.v) return n; 
+  if ((char *)vkey > (char *)n->blink->key.v) return n;
   else n = n->parent;
   while (1) {
     if (isext(n)) return n;
@@ -231,7 +231,7 @@ JRB jrb_find_gte_vptr(JRB n, void *vkey, int *fnd)
     n = ((char *)vkey < (char *)getlext(n)->key.v) ? n->flink : n->blink;
   }
 }
- 
+
 JRB jrb_find_vptr(JRB n, void *vkey)
 {
   int fnd;
@@ -240,11 +240,11 @@ JRB jrb_find_vptr(JRB n, void *vkey)
   j = jrb_find_gte_vptr(n, vkey, &fnd);
   if (fnd) return j; else return NULL;
 }
- 
+
 JRB jrb_find_gte_gen(JRB n, Jval key,int (*fxn)(Jval, Jval), int *fnd)
 {
   int cmp;
- 
+
   *fnd = 0;
   if (!ishead(n)) {
     fprintf(stderr, "jrb_find_gte_str called on non-head 0x%p\n", (void *)n);
@@ -254,9 +254,9 @@ JRB jrb_find_gte_gen(JRB n, Jval key,int (*fxn)(Jval, Jval), int *fnd)
   cmp = (*fxn)(key, n->blink->key);
   if (cmp == 0) {
     *fnd = 1;
-    return n->blink; 
+    return n->blink;
   }
-  if (cmp > 0) return n; 
+  if (cmp > 0) return n;
   else n = n->parent;
   while (1) {
     if (isext(n)) return n;
@@ -268,7 +268,7 @@ JRB jrb_find_gte_gen(JRB n, Jval key,int (*fxn)(Jval, Jval), int *fnd)
     if (cmp < 0) n = n->flink ; else n = n->blink;
   }
 }
- 
+
 JRB jrb_find_gen(JRB n, Jval key, int (*fxn)(Jval, Jval))
 {
   int fnd;
@@ -277,11 +277,11 @@ JRB jrb_find_gen(JRB n, Jval key, int (*fxn)(Jval, Jval))
   j = jrb_find_gte_gen(n, key, fxn, &fnd);
   if (fnd) return j; else return NULL;
 }
- 
+
 static JRB jrb_insert_b(JRB n, Jval key, Jval val)
 {
   JRB newleft, newright, newnode, p;
- 
+
   if (ishead(n)) {
     if (n->parent == n) {         /* Tree is empty */
       mk_new_ext(newnode, key, val);
@@ -307,30 +307,30 @@ static JRB jrb_insert_b(JRB n, Jval key, Jval val)
     mk_new_int(newleft, n, n->parent, isleft(n));
     p = lprev(newleft);
     if (!ishead(p)) setrext(p, newleft);
-    return newleft;    
+    return newleft;
   }
 }
- 
+
 static void recolor(JRB n)
-{  
+{
   JRB p, gp, s;
   int done = 0;
- 
+
   while(!done) {
     if (isroot(n)) {
       setblack(n);
       return;
     }
- 
+
     p = n->parent;
- 
+
     if (isblack(p)) return;
-    
+
     if (isroot(p)) {
       setblack(p);
       return;
     }
- 
+
     gp = p->parent;
     s = sibling(p);
     if (isred(s)) {
@@ -343,7 +343,7 @@ static void recolor(JRB n)
     }
   }
   /* p's sibling is black, p is red, gp is black */
-  
+
   if ((isleft(n) == 0) == (isleft(p) == 0)) {
     single_rotate(gp, isleft(n));
     setblack(p);
@@ -355,34 +355,34 @@ static void recolor(JRB n)
     setred(gp);
   }
 }
- 
+
 static void single_rotate(JRB y, int l)
 {
   int rl = 0, ir;
   JRB x, yp;
- 
+
   ir = isroot(y);
   yp = y->parent;
   if (!ir) {
     rl = isleft(y);
   }
-  
+
   if (l) {
     x = y->flink;
     y->flink = x->blink;
     setleft(y->flink);
     y->flink->parent = y;
     x->blink = y;
-    setright(y);  
+    setright(y);
   } else {
     x = y->blink;
     y->blink = x->flink;
     setright(y->blink);
     y->blink->parent = y;
     x->flink = y;
-    setleft(y);  
+    setleft(y);
   }
- 
+
   x->parent = yp;
   y->parent = x;
   if (ir) {
@@ -399,12 +399,12 @@ static void single_rotate(JRB y, int l)
     }
   }
 }
-    
+
 void jrb_delete_node(JRB n)
 {
   JRB s, p, gp;
   char ir;
- 
+
   if (isint(n)) {
     fprintf(stderr, "Cannot delete an internal node: 0x%p\n", (void *)n);
     exit(1);
@@ -419,7 +419,7 @@ void jrb_delete_node(JRB n)
     p->parent = p;
     free(n);
     return;
-  } 
+  }
   s = sibling(n);    /* The only node after deletion */
   if (isroot(p)) {
     s->parent = p->parent;
@@ -441,9 +441,9 @@ void jrb_delete_node(JRB n)
   ir = isred(p);
   free(p);
   free(n);
-  
+
   if (isext(s)) {      /* Update proper rext and lext values */
-    p = lprev(s); 
+    p = lprev(s);
     if (!ishead(p)) setrext(p, s);
     p = rprev(s);
     if (!ishead(p)) setlext(p, s);
@@ -458,15 +458,15 @@ void jrb_delete_node(JRB n)
     setblack(s);
     return;
   }
- 
+
   if (ir) return;
- 
+
   /* Recolor */
-  
+
   n = s;
   p = n->parent;
   s = sibling(n);
-  while(isblack(p) && isblack(s) && isint(s) && 
+  while(isblack(p) && isblack(s) && isint(s) &&
         isblack(s->flink) && isblack(s->blink)) {
     setred(s);
     n = p;
@@ -474,25 +474,25 @@ void jrb_delete_node(JRB n)
     p = n->parent;
     s = sibling(n);
   }
-  
+
   if (isblack(p) && isred(s)) {  /* Rotation 2.3b */
     single_rotate(p, isright(n));
     setred(p);
     setblack(s);
     s = sibling(n);
   }
-    
+
   { JRB x, z; char il;
-    
+
     if (isext(s)) {
       fprintf(stderr, "DELETION ERROR: sibling not internal\n");
       exit(1);
     }
- 
+
     il = isleft(n);
     x = il ? s->flink : s->blink ;
     z = sibling(x);
- 
+
     if (isred(z)) {  /* Rotation 2.3f */
       single_rotate(p, !il);
       setblack(z);
@@ -520,7 +520,7 @@ void jrb_delete_node(JRB n)
     }
   }
 }
- 
+
 int jrb_nblack(JRB n)
 {
   int nb;
@@ -536,7 +536,7 @@ int jrb_nblack(JRB n)
   }
   return nb;
 }
- 
+
 int jrb_plength(JRB n)
 {
   int pl;
@@ -552,25 +552,25 @@ int jrb_plength(JRB n)
   }
   return pl;
 }
- 
+
 void jrb_free_tree(JRB n)
 {
   if (!ishead(n)) {
     fprintf(stderr, "ERROR: Rb_free_tree called on a non-head node\n");
     exit(1);
   }
- 
+
   while(jrb_first(n) != jrb_nil(n)) {
     jrb_delete_node(jrb_first(n));
   }
   free(n);
 }
- 
+
 Jval jrb_val(JRB n)
 {
   return n->val;
 }
- 
+
 JRB jrb_insert_str(JRB tree, char *key, Jval val)
 {
   Jval k;
@@ -600,7 +600,7 @@ JRB jrb_insert_vptr(JRB tree, void *vkey, Jval val)
 
 JRB jrb_insert_gen(JRB tree, Jval key, Jval val,
                           int (*func)(Jval, Jval))
-{ 
+{
   int fnd;
 
   return jrb_insert_b(jrb_find_gte_gen(tree, key, func, &fnd), key, val);
diff --git a/contrib/rtlbrowse/jrb.h b/contrib/rtlbrowse/jrb.h
index 690c7b4..e08d79c 100644
--- a/contrib/rtlbrowse/jrb.h
+++ b/contrib/rtlbrowse/jrb.h
@@ -75,15 +75,15 @@ extern JRB jrb_find_gen(JRB root, Jval, int (*func)(Jval, Jval));
 extern JRB jrb_find_gte_str(JRB root, char *key, int *found);
 extern JRB jrb_find_gte_int(JRB root, int ikey, int *found);
 extern JRB jrb_find_gte_vptr(JRB root, void *vkey, int *found);
-extern JRB jrb_find_gte_gen(JRB root, Jval key, 
+extern JRB jrb_find_gte_gen(JRB root, Jval key,
                               int (*func)(Jval, Jval), int *found);
 
 
-/* Creates a node with key key and val val and inserts it into the 
-   tree before/after node nd.  Does not check to ensure that you are 
+/* Creates a node with key key and val val and inserts it into the
+   tree before/after node nd.  Does not check to ensure that you are
    keeping the correct order */
 
-extern void jrb_delete_node(JRB node);  /* Deletes and frees a node (but 
+extern void jrb_delete_node(JRB node);  /* Deletes and frees a node (but
                                               not the key or val) */
 extern void jrb_free_tree(JRB root);  /* Deletes and frees an entire tree */
 
@@ -94,7 +94,7 @@ extern int jrb_nblack(JRB n); /* returns # of black nodes in path from
                                     n to the root */
 int jrb_plength(JRB n);       /* returns the # of nodes in path from
 				    n to the root */
- 
+
 #define jrb_first(n) (n->flink)
 #define jrb_last(n) (n->blink)
 #define jrb_next(n) (n->flink)
@@ -103,12 +103,12 @@ int jrb_plength(JRB n);       /* returns the # of nodes in path from
 #ifndef jrb_nil
 #define jrb_nil(t) (t)
 #endif
- 
+
 #define jrb_traverse(ptr, lst) \
   for(ptr = jrb_first(lst); ptr != jrb_nil(lst); ptr = jrb_next(ptr))
- 
+
 #define jrb_rtraverse(ptr, lst) \
   for(ptr = jrb_last(lst); ptr != jrb_nil(lst); ptr = jrb_prev(ptr))
- 
+
 #endif
 
diff --git a/contrib/rtlbrowse/logfile.c b/contrib/rtlbrowse/logfile.c
index 5d2d4a3..6cc0e9b 100644
--- a/contrib/rtlbrowse/logfile.c
+++ b/contrib/rtlbrowse/logfile.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2012.
  *
  * This program is free software; you can redistribute it and/or
@@ -170,26 +170,26 @@ static void
 forward_chars_with_skipping (GtkTextIter *iter,
                              gint         count)
 {
-     
+
   gint i;
 
   g_return_if_fail (count >= 0);
-  
+
   i = count;
-        
+
   while (i > 0)
     {
       gboolean ignored = FALSE;
 
       if (gtk_text_iter_get_char (iter) == 0xFFFC)
         ignored = TRUE;
-             
+
       gtk_text_iter_forward_char (iter);
-  
+
       if (!ignored)
         --i;
     }
-}     
+}
 
 static gboolean iter_forward_search_caseins(
                               const GtkTextIter *iter,
@@ -233,7 +233,7 @@ for(;;)
 	found = strstr(line_text, strcaseins);
 	if(found)
 		{
-		gchar cached = *found; 
+		gchar cached = *found;
 		*found = 0;
 		offset = g_utf8_strlen (line_text, -1);
 		*found = cached;
@@ -242,7 +242,7 @@ for(;;)
 	g_free (line_text);
 
 	start = next;
-	} 
+	}
 
 *match_start = start;
 forward_chars_with_skipping (match_start, offset);
@@ -281,7 +281,7 @@ if((tr) && (tr->text))
 		}
 
 
-	if(str) 
+	if(str)
 		{
 		if(!matchcase_active)
 			{
@@ -314,7 +314,7 @@ if((tr) && (tr->text))
 #endif
 		read_insert_position(tr);
 		tr->srch_line = tr->line;
-		tr->srch_offs = tr->offs;		
+		tr->srch_offs = tr->offs;
 
 		/* tm = gtk_text_buffer_get_insert(tb); */ /* scan-build : never read */
 
@@ -395,7 +395,7 @@ if((tr) && (tr->text))
 		gtk_text_iter_backward_char(&iter);
 		}
 
-	if(str) 
+	if(str)
 		{
 		if(!matchcase_active)
 			{
@@ -414,7 +414,7 @@ if((tr) && (tr->text))
 				}
 				else
 				{
-				found = gtk_text_iter_backward_search(&iter, str, GTK_TEXT_SEARCH_TEXT_ONLY, &match_start, &match_end, NULL);		
+				found = gtk_text_iter_backward_search(&iter, str, GTK_TEXT_SEARCH_TEXT_ONLY, &match_start, &match_end, NULL);
 				}
 			}
 		}
@@ -428,7 +428,7 @@ if((tr) && (tr->text))
 #endif
 		read_insert_position(tr);
 		tr->srch_line = tr->line;
-		tr->srch_offs = tr->offs;		
+		tr->srch_offs = tr->offs;
 
 		/* tm = gtk_text_buffer_get_insert(tb); */ /* scan-build : never read */
 		gtk_text_view_scroll_to_iter(GTK_TEXT_VIEW(tr->text), &match_start, 0.0, TRUE, 0.0, 0.5);
@@ -472,7 +472,7 @@ gboolean find_edit_cb (GtkWidget *widget, GdkEventKey *ev, gpointer *data)
 	{
 	}
       else
-        { 
+        {
 	search_string = strdup(t);
         }
 
@@ -487,7 +487,7 @@ matchcase_active = (GTK_TOGGLE_BUTTON(widget)->active != 0);
 tr_search_forward(search_string, TRUE);
 }
 
- 
+
 static
 void press_callback (GtkWidget *widget, gpointer *data)
 {
@@ -521,10 +521,10 @@ void create_toolbar(GtkWidget *table)
     find_label = gtk_label_new ("Find:");
     gtk_widget_show (find_label);
     gtk_box_pack_start (GTK_BOX (hbox), find_label, FALSE, FALSE, 0);
-    
+
     find_entry = gtk_entry_new ();
     gtk_widget_show (find_entry);
-    
+
     gtk_signal_connect(GTK_OBJECT(find_entry), "changed", GTK_SIGNAL_FUNC(press_callback), NULL);
     gtk_signal_connect(GTK_OBJECT (find_entry), "key_press_event", (GtkSignalFunc) find_edit_cb, NULL);
     gtk_box_pack_start (GTK_BOX (hbox), find_entry, FALSE, FALSE, 0);
@@ -548,7 +548,7 @@ void create_toolbar(GtkWidget *table)
     style->xthickness = style->ythickness = 0;
     gtk_widget_set_style (stock, style);
     gtk_widget_show(stock);
-        
+
     stock = gtk_toolbar_insert_stock(GTK_TOOLBAR(tb),
                                                  GTK_STOCK_GO_FORWARD,
                                                  "Search Forward",
@@ -581,7 +581,7 @@ static char *tmpnam_rtlbrowse(char *s, int *fd)
 *fd = -1;
 return(tmpnam(s));
 
-#else    
+#else
 
 char *backpath = "gtkwaveXXXXXX";
 char *tmpspace;
@@ -597,7 +597,7 @@ for(i=0;i<len;i++)
                 break;
                 }
         }
-         
+
 tmpspace = malloc(len + 1 + strlen(backpath) + 1);
 sprintf(tmpspace, "%s%c%s", P_tmpdir, slash, backpath);
 *fd = mkstemp(tmpspace);
@@ -607,7 +607,7 @@ if(*fd<0)
         perror("Why");
         exit(255);
         }
-         
+
 return(tmpspace);
 
 #endif
@@ -626,7 +626,7 @@ static char *hexify(char *s)
 {
 int len = strlen(s);
 
-if(len < 4) 
+if(len < 4)
 	{
 	char *s2 = malloc(len+1+1);
 	int idx;
@@ -693,12 +693,12 @@ if(len < 4)
 
 		if(isx)
 			{
-			*(pnt++) = (isx==4) ? 'x' : 'X';	
+			*(pnt++) = (isx==4) ? 'x' : 'X';
 			}
 		else
 		if(isz)
 			{
-			*(pnt++) = (isz==4) ? 'z' : 'Z';	
+			*(pnt++) = (isz==4) ? 'z' : 'Z';
 			}
 		else
 			{
@@ -741,7 +741,7 @@ for(;;)
 			break;
 		}
 
-	if(c1 != c2) { return(1); } 
+	if(c1 != c2) { return(1); }
 	if(!c1) break;
 
 	s1++; s2++;
@@ -769,7 +769,7 @@ static void DNDBeginCB(
 /* nothing */
 }
 
-static void DNDEndCB(  
+static void DNDEndCB(
         GtkWidget *widget, GdkDragContext *dc, gpointer data
 )
 {
@@ -821,9 +821,9 @@ if(((void *)widget->window) == pressWindow)
 	gtk_text_iter_forward_char(&end);
 	ok = 1;
 #endif
-	} 
-   
-pressWindow = NULL;     
+	}
+
+pressWindow = NULL;
 
 if(ok)
        	{
@@ -871,7 +871,7 @@ if(ok)
 			sel = sel2;
 			sel2 = NULL;
 			}
-                        
+
 		/* gtk_text_buffer_delete_selection (GTK_TEXT_VIEW(text)->buffer, 0, 0); ...no need to delete because of update_ctx_when_idle() */
 		}
 
@@ -894,7 +894,7 @@ if(oe->has_selection)
 	}
 #endif
 
-if(sel) 
+if(sel)
 	{
 	JRB strs, node;
 	int fd;
@@ -910,7 +910,7 @@ if(sel)
         	return;
         	}
 	fprintf(handle, "%s", sel);
-	fclose(handle); 
+	fclose(handle);
 	if(fd>=0) close(fd);
 
 	v_preproc_name = fname;
@@ -935,7 +935,7 @@ if(sel)
 					{
 					jrb_insert_str(strs, strdup(pnt), jv);
 					cnt++;
-					} 
+					}
 				}
                         }
 		else if(lx==V_IGNORE)
@@ -1016,7 +1016,7 @@ if(sel)
 void log_text(GtkWidget *text, GdkFont *font, char *str)
 {
 #if defined(WAVE_USE_GTK2) && !defined(GTK_ENABLE_BROKEN)
-gtk_text_buffer_insert_with_tags (GTK_TEXT_VIEW (text)->buffer, &iterx,  
+gtk_text_buffer_insert_with_tags (GTK_TEXT_VIEW (text)->buffer, &iterx,
                                  str, -1, mono_tag, size_tag, NULL);
 #else
 gtk_text_insert (GTK_TEXT (text), font, &text->style->black, NULL, str, -1);
@@ -1026,7 +1026,7 @@ gtk_text_insert (GTK_TEXT (text), font, &text->style->black, NULL, str, -1);
 void log_text_bold(GtkWidget *text, GdkFont *font, char *str)
 {
 #if defined(WAVE_USE_GTK2) && !defined(GTK_ENABLE_BROKEN)
-gtk_text_buffer_insert_with_tags (GTK_TEXT_VIEW (text)->buffer, &iterx,  
+gtk_text_buffer_insert_with_tags (GTK_TEXT_VIEW (text)->buffer, &iterx,
                                  str, -1, bold_tag, mono_tag, size_tag, fwht_tag, blue_tag, NULL);
 #else
 gtk_text_insert (GTK_TEXT (text), font, &text->style->fg[GTK_STATE_SELECTED], &text->style->bg[GTK_STATE_SELECTED], str, -1);
@@ -1210,7 +1210,7 @@ if(oe->has_selection)
 	if(oec->get_chars)
 		{
 	 	sel = oec->get_chars(oe, oe->selection_start_pos, oe->selection_end_pos);
-	
+
 		if(sel)
 			{
 			if(strlen(sel))
@@ -1235,7 +1235,7 @@ if(oe->has_selection)
 					{
 					break;
 					}
-				lft--;				
+				lft--;
 				}
 
 			rgh--;
@@ -1304,7 +1304,7 @@ scroll_event( GtkWidget * widget, GdkEventScroll * event, gpointer text)
 }
 #endif
 
-   
+
 /* Create a scrolled text area that displays a "message" */
 static GtkWidget *create_log_text (GtkWidget **textpnt)
 {
@@ -1331,17 +1331,17 @@ fwht_tag = gtk_text_buffer_create_tag (GTK_TEXT_VIEW (text)->buffer, "white_fore
 blue_tag = gtk_text_buffer_create_tag (GTK_TEXT_VIEW (text)->buffer, "blue_background",
 			      "background", "blue", NULL);
 #ifdef MAC_INTEGRATION
-mono_tag = gtk_text_buffer_create_tag (GTK_TEXT_VIEW (text)->buffer, "monospace", 
+mono_tag = gtk_text_buffer_create_tag (GTK_TEXT_VIEW (text)->buffer, "monospace",
 					"family", "monospace", NULL);
 size_tag = gtk_text_buffer_create_tag (GTK_TEXT_VIEW (text)->buffer, "fsiz",
 					"size", 10 * PANGO_SCALE, NULL);
 #else
-mono_tag = gtk_text_buffer_create_tag (GTK_TEXT_VIEW (text)->buffer, "monospace", 
+mono_tag = gtk_text_buffer_create_tag (GTK_TEXT_VIEW (text)->buffer, "monospace",
 					"family", "monospace", NULL);
 size_tag = gtk_text_buffer_create_tag (GTK_TEXT_VIEW (text)->buffer, "fsiz",
 					"size", 8 * PANGO_SCALE, NULL);
 #endif
-#else                                  
+#else
 text = gtk_text_new (NULL, NULL);
 #endif
 *textpnt = text;
@@ -1349,8 +1349,8 @@ gtk_table_attach (GTK_TABLE (table), text, 0, 14, 0, 1,
                         GTK_FILL | GTK_EXPAND,
                         GTK_FILL | GTK_SHRINK | GTK_EXPAND, 0, 0);
 gtk_widget_set_usize(GTK_WIDGET(text), 100, 100);
-#if defined(WAVE_USE_GTK2) && !defined(GTK_ENABLE_BROKEN)  
-gtk_text_view_set_editable(GTK_TEXT_VIEW(text), FALSE); 
+#if defined(WAVE_USE_GTK2) && !defined(GTK_ENABLE_BROKEN)
+gtk_text_view_set_editable(GTK_TEXT_VIEW(text), FALSE);
 #else
 gtk_text_set_editable(GTK_TEXT(text), FALSE);
 #endif
@@ -1360,11 +1360,11 @@ gtk_widget_show (text);
 #if defined(WAVE_USE_GTK2) && !defined(GTK_ENABLE_BROKEN)
 {
 GtkTextViewClass *tc = (GtkTextViewClass*)GTK_OBJECT_GET_CLASS(GTK_OBJECT(text));
- 
+
 tc->set_scroll_adjustments(GTK_TEXT_VIEW (text), NULL, NULL);
-vscrollbar = gtk_vscrollbar_new (GTK_TEXT_VIEW (text)->vadjustment);  
+vscrollbar = gtk_vscrollbar_new (GTK_TEXT_VIEW (text)->vadjustment);
 }
-#else                                  
+#else
 vscrollbar = gtk_vscrollbar_new (GTK_TEXT (text)->vadj);
 #endif
 gtk_table_attach (GTK_TABLE (table), vscrollbar, 15, 16, 0, 1,
@@ -1374,7 +1374,7 @@ gtk_widget_show (vscrollbar);
 /* Add a handler to put a message in the text widget when it is realized */
 gtk_signal_connect (GTK_OBJECT (text), "realize",
                         GTK_SIGNAL_FUNC (log_realize_text), NULL);
-	
+
 gtk_signal_connect(GTK_OBJECT(text), "button_release_event",
                        GTK_SIGNAL_FUNC(button_release_event), NULL);
 
@@ -1389,7 +1389,7 @@ gtk_text_set_line_wrap(GTK_TEXT(text), TRUE);
 #endif
 return(table);
 }
-   
+
 /***********************************************************************************/
 
 static void ok_callback(GtkWidget *widget, struct logfile_context_t *ctx)
@@ -1416,7 +1416,7 @@ if(textview_or_dummy == NULL)
 			{
 			old_marker_set = anno_ctx->marker_set;
 			old_marker = anno_ctx->marker;
-			}	
+			}
 			else
 			{
 			return(TRUE);
@@ -1435,7 +1435,7 @@ while(t)
 		{
 		if(textview_or_dummy != (gpointer)(t->text))
 			{
-			t = t->next; 
+			t = t->next;
 			continue;
 			}
 		}
@@ -1471,7 +1471,7 @@ while(t)
 			vadj->value = vvalue;
 			gtk_signal_emit_by_name (GTK_OBJECT (vadj), "changed");
 			gtk_signal_emit_by_name (GTK_OBJECT (vadj), "value_changed");
-#else			
+#else
 			GtkText *text = GTK_TEXT(t->text);
 			GtkAdjustment *vadj = GTK_TEXT (t->text)->vadj;
 			gdouble vvalue = vadj->value;
@@ -1571,7 +1571,7 @@ if(ctx)
 static gint destroy_via_closebutton_release(GtkWidget *widget, GdkEventButton *event)
 {
 if((event->x<0)||(event->x>=widget->allocation.width)||(event->y<0)||(event->y>=widget->allocation.height))
-	{       
+	{
         /* let gtk take focus from us with focus out event */
         }
 	else
@@ -1611,7 +1611,7 @@ void bwlogbox(char *title, int width, ds_Tree *t, int display_mode)
 #if defined(WAVE_USE_GTK2) && !defined(GTK_ENABLE_BROKEN)
 /* nothing */
 #else
-    if(!fontx) 
+    if(!fontx)
 	{
 	if(fontname_logfile)
 		{
@@ -1656,7 +1656,7 @@ void bwlogbox(char *title, int width, ds_Tree *t, int display_mode)
 
 	window = gtk_hpaned_new();
 	tbox = gtk_hbox_new(FALSE, 0);
-	
+
 	l1 = gtk_label_new(title);
 
 	/* code from gedit... */
@@ -1667,14 +1667,14 @@ void bwlogbox(char *title, int width, ds_Tree *t, int display_mode)
         /* don't allow focus on the close button */
 #ifdef WAVE_USE_GTK_2CURRENT
         gtk_button_set_focus_on_click (GTK_BUTTON (close_button), FALSE);
-#endif        
+#endif
 
         /* make it as small as possible */
         rcstyle = gtk_rc_style_new ();
         rcstyle->xthickness = rcstyle->ythickness = 0;
         gtk_widget_modify_style (close_button, rcstyle);
         gtk_rc_style_unref (rcstyle),
-        
+
         image = gtk_image_new_from_stock (GTK_STOCK_CLOSE,
                                           GTK_ICON_SIZE_MENU);
         gtk_container_add (GTK_CONTAINER (close_button), image);
@@ -1690,7 +1690,7 @@ void bwlogbox(char *title, int width, ds_Tree *t, int display_mode)
 	gtk_widget_show(tbox);
 
 #ifdef WAVE_USE_GTK_2CURRENT
-        pagenum = 
+        pagenum =
 #endif
 		gtk_notebook_append_page_menu  (GTK_NOTEBOOK(notebook), window, tbox, gtk_label_new(title));
 
@@ -1743,7 +1743,7 @@ void bwlogbox(char *title, int width, ds_Tree *t, int display_mode)
                                GTK_SIGNAL_FUNC(ok_callback),
                                ctx);
     gtk_widget_show (button1);
-    gtk_container_add (GTK_CONTAINER (hbox), button1);  
+    gtk_container_add (GTK_CONTAINER (hbox), button1);
     GTK_WIDGET_SET_FLAGS (button1, GTK_CAN_DEFAULT);
     gtk_signal_connect_object (GTK_OBJECT (button1),
                                 "realize",
@@ -1770,10 +1770,10 @@ void bwlogbox(char *title, int width, ds_Tree *t, int display_mode)
         target_entry[0].flags = 0;
         target_entry[0].info = WAVE_DRAG_TAR_INFO_0;
         target_entry[1].target = WAVE_DRAG_TAR_NAME_1;
-        target_entry[1].flags = 0;  
+        target_entry[1].flags = 0;
         target_entry[1].info = WAVE_DRAG_TAR_INFO_1;
         target_entry[2].target = WAVE_DRAG_TAR_NAME_2;
-        target_entry[2].flags = 0;   
+        target_entry[2].flags = 0;
         target_entry[2].info = WAVE_DRAG_TAR_INFO_2;
 
         gtk_drag_source_set(
@@ -1892,12 +1892,12 @@ void bwlogbox_2(struct logfile_context_t *ctx, GtkWidget *window, GtkWidget *but
 	e_line = e_line_find > 0 ? e_line_find : e_line;
 
 	sprintf(buf, " occupies lines %d - %d.\n", s_line, e_line);
-	log_text(text, NULL, buf);        
+	log_text(text, NULL, buf);
 	if(anno_ctx)
 		{
-		sprintf(buf, "Marker time for '%s' is %s.\n", anno_ctx->aet_name, 
-			anno_ctx->marker_set ? anno_ctx->time_string: "not set");		
-		log_text(text, NULL, buf);        
+		sprintf(buf, "Marker time for '%s' is %s.\n", anno_ctx->aet_name,
+			anno_ctx->marker_set ? anno_ctx->time_string: "not set");
+		log_text(text, NULL, buf);
 		}
 
 	log_text(text, NULL, "\n");
@@ -1914,7 +1914,7 @@ void bwlogbox_2(struct logfile_context_t *ctx, GtkWidget *window, GtkWidget *but
 	int numvars = 0;
 
 	/* build up list of potential variables in this module */
-	if(!display_mode && !ctx->varnames) 
+	if(!display_mode && !ctx->varnames)
 		{
 		varnames = make_jrb();
 		while(w)
@@ -1926,7 +1926,7 @@ void bwlogbox_2(struct logfile_context_t *ctx, GtkWidget *window, GtkWidget *but
 					if(strcmp(w->text, design_unit)) /* filter out design unit name */
 						{
 						node = jrb_find_str(varnames, w->text);
-	
+
 						if(!node)
 							{
 							Jval dummy;
@@ -1978,13 +1978,13 @@ void bwlogbox_2(struct logfile_context_t *ctx, GtkWidget *window, GtkWidget *but
 				                case FST_HT_UPSCOPE:
 				                        scp_nam = fstReaderPopScope(fst);
 							new_scope_encountered = 1;
-				                        break;   
+				                        break;
 				                case FST_HT_VAR:
 				                        scp_nam = fstReaderGetCurrentFlatScope(fst);
 							if(!h->u.var.is_alias) fh++;
 							do_brk = 1;
 							break;
-						default: 
+						default:
 							break;
 						}
 					if(do_brk) break;
@@ -2034,13 +2034,13 @@ void bwlogbox_2(struct logfile_context_t *ctx, GtkWidget *window, GtkWidget *but
 							if(!fst_alpha_strcmpeq(h->u.var.name, node->key.s))
 								{
 								struct jrb_chain *jvc = node->jval_chain;
-								if(jvc) { 
+								if(jvc) {
 									while(jvc->next) jvc = jvc->next;
 									jvc->next = calloc(1, sizeof(struct jrb_chain));
 									jvc = jvc->next;
 									}
 									else
-									{ 
+									{
 									jvc = calloc(1, sizeof(struct jrb_chain));
 									node->jval_chain = jvc;
 									}
@@ -2108,14 +2108,14 @@ skip_resolved_fst:
 							jvc = node->jval_chain;
 							rc2 = calloc(1, len+1);
 							rc2[0] = first_char;
-	
+
 							while(jvc)
 								{
 								char rcv[65537];
 								fstReaderGetValueFromHandleAtTime(fst, anno_ctx->marker, jvc->val.i, rcv);
 								rc2[pos++] = *rcv;
 								jvc = jvc->next;
-								}		
+								}
 
 							node->val2.v = hexify(strdup(rc2));
 							free(rc2);
@@ -2184,13 +2184,13 @@ skip_resolved_fst:
 
 									mat = 1;
 
-									if(jvc) { 
+									if(jvc) {
 										while(jvc->next) jvc = jvc->next;
 										jvc->next = calloc(1, sizeof(struct jrb_chain));
 										jvc = jvc->next;
 										}
 										else
-										{ 
+										{
 										jvc = calloc(1, sizeof(struct jrb_chain));
 										node->jval_chain = jvc;
 										}
@@ -2274,13 +2274,13 @@ skip_resolved_vzt:
 							jvc = node->jval_chain;
 							rc2 = calloc(1, len+1);
 							rc2[0] = first_char;
-	
+
 							while(jvc)
 								{
 								char *rcv = vzt_rd_value(vzt, anno_ctx->marker, jvc->val.i);
 								rc2[pos++] = *rcv;
 								jvc = jvc->next;
-								}		
+								}
 
 							node->val2.v = hexify(strdup(rc2));
 							free(rc2);
@@ -2350,9 +2350,9 @@ skip_resolved_vzt:
                                                                 if(!strcmp(fnam+tlen, node->key.s))
                                                                         {
                                                                         struct jrb_chain *jvc = node->jval_chain;
-                                                        
+
                                                                         mat = 1;
-                                                                
+
                                                                         if(jvc) {
                                                                                 while(jvc->next) jvc = jvc->next;
                                                                                 jvc->next = calloc(1, sizeof(struct jrb_chain));
@@ -2435,8 +2435,8 @@ skip_resolved_lxt2:
                                                 char *rc2;
                                                 int len = rc ? strlen(rc) : 0;
                                                 int iter = 1;
-                                                         
-                                                while(jvc)  
+
+                                                while(jvc)
                                                         {
 							srch = jrb_find_int(lx2vals, jvc->val.i);
 							rc = srch ? srch->val.s : NULL;
@@ -2451,22 +2451,22 @@ skip_resolved_lxt2:
                                                         jvc = node->jval_chain;
                                                         rc2 = calloc(1, len+1);
                                                         rc2[0] = first_char;
-                         
+
                                                         while(jvc)
                                                                 {
 								srch = jrb_find_int(lx2vals, jvc->val.i);
 								rc = srch->val.s;
                                                                 rc2[pos++] = *rc;
-                                                                jvc = jvc->next; 
+                                                                jvc = jvc->next;
                                                                 }
-    
+
                                                         node->val2.v = hexify(strdup(rc2));
-                                                        free(rc2);               
+                                                        free(rc2);
                                                         }
                                                         else
-                                                        {               
+                                                        {
                                                         node->val2.v = NULL;
-							}						
+							}
 						}
 					}
 					else
@@ -2494,7 +2494,7 @@ skip_resolved_lxt2:
 			int attempt = 0;
 
 			if(ctx->varnames) goto skip_resolved_ae2;
-			
+
 			pfx = malloc((tlen=strlen(title))+1+1);
 			strcpy(pfx, title);
 			strcat(pfx+tlen, ".");
@@ -2560,7 +2560,7 @@ retry_ae2:		for(i=0;i<numfacs;i++)
 					{
 					char bf[65537];
 					char *fnam = bf;
-	
+
 					ae2_read_symbol_name(ae2, i, bf);
 					jrb_traverse(node, varnames)
 						{
@@ -2574,7 +2574,7 @@ retry_ae2:		for(i=0;i<numfacs;i++)
 								}
 							}
 						}
-					}				
+					}
 				}
 
 resolved_ae2:		free(pfx);
@@ -2640,9 +2640,9 @@ skip_resolved_ae2:
 						{
 						case V_CMT:	log_text_active(text, fontx, w->text); break;
 
-						case V_STRING:	
-						case V_PREPROC:	
-						case V_PREPROC_WS:	
+						case V_STRING:
+						case V_PREPROC:
+						case V_PREPROC_WS:
 						case V_MACRO:	log_text_prelight(text, fontx, w->text); break;
 
 						default:	log_text(text, fontx, w->text); break;
diff --git a/contrib/rtlbrowse/splay.c b/contrib/rtlbrowse/splay.c
index a625380..c6f1f06 100644
--- a/contrib/rtlbrowse/splay.c
+++ b/contrib/rtlbrowse/splay.c
@@ -95,7 +95,7 @@ ds_Tree * ds_insert(char *i, ds_Tree * t) {
 /* Insert i into the tree t, unless it's already there.    */
 /* Return a pointer to the resulting tree.                 */
     ds_Tree * n;
-    
+
     n = (ds_Tree *) calloc (1, sizeof (ds_Tree));
     if (n == NULL) {
 	fprintf(stderr, "ds_insert: ran out of memory, exiting.\n");
diff --git a/contrib/rtlbrowse/stem_recurse.c b/contrib/rtlbrowse/stem_recurse.c
index f76a94f..0492124 100644
--- a/contrib/rtlbrowse/stem_recurse.c
+++ b/contrib/rtlbrowse/stem_recurse.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 2006-2012.
  *
  * This program is free software; you can redistribute it and/or
@@ -46,7 +46,7 @@ FILE *aetf;
 AE2_HANDLE ae2 = NULL;
 #endif
 
-static int bwsigcmp(char *s1, char *s2) 
+static int bwsigcmp(char *s1, char *s2)
 {
 unsigned char c1, c2;
 int u1, u2;
@@ -55,13 +55,13 @@ for(;;)
         {
         c1=(unsigned char)*(s1++);
         c2=(unsigned char)*(s2++);
-                 
+
         if((!c1)&&(!c2)) return(0);
         if((c1<='9')&&(c2<='9')&&(c2>='0')&&(c1>='0'))
                 {
                 u1=(int)(c1&15);
                 u2=(int)(c2&15);
-                
+
                 while(((c2=(unsigned char)*s2)>='0')&&(c2<='9'))
                         {
                         u2*=10;
@@ -75,7 +75,7 @@ for(;;)
                         u1+=(unsigned int)(c2&15);
                         s1++;
                         }
-                                
+
                 if(u1==u2) continue;
                         else return((int)u1-(int)u2);
                 }
@@ -94,7 +94,7 @@ char *key, *obj;
 
 key=(*((struct ds_component **)s1))->compname;
 obj=(*((struct ds_component **)s2))->compname;
-         
+
 return(bwsigcmp(key, obj));
 }
 
@@ -118,7 +118,7 @@ flattened_mod_list_root = t;
 if(compname_build)
 	{
 	int cnl = strlen(compname_build);
-	
+
 	compname_full = malloc(cnl + 1 + strlen(compname) + 1);
 	strcpy(compname_full, compname_build);
 	compname_full[cnl] = '.';
@@ -161,7 +161,7 @@ if(comp)
 		{
 		comp_array[i] = comp;
 		comp = comp->next;
-		}	
+		}
 	qsort(comp_array, numcomps, sizeof(struct ds_component *), compar_comp_array_bsearch);
 	for(i=0;i<numcomps;i++)
 		{
@@ -211,7 +211,7 @@ if(t->left)
 
 if(t->right)
 	{
-	rec_tree(t->right, cnt);	
+	rec_tree(t->right, cnt);
 	}
 }
 
@@ -229,7 +229,7 @@ list_root[*cnt] = t;
 
 if(t->right)
 	{
-	rec_tree_populate(t->right, cnt, list_root);	
+	rec_tree_populate(t->right, cnt, list_root);
 	}
 }
 
@@ -259,7 +259,7 @@ for(i=0;i<len;i++)
 if(i==len)
 	{
 	unsigned int shmid;
-	
+
 	sscanf(id, "%x", &shmid);
 #ifdef __MINGW32__
                 {
@@ -318,7 +318,7 @@ if(!f)
 while(!feof(f))
 	{
 	char *ln = fgetmalloc(f);
-	
+
 	if(fgetmalloc_len > 4)
 		{
 		if((ln[0] == '+')&&(ln[1] == '+')&&(ln[2]==' '))
@@ -339,18 +339,18 @@ while(!feof(f))
 					}
 				which_module = modules;
 				which_module->refcnt++;
-				
+
 				modules = ds_splay(pname, modules);
 				if(strcmp(modules->item, pname))
 					{
-					modules = ds_insert(strdup(pname), modules);				
+					modules = ds_insert(strdup(pname), modules);
 					}
 
 				dc = calloc(1, sizeof(struct ds_component));
 				dc->compname = strdup(cname);
 				dc->module = which_module;
 				dc->next = modules->comp;
-				modules->comp = dc;				
+				modules->comp = dc;
 				}
 			else
 			if((ln[3]=='m')||(ln[3]=='u'))
@@ -361,7 +361,7 @@ while(!feof(f))
 				sscanf(ln+3, "%s %s %s %s %s %d %s %d", scratch, mname, scratch, fname, scratch, &s_line, scratch, &e_line);
 				/* printf("mod: %s from %s %d-%d\n", mname, fname, s_line, e_line); */
 
-				modules = ds_insert(strdup(mname), modules);				
+				modules = ds_insert(strdup(mname), modules);
 				modules->filename = strdup(fname);
 				modules->s_line = s_line;
 				modules->e_line = e_line;
@@ -372,7 +372,7 @@ while(!feof(f))
 				{
 				}
 			}
-		}	
+		}
 
 
 	free(ln);
@@ -447,7 +447,7 @@ static void msg_fn(int sev, const char *format, ...)
 {
 va_list ap;
 va_start(ap, format);
-        
+
 fprintf(stderr, "AE2 %03d | ", sev);
 vfprintf(stderr, format, ap);
 fprintf(stderr, "\n");
@@ -478,11 +478,11 @@ if(anno_ctx)
 		{
 		case WAVE_ANNO_FST:
 			fst=fstReaderOpen(anno_ctx->aet_name);
-			if(!fst)         
+			if(!fst)
 			        {
 			        fprintf(stderr, "Could not initialize '%s', exiting.\n", anno_ctx->aet_name);
 			        exit(255);
-			        }   
+			        }
 				else
 				{
 				timezero = fstReaderGetTimezero(fst);
@@ -491,20 +491,20 @@ if(anno_ctx)
 
 		case WAVE_ANNO_VZT:
 			vzt=vzt_rd_init(anno_ctx->aet_name);
-			if(!vzt)         
+			if(!vzt)
 			        {
 			        fprintf(stderr, "Could not initialize '%s', exiting.\n", anno_ctx->aet_name);
 			        exit(255);
-			        }   
+			        }
 			break;
 
 		case WAVE_ANNO_LXT2:
 			lx2=lxt2_rd_init(anno_ctx->aet_name);
-			if(!lx2)         
+			if(!lx2)
 			        {
 			        fprintf(stderr, "Could not initialize '%s', exiting.\n", anno_ctx->aet_name);
 			        exit(255);
-			        }   
+			        }
 			break;
 
 		case WAVE_ANNO_AE2:
@@ -518,7 +518,7 @@ if(anno_ctx)
 
 			break;
 
-#endif			
+#endif
 		default:
 			fprintf(stderr, "Unsupported wave file type %d encountered, exiting.\n", anno_ctx->aet_type);
 			exit(255);
diff --git a/contrib/rtlbrowse/tcl_helper.c b/contrib/rtlbrowse/tcl_helper.c
index 9e1c127..4fa1d05 100644
--- a/contrib/rtlbrowse/tcl_helper.c
+++ b/contrib/rtlbrowse/tcl_helper.c
@@ -128,7 +128,7 @@ static char tclBackslash(const char* src, int* readPtr) {
  *  sequences.
  *----------------------------------------------------------------------
  */
-static int tclFindElement(const char* list, const char** elementPtr, 
+static int tclFindElement(const char* list, const char** elementPtr,
 			  const char** nextPtr, int* sizePtr, int *bracePtr) {
     register const char *p;
     int openBraces = 0;
@@ -371,7 +371,7 @@ char** zSplitTclList(const char* list, int* argcPtr) {
  * 1. They produce a proper list, one that will yield back the
  * argument strings when evaluated or when disassembled with
  * zSplitTclList.  This is the most important thing.
- * 
+ *
  * 2. They try to produce legible output, which means minimizing the
  * use of backslashes (using braces instead).  However, there are
  * some situations where backslashes must be used (e.g. an element
@@ -653,17 +653,17 @@ static gboolean DNDDragMotionCB(
          * If no valid actions are listed then we respond with 0.
          */
         suggested_action = GDK_ACTION_MOVE;
- 
+
         /* Only move? */
         if(dc->actions == GDK_ACTION_MOVE)
             gdk_drag_status(dc, GDK_ACTION_MOVE, tt);
         /* Only copy? */
         else if(dc->actions == GDK_ACTION_COPY)
-            gdk_drag_status(dc, GDK_ACTION_COPY, tt);  
+            gdk_drag_status(dc, GDK_ACTION_COPY, tt);
         /* Only link? */
         else if(dc->actions == GDK_ACTION_LINK)
             gdk_drag_status(dc, GDK_ACTION_LINK, tt);
-        /* Other action, check if listed in our actions list? */   
+        /* Other action, check if listed in our actions list? */
         else if(dc->actions & suggested_action)
             gdk_drag_status(dc, suggested_action, tt);
         /* All else respond with 0. */
@@ -682,7 +682,7 @@ static void DNDBeginCB(
 
 static void DNDEndCB(
         GtkWidget *widget, GdkDragContext *dc, gpointer data
-)                
+)
 {
 }
 
@@ -769,7 +769,7 @@ static void DNDDataReceivedCB(
 
 			ft = flattened_mod_list_root;
 			while(ft)
-			        {  
+			        {
 			        if(!strcmp(ss, ft->fullname))
 			                {
 					if(!ft->dnd_to_import)
@@ -792,10 +792,10 @@ static void DNDDataReceivedCB(
     if(impcnt)
 	{
 	ds_Tree **fta = calloc(impcnt, sizeof(ds_Tree *));
-	int i = 0;	
+	int i = 0;
 
 	while(ft)
-	        {  
+	        {
 	        if(ft->dnd_to_import)
 	                {
 			ft->dnd_to_import = 0;
@@ -823,7 +823,7 @@ static void DNDDataReceivedCB(
 void setup_dnd(GtkWidget *wid)
 {
 	GtkTargetEntry target_entry[3];
-    
+
         target_entry[0].target = WAVE_DRAG_TAR_NAME_0;
         target_entry[0].flags = 0;
         target_entry[0].info = WAVE_DRAG_TAR_INFO_0;
@@ -833,7 +833,7 @@ void setup_dnd(GtkWidget *wid)
         target_entry[2].target = WAVE_DRAG_TAR_NAME_2;
         target_entry[2].flags = 0;
         target_entry[2].info = WAVE_DRAG_TAR_INFO_2;
- 
+
         gtk_drag_dest_set(
                 GTK_WIDGET(wid),
                 GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_HIGHLIGHT |
@@ -846,6 +846,6 @@ void setup_dnd(GtkWidget *wid)
         gtk_signal_connect(GTK_OBJECT(wid), "drag_data_received", GTK_SIGNAL_FUNC(DNDDataReceivedCB), GTK_WIDGET(wid));
         gtk_signal_connect(GTK_OBJECT(wid), "drag_motion", GTK_SIGNAL_FUNC(DNDDragMotionCB), GTK_WIDGET(wid));
         gtk_signal_connect(GTK_OBJECT(wid), "drag_begin", GTK_SIGNAL_FUNC(DNDBeginCB), GTK_WIDGET(wid));
-        gtk_signal_connect(GTK_OBJECT(wid), "drag_end", GTK_SIGNAL_FUNC(DNDEndCB), GTK_WIDGET(wid));                 
+        gtk_signal_connect(GTK_OBJECT(wid), "drag_end", GTK_SIGNAL_FUNC(DNDEndCB), GTK_WIDGET(wid));
 }
 
diff --git a/contrib/rtlbrowse/tree_widget.c b/contrib/rtlbrowse/tree_widget.c
index 6471ffd..8bff10a 100644
--- a/contrib/rtlbrowse/tree_widget.c
+++ b/contrib/rtlbrowse/tree_widget.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2008.
  *
  * This program is free software; you can redistribute it and/or
@@ -50,7 +50,7 @@ if(t->filename)
 	printf("%s\n", t->fullname);
         printf("%s -> *MISSING*\n\n", t->item);
 	*/
-        }   
+        }
 }
 
 static void unselect_row_callback(GtkWidget *widget, gint row, gint column,
@@ -97,7 +97,7 @@ void treebox(char *title, GtkSignalFunc func, GtkWidget *old_window)
     GtkWidget *hbox;
 #endif
 
-    if(is_active) 
+    if(is_active)
 	{
 	gdk_window_raise(window->window);
 	return;
@@ -126,11 +126,11 @@ void treebox(char *title, GtkSignalFunc func, GtkWidget *old_window)
 
     notebook = gtk_notebook_new();
     gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook), GTK_POS_TOP);
-    gtk_notebook_set_show_tabs(GTK_NOTEBOOK(notebook), ~0); 
+    gtk_notebook_set_show_tabs(GTK_NOTEBOOK(notebook), ~0);
     gtk_notebook_set_show_border(GTK_NOTEBOOK(notebook), ~0);
     gtk_notebook_set_scrollable(GTK_NOTEBOOK(notebook), ~0);
     gtk_notebook_popup_enable(GTK_NOTEBOOK(notebook));
-  
+
     gtk_widget_show(notebook);
     gtk_paned_pack2(GTK_PANED(frame2), notebook, TRUE, TRUE);
 #endif
diff --git a/contrib/rtlbrowse/vlex.c b/contrib/rtlbrowse/vlex.c
index aaa87b0..a337848 100644
--- a/contrib/rtlbrowse/vlex.c
+++ b/contrib/rtlbrowse/vlex.c
@@ -880,7 +880,7 @@ char *yytext;
  * of the License, or (at your option) any later version.
  */
 #line 11 "vlex.l"
-        
+
 /*
  * vlex.l
  * 06apr06ajb
@@ -911,7 +911,7 @@ if(!v_preproc_initialized)
 	yyin = fopen(v_preproc_name, "rb");
 	if(!yyin) return(0);
 	v_preproc_initialized = 1;
-	my_yylineno = 1;	
+	my_yylineno = 1;
 	}
 
 ch = fgetc(yyin);
@@ -1832,7 +1832,7 @@ YY_RULE_SETUP
 case 133:
 YY_RULE_SETUP
 #line 207 "vlex.l"
-{ 
+{
 							if(is_builtin_define (yytext+1, yyleng-1))
 								{
 								BEGIN PREPROC;
@@ -1920,7 +1920,7 @@ YY_RULE_SETUP
 case 149:
 YY_RULE_SETUP
 #line 233 "vlex.l"
-{ return V_IGNORE; } 
+{ return V_IGNORE; }
 	YY_BREAK
 case 150:
 YY_RULE_SETUP
diff --git a/src/ae2.c b/src/ae2.c
index 63b9752..2397c93 100644
--- a/src/ae2.c
+++ b/src/ae2.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 2004-2011.
  *
  * This program is free software; you can redistribute it and/or
@@ -28,11 +28,11 @@
 #include "busy.h"
 #include "hierpack.h"
 
-/* 
+/*
  * select appropriate entry points based on if aet2
  * support is available
  */
-#ifndef AET2_IS_PRESENT 
+#ifndef AET2_IS_PRESENT
 
 const char *ae2_loader_fail_msg = "Sorry, AET2 support was not compiled into this executable, exiting.\n\n";
 
@@ -95,7 +95,7 @@ if(facidx<GLOBALS->numfacs)
 
 
 static void error_fn(const char *format, ...)
-{ 
+{
 va_list ap;
 va_start(ap, format);
 vfprintf(stderr, format, ap);
@@ -141,12 +141,12 @@ return(ae2_read_find_symbol(GLOBALS->ae2, name, &f2));
 
 
 static void *alloc_fn(size_t size)
-{        
+{
 void *pnt = calloc_2(1, size);
 return(pnt);
 }
 
-        
+
 static void free_fn(void* ptr, size_t size)
 {
 if(ptr)
@@ -218,7 +218,7 @@ if(numTerms)
 		{
 		ADB_TERM *at = &GLOBALS->adb_aliases[idx][i];
 		AE2_FACREF fr2;
-	
+
 		fr2.s = at->id;
 		fr2.row = 0;
 		fr2.row_high = 0;
@@ -270,7 +270,7 @@ if(numTerms)
 		{
 		ADB_TERM *at = &GLOBALS->adb_aliases[idx][i];
 		AE2_FACREF fr2;
-	
+
 		fr2.s = at->id;
 		fr2.row = 0;
 		fr2.row_high = 0;
@@ -284,7 +284,7 @@ if(numTerms)
 			{
 			fr2.length = -(length = at->first - at->last + 1);
 			}
-		
+
 		if(fr2.s)
 			{
 			t_cyc = ae2_read_next_value(handle, &fr2, cycle, value+offs); /* simply want to calculate next value change time */
@@ -634,7 +634,7 @@ if(!GLOBALS->hier_was_explicitly_set)    /* set default hierarchy split char */
 match_idx = 0;
 for(i=0;i<GLOBALS->numfacs;i++)
         {
-	char *str;	
+	char *str;
         int idx;
 	int typ;
 	unsigned long len, clen;
@@ -720,7 +720,7 @@ for(i=0;i<GLOBALS->numfacs;i++)
 		s = &monolithic_sym[match_idx];
 	        symadd_name_exists_sym_exists(s, str,0);
 		}
-		
+
         mx_row = (GLOBALS->ae2_fr[match_idx].row < 1) ? 1 : GLOBALS->ae2_fr[match_idx].row;
 	mx_row_adjusted = (mx_row < 2) ? 0 : mx_row;
         n=&monolithic_node[mono_row_offset];
@@ -759,7 +759,7 @@ for(i=0;i<GLOBALS->numfacs;i++)
 #endif
 			n[row_iter].extvals = 1;
 			}
-                 
+
 	        n[row_iter].head.time=-1;        /* mark 1st node as negative time */
 	        n[row_iter].head.v.h_val=AN_X;
 		}
@@ -788,9 +788,9 @@ if(GLOBALS->fast_tree_sort)
 /* SPLASH */                            splash_sync(3, 5);
 	fprintf(stderr, AET2_RDLOAD"Building facility hierarchy tree.\n");
 
-	init_tree();		
+	init_tree();
 
-	for(i=0;i<GLOBALS->numfacs;i++)	
+	for(i=0;i<GLOBALS->numfacs;i++)
 		{
 		int was_packed = HIER_DEPACK_STATIC; /* no need to free_2() afterward then */
 		char *sb = hier_decompress_flagged(GLOBALS->facs[i]->name, &was_packed);
@@ -813,43 +813,43 @@ if(GLOBALS->fast_tree_sort)
 		{
 #ifdef WAVE_HIERFIX
 		char *subst;
-		char ch;	
+		char ch;
 #endif
 		GLOBALS->facs[i]=&monolithic_sym[i];
 #ifdef WAVE_HIERFIX
 		while((ch=(*subst)))
-			{	
+			{
 			if(ch==GLOBALS->hier_delimeter) { *subst=VCDNAM_HIERSORT; }	/* forces sort at hier boundaries */
 			subst++;
 			}
 #endif
 		}
-	
+
 /* SPLASH */                            splash_sync(3, 5);
 	fprintf(stderr, AET2_RDLOAD"Sorting facilities at hierarchy boundaries.\n");
 	wave_heapsort(GLOBALS->facs,GLOBALS->numfacs);
-	
+
 #ifdef WAVE_HIERFIX
 	for(i=0;i<GLOBALS->numfacs;i++)
 		{
 		char *subst, ch;
-	
+
 		subst=GLOBALS->facs[i]->name;
 		while((ch=(*subst)))
-			{	
+			{
 			if(ch==VCDNAM_HIERSORT) { *subst=GLOBALS->hier_delimeter; }	/* restore back to normal */
 			subst++;
 			}
 		}
-#endif	
+#endif
 
 	GLOBALS->facs_are_sorted=1;
 
 /* SPLASH */                            splash_sync(4, 5);
 	fprintf(stderr, AET2_RDLOAD"Building facility hierarchy tree.\n");
 
-	init_tree();		
-	for(i=0;i<GLOBALS->numfacs;i++)	
+	init_tree();
+	for(i=0;i<GLOBALS->numfacs;i++)
 		{
 		build_tree_from_name(GLOBALS->facs[i]->name, i);
 		}
@@ -904,20 +904,20 @@ if(skip_start || skip_end)
 			{
 			if(GLOBALS->ae2_time_xlate[lim_idx - first_cycle] <= GLOBALS->min_time)
 				{
-				GLOBALS->ae2_start_limit_cyc = lim_idx;			
+				GLOBALS->ae2_start_limit_cyc = lim_idx;
 				}
-	
+
 			if(GLOBALS->ae2_time_xlate[lim_idx - first_cycle] >= GLOBALS->min_time)
 				{
 				break;
 				}
 			}
-	
+
 		for(; lim_idx <= last_cycle; lim_idx++)
 			{
 			if(GLOBALS->ae2_time_xlate[lim_idx - first_cycle] >= GLOBALS->max_time)
 				{
-				GLOBALS->ae2_end_limit_cyc = lim_idx;			
+				GLOBALS->ae2_end_limit_cyc = lim_idx;
 				break;
 				}
 			}
@@ -950,7 +950,7 @@ if(busycnt==WAVE_BUSY_ITER)
 
 /* fprintf(stderr, "%lld %d %d %s\n", *tim, *facidx, row, *value); */
 
-if(f->length>1)        
+if(f->length>1)
         {
         htemp->v.h_vector = (char *)malloc_2(f->length);
 	memcpy(htemp->v.h_vector, *value, f->length);
@@ -1011,7 +1011,7 @@ for(i=0;i<GLOBALS->numfacs;i++)
 			{
 			nptr np = GLOBALS->ae2_lx2_table[i][r].np;
 			np->mv.value = calloc_2(1, GLOBALS->ae2_fr[i].length+1);
-			}		
+			}
 		}
 	}
 
@@ -1040,7 +1040,7 @@ for(j=0;j<GLOBALS->ae2_num_sections;j++)
 			if(nr<2)
 				{
 				nptr np = GLOBALS->ae2_lx2_table[i][0].np;
-	
+
 				ae2_read_value_2(GLOBALS->ae2, GLOBALS->ae2_fr+i, cyc, buf);
 				if(strcmp(np->mv.value, buf))
 					{
@@ -1058,11 +1058,11 @@ for(j=0;j<GLOBALS->ae2_num_sections;j++)
 						{
 			                        for(r=1;r<rows+1;r++)
 			                                {
-							nptr np; 
+							nptr np;
 			                                uint64_t row = ae2_read_ith_sparse_row(GLOBALS->ae2, GLOBALS->ae2_fr[i].s, cyc, r);
-	
+
 			                                GLOBALS->ae2_fr[i].row = row;
-	
+
 							np = GLOBALS->ae2_lx2_table[i][row].np;
 			                                ae2_read_value_2(GLOBALS->ae2, GLOBALS->ae2_fr+i, cyc, buf);
 							if(strcmp(np->mv.value, buf))
@@ -1080,11 +1080,11 @@ for(j=0;j<GLOBALS->ae2_num_sections;j++)
 						{
 			                        for(r=0;r<rows;r++)
 			                                {
-							nptr np; 
+							nptr np;
 			                                uint64_t row = r;
-	
+
 			                                GLOBALS->ae2_fr[i].row = row;
-	
+
 							np = GLOBALS->ae2_lx2_table[i][row].np;
 			                                ae2_read_value_2(GLOBALS->ae2, GLOBALS->ae2_fr+i, cyc, buf);
 							if(strcmp(np->mv.value, buf))
@@ -1131,7 +1131,7 @@ for(j=0;j<GLOBALS->ae2_num_sections;j++)
 	                                GLOBALS->ae2_fr[i].row = row;
 					/* np = GLOBALS->ae2_lx2_table[i][row].np; */
 					ncyc =	ae2_read_next_value_2(GLOBALS->ae2, GLOBALS->ae2_fr+i, cyc, buf);
-	
+
 					if((ncyc > cyc) && (ncyc < mxcyc)) mxcyc = ncyc;
 					}
 
@@ -1157,7 +1157,7 @@ for(j=0;j<GLOBALS->ae2_num_sections;j++)
 	                                GLOBALS->ae2_fr[i].row = row;
 					/* np = GLOBALS->ae2_lx2_table[i][row].np; */
 					ncyc =	ae2_read_next_value_2(GLOBALS->ae2, GLOBALS->ae2_fr+i, cyc, buf);
-	
+
 					if((ncyc > cyc) && (ncyc < mxcyc)) mxcyc = ncyc;
 					}
 
@@ -1176,9 +1176,9 @@ for(j=0;j<GLOBALS->ae2_num_sections;j++)
 			{
 			int offset = ncyc-cyc;
 			struct ae2_ncycle_autosort *t = autosort[offset];
-		
+
 			autofacs[i].next = t;
-			autosort[offset] = autofacs+i; 
+			autosort[offset] = autofacs+i;
 			}
 			else
 			{
@@ -1194,7 +1194,7 @@ for(j=0;j<GLOBALS->ae2_num_sections;j++)
 		struct ae2_ncycle_autosort *t = autosort[offset];
 
 		if(step_cyc > end_cycle) break;
-	
+
 		if(t)
 			{
 			while(t)
@@ -1202,8 +1202,8 @@ for(j=0;j<GLOBALS->ae2_num_sections;j++)
 				uint64_t ncyc;
 				struct ae2_ncycle_autosort *tn = t->next;
 				nptr np;
-				int nr;	
-	
+				int nr;
+
 				i = t-autofacs;
 				nr = ae2_read_symbol_rows_2(GLOBALS->ae2,GLOBALS->ae2_fr[i].s);
 
@@ -1212,7 +1212,7 @@ for(j=0;j<GLOBALS->ae2_num_sections;j++)
 					np = GLOBALS->ae2_lx2_table[i][0].np;
 
 					ae2_callback(&step_cyc, &i, &np->mv.value, 0);
-		
+
 					ncyc = ae2_read_next_value_2(GLOBALS->ae2, GLOBALS->ae2_fr+i, step_cyc, np->mv.value);
 					}
 					else
@@ -1225,7 +1225,7 @@ for(j=0;j<GLOBALS->ae2_num_sections;j++)
 
 			                        for(r=1;r<rows+1;r++)
 		        	                        {
-							nptr npr; 
+							nptr npr;
 			                                uint64_t row = ae2_read_ith_sparse_row(GLOBALS->ae2, GLOBALS->ae2_fr[i].s, step_cyc, r);
 
 			                                GLOBALS->ae2_fr[i].row = row;
@@ -1241,7 +1241,7 @@ for(j=0;j<GLOBALS->ae2_num_sections;j++)
 							ncyc =	ae2_read_next_value_2(GLOBALS->ae2, GLOBALS->ae2_fr+i, step_cyc, buf);
 							if((ncyc > step_cyc) && (ncyc < mxcyc)) mxcyc = ncyc;
 							}
-	
+
 						if(mxcyc != (end_cycle+1))
 							{
 							ncyc = mxcyc;
@@ -1258,7 +1258,7 @@ for(j=0;j<GLOBALS->ae2_num_sections;j++)
 
 			                        for(r=0;r<rows;r++)
 		        	                        {
-							nptr npr; 
+							nptr npr;
 			                                uint64_t row = r;
 
 			                                GLOBALS->ae2_fr[i].row = row;
@@ -1274,7 +1274,7 @@ for(j=0;j<GLOBALS->ae2_num_sections;j++)
 							ncyc =	ae2_read_next_value_2(GLOBALS->ae2, GLOBALS->ae2_fr+i, step_cyc, buf);
 							if((ncyc > step_cyc) && (ncyc < mxcyc)) mxcyc = ncyc;
 							}
-	
+
 						if(mxcyc != (end_cycle+1))
 							{
 							ncyc = mxcyc;
@@ -1285,14 +1285,14 @@ for(j=0;j<GLOBALS->ae2_num_sections;j++)
 							}
 						}
 					}
-		
+
 				if(ncyc!=step_cyc)
 					{
 					int offset2 = ncyc-cyc;
 					struct ae2_ncycle_autosort *ta = autosort[offset2];
-				
+
 					autofacs[i].next = ta;
-					autosort[offset2] = autofacs+i; 
+					autosort[offset2] = autofacs+i;
 					}
 					else
 					{
@@ -1320,7 +1320,7 @@ for(i=0;i<GLOBALS->numfacs;i++)
 			nptr np = GLOBALS->ae2_lx2_table[i][r].np;
 			free_2(np->mv.value);
 			np->mv.value = NULL;
-			}		
+			}
 		}
 	}
 
@@ -1329,8 +1329,8 @@ return(0);
 }
 
 
-/* 
- * actually import an ae2 trace but don't do it if it's already been imported 
+/*
+ * actually import an ae2 trace but don't do it if it's already been imported
  */
 void import_ae2_trace(nptr np)
 {
@@ -1412,7 +1412,7 @@ for(r = 0; r < nr; r++)
 		htemp->v.h_val = AN_X;		/* x */
 		}
 	htemp->time = MAX_HISTENT_TIME-1;
-	htemp->next = histent_tail;			
+	htemp->next = histent_tail;
 
 	if(GLOBALS->ae2_lx2_table[txidx][r].histent_curr)
 		{
@@ -1433,13 +1433,13 @@ for(r = 0; r < nr; r++)
 
                 {
                 struct HistEnt *htemp2 = histent_calloc();
-                htemp2->time = -1;  
+                htemp2->time = -1;
                 if(len>1)
                 	{
                         htemp2->v.h_vector = htemp->v.h_vector;
                         }
                         else
-                        {  
+                        {
                         htemp2->v.h_val = htemp->v.h_val;
                         }
 		htemp2->next = htemp;
@@ -1457,7 +1457,7 @@ for(r = 0; r < nr; r++)
 }
 
 
-/* 
+/*
  * pre-import many traces at once so function above doesn't have to iterate...
  */
 void ae2_set_fac_process_mask(nptr np)
@@ -1533,7 +1533,7 @@ for(txidx=0;txidx<GLOBALS->numfacs;txidx++)
 				htemp->v.h_val = AN_Z;		/* z */
 				}
 			htemp->time = MAX_HISTENT_TIME;
-			
+
 			htemp = histent_calloc();
 			if(len>1)
 				{
@@ -1545,8 +1545,8 @@ for(txidx=0;txidx<GLOBALS->numfacs;txidx++)
 				htemp->v.h_val = AN_X;		/* x */
 				}
 			htemp->time = MAX_HISTENT_TIME-1;
-			htemp->next = histent_tail;			
-	
+			htemp->next = histent_tail;
+
 			if(GLOBALS->ae2_lx2_table[txidx][r].histent_curr)
 				{
 				GLOBALS->ae2_lx2_table[txidx][r].histent_curr->next = htemp;
@@ -1556,13 +1556,13 @@ for(txidx=0;txidx<GLOBALS->numfacs;txidx++)
 
                         {
                         struct HistEnt *htemp2 = histent_calloc();
-                        htemp2->time = -1;  
+                        htemp2->time = -1;
                         if(len>1)
                                 {
                                 htemp2->v.h_vector = htemp->v.h_vector;
                                 }
                                 else
-                                {  
+                                {
                                 htemp2->v.h_val = htemp->v.h_val;
                                 }
                         htemp2->next = htemp;
diff --git a/src/ae2.h b/src/ae2.h
index 71fcccb..1947cd8 100644
--- a/src/ae2.h
+++ b/src/ae2.h
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 2004-2011.
  *
  * This program is free software; you can redistribute it and/or
diff --git a/src/analyzer.c b/src/analyzer.c
index 03e731c..83e3761 100644
--- a/src/analyzer.c
+++ b/src/analyzer.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2014.
  *
  * This program is free software; you can redistribute it and/or
@@ -7,7 +7,7 @@
  * of the License, or (at your option) any later version.
  */
 
-/* AIX may need this for alloca to work */ 
+/* AIX may need this for alloca to work */
 #if defined _AIX
   #pragma alloca
 #endif
@@ -50,7 +50,7 @@ len=strlen(pnt);
 if(!len) return(pnt);
 
 if(levels<1) levels=1;
-if((esc=strchr(pnt, '\\'))) 
+if((esc=strchr(pnt, '\\')))
 	{
 	return((levels==1) ? esc : pnt); /* shortcut out on escape IDs: level=1, esc char else all */
 	}
@@ -68,7 +68,7 @@ for(i=0;i<len;i++)
 		}
 	else
 		{
-		if(ch==GLOBALS->hier_delimeter) 
+		if(ch==GLOBALS->hier_delimeter)
 			{
 			if(!only_nums_so_far) levels--;
 			if(!levels)
@@ -117,14 +117,14 @@ void updateTraceGroup(Trptr t)
 		}
 	    }
 	  else
-	    { 
+	    {
 	      t->t_grp = t->t_prev->t_grp;
 	    }
 
 
 	}
     }
-  else 
+  else
     { /* very first trace */
       t->t_grp = NULL;
     }
@@ -223,7 +223,7 @@ void ClearGroupTraces(Trptr t_grp)
     }
 }
 
-/* 
+/*
  * Add a trace to the display...
  */
 static void AddTrace( Trptr t )
@@ -435,7 +435,7 @@ if(!GLOBALS->traces.first)
 	tb.buffer=GLOBALS->traces.buffer;
 	tb.bufferlast=GLOBALS->traces.bufferlast;
 	tb.buffercount=GLOBALS->traces.buffercount;
-	
+
 	GLOBALS->traces.buffer=GLOBALS->traces.bufferlast=t;
 	GLOBALS->traces.buffercount=1;
 	PasteBuffer();
@@ -465,7 +465,7 @@ int AddNodeTraceReturn(nptr nd, char *aliasname, Trptr *tret)
 
   GLOBALS->signalwindow_width_dirty=1;
   GLOBALS->traces.dirty = 1;
-    
+
   if( (t = (Trptr) calloc_2( 1, sizeof( TraceEnt ))) == NULL )
     {
       fprintf( stderr, "Out of memory, can't add to analyzer\n" );
@@ -484,7 +484,7 @@ int AddNodeTraceReturn(nptr nd, char *aliasname, Trptr *tret)
 	}
 
       nd->numhist=histcount;
-	
+
       if(!(nd->harray=harray=(hptr *)malloc_2(histcount*sizeof(hptr))))
 	{
 	  fprintf( stderr, "Out of memory, can't add to analyzer\n" );
@@ -502,18 +502,18 @@ int AddNodeTraceReturn(nptr nd, char *aliasname, Trptr *tret)
     }
 
   if(aliasname)
-   {	
+   {
      char *alias;
 
      t->name_full = alias =(char *)malloc_2(strlen(aliasname)+1);
      strcpy(alias,aliasname);
      t->name = t->name_full;
-     if(GLOBALS->hier_max_level) 
+     if(GLOBALS->hier_max_level)
        t->name = hier_extract(t->name_full, GLOBALS->hier_max_level);
    }
   else
     {
-      if(!GLOBALS->hier_max_level) 
+      if(!GLOBALS->hier_max_level)
 	{
 	  int flagged = HIER_DEPACK_ALLOC;
 
@@ -538,7 +538,7 @@ int AddNodeTraceReturn(nptr nd, char *aliasname, Trptr *tret)
     }
 
   if(nd->extvals) /* expansion vectors */
-    {	
+    {
       int n;
 
       n = nd->msi - nd->lsi;
@@ -664,7 +664,7 @@ if(t->vector)
 	bv=t->n.vec;
 	/* back out allocation to revert (if any) */
         if(bv->transaction_cache)
-		{ 
+		{
 		t->n.vec = bv->transaction_cache;
 
 		while(bv)
@@ -679,7 +679,7 @@ if(t->vector)
 
 	                free_2(bv);
 			bv = bv2;
-			}			
+			}
 
 		bv=t->n.vec;
                 }
@@ -689,7 +689,7 @@ if(t->vector)
 		{
 		if(bv->vectors[i]) free_2(bv->vectors[i]);
 		}
-	
+
 	if(bv->bits)
 		{
 		if(bv->bits->name) free_2(bv->bits->name);
@@ -721,9 +721,9 @@ if(t->vector)
 
 
 /*
- * Remove a trace from the display and optionally 
+ * Remove a trace from the display and optionally
  * deallocate its memory usage...
- */ 
+ */
 void RemoveTrace( Trptr t, int dofree )
   {
     GLOBALS->traces.dirty = 1;
@@ -762,7 +762,7 @@ void RemoveTrace( Trptr t, int dofree )
         else
             GLOBALS->traces.last = t->t_prev;
       }
-    
+
     if(dofree)
 	{
         FreeTrace(t);
@@ -783,7 +783,7 @@ while(t)
 	{
 	t2=t->t_next;
 	FreeTrace(t);
-	t=t2;	
+	t=t2;
 	}
 
 GLOBALS->traces.buffer=GLOBALS->traces.bufferlast=NULL;
@@ -877,7 +877,7 @@ Trptr PasteBuffer(void)
 	  GLOBALS->traces.last=t;
 	  GLOBALS->traces.total++;
 	  t=t->t_next;
-	}	
+	}
 
       GLOBALS->traces.buffer=GLOBALS->traces.bufferlast=NULL;
       GLOBALS->traces.buffercount=0;
@@ -887,7 +887,7 @@ Trptr PasteBuffer(void)
 
   while(t)
     {
-      if(t->flags&TR_HIGHLIGHT) 
+      if(t->flags&TR_HIGHLIGHT)
 	{
 	  tinsert=t;
 	}
@@ -956,7 +956,7 @@ Trptr PasteBuffer(void)
         t->t_prev = prev;
 	prev = t;
 	t=t->t_next;
-	}	
+	}
 
   return(GLOBALS->traces.first);
 }
@@ -1037,7 +1037,7 @@ while(t)
         t->t_prev = prev;
 	prev = t;
 	t=t->t_next;
-	}	
+	}
 
 return(GLOBALS->traces.first);
 }
@@ -1101,7 +1101,7 @@ if((!str2) || (!*str2))
 	{
 	return(-1);		/* str1==str2==zero case is covered above */
 	}
-  
+
 return(strcmp(str1, str2));
 }
 
@@ -1129,7 +1129,7 @@ if((!str2) || (!*str2))
 	{
 	return(-1);		/* str1==str2==zero case is covered above */
 	}
-  
+
 return(strcasecmp(str1, str2));
 }
 
@@ -1156,7 +1156,7 @@ if((!str2) || (!*str2))
 	{
 	return(-1);		/* str1==str2==zero case is covered above */
 	}
-  
+
 return(sigcmp(str1, str2));
 }
 
@@ -1173,12 +1173,12 @@ char *subst, ch;
 #endif
 int i;
 int (*cptr)(const void*, const void*);
-   
+
 if(!GLOBALS->traces.total) return(0);
 GLOBALS->traces.dirty = 1;
 
 t=GLOBALS->traces.first;
-tsort=tsort_pnt=wave_alloca(sizeof(Trptr)*GLOBALS->traces.total);   
+tsort=tsort_pnt=wave_alloca(sizeof(Trptr)*GLOBALS->traces.total);
 memset(tsort_pnt, 0, sizeof(Trptr)*GLOBALS->traces.total);
 
 for(i=0;i<GLOBALS->traces.total;i++)
@@ -1227,26 +1227,26 @@ if((cptr) && (!groupsArePresent()))
 	        if(tsort[i]->flags & TR_GRP_BEGIN)
 	                {
 	                int cnt = 0;
-	                
+
 	                for(j=i;j<GLOBALS->traces.total;j++)
 	                        {
-	                        if(tsort[j]->flags & TR_GRP_BEGIN) { cnt++; }   
+	                        if(tsort[j]->flags & TR_GRP_BEGIN) { cnt++; }
 	                        else if(tsort[j]->flags & TR_GRP_END) { cnt--; }
-	                        
-	                        if(!cnt) 
+
+	                        if(!cnt)
 	                                {
 	                                tsort_reduced[num_reduced] = calloc_2(1, sizeof(struct TraceEnt));
 	                                tsort_reduced[num_reduced]->name = tsort[i]->name;
 	                                tsort_reduced[num_reduced]->is_sort_group = 1;
 	                                tsort_reduced[num_reduced]->t_grp = tsort[i];
-	                                
+
 	                                tsort[j]->t_next = NULL;
-	                                num_reduced++;        
-	                                
+	                                num_reduced++;
+
 	                                i = j; break;
 	                                }
 	                        }
-	                }   
+	                }
 	                else
 	                {
 	                tsort_reduced[num_reduced++] = tsort[i];
@@ -1260,11 +1260,11 @@ if((cptr) && (!groupsArePresent()))
 			for(i=0;i<=(num_reduced/2);i++)
 				{
 				Trptr t_tmp = tsort_reduced[i];
-								
+
 				j = num_reduced-i-1;
 				tsort_reduced[i] = tsort_reduced[j];
 				tsort_reduced[j] = t_tmp;
-				}			
+				}
 			}
 			else
 			{
@@ -1327,7 +1327,7 @@ GLOBALS->traces.last=prev;
 if(prev) { prev->t_next=NULL; } /* scan-build */
 
 return(1);
-}  
+}
 
 
 Trptr GiveNextTrace(Trptr t)
@@ -1416,9 +1416,9 @@ void UpdateTraceSelection(Trptr t)
 	                        else
 	                        {
 	                        bcnt++; /* bcnt is number of blank traces */
-	                        }        
+	                        }
 	                }
-	         
+
 	        if((tscan)&&(tscan->vector)&&(IsSelected(tscan)))
 	                {
 	                bvptr bv = tscan->n.vec;
@@ -1499,7 +1499,7 @@ char* GetFullName( Trptr t, int *was_packed )
   else if (t->vector)
     {
       return (t->n.vec->bvname);
-      
+
     }
   else
     {
@@ -1541,7 +1541,7 @@ while(t)
 				}
 			}
 
-		if(oc_cnt < 0) 
+		if(oc_cnt < 0)
 			{
 			/*
 			if(!underflow_sticky)
diff --git a/src/analyzer.h b/src/analyzer.h
index e99ca8a..3e46977 100644
--- a/src/analyzer.h
+++ b/src/analyzer.h
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2014.
  *
  * This program is free software; you can redistribute it and/or
@@ -267,11 +267,11 @@ enum nodeVarType {
     ND_VCD_SUPPLY0         = 7,
     ND_VCD_SUPPLY1         = 8,
     ND_VCD_TIME            = 9,
-    ND_VCD_TRI             = 10,  
+    ND_VCD_TRI             = 10,
     ND_VCD_TRIAND          = 11,
     ND_VCD_TRIOR           = 12,
     ND_VCD_TRIREG          = 13,
-    ND_VCD_TRI0            = 14,  
+    ND_VCD_TRI0            = 14,
     ND_VCD_TRI1            = 15,
     ND_VCD_WAND            = 16,
     ND_VCD_WIRE            = 17,
@@ -291,11 +291,11 @@ enum nodeVarType {
     ND_SV_ENUM             = 29,
     ND_SV_SHORTREAL        = 30,
 
-    ND_VHDL_SIGNAL         = 31, 
-    ND_VHDL_VARIABLE       = 32, 
-    ND_VHDL_CONSTANT       = 33, 
-    ND_VHDL_FILE           = 34, 
-    ND_VHDL_MEMORY         = 35, 
+    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,
@@ -330,7 +330,7 @@ static const char *vardatatype_strings[] = { \
 
 enum nodeVarDataType {
     ND_VDT_NONE                   = 0,
-    
+
     ND_VDT_VHDL_BOOLEAN           = 1,
     ND_VDT_VHDL_BIT               = 2,
     ND_VDT_VHDL_BIT_VECTOR        = 3,
@@ -347,7 +347,7 @@ enum nodeVarDataType {
     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 */
 };
@@ -394,7 +394,7 @@ typedef struct Bits
     char    *name;		/* name of this vector of bits   */
     int     nnbits;		/* number of bits in this vector */
     baptr attribs;  		/* for keeping track of combined timeshifts and inversions (and for savefile) */
-    
+
     nptr    nodes[];		/* C99 pointers to the bits (nodes)  */
   } Bits;
 
@@ -513,18 +513,18 @@ typedef struct TraceEnt
 
 
 enum TraceEntFlagBits
-{ TR_HIGHLIGHT_B, TR_HEX_B, TR_DEC_B, TR_BIN_B, 
+{ TR_HIGHLIGHT_B, TR_HEX_B, TR_DEC_B, TR_BIN_B,
   TR_OCT_B, TR_RJUSTIFY_B, TR_INVERT_B, TR_REVERSE_B,
-  TR_EXCLUDE_B, TR_BLANK_B, TR_SIGNED_B, TR_ASCII_B, 
-  TR_COLLAPSED_B, TR_FTRANSLATED_B, TR_PTRANSLATED_B, TR_ANALOG_STEP_B, 
-  TR_ANALOG_INTERPOLATED_B, TR_ANALOG_BLANK_STRETCH_B, TR_REAL_B, TR_ANALOG_FULLSCALE_B, 
-  TR_ZEROFILL_B, TR_ONEFILL_B, TR_CLOSED_B, TR_GRP_BEGIN_B, 
+  TR_EXCLUDE_B, TR_BLANK_B, TR_SIGNED_B, TR_ASCII_B,
+  TR_COLLAPSED_B, TR_FTRANSLATED_B, TR_PTRANSLATED_B, TR_ANALOG_STEP_B,
+  TR_ANALOG_INTERPOLATED_B, TR_ANALOG_BLANK_STRETCH_B, TR_REAL_B, TR_ANALOG_FULLSCALE_B,
+  TR_ZEROFILL_B, TR_ONEFILL_B, TR_CLOSED_B, TR_GRP_BEGIN_B,
   TR_GRP_END_B,
   TR_BINGRAY_B, TR_GRAYBIN_B,
   TR_REAL2BITS_B, TR_TTRANSLATED_B,
   TR_POPCNT_B
 };
- 
+
 #define TR_HIGHLIGHT 		(1<<TR_HIGHLIGHT_B)
 #define TR_HEX			(1<<TR_HEX_B)
 #define TR_ASCII		(1<<TR_ASCII_B)
@@ -607,7 +607,7 @@ void updateTraceGroup(Trptr t);
 int GetTraceNumber(Trptr t);
 void EnsureGroupsMatch(void);
 
-#define IsSelected(t)   (t->flags&TR_HIGHLIGHT) 
+#define IsSelected(t)   (t->flags&TR_HIGHLIGHT)
 #define IsGroupBegin(t) (t->flags&TR_GRP_BEGIN)
 #define IsGroupEnd(t)   (t->flags&TR_GRP_END)
 #define IsClosed(t)     (t->flags&TR_CLOSED)
diff --git a/src/baseconvert.c b/src/baseconvert.c
index 1203ee0..234db8c 100644
--- a/src/baseconvert.c
+++ b/src/baseconvert.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2014.
  *
  * This program is free software; you can redistribute it and/or
@@ -63,7 +63,7 @@ for(i=0;i<nbits;i++)
 						pnt[i] = pch;
 						}
 					break;
-	
+
 			case AN_1:
 			case AN_H:
 					if(pch == AN_1)
@@ -75,12 +75,12 @@ for(i=0;i<nbits;i++)
 						pnt[i] = AN_L;
 						}
 					break;
-	
+
 			default:
 					kill_state = 1;
-					break;	
+					break;
 			}
-	
+
 		pch = pnt[i];	/* pch is xor accumulator */
 		}
 		else
@@ -111,7 +111,7 @@ for(i=0;i<nbits;i++)
 						pnt[i] = pch;
 						}
 					break;
-	
+
 			case AN_1:
 			case AN_H:
 					if(pch == AN_1)
@@ -123,12 +123,12 @@ for(i=0;i<nbits;i++)
 						pnt[i] = AN_L;
 						}
 					break;
-	
+
 			default:
 					kill_state = 1;
-					break;	
+					break;
 			}
-	
+
 		pch = ch;	/* pch is previous character */
 		}
 		else
@@ -153,11 +153,11 @@ for(i=0;i<nbits;i++)
 		case AN_1:
 		case AN_H:	pop++;
 				break;
-	
+
 		default:
-				break;	
+				break;
 			}
-	
+
 	}
 
 for(i=nbits-1;i>=0;i--) /* always requires less number of bits */
@@ -223,14 +223,14 @@ if(flags&(TR_ZEROFILL|TR_ONEFILL))
 			if(lsi > 0)
 				{
 				pnt=wave_alloca(msi + 1);
-	
+
 				memcpy(pnt, bits, nbits);
-	
+
 	        		for(i=nbits;i<msi+1;i++)
 	                		{
 	                		pnt[i]=whichfill;
 	                		}
-	
+
 				bits = (unsigned char *)pnt;
 				nbits = msi + 1;
 				}
@@ -240,14 +240,14 @@ if(flags&(TR_ZEROFILL|TR_ONEFILL))
 			if(msi > 0)
 				{
 				pnt=wave_alloca(lsi + 1);
-				
+
 	        		for(i=0;i<msi;i++)
 	                		{
 	                		pnt[i]=whichfill;
 	                		}
-	
+
 				memcpy(pnt+i, bits, nbits);
-	
+
 				bits = (unsigned char *)pnt;
 				nbits = lsi + 1;
 				}
@@ -289,9 +289,9 @@ if(flags&TR_REVERSE)
 	}
 
 
-if(flags&TR_ASCII) 
+if(flags&TR_ASCII)
 	{
-	char *parse;	
+	char *parse;
 	int found=0;
 
 	len=(nbits/8)+2+2;		/* $xxxxx */
@@ -313,20 +313,20 @@ if(flags&TR_ASCII)
 			if((parse[j]==AN_X)||(parse[j]==AN_Z)||(parse[j]==AN_W)||(parse[j]==AN_U)||(parse[j]==AN_DASH)) { val=1000; /* arbitrarily large */}
 			if((parse[j]==AN_1)||(parse[j]==AN_H)) { val|=1; }
 			}
-		
+
 
 		if (val) {
 			if (val > 0x7f || !isprint(val)) *pnt++ = '.'; else *pnt++ = val;
 			found=1;
 		}
-		
+
 		parse+=8;
 		}
 	if (!found && !GLOBALS->show_base) {
 		*(pnt++)='"';
 		*(pnt++)='"';
 	}
-		
+
 	if(GLOBALS->show_base) { *(pnt++)='"'; }
 	*(pnt)=0x00; /* scan build : remove dead increment */
 	}
@@ -350,42 +350,42 @@ else if((flags&TR_HEX)||((flags&(TR_DEC|TR_SIGNED))&&(nbits>64)&&(!(flags&TR_POP
 			{
 			val<<=1;
 
-			if((parse[j]==AN_1)||(parse[j]==AN_H)) 
-				{ 
-				val|=1; 
+			if((parse[j]==AN_1)||(parse[j]==AN_H))
+				{
+				val|=1;
 				}
 			else
-			if((parse[j]==AN_0)||(parse[j]==AN_L)) 
+			if((parse[j]==AN_0)||(parse[j]==AN_L))
 				{
 				}
 			else
 			if(parse[j]==AN_X)
-				{ 
+				{
 				int match = (j==0) || ((parse + i + j) == (newbuff + 3));
 				int k;
 				for(k=j+1;k<4;k++)
 					{
-					if(parse[k]!=AN_X) 
+					if(parse[k]!=AN_X)
 						{
 						char *thisbyt = parse + i + k;
 						char *lastbyt = newbuff + 3 + nbits - 1;
-						if((lastbyt - thisbyt) >= 0) match = 0; 
+						if((lastbyt - thisbyt) >= 0) match = 0;
 						break;
 						}
 					}
-				val = (match) ? 16 : 21; break; 
+				val = (match) ? 16 : 21; break;
 				}
 			else
-			if(parse[j]==AN_Z)    
-				{ 
+			if(parse[j]==AN_Z)
+				{
 				int xover = 0;
 				int match = (j==0) || ((parse + i + j) == (newbuff + 3));
 				int k;
 				for(k=j+1;k<4;k++)
 					{
-					if(parse[k]!=AN_Z) 
+					if(parse[k]!=AN_Z)
 						{
-						if(parse[k]==AN_X) 
+						if(parse[k]==AN_X)
 							{
 							xover = 1;
 							}
@@ -393,27 +393,27 @@ else if((flags&TR_HEX)||((flags&(TR_DEC|TR_SIGNED))&&(nbits>64)&&(!(flags&TR_POP
 							{
 							char *thisbyt = parse + i + k;
 							char *lastbyt = newbuff + 3 + nbits - 1;
-							if((lastbyt - thisbyt) >= 0) match = 0; 
+							if((lastbyt - thisbyt) >= 0) match = 0;
 							}
 						break;
 						}
 					}
 
 				if(xover) val = 21;
-				else val = (match) ? 17 : 22; 
+				else val = (match) ? 17 : 22;
 				break;
 				}
 			else
-			if(parse[j]==AN_W)    
-				{ 
+			if(parse[j]==AN_W)
+				{
 				int xover = 0;
 				int match = (j==0) || ((parse + i + j) == (newbuff + 3));
 				int k;
 				for(k=j+1;k<4;k++)
 					{
-					if(parse[k]!=AN_W) 
+					if(parse[k]!=AN_W)
 						{
-						if(parse[k]==AN_X) 
+						if(parse[k]==AN_X)
 							{
 							xover = 1;
 							}
@@ -421,27 +421,27 @@ else if((flags&TR_HEX)||((flags&(TR_DEC|TR_SIGNED))&&(nbits>64)&&(!(flags&TR_POP
 							{
 							char *thisbyt = parse + i + k;
 							char *lastbyt = newbuff + 3 + nbits - 1;
-							if((lastbyt - thisbyt) >= 0) match = 0; 
+							if((lastbyt - thisbyt) >= 0) match = 0;
 							}
 						break;
 						}
 					}
 
 				if(xover) val = 21;
-				else val = (match) ? 18 : 23; 
+				else val = (match) ? 18 : 23;
 				break;
 				}
 			else
 			if(parse[j]==AN_U)
-				{ 
+				{
 				int xover = 0;
 				int match = (j==0) || ((parse + i + j) == (newbuff + 3));
 				int k;
 				for(k=j+1;k<4;k++)
 					{
-					if(parse[k]!=AN_U) 
+					if(parse[k]!=AN_U)
 						{
-						if(parse[k]==AN_X) 
+						if(parse[k]==AN_X)
 							{
 							xover = 1;
 							}
@@ -449,26 +449,26 @@ else if((flags&TR_HEX)||((flags&(TR_DEC|TR_SIGNED))&&(nbits>64)&&(!(flags&TR_POP
 							{
 							char *thisbyt = parse + i + k;
 							char *lastbyt = newbuff + 3 + nbits - 1;
-							if((lastbyt - thisbyt) >= 0) match = 0; 
+							if((lastbyt - thisbyt) >= 0) match = 0;
 							}
 						break;
 						}
 					}
 
 				if(xover) val = 21;
-				else val = (match) ? 19 : 24; 
+				else val = (match) ? 19 : 24;
 				break;
 				}
 			else
 			if(parse[j]==AN_DASH)
-				{ 
+				{
 				int xover = 0;
 				int k;
 				for(k=j+1;k<4;k++)
 					{
-					if(parse[k]!=AN_DASH) 
+					if(parse[k]!=AN_DASH)
 						{
-						if(parse[k]==AN_X) 
+						if(parse[k]==AN_X)
 							{
 							xover = 1;
 							}
@@ -483,7 +483,7 @@ else if((flags&TR_HEX)||((flags&(TR_DEC|TR_SIGNED))&&(nbits>64)&&(!(flags&TR_POP
 			}
 
 		*(pnt++)=AN_HEX_STR[val];
-		
+
 		parse+=4;
 		}
 
@@ -521,7 +521,7 @@ else if(flags&TR_OCT)
 			}
 
 		*(pnt++)=AN_OCT_STR[val];
-		
+
 		parse+=3;
 		}
 
@@ -564,12 +564,12 @@ else if(flags&TR_SIGNED)
 		{ val = LLDescriptor(0); }
 	else
 		{ fail = 1; }
-		
+
 	if(!fail)
 	for(i=1;i<nbits;i++)
 		{
 		val<<=1;
-		
+
 		if((parse[i]==AN_1)||(parse[i]==AN_H)) {  val|=LLDescriptor(1); }
 		else if((parse[i]!=AN_0)&&(parse[i]!=AN_L)) { fail=1; break; }
 		}
@@ -621,15 +621,15 @@ else if(flags&TR_REAL)
 rl_go_binary:	len=(nbits/1)+2+1;		/* %xxxxx */
 		os=pnt=(char *)calloc_2(1,len);
 		if(GLOBALS->show_base) { *(pnt++)='%'; }
-	
+
 		parse=newbuff+3;
 		cvt_gray(flags,parse,nbits);
-	
+
 		for(i=0;i<nbits;i++)
 			{
 			*(pnt++)=AN_STR[(int)(*(parse++))];
 			}
-	
+
 		*(pnt)=0x00; /* scan build : remove dead increment */
 		}
 	}
@@ -709,7 +709,7 @@ if(t && (t->flags & TR_REAL2BITS) && d) /* "real2bits" also allows other filters
 
 	if(d)
 		{
-		sprintf(rv,"%.16g",*d);	
+		sprintf(rv,"%.16g",*d);
 		}
 	else
 		{
@@ -751,23 +751,23 @@ nbits++;
 res = AN_1;
 for (i = 0; i < nbits; i++)
 	{
-	switch (*vec) 
+	switch (*vec)
 		{
-		case AN_X:		
+		case AN_X:
 		case 'x':
 		case 'X':
 				return(AN_X);
-		case AN_U:		
+		case AN_U:
 		case 'u':
 		case 'U':
 				an_u_encountered = 1; break;
-		case AN_Z:		
+		case AN_Z:
 		case 'z':
 		case 'Z':
 				if (res == AN_0) return(AN_X); vec++; res = AN_Z; break;
 		default:	if (res == AN_Z) return(AN_X); vec++; res = AN_0; break;
 		}
-	}	
+	}
 
 return(!an_u_encountered ? res : AN_U);
 }
@@ -792,17 +792,17 @@ nbits=t->n.vec->nbits;
 res = AN_1;
 for (i = 0; i < nbits; i++)
 	{
-	switch (*vec) 
+	switch (*vec)
 		{
-		case AN_X:		
+		case AN_X:
 		case 'x':
 		case 'X':
 				return(AN_X);
-		case AN_U:		
+		case AN_U:
 		case 'u':
 		case 'U':
 				an_u_encountered = 1; break;
-		case AN_Z:		
+		case AN_Z:
 		case 'z':
 		case 'Z':
 				if (res == AN_0) return(AN_X); vec++; res = AN_Z; break;
@@ -835,7 +835,7 @@ if(nbits<0)nbits=-nbits;
 nbits++;
 
 if(vec)
-        {  
+        {
         bits=vec;
         if(*vec>AN_MSK)              /* convert as needed */
         for(i=0;i<nbits;i++)
@@ -895,7 +895,7 @@ if((flags&(TR_ZEROFILL|TR_ONEFILL))&&(nbits>1)&&(t->n.nd->msi)&&(t->n.nd->lsi))
 		if(t->n.nd->msi > 0)
 			{
 			pnt=wave_alloca(t->n.nd->lsi + 1);
-			
+
         		for(i=0;i<t->n.nd->msi;i++)
                 		{
                 		pnt[i]=whichfill;
@@ -950,9 +950,9 @@ if(flags&TR_REVERSE)
 	for(i=0;i<3;i++) *(fwdpnt2++)=xfwd[0];
 	}
 
-if(flags&TR_ASCII) 
+if(flags&TR_ASCII)
 	{
-	char *parse;	
+	char *parse;
 	int found=0;
 
 	len=(nbits/8)+2+2;		/* $xxxxx */
@@ -979,14 +979,14 @@ if(flags&TR_ASCII)
 			if (val > 0x7f || !isprint(val)) *pnt++ = '.'; else *pnt++ = val;
 			found=1;
 		}
-		
+
 		parse+=8;
 		}
 	if (!found && !GLOBALS->show_base) {
 		*(pnt++)='"';
 		*(pnt++)='"';
 	}
-		
+
 	if(GLOBALS->show_base) { *(pnt++)='"'; }
 	*(pnt)=0x00; /* scan build : remove dead increment */
 	}
@@ -1010,17 +1010,17 @@ else if((flags&TR_HEX)||((flags&(TR_DEC|TR_SIGNED))&&(nbits>64)&&(!(flags&TR_POP
 			{
 			val<<=1;
 
-			if((parse[j]==AN_1)||(parse[j]==AN_H)) 
-				{ 
-				val|=1; 
+			if((parse[j]==AN_1)||(parse[j]==AN_H))
+				{
+				val|=1;
 				}
 			else
-			if((parse[j]==AN_0)||(parse[j]==AN_L)) 
+			if((parse[j]==AN_0)||(parse[j]==AN_L))
 				{
 				}
 			else
 			if(parse[j]==AN_X)
-				{ 
+				{
 				int match = (j==0) || ((parse + i + j) == (newbuff + 3));
 				int k;
 				for(k=j+1;k<4;k++)
@@ -1033,11 +1033,11 @@ else if((flags&TR_HEX)||((flags&(TR_DEC|TR_SIGNED))&&(nbits>64)&&(!(flags&TR_POP
                                                 break;
                                                 }
 					}
-				val = (match) ? 16 : 21; break; 
+				val = (match) ? 16 : 21; break;
 				}
 			else
-			if(parse[j]==AN_Z)    
-				{ 
+			if(parse[j]==AN_Z)
+				{
 				int xover = 0;
 				int match = (j==0) || ((parse + i + j) == (newbuff + 3));
 				int k;
@@ -1060,12 +1060,12 @@ else if((flags&TR_HEX)||((flags&(TR_DEC|TR_SIGNED))&&(nbits>64)&&(!(flags&TR_POP
                                         }
 
 				if(xover) val = 21;
-				else val = (match) ? 17 : 22; 
+				else val = (match) ? 17 : 22;
 				break;
 				}
 			else
-			if(parse[j]==AN_W)    
-				{ 
+			if(parse[j]==AN_W)
+				{
 				int xover = 0;
 				int match = (j==0) || ((parse + i + j) == (newbuff + 3));
 				int k;
@@ -1079,7 +1079,7 @@ else if((flags&TR_HEX)||((flags&(TR_DEC|TR_SIGNED))&&(nbits>64)&&(!(flags&TR_POP
                                                         }
                                                         else
                                                         {
-                                                        char *thisbyt = parse + i + k;   
+                                                        char *thisbyt = parse + i + k;
                                                         char *lastbyt = newbuff + 3 + nbits - 1;
                                                         if((lastbyt - thisbyt) >= 0) match = 0;
                                                         }
@@ -1088,12 +1088,12 @@ else if((flags&TR_HEX)||((flags&(TR_DEC|TR_SIGNED))&&(nbits>64)&&(!(flags&TR_POP
                                         }
 
 				if(xover) val = 21;
-				else val = (match) ? 18 : 23; 
+				else val = (match) ? 18 : 23;
 				break;
 				}
 			else
 			if(parse[j]==AN_U)
-				{ 
+				{
 				int xover = 0;
 				int match = (j==0) || ((parse + i + j) == (newbuff + 3));
 				int k;
@@ -1107,7 +1107,7 @@ else if((flags&TR_HEX)||((flags&(TR_DEC|TR_SIGNED))&&(nbits>64)&&(!(flags&TR_POP
                                                         }
                                                         else
                                                         {
-                                                        char *thisbyt = parse + i + k;   
+                                                        char *thisbyt = parse + i + k;
                                                         char *lastbyt = newbuff + 3 + nbits - 1;
                                                         if((lastbyt - thisbyt) >= 0) match = 0;
                                                         }
@@ -1116,18 +1116,18 @@ else if((flags&TR_HEX)||((flags&(TR_DEC|TR_SIGNED))&&(nbits>64)&&(!(flags&TR_POP
                                         }
 
 				if(xover) val = 21;
-				else val = (match) ? 19 : 24; 
+				else val = (match) ? 19 : 24;
 				break;
 				}
 			else
 			if(parse[j]==AN_DASH)
-				{ 
+				{
 				int xover = 0;
 				int k;
                                 for(k=j+1;k<4;k++)
                                         {
                                         if(parse[k]!=AN_DASH)
-                                                {  
+                                                {
                                                 if(parse[k]==AN_X)
                                                         {
                                                         xover = 1;
@@ -1143,7 +1143,7 @@ else if((flags&TR_HEX)||((flags&(TR_DEC|TR_SIGNED))&&(nbits>64)&&(!(flags&TR_POP
 			}
 
 		*(pnt++)=AN_HEX_STR[val];
-		
+
 		parse+=4;
 		}
 
@@ -1218,12 +1218,12 @@ else if(flags&TR_SIGNED)
 
         if((parse[0]==AN_1)||(parse[0]==AN_H))
                 { val = LLDescriptor(-1); }
-        else     
+        else
         if((parse[0]==AN_0)||(parse[0]==AN_L))
                 { val = LLDescriptor(0); }
-        else     
+        else
                 { fail = 1; }
-                 
+
         if(!fail)
 	for(i=1;i<nbits;i++)
 		{
@@ -1280,15 +1280,15 @@ else if(flags&TR_REAL)
 rl_go_binary:	len=(nbits/1)+2+1;		/* %xxxxx */
 		os=pnt=(char *)calloc_2(1,len);
 		if(GLOBALS->show_base) { *(pnt++)='%'; }
-	
+
 		parse=newbuff+3;
 		cvt_gray(flags,parse,nbits);
-	
+
 		for(i=0;i<nbits;i++)
 			{
 			*(pnt++)=AN_STR[(int)(*(parse++))];
 			}
-	
+
 		*(pnt)=0x00; /* scan build : remove dead increment */
 		}
 	}
@@ -1330,7 +1330,7 @@ return(os);
 static char *dofilter(Trptr t, char *s)
 {
 GLOBALS->xl_file_filter[t->f_filter] = xl_splay(s, GLOBALS->xl_file_filter[t->f_filter]);
-	
+
 if(!strcasecmp(s, GLOBALS->xl_file_filter[t->f_filter]->item))
 	{
 	free_2(s);
@@ -1407,7 +1407,7 @@ ex:	buf[n] = 0;
 		s = malloc_2(n + 1);
 		strcpy(s, buf);
 		}
-	}	
+	}
 
 if((*s == '?') && (!GLOBALS->color_active_in_filter))
 	{
@@ -1461,7 +1461,7 @@ if(!t->t_filter_converted)
 	s = strdup_2((char *)v->v);
 
 	if((*s == '?') && (!GLOBALS->color_active_in_filter))
-	        {  
+	        {
 	        char *s2a;
 	        char *s2 = strchr(s+1, '?');
 	        if(s2)
@@ -1471,7 +1471,7 @@ if(!t->t_filter_converted)
 	                strcpy(s2a, s2);
 	                free_2(s);
 	                s = s2a;
-	                }   
+	                }
 	        }
 	}
 
@@ -1518,7 +1518,7 @@ if(nbits<0)nbits=-nbits;
 nbits++;
 
 if(vec)
-        {  
+        {
         bits=vec;
         if(*vec>AN_MSK)              /* convert as needed */
         for(i=0;i<nbits;i++)
@@ -1605,12 +1605,12 @@ if(flags&TR_SIGNED)
 
         if((parse[0]==AN_1)||(parse[0]==AN_H))
                 { val = LLDescriptor(-1); }
-        else     
+        else
         if((parse[0]==AN_0)||(parse[0]==AN_L))
                 { val = LLDescriptor(0); }
-        else     
+        else
                 { fail = 1; }
-                 
+
         if(!fail)
 	for(i=1;i<nbits;i++)
 		{
@@ -1731,12 +1731,12 @@ if(flags&TR_SIGNED)
 		{ val = LLDescriptor(0); }
 	else
 		{ fail = 1; }
-		
+
 	if(!fail)
 	for(i=1;i<nbits;i++)
 		{
 		val<<=1;
-		
+
 		if((parse[i]==AN_1)||(parse[i]==AN_H)) {  val|=LLDescriptor(1); }
 		else if((parse[i]!=AN_0)&&(parse[i]!=AN_L)) { fail=1; break; }
 		}
diff --git a/src/bitvec.c b/src/bitvec.c
index 1207918..c71f93e 100644
--- a/src/bitvec.c
+++ b/src/bitvec.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2012.
  *
  * This program is free software; you can redistribute it and/or
@@ -7,12 +7,12 @@
  * of the License, or (at your option) any later version.
  */
 
-/* AIX may need this for alloca to work */ 
+/* AIX may need this for alloca to work */
 #if defined _AIX
   #pragma alloca
 #endif
 
-#include "globals.h" 
+#include "globals.h"
 #include <config.h>
 #include "analyzer.h"
 #include "symbol.h"
@@ -238,7 +238,7 @@ set_window_idle(NULL);
 bvptr bits2vector(struct Bits *b)
 {
 int i;
-int regions=0;	
+int regions=0;
 struct Node *n;
 hptr *h;
 vptr vhead=NULL, vcurr=NULL, vadd;
@@ -264,7 +264,7 @@ while(h[0])	/* should never exit through this point the way we set up histents w
 	mintime=MAX_HISTENT_TIME;
 
 	vadd=(vptr)calloc_2(1,sizeof(struct VectorEnt)+numextrabytes);
-	
+
 	for(i=0;i<b->nnbits;i++) /* was 1...big mistake */
 		{
 		tshift = (b->attribs) ? b->attribs[i].shift : 0;
@@ -283,14 +283,14 @@ while(h[0])	/* should never exit through this point the way we set up histents w
 				}
 
 			if(tmod < mintime)
-				{	
+				{
 				mintime = tmod;
 				}
 			}
 		}
 
 	vadd->time=lasttime;
-	lasttime=mintime;	
+	lasttime=mintime;
 
 	regions++;
 
@@ -329,7 +329,7 @@ while(h[0])	/* should never exit through this point the way we set up histents w
 				case 'w': case 'W':
 					enc = AN_W; break;
 
-				default: 
+				default:
 					enc = enc & AN_MSK; break;
 				}
 			}
@@ -354,7 +354,7 @@ while(h[0])	/* should never exit through this point the way we set up histents w
 				}
 
 			if(tmod < mintime)
-				{	
+				{
 				mintime = tmod;
 				}
 
@@ -416,7 +416,7 @@ unsigned int rows = 0;
 pnt=str;
 while((ch=*pnt))
 	{
-	if(ch=='*') 
+	if(ch=='*')
 		{
 		wild_active=1;
 		break;
@@ -553,7 +553,7 @@ if(len)
 	pnt2=wild;
 	while((ch2=*pnt2))
 		{
-		if(ch2=='*') 
+		if(ch2=='*')
 			{
 			wild_active=1;
 			break;
@@ -567,13 +567,13 @@ if(len)
 		if(wild[0]=='(')
 			{
 			nptr nexp;
-			
+
 			for(i=1;;i++)
 				{
 				if(wild[i]==0) break;
-				if((wild[i]==')')&&(wild[i+1])) 
+				if((wild[i]==')')&&(wild[i+1]))
 					{
-					i++; 
+					i++;
 					s=symfind(wild+i, &rows);
 					if(s)
 						{
@@ -582,7 +582,7 @@ if(len)
 							{
 							n[nodepnt++]=nexp;
 							if(nodepnt==BITATTRIBUTES_MAX) { free_2(wild); goto ifnode; }
-							}		
+							}
 						}
 					else
                                               	{
@@ -614,7 +614,7 @@ if(len)
                                                                 actual = bval; /* punt */
                                                                 }
 
-                                                        sprintf(ns, "%s[%d]", wild+i, actual); 
+                                                        sprintf(ns, "%s[%d]", wild+i, actual);
                                                         *lp = '[';
 
                                                         s=symfind(ns, &rows);
@@ -637,7 +637,7 @@ if(len)
 			}
 			else
 			{
-			if((s=symfind(wild, &rows)))	
+			if((s=symfind(wild, &rows)))
 				{
 				n[nodepnt++]=&s->n[rows];
 				if(nodepnt==BITATTRIBUTES_MAX) { free_2(wild); goto ifnode; }
@@ -721,7 +721,7 @@ if(len)
 		{
 		ba[nodepnt-1].shift = atoi_64(wild);
 		state++;
-		goto fw;		
+		goto fw;
 		}
 	else
 	if(state==2)
@@ -742,13 +742,13 @@ if(len)
 		if(wild[0]=='(')
 			{
 			nptr nexp;
-			
+
 			for(i=1;;i++)
 				{
 				if(wild[i]==0) break;
-				if((wild[i]==')')&&(wild[i+1])) 
+				if((wild[i]==')')&&(wild[i+1]))
 					{
-					i++; 
+					i++;
 					s=symfind(wild+i, &rows);
 					if(s)
 						{
@@ -757,7 +757,7 @@ if(len)
 							{
 							n[nodepnt++]=nexp;
 							if(nodepnt==BITATTRIBUTES_MAX) { free_2(wild); goto ifnode; }
-							}		
+							}
 						}
 					else
                                               	{
@@ -789,7 +789,7 @@ if(len)
                                                                 actual = bval; /* punt */
                                                                 }
 
-                                                        sprintf(ns, "%s[%d]", wild+i, actual); 
+                                                        sprintf(ns, "%s[%d]", wild+i, actual);
                                                         *lp = '[';
 
                                                         s=symfind(ns, &rows);
@@ -813,7 +813,7 @@ if(len)
 			}
 			else
 			{
-			if((s=symfind(wild, &rows)))	
+			if((s=symfind(wild, &rows)))
 				{
 				n[nodepnt++]=&s->n[rows];
 				}
@@ -1007,15 +1007,15 @@ if(nodepnt)
 			s1 = hier_decompress_flagged(s1, &s1_was_packed);
 			s2 = hier_decompress_flagged(s2, &s2_was_packed);
 			}
-		
-		l1=strlen(s1); 
+
+		l1=strlen(s1);
 
 		for(i=l1-1;i>=0;i--)
 			{
 			if(s1[i]==hier_delimeter2) { root1len=i+1; break; }
 			}
 
-		l2=strlen(s2);	
+		l2=strlen(s2);
 		for(i=l2-1;i>=0;i--)
 			{
 			if(s2[i]==hier_delimeter2) { root2len=i+1; break; }
@@ -1052,7 +1052,7 @@ if(nodepnt)
 				add1--;
 				add2--;
 				}
-			
+
 			if(symlo!=symhi)
 				{
 				unsigned char fixup1 = 0, fixup2 = 0;
@@ -1225,15 +1225,15 @@ if(nodepnt)
 			s1 = hier_decompress_flagged(s1, &s1_was_packed);
 			s2 = hier_decompress_flagged(s2, &s2_was_packed);
 			}
-		
-		l1=strlen(s1); 
+
+		l1=strlen(s1);
 
 		for(i=l1-1;i>=0;i--)
 			{
 			if(s1[i]==GLOBALS->hier_delimeter) { root1len=i+1; break; }
 			}
 
-		l2=strlen(s2);	
+		l2=strlen(s2);
 		for(i=l2-1;i>=0;i--)
 			{
 			if(s2[i]==GLOBALS->hier_delimeter) { root2len=i+1; break; }
@@ -1265,7 +1265,7 @@ if(nodepnt)
 			int add1, add2, totallen;
 
 			add1=l1-root1len; add2=l2-root2len;
-			
+
 			if(lo!=hi)
 				{
 				totallen=
@@ -1359,7 +1359,7 @@ ptr=str;
 
 while((ch=*ptr))
         {
-        if((ch>='0')&&(ch<='9')) 
+        if((ch>='0')&&(ch<='9'))
                 {
                 if(!numptr) numptr=ptr;
                 }
@@ -1384,7 +1384,7 @@ if(numptr)
  * compares two facilities a la strcmp but preserves
  * numbers for comparisons
  *
- * there are two flavors..the slow and accurate to any 
+ * there are two flavors..the slow and accurate to any
  * arbitrary number of digits version (first) and the
  * fast one good to 2**31-1.  we default to the faster
  * version since there's probably no real need to
@@ -1518,7 +1518,7 @@ return(rc);
 
 
 #ifndef __linux__
-/* 
+/*
  * heapsort algorithm.  this typically outperforms quicksort.  note
  * that glibc will use a modified mergesort if memory is available, so
  * under linux use the stock qsort instead.
@@ -1530,16 +1530,16 @@ int l, r;
 unsigned int largest;
 struct symbol *t;
 int maxele=heap_size/2-1;	/* points to where heapswaps don't matter anymore */
-                
+
 for(;;)
         {
         l=2*i+1;
         r=l+1;
-                         
+
         if((l<heap_size)&&(sigcmp(hp[l]->name,hp[i]->name)>0))
                 {
                 largest=l;
-                }   
+                }
                 else
                 {
                 largest=i;
@@ -1548,13 +1548,13 @@ for(;;)
                 {
                 largest=r;
                 }
-        
+
         if(i!=largest)
                 {
                 t=hp[i];
                 hp[i]=hp[largest];
                 hp[largest]=t;
-                
+
                 if(largest<=maxele)
                         {
                         i=largest;
@@ -1562,8 +1562,8 @@ for(;;)
                         else
                         {
                         break;
-                        } 
-                }   
+                        }
+                }
                 else
                 {
                 break;
@@ -1673,15 +1673,15 @@ if(!GLOBALS->autocoalesce_reversal)		/* normal case for MTI */
 
 s1=hier_decompress_flagged(symhi->n->nname, &s1_was_packed);
 s2=hier_decompress_flagged(symlo->n->nname, &s2_was_packed);
-		
-l1=strlen(s1); 
+
+l1=strlen(s1);
 
 for(i=l1-1;i>=0;i--)
 	{
 	if(s1[i]==hier_delimeter2) { root1len=i+1; break; }
 	}
 
-l2=strlen(s2);	
+l2=strlen(s2);
 for(i=l2-1;i>=0;i--)
 	{
 	if(s2[i]==hier_delimeter2) { root2len=i+1; break; }
@@ -1710,7 +1710,7 @@ if((root1len!=root2len)||(!root1len)||(!root2len)||
 		add1--;
 		add2--;
 		}
-			
+
 	if(symlo!=symhi)
 		{
 		unsigned char fixup1 = 0, fixup2 = 0;
@@ -1856,21 +1856,21 @@ if(!n->extvals)
 
 	        histpnt=&(n->head);
 	        histcount=0;
-	
+
 	        while(histpnt)
 	                {
 	                histcount++;
 	                histpnt=histpnt->next;
 	                }
-	
+
 	        n->numhist=histcount;
-	 
+
 	        if(!(n->harray=harray=(hptr *)malloc_2(histcount*sizeof(hptr))))
 	                {
 	                fprintf( stderr, "Out of memory, can't add to analyzer\n");
 	                return(NULL);
 	                }
-	
+
 	        histpnt=&(n->head);
 	        for(i=0;i<histcount;i++)
 	                {
@@ -1892,7 +1892,7 @@ if(!n->extvals)
 	for(i=0;i<width;i++)
 		{
 		narray[i] = (nptr)calloc_2(1, sizeof(struct Node));
-		sprintf(nam+offset, "[%d]", actual);	
+		sprintf(nam+offset, "[%d]", actual);
 #ifdef WAVE_ARRAY_SUPPORT
 		if(n->array_height)
 			{
@@ -1921,7 +1921,7 @@ if(!n->extvals)
 				{
 				if(narray[j]->curr)
 					{
-					htemp = (hptr) calloc_2(1, sizeof(struct HistEnt));				
+					htemp = (hptr) calloc_2(1, sizeof(struct HistEnt));
 					htemp->v.h_val = AN_X;			/* 'x' */
 					htemp->time = h->time;
 					narray[j]->curr->next = htemp;
@@ -1958,7 +1958,7 @@ if(!n->extvals)
 
 				if(narray[j]->curr->v.h_val != val) 		/* curr will have been established already by 'x' at time: -1 */
 					{
-					htemp = (hptr) calloc_2(1, sizeof(struct HistEnt));				
+					htemp = (hptr) calloc_2(1, sizeof(struct HistEnt));
 					htemp->v.h_val = val;
 					htemp->time = h->time;
 					narray[j]->curr->next = htemp;
@@ -2058,21 +2058,21 @@ if(!n->extvals)
 
 	        histpnt=&(n->head);
 	        histcount=0;
-	
+
 	        while(histpnt)
 	                {
 	                histcount++;
 	                histpnt=histpnt->next;
 	                }
-	
+
 	        n->numhist=histcount;
-	 
+
 	        if(!(n->harray=harray=(hptr *)malloc_2(histcount*sizeof(hptr))))
 	                {
 	                DEBUG(fprintf( stderr, "Out of memory, can't add to analyzer\n"));
 	                return(NULL);
 	                }
-	
+
 	        histpnt=&(n->head);
 	        for(i=0;i<histcount;i++)
 	                {
@@ -2119,7 +2119,7 @@ if(!n->extvals)
 			{
 			if(np->curr)
 				{
-				htemp = (hptr) calloc_2(1, sizeof(struct HistEnt));				
+				htemp = (hptr) calloc_2(1, sizeof(struct HistEnt));
 				htemp->v.h_val = AN_X;			/* 'x' */
 				htemp->time = h->time;
 				np->curr->next = htemp;
@@ -2153,7 +2153,7 @@ if(!n->extvals)
 
 			if(np->curr->v.h_val != val) 		/* curr will have been established already by 'x' at time: -1 */
 				{
-				htemp = (hptr) calloc_2(1, sizeof(struct HistEnt));				
+				htemp = (hptr) calloc_2(1, sizeof(struct HistEnt));
 				htemp->v.h_val = val;
 				htemp->time = h->time;
 				np->curr->next = htemp;
@@ -2190,7 +2190,7 @@ if(n->expansion)
 		{
 		for(i=1;i<n->numhist;i++)	/* 1st is actually part of the Node! */
 			{
-			free_2(n->harray[i]);	
+			free_2(n->harray[i]);
 			}
 		free_2(n->harray);
 		free_2(n->expansion);
diff --git a/src/bsearch.c b/src/bsearch.c
index e43f611..d4b2a97 100644
--- a/src/bsearch.c
+++ b/src/bsearch.c
@@ -42,7 +42,7 @@ return(rv);
 
 int bsearch_timechain(TimeType key)
 {
-GLOBALS->max_compare_time_tc_bsearch_c_1=-2; GLOBALS->max_compare_pos_tc_bsearch_c_1=NULL; 
+GLOBALS->max_compare_time_tc_bsearch_c_1=-2; GLOBALS->max_compare_pos_tc_bsearch_c_1=NULL;
 
 if(!GLOBALS->strace_ctx->timearray) return(-1);
 
@@ -51,7 +51,7 @@ if(bsearch(&key, GLOBALS->strace_ctx->timearray, GLOBALS->strace_ctx->timearray_
         /* nothing, all side effects are in bsearch */
         }
 
-if((!GLOBALS->max_compare_pos_tc_bsearch_c_1)||(GLOBALS->max_compare_time_tc_bsearch_c_1<GLOBALS->shift_timebase)) 
+if((!GLOBALS->max_compare_pos_tc_bsearch_c_1)||(GLOBALS->max_compare_time_tc_bsearch_c_1<GLOBALS->shift_timebase))
 	{
 	GLOBALS->max_compare_pos_tc_bsearch_c_1=GLOBALS->strace_ctx->timearray; /* aix bsearch fix */
 	}
@@ -63,7 +63,7 @@ return(GLOBALS->max_compare_pos_tc_bsearch_c_1-GLOBALS->strace_ctx->timearray);
 
 int bsearch_aetinfo_timechain(TimeType key)
 {
-GLOBALS->max_compare_time_tc_bsearch_c_1=-2; GLOBALS->max_compare_pos_tc_bsearch_c_1=NULL; 
+GLOBALS->max_compare_time_tc_bsearch_c_1=-2; GLOBALS->max_compare_pos_tc_bsearch_c_1=NULL;
 
 if(!GLOBALS->ae2_time_xlate) return(-1);
 
@@ -115,10 +115,10 @@ if(bsearch(&key, n->harray, n->numhist, sizeof(hptr), compar_histent))
         /* nothing, all side effects are in bsearch */
         }
 
-if((!GLOBALS->max_compare_pos_bsearch_c_1)||(GLOBALS->max_compare_time_bsearch_c_1<LLDescriptor(0))) 
+if((!GLOBALS->max_compare_pos_bsearch_c_1)||(GLOBALS->max_compare_time_bsearch_c_1<LLDescriptor(0)))
 	{
 	GLOBALS->max_compare_pos_bsearch_c_1=n->harray[1]; /* aix bsearch fix */
-	GLOBALS->max_compare_index=&(n->harray[1]); 
+	GLOBALS->max_compare_index=&(n->harray[1]);
 	}
 
 while(GLOBALS->max_compare_pos_bsearch_c_1->next) /* non-RoSync dumper deglitching fix */
@@ -168,7 +168,7 @@ if(bsearch(&key, b->vectors, b->numregions, sizeof(vptr), compar_vectorent))
         /* nothing, all side effects are in bsearch */
         }
 
-if((!GLOBALS->vmax_compare_pos_bsearch_c_1)||(GLOBALS->vmax_compare_time_bsearch_c_1<LLDescriptor(0))) 
+if((!GLOBALS->vmax_compare_pos_bsearch_c_1)||(GLOBALS->vmax_compare_time_bsearch_c_1<LLDescriptor(0)))
 	{
 	/* ignore warning: array index of '1' indexes past the end of an array (that contains 1 elements) [-Warray-bounds] */
 	/* because this array is allocated with size > that declared in the structure definition via end of structure malloc padding */
@@ -265,7 +265,7 @@ if(ascii[len-1]=='}')
 	int i;
 
 	for(i=len-2;i>=2;i--)
-		{	
+		{
 		if(isdigit((int)(unsigned char)ascii[i])) continue;
 		if(ascii[i]=='{')
 			{
@@ -273,22 +273,22 @@ if(ascii[len-1]=='}')
 			memcpy(tsc, ascii, i+1);
 			tsc[i] = 0;
 			rc=(struct symbol **)bsearch(tsc, GLOBALS->facs, GLOBALS->numfacs, sizeof(struct symbol *), compar_facs);
-			if(rc) 
+			if(rc)
 				{
 				unsigned int whichrow = atoi(&ascii[i+1]);
 				if(rows_return) *rows_return = whichrow;
 
 #ifdef WAVE_ARRAY_SUPPORT
-				if(whichrow <= (*rc)->n->array_height) 
+				if(whichrow <= (*rc)->n->array_height)
 #endif
-					{	
+					{
 					return(*rc);
 					}
 				}
 			}
 		break;	/* fallthrough to normal handler */
 		}
-	
+
 	}
 
 rc=(struct symbol **)bsearch(ascii, GLOBALS->facs, GLOBALS->numfacs, sizeof(struct symbol *), compar_facs);
diff --git a/src/bsearch.h b/src/bsearch.h
index a128266..d49c4af 100644
--- a/src/bsearch.h
+++ b/src/bsearch.h
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999.
  *
  * This program is free software; you can redistribute it and/or
diff --git a/src/busy.c b/src/busy.c
index 81b18ef..dd720ee 100644
--- a/src/busy.c
+++ b/src/busy.c
@@ -19,7 +19,7 @@ inside_iteration++;
 
 while (gtk_events_pending()) gtk_main_iteration();
 
-inside_iteration--; 
+inside_iteration--;
 }
 
 gboolean in_main_iteration(void)
@@ -58,7 +58,7 @@ if(!GLOBALS->busy_busy_c_1)
 
 	/* now it has been updated to remove keyboard/mouse input */
 
-	switch (event->type) 
+	switch (event->type)
 		{
 		/* more may be needed to be added in the future */
 		case GDK_MOTION_NOTIFY:
@@ -73,7 +73,7 @@ if(!GLOBALS->busy_busy_c_1)
 #endif
 			/* printf("event->type: %d\n", event->type); */
 			break;
-	
+
 		default:
 	            	gtk_main_do_event(event);
 			/* printf("event->type: %d\n", event->type); */
@@ -96,21 +96,21 @@ if(GLOBALS->partial_vcd)
 
 	set_window_busy(NULL);
 
-	while (gtk_events_pending()) 
+	while (gtk_events_pending())
 		{
 		gtk_main_iteration();
 		if(GLOBALS != g_old)
-			{	
+			{
 			/* this should never happen! */
 			/* if it does, the program state is probably screwed */
 			fprintf(stderr, "GTKWAVE | WARNING: globals changed during gtkwave_main_iteration()!\n");
 			gcache = GLOBALS;
 			}
 		}
-	
+
 	set_GLOBALS(g_old);
 	set_window_idle(NULL);
-	
+
 	if(gcache)
 		{
 		set_GLOBALS(gcache);
diff --git a/src/busy.h b/src/busy.h
index f785004..f714fe0 100644
--- a/src/busy.h
+++ b/src/busy.h
@@ -20,7 +20,7 @@
 /* number of histents to create before kicking off gtk_main_iteration() checking */
 #define WAVE_BUSY_ITER (1000)
 
-void init_busy(void); 
+void init_busy(void);
 void set_window_busy_no_refresh(GtkWidget *w);
 void set_window_busy(GtkWidget *w);
 void set_window_idle(GtkWidget *w);
diff --git a/src/clipping.c b/src/clipping.c
index b4d6483..502a82b 100644
--- a/src/clipping.c
+++ b/src/clipping.c
@@ -26,7 +26,7 @@ int wave_lineclip(int *coords, int *rect)
 {
 int msk1, msk2;
 
-/* 
+/*
      these comparisons assume the bounding rectangle is set up as follows:
 
            rx1    rx2
@@ -69,13 +69,13 @@ else
 	if((x1<rx1)&&(x2>=rx1)) { dx1 = rx1; dy1 = m*dx1 + b; }
 	else if((x1>rx2)&&(x2<=rx2)) { dx1 = rx2; dy1 = m*dx1 + b; }
 
-	if((y1<ry1)&&(y2>=ry1)) { dy1 = ry1; dx1 = (dy1 - b) / m; } 
+	if((y1<ry1)&&(y2>=ry1)) { dy1 = ry1; dx1 = (dy1 - b) / m; }
 	else if((y1>ry2)&&(y2<=ry2)) { dy1 = ry2; dx1 = (dy1 - b) / m; }
 
 	if((x2<rx1)&&(x1>=rx1)) { dx2 = rx1; dy2 = m*dx2 + b; }
 	else if((x2>rx2)&&(x1<=rx2)) { dx2 = rx2; dy2 = m*dx2 + b; }
 
-	if((y2<ry1)&&(y1>=ry1)) { dy2 = ry1; dx2 = (dy2 - b) / m; } 
+	if((y2<ry1)&&(y1>=ry1)) { dy2 = ry1; dx2 = (dy2 - b) / m; }
 	else if((y2>ry2)&&(y1<=ry2)) { dy2 = ry2; dx2 = (dy2 - b) / m; }
 
 	x1 = dx1; y1 = dy1;
diff --git a/src/color.c b/src/color.c
index 1f4a346..eb43b23 100644
--- a/src/color.c
+++ b/src/color.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2011.
  *
  * This program is free software; you can redistribute it and/or
@@ -12,7 +12,7 @@
 #include "color.h"
 #include "debug.h"
 
-/* 
+/*
  * return graphics context with tuple's color or
  * a fallback context.  Note that if tuple<0,
  * the fallback will be used!
@@ -33,7 +33,7 @@ if((gc=gdk_gc_new(widget->window)))
 	struct wave_gcchain_t *wg = calloc_2(1, sizeof(struct wave_gcchain_t));
 
 	color.red=red*(65535/255);
-	color.blue=blue*(65535/255);  
+	color.blue=blue*(65535/255);
 	color.green=green*(65535/255);
 	color.pixel=(gulong)(tuple&0x00ffffff);
 	gdk_color_alloc(gtk_widget_get_colormap(widget),&color);
diff --git a/src/color.h b/src/color.h
index 62dd389..10fc613 100644
--- a/src/color.h
+++ b/src/color.h
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2011.
  *
  * This program is free software; you can redistribute it and/or
diff --git a/src/currenttime.c b/src/currenttime.c
index d13e3c9..5342812 100644
--- a/src/currenttime.c
+++ b/src/currenttime.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2008.
  *
  * This program is free software; you can redistribute it and/or
@@ -37,7 +37,7 @@ for(i=0;i<len;i++)
         	{
 		buf[i] = 0;
                 prefix_idx=i;
-                break;   
+                break;
                 }
 		else
 		{
@@ -79,7 +79,7 @@ strcpy(s, buf);
 
 void update_maxmarker_labels(void)
 {
-if(GLOBALS->use_maxtime_display) 
+if(GLOBALS->use_maxtime_display)
 	{
 	gtk_label_set(GTK_LABEL(GLOBALS->max_or_marker_label_currenttime_c_1),
 		(!GLOBALS->use_toolbutton_interface) ? maxtime_label_text : maxtime_label_text_hpos);
@@ -100,29 +100,29 @@ int i, delta, rc;
 unsigned char ch = dim;
 double d = 0.0;
 const char *offs = NULL, *doffs = NULL;
-                                 
+
 rc = sscanf(s, "%lf %cs", &d, &ch);
 if(rc == 2)
         {
-        ch = tolower(ch);   
+        ch = tolower(ch);
         if(ch=='s') ch = ' ';
         offs=strchr(time_prefix, ch);
         if(offs)
                 {
                 doffs=strchr(time_prefix, (int)dim);
                 if(!doffs) doffs = offs; /* should *never* happen */
-                 
+
                 delta= (doffs-time_prefix) - (offs-time_prefix);
-                
+
                 if(delta<0)
-                        {  
+                        {
                         for(i=delta;i<0;i++)
                                 {
                                 d=d/1000;
                                 }
                         }
                         else
-                        {   
+                        {
                         for(i=0;i<delta;i++)
                                 {
                                 d=d*1000;
@@ -130,7 +130,7 @@ if(rc == 2)
                         }
                 }
         }
-         
+
 return((TimeType)d);
 }
 
@@ -150,7 +150,7 @@ if((pnt=GLOBALS->atoi_cont_ptr))
 		{
 		if((ch==' ')||(ch=='\t')) continue;
 
-		ich=tolower((int)ch);		
+		ich=tolower((int)ch);
 		if(ich=='s') ich=' ';	/* as in plain vanilla seconds */
 
 		offs=strchr(time_prefix, ich);
@@ -219,7 +219,7 @@ if(val < LLDescriptor(0))
         {
         val = -val;
         buf[0] = '-';
-        buf++;              
+        buf++;
         }
 
 pnt=strchr(time_prefix, (int)dim);
@@ -250,7 +250,7 @@ if(val < LLDescriptor(0))
         {
         val = -val;
         buf[0] = '-';
-        buf++;              
+        buf++;
         }
 
 pnt=strchr(time_prefix, (int)dim);
@@ -272,7 +272,7 @@ if(GLOBALS->scale_to_time_dimension)
 		{
 		pnt=strchr(time_prefix, (int)GLOBALS->scale_to_time_dimension);
 		}
-	if(pnt) 
+	if(pnt)
 		{
 		offsetfix = pnt-time_prefix;
 		if(offsetfix != i)
@@ -308,7 +308,7 @@ if(GLOBALS->scale_to_time_dimension)
 				sprintf(buf, "%.9g %cs", gval, GLOBALS->scale_to_time_dimension);
 				}
 
-			return; 
+			return;
 			}
 		}
 	}
@@ -386,7 +386,7 @@ if(GLOBALS->scale_to_time_dimension)
 		{
 		pnt=strchr(time_prefix, (int)GLOBALS->scale_to_time_dimension);
 		}
-	if(pnt) 
+	if(pnt)
 		{
 		offsetfix = pnt-time_prefix;
 		if(offsetfix != i)
@@ -422,7 +422,7 @@ if(GLOBALS->scale_to_time_dimension)
 				sprintf(buf, "%.9g%c%cs", gval, blackout, GLOBALS->scale_to_time_dimension);
 				}
 
-			return; 
+			return;
 			}
 		}
 	}
@@ -500,7 +500,7 @@ if(!GLOBALS->use_maxtime_display)
 					}
 				}
 			}
-		else if(GLOBALS->tims.lmbcache>=0) 
+		else if(GLOBALS->tims.lmbcache>=0)
 			{
 			val-=GLOBALS->tims.lmbcache; /* do delta instead */
 
@@ -591,7 +591,7 @@ if(GLOBALS->tims.baseline<0)
 	}
 }
 
-   
+
 /* Create an entry box */
 GtkWidget *
 create_time_box(void)
@@ -638,7 +638,7 @@ if(!GLOBALS->use_toolbutton_interface)
 	mainbox=gtk_hbox_new(FALSE, 0);
 	}
 
-gtk_widget_show(mainbox);   
+gtk_widget_show(mainbox);
 eventbox=gtk_event_box_new();
 gtk_container_add(GTK_CONTAINER(eventbox), mainbox);
 
@@ -685,7 +685,7 @@ if(!GLOBALS->use_toolbutton_interface)
 
 return(eventbox);
 }
-   
+
 
 
 
@@ -698,7 +698,7 @@ if(GLOBALS->time_trunc_val_currenttime_c_1!=1)
 	t=t*GLOBALS->time_trunc_val_currenttime_c_1;
 	if(t<GLOBALS->tims.first) t=GLOBALS->tims.first;
 	}
- 
+
 return(t);
 }
 
@@ -715,7 +715,7 @@ for(;compar!=1;compar=compar/10,gcompar=gcompar/((gdouble)10.0))
 		return;
 		}
         }
- 
+
 GLOBALS->time_trunc_val_currenttime_c_1=1;
 }
 
diff --git a/src/currenttime.h b/src/currenttime.h
index b68fcfe..4ce1cd0 100644
--- a/src/currenttime.h
+++ b/src/currenttime.h
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2010
  *
  * This program is free software; you can redistribute it and/or
diff --git a/src/debug.c b/src/debug.c
index 1be1e2f..193de4a 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2014.
  *
  * This program is free software; you can redistribute it and/or
@@ -117,14 +117,14 @@ void *malloc_2(size_t size
 void *ret;
 
 ret=malloc(size);
-if(ret)  
+if(ret)
         {
 	Judy1Set ((Pvoid_t)&GLOBALS->alloc2_chain, (Word_t)ret, PJE0);
 
         GLOBALS->outstanding++;
-        
+
         return(ret);
-        }   
+        }
         else
         {
 #ifdef DEBUG_MALLOC_LINES
@@ -213,7 +213,7 @@ void *ret;
 void **ret2 = ((void **)ptr) - 2;
 void **prv = (void **)*(ret2+0);
 void **nxt = (void **)*(ret2+1);
-                 
+
 if(prv)
 	{
         *(prv+1) = nxt;
@@ -222,7 +222,7 @@ if(prv)
         {
         GLOBALS->alloc2_chain = nxt;
         }
-        
+
 if(nxt)
 	{
         *(nxt+0) = prv;
@@ -384,7 +384,7 @@ if(ptr)
 	if(prv)
 		{
 		*(prv+1) = nxt;
-		}	
+		}
 		else
 		{
 		GLOBALS->alloc2_chain = nxt;
@@ -424,7 +424,7 @@ if(s)
 	{
 	int nbytes = strlen(s) + 1;
 	s2 = malloc_2(nbytes);
-	memcpy(s2, s, nbytes); 
+	memcpy(s2, s, nbytes);
 	}
 
 return(s2);
@@ -510,7 +510,7 @@ return(nflag?(-val):val);
 /*
  * wrapped tooltips
  */
-void gtk_tooltips_set_tip_2(GtkTooltips *tooltips, GtkWidget *widget, 
+void gtk_tooltips_set_tip_2(GtkTooltips *tooltips, GtkWidget *widget,
 	const gchar *tip_text, const gchar *tip_private)
 {
 if(!GLOBALS->disable_tooltips)
@@ -546,12 +546,12 @@ char *tmpnam_2(char *s, int *fd)
 {
 #if defined _MSC_VER || defined __MINGW32__
 char *fname = NULL;
-TCHAR szTempFileName[MAX_PATH];  
+TCHAR szTempFileName[MAX_PATH];
 TCHAR lpTempPathBuffer[MAX_PATH];
 DWORD dwRetVal = 0;
 UINT uRetVal = 0;
 
-*fd = -1; 
+*fd = -1;
 
 dwRetVal = GetTempPath(MAX_PATH, lpTempPathBuffer);
 if((dwRetVal > MAX_PATH) || (dwRetVal == 0))
@@ -616,7 +616,7 @@ if(window && title)
 			{
 			const char *pfx = "[Modified] ";
 			char *t = wave_alloca(strlen(pfx) + strlen(title) + 1);
-	
+
 			strcpy(t, pfx);
 			strcat(t, title);
 			gtk_window_set_title(window, t);
@@ -626,14 +626,14 @@ if(window && title)
 		case WAVE_SET_TITLE_LOADING:
 			{
 			char *t = wave_alloca(64 + strlen(title) + 1); /* make extra long */
-	
+
 			sprintf(t, "[Loading %d%%] %s", pct, title);
 			gtk_window_set_title(window, t);
 			}
 			break;
 
 		case WAVE_SET_TITLE_NONE:
-		default:		
+		default:
 			gtk_window_set_title(window, title);
 			break;
 		}
@@ -736,7 +736,7 @@ if(stat(path, &buf) == 0)
 							if(fgetc(f) == EOF) goto chk_ex;
 							}
 
-						
+
 						for(i=0;i<8;i++)
 							{
 							e_ch[i] = c = fgetc(f);
diff --git a/src/debug.h b/src/debug.h
index 4065314..dc28a80 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2012.
  *
  * This program is free software; you can redistribute it and/or
@@ -32,7 +32,7 @@
  * types...
  */
 #ifdef G_HAVE_GINT64
-	typedef gint64          TimeType; 
+	typedef gint64          TimeType;
 	typedef guint64         UTimeType;
 
         #ifndef _MSC_VER
@@ -59,7 +59,7 @@
 
 	#define WAVE_MINZOOM (LLDescriptor(-4000000000))
 #else
-	typedef long            TimeType; 
+	typedef long            TimeType;
 	typedef unsigned long   UTimeType;
 	#define TTFormat "%d"
 	#define UTTFormat "%u"
diff --git a/src/discardbuttons.c b/src/discardbuttons.c
index e3e0b40..a0734a4 100644
--- a/src/discardbuttons.c
+++ b/src/discardbuttons.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999.
  *
  * This program is free software; you can redistribute it and/or
@@ -34,7 +34,7 @@ pixmapwid1=gtk_pixmap_new(GLOBALS->larrow_pixmap, GLOBALS->larrow_mask);
 gtk_widget_show(pixmapwid1);
 pixmapwid2=gtk_pixmap_new(GLOBALS->rarrow_pixmap, GLOBALS->rarrow_mask);
 gtk_widget_show(pixmapwid2);
-   
+
 /* Create a table to hold the text widget and scrollbars */
 table = gtk_table_new (1, 1, FALSE);
 
@@ -72,4 +72,4 @@ gtk_container_add (GTK_CONTAINER (frame), table2);
 gtk_widget_show(table2);
 return(table);
 }
-   
+
diff --git a/src/edgebuttons.c b/src/edgebuttons.c
index fdf4011..51d697e 100644
--- a/src/edgebuttons.c
+++ b/src/edgebuttons.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 2008-2012.
  *
  * This program is free software; you can redistribute it and/or
@@ -20,7 +20,7 @@ Trptr t = NULL;
 
 for(t=GLOBALS->traces.first;t;t=t->t_next)
 	{
-	if ((t->flags&(TR_BLANK|TR_ANALOG_BLANK_STRETCH))||(!(t->flags&TR_HIGHLIGHT))||(!(t->name))) 
+	if ((t->flags&(TR_BLANK|TR_ANALOG_BLANK_STRETCH))||(!(t->flags&TR_HIGHLIGHT))||(!(t->name)))
 		{
 		continue;
 		}
@@ -36,11 +36,11 @@ return(t);
 static Trptr find_next_highlighted_trace(Trptr t)
 {
 if(t)
-	{	
+	{
 	t = t->t_next;
 	for(;t;t=t->t_next)
 		{
-		if ((t->flags&(TR_BLANK|TR_ANALOG_BLANK_STRETCH))||(!(t->flags&TR_HIGHLIGHT))||(!(t->name))) 
+		if ((t->flags&(TR_BLANK|TR_ANALOG_BLANK_STRETCH))||(!(t->flags&TR_HIGHLIGHT))||(!(t->name)))
 			{
 			continue;
 			}
@@ -99,7 +99,7 @@ if(GLOBALS->tims.marker<0)
 	basetime=MAX_HISTENT_TIME;
 	}
 	else
-	{	
+	{
 	basetime=GLOBALS->tims.marker;
 	}
 }
@@ -110,10 +110,10 @@ if(GLOBALS->tims.marker<0)
 	basetime=GLOBALS->tims.first;
 	}
 	else
-	{	
+	{
 	basetime=GLOBALS->tims.marker;
 	}
-} 
+}
 
 sttim=GLOBALS->tims.first;
 fintim=GLOBALS->tims.last;
@@ -184,7 +184,7 @@ while(s)
 		if((whichpass)||(GLOBALS->tims.marker>=0)) h=h->next;
 		if(!h) return;
 		s->his.h=h;
-		utt=strace_adjust(h->time,GLOBALS->shift_timebase); tt=utt;		
+		utt=strace_adjust(h->time,GLOBALS->shift_timebase); tt=utt;
 		if(tt < maxbase) maxbase=tt;
 		}
 		else
@@ -218,10 +218,10 @@ while(s)
 	t=s->trace;
 	s->search_result=0;	/* explicitly must set this */
 	GLOBALS->shift_timebase=t->shift;
-	
+
 	if((!t->vector)&&(!(t->n.nd->extvals)))
 		{
-		if(strace_adjust(s->his.h->time,GLOBALS->shift_timebase)!=maxbase) 
+		if(strace_adjust(s->his.h->time,GLOBALS->shift_timebase)!=maxbase)
 			{
 			s->his.h=bsearch_node(t->n.nd, maxbase - t->shift);
 			while(s->his.h->next && s->his.h->time==s->his.h->next->time) s->his.h=s->his.h->next;
@@ -229,11 +229,11 @@ while(s)
 /* commented out, maybe will have possible future expansion later,
  * this was cut and pasted from strace.c */
 #if 0
-		if(t->flags&TR_INVERT)  
+		if(t->flags&TR_INVERT)
                 	{
                         str[0]=AN_STR_INV[s->his.h->v.h_val];
                         }
-                        else   
+                        else
                         {
                         str[0]=AN_STR[s->his.h->v.h_val];
                         }
@@ -246,20 +246,20 @@ while(s)
 				totaltraces++;
 				s->search_result=1;
 				break;
-		
+
 /* commented out, maybe will have possible future expansion later,
  * this was cut and pasted from strace.c */
 #if 0
 			case ST_DC:
 				break;
-				
+
 			case ST_HIGH:
 				totaltraces++;
-				if((str[0]=='1')||(str[0]=='H')) s->search_result=1;	
+				if((str[0]=='1')||(str[0]=='H')) s->search_result=1;
 				break;
 
 			case ST_RISE:
-				if((str[0]=='1')||(str[0]=='H')) s->search_result=1;	
+				if((str[0]=='1')||(str[0]=='H')) s->search_result=1;
 				totaltraces++;
 				break;
 
@@ -277,7 +277,7 @@ while(s)
 				totaltraces++;
 				if(str[0]=='Z')
  					s->search_result=1;
-				break;				
+				break;
 
 			case ST_X:
 				totaltraces++;
@@ -305,7 +305,7 @@ while(s)
 
 		if(t->vector)
 			{
-			if(strace_adjust(s->his.v->time,GLOBALS->shift_timebase)!=maxbase) 
+			if(strace_adjust(s->his.v->time,GLOBALS->shift_timebase)!=maxbase)
 				{
 				s->his.v=bsearch_vector(t->n.vec, maxbase - t->shift);
 				while(s->his.v->next && s->his.v->time==s->his.v->next->time) s->his.v=s->his.v->next;
@@ -314,7 +314,7 @@ while(s)
 			}
 			else
 			{
-			if(strace_adjust(s->his.h->time,GLOBALS->shift_timebase)!=maxbase) 
+			if(strace_adjust(s->his.h->time,GLOBALS->shift_timebase)!=maxbase)
 				{
 				s->his.h=bsearch_node(t->n.nd, maxbase - t->shift);
 				while(s->his.h->next && s->his.h->time==s->his.h->next->time) s->his.h=s->his.h->next;
@@ -352,7 +352,7 @@ while(s)
 				totaltraces++;
 				s->search_result=1;
 				break;
-		
+
 /* commented out, maybe will have possible future expansion later,
  * this was cut and pasted from strace.c */
 #if 0
@@ -363,7 +363,7 @@ while(s)
 			case ST_FALL:
 				totaltraces++;
 				break;
-				
+
 			case ST_HIGH:
 				totaltraces++;
 				if((chval2=chval))
@@ -480,13 +480,13 @@ if(is_last_iteration)
 		                if((GLOBALS->tims.start&1)&&(GLOBALS->tims.end&1)) middle++;
 		                }
 		                else
-		                { 
+		                {
 		                middle=GLOBALS->tims.marker;
 		                }
-	
+
 		GLOBALS->tims.start=time_trunc(middle-(width/2));
 		if(GLOBALS->tims.start+width>GLOBALS->tims.last) GLOBALS->tims.start=GLOBALS->tims.last-width;
-		if(GLOBALS->tims.start<GLOBALS->tims.first) GLOBALS->tims.start=GLOBALS->tims.first;  
+		if(GLOBALS->tims.start<GLOBALS->tims.first) GLOBALS->tims.start=GLOBALS->tims.first;
 		GTK_ADJUSTMENT(GLOBALS->wave_hslider)->value=GLOBALS->tims.timecache=GLOBALS->tims.start;
 		}
 
@@ -566,7 +566,7 @@ pixmapwid1=gtk_pixmap_new(GLOBALS->larrow_pixmap, GLOBALS->larrow_mask);
 gtk_widget_show(pixmapwid1);
 pixmapwid2=gtk_pixmap_new(GLOBALS->rarrow_pixmap, GLOBALS->rarrow_mask);
 gtk_widget_show(pixmapwid2);
-   
+
 /* Create a table to hold the text widget and scrollbars */
 table = gtk_table_new (1, 1, FALSE);
 
@@ -604,4 +604,4 @@ gtk_container_add (GTK_CONTAINER (frame), table2);
 gtk_widget_show(table2);
 return(table);
 }
-   
+
diff --git a/src/edgebuttons.h b/src/edgebuttons.h
index 32a453b..d88003f 100644
--- a/src/edgebuttons.h
+++ b/src/edgebuttons.h
@@ -10,7 +10,7 @@
 #ifndef WAVE_EDGEBUTTONS_H
 #define WAVE_EDGEBUTTONS_H
 
-void service_left_edge(GtkWidget *text, gpointer data); 
+void service_left_edge(GtkWidget *text, gpointer data);
 void service_right_edge(GtkWidget *text, gpointer data);
 
 #endif
diff --git a/src/entry.c b/src/entry.c
index 8d2b780..62f1811 100644
--- a/src/entry.c
+++ b/src/entry.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2013.
  *
  * This program is free software; you can redistribute it and/or
diff --git a/src/extload.c b/src/extload.c
index a2af884..55305ea 100644
--- a/src/extload.c
+++ b/src/extload.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 2009-2014.
  *
  * This program is free software; you can redistribute it and/or
@@ -87,14 +87,14 @@ if(GLOBALS->extload_lastmod)
 		perror("Why");
 		errno = 0;
 		GLOBALS->extload_already_errored = 1;
-		return(0);		
+		return(0);
 		}
 	else
 	if(GLOBALS->extload_lastmod != buf.st_mtime)
 		{
 		fprintf(stderr, EXTLOAD"file '%s' was modified!\n", GLOBALS->loaded_file_name);
 		GLOBALS->extload_already_errored = 1;
-		return(0);		
+		return(0);
 		}
 		else
 		{
@@ -146,12 +146,12 @@ for(;;)
 					{
 					sprintf(rc, "Scope: vcd_struct %s NULL\n", sbuff2);
 					}
-				} 
+				}
 			else
 			if((snp=strstr(rc+1, "Struct End")))
 				{
 				sprintf(rc, "Upscope:\n");
-				} 
+				}
 			}
 		}
 	else
@@ -179,7 +179,7 @@ for(;;)
 			char *vtyp_nam;
 			char *cpyto;
 			char *pntd;
-	
+
 			sscanf(rc + 5, "%s", typ);
 
 			while(*pnt)
@@ -218,7 +218,7 @@ for(;;)
 							}
 						}
 					}
-				
+
 				pnt++;
 				}
 
@@ -235,16 +235,16 @@ for(;;)
 				if(!strcmp("vcd_real", typ))
 					{
 					GLOBALS->mvlfacs_vzt_c_3[i].flags = VZT_RD_SYM_F_DOUBLE;
-					GLOBALS->extload_node_block[i].msi=0;				
-					GLOBALS->extload_node_block[i].lsi=0;				
+					GLOBALS->extload_node_block[i].msi=0;
+					GLOBALS->extload_node_block[i].lsi=0;
 					GLOBALS->mvlfacs_vzt_c_3[i].len=64;
 					}
 				else
 				if(!strcmp("vcd_integer", typ))
 					{
 					GLOBALS->mvlfacs_vzt_c_3[i].flags = VZT_RD_SYM_F_INTEGER;
-					GLOBALS->extload_node_block[i].msi=0;				
-					GLOBALS->extload_node_block[i].lsi=0;				
+					GLOBALS->extload_node_block[i].msi=0;
+					GLOBALS->extload_node_block[i].lsi=0;
 					GLOBALS->mvlfacs_vzt_c_3[i].len=32;
 					}
 				else
@@ -263,7 +263,7 @@ for(;;)
 							else
 							{
 							GLOBALS->extload_node_block[i].lsi = GLOBALS->extload_node_block[i].msi;
-							}						
+							}
 
 						len_parse = (GLOBALS->extload_node_block[i].msi > GLOBALS->extload_node_block[i].lsi)
 								? (GLOBALS->extload_node_block[i].msi - GLOBALS->extload_node_block[i].lsi + 1)
@@ -271,25 +271,25 @@ for(;;)
 
 						if(len_parse != GLOBALS->mvlfacs_vzt_c_3[i].len)
 							{
-							GLOBALS->extload_node_block[i].msi=l;				
-							GLOBALS->extload_node_block[i].lsi=r;				
+							GLOBALS->extload_node_block[i].msi=l;
+							GLOBALS->extload_node_block[i].lsi=r;
 							}
 						}
 						else
 						{
 						if(lb && !l && !r) /* fix for stranded signals */
 							{
-							GLOBALS->extload_node_block[i].msi=atoi(lb+1);				
-							GLOBALS->extload_node_block[i].lsi=atoi(lb+1);				
+							GLOBALS->extload_node_block[i].msi=atoi(lb+1);
+							GLOBALS->extload_node_block[i].lsi=atoi(lb+1);
 							}
 							else
 							{
-							GLOBALS->extload_node_block[i].msi=l;				
-							GLOBALS->extload_node_block[i].lsi=r;				
+							GLOBALS->extload_node_block[i].msi=l;
+							GLOBALS->extload_node_block[i].lsi=r;
 							}
 						}
 
-					GLOBALS->mvlfacs_vzt_c_3[i].flags = VZT_RD_SYM_F_BITS; 
+					GLOBALS->mvlfacs_vzt_c_3[i].flags = VZT_RD_SYM_F_BITS;
 					}
 				}
 
@@ -362,7 +362,7 @@ for(;;)
 					{
 					vt = V_WIRE;
 					}
-	
+
 				*vtp = vt;
 				*pnt = ' ';
 				}
@@ -394,9 +394,9 @@ for(;;)
 						int colon_seen = 0;
 
 						pnt2++;
-						while(*pnt2 && !isspace(*pnt2) && (*pnt2 != '[')) 
-							{ 
-							lastch = *pnt2; pnt2++; 
+						while(*pnt2 && !isspace(*pnt2) && (*pnt2 != '['))
+							{
+							lastch = *pnt2; pnt2++;
 							if(lastch == ':') { colon_seen = 1; }
 							};
 
@@ -512,7 +512,7 @@ unsigned char vd;
 struct Node *n;
 struct symbol *s;
 char buf[65537];
-char *str;	
+char *str;
 struct fac *f;
 char *fnam;
 int flen;
@@ -601,7 +601,7 @@ else
 	        symadd_name_exists_sym_exists(s,str,0);
 		GLOBALS->extload_prevsymroot = GLOBALS->extload_prevsym = NULL;
 		}
-	else if ( 
+	else if (
 			((f->len==1)&&(!(f->flags&(VZT_RD_SYM_F_INTEGER|VZT_RD_SYM_F_DOUBLE|VZT_RD_SYM_F_STRING)))&&
 			((i!=GLOBALS->numfacs-1)&&(!strcmp(GLOBALS->extload_namecache[i], GLOBALS->extload_namecache[i+1]))))
 			||
@@ -655,7 +655,7 @@ else
 			GLOBALS->mvlfacs_vzt_c_3[i].len=32;
 			}
 		}
-		
+
         n=&GLOBALS->extload_node_block[i];
         n->nname=s->name;
         n->mv.mvlfac = GLOBALS->mvlfacs_vzt_c_3+i;
@@ -665,7 +665,7 @@ else
 		{
 		n->extvals = 1;
 		}
-                 
+
         n->head.time=-1;        /* mark 1st node as negative time */
         n->head.v.h_val=AN_X;
         s->n=n;
@@ -773,7 +773,7 @@ if(GLOBALS->extload_ffr_ctx)
 		GLOBALS->min_time = tim;
 		success_count++;
 		}
-	
+
 	attempt_count++;
 	rv = fsdbReaderGetMaxFsdbTag64(GLOBALS->extload_ffr_ctx, &tim);
 	if(rv)
@@ -852,7 +852,7 @@ for(;;)
 							}
 						pnt++;
 						}
-					
+
 					msk |= 1;
 					}
 				}
@@ -1032,7 +1032,7 @@ fstReaderClose(GLOBALS->extload_xc); /* corresponds to fstReaderOpenForUtilities
 
 #endif
 
-/* SPLASH */                            splash_sync(2, 5);  
+/* SPLASH */                            splash_sync(2, 5);
 GLOBALS->facs=(struct symbol **)malloc_2(GLOBALS->numfacs*sizeof(struct symbol *));
 
 if(GLOBALS->fast_tree_sort)
@@ -1040,26 +1040,26 @@ if(GLOBALS->fast_tree_sort)
         for(i=0;i<GLOBALS->numfacs;i++)
                 {
                 int len;
-                GLOBALS->facs[i]=&GLOBALS->extload_sym_block[i]; 
+                GLOBALS->facs[i]=&GLOBALS->extload_sym_block[i];
                 if((len=strlen(GLOBALS->facs[i]->name))>GLOBALS->longestname) GLOBALS->longestname=len;
                 }
-                                
-/* SPLASH */                            splash_sync(3, 5);  
+
+/* SPLASH */                            splash_sync(3, 5);
         fprintf(stderr, EXTLOAD"Building facility hierarchy tree.\n");
-                                         
+
         init_tree();
         for(i=0;i<GLOBALS->numfacs;i++)
                 {
 		build_tree_from_name(GLOBALS->facs[i]->name, i);
                 }
-/* SPLASH */                            splash_sync(4, 5);  
+/* SPLASH */                            splash_sync(4, 5);
         treegraft(&GLOBALS->treeroot);
-                                
+
         fprintf(stderr, EXTLOAD"Sorting facility hierarchy tree.\n");
         treesort(GLOBALS->treeroot, NULL);
-/* SPLASH */                            splash_sync(5, 5);  
+/* SPLASH */                            splash_sync(5, 5);
         order_facs_from_treesort(GLOBALS->treeroot, &GLOBALS->facs);
-                                
+
         GLOBALS->facs_are_sorted=1;
         }
         else
@@ -1077,43 +1077,43 @@ if(GLOBALS->fast_tree_sort)
 	        if((len=strlen(subst))>GLOBALS->longestname) GLOBALS->longestname=len;
 #ifdef WAVE_HIERFIX
 		while((ch=(*subst)))
-			{	
+			{
 			if(ch==GLOBALS->hier_delimeter) { *subst=VCDNAM_HIERSORT; }	/* forces sort at hier boundaries */
 			subst++;
 			}
 #endif
 		}
 
-/* SPLASH */                            splash_sync(3, 5);  
+/* SPLASH */                            splash_sync(3, 5);
 	fprintf(stderr, EXTLOAD"Sorting facilities at hierarchy boundaries.\n");
 	wave_heapsort(GLOBALS->facs,GLOBALS->numfacs);
-	
+
 #ifdef WAVE_HIERFIX
 	for(i=0;i<GLOBALS->numfacs;i++)
 		{
 		char *subst, ch;
-	
+
 		subst=GLOBALS->facs[i]->name;
 		while((ch=(*subst)))
-			{	
+			{
 			if(ch==VCDNAM_HIERSORT) { *subst=GLOBALS->hier_delimeter; }	/* restore back to normal */
 			subst++;
 			}
 		}
-#endif	
+#endif
 
 	GLOBALS->facs_are_sorted=1;
 
-/* SPLASH */                            splash_sync(4, 5);  
+/* SPLASH */                            splash_sync(4, 5);
 	fprintf(stderr, EXTLOAD"Building facility hierarchy tree.\n");
 
-	init_tree();		
-	for(i=0;i<GLOBALS->numfacs;i++)	
+	init_tree();
+	for(i=0;i<GLOBALS->numfacs;i++)
 		{
 		char *nf = GLOBALS->facs[i]->name;
 	        build_tree_from_name(nf, i);
 		}
-/* SPLASH */                            splash_sync(5, 5);  
+/* SPLASH */                            splash_sync(5, 5);
 	treegraft(&GLOBALS->treeroot);
 	treesort(GLOBALS->treeroot, NULL);
 	}
@@ -1176,7 +1176,7 @@ struct lx2_entry *l2e = GLOBALS->vzt_table_vzt_c_1+(*facidx);
 struct fac *f = GLOBALS->mvlfacs_vzt_c_3+(*facidx);
 
 
-GLOBALS->busycnt_vzt_c_2++; 
+GLOBALS->busycnt_vzt_c_2++;
 if(GLOBALS->busycnt_vzt_c_2==WAVE_BUSY_ITER)
 	{
 	busy_window_refresh();
@@ -1187,7 +1187,7 @@ if(GLOBALS->busycnt_vzt_c_2==WAVE_BUSY_ITER)
 
 if(!(f->flags&(VZT_RD_SYM_F_DOUBLE|VZT_RD_SYM_F_STRING)))
 	{
-	if(f->len>1)        
+	if(f->len>1)
 	        {
 	        htemp->v.h_vector = (char *)malloc_2(f->len);
 		memcpy(htemp->v.h_vector, *value, f->len);
@@ -1243,7 +1243,7 @@ l2e->numtrans++;
  * this is the black magic that handles aliased signals...
  */
 static void ext_resolver(nptr np, nptr resolve)
-{ 
+{
 np->extvals = resolve->extvals;
 np->msi = resolve->msi;
 np->lsi = resolve->lsi;
@@ -1256,8 +1256,8 @@ np->mv.mvlfac=NULL;
 
 
 
-/* 
- * actually import a extload trace but don't do it if it's already been imported 
+/*
+ * actually import a extload trace but don't do it if it's already been imported
  */
 void import_extload_trace(nptr np)
 {
@@ -1278,17 +1278,17 @@ txidx_in_trace = GLOBALS->extload_idcodes[txidx];
 if(GLOBALS->extload_inv_idcodes[txidx_in_trace] < 0)
 	{
 	txidx = (-GLOBALS->extload_inv_idcodes[txidx_in_trace]) - 1;
-	
+
 	np = GLOBALS->mvlfacs_vzt_c_3[txidx].working_node;
 
-	if(!(f=np->mv.mvlfac)) 
+	if(!(f=np->mv.mvlfac))
 		{
 		ext_resolver(nold, np);
 		return;	/* already imported */
 		}
 	}
 
-GLOBALS->extload_inv_idcodes[txidx_in_trace] = - (txidx + 1); 
+GLOBALS->extload_inv_idcodes[txidx_in_trace] = - (txidx + 1);
 
 #ifndef WAVE_FSDB_READER_IS_PRESENT
 fprintf(stderr, EXTLOAD"Import: %s\n", np->nname);
@@ -1312,10 +1312,11 @@ void *hdl;
 hdl = fsdbReaderCreateVCTraverseHandle(GLOBALS->extload_ffr_ctx, txidx_in_trace);
 if(fsdbReaderHasIncoreVC(GLOBALS->extload_ffr_ctx, hdl))
 	{
+	TimeType mxt_max = -2;
 	TimeType mxt = (TimeType)fsdbReaderGetMinXTag(GLOBALS->extload_ffr_ctx, hdl);
-	fsdbReaderGotoXTag(GLOBALS->extload_ffr_ctx, hdl, mxt);
+	int rc_xtag = fsdbReaderGotoXTag(GLOBALS->extload_ffr_ctx, hdl, mxt);
 
-	for(;;)
+	while(rc_xtag && (mxt >= mxt_max)) /* malformed traces sometimes backtrack time */
 		{
 		void *val_ptr;
 		char *b;
@@ -1331,8 +1332,9 @@ if(fsdbReaderHasIncoreVC(GLOBALS->extload_ffr_ctx, hdl))
 			{
 			break;
 			}
-			
-		mxt = (TimeType)fsdbReaderGetXTag(GLOBALS->extload_ffr_ctx, hdl);
+
+		mxt_max = mxt;
+		mxt = (TimeType)fsdbReaderGetXTag(GLOBALS->extload_ffr_ctx, hdl, &rc_xtag);
 		}
 	}
 fsdbReaderFree(GLOBALS->extload_ffr_ctx, hdl);
@@ -1365,7 +1367,7 @@ if(last_modification_check()) /* place array height check here in an "&&" branch
 				unsigned int lo = 0, hi = 0;
 				sscanf(rc+1, "%u %u", &hi, &lo);
 				tim = (TimeType)((((UTimeType)hi)<<32) + ((UTimeType)lo));
-				
+
 				rc = strchr(rc+1, ')');
 				if(rc)
 					{
@@ -1433,7 +1435,7 @@ if(len>1)
 	htemp->v.h_val = AN_X;		/* x */
 	}
 htemp->time = MAX_HISTENT_TIME-1;
-htemp->next = histent_tail;			
+htemp->next = histent_tail;
 
 if(GLOBALS->vzt_table_vzt_c_1[txidx].histent_curr)
 	{
diff --git a/src/extload.h b/src/extload.h
index ede3ebb..ce2887b 100644
--- a/src/extload.h
+++ b/src/extload.h
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 2009.
  *
  * This program is free software; you can redistribute it and/or
diff --git a/src/fetchbuttons.c b/src/fetchbuttons.c
index b27b263..479f7f7 100644
--- a/src/fetchbuttons.c
+++ b/src/fetchbuttons.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999.
  *
  * This program is free software; you can redistribute it and/or
@@ -41,12 +41,12 @@ if(newlo<=GLOBALS->min_time) newlo=GLOBALS->min_time;
 reformat_time(fromstr, newlo, GLOBALS->time_dimension);
 
 gtk_entry_set_text(GTK_ENTRY(GLOBALS->from_entry),fromstr);
-         
+
 if(newlo<(GLOBALS->tims.last))
         {
         GLOBALS->tims.first=newlo;
         if(GLOBALS->tims.start<GLOBALS->tims.first) GLOBALS->tims.start=GLOBALS->tims.first;
-        
+
         time_update();
         }
 }
@@ -79,7 +79,7 @@ if(newhi>=GLOBALS->max_time) newhi=GLOBALS->max_time;
 reformat_time(tostr, newhi, GLOBALS->time_dimension);
 
 gtk_entry_set_text(GTK_ENTRY(GLOBALS->to_entry),tostr);
-         
+
 if(newhi>(GLOBALS->tims.first))
         {
         GLOBALS->tims.last=newhi;
@@ -99,7 +99,7 @@ if(GLOBALS->helpbox_is_active)
         help_text_bold("\n\nDiscard Left");
         help_text(
                 " increases the \"From\" time, which allows less of the trace"
-                " to be displayed."                                             
+                " to be displayed."
         );
         return;
         }
@@ -113,7 +113,7 @@ if(newlo<(GLOBALS->tims.last))
 	{
 	reformat_time(tostr, newlo, GLOBALS->time_dimension);
 	gtk_entry_set_text(GTK_ENTRY(GLOBALS->from_entry),tostr);
-         
+
 	GLOBALS->tims.first=newlo;
 	time_update();
 	}
@@ -144,7 +144,7 @@ if(newhi>(GLOBALS->tims.first))
 	{
 	reformat_time(tostr, newhi, GLOBALS->time_dimension);
 	gtk_entry_set_text(GTK_ENTRY(GLOBALS->to_entry),tostr);
-         
+
 	GLOBALS->tims.last=newhi;
 	time_update();
 	}
@@ -171,7 +171,7 @@ pixmapwid1=gtk_pixmap_new(GLOBALS->larrow_pixmap, GLOBALS->larrow_mask);
 gtk_widget_show(pixmapwid1);
 pixmapwid2=gtk_pixmap_new(GLOBALS->rarrow_pixmap, GLOBALS->rarrow_mask);
 gtk_widget_show(pixmapwid2);
-   
+
 /* Create a table to hold the text widget and scrollbars */
 table = gtk_table_new (1, 1, FALSE);
 
@@ -209,4 +209,4 @@ gtk_container_add (GTK_CONTAINER (frame), table2);
 gtk_widget_show(table2);
 return(table);
 }
-   
+
diff --git a/src/fgetdynamic.c b/src/fgetdynamic.c
index 4035887..23a5baa 100644
--- a/src/fgetdynamic.c
+++ b/src/fgetdynamic.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2013.
  *
  * This program is free software; you can redistribute it and/or
@@ -29,7 +29,7 @@ do
 		{
 		ch=fgetc(handle);
 		if((ch==EOF)||(ch==0x00)||(ch=='\n')||(ch=='\r')) break;
-	
+
 		pnt = (char *)vlist_alloc(&v, 0);
 		*pnt = (char)ch;
 		}
@@ -37,7 +37,7 @@ do
 
 GLOBALS->fgetmalloc_len = vlist_size(v);
 
-if(!GLOBALS->fgetmalloc_len) 
+if(!GLOBALS->fgetmalloc_len)
 	{
 	pnt = NULL;
 	}
@@ -63,7 +63,7 @@ static char *stripspaces(char *s)
 {
 int len;
 
-if(s) 
+if(s)
 	{
 	char *s2 = s + strlen(s) - 1;
 	while(isspace((int)(unsigned char)*s2) && (s2 != s)) { *s2 = 0; s2--; }
diff --git a/src/fgetdynamic.h b/src/fgetdynamic.h
index 976f2f5..41d13de 100644
--- a/src/fgetdynamic.h
+++ b/src/fgetdynamic.h
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2009.
  *
  * This program is free software; you can redistribute it and/or
diff --git a/src/file.c b/src/file.c
index 176685d..f10d8cc 100644
--- a/src/file.c
+++ b/src/file.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2013.
  *
  * This program is free software; you can redistribute it and/or
@@ -38,7 +38,7 @@ if(!rms) rms = filter_info->filename; else rms++;
 rms2 = strrchr(rms, '/');
 if(!rms2) rms2 = rms; else rms2++;
 
-if(!GLOBALS->pFileChooseFilterName || !GLOBALS->pPatternSpec) 
+if(!GLOBALS->pFileChooseFilterName || !GLOBALS->pPatternSpec)
 	{
 	return(TRUE);
 	}
@@ -91,7 +91,7 @@ if(folder_filename)
 }
 
 
-static   
+static
 void press_callback (GtkWidget *widget, gpointer *data)
 {
 GdkEventKey ev;
@@ -178,7 +178,7 @@ if((!pattn)||(!strcmp(pattn, "*")))
 	ofn.nFilterIndex = 0;
 	}
 
-if(*filesel_path) 
+if(*filesel_path)
 	{
 	char *fsp = *filesel_path;
 	int ch_idx = 0;
@@ -189,7 +189,7 @@ if(*filesel_path)
 		ch = *fsp;
 		szFile[ch_idx++] = (ch != '/') ? ch : '\\';
 		fsp++;
-		} 
+		}
 
 	szFile[ch_idx] = 0;
 
@@ -203,7 +203,7 @@ if(*filesel_path)
 
 rc = is_writemode ? GetSaveFileName(&ofn) : GetOpenFileName(&ofn);
 
-if (rc==TRUE) 
+if (rc==TRUE)
 	{
 	GLOBALS->filesel_ok=1;
         if(*GLOBALS->fileselbox_text) free_2(*GLOBALS->fileselbox_text);
@@ -262,8 +262,8 @@ if(!*filesel_path) /* if no name specified, hijack loaded file name path */
 		char *tname = strdup_2(GLOBALS->loaded_file_name);
 		char *delim = strrchr(tname, '/');
 		if(!delim) delim =  strrchr(tname, '\\');
-		if(delim) 
-			{ 
+		if(delim)
+			{
 			*(delim+1) = 0; /* keep slash for gtk_file_chooser_set_filename vs gtk_file_chooser_set_current_folder test below */
 			*filesel_path = tname;
 			}
@@ -284,7 +284,7 @@ if(GLOBALS->wave_script_args)
 
 	while((!s)&&(GLOBALS->wave_script_args->curr)) s = wave_script_args_fgetmalloc_stripspaces(GLOBALS->wave_script_args);
 
-	if(*GLOBALS->fileselbox_text) free_2(*GLOBALS->fileselbox_text); 
+	if(*GLOBALS->fileselbox_text) free_2(*GLOBALS->fileselbox_text);
 	if(!s)
 		{
 		fprintf(stderr, "Null filename passed to fileselbox in script, exiting.\n");
@@ -293,7 +293,7 @@ if(GLOBALS->wave_script_args)
 	*GLOBALS->fileselbox_text = s;
 	fprintf(stderr, "GTKWAVE | Filename '%s'\n", s);
 
-	ok_func();	
+	ok_func();
 	return;
 	}
 
@@ -301,7 +301,7 @@ if(GLOBALS->wave_script_args)
 
 GLOBALS->fileselbox_text=filesel_path;
 GLOBALS->filesel_ok=0;
-char *rc = gtk_file_req_bridge(title, *filesel_path, pattn, is_writemode); 
+char *rc = gtk_file_req_bridge(title, *filesel_path, pattn, is_writemode);
 if(rc)
 	{
         GLOBALS->filesel_ok=1;
@@ -389,7 +389,7 @@ if(is_writemode)
 
 GLOBALS->pFileChoose = pFileChoose;
 
-if((can_set_filename) && (*filesel_path)) 
+if((can_set_filename) && (*filesel_path))
 	{
 	int flen = strlen(*filesel_path);
 	if(((*filesel_path)[flen-1]=='/') || ((*filesel_path)[flen-1]=='\\'))
@@ -417,8 +417,8 @@ gtk_widget_show(label);
 gtk_box_pack_start(GTK_BOX(box), label_ent, FALSE, FALSE, 0);
 gtk_widget_set_usize(GTK_WIDGET(label_ent), 300, 22);
 gtk_tooltips_set_tip_2(tooltips, label_ent, "Enter custom pattern match filter here. Note that \"string\" without * or ? achieves a match on \"*string*\".", NULL);
-gtk_widget_show(label_ent);  
-gtk_widget_show(box);  
+gtk_widget_show(label_ent);
+gtk_widget_show(box);
 
 gtk_file_chooser_set_extra_widget(GTK_FILE_CHOOSER(pFileChoose), box);
 
@@ -459,7 +459,7 @@ if(GLOBALS->pFileChooseFilterName)
 	{
 	GLOBALS->pPatternSpec = g_pattern_spec_new(GLOBALS->pFileChooseFilterName);
 	}
-	
+
 gtk_dialog_set_default_response(GTK_DIALOG(pFileChoose), GTK_RESPONSE_ACCEPT);
 
 gtk_object_set_data(GTK_OBJECT(pFileChoose), "FileChooseWindow", pFileChoose);
@@ -477,7 +477,7 @@ wave_gtk_grab_add(pFileChoose);
 
 /* check against old_globals is because of DnD context swapping so make response fail */
 
-if((gtk_dialog_run(GTK_DIALOG (pFileChoose)) == GTK_RESPONSE_ACCEPT) && 
+if((gtk_dialog_run(GTK_DIALOG (pFileChoose)) == GTK_RESPONSE_ACCEPT) &&
 		(GLOBALS == old_globals) && (GLOBALS->fileselbox_text))
 	{
 	G_CONST_RETURN char *allocbuf;
@@ -499,7 +499,7 @@ if((gtk_dialog_run(GTK_DIALOG (pFileChoose)) == GTK_RESPONSE_ACCEPT) &&
 			{
 			char *s = *GLOBALS->fileselbox_text;
 			char *s2;
-			char *suffix = wave_alloca(strlen(pattn) + 1);					
+			char *suffix = wave_alloca(strlen(pattn) + 1);
 			char *term;
 			int attempt_suffix = 1;
 
@@ -561,7 +561,7 @@ fix_suffix: 	                    	s2 = malloc_2(strlen(s) + strlen(suffix) + 1);
 	if(GLOBALS->bad_cleanup_file_c_1) notok_func();
 	}
 
-if(GLOBALS->pPatternSpec) 
+if(GLOBALS->pPatternSpec)
 	{
 	g_pattern_spec_free(GLOBALS->pPatternSpec);
 	GLOBALS->pPatternSpec = NULL;
diff --git a/src/fonts.c b/src/fonts.c
index f3e3035..1370d6e 100644
--- a/src/fonts.c
+++ b/src/fonts.c
@@ -66,7 +66,7 @@ static int setup_fonts(void)
   GdkScreen *fonts_screen = gdk_drawable_get_screen (drawable);
   GLOBALS->fonts_renderer = gdk_pango_renderer_get_default (fonts_screen);
   gdk_pango_renderer_set_drawable (GDK_PANGO_RENDERER (GLOBALS->fonts_renderer), drawable);
-  
+
   GLOBALS->fonts_gc = gdk_gc_new (drawable);
   gdk_pango_renderer_set_gc (GDK_PANGO_RENDERER (GLOBALS->fonts_renderer), GLOBALS->fonts_gc);
 
@@ -93,7 +93,7 @@ static void pango_load_all_fonts(void)
   if(!GLOBALS->signalfont)
     {
       if(GLOBALS->use_big_fonts)
-	{ 
+	{
 	  GLOBALS->signalfont=do_font_load(GLOBALS->use_nonprop_fonts ? WAVE_MONOSPACE_12 : WAVE_SANS_12);
 	}
       else
@@ -101,9 +101,9 @@ static void pango_load_all_fonts(void)
 	  GLOBALS->signalfont=do_font_load(GLOBALS->use_nonprop_fonts ? WAVE_MONOSPACE_10 : WAVE_SANS_10);
 	}
     }
-  
+
   GLOBALS->fontheight= my_font_height(GLOBALS->signalfont)+4;
-    
+
   GLOBALS->wavefont=GLOBALS->wavefont_smaller=do_font_load(GLOBALS->fontname_waves);
   if(!GLOBALS->wavefont)
     {
@@ -124,13 +124,13 @@ static void pango_load_all_fonts(void)
       fprintf(stderr, "Signalfont is smaller than wavefont (%d vs %d).  Exiting!\n", my_font_height(GLOBALS->signalfont), my_font_height(GLOBALS->wavefont));
       exit(1);
     }
-  
+
   if(my_font_height(GLOBALS->signalfont)>100)
     {
       fprintf(stderr, "Fonts are too big!  Try fonts with a smaller size.  Exiting!\n");
       exit(1);
     }
-  
+
   GLOBALS->wavecrosspiece=GLOBALS->wavefont->ascent+1;
 }
 #endif
@@ -223,7 +223,7 @@ if((GLOBALS->fontname_signals)&&(strlen(GLOBALS->fontname_signals)))
 	{
 	if(GLOBALS->use_big_fonts)
 	        {
-	        if(!GLOBALS->use_nonprop_fonts) 
+	        if(!GLOBALS->use_nonprop_fonts)
 	                {
 	                GLOBALS->signalfont=font_engine_gdk_font_load("-*-times-*-r-*-*-15-*-*-*-*-*-*-*");
 	                }
@@ -240,7 +240,7 @@ if((GLOBALS->fontname_signals)&&(strlen(GLOBALS->fontname_signals)))
 	        else
 	        {
 	        if(GLOBALS->use_nonprop_fonts)
-	                {   
+	                {
 #ifdef __CYGWIN__
 	                GLOBALS->signalfont=font_engine_gdk_font_load("-misc-fixed-*-*-*-*-14-*-*-*-*-*-*-*");
 #else
@@ -252,7 +252,7 @@ if((GLOBALS->fontname_signals)&&(strlen(GLOBALS->fontname_signals)))
 	}
 
 if(!GLOBALS->signalfont)
-        {  
+        {
 #if WAVE_USE_GTK2
         GLOBALS->signalfont=font_engine_gdk_font_load("-*-courier-*-r-*-*-14-*-*-*-*-*-*-*");
 	if(!GLOBALS->signalfont) GLOBALS->signalfont=font_engine_gdk_font_load("-misc-fixed-*-*-*-*-14-*-*-*-*-*-*-*");
@@ -260,8 +260,8 @@ if(!GLOBALS->signalfont)
 #else
 	GLOBALS->signalfont= calloc_2(1, sizeof(struct font_engine_font_t));
 	GLOBALS->signalfont->gdkfont = GLOBALS->wavearea->style->font;
-	GLOBALS->signalfont->ascent = GLOBALS->wavearea->style->font->ascent; 
-	GLOBALS->signalfont->descent = GLOBALS->wavearea->style->font->descent; 
+	GLOBALS->signalfont->ascent = GLOBALS->wavearea->style->font->ascent;
+	GLOBALS->signalfont->descent = GLOBALS->wavearea->style->font->descent;
 #endif
         }
 
@@ -301,7 +301,7 @@ if((GLOBALS->fontname_waves)&&(strlen(GLOBALS->fontname_waves)))
 	}
 
 if(!GLOBALS->wavefont)
-        {  
+        {
 #if WAVE_USE_GTK2
         GLOBALS->wavefont=GLOBALS->wavefont_smaller=font_engine_gdk_font_load("-*-courier-*-r-*-*-10-*-*-*-*-*-*-*");
 	if(!GLOBALS->wavefont) GLOBALS->wavefont=GLOBALS->wavefont_smaller=font_engine_gdk_font_load("-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*");
diff --git a/src/fonts.h b/src/fonts.h
index 0cfd462..159bf7c 100644
--- a/src/fonts.h
+++ b/src/fonts.h
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 2008
  *
  * This program is free software; you can redistribute it and/or
@@ -36,7 +36,7 @@ unsigned is_mono : 1;
 
 void load_all_fonts(void);
 
-void font_engine_draw_string    
+void font_engine_draw_string
 			(GdkDrawable      		*drawable,
                          struct font_engine_font_t 	*font,
                          GdkGC            		*gc,
@@ -44,7 +44,7 @@ void font_engine_draw_string
                          gint              		y,
                          const gchar      		*string);
 
-gint font_engine_string_measure 
+gint font_engine_string_measure
 			(struct font_engine_font_t      *font,
                          const gchar    		*string);
 
diff --git a/src/fsdb_wrapper_api.cc b/src/fsdb_wrapper_api.cc
index e7ce75e..16e01d1 100644
--- a/src/fsdb_wrapper_api.cc
+++ b/src/fsdb_wrapper_api.cc
@@ -159,7 +159,7 @@ return(rv);
 }
 
 
-extern "C" void fsdbReaderGotoXTag(void *ctx, void *hdl, uint64_t tim)
+extern "C" int fsdbReaderGotoXTag(void *ctx, void *hdl, uint64_t tim)
 {
 ffrObject *fsdb_obj = (ffrObject *)ctx;
 ffrVCTrvsHdl fsdb_hdl = (ffrVCTrvsHdl)hdl;
@@ -168,17 +168,17 @@ fsdbTag64 timetag;
 timetag.H = (uint32_t)(tim >> 32);
 timetag.L = (uint32_t)(tim & 0xFFFFFFFFUL);
 
-fsdb_hdl->ffrGotoXTag((void*)&timetag);
+return(fsdb_hdl->ffrGotoXTag((void*)&timetag) == FSDB_RC_SUCCESS);
 }
 
 
-extern "C" uint64_t fsdbReaderGetXTag(void *ctx, void *hdl)
+extern "C" uint64_t fsdbReaderGetXTag(void *ctx, void *hdl, int *rc)
 {
 ffrObject *fsdb_obj = (ffrObject *)ctx;
 ffrVCTrvsHdl fsdb_hdl = (ffrVCTrvsHdl)hdl;
 fsdbTag64 timetag;
 
-fsdb_hdl->ffrGetXTag((void*)&timetag);
+*rc = (fsdb_hdl->ffrGetXTag((void*)&timetag) == FSDB_RC_SUCCESS);
 uint64_t rv = (((uint64_t)timetag.H) << 32) | ((uint64_t)timetag.L);
 return(rv);
 }
diff --git a/src/fsdb_wrapper_api.h b/src/fsdb_wrapper_api.h
index e1ea354..fdaebd3 100644
--- a/src/fsdb_wrapper_api.h
+++ b/src/fsdb_wrapper_api.h
@@ -50,8 +50,8 @@ int fsdbReaderHasIncoreVC(void *ctx, void *hdl);
 void fsdbReaderFree(void *ctx, void *hdl);
 uint64_t fsdbReaderGetMinXTag(void *ctx, void *hdl);
 uint64_t fsdbReaderGetMaxXTag(void *ctx, void *hdl);
-void fsdbReaderGotoXTag(void *ctx, void *hdl, uint64_t tim);
-uint64_t fsdbReaderGetXTag(void *ctx, void *hdl);
+int fsdbReaderGotoXTag(void *ctx, void *hdl, uint64_t tim);
+uint64_t fsdbReaderGetXTag(void *ctx, void *hdl, int *rc);
 int fsdbReaderGetVC(void *ctx, void *hdl, void **val_ptr);
 int fsdbReaderGotoNextVC(void *ctx, void *hdl);
 void fsdbReaderUnloadSignals(void *ctx);
diff --git a/src/fst.c b/src/fst.c
index cb64f15..f89093d 100644
--- a/src/fst.c
+++ b/src/fst.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 2009-2013.
  *
  * This program is free software; you can redistribute it and/or
@@ -35,9 +35,9 @@
 #define FST_RDLOAD "FSTLOAD | "
 
 /******************************************************************/
-                
+
 /*
- * doubles going into histent structs are NEVER freed so this is OK.. 
+ * doubles going into histent structs are NEVER freed so this is OK..
  * (we are allocating as many entries that fit in 4k minus the size of the two
  * bookkeeping void* pointers found in the malloc_2/free_2 routines in
  * debug.c)
@@ -46,8 +46,8 @@
 #define FST_DOUBLE_GRANULARITY ( (4*1024) / sizeof(double) )
 #else
 #define FST_DOUBLE_GRANULARITY ( ( (4*1024)-(2*sizeof(void *)) ) / sizeof(double) )
-#endif     
-            
+#endif
+
 #ifndef WAVE_HAS_H_DOUBLE
 static void *double_slab_calloc(void)
 {
@@ -58,7 +58,7 @@ if(GLOBALS->double_curr_fst==GLOBALS->double_fini_fst)
         }
 
 return((void *)(GLOBALS->double_curr_fst++));
-}  
+}
 #endif
 
 /*
@@ -77,7 +77,7 @@ return(i+1);
 
 
 
-/* 
+/*
  * fast itoa for decimal numbers
  */
 static char* itoa_2(int value, char* result)
@@ -193,8 +193,8 @@ while((h = fstReaderIterateHier(xc)))
 				default:			ttype = TREE_UNKNOWN; break;
 				}
 
-			allocate_and_decorate_module_tree_node(ttype, h->u.scope.name, h->u.scope.component, h->u.scope.name_length, h->u.scope.component_length, 
-				GLOBALS->stem_valid ? GLOBALS->stem_struct_base_siz : 0, 
+			allocate_and_decorate_module_tree_node(ttype, h->u.scope.name, h->u.scope.component, h->u.scope.name_length, h->u.scope.component_length,
+				GLOBALS->stem_valid ? GLOBALS->stem_struct_base_siz : 0,
 				GLOBALS->istem_valid ? GLOBALS->istem_struct_base_siz : 0);
 			GLOBALS->stem_valid = GLOBALS->istem_valid = 0;
                         break;
@@ -226,7 +226,7 @@ while((h = fstReaderIterateHier(xc)))
 					*(pntd++) = *pnts;
 					}
 				pnts++;
-				}			
+				}
 			*pntd = 0; *namlen = pntd - s;
 
 			if(!lb_last)
@@ -267,7 +267,7 @@ while((h = fstReaderIterateHier(xc)))
 					{
 					pnt = col_last + 1;
 					acc = 0;
-					while(isdigit((int)(unsigned char)*pnt) || (*pnt == '-'))	
+					while(isdigit((int)(unsigned char)*pnt) || (*pnt == '-'))
 						{
 						if(*pnt != '-')
 							{
@@ -282,15 +282,15 @@ while((h = fstReaderIterateHier(xc)))
 						}
 					*lsb = acc * sgnb;
 					}
-				}			
-
-			if(lb_last) 
-				{ 
-				*lb_last = 0; 
-				if((lb_last - s) < (*namlen)) 
-					{ 
-					*namlen = lb_last - s; 
-					} 
+				}
+
+			if(lb_last)
+				{
+				*lb_last = 0;
+				if((lb_last - s) < (*namlen))
+					{
+					*namlen = lb_last - s;
+					}
 				}
 			*nam = s;
 
@@ -356,7 +356,7 @@ while((h = fstReaderIterateHier(xc)))
 							{
 							free_2(attr_pnt);
 							}
-						}					
+						}
 
 					svt = h->u.attr.arg >> FST_SDT_SVT_SHIFT_COUNT;
 					sdt = h->u.attr.arg & (FST_SDT_ABS_MAX-1);
@@ -435,7 +435,7 @@ while((h = fstReaderIterateHier(xc)))
 							GLOBALS->stem_path_string_table_alloc *= 2;
 							GLOBALS->stem_path_string_table = realloc_2(GLOBALS->stem_path_string_table, GLOBALS->stem_path_string_table_alloc * sizeof(char *));
 							}
-						
+
 						GLOBALS->stem_path_string_table[GLOBALS->stem_path_string_table_siz] = strdup_2(h->u.attr.name);
 						GLOBALS->stem_path_string_table_siz++;
 						}
@@ -567,7 +567,7 @@ for(activity_idx = 0; activity_idx < num_activity_changes; activity_idx++)
 		bt->bstart = (TimeType)(ct * GLOBALS->time_scale);
 		bt->bend = (TimeType)(GLOBALS->last_cycle_fst_c_3 * GLOBALS->time_scale);
                 bt->next = GLOBALS->blackout_regions;
-  
+
                 GLOBALS->blackout_regions = bt;
 
 		/* activity_idx = activity_idx2; */ /* scan-build says is dead + assigned garbage value , which is true : code does not need to mirror for() loop below */
@@ -577,7 +577,7 @@ for(activity_idx = 0; activity_idx < num_activity_changes; activity_idx++)
 	for(activity_idx2 = activity_idx+1; activity_idx2 < num_activity_changes; activity_idx2++)
 		{
 		uint64_t ct2 = fstReaderGetDumpActivityChangeTime(GLOBALS->fst_fst_c_1, activity_idx2);
-		ac = fstReaderGetDumpActivityChangeValue(GLOBALS->fst_fst_c_1, activity_idx2);		
+		ac = fstReaderGetDumpActivityChangeValue(GLOBALS->fst_fst_c_1, activity_idx2);
 		if((ac == 0) && (activity_idx2 == (num_activity_changes-1)))
 			{
 			ac = 1;
@@ -590,14 +590,14 @@ for(activity_idx = 0; activity_idx < num_activity_changes; activity_idx++)
 			bt->bstart = (TimeType)(ct * GLOBALS->time_scale);
 			bt->bend = (TimeType)(ct2 * GLOBALS->time_scale);
 	                bt->next = GLOBALS->blackout_regions;
-  
+
 	                GLOBALS->blackout_regions = bt;
 
 			activity_idx = activity_idx2;
 			break;
 			}
-		}	
-	
+		}
+
 	}
 
 
@@ -611,7 +611,7 @@ if(!GLOBALS->hier_was_explicitly_set)    /* set default hierarchy split char */
 for(i=0;i<GLOBALS->numfacs;i++)
         {
 	char buf[65537];
-	char *str;	
+	char *str;
 	struct fac *f;
 	int hier_len, name_len, tlen;
 	unsigned char nvt, nvd, ndt;
@@ -671,11 +671,11 @@ for(i=0;i<GLOBALS->numfacs;i++)
 		node_block[i].lsi = 0;
 		}
 		else
-		{	
+		{
 		node_block[i].msi = msb;
 		node_block[i].lsi = lsb;
 		}
-	GLOBALS->mvlfacs_fst_c_3[i].len = h->u.var.length; 
+	GLOBALS->mvlfacs_fst_c_3[i].len = h->u.var.length;
 
 	if(h->u.var.length)
 		{
@@ -736,7 +736,7 @@ for(i=0;i<GLOBALS->numfacs;i++)
 			case FST_VT_SV_SHORTINT:
 			case FST_VT_SV_LONGINT:
 				GLOBALS->mvlfacs_fst_c_3[i].flags = VZT_RD_SYM_F_INTEGER;
-				break;	
+				break;
 
 			case FST_VT_VCD_REAL:
 			case FST_VT_VCD_REAL_PARAMETER:
@@ -752,7 +752,7 @@ for(i=0;i<GLOBALS->numfacs;i++)
 
 			default:
 				GLOBALS->mvlfacs_fst_c_3[i].flags = VZT_RD_SYM_F_BITS;
-				break;	
+				break;
 			}
 		}
 		else /* convert any variable length records into strings */
@@ -762,7 +762,7 @@ for(i=0;i<GLOBALS->numfacs;i++)
 		GLOBALS->mvlfacs_fst_c_3[i].flags = VZT_RD_SYM_F_STRING;
 		GLOBALS->mvlfacs_fst_c_3[i].len = 2;
 		}
-	
+
 	if(h->u.var.is_alias)
 		{
 		GLOBALS->mvlfacs_fst_c_3[i].node_alias = h->u.var.handle - 1; /* subtract 1 to scale it with gtkwave-style numbering */
@@ -808,7 +808,7 @@ for(i=0;i<GLOBALS->numfacs;i++)
 	        symadd_name_exists_sym_exists(s,str,0);
 		prevsymroot = prevsym = NULL;
 
-		if(GLOBALS->fast_tree_sort) 
+		if(GLOBALS->fast_tree_sort)
 			{
 			len = sprintf_2_sdd(buf, nnam,node_block[i].msi, node_block[i].lsi);
 			fst_append_graft_chain(len, buf, i, npar);
@@ -859,7 +859,7 @@ for(i=0;i<GLOBALS->numfacs;i++)
 				prevsymroot = prevsym = s;
 				}
 
-			if(GLOBALS->fast_tree_sort) 
+			if(GLOBALS->fast_tree_sort)
 				{
 				len = sprintf_2_sd(buf, nnam,node_block[i].msi);
 				fst_append_graft_chain(len, buf, i, npar);
@@ -894,7 +894,7 @@ for(i=0;i<GLOBALS->numfacs;i++)
 			s=&sym_block[i];
 		        symadd_name_exists_sym_exists(s,str,0);
 			prevsymroot = prevsym = NULL;
-	
+
 			if(f->flags&VZT_RD_SYM_F_INTEGER)
 				{
 				if(f->len != 0)
@@ -908,16 +908,16 @@ for(i=0;i<GLOBALS->numfacs;i++)
 					node_block[i].msi = 31;
 					node_block[i].lsi = 0;
 					GLOBALS->mvlfacs_fst_c_3[i].len = 32;
-					}	
+					}
 			}
-	
-			if(GLOBALS->fast_tree_sort) 
+
+			if(GLOBALS->fast_tree_sort)
 				{
 				fst_append_graft_chain(strlen(nnam), nnam, i, npar);
 				}
 			}
 		}
-		
+
         if(longest_nam_candidate > GLOBALS->longestname) GLOBALS->longestname = longest_nam_candidate;
 
         GLOBALS->facs[i]=&sym_block[i];
@@ -927,7 +927,7 @@ for(i=0;i<GLOBALS->numfacs;i++)
 		{
 		n->nname = compress_facility((unsigned char *)s->name, longest_nam_candidate);
 		/* free_2(s->name); ...removed as f_name_build_buf is now used */
-		s->name = n->nname;	
+		s->name = n->nname;
 		}
 		else
 		{
@@ -983,7 +983,7 @@ for(i=0;i<GLOBALS->numfacs;i++)
 		{
 		n->extvals = 1;
 		}
-                 
+
         n->head.time=-1;        /* mark 1st node as negative time */
         n->head.v.h_val=AN_X;
         s->n=n;
@@ -1047,33 +1047,33 @@ decorated_module_cleanup(); /* ...also now in gtk2_treesearch.c */
 freeze_facility_pack();
 iter_through_comp_name_table();
 
-fprintf(stderr, FST_RDLOAD"Built %d signal%s and %d alias%s.\n", 
-	numvars, (numvars == 1) ? "" : "s", 
+fprintf(stderr, FST_RDLOAD"Built %d signal%s and %d alias%s.\n",
+	numvars, (numvars == 1) ? "" : "s",
 	numalias, (numalias == 1) ? "" : "es");
 
 GLOBALS->fst_maxhandle = numvars;
 
 if(GLOBALS->fast_tree_sort)
         {
-/* SPLASH */                            splash_sync(2, 5);  
+/* SPLASH */                            splash_sync(2, 5);
         fprintf(stderr, FST_RDLOAD"Building facility hierarchy tree.\n");
 
         init_tree();
         treegraft(&GLOBALS->treeroot);
 
-/* SPLASH */                            splash_sync(3, 5);  
-                                
+/* SPLASH */                            splash_sync(3, 5);
+
         fprintf(stderr, FST_RDLOAD"Sorting facility hierarchy tree.\n");
         treesort(GLOBALS->treeroot, NULL);
-/* SPLASH */                            splash_sync(4, 5);  
+/* SPLASH */                            splash_sync(4, 5);
         order_facs_from_treesort(GLOBALS->treeroot, &GLOBALS->facs);
 
-/* SPLASH */                            splash_sync(5, 5);  
+/* SPLASH */                            splash_sync(5, 5);
         GLOBALS->facs_are_sorted=1;
         }
         else
 	{
-/* SPLASH */                            splash_sync(2, 5);  
+/* SPLASH */                            splash_sync(2, 5);
 	for(i=0;i<GLOBALS->numfacs;i++)
 		{
 		char *subst, ch;
@@ -1081,7 +1081,7 @@ if(GLOBALS->fast_tree_sort)
 
 	        subst=GLOBALS->facs[i]->name;
 		while((ch=(*subst)))
-			{	
+			{
 #ifdef WAVE_HIERFIX
 	                if(ch==GLOBALS->hier_delimeter) { *subst=(!esc) ? VCDNAM_HIERSORT : VCDNAM_ESCAPE; }    /* forces sort at hier boundaries */
 #else
@@ -1096,14 +1096,14 @@ if(GLOBALS->fast_tree_sort)
 	fprintf(stderr, FST_RDLOAD"Sorting facilities at hierarchy boundaries.\n");
 	wave_heapsort(GLOBALS->facs,GLOBALS->numfacs);
 
-#ifdef WAVE_HIERFIX	
+#ifdef WAVE_HIERFIX
 	for(i=0;i<GLOBALS->numfacs;i++)
 		{
 		char *subst, ch;
-	
+
 		subst=GLOBALS->facs[i]->name;
 		while((ch=(*subst)))
-			{	
+			{
 			if(ch==VCDNAM_HIERSORT) { *subst=GLOBALS->hier_delimeter; }	/* restore back to normal */
 			subst++;
 			}
@@ -1115,8 +1115,8 @@ if(GLOBALS->fast_tree_sort)
 /* SPLASH */                            splash_sync(4, 5);
 	fprintf(stderr, FST_RDLOAD"Building facility hierarchy tree.\n");
 
-	init_tree();		
-	for(i=0;i<GLOBALS->numfacs;i++)	
+	init_tree();
+	for(i=0;i<GLOBALS->numfacs;i++)
 		{
 		char *nf = GLOBALS->facs[i]->name;
 	        build_tree_from_name(nf, i);
@@ -1137,9 +1137,9 @@ if(GLOBALS->fast_tree_sort)
 	        }
 	treegraft(&GLOBALS->treeroot);
 	treesort(GLOBALS->treeroot, NULL);
-	if(GLOBALS->escaped_names_found_vcd_c_1)  
+	if(GLOBALS->escaped_names_found_vcd_c_1)
 	        {
-	        treenamefix(GLOBALS->treeroot);   
+	        treenamefix(GLOBALS->treeroot);
 	        }
 	}
 
@@ -1205,10 +1205,10 @@ static void evcd_memcpy(char *dst, const char *src, int len)
 {
 static const char *evcd="DUNZduLHXTlh01?FAaBbCcf";
 static const char  *vcd="01xz0101xz0101xzxxxxxxz";
-                                                
+
 char ch;
 int i, j;
-                                                        
+
 for(j=0;j<len;j++)
         {
 	ch=*src;
@@ -1221,7 +1221,7 @@ for(j=0;j<len;j++)
                         }
                 }
         if(i==23) *dst='x';
-        
+
         src++;
         dst++;
         }
@@ -1238,7 +1238,7 @@ struct HistEnt *htemp;
 struct lx2_entry *l2e = GLOBALS->fst_table_fst_c_1+facidx;
 struct fac *f = GLOBALS->mvlfacs_fst_c_3+facidx;
 
-GLOBALS->busycnt_fst_c_2++; 
+GLOBALS->busycnt_fst_c_2++;
 if(GLOBALS->busycnt_fst_c_2==WAVE_BUSY_ITER)
 	{
 	busy_window_refresh();
@@ -1255,7 +1255,7 @@ if(!(f->flags&(VZT_RD_SYM_F_DOUBLE|VZT_RD_SYM_F_STRING)))
 		vt = f->working_node->vartype;
 		}
 
-	if(f->len>1)        
+	if(f->len>1)
 	        {
 		char *h_vector = (char *)malloc_2(f->len);
 		if(vt != ND_VCD_PORT)
@@ -1430,7 +1430,7 @@ fst_callback2(user_callback_data_pointer, tim, txidx, value, 0);
  * this is the black magic that handles aliased signals...
  */
 static void fst_resolver(nptr np, nptr resolve)
-{ 
+{
 np->extvals = resolve->extvals;
 np->msi = resolve->msi;
 np->lsi = resolve->lsi;
@@ -1443,8 +1443,8 @@ np->mv.mvlfac=NULL;
 
 
 
-/* 
- * actually import a fst trace but don't do it if it's already been imported 
+/*
+ * actually import a fst trace but don't do it if it's already been imported
  */
 void import_fst_trace(nptr np)
 {
@@ -1457,13 +1457,13 @@ nptr nold = np;
 if(!(f=np->mv.mvlfac)) return;	/* already imported */
 
 txidx = f - GLOBALS->mvlfacs_fst_c_3;
-if(np->mv.mvlfac->flags&VZT_RD_SYM_F_ALIAS) 
+if(np->mv.mvlfac->flags&VZT_RD_SYM_F_ALIAS)
 	{
 	txidx = GLOBALS->mvlfacs_fst_c_3[txidx].node_alias; /* this is to map to fstHandles, so even non-aliased are remapped */
 	txidx = GLOBALS->mvlfacs_fst_rvs_alias[txidx];
 	np = GLOBALS->mvlfacs_fst_c_3[txidx].working_node;
 
-	if(!(f=np->mv.mvlfac)) 
+	if(!(f=np->mv.mvlfac))
 		{
 		fst_resolver(nold, np);
 		return;	/* already imported */
@@ -1534,7 +1534,7 @@ if(len>1)
 	htemp->v.h_val = AN_X;		/* x */
 	}
 htemp->time = MAX_HISTENT_TIME-1;
-htemp->next = histent_tail;			
+htemp->next = histent_tail;
 
 if(GLOBALS->fst_table_fst_c_1[txidx].histent_curr)
 	{
@@ -1557,7 +1557,7 @@ if(!(f->flags&(VZT_RD_SYM_F_DOUBLE|VZT_RD_SYM_F_STRING)))
         else
         {
         np->head.flags = HIST_REAL;
-        if(f->flags&VZT_RD_SYM_F_STRING) 
+        if(f->flags&VZT_RD_SYM_F_STRING)
 		{
 		np->head.flags |= HIST_STRING;
 		}
@@ -1596,7 +1596,7 @@ if(nold!=np)
 }
 
 
-/* 
+/*
  * pre-import many traces at once so function above doesn't have to iterate...
  */
 void fst_set_fac_process_mask(nptr np)
@@ -1607,10 +1607,10 @@ int txidx;
 if(!(f=np->mv.mvlfac)) return;	/* already imported */
 
 txidx = f-GLOBALS->mvlfacs_fst_c_3;
-if(np->mv.mvlfac->flags&VZT_RD_SYM_F_ALIAS) 
+if(np->mv.mvlfac->flags&VZT_RD_SYM_F_ALIAS)
 	{
 	txidx = GLOBALS->mvlfacs_fst_c_3[txidx].node_alias;
-	txidx = GLOBALS->mvlfacs_fst_rvs_alias[txidx]; 
+	txidx = GLOBALS->mvlfacs_fst_rvs_alias[txidx];
 	np = GLOBALS->mvlfacs_fst_c_3[txidx].working_node;
 
 	if(!(np->mv.mvlfac)) return;	/* already imported */
@@ -1638,7 +1638,7 @@ for(txidxi=0;txidxi<GLOBALS->fst_maxhandle;txidxi++)
 		}
 	}
 
-if(!cnt) 
+if(!cnt)
 	{
 	return;
 	}
@@ -1673,7 +1673,7 @@ for(txidxi=0;txidxi<GLOBALS->fst_maxhandle;txidxi++)
 			htemp->v.h_val = AN_Z;		/* z */
 			}
 		htemp->time = MAX_HISTENT_TIME;
-			
+
 		htemp = histent_calloc();
 		if(len>1)
 			{
@@ -1686,7 +1686,7 @@ for(txidxi=0;txidxi<GLOBALS->fst_maxhandle;txidxi++)
 					}
 					else
 					{
-					htemp->v.h_vector = strdup_2("UNDEF"); 	
+					htemp->v.h_vector = strdup_2("UNDEF");
 					htemp->flags = HIST_REAL|HIST_STRING;
 					}
 				htempx = htemp;
@@ -1694,7 +1694,7 @@ for(txidxi=0;txidxi<GLOBALS->fst_maxhandle;txidxi++)
 				else
 				{
 #ifdef WAVE_HAS_H_DOUBLE
-				htemp->v.h_double = strtod("NaN", NULL);				
+				htemp->v.h_double = strtod("NaN", NULL);
 #else
 				double *d = malloc_2(sizeof(double));
 
@@ -1710,7 +1710,7 @@ for(txidxi=0;txidxi<GLOBALS->fst_maxhandle;txidxi++)
 			htemp->v.h_val = AN_X;		/* x */
 			}
 		htemp->time = MAX_HISTENT_TIME-1;
-		htemp->next = histent_tail;			
+		htemp->next = histent_tail;
 
 		if(GLOBALS->fst_table_fst_c_1[txidx].histent_curr)
 			{
@@ -1733,7 +1733,7 @@ for(txidxi=0;txidxi<GLOBALS->fst_maxhandle;txidxi++)
 		        else
 		        {
 		        np->head.flags = HIST_REAL;
-		        if(f->flags&VZT_RD_SYM_F_STRING) 
+		        if(f->flags&VZT_RD_SYM_F_STRING)
 				{
 				np->head.flags |= HIST_STRING;
 				}
diff --git a/src/fst.h b/src/fst.h
index 6d14275..1e15baf 100644
--- a/src/fst.h
+++ b/src/fst.h
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 2009.
  *
  * This program is free software; you can redistribute it and/or
diff --git a/src/gconf.c b/src/gconf.c
index 194bace..2b50d3f 100644
--- a/src/gconf.c
+++ b/src/gconf.c
@@ -123,7 +123,7 @@ writesave_callback(GConfClient* gclient,
 		  if(fn)
 			{
 		  	FILE *wave;
-	
+
 		  	if(!(wave=fopen(fn, "wb")))
 		        	{
 		        	fprintf(stderr, "GTKWAVE | RPC Writesave: error opening save file '%s' for writing.\n", fn);
@@ -192,13 +192,13 @@ if(!client)
 	                          quit_callback,
 	                          NULL, /* user data */
 	                          NULL, NULL);
-	
+
 	strcpy(ks + len, "/writesave");
 	gconf_client_notify_add(client, ks,
 	                          writesave_callback,
 	                          NULL, /* user data */
 	                          NULL, NULL);
-	
+
 	strcpy(ks + len, "/reload");
 	gconf_client_notify_add(client, ks,
 	                          reload_callback,
diff --git a/src/ghw.c b/src/ghw.c
index 526b1d0..2df415a 100644
--- a/src/ghw.c
+++ b/src/ghw.c
@@ -25,8 +25,8 @@
 
 /************************ splay ************************/
 
-/* 
- * NOTE: 
+/*
+ * NOTE:
  * a GHW tree's "which" is not the same as a gtkwave "which"
  * in that gtkwave's points to the facs[] array and
  * GHW's functions as an alias handle.  The following
@@ -108,7 +108,7 @@ static ghw_Tree * ghw_insert(void *i, ghw_Tree * t, int val, struct symbol *sym)
 /* Return a pointer to the resulting tree.                 */
     ghw_Tree * n;
     int dir;
-    
+
     n = (ghw_Tree *) calloc_2(1, sizeof (ghw_Tree));
     if (n == NULL) {
 	fprintf(stderr, "ghw_insert: ran out of memory, exiting.\n");
@@ -190,7 +190,7 @@ for(i=0;i<GLOBALS->numfacs;i++)
 					GLOBALS->facs[i]->vec_root = root;
 					}
 				}
-			}				
+			}
 			else
 			{
 			if((p1>=0)&&(p1==p2))
@@ -211,7 +211,7 @@ for(i=0;i<GLOBALS->numfacs;i++)
 				}
 			}
 		}
-	
+
 	psr = GLOBALS->facs[i];
 	}
 }
@@ -239,12 +239,12 @@ if(t)
 	if(t->child) { recurse_tree_fix_from_whichcache(t->child); }
 	if(t->next) { recurse_tree_fix_from_whichcache(t->next); }
 
-	if(t->t_which >= 0) 
+	if(t->t_which >= 0)
 		{
 		GLOBALS->gwt_ghw_c_1 = ghw_splay(t, GLOBALS->gwt_ghw_c_1);
 		GLOBALS->gwt_corr_ghw_c_1 = ghw_splay(GLOBALS->gwt_ghw_c_1->sym, GLOBALS->gwt_corr_ghw_c_1); /* all facs are in this tree so this is OK */
 
-		t->t_which = GLOBALS->gwt_corr_ghw_c_1->val_old;				
+		t->t_which = GLOBALS->gwt_corr_ghw_c_1->val_old;
 		}
 	}
 }
@@ -264,7 +264,7 @@ free_2(t);
  */
 static void ghw_sortfacs(void)
 {
-int i;  
+int i;
 
 recurse_tree_build_whichcache(GLOBALS->treeroot);
 
@@ -281,7 +281,7 @@ for(i=0;i<GLOBALS->numfacs;i++)
         if((len=strlen(subst))>GLOBALS->longestname) GLOBALS->longestname=len;
 #ifdef WAVE_HIERFIX
         while((ch=(*subst)))
-                { 
+                {
                 if(ch==GLOBALS->hier_delimeter) { *subst=VCDNAM_HIERSORT; } /* forces sort at hier boundaries */
                 subst++;
                 }
@@ -304,7 +304,7 @@ if(GLOBALS->gwt_corr_ghw_c_1)
 	{
 	incinerate_whichcache_tree(GLOBALS->gwt_corr_ghw_c_1); GLOBALS->gwt_corr_ghw_c_1 = NULL;
 	}
- 
+
 #ifdef WAVE_HIERFIX
 for(i=0;i<GLOBALS->numfacs;i++)
         {
@@ -345,7 +345,7 @@ build_hierarchy_array (struct ghw_handler *h, union ghw_type *arr, int dim,
       name = strdup_2(GLOBALS->asbuf);
 
       t = build_hierarchy_type (h, base->el, name, sig);
-      
+
       if (*res != NULL)
 	(*res)->next = t;
       *res = t;
@@ -362,7 +362,7 @@ build_hierarchy_array (struct ghw_handler *h, union ghw_type *arr, int dim,
 	struct ghw_range_i32 *r;
 	/* struct tree *last; */
 	int len;
-	
+
 	/* last = NULL; */
 	r = &arr->sa.rngs[dim]->i32;
 	len = ghw_get_range_length ((union ghw_range *)r);
@@ -392,7 +392,7 @@ build_hierarchy_array (struct ghw_handler *h, union ghw_type *arr, int dim,
 	struct ghw_range_e8 *r;
 	/* struct tree *last; */
 	int len;
-	
+
 	/* last = NULL; */
 	r = &arr->sa.rngs[dim]->e8;
 	len = ghw_get_range_length ((union ghw_range *)r);
@@ -444,15 +444,15 @@ build_hierarchy_type (struct ghw_handler *h, union ghw_type *t,
       s = calloc_2(1, sizeof(struct symbol));
 
         if(!GLOBALS->firstnode)
-                {                                
+                {
                 GLOBALS->firstnode=
-                GLOBALS->curnode=calloc_2(1, sizeof(struct symchain)); 
-                }                                
+                GLOBALS->curnode=calloc_2(1, sizeof(struct symchain));
+                }
                 else
-                {                                
-                GLOBALS->curnode->next=calloc_2(1, sizeof(struct symchain)); 
-                GLOBALS->curnode=GLOBALS->curnode->next; 
-                }                                
+                {
+                GLOBALS->curnode->next=calloc_2(1, sizeof(struct symchain));
+                GLOBALS->curnode=GLOBALS->curnode->next;
+                }
         GLOBALS->curnode->symbol=s;
 
       GLOBALS->nbr_sig_ref_ghw_c_1++;
@@ -532,7 +532,7 @@ build_hierarchy (struct ghw_handler *h, struct ghw_hie *hie)
     		case ghw_hie_instance:		ttype = TREE_VHDL_ST_INSTANCE; break;
     		case ghw_hie_generate_for:	ttype = TREE_VHDL_ST_GENFOR; break;
     		case ghw_hie_generate_if:	ttype = TREE_VHDL_ST_GENIF; break;
-    		case ghw_hie_package:		
+    		case ghw_hie_package:
 		default:
 						ttype = TREE_VHDL_ST_PACKAGE; break;
 		}
@@ -612,7 +612,7 @@ build_hierarchy (struct ghw_handler *h, struct ghw_hie *hie)
 		case ghw_hie_port_out:		ttype = TREE_VHDL_ST_PORTOUT; break;
 		case ghw_hie_port_inout:	ttype = TREE_VHDL_ST_PORTINOUT; break;
 		case ghw_hie_port_buffer:	ttype = TREE_VHDL_ST_BUFFER; break;
-		case ghw_hie_port_linkage:	
+		case ghw_hie_port_linkage:
 		default:
 						ttype = TREE_VHDL_ST_LINKAGE; break;
 		}
@@ -721,7 +721,7 @@ set_fac_name_1 (struct tree *t)
       if(t->name[0]) /* originally (t->name != NULL) when using pointers */
 	{
 	  int len;
-	  
+
 	  len = strlen (t->name) + 1;
 	  if (len + GLOBALS->fac_name_len_ghw_c_1 >= GLOBALS->fac_name_max_ghw_c_1)
 	    {
@@ -899,13 +899,13 @@ add_history (struct ghw_handler *h, struct Node *n, int sig_num)
     case ghdl_rtik_type_i32:
     case ghdl_rtik_type_p32:
       sprintf (GLOBALS->asbuf, GHWLD, sig->val->i32);
-      he->v.h_vector = strdup_2(GLOBALS->asbuf);    
+      he->v.h_vector = strdup_2(GLOBALS->asbuf);
       is_vector = 1;
       break;
     case ghdl_rtik_type_i64:
     case ghdl_rtik_type_p64:
       sprintf (GLOBALS->asbuf, GHWLLD, sig->val->i64);
-      he->v.h_vector = strdup_2(GLOBALS->asbuf);    
+      he->v.h_vector = strdup_2(GLOBALS->asbuf);
       is_vector = 1;
       break;
     default:
@@ -979,14 +979,14 @@ add_tail (struct ghw_handler *h)
 {
   int i;
   TimeType j;
- 
+
   for (j = 1; j>=0 ; j--) /* add two endcaps */
   for (i = 0; i < h->nbr_sigs; i++)
     {
       struct ghw_sig *sig = &h->sigs[i];
       struct Node *n = GLOBALS->nxp_ghw_c_1[i];
       struct HistEnt *he;
-      
+
       if (sig->type == NULL || n == NULL || !n->curr)
 	continue;
 
@@ -1008,9 +1008,9 @@ read_traces (struct ghw_handler *h)
   int *list;
   int i;
   enum ghw_res res;
-  
+
   list = malloc_2((GLOBALS->numfacs + 1) * sizeof (int));
-  
+
   while (1)
     {
       res = ghw_read_sm_hdr (h, list);
@@ -1041,7 +1041,7 @@ read_traces (struct ghw_handler *h)
 		{
 		  if (h->snap_time > GLOBALS->max_time)
 		    GLOBALS->max_time = h->snap_time;
-		  
+
 		  for (i = 0; (sig = list[i]) != 0; i++)
 		    add_history (h, GLOBALS->nxp_ghw_c_1[sig], sig);
 		}
@@ -1089,7 +1089,7 @@ ghw_main(char *fname)
 
  if (ghw_read_base (&handle) < 0)
    {
-     free_2(GLOBALS->asbuf); 
+     free_2(GLOBALS->asbuf);
      GLOBALS->asbuf = NULL;
      fprintf (stderr, "Error in ghw file '%s'.\n", fname);
      return(LLDescriptor(0));        /* look at return code in caller for success status... */
@@ -1113,7 +1113,7 @@ ghw_main(char *fname)
  create_facs (&handle);
  read_traces (&handle);
  add_tail (&handle);
- 
+
  set_fac_name (&handle);
  free_2(GLOBALS->nxp_ghw_c_1); GLOBALS->nxp_ghw_c_1 = NULL;
 
diff --git a/src/ghw.h b/src/ghw.h
index cd92de3..03a2c08 100644
--- a/src/ghw.h
+++ b/src/ghw.h
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 2005.
  *
  * This program is free software; you can redistribute it and/or
diff --git a/src/ghwlib.c b/src/ghwlib.c
index 452a19e..8617a52 100644
--- a/src/ghwlib.c
+++ b/src/ghwlib.c
@@ -773,7 +773,7 @@ ghw_read_signal (struct ghw_handler *h, unsigned int *sigs, union ghw_type *t)
       {
 	int i;
 	int off;
-	
+
 	off = 0;
 	for (i = 0; i < t->rec.nbr_fields; i++)
 	  {
@@ -1067,7 +1067,7 @@ ghw_disp_hie (struct ghw_handler *h, struct ghw_hie *top)
 
   hie = top;
   indent = 0;
-  
+
   while (1)
     {
       for (i = 0; i < indent; i++)
@@ -1241,7 +1241,7 @@ ghw_read_cycle_cont (struct ghw_handler *h, int *list)
   while (1)
     {
       uint32_t d;
-      
+
       /* Read delta to next signal.  */
       if (ghw_read_uleb128 (h, &d) < 0)
 	return -1;
@@ -1258,13 +1258,13 @@ ghw_read_cycle_cont (struct ghw_handler *h, int *list)
 	  if (h->sigs[i].type != NULL)
 	    d--;
 	}
-      
+
       if (ghw_read_signal_value (h, &h->sigs[i]) < 0)
 	return -1;
       if (list_p)
 	*list_p++ = i;
     }
-  
+
   if (list_p)
     *list_p = 0;
   return 0;
@@ -1419,7 +1419,7 @@ ghw_read_directory (struct ghw_handler *h)
     return -1;
 
   nbr_entries = ghw_get_i32 (h, &hdr[4]);
-  
+
   if (h->flag_verbose)
     printf ("Directory (%d entries):\n", nbr_entries);
 
@@ -1453,7 +1453,7 @@ ghw_read_tailer (struct ghw_handler *h)
     return -1;
 
   pos = ghw_get_i32 (h, &hdr[4]);
-  
+
   if (h->flag_verbose)
     printf ("Tailer: directory at %d\n", pos);
   return 0;
@@ -1487,7 +1487,7 @@ ghw_read_sm_hdr (struct ghw_handler *h, int *list)
       res = ghw_read_cycle_cont (h, list);
       if (res < 0)
 	return res;
-      
+
       return ghw_res_cycle;
     }
   else if (memcmp (hdr, "DIR", 4) == 0)
@@ -1498,7 +1498,7 @@ ghw_read_sm_hdr (struct ghw_handler *h, int *list)
     {
       res = ghw_read_tailer (h);
     }
-  else 
+  else
     {
       fprintf (stderr, "unknown GHW section %c%c%c%c\n",
 	       hdr[0], hdr[1], hdr[2], hdr[3]);
@@ -1541,7 +1541,7 @@ ghw_read_sm (struct ghw_handler *h, enum ghw_sm_type *sm)
 	    printf ("Time is "GHWLLD" fs\n", h->snap_time);
 	  if (0)
 	    ghw_disp_values (h);
-	  
+
 	  res = ghw_read_cycle_next (h);
 	  if (res < 0)
 	    return res;
@@ -1574,13 +1574,13 @@ ghw_read_cycle (struct ghw_handler *h)
       res = ghw_read_cycle_cont (h, NULL);
       if (res < 0)
 	return res;
-      
+
       if (0)
 	printf ("Time is "GHWLLD" fs\n", h->snap_time);
       if (0)
 	ghw_disp_values (h);
-      
-	      
+
+
       res = ghw_read_cycle_next (h);
       if (res < 0)
 	return res;
@@ -1624,7 +1624,7 @@ ghw_read_dump (struct ghw_handler *h)
 	{
 	  res = ghw_read_tailer (h);
 	}
-      else 
+      else
 	{
 	  fprintf (stderr, "unknown GHW section %c%c%c%c\n",
 		   hdr[0], hdr[1], hdr[2], hdr[3]);
@@ -1661,7 +1661,7 @@ ghw_read_section (struct ghw_handler *h)
       else
 	return -1;
     }
-  
+
   for (i = 1; i < sizeof (ghw_sections) / sizeof (*ghw_sections); i++)
     if (memcmp (hdr, ghw_sections[i].name, 4) == 0)
       return i;
diff --git a/src/ghwlib.h b/src/ghwlib.h
index 8592a1a..c00d6a1 100644
--- a/src/ghwlib.h
+++ b/src/ghwlib.h
@@ -236,7 +236,7 @@ struct ghw_type_record
   int nbr_el;	/* Number of scalar signals.  */
   struct ghw_record_element *el;
 };
-  
+
 union ghw_type
 {
   enum ghdl_rtik kind;
@@ -357,7 +357,7 @@ union ghw_type *ghw_get_base_type (union ghw_type *t);
 
 /* Put the ASCII representation of VAL into BUF, whose size if LEN.
    A NUL is always written to BUF.  */
-void ghw_get_value (char *buf, int len, 
+void ghw_get_value (char *buf, int len,
 		    union ghw_val *val, union ghw_type *type);
 
 const char *ghw_get_hie_name (struct ghw_hie *h);
diff --git a/src/globals.c b/src/globals.c
index 716bf95..2c8731e 100644
--- a/src/globals.c
+++ b/src/globals.c
@@ -65,8 +65,8 @@
 struct Global *GLOBALS = NULL;
 
 /* make this const so if we try to write to it we coredump */
-static const struct Global globals_base_values = 
-{ 
+static const struct Global globals_base_values =
+{
 /*
  * ae2.c
  */
@@ -119,7 +119,7 @@ TR_RJUSTIFY, /* default_flags 5 */
 0, /* color_active_in_filter 9 */
 
 
-/* 
+/*
  * bsearch.c
  */
 LLDescriptor(0), /* shift_timebase 10 */
@@ -146,7 +146,7 @@ NULL, /* busycursor_busy_c_1 23 */
 
 /*
  * color.c
- */ 
+ */
 0, /* keep_xz_colors */
 NULL, /* wave_gcchain */
 -1, /* color_back 25 */
@@ -230,8 +230,8 @@ NULL, /* entrybox_text 82 */
 0, /* cleanup_entry_c_1 83 */
 0, /* entry_raise_timer */
 
-/* 
- * extload.c 
+/*
+ * extload.c
  */
 0, /* extload_ffr_import_count */
 NULL, /* extload_ffr_ctx */
@@ -409,7 +409,7 @@ NULL, /* treechain_hiersearch_c_1 130 */
 0, /* is_active_hiersearch_c_1 131 */
 
 
-/* 
+/*
  * logfile.c
  */
 NULL, /* logfiles */
@@ -500,7 +500,7 @@ NULL, /* resolve_lxt_alias_to */
 NULL, /* lastchange */
 
 
-/* 
+/*
  * main.c
  */
 1, /* is_gtkw_save_file */
@@ -599,7 +599,7 @@ NULL, /* cleanup_markerbox_c_4 233 */
 
 /*
  * menu.c
- */ 
+ */
 NULL, /* cutcopylist */
 0, /* enable_fast_exit 236 */
 0, /* quiet_checkmenu */
@@ -837,7 +837,7 @@ NULL, /* tcache_showchange_c_1 367 */
 0, /* flags_showchange_c_1 368 */
 
 
-/* 
+/*
  * signalwindow.c
  */
 NULL, /* signalarea 369 */
@@ -887,7 +887,7 @@ NULL, /* cleanup 386 */
 
 /*
  * splash.c
- */ 
+ */
 0, /* splash_is_loading */
 0, /* splash_fix_win_title */
 1, /* splash_disable 387 */
@@ -1369,7 +1369,7 @@ void *calloc_2_into_context(struct Global *g, size_t nmemb, size_t size);
 /*
  * context manipulation functions
  */
-struct Global *initialize_globals(void) 
+struct Global *initialize_globals(void)
 {
 struct Global *g = calloc(1,sizeof(struct Global));	/* allocate viewer context */
 
@@ -1442,13 +1442,13 @@ GLOBALS->outstanding = 0;				/* zero out count of chunks in this ctx */
 if(!setjmp(*(GLOBALS->vcd_jmp_buf)))			/* loader exception handling */
 	{
 	switch(GLOBALS->loaded_file_type)		/* on fail, longjmp called in these loaders */
-		{			
+		{
    		case LXT_FILE: lxt_main(GLOBALS->loaded_file_name); break;
    		case VCD_FILE: vcd_main(GLOBALS->loaded_file_name); break;
 		case VCD_RECODER_FILE: vcd_recoder_main(GLOBALS->loaded_file_name); break;
 		default: break;
 		}
-	
+
 #ifdef _WAVE_HAVE_JUDY
 	{
 	Pvoid_t  PJArray = (Pvoid_t)setjmp_globals->alloc2_chain;
@@ -1486,7 +1486,7 @@ if(!setjmp(*(GLOBALS->vcd_jmp_buf)))			/* loader exception handling */
 				}
 			GLOBALS->alloc2_chain = setjmp_globals->alloc2_chain;
 			GLOBALS->outstanding += setjmp_globals->outstanding;
-			break;					
+			break;
 			}
 		}
 	}
@@ -1518,7 +1518,7 @@ if(!setjmp(*(GLOBALS->vcd_jmp_buf)))			/* loader exception handling */
 	        				{
 	        				pclose(GLOBALS->vcd_handle_vcd_recoder_c_2);
 	        				GLOBALS->vcd_handle_vcd_recoder_c_2 = NULL;
-	        				}    
+	        				}
 	        				else
 	        				{
 	        				fclose(GLOBALS->vcd_handle_vcd_recoder_c_2);
@@ -1529,10 +1529,10 @@ if(!setjmp(*(GLOBALS->vcd_jmp_buf)))			/* loader exception handling */
 
 	if(GLOBALS->vlist_handle) { fclose(GLOBALS->vlist_handle); GLOBALS->vlist_handle = NULL; }
 	if(GLOBALS->mm_lxt_mmap_addr)
-		{                        
-		munmap(GLOBALS->mm_lxt_mmap_addr, GLOBALS->mm_lxt_mmap_len); 
+		{
+		munmap(GLOBALS->mm_lxt_mmap_addr, GLOBALS->mm_lxt_mmap_len);
 		GLOBALS->mm_lxt_mmap_addr = NULL;
-		}                        
+		}
 	free_outstanding(); /* free anything allocated in loader ctx */
 
 	memcpy(GLOBALS, setjmp_globals, sizeof(struct Global)); /* copy over old ctx */
@@ -1599,7 +1599,7 @@ void reload_into_new_context_2(void)
 #endif
 
  printf("GTKWAVE | Reloading waveform...\n");
- gtkwavetcl_setvar(WAVE_TCLCB_RELOAD_BEGIN, GLOBALS->loaded_file_name, WAVE_TCLCB_RELOAD_BEGIN_FLAGS); 
+ gtkwavetcl_setvar(WAVE_TCLCB_RELOAD_BEGIN, GLOBALS->loaded_file_name, WAVE_TCLCB_RELOAD_BEGIN_FLAGS);
 
  /* Save state to file */
  save_tmpfilename = tmpnam_2(NULL, &fd_dummy);
@@ -1616,7 +1616,7 @@ void reload_into_new_context_2(void)
 
  reload_tmpfilename = strdup(save_tmpfilename);
  free_2(save_tmpfilename);
- 
+
  /* save off size of tree frame if active */
 #if WAVE_USE_GTK2
  if(GLOBALS->gtk2_tree_frame)
@@ -1665,7 +1665,7 @@ void reload_into_new_context_2(void)
 	GLOBALS->fd_lxt_c_1 = -1;
 	}
 
- 
+
  /* Marker positions */
  memcpy(new_globals->named_markers, GLOBALS->named_markers, sizeof(GLOBALS->named_markers));
  new_globals->named_marker_lock_idx = GLOBALS->named_marker_lock_idx;
@@ -1711,7 +1711,7 @@ void reload_into_new_context_2(void)
  memcpy(&new_globals->gc_rainbow, &GLOBALS->gc_rainbow, 2 * WAVE_NUM_RAINBOW * sizeof(GdkGC *));
 
  new_globals->mainwindow = GLOBALS->mainwindow;
- new_globals->signalwindow = GLOBALS->signalwindow; 
+ new_globals->signalwindow = GLOBALS->signalwindow;
  new_globals->wavewindow = GLOBALS->wavewindow;
  new_globals->toppanedwindow = GLOBALS->toppanedwindow;
  new_globals->panedwindow = GLOBALS->panedwindow;
@@ -1724,7 +1724,7 @@ void reload_into_new_context_2(void)
  new_globals->hscroll_wavewindow_c_2 = GLOBALS->hscroll_wavewindow_c_2;
  new_globals->max_or_marker_label_currenttime_c_1 = GLOBALS->max_or_marker_label_currenttime_c_1;
  new_globals->maxtext_currenttime_c_1 = (char *) calloc_2_into_context(new_globals,1,40);
- memcpy(new_globals->maxtext_currenttime_c_1, GLOBALS->maxtext_currenttime_c_1,40); 
+ memcpy(new_globals->maxtext_currenttime_c_1, GLOBALS->maxtext_currenttime_c_1,40);
  new_globals->maxtimewid_currenttime_c_1 = GLOBALS->maxtimewid_currenttime_c_1;
  new_globals->curtext_currenttime_c_1 = (char *) calloc_2_into_context(new_globals,1,40);
  memcpy(new_globals->curtext_currenttime_c_1, GLOBALS->curtext_currenttime_c_1, 40);
@@ -1898,7 +1898,7 @@ void reload_into_new_context_2(void)
  strcpy2_into_new_context(new_globals, &new_globals->argvlist, &GLOBALS->argvlist);
  strcpy2_into_new_context(new_globals, &new_globals->editor_name, &GLOBALS->editor_name);
  strcpy2_into_new_context(new_globals, &new_globals->fontname_logfile, &GLOBALS->fontname_logfile);
- strcpy2_into_new_context(new_globals, &new_globals->fontname_signals, &GLOBALS->fontname_signals); 
+ strcpy2_into_new_context(new_globals, &new_globals->fontname_signals, &GLOBALS->fontname_signals);
  strcpy2_into_new_context(new_globals, &new_globals->fontname_waves, &GLOBALS->fontname_waves);
  strcpy2_into_new_context(new_globals, &new_globals->cutcopylist, &GLOBALS->cutcopylist);
  strcpy2_into_new_context(new_globals, &new_globals->tcl_init_cmd, &GLOBALS->tcl_init_cmd);
@@ -1935,7 +1935,7 @@ void reload_into_new_context_2(void)
  new_globals->item_factory_menu_c_1 = GLOBALS->item_factory_menu_c_1;
 #endif
  strcpy2_into_new_context(new_globals, &new_globals->filesel_writesave, &GLOBALS->filesel_writesave);
- new_globals->save_success_menu_c_1 = GLOBALS->save_success_menu_c_1; 
+ new_globals->save_success_menu_c_1 = GLOBALS->save_success_menu_c_1;
  new_globals->signal_popup_menu = GLOBALS->signal_popup_menu;
  new_globals->sst_signal_popup_menu = GLOBALS->sst_signal_popup_menu;
 
@@ -2000,7 +2000,7 @@ void reload_into_new_context_2(void)
  new_globals->socket_xid = GLOBALS->socket_xid;
 #endif
  new_globals->dual_ctx = GLOBALS->dual_ctx;
-  
+
  /* Times struct */
  memcpy(&(new_globals->tims), &(GLOBALS->tims), sizeof(Times));
 
@@ -2031,20 +2031,20 @@ void reload_into_new_context_2(void)
                         munmap(GLOBALS->mm_lxt_mmap_addr, GLOBALS->mm_lxt_mmap_len);
                         }
                 break;
-        
+
    case LX2_FILE: lxt2_rd_close(GLOBALS->lx2_lx2_c_1); break;
    case VZT_FILE: vzt_rd_close(GLOBALS->vzt_vzt_c_1); break;
    case FST_FILE: fstReaderClose(GLOBALS->fst_fst_c_1); GLOBALS->fst_fst_c_1 = NULL; break;
-   case AE2_FILE: 
+   case AE2_FILE:
 #ifdef AET2_IS_PRESENT
 #ifdef AET2_ALIASDB_IS_PRESENT
 	if(GLOBALS->adb) { adb_close_db(GLOBALS->adb); GLOBALS->adb = 0; }
 	/* if(GLOBALS->m_alias_stream_file) { fclose(GLOBALS->m_alias_stream_file); GLOBALS->m_alias_stream_file = NULL; } */
-	ae2_read_end(GLOBALS->ae2); fclose(GLOBALS->ae2_f); 
+	ae2_read_end(GLOBALS->ae2); fclose(GLOBALS->ae2_f);
 #endif
 #endif
 	break;
-  
+
 #ifdef EXTLOAD_SUFFIX
    case EXTLOAD_FILE:
 	if(GLOBALS->extload_ffr_ctx)
@@ -2061,7 +2061,7 @@ void reload_into_new_context_2(void)
    case DUMPLESS_FILE:
    case GHW_FILE:
    case VCD_FILE:
-   case VCD_RECODER_FILE: 
+   case VCD_RECODER_FILE:
    default:
 	/* do nothing */ break;
  }
@@ -2095,7 +2095,7 @@ void reload_into_new_context_2(void)
  widget_ungrab_destroy(&GLOBALS->window_simplereq_c_9);		/* simplereq.c */
  widget_ungrab_destroy(&GLOBALS->window1_treesearch_gtk1_c);	/* treesearch_gtk1.c */
  widget_ungrab_destroy(&GLOBALS->window1_treesearch_gtk2_c_3);	/* treesearch_gtk2.c */
- 
+
  /* supported migration of window contexts... */
  if(GLOBALS->window_hiersearch_c_3)
         {
@@ -2127,13 +2127,13 @@ void reload_into_new_context_2(void)
 	new_globals->cleanup_hiersearch_c_3 = GLOBALS->cleanup_hiersearch_c_3;
 	new_globals->is_active_hiersearch_c_1 = GLOBALS->is_active_hiersearch_c_1;
         }
- 
+
  if(GLOBALS->mouseover_mouseover_c_1) /* mouseover regenerates as the pointer moves so no real context lost */
         {
         gtk_widget_destroy(GLOBALS->mouseover_mouseover_c_1); GLOBALS->mouseover_mouseover_c_1 = NULL;
         gdk_pixmap_unref(GLOBALS->mo_pixmap_mouseover_c_1);   GLOBALS->mo_pixmap_mouseover_c_1 = NULL;
         }
-         
+
  if(GLOBALS->window_renderopt_c_6)
         {
 	new_globals->is_active_renderopt_c_3 = GLOBALS->is_active_renderopt_c_3;
@@ -2163,7 +2163,7 @@ void reload_into_new_context_2(void)
 	new_globals->entry_search_c_3 = GLOBALS->entry_search_c_3;
 	new_globals->clist_search_c_3 = GLOBALS->clist_search_c_3;
 
-	strcpy2_into_new_context(new_globals, &new_globals->searchbox_text_search_c_1, &GLOBALS->searchbox_text_search_c_1);	
+	strcpy2_into_new_context(new_globals, &new_globals->searchbox_text_search_c_1, &GLOBALS->searchbox_text_search_c_1);
 
 	for(i=0;i<5;i++)
 		{
@@ -2171,7 +2171,7 @@ void reload_into_new_context_2(void)
 		new_globals->regex_mutex_search_c_1[i] = GLOBALS->regex_mutex_search_c_1[i];
 		}
         }
-        
+
 
  /* erase any old tabbed contexts if they exist... */
  dead_context_sweep();
@@ -2203,16 +2203,16 @@ void reload_into_new_context_2(void)
 
  /* Check to see if we need to reload a vcd file */
 #if !defined _MSC_VER && !defined __MINGW32__
-	if(GLOBALS->optimize_vcd) 
+	if(GLOBALS->optimize_vcd)
 		{
 	   	optimize_vcd_file();
 	 	}
 #endif
 	/* Load new file from disk, no reload on partial vcd or vcd from stdin. */
-	switch(GLOBALS->loaded_file_type) 
+	switch(GLOBALS->loaded_file_type)
 		{
-#ifdef EXTLOAD_SUFFIX   
-   		case EXTLOAD_FILE: 
+#ifdef EXTLOAD_SUFFIX
+   		case EXTLOAD_FILE:
 			extload_main(GLOBALS->loaded_file_name, GLOBALS->skip_start, GLOBALS->skip_end);
 			load_was_success = (GLOBALS->extload != NULL) && (!GLOBALS->extload_already_errored);
 			GLOBALS->extload_already_errored = 0;
@@ -2220,22 +2220,22 @@ void reload_into_new_context_2(void)
 			break;
 #endif
 
-   		case LX2_FILE: 
+   		case LX2_FILE:
 			lx2_main(GLOBALS->loaded_file_name,GLOBALS->skip_start,GLOBALS->skip_end);
 			load_was_success = (GLOBALS->lx2_lx2_c_1 != NULL);
 			break;
 
-   		case VZT_FILE: 
-			vzt_main(GLOBALS->loaded_file_name,GLOBALS->skip_start,GLOBALS->skip_end); 
+   		case VZT_FILE:
+			vzt_main(GLOBALS->loaded_file_name,GLOBALS->skip_start,GLOBALS->skip_end);
 			load_was_success = (GLOBALS->vzt_vzt_c_1 != NULL);
 			break;
 
-   		case FST_FILE: 
-			fst_main(GLOBALS->loaded_file_name,GLOBALS->skip_start,GLOBALS->skip_end); 
+   		case FST_FILE:
+			fst_main(GLOBALS->loaded_file_name,GLOBALS->skip_start,GLOBALS->skip_end);
 			load_was_success = (GLOBALS->fst_fst_c_1 != NULL);
 			break;
 
-   		case AE2_FILE: 
+   		case AE2_FILE:
 #ifdef AET2_IS_PRESENT
 			ae2_main(GLOBALS->loaded_file_name,GLOBALS->skip_start,GLOBALS->skip_end);
 			load_was_success = (GLOBALS->ae2 != NULL);
@@ -2244,18 +2244,18 @@ void reload_into_new_context_2(void)
 #endif
 			break;
 
-   		case GHW_FILE: 
+   		case GHW_FILE:
 			load_was_success = (ghw_main(GLOBALS->loaded_file_name) != 0);
 			break;
 
 		case LXT_FILE:
-   		case VCD_FILE: 
-		case VCD_RECODER_FILE: 
+   		case VCD_FILE:
+		case VCD_RECODER_FILE:
 			load_was_success = handle_setjmp();
 			break;
 		default:
 			break;
- 		} 
+ 		}
 
 	set_window_idle(NULL);
 
@@ -2311,7 +2311,7 @@ void reload_into_new_context_2(void)
  if(GLOBALS->tims.prevmarker < GLOBALS->tims.first) { GLOBALS->tims.prevmarker = GLOBALS->tims.first; }
  if(GLOBALS->tims.prevmarker > GLOBALS->tims.last)  { GLOBALS->tims.prevmarker = GLOBALS->tims.last; }
  if(GLOBALS->tims.laststart < GLOBALS->tims.first)  { GLOBALS->tims.laststart = GLOBALS->tims.first; }
- if(GLOBALS->tims.laststart > GLOBALS->tims.last)   { GLOBALS->tims.laststart = GLOBALS->tims.last; } 
+ if(GLOBALS->tims.laststart > GLOBALS->tims.last)   { GLOBALS->tims.laststart = GLOBALS->tims.last; }
 
  reformat_time(timestr, GLOBALS->tims.first + GLOBALS->global_time_offset, GLOBALS->time_dimension);
  gtk_entry_set_text(GTK_ENTRY(GLOBALS->from_entry),timestr);
@@ -2341,7 +2341,7 @@ void reload_into_new_context_2(void)
 	}
  }
  #endif
- #if WAVE_USE_GTK2 
+ #if WAVE_USE_GTK2
  if(GLOBALS->window_treesearch_gtk2_c_12)
 	{
    	gtk_container_remove(GTK_CONTAINER(GLOBALS->window_treesearch_gtk2_c_12), GLOBALS->treesearch_gtk2_window_vbox);
@@ -2389,12 +2389,12 @@ void reload_into_new_context_2(void)
 	GtkAdjustment *vadj = gtk_clist_get_vadjustment(cl);
 
 	if((vadj) && (tree_vadj_value >= vadj->lower) && (tree_vadj_value <= vadj->upper))
-		{ 
+		{
 		vadj->value = tree_vadj_value;
 		gtk_clist_set_vadjustment(cl, vadj);
 
 		gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(vadj)), "changed");
-		gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(vadj)), "value_changed"); 
+		gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(vadj)), "value_changed");
 		}
 	}
 
@@ -2403,12 +2403,12 @@ void reload_into_new_context_2(void)
 	GtkAdjustment *hadj = gtk_clist_get_hadjustment(cl);
 
 	if((hadj) && (tree_hadj_value >= hadj->lower) && (tree_hadj_value <= hadj->upper))
-		{ 
+		{
 		hadj->value = tree_hadj_value;
 		gtk_clist_set_hadjustment(cl, hadj);
 
 		gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(hadj)), "changed");
-		gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(hadj)), "value_changed"); 
+		gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(hadj)), "value_changed");
 		}
 	}
 
@@ -2475,7 +2475,7 @@ void reload_into_new_context_2(void)
 			                        GLOBALS->treechain_hiersearch_c_1->tree=GLOBALS->current_tree_hiersearch_c_1;
 			                        GLOBALS->treechain_hiersearch_c_1->label=t;
 			                        }
-			
+
 			                GLOBALS->current_tree_hiersearch_c_1=t->child;
 			                }
 
@@ -2493,8 +2493,8 @@ void reload_into_new_context_2(void)
 			hier_head = hier_curr->next;
 			free_2(hier_curr->name);
 			free_2(hier_curr);
-			hier_curr = hier_head;			
-			}		
+			hier_curr = hier_head;
+			}
 		}
 
 	refresh_hier_tree(GLOBALS->current_tree_hiersearch_c_1);
@@ -2521,28 +2521,28 @@ void reload_into_new_context_2(void)
 		   if(treeview_vadj_value != 0.0)
 			{
 			GtkAdjustment *vadj = gtk_tree_view_get_vadjustment((GtkTreeView *)GLOBALS->dnd_sigview);
-		
+
 			if((vadj) && (treeview_vadj_value >= vadj->lower) && (treeview_vadj_value <= vadj->upper))
-				{ 
+				{
 				vadj->value = treeview_vadj_value;
 				gtk_tree_view_set_vadjustment((GtkTreeView *)GLOBALS->dnd_sigview, vadj);
-		
+
 				gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(vadj)), "changed");
-				gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(vadj)), "value_changed"); 
+				gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(vadj)), "value_changed");
 				}
 			}
-	
+
 		   if(treeview_hadj_value != 0.0)
 			{
 			GtkAdjustment *hadj = gtk_tree_view_get_hadjustment((GtkTreeView *)GLOBALS->dnd_sigview);
-		
+
 			if((hadj) && (treeview_hadj_value >= hadj->lower) && (treeview_hadj_value <= hadj->upper))
-				{ 
+				{
 				hadj->value = treeview_hadj_value;
 				gtk_tree_view_set_hadjustment((GtkTreeView *)GLOBALS->dnd_sigview, hadj);
-		
+
 				gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(hadj)), "changed");
-				gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(hadj)), "value_changed"); 
+				gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(hadj)), "value_changed");
 				}
 			}
 		}
@@ -2557,17 +2557,17 @@ static int reloading = 0;
 
 if(!reloading)
 	{
-#ifdef MAC_INTEGRATION   
+#ifdef MAC_INTEGRATION
 	osx_menu_sensitivity(FALSE);
-#endif   
+#endif
 	reload_into_new_context_2();
 	reloading = 0;
-#ifdef MAC_INTEGRATION   
+#ifdef MAC_INTEGRATION
 	if(GLOBALS->loaded_file_type != MISSING_FILE)
 		{
 		osx_menu_sensitivity(TRUE);
 		}
-#endif   
+#endif
 	}
 }
 
@@ -2587,7 +2587,7 @@ void free_and_destroy_page_context(void)
                         munmap(GLOBALS->mm_lxt_mmap_addr, GLOBALS->mm_lxt_mmap_len);
                         }
                 break;
- 
+
    case LX2_FILE: lxt2_rd_close(GLOBALS->lx2_lx2_c_1); break;
    case VZT_FILE: vzt_rd_close(GLOBALS->vzt_vzt_c_1); break;
    case FST_FILE: fstReaderClose(GLOBALS->fst_fst_c_1); GLOBALS->fst_fst_c_1 = NULL; break;
@@ -2612,12 +2612,12 @@ void free_and_destroy_page_context(void)
 		}
 	break;
 #endif
- 
+
    case MISSING_FILE:
    case DUMPLESS_FILE:
    case GHW_FILE:
    case VCD_FILE:
-   case VCD_RECODER_FILE: 
+   case VCD_RECODER_FILE:
    default:
 	/* do nothing */ break;
  }
@@ -2626,7 +2626,7 @@ void free_and_destroy_page_context(void)
 
  widget_only_destroy(&GLOBALS->window_ptranslate_c_5);		/* ptranslate.c */
 
- WAVE_STRACE_ITERATOR(s_ctx_iter)                                
+ WAVE_STRACE_ITERATOR(s_ctx_iter)
         {
         GLOBALS->strace_ctx = &GLOBALS->strace_windows[GLOBALS->strace_current_window = s_ctx_iter];
 	widget_only_destroy(&GLOBALS->strace_ctx->window_strace_c_10);	/* strace.c */
@@ -2645,16 +2645,16 @@ void free_and_destroy_page_context(void)
  widget_ungrab_destroy(&GLOBALS->window_simplereq_c_9);		/* simplereq.c */
  widget_ungrab_destroy(&GLOBALS->window1_treesearch_gtk1_c);	/* treesearch_gtk1.c */
  widget_ungrab_destroy(&GLOBALS->window1_treesearch_gtk2_c_3);	/* treesearch_gtk2.c */
- 
+
  /* supported migration of window contexts... */
  widget_only_destroy(&GLOBALS->window_hiersearch_c_3);
- 
+
  if(GLOBALS->mouseover_mouseover_c_1) /* mouseover regenerates as the pointer moves so no real context lost */
         {
         gtk_widget_destroy(GLOBALS->mouseover_mouseover_c_1); GLOBALS->mouseover_mouseover_c_1 = NULL;
         gdk_pixmap_unref(GLOBALS->mo_pixmap_mouseover_c_1);   GLOBALS->mo_pixmap_mouseover_c_1 = NULL;
         }
-         
+
  widget_only_destroy(&GLOBALS->window_renderopt_c_6);
  widget_only_destroy(&GLOBALS->window_search_c_7);
 
@@ -2701,7 +2701,7 @@ if(gp)
 
 
 
-/* 
+/*
  * focus directed context switching of GLOBALS in multiple tabs mode
  */
 static gint context_swapper(GtkWindow *w, GdkEvent *event, void *data)
@@ -2725,8 +2725,8 @@ switch(type)
 			{
 			unsigned int i;
 			void **vp;
-			GtkWindow *wcmp;	
-	
+			GtkWindow *wcmp;
+
 			for(i=0;i<GLOBALS->num_notebook_pages;i++)
 				{
 				struct Global *test_g = (*GLOBALS->contexts)[i];
@@ -2749,7 +2749,7 @@ switch(type)
 							GLOBALS->lxt_clock_compress_to_z = g_old->lxt_clock_compress_to_z;
 							GLOBALS->autoname_bundles = g_old->autoname_bundles;
 							GLOBALS->autocoalesce_reversal = g_old->autocoalesce_reversal;
-							GLOBALS->autocoalesce = g_old->autocoalesce; 
+							GLOBALS->autocoalesce = g_old->autocoalesce;
 							GLOBALS->hier_grouping = g_old->hier_grouping;
 							GLOBALS->wave_scrolling = g_old->wave_scrolling;
 							GLOBALS->constant_marker_update = g_old->constant_marker_update;
@@ -2811,7 +2811,7 @@ struct Global *watch = *w;
 if(GLOBALS->gtk_context_bridge_ptr != w)
 	{
 #ifdef GTKWAVE_SIGNAL_CONNECT_DEBUG
-	fprintf(stderr, "GTKWAVE | WARNING: globals change caught by ctx_swap_watchdog()! %p vs %p, session %d vs %d\n", 
+	fprintf(stderr, "GTKWAVE | WARNING: globals change caught by ctx_swap_watchdog()! %p vs %p, session %d vs %d\n",
 		(void *)GLOBALS->gtk_context_bridge_ptr,(void *)w, (*GLOBALS->gtk_context_bridge_ptr)->this_context_page, watch->this_context_page);
 #endif
 
@@ -2901,7 +2901,7 @@ void clone_icon_pointers_across_contexts(struct Global *a, struct Global *b)
  a->hiericon_function_pixmap = b->hiericon_function_pixmap;
  a->hiericon_function_mask = b->hiericon_function_mask;
  a->hiericon_begin_pixmap = b->hiericon_begin_pixmap;
- a->hiericon_begin_mask = b->hiericon_begin_mask;  
+ a->hiericon_begin_mask = b->hiericon_begin_mask;
  a->hiericon_fork_pixmap = b->hiericon_fork_pixmap;
  a->hiericon_fork_mask = b->hiericon_fork_mask;
  a->hiericon_interface_pixmap = b->hiericon_interface_pixmap;
@@ -2917,7 +2917,7 @@ void clone_icon_pointers_across_contexts(struct Global *a, struct Global *b)
  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_design_mask = b->hiericon_design_mask;
  a->hiericon_block_pixmap = b->hiericon_block_pixmap;
  a->hiericon_block_mask = b->hiericon_block_mask;
  a->hiericon_generateif_pixmap = b->hiericon_generateif_pixmap;
@@ -2925,7 +2925,7 @@ void clone_icon_pointers_across_contexts(struct Global *a, struct Global *b)
  a->hiericon_generatefor_pixmap = b->hiericon_generatefor_pixmap;
  a->hiericon_generatefor_mask = b->hiericon_generatefor_mask;
  a->hiericon_instance_pixmap = b->hiericon_instance_pixmap;
- a->hiericon_instance_mask = b->hiericon_instance_mask;  
+ a->hiericon_instance_mask = b->hiericon_instance_mask;
  a->hiericon_package_pixmap = b->hiericon_package_pixmap;
  a->hiericon_package_mask = b->hiericon_package_mask;
 
@@ -2941,5 +2941,5 @@ void clone_icon_pointers_across_contexts(struct Global *a, struct Global *b)
  a->hiericon_buffer_mask = b->hiericon_buffer_mask;
  a->hiericon_linkage_pixmap = b->hiericon_linkage_pixmap;
  a->hiericon_linkage_mask = b->hiericon_linkage_mask;
-} 
+}
 
diff --git a/src/globals.h b/src/globals.h
index 045ba89..34e4b46 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -54,7 +54,7 @@
 #include "tree.h"
 #include "vcd.h"
 #include "vcd_saver.h"
-#include "vlist.h" 
+#include "vlist.h"
 #include "vzt.h"
 #include "version.h"
 #include "wavealloca.h"
@@ -66,7 +66,7 @@
 #endif
 
 
-struct Global{ 
+struct Global{
 
 /*
  * ae2.c
@@ -137,7 +137,7 @@ char *maxlen_trunc_pos_bsearch_c_1; /* from bsearch.c 21 */
 char *trunc_asciibase_bsearch_c_1; /* from bsearch.c 22 */
 
 
-/* 
+/*
  * busy.c
  */
 GdkCursor *busycursor_busy_c_1; /* from busy.c 23 */
@@ -280,9 +280,9 @@ void (*cleanup_file_c_2)(void); /* from file.c 90 */
 void (*bad_cleanup_file_c_1)(void); /* from file.c 91 */
 
 
-/* 
+/*
  * fonts.c
- */ 
+ */
 char *fontname_signals; /* from fonts.c 92 */
 char *fontname_waves; /* from fonts.c 93 */
 #if defined(WAVE_USE_GTK2) && !defined(GTK_ENABLE_BROKEN) && GTK_CHECK_VERSION(2,8,0)
@@ -298,18 +298,18 @@ char use_pango_fonts;
 /*
  * fst.c
  */
-void *fst_fst_c_1; 
+void *fst_fst_c_1;
 const char *fst_scope_name;
 int fst_scope_name_len;
 TimeType first_cycle_fst_c_3;
-TimeType last_cycle_fst_c_3; 
+TimeType last_cycle_fst_c_3;
 TimeType total_cycles_fst_c_3;
-struct lx2_entry *fst_table_fst_c_1; 
+struct lx2_entry *fst_table_fst_c_1;
 struct fac *mvlfacs_fst_c_3;
 fstHandle *mvlfacs_fst_alias;
 fstHandle *mvlfacs_fst_rvs_alias;
 fstHandle fst_maxhandle;
-int busycnt_fst_c_2; 
+int busycnt_fst_c_2;
 double *double_curr_fst;
 double *double_fini_fst;
 char nonimplicit_direction_encountered;
@@ -327,7 +327,7 @@ char **stem_path_string_table;
 struct stem_struct_t *stem_struct_base;
 struct stem_struct_t *istem_struct_base;
 uint32_t stem_path_string_table_siz;
-uint32_t stem_path_string_table_alloc;  
+uint32_t stem_path_string_table_alloc;
 uint32_t stem_struct_base_siz;
 uint32_t stem_struct_base_siz_alloc;
 uint32_t istem_struct_base_siz;
@@ -640,13 +640,13 @@ int mo_height_mouseover_c_1; /* from mouseover.c 278 */
 
 /*
  * pagebuttons.c
- */ 
+ */
 double page_divisor; /* from pagebuttons.c 279 */
 
 
 /*
  * pixmaps.c
- */ 
+ */
 GdkDrawable *redo_pixmap; /* from pixmaps.c */
 GdkDrawable *redo_mask; /* from pixmaps.c */
 GdkDrawable *larrow_pixmap; /* from pixmaps.c 281 */
@@ -721,7 +721,7 @@ GdkDrawable *hiericon_linkage_pixmap;
 GdkDrawable *hiericon_linkage_mask;
 
 
-/* 
+/*
  * print.c
  */
 int inch_print_c_1; /* from print.c 316 */
@@ -763,7 +763,7 @@ struct re_pattern_buffer *preg_regex_c_1; /* from regex.c 339 */
 int *regex_ok_regex_c_1; /* from regex.c 340 */
 
 
-/* 
+/*
  * renderopt.c
  */
 #ifdef WAVE_GTK_UNIX_PRINT
@@ -1011,14 +1011,14 @@ int comp_name_longest;
  * treesearch_gtk1.c
  */
 GtkWidget *window1_treesearch_gtk1_c;  /* manual adds by ajb... */
-GtkWidget *entry_a_treesearch_gtk1_c; 
-char *entrybox_text_local_treesearch_gtk1_c; 
+GtkWidget *entry_a_treesearch_gtk1_c;
+char *entrybox_text_local_treesearch_gtk1_c;
 void (*cleanup_e_treesearch_gtk1_c)(void);
-struct tree *selectedtree_treesearch_gtk1_c; 
-int is_active_treesearch_gtk1_c; 
-GtkWidget *window_treesearch_gtk1_c; 
+struct tree *selectedtree_treesearch_gtk1_c;
+int is_active_treesearch_gtk1_c;
+GtkWidget *window_treesearch_gtk1_c;
 GtkWidget *tree_treesearch_gtk1_c;
-char bundle_direction_treesearch_gtk1_c; 
+char bundle_direction_treesearch_gtk1_c;
 void (*cleanup_treesearch_gtk1_c)(void); /* ...end of manual adds */
 
 
@@ -1051,7 +1051,7 @@ 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) 
+#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 */
 #endif
diff --git a/src/help.c b/src/help.c
index 3f431c5..ab92678 100644
--- a/src/help.c
+++ b/src/help.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2008
  *
  * This program is free software; you can redistribute it and/or
@@ -14,7 +14,7 @@
 #include "symbol.h"
 #include "currenttime.h"
 
-   
+
 /* Add some text to our text widget - this is a callback that is invoked
 when our window is realized. We could also force our window to be
 realized with gtk_widget_realize, but it would have to be part of
@@ -62,7 +62,7 @@ help_text("Click on any menu item or button that corresponds to a menu item"
 		" for its full description.  Pressing a hotkey for a menu item"
 		" is also allowed.");
 }
-   
+
 /* Create a scrolled text area that displays a "message" */
 static GtkWidget *create_help_text (void)
 {
@@ -70,7 +70,7 @@ GtkWidget *table;
 
 /* Create a table to hold the text widget and scrollbars */
 table = gtk_table_new (1, 16, FALSE);
-   
+
 /* Put a text widget in the upper left hand corner. Note the use of
 * GTK_SHRINK in the y direction */
 #if defined(WAVE_USE_GTK2) && !defined(GTK_ENABLE_BROKEN)
@@ -86,7 +86,7 @@ gtk_text_set_editable(GTK_TEXT(GLOBALS->text_help_c_1), FALSE);
 gtk_table_attach (GTK_TABLE (table), GLOBALS->text_help_c_1, 0, 14, 0, 1,
 		      	GTK_FILL | GTK_EXPAND,
 		      	GTK_FILL | GTK_SHRINK | GTK_EXPAND, 0, 0);
-gtk_widget_set_usize(GTK_WIDGET(GLOBALS->text_help_c_1), 100, 50); 
+gtk_widget_set_usize(GTK_WIDGET(GLOBALS->text_help_c_1), 100, 50);
 gtk_widget_show (GLOBALS->text_help_c_1);
 
 /* And a VScrollbar in the upper right */
@@ -97,16 +97,16 @@ GtkTextViewClass *tc = (GtkTextViewClass*)GTK_OBJECT_GET_CLASS(GTK_OBJECT(GLOBAL
 tc->set_scroll_adjustments(GTK_TEXT_VIEW (GLOBALS->text_help_c_1), NULL, NULL);
 GLOBALS->vscrollbar_help_c_1 = gtk_vscrollbar_new (GTK_TEXT_VIEW (GLOBALS->text_help_c_1)->vadjustment);
 }
-#else 
+#else
 GLOBALS->vscrollbar_help_c_1 = gtk_vscrollbar_new (GTK_TEXT (GLOBALS->text_help_c_1)->vadj);
 #endif
 gtk_table_attach (GTK_TABLE (table), GLOBALS->vscrollbar_help_c_1, 15, 16, 0, 1,GTK_FILL, GTK_FILL | GTK_SHRINK | GTK_EXPAND, 0, 0);
 gtk_widget_show (GLOBALS->vscrollbar_help_c_1);
-   
+
 /* Add a handler to put a message in the text widget when it is realized */
 gtkwave_signal_connect (GTK_OBJECT (GLOBALS->text_help_c_1), "realize", GTK_SIGNAL_FUNC (help_realize_text), NULL);
 
-   
+
 #if defined(WAVE_USE_GTK2) && !defined(GTK_ENABLE_BROKEN)
 gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(GLOBALS->text_help_c_1), GTK_WRAP_WORD);
 #else
@@ -114,7 +114,7 @@ gtk_text_set_word_wrap(GTK_TEXT(GLOBALS->text_help_c_1), TRUE);
 #endif
 return(table);
 }
-   
+
 /***********************************************************************************/
 
 
diff --git a/src/helpers/evcd2vcd.c b/src/helpers/evcd2vcd.c
index af9e3a7..d79f2dd 100644
--- a/src/helpers/evcd2vcd.c
+++ b/src/helpers/evcd2vcd.c
@@ -78,16 +78,16 @@ for(i=0;i<len;i++)
         }
 
 return(val);
-}  
+}
 
 static char *vcdid_unhash(unsigned int value)
 {
-static char buf[16];  
+static char buf[16];
 char *pnt = buf;
 unsigned int vmod;
 
 /* zero is illegal for a value...it is assumed they start at one */
-for(;;)  
+for(;;)
         {
         if((vmod = (value % 94)))
                 {
@@ -114,19 +114,19 @@ static const char *vcdo="zzzzzz01xz0101xz1x0x01z";
 const char  *vcd = dir ? vcdo : vcdi;
 char ch;
 int i;
-                                 
+
 while((ch=*src))
         {
         for(i=0;i<23;i++)
                 {
-                if(evcd[i]==ch)  
+                if(evcd[i]==ch)
                         {
                         *dst=vcd[i];
                         break;
                         }
                 }
         if(i==23) *dst='x';
-                                
+
         src++;
         dst++;
         }
@@ -254,7 +254,7 @@ while(!feof(f))
 		}
 	else
 	if(!strncmp(buf, "$scope", 6))
-		{	
+		{
 		printf("%s", buf);
 		}
 	else
@@ -276,8 +276,8 @@ while(!feof(f))
                 if(ss == -1)
                         {
                         break;
-                        }  
-                line++;  
+                        }
+                line++;
                 pnt = buf;
 		printf("$timescale\n%s$end\n", pnt);
 		}
@@ -289,8 +289,8 @@ while(!feof(f))
                 if(ss == -1)
                         {
                         break;
-                        }  
-                line++;  
+                        }
+                line++;
                 pnt = buf;
 		printf("$date\n%s$end\n", pnt);
 		}
@@ -302,8 +302,8 @@ while(!feof(f))
                 if(ss == -1)
                         {
                         break;
-                        }  
-                line++;  
+                        }
+                line++;
                 pnt = buf;
 		printf("$version\n%s$end\n", pnt);
 		}
@@ -345,7 +345,7 @@ while(!feof(f))
 				*(pnt++) = pchar = *(src++);
 				}
 			*pnt = 0;
-			
+
 			sp = strchr(bin_fixbuff, ' ');
 			sp = strchr(sp+1, ' ');
 			sp = strchr(sp+1, ' ');
@@ -420,13 +420,13 @@ exit(0);
 
 void print_help(char *nam)
 {
-#ifdef __linux__ 
+#ifdef __linux__
 printf(
 "Usage: %s [OPTION]... [EVCDFILE]\n\n"
 "  -f, --filename=FILE        specify EVCD input filename\n"
 "  -h, --help                 display this help then exit\n\n"
 
-"Note that EVCDFILE is optional provided the --filename\n" 
+"Note that EVCDFILE is optional provided the --filename\n"
 "option is specified.  VCD is emitted to stdout.\n\n"
 "Report bugs to <"PACKAGE_BUGREPORT">.\n",nam);
 #else
@@ -435,7 +435,7 @@ printf(
 "  -f FILE                    specify EVCD input filename\n"
 "  -h                         display this help then exit\n\n"
 
-"Note that EVCDFILE is optional provided the --filename\n" 
+"Note that EVCDFILE is optional provided the --filename\n"
 "option is specified.  VCD is emitted to stdout.\n\n"
 "Report bugs to <"PACKAGE_BUGREPORT">.\n",nam);
 #endif
@@ -456,21 +456,21 @@ while (1)
         {
 #ifdef __linux__
         int option_index = 0;
-                        
+
         static struct option long_options[] =
                 {
 		{"filename", 1, 0, 'f'},
                 {"help", 0, 0, 'h'},
-                {0, 0, 0, 0}  
+                {0, 0, 0, 0}
                 };
-                
+
         c = getopt_long (argc, argv, "f:h", long_options, &option_index);
 #else
         c = getopt      (argc, argv, "f:h");
 #endif
-                        
+
         if (c == -1) break;     /* no more args */
-                        
+
         switch (c)
                 {
 		case 'f':
@@ -482,38 +482,38 @@ while (1)
                 case 'h':
 			print_help(argv[0]);
                         break;
-                        
+
                 case '?':
                         opt_errors_encountered=1;
                         break;
-                        
+
                 default:
                         /* unreachable */
                         break;
                 }
         }
-                        
+
 if(opt_errors_encountered)
         {
         print_help(argv[0]);
         }
 
 if (optind < argc)
-        {               
+        {
         while (optind < argc)
                 {
                 if(!vname)
                         {
                         vname = malloc(strlen(argv[optind])+1);
                         strcpy(vname, argv[optind++]);
-                        } 
+                        }
 			else
 			{
 			break;
 			}
                 }
         }
-                        
+
 if(!vname)
         {
         print_help(argv[0]);
@@ -521,7 +521,7 @@ if(!vname)
 
 evcd_main(vname);
 
-free(vname); 
+free(vname);
 
 return(0);
 }
diff --git a/src/helpers/fst/fastlz.c b/src/helpers/fst/fastlz.c
index aa2f8bf..50bf56a 100644
--- a/src/helpers/fst/fastlz.c
+++ b/src/helpers/fst/fastlz.c
@@ -1,4 +1,4 @@
-/*  
+/*
   FastLZ - lightning-fast lossless compression library
 
   Copyright (C) 2007 Ariya Hidayat (ariya at kde.org)
@@ -53,7 +53,7 @@
 #define FASTLZ_INLINE inline
 #elif defined(__BORLANDC__) || defined(_MSC_VER) || defined(__LCC__)
 #define FASTLZ_INLINE __inline
-#else 
+#else
 #define FASTLZ_INLINE
 #endif
 
@@ -87,7 +87,7 @@ int fastlz_decompress(const void* input, int length, void* output, int maxout);
 #define MAX_DISTANCE 8192
 
 #if !defined(FASTLZ_STRICT_ALIGN)
-#define FASTLZ_READU16(p) *((const flzuint16*)(p)) 
+#define FASTLZ_READU16(p) *((const flzuint16*)(p))
 #else
 #define FASTLZ_READU16(p) ((p)[0] | (p)[1]<<8)
 #endif
@@ -233,7 +233,7 @@ static FASTLZ_INLINE int FASTLZ_COMPRESSOR(const void* input, int length, void*
     *hslot = anchor;
 
     /* is this a match? check the first 3 bytes */
-    if(distance==0 || 
+    if(distance==0 ||
 #if FASTLZ_LEVEL==1
     (distance >= MAX_DISTANCE) ||
 #else
@@ -246,11 +246,11 @@ static FASTLZ_INLINE int FASTLZ_COMPRESSOR(const void* input, int length, void*
     /* far, needs at least 5-byte match */
     if(distance >= MAX_DISTANCE)
     {
-      if(*ip++ != *ref++ || *ip++!= *ref++) 
+      if(*ip++ != *ref++ || *ip++!= *ref++)
         goto literal;
       len += 2;
     }
-    
+
     match:
 #endif
 
@@ -346,7 +346,7 @@ static FASTLZ_INLINE int FASTLZ_COMPRESSOR(const void* input, int length, void*
       while(len > MAX_LEN-2)
       {
         *op++ = (7 << 5) + (distance >> 8);
-        *op++ = MAX_LEN - 2 - 7 -2; 
+        *op++ = MAX_LEN - 2 - 7 -2;
         *op++ = (distance & 255);
         len -= MAX_LEN-2;
       }
@@ -457,7 +457,7 @@ static FASTLZ_INLINE int FASTLZ_DECOMPRESSOR(const void* input, int length, void
         ref = op - ofs - MAX_DISTANCE;
       }
 #endif
-      
+
 #ifdef FASTLZ_SAFE
       if (FASTLZ_UNEXPECT_CONDITIONAL(op + len + 3 > op_limit))
         return 0;
@@ -530,7 +530,7 @@ static FASTLZ_INLINE int FASTLZ_DECOMPRESSOR(const void* input, int length, void
         return 0;
 #endif
 
-      *op++ = *ip++; 
+      *op++ = *ip++;
       for(--ctrl; ctrl; ctrl--)
         *op++ = *ip++;
 
diff --git a/src/helpers/fst/fastlz.h b/src/helpers/fst/fastlz.h
index e0512c1..8b4eac2 100644
--- a/src/helpers/fst/fastlz.h
+++ b/src/helpers/fst/fastlz.h
@@ -1,4 +1,4 @@
-/*  
+/*
   FastLZ - lightning-fast lossless compression library
 
   Copyright (C) 2007 Ariya Hidayat (ariya at kde.org)
@@ -47,11 +47,11 @@ extern "C" {
 #endif
 
 /**
-  Compress a block of data in the input buffer and returns the size of 
-  compressed block. The size of input buffer is specified by length. The 
+  Compress a block of data in the input buffer and returns the size of
+  compressed block. The size of input buffer is specified by length. The
   minimum input buffer size is 16.
 
-  The output buffer must be at least 5% larger than the input buffer  
+  The output buffer must be at least 5% larger than the input buffer
   and can not be smaller than 66 bytes.
 
   If the input is not compressible, the return value might be larger than
@@ -63,9 +63,9 @@ extern "C" {
 int fastlz_compress(const void* input, int length, void* output);
 
 /**
-  Decompress a block of compressed data and returns the size of the 
-  decompressed block. If error occurs, e.g. the compressed data is 
-  corrupted or the output buffer is not large enough, then 0 (zero) 
+  Decompress a block of compressed data and returns the size of the
+  decompressed block. If error occurs, e.g. the compressed data is
+  corrupted or the output buffer is not large enough, then 0 (zero)
   will be returned instead.
 
   The input buffer and the output buffer can not overlap.
@@ -74,14 +74,14 @@ int fastlz_compress(const void* input, int length, void* output);
   more than what is specified in maxout.
  */
 
-int fastlz_decompress(const void* input, int length, void* output, int maxout); 
+int fastlz_decompress(const void* input, int length, void* output, int maxout);
 
 /**
-  Compress a block of data in the input buffer and returns the size of 
-  compressed block. The size of input buffer is specified by length. The 
+  Compress a block of data in the input buffer and returns the size of
+  compressed block. The size of input buffer is specified by length. The
   minimum input buffer size is 16.
 
-  The output buffer must be at least 5% larger than the input buffer  
+  The output buffer must be at least 5% larger than the input buffer
   and can not be smaller than 66 bytes.
 
   If the input is not compressible, the return value might be larger than
@@ -89,14 +89,14 @@ int fastlz_decompress(const void* input, int length, void* output, int maxout);
 
   The input buffer and the output buffer can not overlap.
 
-  Compression level can be specified in parameter level. At the moment, 
+  Compression level can be specified in parameter level. At the moment,
   only level 1 and level 2 are supported.
   Level 1 is the fastest compression and generally useful for short data.
   Level 2 is slightly slower but it gives better compression ratio.
 
   Note that the compressed data, regardless of the level, can always be
   decompressed using the function fastlz_decompress above.
-*/  
+*/
 
 int fastlz_compress_level(int level, const void* input, int length, void* output);
 
diff --git a/src/helpers/fst/fstapi.c b/src/helpers/fst/fstapi.c
index 4ff229c..3318797 100644
--- a/src/helpers/fst/fstapi.c
+++ b/src/helpers/fst/fstapi.c
@@ -56,7 +56,7 @@
 #include <windows.h>
 #endif
 
-#if HAVE_ALLOCA_H
+#ifdef HAVE_ALLOCA_H
 #include <alloca.h>
 #elif defined(__GNUC__)
 #ifndef __MINGW32__
@@ -125,7 +125,7 @@ void **JenkinsIns(void *base_i, const unsigned char *mem, uint32_t length, uint3
 #endif
 
 #if defined(__APPLE__) && defined(__MACH__)
-#define FST_MACOSX 
+#define FST_MACOSX
 #include <sys/sysctl.h>
 #endif
 
@@ -189,30 +189,33 @@ DWORD dwRetVal = 0;
 UINT uRetVal = 0;
 FILE *fh = NULL;
 
-dwRetVal = GetTempPath(MAX_PATH, lpTempPathBuffer);
-if((dwRetVal > MAX_PATH) || (dwRetVal == 0))
-        {
-        fprintf(stderr, "GetTempPath() failed in "__FILE__" line %d, exiting.\n", __LINE__);
-	exit(255);
-        }
-        else   
-        {
-        uRetVal = GetTempFileName(lpTempPathBuffer, TEXT("FSTW"), 0, szTempFileName);
-        if (uRetVal == 0)
-                {
-                fprintf(stderr, "GetTempFileName() failed in "__FILE__" line %d, exiting.\n", __LINE__);
+if(nam) /* cppcheck warning fix: nam is always defined, so this is not needed */
+	{
+	dwRetVal = GetTempPath(MAX_PATH, lpTempPathBuffer);
+	if((dwRetVal > MAX_PATH) || (dwRetVal == 0))
+	        {
+	        fprintf(stderr, "GetTempPath() failed in "__FILE__" line %d, exiting.\n", __LINE__);
 		exit(255);
-                }
-                else
-                {
-                fname = strdup(szTempFileName);
-                }
-        }
+	        }
+	        else
+	        {
+	        uRetVal = GetTempFileName(lpTempPathBuffer, TEXT("FSTW"), 0, szTempFileName);
+	        if (uRetVal == 0)
+	                {
+	                fprintf(stderr, "GetTempFileName() failed in "__FILE__" line %d, exiting.\n", __LINE__);
+			exit(255);
+	                }
+	                else
+	                {
+	                fname = strdup(szTempFileName);
+	                }
+	        }
 
-if(fname)
-	{
-	if(nam) { *nam = fname; }
-	fh = unlink_fopen("fname", "w+b");
+	if(fname)
+		{
+		*nam = fname;
+		fh = unlink_fopen(fname, "w+b");
+		}
 	}
 
 return(fh);
@@ -239,11 +242,11 @@ if(f)
 
 if(nam)
 	{
-	if(*nam) 
-		{ 
-		unlink(*nam); 
+	if(*nam)
+		{
+		unlink(*nam);
 		free(*nam);
-		*nam = NULL; 
+		*nam = NULL;
 		}
 	}
 }
@@ -251,7 +254,7 @@ if(nam)
 /*****************************************/
 
 
-/* 
+/*
  * to remove warn_unused_result compile time messages
  * (in the future there needs to be results checking)
  */
@@ -274,7 +277,7 @@ return(ftruncate(fd, length));
 /*
  * realpath compatibility
  */
-static char *fstRealpath(const char *path, char *resolved_path) 
+static char *fstRealpath(const char *path, char *resolved_path)
 {
 #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __CYGWIN__ || defined HAVE_REALPATH
 
@@ -284,7 +287,7 @@ if(!resolved_path)
         resolved_path = malloc(PATH_MAX+1); /* fixes bug on Leopard when resolved_path == NULL */
         }
 #endif
-                         
+
 return(realpath(path, resolved_path));
 
 #else
@@ -403,12 +406,12 @@ for(;;)
 	{
 	rc <<= 7;
 	rc |= (uint32_t)(*mem & 0x7f);
-	if(mem == mem_orig) 
+	if(mem == mem_orig)
 		{
 		break;
 		}
 	mem--;
-	} 
+	}
 
 return(rc);
 }
@@ -446,14 +449,14 @@ for(;;)
                 }
         mem--;
         }
- 
-return(rc);       
+
+return(rc);
 }
 
 
 static unsigned char *fstCopyVarint32ToLeft(unsigned char *pnt, uint32_t v)
 {
-unsigned char *spnt;  
+unsigned char *spnt;
 uint32_t nxt = v;
 int cnt = 1;
 int i;
@@ -492,7 +495,7 @@ while((nxt = v>>7))
 
 return(pnt);
 }
- 
+
 
 static uint64_t fstGetVarint64(unsigned char *mem, int *skiplen)
 {
@@ -514,8 +517,8 @@ for(;;)
                 }
         mem--;
         }
- 
-return(rc);       
+
+return(rc);
 }
 
 
@@ -543,8 +546,8 @@ for(;;)
                 }
         mem--;
         }
- 
-return(rc);       
+
+return(rc);
 }
 
 
@@ -573,8 +576,8 @@ for(;;)
                 }
         mem--;
         }
- 
-return(rc);       
+
+return(rc);
 }
 
 
@@ -602,8 +605,8 @@ for(;;)
                 }
         mem--;
         }
- 
-return(rc);       
+
+return(rc);
 }
 
 
@@ -1048,7 +1051,7 @@ if(f)
 		}
 
 	fclose(f);
-	} 
+	}
 
 if(!was_set)
 	{
@@ -1277,7 +1280,7 @@ for(i=0;i<xc->maxhandle;i++)
 	{
 	vm4ip = &(xc->valpos_mem[4*i]);
 
-	if(vm4ip[2]) 
+	if(vm4ip[2])
 		{
 		uint32_t offs = vm4ip[2];
 		uint32_t next_offs;
@@ -1299,8 +1302,8 @@ for(i=0;i<xc->maxhandle;i++)
 	                                unsigned char val;
 	                                uint32_t time_delta, rcv;
 	                                next_offs = fstGetUint32(vchg_mem + offs);
-	                                offs += 4;   
-                        
+	                                offs += 4;
+
 	                                time_delta = fstGetVarint32(vchg_mem + offs, &wrlen);
 	                                val = vchg_mem[offs+wrlen];
 					offs = next_offs;
@@ -1310,7 +1313,7 @@ for(i=0;i<xc->maxhandle;i++)
 	                                        case '0':
 	                                        case '1':               rcv = ((val&1)<<1) | (time_delta<<2);
 	                                                                break; /* pack more delta bits in for 0/1 vchs */
-	        
+
 	                                        case 'x': case 'X':     rcv = FST_RCV_X | (time_delta<<4); break;
 	                                        case 'z': case 'Z':     rcv = FST_RCV_Z | (time_delta<<4); break;
 	                                        case 'h': case 'H':     rcv = FST_RCV_H | (time_delta<<4); break;
@@ -1319,7 +1322,7 @@ for(i=0;i<xc->maxhandle;i++)
 	                                        case 'l': case 'L':     rcv = FST_RCV_L | (time_delta<<4); break;
 	                                        default:                rcv = FST_RCV_D | (time_delta<<4); break;
 	                                        }
-	                
+
 	                                scratchpnt = fstCopyVarint32ToLeft(scratchpnt, rcv);
 					}
 				}
@@ -1329,7 +1332,7 @@ for(i=0;i<xc->maxhandle;i++)
 				/* fstGetUint32 (next_offs) + fstGetVarint32 (time_delta) + fstGetVarint32 (len) + payload */
 				unsigned char *pnt;
 				uint32_t record_len;
-				uint32_t time_delta;				
+				uint32_t time_delta;
 
 				while(offs)
 					{
@@ -1399,8 +1402,8 @@ for(i=0;i<xc->maxhandle;i++)
 							*(--scratchpnt) = acc;
 							shift = 0;
 							acc = 0;
-							}						
-						}					
+							}
+						}
 #else
                                         /* new algorithm */
                                         idx = ((vm4ip[1]+7) & ~7);
@@ -1606,11 +1609,11 @@ if(1)
 				fpos += fstWriterVarint(f, (zerocnt << 1));
 				zerocnt = 0;
 				}
-	
+
 			if(vm4ip[2] & 0x80000000)
 				{
 				if(vm4ip[2] != prev_alias)
-					{					
+					{
 					fpos += fstWriterSVarint(f, (((int64_t)((int32_t)(prev_alias = vm4ip[2]))) << 1) | 1);
 					}
 					else
@@ -1628,7 +1631,7 @@ if(1)
 			}
 			else
 			{
-			zerocnt++;		
+			zerocnt++;
 			}
 		}
 	}
@@ -1646,7 +1649,7 @@ if(1)
 				fpos += fstWriterVarint(f, (zerocnt << 1));
 				zerocnt = 0;
 				}
-	
+
 			if(vm4ip[2] & 0x80000000)
 				{
 				fpos += fstWriterVarint(f, 0); /* signal, note that using a *signed* varint would be more efficient than this byte escape! */
@@ -1662,7 +1665,7 @@ if(1)
 			}
 			else
 			{
-			zerocnt++;		
+			zerocnt++;
 			}
 		}
 	}
@@ -1897,7 +1900,7 @@ if(xc && !xc->already_in_close && !xc->already_in_flush)
 			if(xc->is_initial_time) /* simulation time never advanced so mock up the changes as time zero ones */
 				{
 				fstHandle dupe_idx;
-	
+
 				fstWriterEmitTimeChange(xc, 0); /* emit some time change just to have one */
 				for(dupe_idx = 0; dupe_idx < xc->maxhandle; dupe_idx++) /* now clone the values */
 					{
@@ -1966,12 +1969,12 @@ if(xc && !xc->already_in_close && !xc->already_in_flush)
 			cur_bl = xc->blackout_head->tim;
 			xc->blackout_curr = xc->blackout_head->next;
 			free(xc->blackout_head);
-			xc->blackout_head = xc->blackout_curr;	
+			xc->blackout_head = xc->blackout_curr;
 			}
 
 		eos = ftello(xc->handle);
 		fstWriterFseeko(xc, xc->handle, bpos, SEEK_SET);
-		fstWriterUint64(xc->handle, eos - bpos);		
+		fstWriterUint64(xc->handle, eos - bpos);
 		fflush(xc->handle);
 
 		fstWriterFseeko(xc, xc->handle, fixup_offs, SEEK_SET);
@@ -1996,7 +1999,7 @@ if(xc && !xc->already_in_close && !xc->already_in_flush)
 		hlen = ftello(xc->handle);
 		fstWriterUint64(xc->handle, 0);			/* section length */
 		fstWriterUint64(xc->handle, xc->hier_file_len);	/* uncompressed length */
-		
+
 		if(!xc->fourpack)
 			{
 			unsigned char *mem = malloc(FST_GZIO_LEN);
@@ -2056,7 +2059,7 @@ if(xc && !xc->already_in_close && !xc->already_in_flush)
 				fstFwrite(mem, packed_len, 1, xc->handle);
 				}
 
-			free(mem);			
+			free(mem);
 			}
 
 		fstWriterFseeko(xc, xc->handle, 0, SEEK_END);
@@ -2066,8 +2069,8 @@ if(xc && !xc->already_in_close && !xc->already_in_flush)
 		fflush(xc->handle);
 
 		fstWriterFseeko(xc, xc->handle, fixup_offs, SEEK_SET);
-		fputc(xc->fourpack ? 
-			( fourpack_duo ? FST_BL_HIER_LZ4DUO : FST_BL_HIER_LZ4) : 
+		fputc(xc->fourpack ?
+			( fourpack_duo ? FST_BL_HIER_LZ4DUO : FST_BL_HIER_LZ4) :
 			FST_BL_HIER, xc->handle); /* actual tag now also == compression type */
 
 		fstWriterFseeko(xc, xc->handle, 0, SEEK_END);	/* move file pointer to end for any section adds */
@@ -2090,15 +2093,15 @@ if(xc && !xc->already_in_close && !xc->already_in_flush)
 	fstWriterUint64(xc->handle, xc->maxhandle);
 	fstWriterUint64(xc->handle, xc->secnum);
 	fflush(xc->handle);
-	
+
 	tmpfile_close(&xc->tchn_handle, &xc->tchn_handle_nam);
 	free(xc->vchg_mem); xc->vchg_mem = NULL;
 	tmpfile_close(&xc->curval_handle, &xc->curval_handle_nam);
 	tmpfile_close(&xc->valpos_handle, &xc->valpos_handle_nam);
 	tmpfile_close(&xc->geom_handle, &xc->geom_handle_nam);
 	if(xc->hier_handle) { fclose(xc->hier_handle); xc->hier_handle = NULL; }
-	if(xc->handle) 
-		{ 
+	if(xc->handle)
+		{
 		if(xc->repack_on_close)
 			{
 			FILE *fp;
@@ -2146,7 +2149,7 @@ if(xc && !xc->already_in_close && !xc->already_in_flush)
 				fstWriterFseeko(xc, fp, 1, SEEK_SET);
 				fstWriterUint64(fp, offpnt - 1);
 				fclose(fp);
-				fclose(xc->handle); xc->handle = NULL; 
+				fclose(xc->handle); xc->handle = NULL;
 
 				unlink(xc->filename);
 				rename(hf, xc->filename);
@@ -2154,18 +2157,18 @@ if(xc && !xc->already_in_close && !xc->already_in_flush)
 				else
 				{
 				xc->repack_on_close = 0;
-				fclose(xc->handle); xc->handle = NULL; 
+				fclose(xc->handle); xc->handle = NULL;
 				}
 
 			free(hf);
 			}
 			else
 			{
-			fclose(xc->handle); xc->handle = NULL; 
+			fclose(xc->handle); xc->handle = NULL;
 			}
 		}
 
-#ifdef __MINGW32__ 
+#ifdef __MINGW32__
 	{
 	int flen = strlen(xc->filename);
 	char *hf = calloc(1, flen + 6);
@@ -2252,7 +2255,7 @@ if(xc)
 
 		xc->filetype = filetype;
 
-	        fstWriterFseeko(xc, xc->handle, FST_HDR_OFFS_FILETYPE, SEEK_SET); 
+	        fstWriterFseeko(xc, xc->handle, FST_HDR_OFFS_FILETYPE, SEEK_SET);
 		fputc(xc->filetype, xc->handle);
 	        fflush(xc->handle);
 	        fstWriterFseeko(xc, xc->handle, fpos, SEEK_SET);
@@ -2308,7 +2311,7 @@ if(xc && path && path[0])
 	int slen = strlen(path);
 #ifndef _WAVE_HAVE_JUDY
 	const uint32_t hashmask = FST_PATH_HASHMASK;
-	const unsigned char *path2 = (const unsigned char *)path;	
+	const unsigned char *path2 = (const unsigned char *)path;
 #else
 	char *path2 = alloca(slen + 1); /* judy lacks const qualifier in its JudyHSIns definition */
 	strcpy(path2, path);
@@ -2334,8 +2337,8 @@ if(xc && path && path[0])
 #endif
 				path2, NULL);
 			}
-		
-		fstWriterSetAttrGeneric(xc, rp ? rp : 
+
+		fstWriterSetAttrGeneric(xc, rp ? rp :
 #ifndef _WAVE_HAVE_JUDY
 			(const char *)
 #endif
@@ -2422,13 +2425,13 @@ if(xc && s)
 	if(tv == 10)
         	{
                 seconds_exp++;
-                } 
+                }
         else
         if(tv == 100)
         	{
                 seconds_exp+=2;
                 }
-                              
+
 	fstWriterSetTimescale(ctx, seconds_exp);
         }
 }
@@ -2540,7 +2543,7 @@ fstHandle fstWriterCreateVar(void *ctx, enum fstVarType vt, enum fstVarDir vd,
 {
 struct fstWriterContext *xc = (struct fstWriterContext *)ctx;
 int i, nlen, is_real;
-                
+
 if(xc && nam)
         {
 	if(xc->valpos_mem)
@@ -2569,10 +2572,10 @@ if(xc && nam)
 			}
 		}
 
-	xc->hier_file_len += fstWriterVarint(xc->hier_handle, len);	
+	xc->hier_file_len += fstWriterVarint(xc->hier_handle, len);
 
 	if(aliasHandle > xc->maxhandle) aliasHandle = 0;
-	xc->hier_file_len += fstWriterVarint(xc->hier_handle, aliasHandle);	
+	xc->hier_file_len += fstWriterVarint(xc->hier_handle, aliasHandle);
 	xc->numsigs++;
 	if(xc->numsigs == xc->next_huge_break)
 		{
@@ -2618,8 +2621,8 @@ if(xc && nam)
 			else
 			{
 			fstFwrite(&xc->nan, 8, 1, xc->curval_handle); /* initialize doubles to NaN rather than x */
-			}			
-		
+			}
+
 		xc->maxvalpos+=len;
 		xc->maxhandle++;
 		return(xc->maxhandle);
@@ -2647,7 +2650,7 @@ if(xc)
 	fprintf(xc->hier_handle, "%s%c%s%c",
 		scopename ? scopename : "", 0,
 		scopecomp ? scopecomp : "", 0);
-	
+
 	if(scopename)
 		{
 		xc->hier_file_len += strlen(scopename);
@@ -2699,7 +2702,7 @@ if(xc)
 	fputc(subtype, xc->hier_handle);
 	fprintf(xc->hier_handle, "%s%c",
 		attrname ? attrname : "", 0);
-	
+
 	if(attrname)
 		{
 		xc->hier_file_len += strlen(attrname);
@@ -2753,7 +2756,7 @@ if((xc) && (handle <= xc->maxhandle))
 		if(!xc->is_initial_time)
 			{
 			fpos = xc->vchg_siz;
-	
+
 			if((fpos + len + 10) > xc->vchg_alloc_siz)
 				{
 				xc->vchg_alloc_siz += (xc->fst_break_add_size + len); /* +len added in the case of extremely long vectors and small break add sizes */
@@ -2761,7 +2764,7 @@ if((xc) && (handle <= xc->maxhandle))
 				if(!xc->vchg_mem)
 					{
 					fprintf(stderr, "FATAL ERROR, could not realloc() in fstWriterEmitValueChange, exiting.\n");
-					exit(255); 
+					exit(255);
 					}
 				}
 #ifdef FST_REMOVE_DUPLICATE_VC
@@ -2774,7 +2777,7 @@ if((xc) && (handle <= xc->maxhandle))
 					unsigned char *old_value = xc->vchg_mem + vm4ip[2] + 4; /* the +4 skips old vm4ip[2] value */
 					while(*(old_value++) & 0x80) { /* skips over varint encoded "xc->tchn_idx - vm4ip[3]" */ }
 					memcpy(old_value, buf, len); /* overlay new value */
-	
+
 					memcpy(xc->curval_mem + offs, buf, len);
 					return;
 					}
@@ -2798,7 +2801,7 @@ if((xc) && (handle <= xc->maxhandle))
 							}
 						}
 					}
-	
+
 				memcpy(xc->curval_mem + offs, buf, len);
 				}
 				else
@@ -2808,7 +2811,7 @@ if((xc) && (handle <= xc->maxhandle))
 					unsigned char *old_value = xc->vchg_mem + vm4ip[2] + 4; /* the +4 skips old vm4ip[2] value */
 					while(*(old_value++) & 0x80) { /* skips over varint encoded "xc->tchn_idx - vm4ip[3]" */ }
 					*old_value = *buf; /* overlay new value */
-	
+
 					*(xc->curval_mem + offs) = *buf;
 					return;
 					}
@@ -2826,7 +2829,7 @@ if((xc) && (handle <= xc->maxhandle))
 							}
 						}
 					}
-	
+
 				*(xc->curval_mem + offs) = *buf;
 				}
 #endif
@@ -2875,7 +2878,7 @@ if((xc) && (handle <= xc->maxhandle))
 			if(!xc->vchg_mem)
 				{
 				fprintf(stderr, "FATAL ERROR, could not realloc() in fstWriterEmitVariableLengthValueChange, exiting.\n");
-				exit(255); 
+				exit(255);
 				}
 			}
 
@@ -2980,7 +2983,7 @@ if(xc)
 static const char *vartypes[] = {
 	"event", "integer", "parameter", "real", "real_parameter",
 	"reg", "supply0", "supply1", "time", "tri",
-	"triand", "trior", "trireg", "tri0", "tri1", 
+	"triand", "trior", "trireg", "tri0", "tri1",
 	"wand", "wire", "wor", "port", "sparray", "realtime",
 	"string",
 	"bit", "logic", "int", "shortint", "longint", "byte", "enum", "shortreal"
@@ -3080,7 +3083,7 @@ unsigned char *rvat_chain_mem;
 fstHandle rvat_chain_facidx;
 
 uint32_t rvat_chain_pos_tidx;
-uint32_t rvat_chain_pos_idx;  
+uint32_t rvat_chain_pos_idx;
 uint64_t rvat_chain_pos_time;
 unsigned rvat_chain_pos_valid : 1;
 
@@ -3210,7 +3213,7 @@ if(xc)
 const char *fstReaderPopScope(void *ctx)
 {
 struct fstReaderContext *xc = (struct fstReaderContext *)ctx;
-if(xc && xc->curr_hier)   
+if(xc && xc->curr_hier)
         {
 	struct fstCurrHier *ch = xc->curr_hier;
 	if(xc->curr_hier->prev)
@@ -3307,9 +3310,9 @@ return(0);
 int fstReaderGetFacProcessMask(void *ctx, fstHandle facidx)
 {
 struct fstReaderContext *xc = (struct fstReaderContext *)ctx;
-                                 
+
 if(xc)
-        {      
+        {
 	facidx--;
 	if(facidx<xc->maxhandle)
 		{
@@ -3326,9 +3329,9 @@ return(0);
 void fstReaderSetFacProcessMask(void *ctx, fstHandle facidx)
 {
 struct fstReaderContext *xc = (struct fstReaderContext *)ctx;
-                                 
+
 if(xc)
-        { 
+        {
 	facidx--;
 	if(facidx<xc->maxhandle)
 		{
@@ -3344,9 +3347,9 @@ if(xc)
 void fstReaderClrFacProcessMask(void *ctx, fstHandle facidx)
 {
 struct fstReaderContext *xc = (struct fstReaderContext *)ctx;
-                                 
+
 if(xc)
-        { 
+        {
 	facidx--;
 	if(facidx<xc->maxhandle)
 		{
@@ -3362,9 +3365,9 @@ if(xc)
 void fstReaderSetFacProcessMaskAll(void *ctx)
 {
 struct fstReaderContext *xc = (struct fstReaderContext *)ctx;
-                                 
+
 if(xc)
-        { 
+        {
 	memset(xc->process_mask, 0xff, (xc->maxhandle+7)/8);
 	}
 }
@@ -3373,9 +3376,9 @@ if(xc)
 void fstReaderClrFacProcessMaskAll(void *ctx)
 {
 struct fstReaderContext *xc = (struct fstReaderContext *)ctx;
-                                 
+
 if(xc)
-        { 
+        {
 	memset(xc->process_mask, 0x00, (xc->maxhandle+7)/8);
 	}
 }
@@ -3662,7 +3665,7 @@ if(!xc->fh)
         if(!xc->fh)
 #endif
                 {
-                xc->fh = tmpfile_open(&xc->fh_nam);  
+                xc->fh = tmpfile_open(&xc->fh_nam);
                 free(fnam); fnam = NULL;
                 if(!xc->fh)
 			{
@@ -3670,7 +3673,7 @@ if(!xc->fh)
 			free(mem);
 			return(0);
 			}
-                }    
+                }
 
 #ifndef __MINGW32__
 	if(fnam) unlink(fnam);
@@ -3683,13 +3686,13 @@ if(!xc->fh)
 	                size_t len = ((uclen - hl) > FST_GZIO_LEN) ? FST_GZIO_LEN : (uclen - hl);
 			size_t gzreadlen = gzread(zhandle, mem, len); /* rc should equal len... */
 			size_t fwlen;
-	
+
 			if(gzreadlen != len)
 				{
 				pass_status = 0;
 				break;
 				}
-	
+
 			fwlen = fstFwrite(mem, len, 1, xc->fh);
 			if(fwlen != 1)
 				{
@@ -3702,10 +3705,10 @@ if(!xc->fh)
 	else
 	if(htyp == FST_BL_HIER_LZ4DUO)
 		{
-		unsigned char *lz4_cmem  = malloc(clen);		
-		unsigned char *lz4_ucmem = malloc(uclen);		
-		unsigned char *lz4_ucmem2;		
-		uint64_t uclen2;		
+		unsigned char *lz4_cmem  = malloc(clen);
+		unsigned char *lz4_ucmem = malloc(uclen);
+		unsigned char *lz4_ucmem2;
+		uint64_t uclen2;
 		int skiplen2 = 0;
 
 		fstFread(lz4_cmem, clen, 1, xc->f);
@@ -3730,9 +3733,9 @@ if(!xc->fh)
 	else
 	if(htyp == FST_BL_HIER_LZ4)
 		{
-		unsigned char *lz4_cmem  = malloc(clen);		
-		unsigned char *lz4_ucmem = malloc(uclen);		
-		
+		unsigned char *lz4_cmem  = malloc(clen);
+		unsigned char *lz4_ucmem = malloc(uclen);
+
 		fstFread(lz4_cmem, clen, 1, xc->f);
 		pass_status = (uclen == LZ4_decompress_safe_partial ((char *)lz4_cmem, (char *)lz4_ucmem, clen, uclen, uclen));
 
@@ -3814,17 +3817,17 @@ if(!(isfeof=feof(xc->fh)))
 			xc->hier.htyp = FST_HT_SCOPE;
 			xc->hier.u.scope.typ = fgetc(xc->fh);
 			xc->hier.u.scope.name = pnt = xc->str_scope_nam;
-			while((ch = fgetc(xc->fh))) 
+			while((ch = fgetc(xc->fh)))
 				{
-				*(pnt++) = ch; 
+				*(pnt++) = ch;
 				}; /* scopename */
 			*pnt = 0;
 			xc->hier.u.scope.name_length = pnt - xc->hier.u.scope.name;
 
 			xc->hier.u.scope.component = pnt = xc->str_scope_comp;
-			while((ch = fgetc(xc->fh))) 
+			while((ch = fgetc(xc->fh)))
 				{
-				*(pnt++) = ch; 
+				*(pnt++) = ch;
 				}; /* scopecomp */
 			*pnt = 0;
 			xc->hier.u.scope.component_length = pnt - xc->hier.u.scope.component;
@@ -3839,9 +3842,9 @@ if(!(isfeof=feof(xc->fh)))
 			xc->hier.u.attr.typ = fgetc(xc->fh);
 			xc->hier.u.attr.subtype = fgetc(xc->fh);
 			xc->hier.u.attr.name = pnt = xc->str_scope_nam;
-			while((ch = fgetc(xc->fh))) 
+			while((ch = fgetc(xc->fh)))
 				{
-				*(pnt++) = ch; 
+				*(pnt++) = ch;
 				}; /* scopename */
 			*pnt = 0;
 			xc->hier.u.attr.name_length = pnt - xc->hier.u.scope.name;
@@ -3849,7 +3852,7 @@ if(!(isfeof=feof(xc->fh)))
 			xc->hier.u.attr.arg = fstReaderVarint64(xc->fh);
 
 			if(xc->hier.u.attr.typ == FST_AT_MISC)
-				{ 
+				{
 				if((xc->hier.u.attr.subtype == FST_MT_SOURCESTEM)||(xc->hier.u.attr.subtype == FST_MT_SOURCEISTEM))
 					{
 					int sidx_skiplen_dummy = 0;
@@ -3899,9 +3902,9 @@ if(!(isfeof=feof(xc->fh)))
 			xc->hier.u.var.typ = tag;
 			xc->hier.u.var.direction = fgetc(xc->fh);
 			xc->hier.u.var.name = pnt = xc->str_scope_nam;
-			while((ch = fgetc(xc->fh))) 
+			while((ch = fgetc(xc->fh)))
 				{
-				*(pnt++) = ch; 
+				*(pnt++) = ch;
 				}; /* varname */
 			*pnt = 0;
 			xc->hier.u.var.name_length = pnt - xc->hier.u.var.name;
@@ -3925,11 +3928,11 @@ if(!(isfeof=feof(xc->fh)))
 				xc->hier.u.var.handle = alias;
 				xc->hier.u.var.is_alias = 1;
 				}
-		
+
 			break;
 
 		default:
-			isfeof = 1; 
+			isfeof = 1;
 			break;
 		}
 	}
@@ -3974,7 +3977,7 @@ if(fv)
 	fprintf(fv, "$date\n\t%s\n$end\n", xc->date);
 	fprintf(fv, "$version\n\t%s\n$end\n", xc->version);
 	if(xc->timezero) fprintf(fv, "$timezero\n\t%"PRId64"\n$end\n", xc->timezero);
-	
+
         switch(xc->timescale)
                 {
                 case  2:        time_scale = 100;               time_dimension[0] = 0;   break;
@@ -3984,15 +3987,15 @@ if(fv)
                 case -1:        time_scale = 100;               time_dimension[0] = 'm'; break;
                 case -2:        time_scale = 10;
                 case -3:                                        time_dimension[0] = 'm'; break;
-         
+
                 case -4:        time_scale = 100;               time_dimension[0] = 'u'; break;
                 case -5:        time_scale = 10;
                 case -6:                                        time_dimension[0] = 'u'; break;
-        
+
                 case -10:       time_scale = 100;               time_dimension[0] = 'p'; break;
                 case -11:       time_scale = 10;
                 case -12:                                       time_dimension[0] = 'p'; break;
-        
+
                 case -13:       time_scale = 100;               time_dimension[0] = 'f'; break;
                 case -14:       time_scale = 10;
                 case -15:                                       time_dimension[0] = 'f'; break;
@@ -4004,7 +4007,7 @@ if(fv)
                 case -19:       time_scale = 100;               time_dimension[0] = 'z'; break;
                 case -20:       time_scale = 10;
                 case -21:                                       time_dimension[0] = 'z'; break;
-        
+
                 case -7:        time_scale = 100;               time_dimension[0] = 'n'; break;
                 case -8:        time_scale = 10;
                 case -9:
@@ -4014,7 +4017,7 @@ if(fv)
 	if(fv) fprintf(fv, "$timescale\n\t%d%ss\n$end\n", time_scale, time_dimension);
 	}
 
-xc->maxhandle = 0; 
+xc->maxhandle = 0;
 xc->num_alias = 0;
 
 free(xc->signal_lens);
@@ -4033,9 +4036,9 @@ while(!feof(xc->fh))
 			scopetype = fgetc(xc->fh);
 			if((scopetype < FST_ST_MIN) || (scopetype > FST_ST_MAX)) scopetype = FST_ST_VCD_MODULE;
 			pnt = str;
-			while((ch = fgetc(xc->fh))) 
+			while((ch = fgetc(xc->fh)))
 				{
-				*(pnt++) = ch; 
+				*(pnt++) = ch;
 				}; /* scopename */
 			*pnt = 0;
 			while(fgetc(xc->fh)) { }; /* scopecomp */
@@ -4051,9 +4054,9 @@ while(!feof(xc->fh))
 			attrtype = fgetc(xc->fh);
 			subtype = fgetc(xc->fh);
 			pnt = str;
-			while((ch = fgetc(xc->fh))) 
+			while((ch = fgetc(xc->fh)))
 				{
-				*(pnt++) = ch; 
+				*(pnt++) = ch;
 				}; /* attrname */
 			*pnt = 0;
 
@@ -4074,7 +4077,7 @@ while(!feof(xc->fh))
 					case FST_AT_PACK:	if((subtype < FST_PT_NONE) || (subtype > FST_PT_MAX)) subtype = FST_PT_NONE;
 								fprintf(fv, "$attrbegin %s %s %s %"PRId64" $end\n", attrtypes[attrtype], packtypes[subtype], str, attrarg);
 								break;
-					case FST_AT_MISC:	
+					case FST_AT_MISC:
 					default:		attrtype = FST_AT_MISC;
 								if(subtype == FST_MT_COMMENT)
 									{
@@ -4136,9 +4139,9 @@ while(!feof(xc->fh))
 			vartype = tag;
 			/* vardir = */ fgetc(xc->fh); /* unused in VCD reader, but need to advance read pointer */
 			pnt = str;
-			while((ch = fgetc(xc->fh))) 
+			while((ch = fgetc(xc->fh)))
 				{
-				*(pnt++) = ch; 
+				*(pnt++) = ch;
 				}; /* varname */
 			*pnt = 0;
 			len = fstReaderVarint32(xc->fh);
@@ -4166,7 +4169,7 @@ while(!feof(xc->fh))
 					len = (vartype != FST_VT_SV_SHORTREAL) ? 64 : 32;
 					xc->signal_typs[xc->maxhandle] = FST_VT_VCD_REAL;
 					}
-				if(fv) 
+				if(fv)
 					{
 					char vcdid_buf[16];
 					uint32_t modlen = (vartype != FST_VT_VCD_PORT) ? len : ((len - 2) / 3);
@@ -4182,7 +4185,7 @@ while(!feof(xc->fh))
 					len = (vartype != FST_VT_SV_SHORTREAL) ? 64 : 32;
 					xc->signal_typs[xc->maxhandle] = FST_VT_VCD_REAL;
 					}
-				if(fv) 
+				if(fv)
 					{
 					char vcdid_buf[16];
 					uint32_t modlen = (vartype != FST_VT_VCD_PORT) ? len : ((len - 2) / 3);
@@ -4191,7 +4194,7 @@ while(!feof(xc->fh))
 					}
 				xc->num_alias++;
 				}
-		
+
 			break;
 
 		default:
@@ -4256,7 +4259,7 @@ if(sectype == FST_BL_ZWRAPPER)
 		{
 		fcomp = tmpfile_open(&xc->f_nam);
 		free(hf); hf = NULL;
-		if(!fcomp) { tmpfile_close(&fcomp, &xc->f_nam); return(0); } 
+		if(!fcomp) { tmpfile_close(&fcomp, &xc->f_nam); return(0); }
 		}
 
 #if defined(FST_MACOSX)
@@ -4267,7 +4270,7 @@ if(sectype == FST_BL_ZWRAPPER)
 	setvbuf(fcomp, (char *)NULL, _IONBF, 0);   /* keeps gzip from acting weird in tandem with fopen */
 	xc->filename_unpacked = hf;
 #else
-	if(hf) 
+	if(hf)
 		{
 		unlink(hf);
 		free(hf);
@@ -4320,25 +4323,25 @@ if(gzread_pass_status)
 	while(blkpos < endfile)
 		{
 		fstReaderFseeko(xc, xc->f, blkpos, SEEK_SET);
-		
+
 		sectype = fgetc(xc->f);
 		seclen = fstReaderUint64(xc->f);
-	
-		if(sectype == EOF) 
+
+		if(sectype == EOF)
 			{
 			break;
 			}
 
                 if((hdr_incomplete) && (!seclen))
-                        {   
+                        {
                         break;
                         }
-	
-		if(!hdr_seen && (sectype != FST_BL_HDR)) 
+
+		if(!hdr_seen && (sectype != FST_BL_HDR))
 			{
 			break;
 			}
-	
+
 		blkpos++;
 		if(sectype == FST_BL_HDR)
 			{
@@ -4346,12 +4349,12 @@ if(gzread_pass_status)
 				{
 				int ch;
 				double dcheck;
-	
+
 				xc->start_time = fstReaderUint64(xc->f);
-				xc->end_time = fstReaderUint64(xc->f); 
-	
+				xc->end_time = fstReaderUint64(xc->f);
+
 				hdr_incomplete = (xc->start_time == 0) && (xc->end_time == 0);
-	
+
 				fstFread(&dcheck, 8, 1, xc->f);
 				xc->double_endian_match = (dcheck == FST_DOUBLE_ENDTEST);
 				if(!xc->double_endian_match)
@@ -4360,10 +4363,10 @@ if(gzread_pass_status)
 	  					unsigned char rvs_buf[8];
 	  					double d;
 	  					} vu;
-	
+
 					unsigned char *dcheck_alias = (unsigned char *)&dcheck;
 					int rvs_idx;
-	
+
 					for(rvs_idx=0;rvs_idx<8;rvs_idx++)
 						{
 						vu.rvs_buf[rvs_idx] = dcheck_alias[7-rvs_idx];
@@ -4373,15 +4376,15 @@ if(gzread_pass_status)
 						break; /* either corrupt file or wrong architecture (offset +33 also functions as matchword) */
 						}
 					}
-	
+
 				hdr_seen = 1;
-	
-				xc->mem_used_by_writer = fstReaderUint64(xc->f); 
-				xc->scope_count = fstReaderUint64(xc->f); 
-				xc->var_count = fstReaderUint64(xc->f); 
-				xc->maxhandle = fstReaderUint64(xc->f); 
+
+				xc->mem_used_by_writer = fstReaderUint64(xc->f);
+				xc->scope_count = fstReaderUint64(xc->f);
+				xc->var_count = fstReaderUint64(xc->f);
+				xc->maxhandle = fstReaderUint64(xc->f);
 				xc->num_alias = xc->var_count - xc->maxhandle;
-				xc->vc_section_count = fstReaderUint64(xc->f); 
+				xc->vc_section_count = fstReaderUint64(xc->f);
 				ch = fgetc(xc->f);
 				xc->timescale = (signed char)ch;
 				fstFread(xc->version, FST_HDR_SIM_VERSION_SIZE, 1, xc->f);
@@ -4399,7 +4402,7 @@ if(gzread_pass_status)
 				{
 				uint64_t bt = fstReaderUint64(xc->f);
 				xc->end_time = fstReaderUint64(xc->f);
-		
+
 				if(!vc_section_count_actual) { xc->start_time = bt; }
 				}
 
@@ -4414,7 +4417,7 @@ if(gzread_pass_status)
 				unsigned char *ucdata = malloc(uclen);
 				unsigned char *pnt = ucdata;
 				int i;
-	
+
 				xc->contains_geom_section = 1;
 				xc->maxhandle = fstReaderUint64(xc->f);
 				xc->longest_signal_value_len = 32; /* arbitrarily set at 32...this is much longer than an expanded double */
@@ -4428,7 +4431,7 @@ if(gzread_pass_status)
 				        unsigned long destlen = uclen;
 				        unsigned long sourcelen = clen;
 					int rc;
-	
+
 					fstFread(cdata, clen, 1, xc->f);
 					rc = uncompress(ucdata, &destlen, cdata, sourcelen);
 
@@ -4437,26 +4440,26 @@ if(gzread_pass_status)
 						printf("geom uncompress rc = %d\n", rc);
 						exit(255);
 						}
-					
+
 					free(cdata);
 					}
 					else
 					{
 					fstFread(ucdata, uclen, 1, xc->f);
 					}
-		
+
 				free(xc->signal_lens);
 				xc->signal_lens = malloc(sizeof(uint32_t) * xc->maxhandle);
 				free(xc->signal_typs);
 				xc->signal_typs = malloc(sizeof(unsigned char) * xc->maxhandle);
-	
+
 				for(i=0;i<xc->maxhandle;i++)
 					{
 			                int skiplen;
 		               		uint64_t val = fstGetVarint32(pnt, &skiplen);
-	
+
 					pnt += skiplen;
-	
+
 					if(val)
 						{
 						xc->signal_lens[i] = (val != 0xFFFFFFFF) ? val : 0;
@@ -4475,8 +4478,8 @@ if(gzread_pass_status)
 					}
 
 				free(xc->temp_signal_value_buf);
-				xc->temp_signal_value_buf = malloc(xc->longest_signal_value_len + 1); 
-	
+				xc->temp_signal_value_buf = malloc(xc->longest_signal_value_len + 1);
+
 				free(ucdata);
 				}
 			}
@@ -4516,7 +4519,7 @@ if(gzread_pass_status)
 				xc->blackout_times[i] = cur_bl;
 				}
 			}
-	
+
 		blkpos += seclen;
 		if(!hdr_seen) break;
 		}
@@ -4527,7 +4530,7 @@ if(gzread_pass_status)
 			{
 			xc->vc_section_count = vc_section_count_actual;
 			}
-	
+
 		if(!xc->contains_geom_section)
 			{
 			fstReaderProcessHier(xc, NULL); /* recreate signal_lens/signal_typs info */
@@ -4624,14 +4627,14 @@ if(xc)
 	free(xc->signal_lens); xc->signal_lens = NULL;
 	free(xc->filename); xc->filename = NULL;
 
-	if(xc->fh) 
-		{ 
-		tmpfile_close(&xc->fh, &xc->fh_nam); 
+	if(xc->fh)
+		{
+		tmpfile_close(&xc->fh, &xc->fh_nam);
 		}
 
-	if(xc->f) 
-		{ 
-		tmpfile_close(&xc->f, &xc->f_nam); 
+	if(xc->f)
+		{
+		tmpfile_close(&xc->f, &xc->f_nam);
 		if(xc->filename_unpacked)
 			{
 			unlink(xc->filename_unpacked);
@@ -4674,7 +4677,7 @@ uint64_t seclen, beg_tim;
 #ifdef FST_DEBUG
 uint64_t end_tim;
 #endif
-uint64_t frame_uclen, frame_clen, frame_maxhandle, vc_maxhandle; 
+uint64_t frame_uclen, frame_clen, frame_maxhandle, vc_maxhandle;
 off_t vc_start;
 off_t indx_pntr, indx_pos;
 off_t *chain_table = NULL;
@@ -4703,14 +4706,14 @@ headptr = calloc(xc->maxhandle, sizeof(uint32_t));
 length_remaining = calloc(xc->maxhandle, sizeof(uint32_t));
 
 if(fv)
-	{ 
-	fprintf(fv, "$dumpvars\n"); 
+	{
+	fprintf(fv, "$dumpvars\n");
 #ifndef FST_WRITEX_DISABLE
 	fflush(fv);
 	setvbuf(fv, (char *) NULL, _IONBF, 0); /* even buffered IO is slow so disable it and use our own routines that don't need seeking */
 	xc->writex_fd = fileno(fv);
 #endif
-	} 
+	}
 
 for(;;)
 	{
@@ -4718,7 +4721,7 @@ for(;;)
 	traversal_mem_offs = 0;
 
 	fstReaderFseeko(xc, xc->f, blkpos, SEEK_SET);
-	
+
 	sectype = fgetc(xc->f);
 	seclen = fstReaderUint64(xc->f);
 
@@ -4741,7 +4744,7 @@ for(;;)
 
 	beg_tim = fstReaderUint64(xc->f);
 #ifdef FST_DEBUG
-	end_tim = 
+	end_tim =
 #endif
 	fstReaderUint64(xc->f);
 
@@ -4784,9 +4787,9 @@ for(;;)
 	tsec_clen = fstReaderUint64(xc->f);
 	tsec_nitems = fstReaderUint64(xc->f);
 #ifdef FST_DEBUG
-	fprintf(stderr, "\ttime section unc: %d, com: %d (%d items)\n", 
+	fprintf(stderr, "\ttime section unc: %d, com: %d (%d items)\n",
 		(int)tsec_uclen, (int)tsec_clen, (int)tsec_nitems);
-#endif		
+#endif
 	if(tsec_clen > seclen) break; /* corrupted tsec_clen: by definition it can't be larger than size of section */
 	ucdata = malloc(tsec_uclen);
 	if(!ucdata) break; /* malloc fail as tsec_uclen out of range from corrupted file */
@@ -4799,22 +4802,22 @@ for(;;)
 		{
 		cdata = malloc(tsec_clen);
 		fstFread(cdata, tsec_clen, 1, xc->f);
-	
+
 		rc = uncompress(ucdata, &destlen, cdata, sourcelen);
-	                
+
 		if(rc != Z_OK)
 			{
 			printf("tsec uncompress rc = %d\n", rc);
 			exit(255);
 			}
-	
+
 		free(cdata);
 		}
 		else
 		{
 		fstFread(ucdata, tsec_uclen, 1, xc->f);
 		}
-	
+
 	free(time_table);
 	time_table = calloc(tsec_nitems, sizeof(uint64_t));
 	tpnt = ucdata;
@@ -4824,7 +4827,7 @@ for(;;)
 		int skiplen;
 		uint64_t val = fstGetVarint64(tpnt, &skiplen);
 		tpval = time_table[ti] = tpval + val;
-		tpnt += skiplen;	
+		tpnt += skiplen;
 		}
 
 	tc_head = calloc(tsec_nitems /* scan-build */ ? tsec_nitems : 1, sizeof(uint32_t));
@@ -4849,9 +4852,9 @@ for(;;)
 				char wx_buf[32];
 				int wx_len;
 
-				if(beg_tim) 
-					{ 
-					wx_len = sprintf(wx_buf, "#%"PRIu64"\n", beg_tim); 
+				if(beg_tim)
+					{
+					wx_len = sprintf(wx_buf, "#%"PRIu64"\n", beg_tim);
 					fstWritex(xc, wx_buf, wx_len);
 					}
 				if((xc->num_blackouts)&&(cur_blackout != xc->num_blackouts))
@@ -4941,7 +4944,7 @@ for(;;)
 									int vcdid_len = fstVcdIDForFwrite(vcd_id+1, idx+1);
 
 									vcd_id[0] = (xc->signal_typs[idx] != FST_VT_VCD_PORT) ? 'b' : 'p';
-									fstWritex(xc, vcd_id, 1);		
+									fstWritex(xc, vcd_id, 1);
 									fstWritex(xc,mu+sig_offs, xc->signal_lens[idx]);
 
 									vcd_id[0] = ' '; /* collapse 3 writes into one I/O call */
@@ -4955,7 +4958,7 @@ for(;;)
 							double d;
 							unsigned char *clone_d;
 							unsigned char *srcdata = mu+sig_offs;
-		
+
 							if(value_change_callback)
 								{
 								if(xc->native_doubles_for_cb)
@@ -4967,7 +4970,7 @@ for(;;)
 										else
 										{
 										int j;
-		
+
 										clone_d = (unsigned char *)&d;
 										for(j=0;j<8;j++)
 											{
@@ -4986,7 +4989,7 @@ for(;;)
 										else
 										{
 										int j;
-		
+
 										for(j=0;j<8;j++)
 											{
 											clone_d[j] = srcdata[7-j];
@@ -5012,13 +5015,13 @@ for(;;)
 										else
 										{
 										int j;
-		
+
 										for(j=0;j<8;j++)
 											{
 											clone_d[j] = srcdata[7-j];
 											}
 										}
-						
+
 									fstVcdID(vcdid_buf, idx+1);
 									wx_len = sprintf(wx_buf, "r%.16g %s\n", d, vcdid_buf);
 									fstWritex(xc, wx_buf, wx_len);
@@ -5026,7 +5029,7 @@ for(;;)
 								}
 							}
 						}
-					}	
+					}
 
 				sig_offs += xc->signal_lens[idx];
 				}
@@ -5059,7 +5062,7 @@ for(;;)
 	if(!chain_cmem) goto block_err;
 	fstReaderFseeko(xc, xc->f, indx_pos, SEEK_SET);
 	fstFread(chain_cmem, chain_clen, 1, xc->f);
-	
+
 	if(vc_maxhandle > vc_maxhandle_largest)
 		{
 		free(chain_table);
@@ -5115,7 +5118,7 @@ for(;;)
 					chain_table[idx++] = 0;
 					}
 				}
-			
+
 			pnt += skiplen;
 			} while (pnt != (chain_cmem + chain_clen));
 		}
@@ -5124,7 +5127,7 @@ for(;;)
 		do	{
 			int skiplen;
 			uint64_t val = fstGetVarint32(pnt, &skiplen);
-		
+
 			if(!val)
 				{
 				pnt += skiplen;
@@ -5133,7 +5136,7 @@ for(;;)
 				chain_table_lengths[idx] = -val;	/* because during this loop iter would give stale data! */
 				idx++;
 				}
-			else 
+			else
 			if(val&1)
 				{
 				pval = chain_table[idx] = pval + (val >> 1);
@@ -5148,7 +5151,7 @@ for(;;)
 					chain_table[idx++] = 0;
 					}
 				}
-			
+
 			pnt += skiplen;
 			} while (pnt != (chain_cmem + chain_clen));
 		}
@@ -5166,7 +5169,7 @@ for(;;)
 			if(((uint32_t)v32) < i) /* sanity check */
 				{
 				chain_table[i] = chain_table[v32];
-				chain_table_lengths[i] = chain_table_lengths[v32];	
+				chain_table_lengths[i] = chain_table_lengths[v32];
 				}
 			}
 		}
@@ -5193,7 +5196,7 @@ for(;;)
 				uint32_t val;
 				uint32_t skiplen;
 				uint32_t tdelta;
-	
+
 				fstReaderFseeko(xc, xc->f, vc_start + chain_table[i], SEEK_SET);
 				val = fstReaderVarint32WithSkip(xc->f, &skiplen);
 				if(val)
@@ -5208,7 +5211,7 @@ for(;;)
 						free(mc_mem);
 						mc_mem = malloc(mc_mem_len = chain_table_lengths[i]);
 						}
-					mc = mc_mem;	
+					mc = mc_mem;
 
 					fstFread(mc, chain_table_lengths[i], 1, xc->f);
 
@@ -5237,13 +5240,13 @@ for(;;)
 					length_remaining[i] = destlen;
 					traversal_mem_offs += destlen;
 					}
-	
+
 				if(rc != Z_OK)
 					{
 					printf("\tfac: %d clen: %d (rc=%d)\n", (int)i, (int)val, rc);
 					exit(255);
 					}
-	
+
 				if(xc->signal_lens[i] == 1)
 					{
 					uint32_t vli = fstGetVarint32NoSkip(mem_for_traversal + headptr[i]);
@@ -5255,7 +5258,7 @@ for(;;)
 					uint32_t vli = fstGetVarint32NoSkip(mem_for_traversal + headptr[i]);
 					tdelta = vli >> 1;
 					}
-	
+
 				scatterptr[i] = tc_head[tdelta];
 				tc_head[tdelta] = i+1;
 				}
@@ -5299,7 +5302,7 @@ for(;;)
 				previous_time = time_table[i];
 				}
 			}
-	
+
 		while(tc_head[i])
 			{
 			idx = tc_head[i] - 1;
@@ -5313,7 +5316,7 @@ for(;;)
 					if(!(vli & 1))
 						{
 						/* tdelta = vli >> 2; */ /* scan-build */
-						val = ((vli >> 1) & 1) | '0'; 
+						val = ((vli >> 1) & 1) | '0';
 						}
 						else
 						{
@@ -5329,7 +5332,7 @@ for(;;)
 						}
 						else
 						{
-						if(fv) 
+						if(fv)
 							{
 							char vcd_id[16];
 							int vcdid_len = fstVcdIDForFwrite(vcd_id+1, idx+1);
@@ -5341,17 +5344,17 @@ for(;;)
 						}
 					headptr[idx] += skiplen;
 					length_remaining[idx] -= skiplen;
-	
+
 					tc_head[i] = scatterptr[idx];
 					scatterptr[idx] = 0;
-		
+
 					if(length_remaining[idx])
 						{
 						int shamt;
 						vli = fstGetVarint32NoSkip(mem_for_traversal + headptr[idx]);
 						shamt = 2 << (vli & 1);
 						tdelta = vli >> shamt;
-	
+
 						scatterptr[idx] = tc_head[i+tdelta];
 						tc_head[i+tdelta] = idx+1;
 						}
@@ -5375,13 +5378,13 @@ for(;;)
 							}
 							else
 							{
-							if(fv) 
+							if(fv)
 								{
 								char vcd_id[16];
 								int vcdid_len;
 
 								vcd_id[0] = 's';
-								fstWritex(xc, vcd_id, 1);	
+								fstWritex(xc, vcd_id, 1);
 
 								vcdid_len = fstVcdIDForFwrite(vcd_id+1, idx+1);
 								{
@@ -5391,7 +5394,7 @@ for(;;)
 								free(vesc);
 								}
 
-								vcd_id[0] = ' ';								
+								vcd_id[0] = ' ';
 								vcd_id[vcdid_len + 1] = '\n';
 								fstWritex(xc, vcd_id, vcdid_len+2);
 								}
@@ -5404,12 +5407,12 @@ for(;;)
 
 					tc_head[i] = scatterptr[idx];
 					scatterptr[idx] = 0;
-	
+
 					if(length_remaining[idx])
 						{
 						vli = fstGetVarint32NoSkip(mem_for_traversal + headptr[idx]);
 						tdelta = vli >> 1;
-	
+
 						scatterptr[idx] = tc_head[i+tdelta];
 						tc_head[i+tdelta] = idx+1;
 						}
@@ -5448,9 +5451,9 @@ for(;;)
 							}
 							else
 							{
-							if(fv)	{ 
+							if(fv)	{
 								unsigned char ch_bp = (xc->signal_typs[idx] != FST_VT_VCD_PORT) ? 'b' : 'p';
-							
+
 								fstWritex(xc, &ch_bp, 1);
 								fstWritex(xc, xc->temp_signal_value_buf, len);
 								}
@@ -5497,7 +5500,7 @@ for(;;)
 							ch = ((vdata[0] >> bit) & 1) | '0';
 							buf[j] = ch;
 							}
-	
+
 						len = 1;
 						srcdata = buf;
 						}
@@ -5517,7 +5520,7 @@ for(;;)
 								else
 								{
 								int j;
-		
+
 								clone_d = (unsigned char *)&d;
 								for(j=0;j<8;j++)
 									{
@@ -5536,7 +5539,7 @@ for(;;)
 								else
 								{
 								int j;
-		
+
 								for(j=0;j<8;j++)
 									{
 									clone_d[j] = srcdata[7-j];
@@ -5561,20 +5564,20 @@ for(;;)
 								else
 								{
 								int j;
-		
+
 								for(j=0;j<8;j++)
 									{
 									clone_d[j] = srcdata[7-j];
 									}
 								}
-						
+
 							wx_len = sprintf(wx_buf, "r%.16g", d);
 							fstWritex(xc, wx_buf, wx_len);
 							}
 						}
 					}
 
-				if(fv) 
+				if(fv)
 					{
 					char vcd_id[16];
 					int vcdid_len = fstVcdIDForFwrite(vcd_id+1, idx+1);
@@ -5589,7 +5592,7 @@ for(;;)
 
 				tc_head[i] = scatterptr[idx];
 				scatterptr[idx] = 0;
-	
+
 				if(length_remaining[idx])
 					{
 					vli = fstGetVarint32NoSkip(mem_for_traversal + headptr[idx]);
@@ -5673,7 +5676,7 @@ if(xc->signal_lens[facidx] == 1)
 				clone_d[j] = srcdata[7-j];
 				}
 			}
-						
+
 		sprintf((char *)buf, "%.16g", d);
 		}
 	}
@@ -5787,7 +5790,7 @@ xc->rvat_beg_tim = beg_tim;
 xc->rvat_end_tim = end_tim;
 
 #ifdef FST_DEBUG
-mem_required_for_traversal = 
+mem_required_for_traversal =
 #endif
 	fstReaderUint64(xc->f);
 
@@ -5813,27 +5816,27 @@ tsec_uclen = fstReaderUint64(xc->f);
 tsec_clen = fstReaderUint64(xc->f);
 tsec_nitems = fstReaderUint64(xc->f);
 #ifdef FST_DEBUG
-fprintf(stderr, "\ttime section unc: %d, com: %d (%d items)\n", 
+fprintf(stderr, "\ttime section unc: %d, com: %d (%d items)\n",
 	(int)tsec_uclen, (int)tsec_clen, (int)tsec_nitems);
-#endif		
+#endif
 ucdata = malloc(tsec_uclen);
 destlen = tsec_uclen;
 sourcelen = tsec_clen;
-	
+
 fstReaderFseeko(xc, xc->f, -24 - ((off_t)tsec_clen), SEEK_CUR);
 if(tsec_uclen != tsec_clen)
 	{
 	cdata = malloc(tsec_clen);
 	fstFread(cdata, tsec_clen, 1, xc->f);
-	
+
 	rc = uncompress(ucdata, &destlen, cdata, sourcelen);
-	                
+
 	if(rc != Z_OK)
 		{
 		printf("tsec uncompress rc = %d\n", rc);
 		exit(255);
 		}
-	
+
 	free(cdata);
 	}
 	else
@@ -5849,7 +5852,7 @@ for(ti=0;ti<tsec_nitems;ti++)
 	int skiplen;
 	uint64_t val = fstGetVarint64(tpnt, &skiplen);
 	tpval = xc->rvat_time_table[ti] = tpval + val;
-	tpnt += skiplen;	
+	tpnt += skiplen;
 	}
 
 free(ucdata);
@@ -5903,7 +5906,7 @@ fprintf(stderr, "\tindx_pos: %d (%d bytes)\n", (int)indx_pos, (int)chain_clen);
 chain_cmem = malloc(chain_clen);
 fstReaderFseeko(xc, xc->f, indx_pos, SEEK_SET);
 fstFread(chain_cmem, chain_clen, 1, xc->f);
-	
+
 xc->rvat_chain_table = calloc((xc->rvat_vc_maxhandle+1), sizeof(off_t));
 xc->rvat_chain_table_lengths = calloc((xc->rvat_vc_maxhandle+1), sizeof(uint32_t));
 
@@ -5923,7 +5926,7 @@ do
                 xc->rvat_chain_table_lengths[idx] = -val;
                 idx++;
                 }
-	else		
+	else
 	if(val&1)
 		{
 		pval = xc->rvat_chain_table[idx] = pval + (val >> 1);
@@ -5938,11 +5941,11 @@ do
 			xc->rvat_chain_table[idx++] = 0;
 			}
 		}
-		
+
 	pnt += skiplen;
 	} while (pnt != (chain_cmem + chain_clen));
 
-free(chain_cmem); 
+free(chain_cmem);
 xc->rvat_chain_table[idx] = indx_pos - xc->rvat_vc_start;
 xc->rvat_chain_table_lengths[pidx] = xc->rvat_chain_table[idx] - xc->rvat_chain_table[pidx];
 
@@ -5967,7 +5970,7 @@ fprintf(stderr, "\tdecompressed chain idx len: %"PRIu32"\n", idx);
 
 xc->rvat_data_valid = 1;
 
-/* all data at this point is loaded or resident in fst cache, process and return appropriate value */ 
+/* all data at this point is loaded or resident in fst cache, process and return appropriate value */
 process_value:
 if(facidx > xc->rvat_vc_maxhandle)
 	{
@@ -6005,17 +6008,17 @@ if(!xc->rvat_chain_mem)
 		unsigned long destlen = xc->rvat_chain_len;
 		unsigned long sourcelen = xc->rvat_chain_table_lengths[facidx];
 		int rc;
-		
+
 		fstFread(mc, xc->rvat_chain_table_lengths[facidx], 1, xc->f);
 		rc = uncompress(mu, &destlen, mc, sourcelen);
 		free(mc);
-	
+
 		if(rc != Z_OK)
 			{
 			printf("\tclen: %d (rc=%d)\n", (int)xc->rvat_chain_len, rc);
 			exit(255);
 			}
-	
+
 		/* data to process is for(j=0;j<destlen;j++) in mu[j] */
 		xc->rvat_chain_mem = mu;
 		}
@@ -6029,7 +6032,7 @@ if(!xc->rvat_chain_mem)
 		}
 
 	xc->rvat_chain_facidx = facidx;
-	}	
+	}
 
 /* process value chain here */
 
@@ -6085,7 +6088,7 @@ if(xc->signal_lens[facidx] == 1)
 
 		if(!(pvli & 1))
 			{
-			buf[0] = ((pvli >> 1) & 1) | '0'; 
+			buf[0] = ((pvli >> 1) & 1) | '0';
 			}
 			else
 			{
@@ -6186,7 +6189,7 @@ if(xc->signal_lens[facidx] == 1)
 					ch = ((vdata[0] >> bit) & 1) | '0';
 					bufd[j] = ch;
 					}
-	
+
 				srcdata = bufd;
 				}
 				else
@@ -6216,7 +6219,7 @@ if(xc->signal_lens[facidx] == 1)
 		{
 		return(fstExtractRvatDataFromFrame(xc, facidx, buf));
 		}
-        }               
+        }
 }
 
 /* return(NULL); */
@@ -6243,16 +6246,16 @@ For every delta with one or two bits set, and the deltas of all three
   have at least 1/4 probability of changing.
 * If mix() is run forward, every bit of c will change between 1/3 and
   2/3 of the time.  (Well, 22/100 and 78/100 for some 2-bit deltas.)
-mix() was built out of 36 single-cycle latency instructions in a 
+mix() was built out of 36 single-cycle latency instructions in a
   structure that could supported 2x parallelism, like so:
-      a -= b; 
+      a -= b;
       a -= c; x = (c>>13);
       b -= c; a ^= x;
       b -= a; x = (a<<8);
       c -= a; b ^= x;
       c -= b; x = (b>>13);
       ...
-  Unfortunately, superscalar Pentiums and Sparcs can't take advantage 
+  Unfortunately, superscalar Pentiums and Sparcs can't take advantage
   of that parallelism.  They've also turned some of those single-cycle
   latency instructions into multi-cycle latency instructions.  Still,
   this is the fastest good hash I could find.  There were about 2^^68
@@ -6393,8 +6396,8 @@ while(chain)
 
 chain = calloc(1, sizeof(struct collchain_t) + length - 1);
 memcpy(chain->mem, mem, length);
-chain->fullhash = hf;	
-chain->length = length;	
+chain->fullhash = hf;
+chain->length = length;
 chain->next = ar[h];
 ar[h] = chain;
 return(&(chain->payload));
diff --git a/src/helpers/fst/fstapi.h b/src/helpers/fst/fstapi.h
index d45a389..bc02f66 100644
--- a/src/helpers/fst/fstapi.h
+++ b/src/helpers/fst/fstapi.h
@@ -51,7 +51,7 @@ enum fstFileType {
 
     FST_FT_VERILOG             = 0,
     FST_FT_VHDL                = 1,
-    FST_FT_VERILOG_VHDL        = 2, 
+    FST_FT_VERILOG_VHDL        = 2,
 
     FST_FT_MAX                 = 2
 };
@@ -118,7 +118,7 @@ enum fstVarType {
     FST_VT_VCD_REG             = 5,
     FST_VT_VCD_SUPPLY0         = 6,
     FST_VT_VCD_SUPPLY1         = 7,
-    FST_VT_VCD_TIME            = 8,  
+    FST_VT_VCD_TIME            = 8,
     FST_VT_VCD_TRI             = 9,
     FST_VT_VCD_TRIAND          = 10,
     FST_VT_VCD_TRIOR           = 11,
diff --git a/src/helpers/fst2vcd.c b/src/helpers/fst2vcd.c
index f20ab03..6b4c397 100644
--- a/src/helpers/fst2vcd.c
+++ b/src/helpers/fst2vcd.c
@@ -32,7 +32,7 @@
 #define FST_VCD_WRITE_BUF_SIZ (2 * 1024 * 1024)
 
 void print_help(char *nam)
-{ 
+{
 #ifdef __linux__
 printf(
 "Usage: %s [OPTION]... [FSTFILE]\n\n"
@@ -74,23 +74,23 @@ while (1)
         {
 #ifdef __linux__
         int option_index = 0;
-                        
+
         static struct option long_options[] =
                 {
 		{"extensions", 0, 0, 'e'},
 		{"fstname", 1, 0, 'f'},
 		{"output", 1, 0, 'o'},
                 {"help", 0, 0, 'h'},
-                {0, 0, 0, 0}  
+                {0, 0, 0, 0}
                 };
-                
+
         c = getopt_long (argc, argv, "ef:o:h", long_options, &option_index);
 #else
         c = getopt      (argc, argv, "ef:o:h");
 #endif
-                        
+
         if (c == -1) break;     /* no more args */
-                        
+
         switch (c)
                 {
 		case 'e':
@@ -112,24 +112,24 @@ while (1)
                 case 'h':
 			print_help(argv[0]);
                         break;
-                        
+
                 case '?':
                         opt_errors_encountered=1;
                         break;
-                        
+
                 default:
                         /* unreachable */
                         break;
                 }
         }
-                        
+
 if(opt_errors_encountered)
         {
         print_help(argv[0]);
         }
 
 if (optind < argc)
-        {               
+        {
         while (optind < argc)
                 {
                 if(!fstname)
@@ -143,7 +143,7 @@ if (optind < argc)
 			}
                 }
         }
-                        
+
 if(!fstname)
         {
         print_help(argv[0]);
@@ -166,7 +166,7 @@ if(outname)
 		fprintf(stderr, "Could not open '%s', exiting.\n", outname);
 		perror("Why");
 		exit(255);
-		}	
+		}
 	fvbuf = malloc(FST_VCD_WRITE_BUF_SIZ);
 	setvbuf(fv, fvbuf, _IOFBF, FST_VCD_WRITE_BUF_SIZ);
 	}
diff --git a/src/helpers/fstminer.c b/src/helpers/fstminer.c
index c633362..04d2e0a 100644
--- a/src/helpers/fstminer.c
+++ b/src/helpers/fstminer.c
@@ -47,7 +47,7 @@ while(*s)
 	char ch = *(s++);
 	if(ch != ' ')
 		{
-		*(d++) = ch;		
+		*(d++) = ch;
 		}
 	}
 *d = 0;
@@ -76,7 +76,7 @@ while((h = fstReaderIterateHier(xc)))
 				{
 				long new_allocated_scopes = allocated_scopes * 2;
 				char **scope_names_2 = calloc(new_allocated_scopes, sizeof(char *));
-			
+
 				memcpy(scope_names_2, scope_names, allocated_scopes * sizeof(char *));
 				free(scope_names);
 
@@ -182,7 +182,7 @@ lt=fstReaderOpen(fname);
 if(lt)
 	{
 	int numfacs;
-	
+
 	numfacs = fstReaderGetVarCount(lt) + 1;
 	killed_list = calloc(numfacs, sizeof(char));
 
@@ -218,7 +218,7 @@ return(0);
 
 void print_help(char *nam)
 {
-#ifdef __linux__ 
+#ifdef __linux__
 printf(
 "Usage: %s [OPTION]... [FSTFILE]\n\n"
 "  -d, --dumpfile=FILE        specify FST input dumpfile\n"
@@ -262,7 +262,7 @@ while (1)
         {
 #ifdef __linux__
         int option_index = 0;
-                        
+
         static struct option long_options[] =
                 {
 		{"dumpfile", 1, 0, 'd'},
@@ -271,16 +271,16 @@ while (1)
 		{"namesonly", 0, 0, 'n'},
 		{"comprehensive", 0, 0, 'c'},
                 {"help", 0, 0, 'h'},
-                {0, 0, 0, 0}  
+                {0, 0, 0, 0}
                 };
-                
+
         c = getopt_long (argc, argv, "d:m:x:nch", long_options, &option_index);
 #else
         c = getopt      (argc, argv, "d:m:x:nch");
 #endif
-                        
+
         if (c == -1) break;     /* no more args */
-                        
+
         switch (c)
                 {
 		case 'c':
@@ -347,29 +347,29 @@ while (1)
                 case 'h':
 			print_help(argv[0]);
                         break;
-                        
+
                 case '?':
                         opt_errors_encountered=1;
                         break;
-                        
+
                 default:
                         /* unreachable */
                         break;
                 }
         }
 
-if(!names_only && comprehensive) 
+if(!names_only && comprehensive)
 	{
 	killed_value = 0;
 	}
-                        
+
 if(opt_errors_encountered)
         {
         print_help(argv[0]);
         }
 
 if (optind < argc)
-        {               
+        {
         while (optind < argc)
                 {
                 if(lxname)
@@ -380,7 +380,7 @@ if (optind < argc)
                 strcpy(lxname, argv[optind++]);
                 }
         }
-                        
+
 if(!lxname)
         {
         print_help(argv[0]);
diff --git a/src/helpers/ghwdump.c b/src/helpers/ghwdump.c
index 9d708e6..6dbf4ab 100644
--- a/src/helpers/ghwdump.c
+++ b/src/helpers/ghwdump.c
@@ -157,7 +157,7 @@ main (int argc, char **argv)
 	    {
 	      int ix;
 	      printf ("String table:\n");
-	      
+
 	      for (ix = 1; ix < hp->nbr_str; ix++)
 		printf (" %s\n", hp->str_table[ix]);
 	    }
@@ -165,7 +165,7 @@ main (int argc, char **argv)
 	    ghw_disp_types (hp);
 	  if (flag_disp_hierarchy)
 	    ghw_disp_hie (hp, hp->hie);
-	  
+
 #if 1
 	  sm = ghw_sm_init;
 	  eof = 0;
@@ -187,7 +187,7 @@ main (int argc, char **argv)
 		  abort ();
 		}
 	    }
-	  
+
 #else
 	  if (ghw_read_dump (hp) < 0)
 	    {
diff --git a/src/helpers/lxt2_read.c b/src/helpers/lxt2_read.c
index 88a6730..be10fc5 100644
--- a/src/helpers/lxt2_read.c
+++ b/src/helpers/lxt2_read.c
@@ -35,13 +35,13 @@
  * since we'll never read a 24-bit int at the very start of a file which
  * means that we'll have a 32-bit word that we can read.
  */
-   
+
 #define lxt2_rd_get_byte(mm,offset)    ((unsigned int)(*((unsigned char *)(mm)+(offset))))
 #define lxt2_rd_get_16(mm,offset)      ((unsigned int)(*((unsigned short *)(((unsigned char *)(mm))+(offset)))))
 #define lxt2_rd_get_32(mm,offset)      (*(unsigned int *)(((unsigned char *)(mm))+(offset)))
 #define lxt2_rd_get_24(mm,offset)      ((lxt2_rd_get_32((mm),(offset)-1)<<8)>>8)
 #define lxt2_rd_get_64(mm,offset)      ((((lxtint64_t)lxt2_rd_get_32((mm),(offset)))<<32)|((lxtint64_t)lxt2_rd_get_32((mm),(offset)+4)))
- 
+
 #else
 
 /*
@@ -119,7 +119,7 @@ return((x * 0x01010101) >> 24);
 
 /*
  * total zero count to the right of the first rightmost one bit
- * encountered.  its intended use is to 
+ * encountered.  its intended use is to
  * "return the bitposition of the least significant 1 in a granmsk_t"
  * (use x &= ~(x&-x) to clear out that bit quickly)
  */
@@ -138,14 +138,14 @@ static char *lxt2_rd_expand_integer_to_bits(int len, unsigned int value)
 {
 static char s[33];
 char *p = s;
-int i;                          
+int i;
 int len2 = len-1;
 
 for(i=0;i<len;i++)
-        {        
+        {
         *(p++) = '0' | ((value & (1<<(len2-i)))!=0);
         }
-*p = 0;  
+*p = 0;
 
 return(s);
 }
@@ -192,7 +192,7 @@ while((top_elem = lt->radix_sort[which_time]))
 		case 1:	vch = lxt2_rd_get_byte(lt->fac_curpos[idx], 0); break;
 		case 2:	vch = lxt2_rd_get_16(lt->fac_curpos[idx], 0); break;
 		case 3:	vch = lxt2_rd_get_24(lt->fac_curpos[idx], 0); break;
-		case 4:	
+		case 4:
 		default:
 			vch = lxt2_rd_get_32(lt->fac_curpos[idx], 0); break;
 		}
@@ -214,33 +214,33 @@ while((top_elem = lt->radix_sort[which_time]))
         	case LXT2_RD_ENC_INV:	for(i=0;i<lt->len[idx];i++) { lt->value[idx][i] ^= 1; } break;
 
         	case LXT2_RD_ENC_LSH0:
-        	case LXT2_RD_ENC_LSH1:	memmove(lt->value[idx], lt->value[idx]+1, lt->len[idx]-1); 
-					lt->value[idx][lt->len[idx]-1] = '0'+(vch-LXT2_RD_ENC_LSH0); 
+        	case LXT2_RD_ENC_LSH1:	memmove(lt->value[idx], lt->value[idx]+1, lt->len[idx]-1);
+					lt->value[idx][lt->len[idx]-1] = '0'+(vch-LXT2_RD_ENC_LSH0);
 					break;
 
         	case LXT2_RD_ENC_RSH0:
-        	case LXT2_RD_ENC_RSH1:	memmove(lt->value[idx]+1, lt->value[idx], lt->len[idx]-1); 
-					lt->value[idx][0] = '0'+(vch-LXT2_RD_ENC_RSH0); 
+        	case LXT2_RD_ENC_RSH1:	memmove(lt->value[idx]+1, lt->value[idx], lt->len[idx]-1);
+					lt->value[idx][0] = '0'+(vch-LXT2_RD_ENC_RSH0);
 					break;
 
 		case LXT2_RD_ENC_ADD1:
 		case LXT2_RD_ENC_ADD2:
 		case LXT2_RD_ENC_ADD3:
-        	case LXT2_RD_ENC_ADD4:	x=lxt2_rd_expand_bits_to_integer(lt->len[idx], lt->value[idx]); x+= (vch-LXT2_RD_ENC_ADD1+1); 
+        	case LXT2_RD_ENC_ADD4:	x=lxt2_rd_expand_bits_to_integer(lt->len[idx], lt->value[idx]); x+= (vch-LXT2_RD_ENC_ADD1+1);
 					memcpy(lt->value[idx], lxt2_rd_expand_integer_to_bits(lt->len[idx], x), lt->len[idx]); break;
 
 		case LXT2_RD_ENC_SUB1:
 		case LXT2_RD_ENC_SUB2:
 		case LXT2_RD_ENC_SUB3:
-        	case LXT2_RD_ENC_SUB4:	x=lxt2_rd_expand_bits_to_integer(lt->len[idx], lt->value[idx]); x-= (vch-LXT2_RD_ENC_SUB1+1); 
+        	case LXT2_RD_ENC_SUB4:	x=lxt2_rd_expand_bits_to_integer(lt->len[idx], lt->value[idx]); x-= (vch-LXT2_RD_ENC_SUB1+1);
 					memcpy(lt->value[idx], lxt2_rd_expand_integer_to_bits(lt->len[idx], x), lt->len[idx]); break;
 
         	case LXT2_RD_ENC_X:	memset(lt->value[idx], 'x', lt->len[idx]); break;
         	case LXT2_RD_ENC_Z:	memset(lt->value[idx], 'z', lt->len[idx]); break;
 
-		case LXT2_RD_ENC_BLACKOUT:	
+		case LXT2_RD_ENC_BLACKOUT:
 					lt->value[idx][0] = 0; break;
-		
+
 		default:		vch -= LXT2_RD_DICT_START;
 					if(vch >= b->num_dict_entries)
 						{
@@ -269,12 +269,12 @@ while((top_elem = lt->radix_sort[which_time]))
 						}
 					else
 						{
-						fprintf(stderr, LXT2_RDLOAD"Internal error "LXT2_RD_LD" ('%s') vs %d ('%s')\n", 
-							lt->len[idx], lt->value[idx], 
+						fprintf(stderr, LXT2_RDLOAD"Internal error "LXT2_RD_LD" ('%s') vs %d ('%s')\n",
+							lt->len[idx], lt->value[idx],
 							b->string_lens[vch], b->string_pointers[vch]);
 						exit(255);
 						}
-					
+
 					break;
 		}
 
@@ -307,7 +307,7 @@ void lxt2_rd_iter_radix0(struct lxt2_rd_trace *lt, struct lxt2_rd_block *b, lxti
 		case 1:	vch = lxt2_rd_get_byte(lt->fac_curpos[idx], 0); break;
 		case 2:	vch = lxt2_rd_get_16(lt->fac_curpos[idx], 0); break;
 		case 3:	vch = lxt2_rd_get_24(lt->fac_curpos[idx], 0); break;
-		case 4:	
+		case 4:
 		default:
 			vch = lxt2_rd_get_32(lt->fac_curpos[idx], 0); break;
 		}
@@ -376,10 +376,10 @@ void lxt2_rd_iter_radix0(struct lxt2_rd_trace *lt, struct lxt2_rd_block *b, lxti
 						}
 					break;
 
-		case LXT2_RD_ENC_BLACKOUT:	
+		case LXT2_RD_ENC_BLACKOUT:
 					if(lt->value[idx])
 						{
-						lt->value[idx][0] = 0; 
+						lt->value[idx][0] = 0;
 						uniq=1;
 						}
 					break;
@@ -442,12 +442,12 @@ void lxt2_rd_iter_radix0(struct lxt2_rd_trace *lt, struct lxt2_rd_block *b, lxti
 						}
 					else
 						{
-						fprintf(stderr, LXT2_RDLOAD"Internal error "LXT2_RD_LD" ('%s') vs %d ('%s')\n", 
-							lt->len[idx], lt->value[idx], 
+						fprintf(stderr, LXT2_RDLOAD"Internal error "LXT2_RD_LD" ('%s') vs %d ('%s')\n",
+							lt->len[idx], lt->value[idx],
 							b->string_lens[vch], b->string_pointers[vch]);
 						exit(255);
 						}
-					
+
 					break;
 		}
 
@@ -499,7 +499,7 @@ for(i=strtfac;i<endfac;i++)
 				lt->fac_map[i] = x;
 				if(!x) continue;
 				}
-		
+
 			offset = lxt2_rd_tzc(x);			/* get "which time" bucket number of new least sig one bit */
 			lt->next_radix[i] = lt->radix_sort[offset];	/* insert item into head of radix sorted "which time" buckets */
 			lt->radix_sort[offset] = &lt->next_radix[i];
@@ -531,7 +531,7 @@ if((lt)&&(lt->process_mask_dirty))
 			{
 			lim = i+LXT2_RD_PARTIAL_SIZE;
 			}
-	
+
 		lt->process_mask_compressed[idx] = 0;
 		for(j=i;j<lim;j++)
 			{
@@ -686,7 +686,7 @@ while(((sect_typ=*pnt) == LXT2_RD_GRAN_SECT_TIME)||(sect_typ == LXT2_RD_GRAN_SEC
 			case 1: mskindx = lxt2_rd_get_byte(pnt, 0); break;
 			case 2: mskindx = lxt2_rd_get_16(pnt, 0); break;
 			case 3: mskindx = lxt2_rd_get_24(pnt, 0); break;
-			case 4: 
+			case 4:
 			default:
 				mskindx = lxt2_rd_get_32(pnt, 0); break;
 			}
@@ -774,7 +774,7 @@ if(!(lt->handle=fopen(name, "rb")))
 	if(!fread(&id, 2, 1, lt->handle)) { id = 0; }
 	if(!fread(&version, 2, 1, lt->handle)) { id = 0; }
 	if(!fread(&lt->granule_size, 1, 1, lt->handle)) { id = 0; }
-	
+
 	if(lxt2_rd_get_16(&id,0) != LXT2_RD_HDRID)
 		{
 		fprintf(stderr, LXT2_RDLOAD"*** Not an lxt file ***\n");
@@ -808,7 +808,7 @@ if(!(lt->handle=fopen(name, "rb")))
 
                 if(!lt->numfacs)
                         {
-                        lxtint32_t num_expansion_bytes;          
+                        lxtint32_t num_expansion_bytes;
 
                         rcf = fread(&num_expansion_bytes, 4, 1, lt->handle); num_expansion_bytes = rcf ? lxt2_rd_get_32(&num_expansion_bytes,0) : 0;
                         rcf = fread(&lt->numfacs, 4, 1, lt->handle); lt->numfacs = rcf ? lxt2_rd_get_32(&lt->numfacs,0) : 0;
@@ -816,12 +816,12 @@ if(!(lt->handle=fopen(name, "rb")))
                                 {
                                 rcf = fread(&lt->timezero, 8, 1, lt->handle); lt->timezero = rcf ? lxt2_rd_get_64(&lt->timezero,0) : 0;
                                 if(num_expansion_bytes > 8)
-                                        {   
+                                        {
                                         /* future version? */
                                         fseeko(lt->handle, num_expansion_bytes - 8, SEEK_CUR);
                                         }
                                 }
-                                else                  
+                                else
                                 {
                                 /* malformed */
                                 fseeko(lt->handle, num_expansion_bytes, SEEK_CUR);
@@ -855,37 +855,37 @@ if(!(lt->handle=fopen(name, "rb")))
 			m=(char *)malloc(lt->zfacname_predec_size);
 			rc=gzread(lt->zhandle, m, lt->zfacname_predec_size);
 			gzclose(lt->zhandle); lt->zhandle=NULL;
-	
+
 			if(rc!=lt->zfacname_predec_size)
 				{
 				fprintf(stderr, LXT2_RDLOAD"*** name section mangled %d (act) vs "LXT2_RD_LD" (exp)\n", rc, lt->zfacname_predec_size);
 				free(m);
-	
+
 				lxt2_rd_close(lt);
 			        lt=NULL;
 				return(lt);
 				}
-	
+
 			lt->zfacnames = m;
 
         	        lt->faccache = calloc(1, sizeof(struct lxt2_rd_facname_cache));
         	        lt->faccache->old_facidx = lt->numfacs;   /* causes lxt2_rd_get_facname to initialize its unroll ptr as this is always invalid */
         	        lt->faccache->bufcurr = malloc(lt->longestname+1);
 	                lt->faccache->bufprev = malloc(lt->longestname+1);
-	
+
 			fseeko(lt->handle, pos = pos+lt->zfacnamesize, SEEK_SET);
 			/* fprintf(stderr, LXT2_RDLOAD"seeking to geometry at %d (0x%08x)\n", pos, pos); */
 			lt->zhandle = gzdopen(dup(fileno(lt->handle)), "rb");
-	
+
 			t = lt->numfacs * 4 * sizeof(lxtint32_t);
-			m=(char *)malloc(t);				
+			m=(char *)malloc(t);
 			rc=gzread(lt->zhandle, m, t);
 			gzclose(lt->zhandle); lt->zhandle=NULL;
 			if(rc!=t)
 				{
 				fprintf(stderr, LXT2_RDLOAD"*** geometry section mangled %d (act) vs %d (exp)\n", rc, t);
 				free(m);
-	
+
 				lxt2_rd_close(lt);
 			        lt=NULL;
 				return(lt);
@@ -907,7 +907,7 @@ if(!(lt->handle=fopen(name, "rb")))
 				lt->msb[i] = lxt2_rd_get_32(m+i*16, 4);
 				lt->lsb[i] = lxt2_rd_get_32(m+i*16, 8);
 				lt->flags[i] = lxt2_rd_get_32(m+i*16, 12);
-	
+
 				if(!(lt->flags[i] & LXT2_RD_SYM_F_INTEGER))
 					{
 					lt->len[i] = (lt->msb[i] <= lt->lsb[i]) ? (lt->lsb[i] - lt->msb[i] + 1) : (lt->msb[i] - lt->lsb[i] + 1);
@@ -939,12 +939,12 @@ if(!(lt->handle=fopen(name, "rb")))
 				fseeko(lt->handle, 0L, SEEK_END);
 				fend=ftello(lt->handle);
 				if(pos>=fend) break;
-	
+
 				fseeko(lt->handle, pos, SEEK_SET);
 				/* fprintf(stderr, LXT2_RDLOAD"seeking to block at %d (0x%08x)\n", pos, pos); */
 
 				b=calloc(1, sizeof(struct lxt2_rd_block));
-		
+
 				rcf = fread(&b->uncompressed_siz, 4, 1, lt->handle);	b->uncompressed_siz = rcf ? lxt2_rd_get_32(&b->uncompressed_siz,0) : 0;
 				rcf = fread(&b->compressed_siz, 4, 1, lt->handle);	b->compressed_siz = rcf ? lxt2_rd_get_32(&b->compressed_siz,0) : 0;
 				rcf = fread(&b->start, 8, 1, lt->handle);		b->start = rcf ? lxt2_rd_get_64(&b->start,0) : 0;
@@ -958,9 +958,9 @@ if(!(lt->handle=fopen(name, "rb")))
 					break;
 					}
 
-				b->filepos = pos; /* mark startpos for later in case we purge it from memory */	
+				b->filepos = pos; /* mark startpos for later in case we purge it from memory */
 				/* fprintf(stderr, LXT2_RDLOAD"un/compressed size: %d/%d\n", b->uncompressed_siz, b->compressed_siz); */
-	
+
 				if((b->uncompressed_siz)&&(b->compressed_siz)&&(b->end))
 					{
 					/* fprintf(stderr, LXT2_RDLOAD"block [%d] %lld / %lld\n", lt->numblocks, b->start, b->end); */
@@ -978,21 +978,21 @@ if(!(lt->handle=fopen(name, "rb")))
 						lt->block_head = lt->block_curr = b;
 						lt->start = b->start;
 						lt->end = b->end;
-						}			
+						}
 					}
 					else
 					{
 					free(b);
 					break;
 					}
-	
+
 				pos+=b->compressed_siz;
 				}
 
 			if(lt->numblocks)
 				{
 				fprintf(stderr, LXT2_RDLOAD"Read %d block header%s OK\n", lt->numblocks, (lt->numblocks!=1) ? "s" : "");
-	
+
 				fprintf(stderr, LXT2_RDLOAD"["LXT2_RD_LLD"] start time\n", lt->start);
 				fprintf(stderr, LXT2_RDLOAD"["LXT2_RD_LLD"] end time\n", lt->end);
 				fprintf(stderr, LXT2_RDLOAD"\n");
@@ -1038,8 +1038,8 @@ if(lt)
 	for(i=0;i<lt->numfacs;i++)
 		{
 		if(lt->value[i])
-			{		
-			free(lt->value[i]); lt->value[i]=NULL; 
+			{
+			free(lt->value[i]); lt->value[i]=NULL;
 			}
 		}
 
@@ -1076,13 +1076,13 @@ if(lt)
 
 	if(lt->zhandle) { gzclose(lt->zhandle); lt->zhandle=NULL; }
 	if(lt->handle) { fclose(lt->handle); lt->handle=NULL; }
-	free(lt);	
+	free(lt);
 	}
 }
 
 /****************************************************************************/
 
-/* 
+/*
  * return number of facs in trace
  */
 _LXT2_RD_INLINE lxtint32_t lxt2_rd_get_num_facs(struct lxt2_rd_trace *lt)
@@ -1098,11 +1098,11 @@ struct lxt2_rd_geometry *lxt2_rd_get_fac_geometry(struct lxt2_rd_trace *lt, lxti
 {
 if((lt)&&(facidx<lt->numfacs))
 	{
-	lt->geometry.rows = lt->rows[facidx];	
-	lt->geometry.msb = lt->msb[facidx];	
-	lt->geometry.lsb = lt->lsb[facidx];	
-	lt->geometry.flags = lt->flags[facidx];	
-	lt->geometry.len = lt->len[facidx];	
+	lt->geometry.rows = lt->rows[facidx];
+	lt->geometry.msb = lt->msb[facidx];
+	lt->geometry.lsb = lt->lsb[facidx];
+	lt->geometry.flags = lt->flags[facidx];
+	lt->geometry.len = lt->len[facidx];
 	return(&lt->geometry);
 	}
 	else
@@ -1199,7 +1199,7 @@ if((lt)&&(facidx<lt->numfacs))
 
 /*
  * time queries
- */ 
+ */
 _LXT2_RD_INLINE lxtint64_t lxt2_rd_get_start_time(struct lxt2_rd_trace *lt)
 {
 return(lt ? lt->start : LXT2_RD_GRAN_0VAL);
@@ -1220,7 +1220,7 @@ return(lt ? lt->timescale : 0);
 
 _LXT2_RD_INLINE lxtsint64_t lxt2_rd_get_timezero(struct lxt2_rd_trace *lt)
 {
-return(lt ? lt->timezero : 0);              
+return(lt ? lt->timezero : 0);
 }
 
 
@@ -1242,8 +1242,8 @@ if(lt)
 		if(!facidx)
 			{
 			lt->faccache->n = lt->zfacnames;
-			lt->faccache->bufcurr[0] = 0;			
-			lt->faccache->bufprev[0] = 0;			
+			lt->faccache->bufcurr[0] = 0;
+			lt->faccache->bufprev[0] = 0;
 			}
 
 		if(facidx!=lt->numfacs)
@@ -1272,7 +1272,7 @@ if(lt)
 		else
 		{
 		if(facidx<lt->numfacs)
-			{		
+			{
 			int strt;
 
 			if(facidx==lt->faccache->old_facidx)
@@ -1293,7 +1293,7 @@ if(lt)
 				{
 				lxt2_rd_get_facname(lt, j);
 				}
-	
+
 			return(lxt2_rd_get_facname(lt, j));
 			}
 		}
@@ -1451,7 +1451,7 @@ return(blk);
  * merely caches the FIRST set of blocks which fit in lt->block_mem_max.
  * n.b., returns number of blocks processed
  */
-int lxt2_rd_iter_blocks(struct lxt2_rd_trace *lt, 
+int lxt2_rd_iter_blocks(struct lxt2_rd_trace *lt,
 	void (*value_change_callback)(struct lxt2_rd_trace **lt, lxtint64_t *time, lxtint32_t *facidx, char **value),
 	void *user_callback_data_pointer)
 {
@@ -1466,7 +1466,7 @@ int i;
 
 if(lt)
 	{
-	lt->value_change_callback = value_change_callback ? value_change_callback : lxt2_rd_null_callback; 
+	lt->value_change_callback = value_change_callback ? value_change_callback : lxt2_rd_null_callback;
 	lt->user_callback_data_pointer = user_callback_data_pointer;
 
 	b = lt->block_head;
@@ -1515,7 +1515,7 @@ if(lt)
 					{
 					size_t rcf;
 
-					clen = unclen = iter = 0;				
+					clen = unclen = iter = 0;
 					rcf = fread(&clen, 4, 1, lt->handle);	clen = rcf ? lxt2_rd_get_32(&clen,0) : 0;
 					rcf = fread(&unclen, 4, 1, lt->handle);	unclen = rcf ? lxt2_rd_get_32(&unclen,0) : 0;
 					rcf = fread(&iter, 4, 1, lt->handle);	iter = rcf ? lxt2_rd_get_32(&iter,0) : 0;
@@ -1629,7 +1629,7 @@ return(blk);
 
 /*
  * callback access to the user callback data pointer (if required)
- */ 
+ */
 _LXT2_RD_INLINE void *lxt2_rd_get_user_callback_data_pointer(struct lxt2_rd_trace *lt)
 {
 if(lt)
@@ -1669,12 +1669,12 @@ if(lt)
 		{
 		switch(state)
 			{
-			case 0: if(b->end >= strt_time) 
+			case 0: if(b->end >= strt_time)
 					{
 					state = 1;
 					if((b->start > strt_time) && (bprev))
 						{
-						bprev->exclude_block = 0;	
+						bprev->exclude_block = 0;
 						blk++;
 						}
 					}
diff --git a/src/helpers/lxt2_read.h b/src/helpers/lxt2_read.h
index 99936ad..e6b874d 100644
--- a/src/helpers/lxt2_read.h
+++ b/src/helpers/lxt2_read.h
@@ -83,7 +83,7 @@ typedef uint64_t	 	lxtint64_t;
 typedef int32_t			lxtsint32_t;
 typedef int64_t			lxtsint64_t;
 #ifndef __MINGW32__
-#define LXT2_RD_LLD "%"PRId64   
+#define LXT2_RD_LLD "%"PRId64
 #define LXT2_RD_LD "%"PRId32
 #else
 #define LXT2_RD_LLD "%I64d"
@@ -163,7 +163,7 @@ enum LXT2_RD_Encodings {
         LXT2_RD_ENC_SUB4,
 
         LXT2_RD_ENC_X,
-        LXT2_RD_ENC_Z, 
+        LXT2_RD_ENC_Z,
 
 	LXT2_RD_ENC_BLACKOUT,
 
@@ -201,7 +201,7 @@ lxtint32_t flags, len;
 };
 
 
-struct lxt2_rd_facname_cache 
+struct lxt2_rd_facname_cache
 {
 char *n;
 char *bufprev, *bufcurr;
@@ -213,7 +213,7 @@ lxtint32_t old_facidx;
 struct lxt2_rd_trace
 {
 lxtint32_t *rows;
-lxtsint32_t *msb, *lsb; 
+lxtsint32_t *msb, *lsb;
 lxtint32_t *flags, *len;
 char **value;
 
@@ -292,7 +292,7 @@ _LXT2_RD_INLINE int		lxt2_rd_set_fac_process_mask_all(struct lxt2_rd_trace *lt);
 _LXT2_RD_INLINE int		lxt2_rd_clr_fac_process_mask_all(struct lxt2_rd_trace *lt);
 
 				/* null value_change_callback calls an empty dummy function */
-int 				lxt2_rd_iter_blocks(struct lxt2_rd_trace *lt, 
+int 				lxt2_rd_iter_blocks(struct lxt2_rd_trace *lt,
 				void (*value_change_callback)(struct lxt2_rd_trace **lt, lxtint64_t *time, lxtint32_t *facidx, char **value),
 				void *user_callback_data_pointer);
 _LXT2_RD_INLINE void *		lxt2_rd_get_user_callback_data_pointer(struct lxt2_rd_trace *lt);
diff --git a/src/helpers/lxt2_write.c b/src/helpers/lxt2_write.c
index c53854d..38b11f6 100644
--- a/src/helpers/lxt2_write.c
+++ b/src/helpers/lxt2_write.c
@@ -30,18 +30,18 @@
 
 static char *lxt2_wr_vcd_truncate_bitvec(char *s)
 {
-char l, r;  
+char l, r;
 
 r=*s;
-if(r=='1')   
+if(r=='1')
         {
         return s;
-        } 
+        }
         else
         {
         s++;
         }
-         
+
 for(;;s++)
         {
         l=r; r=*s;
@@ -50,7 +50,7 @@ for(;;s++)
         if(l!=r)
                 {
                 return(((l=='0')&&(r=='1'))?s:s-1);
-                } 
+                }
         }
 }
 
@@ -155,7 +155,7 @@ static lxt2_wr_ds_Tree * lxt2_wr_ds_insert(granmsk_t i, lxt2_wr_ds_Tree * t, int
 /* Insert i into the tree t, unless it's already there.    */
 /* Return a pointer to the resulting tree.                 */
     lxt2_wr_ds_Tree * n;
-    
+
     n = (lxt2_wr_ds_Tree *) calloc (1, sizeof (lxt2_wr_ds_Tree));
     if (n == NULL) {
 	fprintf(stderr, "ds_insert: ran out of memory, exiting.\n");
@@ -245,7 +245,7 @@ static lxt2_wr_dslxt_Tree * lxt2_wr_dslxt_insert(char *i, lxt2_wr_dslxt_Tree * t
 /* Return a pointer to the resulting tree.                 */
     lxt2_wr_dslxt_Tree * n;
     int dir;
-    
+
     n = (lxt2_wr_dslxt_Tree *) calloc (1, sizeof (lxt2_wr_dslxt_Tree));
     if (n == NULL) {
 	fprintf(stderr, "dslxt_insert: ran out of memory, exiting.\n");
@@ -281,7 +281,7 @@ static lxt2_wr_dslxt_Tree * lxt2_wr_dslxt_insert(char *i, lxt2_wr_dslxt_Tree * t
 /*
  * functions which emit various big endian
  * data to a file
- */ 
+ */
 static int lxt2_wr_emit_u8(struct lxt2_wr_trace *lt, int value)
 {
 unsigned char buf[1];
@@ -340,7 +340,7 @@ return(rc);
  * data to a file.  (lt->position needs to be
  * fixed up on gzclose so the tables don't
  * get out of sync!)
- */ 
+ */
 static int gzwrite_buffered(struct lxt2_wr_trace *lt)
 {
 int rc = 1;
@@ -446,7 +446,7 @@ return(rc);
 static int lxt2_wr_emit_stringz(struct lxt2_wr_trace *lt, char *value)
 {
 int rc=1;
-do  
+do
 	{
         rc&=lxt2_wr_emit_u8z(lt, *value);
         } while(*(value++));
@@ -473,7 +473,7 @@ for(p=s;*p;p++)
                 {
                 h=h^(g>>24);
                 h=h^g;
-                }   
+                }
         }
 
 h^=h2;						/* combine the two hashes */
@@ -500,17 +500,17 @@ struct lxt2_wr_symbol *temp;
 
 hv=lxt2_wr_hash(s);
 if(!(temp=lt->sym[hv])) return(NULL); /* no hash entry, add here wanted to add */
-	
+
 while(temp)
         {
         if(!strcmp(temp->name,s))
                 {
-                return(temp); /* in table already */    
+                return(temp); /* in table already */
                 }
         if(!temp->next) break;
         temp=temp->next;
         }
-	
+
 return(NULL); /* not found, add here if you want to add*/
 }
 
@@ -535,13 +535,13 @@ if(lt->compress_fac_str)
 	lxt2_wr_emit_u16z(lt, i);
 	lxt2_wr_emit_stringz(lt, str+i);
         free(lt->compress_fac_str);
-        } 
+        }
         else
         {
 	lxt2_wr_emit_u16z(lt, 0);
 	lxt2_wr_emit_stringz(lt, str);
         }
-         
+
 lt->compress_fac_str = (char *) malloc((lt->compress_fac_len=len)+1);
 strcpy(lt->compress_fac_str, str);
 }
@@ -567,10 +567,10 @@ while(lastch!=s->name)
 
 	if(*lastch=='[')
 		{
-		*lastch=0x00;	
+		*lastch=0x00;
 		return;
 		}
-	lastch--;	
+	lastch--;
 	}
 return;
 }
@@ -597,19 +597,19 @@ if((lt)&&(lt->numfacs))
 			strip_brack(s);
 			s=s->symchain;
 			}
-		else	
+		else
 		for(i=0;i<lt->numfacs;i++)
 			{
 			lt->sorted_facs[lt->numfacs - i - 1] = s;	/* facs were chained backwards so reverse to restore bitslicing */
 			s=s->symchain;
-			}	
+			}
 		wave_msort(lt->sorted_facs, lt->numfacs);
 
 		if(lt->partial_preference)
 			{
 			/* move preferenced facs up */
 			struct lxt2_wr_symbol **prefcache = aliascache;
-			int prefs_encountered = 0; 
+			int prefs_encountered = 0;
 
 			facs_encountered = 0;
 			for(i=0;i<lt->numfacs;i++)
@@ -700,7 +700,7 @@ if((lt)&&(lt->numfacs))
 		free(lt->compress_fac_str); lt->compress_fac_str=NULL;
 		lt->compress_fac_len=0;
 		lt->zfacname_predec_size = lt->zpackcount;
-	
+
 		gzflush_buffered(lt, 1);
 		fseeko(lt->handle, 0L, SEEK_END);
 		lt->position=ftello(lt->handle);
@@ -746,7 +746,7 @@ if((lt)&&(lt->numfacs))
 }
 
 
-/* 
+/*
  * initialize the trace and get back an lt context
  */
 struct lxt2_wr_trace *lxt2_wr_init(const char *name)
@@ -805,15 +805,15 @@ if(lt)
 	{
 	lt->partial = 1;
 	lt->partial_zip = (zipmode != 0);
-	lt->partial_iter = LXT2_WR_PARTIAL_SIZE; 
+	lt->partial_iter = LXT2_WR_PARTIAL_SIZE;
 	}
 }
 
 void lxt2_wr_set_partial_preference(struct lxt2_wr_trace *lt, const char *name)
 {
 struct lxt2_wr_symbol *s;
-         
-if((lt)&&(name)&&(!lt->sorted_facs)) 
+
+if((lt)&&(name)&&(!lt->sorted_facs))
 	{
 	s=lxt2_wr_symfind(lt, name);
 	if(s)
@@ -852,8 +852,8 @@ if(lt)
 /*
  * set initial value of trace (0, 1, x, z) only legal vals
  */
-void lxt2_wr_set_initial_value(struct lxt2_wr_trace *lt, char value) 
-{ 
+void lxt2_wr_set_initial_value(struct lxt2_wr_trace *lt, char value)
+{
 if(lt)
 	{
 	switch(value)
@@ -991,7 +991,7 @@ return(sa);
 }
 
 
-/* 
+/*
  * set current time/granule updating
  */
 int lxt2_wr_inc_time_by_delta(struct lxt2_wr_trace *lt, unsigned int timeval)
@@ -1221,7 +1221,7 @@ if(using_partial)
 		lxt2_wr_emit_u32(lt, partial_length+9);	/* size of this section (uncompressed) */
 		lxt2_wr_emit_u32(lt, iter);		/* begin iter of section               */
 		fflush(lt->handle);
-	
+
 		lt->zhandle = gzdopen(dup(fileno(lt->handle)), lt->zmode);
 		lt->zpackcount = 0;
 		}
@@ -1331,7 +1331,7 @@ if((lt->timegranule>=lt->maxgranule)||(do_finalize)||(early_flush))
 		lxt2_wr_emit_u32(lt, 0);		/* size of this section (uncompressed) */
 		lxt2_wr_emit_u32(lt, ~0);		/* control section		       */
 		fflush(lt->handle);
-	
+
 		lt->zhandle = gzdopen(dup(fileno(lt->handle)), lt->zmode);
 		lt->zpackcount = 0;
 		}
@@ -1354,9 +1354,9 @@ if((lt->timegranule>=lt->maxgranule)||(do_finalize)||(early_flush))
 			exit(255);
 			}
 
-		lxt2_wr_emit_stringz(lt, ds->item); 
+		lxt2_wr_emit_stringz(lt, ds->item);
 		ds2 = ds->next;
-		free(ds->item); 
+		free(ds->item);
 		free(ds);
 		ds = ds2;
 		}
@@ -1382,7 +1382,7 @@ if((lt->timegranule>=lt->maxgranule)||(do_finalize)||(early_flush))
 #endif
 
 		dt2 = dt->next;
-		free(dt); 
+		free(dt);
 		dt = dt2;
 		}
 	lt->mapdict_head = lt->mapdict_curr = lt->mapdict = NULL;
@@ -1399,11 +1399,11 @@ if((lt->timegranule>=lt->maxgranule)||(do_finalize)||(early_flush))
 	if(using_partial_zip)
 		{
 		off_t c_len;
-	
+
 		gzflush_buffered(lt, 1);
 		fseeko(lt->handle, 0L, SEEK_END);
 		lt->position=ftello(lt->handle);
-	
+
 		c_len = lt->position - current_iter_pos - 12;
 		fseeko(lt->handle, current_iter_pos, SEEK_SET);
 
@@ -1467,7 +1467,7 @@ if(lt)
 				{
 				lt->bumptime = 0;
 
-				if(!lt->flush_valid) 
+				if(!lt->flush_valid)
 					{
 					lt->timepos++;
 					}
@@ -1475,7 +1475,7 @@ if(lt)
 					{
 					lt->flush_valid = 0;
 					}
-	
+
 				if(lt->timepos == LXT2_WR_GRANULE_SIZE)
 					{
 					/* fprintf(stderr, "flushing granule to disk at time %d\n", (unsigned int)timeval); */
@@ -1484,7 +1484,7 @@ if(lt)
 				}
 
 			/* fprintf(stderr, "updating time to %d (%d dict entries/%d bytes)\n", (unsigned int)timeval, lt->num_dict_entries, lt->dict_string_mem_required); */
-			lt->timetable[lt->timepos] = timeval;			
+			lt->timetable[lt->timepos] = timeval;
 			lt->lasttime = timeval;
 			}
 		}
@@ -1493,7 +1493,7 @@ if(lt)
 		lt->timeset = 1;
 		lt->mintime = lt->maxtime = timeval;
 
-		lt->timetable[lt->timepos] = timeval;		
+		lt->timetable[lt->timepos] = timeval;
 		}
 
 	if( (!lt->timepos) && (!lt->timegranule) )
@@ -1524,7 +1524,7 @@ if(lt)
 					else if (s->flags&LXT2_WR_SYM_F_DOUBLE)
 						{
 						double value = 0;
-	
+
 						sscanf(s->value, "%lg", &value);
 						errno = 0;
 						lxt2_wr_emit_value_double(lt, s, 0, value);
@@ -1625,7 +1625,7 @@ int rc=0;
 
 if((!lt)||(lt->blackout)||(!s)||(row)) return(rc);
 
-if(!lt->emitted) 
+if(!lt->emitted)
 	{
 	lxt2_wr_emitfacs(lt);
 	lt->emitted = 1;
@@ -1666,7 +1666,7 @@ if(s->flags&LXT2_WR_SYM_F_DOUBLE)
 
 		if(lt->dict_curr)
 			{
-			lt->dict_curr->next = lt->dict;	
+			lt->dict_curr->next = lt->dict;
 			lt->dict_curr = lt->dict;
 			}
 			else
@@ -1707,7 +1707,7 @@ int rc=0;
 
 if((!lt)||(lt->blackout)||(!s)||(!value)||(row)) return(rc);
 
-if(!lt->emitted) 
+if(!lt->emitted)
 	{
 	lxt2_wr_emitfacs(lt);
 	lt->emitted = 1;
@@ -1746,7 +1746,7 @@ if(s->flags&LXT2_WR_SYM_F_STRING)
 
 		if(lt->dict_curr)
 			{
-			lt->dict_curr->next = lt->dict;	
+			lt->dict_curr->next = lt->dict;
 			lt->dict_curr = lt->dict;
 			}
 			else
@@ -1791,7 +1791,7 @@ int i;
 
 if((!lt)||(lt->blackout)||(!s)||(!value)||(!*value)||(row)) return(rc);
 
-if(!lt->emitted) 
+if(!lt->emitted)
 	{
 	lxt2_wr_emitfacs(lt);
 	lt->emitted = 1;
@@ -1856,12 +1856,12 @@ if(!(s->flags&(LXT2_WR_SYM_F_DOUBLE|LXT2_WR_SYM_F_STRING)))
 	prevch = *vpnt;
 	while(*vpnt)
 		{
-		if(prevch == *vpnt) 
+		if(prevch == *vpnt)
 			{
 			vpnt++;
 			}
 			else
-			{	
+			{
 			prevch = 0;
 			break;
 			}
@@ -1968,7 +1968,7 @@ idxchk:	if(idx<0)
 
 			if(lt->dict_curr)
 				{
-				lt->dict_curr->next = lt->dict;	
+				lt->dict_curr->next = lt->dict;
 				lt->dict_curr = lt->dict;
 				}
 				else
@@ -2016,15 +2016,15 @@ struct lxt2_wr_symbol *s;
 
 if((lt)&&(!lt->blackout))
 	{
-	if(!lt->emitted) 
+	if(!lt->emitted)
 	        {
 	        lxt2_wr_emitfacs(lt);
 	        lt->emitted = 1;
-	                
+
 	        if(!lt->timeset)
 	                {
 	                lxt2_wr_set_time(lt, 0);
-	                }        
+	                }
 	        }
 
 	s = lt->symchain;
@@ -2036,7 +2036,7 @@ if((lt)&&(!lt->blackout))
 				{
 				s->msk |= (LXT2_WR_GRAN_1VAL<<lt->timepos);
 				s->chg[s->chgpos] = LXT2_WR_ENC_BLACKOUT;
-		
+
 				s->chgpos++;
 				}
 				else
@@ -2158,7 +2158,7 @@ if(lt)
 		{
 		struct lxt2_wr_symbol *s = lt->symchain;
 		struct lxt2_wr_symbol *s2;
-		
+
 		while(s)
 			{
 			free(s->name);
@@ -2170,7 +2170,7 @@ if(lt)
 
 		lt->symchain=NULL;
 		}
-	
+
 	free(lt->lxtname);
 	free(lt->sorted_facs);
 	fclose(lt->handle);
@@ -2193,13 +2193,13 @@ if(lt)
 
 
 /*
- * time zero offset      
+ * time zero offset
  */
-void lxt2_wr_set_timezero(struct lxt2_wr_trace *lt, lxtstime_t timeval)               
-{                        
+void lxt2_wr_set_timezero(struct lxt2_wr_trace *lt, lxtstime_t timeval)
+{
 if(lt)
-        {                
+        {
         lt->timezero = timeval;
-        }                 
+        }
 }
 
diff --git a/src/helpers/lxt2_write.h b/src/helpers/lxt2_write.h
index f1487fb..8c9a47b 100644
--- a/src/helpers/lxt2_write.h
+++ b/src/helpers/lxt2_write.h
@@ -3,19 +3,19 @@
  *
  * 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: 
+ * 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   
+ * 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   
+ * 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.
  */
@@ -83,12 +83,12 @@ typedef unsigned long long granmsk_t;
 #define LXT2_WR_GRAN_1VAL (LXT2_WR_ULLDESC(1))
 #else
 typedef unsigned int granmsk_t;
-#define LXT2_WR_GRAN_0VAL (0)   
+#define LXT2_WR_GRAN_0VAL (0)
 #define LXT2_WR_GRAN_1VAL (1)
 #endif
 
 
-enum LXT2_WR_Encodings { 
+enum LXT2_WR_Encodings {
 	LXT2_WR_ENC_0,
 	LXT2_WR_ENC_1,
 	LXT2_WR_ENC_INV,
@@ -132,12 +132,12 @@ struct lxt2_wr_ds_tree_node {
  */
 typedef struct lxt2_wr_dslxt_tree_node lxt2_wr_dslxt_Tree;
 struct lxt2_wr_dslxt_tree_node {
-    lxt2_wr_dslxt_Tree * left, * right;  
+    lxt2_wr_dslxt_Tree * left, * right;
     char *item;
     unsigned int val;
     lxt2_wr_dslxt_Tree * next;
 };
-                                        
+
 
 struct lxt2_wr_trace
 {
diff --git a/src/helpers/lxt2miner.c b/src/helpers/lxt2miner.c
index f801037..932b595 100644
--- a/src/helpers/lxt2miner.c
+++ b/src/helpers/lxt2miner.c
@@ -123,7 +123,7 @@ lt=lxt2_rd_init(fname);
 if(lt)
 	{
 	int numfacs;
-	
+
 	numfacs = lxt2_rd_get_num_facs(lt);
 	killed_list = calloc(numfacs, sizeof(char));
 	lxt2_rd_set_fac_process_mask_all(lt);
@@ -147,7 +147,7 @@ return(0);
 
 void print_help(char *nam)
 {
-#ifdef __linux__ 
+#ifdef __linux__
 printf(
 "Usage: %s [OPTION]... [VZTFILE]\n\n"
 "  -d, --dumpfile=FILE        specify LXT2 input dumpfile\n"
@@ -190,7 +190,7 @@ while (1)
         {
 #ifdef __linux__
         int option_index = 0;
-                        
+
         static struct option long_options[] =
                 {
 		{"comprehensive", 0, 0, 'c'},
@@ -199,16 +199,16 @@ while (1)
 		{"hex", 1, 0, 'x'},
 		{"namesonly", 0, 0, 'n'},
                 {"help", 0, 0, 'h'},
-                {0, 0, 0, 0}  
+                {0, 0, 0, 0}
                 };
-                
+
         c = getopt_long (argc, argv, "d:m:x:nch", long_options, &option_index);
 #else
         c = getopt      (argc, argv, "d:m:x:nch");
 #endif
-                        
+
         if (c == -1) break;     /* no more args */
-                        
+
         switch (c)
                 {
 		case 'c':
@@ -275,24 +275,24 @@ while (1)
                 case 'h':
 			print_help(argv[0]);
                         break;
-                        
+
                 case '?':
                         opt_errors_encountered=1;
                         break;
-                        
+
                 default:
                         /* unreachable */
                         break;
                 }
         }
-                        
+
 if(opt_errors_encountered)
         {
         print_help(argv[0]);
         }
 
 if (optind < argc)
-        {               
+        {
         while (optind < argc)
                 {
                 if(!lxname)
@@ -306,7 +306,7 @@ if (optind < argc)
 			}
                 }
         }
-                        
+
 if(!names_only && comprehensive)
 	{
 	killed_value = 0;
diff --git a/src/helpers/lxt2vcd.c b/src/helpers/lxt2vcd.c
index 1ee5601..c845265 100644
--- a/src/helpers/lxt2vcd.c
+++ b/src/helpers/lxt2vcd.c
@@ -58,7 +58,7 @@ while (value)
         value = value / 94;
         }
 
-*pnt = 0;   
+*pnt = 0;
 return(buf);
 }
 
@@ -139,7 +139,7 @@ if(!(*pnt_value)[0])
 		{
 		vcd_blackout = 0;
 		fprintf(fv, "$dumpon\n");
-		}	
+		}
 	}
 
 if(g->flags & LXT2_RD_SYM_F_DOUBLE)
@@ -158,10 +158,10 @@ else
                 fprintf(fv, "%c%s\n", (*pnt_value)[0], vcdid(*pnt_facidx));
                 }
                 else
-                {                        
+                {
                 fprintf(fv, "b%s %s\n", vcd_truncate_bitvec(*pnt_value), vcdid(*pnt_facidx));
                 }
-	}                               
+	}
 }
 
 
@@ -180,7 +180,7 @@ if(lt)
 	signed char scale;
 	time_t walltime;
 	lxtsint64_t timezero;
-	
+
 	numfacs = lxt2_rd_get_num_facs(lt);
 	lxt2_rd_set_fac_process_mask_all(lt);
 	lxt2_rd_set_max_block_mem_usage(lt, 0);	/* no need to cache blocks */
@@ -189,7 +189,7 @@ if(lt)
         switch(scale)
                 {
                 case 0:         time_dimension = 's'; break;
-         
+
                 case -1:        time_scale = 100; 		time_dimension = 'm'; break;
                 case -2:        time_scale = 10;
                 case -3:                                        time_dimension = 'm'; break;
@@ -197,15 +197,15 @@ if(lt)
                 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 -7:        time_scale = 100; 		time_dimension = 'n'; break;
                 case -8:        time_scale = 10;
                 case -9:
@@ -249,7 +249,7 @@ if(lt)
                        fprintf(fv, "$var real 1 %s %s $end\n", vcdid(newindx), netname);
                        }
                 else
-			
+
                         {
                        	if(g->len==1)
                        		{
@@ -260,7 +260,7 @@ if(lt)
                                         else
                                         {
                                         fprintf(fv, "$var wire 1 %s %s $end\n", vcdid(newindx), netname);
-                                        }  
+                                        }
 				}
                                 else
                                 {
@@ -309,7 +309,7 @@ return(0);
 
 void print_help(char *nam)
 {
-#ifdef __linux__ 
+#ifdef __linux__
 printf(
 "Usage: %s [OPTION]... [LXT2FILE]\n\n"
 "  -l, --lxtname=FILE         specify LXT2 input filename\n"
@@ -350,7 +350,7 @@ while (1)
         {
 #ifdef __linux__
         int option_index = 0;
-                        
+
         static struct option long_options[] =
                 {
 		{"lxtname", 1, 0, 'l'},
@@ -358,16 +358,16 @@ while (1)
 		{"flatearth", 0, 0, 'f'},
 		{"notruncate", 0, 0, 'n'},
                 {"help", 0, 0, 'h'},
-                {0, 0, 0, 0}  
+                {0, 0, 0, 0}
                 };
-                
+
         c = getopt_long (argc, argv, "l:o:fnh", long_options, &option_index);
 #else
         c = getopt      (argc, argv, "l:o:fnh");
 #endif
-                        
+
         if (c == -1) break;     /* no more args */
-                        
+
         switch (c)
                 {
 		case 'l':
@@ -391,24 +391,24 @@ while (1)
                 case 'h':
 			print_help(argv[0]);
                         break;
-                        
+
                 case '?':
                         opt_errors_encountered=1;
                         break;
-                        
+
                 default:
                         /* unreachable */
                         break;
                 }
         }
-                        
+
 if(opt_errors_encountered)
         {
         print_help(argv[0]);
         }
 
 if (optind < argc)
-        {               
+        {
         while (optind < argc)
                 {
                 if(!lxname)
@@ -422,7 +422,7 @@ if (optind < argc)
 			}
                 }
         }
-                        
+
 if(!lxname)
         {
         print_help(argv[0]);
diff --git a/src/helpers/lxt_write.c b/src/helpers/lxt_write.c
index 9e9cf2e..2ff8bcb 100644
--- a/src/helpers/lxt_write.c
+++ b/src/helpers/lxt_write.c
@@ -132,7 +132,7 @@ static dslxt_Tree * dslxt_insert(char *i, dslxt_Tree * t, unsigned int val) {
 /* Return a pointer to the resulting tree.                 */
     dslxt_Tree * n;
     int dir;
-    
+
     n = (dslxt_Tree *) calloc (1, sizeof (dslxt_Tree));
     if (n == NULL) {
 	fprintf(stderr, "dslxt_insert: ran out of memory, exiting.\n");
@@ -190,7 +190,7 @@ static dslxt_Tree * dslxt_delete(char *i, dslxt_Tree * t) {
 /*
  * functions which emit various big endian
  * data to a file
- */ 
+ */
 static int lt_emit_u8(struct lt_trace *lt, int value)
 {
 unsigned char buf[1];
@@ -271,7 +271,7 @@ return(nmemb);
 static int lt_emit_string(struct lt_trace *lt, char *value)
 {
 int rc=1;
-do  
+do
 	{
         rc&=lt_emit_u8(lt, *value);
         } while(*(value++));
@@ -284,7 +284,7 @@ return(rc);
  * data to a file.  (lt->position needs to be
  * fixed up on gzclose so the tables don't
  * get out of sync!)
- */ 
+ */
 static int lt_emit_u8z(struct lt_trace *lt, int value)
 {
 unsigned char buf[1];
@@ -371,7 +371,7 @@ return(nmemb);
 static int lt_emit_stringz(struct lt_trace *lt, char *value)
 {
 int rc=1;
-do  
+do
 	{
         rc&=lt_emit_u8z(lt, *value);
         } while(*(value++));
@@ -383,7 +383,7 @@ return(rc);
  * data to a file.  (lt->position needs to be
  * fixed up on BZ2_bzclose so the tables don't
  * get out of sync!)
- */ 
+ */
 static int lt_emit_u8bz(struct lt_trace *lt, int value)
 {
 unsigned char buf[1];
@@ -470,7 +470,7 @@ return(nmemb);
 static int lt_emit_stringbz(struct lt_trace *lt, char *value)
 {
 int rc=1;
-do  
+do
 	{
         rc&=lt_emit_u8bz(lt, *value);
         } while(*(value++));
@@ -537,7 +537,7 @@ for(p=s;*p;p++)
                 {
                 h=h^(g>>24);
                 h=h^g;
-                }   
+                }
         }
 
 h^=h2;						/* combine the two hashes */
@@ -564,17 +564,17 @@ struct lt_symbol *temp;
 
 hv=lt_hash(s);
 if(!(temp=lt->sym[hv])) return(NULL); /* no hash entry, add here wanted to add */
-	
+
 while(temp)
         {
         if(!strcmp(temp->name,s))
                 {
-                return(temp); /* in table already */    
+                return(temp); /* in table already */
                 }
         if(!temp->next) break;
         temp=temp->next;
         }
-	
+
 return(NULL); /* not found, add here if you want to add*/
 }
 
@@ -599,13 +599,13 @@ if(lt->compress_fac_str)
 	lt_emit_u16z(lt, i);
 	lt_emit_stringz(lt, str+i);
         free(lt->compress_fac_str);
-        } 
+        }
         else
         {
 	lt_emit_u16z(lt, 0);
 	lt_emit_stringz(lt, str);
         }
-         
+
 lt->compress_fac_str = (char *) malloc((lt->compress_fac_len=len)+1);
 strcpy(lt->compress_fac_str, str);
 }
@@ -626,10 +626,10 @@ while(lastch!=s->name)
 
 	if(*lastch=='[')
 		{
-		*lastch=0x00;	
+		*lastch=0x00;
 		return;
 		}
-	lastch--;	
+	lastch--;
 	}
 return;
 }
@@ -655,12 +655,12 @@ if((lt)&&(lt->numfacs))
 				strip_brack(s);
 				s=s->symchain;
 				}
-			else	
+			else
 			for(i=0;i<lt->numfacs;i++)
 				{
 				lt->sorted_facs[lt->numfacs - i - 1] = s;	/* facs were chained backwards so reverse to restore bitslicing*/
 				s=s->symchain;
-				}	
+				}
 			wave_msort(lt->sorted_facs, lt->numfacs);
 
 			for(i=0;i<lt->numfacs;i++)
@@ -688,7 +688,7 @@ if((lt)&&(lt->numfacs))
 		free(lt->compress_fac_str); lt->compress_fac_str=NULL;
 		lt->compress_fac_len=0;
 		lt->zfacname_predec_size = lt->zpackcount;
-	
+
 		gzclose(lt->zhandle);
 		fseeko(lt->handle, 0L, SEEK_END);
 		lt->position=ftello(lt->handle);
@@ -723,13 +723,13 @@ if((lt)&&(lt->numfacs))
 		if(is_interlaced_trace)
 			{
 			lt->zhandle = gzdopen(dup(fileno(lt->handle)), "wb9");
-	
+
 			lt->sync_table_offset = lt->position;
 			for(i=0;i<lt->numfacs;i++)
 				{
 				lt_emit_u32z(lt, lt->sorted_facs[i]->last_change);
 				}
-	
+
 			gzclose(lt->zhandle); lt->zhandle = NULL;
 			fseeko(lt->handle, 0L, SEEK_END);
 			lt->position=ftello(lt->handle);
@@ -740,7 +740,7 @@ if((lt)&&(lt->numfacs))
 }
 
 
-/* 
+/*
  * initialize the trace and get back an lt context
  */
 struct lt_trace *lt_init(const char *name)
@@ -866,7 +866,7 @@ switch(numbytes_trans&3)
 	case 3: lt->lt_emit_u32(lt, numtrans); break;
 	}
 
-/* printf("Clock finish for '%s' at %lld ending with '%c' for %d repeats over a switch delta of %d\n", 
+/* printf("Clock finish for '%s' at %lld ending with '%c' for %d repeats over a switch delta of %d\n",
 	s->name, lt->timeval, s->clk_prevval, s->clk_numtrans - LT_CLKPACK, s->clk_delta); */
 s->clk_prevtrans = ULLDescriptor(~0);
 s->clk_numtrans = 0;
@@ -967,7 +967,7 @@ switch(numbytes_trans&3)
 	case 3: lt->lt_emit_u32(lt, numtrans); break;
 	}
 
-/* printf("Clock finish for '%s' at %lld ending with '%08x' for %d repeats over a switch delta of %lld\n", 
+/* printf("Clock finish for '%s' at %lld ending with '%08x' for %d repeats over a switch delta of %lld\n",
 	s->name, lt->timeval, s->clk_prevval, s->clk_numtrans - LT_CLKPACK_M, s->clk_delta); */
 s->clk_prevtrans = ULLDescriptor(~0);
 s->clk_numtrans = 0;
@@ -1035,7 +1035,7 @@ for(i=0;i<lt->num_dict_entries;i++)
 	/* fprintf(stderr, "%8d) '%s'\n", ds->val, ds->item); */
 	lt_emit_stringz(lt, ds->item+1);
 	}
-	
+
 gzclose(lt->zhandle);
 fseeko(lt->handle, 0L, SEEK_END);
 lt->position=ftello(lt->handle);
@@ -1072,13 +1072,13 @@ if(lt)
                                 if(s->clk_numtrans > LT_CLKPACK_M) lt_flushclock_m(lt, s);
                                 }
                                 else
-                                {   
+                                {
                                 if(s->clk_numtrans > LT_CLKPACK) lt_flushclock(lt, s);
                                 }
                         }
-                         
+
                 s=s->symchain;
-		}	
+		}
 
 	lt_set_dumpon(lt);	/* in case it was turned off */
 
@@ -1134,7 +1134,7 @@ if(lt)
 		while(t)
 			{
 			lt_emit_u32z(lt, t->position - lastposition); lastposition = t->position;
-			t=t->next;			
+			t=t->next;
 			}
 
 		t=lt->timehead;
@@ -1144,9 +1144,9 @@ if(lt)
 				{
 				lxttime_t delta = t->timeval - lasttime;
 				lt_emit_u64z(lt, (int)(delta>>32), (int)delta); lasttime = t->timeval;
-				
+
 				t2=t->next;
-				free(t);			
+				free(t);
 				t=t2;
 				}
 			}
@@ -1155,12 +1155,12 @@ if(lt)
 			while(t)
 				{
 				lt_emit_u32z(lt, (int)(t->timeval - lasttime)); lasttime = t->timeval;
-				
+
 				t2=t->next;
-				free(t);			
+				free(t);
 				t=t2;
 				}
-	
+
 			lt->timehead = lt->timecurr = NULL;
 			}
 
@@ -1170,7 +1170,7 @@ if(lt)
 		lt->ztime_table_size = lt->position - lt->ztime_table_size;
 		}
 
-	if(lt->initial_value>=0) 
+	if(lt->initial_value>=0)
 		{
 		lt->initial_value_offset = lt->position;
 		lt_emit_u8(lt, lt->initial_value);
@@ -1185,7 +1185,7 @@ if(lt)
 	if(lt->double_used)
 		{
 		lt->double_test_offset = lt->position;
-		lt_emit_double(lt, 3.14159);		
+		lt_emit_double(lt, 3.14159);
 		}
 
 	if(lt->dumpoffcount)
@@ -1201,7 +1201,7 @@ if(lt)
 			lt_emit_u64(lt, (int)((ltt->timeval)>>32), (int)ltt->timeval);
 			ltt2 = ltt;
 			ltt=ltt->next;
-			free(ltt2);			
+			free(ltt2);
 			}
 
 		lt->dumpoffhead = lt->dumpoffcurr = NULL;
@@ -1253,7 +1253,7 @@ if(lt)
 		{
 		struct lt_symbol *sc = lt->symchain;
 		struct lt_symbol *s2;
-		
+
 		while(sc)
 			{
 			free(sc->name);
@@ -1262,7 +1262,7 @@ if(lt)
 			sc=s2;
 			}
 		}
-	
+
 	free(lt->sorted_facs);
 	fclose(lt->handle);
 	free(lt);
@@ -1368,7 +1368,7 @@ return(sa);
 }
 
 
-/* 
+/*
  * set current time
  */
 int lt_inc_time_by_delta(struct lt_trace *lt, unsigned int timeval)
@@ -1407,7 +1407,7 @@ if(lt)
 				else
 				{
 				free(trl);
-				goto bail;				
+				goto bail;
 				}
 			}
 			else
@@ -1485,7 +1485,7 @@ if((lt)&&(!lt->emitted))
 }
 
 /*
- * sets change interlace 
+ * sets change interlace
  */
 void lt_set_no_interlace(struct lt_trace *lt)
 {
@@ -1510,12 +1510,12 @@ if((lt)&&(!lt->emitted)&&(!lt->sorted_facs))
 			strip_brack(s);
 			s=s->symchain;
 			}
-		else	
+		else
 		for(i=0;i<lt->numfacs;i++)
 			{
 			lt->sorted_facs[lt->numfacs - i - 1] = s;	/* facs were chained backwards so reverse to restore bitslicing */
 			s=s->symchain;
-			}	
+			}
 		wave_msort(lt->sorted_facs, lt->numfacs);
 
 		for(i=0;i<lt->numfacs;i++)
@@ -1555,12 +1555,12 @@ if(lt)
 	{
 	int tag;
 	switch(value)
-		{		
+		{
 		case '0':	tag = 0; break;
 		case '1':	tag = 1; break;
-		case 'Z':	
+		case 'Z':
 		case 'z':	tag = 2; break;
-		case 'X':	
+		case 'X':
 		case 'x':	tag = 3; break;
 		case 'H':
 		case 'h':	tag = 4; break;
@@ -1686,7 +1686,7 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
 		s->clk_mask <<= 1;
 		s->clk_mask |= 1;
 
-		if(     ((s->clk_mask&0x1f)==0x1f) && 
+		if(     ((s->clk_mask&0x1f)==0x1f) &&
 			( (delta1=(ivalue         - s->clk_prevval1) & lt_optimask[s->len]) == ((s->clk_prevval1 - s->clk_prevval3) & lt_optimask[s->len]) ) &&
 			( (delta2=(s->clk_prevval - s->clk_prevval2) & lt_optimask[s->len]) == ((s->clk_prevval2 - s->clk_prevval4) & lt_optimask[s->len]) ) &&
 			( (delta1==delta2) || ((!delta1)&&(!delta2)) )
@@ -1862,7 +1862,7 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
 				{
 				tag = (numbytes<<4);
 				}
-	
+
 			lt->lt_emit_u8(lt, tag);
 			switch(numbytes&3)
 				{
@@ -1883,7 +1883,7 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
 				}
 			lt->lt_emit_u8(lt, optimized ? (3+optimized1) : 0);
 			}
-	
+
 		s->last_change = start_position;
 
 		if(s->rows>0)
@@ -1949,7 +1949,7 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
 						{
 						if(lt->num_dict_entries==(256*65536)) lt->dict32_offset = lt->position;
 						}
-			
+
 					lt->num_dict_entries++;
 					}
 
@@ -1994,14 +1994,14 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
 				value <<= (24-len);
 				rc=lt->lt_emit_u24(lt, value);
 				}
-			else			
+			else
 				{
 				value <<= (32-len);
 				rc=lt->lt_emit_u32(lt, value);
 				}
 			}
-		}	
-	
+		}
+
 	if(lt->timebuff)
 		{
 		lt->timechangecount++;
@@ -2063,7 +2063,7 @@ if((s->flags)&LT_SYM_F_DOUBLE)
 			{
 			numbytes = 0;
 			}
-	
+
 		start_position = lt->position;
 		s->last_change = start_position;
 
@@ -2119,7 +2119,7 @@ if((s->flags)&LT_SYM_F_DOUBLE)
 		}
 
 	rc=lt->lt_emit_double(lt, value);
-	
+
 	if(lt->timebuff)
 		{
 		lt->timechangecount++;
@@ -2181,7 +2181,7 @@ if((s->flags)&LT_SYM_F_STRING)
 			{
 			numbytes = 0;
 			}
-	
+
 		start_position = lt->position;
 		s->last_change = start_position;
 
@@ -2237,7 +2237,7 @@ if((s->flags)&LT_SYM_F_STRING)
 		}
 
 	rc=lt->lt_emit_string(lt, value);
-	
+
 	if(lt->timebuff)
 		{
 		lt->timechangecount++;
@@ -2318,7 +2318,7 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
 		s->clk_mask <<= 1;
 		s->clk_mask |= legal;
 
-		if(     ((s->clk_mask&0x1f)==0x1f) && 
+		if(     ((s->clk_mask&0x1f)==0x1f) &&
 			( (delta1=(ivalue         - s->clk_prevval1) & lt_optimask[s->len]) == ((s->clk_prevval1 - s->clk_prevval3) & lt_optimask[s->len]) ) &&
 			( (delta2=(s->clk_prevval - s->clk_prevval2) & lt_optimask[s->len]) == ((s->clk_prevval2 - s->clk_prevval4) & lt_optimask[s->len]) ) &&
 			( (delta1==delta2) || ((!delta1)&&(!delta2)) )
@@ -2350,7 +2350,7 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
 						s->clk_prevval1 = s->clk_prevval;
 						s->clk_prevval  = ivalue;
 
-						/* printf("Clock value '%08x' for '%s' [len=%d] at %lld (#%d)\n", 
+						/* printf("Clock value '%08x' for '%s' [len=%d] at %lld (#%d)\n",
 							ivalue, s->name, len, lt->timeval, s->clk_numtrans); */
 						return(1);
 						}
@@ -2480,12 +2480,12 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
 	while((ch=*(pnt++)))
 		{
 		switch(ch)
-			{		
+			{
 			case '0':
 			case '1':	mvl|=LT_MVL_2; break;
-			case 'Z':	
-			case 'z':	
-			case 'X':	
+			case 'Z':
+			case 'z':
+			case 'X':
 			case 'x':	mvl|=LT_MVL_4; break;
 			default:	mvl|=LT_MVL_9; break;
 			}
@@ -2494,13 +2494,13 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
 		}
 
 	switch(prevch)
-		{		
+		{
 		case 0x00:	tagadd = 0; break;
 		case '0':	tagadd = 3; break;
 		case '1':	tagadd = 4; break;
-		case 'Z':	
+		case 'Z':
 		case 'z':	tagadd = 5; break;
-		case 'X':	
+		case 'X':
 		case 'x':	tagadd = 6; break;
 		case 'H':
 		case 'h':	tagadd = 7; break;
@@ -2597,7 +2597,7 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
 				int outval = 0;
 				int thisval= 0;
 
-				pnt = value;				
+				pnt = value;
 
 				if((lt->dictmode)&&(len2>lt->mindictwidth))
 					{
@@ -2628,7 +2628,7 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
 							{
 							if(lt->num_dict_entries==(256*65536)) lt->dict32_offset = lt->position;
 							}
-			
+
 						lt->num_dict_entries++;
 						}
 
@@ -2666,8 +2666,8 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
 					outval |= (thisval<<bitpos);
 					bitpos--;
 					if((bitpos==-1)||(i==len2-1))
-						{					
-						lt->lt_emit_u8(lt, outval); 
+						{
+						lt->lt_emit_u8(lt, outval);
 						outval = 0;
 						bitpos = 7;
 						}
@@ -2681,7 +2681,7 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
 				int outval = 0;
 				int thisval= 0;
 
-				pnt = value;				
+				pnt = value;
 
 				for(i=0;i<len2;i++)
 					{
@@ -2700,8 +2700,8 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
 					outval |= (thisval<<bitpos);
 					bitpos-=2;
 					if((bitpos==-2)||(i==len2-1))
-						{					
-						lt->lt_emit_u8(lt, outval); 
+						{
+						lt->lt_emit_u8(lt, outval);
 						outval = 0;
 						bitpos = 6;
 						}
@@ -2715,7 +2715,7 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
 				int outval = 0;
 				int thisval= 0;
 
-				pnt = value;				
+				pnt = value;
 
 				for(i=0;i<len2;i++)
 					{
@@ -2744,8 +2744,8 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
 					outval |= (thisval<<bitpos);
 					bitpos-=4;
 					if((bitpos==-4)||(i==len2-1))
-						{					
-						lt->lt_emit_u8(lt, outval); 
+						{
+						lt->lt_emit_u8(lt, outval);
 						outval = 0;
 						bitpos = 4;
 						}
@@ -2755,7 +2755,7 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
 
 		rc=1;
 		}
-	
+
 	if(lt->timebuff)
 		{
 		lt->timechangecount++;
diff --git a/src/helpers/lxt_write.h b/src/helpers/lxt_write.h
index 8fbb0a7..48a60fc 100644
--- a/src/helpers/lxt_write.h
+++ b/src/helpers/lxt_write.h
@@ -3,19 +3,19 @@
  *
  * 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: 
+ * 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   
+ * 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   
+ * 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.
  */
@@ -47,11 +47,11 @@ extern "C" {
 
 typedef struct dslxt_tree_node dslxt_Tree;
 struct dslxt_tree_node {
-    dslxt_Tree * left, * right;  
+    dslxt_Tree * left, * right;
     char *item;
     unsigned int val;
 };
-                                        
+
 
 #define LT_HDRID (0x0138)
 #define LT_VERSION (0x0004)
@@ -180,7 +180,7 @@ unsigned double_used : 1;
 unsigned do_strip_brackets : 1;
 unsigned clock_compress : 1;
 unsigned dictmode : 1;			/* dictionary compression enabled */
-unsigned zmode : 2;			/* for value changes */ 
+unsigned zmode : 2;			/* for value changes */
 unsigned emitted : 1;			/* gate off change field zmode changes when set */
 };
 
@@ -252,9 +252,9 @@ void			lt_set_dumpoff(struct lt_trace *lt);
 void			lt_set_dumpon(struct lt_trace *lt);
 
 /*
- * value change functions..note that if the value string len for 
- * lt_emit_value_bit_string() is shorter than the symbol length 
- * it will be left justified with the rightmost character used as 
+ * value change functions..note that if the value string len for
+ * lt_emit_value_bit_string() is shorter than the symbol length
+ * it will be left justified with the rightmost character used as
  * a repeat value that will be propagated to pad the value string out:
  *
  * "10x" for 8 bits becomes "10xxxxxx"
diff --git a/src/helpers/scopenav.c b/src/helpers/scopenav.c
index 80653de..d1184f4 100644
--- a/src/helpers/scopenav.c
+++ b/src/helpers/scopenav.c
@@ -3,19 +3,19 @@
  *
  * 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: 
+ * 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   
+ * 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   
+ * 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.
  */
@@ -41,7 +41,7 @@ struct namehier *nhtemp;
 
 while(nhold)
 	{
-	nhtemp=nhold->next;	
+	nhtemp=nhold->next;
 	free(nhold->name);
 	free(nhold);
 	nhold=nhtemp;
diff --git a/src/helpers/shmidcat.c b/src/helpers/shmidcat.c
index e3b44c5..0c3ba6d 100644
--- a/src/helpers/shmidcat.c
+++ b/src/helpers/shmidcat.c
@@ -130,7 +130,7 @@ for(;;)
 			{
 			buf_top += 1 + 4 + blksiz;
 			if(buf_top >= (buf + WAVE_PARTIAL_VCD_RING_BUFFER_SIZE))
-			        {  
+			        {
 			        buf_top -= WAVE_PARTIAL_VCD_RING_BUFFER_SIZE;
 			        }
 			}
@@ -151,14 +151,14 @@ for(;;)
 		{
 		consumed = (l_curr + WAVE_PARTIAL_VCD_RING_BUFFER_SIZE) - l_top;
 		}
-	
+
 	if((consumed + len + 16) > WAVE_PARTIAL_VCD_RING_BUFFER_SIZE) /* just a guardband, it's oversized */
 		{
 #ifdef __MINGW32__
 		Sleep(10);
 #else
 		struct timeval tv;
-	
+
 	        tv.tv_sec = 0;
 	        tv.tv_usec = 1000000 / 100;
 	        select(0, NULL, NULL, NULL, &tv);
@@ -169,7 +169,7 @@ for(;;)
 		{
 		char *ss, *sd;
 		put_32(buf_curr + 1, len);
-		
+
 		sd = buf_curr + 1 + 4;
 		ss = s;
 		while(*ss)
@@ -197,7 +197,7 @@ for(;;)
 /*
  * example driver code.  this merely copies from stdin to the shared memory block.
  * emit_string() will ensure that buffer overruns do not occur; all you have to
- * do is write the block with the provision that the last character in the block is 
+ * do is write the block with the provision that the last character in the block is
  * a newline so that the VCD parser doesn't get lost.  (in effect, when we run out
  * of buffer, gtkwave thinks it's EOF, but we restart again later.  if the last
  * character is a newline, we EOF on a null string which is OK.)
@@ -260,14 +260,14 @@ if(shmid >= 0)
 	while(!feof(f))
 		{
 		char *s = fgets(l_buf+buf_strlen, 32768-buf_strlen, f);
-		
+
 		if(!s)
 			{
 #ifdef __MINGW32__
 			Sleep(200);
 #else
 	                struct timeval tv;
-         
+
 	                tv.tv_sec = 0;
 	                tv.tv_usec = 1000000 / 5;
 	                select(0, NULL, NULL, NULL, &tv);
diff --git a/src/helpers/v2l_analyzer.h b/src/helpers/v2l_analyzer.h
index e5c2ee6..b4ded83 100644
--- a/src/helpers/v2l_analyzer.h
+++ b/src/helpers/v2l_analyzer.h
@@ -3,19 +3,19 @@
  *
  * 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: 
+ * 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   
+ * 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   
+ * 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.
  */
@@ -70,7 +70,7 @@ typedef struct ExtNode
 struct Node
   {
     char     *nname;	/* ascii name of node */
-    ExtNode  *ext;	/* extension to node for vectors */    
+    ExtNode  *ext;	/* extension to node for vectors */
     HistEnt  head;	/* first entry in transition history */
     hptr     curr;      /* ptr. to current history entry */
 
@@ -89,7 +89,7 @@ struct symbol
 {
 struct symbol *nextinaet;/* for aet node chaining */
 struct HistEnt *h;	 /* points to previous one */
-	
+
 struct symbol *next;	/* for hash chain */
 char *name;
 char selected;		/* for the clist object */
@@ -100,7 +100,7 @@ struct Node *n;
 
 
 struct slist
-{  
+{
 struct slist *next;
 char *str;
 int len;
diff --git a/src/helpers/v2l_analyzer_lxt2.h b/src/helpers/v2l_analyzer_lxt2.h
index 9d52113..5242e36 100644
--- a/src/helpers/v2l_analyzer_lxt2.h
+++ b/src/helpers/v2l_analyzer_lxt2.h
@@ -3,19 +3,19 @@
  *
  * 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: 
+ * 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   
+ * 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   
+ * 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.
  */
@@ -79,7 +79,7 @@ typedef struct ExtNode
 struct Node
   {
     char     *nname;	/* ascii name of node */
-    ExtNode  *ext;	/* extension to node for vectors */    
+    ExtNode  *ext;	/* extension to node for vectors */
     HistEnt  head;	/* first entry in transition history */
     hptr     curr;      /* ptr. to current history entry */
 
@@ -98,7 +98,7 @@ struct symbol
 {
 struct symbol *nextinaet;/* for aet node chaining */
 struct HistEnt *h;	 /* points to previous one */
-	
+
 struct symbol *next;	/* for hash chain */
 char *name;
 char selected;		/* for the clist object */
@@ -109,7 +109,7 @@ struct Node *n;
 
 
 struct slist
-{  
+{
 struct slist *next;
 char *str;
 int len;
diff --git a/src/helpers/v2l_debug.c b/src/helpers/v2l_debug.c
index 755d7a0..c4d236b 100644
--- a/src/helpers/v2l_debug.c
+++ b/src/helpers/v2l_debug.c
@@ -3,19 +3,19 @@
  *
  * 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: 
+ * 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   
+ * 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   
+ * 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.
  */
@@ -36,24 +36,24 @@
 	static void mem_addnode(void *ptr, size_t size)
 	{
 	struct memchunk *m;
-	
+
 	m=(struct memchunk *)malloc(sizeof(struct memchunk));
 	m->ptr=ptr;
 	m->size=size;
 	m->next=mem;
-	
+
 	mem=m;
 	mem_total+=size;
 	mem_chunks++;
-	
+
 	fprintf(stderr,"mem_addnode:  TC:%05d TOT:%010d PNT:%010p LEN:+%d\n",mem_chunks,mem_total,ptr,size);
 	}
-	
+
 	static void mem_freenode(void *ptr)
 	{
 	struct memchunk *m, *mprev=NULL;
 	m=mem;
-	
+
 	while(m)
 		{
 		if(m->ptr==ptr)
@@ -66,7 +66,7 @@
 				{
 				mem=m->next;
 				}
-	
+
 			mem_total=mem_total-m->size;
 			mem_chunks--;
 			fprintf(stderr,"mem_freenode: TC:%05d TOT:%010d PNT:%010p LEN:-%d\n",mem_chunks,mem_total,ptr,m->size);
@@ -76,7 +76,7 @@
 		mprev=m;
 		m=m->next;
 		}
-	
+
 	fprintf(stderr,"mem_freenode: PNT:%010p *INVALID*\n",ptr);
 	sleep(1);
 	}
diff --git a/src/helpers/v2l_debug.h b/src/helpers/v2l_debug.h
index 1b24a48..6852bc7 100644
--- a/src/helpers/v2l_debug.h
+++ b/src/helpers/v2l_debug.h
@@ -3,19 +3,19 @@
  *
  * 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: 
+ * 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   
+ * 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   
+ * 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.
  */
@@ -47,7 +47,7 @@ size_t size;
 #define guint64 uint64_t
 
 #ifdef G_HAVE_GINT64
-typedef gint64          TimeType; 
+typedef gint64          TimeType;
 typedef guint64         UTimeType;
 
 #ifndef _MSC_VER
@@ -69,7 +69,7 @@ typedef guint64         UTimeType;
 #endif
 
 #else
-typedef long            TimeType; 
+typedef long            TimeType;
 typedef unsigned long   UTimeType;
 
 #define TTFormat "%d"
@@ -98,7 +98,7 @@ void free_2(void *ptr);
 TimeType atoi_64(char *str);
 
 /*
- * if your system really doesn't have alloca() at all, 
+ * if your system really doesn't have alloca() at all,
  * you can force functionality by using malloc
  * instead.  but note that you're going to have some
  * memory leaks because of it.  you have been warned.
diff --git a/src/helpers/v2l_debug_lxt2.c b/src/helpers/v2l_debug_lxt2.c
index 595a65c..bb4d372 100644
--- a/src/helpers/v2l_debug_lxt2.c
+++ b/src/helpers/v2l_debug_lxt2.c
@@ -3,19 +3,19 @@
  *
  * 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: 
+ * 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   
+ * 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   
+ * 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.
  */
@@ -36,24 +36,24 @@
 	static void mem_addnode(void *ptr, size_t size)
 	{
 	struct memchunk *m;
-	
+
 	m=(struct memchunk *)malloc(sizeof(struct memchunk));
 	m->ptr=ptr;
 	m->size=size;
 	m->next=mem;
-	
+
 	mem=m;
 	mem_total+=size;
 	mem_chunks++;
-	
+
 	fprintf(stderr,"mem_addnode:  TC:%05d TOT:%010d PNT:%010p LEN:+%d\n",mem_chunks,mem_total,ptr,size);
 	}
-	
+
 	static void mem_freenode(void *ptr)
 	{
 	struct memchunk *m, *mprev=NULL;
 	m=mem;
-	
+
 	while(m)
 		{
 		if(m->ptr==ptr)
@@ -66,7 +66,7 @@
 				{
 				mem=m->next;
 				}
-	
+
 			mem_total=mem_total-m->size;
 			mem_chunks--;
 			fprintf(stderr,"mem_freenode: TC:%05d TOT:%010d PNT:%010p LEN:-%d\n",mem_chunks,mem_total,ptr,m->size);
@@ -76,7 +76,7 @@
 		mprev=m;
 		m=m->next;
 		}
-	
+
 	fprintf(stderr,"mem_freenode: PNT:%010p *INVALID*\n",ptr);
 	sleep(1);
 	}
diff --git a/src/helpers/v2l_debug_lxt2.h b/src/helpers/v2l_debug_lxt2.h
index f33c69d..7103236 100644
--- a/src/helpers/v2l_debug_lxt2.h
+++ b/src/helpers/v2l_debug_lxt2.h
@@ -3,19 +3,19 @@
  *
  * 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: 
+ * 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   
+ * 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   
+ * 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.
  */
@@ -48,7 +48,7 @@ size_t size;
 #define guint64 uint64_t
 
 #ifdef G_HAVE_GINT64
-typedef gint64          TimeType; 
+typedef gint64          TimeType;
 typedef guint64         UTimeType;
 
 #ifndef _MSC_VER
@@ -70,7 +70,7 @@ typedef guint64         UTimeType;
 #endif
 
 #else
-typedef long            TimeType; 
+typedef long            TimeType;
 typedef unsigned long   UTimeType;
 
 #define TTFormat "%d"
diff --git a/src/helpers/vcd2fst.c b/src/helpers/vcd2fst.c
index 578cc00..c2b6d04 100644
--- a/src/helpers/vcd2fst.c
+++ b/src/helpers/vcd2fst.c
@@ -113,7 +113,7 @@ for(;;)
 			break;
 
 		default:
-			break;			
+			break;
 		}
 	}
 }
@@ -151,7 +151,7 @@ for(;;)
                         else
                         if(strstr(rc+1, "Struct End"))
                                 {
-                                sprintf(rc, "Upscope:\n");  
+                                sprintf(rc, "Upscope:\n");
                                 }
 			}
 		}
@@ -221,16 +221,16 @@ for(;;)
 					default:	break;
 					}
 				}
-                        else             
+                        else
                         if(!strncmp(vht, "vhdl_", 5))
                                 {
-                                switch(vht[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 '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;
@@ -397,7 +397,7 @@ while(((*wbuf)[*len] != 1) && !feof(f))
 	*wbuf = realloc_2(*wbuf, (*len) * 2 + 1);
 	(*wbuf)[(*len) * 2] = 1;
 
-	fgets_rc = fgets(*wbuf + (*len), (*len) + 1, f);	
+	fgets_rc = fgets(*wbuf + (*len), (*len) + 1, f);
 	*len = 2 * (*len);
 	}
 
@@ -430,7 +430,7 @@ for(i=0;i<len;i++)
         }
 
 return(val);
-}  
+}
 
 int pack_type = FST_WR_PT_LZ4;  /* set to fstWriterPackType */
 int compression_explicitly_set = 0;
@@ -610,7 +610,7 @@ while(!feof(f))
 					vartype = FST_VT_VCD_REALTIME;
 					}
 				break;
-				
+
 			case 'p':
 				if(!strcmp(st, "parameter"))
 					{
@@ -625,12 +625,12 @@ while(!feof(f))
 				break;
 
 			case 'i':
-				if(!strcmp(st, "integer"))		
+				if(!strcmp(st, "integer"))
 					{
 					vartype = FST_VT_VCD_INTEGER;
 					}
 				else
-				if(!strcmp(st, "int"))		
+				if(!strcmp(st, "int"))
 					{
 					vartype = FST_VT_SV_INT;
 					}
@@ -638,12 +638,12 @@ while(!feof(f))
 
 			case 'e':
 				if(!strcmp(st, "event"))
-					{	
+					{
 					vartype = FST_VT_VCD_EVENT;
 					}
 				else
 				if(!strcmp(st, "enum"))
-					{	
+					{
 					vartype = FST_VT_SV_ENUM;
 					}
 				break;
@@ -673,32 +673,32 @@ while(!feof(f))
 				break;
 
 			case 's':
-				if(!strcmp(st, "supply1"))		
+				if(!strcmp(st, "supply1"))
 					{
 					vartype = FST_VT_VCD_SUPPLY1;
 					}
 				else
-				if(!strcmp(st, "supply0"))		
+				if(!strcmp(st, "supply0"))
 					{
 					vartype = FST_VT_VCD_SUPPLY0;
 					}
 				else
-				if(!strcmp(st, "string"))		
+				if(!strcmp(st, "string"))
 					{
 					vartype = FST_VT_GEN_STRING;
 					}
 				else
-				if(!strcmp(st, "shortint"))		
+				if(!strcmp(st, "shortint"))
 					{
 					vartype = FST_VT_SV_SHORTINT;
 					}
 				else
-				if(!strcmp(st, "shortreal"))		
+				if(!strcmp(st, "shortreal"))
 					{
 					vartype = FST_VT_SV_SHORTREAL;
 					}
 				else
-				if(!strcmp(st, "sparray"))		
+				if(!strcmp(st, "sparray"))
 					{
 					vartype = FST_VT_VCD_SPARRAY;
 					}
@@ -742,14 +742,14 @@ while(!feof(f))
 				break;
 
 			default:
-				break;			
+				break;
 			}
 
 		st = strtok(NULL, " \t");
 		len = atoi(st);
 		switch(vartype)
 			{
-			case FST_VT_VCD_PORT: 
+			case FST_VT_VCD_PORT:
 				if(*st == '[') /* VCS extension, so reparse */
 					{
 					int p_hi = atoi(st+1);
@@ -770,11 +770,11 @@ while(!feof(f))
 						}
 					}
 
-				len = (len * 3) + 2; 
+				len = (len * 3) + 2;
 				break;
 			case FST_VT_GEN_STRING: len = 0; break;
 			case FST_VT_VCD_EVENT: len = (len != 0) ? len : 1;  break;
-			default: 
+			default:
 				if(len == 0) { len = 1; }
 				break;
 			}
@@ -805,7 +805,7 @@ while(!feof(f))
 				{
 				*(st-1) = ' ';
 				}
-	
+
 			node = jrb_find_int(vcd_ids, hash);
 			if(!node)
 				{
@@ -1083,7 +1083,7 @@ while(!feof(f))
                                 {
                                 break;
                                 }
-                        line++;             
+                        line++;
 			sscanf(buf, "%"SCNd64, &tzero);
                         }
 
@@ -1167,7 +1167,7 @@ while(!feof(f))
 					else
 					{
 					break;
-					}					
+					}
 				}
 			if(strlen(pnt)) { found = 1; }
 			}
@@ -1184,12 +1184,12 @@ while(!feof(f))
 					else
 					{
 					break;
-					}					
+					}
 				}
 			if(strlen(pnt) > 3) { found = 1; }
 			}
-		
-		if(!found)		
+
+		if(!found)
 			{
 			ss = getline_replace(&wbuf, &buf, &glen, f);
 			if(!ss)
@@ -1223,9 +1223,9 @@ while(!feof(f))
 					else
 					{
 					break;
-					}					
+					}
 				}
-                        }           
+                        }
 			else
 			{
 			ss = getline_replace(&wbuf, &buf, &glen, f);
@@ -1461,7 +1461,7 @@ for(;;) /* was while(!feof(f)) */
 				*(pnt++) = pchar = *(src++);
 				}
 			*pnt = 0;
-			
+
 			sp = strchr(bin_fixbuff, ' ');
 			if(!sp) break;
 			sp = strchr(sp+1, ' ');
@@ -1495,7 +1495,7 @@ for(;;) /* was while(!feof(f)) */
 			hash = vcdid_hash(sp+1, nl - (sp+1));
 			if(!hash_kill)
 				{
-		                sscanf(buf+1,"%lg",&doub); 
+		                sscanf(buf+1,"%lg",&doub);
 				fstWriterEmitValueChange(ctx, hash, &doub);
 				}
 				else
@@ -1503,7 +1503,7 @@ for(;;) /* was while(!feof(f)) */
 				node = jrb_find_int(vcd_ids, hash);
 				if(node)
 					{
-			                sscanf(buf+1,"%lg",&doub); 
+			                sscanf(buf+1,"%lg",&doub);
 					fstWriterEmitValueChange(ctx, node->val.i, &doub);
 					}
 					else
@@ -1587,8 +1587,8 @@ free(bin_fixbuff); bin_fixbuff = NULL;
 free(wbuf); wbuf = NULL;
 free(node_len_array); node_len_array = NULL;
 
-if(f != stdin) 
-	{ 
+if(f != stdin)
+	{
 	if(is_popen)
 		{
 		pclose(f);
@@ -1638,7 +1638,7 @@ for(i=0;i<slen;i++)
 #endif
 
 
-#ifdef __linux__ 
+#ifdef __linux__
 printf(
 "Usage: %s [OPTION]... [VCDFILE] [FSTFILE]\n\n"
 #ifdef VCD2FST_EXTLOADERS_CONV
@@ -1706,7 +1706,7 @@ while (1)
         {
 #ifdef __linux__
         int option_index = 0;
-                        
+
         static struct option long_options[] =
                 {
 		{"vcdname", 1, 0, 'v'},
@@ -1717,16 +1717,16 @@ while (1)
 		{"compress", 0, 0, 'c'},
 		{"parallel", 0, 0, 'p'},
                 {"help", 0, 0, 'h'},
-                {0, 0, 0, 0}  
+                {0, 0, 0, 0}
                 };
-                
+
         c = getopt_long (argc, argv, "v:f:ZF4cph", long_options, &option_index);
 #else
         c = getopt      (argc, argv, "v:f:ZF4cph");
 #endif
-                        
+
         if (c == -1) break;     /* no more args */
-                        
+
         switch (c)
                 {
 		case 'v':
@@ -1767,31 +1767,31 @@ while (1)
                 case 'h':
 			print_help(argv[0]);
                         break;
-                        
+
                 case '?':
                         opt_errors_encountered=1;
                         break;
-                        
+
                 default:
                         /* unreachable */
                         break;
                 }
         }
-                        
+
 if(opt_errors_encountered)
         {
         print_help(argv[0]);
         }
 
 if (optind < argc)
-        {               
+        {
         while (optind < argc)
                 {
                 if(!vname)
                         {
                         vname = malloc(strlen(argv[optind])+1);
                         strcpy(vname, argv[optind++]);
-                        } 
+                        }
                 else if(!lxname)
                         {
                         lxname = malloc(strlen(argv[optind])+1);
@@ -1803,7 +1803,7 @@ if (optind < argc)
 			}
                 }
         }
-                        
+
 if((!vname)||(!lxname))
         {
         print_help(argv[0]);
diff --git a/src/helpers/vcd2lxt.c b/src/helpers/vcd2lxt.c
index 82f8eb5..db0efed 100644
--- a/src/helpers/vcd2lxt.c
+++ b/src/helpers/vcd2lxt.c
@@ -3,19 +3,19 @@
  *
  * 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: 
+ * 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   
+ * 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   
+ * 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.
  */
@@ -30,7 +30,7 @@
  */
 
 
-/* AIX may need this for alloca to work */ 
+/* AIX may need this for alloca to work */
 #if defined _AIX
   #pragma alloca
 #endif
@@ -85,7 +85,7 @@ static int slisthier_len=0;
 
 enum Tokens   { T_VAR, T_END, T_SCOPE, T_UPSCOPE,
 		T_COMMENT, T_DATE, T_DUMPALL, T_DUMPOFF, T_DUMPON,
-		T_DUMPVARS, T_ENDDEFINITIONS, 
+		T_DUMPVARS, T_ENDDEFINITIONS,
 		T_DUMPPORTS, T_DUMPPORTSOFF, T_DUMPPORTSON, T_DUMPPORTSALL,
 		T_TIMESCALE, T_VERSION, T_VCDCLOSE, T_TIMEZERO,
 		T_EOF, T_STRING, T_UNKNOWN_KEY };
@@ -241,7 +241,7 @@ static void alias_vs_normal_symadd(struct vcdsymbol *v, struct vcdsymbol *root_v
 {
 if(!v) return; /* scan-build : should never happen */
 
-if(!root_v) 
+if(!root_v)
 	{
 	if((v->vartype==V_INTEGER)||(v->vartype==V_REAL))
 		{
@@ -296,19 +296,19 @@ struct vcdsymbol **pnt;
 unsigned int vcd_distance;
 struct vcdsymbol *root_v;
 int i;
-                
+
 if(numsyms)
         {
         vcd_distance = vcd_maxid - vcd_minid + 1;
-                         
+
         if(vcd_distance <= 8 * 1024 * 1024)
                 {
                 indexed = (struct vcdsymbol **)calloc_2(vcd_distance, sizeof(struct vcdsymbol *));
-                        
+
                 printf("%d symbols span ID range of %d, using indexing...\n", numsyms, vcd_distance);
-                        
+
                 v=vcdsymroot;
-                while(v) 
+                while(v)
                         {
                         if(!(root_v=indexed[v->nid - vcd_minid]))
                                 {
@@ -328,9 +328,9 @@ if(numsyms)
                         *(pnt++)=v;
                         v=v->next;
                         }
-                
+
                 qsort(sorted, numsyms, sizeof(struct vcdsymbol *), vcdsymcompare);
-                 
+
                 root_v = NULL;
                 for(i=0;i<numsyms;i++)
                         {
@@ -340,7 +340,7 @@ if(numsyms)
                 }
 
         v=vcdsymroot;
-        while(v) 
+        while(v)
                 {
 		free(v->name); v->name = NULL;
                 v=v->next;
@@ -407,7 +407,7 @@ for(;;)
 	if(ch<=' ') continue;	/* val<=' ' is a quick whitespace check      */
 	break;			/* (take advantage of fact that vcd is text) */
 	}
-if(ch=='$') 
+if(ch=='$')
 	{
 	yytext[len++]=ch;
 	for(;;)
@@ -434,7 +434,7 @@ for(yytext[len++]=ch;;yytext[len++]=ch)
 	}
 yytext[len]=0;	/* terminator */
 
-if(is_string) 
+if(is_string)
 	{
 	yylen=len;
 	return(T_STRING);
@@ -462,7 +462,7 @@ static int get_vartoken_patched(int match_kw)
 {
 int ch;
 int i, len=0;
-        
+
 if(!var_prevch)
         {
         for(;;)
@@ -470,7 +470,7 @@ if(!var_prevch)
                 ch=getch_patched();
                 if(ch<0) { free_2(varsplit); varsplit=NULL; return(V_END); }
                 if((ch==' ')||(ch=='\t')||(ch=='\n')||(ch=='\r')) continue;
-                break;   
+                break;
                 }
         }
         else
@@ -478,11 +478,11 @@ if(!var_prevch)
         ch=var_prevch;
         var_prevch=0;
         }
-                 
+
 if(ch=='[') return(V_LB);
 if(ch==':') return(V_COLON);
 if(ch==']') return(V_RB);
- 
+
 for(yytext[len++]=ch;;yytext[len++]=ch)
         {
         if(len==T_MAX_STR)
@@ -498,7 +498,7 @@ for(yytext[len++]=ch;;yytext[len++]=ch)
                 }
         }
 yytext[len]=0;  /* terminator */
-                
+
 if(match_kw)
 for(i=0;i<NUM_VTOKENS;i++)
         {
@@ -523,11 +523,11 @@ int i, len=0;
 if(varsplit)
         {
         int rc=get_vartoken_patched(match_kw);
-        if(rc!=V_END) return(rc);  
+        if(rc!=V_END) return(rc);
         var_prevch=0;
         }
-                
-if(!var_prevch)  
+
+if(!var_prevch)
         {
         for(;;)
                 {
@@ -542,16 +542,16 @@ if(!var_prevch)
         ch=var_prevch;
         var_prevch=0;
         }
-                 
+
 if(ch=='[') return(V_LB);
 if(ch==':') return(V_COLON);
-if(ch==']') return(V_RB);  
+if(ch==']') return(V_RB);
 
 if(ch=='#')     /* for MTI System Verilog '$var reg 64 >w #implicit-var###VarElem:ram_di[0.0] [63:0] $end' style declarations */
         {       /* debussy simply escapes until the space */
         yytext[len++]= '\\';
         }
-        
+
 for(yytext[len++]=ch;;yytext[len++]=ch)
         {
         if(len==T_MAX_STR)
@@ -600,7 +600,7 @@ if((varsplit)&&(yytext[len-1]==']'))
         {
         varsplit=NULL;
         }
-        
+
 if(match_kw)
 for(i=0;i<NUM_VTOKENS;i++)
         {
@@ -634,7 +634,7 @@ if(!var_prevch)
       ch=var_prevch;
       var_prevch=0;
       }
-      
+
 for(yytext[len++]=ch;;yytext[len++]=ch)
       {
 	if(len==T_MAX_STR)
@@ -661,7 +661,7 @@ for(;;)
 	if((tok==T_END)||(tok==T_EOF)) break;
 	if(hdr) { DEBUG(fprintf(stderr," %s",yytext)); }
 	}
-if(hdr) { DEBUG(fprintf(stderr,"\n")); } 
+if(hdr) { DEBUG(fprintf(stderr,"\n")); }
 }
 
 static char *build_slisthier(void)
@@ -753,7 +753,7 @@ switch(yytext[0])
 	case '-':
 		if(yylen>1)
 			{
-			v=bsearch_vcd(yytext+1, yylen-1);	
+			v=bsearch_vcd(yytext+1, yylen-1);
 			if(!v)
 				{
 				fprintf(stderr,"Near line %d, Unknown VCD identifier: '%s'\n",vcdlineno,yytext+1);
@@ -802,12 +802,12 @@ switch(yytext[0])
 	case 'b':
 	case 'B':
 		/* extract binary number then.. */
-		vector=malloc_2(yylen_cache=yylen); 
+		vector=malloc_2(yylen_cache=yylen);
 		strcpy(vector,yytext+1);
 		vlen=yylen-1;
 
 		get_strtoken();
-		v=bsearch_vcd(yytext, yylen);	
+		v=bsearch_vcd(yytext, yylen);
 		if(!v)
 			{
 			fprintf(stderr,"Near line %d, Unknown identifier: '%s'\n",vcdlineno, yytext);
@@ -822,7 +822,7 @@ switch(yytext[0])
 
 				extend=(vector[0]=='1')?'0':vector[0];
 
-				fill=v->size-vlen;				
+				fill=v->size-vlen;
 				for(i=0;i<fill;i++)
 					{
 					v->value[i]=extend;
@@ -865,20 +865,20 @@ switch(yytext[0])
 				}
 
 			}
-			
+
 		break;
 
 
 	case 'p':
 		/* extract port dump value.. */
-		vector=malloc_2(yylen_cache=yylen); 
+		vector=malloc_2(yylen_cache=yylen);
 		strcpy(vector,yytext+1);
 		vlen=yylen-1;
 
 		get_strtoken();	/* throw away 0_strength_component */
 		get_strtoken(); /* throw away 0_strength_component */
 		get_strtoken(); /* this is the id                  */
-		v=bsearch_vcd(yytext, yylen);	
+		v=bsearch_vcd(yytext, yylen);
 		if(!v)
 			{
 			fprintf(stderr,"Near line %d, Unknown identifier: '%s'\n",vcdlineno, yytext);
@@ -893,7 +893,7 @@ switch(yytext[0])
 
 				extend='0';
 
-				fill=v->size-vlen;				
+				fill=v->size-vlen;
 				for(i=0;i<fill;i++)
 					{
 					v->value[i]=extend;
@@ -947,10 +947,10 @@ switch(yytext[0])
 		*d = 0;
 		sscanf(yytext+1,"%lg",d);
 		errno = 0;
-		
+
 		get_strtoken();
 
-		v=bsearch_vcd(yytext, yylen);	
+		v=bsearch_vcd(yytext, yylen);
 		if(!v)
 			{
 			fprintf(stderr,"Near line %d, Unknown identifier: '%s'\n",vcdlineno, yytext);
@@ -995,7 +995,7 @@ while((ch=*src))
 			*dst=vcd[i];
 			break;
 			}
-		}	
+		}
 	if(i==23) *dst='x';
 
 	src++;
@@ -1058,7 +1058,7 @@ for(;;)
 				{
 				vtok=get_token();
 				if((vtok==T_END)||(vtok==T_EOF)) break;
-				prefix=yytext[0];		
+				prefix=yytext[0];
 				}
 			switch(prefix)
 				{
@@ -1158,7 +1158,7 @@ for(;;)
 					v->size=atoi_64(yytext);
 					if(!v->size) v->size=1;
 					}
-					else 
+					else
 					if(vtok==V_LB)
 					{
 					vtok=get_vartoken(1);
@@ -1244,7 +1244,7 @@ for(;;)
 					v->name=(char *)malloc_2(yylen+1);
 					strcpy(v->name,yytext);
 					}
-				
+
 				vtok=get_vartoken(1);
 				if(vtok==V_END) goto dumpv;
 				if(vtok!=V_LB) goto err;
@@ -1276,14 +1276,14 @@ for(;;)
 			else
 			if((v->size>1)&&(v->msi<=0)&&(v->lsi<=0))
 				{
-				if(v->vartype==V_EVENT) 
+				if(v->vartype==V_EVENT)
 					{
 					v->size=1;
 					}
 					else
 					{
 					/* any criteria for the direction here? */
-					v->msi=v->size-1;	
+					v->msi=v->size-1;
 					v->lsi=0;
 					}
 				}
@@ -1294,7 +1294,7 @@ for(;;)
 				v->size=v->msi-v->lsi+1;
 				}
 			else
-			if((v->lsi>=v->msi)&&((v->lsi-v->msi+1)!=v->size)) 
+			if((v->lsi>=v->msi)&&((v->lsi-v->msi+1)!=v->size))
 				{
 				if(v->vartype!=V_EVENT) goto err;
 				v->size=v->msi-v->lsi+1;
@@ -1321,9 +1321,9 @@ for(;;)
 				struct queuedevent *q;
 				v->ev=q=(struct queuedevent *)calloc_2(1,sizeof(struct queuedevent));
 				q->sym=v;
-				q->last_event_time=-1;		
+				q->last_event_time=-1;
 				q->next=queuedevents;
-				queuedevents=q;		
+				queuedevents=q;
 				}
 
 			if(!vcdsymroot)
@@ -1358,7 +1358,7 @@ for(;;)
 #endif
 
 			DEBUG(fprintf(stderr,"VAR %s %d %s %s[%d:%d]\n",
-				vartypes[v->vartype], v->size, v->id, v->name, 
+				vartypes[v->vartype], v->size, v->id, v->name,
 					v->msi, v->lsi));
 			goto bail;
 			err:
@@ -1396,7 +1396,7 @@ for(;;)
 					{
 					TimeType t_time;
 					t_time=atoi_64(yytext+1);
-					
+
 					if(start_time<0)
 						{
 						start_time=t_time;
@@ -1404,7 +1404,7 @@ for(;;)
 
 					if(t_time < current_time) /* avoid backtracking time counts which can happen on malformed files */
 						{
-						t_time = current_time; 
+						t_time = current_time;
 						}
 
                                         current_time=t_time;
@@ -1431,9 +1431,9 @@ for(;;)
 			break;
 		case T_DUMPVARS:
 		case T_DUMPPORTS:
-                        if(current_time<0)  
+                        if(current_time<0)
                                 { start_time=current_time=end_time=0; lt_set_time(lt, current_time); }
-                        break;  
+                        break;
                 case T_VCDCLOSE:
                         sync_end("VCDCLOSE:");
                         break;  /* next token will be '#' time related followed by $end */
@@ -1491,10 +1491,10 @@ if(ch=='g')	/* real number */
 		he=(struct HistEnt *)calloc_2(1,sizeof(struct HistEnt));
 	        he->time=-1;
 	        he->v.vector=NULL;
-	
+
 		n->curr=he;
 		n->head.next=he;
-	
+
 		add_histent(t_time,n,ch,regadd, vector);
 		}
 		else
@@ -1510,16 +1510,16 @@ if(ch=='g')	/* real number */
 		he=(struct HistEnt *)calloc_2(1,sizeof(struct HistEnt));
 	        he->time=-1;
 	        he->v.vector=NULL;
-	
+
 		n->curr=he;
 		n->head.next=he;
-	
+
 		add_histent(t_time,n,ch,regadd, vector);
 		}
 		else
 		{
 		int i, nlen;
-	
+
 		nlen = strlen(vector);
 		if(nlen)
 			{
@@ -1527,7 +1527,7 @@ if(ch=='g')	/* real number */
 			for(i=0;i<nlen;i++)
 				{
 				if(toupper((int)(unsigned char)vector[i])!=deadchar)
-					{	
+					{
 					n->notdead=1;
 					return;
 					}
@@ -1546,7 +1546,7 @@ static void add_tail_histents(void)
 struct queuedevent *q;
 q=queuedevents;
 while(q)
-	{	
+	{
 	struct vcdsymbol *v;
 
 	v=q->sym;
@@ -1554,7 +1554,7 @@ while(q)
 		{
 		/* dump degating event */
 		DEBUG(fprintf(stderr,"#"TTFormat" %s = '%c' (event)\n",v->ev->last_event_time+1,v->name,'0'));
-		add_histent(v->ev->last_event_time+1,v->narray[0],'0',1, NULL);	
+		add_histent(v->ev->last_event_time+1,v->narray[0],'0',1, NULL);
 		}
 	q=q->next;
 	}
@@ -1571,7 +1571,7 @@ curnode=firstnode;
 for(i=0;i<numfacs;i++)
         {
         char *subst, ch;
-                 
+
         facs[i]=curnode;
 	subst=curnode->name;
         curnode=curnode->nextinaet;
@@ -1586,7 +1586,7 @@ quicksort(facs,0,numfacs-1);
 for(i=0;i<numfacs;i++)
         {
         char *subst, ch;
-         
+
         subst=facs[i]->name;
         while((ch=(*subst)))
                 {
@@ -1596,9 +1596,9 @@ for(i=0;i<numfacs;i++)
 	}
 
 for(i=0;i<numfacs;i++)
-	{        
+	{
 	struct Node *n;
-	int do_indent;	
+	int do_indent;
 
 	if(!facs[i]->n->substnode)
 		{
@@ -1702,10 +1702,10 @@ sym=(struct symbol **)calloc_2(SYMPRIME,sizeof(struct symbol *));
 printf("\nConverting VCD File '%s' to LXT file '%s'...\n\n",(vcd_handle!=stdin)?fname:"from stdin", lxname);
 build_slisthier();
 vcd_parse(linear);
-if(varsplit) 
-	{ 
-	free_2(varsplit); 
-	varsplit=NULL; 
+if(varsplit)
+	{
+	free_2(varsplit);
+	varsplit=NULL;
 	}
 
 add_tail_histents();
@@ -1737,19 +1737,19 @@ if(indexed) { free(indexed); indexed=NULL; }
 if(sorted) { free(sorted); sorted=NULL; }
 
 v=vcdsymroot;
-while(v) 
+while(v)
         {
         if(v->name) { free(v->name); v->name=NULL; }
         if(v->id) { free(v->id); v->id=NULL; }
         if(v->value) { free(v->value); v->value=NULL; }
-        
+
         if(v->narray)
                 {
                 int i;
                 for(i=0;i<v->size;i++)
                         {
                         struct HistEnt *h1, *h2;
-         
+
                         if((h1 = v->narray[i]->head.next))
                                 {
                                 while(h1)
@@ -1762,18 +1762,18 @@ while(v)
 
                         free(v->narray[i]); v->narray[i]=NULL;
                         }
-                
+
                 free(v->narray); v->narray=NULL;
                 }
-         
+
         v2=v->next;
         free(v);
         v=v2;
         }
 vcdsymroot=vcdsymcurr=NULL;
-                    
-free(sym); sym=NULL;  
-                
+
+free(sym); sym=NULL;
+
 if(slisthier) { free(slisthier); slisthier=NULL; }
 
 return(max_time);
@@ -1835,26 +1835,26 @@ struct symbol *temp;
                 if(!temp->next) break;
                 temp=temp->next;
                 }
-  
+
         return(NULL); /* not found, add here if you want to add*/
 }
 
-int sigcmp(char *s1, char *s2)         
+int sigcmp(char *s1, char *s2)
 {
 unsigned char c1, c2;
 int u1, u2;
-                                
+
 for(;;)
         {
         c1=(unsigned char)*(s1++);
         c2=(unsigned char)*(s2++);
-                
+
         if((!c1)&&(!c2)) return(0);
         if((c1<='9')&&(c2<='9')&&(c2>='0')&&(c1>='0'))
                 {
                 u1=(int)(c1&15);
                 u2=(int)(c2&15);
-                
+
                 while(((c2=(unsigned char)*s2)>='0')&&(c2<='9'))
                         {
                         u2*=10;
@@ -1868,7 +1868,7 @@ for(;;)
                         u1+=(unsigned int)(c2&15);
                         s1++;
                         }
-        
+
                 if(u1==u2) continue;
                         else return((int)u1-(int)u2);
                 }
@@ -1876,7 +1876,7 @@ for(;;)
                 {
                 if(c1!=c2) return((int)c1-(int)c2);
                 }
-        }       
+        }
 }
 
 
@@ -1884,11 +1884,11 @@ int partition(struct symbol **a, int p, int r)
 {
 struct symbol *x, *t;
 int i,j;
-                
+
 x=a[p];
 i=p-1;
 j=r+1;
-                 
+
 while(1)
         {
         do
@@ -1899,12 +1899,12 @@ while(1)
         do      {
                 i++;
                 } while(sigcmp(a[i]->name,x->name)<0);
- 
+
         if(i<j)
                 {
                 t=a[i];
                 a[i]=a[j];
-                a[j]=t; 
+                a[j]=t;
                 }
                 else
                 {
@@ -1942,7 +1942,7 @@ if(argc>=3)
 		else if(!strcmp(argv[i], "-clockpack")) doclock = 1;
 		else if(!strcmp(argv[i], "-chgpack")) dochg = 1;
 		else if(!strcmp(argv[i], "-linear")) linear = 1;
-		else if(!strcmp(argv[i], "-dictpack")) 
+		else if(!strcmp(argv[i], "-dictpack"))
 			{
 			if((i!=(argc-1))&&(argv[i+1][0]!='-'))
 				{
diff --git a/src/helpers/vcd2lxt2.c b/src/helpers/vcd2lxt2.c
index 3422a64..dcfacf3 100644
--- a/src/helpers/vcd2lxt2.c
+++ b/src/helpers/vcd2lxt2.c
@@ -3,19 +3,19 @@
  *
  * 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: 
+ * 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   
+ * 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   
+ * 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.
  */
@@ -91,7 +91,7 @@ static int slisthier_len=0;
 
 enum Tokens   { T_VAR, T_END, T_SCOPE, T_UPSCOPE,
 		T_COMMENT, T_DATE, T_DUMPALL, T_DUMPOFF, T_DUMPON,
-		T_DUMPVARS, T_ENDDEFINITIONS, 
+		T_DUMPVARS, T_ENDDEFINITIONS,
 		T_DUMPPORTS, T_DUMPPORTSOFF, T_DUMPPORTSON, T_DUMPPORTSALL,
 		T_TIMESCALE, T_VERSION, T_VCDCLOSE, T_TIMEZERO,
 		T_EOF, T_STRING, T_UNKNOWN_KEY };
@@ -247,7 +247,7 @@ static void alias_vs_normal_symadd(struct vcdsymbol *v, struct vcdsymbol *root_v
 {
 if(!v) return; /* scan-build : should never happen */
 
-if(!root_v) 
+if(!root_v)
 	{
 	if((v->vartype==V_INTEGER)||(v->vartype==V_REAL))
 		{
@@ -315,7 +315,7 @@ if(numsyms)
 		v=vcdsymroot;
 		while(v)
 			{
-			if(!(root_v=indexed[v->nid - vcd_minid])) 
+			if(!(root_v=indexed[v->nid - vcd_minid]))
 				{
 				indexed[v->nid - vcd_minid] = v;
 				}
@@ -333,7 +333,7 @@ if(numsyms)
 			*(pnt++)=v;
 			v=v->next;
 			}
-	
+
 		qsort(sorted, numsyms, sizeof(struct vcdsymbol *), vcdsymcompare);
 
 		root_v = NULL;
@@ -346,7 +346,7 @@ if(numsyms)
 
         v=vcdsymroot;
         while(v)
-                {                
+                {
                 free(v->name); v->name = NULL;
                 v=v->next;
                 }
@@ -368,12 +368,12 @@ return(((ch==EOF)||(errno))?(-1):(ch));
 }
 
 static int getch_peek(void)
-{ 
+{
 int ch;
 
 ch=fgetc(vcd_handle);
 ungetc(ch, vcd_handle);
-return(((ch==EOF)||(errno))?(-1):(ch));   
+return(((ch==EOF)||(errno))?(-1):(ch));
 }
 
 
@@ -412,7 +412,7 @@ for(;;)
 	if(ch<=' ') continue;	/* val<=' ' is a quick whitespace check      */
 	break;			/* (take advantage of fact that vcd is text) */
 	}
-if(ch=='$') 
+if(ch=='$')
 	{
 	yytext[len++]=ch;
 	for(;;)
@@ -439,7 +439,7 @@ for(yytext[len++]=ch;;yytext[len++]=ch)
 	}
 yytext[len]=0;	/* terminator */
 
-if(is_string) 
+if(is_string)
 	{
 	yylen=len;
 	return(T_STRING);
@@ -467,7 +467,7 @@ static int get_vartoken_patched(int match_kw)
 {
 int ch;
 int i, len=0;
-        
+
 if(!var_prevch)
         {
         for(;;)
@@ -475,7 +475,7 @@ if(!var_prevch)
                 ch=getch_patched();
                 if(ch<0) { free_2(varsplit); varsplit=NULL; return(V_END); }
                 if((ch==' ')||(ch=='\t')||(ch=='\n')||(ch=='\r')) continue;
-                break;   
+                break;
                 }
         }
         else
@@ -483,11 +483,11 @@ if(!var_prevch)
         ch=var_prevch;
         var_prevch=0;
         }
-                 
+
 if(ch=='[') return(V_LB);
 if(ch==':') return(V_COLON);
 if(ch==']') return(V_RB);
- 
+
 for(yytext[len++]=ch;;yytext[len++]=ch)
         {
         if(len==T_MAX_STR)
@@ -503,7 +503,7 @@ for(yytext[len++]=ch;;yytext[len++]=ch)
                 }
         }
 yytext[len]=0;  /* terminator */
-                
+
 if(match_kw)
 for(i=0;i<NUM_VTOKENS;i++)
         {
@@ -528,11 +528,11 @@ int i, len=0;
 if(varsplit)
         {
         int rc=get_vartoken_patched(match_kw);
-        if(rc!=V_END) return(rc);  
+        if(rc!=V_END) return(rc);
         var_prevch=0;
         }
-                
-if(!var_prevch)  
+
+if(!var_prevch)
         {
         for(;;)
                 {
@@ -547,16 +547,16 @@ if(!var_prevch)
         ch=var_prevch;
         var_prevch=0;
         }
-                 
+
 if(ch=='[') return(V_LB);
 if(ch==':') return(V_COLON);
-if(ch==']') return(V_RB);  
+if(ch==']') return(V_RB);
 
 if(ch=='#')     /* for MTI System Verilog '$var reg 64 >w #implicit-var###VarElem:ram_di[0.0] [63:0] $end' style declarations */
         {       /* debussy simply escapes until the space */
         yytext[len++]= '\\';
         }
-        
+
 for(yytext[len++]=ch;;yytext[len++]=ch)
         {
         if(len==T_MAX_STR)
@@ -564,7 +564,7 @@ for(yytext[len++]=ch;;yytext[len++]=ch)
                 yytext=(char *)realloc_2(yytext, (T_MAX_STR=T_MAX_STR*2)+1);
                 }
 
-        ch=getch();  
+        ch=getch();
         if(ch==' ')
                 {
                 if(match_kw) break;
@@ -606,7 +606,7 @@ if((varsplit)&&(yytext[len-1]==']'))
         varsplit=NULL;
         }
 
-if(match_kw)        
+if(match_kw)
 for(i=0;i<NUM_VTOKENS;i++)
         {
         if(!strcmp(yytext,vartypes[i]))
@@ -639,7 +639,7 @@ if(!var_prevch)
       ch=var_prevch;
       var_prevch=0;
       }
-      
+
 for(yytext[len++]=ch;;yytext[len++]=ch)
       {
 	if(len==T_MAX_STR)
@@ -664,7 +664,7 @@ for(;;)
 	{
 	tok=get_token();
 	if((tok==T_END)||(tok==T_EOF)) break;
-	if(hdr) { DEBUG(fprintf(stderr," %s",yytext)); } 
+	if(hdr) { DEBUG(fprintf(stderr," %s",yytext)); }
 	}
 if(hdr) { DEBUG(fprintf(stderr,"\n")); }
 }
@@ -758,7 +758,7 @@ switch(yytext[0])
         case '-':
 		if(yylen>1)
 			{
-			v=bsearch_vcd(yytext+1, yylen-1);	
+			v=bsearch_vcd(yytext+1, yylen-1);
 			if(!v)
 				{
 				fprintf(stderr,"Near line %d, Unknown VCD identifier: '%s'\n",vcdlineno,yytext+1);
@@ -807,12 +807,12 @@ switch(yytext[0])
 	case 'b':
 	case 'B':
 		/* extract binary number then.. */
-		vector=malloc_2(yylen_cache=yylen); 
+		vector=malloc_2(yylen_cache=yylen);
 		strcpy(vector,yytext+1);
 		vlen=yylen-1;
 
 		get_strtoken();
-		v=bsearch_vcd(yytext, yylen);	
+		v=bsearch_vcd(yytext, yylen);
 		if(!v)
 			{
 			fprintf(stderr,"Near line %d, Unknown identifier: '%s'\n",vcdlineno, yytext);
@@ -827,7 +827,7 @@ switch(yytext[0])
 
 				extend=(vector[0]=='1')?'0':vector[0];
 
-				fill=v->size-vlen;				
+				fill=v->size-vlen;
 				for(i=0;i<fill;i++)
 					{
 					v->value[i]=extend;
@@ -870,20 +870,20 @@ switch(yytext[0])
 				}
 
 			}
-			
+
 		break;
 
 
 	case 'p':
 		/* extract port dump value.. */
-		vector=malloc_2(yylen_cache=yylen); 
+		vector=malloc_2(yylen_cache=yylen);
 		strcpy(vector,yytext+1);
 		vlen=yylen-1;
 
 		get_strtoken();	/* throw away 0_strength_component */
 		get_strtoken(); /* throw away 0_strength_component */
 		get_strtoken(); /* this is the id                  */
-		v=bsearch_vcd(yytext, yylen);	
+		v=bsearch_vcd(yytext, yylen);
 		if(!v)
 			{
 			fprintf(stderr,"Near line %d, Unknown identifier: '%s'\n",vcdlineno, yytext);
@@ -898,7 +898,7 @@ switch(yytext[0])
 
 				extend='0';
 
-				fill=v->size-vlen;				
+				fill=v->size-vlen;
 				for(i=0;i<fill;i++)
 					{
 					v->value[i]=extend;
@@ -952,9 +952,9 @@ switch(yytext[0])
 		*d = 0;
 		sscanf(yytext+1,"%lg",d);
 		errno = 0;
-		
+
 		get_strtoken();
-		v=bsearch_vcd(yytext, yylen);	
+		v=bsearch_vcd(yytext, yylen);
 		if(!v)
 			{
 			fprintf(stderr,"Near line %d, Unknown identifier: '%s'\n",vcdlineno, yytext);
@@ -998,7 +998,7 @@ while((ch=*src))
 			*dst=vcd[i];
 			break;
 			}
-		}	
+		}
 	if(i==23) *dst='x';
 
 	src++;
@@ -1030,7 +1030,7 @@ for(;;)
                         {
                         int vtok=get_token();
                         if((vtok==T_END)||(vtok==T_EOF)) break;
-                        time_zero=atoi_64(yytext);                 
+                        time_zero=atoi_64(yytext);
                         lxt2_wr_set_timezero(lt, time_zero);
                         sync_end(NULL);
                         }
@@ -1047,7 +1047,7 @@ for(;;)
 			time_scale=atoi_64(yytext);
 			if(!time_scale) time_scale=1;
 			else if (time_scale == 10) timelogadjust = +1;
-			else if (time_scale == 100) timelogadjust = +2;			
+			else if (time_scale == 100) timelogadjust = +2;
 			for(i=0;i<yylen;i++)
 				{
 				if((yytext[i]<'0')||(yytext[i]>'9'))
@@ -1060,7 +1060,7 @@ for(;;)
 				{
 				vtok=get_token();
 				if((vtok==T_END)||(vtok==T_EOF)) break;
-				prefix=yytext[0];		
+				prefix=yytext[0];
 				}
 			switch(prefix)
 				{
@@ -1160,7 +1160,7 @@ for(;;)
 					v->size=atoi_64(yytext);
 					if(!v->size) v->size=1;
 					}
-					else 
+					else
 					if(vtok==V_LB)
 					{
 					vtok=get_vartoken(1);
@@ -1246,7 +1246,7 @@ for(;;)
 					v->name=(char *)malloc_2(yylen+1);
 					strcpy(v->name,yytext);
 					}
-				
+
 				vtok=get_vartoken(1);
 				if(vtok==V_END) goto dumpv;
 				if(vtok!=V_LB) goto err;
@@ -1278,14 +1278,14 @@ for(;;)
 			else
 			if((v->size>1)&&(v->msi<=0)&&(v->lsi<=0))
 				{
-				if(v->vartype==V_EVENT) 
+				if(v->vartype==V_EVENT)
 					{
 					v->size=1;
 					}
 					else
 					{
 					/* any criteria for the direction here? */
-					v->msi=v->size-1;	
+					v->msi=v->size-1;
 					v->lsi=0;
 					}
 				}
@@ -1296,7 +1296,7 @@ for(;;)
 				v->size=v->msi-v->lsi+1;
 				}
 			else
-			if((v->lsi>=v->msi)&&((v->lsi-v->msi+1)!=v->size)) 
+			if((v->lsi>=v->msi)&&((v->lsi-v->msi+1)!=v->size))
 				{
 				if(v->vartype!=V_EVENT) goto err;
 				v->size=v->msi-v->lsi+1;
@@ -1323,9 +1323,9 @@ for(;;)
 				struct queuedevent *q;
 				v->ev=q=(struct queuedevent *)calloc_2(1,sizeof(struct queuedevent));
 				q->sym=v;
-				q->last_event_time=-1;		
+				q->last_event_time=-1;
 				q->next=queuedevents;
-				queuedevents=q;		
+				queuedevents=q;
 				}
 
 			if(!vcdsymroot)
@@ -1360,7 +1360,7 @@ for(;;)
 #endif
 
 			DEBUG(fprintf(stderr,"VAR %s %d %s %s[%d:%d]\n",
-				vartypes[v->vartype], v->size, v->id, v->name, 
+				vartypes[v->vartype], v->size, v->id, v->name,
 					v->msi, v->lsi));
 			goto bail;
 			err:
@@ -1396,7 +1396,7 @@ for(;;)
 					{
 					TimeType t_time;
 					t_time=atoi_64(yytext+1);
-					
+
 					if(start_time<0)
 						{
 						start_time=t_time;
@@ -1434,9 +1434,9 @@ for(;;)
 			break;
 		case T_DUMPVARS:
 		case T_DUMPPORTS:
-                        if(current_time<0)  
+                        if(current_time<0)
                                 { start_time=current_time=end_time=0; /* lxt2_wr_set_time(lt, current_time); */ }
-                        break;  
+                        break;
                 case T_VCDCLOSE:
                         sync_end("VCDCLOSE:");
                         break;  /* next token will be '#' time related followed by $end */
@@ -1494,10 +1494,10 @@ if(ch=='g')	/* real number */
 		he=(struct HistEnt *)calloc_2(1,sizeof(struct HistEnt));
 	        he->time=-1;
 	        he->v.vector=NULL;
-	
+
 		n->curr=he;
 		n->head.next=he;
-	
+
 		add_histent(t_time,n,ch,regadd, vector);
 		}
 		else
@@ -1513,16 +1513,16 @@ if(ch=='g')	/* real number */
 		he=(struct HistEnt *)calloc_2(1,sizeof(struct HistEnt));
 	        he->time=-1;
 	        he->v.vector=NULL;
-	
+
 		n->curr=he;
 		n->head.next=he;
-	
+
 		add_histent(t_time,n,ch,regadd, vector);
 		}
 		else
 		{
 		int i, nlen;
-	
+
 		nlen = strlen(vector);
 		if(nlen)
 			{
@@ -1530,7 +1530,7 @@ if(ch=='g')	/* real number */
 			for(i=0;i<nlen;i++)
 				{
 				if(toupper((int)(unsigned char)vector[i])!=deadchar)
-					{	
+					{
 					n->notdead=1;
 					return;
 					}
@@ -1549,7 +1549,7 @@ static void add_tail_histents(void)
 struct queuedevent *q;
 q=queuedevents;
 while(q)
-	{	
+	{
 	struct vcdsymbol *v;
 
 	v=q->sym;
@@ -1557,7 +1557,7 @@ while(q)
 		{
 		/* dump degating event */
 		DEBUG(fprintf(stderr,"#"TTFormat" %s = '%c' (event)\n",v->ev->last_event_time+1,v->name,'0'));
-		add_histent(v->ev->last_event_time+1,v->narray[0],'0',1, NULL);	
+		add_histent(v->ev->last_event_time+1,v->narray[0],'0',1, NULL);
 		}
 	q=q->next;
 	}
@@ -1684,7 +1684,7 @@ while(v)
 
 			if((h1 = v->narray[i]->head.next))
 				{
-				h1 = v->narray[i]->head.next;	
+				h1 = v->narray[i]->head.next;
 				while(h1)
 					{
 					h2 = h1->next;
@@ -1769,26 +1769,26 @@ struct symbol *temp;
                 if(!temp->next) break;
                 temp=temp->next;
                 }
-  
+
         return(NULL); /* not found, add here if you want to add*/
 }
 
-int sigcmp(char *s1, char *s2)         
+int sigcmp(char *s1, char *s2)
 {
 unsigned char c1, c2;
 int u1, u2;
-                                
+
 for(;;)
         {
         c1=(unsigned char)*(s1++);
         c2=(unsigned char)*(s2++);
-                
+
         if((!c1)&&(!c2)) return(0);
         if((c1<='9')&&(c2<='9')&&(c2>='0')&&(c1>='0'))
                 {
                 u1=(int)(c1&15);
                 u2=(int)(c2&15);
-                
+
                 while(((c2=(unsigned char)*s2)>='0')&&(c2<='9'))
                         {
                         u2*=10;
@@ -1802,7 +1802,7 @@ for(;;)
                         u1+=(unsigned int)(c2&15);
                         s1++;
                         }
-        
+
                 if(u1==u2) continue;
                         else return((int)u1-(int)u2);
                 }
@@ -1810,7 +1810,7 @@ for(;;)
                 {
                 if(c1!=c2) return((int)c1-(int)c2);
                 }
-        }       
+        }
 }
 
 
@@ -1818,11 +1818,11 @@ int partition(struct symbol **a, int p, int r)
 {
 struct symbol *x, *t;
 int i,j;
-                
+
 x=a[p];
 i=p-1;
 j=r+1;
-                 
+
 while(1)
         {
         do
@@ -1833,12 +1833,12 @@ while(1)
         do      {
                 i++;
                 } while(sigcmp(a[i]->name,x->name)<0);
- 
+
         if(i<j)
                 {
                 t=a[i];
                 a[i]=a[j];
-                a[j]=t; 
+                a[j]=t;
                 }
                 else
                 {
@@ -1864,7 +1864,7 @@ if(p<r)
 
 void print_help(char *nam)
 {
-#ifdef __linux__ 
+#ifdef __linux__
 printf(
 "Usage: %s [OPTION]... [VCDFILE] [LXT2FILE]\n\n"
 "  -v, --vcdname=FILE         specify VCD input filename\n"
@@ -1914,7 +1914,7 @@ while (1)
         {
 #ifdef __linux__
         int option_index = 0;
-                        
+
         static struct option long_options[] =
                 {
 		{"vcdname", 1, 0, 'v'},
@@ -1925,16 +1925,16 @@ while (1)
 		{"partialmode", 1, 0, 'p'},
 		{"checkpoint", 1, 0, 'c'},
                 {"help", 0, 0, 'h'},
-                {0, 0, 0, 0}  
+                {0, 0, 0, 0}
                 };
-                
+
         c = getopt_long (argc, argv, "v:l:d:m:b:p:c:h", long_options, &option_index);
 #else
         c = getopt      (argc, argv, "v:l:d:m:b:p:c:h");
 #endif
-                        
+
         if (c == -1) break;     /* no more args */
-                        
+
         switch (c)
                 {
 		case 'v':
@@ -1978,31 +1978,31 @@ while (1)
                 case 'h':
 			print_help(argv[0]);
                         break;
-                        
+
                 case '?':
                         opt_errors_encountered=1;
                         break;
-                        
+
                 default:
                         /* unreachable */
                         break;
                 }
         }
-                        
+
 if(opt_errors_encountered)
         {
         print_help(argv[0]);
         }
 
 if (optind < argc)
-        {               
+        {
         while (optind < argc)
                 {
                 if(!vname)
                         {
                         vname = malloc_2(strlen(argv[optind])+1);
                         strcpy(vname, argv[optind++]);
-                        } 
+                        }
                 else if(!lxname)
                         {
                         lxname = malloc_2(strlen(argv[optind])+1);
@@ -2014,7 +2014,7 @@ if (optind < argc)
 			}
                 }
         }
-                        
+
 if((!vname)||(!lxname))
         {
         print_help(argv[0]);
diff --git a/src/helpers/vcd2vzt.c b/src/helpers/vcd2vzt.c
index 48ede6e..2758733 100644
--- a/src/helpers/vcd2vzt.c
+++ b/src/helpers/vcd2vzt.c
@@ -3,19 +3,19 @@
  *
  * 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: 
+ * 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   
+ * 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   
+ * 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.
  */
@@ -93,7 +93,7 @@ static int slisthier_len=0;
 
 enum Tokens   { T_VAR, T_END, T_SCOPE, T_UPSCOPE,
 		T_COMMENT, T_DATE, T_DUMPALL, T_DUMPOFF, T_DUMPON,
-		T_DUMPVARS, T_ENDDEFINITIONS, 
+		T_DUMPVARS, T_ENDDEFINITIONS,
 		T_DUMPPORTS, T_DUMPPORTSOFF, T_DUMPPORTSON, T_DUMPPORTSALL,
 		T_TIMESCALE, T_VERSION, T_VCDCLOSE, T_TIMEZERO,
 		T_EOF, T_STRING, T_UNKNOWN_KEY };
@@ -249,7 +249,7 @@ static void alias_vs_normal_symadd(struct vcdsymbol *v, struct vcdsymbol *root_v
 {
 if(!v) return; /* scan-build : should never happen */
 
-if(!root_v) 
+if(!root_v)
 	{
 	if((v->vartype==V_INTEGER)||(v->vartype==V_REAL))
 		{
@@ -317,7 +317,7 @@ if(numsyms)
 		v=vcdsymroot;
 		while(v)
 			{
-			if(!(root_v=indexed[v->nid - vcd_minid])) 
+			if(!(root_v=indexed[v->nid - vcd_minid]))
 				{
 				indexed[v->nid - vcd_minid] = v;
 				}
@@ -335,7 +335,7 @@ if(numsyms)
 			*(pnt++)=v;
 			v=v->next;
 			}
-	
+
 		qsort(sorted, numsyms, sizeof(struct vcdsymbol *), vcdsymcompare);
 
 		root_v = NULL;
@@ -348,7 +348,7 @@ if(numsyms)
 
         v=vcdsymroot;
         while(v)
-                {                
+                {
                 free(v->name); v->name = NULL;
                 v=v->next;
                 }
@@ -370,12 +370,12 @@ return(((ch==EOF)||(errno))?(-1):(ch));
 }
 
 static int getch_peek(void)
-{ 
+{
 int ch;
 
 ch=fgetc(vcd_handle);
 ungetc(ch, vcd_handle);
-return(((ch==EOF)||(errno))?(-1):(ch));   
+return(((ch==EOF)||(errno))?(-1):(ch));
 }
 
 
@@ -414,7 +414,7 @@ for(;;)
 	if(ch<=' ') continue;	/* val<=' ' is a quick whitespace check      */
 	break;			/* (take advantage of fact that vcd is text) */
 	}
-if(ch=='$') 
+if(ch=='$')
 	{
 	yytext[len++]=ch;
 	for(;;)
@@ -441,7 +441,7 @@ for(yytext[len++]=ch;;yytext[len++]=ch)
 	}
 yytext[len]=0;	/* terminator */
 
-if(is_string) 
+if(is_string)
 	{
 	yylen=len;
 	return(T_STRING);
@@ -469,7 +469,7 @@ static int get_vartoken_patched(int match_kw)
 {
 int ch;
 int i, len=0;
-        
+
 if(!var_prevch)
         {
         for(;;)
@@ -477,7 +477,7 @@ if(!var_prevch)
                 ch=getch_patched();
                 if(ch<0) { free_2(varsplit); varsplit=NULL; return(V_END); }
                 if((ch==' ')||(ch=='\t')||(ch=='\n')||(ch=='\r')) continue;
-                break;   
+                break;
                 }
         }
         else
@@ -485,11 +485,11 @@ if(!var_prevch)
         ch=var_prevch;
         var_prevch=0;
         }
-                 
+
 if(ch=='[') return(V_LB);
 if(ch==':') return(V_COLON);
 if(ch==']') return(V_RB);
- 
+
 for(yytext[len++]=ch;;yytext[len++]=ch)
         {
         if(len==T_MAX_STR)
@@ -505,7 +505,7 @@ for(yytext[len++]=ch;;yytext[len++]=ch)
                 }
         }
 yytext[len]=0;  /* terminator */
-                
+
 if(match_kw)
 for(i=0;i<NUM_VTOKENS;i++)
         {
@@ -530,11 +530,11 @@ int i, len=0;
 if(varsplit)
         {
         int rc=get_vartoken_patched(match_kw);
-        if(rc!=V_END) return(rc);  
+        if(rc!=V_END) return(rc);
         var_prevch=0;
         }
-                
-if(!var_prevch)  
+
+if(!var_prevch)
         {
         for(;;)
                 {
@@ -549,16 +549,16 @@ if(!var_prevch)
         ch=var_prevch;
         var_prevch=0;
         }
-                 
+
 if(ch=='[') return(V_LB);
 if(ch==':') return(V_COLON);
-if(ch==']') return(V_RB);  
+if(ch==']') return(V_RB);
 
 if(ch=='#')     /* for MTI System Verilog '$var reg 64 >w #implicit-var###VarElem:ram_di[0.0] [63:0] $end' style declarations */
         {       /* debussy simply escapes until the space */
         yytext[len++]= '\\';
         }
-        
+
 for(yytext[len++]=ch;;yytext[len++]=ch)
         {
         if(len==T_MAX_STR)
@@ -566,7 +566,7 @@ for(yytext[len++]=ch;;yytext[len++]=ch)
                 yytext=(char *)realloc_2(yytext, (T_MAX_STR=T_MAX_STR*2)+1);
                 }
 
-        ch=getch();  
+        ch=getch();
         if(ch==' ')
                 {
                 if(match_kw) break;
@@ -607,7 +607,7 @@ if((varsplit)&&(yytext[len-1]==']'))
         {
         varsplit=NULL;
         }
-        
+
 if(match_kw)
 for(i=0;i<NUM_VTOKENS;i++)
         {
@@ -641,7 +641,7 @@ if(!var_prevch)
       ch=var_prevch;
       var_prevch=0;
       }
-      
+
 for(yytext[len++]=ch;;yytext[len++]=ch)
       {
 	if(len==T_MAX_STR)
@@ -752,7 +752,7 @@ switch(yytext[0])
         case '0':
         case '1':
         case 'x': case 'X':
-        case 'z': case 'Z':   
+        case 'z': case 'Z':
         case 'h': case 'H':
         case 'u': case 'U':
         case 'w': case 'W':
@@ -760,7 +760,7 @@ switch(yytext[0])
         case '-':
 		if(yylen>1)
 			{
-			v=bsearch_vcd(yytext+1, yylen-1);	
+			v=bsearch_vcd(yytext+1, yylen-1);
 			if(!v)
 				{
 				fprintf(stderr,"Near line %d, Unknown VCD identifier: '%s'\n",vcdlineno,yytext+1);
@@ -809,12 +809,12 @@ switch(yytext[0])
 	case 'b':
 	case 'B':
 		/* extract binary number then.. */
-		vector=malloc_2(yylen_cache=yylen); 
+		vector=malloc_2(yylen_cache=yylen);
 		strcpy(vector,yytext+1);
 		vlen=yylen-1;
 
 		get_strtoken();
-		v=bsearch_vcd(yytext, yylen);	
+		v=bsearch_vcd(yytext, yylen);
 		if(!v)
 			{
 			fprintf(stderr,"Near line %d, Unknown identifier: '%s'\n",vcdlineno, yytext);
@@ -829,7 +829,7 @@ switch(yytext[0])
 
 				extend=(vector[0]=='1')?'0':vector[0];
 
-				fill=v->size-vlen;				
+				fill=v->size-vlen;
 				for(i=0;i<fill;i++)
 					{
 					v->value[i]=extend;
@@ -872,20 +872,20 @@ switch(yytext[0])
 				}
 
 			}
-			
+
 		break;
 
 
 	case 'p':
 		/* extract port dump value.. */
-		vector=malloc_2(yylen_cache=yylen); 
+		vector=malloc_2(yylen_cache=yylen);
 		strcpy(vector,yytext+1);
 		vlen=yylen-1;
 
 		get_strtoken();	/* throw away 0_strength_component */
 		get_strtoken(); /* throw away 0_strength_component */
 		get_strtoken(); /* this is the id                  */
-		v=bsearch_vcd(yytext, yylen);	
+		v=bsearch_vcd(yytext, yylen);
 		if(!v)
 			{
 			fprintf(stderr,"Near line %d, Unknown identifier: '%s'\n",vcdlineno, yytext);
@@ -900,7 +900,7 @@ switch(yytext[0])
 
 				extend='0';
 
-				fill=v->size-vlen;				
+				fill=v->size-vlen;
 				for(i=0;i<fill;i++)
 					{
 					v->value[i]=extend;
@@ -954,9 +954,9 @@ switch(yytext[0])
 		*d = 0;
 		sscanf(yytext+1,"%lg",d);
 		errno = 0;
-		
+
 		get_strtoken();
-		v=bsearch_vcd(yytext, yylen);	
+		v=bsearch_vcd(yytext, yylen);
 		if(!v)
 			{
 			fprintf(stderr,"Near line %d, Unknown identifier: '%s'\n",vcdlineno, yytext);
@@ -1000,7 +1000,7 @@ while((ch=*src))
 			*dst=vcd[i];
 			break;
 			}
-		}	
+		}
 	if(i==23) *dst='x';
 
 	src++;
@@ -1032,7 +1032,7 @@ for(;;)
                         {
                         int vtok=get_token();
                         if((vtok==T_END)||(vtok==T_EOF)) break;
-                        time_zero=atoi_64(yytext);                 
+                        time_zero=atoi_64(yytext);
                         vzt_wr_set_timezero(lt, time_zero);
                         sync_end(NULL);
                         }
@@ -1049,7 +1049,7 @@ for(;;)
 			time_scale=atoi_64(yytext);
 			if(!time_scale) time_scale=1;
 			else if (time_scale == 10 ) timelogadjust = +1;
-			else if (time_scale == 100) timelogadjust = +2; 
+			else if (time_scale == 100) timelogadjust = +2;
 
 			for(i=0;i<yylen;i++)
 				{
@@ -1063,7 +1063,7 @@ for(;;)
 				{
 				vtok=get_token();
 				if((vtok==T_END)||(vtok==T_EOF)) break;
-				prefix=yytext[0];		
+				prefix=yytext[0];
 				}
 			switch(prefix)
 				{
@@ -1163,7 +1163,7 @@ for(;;)
 					v->size=atoi_64(yytext);
 					if(!v->size) v->size=1;
 					}
-					else 
+					else
 					if(vtok==V_LB)
 					{
 					vtok=get_vartoken(1);
@@ -1249,7 +1249,7 @@ for(;;)
 					v->name=(char *)malloc_2(yylen+1);
 					strcpy(v->name,yytext);
 					}
-				
+
 				vtok=get_vartoken(1);
 				if(vtok==V_END) goto dumpv;
 				if(vtok!=V_LB) goto err;
@@ -1281,14 +1281,14 @@ for(;;)
 			else
 			if((v->size>1)&&(v->msi<=0)&&(v->lsi<=0))
 				{
-				if(v->vartype==V_EVENT) 
+				if(v->vartype==V_EVENT)
 					{
 					v->size=1;
 					}
 					else
 					{
 					/* any criteria for the direction here? */
-					v->msi=v->size-1;	
+					v->msi=v->size-1;
 					v->lsi=0;
 					}
 				}
@@ -1299,7 +1299,7 @@ for(;;)
 				v->size=v->msi-v->lsi+1;
 				}
 			else
-			if((v->lsi>=v->msi)&&((v->lsi-v->msi+1)!=v->size)) 
+			if((v->lsi>=v->msi)&&((v->lsi-v->msi+1)!=v->size))
 				{
 				if(v->vartype!=V_EVENT) goto err;
 				v->size=v->msi-v->lsi+1;
@@ -1326,9 +1326,9 @@ for(;;)
 				struct queuedevent *q;
 				v->ev=q=(struct queuedevent *)calloc_2(1,sizeof(struct queuedevent));
 				q->sym=v;
-				q->last_event_time=-1;		
+				q->last_event_time=-1;
 				q->next=queuedevents;
-				queuedevents=q;		
+				queuedevents=q;
 				}
 
 			if(!vcdsymroot)
@@ -1363,7 +1363,7 @@ for(;;)
 #endif
 
 			DEBUG(fprintf(stderr,"VAR %s %d %s %s[%d:%d]\n",
-				vartypes[v->vartype], v->size, v->id, v->name, 
+				vartypes[v->vartype], v->size, v->id, v->name,
 					v->msi, v->lsi));
 			goto bail;
 			err:
@@ -1399,7 +1399,7 @@ for(;;)
 					{
 					TimeType t_time;
 					t_time=atoi_64(yytext+1);
-					
+
 					if(start_time<0)
 						{
 						start_time=t_time;
@@ -1437,9 +1437,9 @@ for(;;)
 			break;
 		case T_DUMPVARS:
 		case T_DUMPPORTS:
-                        if(current_time<0)  
+                        if(current_time<0)
                                 { start_time=current_time=end_time=0; /* vzt_wr_set_time(lt, current_time); */ }
-                        break;  
+                        break;
                 case T_VCDCLOSE:
                         sync_end("VCDCLOSE:");
                         break;  /* next token will be '#' time related followed by $end */
@@ -1497,10 +1497,10 @@ if(ch=='g')	/* real number */
 		he=(struct HistEnt *)calloc_2(1,sizeof(struct HistEnt));
 	        he->time=-1;
 	        he->v.vector=NULL;
-	
+
 		n->curr=he;
 		n->head.next=he;
-	
+
 		add_histent(t_time,n,ch,regadd, vector);
 		}
 		else
@@ -1516,16 +1516,16 @@ if(ch=='g')	/* real number */
 		he=(struct HistEnt *)calloc_2(1,sizeof(struct HistEnt));
 	        he->time=-1;
 	        he->v.vector=NULL;
-	
+
 		n->curr=he;
 		n->head.next=he;
-	
+
 		add_histent(t_time,n,ch,regadd, vector);
 		}
 		else
 		{
 		int i, nlen;
-	
+
 		nlen = strlen(vector);
 		if(nlen)
 			{
@@ -1533,7 +1533,7 @@ if(ch=='g')	/* real number */
 			for(i=0;i<nlen;i++)
 				{
 				if(toupper((int)(unsigned char)vector[i])!=deadchar)
-					{	
+					{
 					n->notdead=1;
 					return;
 					}
@@ -1552,7 +1552,7 @@ static void add_tail_histents(void)
 struct queuedevent *q;
 q=queuedevents;
 while(q)
-	{	
+	{
 	struct vcdsymbol *v;
 
 	v=q->sym;
@@ -1560,7 +1560,7 @@ while(q)
 		{
 		/* dump degating event */
 		DEBUG(fprintf(stderr,"#"TTFormat" %s = '%c' (event)\n",v->ev->last_event_time+1,v->name,'0'));
-		add_histent(v->ev->last_event_time+1,v->narray[0],'0',1, NULL);	
+		add_histent(v->ev->last_event_time+1,v->narray[0],'0',1, NULL);
 		}
 	q=q->next;
 	}
@@ -1685,7 +1685,7 @@ while(v)
 
 			if((h1 = v->narray[i]->head.next))
 				{
-				h1 = v->narray[i]->head.next;	
+				h1 = v->narray[i]->head.next;
 				while(h1)
 					{
 					h2 = h1->next;
@@ -1770,26 +1770,26 @@ struct symbol *temp;
                 if(!temp->next) break;
                 temp=temp->next;
                 }
-  
+
         return(NULL); /* not found, add here if you want to add*/
 }
 
-int sigcmp(char *s1, char *s2)         
+int sigcmp(char *s1, char *s2)
 {
 unsigned char c1, c2;
 int u1, u2;
-                                
+
 for(;;)
         {
         c1=(unsigned char)*(s1++);
         c2=(unsigned char)*(s2++);
-                
+
         if((!c1)&&(!c2)) return(0);
         if((c1<='9')&&(c2<='9')&&(c2>='0')&&(c1>='0'))
                 {
                 u1=(int)(c1&15);
                 u2=(int)(c2&15);
-                
+
                 while(((c2=(unsigned char)*s2)>='0')&&(c2<='9'))
                         {
                         u2*=10;
@@ -1803,7 +1803,7 @@ for(;;)
                         u1+=(unsigned int)(c2&15);
                         s1++;
                         }
-        
+
                 if(u1==u2) continue;
                         else return((int)u1-(int)u2);
                 }
@@ -1811,7 +1811,7 @@ for(;;)
                 {
                 if(c1!=c2) return((int)c1-(int)c2);
                 }
-        }       
+        }
 }
 
 
@@ -1819,11 +1819,11 @@ int partition(struct symbol **a, int p, int r)
 {
 struct symbol *x, *t;
 int i,j;
-                
+
 x=a[p];
 i=p-1;
 j=r+1;
-                 
+
 while(1)
         {
         do
@@ -1834,12 +1834,12 @@ while(1)
         do      {
                 i++;
                 } while(sigcmp(a[i]->name,x->name)<0);
- 
+
         if(i<j)
                 {
                 t=a[i];
                 a[i]=a[j];
-                a[j]=t; 
+                a[j]=t;
                 }
                 else
                 {
@@ -1865,7 +1865,7 @@ if(p<r)
 
 void print_help(char *nam)
 {
-#ifdef __linux__ 
+#ifdef __linux__
 printf(
 "Usage: %s [OPTION]... [VCDFILE] [VZTFILE]\n\n"
 "  -v, --vcdname=FILE         specify VCD input filename\n"
@@ -1917,7 +1917,7 @@ while (1)
         {
 #ifdef __linux__
         int option_index = 0;
-                        
+
         static struct option long_options[] =
                 {
 		{"vcdname", 1, 0, 'v'},
@@ -1929,16 +1929,16 @@ while (1)
                 {"twostate", 0, 0, 't'},
                 {"rle", 0, 0, 'r'},
 		{"ziptype", 1, 0, 'z'},
-                {0, 0, 0, 0}  
+                {0, 0, 0, 0}
                 };
-                
+
         c = getopt_long (argc, argv, "v:l:d:m:b:z:htr", long_options, &option_index);
 #else
         c = getopt      (argc, argv, "v:l:d:m:b:z:htr");
 #endif
-                        
+
         if (c == -1) break;     /* no more args */
-                        
+
         switch (c)
                 {
 		case 'v':
@@ -1972,7 +1972,7 @@ while (1)
                 case 'h':
 			print_help(argv[0]);
                         break;
-                        
+
                 case 't':
 			opt_twostate = 1;
                         break;
@@ -1980,7 +1980,7 @@ while (1)
                 case 'r':
 			opt_rle = 1;
                         break;
-                        
+
 		case 'z':
 			ziptype = atoi(optarg);
 			if((ziptype < VZT_WR_IS_GZ) || (ziptype > VZT_WR_IS_LZMA)) ziptype = VZT_WR_IS_GZ;
@@ -1989,27 +1989,27 @@ while (1)
                 case '?':
                         opt_errors_encountered=1;
                         break;
-                        
+
                 default:
                         /* unreachable */
                         break;
                 }
         }
-                        
+
 if(opt_errors_encountered)
         {
         print_help(argv[0]);
         }
 
 if (optind < argc)
-        {               
+        {
         while (optind < argc)
                 {
                 if(!vname)
                         {
                         vname = malloc_2(strlen(argv[optind])+1);
                         strcpy(vname, argv[optind++]);
-                        } 
+                        }
                 else if(!lxname)
                         {
                         lxname = malloc_2(strlen(argv[optind])+1);
@@ -2021,7 +2021,7 @@ if (optind < argc)
 			}
                 }
         }
-                        
+
 if((!vname)||(!lxname))
         {
         print_help(argv[0]);
diff --git a/src/helpers/vzt2vcd.c b/src/helpers/vzt2vcd.c
index d722960..27ddb7e 100644
--- a/src/helpers/vzt2vcd.c
+++ b/src/helpers/vzt2vcd.c
@@ -58,7 +58,7 @@ while (value)
         value = value / 94;
         }
 
-*pnt = 0;   
+*pnt = 0;
 return(buf);
 }
 
@@ -139,7 +139,7 @@ if(!(*pnt_value)[0])
 		{
 		vcd_blackout = 0;
 		fprintf(fv, "$dumpon\n");
-		}	
+		}
 	}
 
 if(g->flags & VZT_RD_SYM_F_DOUBLE)
@@ -158,10 +158,10 @@ else
                 fprintf(fv, "%c%s\n", (*pnt_value)[0], vcdid(*pnt_facidx));
                 }
                 else
-                {                        
+                {
                 fprintf(fv, "b%s %s\n", vcd_truncate_bitvec(*pnt_value), vcdid(*pnt_facidx));
                 }
-	}                               
+	}
 }
 
 
@@ -182,7 +182,7 @@ if(lt)
 	vztsint64_t timezero;
 
 	if(vectorize) { vzt_rd_vectorize(lt); }
-	
+
 	numfacs = vzt_rd_get_num_facs(lt);
 	vzt_rd_set_fac_process_mask_all(lt);
 	vzt_rd_set_max_block_mem_usage(lt, 0);	/* no need to cache blocks */
@@ -191,7 +191,7 @@ if(lt)
         switch(scale)
                 {
                 case 0:         time_dimension = 's'; break;
-         
+
                 case -1:        time_scale = 100; 		time_dimension = 'm'; break;
                 case -2:        time_scale = 10;
                 case -3:                                        time_dimension = 'm'; break;
@@ -199,15 +199,15 @@ if(lt)
                 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 -7:        time_scale = 100; 		time_dimension = 'n'; break;
                 case -8:        time_scale = 10;
                 case -9:
@@ -256,7 +256,7 @@ if(lt)
                        fprintf(fv, "$var real 1 %s %s $end\n", vcdid(newindx), netname);
                        }
                 else
-			
+
                         {
                        	if(g->len==1)
                        		{
@@ -267,7 +267,7 @@ if(lt)
                                         else
                                         {
                                         fprintf(fv, "$var wire 1 %s %s $end\n", vcdid(newindx), netname);
-                                        }  
+                                        }
 				}
                                 else
                                 {
@@ -316,7 +316,7 @@ return(0);
 
 void print_help(char *nam)
 {
-#ifdef __linux__ 
+#ifdef __linux__
 printf(
 "Usage: %s [OPTION]... [VZTFILE]\n\n"
 "  -v, --vztname=FILE         specify VZT input filename\n"
@@ -359,25 +359,25 @@ while (1)
         {
 #ifdef __linux__
         int option_index = 0;
-                        
+
         static struct option long_options[] =
                 {
 		{"vztname", 1, 0, 'v'},
-		{"output", 1, 0, 'o'},		
+		{"output", 1, 0, 'o'},
 		{"coalesce", 0, 0, 'c'},
 		{"flatearth", 0, 0, 'f'},
 		{"notruncate", 0, 0, 'n'},
                 {"help", 0, 0, 'h'},
-                {0, 0, 0, 0}  
+                {0, 0, 0, 0}
                 };
-                
+
         c = getopt_long (argc, argv, "v:o:cfnh", long_options, &option_index);
 #else
         c = getopt      (argc, argv, "v:o:cfnh");
 #endif
-                        
+
         if (c == -1) break;     /* no more args */
-                        
+
         switch (c)
                 {
 		case 'v':
@@ -404,24 +404,24 @@ while (1)
                 case 'h':
 			print_help(argv[0]);
                         break;
-                        
+
                 case '?':
                         opt_errors_encountered=1;
                         break;
-                        
+
                 default:
                         /* unreachable */
                         break;
                 }
         }
-                        
+
 if(opt_errors_encountered)
         {
         print_help(argv[0]);
         }
 
 if (optind < argc)
-        {               
+        {
         while (optind < argc)
                 {
                 if(!lxname)
@@ -435,7 +435,7 @@ if (optind < argc)
 			}
                 }
         }
-                        
+
 if(!lxname)
         {
         print_help(argv[0]);
diff --git a/src/helpers/vzt_read.c b/src/helpers/vzt_read.c
index 1f6b300..65082bc 100644
--- a/src/helpers/vzt_read.c
+++ b/src/helpers/vzt_read.c
@@ -26,13 +26,13 @@
 #undef HAVE_RPC_XDR_H
 #endif
 
-#if HAVE_RPC_XDR_H 
+#if HAVE_RPC_XDR_H
 #include <rpc/types.h>
 #include <rpc/xdr.h>
 #endif
 #include "vzt_read.h"
 
-#ifdef HAVE_FCNTL_H 
+#ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
 
@@ -40,9 +40,9 @@
 
 static int is_big_endian(void)
 {
-union 	
-	{ 
-	vztint32_t u32; 
+union
+	{
+	vztint32_t u32;
 	unsigned char c[sizeof(vztint32_t)];
 	} u;
 
@@ -118,12 +118,12 @@ if(lt->pthreads)
  * of a big-endian integer.  this is for 32-bit PPC so no byte
  * swizzling needs to be done at all.
  */
-   
+
 #define vzt_rd_get_byte(mm,offset)    ((unsigned int)(*((unsigned char *)(mm)+(offset))))
 #define vzt_rd_get_16(mm,offset)      ((unsigned int)(*((unsigned short *)(((unsigned char *)(mm))+(offset)))))
 #define vzt_rd_get_32(mm,offset)      (*(unsigned int *)(((unsigned char *)(mm))+(offset)))
 #define vzt_rd_get_64(mm,offset)      ((((vztint64_t)vzt_rd_get_32((mm),(offset)))<<32)|((vztint64_t)vzt_rd_get_32((mm),(offset)+4)))
- 
+
 #else
 
 /*
@@ -247,7 +247,7 @@ while(*c>=0)
 	val <<= 7;
 	val |= (vztint32_t)*(c--);
 	}
-	
+
 *mm = c;
 return(val);
 }
@@ -269,7 +269,7 @@ return((x * 0x01010101) >> 24);
 
 /*
  * total zero count to the right of the first rightmost one bit
- * encountered.  its intended use is to 
+ * encountered.  its intended use is to
  * "return the bitposition of the least significant 1 in vztint32_t"
  * (use x &= ~(x&-x) to clear out that bit quickly)
  */
@@ -478,9 +478,9 @@ vzt_rd_pthread_mutex_lock(lt, &b->mutex);
 
 if(killed) b->killed = killed;	/* never allocate ever again (in case we prefetch on process kill) */
 
-if((b->rle) && (b->val_dict)) 
-	{ 
-	free(b->val_dict); b->val_dict = NULL; 
+if((b->rle) && (b->val_dict))
+	{
+	free(b->val_dict); b->val_dict = NULL;
 
 	vzt_rd_pthread_mutex_lock(lt, &lt->mutex);
 	lt->block_mem_consumed -= b->num_rle_bytes;
@@ -609,12 +609,12 @@ if(!(lt->flags[facidx]&VZT_RD_SYM_F_SYNVEC))
 		vztint32_t vindex_offset_x = vindex_offset + lt->total_values;
 		vztint32_t *valpnt_x;
 		int which;
-	
+
 		for(i=0;i<len;i++)
 			{
 			valpnt   = val_base + (b->vindex[vindex_offset++] * row_size);
 			valpnt_x = val_base + (b->vindex[vindex_offset_x++] * row_size);
-	
+
 			which = (((*valpnt_x >> bit) & 1) << 1) | ((*valpnt >> bit) & 1);
 			value[i] = "01xz"[which];
 			}
@@ -637,8 +637,8 @@ if(!(lt->flags[facidx]&VZT_RD_SYM_F_SYNVEC))
 		vztint32_t vindex_offset_x;
 		vztint32_t *valpnt_x;
 		int which;
-	
-		for(i=0;i<len;i++)  
+
+		for(i=0;i<len;i++)
 			{
 			if((facidx+i)>=lt->numfacs) break;
 
@@ -647,7 +647,7 @@ if(!(lt->flags[facidx]&VZT_RD_SYM_F_SYNVEC))
 
 			valpnt   = val_base + (b->vindex[vindex_offset] * row_size);
 			valpnt_x = val_base + (b->vindex[vindex_offset_x] * row_size);
-	
+
 			which = (((*valpnt_x >> bit) & 1) << 1) | ((*valpnt >> bit) & 1);
 			value[i] = "01xz"[which];
 			}
@@ -673,7 +673,7 @@ return(1);
 static void vzt_rd_double_xdr(char *pnt, char *buf)
 {
 int j;
-#if HAVE_RPC_XDR_H 
+#if HAVE_RPC_XDR_H
 XDR x;
 #else
 const vztint32_t endian_matchword = 0x12345678;
@@ -695,8 +695,8 @@ for(j=0;j<64;j++)
 		}
 	}
 
-#if HAVE_RPC_XDR_H 
-xdrmem_create(&x, xdrdata, sizeof(xdrdata), XDR_DECODE);						
+#if HAVE_RPC_XDR_H
+xdrmem_create(&x, xdrdata, sizeof(xdrdata), XDR_DECODE);
 xdr_double(&x, &d);
 #else
 /* byte ordering in windows is reverse of XDR (on x86, that is) */
@@ -731,7 +731,7 @@ return(spnt);
 
 
 /*
- * exploit locality of reference for when monotonic time per fac is needed 
+ * exploit locality of reference for when monotonic time per fac is needed
  * (gtkwave) rather than monotonic time ordering over the whole trace
  * (converting to vcd)
  */
@@ -867,7 +867,7 @@ do_vch_0:		if(!(lt->flags[idx] & (VZT_RD_SYM_F_DOUBLE|VZT_RD_SYM_F_STRING)))
                 if(i2)
                         {
                         struct vzt_ncycle_autosort *t = autosort[i2];
-                 
+
                         autofacs[idx].next = t;
                         autosort[i2] = autofacs+idx;
                         }
@@ -883,13 +883,13 @@ do_vch_0:		if(!(lt->flags[idx] & (VZT_RD_SYM_F_DOUBLE|VZT_RD_SYM_F_STRING)))
 for(i = 1; i < b->num_time_ticks; i++)
         {
         struct vzt_ncycle_autosort *t = autosort[i];
-        
+
         if(t)
                 {
                 while(t)
                         {
                         struct vzt_ncycle_autosort *tn = t->next;
-                         
+
                         idx = t-autofacs;
 
 			vzt_rd_fac_value(lt, b, i, idx, pnt);
@@ -912,13 +912,13 @@ for(i = 1; i < b->num_time_ticks; i++)
 					lt->value_change_callback(&lt, &b->times[i], &idx, &msg);
 					}
 				}
-                 
+
 			i2 = vzt_rd_next_value_chg_time(lt, b, i, idx);
- 
+
                         if(i2!=i)
                                 {
                                 struct vzt_ncycle_autosort *ta = autosort[i2];
-                        
+
                                 autofacs[idx].next = ta;
                                 autosort[i2] = autofacs+idx;
                                 }
@@ -926,9 +926,9 @@ for(i = 1; i < b->num_time_ticks; i++)
                                 {
                                 struct vzt_ncycle_autosort *ta = deadlist;
                                 autofacs[idx].next = ta;
-                                deadlist = autofacs+idx;   
+                                deadlist = autofacs+idx;
                                 }
-         
+
                         t = tn;
                         }
                 }
@@ -954,7 +954,7 @@ void vzt_rd_null_callback(struct vzt_rd_trace **lt, vztint64_t *pnt_time, vztint
 
 /****************************************************************************/
 
-/* 
+/*
  * return number of facs in trace
  */
 _VZT_RD_INLINE vztint32_t vzt_rd_get_num_facs(struct vzt_rd_trace *lt)
@@ -970,11 +970,11 @@ struct vzt_rd_geometry *vzt_rd_get_fac_geometry(struct vzt_rd_trace *lt, vztint3
 {
 if((lt)&&(facidx<lt->numfacs))
 	{
-	lt->geometry.rows = lt->rows[facidx];	
-	lt->geometry.msb = lt->msb[facidx];	
-	lt->geometry.lsb = lt->lsb[facidx];	
-	lt->geometry.flags = lt->flags[facidx];	
-	lt->geometry.len = lt->len[facidx];	
+	lt->geometry.rows = lt->rows[facidx];
+	lt->geometry.msb = lt->msb[facidx];
+	lt->geometry.lsb = lt->lsb[facidx];
+	lt->geometry.flags = lt->flags[facidx];
+	lt->geometry.len = lt->len[facidx];
 	return(&lt->geometry);
 	}
 	else
@@ -1071,7 +1071,7 @@ if((lt)&&(facidx<lt->numfacs))
 
 /*
  * time queries
- */ 
+ */
 _VZT_RD_INLINE vztint64_t vzt_rd_get_start_time(struct vzt_rd_trace *lt)
 {
 return(lt ? lt->start : 0);
@@ -1113,8 +1113,8 @@ if(lt)
 		if(!facidx)
 			{
 			lt->faccache->n = lt->zfacnames;
-			lt->faccache->bufcurr[0] = 0;			
-			lt->faccache->bufprev[0] = 0;			
+			lt->faccache->bufcurr[0] = 0;
+			lt->faccache->bufprev[0] = 0;
 			}
 
 		if(facidx!=lt->numfacs)
@@ -1143,7 +1143,7 @@ if(lt)
 		else
 		{
 		if(facidx<lt->numfacs)
-			{		
+			{
 			int strt;
 
 			if(facidx==lt->faccache->old_facidx)
@@ -1164,7 +1164,7 @@ if(lt)
 				{
 				vzt_rd_get_facname(lt, j);
 				}
-	
+
 			return(vzt_rd_get_facname(lt, j));
 			}
 		}
@@ -1357,7 +1357,7 @@ return(VZT_RD_IS_BZ2);
 
 static void vzt_rd_decompress_blk(struct vzt_rd_trace *lt, struct vzt_rd_block *b, int reopen)
 {
-int rc; 
+int rc;
 void *zhandle;
 FILE *handle;
 if(reopen)
@@ -1444,7 +1444,7 @@ vzt_rd_pthread_create(lt, &b->pth, &b->pth_attr, vzt_rd_decompress_blk_pth_actua
  * merely caches the FIRST set of blocks which fit in lt->block_mem_max.
  * n.b., returns number of blocks processed
  */
-int vzt_rd_iter_blocks(struct vzt_rd_trace *lt, 
+int vzt_rd_iter_blocks(struct vzt_rd_trace *lt,
 	void (*value_change_callback)(struct vzt_rd_trace **lt, vztint64_t *time, vztint32_t *facidx, char **value),
 	void *user_callback_data_pointer)
 {
@@ -1455,7 +1455,7 @@ struct vzt_rd_block *bcutoff=NULL, *bfinal=NULL;
 
 if(lt)
 	{
-	lt->value_change_callback = value_change_callback ? value_change_callback : vzt_rd_null_callback; 
+	lt->value_change_callback = value_change_callback ? value_change_callback : vzt_rd_null_callback;
 	lt->user_callback_data_pointer = user_callback_data_pointer;
 
 	b = lt->block_head;
@@ -1490,7 +1490,7 @@ if(lt)
 						}
 					bpre = bpre->next;
 					}
-				}	
+				}
 
 			vzt_rd_decompress_blk(lt, b, 0);
 			bfinal=b;
@@ -1512,7 +1512,7 @@ if(lt)
 				{
 				vztint64_t block_mem_consumed;
 
-				vzt_rd_pthread_mutex_lock(lt, &lt->mutex);			
+				vzt_rd_pthread_mutex_lock(lt, &lt->mutex);
 				block_mem_consumed = lt->block_mem_consumed;
 				vzt_rd_pthread_mutex_unlock(lt, &lt->mutex);
 
@@ -1545,7 +1545,7 @@ return(blk);
 
 /*
  * callback access to the user callback data pointer (if required)
- */ 
+ */
 _VZT_RD_INLINE void *vzt_rd_get_user_callback_data_pointer(struct vzt_rd_trace *lt)
 {
 if(lt)
@@ -1585,12 +1585,12 @@ if(lt)
 		{
 		switch(state)
 			{
-			case 0: if(b->end >= strt_time) 
+			case 0: if(b->end >= strt_time)
 					{
 					state = 1;
 					if((b->start > strt_time) && (bprev))
 						{
-						bprev->exclude_block = 0;	
+						bprev->exclude_block = 0;
 						blk++;
 						}
 					}
@@ -1694,7 +1694,7 @@ if(!(lt->handle=fopen(name, "rb")))
 	if(!fread(&id, 2, 1, lt->handle)) { id = 0; }
 	if(!fread(&version, 2, 1, lt->handle)) { id = 0; }
 	if(!fread(&lt->granule_size, 1, 1, lt->handle)) { id = 0; }
-	
+
 	if(vzt_rd_get_16(&id,0) != VZT_RD_HDRID)
 		{
 		fprintf(stderr, VZT_RDLOAD"*** Not a vzt file ***\n");
@@ -1786,7 +1786,7 @@ if(!(lt->handle=fopen(name, "rb")))
 				rc=LZMA_read(lt->zhandle, m, lt->zfacname_predec_size);
 				LZMA_close(lt->zhandle); lt->zhandle=NULL;
 				break;
-			}  
+			}
 
 		if(rc!=lt->zfacname_predec_size)
 			{
@@ -1813,7 +1813,7 @@ if(!(lt->handle=fopen(name, "rb")))
 			case VZT_RD_IS_GZ:
 				lt->zhandle = gzdopen(dup(fileno(lt->handle)), "rb");
 				t = lt->numfacs * 4 * sizeof(vztint32_t);
-				m=(char *)malloc(t);				
+				m=(char *)malloc(t);
 				rc=gzread(lt->zhandle, m, t);
 				gzclose(lt->zhandle); lt->zhandle=NULL;
 				break;
@@ -1821,7 +1821,7 @@ if(!(lt->handle=fopen(name, "rb")))
 			case VZT_RD_IS_BZ2:
 				lt->zhandle = BZ2_bzdopen(dup(fileno(lt->handle)), "rb");
 				t = lt->numfacs * 4 * sizeof(vztint32_t);
-				m=(char *)malloc(t);				
+				m=(char *)malloc(t);
 				rc=BZ2_bzread(lt->zhandle, m, t);
 				BZ2_bzclose(lt->zhandle); lt->zhandle=NULL;
 				break;
@@ -1830,7 +1830,7 @@ if(!(lt->handle=fopen(name, "rb")))
 			default:
 				lt->zhandle = LZMA_fdopen(dup(fileno(lt->handle)), "rb");
 				t = lt->numfacs * 4 * sizeof(vztint32_t);
-				m=(char *)malloc(t);				
+				m=(char *)malloc(t);
 				rc=LZMA_read(lt->zhandle, m, t);
 				LZMA_close(lt->zhandle); lt->zhandle=NULL;
 				break;
@@ -1913,7 +1913,7 @@ if(!(lt->handle=fopen(name, "rb")))
 
 			b=calloc(1, sizeof(struct vzt_rd_block));
 			b->last_rd_value_idx = ~0;
-		
+
 			rcf = fread(&b->uncompressed_siz, 4, 1, lt->handle);	b->uncompressed_siz = rcf ? vzt_rd_get_32(&b->uncompressed_siz,0) : 0;
 			rcf = fread(&b->compressed_siz, 4, 1, lt->handle);	b->compressed_siz = rcf ? vzt_rd_get_32(&b->compressed_siz,0) : 0;
 			rcf = fread(&b->start, 8, 1, lt->handle);		b->start = rcf ? vzt_rd_get_64(&b->start,0) : 0;
@@ -1935,9 +1935,9 @@ if(!(lt->handle=fopen(name, "rb")))
 				break;
 				}
 
-			b->filepos = pos; /* mark startpos for later in case we purge it from memory */	
+			b->filepos = pos; /* mark startpos for later in case we purge it from memory */
 			/* fprintf(stderr, VZT_RDLOAD"un/compressed size: %d/%d\n", b->uncompressed_siz, b->compressed_siz); */
-	
+
 			if((b->uncompressed_siz)&&(b->compressed_siz)&&(b->end))
 				{
 				/* fprintf(stderr, VZT_RDLOAD"block [%d] %lld / %lld\n", lt->numblocks, b->start, b->end); */
@@ -1949,7 +1949,7 @@ if(!(lt->handle=fopen(name, "rb")))
 					vzt_rd_pthread_mutex_init(lt, &b->mutex, NULL);
 					vzt_rd_decompress_blk_pth(lt, b); /* prefetch first block */
 					}
-				
+
 				if(lt->block_curr)
 					{
 					b->prev = lt->block_curr;
@@ -1962,14 +1962,14 @@ if(!(lt->handle=fopen(name, "rb")))
 					lt->block_head = lt->block_curr = b;
 					lt->start = b->start;
 					lt->end = b->end;
-					}			
+					}
 				}
 				else
 				{
 				free(b);
 				break;
 				}
-	
+
 			pos+=b->compressed_siz;
 			}
 
@@ -2010,7 +2010,7 @@ if((!lt)||(lt->vectorize)||(lt->numfacs<2))
 	char *pbuff = malloc(pmxlen+1);
 	char *pname;
 	int plen, plen2;
-	int i;	
+	int i;
 	int pidx;
 	int num_after_combine = lt->numfacs;
 	int num_synvecs = 0;
@@ -2025,12 +2025,12 @@ if((!lt)||(lt->vectorize)||(lt->numfacs<2))
 
 		pname = vzt_rd_get_facname(lt, i);
 		plen = strlen(pname);
-		if(plen > pmxlen) 
+		if(plen > pmxlen)
 			{
 			free(pbuff);
 			pbuff = malloc(plen+1);
 			}
-	
+
 		memcpy(pbuff, pname, plen);
 		pbuff[plen] = 0;
 		pidx = lt->msb[i];
@@ -2044,13 +2044,13 @@ if((!lt)||(lt->vectorize)||(lt->numfacs<2))
 				i = j-1;
 				break;
 				}
-	
+
 			pidx = lt->msb[j];
 			lt->len[i] += lt->len[j];
 			lt->lsb[i] = lt->lsb[j];
 			lt->len[j] = 0;
 			num_after_combine--;
-	
+
 			if(lt->len[i] > lt->longest_len)
 				{
 				lt->longest_len = lt->len[i];
@@ -2064,9 +2064,9 @@ if((!lt)||(lt->vectorize)||(lt->numfacs<2))
 		{
 		if(lt->flags[i] & VZT_RD_SYM_F_ALIAS)	/* not necessary, only for sanity */
 			{
-			int j = vzt_rd_get_alias_root(lt, i);	
+			int j = vzt_rd_get_alias_root(lt, i);
 			int k, l;
-	
+
 			if(lt->len[i])
 				{
 				if((lt->len[i]==1) && (lt->len[j]==1))
@@ -2106,7 +2106,7 @@ if((!lt)||(lt->vectorize)||(lt->numfacs<2))
 						for(k=0;k<synvec_chain[j]->num_entries;k++)
 							{
 							vztint32_t idx = synvec_chain[j]->chain[k];
-			
+
 							if(lt->len[i] == lt->len[idx])
 								{
 								for(l=0;l<lt->len[i];l++)
@@ -2131,7 +2131,7 @@ if((!lt)||(lt->vectorize)||(lt->numfacs<2))
 							{
 							synvec_chain[j] = realloc(synvec_chain[j], sizeof(struct vzt_synvec_chain) +
 									synvec_chain[j]->num_entries * sizeof(vztint32_t));
-	
+
 							synvec_chain[j]->chain[synvec_chain[j]->num_entries++] = i;
 							lt->flags[i] |= VZT_RD_SYM_F_SYNVEC;
 							lt->flags[i] &= ~VZT_RD_SYM_F_ALIAS;
@@ -2229,7 +2229,7 @@ if(lt)
 		bt=b->next;
 		vzt_rd_block_vch_free(lt, b, 1);
 		vzt_rd_pthread_mutex_destroy(lt, &b->mutex);
-		
+
 		free(b);
 		b=bt;
 		}
@@ -2242,7 +2242,7 @@ if(lt)
 
 	vzt_rd_pthread_mutex_destroy(lt, &lt->mutex);
 
-	free(lt);	
+	free(lt);
 	}
 }
 
@@ -2324,7 +2324,7 @@ if(lt)
 	if((simtime == lt->last_rd_value_simtime) && (lt->last_rd_value_block))
 		{
 		b = lt->last_rd_value_block;
-		goto b_chk;		
+		goto b_chk;
 		}
 		else
 		{
@@ -2363,7 +2363,7 @@ if((b)&&(lt->numblocks > 2))	/* no sense freeing up when not so many blocks */
 	{
 	vztint64_t block_mem_consumed;
 
-	vzt_rd_pthread_mutex_lock(lt, &lt->mutex);			
+	vzt_rd_pthread_mutex_lock(lt, &lt->mutex);
 	block_mem_consumed = lt->block_mem_consumed;
 	vzt_rd_pthread_mutex_unlock(lt, &lt->mutex);
 
@@ -2379,7 +2379,7 @@ if((b)&&(lt->numblocks > 2))	/* no sense freeing up when not so many blocks */
 				vzt_rd_pthread_mutex_unlock(lt, &lt->mutex);
 				vzt_rd_block_vch_free(lt, b2, 0);
 				}
-	
+
 			b2 = b2->next;
 			}
 		}
diff --git a/src/helpers/vzt_read.h b/src/helpers/vzt_read.h
index 2735548..d9603d0 100644
--- a/src/helpers/vzt_read.h
+++ b/src/helpers/vzt_read.h
@@ -87,8 +87,8 @@ typedef uint64_t	 	vztint64_t;
 typedef int64_t			vztsint64_t;
 typedef int32_t			vztsint32_t;
 #ifndef __MINGW32__
-#define VZT_RD_LLD "%"PRId64      
-#define VZT_RD_LD "%"PRId32      
+#define VZT_RD_LLD "%"PRId64
+#define VZT_RD_LD "%"PRId32
 #else
 #define VZT_RD_LLD "%I64d"
 #define VZT_RD_LD "%d"
@@ -170,7 +170,7 @@ unsigned ztype : 2;		/* 1: gzip, 0: bzip2, 2: lzma */
 unsigned rle : 1;		/* set when end < start which says that an rle depack is necessary */
 
 pthread_t pth;
-pthread_attr_t pth_attr; 
+pthread_attr_t pth_attr;
 pthread_mutex_t mutex;
 
 vztint64_t last_rd_value_simtime;
@@ -186,7 +186,7 @@ vztint32_t flags, len;
 };
 
 
-struct vzt_rd_facname_cache 
+struct vzt_rd_facname_cache
 {
 char *n;
 char *bufprev, *bufcurr;
@@ -278,7 +278,7 @@ _VZT_RD_INLINE int		vzt_rd_set_fac_process_mask_all(struct vzt_rd_trace *lt);
 _VZT_RD_INLINE int		vzt_rd_clr_fac_process_mask_all(struct vzt_rd_trace *lt);
 
 				/* null value_change_callback calls an empty dummy function */
-int 				vzt_rd_iter_blocks(struct vzt_rd_trace *lt, 
+int 				vzt_rd_iter_blocks(struct vzt_rd_trace *lt,
 				void (*value_change_callback)(struct vzt_rd_trace **lt, vztint64_t *time, vztint32_t *facidx, char **value),
 				void *user_callback_data_pointer);
 _VZT_RD_INLINE void *		vzt_rd_get_user_callback_data_pointer(struct vzt_rd_trace *lt);
diff --git a/src/helpers/vzt_write.c b/src/helpers/vzt_write.c
index d69b841..1dc503e 100644
--- a/src/helpers/vzt_write.c
+++ b/src/helpers/vzt_write.c
@@ -27,11 +27,11 @@
 #include <config.h>
 #include <wavealloca.h>
 
-#if defined(__CYGWIN__) || defined(__MINGW32__) 
+#if defined(__CYGWIN__) || defined(__MINGW32__)
 #undef HAVE_RPC_XDR_H
 #endif
 
-#if HAVE_RPC_XDR_H 
+#if HAVE_RPC_XDR_H
 #include <rpc/types.h>
 #include <rpc/xdr.h>
 #endif
@@ -101,7 +101,7 @@ if(lt)
 		{
 		case VZT_WR_IS_GZ:	return(gzdopen(fd, mode));
 		case VZT_WR_IS_BZ2:	return(BZ2_bzdopen(fd, mode));
-		case VZT_WR_IS_LZMA:	
+		case VZT_WR_IS_LZMA:
 		default:
 					return(LZMA_fdopen(fd, mode));
 		}
@@ -118,7 +118,7 @@ if(lt)
 		{
 		case VZT_WR_IS_GZ:	return(gzclose(file));
 		case VZT_WR_IS_BZ2:	BZ2_bzclose(file); return(0);
-		case VZT_WR_IS_LZMA:	
+		case VZT_WR_IS_LZMA:
 		default:
 					LZMA_close(file); return(0);
 		}
@@ -135,7 +135,7 @@ if(lt)
 		{
 		case VZT_WR_IS_GZ:	return(gzflush(file, flush));
 		case VZT_WR_IS_BZ2:	return(BZ2_bzflush(file));
-		case VZT_WR_IS_LZMA:	
+		case VZT_WR_IS_LZMA:
 		default:
 					return(0); /* no real need to do a LZMA_flush(file) as the dictionary is so big */
 		}
@@ -152,7 +152,7 @@ if(lt)
 		{
 		case VZT_WR_IS_GZ:	return(gzwrite(file, buf, len));
 		case VZT_WR_IS_BZ2:	return(BZ2_bzwrite(file, buf, len));
-		case VZT_WR_IS_LZMA:	
+		case VZT_WR_IS_LZMA:
 		default:
 					return(LZMA_write(file, buf, len));
 		}
@@ -226,7 +226,7 @@ static vzt_wr_dsvzt_Tree * vzt_wr_dsvzt_insert(vztint32_t i, vzt_wr_dsvzt_Tree *
 /* Return a pointer to the resulting tree.                 */
     vzt_wr_dsvzt_Tree * n;
     int dir;
-    
+
     n = (vzt_wr_dsvzt_Tree *) calloc (1, sizeof (vzt_wr_dsvzt_Tree));
     if (n == NULL) {
 	fprintf(stderr, "dsvzt_insert: ran out of memory, exiting.\n");
@@ -317,7 +317,7 @@ static vzt2_wr_dsvzt_Tree * vzt2_wr_dsvzt_insert(char *i, vzt2_wr_dsvzt_Tree * t
 /* Return a pointer to the resulting tree.                 */
     vzt2_wr_dsvzt_Tree * n;
     int dir;
-    
+
     n = (vzt2_wr_dsvzt_Tree *) calloc (1, sizeof (vzt2_wr_dsvzt_Tree));
     if (n == NULL) {
 	fprintf(stderr, "dsvzt_insert: ran out of memory, exiting.\n");
@@ -353,7 +353,7 @@ static vzt2_wr_dsvzt_Tree * vzt2_wr_dsvzt_insert(char *i, vzt2_wr_dsvzt_Tree * t
 /*
  * functions which emit various big endian
  * data to a file
- */ 
+ */
 static int vzt_wr_emit_u8(struct vzt_wr_trace *lt, int value)
 {
 unsigned char buf[1];
@@ -412,7 +412,7 @@ return(rc);
  * data to a file.  (lt->position needs to be
  * fixed up on gzclose so the tables don't
  * get out of sync!)
- */ 
+ */
 static int gzwrite_buffered(struct vzt_wr_trace *lt)
 {
 int rc = 1;
@@ -519,7 +519,7 @@ return(rc);
 static int vzt_wr_emit_stringz(struct vzt_wr_trace *lt, char *value)
 {
 int rc=1;
-do  
+do
 	{
         rc&=vzt_wr_emit_u8z(lt, *value);
         } while(*(value++));
@@ -589,7 +589,7 @@ for(p=s;*p;p++)
                 {
                 h=h^(g>>24);
                 h=h^g;
-                }   
+                }
         }
 
 h^=h2;						/* combine the two hashes */
@@ -616,17 +616,17 @@ struct vzt_wr_symbol *temp;
 
 hv=vzt_wr_hash(s);
 if(!(temp=lt->sym[hv])) return(NULL); /* no hash entry, add here wanted to add */
-	
+
 while(temp)
         {
         if(!strcmp(temp->name,s))
                 {
-                return(temp); /* in table already */    
+                return(temp); /* in table already */
                 }
         if(!temp->next) break;
         temp=temp->next;
         }
-	
+
 return(NULL); /* not found, add here if you want to add*/
 }
 
@@ -651,13 +651,13 @@ if(lt->compress_fac_str)
 	vzt_wr_emit_u16z(lt, i);
 	vzt_wr_emit_stringz(lt, str+i);
         free(lt->compress_fac_str);
-        } 
+        }
         else
         {
 	vzt_wr_emit_u16z(lt, 0);
 	vzt_wr_emit_stringz(lt, str);
         }
-         
+
 lt->compress_fac_str = (char *) malloc((lt->compress_fac_len=len)+1);
 strcpy(lt->compress_fac_str, str);
 }
@@ -683,10 +683,10 @@ while(lastch!=s->name)
 
 	if(*lastch=='[')
 		{
-		*lastch=0x00;	
+		*lastch=0x00;
 		return;
 		}
-	lastch--;	
+	lastch--;
 	}
 return;
 }
@@ -713,12 +713,12 @@ if((lt)&&(lt->numfacs))
 			strip_brack(s);
 			s=s->symchain;
 			}
-		else	
+		else
 		for(i=0;i<lt->numfacs;i++)
 			{
 			lt->sorted_facs[lt->numfacs - i - 1] = s;	/* facs were chained backwards so reverse to restore bitslicing */
 			s=s->symchain;
-			}	
+			}
 		wave_msort(lt->sorted_facs, lt->numfacs);
 
 		/* move facs up */
@@ -783,7 +783,7 @@ if((lt)&&(lt->numfacs))
 		free(lt->compress_fac_str); lt->compress_fac_str=NULL;
 		lt->compress_fac_len=0;
 		lt->zfacname_predec_size = lt->zpackcount;
-	
+
 		gzflush_buffered(lt, 1);
 		fseeko(lt->handle, 0L, SEEK_END);
 		lt->position=ftello(lt->handle);
@@ -829,7 +829,7 @@ if((lt)&&(lt->numfacs))
 }
 
 
-/* 
+/*
  * initialize the trace and get back an lt context
  */
 struct vzt_wr_trace *vzt_wr_init(const char *name)
@@ -888,8 +888,8 @@ if(lt)
 /*
  * set initial value of trace (0, 1, x, z) only legal vals
  */
-void vzt_wr_set_initial_value(struct vzt_wr_trace *lt, char value) 
-{ 
+void vzt_wr_set_initial_value(struct vzt_wr_trace *lt, char value)
+{
 if(lt)
 	{
 	switch(value)
@@ -972,7 +972,7 @@ if(!(flags & (VZT_WR_SYM_F_INTEGER|VZT_WR_SYM_F_STRING|VZT_WR_SYM_F_DOUBLE)))
 			s->chg[i] = ~0;
 			}
 		}
-	
+
 	if(lt->multi_state)
 		{
 		if((lt->initial_value == 'x')||(lt->initial_value == 'z'))
@@ -1041,7 +1041,7 @@ return(sa);
 }
 
 
-/* 
+/*
  * set current time/granule updating
  */
 int vzt_wr_inc_time_by_delta(struct vzt_wr_trace *lt, unsigned int timeval)
@@ -1150,7 +1150,7 @@ if(t->child)
 		{
 		for(i=0;i<depth;i++)
 			{
-	 		vztint32_t k = *(bpnt2++); 
+	 		vztint32_t k = *(bpnt2++);
 			vzt_wr_emit_u32rz(lt, k);
 			}
 		}
@@ -1163,7 +1163,7 @@ if(t->child)
 
 		for(i=0;i<depth;i++)
 			{
-	 		vztint32_t k = *(bpnt2++); 
+	 		vztint32_t k = *(bpnt2++);
 			for(j=0;j<32;j++)
 				{
 				if(prev == (k&1))
@@ -1228,7 +1228,7 @@ if(!lt->timegranule)
 	vzt_wr_dsvzt_Tree *t=NULL;
 
 	val = 0;
-	
+
 	for(j=0;j<lt->numfacs;j++)
 		{
 		struct vzt_wr_symbol *s = lt->sorted_facs[j];
@@ -1331,7 +1331,7 @@ if((lt->timegranule >= lt->maxgranule)||(do_finalize))
         do      {
                 fseeko(lt->handle, 0L, SEEK_END);
                 lt->current_chunk=lt->position = ftello(lt->handle);
-  
+
                 if((lt->break_size)&&(attempt_break_state==2)&&(lt->position >= lt->break_size)&&(lt->position != lt->break_header_size))
                         {
                         vzt_wr_emit_do_breakfile(lt);
@@ -1398,7 +1398,7 @@ if((lt->timegranule >= lt->maxgranule)||(do_finalize))
 		struct vzt_wr_symbol *s = lt->sorted_facs[j];
 		for(i=0;i<s->len;i++)
 			{
-			vzt_wr_emit_u32rz(lt, s->prev[i]->val); 
+			vzt_wr_emit_u32rz(lt, s->prev[i]->val);
 			}
 		}
 
@@ -1409,12 +1409,12 @@ if((lt->timegranule >= lt->maxgranule)||(do_finalize))
 			struct vzt_wr_symbol *s = lt->sorted_facs[j];
 			for(i=0;i<s->len;i++)
 				{
-				vzt_wr_emit_u32rz(lt, s->prevx[i]->val); 
+				vzt_wr_emit_u32rz(lt, s->prevx[i]->val);
 				}
 			}
 		lt->use_multi_state = 0;
 		}
-	gzflush_buffered(lt, 0);	
+	gzflush_buffered(lt, 0);
 
 	vzt_wr_emit_uv32z(lt, lt->numstrings);
 	if(lt->numstrings)
@@ -1429,7 +1429,7 @@ if((lt->timegranule >= lt->maxgranule)||(do_finalize))
 	                        fprintf(stderr, "internal error line %d\n", __LINE__);
 	                        exit(255);
 	                        }
-	         
+
 	                vzt_wr_emit_stringz(lt, ds->item);
 	                ds2 = ds->next;
 	                free(ds->item);
@@ -1439,7 +1439,7 @@ if((lt->timegranule >= lt->maxgranule)||(do_finalize))
 	        lt->str_head = lt->str_curr = lt->str = NULL;
 		lt->numstrings = 0;
 		}
-	gzflush_buffered(lt, 1);	
+	gzflush_buffered(lt, 1);
 
         fseeko(lt->handle, 0L, SEEK_END);
         lt->position = ftello(lt->handle);
@@ -1481,7 +1481,7 @@ if(lt)
 				{
 				lt->bumptime = 0;
 
-				if(!lt->flush_valid) 
+				if(!lt->flush_valid)
 					{
 					lt->timepos++;
 					}
@@ -1489,14 +1489,14 @@ if(lt)
 					{
 					lt->flush_valid = 0;
 					}
-	
+
 				if(lt->timepos == VZT_WR_GRANULE_SIZE)
 					{
 					vzt_wr_flush_granule(lt, 0);
 					}
 				}
 
-			lt->timetable[lt->timepos + lt->timegranule * VZT_WR_GRANULE_SIZE] = timeval;			
+			lt->timetable[lt->timepos + lt->timegranule * VZT_WR_GRANULE_SIZE] = timeval;
 			lt->lasttime = timeval;
 			}
 		}
@@ -1505,7 +1505,7 @@ if(lt)
 		lt->timeset = 1;
 		lt->mintime = lt->maxtime = timeval;
 
-		lt->timetable[lt->timepos + lt->timegranule * VZT_WR_GRANULE_SIZE] = timeval;		
+		lt->timetable[lt->timepos + lt->timegranule * VZT_WR_GRANULE_SIZE] = timeval;
 		}
 
 	if( (!lt->timepos) && (!lt->timegranule) )
@@ -1601,7 +1601,7 @@ return(vzt_wr_emit_value_bit_string(lt, s, row, vzt_wr_expand_integer_to_bits(s-
 int vzt_wr_emit_value_double(struct vzt_wr_trace *lt, struct vzt_wr_symbol *s, unsigned int row, double value)
 {
 char xdrdata[8];
-#if HAVE_RPC_XDR_H 
+#if HAVE_RPC_XDR_H
 XDR x;
 #else
 const vztint32_t endian_matchword = 0x12345678;
@@ -1611,7 +1611,7 @@ int i;
 
 if((!lt)||(lt->blackout)||(!s)||(!(s->flags&VZT_WR_SYM_F_DOUBLE))||(row)) return(0);
 
-if(!lt->emitted) 
+if(!lt->emitted)
 	{
 	vzt_wr_emitfacs(lt);
 	lt->emitted = 1;
@@ -1627,7 +1627,7 @@ while(s->aliased_to)	/* find root alias if exists */
 	s=s->aliased_to;
 	}
 
-#if HAVE_RPC_XDR_H 
+#if HAVE_RPC_XDR_H
 xdrmem_create(&x, xdrdata, sizeof(xdrdata), XDR_ENCODE);
 xdr_double(&x, &value);
 #else
@@ -1677,7 +1677,7 @@ int i;
 
 if((!lt)||(lt->blackout)||(!s)||(!value)||(row)) return(rc);
 
-if(!lt->emitted) 
+if(!lt->emitted)
 	{
 	vzt_wr_emitfacs(lt);
 	lt->emitted = 1;
@@ -1694,7 +1694,7 @@ while(s->aliased_to)	/* find root alias if exists */
 	}
 
 lt->str = vzt2_wr_dsvzt_splay (value, lt->str);
-                
+
 if(!vzt2_wr_dsvzt_success)
 	{
         char *vcopy = strdup(value);
@@ -1703,11 +1703,11 @@ if(!vzt2_wr_dsvzt_success)
 	        lt->str = vzt2_wr_dsvzt_insert(strdup(""), NULL, lt->numstrings++); /* zeroth string means no value change in future blocks */
                 lt->str_head =  lt->str_curr = lt->str;
 		}
-        
+
         lt->str = vzt2_wr_dsvzt_insert(vcopy, lt->str, lt->numstrings);
 	lt->str_curr->next = lt->str;
         lt->str_curr = lt->str;
-                        
+
 	idx = lt->numstrings;
         lt->numstrings++;
         }
@@ -1747,7 +1747,7 @@ vztint32_t msk, msk_n;
 
 if((!lt)||(lt->blackout)||(!s)||(!value)||(!*value)||(row)) return(rc);
 
-if(!lt->emitted) 
+if(!lt->emitted)
 	{
 	vzt_wr_emitfacs(lt);
 	lt->emitted = 1;
@@ -1930,7 +1930,7 @@ if(lt)
 		{
 		struct vzt_wr_symbol *s = lt->symchain;
 		struct vzt_wr_symbol *s2;
-		
+
 		while(s)
 			{
 			if(s->name) { free(s->name); }
@@ -1945,7 +1945,7 @@ if(lt)
 
 		lt->symchain = NULL;
 		}
-	
+
 	free(lt->vztname);
 	free(lt->timetable);
 	free(lt->sorted_facs);
@@ -1998,12 +1998,12 @@ if(lt)
 /*
  * time zero offset
  */
-void vzt_wr_set_timezero(struct vzt_wr_trace *lt, vztsint64_t timeval)               
-{           
+void vzt_wr_set_timezero(struct vzt_wr_trace *lt, vztsint64_t timeval)
+{
 if(lt)
-        { 
+        {
         lt->timezero = timeval;
-        }                 
+        }
 }
 
 
diff --git a/src/helpers/vzt_write.h b/src/helpers/vzt_write.h
index 90296f4..8d9d539 100644
--- a/src/helpers/vzt_write.h
+++ b/src/helpers/vzt_write.h
@@ -3,19 +3,19 @@
  *
  * 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: 
+ * 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   
+ * 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   
+ * 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.
  */
@@ -103,7 +103,7 @@ typedef unsigned __int64        vzttime_t;
  */
 typedef struct vzt_wr_dsvzt_tree_node vzt_wr_dsvzt_Tree;
 struct vzt_wr_dsvzt_tree_node {
-    vzt_wr_dsvzt_Tree * left, * right;  
+    vzt_wr_dsvzt_Tree * left, * right;
     vzt_wr_dsvzt_Tree * child;
     vztint32_t item;
     vztint32_t val;
@@ -111,7 +111,7 @@ struct vzt_wr_dsvzt_tree_node {
 
 /*
  * string splay
- */   
+ */
 typedef struct vzt2_wr_dsvzt_tree_node vzt2_wr_dsvzt_Tree;
 struct vzt2_wr_dsvzt_tree_node {
     vzt2_wr_dsvzt_Tree * left, * right;
@@ -119,7 +119,7 @@ struct vzt2_wr_dsvzt_tree_node {
     unsigned int val;
     vzt2_wr_dsvzt_Tree * next;
 };
-                                        
+
 
 struct vzt_wr_trace
 {
@@ -268,7 +268,7 @@ void			vzt_wr_set_compression_depth(struct vzt_wr_trace *lt, unsigned int depth)
 void			vzt_wr_set_rle(struct vzt_wr_trace *lt, unsigned int mode);
 
 			/* bitplane depth: must call before adding any facilities */
-void 			vzt_wr_force_twostate(struct vzt_wr_trace *lt); 
+void 			vzt_wr_force_twostate(struct vzt_wr_trace *lt);
 
 			/* facility creation */
 void                    vzt_wr_set_initial_value(struct vzt_wr_trace *lt, char value);
diff --git a/src/helpers/vztminer.c b/src/helpers/vztminer.c
index b4afc78..b6adb40 100644
--- a/src/helpers/vztminer.c
+++ b/src/helpers/vztminer.c
@@ -124,7 +124,7 @@ lt=vzt_rd_init(fname);
 if(lt)
 	{
 	int numfacs;
-	
+
 	vzt_rd_vectorize(lt);			/* coalesce bitblasted vectors */
 	numfacs = vzt_rd_get_num_facs(lt);
 	killed_list = calloc(numfacs, sizeof(char));
@@ -149,7 +149,7 @@ return(0);
 
 void print_help(char *nam)
 {
-#ifdef __linux__ 
+#ifdef __linux__
 printf(
 "Usage: %s [OPTION]... [VZTFILE]\n\n"
 "  -d, --dumpfile=FILE        specify VZT input dumpfile\n"
@@ -193,7 +193,7 @@ while (1)
         {
 #ifdef __linux__
         int option_index = 0;
-                        
+
         static struct option long_options[] =
                 {
 		{"dumpfile", 1, 0, 'd'},
@@ -202,16 +202,16 @@ while (1)
 		{"namesonly", 0, 0, 'n'},
 		{"comprehensive", 0, 0, 'c'},
                 {"help", 0, 0, 'h'},
-                {0, 0, 0, 0}  
+                {0, 0, 0, 0}
                 };
-                
+
         c = getopt_long (argc, argv, "d:m:x:nch", long_options, &option_index);
 #else
         c = getopt      (argc, argv, "d:m:x:nch");
 #endif
-                        
+
         if (c == -1) break;     /* no more args */
-                        
+
         switch (c)
                 {
 		case 'c':
@@ -278,29 +278,29 @@ while (1)
                 case 'h':
 			print_help(argv[0]);
                         break;
-                        
+
                 case '?':
                         opt_errors_encountered=1;
                         break;
-                        
+
                 default:
                         /* unreachable */
                         break;
                 }
         }
 
-if(!names_only && comprehensive) 
+if(!names_only && comprehensive)
 	{
 	killed_value = 0;
 	}
-                        
+
 if(opt_errors_encountered)
         {
         print_help(argv[0]);
         }
 
 if (optind < argc)
-        {               
+        {
         while (optind < argc)
                 {
                 if(lxname)
@@ -311,7 +311,7 @@ if (optind < argc)
                 strcpy(lxname, argv[optind++]);
                 }
         }
-                        
+
 if(!lxname)
         {
         print_help(argv[0]);
diff --git a/src/hierpack.c b/src/hierpack.c
index cb53b59..28ebb8f 100644
--- a/src/hierpack.c
+++ b/src/hierpack.c
@@ -23,14 +23,14 @@ GLOBALS->fmem_buf[GLOBALS->fmem_buf_offs++] = ch;
 
 
 static int enc_var(size_t v, unsigned char *buf)
-{               
+{
 size_t nxt;
 unsigned char *pnt = buf+VLI_SIZE;
 
-while((nxt = v>>7)) 
+while((nxt = v>>7))
         {
         *(--pnt) = (v&0x7f) | 0x80;
-        v = nxt;         
+        v = nxt;
         }
 *(--pnt) = (v&0x7f);
 return(buf+VLI_SIZE-pnt);
@@ -87,7 +87,7 @@ char *compress_facility(unsigned char *key, int len)
 size_t mat = 0;
 size_t plen;
 size_t i;
-unsigned char vli[VLI_SIZE]; 
+unsigned char vli[VLI_SIZE];
 
 if(len > GLOBALS->hp_buf_siz)
 	{
@@ -106,7 +106,7 @@ for(i=0;i<=len;i++)
         if(key[i] != GLOBALS->hp_buf[i]) break;
         }
 
-if(!mat) 
+if(!mat)
 	{
         GLOBALS->hp_prev += (plen = enc_var(mat, vli));
         out_write(vli+VLI_SIZE-plen, plen);
@@ -114,7 +114,7 @@ if(!mat)
         else
         {
         size_t back = GLOBALS->hp_prev - GLOBALS->hp_offs[mat-1];
-         
+
         plen = enc_var(back, vli);
         if(mat > plen)
         	{
@@ -131,7 +131,7 @@ if(!mat)
 
 out_c(0);
 GLOBALS->hp_prev++;
-                 
+
 for(i=mat;i<len;i++)
 	{
         out_c(key[i]);
@@ -175,7 +175,7 @@ str = GLOBALS->module_tree_c_1;
 ob = GLOBALS->longestname + 1;
 
 str[--ob] = 0;
-       
+
 do
 	{
         while(GLOBALS->fmem_buf[dcd])
@@ -184,7 +184,7 @@ do
                 dcd--;
                 }
 
-        dcd2 = --dcd;   
+        dcd2 = --dcd;
         val = 0;
         shamt = 0;
         for(;;)
diff --git a/src/hierpack.h b/src/hierpack.h
index 54e5baa..cae9b85 100644
--- a/src/hierpack.h
+++ b/src/hierpack.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) Tony Bybell 2008-2011.     
+ * Copyright (c) Tony Bybell 2008-2011.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
diff --git a/src/hiersearch.c b/src/hiersearch.c
index 5ddc91a..64fc1f7 100644
--- a/src/hiersearch.c
+++ b/src/hiersearch.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2011.
  *
  * This program is free software; you can redistribute it and/or
@@ -8,7 +8,7 @@
  */
 
 
-/* AIX may need this for alloca to work */ 
+/* AIX may need this for alloca to work */
 #if defined _AIX
   #pragma alloca
 #endif
@@ -31,7 +31,7 @@ return(GLOBALS->is_active_hiersearch_c_1);
 }
 
 
-void refresh_hier_tree(struct tree *t) 
+void refresh_hier_tree(struct tree *t)
 {
 struct tree *t2;
 GtkCList *cl;
@@ -83,9 +83,9 @@ if(!GLOBALS->hier_grouping)
 						strcpy(tmp,   "[] ");
 						strcpy(tmp+3, tmp3);
 						free_2(tmp2);
-						}	
+						}
 						else
-						{					
+						{
 						tmp=wave_alloca(strlen(t2->name)+4);
 						strcpy(tmp,   "[] ");
 						strcpy(tmp+3, t2->name);
@@ -94,7 +94,7 @@ if(!GLOBALS->hier_grouping)
 					else
 					{
 					tmp=t2->name;
-					}				
+					}
 				}
 				else
 	                        {
@@ -104,8 +104,8 @@ if(!GLOBALS->hier_grouping)
 			row=gtk_clist_prepend(cl,(gchar **)&tmp);
 			pixlen=font_engine_string_measure(GLOBALS->signalfont,(gchar *)(tmp));
 			}
-		maxpixlen=(pixlen>maxpixlen)?pixlen:maxpixlen;		
-		gtk_clist_set_row_data(cl, row,t2); 
+		maxpixlen=(pixlen>maxpixlen)?pixlen:maxpixlen;
+		gtk_clist_set_row_data(cl, row,t2);
 		GLOBALS->num_rows_hiersearch_c_1++;
 skip_node:	t2=t2->next;
 		}
@@ -137,9 +137,9 @@ skip_node:	t2=t2->next;
 						strcpy(tmp,   "[] ");
 						strcpy(tmp+3, tmp3);
 						free_2(tmp2);
-						}	
+						}
 						else
-						{					
+						{
 						tmp=wave_alloca(strlen(t2->name)+4);
 						strcpy(tmp,   "[] ");
 						strcpy(tmp+3, t2->name);
@@ -148,7 +148,7 @@ skip_node:	t2=t2->next;
 					else
 					{
 					tmp=t2->name;
-					}				
+					}
 				}
 				else
 	                        {
@@ -158,8 +158,8 @@ skip_node:	t2=t2->next;
 
 			row=gtk_clist_prepend(cl,(gchar **)&tmp);
 			pixlen=font_engine_string_measure(GLOBALS->signalfont,(gchar *)(tmp));
-			maxpixlen=(pixlen>maxpixlen)?pixlen:maxpixlen;		
-			gtk_clist_set_row_data(cl, row,t2); 
+			maxpixlen=(pixlen>maxpixlen)?pixlen:maxpixlen;
+			gtk_clist_set_row_data(cl, row,t2);
 			GLOBALS->num_rows_hiersearch_c_1++;
                         }
 skip_node_2:	t2=t2->next;
@@ -175,8 +175,8 @@ skip_node_2:	t2=t2->next;
                         strcpy(tmp+4, t2->name);
 			row=gtk_clist_prepend(cl,(gchar **)&tmp);
 			pixlen=font_engine_string_measure(GLOBALS->signalfont,(gchar *)(tmp));
-			maxpixlen=(pixlen>maxpixlen)?pixlen:maxpixlen;		
-			gtk_clist_set_row_data(cl, row,t2); 
+			maxpixlen=(pixlen>maxpixlen)?pixlen:maxpixlen;
+			gtk_clist_set_row_data(cl, row,t2);
 			GLOBALS->num_rows_hiersearch_c_1++;
                         }
 		t2=t2->next;
@@ -187,7 +187,7 @@ skip_node_2:	t2=t2->next;
 if(t!=GLOBALS->treeroot)
 	{
 	row=gtk_clist_prepend(cl,(gchar **)&dotdot);
-	gtk_clist_set_row_data(cl, row,NULL); 
+	gtk_clist_set_row_data(cl, row,NULL);
 	GLOBALS->num_rows_hiersearch_c_1++;
 	}
 
@@ -311,14 +311,14 @@ static void entrybox_local(char *title, int width, char *default_text, int maxch
 static void ok_callback(GtkWidget *widget, GtkWidget *nothing)
 {
 int i;
- 
+
 if(!GLOBALS->h_selectedtree_hiersearch_c_1) return;
 
 set_window_busy(widget);
 
 for(i=fetchlow(GLOBALS->h_selectedtree_hiersearch_c_1)->t_which;i<=fetchhigh(GLOBALS->h_selectedtree_hiersearch_c_1)->t_which;i++)
         {
-        struct symbol *s;  
+        struct symbol *s;
 	if(i<0) break; /* GHW */
         s=GLOBALS->facs[i];
 	if(s->vec_root)
@@ -334,7 +334,7 @@ if(GLOBALS->is_lx2)
 
 	for(i=fetchlow(GLOBALS->h_selectedtree_hiersearch_c_1)->t_which;i<=fetchhigh(GLOBALS->h_selectedtree_hiersearch_c_1)->t_which;i++)
 	        {
-	        struct symbol *s, *t;  
+	        struct symbol *s, *t;
 		if(i<0) break; /* GHW */
 	        s=GLOBALS->facs[i];
 		t=s->vec_root;
@@ -365,7 +365,7 @@ if(GLOBALS->is_lx2)
 
 	if(pre_import)
 		{
-		lx2_import_masked();	
+		lx2_import_masked();
 		}
 	}
 /* LX2 */
@@ -373,7 +373,7 @@ if(GLOBALS->is_lx2)
 for(i=fetchlow(GLOBALS->h_selectedtree_hiersearch_c_1)->t_which;i<=fetchhigh(GLOBALS->h_selectedtree_hiersearch_c_1)->t_which;i++)
         {
 	int len;
-        struct symbol *s, *t;  
+        struct symbol *s, *t;
 	if(i<0) break; /* GHW */
         s=GLOBALS->facs[i];
 	t=s->vec_root;
@@ -393,7 +393,7 @@ for(i=fetchlow(GLOBALS->h_selectedtree_hiersearch_c_1)->t_which;i<=fetchhigh(GLO
 		}
 		else
 		{
-	        AddNodeUnroll(s->n, NULL);  
+	        AddNodeUnroll(s->n, NULL);
 		}
         }
 
@@ -410,18 +410,18 @@ static void insert_callback(GtkWidget *widget, GtkWidget *nothing)
 {
 Traces tcache;
 int i;
-    
+
 if(!GLOBALS->h_selectedtree_hiersearch_c_1) return;
 
 memcpy(&tcache,&GLOBALS->traces,sizeof(Traces));
-GLOBALS->traces.total=0; 
+GLOBALS->traces.total=0;
 GLOBALS->traces.first=GLOBALS->traces.last=NULL;
 
 set_window_busy(widget);
 
 for(i=fetchlow(GLOBALS->h_selectedtree_hiersearch_c_1)->t_which;i<=fetchhigh(GLOBALS->h_selectedtree_hiersearch_c_1)->t_which;i++)
         {
-        struct symbol *s;  
+        struct symbol *s;
 	if(i<0) break; /* GHW */
         s=GLOBALS->facs[i];
 	if(s->vec_root)
@@ -437,7 +437,7 @@ if(GLOBALS->is_lx2)
 
 	for(i=fetchlow(GLOBALS->h_selectedtree_hiersearch_c_1)->t_which;i<=fetchhigh(GLOBALS->h_selectedtree_hiersearch_c_1)->t_which;i++)
 	        {
-	        struct symbol *s, *t;  
+	        struct symbol *s, *t;
 		if(i<0) break; /* GHW */
 	        s=GLOBALS->facs[i];
 		t=s->vec_root;
@@ -468,7 +468,7 @@ if(GLOBALS->is_lx2)
 
 	if(pre_import)
 		{
-		lx2_import_masked();	
+		lx2_import_masked();
 		}
 	}
 /* LX2 */
@@ -476,7 +476,7 @@ if(GLOBALS->is_lx2)
 for(i=fetchlow(GLOBALS->h_selectedtree_hiersearch_c_1)->t_which;i<=fetchhigh(GLOBALS->h_selectedtree_hiersearch_c_1)->t_which;i++)
         {
 	int len;
-        struct symbol *s, *t;  
+        struct symbol *s, *t;
 	if(i<0) break; /* GHW */
         s=GLOBALS->facs[i];
 	t=s->vec_root;
@@ -496,7 +496,7 @@ for(i=fetchlow(GLOBALS->h_selectedtree_hiersearch_c_1)->t_which;i<=fetchhigh(GLO
 		}
 		else
 		{
-	        AddNodeUnroll(s->n, NULL);  
+	        AddNodeUnroll(s->n, NULL);
 		}
         }
 
@@ -510,7 +510,7 @@ GLOBALS->traces.last=tcache.last;
 GLOBALS->traces.total=tcache.total;
 
 PasteBuffer();
- 
+
 GLOBALS->traces.buffercount=tcache.buffercount;
 GLOBALS->traces.buffer=tcache.buffer;
 GLOBALS->traces.bufferlast=tcache.bufferlast;
@@ -528,16 +528,16 @@ int i;
 Trptr tfirst=NULL, tlast=NULL;
 
 if(!GLOBALS->h_selectedtree_hiersearch_c_1) return;
-        
+
 memcpy(&tcache,&GLOBALS->traces,sizeof(Traces));
 GLOBALS->traces.total=0;
-GLOBALS->traces.first=GLOBALS->traces.last=NULL;  
+GLOBALS->traces.first=GLOBALS->traces.last=NULL;
 
 set_window_busy(widget);
 
 for(i=fetchlow(GLOBALS->h_selectedtree_hiersearch_c_1)->t_which;i<=fetchhigh(GLOBALS->h_selectedtree_hiersearch_c_1)->t_which;i++)
         {
-        struct symbol *s;  
+        struct symbol *s;
 	if(i<0) break; /* GHW */
         s=GLOBALS->facs[i];
 	if(s->vec_root)
@@ -553,7 +553,7 @@ if(GLOBALS->is_lx2)
 
 	for(i=fetchlow(GLOBALS->h_selectedtree_hiersearch_c_1)->t_which;i<=fetchhigh(GLOBALS->h_selectedtree_hiersearch_c_1)->t_which;i++)
 	        {
-	        struct symbol *s, *t;  
+	        struct symbol *s, *t;
 		if(i<0) break; /* GHW */
 	        s=GLOBALS->facs[i];
 		t=s->vec_root;
@@ -584,7 +584,7 @@ if(GLOBALS->is_lx2)
 
 	if(pre_import)
 		{
-		lx2_import_masked();	
+		lx2_import_masked();
 		}
 	}
 /* LX2 */
@@ -592,7 +592,7 @@ if(GLOBALS->is_lx2)
 for(i=fetchlow(GLOBALS->h_selectedtree_hiersearch_c_1)->t_which;i<=fetchhigh(GLOBALS->h_selectedtree_hiersearch_c_1)->t_which;i++)
         {
 	int len;
-        struct symbol *s, *t;  
+        struct symbol *s, *t;
 	if(i<0) break; /* GHW */
         s=GLOBALS->facs[i];
 	t=s->vec_root;
@@ -612,10 +612,10 @@ for(i=fetchlow(GLOBALS->h_selectedtree_hiersearch_c_1)->t_which;i<=fetchhigh(GLO
 		}
 		else
 		{
-	        AddNodeUnroll(s->n, NULL);  
+	        AddNodeUnroll(s->n, NULL);
 		}
         }
- 
+
 set_window_idle(widget);
 
 tfirst=GLOBALS->traces.first; tlast=GLOBALS->traces.last;       /* cache for highlighting */
@@ -675,7 +675,7 @@ if(tp)
         free_2(tp);
         }
 }
-        
+
 MaxSignalLength();
 signalarea_configure_event(GLOBALS->signalarea, NULL);
 wavearea_configure_event(GLOBALS->wavearea, NULL);
@@ -685,7 +685,7 @@ wavearea_configure_event(GLOBALS->wavearea, NULL);
 static void
 bundle_cleanup(GtkWidget *widget, gpointer data)
 {
-if(GLOBALS->entrybox_text_local_hiersearch_c_1)  
+if(GLOBALS->entrybox_text_local_hiersearch_c_1)
         {
         char *efix;
 
@@ -695,7 +695,7 @@ if(GLOBALS->entrybox_text_local_hiersearch_c_1)
         	fetchvex(GLOBALS->h_selectedtree_hiersearch_c_1, GLOBALS->bundle_direction_hiersearch_c_1);
 		}
 		else
-		{         
+		{
 	        efix=GLOBALS->entrybox_text_local_hiersearch_c_1;
 	        while(*efix)
 	                {
@@ -705,7 +705,7 @@ if(GLOBALS->entrybox_text_local_hiersearch_c_1)
 	                        }
 	                efix++;
 	                }
-	
+
 	        DEBUG(printf("Bundle name is: %s\n",GLOBALS->entrybox_text_local_hiersearch_c_1));
 	        add_vector_range(GLOBALS->entrybox_text_local_hiersearch_c_1,
 	                        fetchlow(GLOBALS->h_selectedtree_hiersearch_c_1)->t_which,
@@ -718,7 +718,7 @@ if(GLOBALS->entrybox_text_local_hiersearch_c_1)
         {
         DEBUG(printf("Bundle name is not specified--recursing into hierarchy.\n"));
         fetchvex(GLOBALS->h_selectedtree_hiersearch_c_1, GLOBALS->bundle_direction_hiersearch_c_1);
-        }  
+        }
 
 MaxSignalLength();
 signalarea_configure_event(GLOBALS->signalarea, NULL);
@@ -747,7 +747,7 @@ bundle_callback_up(GtkWidget *widget, gpointer data)
 GLOBALS->bundle_direction_hiersearch_c_1=0;
 bundle_callback_generic();
 }
-                
+
 static void
 bundle_callback_down(GtkWidget *widget, gpointer data)
 {
@@ -774,7 +774,7 @@ if(t)
 		tc=GLOBALS->treechain_hiersearch_c_1;
 		if(tc)
 			{
-			while(tc->next) tc=tc->next;			
+			while(tc->next) tc=tc->next;
 
     			tc2=calloc_2(1,sizeof(struct treechain));
 			tc2->label=t;
@@ -815,7 +815,7 @@ if(t)
 					free_2(tc->next);
 					tc->next=NULL;
 					break;
-					}					
+					}
 				}
 				else
 				{
@@ -824,7 +824,7 @@ if(t)
 				GLOBALS->current_tree_hiersearch_c_1=GLOBALS->treeroot;
 				break;
 				}
-					
+
 			}
 		refresh_hier_tree(GLOBALS->current_tree_hiersearch_c_1);
 		}
@@ -876,7 +876,7 @@ void hier_searchbox(char *title, GtkSignalFunc func)
     /* fix problem where ungrab doesn't occur if button pressed + simultaneous accelerator key occurs */
     if(GLOBALS->in_button_press_wavewindow_c_1) { gdk_pointer_ungrab(GDK_CURRENT_TIME); }
 
-    if(GLOBALS->is_active_hiersearch_c_1) 
+    if(GLOBALS->is_active_hiersearch_c_1)
 	{
 	gdk_window_raise(GLOBALS->window_hiersearch_c_3->window);
 	return;
@@ -916,7 +916,7 @@ void hier_searchbox(char *title, GtkSignalFunc func)
     GLOBALS->entry_main_hiersearch_c_1 = gtk_entry_new();
     gtk_entry_set_editable(GTK_ENTRY(GLOBALS->entry_main_hiersearch_c_1), FALSE);
     gtk_widget_show (GLOBALS->entry_main_hiersearch_c_1);
-    gtk_tooltips_set_tip_2(tooltips, GLOBALS->entry_main_hiersearch_c_1, 
+    gtk_tooltips_set_tip_2(tooltips, GLOBALS->entry_main_hiersearch_c_1,
 		"The hierarchy is built here by clicking on the appropriate "
 		"items below in the scrollable window.  Click on \"..\" to "
 		"go up a level."
@@ -934,7 +934,7 @@ void hier_searchbox(char *title, GtkSignalFunc func)
                         GTK_FILL | GTK_EXPAND | GTK_SHRINK, 1, 1);
 
     GLOBALS->clist_hiersearch_c_1=gtk_clist_new_with_titles(1,titles);
-    gtk_clist_column_titles_passive(GTK_CLIST(GLOBALS->clist_hiersearch_c_1)); 
+    gtk_clist_column_titles_passive(GTK_CLIST(GLOBALS->clist_hiersearch_c_1));
 
     gtk_clist_set_selection_mode(GTK_CLIST(GLOBALS->clist_hiersearch_c_1), GTK_SELECTION_SINGLE);
     gtkwave_signal_connect_object (GTK_OBJECT (GLOBALS->clist_hiersearch_c_1), "select_row",GTK_SIGNAL_FUNC(select_row_callback),NULL);
@@ -968,7 +968,7 @@ void hier_searchbox(char *title, GtkSignalFunc func)
     gtk_container_border_width (GTK_CONTAINER (button1), 3);
     gtkwave_signal_connect_object (GTK_OBJECT (button1), "clicked",GTK_SIGNAL_FUNC(ok_callback),GTK_OBJECT (GLOBALS->window_hiersearch_c_3));
     gtk_widget_show (button1);
-    gtk_tooltips_set_tip_2(tooltips, button1, 
+    gtk_tooltips_set_tip_2(tooltips, button1,
 		"Add selected signals to end of the display on the main window.",NULL);
 
     gtk_box_pack_start (GTK_BOX (hbox), button1, TRUE, FALSE, 0);
@@ -977,7 +977,7 @@ void hier_searchbox(char *title, GtkSignalFunc func)
     gtk_container_border_width (GTK_CONTAINER (button2), 3);
     gtkwave_signal_connect_object (GTK_OBJECT (button2), "clicked",GTK_SIGNAL_FUNC(insert_callback),GTK_OBJECT (GLOBALS->window_hiersearch_c_3));
     gtk_widget_show (button2);
-    gtk_tooltips_set_tip_2(tooltips, button2, 
+    gtk_tooltips_set_tip_2(tooltips, button2,
 		"Add children after last highlighted signal on the main window.",NULL);
     gtk_box_pack_start (GTK_BOX (hbox), button2, TRUE, FALSE, 0);
 
@@ -987,7 +987,7 @@ void hier_searchbox(char *title, GtkSignalFunc func)
     	gtk_container_border_width (GTK_CONTAINER (button3), 3);
     	gtkwave_signal_connect_object (GTK_OBJECT (button3), "clicked",GTK_SIGNAL_FUNC(bundle_callback_up),GTK_OBJECT (GLOBALS->window_hiersearch_c_3));
     	gtk_widget_show (button3);
-    	gtk_tooltips_set_tip_2(tooltips, button3, 
+    	gtk_tooltips_set_tip_2(tooltips, button3,
 		"Bundle children into a single bit vector with the topmost signal as the LSB and the lowest as the MSB.",NULL);
     	gtk_box_pack_start (GTK_BOX (hbox), button3, TRUE, FALSE, 0);
 
@@ -995,7 +995,7 @@ void hier_searchbox(char *title, GtkSignalFunc func)
     	gtk_container_border_width (GTK_CONTAINER (button3a), 3);
     	gtkwave_signal_connect_object (GTK_OBJECT (button3a), "clicked",GTK_SIGNAL_FUNC(bundle_callback_down),GTK_OBJECT (GLOBALS->window_hiersearch_c_3));
     	gtk_widget_show (button3a);
-    	gtk_tooltips_set_tip_2(tooltips, button3a, 
+    	gtk_tooltips_set_tip_2(tooltips, button3a,
 		"Bundle children into a single bit vector with the topmost signal as the MSB and the lowest as the LSB.",NULL);
     	gtk_box_pack_start (GTK_BOX (hbox), button3a, TRUE, FALSE, 0);
 	}
@@ -1004,14 +1004,14 @@ void hier_searchbox(char *title, GtkSignalFunc func)
     gtk_container_border_width (GTK_CONTAINER (button4), 3);
     gtkwave_signal_connect_object (GTK_OBJECT (button4), "clicked",GTK_SIGNAL_FUNC(replace_callback),GTK_OBJECT (GLOBALS->window_hiersearch_c_3));
     gtk_widget_show (button4);
-    gtk_tooltips_set_tip_2(tooltips, button4, 
+    gtk_tooltips_set_tip_2(tooltips, button4,
 		"Replace highlighted signals on the main window with children shown above.",NULL);
     gtk_box_pack_start (GTK_BOX (hbox), button4, TRUE, FALSE, 0);
 
     button5 = gtk_button_new_with_label (" Exit ");
     gtk_container_border_width (GTK_CONTAINER (button5), 3);
     gtkwave_signal_connect_object (GTK_OBJECT (button5), "clicked",GTK_SIGNAL_FUNC(destroy_callback),GTK_OBJECT (GLOBALS->window_hiersearch_c_3));
-    gtk_tooltips_set_tip_2(tooltips, button5, 
+    gtk_tooltips_set_tip_2(tooltips, button5,
 		"Do nothing and return to the main window.",NULL);
     gtk_widget_show (button5);
     gtk_box_pack_start (GTK_BOX (hbox), button5, TRUE, FALSE, 0);
@@ -1021,7 +1021,7 @@ void hier_searchbox(char *title, GtkSignalFunc func)
 
     gtk_widget_show(GLOBALS->window_hiersearch_c_3);
 
-    if(!GLOBALS->current_tree_hiersearch_c_1) 
+    if(!GLOBALS->current_tree_hiersearch_c_1)
 	{
 	GLOBALS->current_tree_hiersearch_c_1=GLOBALS->treeroot;
     	GLOBALS->h_selectedtree_hiersearch_c_1=NULL;
diff --git a/src/interp.c b/src/interp.c
index eed35fc..85bdf04 100644
--- a/src/interp.c
+++ b/src/interp.c
@@ -1,6 +1,6 @@
 /**********
 Copyright 1990 Regents of the University of California.  All rights reserved.
-Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group 
+Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
 
 Spice is covered now covered by the BSD Copyright:
 
@@ -104,7 +104,7 @@ putinterval (double *poly, int degree, double *nvec, int last, double *nscale,
 }
 
 
-/* Takes n = (degree+1) doubles, and fills in result with the n coefficients 
+/* Takes n = (degree+1) doubles, and fills in result with the n coefficients
  * of the polynomial that will fit them. It also takes a pointer to an
  * array of n ^ 2 + n doubles to use for scratch -- we want to make this
  * fast and avoid doing mallocs for each call.
@@ -248,7 +248,7 @@ ft_polyfit (double *xdata, double *ydata, double *result, int degree,
  * nscale[] = user fills in with new x
  * nlen = user fills in with size of above array
  *
- * note that degree > 2 will result in bumpy curves if the derivatives 
+ * note that degree > 2 will result in bumpy curves if the derivatives
  * are not smooth
  */
 int
@@ -313,7 +313,7 @@ ft_interpolate (double *data, double *ndata, double *oscale, int olen,
 			     nscale, nlen, xdata[i], sign);
     }
 
-  /* Now plot the rest, piece by piece. l is the 
+  /* Now plot the rest, piece by piece. l is the
    * last element under consideration.
    */
   for (l = degree + 1; l < olen; l++)
@@ -332,7 +332,7 @@ ft_interpolate (double *data, double *ndata, double *oscale, int olen,
 	{
 	  if (--degree == 0)
 	    {
-	      /* fprintf(stderr, 
+	      /* fprintf(stderr,
 	         "interpolate: Internal Error.\n"); */
 	      rc = 0;
 	      goto bot;
diff --git a/src/jrb.c b/src/jrb.c
index 8ead418..ad4c92d 100644
--- a/src/jrb.c
+++ b/src/jrb.c
@@ -12,19 +12,19 @@
 
 /* Original code by Jim Plank (plank at cs.utk.edu) */
 /* modified for THINK C 6.0 for Macintosh by Chris Bartley */
- 
+
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <ctype.h>
 #include "jrb.h"
- 
+
 static void mk_new_int(JRB l, JRB r, JRB p, int il);
 static JRB lprev(JRB n);
 static JRB rprev(JRB n);
 static void recolor(JRB n);
 static void single_rotate(JRB y, int l);
- 
+
 #define isred(n) (n->red)
 #define isblack(n) (!isred(n))
 #define isleft(n) (n->left)
@@ -47,19 +47,19 @@ static void single_rotate(JRB y, int l);
 #define setext(n) n->internal = 0
 #define setnormal(n) n->roothead = 0
 #define sibling(n) ((isleft(n)) ? n->parent->blink : n->parent->flink)
- 
+
 static void insert(JRB item, JRB list)	/* Inserts to the end of a list */
 {
   JRB last_node;
- 
+
   last_node = list->blink;
- 
+
   list->blink = item;
   last_node->flink = item;
   item->blink = last_node;
   item->flink = list;
 }
- 
+
 static void delete_item(JRB item)		/* Deletes an arbitrary iterm */
 {
   item->flink->blink = item->blink;
@@ -74,11 +74,11 @@ static void delete_item(JRB item)		/* Deletes an arbitrary iterm */
   setblack(new);\
   setnormal(new);\
 }
- 
+
 static void mk_new_int(JRB l, JRB r, JRB p, int il)
 {
   JRB newnode;
- 
+
   newnode = (JRB) calloc(1, sizeof(struct jrb_node));
   setint(newnode);
   setred(newnode);
@@ -103,9 +103,9 @@ static void mk_new_int(JRB l, JRB r, JRB p, int il)
     p->blink = newnode;
   }
   recolor(newnode);
-}  
-  
-   
+}
+
+
 JRB lprev(JRB n)
 {
   if (ishead(n)) return n;
@@ -115,7 +115,7 @@ JRB lprev(JRB n)
   }
   return n->parent;
 }
- 
+
 JRB rprev(JRB n)
 {
   if (ishead(n)) return n;
@@ -125,11 +125,11 @@ JRB rprev(JRB n)
   }
   return n->parent;
 }
- 
+
 JRB make_jrb(void)
 {
   JRB head;
- 
+
   head = (JRB) calloc (1, sizeof(struct jrb_node));
   head->flink = head;
   head->blink = head;
@@ -138,11 +138,11 @@ JRB make_jrb(void)
   sethead(head);
   return head;
 }
- 
+
 JRB jrb_find_gte_str(JRB n, const char *key, int *fnd)
 {
   int cmp;
- 
+
   *fnd = 0;
   if (!ishead(n)) {
     fprintf(stderr, "jrb_find_gte_str called on non-head 0x%p\n", (void *)n);
@@ -152,9 +152,9 @@ JRB jrb_find_gte_str(JRB n, const char *key, int *fnd)
   cmp = strcmp(key, n->blink->key.s);
   if (cmp == 0) {
     *fnd = 1;
-    return n->blink; 
+    return n->blink;
   }
-  if (cmp > 0) return n; 
+  if (cmp > 0) return n;
   else n = n->parent;
   while (1) {
     if (isext(n)) return n;
@@ -166,7 +166,7 @@ JRB jrb_find_gte_str(JRB n, const char *key, int *fnd)
     if (cmp < 0) n = n->flink ; else n = n->blink;
   }
 }
- 
+
 JRB jrb_find_str(JRB n, const char *key)
 {
   int fnd;
@@ -174,7 +174,7 @@ JRB jrb_find_str(JRB n, const char *key)
   j = jrb_find_gte_str(n, key, &fnd);
   if (fnd) return j; else return NULL;
 }
- 
+
 JRB jrb_find_gte_int(JRB n, int ikey, int *fnd)
 {
   *fnd = 0;
@@ -185,9 +185,9 @@ JRB jrb_find_gte_int(JRB n, int ikey, int *fnd)
   if (n->parent == n) return n;
   if (ikey == n->blink->key.i) {
     *fnd = 1;
-    return n->blink; 
+    return n->blink;
   }
-  if (ikey > n->blink->key.i) return n; 
+  if (ikey > n->blink->key.i) return n;
   else n = n->parent;
   while (1) {
     if (isext(n)) return n;
@@ -198,7 +198,7 @@ JRB jrb_find_gte_int(JRB n, int ikey, int *fnd)
     n = (ikey < getlext(n)->key.i) ? n->flink : n->blink;
   }
 }
- 
+
 JRB jrb_find_int(JRB n, int ikey)
 {
   int fnd;
@@ -218,9 +218,9 @@ JRB jrb_find_gte_vptr(JRB n, void *vkey, int *fnd)
   if (n->parent == n) return n;
   if ((char *)vkey == (char *)n->blink->key.v) {
     *fnd = 1;
-    return n->blink; 
+    return n->blink;
   }
-  if ((char *)vkey > (char *)n->blink->key.v) return n; 
+  if ((char *)vkey > (char *)n->blink->key.v) return n;
   else n = n->parent;
   while (1) {
     if (isext(n)) return n;
@@ -231,7 +231,7 @@ JRB jrb_find_gte_vptr(JRB n, void *vkey, int *fnd)
     n = ((char *)vkey < (char *)getlext(n)->key.v) ? n->flink : n->blink;
   }
 }
- 
+
 JRB jrb_find_vptr(JRB n, void *vkey)
 {
   int fnd;
@@ -240,11 +240,11 @@ JRB jrb_find_vptr(JRB n, void *vkey)
   j = jrb_find_gte_vptr(n, vkey, &fnd);
   if (fnd) return j; else return NULL;
 }
- 
+
 JRB jrb_find_gte_gen(JRB n, Jval key,int (*fxn)(Jval, Jval), int *fnd)
 {
   int cmp;
- 
+
   *fnd = 0;
   if (!ishead(n)) {
     fprintf(stderr, "jrb_find_gte_str called on non-head 0x%p\n", (void *)n);
@@ -254,9 +254,9 @@ JRB jrb_find_gte_gen(JRB n, Jval key,int (*fxn)(Jval, Jval), int *fnd)
   cmp = (*fxn)(key, n->blink->key);
   if (cmp == 0) {
     *fnd = 1;
-    return n->blink; 
+    return n->blink;
   }
-  if (cmp > 0) return n; 
+  if (cmp > 0) return n;
   else n = n->parent;
   while (1) {
     if (isext(n)) return n;
@@ -268,7 +268,7 @@ JRB jrb_find_gte_gen(JRB n, Jval key,int (*fxn)(Jval, Jval), int *fnd)
     if (cmp < 0) n = n->flink ; else n = n->blink;
   }
 }
- 
+
 JRB jrb_find_gen(JRB n, Jval key, int (*fxn)(Jval, Jval))
 {
   int fnd;
@@ -277,11 +277,11 @@ JRB jrb_find_gen(JRB n, Jval key, int (*fxn)(Jval, Jval))
   j = jrb_find_gte_gen(n, key, fxn, &fnd);
   if (fnd) return j; else return NULL;
 }
- 
+
 static JRB jrb_insert_b(JRB n, Jval key, Jval val)
 {
   JRB newleft, newright, newnode, p;
- 
+
   if (ishead(n)) {
     if (n->parent == n) {         /* Tree is empty */
       mk_new_ext(newnode, key, val);
@@ -307,30 +307,30 @@ static JRB jrb_insert_b(JRB n, Jval key, Jval val)
     mk_new_int(newleft, n, n->parent, isleft(n));
     p = lprev(newleft);
     if (!ishead(p)) setrext(p, newleft);
-    return newleft;    
+    return newleft;
   }
 }
- 
+
 static void recolor(JRB n)
-{  
+{
   JRB p, gp, s;
   int done = 0;
- 
+
   while(!done) {
     if (isroot(n)) {
       setblack(n);
       return;
     }
- 
+
     p = n->parent;
- 
+
     if (isblack(p)) return;
-    
+
     if (isroot(p)) {
       setblack(p);
       return;
     }
- 
+
     gp = p->parent;
     s = sibling(p);
     if (isred(s)) {
@@ -343,7 +343,7 @@ static void recolor(JRB n)
     }
   }
   /* p's sibling is black, p is red, gp is black */
-  
+
   if ((isleft(n) == 0) == (isleft(p) == 0)) {
     single_rotate(gp, isleft(n));
     setblack(p);
@@ -355,34 +355,34 @@ static void recolor(JRB n)
     setred(gp);
   }
 }
- 
+
 static void single_rotate(JRB y, int l)
 {
   int rl = 0, ir;
   JRB x, yp;
- 
+
   ir = isroot(y);
   yp = y->parent;
   if (!ir) {
     rl = isleft(y);
   }
-  
+
   if (l) {
     x = y->flink;
     y->flink = x->blink;
     setleft(y->flink);
     y->flink->parent = y;
     x->blink = y;
-    setright(y);  
+    setright(y);
   } else {
     x = y->blink;
     y->blink = x->flink;
     setright(y->blink);
     y->blink->parent = y;
     x->flink = y;
-    setleft(y);  
+    setleft(y);
   }
- 
+
   x->parent = yp;
   y->parent = x;
   if (ir) {
@@ -399,12 +399,12 @@ static void single_rotate(JRB y, int l)
     }
   }
 }
-    
+
 void jrb_delete_node(JRB n)
 {
   JRB s, p, gp;
   char ir;
- 
+
   if (isint(n)) {
     fprintf(stderr, "Cannot delete an internal node: 0x%p\n", (void *)n);
     exit(1);
@@ -419,7 +419,7 @@ void jrb_delete_node(JRB n)
     p->parent = p;
     free(n);
     return;
-  } 
+  }
   s = sibling(n);    /* The only node after deletion */
   if (isroot(p)) {
     s->parent = p->parent;
@@ -441,9 +441,9 @@ void jrb_delete_node(JRB n)
   ir = isred(p);
   free(p);
   free(n);
-  
+
   if (isext(s)) {      /* Update proper rext and lext values */
-    p = lprev(s); 
+    p = lprev(s);
     if (!ishead(p)) setrext(p, s);
     p = rprev(s);
     if (!ishead(p)) setlext(p, s);
@@ -458,15 +458,15 @@ void jrb_delete_node(JRB n)
     setblack(s);
     return;
   }
- 
+
   if (ir) return;
- 
+
   /* Recolor */
-  
+
   n = s;
   p = n->parent;
   s = sibling(n);
-  while(isblack(p) && isblack(s) && isint(s) && 
+  while(isblack(p) && isblack(s) && isint(s) &&
         isblack(s->flink) && isblack(s->blink)) {
     setred(s);
     n = p;
@@ -474,25 +474,25 @@ void jrb_delete_node(JRB n)
     p = n->parent;
     s = sibling(n);
   }
-  
+
   if (isblack(p) && isred(s)) {  /* Rotation 2.3b */
     single_rotate(p, isright(n));
     setred(p);
     setblack(s);
     s = sibling(n);
   }
-    
+
   { JRB x, z; char il;
-    
+
     if (isext(s)) {
       fprintf(stderr, "DELETION ERROR: sibling not internal\n");
       exit(1);
     }
- 
+
     il = isleft(n);
     x = il ? s->flink : s->blink ;
     z = sibling(x);
- 
+
     if (isred(z)) {  /* Rotation 2.3f */
       single_rotate(p, !il);
       setblack(z);
@@ -520,7 +520,7 @@ void jrb_delete_node(JRB n)
     }
   }
 }
- 
+
 int jrb_nblack(JRB n)
 {
   int nb;
@@ -536,7 +536,7 @@ int jrb_nblack(JRB n)
   }
   return nb;
 }
- 
+
 int jrb_plength(JRB n)
 {
   int pl;
@@ -552,25 +552,25 @@ int jrb_plength(JRB n)
   }
   return pl;
 }
- 
+
 void jrb_free_tree(JRB n)
 {
   if (!ishead(n)) {
     fprintf(stderr, "ERROR: Rb_free_tree called on a non-head node\n");
     exit(1);
   }
- 
+
   while(jrb_first(n) != jrb_nil(n)) {
     jrb_delete_node(jrb_first(n));
   }
   free(n);
 }
- 
+
 Jval jrb_val(JRB n)
 {
   return n->val;
 }
- 
+
 JRB jrb_insert_str(JRB tree, char *key, Jval val)
 {
   Jval k;
@@ -600,7 +600,7 @@ JRB jrb_insert_vptr(JRB tree, void *vkey, Jval val)
 
 JRB jrb_insert_gen(JRB tree, Jval key, Jval val,
                           int (*func)(Jval, Jval))
-{ 
+{
   int fnd;
 
   return jrb_insert_b(jrb_find_gte_gen(tree, key, func, &fnd), key, val);
diff --git a/src/jrb.h b/src/jrb.h
index c0b4234..3b47d21 100644
--- a/src/jrb.h
+++ b/src/jrb.h
@@ -73,15 +73,15 @@ extern JRB jrb_find_gen(JRB root, Jval, int (*func)(Jval, Jval));
 extern JRB jrb_find_gte_str(JRB root, const char *key, int *found);
 extern JRB jrb_find_gte_int(JRB root, int ikey, int *found);
 extern JRB jrb_find_gte_vptr(JRB root, void *vkey, int *found);
-extern JRB jrb_find_gte_gen(JRB root, Jval key, 
+extern JRB jrb_find_gte_gen(JRB root, Jval key,
                               int (*func)(Jval, Jval), int *found);
 
 
-/* Creates a node with key key and val val and inserts it into the 
-   tree before/after node nd.  Does not check to ensure that you are 
+/* Creates a node with key key and val val and inserts it into the
+   tree before/after node nd.  Does not check to ensure that you are
    keeping the correct order */
 
-extern void jrb_delete_node(JRB node);  /* Deletes and frees a node (but 
+extern void jrb_delete_node(JRB node);  /* Deletes and frees a node (but
                                               not the key or val) */
 extern void jrb_free_tree(JRB root);  /* Deletes and frees an entire tree */
 
@@ -92,7 +92,7 @@ extern int jrb_nblack(JRB n); /* returns # of black nodes in path from
                                     n to the root */
 int jrb_plength(JRB n);       /* returns the # of nodes in path from
 				    n to the root */
- 
+
 #define jrb_first(n) (n->flink)
 #define jrb_last(n) (n->blink)
 #define jrb_next(n) (n->flink)
@@ -101,12 +101,12 @@ int jrb_plength(JRB n);       /* returns the # of nodes in path from
 #ifndef jrb_nil
 #define jrb_nil(t) (t)
 #endif
- 
+
 #define jrb_traverse(ptr, lst) \
   for(ptr = jrb_first(lst); ptr != jrb_nil(lst); ptr = jrb_next(ptr))
- 
+
 #define jrb_rtraverse(ptr, lst) \
   for(ptr = jrb_last(lst); ptr != jrb_nil(lst); ptr = jrb_prev(ptr))
- 
+
 #endif
 
diff --git a/src/logfile.c b/src/logfile.c
index 4c74c4b..f8b67ca 100644
--- a/src/logfile.c
+++ b/src/logfile.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2010.
  *
  * This program is free software; you can redistribute it and/or
@@ -85,7 +85,7 @@ if((GLOBALS->tims.marker<0)||(GLOBALS->tims.marker<GLOBALS->tims.first)||(GLOBAL
         if(GLOBALS->tims.end>GLOBALS->tims.last) GLOBALS->tims.end=GLOBALS->tims.last;
         middle=(GLOBALS->tims.start/2)+(GLOBALS->tims.end/2);
         if((GLOBALS->tims.start&1)&&(GLOBALS->tims.end&1)) middle++;
-        }   
+        }
         else
         {
         middle=GLOBALS->tims.marker;
@@ -113,13 +113,13 @@ gchar *sel;
 #if defined(WAVE_USE_GTK2) && !defined(GTK_ENABLE_BROKEN)
 GtkTextIter start;
 GtkTextIter end;
-                        
+
 if (gtk_text_buffer_get_selection_bounds (GTK_TEXT_VIEW(text)->buffer,
                                          &start, &end))
        {
        if(gtk_text_iter_compare (&start, &end) < 0)
                {
-               sel = gtk_text_buffer_get_text(GTK_TEXT_VIEW(text)->buffer,   
+               sel = gtk_text_buffer_get_text(GTK_TEXT_VIEW(text)->buffer,
                                               &start, &end, FALSE);
 
                if(sel)
@@ -201,7 +201,7 @@ if(oe->has_selection)
 	if(oec->get_chars)
 		{
 	 	sel = oec->get_chars(oe, oe->selection_start_pos, oe->selection_end_pos);
-	
+
 		if(sel)
 			{
 			int slen = strlen(sel);
@@ -273,7 +273,7 @@ if(oe->has_selection)
 
 return(FALSE); /* call remaining handlers... */
 }
-   
+
 /* Create a scrolled text area that displays a "message" */
 static GtkWidget *create_log_text (GtkWidget **textpnt)
 {
@@ -306,7 +306,7 @@ gtk_table_attach (GTK_TABLE (table), text, 0, 14, 0, 1,
                         GTK_FILL | GTK_SHRINK | GTK_EXPAND, 0, 0);
 gtk_widget_set_usize(GTK_WIDGET(text), 100, 100);
 #if defined(WAVE_USE_GTK2) && !defined(GTK_ENABLE_BROKEN)
-gtk_text_view_set_editable(GTK_TEXT_VIEW(text), TRUE);   
+gtk_text_view_set_editable(GTK_TEXT_VIEW(text), TRUE);
 #else
 gtk_text_set_editable(GTK_TEXT(text), TRUE);
 #endif
@@ -316,9 +316,9 @@ gtk_widget_show (text);
 #if defined(WAVE_USE_GTK2) && !defined(GTK_ENABLE_BROKEN)
 {
 GtkTextViewClass *tc = (GtkTextViewClass*)GTK_OBJECT_GET_CLASS(GTK_OBJECT(text));
- 
+
 tc->set_scroll_adjustments(GTK_TEXT_VIEW (text), NULL, NULL);
-vscrollbar = gtk_vscrollbar_new (GTK_TEXT_VIEW (text)->vadjustment);  
+vscrollbar = gtk_vscrollbar_new (GTK_TEXT_VIEW (text)->vadjustment);
 }
 #else
 vscrollbar = gtk_vscrollbar_new (GTK_TEXT (text)->vadj);
@@ -336,11 +336,11 @@ gtk_signal_connect(GTK_OBJECT(text), "button_release_event", GTK_SIGNAL_FUNC(but
 gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(text), GTK_WRAP_CHAR);
 #else
 gtk_text_set_word_wrap(GTK_TEXT(text), FALSE);
-gtk_text_set_line_wrap(GTK_TEXT(text), TRUE); 
+gtk_text_set_line_wrap(GTK_TEXT(text), TRUE);
 #endif
 return(table);
 }
-   
+
 /***********************************************************************************/
 
 static void ok_callback(GtkWidget *widget, GtkWidget *cached_window)
@@ -410,7 +410,7 @@ void logbox(char *title, int width, char *default_text)
 #if defined(WAVE_USE_GTK2) && !defined(GTK_ENABLE_BROKEN)
 /* nothing */
 #else
-    if(!GLOBALS->font_logfile_c_1) 
+    if(!GLOBALS->font_logfile_c_1)
 	{
 	if(GLOBALS->fontname_logfile)
 		{
@@ -420,11 +420,11 @@ void logbox(char *title, int width, char *default_text)
 	if(!GLOBALS->font_logfile_c_1)
 		{
 #ifndef __CYGWIN__
-		 GLOBALS->font_logfile_c_1=gdk_font_load(GLOBALS->use_big_fonts 
+		 GLOBALS->font_logfile_c_1=gdk_font_load(GLOBALS->use_big_fonts
 				? "-*-courier-*-r-*-*-18-*-*-*-*-*-*-*"
 				: "-*-courier-*-r-*-*-10-*-*-*-*-*-*-*");
 #else
-		 GLOBALS->font_logfile_c_1=gdk_font_load(GLOBALS->use_big_fonts 
+		 GLOBALS->font_logfile_c_1=gdk_font_load(GLOBALS->use_big_fonts
 				? "-misc-fixed-*-*-*-*-18-*-*-*-*-*-*-*"
 				: "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*");
 
@@ -475,7 +475,7 @@ void logbox(char *title, int width, char *default_text)
     gtk_widget_set_usize(button1, 100, -1);
     gtk_signal_connect(GTK_OBJECT (button1), "clicked", GTK_SIGNAL_FUNC(ok_callback), window);
     gtk_widget_show (button1);
-    gtk_container_add (GTK_CONTAINER (hbox), button1);  
+    gtk_container_add (GTK_CONTAINER (hbox), button1);
     GTK_WIDGET_SET_FLAGS (button1, GTK_CAN_DEFAULT);
     gtk_signal_connect_object (GTK_OBJECT (button1), "realize", (GtkSignalFunc) gtk_widget_grab_default, GTK_OBJECT (button1));
 
@@ -561,7 +561,7 @@ static void logbox_reload_single(GtkWidget *window, GtkWidget *text, char *defau
 #if defined(WAVE_USE_GTK2) && !defined(GTK_ENABLE_BROKEN)
     {
     GtkTextIter st_iter, en_iter;
-  
+
     gtk_text_buffer_get_start_iter(GTK_TEXT_VIEW (text)->buffer, &st_iter);
     gtk_text_buffer_get_end_iter(GTK_TEXT_VIEW (text)->buffer, &en_iter);
     gtk_text_buffer_delete(GTK_TEXT_VIEW (text)->buffer, &st_iter, &en_iter);
@@ -573,7 +573,7 @@ static void logbox_reload_single(GtkWidget *window, GtkWidget *text, char *defau
     guint len = gtk_text_get_length(GTK_TEXT(text));
     gtk_text_set_point(GTK_TEXT(text), 0);
 
-    gtk_text_freeze(GTK_TEXT(text)); 
+    gtk_text_freeze(GTK_TEXT(text));
     gtk_text_forward_delete (GTK_TEXT(text), len);
     }
 #endif
diff --git a/src/lx2.c b/src/lx2.c
index aad6697..fe16fc7 100644
--- a/src/lx2.c
+++ b/src/lx2.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 2003-2012.
  *
  * This program is free software; you can redistribute it and/or
@@ -98,7 +98,7 @@ if(GLOBALS->numfacs)
 for(i=0;i<GLOBALS->numfacs;i++)
         {
 	char buf[65537];
-	char *str;	
+	char *str;
 	struct fac *f;
 
 	if(i!=(GLOBALS->numfacs-1))
@@ -152,7 +152,7 @@ for(i=0;i<GLOBALS->numfacs;i++)
 		{
                 int gatecmp = (f->len==1) && (!(f->flags&(LXT2_RD_SYM_F_INTEGER|LXT2_RD_SYM_F_DOUBLE|LXT2_RD_SYM_F_STRING))) && (node_block[i].msi!=-1) && (node_block[i].lsi!=-1);
                 int revcmp = gatecmp && (i) && (!strcmp(f_name[(i)&F_NAME_MODULUS], f_name[(i-1)&F_NAME_MODULUS]));
-		
+
 		if(gatecmp)
 			{
 			int len = sprintf(buf, "%s[%d]", f_name[(i)&F_NAME_MODULUS],node_block[i].msi);
@@ -193,7 +193,7 @@ for(i=0;i<GLOBALS->numfacs;i++)
 	                s=&sym_block[i];
 	                symadd_name_exists_sym_exists(s,str,0);
 			prevsymroot = prevsym = NULL;
-	
+
 			if(f->flags&LXT2_RD_SYM_F_INTEGER)
 				{
 				node_block[i].msi=31;
@@ -202,7 +202,7 @@ for(i=0;i<GLOBALS->numfacs;i++)
 				}
 			}
 		}
-		
+
 	n=&node_block[i];
         n->nname=s->name;
         n->mv.mvlfac = GLOBALS->mvlfacs_lx2_c_1+i;
@@ -212,7 +212,7 @@ for(i=0;i<GLOBALS->numfacs;i++)
 		{
 		n->extvals = 1;
 		}
-                 
+
         n->head.time=-1;        /* mark 1st node as negative time */
         n->head.v.h_val=AN_X;
         s->n=n;
@@ -243,8 +243,8 @@ if(GLOBALS->fast_tree_sort)
 	if(numalias)
 		{
 		unsigned int idx_lft = 0;
-		unsigned int idx_lftmax = GLOBALS->numfacs - numalias;  		
-		unsigned int idx_rgh = GLOBALS->numfacs - numalias;  		
+		unsigned int idx_lftmax = GLOBALS->numfacs - numalias;
+		unsigned int idx_rgh = GLOBALS->numfacs - numalias;
 		struct symbol **facs_merge=(struct symbol **)malloc_2(GLOBALS->numfacs*sizeof(struct symbol *));
 
 		fprintf(stderr, LXT2_RDLOAD"Merging in %d aliases.\n", numalias);
@@ -279,24 +279,24 @@ if(GLOBALS->fast_tree_sort)
 
 		free_2(GLOBALS->facs); GLOBALS->facs = facs_merge;
 		}
-                 
+
 /* SPLASH */                            splash_sync(3, 5);
         fprintf(stderr, LXT2_RDLOAD"Building facility hierarchy tree.\n");
-        
+
         init_tree();
         for(i=0;i<GLOBALS->numfacs;i++)
                 {
                 int esc = 0;
                 char *subst = GLOBALS->facs[i]->name;
                 char ch;
-                
+
                 while((ch=(*subst)))
                         {
                         if(ch==GLOBALS->hier_delimeter) { if(esc) *subst = VCDNAM_ESCAPE; }
                         else if(ch=='\\') { esc = 1; GLOBALS->escaped_names_found_vcd_c_1 = 1; }
                         subst++;
                         }
-                
+
                 build_tree_from_name(GLOBALS->facs[i]->name, i);
                 }
 /* SPLASH */                            splash_sync(4, 5);
@@ -314,17 +314,17 @@ if(GLOBALS->fast_tree_sort)
 			}
 	        }
         treegraft(&GLOBALS->treeroot);
-        
+
         fprintf(stderr, LXT2_RDLOAD"Sorting facility hierarchy tree.\n");
         treesort(GLOBALS->treeroot, NULL);
 
 /* SPLASH */                            splash_sync(5, 5);
         order_facs_from_treesort(GLOBALS->treeroot, &GLOBALS->facs);
-	if(GLOBALS->escaped_names_found_vcd_c_1)  
+	if(GLOBALS->escaped_names_found_vcd_c_1)
 	        {
-	        treenamefix(GLOBALS->treeroot);   
+	        treenamefix(GLOBALS->treeroot);
 	        }
-                 
+
         GLOBALS->facs_are_sorted=1;
         }
         else
@@ -338,7 +338,7 @@ if(GLOBALS->fast_tree_sort)
 		GLOBALS->facs[i]=&sym_block[i];
 	        if((len=strlen(subst=GLOBALS->facs[i]->name))>GLOBALS->longestname) GLOBALS->longestname=len;
 		while((ch=(*subst)))
-			{	
+			{
 #ifdef WAVE_HIERFIX
 	                if(ch==GLOBALS->hier_delimeter) { *subst=(!esc) ? VCDNAM_HIERSORT : VCDNAM_ESCAPE; }    /* forces sort at hier boundaries */
 #else
@@ -353,14 +353,14 @@ if(GLOBALS->fast_tree_sort)
 	fprintf(stderr, LXT2_RDLOAD"Sorting facilities at hierarchy boundaries.\n");
 	wave_heapsort(GLOBALS->facs,GLOBALS->numfacs);
 
-#ifdef WAVE_HIERFIX	
+#ifdef WAVE_HIERFIX
 	for(i=0;i<GLOBALS->numfacs;i++)
 		{
 		char *subst, ch;
-	
+
 		subst=GLOBALS->facs[i]->name;
 		while((ch=(*subst)))
-			{	
+			{
 			if(ch==VCDNAM_HIERSORT) { *subst=GLOBALS->hier_delimeter; }	/* restore back to normal */
 			subst++;
 			}
@@ -372,8 +372,8 @@ if(GLOBALS->fast_tree_sort)
 /* SPLASH */                            splash_sync(4, 5);
 	fprintf(stderr, LXT2_RDLOAD"Building facility hierarchy tree.\n");
 
-	init_tree();		
-	for(i=0;i<GLOBALS->numfacs;i++)	
+	init_tree();
+	for(i=0;i<GLOBALS->numfacs;i++)
 		{
 		char *nf = GLOBALS->facs[i]->name;
 	        build_tree_from_name(nf, i);
@@ -394,9 +394,9 @@ if(GLOBALS->fast_tree_sort)
 	        }
 	treegraft(&GLOBALS->treeroot);
 	treesort(GLOBALS->treeroot, NULL);
-	if(GLOBALS->escaped_names_found_vcd_c_1)  
+	if(GLOBALS->escaped_names_found_vcd_c_1)
 	        {
-	        treenamefix(GLOBALS->treeroot);   
+	        treenamefix(GLOBALS->treeroot);
 	        }
 	}
 
@@ -461,7 +461,7 @@ if(GLOBALS->busycnt_lx2_c_1==WAVE_BUSY_ITER)
 
 if(!(f->flags&(LXT2_RD_SYM_F_DOUBLE|LXT2_RD_SYM_F_STRING)))
 	{
-	if(f->len>1)        
+	if(f->len>1)
 	        {
 	        htemp->v.h_vector = (char *)malloc_2(f->len);
 		memcpy(htemp->v.h_vector, *value, f->len);
@@ -518,7 +518,7 @@ l2e->numtrans++;
  * this is the black magic that handles aliased signals...
  */
 static void lx2_resolver(nptr np, nptr resolve)
-{ 
+{
 np->extvals = resolve->extvals;
 np->msi = resolve->msi;
 np->lsi = resolve->lsi;
@@ -531,8 +531,8 @@ np->mv.mvlfac=NULL;
 
 
 
-/* 
- * actually import an lx2 trace but don't do it if it's already been imported 
+/*
+ * actually import an lx2 trace but don't do it if it's already been imported
  */
 void import_lx2_trace(nptr np)
 {
@@ -557,12 +557,12 @@ switch(GLOBALS->is_lx2)
 if(!(f=np->mv.mvlfac)) return;	/* already imported */
 
 txidx = f - GLOBALS->mvlfacs_lx2_c_1;
-if(np->mv.mvlfac->flags&LXT2_RD_SYM_F_ALIAS) 
+if(np->mv.mvlfac->flags&LXT2_RD_SYM_F_ALIAS)
 	{
 	txidx = lxt2_rd_get_alias_root(GLOBALS->lx2_lx2_c_1, txidx);
 	np = GLOBALS->mvlfacs_lx2_c_1[txidx].working_node;
 
-	if(!(f=np->mv.mvlfac)) 
+	if(!(f=np->mv.mvlfac))
 		{
 		lx2_resolver(nold, np);
 		return;	/* already imported */
@@ -604,7 +604,7 @@ if(len>1)
 	htemp->v.h_val = AN_X;		/* x */
 	}
 htemp->time = MAX_HISTENT_TIME-1;
-htemp->next = histent_tail;			
+htemp->next = histent_tail;
 
 if(GLOBALS->lx2_table_lx2_c_1[txidx].histent_curr)
 	{
@@ -640,7 +640,7 @@ if(!(f->flags&(LXT2_RD_SYM_F_DOUBLE|LXT2_RD_SYM_F_STRING)))
                 else
                 {
                 htemp2->v.h_val = htemp->v.h_val;
-                }   
+                }
         htemp2->next = htemp;
         htemp = htemp2;
 	GLOBALS->lx2_table_lx2_c_1[txidx].numtrans++;
@@ -662,7 +662,7 @@ if(nold!=np)
 }
 
 
-/* 
+/*
  * pre-import many traces at once so function above doesn't have to iterate...
  */
 void lx2_set_fac_process_mask(nptr np)
@@ -686,7 +686,7 @@ if(!(f=np->mv.mvlfac)) return;	/* already imported */
 
 txidx = f-GLOBALS->mvlfacs_lx2_c_1;
 
-if(np->mv.mvlfac->flags&LXT2_RD_SYM_F_ALIAS) 
+if(np->mv.mvlfac->flags&LXT2_RD_SYM_F_ALIAS)
 	{
 	txidx = lxt2_rd_get_alias_root(GLOBALS->lx2_lx2_c_1, txidx);
 	np = GLOBALS->mvlfacs_lx2_c_1[txidx].working_node;
@@ -759,7 +759,7 @@ for(txidx=0;txidx<GLOBALS->numfacs;txidx++)
 			htemp->v.h_val = AN_Z;		/* z */
 			}
 		htemp->time = MAX_HISTENT_TIME;
-			
+
 		htemp = histent_calloc();
 		if(len>1)
 			{
@@ -771,7 +771,7 @@ for(txidx=0;txidx<GLOBALS->numfacs;txidx++)
 			htemp->v.h_val = AN_X;		/* x */
 			}
 		htemp->time = MAX_HISTENT_TIME-1;
-		htemp->next = histent_tail;			
+		htemp->next = histent_tail;
 
 		if(GLOBALS->lx2_table_lx2_c_1[txidx].histent_curr)
 			{
@@ -807,7 +807,7 @@ for(txidx=0;txidx<GLOBALS->numfacs;txidx++)
 	                else
 	                {
 	                htemp2->v.h_val = htemp->v.h_val;
-	                }   
+	                }
 	        htemp2->next = htemp;
 	        htemp = htemp2;
 	        GLOBALS->lx2_table_lx2_c_1[txidx].numtrans++;
diff --git a/src/lx2.h b/src/lx2.h
index f7f644c..b248954 100644
--- a/src/lx2.h
+++ b/src/lx2.h
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 2003-2010.
  *
  * This program is free software; you can redistribute it and/or
diff --git a/src/lxt.c b/src/lxt.c
index 96cf9ba..48b5d05 100644
--- a/src/lxt.c
+++ b/src/lxt.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 2001-2014.
  *
  * This program is free software; you can redistribute it and/or
@@ -44,27 +44,27 @@ static int lt_emit_u8(FILE *handle, int value)
 {
 unsigned char buf[1];
 int nmemb;
-             
+
 buf[0] = value & 0xff;
 nmemb=fwrite(buf, sizeof(char), 1, handle);
 GLOBALS->fpos_lxt_c_1+=nmemb;
 return(nmemb);
-}   
+}
 
 
 static int lt_emit_u16(FILE *handle, int value)
 {
 unsigned char buf[2];
 int nmemb;
-    
-buf[0] = (value>>8) & 0xff;   
-buf[1] = value & 0xff;   
+
+buf[0] = (value>>8) & 0xff;
+buf[1] = value & 0xff;
 nmemb = fwrite(buf, sizeof(char), 2, handle);
 GLOBALS->fpos_lxt_c_1+=nmemb;
 return(nmemb);
 }
-    
-        
+
+
 static int lt_emit_u24(FILE *handle, int value)
 {
 unsigned char buf[3];
@@ -76,7 +76,7 @@ buf[2] = value & 0xff;
 nmemb=fwrite(buf, sizeof(char), 3, handle);
 GLOBALS->fpos_lxt_c_1+=nmemb;
 return(nmemb);
-}            
+}
 
 
 static int lt_emit_u32(FILE *handle, int value)
@@ -89,7 +89,7 @@ buf[1] = (value>>16) & 0xff;
 buf[2] = (value>>8) & 0xff;
 buf[3] = value & 0xff;
 nmemb=fwrite(buf, sizeof(char), 4, handle);
-GLOBALS->fpos_lxt_c_1+=nmemb; 
+GLOBALS->fpos_lxt_c_1+=nmemb;
 return(nmemb);
 }
 
@@ -145,11 +145,11 @@ return(0);
  * since we'll never read a 24-bit int at the very start of a file which
  * means that we'll have a 32-bit word that we can read.
  */
-   
+
 inline static unsigned int get_byte(offset) {
   return ((unsigned int)(*((unsigned char *)(GLOBALS->mm_lxt_c_1)+(offset))));
 }
- 
+
 inline static unsigned int get_16(offset) {
   return ((unsigned int)(*((unsigned short *)(((unsigned char *)(GLOBALS->mm_lxt_c_1))
                 +(offset)))));
@@ -166,7 +166,7 @@ inline static unsigned int get_24(offset) {
 inline static unsigned int get_64(offset) {
   return ((((UTimeType)get_32(offset))<<32)|((UTimeType)get_32((offset)+4)));
 }
-   
+
 #else
 
 /*
@@ -222,7 +222,7 @@ int i, j;
 static double p = 3.14159;
 
 d= *((double *)((unsigned char *)GLOBALS->mm_lxt_c_1+offset));
-if(p==d) 
+if(p==d)
 	{
 	GLOBALS->double_is_native_lxt_c_1=1;
 	}
@@ -242,7 +242,7 @@ if(p==d)
 				break;
 				}
 			}
-		}	
+		}
 	}
 }
 
@@ -302,14 +302,14 @@ return(rv);
 
 static TimeType bsearch_mvl_timechain(int key)
 {
-GLOBALS->max_compare_time_tc_lxt_c_2=-1; GLOBALS->max_compare_pos_tc_lxt_c_2=-1; 
+GLOBALS->max_compare_time_tc_lxt_c_2=-1; GLOBALS->max_compare_pos_tc_lxt_c_2=-1;
 
 if(bsearch((void *)&key, (void *)GLOBALS->positional_information_lxt_c_1, GLOBALS->total_cycles_lxt_c_2, sizeof(int), compar_mvl_timechain))
 	{
 	/* nothing, all side effects are in bsearch */
 	}
 
-if((GLOBALS->max_compare_pos_tc_lxt_c_2<=0)||(GLOBALS->max_compare_time_tc_lxt_c_2<0)) 
+if((GLOBALS->max_compare_pos_tc_lxt_c_2<=0)||(GLOBALS->max_compare_time_tc_lxt_c_2<0))
         {
         GLOBALS->max_compare_pos_tc_lxt_c_2=0; /* aix bsearch fix */
         }
@@ -364,7 +364,7 @@ decmem = malloc_2(total_mem = GLOBALS->dict_string_mem_required_lxt_c_1);
 
 rc=gzread(zhandle, decmem, total_mem);
 DEBUG(printf(LXTHDR"section offs for name decompression = %08x of len %d\n", offs, GLOBALS->dict_num_entries_lxt_c_1));
-DEBUG(printf(LXTHDR"Decompressed size is %d bytes (vs %d)\n", rc, total_mem));	
+DEBUG(printf(LXTHDR"Decompressed size is %d bytes (vs %d)\n", rc, total_mem));
 if(rc!=total_mem) { fprintf(stderr, LXTHDR"decompression size disparity  %d bytes (vs %d)\n", rc, total_mem); exit(255); }
 
 GLOBALS->dict_string_mem_array_lxt_c_1 = (char **)calloc_2(GLOBALS->dict_num_entries_lxt_c_1, sizeof(char *));
@@ -423,7 +423,7 @@ if(GLOBALS->zfacname_size_lxt_c_1)
 
 	rc=gzread(zhandle, decmem, total_mem);
 	DEBUG(printf(LXTHDR"section offs for name decompression = %08x of len %d\n", offs, GLOBALS->zfacname_size_lxt_c_1));
-	DEBUG(printf(LXTHDR"Decompressed size is %d bytes (vs %d)\n", rc, total_mem));	
+	DEBUG(printf(LXTHDR"Decompressed size is %d bytes (vs %d)\n", rc, total_mem));
 	if(rc!=total_mem) { fprintf(stderr, LXTHDR"decompression size disparity  %d bytes (vs %d)\n", rc, total_mem); exit(255); }
 
 	offs=0;	/* we're in our new memory region now.. */
@@ -481,7 +481,7 @@ if(GLOBALS->zfacgeometry_size_lxt_c_1)
 
 	rc=gzread(zhandle, decmem, total_mem);
 	DEBUG(printf(LXTHDR"section offs for facgeometry decompression = %08x of len %d\n", offs, GLOBALS->zfacgeometry_size_lxt_c_1));
-	DEBUG(printf(LXTHDR"Decompressed size is %d bytes (vs %d)\n", rc, total_mem));	
+	DEBUG(printf(LXTHDR"Decompressed size is %d bytes (vs %d)\n", rc, total_mem));
 	if(rc!=total_mem) { fprintf(stderr, LXTHDR"decompression size disparity  %d bytes (vs %d)\n", rc, total_mem); exit(255); }
 
 	offs=0;	/* we're in our new memory region now.. */
@@ -574,7 +574,7 @@ if(GLOBALS->time_table_offset_lxt_c_1)
 
 		rc=gzread(zhandle, decmem, total_mem);
 		DEBUG(printf(LXTHDR"section offs for timetable decompression = %08x of len %d\n", offs, GLOBALS->ztime_table_size_lxt_c_1));
-		DEBUG(printf(LXTHDR"Decompressed size is %d bytes (vs %d)\n", rc, total_mem));	
+		DEBUG(printf(LXTHDR"Decompressed size is %d bytes (vs %d)\n", rc, total_mem));
 		if(rc!=total_mem) { fprintf(stderr, LXTHDR"decompression size disparity  %d bytes (vs %d)\n", rc, total_mem); exit(255); }
 
 		offs=0;	/* we're in our new memory region now.. */
@@ -589,7 +589,7 @@ if(GLOBALS->time_table_offset_lxt_c_1)
 	GLOBALS->last_cycle_lxt_c_2=get_32(offs+4);
 	DEBUG(printf(LXTHDR"Last cycle: %d\n", GLOBALS->last_cycle_lxt_c_2));
 	DEBUG(printf(LXTHDR"Total cycles (actual): %d\n", GLOBALS->last_cycle_lxt_c_2-GLOBALS->first_cycle_lxt_c_2+1));
-	
+
 	/* rebuild time table from its deltas... */
 
 	GLOBALS->positional_information_lxt_c_1 = (int *)malloc_2(GLOBALS->total_cycles_lxt_c_2 * sizeof(int));
@@ -647,9 +647,9 @@ if(GLOBALS->time_table_offset_lxt_c_1)
 
 		rc=gzread(zhandle, decmem, total_mem);
 		DEBUG(printf(LXTHDR"section offs for timetable decompression = %08x of len %d\n", offs, GLOBALS->ztime_table_size_lxt_c_1));
-		DEBUG(printf(LXTHDR"Decompressed size is %d bytes (vs %d)\n", rc, total_mem));	
+		DEBUG(printf(LXTHDR"Decompressed size is %d bytes (vs %d)\n", rc, total_mem));
 		if(rc!=total_mem) { fprintf(stderr, LXTHDR"decompression size disparity  %d bytes (vs %d)\n", rc, total_mem); exit(255); }
-	
+
 		offs=0;	/* we're in our new memory region now.. */
 		}
 		else
@@ -662,7 +662,7 @@ if(GLOBALS->time_table_offset_lxt_c_1)
 	GLOBALS->last_cycle_lxt_c_2=get_64(offs+8);
 	DEBUG(printf(LXTHDR"Last cycle: %d\n", GLOBALS->last_cycle_lxt_c_2));
 	DEBUG(printf(LXTHDR"Total cycles (actual): %lld\n", GLOBALS->last_cycle_lxt_c_2-GLOBALS->first_cycle_lxt_c_2+1));
-	
+
 	/* rebuild time table from its deltas... */
 
 	GLOBALS->positional_information_lxt_c_1 = (int *)malloc_2(GLOBALS->total_cycles_lxt_c_2 * sizeof(int));
@@ -714,9 +714,9 @@ if(GLOBALS->sync_table_offset_lxt_c_1)
 
 		rc=gzread(zhandle, decmem, total_mem);
 		DEBUG(printf(LXTHDR"section offs for synctable decompression = %08x of len %d\n", offs, GLOBALS->zsync_table_size_lxt_c_1));
-		DEBUG(printf(LXTHDR"Decompressed size is %d bytes (vs %d)\n", rc, total_mem));	
+		DEBUG(printf(LXTHDR"Decompressed size is %d bytes (vs %d)\n", rc, total_mem));
 		if(rc!=total_mem) { fprintf(stderr, LXTHDR"decompression size disparity  %d bytes (vs %d)\n", rc, total_mem); exit(255); }
-	
+
 		offs=0;	/* we're in our new memory region now.. */
 		}
 
@@ -756,7 +756,7 @@ if(GLOBALS->zchg_size_lxt_c_1)
 		int fd2 = open(nam, O_RDONLY);
 		char testbyte[2]={0,0};
 		char is_bz2;
-	
+
 		unlink(nam);
 		if(fd_dummy >=0) close(fd_dummy);
 
@@ -770,32 +770,32 @@ if(GLOBALS->zchg_size_lxt_c_1)
 		if(is_bz2)
 			{
 			zhandle = BZ2_bzdopen(dup(GLOBALS->fd_lxt_c_1), "rb");
-	
+
 			while(len)
 				{
-				int siz = (len>32768) ? 32768 : len; 
-				rc = BZ2_bzread(zhandle, buf, siz);	
+				int siz = (len>32768) ? 32768 : len;
+				rc = BZ2_bzread(zhandle, buf, siz);
 				if(rc!=siz) { fprintf(stderr, LXTHDR"gzread error to tempfile %d (act) vs %d (exp), exiting.\n", rc, siz); exit(255); }
 				if(1 != fwrite(buf, siz, 1, tmp)) { fprintf(stderr, LXTHDR"fwrite error to tempfile, exiting.\n"); exit(255); };
-				len -= siz;		
+				len -= siz;
 				}
-	
+
 			fprintf(stderr, LXTHDR"...expanded %08x into %08x bytes.\n", GLOBALS->zchg_size_lxt_c_1, GLOBALS->zchg_predec_size_lxt_c_1);
 			BZ2_bzclose(zhandle);
 			}
 			else
 			{
 			zhandle = gzdopen(dup(GLOBALS->fd_lxt_c_1), "rb");
-	
+
 			while(len)
 				{
-				int siz = (len>32768) ? 32768 : len; 
-				rc = gzread(zhandle, buf, siz);	
+				int siz = (len>32768) ? 32768 : len;
+				rc = gzread(zhandle, buf, siz);
 				if(rc!=siz) { fprintf(stderr, LXTHDR"gzread error to tempfile %d (act) vs %d (exp), exiting.\n", rc, siz); exit(255); }
 				if(1 != fwrite(buf, siz, 1, tmp)) { fprintf(stderr, LXTHDR"fwrite error to tempfile, exiting.\n"); exit(255); };
-				len -= siz;		
+				len -= siz;
 				}
-	
+
 			fprintf(stderr, LXTHDR"...expanded %08x into %08x bytes.\n", GLOBALS->zchg_size_lxt_c_1, GLOBALS->zchg_predec_size_lxt_c_1);
 			gzclose(zhandle);
 			}
@@ -803,9 +803,9 @@ if(GLOBALS->zchg_size_lxt_c_1)
 		fflush(tmp);
 		fseeko(tmp, 0, SEEK_SET);
 		fclose(tmp);
-	
+
 		GLOBALS->fd_lxt_c_1 = fd2;
-		GLOBALS->mm_lxt_c_1=mmap(NULL, GLOBALS->zchg_predec_size_lxt_c_1, PROT_READ, MAP_SHARED, GLOBALS->fd_lxt_c_1, 0);	
+		GLOBALS->mm_lxt_c_1=mmap(NULL, GLOBALS->zchg_predec_size_lxt_c_1, PROT_READ, MAP_SHARED, GLOBALS->fd_lxt_c_1, 0);
 		GLOBALS->mm_lxt_mmap_addr = GLOBALS->mm_lxt_c_1;
 		GLOBALS->mm_lxt_mmap_len = GLOBALS->zchg_predec_size_lxt_c_1;
 		GLOBALS->mm_lxt_c_1=(void *)((char *)GLOBALS->mm_lxt_c_1-4); /* because header and version don't exist in packed change records */
@@ -828,7 +828,7 @@ if(GLOBALS->zchg_size_lxt_c_1)
 		fwrite(t, GLOBALS->zchg_size_lxt_c_1, 1, tmp); fseek(tmp, 0, SEEK_SET);
 		is_bz2 = (get_byte(GLOBALS->change_field_offset_lxt_c_1)=='B') && (get_byte(GLOBALS->change_field_offset_lxt_c_1+1)=='Z');
 		}
-#else		
+#else
 		if(GLOBALS->change_field_offset_lxt_c_1 != lseek(GLOBALS->fd_lxt_c_1, GLOBALS->change_field_offset_lxt_c_1, SEEK_SET)) { fprintf(stderr, LXTHDR"lseek error at offset %08x\n", (unsigned int)GLOBALS->change_field_offset_lxt_c_1); exit(255); }
 
 		is_bz2 = (read(GLOBALS->fd_lxt_c_1, &testbyte, 2))&&(testbyte[0]=='B')&&(testbyte[1]=='Z');
@@ -839,20 +839,20 @@ if(GLOBALS->zchg_size_lxt_c_1)
 		if(is_bz2)
 			{
 #if defined __MINGW32__ || defined _MSC_VER
-			zhandle = BZ2_bzdopen(dup(fileno(tmp)), "rb");			
+			zhandle = BZ2_bzdopen(dup(fileno(tmp)), "rb");
 #else
 			zhandle = BZ2_bzdopen(dup(GLOBALS->fd_lxt_c_1), "rb");
 #endif
-			
+
 			while(len)
 				{
-				int siz = (len>32768) ? 32768 : len; 
-				rc = BZ2_bzread(zhandle, pnt, siz);	
+				int siz = (len>32768) ? 32768 : len;
+				rc = BZ2_bzread(zhandle, pnt, siz);
 				if(rc!=siz) { fprintf(stderr, LXTHDR"BZ2_bzread error to buffer %d (act) vs %d (exp), exiting.\n", rc, siz); exit(255); }
 				pnt += siz;
-				len -= siz;		
+				len -= siz;
 				}
-	
+
 			fprintf(stderr, LXTHDR"...expanded %08x into %08x bytes.\n", GLOBALS->zchg_size_lxt_c_1, GLOBALS->zchg_predec_size_lxt_c_1);
 			BZ2_bzclose(zhandle);
 			}
@@ -865,13 +865,13 @@ if(GLOBALS->zchg_size_lxt_c_1)
 #endif
 			while(len)
 				{
-				int siz = (len>32768) ? 32768 : len; 
-				rc = gzread(zhandle, pnt, siz);	
+				int siz = (len>32768) ? 32768 : len;
+				rc = gzread(zhandle, pnt, siz);
 				if(rc!=siz) { fprintf(stderr, LXTHDR"gzread error to buffer %d (act) vs %d (exp), exiting.\n", rc, siz); exit(255); }
 				pnt += siz;
-				len -= siz;		
+				len -= siz;
 				}
-	
+
 			fprintf(stderr, LXTHDR"...expanded %08x into %08x bytes.\n", GLOBALS->zchg_size_lxt_c_1, GLOBALS->zchg_predec_size_lxt_c_1);
 			gzclose(zhandle);
 #if defined __MINGW32__ || defined _MSC_VER
@@ -879,11 +879,11 @@ if(GLOBALS->zchg_size_lxt_c_1)
 #endif
 			}
 
-		munmap(GLOBALS->mm_lxt_c_1, GLOBALS->f_len_lxt_c_1); 
+		munmap(GLOBALS->mm_lxt_c_1, GLOBALS->f_len_lxt_c_1);
 #if !defined __MINGW32__ && !defined _MSC_VER
 		close(GLOBALS->fd_lxt_c_1);
 #endif
-		
+
 		GLOBALS->fd_lxt_c_1=-1;
 		GLOBALS->mm_lxt_c_1=buf-4; /* because header and version don't exist in packed change records */
 		}
@@ -908,7 +908,7 @@ if(!GLOBALS->sync_table_offset_lxt_c_1)
 	FILE *tmp;
 	int recfd;
 	int fd_dummy;
-	
+
 	offs = GLOBALS->zchg_predec_size_lxt_c_1 ? 4 : 0;
 	fprintf(stderr, LXTHDR"Linear LXT encountered...\n");
 
@@ -957,9 +957,9 @@ if(!GLOBALS->sync_table_offset_lxt_c_1)
 		num_records++;
 
                 /* remake time vs position table on the fly */
-                if(!positional_kill) 
+                if(!positional_kill)
                         {
-                        if(offs == *positional_compar)  
+                        if(offs == *positional_compar)
                                 {
                                 *positional_compar = GLOBALS->fpos_lxt_c_1;
                                 positional_compar++;
@@ -1006,17 +1006,17 @@ if(!GLOBALS->sync_table_offset_lxt_c_1)
 		height = GLOBALS->mvlfacs_lxt_c_2[facidx].node_alias;
 		if(height)
 			{
-			if(height >= 256*65536)       
+			if(height >= 256*65536)
 			        {
 			        offs += 4;
 			        }
-			else                    
+			else
 			if(height >= 65536)
 			        {
 			        offs += 3;
 			        }
 			else
-			if(height >= 256)     
+			if(height >= 256)
 			        {
 			        offs += 2;
 			        }
@@ -1050,7 +1050,7 @@ if(!GLOBALS->sync_table_offset_lxt_c_1)
 		switch(cmd)
 			{
 			int modlen;
-			case 0x0:	
+			case 0x0:
 			modlen = (!(GLOBALS->mvlfacs_lxt_c_2[facidx].flags&LT_SYM_F_INTEGER)) ? GLOBALS->mvlfacs_lxt_c_2[facidx].len : 32;
 			if((GLOBALS->dict_string_mem_array_lxt_c_1) && (modlen>GLOBALS->dict_width_lxt_c_1))
 				{
@@ -1069,7 +1069,7 @@ if(!GLOBALS->sync_table_offset_lxt_c_1)
 					offs += 3;
 					}
 				else
-					{				
+					{
 					offs += 4;
 					}
 				}
@@ -1182,8 +1182,8 @@ if(!GLOBALS->sync_table_offset_lxt_c_1)
 		free_2((char *)GLOBALS->mm_lxt_c_1+4);
 		}
 
-	GLOBALS->fd_lxt_c_1 = recfd;            
-#if defined __MINGW32__ || defined _MSC_VER	
+	GLOBALS->fd_lxt_c_1 = recfd;
+#if defined __MINGW32__ || defined _MSC_VER
 	win_fname = nam;
 #endif
         GLOBALS->mm_lxt_c_1=mmap(NULL, GLOBALS->fpos_lxt_c_1-4, PROT_READ, MAP_SHARED, recfd, 0);
@@ -1216,7 +1216,7 @@ switch(v2)
 			unsigned int msk;
 			int bitcnt=0;
 			int ch;
-			
+
 			if((GLOBALS->dict_string_mem_array_lxt_c_1) && (l>GLOBALS->dict_width_lxt_c_1))
 				{
 				unsigned int dictpos;
@@ -1239,7 +1239,7 @@ switch(v2)
 					dictpos = get_24(offs);
 					}
 				else
-					{				
+					{
 					dictpos = get_32(offs);
 					}
 
@@ -1390,7 +1390,7 @@ if((GLOBALS->version_lxt_c_1=get_16((off_t)2))>LT_VERSION)
 	{
 	fprintf(stderr, "Version %d of LXT format AETs not supported, exiting.\n", GLOBALS->version_lxt_c_1);
 	vcd_exit(255);
-	}	
+	}
 
 if(get_byte(GLOBALS->f_len_lxt_c_1-1)!=LT_TRLID)
 	{
@@ -1437,7 +1437,7 @@ while((tag=get_byte(tagpnt))!=LT_SECTION_END)
 		case LT_SECTION_TIMEZERO:		GLOBALS->lxt_timezero_offset=offset; DEBUG(printf(LXTHDR"LT_SECTION_TIMEZERO = %08x\n", offset)); break;
 
 		default: fprintf(stderr, "Skipping unknown section tag %02x.\n", tag); break;
-		}	
+		}
 	}
 
 if(GLOBALS->lxt_timezero_offset)
@@ -1519,7 +1519,7 @@ if(GLOBALS->initial_value_offset_lxt_c_1)
 	GLOBALS->initial_value_lxt_c_1 = AN_X;
 	}
 
-	
+
 if(GLOBALS->zdictionary_offset_lxt_c_1)
 	{
 	if(GLOBALS->zdictionary_predec_size_lxt_c_1)
@@ -1551,7 +1551,7 @@ if(!GLOBALS->hier_was_explicitly_set)    /* set default hierarchy split char */
 for(i=0;i<GLOBALS->numfacs;i++)
         {
 	char buf[4096];
-	char *str;	
+	char *str;
 	struct fac *f;
 
 	if(GLOBALS->mvlfacs_lxt_c_2[i].flags&LT_SYM_F_ALIAS)
@@ -1630,7 +1630,7 @@ for(i=0;i<GLOBALS->numfacs;i++)
 	                s=&sym_block[i];
 	                symadd_name_exists_sym_exists(s,str,0);
 			prevsymroot = prevsym = NULL;
-	
+
 			if(f->flags&LT_SYM_F_INTEGER)
 				{
 				node_block[i].msi=31;
@@ -1639,7 +1639,7 @@ for(i=0;i<GLOBALS->numfacs;i++)
 				}
 			}
 		}
-		
+
 	n=&node_block[i];
         n->nname=s->name;
         n->mv.mvlfac = GLOBALS->mvlfacs_lxt_c_2+i;
@@ -1672,7 +1672,7 @@ for(i=0;i<GLOBALS->numfacs;i++)
 	GLOBALS->facs[i]=&sym_block[i];
         if((len=strlen(subst=GLOBALS->facs[i]->name))>GLOBALS->longestname) GLOBALS->longestname=len;
 	while((ch=(*subst)))
-		{	
+		{
 #ifdef WAVE_HIERFIX
 		if(ch==GLOBALS->hier_delimeter) { *subst=(!esc) ? VCDNAM_HIERSORT : VCDNAM_ESCAPE; }	/* forces sort at hier boundaries */
 #else
@@ -1686,7 +1686,7 @@ for(i=0;i<GLOBALS->numfacs;i++)
 fprintf(stderr, LXTHDR"Sorting facilities at hierarchy boundaries...");
 wave_heapsort(GLOBALS->facs,GLOBALS->numfacs);
 fprintf(stderr, "sorted.\n");
-	
+
 #ifdef WAVE_HIERFIX
 for(i=0;i<GLOBALS->numfacs;i++)
 	{
@@ -1694,7 +1694,7 @@ for(i=0;i<GLOBALS->numfacs;i++)
 
 	subst=GLOBALS->facs[i]->name;
 	while((ch=(*subst)))
-		{	
+		{
 		if(ch==VCDNAM_HIERSORT) { *subst=GLOBALS->hier_delimeter; }	/* restore back to normal */
 		subst++;
 		}
@@ -1709,8 +1709,8 @@ GLOBALS->facs_are_sorted=1;
 
 fprintf(stderr, LXTHDR"Building facility hierarchy tree...");
 /* SPLASH */                            splash_sync(4, 5);
-init_tree();		
-for(i=0;i<GLOBALS->numfacs;i++)	
+init_tree();
+for(i=0;i<GLOBALS->numfacs;i++)
 {
 char *nf = GLOBALS->facs[i]->name;
 build_tree_from_name(nf, i);
@@ -1722,14 +1722,14 @@ if(GLOBALS->escaped_names_found_vcd_c_1)
 	for(i=0;i<GLOBALS->numfacs;i++)
 		{
 		char *subst, ch;
-	
+
 		subst=GLOBALS->facs[i]->name;
 		while((ch=(*subst)))
-			{	
+			{
 			if(ch==VCDNAM_ESCAPE) { *subst=GLOBALS->hier_delimeter; }	/* restore back to normal */
 			subst++;
 			}
-	
+
 #ifdef DEBUG_FACILITIES
 		printf("%-4d %s\n",i,facs[i]->name);
 #endif
@@ -1830,7 +1830,7 @@ if(np->mv.mvlfac->flags&LT_SYM_F_ALIAS)
 			}
 			else
 			{
-			GLOBALS->resolve_lxt_alias_to[f->node_alias] = np; 
+			GLOBALS->resolve_lxt_alias_to[f->node_alias] = np;
 			}
 		}
 	}
@@ -1948,13 +1948,13 @@ while(offs)
 				unsigned int reconstructm3 = 0;
 				unsigned int rle_delta[2];
 				int ix;
-	
+
 				if((vval!=0)&&(vval!=3)&&(vval!=4))
 					{
 					fprintf(stderr, "Unexpected clk compress byte %02x at offset: %08x\n", get_byte(offsminus1), (unsigned int)offsminus1);
 					exit(0);
 					}
-	
+
 				switch(w&3)
 					{
 					case 0:	reps = get_byte(offs+skip); break;
@@ -1962,7 +1962,7 @@ while(offs)
 					case 2: reps = get_24(offs+skip); break;
 					case 3: reps = get_32(offs+skip); break;
 					}
-	
+
 				reps++;
 
 				DEBUG(fprintf(stderr, "!!! reps = %d\n", reps));
@@ -2028,7 +2028,7 @@ while(offs)
 					int k;
 					int jx = (reps - rcnt);
 					unsigned int res = reconstructm1 +
-						((jx/2)+(jx&0))*rle_delta[1] + 
+						((jx/2)+(jx&0))*rle_delta[1] +
 						((jx/2)+(jx&1))*rle_delta[0];
 
 					DEBUG(fprintf(stderr, "!!! %lld -> '%08x'\n", tmval, res));
@@ -2045,13 +2045,13 @@ while(offs)
 					htemp->next = histent_head;
 					histent_head = htemp;
 					np->numhist++;
-	
+
 					tmval-=delta;
 					}
 				}
 				else	/* compress to z on multibit */
 				{
-				int ix;	
+				int ix;
 
 				htemp = histent_calloc();
 				htemp->v.h_vector = (char *)malloc_2(len);
@@ -2073,13 +2073,13 @@ while(offs)
 				int vval = get_byte(offsminus1)&0xF;
 				int reps = 0;
 				int rcnt;
-	
+
 				if((vval<3)||(vval>4))
 					{
 					fprintf(stderr, "Unexpected clk compress byte %02x at offset: %08x\n", get_byte(offsminus1), (unsigned int)offsminus1);
 					exit(0);
 					}
-	
+
 				switch(w&3)
 					{
 					case 0:	reps = get_byte(offs+skip); break;
@@ -2087,11 +2087,11 @@ while(offs)
 					case 2: reps = get_24(offs+skip); break;
 					case 3: reps = get_32(offs+skip); break;
 					}
-	
+
 				reps++;
 				vval = (reps & 1) ^ (vval==4);	/* because x3='0', x4='1' */
 				vval = (vval==0) ? AN_0 : AN_1;
-	
+
 				tmval = time_offsminus1 + (delta * reps);
 				for(rcnt=0;rcnt<reps;rcnt++)
 					{
@@ -2108,7 +2108,7 @@ while(offs)
 						{
 						histent_head->time = tmval;
 						}
-	
+
 					tmval-=delta;
 					vval= (vval==AN_0) ? AN_1: AN_0;
 					}
@@ -2116,7 +2116,7 @@ while(offs)
 				else
 				{
 				int vval=AN_Z;
-	
+
 				if(vval!=histent_head->v.h_val)
 					{
 					htemp = histent_calloc();
@@ -2159,7 +2159,7 @@ while(offs)
                                         case 'l':       val = AN_L; break;
                                         case '-':       val = AN_DASH; break;
 				        }
-	
+
 				if(val!=histent_head->v.h_val)
 					{
 					htemp = histent_calloc();
@@ -2242,18 +2242,18 @@ while(offs)
 		}
 
 	prevtmval = tmval;
-	
+
 /*	v=get_byte(offs); */
 	switch(v&0xF0)
 		{
 		case 0x00:
 			offsdelta=get_byte(offs+1);
 			break;
-	
+
 		case 0x10:
 			offsdelta=get_16(offs+1);
 			break;
-	
+
 		case 0x20:
 			offsdelta=get_24(offs+1);
 			break;
@@ -2290,7 +2290,7 @@ for(j=0;j>-2;j--)
 				{
 				init = AN_X; /* x if unspecified */
 				}
-		
+
 			if(len>1)
 				{
 				char *pnt = htemp->v.h_vector = (char *)malloc_2(len);	/* zeros */
@@ -2310,7 +2310,7 @@ for(j=0;j>-2;j--)
 			htemp->flags = HIST_REAL;
 			if(f->flags&LT_SYM_F_STRING) htemp->flags |= HIST_STRING;
 			}
-	
+
 		htemp->time = GLOBALS->first_cycle_lxt_c_2+j;
 		htemp->next = histent_head;
 		histent_head = htemp;
diff --git a/src/lxt.h b/src/lxt.h
index 5da777b..4813806 100644
--- a/src/lxt.h
+++ b/src/lxt.h
@@ -12,7 +12,7 @@
 #ifndef WAVE_LXT_H
 #define WAVE_LXT_H
 
-#ifndef HAVE_FSEEKO 
+#ifndef HAVE_FSEEKO
 #define fseeko fseek
 #endif
 
@@ -25,7 +25,7 @@ void import_lxt_trace(nptr np);
 #define LT_SECTION_CHG                          (1)
 #define LT_SECTION_SYNC_TABLE                   (2)
 #define LT_SECTION_FACNAME                      (3)
-#define LT_SECTION_FACNAME_GEOMETRY             (4)   
+#define LT_SECTION_FACNAME_GEOMETRY             (4)
 #define LT_SECTION_TIMESCALE                    (5)
 #define LT_SECTION_TIME_TABLE                   (6)
 #define LT_SECTION_INITIAL_VALUE                (7)
diff --git a/src/main.c b/src/main.c
index dc14d09..ae2ae0d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -7,7 +7,7 @@
  * of the License, or (at your option) any later version.
  */
 
-/* AIX may need this for alloca to work */ 
+/* AIX may need this for alloca to work */
 #if defined _AIX
   #pragma alloca
 #endif
@@ -87,7 +87,7 @@ char *gtkwave_argv0_cached = NULL;
 static void switch_page(GtkNotebook     *notebook,
 			GtkNotebookPage *page,
 			guint            page_num,
-			gpointer         user_data) 
+			gpointer         user_data)
 {
 char timestr[32];
 struct Global *g_old = GLOBALS;
@@ -188,7 +188,7 @@ static int plug_destroy (GtkWidget *widget, gpointer data)
 exit(0);
 
 return(FALSE);
-}       
+}
 
 
 #if defined __MINGW32__
@@ -288,7 +288,7 @@ ucase_ext[i] = 0;
 #if defined(WAVE_USE_GTK2)
 #define SLIDEZOOM_OPT "  -z, --slider-zoom          enable horizontal slider stretch zoom\n"
 #else
-#define SLIDEZOOM_OPT 
+#define SLIDEZOOM_OPT
 #endif
 
 printf(
@@ -304,7 +304,7 @@ VCD_GETOPT
 DUAL_GETOPT
 "  -l, --logfile=FILE         specify simulation logfile name for time values\n"
 "  -s, --start=TIME           specify start time for LXT2/VZT block skip\n"
-"  -e, --end=TIME             specify end time for LXT2/VZT block skip\n"  
+"  -e, --end=TIME             specify end time for LXT2/VZT block skip\n"
 STEMS_GETOPT
 WAVE_GETOPT_CPUS
 "  -N, --nowm                 disable window manager for most windows\n"
@@ -318,7 +318,7 @@ RPC_GETOPT3
 INTR_GETOPT
 "  -C, --comphier             use compressed hierarchy names (slower)\n"
 "  -g, --giga                 use gigabyte mempacking when recoding (slower)\n"
-"  -L, --legacy               use legacy VCD mode rather than the VCD recoder\n" 
+"  -L, --legacy               use legacy VCD mode rather than the VCD recoder\n"
 "  -v, --vcd                  use stdin as a VCD dumpfile\n"
 OUTPUT_GETOPT
 SLIDEZOOM_OPT
@@ -345,14 +345,14 @@ exit(0);
 
 
 /*
- * file selection for -n/--nocli flag 
+ * file selection for -n/--nocli flag
  */
 
 static void wave_get_filename_cleanup(GtkWidget *widget, gpointer data) { gtk_main_quit(); /* do nothing but exit gtk loop */ }
 
 static char *wave_get_filename(char *dfile)
 {
-if(dfile) 
+if(dfile)
 	{
 	int len = strlen(dfile);
 	GLOBALS->ftext_main_main_c_1 = malloc_2(strlen(dfile)+2);
@@ -398,7 +398,7 @@ void addPidToExecutableName(int argc, char* argv[], char* argv_mod[])
   strcpy(pos, "_");
   pos = buffer + strlen(buffer);
   sprintf(pos, "%d", getpid());
-	  
+
   argv_mod[0] = buffer;
 }
 
@@ -462,7 +462,7 @@ GdkPixbuf *dock_pb;
 
 WAVE_LOCALE_FIX
 
-/* Initialize the GLOBALS structure for the first time... */ 
+/* Initialize the GLOBALS structure for the first time... */
 
 if(!GLOBALS)
 	{
@@ -522,13 +522,13 @@ if(!GLOBALS)
 	/* timeentry.c */
 	GLOBALS->from_entry = old_g->from_entry;
 	GLOBALS->to_entry = old_g->to_entry;
-	
+
 	/* rc.c */
 	GLOBALS->possibly_use_rc_defaults = old_g->possibly_use_rc_defaults;
 	GLOBALS->ignore_savefile_pane_pos = old_g->ignore_savefile_pane_pos;
 	GLOBALS->ignore_savefile_pos = old_g->ignore_savefile_pos;
 	GLOBALS->ignore_savefile_size = old_g->ignore_savefile_size;
-	
+
 	GLOBALS->color_back = old_g->color_back;
 	GLOBALS->color_baseline = old_g->color_baseline;
 	GLOBALS->color_grid = old_g->color_grid;
@@ -564,7 +564,7 @@ if(!GLOBALS)
 	GLOBALS->color_brkred = old_g->color_brkred;
 	GLOBALS->color_ltblue = old_g->color_ltblue;
 	GLOBALS->color_gmstrd = old_g->color_gmstrd;
-	
+
 	GLOBALS->atomic_vectors = old_g->atomic_vectors;
 	GLOBALS->autoname_bundles = old_g->autoname_bundles;
 	GLOBALS->autocoalesce = old_g->autocoalesce;
@@ -630,7 +630,7 @@ if(!GLOBALS)
 
 	GLOBALS->ruler_origin = old_g->ruler_origin;
 	GLOBALS->ruler_step = old_g->ruler_step;
-	GLOBALS->disable_ae2_alias = old_g->disable_ae2_alias;	
+	GLOBALS->disable_ae2_alias = old_g->disable_ae2_alias;
 
 	GLOBALS->vlist_spill_to_disk = old_g->vlist_spill_to_disk;
 	GLOBALS->vlist_prepack = old_g->vlist_prepack;
@@ -651,7 +651,7 @@ if(!GLOBALS)
 
 	strcpy2_into_new_context(GLOBALS, &GLOBALS->editor_name, &old_g->editor_name);
 	strcpy2_into_new_context(GLOBALS, &GLOBALS->fontname_logfile, &old_g->fontname_logfile);
-	strcpy2_into_new_context(GLOBALS, &GLOBALS->fontname_signals, &old_g->fontname_signals); 
+	strcpy2_into_new_context(GLOBALS, &GLOBALS->fontname_signals, &old_g->fontname_signals);
 	strcpy2_into_new_context(GLOBALS, &GLOBALS->fontname_waves, &old_g->fontname_waves);
         strcpy2_into_new_context(GLOBALS, &GLOBALS->argvlist, &old_g->argvlist);
 
@@ -707,7 +707,7 @@ if(!gtkwave_argv0_cached) gtkwave_argv0_cached = argv[0]; /* for new window opti
 init_filetrans_data(); /* for file translation splay trees */
 init_proctrans_data(); /* for proc translation structs */
 init_ttrans_data();    /* for transaction proc translation structs */
-if(!mainwindow_already_built) 
+if(!mainwindow_already_built)
 	{
 	atexit(remove_all_proc_filters);
 	atexit(remove_all_ttrans_filters);
@@ -752,10 +752,10 @@ while (1)
                 {"interactive", 0, 0, 'I'},
 		{"giga", 0, 0, 'g'},
 		{"comphier", 0, 0, 'C'},
-                {"legacy", 0, 0, 'L'},  
+                {"legacy", 0, 0, 'L'},
 		{"tcl_init", 1, 0, 'T'},
 		{"wish", 0, 0, 'W'},
-                {"repscript", 1, 0, 'R'},   
+                {"repscript", 1, 0, 'R'},
                 {"repperiod", 1, 0, 'P'},
 		{"output", 1, 0, 'O' },
                 {"slider-zoom", 0, 0, 'z'},
@@ -765,7 +765,7 @@ while (1)
                 {0, 0, 0, 0}
                 };
 
-        c = getopt_long (argc, argv, "zf:Fon:a:Ar:dl:s:e:c:t:NS:vVhxX:MD:IgCLR:P:O:WT:1:2:3", long_options, 
+        c = getopt_long (argc, argv, "zf:Fon:a:Ar:dl:s:e:c:t:NS:vVhxX:MD:IgCLR:P:O:WT:1:2:3", long_options,
 &option_index);
 
         if (c == -1) break;     /* no more args */
@@ -870,7 +870,7 @@ while (1)
                         break;
 
 #ifdef WAVE_USE_XID
-                case 'X': 
+                case 'X':
                         sscanf(optarg, "%x", &GLOBALS->socket_xid);
 			splash_disable_rc_override = 1;
                         break;
@@ -882,9 +882,9 @@ while (1)
 			break;
 
 		case '2':
-#ifndef _MSC_VER  
+#ifndef _MSC_VER
 			{
-			char *chdir_env = getenv("GTKWAVE_CHDIR"); 
+			char *chdir_env = getenv("GTKWAVE_CHDIR");
 
 			if(chdir_cache)
 				{
@@ -949,7 +949,7 @@ while (1)
 			is_fastload = VCD_FSL_WRITE;
 			is_giga = 1;
 			break;
-			
+
                 case 'a':
 			if(wname) free_2(wname);
 			wname = malloc_2(strlen(optarg)+1);
@@ -966,7 +966,7 @@ while (1)
 			if(GLOBALS->skip_start) free_2(GLOBALS->skip_start);
 			GLOBALS->skip_start = malloc_2(strlen(optarg)+1);
 			strcpy(GLOBALS->skip_start, optarg);
-			break;			
+			break;
 
                 case 'e':
 			if(GLOBALS->skip_end) free_2(GLOBALS->skip_end);
@@ -1038,8 +1038,8 @@ while (1)
                         GLOBALS->repscript_name = malloc_2(strlen(optarg)+1);
                         strcpy(GLOBALS->repscript_name, optarg);
                         break;
-                
-                case 'P':   
+
+                case 'P':
                         {
                         int pd = atoi(optarg);
                         if(pd > 0)
@@ -1056,7 +1056,7 @@ while (1)
 		        {
 			  char* pos;
 			  is_wish = 1;
-			  if(GLOBALS->tcl_init_cmd) 
+			  if(GLOBALS->tcl_init_cmd)
 			    {
 			      int length = strlen(GLOBALS->tcl_init_cmd)+9+strlen(optarg);
 			      char* buffer = malloc_2(strlen(GLOBALS->tcl_init_cmd)+1);
@@ -1115,7 +1115,7 @@ if (optind < argc)
                                 {
                                 break;
                                 }
-                        }   
+                        }
 
 		if(!GLOBALS->loaded_file_name)
 			{
@@ -1139,7 +1139,7 @@ if (optind < argc)
 
 if(is_wish && is_vcd)
 	{
-	fprintf(stderr, 
+	fprintf(stderr,
 		"GTKWAVE | Cannot use --vcd and --wish options together as both use stdin,\n"
 		"GTKWAVE | exiting!\n");
 	exit(255);
@@ -1269,7 +1269,7 @@ if((!wname)&&(GLOBALS->make_vcd_save_file))
 
 if(!GLOBALS->loaded_file_name)
 	{
-	GLOBALS->loaded_file_name = strdup_2("[no file loaded]");	
+	GLOBALS->loaded_file_name = strdup_2("[no file loaded]");
 	is_missing_file = 1;
 	GLOBALS->min_time=LLDescriptor(0);
 	GLOBALS->max_time=LLDescriptor(0);
@@ -1278,7 +1278,7 @@ if(!GLOBALS->loaded_file_name)
 		fprintf(stderr, "GTKWAVE | Use the -h, --help command line flags to display help.\n");
 		}
 	}
-	
+
 /* load either the vcd or aet file depending on suffix then mode setting */
 if(is_vcd)
 	{
@@ -1304,7 +1304,7 @@ strcat(GLOBALS->winname,GLOBALS->loaded_file_name);
 
 loader_check_head:
 
-if(!is_missing_file) 
+if(!is_missing_file)
 	{
 	magic_word_filetype = determine_gtkwave_filetype(GLOBALS->loaded_file_name);
 	}
@@ -1367,7 +1367,7 @@ if((magic_word_filetype == G_FT_LXT) || (magic_word_filetype == G_FT_LXT2) || su
 			fprintf(stderr, "GTKWAVE | Could not initialize '%s'%s.\n", GLOBALS->loaded_file_name, GLOBALS->vcd_jmp_buf ? "" : ", exiting");
 			vcd_exit(255);
 			}
-		}	
+		}
 	}
 else
 if((magic_word_filetype == G_FT_FST) || suffix_check(GLOBALS->loaded_file_name, ".fst"))
@@ -1465,7 +1465,7 @@ load_vcd:
 #if !defined _MSC_VER && !defined __MINGW32__
 	if(opt_vcd) {
                   GLOBALS->unoptimized_vcd_file_name = calloc_2(1,strlen(GLOBALS->loaded_file_name) + 1);
-                  strcpy(GLOBALS->unoptimized_vcd_file_name, GLOBALS->loaded_file_name);  
+                  strcpy(GLOBALS->unoptimized_vcd_file_name, GLOBALS->loaded_file_name);
                   optimize_vcd_file();
                   /* is_vcd = 0; */ /* scan-build */
 		  GLOBALS->optimize_vcd = 1;
@@ -1474,7 +1474,7 @@ load_vcd:
 
 #endif
 
-#if !defined _MSC_VER 
+#if !defined _MSC_VER
 	if(is_interactive)
 		{
 		GLOBALS->loaded_file_type = DUMPLESS_FILE;
@@ -1563,7 +1563,7 @@ if((wname)||(vcd_save_handle_cached)||(is_smartsave))
 					break;
 					}
 				} while(pnt2-- != pnt);
-			}	
+			}
 
 		wname = malloc_2(strlen(pnt) + 6);
 		strcpy(wname, pnt);
@@ -1593,7 +1593,7 @@ if((wname)||(vcd_save_handle_cached)||(is_smartsave))
 	if(!wave)
 	        {
 	        fprintf(stderr, "** WARNING: Error opening save file '%s', skipping.\n",wname);
-	        }	
+	        }
 	        else
 	        {
 	        char *iline;
@@ -1639,7 +1639,7 @@ if((wname)||(vcd_save_handle_cached)||(is_smartsave))
 			        fprintf(stderr, "** WARNING: Error opening save file '%s', skipping.\n",wname);
 				EnsureGroupsMatch();
 				goto savefile_bail;
-			        }	
+			        }
 			}
 
 		read_save_helper_relative_init(wname);
@@ -1672,11 +1672,11 @@ if((wname)||(vcd_save_handle_cached)||(is_smartsave))
 	                        if(GLOBALS->strace_ctx->shadow_straces)
 	                                {
 	                                GLOBALS->strace_ctx->shadow_active = 1;
-	
+
 	                                swap_strace_contexts();
 	                                strace_maketimetrace(1);
 	                                swap_strace_contexts();
-	
+
 					GLOBALS->strace_ctx->shadow_active = 0;
 	                                }
 				}
@@ -1725,7 +1725,7 @@ if(!GLOBALS->socket_xid)
 	{
         GLOBALS->mainwindow = gtk_plug_new(GLOBALS->socket_xid);
         gtk_widget_show(GLOBALS->mainwindow);
-                                
+
         gtk_signal_connect(GTK_OBJECT(GLOBALS->mainwindow), "destroy",   /* formerly was "destroy" */GTK_SIGNAL_FUNC(plug_destroy),"Plug destroy");
 	}
 #endif
@@ -1750,7 +1750,7 @@ if(GLOBALS->use_toolbutton_interface)
 		gtk_container_border_width(GTK_CONTAINER(main_vbox), 1);
 		gtk_container_add(GTK_CONTAINER(GLOBALS->mainwindow), main_vbox);
 		gtk_widget_show(main_vbox);
-	
+
 		if(!GLOBALS->disable_menus)
 			{
 #ifdef WAVE_USE_MLIST_T
@@ -1777,7 +1777,7 @@ g_signal_connect(theApp, "NSApplicationOpenFile", G_CALLBACK(deal_with_finder_op
 g_signal_connect(theApp, "NSApplicationBlockTermination", G_CALLBACK(deal_with_termination), NULL);
 }
 #endif
-	
+
 			if(GLOBALS->force_toolbars)
 				{
 				toolhandle=gtk_handle_box_new();
@@ -1790,9 +1790,9 @@ g_signal_connect(theApp, "NSApplicationBlockTermination", G_CALLBACK(deal_with_t
 				gtk_box_pack_start(GTK_BOX(main_vbox), menubar, FALSE, TRUE, 0);
 				}
 			}
-	
+
 		whole_table = gtk_table_new (256, 16, FALSE);
-	
+
 		tb = gtk_toolbar_new();
 		top_table = tb;		/* export this as our top widget rather than a table */
 
@@ -1995,7 +1995,7 @@ g_signal_connect(theApp, "NSApplicationBlockTermination", G_CALLBACK(deal_with_t
 		gtk_container_border_width(GTK_CONTAINER(main_vbox), 1);
 		gtk_container_add(GTK_CONTAINER(GLOBALS->mainwindow), main_vbox);
 		gtk_widget_show(main_vbox);
-	
+
 		if(!GLOBALS->disable_menus)
 			{
 #ifdef WAVE_USE_MLIST_T
@@ -2035,9 +2035,9 @@ g_signal_connect(theApp, "NSApplicationBlockTermination", G_CALLBACK(deal_with_t
 				gtk_box_pack_start(GTK_BOX(main_vbox), menubar, FALSE, TRUE, 0);
 				}
 			}
-	
+
 		top_table = gtk_table_new (1, 284, FALSE);
-	
+
 		if(GLOBALS->force_toolbars)
 			{
 			toolhandle=gtk_handle_box_new();
@@ -2046,7 +2046,7 @@ g_signal_connect(theApp, "NSApplicationBlockTermination", G_CALLBACK(deal_with_t
 			}
 
 		whole_table = gtk_table_new (256, 16, FALSE);
-	
+
 		text1 = create_text ();
 		gtk_table_attach (GTK_TABLE (top_table), text1, 0, 141, 0, 1,
 		                      	GTK_FILL,
@@ -2083,7 +2083,7 @@ g_signal_connect(theApp, "NSApplicationBlockTermination", G_CALLBACK(deal_with_t
 			                      	GTK_FILL,
 			                      	GTK_SHRINK, 0, 0);
 			gtk_widget_show (discardbuttons);
-		
+
 			shiftbuttons = create_shift_buttons ();
 			gtk_table_attach (GTK_TABLE (top_table), shiftbuttons, 176, 177, 0, 1,
 			                      	GTK_FILL,
@@ -2096,7 +2096,7 @@ g_signal_connect(theApp, "NSApplicationBlockTermination", G_CALLBACK(deal_with_t
 		                      	GTK_FILL,
 		                      	GTK_SHRINK, 0, 0);
 		gtk_widget_show (edgebuttons);
-	
+
 
 		dummy2=gtk_label_new("");
 		gtk_table_attach (GTK_TABLE (top_table), dummy2, 178, 215, 0, 1,
@@ -2125,24 +2125,24 @@ g_signal_connect(theApp, "NSApplicationBlockTermination", G_CALLBACK(deal_with_t
 			GtkTooltips *tooltips;
 
 			gtk_widget_show(r_pixmap);
-		
+
 			tooltips=gtk_tooltips_new_2();
 			gtk_tooltips_set_delay_2(tooltips,1500);
 
 			table = gtk_table_new (1, 1, FALSE);
-		
+
 			main_vbox1 = gtk_vbox_new (FALSE, 1);
 			gtk_container_border_width (GTK_CONTAINER (main_vbox1), 1);
 			gtk_container_add (GTK_CONTAINER (table), main_vbox1);
-	
+
 			frame = gtk_frame_new ("Reload ");
 			gtk_box_pack_start (GTK_BOX (main_vbox1), frame, TRUE, TRUE, 0);
-	
+
 			gtk_widget_show (frame);
 			gtk_widget_show (main_vbox1);
 
 			table2 = gtk_table_new (2, 1, FALSE);
-	
+
 			b1 = gtk_button_new();
 			gtk_container_add(GTK_CONTAINER(b1), r_pixmap);
 			gtk_table_attach (GTK_TABLE (table2), b1, 0, 1, 0, 1,
@@ -2156,9 +2156,9 @@ g_signal_connect(theApp, "NSApplicationBlockTermination", G_CALLBACK(deal_with_t
 			gtk_widget_show(table2);
 
 			gtk_table_attach (GTK_TABLE (top_table), table, 284, 285, 0, 1,
-		                      	0, 
+		                      	0,
 		                      	0, 2, 0);
-	
+
 			gtk_widget_show (table);
 			}
 		} /* of ...if(mainwindow_already_built) */
@@ -2170,7 +2170,7 @@ load_all_fonts(); /* must be done before create_signalwindow() */
 gtk_widget_show(GLOBALS->wavewindow);
 GLOBALS->signalwindow = create_signalwindow();
 
-if(GLOBALS->do_resize_signals) 
+if(GLOBALS->do_resize_signals)
                 {
                 int os;
 
@@ -2228,7 +2228,7 @@ if(GLOBALS->panedwindow_size_cache)
 #ifdef HAVE_PANED_PACK
 if(GLOBALS->paned_pack_semantics)
 	{
-	gtk_paned_pack1(GTK_PANED(panedwindow), GLOBALS->signalwindow, 0, 0); 
+	gtk_paned_pack1(GTK_PANED(panedwindow), GLOBALS->signalwindow, 0, 0);
 	gtk_paned_pack2(GTK_PANED(panedwindow), GLOBALS->wavewindow, ~0, 0);
 	}
 	else
@@ -2335,16 +2335,16 @@ if(!GLOBALS->notebook)
 
 if(!GLOBALS->context_tabposition)
 	{
-	gtk_notebook_append_page(GTK_NOTEBOOK(GLOBALS->notebook), GLOBALS->toppanedwindow ? GLOBALS->toppanedwindow : panedwindow, 
+	gtk_notebook_append_page(GTK_NOTEBOOK(GLOBALS->notebook), GLOBALS->toppanedwindow ? GLOBALS->toppanedwindow : panedwindow,
 		gtk_label_new(GLOBALS->loaded_file_name));
 	}
 	else
 	{
 	char buf[40];
-	
+
 	sprintf(buf, "%d", GLOBALS->num_notebook_pages_cumulative);
 
-	gtk_notebook_append_page(GTK_NOTEBOOK(GLOBALS->notebook), GLOBALS->toppanedwindow ? GLOBALS->toppanedwindow : panedwindow, 
+	gtk_notebook_append_page(GTK_NOTEBOOK(GLOBALS->notebook), GLOBALS->toppanedwindow ? GLOBALS->toppanedwindow : panedwindow,
 		gtk_label_new(buf));
 	}
 
@@ -2369,7 +2369,7 @@ update_markertime(GLOBALS->tims.marker);
 set_window_xypos(GLOBALS->initial_window_xpos, GLOBALS->initial_window_ypos);
 GLOBALS->xy_ignore_main_c_1 = 1;
 
-if(GLOBALS->logfile) 
+if(GLOBALS->logfile)
 	{
 	struct logfile_chain *lprev;
 	char buf[50];
@@ -2473,7 +2473,7 @@ if(GLOBALS->dual_attach_id_main_c_1)
 					if((GLOBALS->tims.marker != -1) && (GLOBALS->dual_ctx[GLOBALS->dual_id].marker == -1))
 						{
 				        	Trptr t;
-  
+
         					for(t=GLOBALS->traces.first;t;t=t->t_next)
                 					{
                 					if(t->asciivalue) { free_2(t->asciivalue); t->asciivalue=NULL; }
@@ -2498,7 +2498,7 @@ if(GLOBALS->dual_attach_id_main_c_1)
 					if((GLOBALS->tims.marker != -1) && (GLOBALS->dual_ctx[GLOBALS->dual_id].marker == -1))
 						{
 				        	Trptr t;
-  
+
         					for(t=GLOBALS->traces.first;t;t=t->t_next)
                 					{
                 					if(t->asciivalue) { free_2(t->asciivalue); t->asciivalue=NULL; }
@@ -2524,7 +2524,7 @@ if(GLOBALS->dual_attach_id_main_c_1)
 
 			        hadj=GTK_ADJUSTMENT(GLOBALS->wave_hslider);
 			        hadj->value=gt;
-        
+
 			        pageinc=(TimeType)(((gdouble)GLOBALS->wavewidth)*GLOBALS->nspx);
 			        if(gt<(GLOBALS->tims.last-pageinc+1))
 			                GLOBALS->tims.timecache=gt;
@@ -2638,7 +2638,7 @@ set_window_size (int x, int y)
 }
 
 
-void 
+void
 get_window_xypos(int *root_x, int *root_y)
 {
 if(!GLOBALS->mainwindow) return;
@@ -2663,7 +2663,7 @@ if(!GLOBALS->initial_window_get_valid)
 #endif
 }
 
-void 
+void
 set_window_xypos(int root_x, int root_y)
 {
 #ifdef MAC_INTEGRATION
@@ -2798,7 +2798,7 @@ if(GLOBALS->stems_type != WAVE_ANNO_NONE)
 			memset(GLOBALS->anno_ctx, 0, sizeof(struct gtkwave_annotate_ipc_t));
 
 			memcpy(GLOBALS->anno_ctx->matchword, WAVE_MATCHWORD, 4);
-			GLOBALS->anno_ctx->aet_type = GLOBALS->stems_type;			
+			GLOBALS->anno_ctx->aet_type = GLOBALS->stems_type;
 			strcpy(GLOBALS->anno_ctx->aet_name, GLOBALS->aet_name);
 			strcpy(GLOBALS->anno_ctx->stems_name, stems_name);
 
@@ -2815,8 +2815,8 @@ if(GLOBALS->stems_type != WAVE_ANNO_NONE)
                                         NULL,
                                         &si,
                                         &pi);
-                                        
-                        if(!rc)  
+
+                        if(!rc)
                         	{
 				UnmapViewOfFile(GLOBALS->anno_ctx);
 				CloseHandle(hMapFile);
@@ -2848,11 +2848,11 @@ if(GLOBALS->stems_type != WAVE_ANNO_NONE)
 			memset(GLOBALS->anno_ctx, 0, sizeof(struct gtkwave_annotate_ipc_t));
 
 			memcpy(GLOBALS->anno_ctx->matchword, WAVE_MATCHWORD, 4);
-			GLOBALS->anno_ctx->aet_type = GLOBALS->stems_type;			
+			GLOBALS->anno_ctx->aet_type = GLOBALS->stems_type;
 			strcpy(GLOBALS->anno_ctx->aet_name, GLOBALS->aet_name);
 			strcpy(GLOBALS->anno_ctx->stems_name, stems_name);
 
-			GLOBALS->anno_ctx->gtkwave_process = getpid();			
+			GLOBALS->anno_ctx->gtkwave_process = getpid();
 			update_markertime(GLOBALS->tims.marker);
 
 #ifdef __linux__
@@ -2861,8 +2861,8 @@ if(GLOBALS->stems_type != WAVE_ANNO_NONE)
 
 		        pid=fork();
 
-		        if(((int)pid) < 0) 
-				{ 
+		        if(((int)pid) < 0)
+				{
 				/* can't do anything about this */
 				}
 				else
@@ -2933,7 +2933,7 @@ if(GLOBALS->stems_type != WAVE_ANNO_NONE)
 
 #if !defined _MSC_VER && !defined __MINGW32__
 void optimize_vcd_file(void) {
-  if(!strcmp("-vcd", GLOBALS->unoptimized_vcd_file_name)) {        
+  if(!strcmp("-vcd", GLOBALS->unoptimized_vcd_file_name)) {
 #ifdef __CYGWIN__
     char *buf = strdup_2("vcd2fst -- - vcd.fst");
     system(buf);
@@ -2956,7 +2956,7 @@ void optimize_vcd_file(void) {
 	  free_2(GLOBALS->loaded_file_name);
 	  GLOBALS->loaded_file_name = buf;
 	  GLOBALS->is_optimized_stdin_vcd = 1;
-	}					
+	}
       }
       else {
         execlp("vcd2fst", "vcd2fst", "--", "-", buf, NULL);
@@ -2978,7 +2978,7 @@ void optimize_vcd_file(void) {
     pid_t pid;
     char *buf = malloc_2(strlen(GLOBALS->unoptimized_vcd_file_name) + 4 + 1);
     sprintf(buf, "%s.fst", GLOBALS->unoptimized_vcd_file_name);
-    pid = fork(); 
+    pid = fork();
     if(((int)pid) < 0) {
       /* can't do anything about this */
     }
@@ -2989,7 +2989,7 @@ void optimize_vcd_file(void) {
         if(rc > 0) {
           free_2(GLOBALS->loaded_file_name);
 	  GLOBALS->loaded_file_name = buf;
-        }					
+        }
       }
       else {
 #ifdef MAC_INTEGRATION
@@ -3016,6 +3016,6 @@ void optimize_vcd_file(void) {
       }
     }
 #endif
-  }	
+  }
 }
 #endif
diff --git a/src/main.h b/src/main.h
index d87ddc9..566237d 100644
--- a/src/main.h
+++ b/src/main.h
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2012.
  *
  * This program is free software; you can redistribute it and/or
diff --git a/src/markerbox.c b/src/markerbox.c
index ab1737b..85100f1 100644
--- a/src/markerbox.c
+++ b/src/markerbox.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2008.
  *
  * This program is free software; you can redistribute it and/or
@@ -23,13 +23,13 @@ int i;
 
 i = ((int) (((long) which) & 31L)) % 26;
 GLOBALS->dirty_markerbox_c_1 = 1;
- 
+
 entry_text = gtk_entry_get_text(GTK_ENTRY(entry));
 if(entry_text && strlen(entry_text))
 	{
 	if(GLOBALS->shadow_marker_names[i])
 		{
-		free_2(GLOBALS->shadow_marker_names[i]); 
+		free_2(GLOBALS->shadow_marker_names[i]);
 		}
 
 	GLOBALS->shadow_marker_names[i] = strdup_2(entry_text);
@@ -38,7 +38,7 @@ if(entry_text && strlen(entry_text))
 	{
 	if(GLOBALS->shadow_marker_names[i])
 		{
-		free_2(GLOBALS->shadow_marker_names[i]); 
+		free_2(GLOBALS->shadow_marker_names[i]);
 		GLOBALS->shadow_marker_names[i] = NULL;
 		}
 	}
@@ -51,13 +51,13 @@ int i;
 
 i = ((int) (((long) which) & 31L)) % 26;
 GLOBALS->dirty_markerbox_c_1 = 1;
- 
+
 entry_text = gtk_entry_get_text(GTK_ENTRY(entry));
 if(entry_text && strlen(entry_text))
 	{
 	if(GLOBALS->shadow_marker_names[i])
 		{
-		free_2(GLOBALS->shadow_marker_names[i]); 
+		free_2(GLOBALS->shadow_marker_names[i]);
 		}
 
 	GLOBALS->shadow_marker_names[i] = strdup_2(entry_text);
@@ -69,7 +69,7 @@ if(entry_text && strlen(entry_text))
 	{
 	if(GLOBALS->shadow_marker_names[i])
 		{
-		free_2(GLOBALS->shadow_marker_names[i]); 
+		free_2(GLOBALS->shadow_marker_names[i]);
 		GLOBALS->shadow_marker_names[i] = NULL;
 		}
 	}
@@ -88,7 +88,7 @@ int i;
 int ent_idx;
 
 ent_idx = ((int) (((long) which) & 31L)) % 26;
- 
+
 entry=GLOBALS->entries_markerbox_c_1[ent_idx];
 
 entry_text = gtk_entry_get_text(GTK_ENTRY(entry));
@@ -105,7 +105,7 @@ if((temp<GLOBALS->tims.start)||(temp>GLOBALS->tims.last)) goto failure;
 
 for(i=0;i<26;i++)
         {
-        if(temp==GLOBALS->shadow_markers_markerbox_c_1[i]) 
+        if(temp==GLOBALS->shadow_markers_markerbox_c_1[i])
 		{
 		if(i!=ent_idx)
 			{
@@ -135,7 +135,7 @@ int i;
 int ent_idx;
 
 ent_idx = ((int) (((long) which) & 31L)) % 26;
- 
+
 entry=GLOBALS->entries_markerbox_c_1[ent_idx];
 
 entry_text = gtk_entry_get_text(GTK_ENTRY(entry));
@@ -178,7 +178,7 @@ static void ok_callback(GtkWidget *widget, GtkWidget *nothing)
 if(GLOBALS->dirty_markerbox_c_1)
 	{
 	int i;
-	for(i=0;i<26;i++) 
+	for(i=0;i<26;i++)
 		{
 		GLOBALS->named_markers[i]=GLOBALS->shadow_markers_markerbox_c_1[i];
 		if(GLOBALS->marker_names[i]) free_2(GLOBALS->marker_names[i]);
@@ -224,7 +224,7 @@ void markerbox(char *title, GtkSignalFunc func)
     GLOBALS->cleanup_markerbox_c_4=func;
     GLOBALS->dirty_markerbox_c_1=0;
 
-    for(i=0;i<26;i++) 
+    for(i=0;i<26;i++)
 	{
 	GLOBALS->shadow_markers_markerbox_c_1[i] = GLOBALS->named_markers[i];
 	GLOBALS->shadow_marker_names[i] = strdup_2(GLOBALS->marker_names[i]);
diff --git a/src/menu.c b/src/menu.c
index d14331d..5e1b688 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2014.
  *
  * This program is free software; you can redistribute it and/or
@@ -175,7 +175,7 @@ for(i=0;i<26;i++)
 		success = 1;
 		break;
 		}
-	
+
 	ent_idx--;
 	if(ent_idx < 0) ent_idx = 25;
 	}
@@ -228,7 +228,7 @@ for(i=0;i<26;i++)
 		success = 1;
 		break;
 		}
-	
+
 	ent_idx++;
 	if(ent_idx > 25) ent_idx = 0;
 	}
@@ -567,8 +567,8 @@ int rc;
 if(!GLOBALS->filesel_ok)
         {
         return;
-        }               
-                                
+        }
+
 if(GLOBALS->lock_menu_c_1 == 1) return; /* avoid recursion */
 GLOBALS->lock_menu_c_1 = 1;
 
@@ -637,8 +637,8 @@ int rc;
 if(!GLOBALS->filesel_ok)
         {
         return;
-        }               
-                                
+        }
+
 if(GLOBALS->lock_menu_c_2 == 1) return; /* avoid recursion */
 GLOBALS->lock_menu_c_2 = 1;
 
@@ -699,8 +699,8 @@ int rc;
 if(!GLOBALS->filesel_ok)
         {
         return;
-        }               
-                                
+        }
+
 if(GLOBALS->lock_menu_c_2 == 1) return; /* avoid recursion */
 GLOBALS->lock_menu_c_2 = 1;
 
@@ -1282,15 +1282,15 @@ void set_hier_cleanup(GtkWidget *widget, gpointer data, int level)
 			t->is_depacked = (flagged != 0);
 
 			if(!flagged)
-			  {   
+			  {
 			    t->name = hier_extract(t->n.nd->nname, GLOBALS->hier_max_level);
 			  }
 			else
-			  {   
+			  {
 			    t->name = strdup_2(hier_extract(tbuff, GLOBALS->hier_max_level));
 			    free_2(tbuff);
 			  }
-		      } 
+		      }
 		}
 	    }
 	  t=t->t_next;
@@ -1334,7 +1334,7 @@ if(GLOBALS->helpbox_is_active)
 		" with bit numbers or ranges ignored) that is displayable"
 		" for trace names.  Zero indicates that no truncation will"
 		" be performed (default).  Note that any aliased signals"
-		" (prefix of a \"+\") will not have truncated names." 
+		" (prefix of a \"+\") will not have truncated names."
         );
         return;
         }
@@ -1498,7 +1498,7 @@ if(GLOBALS->helpbox_is_active)
 
 	calczoom(GLOBALS->tims.zoom);
 	fix_wavehadj();
-                        
+
 	gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(GLOBALS->wave_hslider)), "changed"); /* force zoom update */
 	gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(GLOBALS->wave_hslider)), "value_changed"); /* force zoom update */
 	update_maxmarker_labels();
@@ -1531,10 +1531,10 @@ if(GLOBALS->helpbox_is_active)
 			{
 			delete_strace_context();
 			}
-	
+
 		strace_maketimetrace(0);
 		}
-  
+
 	MaxSignalLength();
 	signalarea_configure_event(GLOBALS->signalarea, NULL);
 	wavearea_configure_event(GLOBALS->wavearea, NULL);
@@ -1553,7 +1553,7 @@ if(GLOBALS->helpbox_is_active)
 	else
 	{
 	force_normal_gcs();
-  
+
 	MaxSignalLength();
 	signalarea_configure_event(GLOBALS->signalarea, NULL);
 	wavearea_configure_event(GLOBALS->wavearea, NULL);
@@ -1573,7 +1573,7 @@ if(GLOBALS->helpbox_is_active)
 	else
 	{
 	force_screengrab_gcs();
-  
+
 	MaxSignalLength();
 	signalarea_configure_event(GLOBALS->signalarea, NULL);
 	wavearea_configure_event(GLOBALS->wavearea, NULL);
@@ -1621,7 +1621,7 @@ if(GLOBALS->helpbox_is_active)
 		{
 		calczoom(GLOBALS->tims.zoom);
 		fix_wavehadj();
-                        
+
 		gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(GLOBALS->wave_hslider)), "changed"); /* force zoom update */
 		gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(GLOBALS->wave_hslider)), "value_changed"); /* force zoom update */
 		}
@@ -1956,7 +1956,7 @@ if(GLOBALS->helpbox_is_active)
                 {
                 const gchar *rpath = quartz_application_get_resource_path();
                 const char *suf = "/doc/gtkwave.pdf";
-		char *pdfpath = NULL;                                    
+		char *pdfpath = NULL;
 		FILE *handle;
 
                 if(rpath)
@@ -1965,14 +1965,14 @@ if(GLOBALS->helpbox_is_active)
                         strcpy(pdfpath, rpath);
                         strcat(pdfpath, suf);
                         }
-                         
+
                 if(!pdfpath || !(handle=fopen(pdfpath,"rb")))
 			{
 			}
 			else
 			{
 			fclose(handle);
-			gtk_open_external_file(pdfpath); 
+			gtk_open_external_file(pdfpath);
 			return;
 			}
 		}
@@ -2019,8 +2019,8 @@ if(data)
 	{
 #ifdef __CYGWIN__
 	kill_stems_browser();
-#endif	
-	g_print("Exiting.\n");	
+#endif
+	g_print("Exiting.\n");
 	sprintf(sstr, "%d", GLOBALS->this_context_page);
 	gtkwavetcl_setvar(WAVE_TCLCB_QUIT_PROGRAM, sstr, WAVE_TCLCB_QUIT_PROGRAM_FLAGS);
 
@@ -2083,9 +2083,9 @@ for(i=0;i<np;i++)
 		}
 	}
 (*GLOBALS->contexts)[j] = old_g;
-	
-gtk_notebook_set_show_tabs(GTK_NOTEBOOK(n), (np>2)); 
-gtk_notebook_set_show_border(GTK_NOTEBOOK(n), (np>2)); 
+
+gtk_notebook_set_show_tabs(GTK_NOTEBOOK(n), (np>2));
+gtk_notebook_set_show_border(GTK_NOTEBOOK(n), (np>2));
 
 gtk_notebook_remove_page(GTK_NOTEBOOK(n), this_page);
 gtk_notebook_set_current_page(GTK_NOTEBOOK(n), new_page);
@@ -2111,8 +2111,8 @@ update_maxmarker_labels();
 update_basetime(GLOBALS->tims.baseline);
 
 gtk_window_set_title(GTK_WINDOW(GLOBALS->mainwindow), GLOBALS->winname);
- 
-MaxSignalLength();   
+
+MaxSignalLength();
 signalarea_configure_event(GLOBALS->signalarea, NULL);
 wavearea_configure_event(GLOBALS->wavearea, NULL);
 }
@@ -2128,7 +2128,7 @@ if(GLOBALS->helpbox_is_active)
                 " requester is given the OK to quit."
         );
         return;
-        } 
+        }
 
 if((GLOBALS->num_notebook_pages < 2) && (!GLOBALS->enable_fast_exit))
 	{
@@ -2267,14 +2267,14 @@ static unsigned create_group (char* name, Trptr t_composite)
 	 t_begin = t_composite;
 	 t_begin->flags |=TR_GRP_BEGIN;
        }
-     else 
+     else
        {
 	 if( (t_begin = (Trptr) calloc_2( 1, sizeof( TraceEnt ))) == NULL )
 	   {
 	     fprintf( stderr, "Out of memory, can't add trace.\n");
 	     return(0);
 	   }
-     
+
 	 t_begin->flags = (TR_BLANK|TR_GRP_BEGIN);
 	 t_begin->name = (char *)malloc_2(1+strlen(name));
 	 strcpy(t_begin->name, name);
@@ -2292,7 +2292,7 @@ static unsigned create_group (char* name, Trptr t_composite)
        }
 
      t_end->flags = (TR_BLANK|TR_GRP_END);
-    
+
      if (t_composite)
        {
 	 /* make the group end trace invisible */
@@ -2314,7 +2314,7 @@ static unsigned create_group (char* name, Trptr t_composite)
      t_begin->t_match = t_end;
      t_end->t_match   = t_begin;
 
-     if (t_prev) 
+     if (t_prev)
        {
 	 t_prev->flags |= TR_HIGHLIGHT;
 	 PasteBuffer();
@@ -2328,7 +2328,7 @@ static unsigned create_group (char* name, Trptr t_composite)
 }
 
 
-static void 
+static void
 create_group_cleanup(GtkWidget *widget, gpointer data)
 {
   unsigned dirty = 0;
@@ -2350,7 +2350,7 @@ create_group_cleanup(GtkWidget *widget, gpointer data)
 
 
 
-void 
+void
 menu_create_group(gpointer null_data, guint callback_action, GtkWidget *widget)
 {
 
@@ -2381,7 +2381,7 @@ menu_create_group(gpointer null_data, guint callback_action, GtkWidget *widget)
   if(dirty)
     {
       /* don't mess with sigs when dnd active */
-      if(GLOBALS->dnd_state) { dnd_error(); return; } 
+      if(GLOBALS->dnd_state) { dnd_error(); return; }
       entrybox("Create Group",300,"","Enter group name:",128,GTK_SIGNAL_FUNC(create_group_cleanup));
     }
   else
@@ -2414,7 +2414,7 @@ static unsigned expand_trace(Trptr t_top)
 
       if(t->vector)
 	{
-	  bptr bits;	
+	  bptr bits;
 	  int i;
 	  Trptr tfix;
 	  TimeType otime = t->shift;
@@ -2463,7 +2463,7 @@ static unsigned expand_trace(Trptr t_top)
 	      for(i=0;i<e->width;i++)
 		{
 		  GLOBALS->which_t_color = color;
-		  AddNode(e->narray[i], NULL);	
+		  AddNode(e->narray[i], NULL);
 		}
 	      GLOBALS->do_hier_compress = dhc_sav;
 	      free_2(e->narray);
@@ -2476,7 +2476,7 @@ static unsigned expand_trace(Trptr t_top)
       tmpi=GLOBALS->traces.buffercount; GLOBALS->traces.buffercount=GLOBALS->traces.total;
       GLOBALS->traces.total=tmpi;
 
-      if (GLOBALS->traces.buffercount > 0) 
+      if (GLOBALS->traces.buffercount > 0)
 	{
 
 	  /* buffer now contains the created signals */
@@ -2489,14 +2489,14 @@ static unsigned expand_trace(Trptr t_top)
 	      PasteBuffer();
 	      t_top->t_prev->flags &= ~TR_HIGHLIGHT;
 	    }
-	  else 
+	  else
 	    {
 	      RemoveTrace(t_top, 0);
 	      PrependBuffer();
 	    }
 
 	  dirty = create_group("unused_2", t_top);
-	
+
 	}
     }
 
@@ -2729,7 +2729,7 @@ static void menu_rename(GtkWidget *widget, gpointer data)
   GLOBALS->trace_to_alias_menu_c_1=NULL;
 
   /* don't mess with sigs when dnd active */
-  if(GLOBALS->dnd_state) { dnd_error(); return; } 
+  if(GLOBALS->dnd_state) { dnd_error(); return; }
 
   t = GLOBALS->traces.first;
   while(t)
@@ -2851,7 +2851,7 @@ bvptr combine_traces(int direction, Trptr single_trace_only)
 		  if(t->vector)
 		    {
 		      int ix;
-		      bptr bits = t->n.vec->bits;	
+		      bptr bits = t->n.vec->bits;
 		      baptr oldba = bits ? bits->attribs : NULL;
 
 		      bits=t->n.vec->bits;
@@ -2894,7 +2894,7 @@ bvptr combine_traces(int direction, Trptr single_trace_only)
 			    {
 			      ba[nodepnt].shift = t->shift;
 			      ba[nodepnt].flags = t->flags;
-			      n[nodepnt++]=e->narray[ix];	
+			      n[nodepnt++]=e->narray[ix];
 			      e->narray[ix]->expansion->refcnt++;
 			    }
 			  free_2(e->narray);
@@ -2950,7 +2950,7 @@ bvptr combine_traces(int direction, Trptr single_trace_only)
 	      b->nodes[i]=n[i];
 	      if(n[i] && n[i]->expansion) /* scan-build */
 		{
-		  if(bitblast_parent != n[i]->expansion->parent) 
+		  if(bitblast_parent != n[i]->expansion->parent)
 		    {
 		      bitblast_parent=NULL;
 		    }
@@ -2990,7 +2990,7 @@ bvptr combine_traces(int direction, Trptr single_trace_only)
 	      b->nodes[i]=n[rev--];
 	      if(n[i] && n[i]->expansion) /* scan-build */
 		{
-		  if(bitblast_parent != n[i]->expansion->parent) 
+		  if(bitblast_parent != n[i]->expansion->parent)
 		    {
 		      bitblast_parent=NULL;
 		    }
@@ -3093,7 +3093,7 @@ bvptr combine_traces(int direction, Trptr single_trace_only)
 	      if(namex[ix]=='[') break;
 	    }
 	  if(ix>-1) offset=ix;
-	
+
 	  nam=(char *)wave_alloca(offset+40);
 	  memcpy(nam, namex, offset);
 	  if(was_packed) { free_2(namex); }
@@ -3106,7 +3106,7 @@ bvptr combine_traces(int direction, Trptr single_trace_only)
 	    {
 	      sprintf(nam+offset, "[%d%s%d]", n[nodepnt-1]->expansion->actual,  (bitblast_delta!=0) ? ":" : "|", n[0]->expansion->actual);
 	    }
-	
+
 	  strcpy(b->name=(char *)malloc_2(offset + strlen(nam+offset)+1), nam);
 	  DEBUG(printf("Name is: '%s'\n", nam));
 	}
@@ -3247,7 +3247,7 @@ void menu_tracesearchbox(gpointer null_data, guint callback_action, GtkWidget *w
 Trptr t;
 
 if(GLOBALS->helpbox_is_active)
-        {  
+        {
         help_text_bold("\n\nPattern Search");
         help_text(
 		" only works when at least one trace is highlighted. "
@@ -3281,7 +3281,7 @@ if(GLOBALS->helpbox_is_active)
 	    char buf[128];
 	    long which = ((long)callback_action) - WV_MENU_SPS;
 
-	    if((which < 0) || (which >= WAVE_NUM_STRACE_WINDOWS)) 
+	    if((which < 0) || (which >= WAVE_NUM_STRACE_WINDOWS))
 			{ /* should never happen unless menus are defined wrong */
 			sprintf(buf, "Pattern search ID %d out of range of 1-%d available, ignoring.", (int)(which+1), WAVE_NUM_STRACE_WINDOWS);
 			status_text(buf);
@@ -3314,7 +3314,7 @@ if(GLOBALS->filesel_ok)
          */
 	pid=fork();
 	if(((int)pid) < 0) { return; /* not much we can do about this.. */ }
-	
+
 	if(pid)         /* parent==original server_pid */
 	        {
 		return;
@@ -3365,9 +3365,9 @@ if(GLOBALS->filesel_ok)
 	      NULL,          /* use parent's current directory */
 	      &si,           /* STARTUPINFO pointer */
 	      &piProcInfo);  /* receives PROCESS_INFORMATION */
-	
+
 	free_2(szCmdline);
-	
+
 	if(!bSuccess)
 	        {
 	        /* failed */
@@ -3456,7 +3456,7 @@ menu_new_viewer_tab_cleanup_2(char *fname, int optimize_vcd)
 		strcpy2_into_new_context(GLOBALS, &GLOBALS->filesel_print_pdf_renderopt_c_1, &g_old->filesel_print_pdf_renderopt_c_1);
 		strcpy2_into_new_context(GLOBALS, &GLOBALS->filesel_print_ps_renderopt_c_1, &g_old->filesel_print_ps_renderopt_c_1);
 		strcpy2_into_new_context(GLOBALS, &GLOBALS->filesel_print_mif_renderopt_c_1, &g_old->filesel_print_mif_renderopt_c_1);
-#endif		
+#endif
 
 		/* not sure what's really needed here */
 		/* for now, add back in repscript_name */
@@ -3477,10 +3477,10 @@ menu_new_viewer_tab_cleanup_2(char *fname, int optimize_vcd)
 	        wave_gconf_client_set_string("/current/pwd", getenv("PWD"));
 
 	        wave_gconf_client_set_string("/current/dumpfile", GLOBALS->optimize_vcd ? GLOBALS->unoptimized_vcd_file_name : GLOBALS->loaded_file_name);
-	        wave_gconf_client_set_string("/current/optimized_vcd", GLOBALS->optimize_vcd ? "1" : "0");  
+	        wave_gconf_client_set_string("/current/optimized_vcd", GLOBALS->optimize_vcd ? "1" : "0");
 
 	        wave_gconf_client_set_string("/current/savefile", GLOBALS->filesel_writesave);
-	
+
 		rc = 1;
 		}
                 else
@@ -3495,7 +3495,7 @@ menu_new_viewer_tab_cleanup_2(char *fname, int optimize_vcd)
                 free_outstanding(); /* free anything allocated in loader ctx */
 		free(GLOBALS);
 		GLOBALS = NULL; /* valgrind fix */
-	
+
 		set_GLOBALS(g_old);
                 free(GLOBALS->vcd_jmp_buf); GLOBALS->vcd_jmp_buf = NULL;
 		set_window_idle(NULL);
@@ -3514,7 +3514,7 @@ void
 menu_new_viewer_tab_cleanup(GtkWidget *widget, gpointer data)
 {
 if(GLOBALS->filesel_ok)
-        { 
+        {
 	menu_new_viewer_tab_cleanup_2(*GLOBALS->fileselbox_text, GLOBALS->optimize_vcd);
 	}
 }
@@ -3545,7 +3545,7 @@ if(!GLOBALS->partial_vcd)
 	}
 }
 
-/**/ 
+/**/
 
 void
 menu_reload_waveform(gpointer null_data, guint callback_action, GtkWidget *widget)
@@ -3560,7 +3560,7 @@ menu_reload_waveform(gpointer null_data, guint callback_action, GtkWidget *widge
 	return;
 	}
 
- if(in_main_iteration()) return;      
+ if(in_main_iteration()) return;
 
  if(GLOBALS->gt_splash_c_1 || GLOBALS->splash_is_loading)
 	{
@@ -3666,7 +3666,7 @@ if(GLOBALS->helpbox_is_active)
                 " removes the primary marker from the display if present."
         );
         return;
-        }        
+        }
 
 DEBUG(printf("delete_unnamed marker()\n"));
 
@@ -3839,7 +3839,7 @@ if(GLOBALS->dnd_state) { dnd_error(); return; } /* don't mess with sigs when dnd
 treebox("Signal Search Tree",GTK_SIGNAL_FUNC(menu_treesearch_cleanup), NULL);
 }
 /**/
-void 
+void
 menu_showchangeall_cleanup(GtkWidget *widget, gpointer data)
 {
 Trptr t;
@@ -3854,7 +3854,7 @@ if(t)
 		if((t->flags&TR_HIGHLIGHT)&&(!(t->flags&(TR_BLANK|TR_ANALOG_BLANK_STRETCH)))&&(t->name))
 			{
 			t->flags=flags;
-			}	
+			}
 		t=t->t_next;
 		}
 	}
@@ -3866,14 +3866,14 @@ wavearea_configure_event(GLOBALS->wavearea, NULL);
 DEBUG(printf("menu_showchangeall_cleanup()\n"));
 }
 
-void 
+void
 menu_showchangeall(gpointer null_data, guint callback_action, GtkWidget *widget)
 {
 Trptr t;
 
 if(GLOBALS->helpbox_is_active)
         {
-        help_text_bold("\n\nShow-Change All Highlighted");   
+        help_text_bold("\n\nShow-Change All Highlighted");
         help_text(
                 " provides an easy means of changing trace attributes en masse."
                 " Various functions are provided in a Show-Change requester."
@@ -3899,7 +3899,7 @@ must_sel();
 }
 
 /**/
-void 
+void
 menu_showchange_cleanup(GtkWidget *widget, gpointer data)
 {
 GLOBALS->signalwindow_width_dirty=1;
@@ -3909,7 +3909,7 @@ wavearea_configure_event(GLOBALS->wavearea, NULL);
 DEBUG(printf("menu_showchange_cleanup()\n"));
 }
 
-void 
+void
 menu_showchange(gpointer null_data, guint callback_action, GtkWidget *widget)
 {
 Trptr t;
@@ -3982,7 +3982,7 @@ void menu_remove_aliases(gpointer null_data, guint callback_action, GtkWidget *w
 		}
 
 	  t->name = name_full;
-	  if (GLOBALS->hier_max_level) 
+	  if (GLOBALS->hier_max_level)
 		{
 		if(!was_packed)
 			{
@@ -4085,7 +4085,7 @@ void menu_alias(gpointer null_data, guint callback_action, GtkWidget *widget)
   GLOBALS->trace_to_alias_menu_c_1=NULL;
 
   /* don't mess with sigs when dnd active */
-  if(GLOBALS->dnd_state) { dnd_error(); return; } 
+  if(GLOBALS->dnd_state) { dnd_error(); return; }
 
   t = GLOBALS->traces.first;
   while(t)
@@ -4169,7 +4169,7 @@ if(GLOBALS->dnd_state) { dnd_error(); return; } /* don't mess with sigs when dnd
 searchbox("Signal Search",GTK_SIGNAL_FUNC(menu_signalsearch_cleanup));
 }
 /**/
-static void 
+static void
 regexp_highlight_generic(int mode)
 {
 if(GLOBALS->entrybox_text)
@@ -4216,13 +4216,13 @@ if(GLOBALS->entrybox_text)
 	}
 }
 
-static void 
+static void
 regexp_unhighlight_cleanup(GtkWidget *widget, gpointer data)
 {
 regexp_highlight_generic(0);
 }
 
-void 
+void
 menu_regexp_unhighlight(gpointer null_data, guint callback_action, GtkWidget *widget)
 {
 if(GLOBALS->helpbox_is_active)
@@ -4240,13 +4240,13 @@ if(GLOBALS->helpbox_is_active)
 entrybox("Regexp UnHighlight",300,GLOBALS->regexp_string_menu_c_1,NULL,128,GTK_SIGNAL_FUNC(regexp_unhighlight_cleanup));
 }
 /**/
-static void 
+static void
 regexp_highlight_cleanup(GtkWidget *widget, gpointer data)
 {
 regexp_highlight_generic(1);
 }
 
-void 
+void
 menu_regexp_highlight(gpointer null_data, guint callback_action, GtkWidget *widget)
 {
 if(GLOBALS->helpbox_is_active)
@@ -4341,7 +4341,7 @@ fileselbox("Grab To File",&GLOBALS->filesel_imagegrab,GTK_SIGNAL_FUNC(menu_write
 
 #endif
 
-/**/ 
+/**/
 
 void
 menu_write_save_cleanup(GtkWidget *widget, gpointer data)
@@ -4473,7 +4473,7 @@ char *fname ;
 if(GLOBALS->filesel_ok)
 	{
 	DEBUG(printf("Read Stems Fini: %s\n", *GLOBALS->fileselbox_text));
-        
+
         fname=*GLOBALS->fileselbox_text;
 	if((fname)&&strlen(fname))
 		{
@@ -4521,7 +4521,7 @@ char *fname ;
 if(GLOBALS->filesel_ok)
 	{
 	DEBUG(printf("Read Log Fini: %s\n", *GLOBALS->fileselbox_text));
-        
+
         fname=*GLOBALS->fileselbox_text;
 	if((fname)&&strlen(fname))
 		{
@@ -4556,7 +4556,7 @@ char *fname ;
 if(GLOBALS->filesel_ok)
 	{
 	DEBUG(printf("Read Script Fini: %s\n", *GLOBALS->fileselbox_text));
-        
+
         fname=*GLOBALS->fileselbox_text;
 	if((fname)&&strlen(fname))
 		{
@@ -4587,7 +4587,7 @@ void
 menu_insert_blank_traces(gpointer null_data, guint callback_action, GtkWidget *widget)
 {
 if(GLOBALS->helpbox_is_active)
-        {  
+        {
         help_text_bold("\n\nInsert Blank");
         help_text(
                 " inserts a blank trace after the last highlighted trace."
@@ -4610,7 +4610,7 @@ void
 menu_insert_analog_height_extension(gpointer null_data, guint callback_action, GtkWidget *widget)
 {
 if(GLOBALS->helpbox_is_active)
-        {  
+        {
         help_text_bold("\n\nInsert Analog Height Extension");
         help_text(
                 " inserts a blank analog extension trace after the last highlighted trace."
@@ -4644,7 +4644,7 @@ void
 menu_insert_comment_traces(gpointer null_data, guint callback_action, GtkWidget *widget)
 {
 if(GLOBALS->helpbox_is_active)
-        {  
+        {
         help_text_bold("\n\nInsert Comment");
         help_text(
                 " inserts a comment trace after the last highlighted trace."
@@ -4782,7 +4782,7 @@ void menu_fetchsize(gpointer null_data, guint callback_action, GtkWidget *widget
 {
 char fw[32];
 
-if(GLOBALS->helpbox_is_active)   
+if(GLOBALS->helpbox_is_active)
         {
         help_text_bold("\n\nFetch Size");
         help_text(
@@ -5093,7 +5093,7 @@ if(!*src)
         *siz = 1;
         }
         else
-        {    
+        {
         *src = realloc_2(*src, (*siz + 1) * sizeof(char *));
         (*src)[*siz] = str;
         *siz = *siz + 1;
@@ -5150,7 +5150,7 @@ if(idx)
                 fname = GLOBALS->stem_path_string_table[GLOBALS->istem_struct_base[idx].stem_idx];
 		}
 
-#ifdef __MINGW32__        
+#ifdef __MINGW32__
 	{
         fprintf(stderr, "GTKWAVE | Not supported in Windows!\n");
 	}
@@ -5169,7 +5169,7 @@ if(idx)
 			simplereqbox("Could not open file!", wid, fname, "OK", NULL, NULL, 1);
 			return;
 			}
-		
+
 		fname = wave_alloca(strlen(rp) + 1);
 		strcpy(fname, rp);
 		free_2(rp);
@@ -5201,15 +5201,15 @@ if(idx)
 			const char *delim = " \t";
 			int num_seen = 0;
 			int fn_seen = 0;
-        
+
 			char **ar = NULL;
 			int siz = 0;
-         
+
        			for(str1 = str;;str1 = NULL)
 			        {
 			        token = strtok_r(str1, delim, &saveptr1);
 			        if(!token) break;
-         
+
 			        if(strstr(token, "%d"))
 			                {
 			                sprintf(nbuf, token, lineno);
@@ -5222,7 +5222,7 @@ if(idx)
 					fn_seen = 1;
 			                }
 		                else
-			                {   
+			                {
 			                sd_token = strdup_2(token);
 			                }
 			        grow_array(&ar, &siz, sd_token);
@@ -5245,7 +5245,7 @@ if(idx)
 					sd_token = strdup_2(fname);
 					grow_array(&ar, &siz, sd_token);
 					}
-		
+
 				grow_array(&ar, &siz, NULL);
 
 	                        execvp(ar[0], ar);
@@ -5285,7 +5285,7 @@ if(GLOBALS->helpbox_is_active)
 		        help_text_bold("\n\nOpen Source Instantiation");
 			}
 	        help_text(
-#if WAVE_USE_GTK2   
+#if WAVE_USE_GTK2
                         " opens and selects the appropriate level of hierarchy in the SST"
                         " for the first selected signal and also invokes the editor specified by the"
                         " \"editor\" gtkwaverc variable, that specified by the environment variable $GTKWAVE_EDITOR,"
@@ -5305,7 +5305,7 @@ if(GLOBALS->helpbox_is_active)
 		{
 	        help_text_bold("\n\nOpen Scope");
 	        help_text(
-#if WAVE_USE_GTK2   
+#if WAVE_USE_GTK2
 			" opens and selects the appropriate level of hierarchy in the SST"
 			" for the first selected signal."
 #else
@@ -5316,7 +5316,7 @@ if(GLOBALS->helpbox_is_active)
         return;
         }
 
-#if WAVE_USE_GTK2   
+#if WAVE_USE_GTK2
 
 if((t=GLOBALS->traces.first))
     	{
@@ -5377,7 +5377,7 @@ if((t=GLOBALS->traces.first))
 						}
 					free_2(tname_copy);
 					}
-	
+
 				free_2(tname);
 				fix=1;
 		      		break;
@@ -5438,7 +5438,7 @@ if(GLOBALS->helpbox_is_active)
 		        help_text_bold("\n\nOpen Source Instantiation");
 			}
 	        help_text(
-#if WAVE_USE_GTK2   
+#if WAVE_USE_GTK2
 			" invokes $GTKWAVE_EDITOR or gedit (if found) on the appropriate source unit."
 #else
 			" is not available with this build.  Please build against GTK 2."
@@ -5449,7 +5449,7 @@ if(GLOBALS->helpbox_is_active)
 		{
 	        help_text_bold("\n\nOpen Scope");
 	        help_text(
-#if WAVE_USE_GTK2   
+#if WAVE_USE_GTK2
 			" opens and selects the appropriate level of hierarchy in the SST"
 			" for the first selected signal."
 #else
@@ -5460,7 +5460,7 @@ if(GLOBALS->helpbox_is_active)
         return;
         }
 
-#if WAVE_USE_GTK2   
+#if WAVE_USE_GTK2
 
 if((typ == FST_MT_SOURCESTEM) || (typ == FST_MT_SOURCEISTEM))
 	{
@@ -5730,11 +5730,11 @@ if(GLOBALS->helpbox_is_active)
         help_text_bold("\n\nData Format-Right Justify-Off");
         help_text(
                 " will step through all highlighted traces and ensure that"
-                " vectors with this qualifier will not be displayed right"       
+                " vectors with this qualifier will not be displayed right"
                 " justified."
         );
         return;
-        }  
+        }
 
 dataformat( ~(TR_RJUSTIFY), 0 );
 }
@@ -5747,12 +5747,12 @@ if(GLOBALS->helpbox_is_active)
         help_text_bold("\n\nData Format-Gray Filters-To Gray");
         help_text(
                 " will step through all highlighted traces and ensure that"
-                " bits and vectors with this qualifier will be displayed after"       
+                " bits and vectors with this qualifier will be displayed after"
                 " going through normal to gray conversion. This is a filter"
 		" which sits before other Data Format options such as hex, etc."
         );
         return;
-        }  
+        }
 
 dataformat( ~(TR_GRAYMASK|TR_ANALOGMASK), TR_BINGRAY );
 }
@@ -5765,12 +5765,12 @@ if(GLOBALS->helpbox_is_active)
         help_text_bold("\n\nData Format-Gray Filters-From Gray");
         help_text(
                 " will step through all highlighted traces and ensure that"
-                " bits and vectors with this qualifier will be displayed after"       
+                " bits and vectors with this qualifier will be displayed after"
                 " going through gray to normal conversion. This is a filter"
                 " which sits before other Data Format options such as hex, etc."
         );
         return;
-        }  
+        }
 
 dataformat( ~(TR_GRAYMASK|TR_ANALOGMASK), TR_GRAYBIN );
 }
@@ -5784,11 +5784,11 @@ if(GLOBALS->helpbox_is_active)
         help_text_bold("\n\nData Format-Gray Filters-None");
         help_text(
                 " will step through all highlighted traces and ensure that"
-                " bits and vectors with this qualifier will be displayed with"       
+                " bits and vectors with this qualifier will be displayed with"
                 " normal encoding."
         );
         return;
-        }  
+        }
 
 dataformat( ~(TR_GRAYMASK|TR_ANALOGMASK), 0 );
 }
@@ -5801,12 +5801,12 @@ if(GLOBALS->helpbox_is_active)
         help_text_bold("\n\nData Format-Popcnt-On");
         help_text(
                 " will step through all highlighted traces and ensure that"
-                " bits and vectors with this qualifier will be displayed after"       
+                " bits and vectors with this qualifier will be displayed after"
                 " going through a population (one's) count conversion.  This is a filter"
                 " which sits before other Data Format options such as hex, etc."
         );
         return;
-        }  
+        }
 
 dataformat( ~(TR_POPCNT), TR_POPCNT );
 }
@@ -5823,12 +5823,11 @@ if(GLOBALS->helpbox_is_active)
                 " normal encoding."
         );
         return;
-        }  
+        }
 
 dataformat( ~(TR_POPCNT), 0 );
 }
 
-//
 void
 menu_dataformat_invert_on(gpointer null_data, guint callback_action, GtkWidget *widget)
 {
@@ -5837,11 +5836,11 @@ if(GLOBALS->helpbox_is_active)
         help_text_bold("\n\nData Format-Invert-On");
         help_text(
                 " will step through all highlighted traces and ensure that"
-                " bits and vectors with this qualifier will be displayed with"       
+                " bits and vectors with this qualifier will be displayed with"
                 " 1's and 0's inverted."
         );
         return;
-        }  
+        }
 
 dataformat( ~(TR_INVERT), TR_INVERT );
 }
@@ -5854,11 +5853,11 @@ if(GLOBALS->helpbox_is_active)
         help_text_bold("\n\nData Format-Invert-Off");
         help_text(
                 " will step through all highlighted traces and ensure that"
-                " bits and vectors with this qualifier will not be displayed with" 
-                " 1's and 0's inverted."                       
+                " bits and vectors with this qualifier will not be displayed with"
+                " 1's and 0's inverted."
         );
         return;
-        }  
+        }
 
 dataformat( ~(TR_INVERT), 0 );
 }
@@ -5871,11 +5870,11 @@ if(GLOBALS->helpbox_is_active)
         help_text_bold("\n\nData Format-Reverse Bits-On");
         help_text(
                 " will step through all highlighted traces and ensure that"
-                " vectors with this qualifier will be displayed in" 
-                " reversed bit order."                       
+                " vectors with this qualifier will be displayed in"
+                " reversed bit order."
         );
         return;
-        }  
+        }
 
 dataformat( ~(TR_REVERSE), TR_REVERSE );
 }
@@ -5891,7 +5890,7 @@ if(GLOBALS->helpbox_is_active)
                 " vectors with this qualifier will not be displayed in"
                 " reversed bit order."
         );
-        return;   
+        return;
         }
 
 dataformat( ~(TR_REVERSE), 0 );
@@ -5922,7 +5921,7 @@ if(GLOBALS->helpbox_is_active)
         help_text(
                 " causes the waveform data for all currently highlighted traces"
                 " to be displayed as normal if the exclude attribute is currently"
-		" set on the highlighted traces."            
+		" set on the highlighted traces."
         );
         return;
         }
@@ -5938,12 +5937,12 @@ if(GLOBALS->helpbox_is_active)
         help_text_bold("\n\nData Format-Range Fill With 0s");
         help_text(
                 " will step through all highlighted traces and ensure that"
-                " vectors with this qualifier will be displayed as if" 
-                " the bitrange of the MSB or LSB as appropriate goes to zero."                       
+                " vectors with this qualifier will be displayed as if"
+                " the bitrange of the MSB or LSB as appropriate goes to zero."
 		" Zero bits will be filled in for the missing bits."
         );
         return;
-        }  
+        }
 
 dataformat( ~(TR_ZEROFILL|TR_ONEFILL|TR_ANALOGMASK), TR_ZEROFILL );
 }
@@ -5956,14 +5955,14 @@ if(GLOBALS->helpbox_is_active)
         help_text_bold("\n\nData Format-Range Fill With 1s");
         help_text(
                 " will step through all highlighted traces and ensure that"
-                " vectors with this qualifier will be displayed as if" 
-                " the bitrange of the MSB or LSB as appropriate goes to zero."                       
+                " vectors with this qualifier will be displayed as if"
+                " the bitrange of the MSB or LSB as appropriate goes to zero."
 		" One bits will be filled in for the missing bits; this is mostly intended"
 		" to be used when viewing values which are inverted in the logic and need"
 		" to be inverted in the viewer."
         );
         return;
-        }  
+        }
 
 dataformat( ~(TR_ZEROFILL|TR_ONEFILL|TR_ANALOGMASK), TR_ONEFILL );
 }
@@ -5979,7 +5978,7 @@ if(GLOBALS->helpbox_is_active)
 		" normal bitrange displays are used."
         );
         return;
-        }  
+        }
 
 dataformat( ~(TR_ZEROFILL|TR_ONEFILL|TR_ANALOGMASK), 0 );
 }
@@ -5992,7 +5991,7 @@ if(GLOBALS->helpbox_is_active)
         help_text_bold("\n\nAnalog Off");
         help_text(
                 " causes the waveform data for all currently highlighted traces"
-                " to be displayed as normal."            
+                " to be displayed as normal."
         );
         return;
         }
@@ -6008,7 +6007,7 @@ if(GLOBALS->helpbox_is_active)
         help_text_bold("\n\nAnalog Step");
         help_text(
                 " causes the waveform data for all currently highlighted traces"
-                " to be displayed as stepwise analog waveform."            
+                " to be displayed as stepwise analog waveform."
         );
         return;
         }
@@ -6024,7 +6023,7 @@ if(GLOBALS->helpbox_is_active)
         help_text_bold("\n\nAnalog Interpolate");
         help_text(
                 " causes the waveform data for all currently highlighted traces"
-                " to be displayed as interpolated analog waveform."            
+                " to be displayed as interpolated analog waveform."
         );
         return;
         }
@@ -6041,7 +6040,7 @@ if(GLOBALS->helpbox_is_active)
         help_text(
                 " causes the waveform data for all currently highlighted traces"
                 " to be displayed as an interpolated analog waveform annotated"
-		" with the non-interpolated data sampling points that the cursor snaps to."            
+		" with the non-interpolated data sampling points that the cursor snaps to."
         );
         return;
         }
@@ -6058,7 +6057,7 @@ if(GLOBALS->helpbox_is_active)
         help_text(
                 " causes the waveform data for all currently highlighted traces"
                 " to be displayed such that the y-value scaling maximizes the on-screen trace"
-		" data so if fills the whole trace width at all times."            
+		" data so if fills the whole trace width at all times."
         );
         return;
         }
@@ -6071,11 +6070,11 @@ menu_dataformat_analog_resize_all(gpointer null_data, guint callback_action, Gtk
 {
 if(GLOBALS->helpbox_is_active)
         {
-        help_text_bold("\n\nAnalog Resizing All Data"); 
+        help_text_bold("\n\nAnalog Resizing All Data");
         help_text(
                 " causes the waveform data for all currently highlighted traces"
                 " to be displayed such that the y-value scaling maximizes the on-screen trace"
-		" data so if fills the whole trace width only when fully zoomed out."            
+		" data so if fills the whole trace width only when fully zoomed out."
 		" (i.e., the scale used goes across all trace data)"
         );
         return;
@@ -6239,12 +6238,12 @@ if(GLOBALS->helpbox_is_active)
         {
         help_text_bold("\n\nCut");
         help_text(
-                " removes highlighted signals from the display and places them" 
+                " removes highlighted signals from the display and places them"
 		" in an offscreen cut/copy buffer for later Paste operations. "
 		" Cut implicitly destroys the previous contents of the cut/copy buffer."
         );
         return;
-        }                
+        }
 
 if(GLOBALS->dnd_state) { dnd_error(); return; } /* don't mess with sigs when dnd active */
 
@@ -6280,12 +6279,12 @@ if(GLOBALS->helpbox_is_active)
         {
         help_text_bold("\n\nCopy");
         help_text(
-                " copies highlighted signals from the display and places them" 
+                " copies highlighted signals from the display and places them"
 		" in an offscreen cut/copy buffer for later Paste operations. "
 		" Copy implicitly destroys the previous contents of the cut/copy buffer."
         );
         return;
-        }                
+        }
 
 if(GLOBALS->dnd_state) { dnd_error(); return; } /* don't mess with sigs when dnd active */
 
@@ -6325,7 +6324,7 @@ if(GLOBALS->helpbox_is_active)
         {
         help_text_bold("\n\nPaste");
         help_text(
-                " pastes signals from"       
+                " pastes signals from"
                 " an offscreen cut/copy buffer and places them in a group after"
 		" the last highlighted signal, or at the end of the display"
 		" if no signal is highlighted."
@@ -6503,7 +6502,7 @@ if(GLOBALS->helpbox_is_active)
                 " J = Right Justify\n"
                 " ~ = Invert\n"
                 " V = Reverse\n"
-                " * = Analog Step+Interpolated\n"   
+                " * = Analog Step+Interpolated\n"
                 " S = Analog Step\n"
                 " I = Analog Interpolated\n"
                 " R = Real\n"
@@ -6542,7 +6541,7 @@ GLOBALS->disable_mouseover = !gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM
  * mouse.) The last member is the data to pass to your callback function.
  *
  * ...This has all been changed to use itemfactory stuff which is more
- * powerful.  The only real difference is the final item which tells 
+ * powerful.  The only real difference is the final item which tells
  * the itemfactory just what the item "is".
  */
 #ifdef WAVE_USE_MENU_BLACKOUTS
@@ -6553,7 +6552,7 @@ static gtkwave_mlist_t menu_items[] =
 {
     WAVE_GTKIFE("/File/Open New Window", "<Control>N", menu_new_viewer, WV_MENU_FONV, "<Item>"),
     WAVE_GTKIFE("/File/Open New Tab", "<Control>T", menu_new_viewer_tab, WV_MENU_FONVT, "<Item>"),
-    WAVE_GTKIFE("/File/Reload Waveform", "<Shift><Control>R", menu_reload_waveform, WV_MENU_FRW, "<Item>"),    
+    WAVE_GTKIFE("/File/Reload Waveform", "<Shift><Control>R", menu_reload_waveform, WV_MENU_FRW, "<Item>"),
     WAVE_GTKIFE("/File/Export/Write VCD File As", NULL, menu_write_vcd_file, WV_MENU_WRVCD, "<Item>"),
     WAVE_GTKIFE("/File/Export/Write LXT File As", NULL, menu_write_lxt_file, WV_MENU_WRLXT, "<Item>"),
     WAVE_GTKIFE("/File/Export/Write TIM File As", NULL, menu_write_tim_file, WV_MENU_WRTIM, "<Item>"),
@@ -7010,14 +7009,14 @@ void get_main_menu(GtkWidget *window, GtkWidget ** menubar)
 #endif
 			case WV_MENU_HWV:
 				break;
-	
-			default: 
+
+			default:
 				mw = gtk_item_factory_get_widget(GLOBALS->item_factory_menu_c_1, menu_items[i].path);
 				if(mw) gtk_widget_set_sensitive(mw, FALSE);
 				break;
 			}
 		}
-	
+
 #ifdef WAVE_USE_MENU_BLACKOUTS
 		for(i=0;i<(sizeof(menu_blackouts)/sizeof(char *));i++)
 			{
@@ -7090,7 +7089,7 @@ void menu_set_sensitive(void)
 #ifdef MAC_INTEGRATION
 		case WV_MENU_HWM:
 #endif
-                case WV_MENU_HWV:  
+                case WV_MENU_HWV:
                         break;
 
                 default:
@@ -7099,8 +7098,8 @@ void menu_set_sensitive(void)
 #else
                         mw = gtk_item_factory_get_widget(GLOBALS->item_factory_menu_c_1, menu_items[i].path);
 #endif
-                        if(mw) 
-				{ 
+                        if(mw)
+				{
 #ifdef MAC_INTEGRATION
 				if(menu_items[i].callback)
 #endif
@@ -7126,9 +7125,9 @@ if(!GLOBALS->enable_fast_exit)
 	{
 #ifdef __CYGWIN__
 	kill_stems_browser();
-#endif	
+#endif
 	g_print ("WM Destroy\n");
-	gtk_exit(0);	
+	gtk_exit(0);
 	}
 
 return(TRUE); /* keeps "delete_event" from happening...we'll manually destory later if need be */
@@ -7152,7 +7151,7 @@ if(GLOBALS->tcl_running)
 		free_2(name);
 		}
 
-	return(0);	
+	return(0);
 	}
 
 GLOBALS->tcl_running = 1;
@@ -7238,7 +7237,7 @@ while(*accel)
 if(!*accel) return(1);
 
 if(strstr(path, "<separator>")) return(1);
-if(!strcmp(accel, "(null)")) 
+if(!strcmp(accel, "(null)"))
 	{
 	accel = NULL;
 	}
@@ -7364,7 +7363,7 @@ void do_popup_menu (GtkWidget *my_widget, GdkEventButton *event)
 	}
     else
 	{
-        if(!GLOBALS->istem_struct_base) 
+        if(!GLOBALS->istem_struct_base)
 		{
 		nmenu_items--; /* remove "/Open Source Instantiation" if not present */
 		}
@@ -7399,7 +7398,7 @@ void do_popup_menu (GtkWidget *my_widget, GdkEventButton *event)
 #endif
     }
 
-  gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, 
+  gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL,
                   button, event_time);
 }
 
@@ -7429,7 +7428,7 @@ void do_sst_popup_menu (GtkWidget *my_widget, GdkEventButton *event)
     {
     int nmenu_items = sizeof(sst_popmenu_items) / sizeof(sst_popmenu_items[0]);
 
-    if(!GLOBALS->istem_struct_base) 
+    if(!GLOBALS->istem_struct_base)
 	{
 	nmenu_items--; /* remove "/Open Source Instantiation" if not present */
 	}
@@ -7462,7 +7461,7 @@ void do_sst_popup_menu (GtkWidget *my_widget, GdkEventButton *event)
 #endif
     }
 
-  gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, 
+  gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL,
                   button, event_time);
 }
 
@@ -7555,8 +7554,8 @@ while(*s)
 for(i=0;i<slashcount;i++)
 	{
 	if(i != (slashcount-1)) *(slashes[i+1]) = 0;
-	(*parts)[i] = strdup_2(slashes[i] + 1);	
-	
+	(*parts)[i] = strdup_2(slashes[i] + 1);
+
 	if(i != (slashcount-1)) *(slashes[i+1]) = '/';
 	}
 
@@ -7588,8 +7587,8 @@ if(accel && menuitem && path)
 	GdkModifierType accelerator_mods = 0;
 	char full_path[1024];
 	sprintf(full_path, "<main>%s", path);
-	
-	if(accelerator) 
+
+	if(accelerator)
 		{
 		gtk_accelerator_parse(accelerator, &accelerator_key, &accelerator_mods);
 
@@ -7657,11 +7656,11 @@ while(ptr)
 			{
 			menuitem = gtk_menu_item_new_with_label(ptr->name);
 			}
-	
+
 		if(!ptr->child && mi[ptr->idx].callback)
 			{
 		      	g_signal_connect (menuitem, "activate", G_CALLBACK (mi[ptr->idx].callback), (gpointer)(long)mi[ptr->idx].callback_action);
-			alt_menu_install_accelerator(accel, menuitem, mi[ptr->idx].accelerator, mi[ptr->idx].path); 
+			alt_menu_install_accelerator(accel, menuitem, mi[ptr->idx].accelerator, mi[ptr->idx].path);
 			}
 		}
 
@@ -7703,7 +7702,7 @@ for(i=0;i<nmenu_items;i++)
 
 	decompose_path(mi[i].path, &items, &parts);
 
-	n = mtree;	
+	n = mtree;
 	for(j=0;j<items;j++)
 		{
 		assert(n != NULL); /* scan-build */
@@ -7794,10 +7793,10 @@ if(GLOBALS->loaded_file_type == MISSING_FILE)
 #endif
 			case WV_MENU_HWV:
 				break;
-	
-			default: 
+
+			default:
 				mw = menu_wlist[i];
-				if(mw) 
+				if(mw)
 					{
 #ifdef MAC_INTEGRATION
 					if(menu_items[i].callback)
@@ -7809,12 +7808,12 @@ if(GLOBALS->loaded_file_type == MISSING_FILE)
 				break;
 			}
 		}
-	
+
 #ifdef WAVE_USE_MENU_BLACKOUTS
 		for(i=0;i<(sizeof(menu_blackouts)/sizeof(char *));i++)
 			{
 			mw = menu_wlist[i];
-			if(mw) 
+			if(mw)
 				{
 				gtk_widget_set_sensitive(mw, FALSE);
 				}
@@ -7868,7 +7867,7 @@ int i;
 for(i=0;i<nmenu_items;i++)
 	{
 	mw = menu_wlist[i];
-	if(mw) 
+	if(mw)
 		{
 		if(menu_items[i].callback)
 			{
@@ -7922,7 +7921,7 @@ if(GLOBALS->loaded_file_type != MISSING_FILE)
 #endif
 			case WV_MENU_HWV:
 				mw = menu_wlist[i];
-				if(mw) 
+				if(mw)
 					{
 #ifdef MAC_INTEGRATION
 					if(menu_items[i].callback)
@@ -7932,8 +7931,8 @@ if(GLOBALS->loaded_file_type != MISSING_FILE)
 						}
 					}
 				break;
-	
-			default: 
+
+			default:
 				break;
 			}
 		}
diff --git a/src/menu.h b/src/menu.h
index 6c9355e..070d074 100644
--- a/src/menu.h
+++ b/src/menu.h
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2014.
  *
  * This program is free software; you can redistribute it and/or
@@ -249,8 +249,8 @@ WV_MENU_SRE,
 WV_MENU_SEP8B,
 WV_MENU_HSWM,
 WV_MENU_MWSON,
-WV_MENU_MLKLT, 
-WV_MENU_MLKRT, 
+WV_MENU_MLKLT,
+WV_MENU_MLKRT,
 WV_MENU_MLKOFF,
 WV_MENU_VSG,
 WV_MENU_SEP9,
diff --git a/src/mouseover.c b/src/mouseover.c
index 2e7d816..3893aea 100644
--- a/src/mouseover.c
+++ b/src/mouseover.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 2006-2014.
  *
  * This program is free software; you can redistribute it and/or
@@ -7,7 +7,7 @@
  * of the License, or (at your option) any later version.
  */
 
-/* AIX may need this for alloca to work */ 
+/* AIX may need this for alloca to work */
 #if defined _AIX
   #pragma alloca
 #endif
@@ -38,12 +38,12 @@ if((flags & TR_SIGNED) != 0)
 /* [1] */
 if((flags & TR_HEX) != 0) { ch[pos++] = 'X'; }
 else if ((flags & TR_ASCII) != 0) { ch[pos++] = 'A'; }
-else if ((flags & TR_DEC) != 0) { ch[pos++] = 'D'; }  
-else if ((flags & TR_BIN) != 0) { ch[pos++] = 'B'; }  
-else if ((flags & TR_OCT) != 0) { ch[pos++] = 'O'; }  
-        
+else if ((flags & TR_DEC) != 0) { ch[pos++] = 'D'; }
+else if ((flags & TR_BIN) != 0) { ch[pos++] = 'B'; }
+else if ((flags & TR_OCT) != 0) { ch[pos++] = 'O'; }
+
 /* [2] */
-if((flags & TR_RJUSTIFY) != 0) { ch[pos++] = 'J'; } 
+if((flags & TR_RJUSTIFY) != 0) { ch[pos++] = 'J'; }
 
 /* [3] */
 if((flags & TR_INVERT) != 0) { ch[pos++] = '~'; }
@@ -52,7 +52,7 @@ if((flags & TR_INVERT) != 0) { ch[pos++] = '~'; }
 if((flags & TR_REVERSE) != 0) { ch[pos++] = 'V'; }
 
 /* [5] */
-if((flags & (TR_ANALOG_STEP|TR_ANALOG_INTERPOLATED)) == (TR_ANALOG_STEP|TR_ANALOG_INTERPOLATED)) { ch[pos++] = '*'; } 
+if((flags & (TR_ANALOG_STEP|TR_ANALOG_INTERPOLATED)) == (TR_ANALOG_STEP|TR_ANALOG_INTERPOLATED)) { ch[pos++] = '*'; }
 else if((flags & TR_ANALOG_STEP) != 0) { ch[pos++] = 'S'; }
 else if((flags & TR_ANALOG_INTERPOLATED) != 0) { ch[pos++] = 'I'; }
 
@@ -202,7 +202,7 @@ if(t->name)
 
 
 static gint expose_event(GtkWidget *widget, GdkEventExpose *event)
-{       
+{
 gdk_draw_pixmap(widget->window, widget->style->fg_gc[GTK_WIDGET_STATE(widget)],
                 GLOBALS->mo_pixmap_mouseover_c_1,
                 event->area.x, event->area.y,
@@ -241,12 +241,12 @@ if(!GLOBALS->mo_black_mouseover_c_1)   GLOBALS->mo_black_mouseover_c_1   = alloc
 
 gdk_draw_rectangle(GLOBALS->mo_pixmap_mouseover_c_1, GLOBALS->mo_dk_gray_mouseover_c_1,
 		TRUE,
-		0,0, 
+		0,0,
 		GLOBALS->mo_width_mouseover_c_1, GLOBALS->mo_height_mouseover_c_1);
 
 gdk_draw_rectangle(GLOBALS->mo_pixmap_mouseover_c_1, GLOBALS->mo_black_mouseover_c_1,
 		TRUE,
-		1,1, 
+		1,1,
 		GLOBALS->mo_width_mouseover_c_1-2, GLOBALS->mo_height_mouseover_c_1-2);
 
 gtkwave_signal_connect(GTK_OBJECT(GLOBALS->mo_area_mouseover_c_1), "expose_event",GTK_SIGNAL_FUNC(expose_event), NULL);
@@ -302,7 +302,7 @@ if(t)
 		alternate_name = malloc_2(MOUSEOVER_BREAKSIZE + 1);
 		strcpy(alternate_name, "...");
 		strcpy(alternate_name + 3, flagged_name + name_charlen - (MOUSEOVER_BREAKSIZE - 3));
-	
+
 		nmaxlen=font_engine_string_measure(GLOBALS->wavefont, alternate_name);
 		}
 		else
@@ -373,12 +373,12 @@ if(!GLOBALS->mouseover_mouseover_c_1)
 
 gdk_draw_rectangle(GLOBALS->mo_pixmap_mouseover_c_1, GLOBALS->mo_dk_gray_mouseover_c_1,
 		TRUE,
-		0,0, 
+		0,0,
 		GLOBALS->mo_width_mouseover_c_1, GLOBALS->mo_height_mouseover_c_1);
 
 gdk_draw_rectangle(GLOBALS->mo_pixmap_mouseover_c_1, GLOBALS->mo_black_mouseover_c_1,
 		TRUE,
-		1,1, 
+		1,1,
 		GLOBALS->mo_width_mouseover_c_1-2, GLOBALS->mo_height_mouseover_c_1-2);
 
 font_engine_draw_string(GLOBALS->mo_pixmap_mouseover_c_1, GLOBALS->wavefont, GLOBALS->mo_dk_gray_mouseover_c_1, 4, fh + 2, alternate_name ? alternate_name : flagged_name);
diff --git a/src/mouseover_sigs.c b/src/mouseover_sigs.c
index d12f67a..67a6eb5 100644
--- a/src/mouseover_sigs.c
+++ b/src/mouseover_sigs.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 2006-2014.
  *
  * This program is free software; you can redistribute it and/or
@@ -7,7 +7,7 @@
  * of the License, or (at your option) any later version.
  */
 
-/* AIX may need this for alloca to work */ 
+/* AIX may need this for alloca to work */
 #if defined _AIX
   #pragma alloca
 #endif
@@ -37,7 +37,7 @@ if(!(t->flags&(TR_BLANK|TR_ANALOG_BLANK_STRETCH)))
 		{
 		s = strdup_2(t->n.vec->bvname);
 		}
-		else 
+		else
 		{
 		if(!HasAlias(t))
 			{
@@ -66,12 +66,12 @@ if((flags & TR_SIGNED) != 0)
 /* [1] */
 if((flags & TR_HEX) != 0) { ch[pos++] = 'X'; }
 else if ((flags & TR_ASCII) != 0) { ch[pos++] = 'A'; }
-else if ((flags & TR_DEC) != 0) { ch[pos++] = 'D'; }  
-else if ((flags & TR_BIN) != 0) { ch[pos++] = 'B'; }  
-else if ((flags & TR_OCT) != 0) { ch[pos++] = 'O'; }  
-        
+else if ((flags & TR_DEC) != 0) { ch[pos++] = 'D'; }
+else if ((flags & TR_BIN) != 0) { ch[pos++] = 'B'; }
+else if ((flags & TR_OCT) != 0) { ch[pos++] = 'O'; }
+
 /* [2] */
-if((flags & TR_RJUSTIFY) != 0) { ch[pos++] = 'J'; } 
+if((flags & TR_RJUSTIFY) != 0) { ch[pos++] = 'J'; }
 
 /* [3] */
 if((flags & TR_INVERT) != 0) { ch[pos++] = '~'; }
@@ -80,7 +80,7 @@ if((flags & TR_INVERT) != 0) { ch[pos++] = '~'; }
 if((flags & TR_REVERSE) != 0) { ch[pos++] = 'V'; }
 
 /* [5] */
-if((flags & (TR_ANALOG_STEP|TR_ANALOG_INTERPOLATED)) == (TR_ANALOG_STEP|TR_ANALOG_INTERPOLATED)) { ch[pos++] = '*'; } 
+if((flags & (TR_ANALOG_STEP|TR_ANALOG_INTERPOLATED)) == (TR_ANALOG_STEP|TR_ANALOG_INTERPOLATED)) { ch[pos++] = '*'; }
 else if((flags & TR_ANALOG_STEP) != 0) { ch[pos++] = 'S'; }
 else if((flags & TR_ANALOG_INTERPOLATED) != 0) { ch[pos++] = 'I'; }
 
@@ -246,7 +246,7 @@ if(tname)
 
 
 static gint expose_event(GtkWidget *widget, GdkEventExpose *event)
-{       
+{
 gdk_draw_pixmap(widget->window, widget->style->fg_gc[GTK_WIDGET_STATE(widget)],
                 GLOBALS->mo_pixmap_mouseover_c_1,
                 event->area.x, event->area.y,
@@ -285,12 +285,12 @@ if(!GLOBALS->mo_black_mouseover_c_1)   GLOBALS->mo_black_mouseover_c_1   = alloc
 
 gdk_draw_rectangle(GLOBALS->mo_pixmap_mouseover_c_1, GLOBALS->mo_dk_gray_mouseover_c_1,
 		TRUE,
-		0,0, 
+		0,0,
 		GLOBALS->mo_width_mouseover_c_1, GLOBALS->mo_height_mouseover_c_1);
 
 gdk_draw_rectangle(GLOBALS->mo_pixmap_mouseover_c_1, GLOBALS->mo_black_mouseover_c_1,
 		TRUE,
-		1,1, 
+		1,1,
 		GLOBALS->mo_width_mouseover_c_1-2, GLOBALS->mo_height_mouseover_c_1-2);
 
 gtkwave_signal_connect(GTK_OBJECT(GLOBALS->mo_area_mouseover_c_1), "expose_event",GTK_SIGNAL_FUNC(expose_event), NULL);
@@ -346,7 +346,7 @@ if(t && (tname = get_fullname(t)))
 		alternate_name = malloc_2(MOUSEOVER_BREAKSIZE + 1);
 		strcpy(alternate_name, "...");
 		strcpy(alternate_name + 3, flagged_name + name_charlen - (MOUSEOVER_BREAKSIZE - 3));
-	
+
 		nmaxlen=font_engine_string_measure(GLOBALS->wavefont, alternate_name);
 		}
 		else
@@ -416,12 +416,12 @@ if(!GLOBALS->mouseover_mouseover_c_1)
 
 gdk_draw_rectangle(GLOBALS->mo_pixmap_mouseover_c_1, GLOBALS->mo_dk_gray_mouseover_c_1,
 		TRUE,
-		0,0, 
+		0,0,
 		GLOBALS->mo_width_mouseover_c_1, GLOBALS->mo_height_mouseover_c_1);
 
 gdk_draw_rectangle(GLOBALS->mo_pixmap_mouseover_c_1, GLOBALS->mo_black_mouseover_c_1,
 		TRUE,
-		1,1, 
+		1,1,
 		GLOBALS->mo_width_mouseover_c_1-2, GLOBALS->mo_height_mouseover_c_1-2);
 
 font_engine_draw_string(GLOBALS->mo_pixmap_mouseover_c_1, GLOBALS->wavefont, GLOBALS->mo_dk_gray_mouseover_c_1, 4, fh + 2, alternate_name ? alternate_name : flagged_name);
diff --git a/src/pagebuttons.c b/src/pagebuttons.c
index dd4580e..129c86d 100644
--- a/src/pagebuttons.c
+++ b/src/pagebuttons.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2005.
  *
  * This program is free software; you can redistribute it and/or
@@ -76,7 +76,7 @@ service_right_page(GtkWidget *text, gpointer data)
 	{
 	GLOBALS->tims.timecache=GLOBALS->tims.start+ntfrac;
 	}
-        else 
+        else
 	{
 	GLOBALS->tims.timecache=GLOBALS->tims.last-ntinc+1;
     if(GLOBALS->tims.timecache<GLOBALS->tims.first)
@@ -111,7 +111,7 @@ pixmapwid1=gtk_pixmap_new(GLOBALS->prev_page_pixmap, GLOBALS->prev_page_mask);
 gtk_widget_show(pixmapwid1);
 pixmapwid2=gtk_pixmap_new(GLOBALS->next_page_pixmap, GLOBALS->next_page_mask);
 gtk_widget_show(pixmapwid2);
-   
+
 /* Create a table to hold the text widget and scrollbars */
 table = gtk_table_new (1, 1, FALSE);
 
@@ -119,7 +119,7 @@ main_vbox = gtk_vbox_new (FALSE, 1);
 gtk_container_border_width (GTK_CONTAINER (main_vbox), 1);
 gtk_container_add (GTK_CONTAINER (table), main_vbox);
 
-frame = gtk_frame_new ("Page "); 
+frame = gtk_frame_new ("Page ");
 gtk_box_pack_start (GTK_BOX (main_vbox), frame, TRUE, TRUE, 0);
 
 gtk_widget_show (frame);
@@ -149,4 +149,4 @@ gtk_container_add (GTK_CONTAINER (frame), table2);
 gtk_widget_show(table2);
 return(table);
 }
-   
+
diff --git a/src/pipeio.c b/src/pipeio.c
index d183628..1e150cb 100644
--- a/src/pipeio.c
+++ b/src/pipeio.c
@@ -128,7 +128,7 @@ if((pid=fork()))
 	{
 	dup2(filedes_w[0], 0);
 	dup2(filedes_r[1], 1);
-	
+
 	close(filedes_w[1]);
 	close(filedes_r[0]);
 
diff --git a/src/pipeio.h b/src/pipeio.h
index 846952c..5ccc003 100644
--- a/src/pipeio.h
+++ b/src/pipeio.h
@@ -50,6 +50,6 @@ pid_t pid;
 
 struct pipe_ctx *pipeio_create(char *execappname, char *arg);
 void pipeio_destroy(struct pipe_ctx *p);
-        
+
 #endif
 
diff --git a/src/pixmaps.c b/src/pixmaps.c
index d400c70..73f3a3f 100644
--- a/src/pixmaps.c
+++ b/src/pixmaps.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2012.
  *
  * This program is free software; you can redistribute it and/or
@@ -13,19 +13,19 @@
 
 #ifdef WAVE_USE_GTK2
 /* Apply GMASK to GPIX and return a GdkPixbuf with an alpha channel.  */
-/* this function from gtkutil.c in emacs                              */      
+/* this function from gtkutil.c in emacs                              */
 static GdkPixbuf *
 xg_get_pixbuf_from_pix_and_mask (GdkPixmap *gpix, GdkPixmap *gmask, GdkColormap *cmap)
 {
   int width, height;
   GdkPixbuf *icon_buf, *tmp_buf;
-      
+
   gdk_drawable_get_size (gpix, &width, &height);
   tmp_buf = gdk_pixbuf_get_from_drawable (NULL, gpix, cmap,
                                           0, 0, 0, 0, width, height);
   icon_buf = gdk_pixbuf_add_alpha (tmp_buf, FALSE, 0, 0, 0);
   g_object_unref (G_OBJECT (tmp_buf));
-          
+
   if (gmask)
     {
       GdkPixbuf *mask_buf = gdk_pixbuf_get_from_drawable (NULL,
@@ -42,26 +42,26 @@ xg_get_pixbuf_from_pix_and_mask (GdkPixmap *gpix, GdkPixmap *gmask, GdkColormap
       for (y = 0; y < height; ++y)
         {
           guchar *iconptr, *maskptr;
-          int x;  
- 
+          int x;
+
           iconptr = pixels + y * rowstride;
           maskptr = mask_pixels + y * mask_rowstride;
-          
+
           for (x = 0; x < width; ++x)
             {
               /* In a bitmap, RGB is either 255/255/255 or 0/0/0.  Checking
                  just R is sufficient.  */
               if (maskptr[0] == 0)
                 iconptr[3] = 0; /* 0, 1, 2 is R, G, B.  3 is alpha.  */
-                
+
               iconptr += rowstride/width;
               maskptr += mask_rowstride/width;
             }
         }
-         
+
       g_object_unref (G_OBJECT (mask_buf));
     }
-     
+
   return(icon_buf);
 }
 #endif
diff --git a/src/pixmaps.h b/src/pixmaps.h
index f483062..ec525e5 100644
--- a/src/pixmaps.h
+++ b/src/pixmaps.h
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2011.
  *
  * This program is free software; you can redistribute it and/or
diff --git a/src/print.c b/src/print.c
index 51ae6a8..47cdf9f 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1,19 +1,19 @@
 /*
- * Copyright (c) Tony Bybell 1999-2012. 
+ * Copyright (c) Tony Bybell 1999-2012.
  *
  * This program is free software; you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free
  * Software Foundation; either version 2 of the License, or (at your option)
- * any later version. 
+ * any later version.
  */
 
 /*
  * This module has been re-implemented by Udi Finkelstein. Since it is no
- * longer a PostScript-only module, it had been renamed "print.c". 
+ * longer a PostScript-only module, it had been renamed "print.c".
  *
  * Much of the code has been "C++"-ized in style, yet written in C. We use
  * classes, virtual functions, class members, and "this" pointers written in
- * C. 
+ * C.
  */
 
 
@@ -43,7 +43,7 @@
 					 * pixel->ps scale mapping  */
 
 
-/* 
+/*
  * PostScript device specific operations
  */
 gtk_print_device ps_print_device = {
@@ -126,7 +126,7 @@ pr_draw_string (pr_context * prc, int x, int y, char *str, int xsize,
  *************************************************************************/
 
 /*
- * Set current gray level, with 0.0 being white, and 1.0 being black. 
+ * Set current gray level, with 0.0 being white, and 1.0 being black.
  */
 void
 ps_setgray (pr_context * prc, gdouble gray)
@@ -135,7 +135,7 @@ ps_setgray (pr_context * prc, gdouble gray)
 }
 
 /*
- * Create a rectangular path 
+ * Create a rectangular path
  */
 void
 ps_box (pr_context * prc, gdouble t_x1, gdouble t_y1, gdouble tx2, gdouble ty2)
@@ -144,7 +144,7 @@ ps_box (pr_context * prc, gdouble t_x1, gdouble t_y1, gdouble tx2, gdouble ty2)
 }
 
 /*
- * Draw a box 
+ * Draw a box
  */
 void
 ps_draw_box (pr_context * prc, gdouble _x1, gdouble _y1, gdouble x2, gdouble y2)
@@ -300,7 +300,7 @@ ps_trailer (pr_context * prc)
  *************************************************************************/
 
 /*
- * Generic maint functions missing in gcc 
+ * Generic maint functions missing in gcc
  */
 #ifndef _MSC_VER
 static gdouble
@@ -318,7 +318,7 @@ mindbl (gdouble a, gdouble b)
 
 
 /*
- * Set current gray level, with 0.0 being white, and 1.0 being black. 
+ * Set current gray level, with 0.0 being white, and 1.0 being black.
  */
 void
 mif_setgray (pr_context * prc, gdouble gray)
@@ -327,7 +327,7 @@ mif_setgray (pr_context * prc, gdouble gray)
 }
 
 /*
- * Set current gray level, with 0.0 being white, and 1.0 being black. 
+ * Set current gray level, with 0.0 being white, and 1.0 being black.
  */
 void
 mif_translate (pr_context * prc, gdouble x, gdouble y)
@@ -337,7 +337,7 @@ mif_translate (pr_context * prc, gdouble x, gdouble y)
 }
 
 /*
- * Draw an empty box 
+ * Draw an empty box
  */
 void
 mif_box (pr_context * prc, gdouble _x1, gdouble _y1, gdouble x2, gdouble y2)
@@ -360,7 +360,7 @@ mif_box (pr_context * prc, gdouble _x1, gdouble _y1, gdouble x2, gdouble y2)
 }
 
 /*
- * Draw a filled box 
+ * Draw a filled box
  */
 
 void
@@ -535,7 +535,7 @@ mif_trailer (pr_context * prc)
 /**********************************************/
 
 /*
- * Initialize print related constants 
+ * Initialize print related constants
  */
 static void
 pr_wave_init (pr_context * prc)
@@ -611,10 +611,10 @@ ps_MaxSignalLength (void)
 
   for (i = 0; (i < num_traces_displayable) && (t); i++)
     {
-    char *subname = NULL;  
+    char *subname = NULL;
     bv = NULL;
-    tscan = NULL;  
-                      
+    tscan = NULL;
+
   if(t->flags & (TR_BLANK|TR_ANALOG_BLANK_STRETCH))  /* seek to real xact trace if present... */
         {
         int bcnt = 0;
@@ -637,7 +637,7 @@ ps_MaxSignalLength (void)
                         bcnt++; /* bcnt is number of blank traces */
                         }
                 }
-           
+
         if((tscan)&&(tscan->vector))
                 {
                 bv = tscan->n.vec;
@@ -653,7 +653,7 @@ ps_MaxSignalLength (void)
                         }
                 }
         }
-                        
+
     populateBuffer(t, subname, buf);
 
       if (!bv && (t->flags & (TR_BLANK | TR_ANALOG_BLANK_STRETCH))) /* for "comment" style blank traces */
@@ -748,7 +748,7 @@ ps_MaxSignalLength (void)
 		      if (!t->n.nd->extvals)
 			{
 			  unsigned char h_val = h_ptr->v.h_val;
-			
+
  			  if(t->n.nd->vartype == ND_VCD_EVENT)
 				{
 				h_val = (h_ptr->time >= GLOBALS->tims.first) && ((GLOBALS->tims.marker-GLOBALS->shift_timebase) == h_ptr->time) ? AN_1 : AN_0; /* generate impulse */
@@ -879,7 +879,7 @@ pr_renderhash (pr_context * prc, int x, TimeType tim)
                 timearray_encountered = 1;
                 break;
                 }
-        }       
+        }
 
   pr_setgray (prc, 0.75);
 
@@ -953,7 +953,7 @@ pr_renderblackout (pr_context * prc)
 
 	      lclip -= lhs;
 	      rclip -= lhs;
-              if(rclip>((GLOBALS->wavewidth+1)*GLOBALS->nspx)) 
+              if(rclip>((GLOBALS->wavewidth+1)*GLOBALS->nspx))
                 rclip = (GLOBALS->wavewidth+1)*(GLOBALS->nspx);
 
 	      pr_setgray (prc, 0.80);
@@ -978,7 +978,7 @@ pr_rendertimes (pr_context * prc)
   int x, len, lenhalf;
   char timebuff[32];
   gdouble realx;
-  int s_ctx_iter;  
+  int s_ctx_iter;
   int timearray_encountered = 0;
 
   pr_renderblackout (prc);
@@ -1118,7 +1118,7 @@ if(GLOBALS->ruler_step && !timearray_encountered)
 		}
 		else
 		{
-                timebuff[0] = 0;   
+                timebuff[0] = 0;
 		}
 	}
       else
@@ -1291,7 +1291,7 @@ pr_draw_marker (pr_context * prc)
 
 /*
  * draw single traces and use this for rendering the grid lines for
- * "excluded" traces 
+ * "excluded" traces
  */
 static void
 pr_draw_hptr_trace (pr_context * prc, Trptr t, hptr h, int which, int dodraw,
@@ -1544,7 +1544,7 @@ pr_draw_hptr_trace (pr_context * prc, Trptr t, hptr h, int which, int dodraw,
 
 
 /*
- * draw hptr vectors (integer+real) 
+ * draw hptr vectors (integer+real)
  */
 static void
 pr_draw_hptr_trace_vector_analog (pr_context * prc, Trptr t, hptr h,
@@ -1573,7 +1573,7 @@ pr_draw_hptr_trace_vector_analog (pr_context * prc, Trptr t, hptr h,
   yu = (_y0 + _y1) / 2;
   /* ytext = yu - (GLOBALS->wavefont->ascent / 2) + GLOBALS->wavefont->ascent; */ /* scan-build */
 
-  /* scan-build : unused 
+  /* scan-build : unused
   ysiz = GLOBALS->wavefont->ascent - 1;
   if (ysiz < 1)
     ysiz = 1;
@@ -1882,7 +1882,7 @@ pr_draw_hptr_trace_vector_analog (pr_context * prc, Trptr t, hptr h,
 
 if(yt0 < _y1) yt0 = _y1;
 else if(yt0 > _y0) yt0 = _y0;
-                        
+
 if(yt1 < _y1) yt1 = _y1;
 else if(yt1 > _y0) yt1 = _y0;
 
@@ -1902,12 +1902,12 @@ else { coords[2] = _x1; }
 coords[1] = yt0;
 coords[3] = yt1;
 
-                                
-rect[0] = -10;   
+
+rect[0] = -10;
 rect[1] = _y1;
 rect[2] = GLOBALS->wavewidth + 10;
-rect[3] = _y0c;          
-                                
+rect[3] = _y0c;
+
 if((t->flags & (TR_ANALOG_INTERPOLATED|TR_ANALOG_STEP)) != TR_ANALOG_STEP)
         {
         line_in_range = wave_lineclip(coords, rect);
@@ -2148,19 +2148,19 @@ pr_draw_hptr_trace_vector (pr_context * prc, Trptr t, hptr h, int which)
         else
         {
         /* s\000 ID is special "z" case */
-        type = AN_0;         
+        type = AN_0;
 
-        if(h->flags&HIST_STRING)                 
+        if(h->flags&HIST_STRING)
                 {
                 if(h->v.h_vector)
                         {
                         if(!h->v.h_vector[0])
                                 {
-                                type = AN_Z;                  
+                                type = AN_Z;
                                 }
                         else
                                 {
-                                if(!strcmp(h->v.h_vector, "UNDEF")) 
+                                if(!strcmp(h->v.h_vector, "UNDEF"))
                                         {
                                         type = AN_X;
                                         }
@@ -2170,8 +2170,8 @@ pr_draw_hptr_trace_vector (pr_context * prc, Trptr t, hptr h, int which)
                         {
                         type = AN_X;
                         }
-                }   
-        }       
+                }
+        }
       /* type = !(h->flags & (HIST_REAL | HIST_STRING))) ? vtype (t, h->v.h_vector) : AN_0; */
       if (_x0 > -1)
 	{
@@ -2330,7 +2330,7 @@ pr_draw_hptr_trace_vector (pr_context * prc, Trptr t, hptr h, int which)
 
 
 /*
- * draw vector traces 
+ * draw vector traces
  */
 static void
 pr_draw_vptr_trace_analog (pr_context * prc, Trptr t, vptr v, int which,
@@ -2595,7 +2595,7 @@ pr_draw_vptr_trace_analog (pr_context * prc, Trptr t, vptr v, int which,
 	{
           if(_x0==_x1)
                 {
-                skipcnt++; 
+                skipcnt++;
                 }
                 else
                 {
@@ -2617,7 +2617,7 @@ pr_draw_vptr_trace_analog (pr_context * prc, Trptr t, vptr v, int which,
 
 if(yt0 < _y1) yt0 = _y1;
 else if(yt0 > _y0) yt0 = _y0;
-                        
+
 if(yt1 < _y1) yt1 = _y1;
 else if(yt1 > _y0) yt1 = _y0;
 
@@ -2637,12 +2637,12 @@ else { coords[2] = _x1; }
 coords[1] = yt0;
 coords[3] = yt1;
 
-                                
-rect[0] = -10;   
+
+rect[0] = -10;
 rect[1] = _y1;
 rect[2] = GLOBALS->wavewidth + 10;
-rect[3] = _y0c;          
-                                
+rect[3] = _y0c;
+
 if((t->flags & (TR_ANALOG_INTERPOLATED|TR_ANALOG_STEP)) != TR_ANALOG_STEP)
         {
         line_in_range = wave_lineclip(coords, rect);
@@ -3099,7 +3099,7 @@ pr_rendertraces (pr_context * prc)
                         	{
                                 tn = GiveNextTrace(t);
                                 bv = bv->transaction_chain;
-        
+
                                 if(bv && tn && (tn->flags & (TR_BLANK|TR_ANALOG_BLANK_STRETCH)))
                                 	{
                                         i++;
@@ -3150,10 +3150,10 @@ pr_RenderSig (pr_context * prc, Trptr t, int i)
   int texty, liney;
   int retval;
   char buf[2048];
-  char *subname = NULL;  
-                        
+  char *subname = NULL;
+
   buf[0] = 0;
-                 
+
   if(t->flags & (TR_BLANK|TR_ANALOG_BLANK_STRETCH))  /* seek to real xact trace if present... */
         {
         Trptr tscan = t;
@@ -3192,7 +3192,7 @@ pr_RenderSig (pr_context * prc, Trptr t, int i)
                         }
                 }
         }
-                         
+
   populateBuffer(t, subname, buf);
 
   UpdateSigValue (t);		/* in case it's stale on nonprop */
diff --git a/src/print.h b/src/print.h
index 56df40d..0684d62 100644
--- a/src/print.h
+++ b/src/print.h
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999.
  *
  * This program is free software; you can redistribute it and/or
diff --git a/src/ptranslate.c b/src/ptranslate.c
index 1eef012..1187616 100644
--- a/src/ptranslate.c
+++ b/src/ptranslate.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 2005-2009.
  *
  * This program is free software; you can redistribute it and/or
@@ -52,7 +52,7 @@ for(j=0;j<GLOBALS->num_notebook_pages;j++)
 				pipeio_destroy(GLOBALS->proc_filter[i]);
 				GLOBALS->proc_filter[i] = NULL;
 				}
-	
+
 			if(GLOBALS->procsel_filter[i])
 				{
 				free_2(GLOBALS->procsel_filter[i]);
@@ -110,7 +110,7 @@ static void load_proc_filter(int which, char *name)
 
   /* if name has arguments grab only the first word (the name of the executable)*/
   sscanf(name, "%s ", exec_name);
-  
+
   arg = name + strlen(exec_name);
 
   /* remove leading spaces from argument */
@@ -167,7 +167,7 @@ if((which<0)||(which>=(PROC_FILTER_MAX+1)))
         which = 0;
         }
 
-if(GLOBALS->traces.first)  
+if(GLOBALS->traces.first)
         {
         Trptr t = GLOBALS->traces.first;
         while(t)
@@ -245,7 +245,7 @@ if(*GLOBALS->fileselbox_text)
 		{
 		if(GLOBALS->procsel_filter[i])
 			{
-			if(!strcmp(GLOBALS->procsel_filter[i], *GLOBALS->fileselbox_text)) 
+			if(!strcmp(GLOBALS->procsel_filter[i], *GLOBALS->fileselbox_text))
 				{
 				status_text("Filter already imported.\n");
 				if(GLOBALS->is_active_ptranslate_c_2) gdk_window_raise(GLOBALS->window_ptranslate_c_5->window);
@@ -304,7 +304,7 @@ void ptrans_searchbox(char *title)
     GtkWidget *table;
     GtkTooltips *tooltips;
 
-    if(GLOBALS->is_active_ptranslate_c_2) 
+    if(GLOBALS->is_active_ptranslate_c_2)
 	{
 	gdk_window_raise(GLOBALS->window_ptranslate_c_5->window);
 	return;
@@ -339,7 +339,7 @@ void ptrans_searchbox(char *title)
                         GTK_FILL | GTK_EXPAND | GTK_SHRINK, 1, 1);
 
     GLOBALS->clist_ptranslate_c_2=gtk_clist_new_with_titles(1,titles);
-    gtk_clist_column_titles_passive(GTK_CLIST(GLOBALS->clist_ptranslate_c_2)); 
+    gtk_clist_column_titles_passive(GTK_CLIST(GLOBALS->clist_ptranslate_c_2));
 
     gtk_clist_set_selection_mode(GTK_CLIST(GLOBALS->clist_ptranslate_c_2), GTK_SELECTION_EXTENDED);
     gtkwave_signal_connect_object (GTK_OBJECT (GLOBALS->clist_ptranslate_c_2), "select_row",GTK_SIGNAL_FUNC(select_row_callback),NULL);
@@ -381,7 +381,7 @@ void ptrans_searchbox(char *title)
     gtk_container_border_width (GTK_CONTAINER (button6), 3);
     gtkwave_signal_connect_object (GTK_OBJECT (button6), "clicked",GTK_SIGNAL_FUNC(add_filter_callback),GTK_OBJECT (GLOBALS->window_ptranslate_c_5));
     gtk_widget_show (button6);
-    gtk_tooltips_set_tip_2(tooltips, button6, 
+    gtk_tooltips_set_tip_2(tooltips, button6,
 		"Bring up a file requester to add a process filter to the filter select window.",NULL);
 
     gtk_box_pack_start (GTK_BOX (hbox0), button6, TRUE, FALSE, 0);
@@ -402,7 +402,7 @@ void ptrans_searchbox(char *title)
     gtk_container_border_width (GTK_CONTAINER (button1), 3);
     gtkwave_signal_connect_object (GTK_OBJECT (button1), "clicked",GTK_SIGNAL_FUNC(ok_callback),GTK_OBJECT (GLOBALS->window_ptranslate_c_5));
     gtk_widget_show (button1);
-    gtk_tooltips_set_tip_2(tooltips, button1, 
+    gtk_tooltips_set_tip_2(tooltips, button1,
 		"Add selected signals to end of the display on the main window.",NULL);
 
     gtk_box_pack_start (GTK_BOX (hbox), button1, TRUE, FALSE, 0);
@@ -410,7 +410,7 @@ void ptrans_searchbox(char *title)
     button5 = gtk_button_new_with_label (" Cancel ");
     gtk_container_border_width (GTK_CONTAINER (button5), 3);
     gtkwave_signal_connect_object (GTK_OBJECT (button5), "clicked",GTK_SIGNAL_FUNC(destroy_callback),GTK_OBJECT (GLOBALS->window_ptranslate_c_5));
-    gtk_tooltips_set_tip_2(tooltips, button5, 
+    gtk_tooltips_set_tip_2(tooltips, button5,
 		"Do nothing and return to the main window.",NULL);
     gtk_widget_show (button5);
     gtk_box_pack_start (GTK_BOX (hbox), button5, TRUE, FALSE, 0);
@@ -432,7 +432,7 @@ int i;
 
 for(i=1;i<GLOBALS->num_proc_filters+1;i++)
 	{
-	if(!strcmp(GLOBALS->procsel_filter[i], name)) { GLOBALS->current_translate_proc = i; return; } 
+	if(!strcmp(GLOBALS->procsel_filter[i], name)) { GLOBALS->current_translate_proc = i; return; }
 	}
 
 if(GLOBALS->num_proc_filters < PROC_FILTER_MAX)
diff --git a/src/ptranslate.h b/src/ptranslate.h
index 1a19402..f229b0a 100644
--- a/src/ptranslate.h
+++ b/src/ptranslate.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) Tony Bybell 2005.     
+ * Copyright (c) Tony Bybell 2005.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
diff --git a/src/rc.c b/src/rc.c
index 691d123..74cd258 100644
--- a/src/rc.c
+++ b/src/rc.c
@@ -194,7 +194,7 @@ return(0);
 
 int f_editor(char *str)
 {
-char *path, *pathend; 
+char *path, *pathend;
 
 DEBUG(printf("f_editor(\"%s\")\n",str));
 
diff --git a/src/rc.h b/src/rc.h
index 14b5600..db408c9 100644
--- a/src/rc.h
+++ b/src/rc.h
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2009.
  *
  * This program is free software; you can redistribute it and/or
diff --git a/src/regex.c b/src/regex.c
index 62c2e19..bdf398d 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -38,8 +38,8 @@
 #include "gnu_regex.c"
 #else			/* or for any other compiler that doesn't support POSIX.2 regexs properly like xlc or vc++ */
 #ifdef _MSC_VER
-#include <malloc.h> 
-#define STDC_HEADERS  
+#include <malloc.h>
+#define STDC_HEADERS
 #define alloca _alloca  /* AIX doesn't like this */
 #endif
 #define REGEX_MAY_COMPILE
@@ -117,7 +117,7 @@ return((rc)?0:1);
 }
 
 
-/* 
+/*
  * free it
  */
 void wave_regex_alloc_free(void *pnt)
diff --git a/src/renderopt.c b/src/renderopt.c
index 411f726..17ef18d 100644
--- a/src/renderopt.c
+++ b/src/renderopt.c
@@ -80,7 +80,7 @@ FILE *wave;
 if(GLOBALS->filesel_ok)
         {
         DEBUG(printf("PS Print Fini: %s\n", *GLOBALS->fileselbox_text));
-                
+
         if(!(wave=fopen(*GLOBALS->fileselbox_text,"wb")))
                 {
                 fprintf(stderr, "Error opening PS output file '%s' for writing.\n",*GLOBALS->fileselbox_text);
@@ -92,7 +92,7 @@ if(GLOBALS->filesel_ok)
                 print_ps_image(wave,px[GLOBALS->page_size_type_renderopt_c_1],py[GLOBALS->page_size_type_renderopt_c_1]);
                 fclose(wave);
                 }
-        }  
+        }
 }
 
 static void
@@ -104,7 +104,7 @@ FILE *wave2;
 if(GLOBALS->filesel_ok)
         {
         DEBUG(printf("PDF Print Fini: %s\n", *GLOBALS->fileselbox_text));
-                
+
         if(!(wave=fopen(*GLOBALS->fileselbox_text,"wb")))
                 {
                 fprintf(stderr, "Error opening PDF output file '%s' for writing.\n",*GLOBALS->fileselbox_text);
@@ -126,18 +126,18 @@ if(GLOBALS->filesel_ok)
 #endif
 		strcpy(zname+len, ".ps");
 
-		if(!(wave2=fopen(zname,"wb")))		
+		if(!(wave2=fopen(zname,"wb")))
 			{
 	                fprintf(stderr, "Error opening PS output tempfile '%s' for writing.\n",zname);
 	                perror("Why");
 			fclose(wave);
-			unlink(*GLOBALS->fileselbox_text);			
+			unlink(*GLOBALS->fileselbox_text);
 	                errno=0;
 			}
 			else
 			{
 			char *sysname = malloc_2(7 + 1 + len + 3 + 1 + len + 1);
-			int rc;	
+			int rc;
 
 #ifdef MAC_INTEGRATION
 			sprintf(sysname, "pstopdf"	/* 7 */
@@ -164,7 +164,7 @@ if(GLOBALS->filesel_ok)
 
 		free_2(zname);
                 }
-        }  
+        }
 }
 
 static void
@@ -175,7 +175,7 @@ FILE *wave;
 if(GLOBALS->filesel_ok)
         {
         DEBUG(printf("MIF Print Fini: %s\n", *GLOBALS->fileselbox_text));
-                
+
         if(!(wave=fopen(*GLOBALS->fileselbox_text,"wb")))
                 {
                 fprintf(stderr, "Error opening MIF output file '%s' for writing.\n",*GLOBALS->fileselbox_text);
@@ -187,7 +187,7 @@ if(GLOBALS->filesel_ok)
 		print_mif_image(wave,px[GLOBALS->page_size_type_renderopt_c_1],py[GLOBALS->page_size_type_renderopt_c_1]);
                 fclose(wave);
                 }
-        }  
+        }
 }
 
 
@@ -217,7 +217,7 @@ gint gd_rc;
 if(GLOBALS->gprs) { gtk_print_unix_dialog_set_settings(GTK_PRINT_UNIX_DIALOG(ropt), GLOBALS->gprs); }
 if(GLOBALS->gps) { gtk_print_unix_dialog_set_page_setup(GTK_PRINT_UNIX_DIALOG(ropt), GLOBALS->gps); }
 
-gtk_print_unix_dialog_set_manual_capabilities(GTK_PRINT_UNIX_DIALOG(ropt), 
+gtk_print_unix_dialog_set_manual_capabilities(GTK_PRINT_UNIX_DIALOG(ropt),
 	GTK_PRINT_CAPABILITY_GENERATE_PS |
 	GTK_PRINT_CAPABILITY_COPIES
 	);
@@ -246,14 +246,14 @@ if(gd_rc == GTK_RESPONSE_OK)
 	       	if(!(wave=fopen(save_tmpfilename, "r+b")))
 	               	{
 	               	fprintf(stderr, "Error opening PS output file '%s' for writing.\n", save_tmpfilename);
-	               	perror("Why");   
-	               	errno=0;                
+	               	perror("Why");
+	               	errno=0;
 	               	}
-	               	else      
+	               	else
 	               	{
 			if(GLOBALS->gp_tfn) free_2(GLOBALS->gp_tfn);
 			GLOBALS->gp_tfn = strdup_2(save_tmpfilename);
-	
+
                 	print_ps_image(wave,px[GLOBALS->page_size_type_renderopt_c_1],py[GLOBALS->page_size_type_renderopt_c_1]);
 			fflush(wave);
 			fclose(wave);
@@ -262,7 +262,7 @@ if(gd_rc == GTK_RESPONSE_OK)
                                                         &job_error);
 			if(job_stat)
 				{
-				gtk_print_job_send(gpj, wave_GtkPrintJobCompleteFunc, 
+				gtk_print_job_send(gpj, wave_GtkPrintJobCompleteFunc,
 						GLOBALS->gp_tfn,
 						NULL);
 				GLOBALS->gprs = gtk_print_settings_copy(gprs);
@@ -282,7 +282,7 @@ if(gd_rc == GTK_RESPONSE_OK)
 		else
 		{
 		status_text("gtk_printer_accepts_ps() == FALSE, cannot print.");
-		}            
+		}
 	}
 else
 if(gd_rc == GTK_RESPONSE_APPLY)
@@ -335,7 +335,7 @@ static void destroy_callback(GtkWidget *widget, GtkWidget *nothing)
 void renderbox(char *title)
 {
     GtkWidget *menu, *menuitem, *optionmenu;
-    GSList *group; 
+    GSList *group;
     GtkWidget *vbox, *hbox, *small_hbox;
     GtkWidget *button1, *button2;
     int i;
@@ -376,7 +376,7 @@ void renderbox(char *title)
 			if(!strcmp(s2, page_size[i]))
 				{
 				fprintf(stderr, "GTKWAVE | Print using '%s'\n",  page_size[i]);
-				memset(GLOBALS->page_mutex_renderopt_c_1, 0, 5); GLOBALS->page_mutex_renderopt_c_1[i] = 1; 
+				memset(GLOBALS->page_mutex_renderopt_c_1, 0, 5); GLOBALS->page_mutex_renderopt_c_1[i] = 1;
 				GLOBALS->page_size_type_renderopt_c_1 = i;
 				break;
 				}
@@ -406,7 +406,7 @@ void renderbox(char *title)
 
 
 
-    if(GLOBALS->is_active_renderopt_c_3) 
+    if(GLOBALS->is_active_renderopt_c_3)
 	{
 	if(GLOBALS->window_renderopt_c_6)
 		{
@@ -422,7 +422,7 @@ void renderbox(char *title)
     install_focus_cb(GLOBALS->window_renderopt_c_6, ((char *)&GLOBALS->window_renderopt_c_6) - ((char *)GLOBALS));
 
     gtk_window_set_title(GTK_WINDOW (GLOBALS->window_renderopt_c_6), title);
-    gtk_widget_set_usize( GTK_WIDGET (GLOBALS->window_renderopt_c_6), 420, -1); 
+    gtk_widget_set_usize( GTK_WIDGET (GLOBALS->window_renderopt_c_6), 420, -1);
     gtkwave_signal_connect(GTK_OBJECT (GLOBALS->window_renderopt_c_6), "delete_event",(GtkSignalFunc) destroy_callback, NULL);
     gtk_window_set_policy(GTK_WINDOW(GLOBALS->window_renderopt_c_6), FALSE, FALSE, FALSE);
 
@@ -443,7 +443,7 @@ void renderbox(char *title)
 #ifndef WAVE_GTK_UNIX_PRINT
 	if(i==3)
 		{
-		break;		
+		break;
 		}
 #endif
 
diff --git a/src/savefile.c b/src/savefile.c
index e855233..7f3e0e2 100644
--- a/src/savefile.c
+++ b/src/savefile.c
@@ -199,7 +199,7 @@ void write_save_helper(const char *savnam, FILE *wave) {
 		if(GLOBALS->marker_names[i])
 			{
 			fprintf(wave, "[markername] %c%s\n", 'A'+i, GLOBALS->marker_names[i]);
-			}	
+			}
 		}
 
 	if(GLOBALS->ruler_step)
@@ -254,7 +254,7 @@ void write_save_helper(const char *savnam, FILE *wave) {
 			}
 		prevshift=t->shift;
 
-		if(!(t->flags&(TR_BLANK|TR_ANALOG_BLANK_STRETCH)))	
+		if(!(t->flags&(TR_BLANK|TR_ANALOG_BLANK_STRETCH)))
 			{
 			if(t->t_color)
 				{
@@ -324,7 +324,7 @@ void write_save_helper(const char *savnam, FILE *wave) {
 				bits = t->n.vec->bits;
 				ba = bits ? bits->attribs : NULL;
 
-				fprintf(wave,"%c{%s}", ba ? ':' : '#', 
+				fprintf(wave,"%c{%s}", ba ? ':' : '#',
 						t->n.vec->transaction_cache ? t->n.vec->transaction_cache->bvname : t->n.vec->bvname);
 
 				nodes=t->n.vec->bits->nodes;
@@ -409,7 +409,7 @@ void write_save_helper(const char *savnam, FILE *wave) {
 					{
 					fprintf(wave, "?%02x\n", (unsigned char)st->value);	/* else search type for this trace.. */
 					}
-			
+
 				t=st->trace;
 
 				if(t->flags!=def)
@@ -426,7 +426,7 @@ void write_save_helper(const char *savnam, FILE *wave) {
 					}
 				prevshift=t->shift;
 
-				if(!(t->flags&(TR_BLANK|TR_ANALOG_BLANK_STRETCH)))	
+				if(!(t->flags&(TR_BLANK|TR_ANALOG_BLANK_STRETCH)))
 					{
 					if(t->flags & TR_FTRANSLATED)
 						{
@@ -493,7 +493,7 @@ void write_save_helper(const char *savnam, FILE *wave) {
 						bits = t->n.vec->bits;
 						ba = bits ? bits->attribs : NULL;
 
-						fprintf(wave,"%c{%s}", ba ? ':' : '#', 
+						fprintf(wave,"%c{%s}", ba ? ':' : '#',
 							t->n.vec->transaction_cache ? t->n.vec->transaction_cache->bvname : t->n.vec->bvname);
 
 						nodes=t->n.vec->bits->nodes;
@@ -551,14 +551,14 @@ void write_save_helper(const char *savnam, FILE *wave) {
 				{
 				fprintf(wave, "!!\n");	/* mark end of strace region */
 				}
-		
+
 				swap_strace_contexts();
 			}
 			else
 			{
 			struct mprintf_buff_t *mt = GLOBALS->strace_ctx->mprintf_buff_head;
 
-			while(mt)	
+			while(mt)
 				{
 				fprintf(wave, "%s", mt->str);
 				mt=mt->next;
@@ -604,7 +604,7 @@ FILE *f;
 		if(fdf)
 			{
 	                f = fopen(fdf, "rb");
-	                if(f) 
+	                if(f)
 	                        {
 	                        rp = fdf;
 	                        fclose(f);
@@ -630,7 +630,7 @@ return(rp);
 }
 
 
-int read_save_helper(char *wname, char **dumpfile, char **savefile, off_t *dumpsiz, time_t *dumptim, int *opt_vcd) {  
+int read_save_helper(char *wname, char **dumpfile, char **savefile, off_t *dumpsiz, time_t *dumptim, int *opt_vcd) {
         FILE *wave;
         char *str = NULL;
         int wave_is_compressed;
@@ -649,21 +649,21 @@ int read_save_helper(char *wname, char **dumpfile, char **savefile, off_t *dumps
                 wave_is_compressed=~0;
                 }
                 else
-                {   
+                {
                 wave=fopen(wname,"rb");
                 wave_is_compressed=0;
                 }
 
 
-        if(!wave)  
-                {  
+        if(!wave)
+                {
                 fprintf(stderr, "Error opening save file '%s' for reading.\n", wname);
 		perror("Why");
 		errno=0;
                 }
                 else
                 {
-                char *iline;      
+                char *iline;
 		int s_ctx_iter;
 
 		if(extract_dumpfile_savefile_only)
@@ -691,12 +691,12 @@ int read_save_helper(char *wname, char **dumpfile, char **savefile, off_t *dumps
 						char *lhq = strchr(iline+16, '"');
 						char *rhq = strrchr(iline+16, '"');
 						memset(&tm, 0, sizeof(struct tm));
-						
+
 						*dumptim = -1;
 #if !defined _MSC_VER && !defined __MINGW32__
 						/* format is: "Fri Feb  4 15:50:48 2011" */
 						if(lhq && rhq && (lhq != rhq))
-							{						
+							{
 							int slen;
 							char *strp_buf;
 
@@ -704,7 +704,7 @@ int read_save_helper(char *wname, char **dumpfile, char **savefile, off_t *dumps
 							slen = strlen(lhq+1);
 							strp_buf = calloc_2(1, slen + 32); /* workaround: linux strptime seems to overshoot its buffer */
 							strcpy(strp_buf, lhq+1);
-							
+
 							if(strptime(strp_buf, "%a %b %d %H:%M:%S %Y", &tm) != NULL)
 								{
 								t = timegm(&tm);
@@ -785,13 +785,13 @@ int read_save_helper(char *wname, char **dumpfile, char **savefile, off_t *dumps
 		                wave=popen(str,"r");
 		                }
 		                else
-		                {   
+		                {
 				fclose(wave);
 		                wave=fopen(wname,"rb");
 		                }
 
-		        if(!wave)  
-		                {  
+		        if(!wave)
+		                {
 		                fprintf(stderr, "Error opening save file '%s' for reading.\n", wname);
 				perror("Why");
 				errno=0;
@@ -825,11 +825,11 @@ int read_save_helper(char *wname, char **dumpfile, char **savefile, off_t *dumps
 				if(GLOBALS->strace_ctx->shadow_straces)
 					{
 					GLOBALS->strace_ctx->shadow_active = 1;
-	
+
 					swap_strace_contexts();
 					strace_maketimetrace(1);
 					swap_strace_contexts();
-	
+
 					GLOBALS->strace_ctx->shadow_active = 0;
 					}
 				}
@@ -852,11 +852,11 @@ int read_save_helper(char *wname, char **dumpfile, char **savefile, off_t *dumps
 #ifdef MAC_INTEGRATION
 		if(GLOBALS->num_notebook_pages > 1)
 #endif
-			{		
+			{
 			if(!GLOBALS->block_xy_update)
 				{
 				int x, y;
-	
+
 				get_window_size(&x, &y);
 				set_window_size(x, y);
 				}
@@ -924,7 +924,7 @@ if(w)
 
 			mem = calloc_2(1, siz);
 			t = mem + sprintf(mem, "#%s[%d:%d] ", rname, msb, lsb);
-			
+
 			if(msb > lsb)
 				{
 				for(i = msb; i >= lsb; i--)
@@ -954,7 +954,7 @@ return(mem);
 /******************************************************************/
 
 /*
- * Parse a line of the wave file and act accordingly.. 
+ * Parse a line of the wave file and act accordingly..
  * Returns nonzero if trace(s) added.
  */
 int parsewavline(char *w, char *alias, int depth)
@@ -1052,12 +1052,12 @@ if(*w2=='*')
 		while(*w2==' ') w2++;
 		if(*w2==0) return(~0);
 
-		if(!which) 
-			{ 
-			sscanf(w2,"%f",&f); 
+		if(!which)
+			{
+			sscanf(w2,"%f",&f);
 			if((!GLOBALS->do_initial_zoom_fit)||(!GLOBALS->do_initial_zoom_fit_used))
 				{
-				GLOBALS->tims.zoom=(gdouble)f; 
+				GLOBALS->tims.zoom=(gdouble)f;
 				}
 			}
 		else
@@ -1066,8 +1066,8 @@ if(*w2=='*')
 		switch(which)
 			{
 			case 1:  GLOBALS->tims.marker=ttlocal; break;
-			default: 
-				if((which-2)<26) GLOBALS->named_markers[which-2]=ttlocal; 
+			default:
+				if((which-2)<26) GLOBALS->named_markers[which-2]=ttlocal;
 				break;
 			}
 		}
@@ -1118,7 +1118,7 @@ if(*w2=='+')
 		  if(suffix[i]==0) return(0);
 		  if((suffix[i]==')')&&(suffix[i+1])) {i++; break; }
 		}
-	      
+
 	      s=symfind(suffix+i, &rows);
 	      if (s) {
 		nexp = ExtractNodeSingleBit(&s->n[rows], atoi(suffix+1));
@@ -1131,8 +1131,8 @@ if(*w2=='+')
 		  {
 		    return(0);
 		  }
-	      }	
-	      else 
+	      }
+	      else
 		{
 		char *lp = strrchr(suffix+i, '[');
 		if(lp)
@@ -1163,7 +1163,7 @@ if(*w2=='+')
 				}
 
 			sprintf(ns, "%s[%d]", suffix+i, actual);
-			*lp = '[';			
+			*lp = '[';
 
 			s=symfind(ns, &rows);
 			free_2(ns);
@@ -1181,7 +1181,7 @@ if(*w2=='+')
 	  else
 	    {
 	      int rc;
-	      
+
 	      char *newl   = strdup_2(w2+strlen(prefix));
 	      char *nalias = strdup_2(prefix+1);
 
@@ -1215,7 +1215,7 @@ if((*w2=='#')||(*w2==':'))
 	while(1)
 		{
 		if(isspace((int)(unsigned char)*w2)) { w2++; continue; }
-		if(!(*w2)) return(0);	/* no more args */	
+		if(!(*w2)) return(0);	/* no more args */
 		break;			/* start grabbing chars from here */
 		}
 
@@ -1283,7 +1283,7 @@ if((*w2=='#')||(*w2==':'))
 				}
 			}
 		}
-	
+
 	return(v!=NULL);
 	}
 else
@@ -1326,7 +1326,7 @@ if(*w2=='!')
 			{
 			if (isupper((int)(unsigned char)ch) || ch=='@')
 				GLOBALS->strace_ctx->shadow_mark_idx_start = ch - '@';
-		
+
 			ch = *(w2+8);
 			if(ch != 0)
 				{
@@ -1351,7 +1351,7 @@ if(*w2=='?')
 
 		if(lens)
 			{
-			GLOBALS->strace_ctx->shadow_string = malloc_2(lens+1);		
+			GLOBALS->strace_ctx->shadow_string = malloc_2(lens+1);
 			strcpy(GLOBALS->strace_ctx->shadow_string, w2+2);
 			}
 
@@ -1360,7 +1360,7 @@ if(*w2=='?')
 		else
 		{
 		unsigned int hex;
-		sscanf(w2+1, "%x", &hex);	
+		sscanf(w2+1, "%x", &hex);
 		GLOBALS->strace_ctx->shadow_type = hex;
 		}
 
@@ -1380,7 +1380,7 @@ else if(*w2=='^')
 			if(fn)
 				{
 				while(*fn && isspace((int)(unsigned char)*fn)) fn++;
-				if(*fn && !isspace((int)(unsigned char)*fn)) 
+				if(*fn && !isspace((int)(unsigned char)*fn))
 					{
 					char *rp = get_relative_adjusted_name(GLOBALS->sfn, fn, GLOBALS->lcname);
 					set_current_translate_proc(rp ? rp : fn);
@@ -1401,7 +1401,7 @@ else if(*w2=='^')
 			if(fn)
 				{
 				while(*fn && isspace((int)(unsigned char)*fn)) fn++;
-				if(*fn && !isspace((int)(unsigned char)*fn)) 
+				if(*fn && !isspace((int)(unsigned char)*fn))
 					{
 					char *rp = get_relative_adjusted_name(GLOBALS->sfn, fn, GLOBALS->lcname);
 					set_current_translate_ttrans(rp ? rp : fn);
@@ -1420,7 +1420,7 @@ else if(*w2=='^')
 			if(fn)
 				{
 				while(*fn && isspace((int)(unsigned char)*fn)) fn++;
-				if(*fn && !isspace((int)(unsigned char)*fn)) 
+				if(*fn && !isspace((int)(unsigned char)*fn))
 					{
 					char *rp = get_relative_adjusted_name(GLOBALS->sfn, fn, GLOBALS->lcname);
 					set_current_translate_file(rp ? rp : fn);
@@ -1439,7 +1439,7 @@ else if (*w2 == '[')
 	break;
     if (!*w)
       return 0;
-    
+
     *w++ = 0;
     if (strcmp (w2, "size") == 0)
       {
@@ -1646,7 +1646,7 @@ else if (*w2 == '[')
 
 	if(GLOBALS->sfn)
 		{
-		free_2(GLOBALS->sfn); GLOBALS->sfn = NULL; 
+		free_2(GLOBALS->sfn); GLOBALS->sfn = NULL;
 		}
 
 	if((lhq) && (rhq) && (lhq != rhq)) /* no real need to check rhq != NULL*/
@@ -1662,7 +1662,7 @@ else if (*w2 == '[')
 
 	if(GLOBALS->ttranslate_args)
 		{
-		free_2(GLOBALS->ttranslate_args); GLOBALS->ttranslate_args = NULL; 
+		free_2(GLOBALS->ttranslate_args); GLOBALS->ttranslate_args = NULL;
 		}
 
 	if((lhq) && (rhq) && (lhq != rhq)) /* no real need to check rhq != NULL*/
@@ -1733,7 +1733,7 @@ int made = 0;
 pnt=str;
 while((ch=*pnt))
 	{
-	if(ch=='*') 
+	if(ch=='*')
 		{
 		wild_active=1;
 		break;
@@ -1843,7 +1843,7 @@ if(len)
 	pnt2=wild;
 	while((ch2=*pnt2))
 		{
-		if(ch2=='*') 
+		if(ch2=='*')
 			{
 			wild_active=1;
 			break;
@@ -1859,9 +1859,9 @@ if(len)
 			for(i=1;;i++)
 				{
 				if(wild[i]==0) break;
-				if((wild[i]==')')&&(wild[i+1])) 
+				if((wild[i]==')')&&(wild[i+1]))
 					{
-					i++; 
+					i++;
 					s=symfind(wild+i, NULL);
 					if(s)
 						{
@@ -1874,7 +1874,7 @@ if(len)
 			}
 			else
 			{
-			if((s=symfind(wild, NULL)))	
+			if((s=symfind(wild, NULL)))
 				{
 				lx2_set_fac_process_mask(s->n);
 				rc = 1;
@@ -1905,7 +1905,7 @@ return(rc);
 
 
 /*
- * Parse a line of the wave file and act accordingly.. 
+ * Parse a line of the wave file and act accordingly..
  * Returns nonzero if trace(s) added.
  */
 int parsewavline_lx2(char *w, char *alias, int depth)
@@ -2042,7 +2042,7 @@ if(*w2=='+')
 					{
 					msi = atoi(lp+1);
 					lsi = atoi(colon+1);
-	
+
 					if(lsi > msi)
 						{
 						actual = msi + bval;
@@ -2058,7 +2058,7 @@ if(*w2=='+')
 					}
 
 				sprintf(ns, "%s[%d]", suffix+i, actual);
-				*lp = '[';			
+				*lp = '[';
 
 				s=symfind(ns, NULL);
 				free_2(ns);
@@ -2104,7 +2104,7 @@ if((*w2=='#')||(*w2==':'))
 	while(1)
 		{
 		if(isspace((int)(unsigned char)*w2)) { w2++; continue; }
-		if(!(*w2)) return(0);	/* no more args */	
+		if(!(*w2)) return(0);	/* no more args */
 		break;			/* start grabbing chars from here */
 		}
 
@@ -2224,14 +2224,14 @@ char* GetRelativeFilename(char *currentDirectory, char *absoluteFilename, int *d
 
 	cdLen = strlen(currentDirectory);
 	afLen = strlen(absoluteFilename);
-	
+
 	/* make sure the names are not too long or too short */
-	if(cdLen > MAX_FILENAME_LEN || cdLen < ABSOLUTE_NAME_START+1 || 
+	if(cdLen > MAX_FILENAME_LEN || cdLen < ABSOLUTE_NAME_START+1 ||
 		afLen > MAX_FILENAME_LEN || afLen < ABSOLUTE_NAME_START+1)
 	{
 		return(NULL);
 	}
-	
+
 	/* Handle DOS names that are on different drives: */
 	if(currentDirectory[0] != absoluteFilename[0])
 	{
@@ -2306,7 +2306,7 @@ char* GetRelativeFilename(char *currentDirectory, char *absoluteFilename, int *d
 	{
 		return(NULL);
 	}
-	
+
 	/* add the appropriate number of "..\"s. */
 	rfMarker = 0;
 	*dotdot_levels = levels;
@@ -2382,7 +2382,7 @@ if(orig_save && orig_dump && this_save)
 			char *dup_this_save = strdup_2(this_save);
 			char *rhs_this_save_slash = strrchr(dup_this_save, SLASH);
 			char *p = dup_this_save;
-			int levels = 0;	
+			int levels = 0;
 
 			if(rhs_this_save_slash)
 				{
@@ -2401,10 +2401,10 @@ if(orig_save && orig_dump && this_save)
 					strcat(synth_nam, grf);
 					}
 				}
-	
+
 			free_2(dup_this_save);
 			}
-	
+
 		}
 
 	free_2(dup_orig_save);
@@ -2493,7 +2493,7 @@ if(lc && !is_working)
 					strcpy(dfn, old_dfn);
 					free_2(old_dfn);
 					}
-	
+
 				if(sfn)
 					{
 					char *old_sfn = sfn;
@@ -2508,12 +2508,12 @@ if(lc && !is_working)
 	              			{
 		                        char *can = realpath_2(lcname, NULL);
 		                        char *old_fdf = find_dumpfile(sfn, dfn, can);
-	
+
 		                        free(can);
 					fdf = wave_alloca(strlen(old_fdf)+1);
 					strcpy(fdf, old_fdf);
 					free_2(old_fdf);
-	
+
 		                       	f = fopen(fdf, "rb");
 		                        if(f)
 		                                {
@@ -2601,10 +2601,10 @@ gboolean deal_with_rpc_open_2(const gchar *path, gpointer user_data, gboolean is
 const char *suffixes[] =
 {
  ".vcd", ".evcd", ".dump",
- ".lxt", ".lxt2", ".lx2", 
- ".vzt", 
- ".fst", 
- ".ghw", 
+ ".lxt", ".lxt2", ".lx2",
+ ".vzt",
+ ".fst",
+ ".ghw",
 #ifdef EXTLOAD_SUFFIX
  EXTLOAD_SUFFIX,
 #endif
@@ -2675,14 +2675,14 @@ return(deal_with_rpc_open_2(path, user_data, FALSE));
  * block termination if in the middle of something important
  */
 gboolean deal_with_termination(GtkOSXApplication *app, gpointer user_data)
-{       
+{
 gboolean do_not_terminate = FALSE; /* future expansion */
-        
+
 if(do_not_terminate)
         {
         status_text("GTKWAVE | Busy, quit signal blocked.\n");
         }
-        
+
 return(do_not_terminate);
 }
 
diff --git a/src/search.c b/src/search.c
index c07b971..0d2032f 100644
--- a/src/search.c
+++ b/src/search.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2014.
  *
  * This program is free software; you can redistribute it and/or
@@ -8,7 +8,7 @@
  */
 
 
-/* AIX may need this for alloca to work */ 
+/* AIX may need this for alloca to work */
 #if defined _AIX
   #pragma alloca
 #endif
@@ -30,12 +30,12 @@ static gint
 clist_sigcmp (GtkCList      *clist,
                  gconstpointer  ptr1,
                  gconstpointer  ptr2)
-{  
+{
   char *text1 = NULL;
   char *text2 = NULL;
   int rc;
 
-  GtkCListRow *row1 = (GtkCListRow *) ptr1; 
+  GtkCListRow *row1 = (GtkCListRow *) ptr1;
   GtkCListRow *row2 = (GtkCListRow *) ptr2;
 
   switch (row1->cell[clist->sort_column].type)
@@ -49,7 +49,7 @@ clist_sigcmp (GtkCList      *clist,
     default:
       break;
     }
- 
+
   switch (row2->cell[clist->sort_column].type)
     {
     case GTK_CELL_TEXT:
@@ -61,10 +61,10 @@ clist_sigcmp (GtkCList      *clist,
     default:
       break;
     }
-     
+
   if (!text2)
     return (text1 != NULL);
-    
+
   if (!text1)
     return -1;
 
@@ -170,15 +170,15 @@ static char *regex_name[]={"WRange", "WStrand", "Range", "Strand", "None"};
 static void regex_clicked(GtkWidget *widget, gpointer which)
 {
 int i;
- 
+
 for(i=0;i<5;i++) GLOBALS->regex_mutex_search_c_1[i]=0;
 
 GLOBALS->regex_which_search_c_1=(int)((long)which);
 GLOBALS->regex_mutex_search_c_1[GLOBALS->regex_which_search_c_1] = 1; /* mark our choice */
 
-  
+
 DEBUG(printf("picked: %s\n", regex_name[GLOBALS->regex_which_search_c_1]));
-}  
+}
 
 /***************************************************************************/
 
@@ -188,7 +188,7 @@ DEBUG(printf("picked: %s\n", regex_name[GLOBALS->regex_which_search_c_1]));
 
 static void
 bundle_cleanup(GtkWidget *widget, gpointer data)
-{   
+{
 if(GLOBALS->entrybox_text_local_search_c_2)
 	{
 	char *efix;
@@ -212,7 +212,7 @@ MaxSignalLength();
 signalarea_configure_event(GLOBALS->signalarea, NULL);
 wavearea_configure_event(GLOBALS->wavearea, NULL);
 }
- 
+
 static void
 bundle_callback_generic(void)
 {
@@ -268,7 +268,7 @@ interval = (gfloat)(GLOBALS->num_rows_search_c_2/100.0);
 if(GLOBALS->is_lx2)
 	{
 	int pre_import=0;
-	
+
 	for(i=0;i<GLOBALS->num_rows_search_c_2;i++)
 		{
 		struct symbol *s, *t;
@@ -314,7 +314,7 @@ for(i=0;i<GLOBALS->num_rows_search_c_2;i++)
 	if(get_s_selected(s))
 		{
 		GLOBALS->pdata->value = i;
-		if(((int)(GLOBALS->pdata->value/interval))!=((int)(GLOBALS->pdata->oldvalue/interval)))		
+		if(((int)(GLOBALS->pdata->value/interval))!=((int)(GLOBALS->pdata->oldvalue/interval)))
 			{
 			gtk_progress_set_value (GTK_PROGRESS (GLOBALS->pdata->pbar), i);
 			gtkwave_main_iteration();
@@ -335,7 +335,7 @@ for(i=0;i<GLOBALS->num_rows_search_c_2;i++)
 				if(get_s_selected(t))
 					{
 					if(len) set_s_selected(t, 0);
-					symc_current=(struct symchain *)calloc_2(1,sizeof(struct symchain));	
+					symc_current=(struct symchain *)calloc_2(1,sizeof(struct symchain));
 					symc_current->next=symc;
 					symc_current->symbol=t;
 					symc=symc_current;
@@ -343,7 +343,7 @@ for(i=0;i<GLOBALS->num_rows_search_c_2;i++)
 				len++;
 				t=t->vec_chain;
 				}
-			if(len)add_vector_chain(s->vec_root, len);			
+			if(len)add_vector_chain(s->vec_root, len);
 			}
 		}
 	}
@@ -417,7 +417,7 @@ GLOBALS->pdata->oldvalue = -1.0;
 if(GLOBALS->is_lx2)
 	{
 	int pre_import=0;
-	
+
 	for(i=0;i<GLOBALS->num_rows_search_c_2;i++)
 		{
 		struct symbol *s, *t;
@@ -483,7 +483,7 @@ for(i=0;i<GLOBALS->num_rows_search_c_2;i++)
 				if(get_s_selected(t))
 					{
 					if(len) set_s_selected(t, 0);
-					symc_current=(struct symchain *)calloc_2(1,sizeof(struct symchain));	
+					symc_current=(struct symchain *)calloc_2(1,sizeof(struct symchain));
 					symc_current->next=symc;
 					symc_current->symbol=t;
 					symc=symc_current;
@@ -491,7 +491,7 @@ for(i=0;i<GLOBALS->num_rows_search_c_2;i++)
 				len++;
 				t=t->vec_chain;
 				}
-			if(len)add_vector_chain(s->vec_root, len);			
+			if(len)add_vector_chain(s->vec_root, len);
 			}
 		}
 	}
@@ -567,7 +567,7 @@ signalarea_configure_event(GLOBALS->signalarea, NULL);
 wavearea_configure_event(GLOBALS->wavearea, NULL);
 
 gtk_progress_set_value (GTK_PROGRESS (GLOBALS->pdata->pbar), 0.0);
-GLOBALS->pdata->oldvalue = -1.0;  
+GLOBALS->pdata->oldvalue = -1.0;
 
 set_window_idle(widget);
 wave_gtk_grab_remove(widget);
@@ -596,7 +596,7 @@ GLOBALS->pdata->oldvalue = -1.0;
 if(GLOBALS->is_lx2)
 	{
 	int pre_import=0;
-	
+
 	for(i=0;i<GLOBALS->num_rows_search_c_2;i++)
 		{
 		struct symbol *s, *t;
@@ -662,7 +662,7 @@ for(i=0;i<GLOBALS->num_rows_search_c_2;i++)
 				if(get_s_selected(t))
 					{
 					if(len) set_s_selected(t, 0);
-					symc_current=(struct symchain *)calloc_2(1,sizeof(struct symchain));	
+					symc_current=(struct symchain *)calloc_2(1,sizeof(struct symchain));
 					symc_current->next=symc;
 					symc_current->symbol=t;
 					symc=symc_current;
@@ -670,7 +670,7 @@ for(i=0;i<GLOBALS->num_rows_search_c_2;i++)
 				len++;
 				t=t->vec_chain;
 				}
-			if(len)add_vector_chain(s->vec_root, len);			
+			if(len)add_vector_chain(s->vec_root, len);
 			}
 		}
 	}
@@ -690,10 +690,10 @@ signalarea_configure_event(GLOBALS->signalarea, NULL);
 wavearea_configure_event(GLOBALS->wavearea, NULL);
 
 gtk_progress_set_value (GTK_PROGRESS (GLOBALS->pdata->pbar), 0.0);
-GLOBALS->pdata->oldvalue = -1.0; 
+GLOBALS->pdata->oldvalue = -1.0;
 
 set_window_idle(widget);
-wave_gtk_grab_remove(widget);   
+wave_gtk_grab_remove(widget);
 GLOBALS->is_append_running_search_c_1=0;
 }
 
@@ -778,7 +778,7 @@ for(i=0;i<GLOBALS->numfacs;i++)
 	int skiprow;
 
 	GLOBALS->pdata->value = i;
-	if(((int)(GLOBALS->pdata->value/interval))!=((int)(GLOBALS->pdata->oldvalue/interval)))		
+	if(((int)(GLOBALS->pdata->value/interval))!=((int)(GLOBALS->pdata->oldvalue/interval)))
 		{
 		gtk_progress_set_value (GTK_PROGRESS (GLOBALS->pdata->pbar), i);
 		gtkwave_main_iteration();
@@ -810,7 +810,7 @@ for(i=0;i<GLOBALS->numfacs;i++)
 			if(GLOBALS->autocoalesce)
 				{
 				if(GLOBALS->facs[i]->vec_root!=GLOBALS->facs[i]) continue;
-				
+
 				tmp2=makename_chain(GLOBALS->facs[i]);
 				s=(char *)malloc_2(strlen(tmp2)+4);
 				strcpy(s,"[] ");
@@ -828,9 +828,9 @@ for(i=0;i<GLOBALS->numfacs;i++)
 			free_2(s);
 			}
 
-		gtk_clist_set_row_data(cl, row,GLOBALS->facs[i]); 
+		gtk_clist_set_row_data(cl, row,GLOBALS->facs[i]);
 		GLOBALS->num_rows_search_c_2++;
-		if(GLOBALS->num_rows_search_c_2==WAVE_MAX_CLIST_LENGTH) 
+		if(GLOBALS->num_rows_search_c_2==WAVE_MAX_CLIST_LENGTH)
 			{
 			/* if(was_packed) { free_2(hfacname); } ...not needed with HIER_DEPACK_STATIC */
 			break;
@@ -842,8 +842,8 @@ for(i=0;i<GLOBALS->numfacs;i++)
 
 free_2(duplicate_row_buffer);
 
-if(depack_cnt) 
-	{ 
+if(depack_cnt)
+	{
 	gtk_clist_set_compare_func(cl, clist_sigcmp);
 	gtk_clist_sort (cl);
 	}
@@ -857,7 +857,7 @@ wave_gtk_grab_remove(widget);
 GLOBALS->is_searching_running_search_c_1=0;
 
 if(do_warning)
-if(GLOBALS->num_rows_search_c_2>=WAVE_MAX_CLIST_LENGTH) 
+if(GLOBALS->num_rows_search_c_2>=WAVE_MAX_CLIST_LENGTH)
 	{
 	char buf[256];
 	sprintf(buf, "Limiting results to first %d entries.", GLOBALS->num_rows_search_c_2);
@@ -912,7 +912,7 @@ void searchbox(char *title, GtkSignalFunc func)
     /* fix problem where ungrab doesn't occur if button pressed + simultaneous accelerator key occurs */
     if(GLOBALS->in_button_press_wavewindow_c_1) { gdk_pointer_ungrab(GDK_CURRENT_TIME); }
 
-    if(GLOBALS->is_active_search_c_4) 
+    if(GLOBALS->is_active_search_c_4)
 	{
 	gdk_window_raise(GLOBALS->window_search_c_7->window);
 	return;
@@ -963,7 +963,7 @@ void searchbox(char *title, GtkSignalFunc func)
     /* Allocate memory for the data that is used later */
     GLOBALS->pdata = calloc_2(1, sizeof(SearchProgressData) );
     GLOBALS->pdata->value = GLOBALS->pdata->oldvalue = 0.0;
-    /* Create a centering alignment object */  
+    /* Create a centering alignment object */
     align = gtk_alignment_new (0.5, 0.5, 0, 0);
     gtk_widget_show(align);
     /* Create a Adjustment object to hold the range of the
@@ -995,7 +995,7 @@ void searchbox(char *title, GtkSignalFunc func)
                         GTK_FILL | GTK_EXPAND | GTK_SHRINK, 1, 1);
 
     GLOBALS->clist_search_c_3=gtk_clist_new_with_titles(1,titles);
-    gtk_clist_column_titles_passive(GTK_CLIST(GLOBALS->clist_search_c_3)); 
+    gtk_clist_column_titles_passive(GTK_CLIST(GLOBALS->clist_search_c_3));
 
     gtk_clist_set_selection_mode(GTK_CLIST(GLOBALS->clist_search_c_3), GTK_SELECTION_EXTENDED);
     gtkwave_signal_connect_object (GTK_OBJECT (GLOBALS->clist_search_c_3), "select_row",GTK_SIGNAL_FUNC(select_row_callback),NULL);
@@ -1034,7 +1034,7 @@ void searchbox(char *title, GtkSignalFunc func)
     gtk_container_border_width (GTK_CONTAINER (button6), 3);
     gtkwave_signal_connect_object (GTK_OBJECT (button6), "clicked",GTK_SIGNAL_FUNC(select_all_callback),GTK_OBJECT (GLOBALS->window_search_c_7));
     gtk_widget_show (button6);
-    gtk_tooltips_set_tip_2(tooltips, button6, 
+    gtk_tooltips_set_tip_2(tooltips, button6,
 		"Highlight all signals listed in the match window.",NULL);
 
     gtk_box_pack_start (GTK_BOX (hbox0), button6, TRUE, FALSE, 0);
@@ -1046,7 +1046,7 @@ void searchbox(char *title, GtkSignalFunc func)
 
     small_hbox = gtk_hbox_new (TRUE, 0);
     gtk_widget_show (small_hbox);
-    
+
     for(i=0;i<5;i++)
         {
         GLOBALS->menuitem_search[i] = gtk_radio_menu_item_new_with_label (group, regex_name[i]);
@@ -1056,13 +1056,13 @@ void searchbox(char *title, GtkSignalFunc func)
         gtkwave_signal_connect(GTK_OBJECT (GLOBALS->menuitem_search[i]), "activate", GTK_SIGNAL_FUNC(regex_clicked), (void *)((long)i));
         GLOBALS->regex_mutex_search_c_1[i]=0;
         }
-    
+
         GLOBALS->regex_mutex_search_c_1[0]=1;     /* "range" */
-    
+
         optionmenu = gtk_option_menu_new ();
         gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu), menu);
         gtk_box_pack_start (GTK_BOX (small_hbox), optionmenu, TRUE, FALSE, 0);
-        gtk_widget_show (optionmenu);   
+        gtk_widget_show (optionmenu);
 	gtk_tooltips_set_tip_2(tooltips, optionmenu,
 		"You may "
 		"modify the search criteria by selecting ``Range'', ``Strand'', or ``None'' for suffix "
@@ -1072,7 +1072,7 @@ void searchbox(char *title, GtkSignalFunc func)
 		"(addr matches unit.freezeaddr[63:0] for ``Range'' but only unit.addr[63:0] for ``WRange'' since addr has to be on a word boundary.  "
 		"Note that when ``None'' "
 		"is selected, the search string may be located anywhere in the signal name.",NULL);
-    
+
         gtk_box_pack_start (GTK_BOX (hbox0), small_hbox, FALSE, FALSE, 0);
 
 
@@ -1080,7 +1080,7 @@ void searchbox(char *title, GtkSignalFunc func)
     gtk_container_border_width (GTK_CONTAINER (button7), 3);
     gtkwave_signal_connect_object (GTK_OBJECT (button7), "clicked",GTK_SIGNAL_FUNC(unselect_all_callback),GTK_OBJECT (GLOBALS->window_search_c_7));
     gtk_widget_show (button7);
-    gtk_tooltips_set_tip_2(tooltips, button7, 
+    gtk_tooltips_set_tip_2(tooltips, button7,
 		"Unhighlight all signals listed in the match window.",NULL);
     gtk_box_pack_start (GTK_BOX (hbox0), button7, TRUE, FALSE, 0);
 
@@ -1102,7 +1102,7 @@ void searchbox(char *title, GtkSignalFunc func)
     gtk_container_border_width (GTK_CONTAINER (button1), 3);
     gtkwave_signal_connect_object (GTK_OBJECT (button1), "clicked",GTK_SIGNAL_FUNC(ok_callback),GTK_OBJECT (GLOBALS->window_search_c_7));
     gtk_widget_show (button1);
-    gtk_tooltips_set_tip_2(tooltips, button1, 
+    gtk_tooltips_set_tip_2(tooltips, button1,
 		"Add selected signals to end of the display on the main window.",NULL);
 
     gtk_box_pack_start (GTK_BOX (hbox), button1, TRUE, FALSE, 0);
@@ -1111,7 +1111,7 @@ void searchbox(char *title, GtkSignalFunc func)
     gtk_container_border_width (GTK_CONTAINER (button2), 3);
     gtkwave_signal_connect_object (GTK_OBJECT (button2), "clicked",GTK_SIGNAL_FUNC(insert_callback),GTK_OBJECT (GLOBALS->window_search_c_7));
     gtk_widget_show (button2);
-    gtk_tooltips_set_tip_2(tooltips, button2, 
+    gtk_tooltips_set_tip_2(tooltips, button2,
 		"Add selected signals after last highlighted signal on the main window.",NULL);
     gtk_box_pack_start (GTK_BOX (hbox), button2, TRUE, FALSE, 0);
 
@@ -1121,7 +1121,7 @@ void searchbox(char *title, GtkSignalFunc func)
     	gtk_container_border_width (GTK_CONTAINER (button3), 3);
     	gtkwave_signal_connect_object (GTK_OBJECT (button3), "clicked",GTK_SIGNAL_FUNC(bundle_callback_up),GTK_OBJECT (GLOBALS->window_search_c_7));
     	gtk_widget_show (button3);
-    	gtk_tooltips_set_tip_2(tooltips, button3, 
+    	gtk_tooltips_set_tip_2(tooltips, button3,
 		"Bundle selected signals into a single bit vector with the topmost selected signal as the LSB and the lowest as the MSB.",NULL);
     	gtk_box_pack_start (GTK_BOX (hbox), button3, TRUE, FALSE, 0);
 
@@ -1129,7 +1129,7 @@ void searchbox(char *title, GtkSignalFunc func)
     	gtk_container_border_width (GTK_CONTAINER (button3a), 3);
     	gtkwave_signal_connect_object (GTK_OBJECT (button3a), "clicked",GTK_SIGNAL_FUNC(bundle_callback_down),GTK_OBJECT (GLOBALS->window_search_c_7));
     	gtk_widget_show (button3a);
-    	gtk_tooltips_set_tip_2(tooltips, button3a, 
+    	gtk_tooltips_set_tip_2(tooltips, button3a,
 		"Bundle selected signals into a single bit vector with the topmost selected signal as the MSB and the lowest as the LSB.",NULL);
 	gtk_box_pack_start (GTK_BOX (hbox), button3a, TRUE, FALSE, 0);
 	}
@@ -1138,14 +1138,14 @@ void searchbox(char *title, GtkSignalFunc func)
     gtk_container_border_width (GTK_CONTAINER (button4), 3);
     gtkwave_signal_connect_object (GTK_OBJECT (button4), "clicked",GTK_SIGNAL_FUNC(replace_callback),GTK_OBJECT (GLOBALS->window_search_c_7));
     gtk_widget_show (button4);
-    gtk_tooltips_set_tip_2(tooltips, button4, 
+    gtk_tooltips_set_tip_2(tooltips, button4,
 		"Replace highlighted signals on the main window with signals selected above.",NULL);
     gtk_box_pack_start (GTK_BOX (hbox), button4, TRUE, FALSE, 0);
 
     button5 = gtk_button_new_with_label (" Exit ");
     gtk_container_border_width (GTK_CONTAINER (button5), 3);
     gtkwave_signal_connect_object (GTK_OBJECT (button5), "clicked",GTK_SIGNAL_FUNC(destroy_callback),GTK_OBJECT (GLOBALS->window_search_c_7));
-    gtk_tooltips_set_tip_2(tooltips, button5, 
+    gtk_tooltips_set_tip_2(tooltips, button5,
 		"Do nothing and return to the main window.",NULL);
     gtk_widget_show (button5);
     gtk_box_pack_start (GTK_BOX (hbox), button5, TRUE, FALSE, 0);
diff --git a/src/shiftbuttons.c b/src/shiftbuttons.c
index 7f73281..e3a7e8f 100644
--- a/src/shiftbuttons.c
+++ b/src/shiftbuttons.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999.
  *
  * This program is free software; you can redistribute it and/or
@@ -79,7 +79,7 @@ if((hadj->value+inc)<GLOBALS->tims.last) hadj->value=hadj->value+inc;
 pageinc=(TimeType)(((gdouble)GLOBALS->wavewidth)*GLOBALS->nspx);
 
 if((GLOBALS->tims.start+ntinc)<(GLOBALS->tims.last-pageinc+1)) GLOBALS->tims.timecache=GLOBALS->tims.start+ntinc;
-	else 
+	else
 	{
 	GLOBALS->tims.timecache=GLOBALS->tims.last-pageinc+1;
 	if(GLOBALS->tims.timecache<GLOBALS->tims.first) GLOBALS->tims.timecache=GLOBALS->tims.first;
@@ -111,7 +111,7 @@ pixmapwid1=gtk_pixmap_new(GLOBALS->larrow_pixmap, GLOBALS->larrow_mask);
 gtk_widget_show(pixmapwid1);
 pixmapwid2=gtk_pixmap_new(GLOBALS->rarrow_pixmap, GLOBALS->rarrow_mask);
 gtk_widget_show(pixmapwid2);
-   
+
 /* Create a table to hold the text widget and scrollbars */
 table = gtk_table_new (1, 1, FALSE);
 
@@ -149,4 +149,4 @@ gtk_container_add (GTK_CONTAINER (frame), table2);
 gtk_widget_show(table2);
 return(table);
 }
-   
+
diff --git a/src/showchange.c b/src/showchange.c
index 77fe3be..f6bec61 100644
--- a/src/showchange.c
+++ b/src/showchange.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999.
  *
  * This program is free software; you can redistribute it and/or
@@ -119,7 +119,7 @@ void showchange(char *title, Trptr t, GtkSignalFunc func)
 
   /* fix problem where ungrab doesn't occur if button pressed + simultaneous accelerator key occurs */
   if(GLOBALS->in_button_press_wavewindow_c_1) { gdk_pointer_ungrab(GDK_CURRENT_TIME); }
-  
+
   GLOBALS->window_showchange_c_8 = gtk_window_new (GLOBALS->disable_window_manager ? GTK_WINDOW_POPUP : GTK_WINDOW_TOPLEVEL);
   install_focus_cb(GLOBALS->window_showchange_c_8, ((char *)&GLOBALS->window_showchange_c_8) - ((char *)GLOBALS));
 
@@ -262,6 +262,6 @@ void showchange(char *title, Trptr t, GtkSignalFunc func)
 
   gtk_container_add (GTK_CONTAINER (GLOBALS->window_showchange_c_8), main_vbox);
   gtk_widget_show (GLOBALS->window_showchange_c_8);
-  wave_gtk_grab_add(GLOBALS->window_showchange_c_8);  
+  wave_gtk_grab_add(GLOBALS->window_showchange_c_8);
 }
 
diff --git a/src/signalwindow.c b/src/signalwindow.c
index b9339ed..b52ade2 100644
--- a/src/signalwindow.c
+++ b/src/signalwindow.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2013.
  *
  * This program is free software; you can redistribute it and/or
@@ -22,12 +22,12 @@
  * complain about certain ops conflict with dnd...
  */
 void dnd_error(void)
-{ 
+{
 status_text("Can't perform that operation when waveform drag and drop is in progress!\n");
-}  
+}
 
 
-static void     
+static void
 service_hslider(GtkWidget *text, gpointer data)
 {
 GtkAdjustment *hadj;
@@ -42,7 +42,7 @@ if(GLOBALS->signalpixmap)
 
 	gdk_draw_rectangle(GLOBALS->signalpixmap, GLOBALS->gc.gc_mdgray, TRUE,
 	        0, -1, GLOBALS->signal_fill_width, GLOBALS->fontheight);
-	gdk_draw_line(GLOBALS->signalpixmap, GLOBALS->gc_white,  
+	gdk_draw_line(GLOBALS->signalpixmap, GLOBALS->gc_white,
 	        0, GLOBALS->fontheight-1, GLOBALS->signal_fill_width-1, GLOBALS->fontheight-1);
 	font_engine_draw_string(GLOBALS->signalpixmap, GLOBALS->signalfont,
 	        GLOBALS->gc_black, 3+xsrc, GLOBALS->fontheight-4, "Time");
@@ -67,7 +67,7 @@ void draw_signalarea_focus(void)
 {
 if(GLOBALS->signalarea_has_focus)
         {
-        gdk_draw_rectangle(GLOBALS->signalarea->window, GLOBALS->gc_black, FALSE, 0, 0, 
+        gdk_draw_rectangle(GLOBALS->signalarea->window, GLOBALS->gc_black, FALSE, 0, 0,
 		GLOBALS->signalarea->allocation.width-1, GLOBALS->signalarea->allocation.height-1);
 	}
 }
@@ -85,7 +85,7 @@ static void DNDBeginCB(
 
 GLOBALS->dnd_state = 1;
 }
- 
+
 /*
  *      DND "drag_end" handler, this is called when a drag and drop has
  *      completed. So this function is the last one to be called in
@@ -102,8 +102,8 @@ GdkModifierType state;
 Trptr t;
 int trwhich, trtarget;
 int must_update_screen = 0;
-        
-#ifdef WAVE_USE_GTK2    
+
+#ifdef WAVE_USE_GTK2
 gint xi, yi;
 #else
 GdkEventMotion event[1];
@@ -148,7 +148,7 @@ if(GLOBALS->std_dnd_tgt_on_signalarea || GLOBALS->std_dnd_tgt_on_wavearea)
 	while(t && t->t_next && IsGroupEnd(t->t_next) && IsCollapsed(t->t_next)) { /* added missing "t &&" because of possible while termination above */
 	  t = t->t_next;
 	}
-        
+
         GLOBALS->cachedtrace=t;
         if(GLOBALS->cachedtrace)
 		{
@@ -183,7 +183,7 @@ success:
 	        	{
 	                GLOBALS->cachedtrace->flags&=~TR_HIGHLIGHT;
 	                }
-   
+
 		GLOBALS->signalwindow_width_dirty=1;
                 MaxSignalLength();
                 signalarea_configure_event(GLOBALS->signalarea, NULL);
@@ -207,7 +207,7 @@ GLOBALS->standard_trace_dnd_degate = 1;
 }
 
 /*
- *	DND "drag_motion" handler, this is called whenever the 
+ *	DND "drag_motion" handler, this is called whenever the
  *	pointer is dragging over the target widget.
  */
 static gboolean DNDDragMotionCB(
@@ -277,8 +277,8 @@ if(GLOBALS->std_dnd_tgt_on_signalarea || GLOBALS->std_dnd_tgt_on_wavearea)
 	GdkModifierType state;
 	Trptr t;
 	int trwhich, trtarget;
-        
-	#ifdef WAVE_USE_GTK2    
+
+	#ifdef WAVE_USE_GTK2
 	gint xi, yi;
 	#else
 	GdkEventMotion event[1];
@@ -315,7 +315,7 @@ if(GLOBALS->std_dnd_tgt_on_signalarea || GLOBALS->std_dnd_tgt_on_wavearea)
 	                {
 	                break;
 	                }
-	        }       
+	        }
 
 	while(t && t->t_next && IsGroupEnd(t->t_next) && IsCollapsed(t->t_next)) {
 	  t = t->t_next;
@@ -354,7 +354,7 @@ if(GLOBALS->std_dnd_tgt_on_signalarea || GLOBALS->std_dnd_tgt_on_wavearea)
 		GLOBALS->dnd_cursor_timer = 1;
 		if((t)&&(which >= -1))
 			{
-			if(which >= GLOBALS->traces.total) { which = GLOBALS->traces.total-1; } 
+			if(which >= GLOBALS->traces.total) { which = GLOBALS->traces.total-1; }
 			ylin = ((which + 2) * GLOBALS->fontheight) - 2;
 
 		        gdk_draw_line(GLOBALS->signalpixmap, GLOBALS->gc_black,
@@ -401,7 +401,7 @@ if(!GLOBALS || !GLOBALS->filter_entry || !event)
 #ifdef MAC_INTEGRATION
 	return (GTK_WIDGET_HAS_FOCUS(GLOBALS->filter_entry));
 #else
-	return (GTK_WIDGET_HAS_FOCUS(GLOBALS->filter_entry) && 
+	return (GTK_WIDGET_HAS_FOCUS(GLOBALS->filter_entry) &&
 	  !(event->state & GDK_CONTROL_MASK) &&
 	  !(event->state & GDK_MOD1_MASK));
 #endif
@@ -421,7 +421,7 @@ gint rc = FALSE;
 int yscroll;
 
 #ifdef FOCUS_DEBUG_MSGS
-printf("focus: %d %08x %08x %08x\n", GTK_WIDGET_HAS_FOCUS(GLOBALS->signalarea_event_box), 
+printf("focus: %d %08x %08x %08x\n", GTK_WIDGET_HAS_FOCUS(GLOBALS->signalarea_event_box),
 	GLOBALS->signalarea_event_box, widget, data);
 #endif
 
@@ -492,7 +492,7 @@ if(GTK_WIDGET_HAS_FOCUS(GLOBALS->signalarea_event_box))
 					case GDK_Page_Down:
 					case GDK_KP_Page_Down:
 						yscroll = ((event->keyval == GDK_Page_Down) || (event->keyval == GDK_KP_Page_Down)) ? num_traces_displayable : 1;
-			                        target=((int)wadj->value)+yscroll;  
+			                        target=((int)wadj->value)+yscroll;
 			                        which=num_traces_displayable-1;
 
 			                        if(target+which>=(GLOBALS->traces.visible-1)) target=GLOBALS->traces.visible-which-1;
@@ -503,7 +503,7 @@ if(GTK_WIDGET_HAS_FOCUS(GLOBALS->signalarea_event_box))
                         			gtk_signal_emit_by_name (GTK_OBJECT (wadj), "changed"); /* force bar update */
                         			gtk_signal_emit_by_name (GTK_OBJECT (wadj), "value_changed"); /* force text update */
 						break;
-				
+
 					case GDK_Up:
 					case GDK_KP_Up:
 					case GDK_Page_Up:
@@ -512,7 +512,7 @@ if(GTK_WIDGET_HAS_FOCUS(GLOBALS->signalarea_event_box))
                         			target=((int)wadj->value)-yscroll;
                         			if(target<0) target=0;
                         			wadj->value=target;
-                         
+
 						which=0;
                         			if(GLOBALS->cachedwhich_signalwindow_c_1==which) GLOBALS->cachedwhich_signalwindow_c_1=-1; /* force update */
 
@@ -530,7 +530,7 @@ if(GTK_WIDGET_HAS_FOCUS(GLOBALS->signalarea_event_box))
 			service_left_edge(NULL, 0);
 			/*
 			hadj=GTK_ADJUSTMENT(GLOBALS->signal_hslider);
-  
+
 			if(hadj->value < hadj->page_increment)
 			        {
 			        hadj->value = (gfloat)0.0;
@@ -571,7 +571,7 @@ if(GTK_WIDGET_HAS_FOCUS(GLOBALS->signalarea_event_box))
 
 			rc = TRUE;
 			break;
-	
+
 		default:
 #ifdef FOCUS_DEBUG_MSGS
 			printf("key %x, widget: %08x\n", event->keyval, widget);
@@ -647,14 +647,14 @@ if(GLOBALS->dnd_sigview)
  if (ignoreAccelerators(event)) {
    gtk_widget_event(GLOBALS->filter_entry, (GdkEvent *)event);
    /* eat keystroke */
-   rc = TRUE; 
+   rc = TRUE;
  }
 
 return(rc);
 }
 
 #ifdef WAVE_USE_GTK2
-static        gint  
+static        gint
 scroll_event( GtkWidget * widget, GdkEventScroll * event )
 {
   GdkEventKey ev_fake;
@@ -669,7 +669,7 @@ scroll_event( GtkWidget * widget, GdkEventScroll * event )
     case GDK_SCROLL_DOWN:
       ev_fake.keyval = GDK_Down;
       keypress_local(widget, &ev_fake, GLOBALS->signalarea_event_box);
-      
+
     default:
       break;
   }
@@ -713,12 +713,12 @@ static gboolean run_once = FALSE;
 gdouble x,y;
 GdkModifierType state;
 TraceEnt t_trans;
-                 
+
 #ifdef WAVE_USE_GTK2
 gint xi, yi;
 #else
 GdkEventMotion event[1];
-event[0].deviceid = GDK_CORE_POINTER;  
+event[0].deviceid = GDK_CORE_POINTER;
 #endif
 
 if(GLOBALS->button2_debounce_flag)
@@ -742,11 +742,11 @@ if((GLOBALS->dnd_state)||(GLOBALS->tree_dnd_begin)) /* drag scroll on DnD */
                 wadj=GTK_ADJUSTMENT(GLOBALS->wave_vslider);
                 num_traces_displayable=(GLOBALS->signalarea->allocation.height)/(GLOBALS->fontheight);
                 num_traces_displayable--;   /* for the time trace that is always there */
-                      
+
                	if(num_traces_displayable<GLOBALS->traces.visible)
 			{
 			yscroll = 1;
-                        target=((int)wadj->value)+yscroll;  
+                        target=((int)wadj->value)+yscroll;
                         which=num_traces_displayable-1;
 
                         if(target+which>=(GLOBALS->traces.visible-1)) target=GLOBALS->traces.visible-which-1;
@@ -758,20 +758,20 @@ if((GLOBALS->dnd_state)||(GLOBALS->tree_dnd_begin)) /* drag scroll on DnD */
        			gtk_signal_emit_by_name (GTK_OBJECT (wadj), "value_changed"); /* force text update */
 			}
 		}
-	else 
+	else
 	if(y < 0)
 		{
                 wadj=GTK_ADJUSTMENT(GLOBALS->wave_vslider);
                 num_traces_displayable=(GLOBALS->signalarea->allocation.height)/(GLOBALS->fontheight);
                 num_traces_displayable--;   /* for the time trace that is always there */
-                      
+
                	if(num_traces_displayable<GLOBALS->traces.visible)
 			{
 			yscroll = 1;
        			target=((int)wadj->value)-yscroll;
        			if(target<0) target=0;
        			wadj->value=target;
-                         
+
 			which=0;
        			if(GLOBALS->cachedwhich_signalwindow_c_1==which) GLOBALS->cachedwhich_signalwindow_c_1=-1; /* force update */
 
@@ -815,7 +815,7 @@ if(GLOBALS->dnd_helper_quartz)
         DND_helper_quartz(dhq);
         g_free(dhq);
         }
-#endif   
+#endif
 #endif
 
 if(process_finder_names_queued())
@@ -868,7 +868,7 @@ if(run_once == FALSE) /* avoid any race conditions with the toolkit for uninitia
 	return(TRUE);
 	}
 
-if((!GLOBALS->signalarea) || (!GLOBALS->signalarea->window))                 
+if((!GLOBALS->signalarea) || (!GLOBALS->signalarea->window))
 	{
 	return(TRUE);
 	}
@@ -916,12 +916,12 @@ if(GLOBALS->mouseover_counter == 10)
 	        if(!t) goto bot;
 	        t=GiveNextTrace(t);
 	        }
-         
+
 	if(!t) goto bot;
 	if((t->flags&(/*TR_BLANK|*/TR_EXCLUDE))) /* TR_BLANK removed because of transaction handling below... */
 	        {
 	        t = NULL;
-	        goto bot; 
+	        goto bot;
 	        }
 
 if(t->flags & (TR_BLANK|TR_ANALOG_BLANK_STRETCH))  /* seek to real xact trace if present... */
@@ -968,14 +968,14 @@ if(t->flags & (TR_BLANK|TR_ANALOG_BLANK_STRETCH))  /* seek to real xact trace if
                         goto bot; /* is goto process_trace; in wavewindow.c */
                         }
                 }
-        }        
-                
+        }
+
 if((t->flags&TR_BLANK))
-        {                
+        {
         t = NULL;
-        goto bot;       
+        goto bot;
         }
-	         
+
 	if(t->flags & TR_ANALOG_BLANK_STRETCH)  /* seek to real analog trace is present... */
 	        {
 	        while((t) && (t = t->t_prev))
@@ -987,7 +987,7 @@ if((t->flags&TR_BLANK))
 	                                break; /* found it */
 	                                }
 	                                else
-	                                {   
+	                                {
 	                                t = NULL;
 	                                }
 	                        }
@@ -1304,13 +1304,13 @@ if(GLOBALS->signalpixmap)
 	if((GLOBALS->old_signal_fill_width!=GLOBALS->signal_fill_width)||(GLOBALS->old_signal_fill_height!=widget->allocation.height))
 		{
 		gdk_pixmap_unref(GLOBALS->signalpixmap);
-		GLOBALS->signalpixmap=gdk_pixmap_new(widget->window, 
+		GLOBALS->signalpixmap=gdk_pixmap_new(widget->window,
 			GLOBALS->signal_fill_width, widget->allocation.height, -1);
 		}
 	}
 	else
 	{
-	GLOBALS->signalpixmap=gdk_pixmap_new(widget->window, 
+	GLOBALS->signalpixmap=gdk_pixmap_new(widget->window,
 		GLOBALS->signal_fill_width, widget->allocation.height, -1);
 	}
 
@@ -1319,7 +1319,7 @@ if(GLOBALS->signalpixmap)
    if (width < GLOBALS->max_signal_name_pixel_width+15)
      {
        int delta = GLOBALS->max_signal_name_pixel_width+15 - width;
-       
+
 	 if(GLOBALS->signalpixmap)
 	   {
 
@@ -1394,10 +1394,10 @@ if(GLOBALS->traces.scroll_bottom)
 		if((scroll_top > cur_top) && (scroll_bottom <= cur_bottom))
 			{
 			/* nothing */
-			}	
+			}
 			else
 			{
-			if((scroll_bottom - scroll_top + 1) >= num_traces_displayable)			
+			if((scroll_bottom - scroll_top + 1) >= num_traces_displayable)
 				{
 				wadj->value=(gfloat)(scroll_bottom - num_traces_displayable + 1);
 				}
@@ -1472,7 +1472,7 @@ hadj=GTK_ADJUSTMENT(GLOBALS->signal_hslider);
 xsrc=(gint)hadj->value;
 
 gdk_draw_pixmap(widget->window, widget->style->fg_gc[GTK_WIDGET_STATE(widget)],
-		GLOBALS->signalpixmap, 
+		GLOBALS->signalpixmap,
 		xsrc+event->area.x, event->area.y,
 		event->area.x, event->area.y,
 		event->area.width, event->area.height);
@@ -1539,9 +1539,9 @@ GLOBALS->signalarea=gtk_drawing_area_new();
 gtk_widget_show(GLOBALS->signalarea);
 MaxSignalLength();
 
-gtk_widget_set_events(GLOBALS->signalarea, 
-		GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | 
-		GDK_BUTTON_RELEASE_MASK | 
+gtk_widget_set_events(GLOBALS->signalarea,
+		GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK |
+		GDK_BUTTON_RELEASE_MASK |
 		GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK
 		);
 
@@ -1667,8 +1667,8 @@ if(do_focusing)
 
 gint install_keypress_handler(void)
 {
-gint rc = 
-	gtk_signal_connect(GTK_OBJECT(GLOBALS->mainwindow), 
+gint rc =
+	gtk_signal_connect(GTK_OBJECT(GLOBALS->mainwindow),
 	"key_press_event",GTK_SIGNAL_FUNC(keypress_local), NULL);
 
 return(rc);
diff --git a/src/simplereq.c b/src/simplereq.c
index 4d58680..e61b4ef 100644
--- a/src/simplereq.c
+++ b/src/simplereq.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2012.
  *
  * This program is free software; you can redistribute it and/or
diff --git a/src/splash.c b/src/splash.c
index bcdba35..875f6c7 100644
--- a/src/splash.c
+++ b/src/splash.c
@@ -662,7 +662,7 @@ static const char * wave_splash_xpm[] = {
 "J.A+++++A+8.A+A+b+G.D G.G.D G.o+D o+5.5.o+o+o+o+5.5.D < b+A+A+J.8.A+A+C+k+B.i.B.B.C+++++++8.A+8.b+b+8.b+b+8.8.8.8.j+8.8.c.8.8.b+8.b+8.b+8.c.8.b+8.c.8.8.b+8.8.8.8.8.8.k+k+k+k+k+k+k+k+k+k+k+k+6 B.6 i.i.Z X.i.X.G+X.X..+.+1 P..+P.P.P.P.P.P.P.b P.b P.b P.P.b H.P.P.H.H.P.P.P.H.P.H.H.H.H.H.P.H.B P.H+.+X.)+^.)+B.C+C+++b+G.*+:+u.z = E E E E E N N u.:+*+;+7.r+^.q.R.4+R.R.4+q.'+4+q.4+4+4+4+4+4+4+4+4+4+4+^.^..+^.^.^.2.B.++J.b+G.o+u.z `.-+E 4.4.{ { -.{ -.-.4.4.`.&.&.( c c < W W W =+W W =+< W W W W = [...]
 "8.b+b+b+b+b+b+b+b+b+b+G.G.G.D 5.o+>+( ( ( 5.( o+5.*+5.G.n G.b+J.b+A+J.A+8.A+8.8.A+8.++A+A+A+b+++A+8.8.8.8.8.8.8.++8.8.8.8.8.8.8.8.8.8.8.8.++8.++8.++8.8.8.++8.++k+8.k+8.8.k+k+k+k+k+6 k+k+i.i.6 B.i.i.i.i.X.Z Z X.G+G+X.G+X.1 .+H+1 P.H+P.P.P.P.H.H.P.H.H.H.E+H.H.P.H.H.H.H.H.H.H.H.E+H.w H.b H.E+H.H+.+4+^.)+)+)+C+++J.G.*+f+u.E E x.A { ~.~.{ x.E = >.f+*+J.i 2.4+` '+'+'+4+'+4+'+'+'+4+4+'+4+4+'+4+4+4+4+'+4+4+4+^.X.2.B.C+A+b+G.o+f+u.u.z `.E -+-+) 4.4.4.4.-+) &.9 ( c < W W =+W W W W W =+W =+W W W W [...]
 ";+b+G.b+G.b+b+b+G.G.D D D D 5.5.E.( o+o+( E.o+E.*+5.*+5.G.n ;+b+J.J.A+A+A+A+++++++++++++8.++8.A+8.A+++k+8.++8.++8.8.8.++8.++8.++++++++k+++++k+8.C+8.k+++k+8.k+8.k+W k+k+k+k+k+6 k+6 i.i.i.i.i.i.i.X.X.X.X.X.G+X.G+X.1 1 H+1 P.P.P.P.H.P.P.P.P.H.H.b b b z+z+z+b z+b b b b b w b b b b b b z+H.w H.H.P.H..+X..+)+B.C+++J.G.f+u.N E ~.{ 8 8 8 8 8 A A E = p+:+;+7.2.q.4+4+` '+'+'+'+4+'+'+'+'+'+'+'+'+'+'+'+'+'+a+'+R.4+^.)+B.C+++J.b+D o+f+f+9 z z z &.`.) -+-+) `.&.9 9 i+(+j+W W W W W ; W W ; W W W =+W = [...]
-  
+
 
 void make_splash_pixmaps(GtkWidget *window)
 {
@@ -743,7 +743,7 @@ if((!GLOBALS->splash_disable)&&(!GLOBALS->splash_splash_c_1))
 	gint dx, dy;
 
 	GLOBALS->gt_splash_c_1 = g_timer_new();
-                
+
         GLOBALS->splash_splash_c_1 = gtk_window_new(GTK_WINDOW_POPUP);
 #if !defined _MSC_VER && !defined __MINGW32__
 	dx = 8; dy = 8;
@@ -758,26 +758,26 @@ if((!GLOBALS->splash_disable)&&(!GLOBALS->splash_splash_c_1))
         gtk_window_set_type_hint(GTK_WINDOW(GLOBALS->splash_splash_c_1), GDK_WINDOW_TYPE_HINT_SPLASHSCREEN);
         gtk_window_set_position(GTK_WINDOW(GLOBALS->splash_splash_c_1), GTK_WIN_POS_CENTER);
         gtk_widget_show(GLOBALS->splash_splash_c_1);
-                        
+
         make_splash_pixmaps(GLOBALS->splash_splash_c_1);
-                        
+
         splash_table = gtk_table_new(10, 10, FALSE);
         GLOBALS->darea_splash_c_1 = gtk_drawing_area_new();
         gtk_widget_show(GLOBALS->darea_splash_c_1);
 	gtk_widget_set_events(GLOBALS->darea_splash_c_1, GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK);
-         
+
         gtk_table_attach (GTK_TABLE (splash_table), GLOBALS->darea_splash_c_1, 0, 9, 0, 9,GTK_FILL | GTK_EXPAND,GTK_FILL | GTK_EXPAND | GTK_SHRINK, 3, 3);
 
         gtk_widget_show(splash_table);
         gtk_container_add(GTK_CONTAINER(GLOBALS->splash_splash_c_1), splash_table);
 	gtkwave_signal_connect(GTK_OBJECT(GLOBALS->darea_splash_c_1), "expose_event",GTK_SIGNAL_FUNC(expose_event), NULL);
 	gtkwave_signal_connect(GTK_OBJECT(GLOBALS->darea_splash_c_1), "button_press_event",GTK_SIGNAL_FUNC(splash_button_press_event), NULL);
-                 
+
 	gtk_events_pending_gtk_main_iteration();
-                         
+
         gdk_draw_drawable(GLOBALS->darea_splash_c_1->window,GLOBALS->darea_splash_c_1->style->fg_gc[GTK_WIDGET_STATE (GLOBALS->darea_splash_c_1)],GLOBALS->wave_splash_pixmap,0,0,0,0,WAVE_SPLASH_X,WAVE_SPLASH_Y);
 	gtk_events_pending_gtk_main_iteration();
-                         
+
         GLOBALS->timeout_tag = gtk_timeout_add(100, splash_kill, GLOBALS->splash_splash_c_1);
         }
 	else
@@ -797,7 +797,7 @@ void splash_sync(off_t current, off_t total)
 struct Global *g_old = GLOBALS;
 int cur_bar_x;
 
-if(GLOBALS->splash_splash_c_1) 
+if(GLOBALS->splash_splash_c_1)
 	{
 	if((current)&&(total))
 		{
@@ -807,7 +807,7 @@ if(GLOBALS->splash_splash_c_1)
 			{
 			if((current==total)||(cur_bar_x>=WAVE_SPLASH_X-4)) GLOBALS->load_complete_splash_c_1=1;
 			/* if(current>total) current = total; */ /* scan-build */
-	
+
 			gdk_draw_rectangle(GLOBALS->darea_splash_c_1->window, GLOBALS->splash_splash_c_1->style->black_gc, TRUE,0,WAVE_SPLASH_Y-4, (GLOBALS->prev_bar_x_splash_c_1 = cur_bar_x), 4);
 			}
 		}
@@ -835,16 +835,16 @@ if(GLOBALS->splash_splash_c_1)
 				{
 				GLOBALS->prev_bar_x_splash_c_1 = cur_bar_x;
 				wave_gtk_window_set_title(GTK_WINDOW(GLOBALS->mainwindow), GLOBALS->winname, WAVE_SET_TITLE_LOADING, cur_bar_x);
-				if(0) 	{ 
-					GdkDisplay *g = gdk_display_get_default(); 
+				if(0) 	{
+					GdkDisplay *g = gdk_display_get_default();
 					if(g) gdk_display_flush(g);
 					}
 					else
-					{ 
-					gtk_events_pending_gtk_main_iteration(); 
+					{
+					gtk_events_pending_gtk_main_iteration();
 					set_GLOBALS(g_old);
 					}
-	
+
 				}
 			}
 		}
diff --git a/src/status.c b/src/status.c
index 3276b80..0cf5ab1 100644
--- a/src/status.c
+++ b/src/status.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2008
  *
  * This program is free software; you can redistribute it and/or
@@ -13,7 +13,7 @@
 #include "symbol.h"
 #include "lxt2_read.h"
 #include "lx2.h"
-   
+
 /* Add some text to our text widget - this is a callback that is invoked
 when our window is realized. We could also force our window to be
 realized with gtk_widget_realize, but it would have to be part of
@@ -43,7 +43,7 @@ if(!GLOBALS->quiet_checkmenu) /* when gtkwave_mlist_t check menuitems are being
 	{
 	char *stemp = wave_alloca(len+1);
 	strcpy(stemp, str);
-	
+
 	if(ch == '\n')
 		{
 		stemp[len-1] = 0;
@@ -116,7 +116,7 @@ else
 	status_text(buf);
 	}
 }
-   
+
 /* Create a scrolled text area that displays a "message" */
 GtkWidget *
 create_text (void)
@@ -130,7 +130,7 @@ gtk_tooltips_set_delay_2(tooltips,1500);
 
 /* Create a table to hold the text widget and scrollbars */
 table = gtk_table_new (1, 16, FALSE);
-   
+
 /* Put a text widget in the upper left hand corner. Note the use of
 * GTK_SHRINK in the y direction */
 #if defined(WAVE_USE_GTK2) && !defined(GTK_ENABLE_BROKEN)
@@ -146,28 +146,28 @@ gtk_text_set_editable(GTK_TEXT(GLOBALS->text_status_c_2), FALSE);
 gtk_table_attach (GTK_TABLE (table), GLOBALS->text_status_c_2, 0, 14, 0, 1,
 		      	GTK_FILL | GTK_EXPAND,
 		      	GTK_FILL | GTK_SHRINK | GTK_EXPAND, 0, 0);
-gtk_widget_set_usize(GTK_WIDGET(GLOBALS->text_status_c_2), 100, 50); 
+gtk_widget_set_usize(GTK_WIDGET(GLOBALS->text_status_c_2), 100, 50);
 gtk_widget_show (GLOBALS->text_status_c_2);
 
 /* And a VScrollbar in the upper right */
 #if defined(WAVE_USE_GTK2) && !defined(GTK_ENABLE_BROKEN)
 {
 GtkTextViewClass *tc = (GtkTextViewClass*)GTK_OBJECT_GET_CLASS(GTK_OBJECT(GLOBALS->text_status_c_2));
- 
+
 tc->set_scroll_adjustments(GTK_TEXT_VIEW (GLOBALS->text_status_c_2), NULL, NULL);
-GLOBALS->vscrollbar_status_c_2 = gtk_vscrollbar_new (GTK_TEXT_VIEW (GLOBALS->text_status_c_2)->vadjustment);  
+GLOBALS->vscrollbar_status_c_2 = gtk_vscrollbar_new (GTK_TEXT_VIEW (GLOBALS->text_status_c_2)->vadjustment);
 }
-#else 
+#else
 GLOBALS->vscrollbar_status_c_2 = gtk_vscrollbar_new ((GTK_TEXT (GLOBALS->text_status_c_2))->vadj);
 #endif
 gtk_table_attach (GTK_TABLE (table), GLOBALS->vscrollbar_status_c_2, 15, 16, 0, 1,
 			GTK_FILL, GTK_FILL | GTK_SHRINK | GTK_EXPAND, 0, 0);
 gtk_widget_show (GLOBALS->vscrollbar_status_c_2);
-   
+
 /* Add a handler to put a message in the text widget when it is realized */
 gtk_signal_connect (GTK_OBJECT (GLOBALS->text_status_c_2), "realize", GTK_SIGNAL_FUNC (realize_text), NULL);
-   
+
 gtk_tooltips_set_tip_2(tooltips, GLOBALS->text_status_c_2, "Status Window", NULL);
 return(table);
 }
-   
+
diff --git a/src/strace.c b/src/strace.c
index 537be1a..592b213 100644
--- a/src/strace.c
+++ b/src/strace.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2013.
  *
  * This program is free software; you can redistribute it and/or
@@ -340,7 +340,7 @@ if(GLOBALS->strace_ctx->ptr_mark_count_label_strace_c_1)
 void tracesearchbox(const char *title, GtkSignalFunc func, gpointer data)
 {
     GtkWidget *menu, *menuitem, *optionmenu;
-    GSList *group; 
+    GSList *group;
     GtkWidget *entry;
     GtkWidget *vbox, *hbox, *small_hbox, *vbox_g, *label;
     GtkWidget *button1, *button1a, *button1b, *button1c, *button2, *scrolled_win, *frame, *separator;
@@ -354,7 +354,7 @@ void tracesearchbox(const char *title, GtkSignalFunc func, gpointer data)
     /* fix problem where ungrab doesn't occur if button pressed + simultaneous accelerator key occurs */
     if(GLOBALS->in_button_press_wavewindow_c_1) { gdk_pointer_ungrab(GDK_CURRENT_TIME); }
 
-    if(GLOBALS->strace_ctx->straces) 
+    if(GLOBALS->strace_ctx->straces)
 	{
 	gdk_window_raise(GLOBALS->strace_ctx->window_strace_c_10->window);
 	return; /* is already active */
@@ -367,11 +367,11 @@ void tracesearchbox(const char *title, GtkSignalFunc func, gpointer data)
     GLOBALS->strace_ctx->window_strace_c_10 = gtk_window_new(GLOBALS->disable_window_manager ? GTK_WINDOW_POPUP : GTK_WINDOW_TOPLEVEL);
 
     GLOBALS->strace_windows[GLOBALS->strace_current_window].window_strace_c_10 = gtk_window_new(GLOBALS->disable_window_manager ? GTK_WINDOW_POPUP : GTK_WINDOW_TOPLEVEL);
-    install_focus_cb(GLOBALS->strace_windows[GLOBALS->strace_current_window].window_strace_c_10, 
+    install_focus_cb(GLOBALS->strace_windows[GLOBALS->strace_current_window].window_strace_c_10,
 		((char *)&GLOBALS->strace_windows[GLOBALS->strace_current_window].window_strace_c_10) - ((char *)GLOBALS));
 
     gtk_window_set_title(GTK_WINDOW (GLOBALS->strace_ctx->window_strace_c_10), title);
-    gtk_widget_set_usize( GTK_WIDGET (GLOBALS->strace_ctx->window_strace_c_10), 420, -1); 
+    gtk_widget_set_usize( GTK_WIDGET (GLOBALS->strace_ctx->window_strace_c_10), 420, -1);
     gtkwave_signal_connect(GTK_OBJECT (GLOBALS->strace_ctx->window_strace_c_10), "delete_event",(GtkSignalFunc) destroy_callback, NULL);
     WV_STRACE_CURWIN(GLOBALS->strace_ctx->window_strace_c_10);
 
@@ -418,7 +418,7 @@ void tracesearchbox(const char *title, GtkSignalFunc func, gpointer data)
 	gtk_box_pack_start (GTK_BOX (vbox), small_hbox, FALSE, FALSE, 0);
 
     scrolled_win = gtk_scrolled_window_new (NULL, NULL);
-    gtk_widget_set_usize( GTK_WIDGET (scrolled_win), -1, 300); 
+    gtk_widget_set_usize( GTK_WIDGET (scrolled_win), -1, 300);
     gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win),
                                       GTK_POLICY_AUTOMATIC,
                                       GTK_POLICY_AUTOMATIC);
@@ -433,7 +433,7 @@ void tracesearchbox(const char *title, GtkSignalFunc func, gpointer data)
     if ((t->flags&(TR_BLANK|TR_ANALOG_BLANK_STRETCH))||(!(t->flags&TR_HIGHLIGHT))||(!(t->name))) continue;
 
     numtraces++;
-    if(numtraces==500) 
+    if(numtraces==500)
 	{
 	status_text("Limiting waveform display search to 500 traces.\n");
 	break;
@@ -498,7 +498,7 @@ void tracesearchbox(const char *title, GtkSignalFunc func, gpointer data)
 	{
 	int idx;
 	GtkWidget *ptr_mark_start_label, *ptr_mark_end_label;
-	GtkWidget *mark_count_hbox_start,  *mark_count_hbox_end; 
+	GtkWidget *mark_count_hbox_start,  *mark_count_hbox_end;
 	GtkWidget *count_vbox_left, *count_vbox_right, *count_vbox, *count_hbox;
 	GtkWidget *ptr_mark_count_start, *ptr_mark_count_end;
 
@@ -644,7 +644,7 @@ if(GLOBALS->tims.marker<0)
 	basetime=MAX_HISTENT_TIME;
 	}
 	else
-	{	
+	{
 	basetime=GLOBALS->tims.marker;
 	}
 }
@@ -655,10 +655,10 @@ if(GLOBALS->tims.marker<0)
 	basetime=GLOBALS->tims.first;
 	}
 	else
-	{	
+	{
 	basetime=GLOBALS->tims.marker;
 	}
-} 
+}
 
 sttim=GLOBALS->tims.first;
 fintim=GLOBALS->tims.last;
@@ -729,7 +729,7 @@ while(s)
 		if((whichpass)||(GLOBALS->tims.marker>=0)) h=h->next;
 		if(!h) return;
 		s->his.h=h;
-		utt=strace_adjust(h->time,GLOBALS->shift_timebase); tt=utt;		
+		utt=strace_adjust(h->time,GLOBALS->shift_timebase); tt=utt;
 		if(tt < maxbase) maxbase=tt;
 		}
 		else
@@ -759,19 +759,19 @@ while(s)
 	t=s->trace;
 	s->search_result=0;	/* explicitly must set this */
 	GLOBALS->shift_timebase=t->shift;
-	
+
 	if((!t->vector)&&(!(t->n.nd->extvals)))
 		{
-		if(strace_adjust(s->his.h->time,GLOBALS->shift_timebase)!=maxbase) 
+		if(strace_adjust(s->his.h->time,GLOBALS->shift_timebase)!=maxbase)
 			{
 			s->his.h=bsearch_node(t->n.nd, maxbase - t->shift);
 			while(s->his.h->next && s->his.h->time==s->his.h->next->time) s->his.h=s->his.h->next;
 			}
-		if(t->flags&TR_INVERT)  
+		if(t->flags&TR_INVERT)
                 	{
                         str[0]=AN_STR_INV[s->his.h->v.h_val];
                         }
-                        else   
+                        else
                         {
                         str[0]=AN_STR[s->his.h->v.h_val];
                         }
@@ -781,14 +781,14 @@ while(s)
 			{
 			case ST_DC:
 				break;
-				
+
 			case ST_HIGH:
 				totaltraces++;
-				if((str[0]=='1')||(str[0]=='h')||(str[0]=='H')) s->search_result=1;	
+				if((str[0]=='1')||(str[0]=='h')||(str[0]=='H')) s->search_result=1;
 				break;
 
 			case ST_RISE:
-				if((str[0]=='1')||(str[0]=='h')||(str[0]=='H')) s->search_result=1;	
+				if((str[0]=='1')||(str[0]=='h')||(str[0]=='H')) s->search_result=1;
 				totaltraces++;
 				break;
 
@@ -806,7 +806,7 @@ while(s)
 				totaltraces++;
 				if((str[0]=='z')||(str[0]=='Z'))
  					s->search_result=1;
-				break;				
+				break;
 
 			case ST_X:
 				totaltraces++;
@@ -817,7 +817,7 @@ while(s)
 				totaltraces++;
 				s->search_result=1;
 				break;
-		
+
 			case ST_STRING:
 				totaltraces++;
 				if(s->string)
@@ -838,7 +838,7 @@ while(s)
 
 		if(t->vector)
 			{
-			if(strace_adjust(s->his.v->time,GLOBALS->shift_timebase)!=maxbase) 
+			if(strace_adjust(s->his.v->time,GLOBALS->shift_timebase)!=maxbase)
 				{
 				s->his.v=bsearch_vector(t->n.vec, maxbase - t->shift);
 				while(s->his.v->next && s->his.v->time==s->his.v->next->time) s->his.v=s->his.v->next;
@@ -847,7 +847,7 @@ while(s)
 			}
 			else
 			{
-			if(strace_adjust(s->his.h->time,GLOBALS->shift_timebase)!=maxbase) 
+			if(strace_adjust(s->his.h->time,GLOBALS->shift_timebase)!=maxbase)
 				{
 				s->his.h=bsearch_node(t->n.nd, maxbase - t->shift);
 				while(s->his.h->next && s->his.h->time==s->his.h->next->time) s->his.h=s->his.h->next;
@@ -888,7 +888,7 @@ while(s)
 			case ST_FALL:
 				totaltraces++;
 				break;
-				
+
 			case ST_HIGH:
 				totaltraces++;
 				if((chval2=chval))
@@ -954,7 +954,7 @@ while(s)
 				totaltraces++;
 				s->search_result=1;
 				break;
-		
+
 			case ST_STRING:
 				totaltraces++;
 				if(s->string)
@@ -987,7 +987,7 @@ if(totaltraces)
 	{
 	if(GLOBALS->strace_ctx->logical_mutex[0])	/* and */
 		{
-		if(totaltraces==passcount) break;		
+		if(totaltraces==passcount) break;
 		}
 	else
 	if(GLOBALS->strace_ctx->logical_mutex[1])	/* or */
@@ -1034,13 +1034,13 @@ if(is_last_iteration)
 		                if((GLOBALS->tims.start&1)&&(GLOBALS->tims.end&1)) middle++;
 		                }
 		                else
-		                { 
+		                {
 		                middle=GLOBALS->tims.marker;
 		                }
-	
+
 		GLOBALS->tims.start=time_trunc(middle-(width/2));
 		if(GLOBALS->tims.start+width>GLOBALS->tims.last) GLOBALS->tims.start=GLOBALS->tims.last-width;
-		if(GLOBALS->tims.start<GLOBALS->tims.first) GLOBALS->tims.start=GLOBALS->tims.first;  
+		if(GLOBALS->tims.start<GLOBALS->tims.first) GLOBALS->tims.start=GLOBALS->tims.first;
 		GTK_ADJUSTMENT(GLOBALS->wave_hslider)->value=GLOBALS->tims.timecache=GLOBALS->tims.start;
 		}
 
@@ -1097,7 +1097,7 @@ while(s)
 		while(h->time==h->next->time) h=h->next;
 		if((whichpass)||(notfirst)) h=h->next;
 		if(!h) return(MAX_HISTENT_TIME);
-		utt=strace_adjust(h->time,GLOBALS->shift_timebase); tt=utt;		
+		utt=strace_adjust(h->time,GLOBALS->shift_timebase); tt=utt;
 		if(tt < maxbase) maxbase=tt;
 		}
 		else
@@ -1125,19 +1125,19 @@ while(s)
 	t=s->trace;
 	s->search_result=0;	/* explicitly must set this */
 	GLOBALS->shift_timebase=t->shift;
-	
+
 	if((!t->vector)&&(!(t->n.nd->extvals)))
 		{
-		if(strace_adjust(s->his.h->time,GLOBALS->shift_timebase)!=maxbase) 
+		if(strace_adjust(s->his.h->time,GLOBALS->shift_timebase)!=maxbase)
 			{
 			s->his.h=bsearch_node(t->n.nd, maxbase - t->shift);
 			while(s->his.h->next && s->his.h->time==s->his.h->next->time) s->his.h=s->his.h->next;
 			}
-		if(t->flags&TR_INVERT)  
+		if(t->flags&TR_INVERT)
                 	{
                         str[0]=AN_STR_INV[s->his.h->v.h_val];
                         }
-                        else   
+                        else
                         {
                         str[0]=AN_STR[s->his.h->v.h_val];
                         }
@@ -1147,16 +1147,16 @@ while(s)
 			{
 			case ST_DC:
 				break;
-				
+
 			case ST_HIGH:
 				totaltraces++;
-				if((str[0]=='1')||(str[0]=='h')||(str[0]=='H')) s->search_result=1;	
+				if((str[0]=='1')||(str[0]=='h')||(str[0]=='H')) s->search_result=1;
 				break;
 
 			case ST_RISE:
 				totaltraces++;
-				if(((str[0]=='1')||(str[0]=='h')||(str[0]=='H'))&&(strace_adjust(s->his.h->time,GLOBALS->shift_timebase)==maxbase)) 
-					s->search_result=1;	
+				if(((str[0]=='1')||(str[0]=='h')||(str[0]=='H'))&&(strace_adjust(s->his.h->time,GLOBALS->shift_timebase)==maxbase))
+					s->search_result=1;
 				break;
 
 			case ST_LOW:
@@ -1174,7 +1174,7 @@ while(s)
 				totaltraces++;
 				if((str[0]=='z')||(str[0]=='Z'))
  					s->search_result=1;
-				break;				
+				break;
 
 			case ST_X:
 				totaltraces++;
@@ -1185,7 +1185,7 @@ while(s)
 				totaltraces++;
 				if(strace_adjust(s->his.h->time,GLOBALS->shift_timebase)==maxbase)s->search_result=1;
 				break;
-		
+
 			case ST_STRING:
 				totaltraces++;
 				if(s->string)
@@ -1206,7 +1206,7 @@ while(s)
 
 		if(t->vector)
 			{
-			if(strace_adjust(s->his.v->time,GLOBALS->shift_timebase)!=maxbase) 
+			if(strace_adjust(s->his.v->time,GLOBALS->shift_timebase)!=maxbase)
 				{
 				s->his.v=bsearch_vector(t->n.vec, maxbase - t->shift);
 				while(s->his.v->next && s->his.v->time==s->his.v->next->time) s->his.v=s->his.v->next;
@@ -1215,7 +1215,7 @@ while(s)
 			}
 			else
 			{
-			if(strace_adjust(s->his.h->time,GLOBALS->shift_timebase)!=maxbase) 
+			if(strace_adjust(s->his.h->time,GLOBALS->shift_timebase)!=maxbase)
 				{
 				s->his.h=bsearch_node(t->n.nd, maxbase - t->shift);
 				while(s->his.h->next && s->his.h->time==s->his.h->next->time) s->his.h=s->his.h->next;
@@ -1256,7 +1256,7 @@ while(s)
 			case ST_FALL:
 				totaltraces++;
 				break;
-				
+
 			case ST_HIGH:
 				totaltraces++;
 				if((chval2=chval))
@@ -1323,7 +1323,7 @@ while(s)
 				if(strace_adjust(s->his.v->time,GLOBALS->shift_timebase)==maxbase)
 					s->search_result=1;
 				break;
-		
+
 			case ST_STRING:
 				totaltraces++;
 				if(s->string)
@@ -1356,7 +1356,7 @@ if(totaltraces)
 	{
 	if(GLOBALS->strace_ctx->logical_mutex[0])	/* and */
 		{
-		if(totaltraces==passcount) break;		
+		if(totaltraces==passcount) break;
 		}
 	else
 	if(GLOBALS->strace_ctx->logical_mutex[1])	/* or */
@@ -1574,7 +1574,7 @@ GLOBALS->strace_ctx->straces = strace_cache;
 /*
  * printf to memory..
  */
-  
+
 int mprintf(const char *fmt, ... )
 {
 int len;
@@ -1582,13 +1582,13 @@ int rc;
 va_list args;
 struct mprintf_buff_t *bt = (struct mprintf_buff_t *)calloc_2(1, sizeof(struct mprintf_buff_t));
 char buff[65537];
-                                
+
 va_start(args, fmt);
 rc=vsprintf(buff, fmt, args);
 len = strlen(buff);
 bt->str = malloc_2(len+1);
 strcpy(bt->str, buff);
-                 
+
 if(!GLOBALS->strace_ctx->mprintf_buff_current)
         {
         GLOBALS->strace_ctx->mprintf_buff_head = GLOBALS->strace_ctx->mprintf_buff_current = bt;
@@ -1599,7 +1599,7 @@ if(!GLOBALS->strace_ctx->mprintf_buff_current)
         GLOBALS->strace_ctx->mprintf_buff_current = bt;
         }
 
-va_end(args);                        
+va_end(args);
 return(rc);
 }
 
@@ -1611,8 +1611,8 @@ void delete_mprintf(void)
 if(GLOBALS->strace_ctx->mprintf_buff_head)
 	{
 	struct mprintf_buff_t *mb = GLOBALS->strace_ctx->mprintf_buff_head;
-	struct mprintf_buff_t *mbt;		
-		
+	struct mprintf_buff_t *mbt;
+
 	while(mb)
 		{
 		free_2(mb->str);
@@ -1667,7 +1667,7 @@ if(GLOBALS->strace_ctx->timearray)
 			}
 		prevshift=t->shift;
 
-		if(!(t->flags&(TR_BLANK|TR_ANALOG_BLANK_STRETCH)))	
+		if(!(t->flags&(TR_BLANK|TR_ANALOG_BLANK_STRETCH)))
 			{
 			if(t->vector)
 				{
diff --git a/src/strace.h b/src/strace.h
index d732622..f6f2251 100644
--- a/src/strace.h
+++ b/src/strace.h
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2010.
  *
  * This program is free software; you can redistribute it and/or
@@ -41,7 +41,7 @@ struct strace_defer_free
 struct strace_defer_free *next;
 Trptr defer;
 };
-         
+
 struct strace_back
 {
 struct strace *parent;
@@ -50,7 +50,7 @@ int which;
 
 struct strace
 {
-struct strace *next;   
+struct strace *next;
 char *string;           /* unmalloc this when all's done! */
 Trptr trace;
 char value;
@@ -62,7 +62,7 @@ union
         vptr    v;
       	} his;
 
-struct strace_back *back[WAVE_STYPE_COUNT];    /* dealloc these too! */   
+struct strace_back *back[WAVE_STYPE_COUNT];    /* dealloc these too! */
 };
 
 
@@ -88,29 +88,29 @@ struct item_mark_string {
 /* for being able to handle multiple strace sessions at once, context is moved here */
 struct strace_ctx_t
 {
-GtkWidget *ptr_mark_count_label_strace_c_1; 
-struct strace *straces; 
-struct strace *shadow_straces; 
-struct strace_defer_free *strace_defer_free_head; 
-GtkWidget *window_strace_c_10; 
-void (*cleanup_strace_c_7)(void); 
-
-struct mprintf_buff_t *mprintf_buff_head; 
-struct mprintf_buff_t *mprintf_buff_current; 
-char *shadow_string; 
-
-TimeType *timearray; 
-int timearray_size; 
-
-char logical_mutex[6]; 
-char shadow_logical_mutex[6]; 
-char shadow_active; 
-char shadow_encountered_parsewavline; 
-char shadow_type; 
-signed char mark_idx_start; 
-signed char mark_idx_end; 
-signed char shadow_mark_idx_start; 
-signed char shadow_mark_idx_end; 
+GtkWidget *ptr_mark_count_label_strace_c_1;
+struct strace *straces;
+struct strace *shadow_straces;
+struct strace_defer_free *strace_defer_free_head;
+GtkWidget *window_strace_c_10;
+void (*cleanup_strace_c_7)(void);
+
+struct mprintf_buff_t *mprintf_buff_head;
+struct mprintf_buff_t *mprintf_buff_current;
+char *shadow_string;
+
+TimeType *timearray;
+int timearray_size;
+
+char logical_mutex[6];
+char shadow_logical_mutex[6];
+char shadow_active;
+char shadow_encountered_parsewavline;
+char shadow_type;
+signed char mark_idx_start;
+signed char mark_idx_end;
+signed char shadow_mark_idx_start;
+signed char shadow_mark_idx_end;
 };
 
 
diff --git a/src/symbol.c b/src/symbol.c
index 3f66840..81ea462 100644
--- a/src/symbol.c
+++ b/src/symbol.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 2001-2010
  *
  * This program is free software; you can redistribute it and/or
@@ -13,7 +13,7 @@
 
 #ifndef _MSC_VER
 #include <unistd.h>
-#ifndef __MINGW32__ 
+#ifndef __MINGW32__
 #include <sys/mman.h>
 #endif
 #else
@@ -141,7 +141,7 @@ for(p=s;*p;p++)
                 {
                 h=h^(g>>24);
                 h=h^g;
-                }   
+                }
         }
 
 h^=h2;						/* combine the two hashes */
@@ -218,12 +218,12 @@ if(!GLOBALS->facs_are_sorted)
 #else
 	hv=hash(s);
 	if(!(temp=GLOBALS->sym_hash[hv])) return(NULL); /* no hash entry, add here wanted to add */
-	
+
 	while(temp)
 	        {
 	        if(!strcmp(temp->name,s))
 	                {
-	                return(temp); /* in table already */    
+	                return(temp); /* in table already */
 	                }
 	        if(!temp->sym_next) break;
 	        temp=temp->sym_next;
@@ -232,7 +232,7 @@ if(!GLOBALS->facs_are_sorted)
 	return(NULL); /* not found, add here if you want to add*/
 	}
 	else	/* no sense hashing if the facs table is built */
-	{	
+	{
 	struct symbol *sr;
 	DEBUG(printf("BSEARCH: %s\n",s));
 
@@ -268,7 +268,7 @@ if(!GLOBALS->facs_are_sorted)
 				        {
 				        int was_packed = HIER_DEPACK_STATIC;
 				        char *hfacname = NULL;
-		
+
 				        hfacname = hier_decompress_flagged(GLOBALS->facs[i]->name, &was_packed);
 					s2 = hfacname;
 					while(*s2)
@@ -280,13 +280,13 @@ if(!GLOBALS->facs_are_sorted)
 							}
 						s2++;
 						}
-	
+
 				        /* if(was_packed) { free_2(hfacname); } ...not needed with HIER_DEPACK_STATIC */
 					if(mat) { break; }
 				        }
 				}
 
-			if(mat) 
+			if(mat)
 				{ GLOBALS->facs_have_symbols_state_machine = 1; }
 				else
 				{ GLOBALS->facs_have_symbols_state_machine = 2; } /* prevent code below from executing */
@@ -299,13 +299,13 @@ if(!GLOBALS->facs_are_sorted)
 			        {
 			        int was_packed = HIER_DEPACK_STATIC;
 			        char *hfacname = NULL;
-	
+
 			        hfacname = hier_decompress_flagged(GLOBALS->facs[i]->name, &was_packed);
 				if(!strcmp(hfacname, s))
 					{
 					mat = 1;
 					}
-	
+
 			        /* if(was_packed) { free_2(hfacname); } ...not needed with HIER_DEPACK_STATIC */
 				if(mat)
 					{
@@ -322,26 +322,26 @@ if(!GLOBALS->facs_are_sorted)
 }
 
 
-struct symbol *symfind(char *s, unsigned int *rows_return) 
-{ 
-struct symbol *s_pnt = symfind_2(s, rows_return); 
+struct symbol *symfind(char *s, unsigned int *rows_return)
+{
+struct symbol *s_pnt = symfind_2(s, rows_return);
 
-if(!s_pnt) 
-	{ 
-       	int len = strlen(s); 
-       	if(len) 
+if(!s_pnt)
+	{
+       	int len = strlen(s);
+       	if(len)
         	{
 		char ch = s[len-1];
                 if((ch != ']') && (ch != '}'))
 			{
-                       	char *s2 = wave_alloca(len + 4); 
-                       	memcpy(s2, s, len); 
+                       	char *s2 = wave_alloca(len + 4);
+                       	memcpy(s2, s, len);
                        	strcpy(s2+len, "[0]"); /* bluespec vs modelsim */
 
-                       	s_pnt = symfind_2(s2, rows_return); 
-                       	} 
-               	} 
-       	} 
+                       	s_pnt = symfind_2(s2, rows_return);
+                       	}
+               	}
+       	}
 
-return(s_pnt); 
-} 
+return(s_pnt);
+}
diff --git a/src/symbol.h b/src/symbol.h
index 9a42819..05a99df 100644
--- a/src/symbol.h
+++ b/src/symbol.h
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2011.
  *
  * This program is free software; you can redistribute it and/or
@@ -121,7 +121,7 @@ char *makename_chain(struct symbol *sym);
 
 /* splash screen activation (version >= GTK2 only) */
 void splash_create(void);
-void splash_sync(off_t current, off_t total);  
+void splash_sync(off_t current, off_t total);
 void splash_finalize(void);
 gint splash_button_press_event(GtkWidget *widget, GdkEventExpose *event);
 
diff --git a/src/tcl_commands.c b/src/tcl_commands.c
index 16aae07..158fe32 100644
--- a/src/tcl_commands.c
+++ b/src/tcl_commands.c
@@ -78,7 +78,7 @@ char reportString[33];
 
 sprintf(reportString, "%d", intVal);
 
-aobj = Tcl_NewStringObj(reportString, -1); 
+aobj = Tcl_NewStringObj(reportString, -1);
 Tcl_SetObjResult(interp, aobj);
 
 return(TCL_OK);
@@ -91,7 +91,7 @@ char reportString[65];
 
 sprintf(reportString, TTFormat, ttVal);
 
-aobj = Tcl_NewStringObj(reportString, -1); 
+aobj = Tcl_NewStringObj(reportString, -1);
 Tcl_SetObjResult(interp, aobj);
 
 return(TCL_OK);
@@ -104,7 +104,7 @@ char reportString[65];
 
 sprintf(reportString, "%e", dVal);
 
-aobj = Tcl_NewStringObj(reportString, -1); 
+aobj = Tcl_NewStringObj(reportString, -1);
 Tcl_SetObjResult(interp, aobj);
 
 return(TCL_OK);
@@ -114,7 +114,7 @@ static int gtkwavetcl_printString(ClientData clientData, Tcl_Interp *interp, int
 {
 Tcl_Obj *aobj;
 
-aobj = Tcl_NewStringObj(reportString, -1); 
+aobj = Tcl_NewStringObj(reportString, -1);
 Tcl_SetObjResult(interp, aobj);
 
 return(TCL_OK);
@@ -197,12 +197,12 @@ if(objc == 2)
 
         	hfacname = hier_decompress_flagged(GLOBALS->facs[which]->name, &was_packed);
 
-		aobj = Tcl_NewStringObj(hfacname, -1); 
+		aobj = Tcl_NewStringObj(hfacname, -1);
 		Tcl_SetObjResult(interp, aobj);
 		if(was_packed) free_2(hfacname);
 		}
 	}
-        else  
+        else
         {
         return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 1));
         }
@@ -282,12 +282,12 @@ static int gtkwavetcl_getDumpType(ClientData clientData, Tcl_Interp *interp, int
 Tcl_Obj *aobj;
 char *reportString = "UNKNOWN";
 
-if(GLOBALS->is_vcd) 
+if(GLOBALS->is_vcd)
         {
         if(GLOBALS->partial_vcd)
                 {
                 reportString = "PVCD";
-                }  
+                }
                 else
                 {
                 reportString = "VCD";
@@ -350,7 +350,7 @@ if(objc == 2)
 		return(gtkwavetcl_printTimeType(clientData, interp, objc, objv, value));
 		}
 	}
-        else  
+        else
         {
         return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 1));
         }
@@ -436,7 +436,7 @@ if(objc == 2)
 			}
 		}
 	}
-        else  
+        else
         {
         return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 2));
         }
@@ -467,7 +467,7 @@ if(objc == 2)
 			}
 		}
 	}
-        else  
+        else
         {
         return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 1));
         }
@@ -508,7 +508,7 @@ if(objc == 2)
 			}
 		}
 	}
-        else  
+        else
         {
         return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 1));
         }
@@ -548,7 +548,7 @@ if(objc == 2)
 			}
 		}
 	}
-        else  
+        else
         {
         return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 1));
         }
@@ -617,7 +617,7 @@ if(objc == 3)
 				char *pnt = t->asciivalue;
 				if(*pnt == '=') pnt++;
 
-				aobj = Tcl_NewStringObj(pnt, -1); 
+				aobj = Tcl_NewStringObj(pnt, -1);
 				Tcl_SetObjResult(interp, aobj);
 
 				GLOBALS->tims.marker = oldmarker;
@@ -641,7 +641,7 @@ if(objc == 3)
 			}
 		}
 	}
-        else  
+        else
         {
         return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 1));
         }
@@ -723,7 +723,7 @@ if(objc == 2)
 
 	gtkwave_main_iteration();
 	}
-        else  
+        else
         {
         return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 1));
         }
@@ -756,7 +756,7 @@ if(objc == 2)
 
 	gtkwave_main_iteration();
 	}
-        else  
+        else
         {
         return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 1));
         }
@@ -778,11 +778,11 @@ if(objc == 2)
 	        GtkAdjustment *hadj;
 	        TimeType pageinc;
 
-	        gt=unformat_time(s, GLOBALS->time_dimension);    
-          
+	        gt=unformat_time(s, GLOBALS->time_dimension);
+
 	        if(gt<GLOBALS->tims.first) gt=GLOBALS->tims.first;
 	        else if(gt>GLOBALS->tims.last) gt=GLOBALS->tims.last;
- 
+
 	        hadj=GTK_ADJUSTMENT(GLOBALS->wave_hslider);
 	        hadj->value=gt;
 
@@ -794,9 +794,9 @@ if(objc == 2)
 	                GLOBALS->tims.timecache=GLOBALS->tims.last-pageinc+1;
 	                if(GLOBALS->tims.timecache<GLOBALS->tims.first) GLOBALS->tims.timecache=GLOBALS->tims.first;
 	                }
-	
+
 	        reformat_time(timval,GLOBALS->tims.timecache,GLOBALS->time_dimension);
-	        
+
 	        time_update();
 	        }
 
@@ -804,7 +804,7 @@ if(objc == 2)
         wavearea_configure_event(GLOBALS->wavearea, NULL);
 	gtkwave_main_iteration();
 	}
-        else  
+        else
         {
         return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 1));
         }
@@ -818,7 +818,7 @@ if(objc == 2)
         {
         char *s = get_Tcl_string(objv[1]);
         float f;
-         
+
         sscanf(s, "%f", &f);
         if(f>0.0)
                 {
@@ -828,9 +828,9 @@ if(objc == 2)
         if(f<-62.0)
                 {
                 f=-62.0; /* in case they try to go out of range */
-                } 
-                
-        GLOBALS->tims.prevzoom=GLOBALS->tims.zoom; 
+                }
+
+        GLOBALS->tims.prevzoom=GLOBALS->tims.zoom;
         GLOBALS->tims.zoom=(gdouble)f;
         calczoom(GLOBALS->tims.zoom);
         fix_wavehadj();
@@ -840,7 +840,7 @@ if(objc == 2)
 
 	gtkwave_main_iteration();
 	}
-        else  
+        else
         {
         return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 1));
         }
@@ -876,7 +876,7 @@ if(objc == 3)
 
 	gtkwave_main_iteration();
 	}
-        else  
+        else
         {
         return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 1));
         }
@@ -897,7 +897,7 @@ if(objc == 2)
 
 	gtkwave_main_iteration();
 	}
-        else  
+        else
         {
         return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 1));
         }
@@ -912,16 +912,16 @@ if((objc == 3)||(objc == 4))
         char *s = get_Tcl_string(objv[1]);
 	int which = -1;
 
-        if((s[0]>='A')&&(s[0]<='Z'))  
+        if((s[0]>='A')&&(s[0]<='Z'))
                 {
                 which = s[0] - 'A';
                 }
         else
-        if((s[0]>='a')&&(s[0]<='z'))  
+        if((s[0]>='a')&&(s[0]<='z'))
                 {
                 which = s[0] - 'a';
                 }
-	else                
+	else
 		{
 	        which = atoi(s);
 		}
@@ -933,7 +933,7 @@ if((objc == 3)||(objc == 4))
 
                 GLOBALS->named_markers[which] = gt;
 
-		if(GLOBALS->marker_names[which]) 
+		if(GLOBALS->marker_names[which])
 			{
 			free_2(GLOBALS->marker_names[which]);
 			GLOBALS->marker_names[which] = NULL;
@@ -948,9 +948,9 @@ if((objc == 3)||(objc == 4))
 
 	        wavearea_configure_event(GLOBALS->wavearea, NULL);
 		gtkwave_main_iteration();
-                } 
+                }
 	}
-        else  
+        else
         {
         return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 2));
         }
@@ -983,7 +983,7 @@ if(objc == 2)
 /*         gtk_signal_emit_by_name (GTK_OBJECT (wadj), "value_changed"); /\* force text update *\/ */
 /*	gtkwave_main_iteration(); */
 	}
-        else  
+        else
         {
         return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 1));
         }
@@ -1032,7 +1032,7 @@ if(objc==2)
         		}
                 }
 	}
-        else  
+        else
         {
         return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 1));
         }
@@ -1059,14 +1059,14 @@ if(objc==2)
 	int l = 0;
 
 	elem = zSplitTclList(s, &l);
- 
+
 	if(elem)
         	{
 		Trptr t = GLOBALS->traces.first;
 		while(t)
 			{
 			t->cached_flags = t->flags;
-			t->flags &= (~TR_HIGHLIGHT);	
+			t->flags &= (~TR_HIGHLIGHT);
 			t = t->t_next;
 			}
 
@@ -1123,7 +1123,7 @@ if(objc==2)
         		}
                 }
 	}
-        else  
+        else
         {
         return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 1));
         }
@@ -1150,15 +1150,15 @@ if(objc==2)
 	int l = 0;
 
 	elem = zSplitTclList(s, &l);
- 
+
 	if(elem)
         	{
 		Trptr t = GLOBALS->traces.first;
 		while(t)
 			{
 			t->cached_flags = t->flags;
-			t->flags &= (~TR_HIGHLIGHT);	
-		
+			t->flags &= (~TR_HIGHLIGHT);
+
 			if(!(t->flags&(TR_BLANK|TR_ANALOG_BLANK_STRETCH)))
 				{
 				char *name = extractFullTraceName(t);
@@ -1210,7 +1210,7 @@ if(objc==2)
         		}
                 }
 	}
-        else  
+        else
         {
         return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 1));
         }
@@ -1237,7 +1237,7 @@ if(objc==2)
 	int l = 0;
 
 	elem = zSplitTclList(s, &l);
- 
+
 	if(elem)
         	{
 		Trptr t = GLOBALS->traces.first;
@@ -1276,7 +1276,7 @@ if(objc==2)
         		}
                 }
 	}
-        else  
+        else
         {
         return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 1));
         }
@@ -1303,7 +1303,7 @@ if(objc==2)
 	int l = 0;
 
 	elem = zSplitTclList(s, &l);
- 
+
 	if(elem)
         	{
 		Trptr t = GLOBALS->traces.first;
@@ -1342,7 +1342,7 @@ if(objc==2)
         		}
                 }
 	}
-        else  
+        else
         {
         return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 1));
         }
@@ -1391,7 +1391,7 @@ if(objc == 3)
 			}
 		}
 	}
-        else  
+        else
         {
         return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 2));
         }
@@ -1506,7 +1506,7 @@ static int gtkwavetcl_signalChangeList(ClientData clientData, Tcl_Interp *interp
 	  else {
 	    if(strstr("forward", str1_p))
 	      dir = STRACE_FORWARD ;
-	    else 
+	    else
 	      if(strstr("backward", str1_p))
 		dir = STRACE_BACKWARD ;
 	      else
@@ -1531,10 +1531,10 @@ static int gtkwavetcl_signalChangeList(ClientData clientData, Tcl_Interp *interp
     }
     if(error) {
       Tcl_SetObjResult
-	(interp, 
+	(interp,
 	 Tcl_NewStringObj("Usage: signal_change_list ?name? ?-start time? ?-end time? ?-max size? ?-dir forward|backward?", -1)) ;
       return TCL_ERROR;
-    } 
+    }
     l_head = signal_change_list(sig_name, dir, start_time, end_time, max_elements) ;
     l_obj = Tcl_NewListObj(0, NULL) ;
     p = l_head;
@@ -1576,7 +1576,7 @@ static int gtkwavetcl_forceOpenTreeNode(ClientData clientData, Tcl_Interp *inter
   char *s = NULL ;
   if(objc == 2)
     s = get_Tcl_string(objv[1]);
-  
+
   if(s && (strlen(s) > 1)) {	/* exclude empty strings */
     int len = strlen(s);
     if(s[len-1]!=GLOBALS->hier_delimeter)
@@ -1603,7 +1603,7 @@ static int gtkwavetcl_forceOpenTreeNode(ClientData clientData, Tcl_Interp *inter
 		   Tcl_NewStringObj(GLOBALS->selected_hierarchy_name,
 				    strlen(GLOBALS->selected_hierarchy_name)) :
 		   Tcl_NewIntObj(rv)) ;
-  
+
   return(TCL_OK);
 }
 
@@ -1616,12 +1616,12 @@ if(objc == 2)
 	if(s)
 		{
 		gtk_entry_set_text(GTK_ENTRY(GLOBALS->from_entry),s);
-		from_entry_callback(NULL, GLOBALS->from_entry);		
+		from_entry_callback(NULL, GLOBALS->from_entry);
 		}
 
 	gtkwave_main_iteration();
 	}
-        else  
+        else
         {
         return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 1));
         }
@@ -1639,12 +1639,12 @@ if(objc == 2)
 	if(s)
 		{
 		gtk_entry_set_text(GTK_ENTRY(GLOBALS->to_entry),s);
-		to_entry_callback(NULL, GLOBALS->to_entry);		
+		to_entry_callback(NULL, GLOBALS->to_entry);
 		}
 
 	gtkwave_main_iteration();
 	}
-        else  
+        else
         {
         return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 1));
         }
@@ -1662,7 +1662,7 @@ if(value)
         }
 
 return(TCL_OK);
-}       
+}
 
 
 static int gtkwavetcl_getToEntry(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
@@ -1674,7 +1674,7 @@ if(value)
         }
 
 return(TCL_OK);
-}       
+}
 
 
 static int gtkwavetcl_getDisplayedSignals(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
@@ -1721,7 +1721,7 @@ if(objc == 2)
 		return(gtkwavetcl_printInteger(clientData, interp, objc, objv, t->flags));
 		}
 	}
-        else  
+        else
         {
         return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 1));
         }
@@ -1734,8 +1734,8 @@ static int gtkwavetcl_loadFile(ClientData clientData, Tcl_Interp *interp, int ob
   if(objc == 2)
     {
       char *s = get_Tcl_string(objv[1]);
-	
-      if(!GLOBALS->in_tcl_callback)                          
+
+      if(!GLOBALS->in_tcl_callback)
         {
 	/* wave_gconf_client_set_string("/current/savefile", s); */
         /*	read_save_helper(s, NULL, NULL, NULL, NULL); */
@@ -1748,7 +1748,7 @@ static int gtkwavetcl_loadFile(ClientData clientData, Tcl_Interp *interp, int ob
 	gtkwavetcl_setvar_nonblocking(WAVE_TCLCB_ERROR,"gtkwave::loadFile prohibited in callback",WAVE_TCLCB_ERROR_FLAGS);
 	}
     }
-  else  
+  else
     {
       return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 1));
     }
@@ -1770,7 +1770,7 @@ static int gtkwavetcl_reLoadFile(ClientData clientData, Tcl_Interp *interp, int
 	gtkwavetcl_setvar_nonblocking(WAVE_TCLCB_ERROR,"gtkwave::reLoadFile prohibited in callback",WAVE_TCLCB_ERROR_FLAGS);
 	}
     }
-  else  
+  else
     {
       return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 0));
     }
@@ -1782,13 +1782,13 @@ static int gtkwavetcl_presentWindow(ClientData clientData, Tcl_Interp *interp, i
 
   if(objc == 1)
     {
-#ifdef WAVE_USE_GTK2 
+#ifdef WAVE_USE_GTK2
       gtk_window_present(GTK_WINDOW(GLOBALS->mainwindow));
 #else
       gdk_window_raise(GTK_WIDGET(GLOBALS->mainwindow)->window);
 #endif
     }
-  else  
+  else
     {
       return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 0));
     }
@@ -1812,7 +1812,7 @@ static int gtkwavetcl_showSignal(ClientData clientData, Tcl_Interp *interp, int
 
       SetTraceScrollbarRowValue(row, location);
     }
-  else  
+  else
     {
       return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 2));
     }
@@ -1821,18 +1821,18 @@ static int gtkwavetcl_showSignal(ClientData clientData, Tcl_Interp *interp, int
 }
 
 
-/* 
+/*
  * swap to a given context based on tab number (from Tcl)
  */
 static gint switch_to_tab_number(unsigned int i)
-{       
-if(i < GLOBALS->num_notebook_pages)  
+{
+if(i < GLOBALS->num_notebook_pages)
         {
         struct Global *g_old = GLOBALS;
         /* printf("Switching to: %d\n", i); */
 
         set_GLOBALS((*GLOBALS->contexts)[i]);
-        
+
         GLOBALS->lxt_clock_compress_to_z = g_old->lxt_clock_compress_to_z;
         GLOBALS->autoname_bundles = g_old->autoname_bundles;
         GLOBALS->autocoalesce_reversal = g_old->autocoalesce_reversal;
@@ -1851,23 +1851,23 @@ if(i < GLOBALS->num_notebook_pages)
         GLOBALS->highlight_wavewindow = g_old->highlight_wavewindow;
         GLOBALS->disable_mouseover = g_old->disable_mouseover;
         GLOBALS->zoom_pow10_snap = g_old->zoom_pow10_snap;
-                                         
+
         GLOBALS->scale_to_time_dimension = g_old->scale_to_time_dimension;
         GLOBALS->zoom_dyn = g_old->zoom_dyn;
         GLOBALS->zoom_dyne = g_old->zoom_dyne;
-                                                         
+
         gtk_notebook_set_current_page(GTK_NOTEBOOK(GLOBALS->notebook), GLOBALS->this_context_page);
         return(TRUE);
         }
-                
+
 return(FALSE);
-}                     
+}
 
 
 static int gtkwavetcl_setTabActive(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
 {
 if(objc == 2)
-        {       
+        {
 	gint rc;
 
 	if(!GLOBALS->in_tcl_callback)
@@ -1875,10 +1875,10 @@ if(objc == 2)
         	char *s = get_Tcl_string(objv[1]);
         	unsigned int tabnum = atoi(s);
 		rc = switch_to_tab_number(tabnum);
-        
+
         	MaxSignalLength();
         	signalarea_configure_event(GLOBALS->signalarea, NULL);
-        
+
         	gtkwave_main_iteration();
 		}
 		else
@@ -1893,7 +1893,7 @@ if(objc == 2)
         {
         return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 1));
         }
-       
+
 }
 
 
@@ -1907,11 +1907,11 @@ return(gtkwavetcl_printInteger(clientData, interp, objc, objv, value));
 static int gtkwavetcl_installFileFilter(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
 {
 if(objc == 2)
-        {       
+        {
         char *s = get_Tcl_string(objv[1]);
         unsigned int which = atoi(s);
 	gint rc = install_file_filter(which);
-        
+
         gtkwave_main_iteration();
 	return(gtkwavetcl_printInteger(clientData, interp, objc, objv, rc));
         }
@@ -1919,14 +1919,14 @@ if(objc == 2)
         {
         return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 1));
         }
-       
+
 }
 
 
 static int gtkwavetcl_setCurrentTranslateFile(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
 {
 if(objc == 2)
-        {       
+        {
         char *s = get_Tcl_string(objv[1]);
 	set_current_translate_file(s);
 
@@ -1936,14 +1936,14 @@ if(objc == 2)
         {
         return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 1));
         }
-       
+
 }
 
 
 static int gtkwavetcl_setCurrentTranslateEnums(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
 {
 if(objc == 2)
-        {       
+        {
         char *s = get_Tcl_string(objv[1]);
 	set_current_translate_enums(s);
 
@@ -1953,18 +1953,18 @@ if(objc == 2)
         {
         return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 1));
         }
-       
+
 }
 
 
 static int gtkwavetcl_installProcFilter(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
 {
 if(objc == 2)
-        {       
+        {
         char *s = get_Tcl_string(objv[1]);
         unsigned int which = atoi(s);
 	gint rc = install_file_filter(which);
-        
+
         gtkwave_main_iteration();
 	return(gtkwavetcl_printInteger(clientData, interp, objc, objv, rc));
         }
@@ -1972,14 +1972,14 @@ if(objc == 2)
         {
         return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 1));
         }
-       
+
 }
 
 
 static int gtkwavetcl_setCurrentTranslateProc(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
 {
 if(objc == 2)
-        {       
+        {
         char *s = get_Tcl_string(objv[1]);
 	set_current_translate_proc(s);
 
@@ -1989,18 +1989,18 @@ if(objc == 2)
         {
         return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 1));
         }
-       
+
 }
 
 
 static int gtkwavetcl_installTransFilter(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
 {
 if(objc == 2)
-        {       
+        {
         char *s = get_Tcl_string(objv[1]);
         unsigned int which = atoi(s);
 	gint rc = install_ttrans_filter(which);
-        
+
         gtkwave_main_iteration();
 	return(gtkwavetcl_printInteger(clientData, interp, objc, objv, rc));
         }
@@ -2008,14 +2008,14 @@ if(objc == 2)
         {
         return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 1));
         }
-       
+
 }
 
 
 static int gtkwavetcl_setCurrentTranslateTransProc(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
 {
 if(objc == 2)
-        {       
+        {
         char *s = get_Tcl_string(objv[1]);
 	set_current_translate_ttrans(s);
 
@@ -2025,7 +2025,7 @@ if(objc == 2)
         {
         return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 1));
         }
-       
+
 }
 
 
diff --git a/src/tcl_helper.c b/src/tcl_helper.c
index 96e3d3e..9732554 100644
--- a/src/tcl_helper.c
+++ b/src/tcl_helper.c
@@ -146,7 +146,7 @@ static char tclBackslash(const char* src, int* readPtr) {
  *  sequences.
  *----------------------------------------------------------------------
  */
-static int tclFindElement(const char* list, const char** elementPtr, 
+static int tclFindElement(const char* list, const char** elementPtr,
 			  const char** nextPtr, int* sizePtr, int *bracePtr) {
     register const char *p;
     int openBraces = 0;
@@ -389,7 +389,7 @@ char** zSplitTclList(const char* list, int* argcPtr) {
  * 1. They produce a proper list, one that will yield back the
  * argument strings when evaluated or when disassembled with
  * zSplitTclList.  This is the most important thing.
- * 
+ *
  * 2. They try to produce legible output, which means minimizing the
  * use of backslashes (using braces instead).  However, there are
  * some situations where backslashes must be used (e.g. an element
@@ -654,7 +654,7 @@ char* zMergeTclList(int argc, const char** argv) {
  * Results:
  *      Returns Trptr which corresponds to the mouse pointer y position.
  * ----------------------------------------------------------------------------
- */     
+ */
 
 static Trptr determine_trace_from_y(void)
 {
@@ -691,7 +691,7 @@ else
 	}
 
 if((t=GLOBALS->traces.first))
-        {       
+        {
         while(t)
                 {
                 t->flags&=~TR_HIGHLIGHT;
@@ -701,8 +701,8 @@ if((t=GLOBALS->traces.first))
         wavearea_configure_event(GLOBALS->wavearea, NULL);
 	}
 
-trtarget = ((int)y / (int)GLOBALS->fontheight) - 2; 
-if(trtarget < 0) 
+trtarget = ((int)y / (int)GLOBALS->fontheight) - 2;
+if(trtarget < 0)
 	{
 	return(NULL);
 	}
@@ -730,7 +730,7 @@ return(t);
 
 
 /* ----------------------------------------------------------------------------
- * check_gtkwave_directive_from_tcl_list - parses tcl list for any gtkwave 
+ * check_gtkwave_directive_from_tcl_list - parses tcl list for any gtkwave
  * directives
  *
  * Results:
@@ -741,11 +741,11 @@ return(t);
 
 static char **check_gtkwave_directive_from_tcl_list(char *s, int *l)
 {
-char** elem = NULL; 
-                         
+char** elem = NULL;
+
 elem = zSplitTclList(s, l);
-                 
-if(elem)  
+
+if(elem)
         {
         if(strcmp("gtkwave", elem[0]))
 		{
@@ -763,7 +763,7 @@ return(elem);
  * Results:
  *      Returns suitable name or NULL if not applicable.
  * ----------------------------------------------------------------------------
- */     
+ */
 
 static char *make_net_name_from_tcl_list(char *s, char **unescaped_str)
 {
@@ -838,7 +838,7 @@ if(elem)
 			}
 		*unescaped_str = s_new;
 		/* free_2(s_new); */
-		s_new = s_new2;				
+		s_new = s_new2;
 		}
 		else
 		{
@@ -856,7 +856,7 @@ return(s_new);
  * Results:
  *      Inserts traces if found in dumpfile, returns number of traces inserted
  * ----------------------------------------------------------------------------
- */     
+ */
 
 int process_tcl_list(char *sl, gboolean track_mouse_y)
 {
@@ -944,7 +944,7 @@ for(ii=0;ii<c;ii++)
 										{
 										lx2_import_masked();
 										}
-									
+
 									if(track_mouse_y)
 										{
 										t = determine_trace_from_y();
@@ -952,12 +952,12 @@ for(ii=0;ii<c;ii++)
 											{
 											t->flags |=  TR_HIGHLIGHT;
 											}
-										}	
+										}
 
 									memcpy(&GLOBALS->tcache_treesearch_gtk2_c_2,&GLOBALS->traces,sizeof(Traces));
 									GLOBALS->traces.total=0;
 									GLOBALS->traces.first=GLOBALS->traces.last=NULL;
-	
+
 									continue;
 									}
 									else
@@ -979,7 +979,7 @@ for(ii=0;ii<c;ii++)
 										{
 										break;
 										}
-	
+
 									if((!is)&&(GLOBALS->is_lx2)) { parsewavline_lx2(nxt_hd, NULL, 0); found++; } else { parsewavline(nxt_hd, NULL, 0); }
 									break;
 									}
@@ -1029,10 +1029,10 @@ for(ii=0;ii<c;ii++)
 	        {
 	        int was_packed = HIER_DEPACK_ALLOC;
 	        char *hfacname = NULL;
-	                                 
+
        		hfacname = hier_decompress_flagged(GLOBALS->facs[curr_srch_idx]->name, &was_packed);
 
-	        if(!strncmp(unescaped_str, hfacname, unesc_len)) 
+	        if(!strncmp(unescaped_str, hfacname, unesc_len))
 	                {
 			int hfacname_len = strlen(hfacname);
 			if((unesc_len == hfacname_len) || ((hfacname_len > unesc_len) && (hfacname[unesc_len] == '[')))
@@ -1048,7 +1048,7 @@ for(ii=0;ii<c;ii++)
 
 		curr_srch_idx++;
 		if(curr_srch_idx == GLOBALS->numfacs) curr_srch_idx = 0; /* optimization for rtlbrowse as names should be in order */
-		        
+
 	        if(was_packed) { free_2(hfacname); }
 	        }
 
@@ -1060,15 +1060,15 @@ for(ii=0;ii<c;ii++)
 	strcat(entry_suffixed,s_new);
 	strcat(entry_suffixed,this_regex);
 
-	wave_regex_compile(entry_suffixed, WAVE_REGEX_DND); 
+	wave_regex_compile(entry_suffixed, WAVE_REGEX_DND);
 	for(i=0;i<GLOBALS->numfacs;i++)
 	        {
 	        int was_packed = HIER_DEPACK_ALLOC;
 	        char *hfacname = NULL;
-	                                 
+
        		hfacname = hier_decompress_flagged(GLOBALS->facs[i]->name, &was_packed);
 
-	        if(wave_regex_match(hfacname, WAVE_REGEX_DND)) 
+	        if(wave_regex_match(hfacname, WAVE_REGEX_DND))
 	                {
 			found++;
 			match_idx_list[ii] = i;
@@ -1076,7 +1076,7 @@ for(ii=0;ii<c;ii++)
 		        if(was_packed) { free_2(hfacname); }
 			goto import;
 	                }
-		        
+
 	        if(was_packed) { free_2(hfacname); }
 	        }
 
@@ -1090,15 +1090,15 @@ for(ii=0;ii<c;ii++)
 		strcat(entry_suffixed,s_new);
 		strcat(entry_suffixed,this_regex);
 
-		wave_regex_compile(entry_suffixed, WAVE_REGEX_DND); 
+		wave_regex_compile(entry_suffixed, WAVE_REGEX_DND);
 		for(i=0;i<GLOBALS->numfacs;i++)
 		        {
 		        int was_packed = HIER_DEPACK_ALLOC;
 		        char *hfacname = NULL;
-		                                 
+
         		hfacname = hier_decompress_flagged(GLOBALS->facs[i]->name, &was_packed);
-	
-		        if(wave_regex_match(hfacname, WAVE_REGEX_DND)) 
+
+		        if(wave_regex_match(hfacname, WAVE_REGEX_DND))
 		                {
 				found++;
 				match_idx_list[ii] = i;
@@ -1106,7 +1106,7 @@ for(ii=0;ii<c;ii++)
 			        if(was_packed) { free_2(hfacname); }
 				goto import;
 		                }
-			        
+
 		        if(was_packed) { free_2(hfacname); }
 		        }
 		}
@@ -1166,7 +1166,7 @@ for(ii=0;ii<c;ii++)
 			nptr nexp;
 			int bit = atoi(most_recent_lbrack_list[ii]+1 + (match_type_list[ii] == 3)); /* == 3 for adjustment when lbrack is escaped */
 			int which, cnt;
-			
+
 			if(s->n->lsi > s->n->msi)
 				{
 				for(which=0,cnt=s->n->lsi ; cnt>=s->n->msi ; cnt--,which++)
@@ -1221,13 +1221,13 @@ GLOBALS->traces.bufferlast=GLOBALS->traces.last;
 GLOBALS->traces.first=GLOBALS->tcache_treesearch_gtk2_c_2.first;
 GLOBALS->traces.last=GLOBALS->tcache_treesearch_gtk2_c_2.last;
 GLOBALS->traces.total=GLOBALS->tcache_treesearch_gtk2_c_2.total;
-                                
+
 if((t) || (!track_mouse_y))
 	{
 	PasteBuffer();
 	}
 	else
-	{	
+	{
 	PrependBuffer();
 	}
 
@@ -1324,15 +1324,15 @@ if(s)
 	int was_packed = HIER_DEPACK_ALLOC;
 	char *s2;
 
-	s = hier_decompress_flagged(s, &was_packed);	
+	s = hier_decompress_flagged(s, &was_packed);
 	len = strlen(s);
 	s2 = wave_alloca(len+1);
-	
+
 	strcpy(s2, s);
 	if(was_packed)
 		{
 		free_2(s);
-		s = NULL; 
+		s = NULL;
 		}
 
 	pnt = s2;
@@ -1346,10 +1346,10 @@ if(s)
 		else if(*pnt == '[') { lbrack = pnt; }
 		else if(*pnt == ':') { colon  = pnt; }
 		else if(*pnt == ']') { rbrack = pnt; }
-	
+
 		pnt++;
 		}
-	
+
 	if(!preserve_range) /* added for gtkwave::addSignalsFromList */
 		{
 		if((lbrack && colon && rbrack && ((colon-lbrack)>0) && ((rbrack - colon)>0) && ((rbrack-lbrack)>0)) || (lbrack && promote_to_bus))
@@ -1378,7 +1378,7 @@ if(s)
 			}
 		}
 
-	
+
 	tcllist = zMergeTclList(delim_cnt+1, names);
 	tcllist_len = strlen(tcllist);
 	free_2(names);
@@ -1388,7 +1388,7 @@ if(s)
 		if(is_bus)
 			{
 			len = 8 + strlen(tcllist) + 1 + 1 + 1; /* "{netBus ...} " + trailing null char */
-	
+
 			/* pnt = s2; */ /* scan-build */
 			rpnt = malloc_2(len+1);
 			strcpy(rpnt, "{netBus ");
@@ -1397,7 +1397,7 @@ if(s)
 			else
 			{
 			len = 5 + strlen(tcllist) + 1 + 1 + 1; /* "{net ...} " + trailing null char */
-	
+
 			/* pnt = s2; */ /* scan-build */
 			rpnt = malloc_2(len+1);
 			strcpy(rpnt, "{net ");
@@ -1411,7 +1411,7 @@ if(s)
 		if(is_bus)
 			{
 			len = 15 + (len_value + 1) + strlen(tcllist) + 1 + 1 + 1; /* "{netBusValue 0x...} " + trailing null char */
-	
+
 			/* pnt = s2; */ /* scan-build */
 			rpnt = malloc_2(len+1);
 			sprintf(rpnt, "{netBusValue 0x%s ", opt_value);
@@ -1420,7 +1420,7 @@ if(s)
 			else
 			{
 			len = 10 + (len_value + 1) + strlen(tcllist) + 1 + 1 + 1; /* "{netValue ...} " + trailing null char */
-	
+
 			/* pnt = s2; */ /* scan-build */
 			rpnt = malloc_2(len+1);
 			sprintf(rpnt, "{netValue %s ", opt_value);
@@ -1608,7 +1608,7 @@ return(add_traces_from_signal_window(FALSE));
  * add_traces_from_signal_window - generates tcl names from all sigwin ones
  *
  * Results:
- *      tcl list containing all generated names, does not contain 
+ *      tcl list containing all generated names, does not contain
  *      {gtkwave NET OFF} directive as this is intended for tcl program usage.
  * ----------------------------------------------------------------------------
  */
@@ -1641,7 +1641,7 @@ while(t)
 			unsigned char *bits = v ? (v->v) : NULL;
 			char *first_str = NULL;
 			int coalesce_pass = 1;
-                                        
+
                         nodes=t->n.vec->bits->nodes;
 
 			for(i=0;i<t->n.vec->bits->nnbits;i++)
@@ -1722,8 +1722,8 @@ while(t)
 					nptr n = nodes[i]->expansion->parent;
 					char *str = append_array_row(n);
 					char *p = strrchr(str, '[');
-					if(p) { *p = 0; }					
-              
+					if(p) { *p = 0; }
+
                         		if(n->lsi > n->msi)
                                 		{
                                 		for(which=0,cnt=n->lsi ; cnt>=n->msi ; cnt--,which++)
@@ -1737,7 +1737,7 @@ while(t)
                                         		{
                                         		if(cnt==bit) break;
                                         		}
-                                		}   
+                                		}
 
 					sprintf(str+strlen(str), "[%d]", which);
 					if(!mult_entry) { one_entry = make_gtkwave_pid(); WAVE_OE_ME one_entry = strdup_2(netoff); WAVE_OE_ME }
@@ -1783,8 +1783,8 @@ while(t)
 				nptr n = t->n.nd->expansion->parent;
 				char *str = append_array_row(n);
 				char *p = strrchr(str, '[');
-				if(p) { *p = 0; }					
-              
+				if(p) { *p = 0; }
+
                        		if(n->lsi > n->msi)
                                		{
                                		for(which=0,cnt=n->lsi ; cnt>=n->msi ; cnt--,which++)
@@ -1798,7 +1798,7 @@ while(t)
                                        		{
                                        		if(cnt==bit) break;
                                        		}
-                               		}   
+                               		}
 
 				sprintf(str+strlen(str), "[%d]", which);
 				if(!mult_entry) { one_entry = make_gtkwave_pid(); WAVE_OE_ME one_entry = strdup_2(netoff); WAVE_OE_ME}
@@ -1878,12 +1878,12 @@ sig_selection_foreach_dnd
 
   /* Get the tree.  */
   gtk_tree_model_get (model, iter, TREE_COLUMN, &sel, -1);
- 
+
   if(!sel) return;
 
   low = fetchlow(sel)->t_which;
   high = fetchhigh(sel)->t_which;
- 
+
   /* If signals are vectors, iterate through them if so.  */
   for(i=low;i<=high;i++)
         {
@@ -1900,7 +1900,7 @@ sig_selection_foreach_dnd
                         }
                 }
 		else
-		{		
+		{
                 one_entry = make_single_tcl_list_name(s->n->nname, NULL, 0, 0);
                 WAVE_OE_ME
 		}
@@ -1985,8 +1985,8 @@ static char *make_message (const char *fmt, ...)
  *
  * Results:
  *      tcl list which mimics a gtkwave save file for cut and paste entries
- *      which is later iteratively run through the normal gtkwave save file 
- *      loader parsewavline() on the distant end.  the reason this is 
+ *      which is later iteratively run through the normal gtkwave save file
+ *      loader parsewavline() on the distant end.  the reason this is
  *      necessary is in order to pass attribute and concatenation information
  *      along to the distant end.
  * ----------------------------------------------------------------------------
@@ -2051,7 +2051,7 @@ char *emit_gtkwave_savefile_formatted_entries_in_tcl_list(Trptr t, gboolean use_
 			}
 		prevshift=t->shift;
 
-		if(!(t->flags&(TR_BLANK|TR_ANALOG_BLANK_STRETCH)))	
+		if(!(t->flags&(TR_BLANK|TR_ANALOG_BLANK_STRETCH)))
 			{
 			if(t->flags & TR_FTRANSLATED)
 				{
@@ -2114,7 +2114,7 @@ char *emit_gtkwave_savefile_formatted_entries_in_tcl_list(Trptr t, gboolean use_
 				bptr bits;
 				baptr ba;
 
-				if(HasAlias(t)) { one_entry = make_message("+{%s} ",t->name_full); 
+				if(HasAlias(t)) { one_entry = make_message("+{%s} ",t->name_full);
 				                  WAVE_OE_ME }
 				bits = t->n.vec->bits;
 				ba = bits ? bits->attribs : NULL;
@@ -2150,7 +2150,7 @@ char *emit_gtkwave_savefile_formatted_entries_in_tcl_list(Trptr t, gboolean use_
 				{
 				  nptr nd = (t->vector && t->n.vec->transaction_cache && t->n.vec->transaction_cache->transaction_nd) ?
 						t->n.vec->transaction_cache->transaction_nd : t->n.nd;
-			
+
 				  if(HasAlias(t))
 					{
 					if(nd->expansion)
@@ -2221,7 +2221,7 @@ return(mult_entry);
 enum GtkwaveFtype { WAVE_FTYPE_UNKNOWN, WAVE_FTYPE_DUMPFILE, WAVE_FTYPE_STEMSFILE, WAVE_FTYPE_SAVEFILE };
 
 /* ----------------------------------------------------------------------------
- * determine_ftype - examines filename (perhaps initial contents) and 
+ * determine_ftype - examines filename (perhaps initial contents) and
  *      determines file type
  *
  * Results:
@@ -2285,7 +2285,7 @@ if(dot)
 			(!strcasecmp("ghw.bz2", dot2+1)) ||
 			(!strcasecmp("ghw.bz2", dot2+1)) ||
 			(!strcasecmp("vcd.gz", dot2+1))  ||
-			(!strcasecmp("vcd.zip", dot2+1)) 
+			(!strcasecmp("vcd.zip", dot2+1))
 			)
 			{
 			ftype = WAVE_FTYPE_DUMPFILE;
@@ -2308,7 +2308,7 @@ if(dot)
 			{
 			ftype = WAVE_FTYPE_STEMSFILE; /* stems file */
 			}
-		else 
+		else
 		if(ch0 == '[')
 			{
 			ftype = WAVE_FTYPE_SAVEFILE; /* save file */
@@ -2348,7 +2348,7 @@ switch(ftype)
 				{
 				char *dfn_local = strdup(dfn);
 				free_2(dfn);
-				
+
 				processing_missing_file = 1;
 				if(process_url_file(dfn_local))
 					{
@@ -2501,7 +2501,7 @@ for(;;)
 
 if(url_list)
 	{
-	if(url_cnt > 2) 
+	if(url_cnt > 2)
 		{
 		qsort(url_list, url_cnt, sizeof(struct gchar *), uri_cmp);
 		}
@@ -2552,10 +2552,10 @@ static const int tclcb_var_flags[] = { WAVE_TCLCB_MACRO_EXPANSION };
 #define WAVE_TCLCB_M(a,b,c) c
 static const char *tclcb_var_inits[] = { WAVE_TCLCB_MACRO_EXPANSION };
 
-static void declare_tclcb_variables(Tcl_Interp *interp) 
+static void declare_tclcb_variables(Tcl_Interp *interp)
 {
 int i = 0 ;
-while(tclcb_var_flags[i] != -1) 
+while(tclcb_var_flags[i] != -1)
 	{
 	gtkwavetcl_setvar(tclcb_var_names[i], tclcb_var_inits[i], tclcb_var_flags[i]) ;
 	i++;
@@ -2638,7 +2638,7 @@ if(GLOBALS->in_tcl_callback) /* don't allow callbacks to call menu functions (ye
 	sprintf(reportString, "gtkwave::%s prohibited in callback", menuItem);
 	gtkwavetcl_setvar_nonblocking(WAVE_TCLCB_ERROR,reportString,WAVE_TCLCB_ERROR_FLAGS);
 
-	aobj = Tcl_NewStringObj(reportString, -1); 
+	aobj = Tcl_NewStringObj(reportString, -1);
 	Tcl_SetObjResult(interp, aobj);
 	return(TCL_ERROR);
 	}
@@ -2724,9 +2724,9 @@ if((nam) && (strlen(nam)) && (!GLOBALS->tcl_running))
 	tclrc = Tcl_Eval (GLOBALS->interp, tcl_cmd);
 	GLOBALS->tcl_running = 0;
 
-	if(tclrc != TCL_OK) 
-		{ 
-		tpnt = strdup_2(Tcl_GetStringResult (GLOBALS->interp)); 
+	if(tclrc != TCL_OK)
+		{
+		tpnt = strdup_2(Tcl_GetStringResult (GLOBALS->interp));
 		}
 		else
 		{
@@ -2782,7 +2782,7 @@ int  gtkwaveInterpreterInit(Tcl_Interp *interp) {
 	      if(*pnt==' ') *pnt='_';
 	      pnt++;
 	    }
-	
+
 	  Tcl_CreateObjCommand(interp, commandName,
 			       (Tcl_ObjCmdProc *)menu_func,
 			       (ClientData)(ife+i), (Tcl_CmdDeleteProc *)NULL);
@@ -2804,7 +2804,7 @@ int  gtkwaveInterpreterInit(Tcl_Interp *interp) {
   /* hide the "wish" window */
   Tcl_Eval(interp, "wm withdraw .");
 
-  Tcl_Eval(interp, 
+  Tcl_Eval(interp,
     "puts \"Interpreter id is [file tail $::argv0]\"");
 
   if (GLOBALS->tcl_init_cmd)
@@ -2844,14 +2844,14 @@ if((GLOBALS->repscript_name) && (!GLOBALS->tcl_running))
 	tclrc = Tcl_Eval (GLOBALS->interp, tcl_cmd);
 	GLOBALS->tcl_running = 0;
 #if WAVE_TCL_CHECK_VERSION(8,5,0)
-	if(tclrc != TCL_OK) { 
+	if(tclrc != TCL_OK) {
 	  Tcl_Obj *options;
 	  Tcl_Obj *key;
 	  Tcl_Obj *stackTrace;
 
-	  fprintf(stderr, "GTKWAVE | %s\n", 
-		  Tcl_GetStringResult (GLOBALS->interp)); 
-	  options = Tcl_GetReturnOptions(GLOBALS->interp, tclrc);  
+	  fprintf(stderr, "GTKWAVE | %s\n",
+		  Tcl_GetStringResult (GLOBALS->interp));
+	  options = Tcl_GetReturnOptions(GLOBALS->interp, tclrc);
 	  key = Tcl_NewStringObj("-errorinfo", -1);
 	  Tcl_IncrRefCount(key);
 	  Tcl_DictObjGet(NULL, options, key, &stackTrace);
@@ -2900,7 +2900,7 @@ void make_tcl_interpreter(char *argv[])
   gtkwave_mlist_t *ife;
   int num_menu_items;
   int n = 0;
-  
+
 #ifndef WAVE_TCL_STUBIFY
   Tcl_FindExecutable(argv[0]);
 #endif
@@ -2944,46 +2944,46 @@ void make_tcl_interpreter(char *argv[])
 #endif
 
 #ifndef WAVE_TCL_STUBIFY
-  if (TCL_OK != Tcl_Init(GLOBALS->interp)) 
+  if (TCL_OK != Tcl_Init(GLOBALS->interp))
     {
       fprintf(stderr, "GTKWAVE | Tcl_Init error: %s\n", Tcl_GetStringResult (GLOBALS->interp));
       exit(EXIT_FAILURE);
     }
 #endif
-  
+
   strcpy(commandName, "gtkwave::");
-  
+
   ife = retrieve_menu_items_array(&num_menu_items);
   for(i=0;i<num_menu_items;i++)
     {
       if(ife[i].callback)
 	{
 	  char *pnt = commandName + 9;
-	  strcpy(pnt, ife[i].path);	
+	  strcpy(pnt, ife[i].path);
 	  while(*pnt)
 	    {
 	      if(*pnt==' ') *pnt='_';
 	      pnt++;
 	    }
-	  
+
 	  Tcl_CreateObjCommand(GLOBALS->interp, commandName,
 			       (Tcl_ObjCmdProc *)menu_func,
 			       (ClientData)(ife+i), (Tcl_CmdDeleteProc *)NULL);
 	}
     }
-  
-  
-  for (i = 0; gtkwave_commands[i].func != NULL; i++) 
+
+
+  for (i = 0; gtkwave_commands[i].func != NULL; i++)
     {
       strcpy(commandName + 9, gtkwave_commands[i].cmdstr);
-      
+
       Tcl_CreateObjCommand(GLOBALS->interp, commandName,
                 (Tcl_ObjCmdProc *)gtkwave_commands[i].func,
 			   (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL);
     }
-  
+
   declare_tclcb_variables(GLOBALS->interp);
-  
+
   if(GLOBALS->repscript_name)
     {
       FILE *f = fopen(GLOBALS->repscript_name, "rb");
@@ -2999,7 +2999,7 @@ void make_tcl_interpreter(char *argv[])
 	  exit(255);
 	}
     }
-  
+
   init_setvar_timer(GLOBALS->interp);
 }
 
diff --git a/src/tcl_helper.h b/src/tcl_helper.h
index 0cdfa4f..e23dfd4 100644
--- a/src/tcl_helper.h
+++ b/src/tcl_helper.h
@@ -53,14 +53,14 @@ extern tcl_cmdstruct gtkwave_commands[];
 			} \
 		}
 
-struct iter_dnd_strings 
+struct iter_dnd_strings
 	{
 	char *one_entry;
 	char *mult_entry;
 	int mult_len;
 	};
 
-typedef enum {LL_NONE, LL_INT, LL_UINT, LL_CHAR, LL_SHORT, LL_STR, 
+typedef enum {LL_NONE, LL_INT, LL_UINT, LL_CHAR, LL_SHORT, LL_STR,
 	      LL_VOID_P, LL_TIMETYPE} ll_elem_type;
 
 typedef union llist_payload {
diff --git a/src/tcl_np.c b/src/tcl_np.c
index b9e8512..8cef11e 100644
--- a/src/tcl_np.c
+++ b/src/tcl_np.c
@@ -27,7 +27,7 @@
 #   define LIB_RUNTIME_DIR ""
 #endif
 #  define XP_UNIX 1
- 
+
 /*
  * Default directory in which to look for Tcl libraries.  The
  * symbol is defined by Makefile.
@@ -67,8 +67,8 @@ extern int NpLoadLibrary(HMODULE *tclHandle, char *dllName, int dllNameSize,
 			 char *me) {
   char *envdll, libname[MAX_PATH];
   HMODULE handle = (HMODULE) NULL;
-  
-  char path[MAX_PATH], *p ; 
+
+  char path[MAX_PATH], *p ;
   /* #include <windows.h> */
   /* #include <iostream> */
   if( !GetModuleFileName(NULL, path, MAX_PATH) ) {
@@ -105,7 +105,7 @@ extern int NpLoadLibrary(HMODULE *tclHandle, char *dllName, int dllNameSize,
     /*
      * Try based on full path.
      */
-    snprintf(libname, MAX_PATH, "%stcl%d%d.dll", defaultLibraryDir, 
+    snprintf(libname, MAX_PATH, "%stcl%d%d.dll", defaultLibraryDir,
 	     TCL_MAJOR_VERSION, TCL_MINOR_VERSION);
     NpLog("Attempt to load Tcl dll (default) '%s'\n", libname);
     handle = LoadLibrary(libname);
@@ -115,7 +115,7 @@ extern int NpLoadLibrary(HMODULE *tclHandle, char *dllName, int dllNameSize,
     /*
      * Try based on anywhere in the path.
      */
-    snprintf(libname, MAX_PATH, "tcl%d%d.dll", TCL_MAJOR_VERSION, 
+    snprintf(libname, MAX_PATH, "tcl%d%d.dll", TCL_MAJOR_VERSION,
 	     TCL_MINOR_VERSION);
     NpLog("Attempt to load Tcl dll (libpath) '%s'\n", libname);
     handle = LoadLibrary(libname);
@@ -133,7 +133,7 @@ extern int NpLoadLibrary(HMODULE *tclHandle, char *dllName, int dllNameSize,
 			  KEY_READ, &regKey);
     if (result != ERROR_SUCCESS) {
       NpLog("Could not access registry \"HKLM\\%s\"\n", TCL_REG_DIR_KEY);
-      
+
       result = RegOpenKeyEx(HKEY_CURRENT_USER, TCL_REG_DIR_KEY, 0,
 			    KEY_READ, &regKey);
       if (result != ERROR_SUCCESS) {
@@ -141,7 +141,7 @@ extern int NpLoadLibrary(HMODULE *tclHandle, char *dllName, int dllNameSize,
 	return TCL_ERROR;
       }
     }
-    
+
     result = RegQueryValueEx(regKey, "CurrentVersion", NULL, NULL,
 			     vers, &size);
     RegCloseKey(regKey);
@@ -150,15 +150,15 @@ extern int NpLoadLibrary(HMODULE *tclHandle, char *dllName, int dllNameSize,
 	    TCL_REG_DIR_KEY);
       return TCL_ERROR;
     }
-    
+
     snprintf(path, MAX_PATH, "%s\\%s", TCL_REG_DIR_KEY, vers);
-    
+
     result = RegOpenKeyEx(HKEY_LOCAL_MACHINE, path, 0, KEY_READ, &regKey);
     if (result != ERROR_SUCCESS) {
       NpLog("Could not access registry \"%s\"\n", path);
       return TCL_ERROR;
     }
-    
+
     size = MAX_PATH;
     result = RegQueryValueEx(regKey, NULL, NULL, NULL, path, &size);
     RegCloseKey(regKey);
@@ -166,9 +166,9 @@ extern int NpLoadLibrary(HMODULE *tclHandle, char *dllName, int dllNameSize,
       NpLog("Could not access registry \"%s\" Default\n", TCL_REG_DIR_KEY);
       return TCL_ERROR;
     }
-    
+
     NpLog("Found current Tcl installation at \"%s\"\n", path);
-    
+
     snprintf(libname, MAX_PATH, "%s\\bin\\tcl%d%d.dll", path,
 	     TCL_MAJOR_VERSION, TCL_MINOR_VERSION);
     NpLog("Attempt to load Tcl dll (registry) '%s'\n", libname);
@@ -179,7 +179,7 @@ extern int NpLoadLibrary(HMODULE *tclHandle, char *dllName, int dllNameSize,
     NpLog("NpLoadLibrary: could not find dll '%s'\n", libname);
     return TCL_ERROR;
   }
-  
+
   *tclHandle = handle;
   if (dllNameSize > 0) {
     /*
@@ -190,7 +190,7 @@ extern int NpLoadLibrary(HMODULE *tclHandle, char *dllName, int dllNameSize,
       int length;
       char *msgPtr;
       DWORD code = GetLastError();
-      
+
       length = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM
 			      | FORMAT_MESSAGE_ALLOCATE_BUFFER, NULL, code,
 			      MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
@@ -213,7 +213,7 @@ BOOL WINAPI DllMain(HINSTANCE hDLL, DWORD dwReason, LPVOID lpReserved) {
   case DLL_PROCESS_ATTACH:
     nptclInst = hDLL;
     break;
-    
+
   case DLL_PROCESS_DETACH:
     nptclInst = NULL;
     break;
@@ -221,7 +221,7 @@ BOOL WINAPI DllMain(HINSTANCE hDLL, DWORD dwReason, LPVOID lpReserved) {
   return TRUE;
 }
 
-#else 
+#else
 /* !WIN32 */
 
 #  include <string.h>
@@ -243,7 +243,7 @@ BOOL WINAPI DllMain(HINSTANCE hDLL, DWORD dwReason, LPVOID lpReserved) {
 /*
  *----------------------------------------------------------------------
  * NpMyDirectoryPath --
- * 
+ *
  * Results:
  *   Full directory path to the current executable or NULL
  *----------------------------------------------------------------------
@@ -252,7 +252,7 @@ char *NpMyDirectoryPath(char *path, int path_max_len) {
      int length;
      char *p ;
      length = readlink("/proc/self/exe", path, path_max_len);
-     
+
      if ((length < 0) || (length >= path_max_len)) {
        fprintf(stderr, "Error while looking for executable path.\n");
        path = NULL ;
@@ -296,10 +296,10 @@ char *NpMyDirectoryPath(char *path, int path_max_len) {
 			  char *me) {
   char *envdll, libname[MAX_PATH];
   HMODULE handle = (HMODULE) NULL;
-  char path[MAX_PATH], *p ; 
-  
+  char path[MAX_PATH], *p ;
+
   *tclHandle = NULL;
-  if(me) 
+  if(me)
     strcpy(path, me) ;
   if(me && (p = strrchr(path,'/'))) {
     *(++p) = '\0' ;
@@ -313,7 +313,7 @@ char *NpMyDirectoryPath(char *path, int path_max_len) {
   } else {
     handle = NULL ;
   }
-  
+
   /*
    * Try a user-supplied Tcl dll to start with.
    */
@@ -327,7 +327,7 @@ char *NpMyDirectoryPath(char *path, int path_max_len) {
       }
     }
   }
-  
+
   if (!handle) {
     /*
      * Try based on full path.
@@ -336,7 +336,7 @@ char *NpMyDirectoryPath(char *path, int path_max_len) {
     NpLog("Attempt to load Tcl dll (default) '%s'\n", libname);
     handle = dlopen(libname, RTLD_NOW | RTLD_GLOBAL);
   }
-  
+
   if (!handle) {
     /*
      * Try based on anywhere in the path.
@@ -345,13 +345,13 @@ char *NpMyDirectoryPath(char *path, int path_max_len) {
     NpLog("Attempt to load Tcl dll (libpath) '%s'\n", libname);
     handle = dlopen(libname, RTLD_NOW | RTLD_GLOBAL);
   }
-  
+
   if (!handle) {
     /*
      * Try different versions anywhere in the path.
      */
     char *pos;
-    
+
     pos = strstr(libname, "tcl")+4;
     if (*pos == '.') {
       pos++;
@@ -362,12 +362,12 @@ char *NpMyDirectoryPath(char *path, int path_max_len) {
       handle = dlopen(libname, RTLD_NOW | RTLD_GLOBAL);
     }
   }
-  
+
   if (!handle) {
     NpPlatformMsg("Failed to load Tcl dll!", "NpCreateMainInterp");
     return TCL_ERROR;
   }
-  
+
   *tclHandle = handle;
   if (dllNameSize > 0) {
 #  ifdef HAVE_DLADDR
@@ -378,7 +378,7 @@ char *NpMyDirectoryPath(char *path, int path_max_len) {
     int (* tcl_Init)(Tcl_Interp *) =
       (int (*)(Tcl_Interp *)) dlsym(handle, "Tcl_Init");
     Dl_info info;
-    
+
     if (tcl_Init && dladdr(tcl_Init, &info)) {
       NpLog3("using dladdr '%s' => '%s'\n", libname, info.dli_fname);
       snprintf(dllName, dllNameSize, "%s", info.dli_fname); /* format arg was missing */
@@ -388,7 +388,7 @@ char *NpMyDirectoryPath(char *path, int path_max_len) {
   }
   return TCL_OK;
 }
-#endif 
+#endif
 /* !WIN32 */
 
 /* **** Cinterp */
@@ -454,7 +454,7 @@ static Tcl_Interp *mainInterp = NULL;
 
 int NpInitInterp(Tcl_Interp *interp, int install_tk) {
   Tcl_Preserve((ClientData) interp);
-  
+
   /*
    * Set sharedlib in interp while we are here.  This will be used to
    * base the location of the default pluginX.Y package in the stardll
@@ -465,7 +465,7 @@ int NpInitInterp(Tcl_Interp *interp, int install_tk) {
     NpPlatformMsg("Failed to set plugin(sharedlib)!", "NpInitInterp");
     return TCL_ERROR;
   }
-  
+
   /*
    * The plugin doesn't directly call Tk C APIs - it's all managed at
    * the Tcl level, so we can just pkg req Tk here instead of calling
@@ -479,7 +479,7 @@ int NpInitInterp(Tcl_Interp *interp, int install_tk) {
   if (install_tk) {
     NpLog("Tcl_PkgRequire(\"Tk\", \"%s\", 0)\n", TK_VERSION);
     if (1 && Tcl_PkgRequire(interp, "Tk", TK_VERSION, 0) == NULL) {
-      CONST char *msg = Tcl_GetVar(interp, "errorInfo", TCL_GLOBAL_ONLY);      
+      CONST char *msg = Tcl_GetVar(interp, "errorInfo", TCL_GLOBAL_ONLY);
       NpPlatformMsg(msg, "NpInitInterp Tcl_PkgRequire(Tk)");
       NpPlatformMsg("Failed to create initialize Tk", "NpInitInterp");
       return TCL_ERROR;
@@ -507,7 +507,7 @@ int NpInitInterp(Tcl_Interp *interp, int install_tk) {
 Tcl_Interp *NpCreateMainInterp(char *me, int install_tk) {
   ThreadSpecificData *tsdPtr;
   Tcl_Interp *interp;
-  
+
 #ifdef USE_TCL_STUBS
   /*
    * Determine the libname and version number dynamically
@@ -524,7 +524,7 @@ Tcl_Interp *NpCreateMainInterp(char *me, int install_tk) {
       return NULL;
     }
     NpLog("NpCreateMainInterp: Using dll '%s'\n", dllName);
-    
+
     tclHandleCnt++;
     DLSYM(tclHandle, "Tcl_CreateInterp", Tcl_Interp * (*)(),
 	  tcl_createInterp);
@@ -537,7 +537,7 @@ Tcl_Interp *NpCreateMainInterp(char *me, int install_tk) {
 #endif
       return NULL;
     }
-    DLSYM(tclHandle, "Tcl_CreateThread", 
+    DLSYM(tclHandle, "Tcl_CreateThread",
 	  int (*)(Tcl_ThreadId *, Tcl_ThreadCreateProc, ClientData, int, int),
 	  tcl_createThread);
     DLSYM(tclHandle, "Tcl_FindExecutable", void (*)(const char *),
@@ -579,7 +579,7 @@ Tcl_Interp *NpCreateMainInterp(char *me, int install_tk) {
 		  "NpCreateMainInterp");
     return NULL;
   }
-  
+
   /*
    * Until Tcl_InitStubs is called, we cannot make any Tcl API
    * calls without grabbing them by symbol out of the dll.
@@ -598,15 +598,15 @@ Tcl_Interp *NpCreateMainInterp(char *me, int install_tk) {
    * From now until shutdown we need this interp alive, hence we
    * preserve it here and release it at NpDestroyInterp time.
    */
-  
+
   tsdPtr = TCL_TSD_INIT(&dataKey);
   tsdPtr->interp = interp;
   mainInterp = interp;
-  
+
   if (NpInitInterp(interp, install_tk) != TCL_OK) {
     return NULL;
   }
-  
+
   return interp;
 }
 
@@ -668,7 +668,7 @@ void NpDestroyMainInterp() {
    * We are done using Tcl, so call Tcl_Finalize to get it to unload
    * cleanly.  With stubs, we need to handle dll finalization.
    */
-  
+
 #ifdef USE_TCL_STUBS
   tclHandleCnt--;
   if (tclHandle && tclHandleCnt <= 0) {
@@ -702,15 +702,15 @@ void NpDestroyMainInterp() {
 Tcl_Interp *NpGetInstanceInterp(int install_tk) {
   ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
   Tcl_Interp *interp;
-  
+
   if (tsdPtr->interp != NULL) {
     NpLog("NpGetInstanceInterp - use main interp %p\n", (void *)tsdPtr->interp);
     return tsdPtr->interp;
   }
-  
+
   interp = Tcl_CreateInterp();
   NpLog("NpGetInstanceInterp - create interp %p\n", (void *)interp);
-  
+
   if (NpInitInterp(interp, install_tk) != TCL_OK) {
     NpLog("NpGetInstanceInterp: NpInitInterp(%p) != TCL_OK\n", (void *)interp);
     return NULL;
@@ -746,7 +746,7 @@ Tcl_Interp *NpGetInstanceInterp(int install_tk) {
 
 void NpDestroyInstanceInterp(Tcl_Interp *interp) {
   ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
-  
+
   if (tsdPtr->interp == interp) {
     NpLog("NpDestroyInstanceInterp(%p) - using main interp\n", (void *)interp);
     return;
diff --git a/src/tcl_support_commands.c b/src/tcl_support_commands.c
index 05bfd37..6899bb7 100644
--- a/src/tcl_support_commands.c
+++ b/src/tcl_support_commands.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Yiftach Tzori 2009-2012.
  *
  * This program is free software; you can redistribute it and/or
@@ -45,7 +45,7 @@ GtkCTreeNode *SST_find_node_by_path(GtkCTreeRow *root, char *path) {
     *p1 = '\0' ;
   }
   while (gctr)  {
-    if ((p1 = strchr(p, '.'))) 
+    if ((p1 = strchr(p, '.')))
       *p1 = '\0' ;
     t = (struct tree *)(gctr->row.data) ;
     i = 0 ;
@@ -98,7 +98,7 @@ int SST_open_path(GtkCTree *ctree, GtkCTreeNode *node) {
  * Inputs:
  *   char *name :: hierachical path to open
  * Output:
- *   One of: 
+ *   One of:
  *     SST_NODE_FOUND - if path is in the dump file
  *     SST_NODE_NOT_EXIST - is path is not in the dump
  *     SST_TREE_NOT_EXIST - is Tree widget does not exist
@@ -151,12 +151,12 @@ llist_p *llist_new(llist_u v, ll_elem_type type, int arg) {
   case LL_TIMETYPE: p->u.tt = v.tt ; break ;
   case LL_CHAR: p->u.c = v.c ; break ;
   case LL_SHORT: p->u.s = v.s ; break ;
-  case LL_STR: 
+  case LL_STR:
     if(arg == -1)
       p->u.str = strdup_2(v.str) ;
     else {
       p->u.str = (char *)malloc_2(arg) ;
-      strncpy(p->u.str, v.str, arg) ; 
+      strncpy(p->u.str, v.str, arg) ;
       p->u.str[arg] = '\0' ;
     }
     break ;
@@ -194,12 +194,12 @@ llist_p *llist_append(llist_p *head, llist_p *elem, llist_p **tail) {
   }
   return head ;
 }
-/* 
+/*
 * Remove the last element from list whose first member is HEAD
 * if TYPE is LL_STR the memory allocated for this string is freed.
-* if the TYPE is LL_VOID_P that the caller supplied function pointer F() is 
+* if the TYPE is LL_VOID_P that the caller supplied function pointer F() is
 *  is executed (if not NULL)
-* HEAD and TAIL are updated. 
+* HEAD and TAIL are updated.
  */
 
 llist_p *llist_remove_last(llist_p *head, llist_p **tail, ll_elem_type type, void *f(void *) ) {
@@ -207,11 +207,11 @@ llist_p *llist_remove_last(llist_p *head, llist_p **tail, ll_elem_type type, voi
     llist_p *p = tail[0] ;
     switch(type) {
     case LL_STR: free_2(p->u.str) ; break ;
-    case LL_VOID_P: 
+    case LL_VOID_P:
       if (f)
-	f(p->u.p) ; 
+	f(p->u.p) ;
       break ;
-    default:           
+    default:
       fprintf(stderr, "Internal error in llist_remove_last(), type: %d\n", type);
       exit(255);
     }
@@ -235,11 +235,11 @@ void llist_free(llist_p *head, ll_elem_type type, void *f(void *)) {
     p1 = p->next ;
     switch(type) {
     case LL_STR: free_2(p->u.str) ; break ;
-    case LL_VOID_P: 
+    case LL_VOID_P:
       if (f)
-	f(p->u.p) ; 
+	f(p->u.p) ;
       break ;
-    default:           
+    default:
       fprintf(stderr, "Internal error in llist_free(), type: %d\n", type);
       exit(255);
     }
@@ -256,7 +256,7 @@ Trptr BitVector_to_Trptr(bvptr vec) {
   int    n;
 
   GLOBALS->signalwindow_width_dirty=1;
-  
+
   n = vec->nbits;
   t = (Trptr) calloc_2(1, sizeof( TraceEnt ) );
   if( t == NULL ) {
@@ -280,7 +280,7 @@ Trptr BitVector_to_Trptr(bvptr vec) {
 Trptr find_first_highlighted_trace(void) {
   Trptr t=GLOBALS->traces.first;
   while(t) {
-    if(t->flags&TR_HIGHLIGHT) {  
+    if(t->flags&TR_HIGHLIGHT) {
       if(!(t->flags&(TR_BLANK|TR_ANALOG_BLANK_STRETCH))) {
 	break;
       }
@@ -348,7 +348,7 @@ Trptr Node_to_Trptr(nptr nd)
   if(nd->mv.mvlfac) import_trace(nd);
 
   GLOBALS->signalwindow_width_dirty=1;
-    
+
   if( (t = (Trptr) calloc_2( 1, sizeof( TraceEnt ))) == NULL ) {
     fprintf( stderr, "Out of memory, can't add to analyzer\n" );
     return( 0 );
@@ -364,7 +364,7 @@ Trptr Node_to_Trptr(nptr nd)
     }
 
     nd->numhist=histcount;
-	
+
     if(!(nd->harray=harray=(hptr *)malloc_2(histcount*sizeof(hptr)))) {
       fprintf( stderr, "Out of memory, can't add to analyzer\n" );
       free_2(t);
@@ -381,7 +381,7 @@ Trptr Node_to_Trptr(nptr nd)
 
   if(!GLOBALS->hier_max_level) {
     int flagged = HIER_DEPACK_ALLOC;
-    
+
     t->name = hier_decompress_flagged(nd->nname, &flagged);
     t->is_depacked = (flagged != 0);
   }
@@ -404,8 +404,8 @@ Trptr Node_to_Trptr(nptr nd)
     n = nd->msi - nd->lsi;
     if(n<0)n=-n;
     n++;
-    
-    t->flags = (( n > 3 )||( n < -3 )) ? TR_HEX|TR_RJUSTIFY : 
+
+    t->flags = (( n > 3 )||( n < -3 )) ? TR_HEX|TR_RJUSTIFY :
       TR_BIN|TR_RJUSTIFY;
   }
   else {
@@ -416,7 +416,7 @@ Trptr Node_to_Trptr(nptr nd)
   /* if(tret) *tret = t;		... for expand */
   return t ;
 }
-/* 
+/*
 * Search for the signal named (full path) NAME in the signal data base and
 * create a Trptr structure for it
 * NAME is a full hierarchy name, but may not include range information.
@@ -439,7 +439,7 @@ Trptr sig_name_to_Trptr(char *name) {
 	for(i=0;i<GLOBALS->numfacs;i++)
 		{
 		hfacname = hier_decompress_flagged(GLOBALS->facs[i]->name,  &was_packed);
-		if(!strcmp(name, hfacname) || ((!strncmp(name, hfacname, name_len) && hfacname[name_len] == '['))) 
+		if(!strcmp(name, hfacname) || ((!strncmp(name, hfacname, name_len) && hfacname[name_len] == '[')))
 			{
 			s = GLOBALS->facs[i];
 			if((s2 = s->vec_root))
@@ -460,7 +460,7 @@ Trptr sig_name_to_Trptr(char *name) {
 	                                        lx2_set_fac_process_mask(s2->n);
 	                                        pre_import++;
 	                                        }
-	
+
 					s2 = s2->vec_chain;
 					len++;
 					}
@@ -473,7 +473,7 @@ Trptr sig_name_to_Trptr(char *name) {
 					len++;
 					}
 				}
-	
+
 			if(was_packed) { free_2(hfacname); }
 			break;
 			}
@@ -497,7 +497,7 @@ Trptr sig_name_to_Trptr(char *name) {
 					t = BitVector_to_Trptr(v) ;
 					}
 			                else
-			                { 
+			                {
 			                free_2(b->name);
 			                if(b->attribs) free_2(b->attribs);
 			                free_2(b);
@@ -510,12 +510,12 @@ Trptr sig_name_to_Trptr(char *name) {
 			t = Node_to_Trptr(node) ;
 			}
 		}
-	
+
 	}
 
   return t ;
 }
-  
+
 /* Return the base prefix for the signal value */
 char *signal_value_prefix(int flags) {
   if(flags & TR_BIN) return "0b" ;
@@ -526,7 +526,7 @@ char *signal_value_prefix(int flags) {
 
 /* ===================================================== */
 
-llist_p *signal_change_list(char *sig_name, int dir, TimeType start_time, 
+llist_p *signal_change_list(char *sig_name, int dir, TimeType start_time,
 		       TimeType end_time, int max_elements) {
   llist_p *l0_head = NULL, *l0_tail = NULL, *l1_head = NULL,*l_elem, *lp ;
   llist_p *l1_tail = NULL ;
@@ -553,7 +553,7 @@ llist_p *signal_change_list(char *sig_name, int dir, TimeType start_time,
     if (!t->vector) {
       hptr h, h1;
       int len = 0  ;
-      /* scan-build : 
+      /* scan-build :
       if(t->n.nd->extvals) {
 	bw = abs(t->n.nd->msi - t->n.nd->lsi) + 1 ;
       }
@@ -604,7 +604,7 @@ llist_p *signal_change_list(char *sig_name, int dir, TimeType start_time,
     lp = (start_time < end_time) ? l0_head : l0_tail ;
     /* now create a linked list of time,value.. */
     while (lp && (nelem++ < max_elements)) {
-      llist_u llp; llp.tt = ((t->vector) ? ((vptr)lp->u.p)->time: ((hptr)lp->u.p)->time); 
+      llist_u llp; llp.tt = ((t->vector) ? ((vptr)lp->u.p)->time: ((hptr)lp->u.p)->time);
       l_elem = llist_new(llp, LL_TIMETYPE, -1) ;
       l1_head = llist_append(l1_head, l_elem, &l1_tail) ;
       if(!l1_tail) l1_tail = l1_head ;
@@ -640,7 +640,7 @@ llist_p *signal_change_list(char *sig_name, int dir, TimeType start_time,
 	  }
 	}
       } else {
-        sprintf(s1, "%s%s", signal_value_prefix(t->flags), 
+        sprintf(s1, "%s%s", signal_value_prefix(t->flags),
 		convert_ascii(t, (vptr)lp->u.p)) ;
         llp.str = s1 ;
 	l_elem = llist_new(llp, LL_STR, -1) ;
diff --git a/src/tcl_support_commands.h b/src/tcl_support_commands.h
index d0689a7..7d5395b 100644
--- a/src/tcl_support_commands.h
+++ b/src/tcl_support_commands.h
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Yiftach Tzori 2009.
  *
  * This program is free software; you can redistribute it and/or
@@ -17,13 +17,13 @@ int SST_open_path(GtkCTree *ctree, GtkCTreeNode *node);
 void fill_sig_store (void);
 int SST_open_node(char *name);
 
-llist_p *llist_new(llist_u v, ll_elem_type type, int arg); 
-llist_p *llist_append(llist_p *head, llist_p *elem, llist_p **tail); 
-llist_p *llist_remove_last(llist_p *head, llist_p **tail, ll_elem_type type, void *f(void *) ); 
-void llist_free(llist_p *head, ll_elem_type type, void *f(void *)); 
+llist_p *llist_new(llist_u v, ll_elem_type type, int arg);
+llist_p *llist_append(llist_p *head, llist_p *elem, llist_p **tail);
+llist_p *llist_remove_last(llist_p *head, llist_p **tail, ll_elem_type type, void *f(void *) );
+void llist_free(llist_p *head, ll_elem_type type, void *f(void *));
 
 llist_p *signal_change_list(char *sig_name, int dir, TimeType start_time,
-                       TimeType end_time, int max_elements); 
+                       TimeType end_time, int max_elements);
 
 #define SST_NODE_FOUND 0
 #define SST_NODE_CURRENT 2
diff --git a/src/timeentry.c b/src/timeentry.c
index ef9cf31..9602cbe 100644
--- a/src/timeentry.c
+++ b/src/timeentry.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2008
  *
  * This program is free software; you can redistribute it and/or
@@ -44,7 +44,7 @@ gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(GLOBALS->wave_hslider)), "ch
 gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(GLOBALS->wave_hslider)), "value_changed");
 }
 
-   
+
 void from_entry_callback(GtkWidget *widget, GtkWidget *entry)
 {
 G_CONST_RETURN gchar *entry_text;
@@ -58,19 +58,19 @@ DEBUG(printf("From Entry contents: %s\n",entry_text));
 newlo=unformat_time(entry_text, GLOBALS->time_dimension);
 newlo -= GLOBALS->global_time_offset;
 
-if(newlo<GLOBALS->min_time) 
+if(newlo<GLOBALS->min_time)
 	{
-	newlo=GLOBALS->min_time; 
+	newlo=GLOBALS->min_time;
 	}
 
-if(newlo<(GLOBALS->tims.last)) 
-	{ 
+if(newlo<(GLOBALS->tims.last))
+	{
 	GLOBALS->tims.first=newlo;
 	if(GLOBALS->tims.start<GLOBALS->tims.first) GLOBALS->tims.timecache=GLOBALS->tims.start=GLOBALS->tims.first;
 
 	reformat_time(fromstr, GLOBALS->tims.first + GLOBALS->global_time_offset, GLOBALS->time_dimension);
 	gtk_entry_set_text(GTK_ENTRY(entry),fromstr);
-	time_update(); 
+	time_update();
 	gtkwavetcl_setvar(WAVE_TCLCB_FROM_ENTRY_UPDATED, fromstr, WAVE_TCLCB_FROM_ENTRY_UPDATED_FLAGS);
 	return;
 	}
@@ -96,17 +96,17 @@ DEBUG(printf("To Entry contents: %s\n",entry_text));
 newhi=unformat_time(entry_text, GLOBALS->time_dimension);
 newhi -= GLOBALS->global_time_offset;
 
-if(newhi>GLOBALS->max_time) 
+if(newhi>GLOBALS->max_time)
 	{
-	newhi=GLOBALS->max_time; 
+	newhi=GLOBALS->max_time;
 	}
 
-if(newhi>(GLOBALS->tims.first)) 
-	{ 
+if(newhi>(GLOBALS->tims.first))
+	{
 	GLOBALS->tims.last=newhi;
 	reformat_time(tostr, GLOBALS->tims.last + GLOBALS->global_time_offset, GLOBALS->time_dimension);
 	gtk_entry_set_text(GTK_ENTRY(entry),tostr);
-	time_update(); 
+	time_update();
 	gtkwavetcl_setvar(WAVE_TCLCB_TO_ENTRY_UPDATED, tostr, WAVE_TCLCB_TO_ENTRY_UPDATED_FLAGS);
 	return;
 	}
@@ -118,7 +118,7 @@ if(newhi>(GLOBALS->tims.first))
 	return;
 	}
 }
-   
+
 /* Create an entry box */
 GtkWidget *
 create_entry_box(void)
@@ -142,10 +142,10 @@ reformat_time(fromstr, GLOBALS->min_time + GLOBALS->global_time_offset, GLOBALS-
 gtk_entry_set_text(GTK_ENTRY(GLOBALS->from_entry),fromstr);
 gtk_signal_connect (GTK_OBJECT (GLOBALS->from_entry), "activate",GTK_SIGNAL_FUNC (from_entry_callback), GLOBALS->from_entry);
 box=gtk_hbox_new(FALSE, 0);
-gtk_box_pack_start(GTK_BOX(box), label, TRUE, TRUE, 0); 
+gtk_box_pack_start(GTK_BOX(box), label, TRUE, TRUE, 0);
 gtk_widget_show(label);
-gtk_box_pack_start(GTK_BOX(box), GLOBALS->from_entry, TRUE, TRUE, 0); 
-gtk_widget_set_usize(GTK_WIDGET(GLOBALS->from_entry), 90, 22); 
+gtk_box_pack_start(GTK_BOX(box), GLOBALS->from_entry, TRUE, TRUE, 0);
+gtk_widget_set_usize(GTK_WIDGET(GLOBALS->from_entry), 90, 22);
 gtk_tooltips_set_tip_2(tooltips, GLOBALS->from_entry, "Scroll Lower Bound", NULL);
 gtk_widget_show(GLOBALS->from_entry);
 
@@ -158,10 +158,10 @@ reformat_time(tostr, GLOBALS->max_time + GLOBALS->global_time_offset, GLOBALS->t
 gtk_entry_set_text(GTK_ENTRY(GLOBALS->to_entry),tostr);
 gtk_signal_connect (GTK_OBJECT (GLOBALS->to_entry), "activate",GTK_SIGNAL_FUNC (to_entry_callback), GLOBALS->to_entry);
 box2=gtk_hbox_new(FALSE, 0);
-gtk_box_pack_start(GTK_BOX(box2), label2, TRUE, TRUE, 0); 
+gtk_box_pack_start(GTK_BOX(box2), label2, TRUE, TRUE, 0);
 gtk_widget_show(label2);
-gtk_box_pack_start(GTK_BOX(box2), GLOBALS->to_entry, TRUE, TRUE, 0); 
-gtk_widget_set_usize(GTK_WIDGET(GLOBALS->to_entry), 90, 22); 
+gtk_box_pack_start(GTK_BOX(box2), GLOBALS->to_entry, TRUE, TRUE, 0);
+gtk_widget_set_usize(GTK_WIDGET(GLOBALS->to_entry), 90, 22);
 gtk_tooltips_set_tip_2(tooltips, GLOBALS->to_entry, "Scroll Upper Bound", NULL);
 gtk_widget_show(GLOBALS->to_entry);
 
@@ -181,4 +181,4 @@ gtk_widget_show(box2);
 
 return(mainbox);
 }
-   
+
diff --git a/src/translate.c b/src/translate.c
index 6e99c27..3602956 100644
--- a/src/translate.c
+++ b/src/translate.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 2005-2014.
  *
  * This program is free software; you can redistribute it and/or
@@ -75,7 +75,7 @@ xl_Tree * xl_insert(char *i, xl_Tree * t, char *trans) {
 /* Return a pointer to the resulting tree.                 */
     xl_Tree * n;
     int dir;
-    
+
     n = (xl_Tree *) calloc_2(1, sizeof (xl_Tree));
     if (n == NULL) {
 	fprintf(stderr, "xl_insert: ran out of memory, exiting.\n");
@@ -210,7 +210,7 @@ while(!feof(f))
 					{
 					char *xlt = rhs+1;
 					*rhs = 0;
-	
+
 					while(*xlt && isspace((int)(unsigned char)*xlt)) xlt++;
 					if(*xlt)
 						{
@@ -262,7 +262,7 @@ if((which<0)||(which>=(FILE_FILTER_MAX+1)))
 	which = 0;
 	}
 
-if(GLOBALS->traces.first)  
+if(GLOBALS->traces.first)
         {
         Trptr t = GLOBALS->traces.first;
         while(t)
@@ -340,7 +340,7 @@ if(*GLOBALS->fileselbox_text)
 		{
 		if(GLOBALS->filesel_filter[i])
 			{
-			if(!strcmp(GLOBALS->filesel_filter[i], *GLOBALS->fileselbox_text)) 
+			if(!strcmp(GLOBALS->filesel_filter[i], *GLOBALS->fileselbox_text))
 				{
 				status_text("Filter already imported.\n");
 				if(GLOBALS->is_active_translate_c_5) gdk_window_raise(GLOBALS->window_translate_c_11->window);
@@ -399,7 +399,7 @@ void trans_searchbox(char *title)
     GtkWidget *table;
     GtkTooltips *tooltips;
 
-    if(GLOBALS->is_active_translate_c_5) 
+    if(GLOBALS->is_active_translate_c_5)
 	{
 	gdk_window_raise(GLOBALS->window_translate_c_11->window);
 	return;
@@ -434,7 +434,7 @@ void trans_searchbox(char *title)
                         GTK_FILL | GTK_EXPAND | GTK_SHRINK, 1, 1);
 
     GLOBALS->clist_translate_c_4=gtk_clist_new_with_titles(1,titles);
-    gtk_clist_column_titles_passive(GTK_CLIST(GLOBALS->clist_translate_c_4)); 
+    gtk_clist_column_titles_passive(GTK_CLIST(GLOBALS->clist_translate_c_4));
 
     gtk_clist_set_selection_mode(GTK_CLIST(GLOBALS->clist_translate_c_4), GTK_SELECTION_EXTENDED);
     gtkwave_signal_connect_object (GTK_OBJECT (GLOBALS->clist_translate_c_4), "select_row",GTK_SIGNAL_FUNC(select_row_callback),NULL);
@@ -476,7 +476,7 @@ void trans_searchbox(char *title)
     gtk_container_border_width (GTK_CONTAINER (button6), 3);
     gtkwave_signal_connect_object (GTK_OBJECT (button6), "clicked",GTK_SIGNAL_FUNC(add_filter_callback),GTK_OBJECT (GLOBALS->window_translate_c_11));
     gtk_widget_show (button6);
-    gtk_tooltips_set_tip_2(tooltips, button6, 
+    gtk_tooltips_set_tip_2(tooltips, button6,
 		"Bring up a file requester to add a filter to the filter select window.",NULL);
 
     gtk_box_pack_start (GTK_BOX (hbox0), button6, TRUE, FALSE, 0);
@@ -497,7 +497,7 @@ void trans_searchbox(char *title)
     gtk_container_border_width (GTK_CONTAINER (button1), 3);
     gtkwave_signal_connect_object (GTK_OBJECT (button1), "clicked",GTK_SIGNAL_FUNC(ok_callback),GTK_OBJECT (GLOBALS->window_translate_c_11));
     gtk_widget_show (button1);
-    gtk_tooltips_set_tip_2(tooltips, button1, 
+    gtk_tooltips_set_tip_2(tooltips, button1,
 		"Add selected signals to end of the display on the main window.",NULL);
 
     gtk_box_pack_start (GTK_BOX (hbox), button1, TRUE, FALSE, 0);
@@ -505,7 +505,7 @@ void trans_searchbox(char *title)
     button5 = gtk_button_new_with_label (" Cancel ");
     gtk_container_border_width (GTK_CONTAINER (button5), 3);
     gtkwave_signal_connect_object (GTK_OBJECT (button5), "clicked",GTK_SIGNAL_FUNC(destroy_callback),GTK_OBJECT (GLOBALS->window_translate_c_11));
-    gtk_tooltips_set_tip_2(tooltips, button5, 
+    gtk_tooltips_set_tip_2(tooltips, button5,
 		"Do nothing and return to the main window.",NULL);
     gtk_widget_show (button5);
     gtk_box_pack_start (GTK_BOX (hbox), button5, TRUE, FALSE, 0);
@@ -529,7 +529,7 @@ if(typ)
 	{
 	for(i=1;i<GLOBALS->num_file_filters+1;i++)
 		{
-		if(!strcmp(GLOBALS->filesel_filter[i], name)) { GLOBALS->current_translate_file = i; return; } 
+		if(!strcmp(GLOBALS->filesel_filter[i], name)) { GLOBALS->current_translate_file = i; return; }
 		}
 
 	if(!strcmp(WAVE_TCL_INSTALLED_FILTER, name))
diff --git a/src/translate.h b/src/translate.h
index a636030..7899afb 100644
--- a/src/translate.h
+++ b/src/translate.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) Tony Bybell 2005.     
+ * Copyright (c) Tony Bybell 2005.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
diff --git a/src/tree.c b/src/tree.c
index 765dbde..e7205f2 100644
--- a/src/tree.c
+++ b/src/tree.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2011.
  *
  * This program is free software; you can redistribute it and/or
@@ -8,7 +8,7 @@
  */
 
 
-/* AIX may need this for alloca to work */ 
+/* AIX may need this for alloca to work */
 #if defined _AIX
   #pragma alloca
 #endif
@@ -73,15 +73,15 @@ for(;;)
 
 	if(((ch==GLOBALS->hier_delimeter) || (ch == '|')) && (*s)) /* added && null check to allow possible . at end of name */
 		{
-		*(pnt)=0;	
+		*(pnt)=0;
 		GLOBALS->module_len_tree_c_1 = pnt - GLOBALS->module_tree_c_1;
-		return(s);		
+		return(s);
 		}
 
 	if(!(*(pnt++)=ch))
 		{
 		GLOBALS->module_len_tree_c_1 = pnt - GLOBALS->module_tree_c_1;
-		return(NULL);	/* nothing left to extract */		
+		return(NULL);	/* nothing left to extract */
 		}
 	}
 }
@@ -239,7 +239,7 @@ t_allocated:
 		if(GLOBALS->mod_tree_parent->child)
 			{
 			t->next = GLOBALS->mod_tree_parent->child;
-			}					
+			}
 		GLOBALS->mod_tree_parent->child = t;
 		GLOBALS->mod_tree_parent = t;
 		}
@@ -333,7 +333,7 @@ return(1);
 
 /*
  * unswizzle extended names in tree
- */ 
+ */
 void treenamefix_str(char *s)
 {
 while(*s)
@@ -373,7 +373,7 @@ while(t)
 	strcpy(s2,s);
 	strcat(s2,".");
 	strcat(s2,t->name);
-	
+
 	if(t->child)
 		{
 		treedebug(t->child, s2);
@@ -817,7 +817,7 @@ construct:
 				}
 				else				/* make second in chain as it's toplevel */
 				{
-				nt->next = tchain->next;	
+				nt->next = tchain->next;
 				tchain->next = nt;
 				}
 			}
@@ -829,13 +829,13 @@ construct:
 			GLOBALS->terminals_tchain_tree_c_1 = nt;
 			return;
 			}
-	
+
 		/* blindly clone fac from next part of hier on down */
 		t = nt;
 		while(s)
 			{
 			s=get_module_name(s);
-		
+
 			nt=(struct tree *)talloc_2(sizeof(struct tree)+GLOBALS->module_len_tree_c_1 + 1);
 			memcpy(nt->name, GLOBALS->module_tree_c_1, GLOBALS->module_len_tree_c_1);
 
@@ -855,7 +855,7 @@ construct:
 			}
 		}
 	}
-else	
+else
 	{
 	/* blindly create first fac in the tree (only ever called once) */
 	while(s)
@@ -903,8 +903,8 @@ struct tree *t2;
 if(depth > 1) return;
 #endif
 
-/* 
- * TG reworked treesearch widget so there is no need to 
+/*
+ * TG reworked treesearch widget so there is no need to
  * process anything other than nodes.  Leaves are handled
  * in the filtered list below the node expand/contract
  * tree
@@ -913,10 +913,10 @@ t2=t;
 while(t2)
 	{
 #ifndef WAVE_DISABLE_FAST_TREE
-	if(depth < 1) 
+	if(depth < 1)
 #endif
-		{ 
-		t2->children_in_gui = 1; 
+		{
+		t2->children_in_gui = 1;
 		}
 
 	if(t2->child)
@@ -962,7 +962,7 @@ if(!GLOBALS->hier_grouping)
 	t2=t;
 	while(t2)
 		{
-		sibling_test=maketree_nodes(subtree, t2, sibling, MAKETREE_FLATTEN);	
+		sibling_test=maketree_nodes(subtree, t2, sibling, MAKETREE_FLATTEN);
 		sibling=sibling_test?sibling_test:sibling;
 		t2=t2->next;
 		}
@@ -980,7 +980,7 @@ if(!GLOBALS->hier_grouping)
 				maketree(sibling=sibling_test, t2->child);
 				}
 			}
-	
+
 		t2=t2->next;
 		}
 
@@ -995,7 +995,7 @@ if(!GLOBALS->hier_grouping)
 				maketree(sibling=sibling_test, t2->child);
 				}
 			}
-	
+
 		t2=t2->next;
 		}
 	}
diff --git a/src/tree.h b/src/tree.h
index 503df8e..22ef4ba 100644
--- a/src/tree.h
+++ b/src/tree.h
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2011.
  *
  * This program is free software; you can redistribute it and/or
diff --git a/src/tree_component.c b/src/tree_component.c
index 353c7c2..38e92e6 100644
--- a/src/tree_component.c
+++ b/src/tree_component.c
@@ -37,7 +37,7 @@ if(GLOBALS->comp_name_judy)
 	        idx[(*(char **)PPValue) - ((char *)NULL)] = pnt;
 		pnt += (slen + 1);
 	    }
-	
+
 	free_2(Index);
 	JudySLFreeArray(&GLOBALS->comp_name_judy, PJE0);
 	GLOBALS->comp_name_judy = NULL;
@@ -91,7 +91,7 @@ if(GLOBALS->comp_name_jrb)
 	        idx[node->val.i] = pnt;
 		pnt += (slen + 1);
 	    }
-	
+
 	jrb_free_tree(GLOBALS->comp_name_jrb);
 	GLOBALS->comp_name_jrb = NULL;
 	}
diff --git a/src/treesearch.c b/src/treesearch.c
index a7a75d0..bf04eda 100644
--- a/src/treesearch.c
+++ b/src/treesearch.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 2006.
  *
  * This program is free software; you can redistribute it and/or
diff --git a/src/treesearch.h b/src/treesearch.h
index 9e596f1..66bac1b 100644
--- a/src/treesearch.h
+++ b/src/treesearch.h
@@ -15,7 +15,7 @@ GtkWidget* treeboxframe(char *title, GtkSignalFunc func);
 void mkmenu_treesearch_cleanup(GtkWidget *widget, gpointer data);
 void dump_open_tree_nodes(FILE *wave, xl_Tree *t);
 int force_open_tree_node(char *name, int keep_path_nodes_open, struct tree **t_pnt);
-void select_tree_node(char *name);   
+void select_tree_node(char *name);
 void dnd_setup(GtkWidget *src, GtkWidget *widget, int enable_receive); /* dnd from gtk2 tree to signalwindow */
 void treeview_select_all_callback(void); /* gtk2 */
 void treeview_unselect_all_callback(void); /* gtk2 */
diff --git a/src/treesearch_gtk1.c b/src/treesearch_gtk1.c
index 2d13f9f..163271c 100644
--- a/src/treesearch_gtk1.c
+++ b/src/treesearch_gtk1.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2011.
  *
  * This program is free software; you can redistribute it and/or
@@ -202,7 +202,7 @@ return(t);
 
 struct tree *fetchlow(struct tree *t)
 {
-if(t->child) 
+if(t->child)
 	{
 	t=t->child;
 
@@ -245,7 +245,7 @@ if(t)
 		}
 		else
 		{
-		add_vector_range(NULL, fetchlow(t)->t_which, 
+		add_vector_range(NULL, fetchlow(t)->t_which,
 			fetchhigh(t)->t_which, direction);
 		}
 	}
@@ -256,11 +256,11 @@ if(t)
 
 static void
 bundle_cleanup(GtkWidget *widget, gpointer data)
-{ 
-if(GLOBALS->entrybox_text_local_treesearch_gtk1_c) 
+{
+if(GLOBALS->entrybox_text_local_treesearch_gtk1_c)
         {
         char *efix;
- 
+
 	if(!strlen(GLOBALS->entrybox_text_local_treesearch_gtk1_c))
 		{
 	        DEBUG(printf("Bundle name is not specified--recursing into hierarchy.\n"));
@@ -277,11 +277,11 @@ if(GLOBALS->entrybox_text_local_treesearch_gtk1_c)
 	                        }
 	                efix++;
 	                }
-	 
+
 	        DEBUG(printf("Bundle name is: %s\n",GLOBALS->entrybox_text_local_treesearch_gtk1_c));
-	        add_vector_range(GLOBALS->entrybox_text_local_treesearch_gtk1_c, 
+	        add_vector_range(GLOBALS->entrybox_text_local_treesearch_gtk1_c,
 				fetchlow(GLOBALS->selectedtree_treesearch_gtk1_c)->t_which,
-				fetchhigh(GLOBALS->selectedtree_treesearch_gtk1_c)->t_which, 
+				fetchhigh(GLOBALS->selectedtree_treesearch_gtk1_c)->t_which,
 				GLOBALS->bundle_direction_treesearch_gtk1_c);
 		}
         free_2(GLOBALS->entrybox_text_local_treesearch_gtk1_c);
@@ -296,7 +296,7 @@ MaxSignalLength();
 signalarea_configure_event(GLOBALS->signalarea, NULL);
 wavearea_configure_event(GLOBALS->wavearea, NULL);
 }
- 
+
 static void
 bundle_callback_generic(void)
 {
@@ -343,7 +343,7 @@ set_window_busy(widget);
 
 for(i=fetchlow(GLOBALS->selectedtree_treesearch_gtk1_c)->t_which;i<=fetchhigh(GLOBALS->selectedtree_treesearch_gtk1_c)->t_which;i++)
         {
-        struct symbol *s;  
+        struct symbol *s;
         s=GLOBALS->facs[i];
 	if(s->vec_root)
 		{
@@ -396,7 +396,7 @@ if(GLOBALS->is_lx2)
 for(i=fetchlow(GLOBALS->selectedtree_treesearch_gtk1_c)->t_which;i<=fetchhigh(GLOBALS->selectedtree_treesearch_gtk1_c)->t_which;i++)
         {
 	int len;
-        struct symbol *s, *t;  
+        struct symbol *s, *t;
         s=GLOBALS->facs[i];
 	t=s->vec_root;
 	if((t)&&(GLOBALS->autocoalesce))
@@ -415,7 +415,7 @@ for(i=fetchlow(GLOBALS->selectedtree_treesearch_gtk1_c)->t_which;i<=fetchhigh(GL
 		}
 		else
 		{
-	        AddNodeUnroll(s->n, NULL);  
+	        AddNodeUnroll(s->n, NULL);
 		}
         }
 
@@ -455,7 +455,7 @@ set_window_busy(widget);
 
 for(i=fetchlow(GLOBALS->selectedtree_treesearch_gtk1_c)->t_which;i<=fetchhigh(GLOBALS->selectedtree_treesearch_gtk1_c)->t_which;i++)
         {
-        struct symbol *s;  
+        struct symbol *s;
         s=GLOBALS->facs[i];
 	if(s->vec_root)
 		{
@@ -508,7 +508,7 @@ if(GLOBALS->is_lx2)
 for(i=fetchlow(GLOBALS->selectedtree_treesearch_gtk1_c)->t_which;i<=fetchhigh(GLOBALS->selectedtree_treesearch_gtk1_c)->t_which;i++)
         {
 	int len;
-        struct symbol *s, *t;  
+        struct symbol *s, *t;
         s=GLOBALS->facs[i];
 	t=s->vec_root;
 	if((t)&&(GLOBALS->autocoalesce))
@@ -527,7 +527,7 @@ for(i=fetchlow(GLOBALS->selectedtree_treesearch_gtk1_c)->t_which;i<=fetchhigh(GL
 		}
 		else
 		{
-	        AddNodeUnroll(s->n, NULL);  
+	        AddNodeUnroll(s->n, NULL);
 		}
         }
 
@@ -606,7 +606,7 @@ set_window_busy(widget);
 
 for(i=fetchlow(GLOBALS->selectedtree_treesearch_gtk1_c)->t_which;i<=fetchhigh(GLOBALS->selectedtree_treesearch_gtk1_c)->t_which;i++)
         {
-        struct symbol *s;  
+        struct symbol *s;
         s=GLOBALS->facs[i];
 	if(s->vec_root)
 		{
@@ -659,7 +659,7 @@ if(GLOBALS->is_lx2)
 for(i=fetchlow(GLOBALS->selectedtree_treesearch_gtk1_c)->t_which;i<=fetchhigh(GLOBALS->selectedtree_treesearch_gtk1_c)->t_which;i++)
         {
 	int len;
-        struct symbol *s, *t;  
+        struct symbol *s, *t;
         s=GLOBALS->facs[i];
 	t=s->vec_root;
 	if((t)&&(GLOBALS->autocoalesce))
@@ -678,7 +678,7 @@ for(i=fetchlow(GLOBALS->selectedtree_treesearch_gtk1_c)->t_which;i<=fetchhigh(GL
 		}
 		else
 		{
-	        AddNodeUnroll(s->n, NULL);  
+	        AddNodeUnroll(s->n, NULL);
 		}
         }
 
@@ -713,7 +713,7 @@ void treebox(char *title, GtkSignalFunc func, GtkWidget *old_window)
     GtkTooltips *tooltips;
     GtkCList  *clist;
 
-    if(GLOBALS->is_active_treesearch_gtk1_c) 
+    if(GLOBALS->is_active_treesearch_gtk1_c)
 	{
 	gdk_window_raise(GLOBALS->window_treesearch_gtk1_c->window);
 	return;
@@ -727,7 +727,7 @@ void treebox(char *title, GtkSignalFunc func, GtkWidget *old_window)
     install_focus_cb(GLOBALS->window_treesearch_gtk1_c, ((char *)&GLOBALS->window_treesearch_gtk1_c) - ((char *)GLOBALS));
 
     gtk_window_set_title(GTK_WINDOW (GLOBALS->window_treesearch_gtk1_c), title);
-    gtkwave_signal_connect(GTK_OBJECT (GLOBALS->window_treesearch_gtk1_c), "delete_event", (GtkSignalFunc) destroy_callback, NULL); 
+    gtkwave_signal_connect(GTK_OBJECT (GLOBALS->window_treesearch_gtk1_c), "delete_event", (GtkSignalFunc) destroy_callback, NULL);
 
     tooltips=gtk_tooltips_new_2();
 
@@ -784,7 +784,7 @@ void treebox(char *title, GtkSignalFunc func, GtkWidget *old_window)
     gtk_container_border_width (GTK_CONTAINER (button1), 3);
     gtkwave_signal_connect_object (GTK_OBJECT (button1), "clicked",  GTK_SIGNAL_FUNC(ok_callback), GTK_OBJECT (GLOBALS->window_treesearch_gtk1_c));
     gtk_widget_show (button1);
-    gtk_tooltips_set_tip_2(tooltips, button1, 
+    gtk_tooltips_set_tip_2(tooltips, button1,
 		"Add selected signal hierarchy to end of the display on the main window.",NULL);
 
     gtk_box_pack_start (GTK_BOX (hbox), button1, TRUE, FALSE, 0);
@@ -793,7 +793,7 @@ void treebox(char *title, GtkSignalFunc func, GtkWidget *old_window)
     gtk_container_border_width (GTK_CONTAINER (button2), 3);
     gtkwave_signal_connect_object (GTK_OBJECT (button2), "clicked", GTK_SIGNAL_FUNC(insert_callback), GTK_OBJECT (GLOBALS->window_treesearch_gtk1_c));
     gtk_widget_show (button2);
-    gtk_tooltips_set_tip_2(tooltips, button2, 
+    gtk_tooltips_set_tip_2(tooltips, button2,
 		"Add selected signal hierarchy after last highlighted signal on the main window.",NULL);
     gtk_box_pack_start (GTK_BOX (hbox), button2, TRUE, FALSE, 0);
 
@@ -803,7 +803,7 @@ void treebox(char *title, GtkSignalFunc func, GtkWidget *old_window)
     	gtk_container_border_width (GTK_CONTAINER (button3), 3);
     	gtkwave_signal_connect_object (GTK_OBJECT (button3), "clicked", GTK_SIGNAL_FUNC(bundle_callback_up), GTK_OBJECT (GLOBALS->window_treesearch_gtk1_c));
     	gtk_widget_show (button3);
-    	gtk_tooltips_set_tip_2(tooltips, button3, 
+    	gtk_tooltips_set_tip_2(tooltips, button3,
 		"Bundle selected signal hierarchy into a single bit "
 		"vector with the topmost signal as the LSB and the "
 		"lowest as the MSB.  Entering a zero length bundle "
@@ -817,7 +817,7 @@ void treebox(char *title, GtkSignalFunc func, GtkWidget *old_window)
     	gtk_container_border_width (GTK_CONTAINER (button3a), 3);
     	gtkwave_signal_connect_object (GTK_OBJECT (button3a), "clicked", GTK_SIGNAL_FUNC(bundle_callback_down), GTK_OBJECT (GLOBALS->window_treesearch_gtk1_c));
     	gtk_widget_show (button3a);
-    	gtk_tooltips_set_tip_2(tooltips, button3a, 
+    	gtk_tooltips_set_tip_2(tooltips, button3a,
 		"Bundle selected signal hierarchy into a single bit "
 		"vector with the topmost signal as the MSB and the "
 		"lowest as the LSB.  Entering a zero length bundle "
@@ -832,14 +832,14 @@ void treebox(char *title, GtkSignalFunc func, GtkWidget *old_window)
     gtk_container_border_width (GTK_CONTAINER (button4), 3);
     gtkwave_signal_connect_object (GTK_OBJECT (button4), "clicked", GTK_SIGNAL_FUNC(replace_callback), GTK_OBJECT (GLOBALS->window_treesearch_gtk1_c));
     gtk_widget_show (button4);
-    gtk_tooltips_set_tip_2(tooltips, button4, 
+    gtk_tooltips_set_tip_2(tooltips, button4,
 		"Replace highlighted signals on the main window with signals selected above.",NULL);
     gtk_box_pack_start (GTK_BOX (hbox), button4, TRUE, FALSE, 0);
 
     button5 = gtk_button_new_with_label (" Exit ");
     gtk_container_border_width (GTK_CONTAINER (button5), 3);
     gtkwave_signal_connect_object (GTK_OBJECT (button5), "clicked", GTK_SIGNAL_FUNC(destroy_callback), GTK_OBJECT (GLOBALS->window_treesearch_gtk1_c));
-    gtk_tooltips_set_tip_2(tooltips, button5, 
+    gtk_tooltips_set_tip_2(tooltips, button5,
 		"Do nothing and return to the main window.",NULL);
     gtk_widget_show (button5);
     gtk_box_pack_start (GTK_BOX (hbox), button5, TRUE, FALSE, 0);
diff --git a/src/treesearch_gtk2.c b/src/treesearch_gtk2.c
index 47f3af4..394656b 100644
--- a/src/treesearch_gtk2.c
+++ b/src/treesearch_gtk2.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tristan Gingold and Tony Bybell 2006-2014.
  *
  * This program is free software; you can redistribute it and/or
@@ -54,10 +54,10 @@ struct autocoalesce_free_list *at;
 while(GLOBALS->afl_treesearch_gtk2_c_1)
 	{
 	if(GLOBALS->afl_treesearch_gtk2_c_1->name) free_2(GLOBALS->afl_treesearch_gtk2_c_1->name);
-	at = GLOBALS->afl_treesearch_gtk2_c_1->next;			
+	at = GLOBALS->afl_treesearch_gtk2_c_1->next;
 	free_2(GLOBALS->afl_treesearch_gtk2_c_1);
 	GLOBALS->afl_treesearch_gtk2_c_1 = at;
-	}	
+	}
 }
 
 
@@ -147,7 +147,7 @@ fill_sig_store (void)
 	unsigned int varxt;
 	char *varxt_pnt;
 
-	if(i < 0) 
+	if(i < 0)
 		{
 		t_prev = NULL;
 		continue;
@@ -216,9 +216,9 @@ fill_sig_store (void)
 
 	wrexm = 0;
 	if 	(
-		(GLOBALS->filter_str_treesearch_gtk2_c_1 == NULL) || 
+		(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) && 
+		(GLOBALS->filter_matlen_treesearch_gtk2_c_1 && (GLOBALS->filter_typ_treesearch_gtk2_c_1 == vardir) &&
 			(wrexm || (wrexm = wave_regex_match(t->name, WAVE_REGEX_TREE)))	)
 		)
       		{
@@ -228,7 +228,7 @@ fill_sig_store (void)
 			gtk_list_store_set (GLOBALS->sig_store_treesearch_gtk2_c_1, &iter,
 				    NAME_COLUMN, s,
 				    TREE_COLUMN, t,
-				    TYPE_COLUMN, 
+				    TYPE_COLUMN,
 						(((GLOBALS->supplemental_datatypes_encountered) && (!GLOBALS->supplemental_vartypes_encountered)) ?
 							(varxt ? varxt_pnt : vardatatype_strings[vardt]) : vartype_strings[vartype]),
 				    DIR_COLUMN, vardir_strings[vardir],
@@ -245,12 +245,12 @@ fill_sig_store (void)
 			struct autocoalesce_free_list *a = calloc_2(1, sizeof(struct autocoalesce_free_list));
 			a->name = s;
 			a->next = GLOBALS->afl_treesearch_gtk2_c_1;
-			GLOBALS->afl_treesearch_gtk2_c_1 = a;			
+			GLOBALS->afl_treesearch_gtk2_c_1 = a;
 
 			gtk_list_store_set (GLOBALS->sig_store_treesearch_gtk2_c_1, &iter,
 				    NAME_COLUMN, s,
 				    TREE_COLUMN, t,
-				    TYPE_COLUMN, 
+				    TYPE_COLUMN,
 						(((GLOBALS->supplemental_datatypes_encountered) && (!GLOBALS->supplemental_vartypes_encountered)) ?
 							(varxt ? varxt_pnt : vardatatype_strings[vardt]) : vartype_strings[vartype]),
 				    DIR_COLUMN, vardir_strings[vardir],
@@ -283,7 +283,7 @@ if(node)
 		{
 		GtkCTree *ctree = GLOBALS->ctree_main;
 		GtkCTreeNode *n = gctr->children;
-	
+
 		gtk_clist_freeze(GTK_CLIST(ctree));
 
 		while(n)
@@ -299,10 +299,10 @@ if(node)
 					maketree2(n, t, 0, n);
 					}
 				}
-	
+
 			n = GTK_CTREE_NODE_NEXT(n);
 			}
-	
+
 		gtk_clist_thaw(GTK_CLIST(ctree));
 		}
 	}
@@ -321,12 +321,12 @@ int force_open_tree_node(char *name, int keep_path_nodes_open, struct tree **t_p
     GtkCTreeNode *node = GLOBALS->any_tree_node;
     GtkCTreeRow *gctr = GTK_CTREE_ROW(node);
     int depth = 1;
-    
+
     strcpy(namecache, name);
     while(gctr->parent)	{
       node = gctr->parent;
       gctr = GTK_CTREE_ROW(node);
-    } 
+    }
     for(;;) {
       struct tree *t = gctr->row.data;
       if(t_pnt) { *t_pnt = t; }
@@ -348,12 +348,12 @@ int force_open_tree_node(char *name, int keep_path_nodes_open, struct tree **t_p
 	  exp1[i--] = 1;
 	  /* now work backwards up to parent getting the node open/close history*/
 	  gctr = GTK_CTREE_ROW(node);
-	  while(gctr->parent) {        
+	  while(gctr->parent) {
 	    node = gctr->parent;
 	    gctr = GTK_CTREE_ROW(node);
 	    nodehist[i] = node;
 	    exp1[i--] = gctr->expanded || (keep_path_nodes_open != 0);
-	  }        
+	  }
 	  gtk_clist_freeze(GTK_CLIST(ctree));
 	  /* fully expand down */
 	  for(i=0;i<depth;i++) {
@@ -416,7 +416,7 @@ if(t->right)
 	}
 }
 
-static void generic_tree_expand_collapse_callback(int is_expand, GtkCTreeNode *node) 
+static void generic_tree_expand_collapse_callback(int is_expand, GtkCTreeNode *node)
 {
 GtkCTreeRow **gctr;
 int depth, i;
@@ -500,8 +500,8 @@ gtk_widget_show(GTK_WIDGET(GLOBALS->tree_treesearch_gtk2_c_1));
 #endif
 #endif
 }
- 
-static void tree_collapse_callback(GtkCTree *ctree, GtkCTreeNode *node, gpointer user_data) 
+
+static void tree_collapse_callback(GtkCTree *ctree, GtkCTreeNode *node, gpointer user_data)
 {
 generic_tree_expand_collapse_callback(0, node);
 #ifdef WAVE_ALLOW_QUARTZ_FLUSH_WORKAROUND
@@ -533,7 +533,7 @@ if(ctree)
 		{
 		node = gctr->parent;
 		gctr = GTK_CTREE_ROW(node);
-		} 
+		}
 
 	for(;;)
 		{
@@ -604,17 +604,17 @@ if(node)
 
 	hier_suffix[0] = GLOBALS->hier_delimeter;
 	hier_suffix[1] = 0;
-                
+
 	depth = GTK_CTREE_ROW(node)->level;
 	gctr = wave_alloca(depth * sizeof(GtkCTreeRow *));
-         
+
 	for(i=depth-1;i>=0;i--)
 	        {
 	        gctr[i] = GTK_CTREE_ROW(node);
 	        t = gctr[i]->row.data;
 	        len += (strlen(t->name) + 1);
 	        node = gctr[i]->parent;
-	        }        
+	        }
 
 	tstring = wave_alloca(len);
 	memset(tstring, 0, len);
@@ -710,7 +710,7 @@ gboolean filter_edit_cb (GtkWidget *widget, GdkEventKey *ev, gpointer *data)
 						GLOBALS->filter_noregex_treesearch_gtk2_c_1 = 1;
 						}
 					}
-				}			
+				}
 			}
 		}
 
@@ -849,7 +849,7 @@ return(t);
 /* Get the lowest signal from T.  */
 struct tree *fetchlow(struct tree *t)
 {
-if(t->child) 
+if(t->child)
 	{
 	t=t->child;
 
@@ -892,7 +892,7 @@ if(t)
 		}
 		else
 		{
-		add_vector_range(NULL, fetchlow(t)->t_which, 
+		add_vector_range(NULL, fetchlow(t)->t_which,
 			fetchhigh(t)->t_which, direction);
 		}
 	}
@@ -914,10 +914,10 @@ bundle_cleanup_foreach (GtkTreeModel *model,
 
   if(!sel) return;
 
-if(GLOBALS->entrybox_text_local_treesearch_gtk2_c_3) 
+if(GLOBALS->entrybox_text_local_treesearch_gtk2_c_3)
         {
         char *efix;
- 
+
 	if(!strlen(GLOBALS->entrybox_text_local_treesearch_gtk2_c_3))
 		{
 	        DEBUG(printf("Bundle name is not specified--recursing into hierarchy.\n"));
@@ -934,11 +934,11 @@ if(GLOBALS->entrybox_text_local_treesearch_gtk2_c_3)
 	                        }
 	                efix++;
 	                }
-	 
+
 	        DEBUG(printf("Bundle name is: %s\n",GLOBALS->entrybox_text_local_treesearch_gtk2_c_3));
-	        add_vector_range(GLOBALS->entrybox_text_local_treesearch_gtk2_c_3, 
+	        add_vector_range(GLOBALS->entrybox_text_local_treesearch_gtk2_c_3,
 				fetchlow(sel)->t_which,
-				fetchhigh(sel)->t_which, 
+				fetchhigh(sel)->t_which,
 				GLOBALS->bundle_direction_treesearch_gtk2_c_3);
 		}
         free_2(GLOBALS->entrybox_text_local_treesearch_gtk2_c_3);
@@ -952,7 +952,7 @@ if(GLOBALS->entrybox_text_local_treesearch_gtk2_c_3)
 
 static void
 bundle_cleanup(GtkWidget *widget, gpointer data)
-{ 
+{
   gtk_tree_selection_selected_foreach
     (GLOBALS->sig_selection_treesearch_gtk2_c_1, &bundle_cleanup_foreach, NULL);
 
@@ -960,7 +960,7 @@ MaxSignalLength();
 signalarea_configure_event(GLOBALS->signalarea, NULL);
 wavearea_configure_event(GLOBALS->wavearea, NULL);
 }
- 
+
 static void
 bundle_callback_generic(void)
 {
@@ -1021,7 +1021,7 @@ sig_selection_foreach (GtkTreeModel *model,
   for(i=low;i<=high;i++)
         {
 	int len;
-        struct symbol *s, *t;  
+        struct symbol *s, *t;
         s=GLOBALS->facs[i];
 	t=s->vec_root;
 	if((t)&&(GLOBALS->autocoalesce))
@@ -1040,7 +1040,7 @@ sig_selection_foreach (GtkTreeModel *model,
 		}
 		else
 		{
-	        AddNodeUnroll(s->n, NULL);  
+	        AddNodeUnroll(s->n, NULL);
 		}
         }
 }
@@ -1051,7 +1051,7 @@ sig_selection_foreach_finalize (gpointer data)
  const enum cb_action action = (enum cb_action)data;
 
  if (action == ACTION_REPLACE || action == ACTION_INSERT || action == ACTION_PREPEND)
-   { 
+   {
      Trptr tfirst=NULL, tlast=NULL;
      Trptr t;
      Trptr *tp = NULL;
@@ -1095,7 +1095,7 @@ sig_selection_foreach_finalize (gpointer data)
      GLOBALS->traces.buffercount=GLOBALS->tcache_treesearch_gtk2_c_2.buffercount;
      GLOBALS->traces.buffer=GLOBALS->tcache_treesearch_gtk2_c_2.buffer;
      GLOBALS->traces.bufferlast=GLOBALS->tcache_treesearch_gtk2_c_2.bufferlast;
-     
+
      if (action == ACTION_REPLACE)
        {
 	for(it=0;it<numhigh;it++)
@@ -1151,7 +1151,7 @@ sig_selection_foreach_preload_lx2
   /* If signals are vectors, coalesces vectors if so.  */
   for(i=low;i<=high;i++)
         {
-        struct symbol *s;  
+        struct symbol *s;
         s=GLOBALS->facs[i];
 	if(s->vec_root)
 		{
@@ -1370,9 +1370,9 @@ void treebox(char *title, GtkSignalFunc func, GtkWidget *old_window)
 	goto do_tooltips;
 	}
 
-    if(GLOBALS->is_active_treesearch_gtk2_c_6) 
+    if(GLOBALS->is_active_treesearch_gtk2_c_6)
 	{
-	if(GLOBALS->window_treesearch_gtk2_c_12) 
+	if(GLOBALS->window_treesearch_gtk2_c_12)
 		{
 		gdk_window_raise(GLOBALS->window_treesearch_gtk2_c_12->window);
 		}
@@ -1404,7 +1404,7 @@ do_tooltips:
     GLOBALS->treesearch_gtk2_window_vbox = vbox = gtk_vbox_new (FALSE, 1);
     gtk_widget_show (vbox);
 
-    gtkwave_signal_connect(GTK_OBJECT(vbox), "button_press_event",GTK_SIGNAL_FUNC(hier_top_button_press_event_std), NULL); 
+    gtkwave_signal_connect(GTK_OBJECT(vbox), "button_press_event",GTK_SIGNAL_FUNC(hier_top_button_press_event_std), NULL);
 
     vpan = gtk_vpaned_new ();
     gtk_widget_show (vpan);
@@ -1550,9 +1550,9 @@ do_tooltips:
     gtk_box_pack_start (GTK_BOX (filter_hbox), filter_label, FALSE, FALSE, 1);
 
     GLOBALS->filter_entry = gtk_entry_new ();
-    if(GLOBALS->filter_str_treesearch_gtk2_c_1) 
-	{ 
-	gtk_entry_set_text(GTK_ENTRY(GLOBALS->filter_entry), GLOBALS->filter_str_treesearch_gtk2_c_1); 
+    if(GLOBALS->filter_str_treesearch_gtk2_c_1)
+	{
+	gtk_entry_set_text(GTK_ENTRY(GLOBALS->filter_entry), GLOBALS->filter_str_treesearch_gtk2_c_1);
 	}
 
     gtk_widget_show (GLOBALS->filter_entry);
@@ -1592,7 +1592,7 @@ do_tooltips:
     gtk_container_border_width (GTK_CONTAINER (button1), 3);
     gtkwave_signal_connect_object (GTK_OBJECT (button1), "clicked",GTK_SIGNAL_FUNC(ok_callback),GTK_OBJECT (GLOBALS->window_treesearch_gtk2_c_12));
     gtk_widget_show (button1);
-    gtk_tooltips_set_tip_2(tooltips, button1, 
+    gtk_tooltips_set_tip_2(tooltips, button1,
 		"Add selected signal hierarchy to end of the display on the main window.",NULL);
 
     gtk_box_pack_start (GTK_BOX (hbox), button1, TRUE, FALSE, 0);
@@ -1601,7 +1601,7 @@ do_tooltips:
     gtk_container_border_width (GTK_CONTAINER (button2), 3);
     gtkwave_signal_connect_object (GTK_OBJECT (button2), "clicked",GTK_SIGNAL_FUNC(insert_callback),GTK_OBJECT (GLOBALS->window_treesearch_gtk2_c_12));
     gtk_widget_show (button2);
-    gtk_tooltips_set_tip_2(tooltips, button2, 
+    gtk_tooltips_set_tip_2(tooltips, button2,
 		"Add selected signal hierarchy after last highlighted signal on the main window.",NULL);
     gtk_box_pack_start (GTK_BOX (hbox), button2, TRUE, FALSE, 0);
 
@@ -1611,7 +1611,7 @@ do_tooltips:
     	gtk_container_border_width (GTK_CONTAINER (button3), 3);
     	gtkwave_signal_connect_object (GTK_OBJECT (button3), "clicked",GTK_SIGNAL_FUNC(bundle_callback_up),GTK_OBJECT (GLOBALS->window_treesearch_gtk2_c_12));
     	gtk_widget_show (button3);
-    	gtk_tooltips_set_tip_2(tooltips, button3, 
+    	gtk_tooltips_set_tip_2(tooltips, button3,
 		"Bundle selected signal hierarchy into a single bit "
 		"vector with the topmost signal as the LSB and the "
 		"lowest as the MSB.  Entering a zero length bundle "
@@ -1625,7 +1625,7 @@ do_tooltips:
     	gtk_container_border_width (GTK_CONTAINER (button3a), 3);
     	gtkwave_signal_connect_object (GTK_OBJECT (button3a), "clicked",GTK_SIGNAL_FUNC(bundle_callback_down),GTK_OBJECT (GLOBALS->window_treesearch_gtk2_c_12));
     	gtk_widget_show (button3a);
-    	gtk_tooltips_set_tip_2(tooltips, button3a, 
+    	gtk_tooltips_set_tip_2(tooltips, button3a,
 		"Bundle selected signal hierarchy into a single bit "
 		"vector with the topmost signal as the MSB and the "
 		"lowest as the LSB.  Entering a zero length bundle "
@@ -1640,14 +1640,14 @@ do_tooltips:
     gtk_container_border_width (GTK_CONTAINER (button4), 3);
     gtkwave_signal_connect_object (GTK_OBJECT (button4), "clicked",GTK_SIGNAL_FUNC(replace_callback),GTK_OBJECT (GLOBALS->window_treesearch_gtk2_c_12));
     gtk_widget_show (button4);
-    gtk_tooltips_set_tip_2(tooltips, button4, 
+    gtk_tooltips_set_tip_2(tooltips, button4,
 		"Replace highlighted signals on the main window with signals selected above.",NULL);
     gtk_box_pack_start (GTK_BOX (hbox), button4, TRUE, FALSE, 0);
 
     button5 = gtk_button_new_with_label (" Exit ");
     gtk_container_border_width (GTK_CONTAINER (button5), 3);
     gtkwave_signal_connect_object (GTK_OBJECT (button5), "clicked",GTK_SIGNAL_FUNC(destroy_callback),GTK_OBJECT (GLOBALS->window_treesearch_gtk2_c_12));
-    gtk_tooltips_set_tip_2(tooltips, button5, 
+    gtk_tooltips_set_tip_2(tooltips, button5,
 		"Do nothing and return to the main window.",NULL);
     gtk_widget_show (button5);
     gtk_box_pack_start (GTK_BOX (hbox), button5, TRUE, FALSE, 0);
@@ -1684,13 +1684,13 @@ GtkWidget* treeboxframe(char *title, GtkSignalFunc func)
     vbox = gtk_vbox_new (FALSE, 1);
     gtk_widget_show (vbox);
 
-    gtkwave_signal_connect(GTK_OBJECT(vbox), "button_press_event",GTK_SIGNAL_FUNC(hier_top_button_press_event_std), NULL); 
+    gtkwave_signal_connect(GTK_OBJECT(vbox), "button_press_event",GTK_SIGNAL_FUNC(hier_top_button_press_event_std), NULL);
 
     vpan = gtk_vpaned_new (); /* GLOBALS->sst_vpaned is to be used to clone position over during reload */
     GLOBALS->sst_vpaned = (GtkPaned *)vpan;
     if(GLOBALS->vpanedwindow_size_cache)
 	{
-	gtk_paned_set_position(GTK_PANED(GLOBALS->sst_vpaned), GLOBALS->vpanedwindow_size_cache);    
+	gtk_paned_set_position(GTK_PANED(GLOBALS->sst_vpaned), GLOBALS->vpanedwindow_size_cache);
 	GLOBALS->vpanedwindow_size_cache = 0;
 	}
     gtk_widget_show (vpan);
@@ -1869,7 +1869,7 @@ GtkWidget* treeboxframe(char *title, GtkSignalFunc func)
     gtk_container_border_width (GTK_CONTAINER (button1), 3);
     gtkwave_signal_connect_object (GTK_OBJECT (button1), "clicked", GTK_SIGNAL_FUNC(ok_callback), GTK_OBJECT (GLOBALS->gtk2_tree_frame));
     gtk_widget_show (button1);
-    gtk_tooltips_set_tip_2(tooltips, button1, 
+    gtk_tooltips_set_tip_2(tooltips, button1,
 		"Add selected signal hierarchy to end of the display on the main window.",NULL);
 
     gtk_box_pack_start (GTK_BOX (hbox), button1, TRUE, FALSE, 0);
@@ -1878,7 +1878,7 @@ GtkWidget* treeboxframe(char *title, GtkSignalFunc func)
     gtk_container_border_width (GTK_CONTAINER (button2), 3);
     gtkwave_signal_connect_object (GTK_OBJECT (button2), "clicked", GTK_SIGNAL_FUNC(insert_callback), GTK_OBJECT (GLOBALS->gtk2_tree_frame));
     gtk_widget_show (button2);
-    gtk_tooltips_set_tip_2(tooltips, button2, 
+    gtk_tooltips_set_tip_2(tooltips, button2,
 		"Add selected signal hierarchy after last highlighted signal on the main window.",NULL);
     gtk_box_pack_start (GTK_BOX (hbox), button2, TRUE, FALSE, 0);
 
@@ -1888,7 +1888,7 @@ GtkWidget* treeboxframe(char *title, GtkSignalFunc func)
     	gtk_container_border_width (GTK_CONTAINER (button3), 3);
     	gtkwave_signal_connect_object (GTK_OBJECT (button3), "clicked", GTK_SIGNAL_FUNC(bundle_callback_up), GTK_OBJECT (GLOBALS->gtk2_tree_frame));
     	gtk_widget_show (button3);
-    	gtk_tooltips_set_tip_2(tooltips, button3, 
+    	gtk_tooltips_set_tip_2(tooltips, button3,
 		"Bundle selected signal hierarchy into a single bit "
 		"vector with the topmost signal as the LSB and the "
 		"lowest as the MSB.  Entering a zero length bundle "
@@ -1902,7 +1902,7 @@ GtkWidget* treeboxframe(char *title, GtkSignalFunc func)
     	gtk_container_border_width (GTK_CONTAINER (button3a), 3);
     	gtkwave_signal_connect_object (GTK_OBJECT (button3a), "clicked", GTK_SIGNAL_FUNC(bundle_callback_down), GTK_OBJECT (GLOBALS->gtk2_tree_frame));
     	gtk_widget_show (button3a);
-    	gtk_tooltips_set_tip_2(tooltips, button3a, 
+    	gtk_tooltips_set_tip_2(tooltips, button3a,
 		"Bundle selected signal hierarchy into a single bit "
 		"vector with the topmost signal as the MSB and the "
 		"lowest as the LSB.  Entering a zero length bundle "
@@ -1917,7 +1917,7 @@ GtkWidget* treeboxframe(char *title, GtkSignalFunc func)
     gtk_container_border_width (GTK_CONTAINER (button4), 3);
     gtkwave_signal_connect_object (GTK_OBJECT (button4), "clicked", GTK_SIGNAL_FUNC(replace_callback), GTK_OBJECT (GLOBALS->gtk2_tree_frame));
     gtk_widget_show (button4);
-    gtk_tooltips_set_tip_2(tooltips, button4, 
+    gtk_tooltips_set_tip_2(tooltips, button4,
 		"Replace highlighted signals on the main window with signals selected above.",NULL);
     gtk_box_pack_start (GTK_BOX (hbox), button4, TRUE, FALSE, 0);
 
@@ -1997,7 +1997,7 @@ else
 
 
 if((t=GLOBALS->traces.first))
-        {       
+        {
         while(t)
                 {
                 t->flags&=~TR_HIGHLIGHT;
@@ -2007,8 +2007,8 @@ if((t=GLOBALS->traces.first))
         wavearea_configure_event(GLOBALS->wavearea, NULL);
 	}
 
-trtarget = ((int)y / (int)GLOBALS->fontheight) - 2; 
-if(trtarget < 0) 
+trtarget = ((int)y / (int)GLOBALS->fontheight) - 2;
+if(trtarget < 0)
 	{
 	Trptr tp = GLOBALS->topmost_trace ? GivePrevTrace(GLOBALS->topmost_trace): NULL;
 	trtarget = 0;
@@ -2086,13 +2086,13 @@ static void DNDEndCB(
 	GtkWidget *widget, GdkDragContext *dc, gpointer data
 )
 {
-if((widget == NULL) || (dc == NULL)) 
+if((widget == NULL) || (dc == NULL))
 	{
 	GLOBALS->tree_dnd_begin = VIEW_DRAG_INACTIVE;
 	return;
 	}
 
-if(GLOBALS->tree_dnd_begin == VIEW_DRAG_INACTIVE) 
+if(GLOBALS->tree_dnd_begin == VIEW_DRAG_INACTIVE)
 	{
 	return; /* to keep cut and paste in signalwindow from conflicting */
 	}
@@ -2118,7 +2118,7 @@ GLOBALS->tree_dnd_begin = VIEW_DRAG_INACTIVE;
 
 
 /*
- *	DND "drag_motion" handler, this is called whenever the 
+ *	DND "drag_motion" handler, this is called whenever the
  *	pointer is dragging over the target widget.
  */
 static gboolean DNDDragMotionCB(
@@ -2217,7 +2217,7 @@ else if(widget == GLOBALS->signalarea)
 			int textlen = strlen(text);
 			int text2len = strlen(text2);
 			char *pnt = calloc_2(1, textlen + text2len + 1);
-			
+
 			memcpy(pnt, text, textlen);
 			memcpy(pnt + textlen, text2, text2len);
 
@@ -2373,7 +2373,7 @@ static void DNDDataDeleteCB(
 )
 {
 /* nothing */
-}  
+}
 
 
 /***********************/
diff --git a/src/ttranslate.c b/src/ttranslate.c
index df152a7..9db3311 100644
--- a/src/ttranslate.c
+++ b/src/ttranslate.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 2010-2012.
  *
  * This program is free software; you can redistribute it and/or
@@ -67,7 +67,7 @@ for(j=0;j<GLOBALS->num_notebook_pages;j++)
 			pipeio_destroy(GLOBALS->ttrans_filter[i]);
 			GLOBALS->ttrans_filter[i] = NULL;
 			}
-	
+
 		if(GLOBALS->ttranssel_filter[i])
 			{
 			free_2(GLOBALS->ttranssel_filter[i]);
@@ -129,7 +129,7 @@ static void load_ttrans_filter(int which, char *name)
 
   /* if name has arguments grab only the first word (the name of the executable)*/
   sscanf(name, "%s ", exec_name);
-  
+
   arg = name + strlen(exec_name);
 
   /* remove leading spaces from argument */
@@ -186,7 +186,7 @@ if((which<0)||(which>=(PROC_FILTER_MAX+1)))
         which = 0;
         }
 
-if(GLOBALS->traces.first)  
+if(GLOBALS->traces.first)
         {
         Trptr t = GLOBALS->traces.first;
         while(t)
@@ -278,7 +278,7 @@ if(GLOBALS->traces.first)
 					{
 					Trptr curr_trace = t;
 					t = t->t_next;
-					while(t && (t->t_match != curr_trace))					
+					while(t && (t->t_match != curr_trace))
 						{
 						t = t->t_next;
 						}
@@ -340,7 +340,7 @@ if(*GLOBALS->fileselbox_text)
 		{
 		if(GLOBALS->ttranssel_filter[i])
 			{
-			if(!strcmp(GLOBALS->ttranssel_filter[i], *GLOBALS->fileselbox_text)) 
+			if(!strcmp(GLOBALS->ttranssel_filter[i], *GLOBALS->fileselbox_text))
 				{
 				status_text("Filter already imported.\n");
 				if(GLOBALS->is_active_ttranslate_c_2) gdk_window_raise(GLOBALS->window_ttranslate_c_5->window);
@@ -401,7 +401,7 @@ void ttrans_searchbox(char *title)
     GtkWidget *label;
     GtkWidget *entry;
 
-    if(GLOBALS->is_active_ttranslate_c_2) 
+    if(GLOBALS->is_active_ttranslate_c_2)
 	{
 	gdk_window_raise(GLOBALS->window_ttranslate_c_5->window);
 	return;
@@ -436,7 +436,7 @@ void ttrans_searchbox(char *title)
                         GTK_FILL | GTK_EXPAND | GTK_SHRINK, 1, 1);
 
     GLOBALS->clist_ttranslate_c_2=gtk_clist_new_with_titles(1,titles);
-    gtk_clist_column_titles_passive(GTK_CLIST(GLOBALS->clist_ttranslate_c_2)); 
+    gtk_clist_column_titles_passive(GTK_CLIST(GLOBALS->clist_ttranslate_c_2));
 
     gtk_clist_set_selection_mode(GTK_CLIST(GLOBALS->clist_ttranslate_c_2), GTK_SELECTION_EXTENDED);
     gtkwave_signal_connect_object (GTK_OBJECT (GLOBALS->clist_ttranslate_c_2), "select_row",GTK_SIGNAL_FUNC(select_row_callback),NULL);
@@ -478,7 +478,7 @@ void ttrans_searchbox(char *title)
     gtk_container_border_width (GTK_CONTAINER (button6), 3);
     gtkwave_signal_connect_object (GTK_OBJECT (button6), "clicked",GTK_SIGNAL_FUNC(add_filter_callback),GTK_OBJECT (GLOBALS->window_ttranslate_c_5));
     gtk_widget_show (button6);
-    gtk_tooltips_set_tip_2(tooltips, button6, 
+    gtk_tooltips_set_tip_2(tooltips, button6,
 		"Bring up a file requester to add a transaction process filter to the filter select window.",NULL);
 
     gtk_box_pack_start (GTK_BOX (hbox0), button6, TRUE, FALSE, 0);
@@ -486,8 +486,8 @@ void ttrans_searchbox(char *title)
 
     	/* args entry box */
 	{
-	Trptr t=GLOBALS->traces.first; 
-	while(t) 
+	Trptr t=GLOBALS->traces.first;
+	while(t)
 	        {
 		if(t->flags&TR_HIGHLIGHT)
 			{
@@ -500,18 +500,18 @@ void ttrans_searchbox(char *title)
 	                }
 
 	        t=t->t_next;
-	        }      
+	        }
 
     	frameh0 = gtk_frame_new (NULL);
     	gtk_container_border_width (GTK_CONTAINER (frameh0), 3);
     	gtk_widget_show(frameh0);
-    	gtk_table_attach (GTK_TABLE (table), frameh0, 0, 1, 254, 255, 
+    	gtk_table_attach (GTK_TABLE (table), frameh0, 0, 1, 254, 255,
                         GTK_FILL | GTK_EXPAND,
                         GTK_FILL | GTK_EXPAND | GTK_SHRINK, 1, 1);
-        
+
 	label=gtk_label_new("Args:");
 	entry=gtk_entry_new_with_max_length(1025);
-    
+
 	gtk_entry_set_text(GTK_ENTRY(entry), GLOBALS->ttranslate_args ? GLOBALS->ttranslate_args : "");
 	gtk_signal_connect (GTK_OBJECT (entry), "activate",GTK_SIGNAL_FUNC (args_entry_callback), entry);
 	gtk_signal_connect (GTK_OBJECT (entry), "changed",GTK_SIGNAL_FUNC (args_entry_callback), entry);
@@ -541,7 +541,7 @@ void ttrans_searchbox(char *title)
     gtk_container_border_width (GTK_CONTAINER (button1), 3);
     gtkwave_signal_connect_object (GTK_OBJECT (button1), "clicked",GTK_SIGNAL_FUNC(ok_callback),GTK_OBJECT (GLOBALS->window_ttranslate_c_5));
     gtk_widget_show (button1);
-    gtk_tooltips_set_tip_2(tooltips, button1, 
+    gtk_tooltips_set_tip_2(tooltips, button1,
 		"Add selected signals to end of the display on the main window.",NULL);
 
     gtk_box_pack_start (GTK_BOX (hbox), button1, TRUE, FALSE, 0);
@@ -549,7 +549,7 @@ void ttrans_searchbox(char *title)
     button5 = gtk_button_new_with_label (" Cancel ");
     gtk_container_border_width (GTK_CONTAINER (button5), 3);
     gtkwave_signal_connect_object (GTK_OBJECT (button5), "clicked",GTK_SIGNAL_FUNC(destroy_callback),GTK_OBJECT (GLOBALS->window_ttranslate_c_5));
-    gtk_tooltips_set_tip_2(tooltips, button5, 
+    gtk_tooltips_set_tip_2(tooltips, button5,
 		"Do nothing and return to the main window.",NULL);
     gtk_widget_show (button5);
     gtk_box_pack_start (GTK_BOX (hbox), button5, TRUE, FALSE, 0);
@@ -571,7 +571,7 @@ int i;
 
 for(i=1;i<GLOBALS->num_ttrans_filters+1;i++)
 	{
-	if(!strcmp(GLOBALS->ttranssel_filter[i], name)) { GLOBALS->current_translate_ttrans = i; return; } 
+	if(!strcmp(GLOBALS->ttranssel_filter[i], name)) { GLOBALS->current_translate_ttrans = i; return; }
 	}
 
 if(GLOBALS->num_ttrans_filters < TTRANS_FILTER_MAX)
@@ -636,10 +636,10 @@ if((t->t_filter) && (t->flags & TR_TTRANSLATED) && (t->vector) && (!t->t_filter_
 				{
 				char buf[1025];
 				char *pnt, *rtn;
-	
+
 #if !defined _MSC_VER && !defined __MINGW32__
 				if(feof(GLOBALS->ttrans_filter[t->t_filter]->sin)) break; /* should never happen */
-	
+
 				buf[0] = 0;
 				pnt = fgets(buf, 1024, GLOBALS->ttrans_filter[t->t_filter]->sin);
 				if(!pnt) break;
@@ -663,7 +663,7 @@ if((t->t_filter) && (t->flags & TR_TTRANSLATED) && (t->vector) && (!t->t_filter_
 			                                {
 			                                goto ex;
 			                                }
-			
+
 			                        } while(buf[n]=='\r');
 			                }
 ex:     			buf[n] = 0;
@@ -671,21 +671,21 @@ ex:     			buf[n] = 0;
 			        }
 #endif
 
-	
+
 				while(*pnt) { if(isspace((int)(unsigned char)*pnt)) pnt++; else break;}
-	
+
 				if(*pnt=='#')
 					{
 					TimeType tim = atoi_64(pnt+1) * GLOBALS->time_scale;
 					int slen;
 					char *sp;
-	
+
 					while(*pnt) { if(!isspace((int)(unsigned char)*pnt)) pnt++; else break; }
 					while(*pnt) { if(isspace((int)(unsigned char)*pnt)) pnt++; else break; }
-	
+
 					sp = pnt;
 					slen = strlen(sp);
-	
+
 					if(slen)
 						{
 						pnt = sp + slen - 1;
@@ -694,12 +694,12 @@ ex:     			buf[n] = 0;
 							if(isspace((int)(unsigned char)*pnt)) { *pnt = 0; pnt--; slen--; } else { break; }
 							} while(pnt != (sp-1));
 						}
-						
+
 					vt = calloc_2(1, sizeof(struct VectorEnt) + slen + 1);
 					if(sp) strcpy((char *)vt->v, sp);
-	
-					if(tim > prev_tim) 
-						{ 
+
+					if(tim > prev_tim)
+						{
 						prev_tim = vt->time = tim;
 						vt_curr->next = vt;
 						vt_curr = vt;
@@ -716,7 +716,7 @@ ex:     			buf[n] = 0;
 						{
 						free_2(vt); /* throw it away */
 						}
-	
+
 					continue;
 					}
 				else
@@ -729,16 +729,16 @@ ex:     			buf[n] = 0;
 						TimeType tim = atoi_64(pnt+1) * GLOBALS->time_scale;
 						int slen;
 						char *sp;
-	
+
 						if(tim < LLDescriptor(0)) tim = LLDescriptor(-1);
 						GLOBALS->named_markers[which_marker] = tim;
-	
+
 						while(*pnt) { if(!isspace((int)(unsigned char)*pnt)) pnt++; else break; }
 						while(*pnt) { if(isspace((int)(unsigned char)*pnt)) pnt++; else break; }
-		
+
 						sp = pnt;
 						slen = strlen(sp);
-		
+
 						if(slen)
 							{
 							pnt = sp + slen - 1;
@@ -747,37 +747,37 @@ ex:     			buf[n] = 0;
 								if(isspace((int)(unsigned char)*pnt)) { *pnt = 0; pnt--; slen--; } else { break; }
 								} while(pnt != (sp-1));
 							}
-	
+
 	                                	if(GLOBALS->marker_names[which_marker]) free_2(GLOBALS->marker_names[which_marker]);
 	                                	GLOBALS->marker_names[which_marker] = (sp && (*sp) && (tim >= LLDescriptor(0))) ? strdup_2(sp) : NULL;
 						}
-	
+
 					continue;
 					}
 				else if(*pnt == '$')
 					{
-					if(!strncmp(pnt+1, "finish", 6)) 
+					if(!strncmp(pnt+1, "finish", 6))
 						{
 						is_finish = 1;
 						break;
 						}
 					else
-					if(!strncmp(pnt+1, "next", 4)) 
+					if(!strncmp(pnt+1, "next", 4))
 						{
 						break;
 						}
-					else 
+					else
 					if(!strncmp(pnt+1, "name", 4))
 						{
 						int slen;
 						char *sp;
-	
+
 						pnt+=5;
 						while(*pnt) { if(isspace((int)(unsigned char)*pnt)) pnt++; else break; }
-		
+
 						sp = pnt;
 						slen = strlen(sp);
-		
+
 						if(slen)
 							{
 							pnt = sp + slen - 1;
@@ -786,51 +786,51 @@ ex:     			buf[n] = 0;
 								if(isspace((int)(unsigned char)*pnt)) { *pnt = 0; pnt--; slen--; } else { break; }
 								} while(pnt != (sp-1));
 							}
-	
+
 						if(sp && *sp)
 							{
 							if(trace_name) free_2(trace_name);
 							trace_name = strdup_2(sp);
 							}
-						}				
+						}
 					}
 				}
-	
+
 			vt_curr = vt_curr->next = vt = calloc_2(1, sizeof(struct VectorEnt) + 1);
 			vt->time = MAX_HISTENT_TIME - 1;
 			regions++;
-	
+
 			/* vt_curr = */ vt_curr->next = vt = calloc_2(1, sizeof(struct VectorEnt) + 1); /* scan-build */
 			vt->time = MAX_HISTENT_TIME;
 			regions++;
-	
+
 			bv = calloc_2(1, sizeof(struct BitVector) + (sizeof(vptr) * (regions)));
 			bv->bvname = strdup_2(trace_name ? trace_name : orig_name);
 			bv->nbits = 1;
 			bv->numregions = regions;
 			bv->bits = t->n.vec->bits;
-		
+
 			vt = vt_head;
 			for(i=0;i<regions;i++)
 				{
 				bv->vectors[i] = vt;
 				vt = vt->next;
 				}
-	
+
 			if(!prev_transaction_trace)
 				{
 				prev_transaction_trace = bv;
 				bv->transaction_cache = t->n.vec; /* for possible restore later */
 				t->n.vec = bv;
-	
+
 				t->t_filter_converted = 1;
-	
+
 				if(trace_name)	/* if NULL, no need to regen display as trace name didn't change */
 					{
 					t->name = t->n.vec->bvname;
 			               		if(GLOBALS->hier_max_level)
 			               			t->name = hier_extract(t->name, GLOBALS->hier_max_level);
-			
+
 					regen_display();
 					}
 				}
diff --git a/src/ttranslate.h b/src/ttranslate.h
index 8e978e6..4e2ec0e 100644
--- a/src/ttranslate.h
+++ b/src/ttranslate.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) Tony Bybell 2010.     
+ * Copyright (c) Tony Bybell 2010.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
diff --git a/src/twinwave.c b/src/twinwave.c
index d7e527e..8259331 100644
--- a/src/twinwave.c
+++ b/src/twinwave.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 2006-2009.
  *
  * This program is free software; you can redistribute it and/or
@@ -48,7 +48,7 @@ int quit_callback (GtkWidget *widget, gpointer data)
 fprintf(stderr,"%s\n", (char *)data);
 gtk_exit(0);
 
-return(FALSE); 
+return(FALSE);
 }
 
 
@@ -213,8 +213,8 @@ if(hMapFile != NULL)
 					NULL,
 					&si,
 					&pi);
-			
-				if(!rc) 
+
+				if(!rc)
 					{
 					fprintf(stderr, "Child 0 failed '%s' '%s'\n", arglist[0], mylist);
 					exit(255);
@@ -285,8 +285,8 @@ if(hMapFile != NULL)
 					NULL,
 					&si,
 					&pi);
-			
-				if(!rc) 
+
+				if(!rc)
 					{
 					fprintf(stderr, "Child 1 failed '%s' '%s'\n", arglist[0], mylist);
 					exit(255);
@@ -328,14 +328,14 @@ shmid = shmget(0, 2 * sizeof(struct gtkwave_dual_ipc_t), IPC_CREAT | 0600 );
 if(shmid >=0)
 	{
         struct shmid_ds ds;
-                                 
+
         dual_ctx = shmat(shmid, NULL, 0);
         if(dual_ctx)
                	{
                	memset(dual_ctx, 0, 2 * sizeof(struct gtkwave_dual_ipc_t));
                	memcpy(&dual_ctx[0].matchword, DUAL_MATCHWORD, 4);
                	memcpy(&dual_ctx[1].matchword, DUAL_MATCHWORD, 4);
-	         
+
 #ifdef __linux__
               	shmctl(shmid, IPC_RMID, &ds); /* mark for destroy */
 #endif
@@ -345,7 +345,7 @@ if(shmid >=0)
 			if(fork())
 				{
 				struct timeval tv;
-			
+
 				for(;;)
 					{
 			                tv.tv_sec = 0;
@@ -415,7 +415,7 @@ if(shmid >=0)
 				exit(255);
 				}
 			}
-			else			
+			else
 			{
 			int n_items = argc - split_point + 5;
 			char **arglist = calloc(n_items, sizeof(char *));
diff --git a/src/vcd.c b/src/vcd.c
index 9380ecd..f7114cd 100644
--- a/src/vcd.c
+++ b/src/vcd.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2014.
  *
  * This program is free software; you can redistribute it and/or
@@ -30,7 +30,7 @@
  * MTI SV len=0 is real var     05apr07ajb
  */
 
-/* AIX may need this for alloca to work */ 
+/* AIX may need this for alloca to work */
 #if defined _AIX
   #pragma alloca
 #endif
@@ -103,7 +103,7 @@ return(found);
 
 enum Tokens   { T_VAR, T_END, T_SCOPE, T_UPSCOPE,
 		T_COMMENT, T_DATE, T_DUMPALL, T_DUMPOFF, T_DUMPON,
-		T_DUMPVARS, T_ENDDEFINITIONS, 
+		T_DUMPVARS, T_ENDDEFINITIONS,
 		T_DUMPPORTS, T_DUMPPORTSOFF, T_DUMPPORTSON, T_DUMPPORTSALL,
 		T_TIMESCALE, T_VERSION, T_VCDCLOSE, T_TIMEZERO,
 		T_EOF, T_STRING, T_UNKNOWN_KEY };
@@ -146,25 +146,25 @@ if(GLOBALS->he_curr_vcd_c_1==GLOBALS->he_fini_vcd_c_1)
 	GLOBALS->he_fini_vcd_c_1=GLOBALS->he_curr_vcd_c_1+VCD_HISTENT_GRANULARITY;
 	}
 
-return(GLOBALS->he_curr_vcd_c_1++);	
+return(GLOBALS->he_curr_vcd_c_1++);
 }
 
 /******************************************************************/
 
 
 /******************************************************************/
- 
+
 
 static unsigned int vcdid_hash(char *s, int len)
-{  
+{
 unsigned int val=0;
 int i;
 
 s+=(len-1);
-                 
+
 for(i=0;i<len;i++)
         {
-        val *= 94;				
+        val *= 94;
         val += (((unsigned char)*s) - 32);
         s--;
         }
@@ -210,7 +210,7 @@ if(GLOBALS->indexed_vcd_c_1)
 
 if(GLOBALS->sorted_vcd_c_1)
 	{
-	v=(struct vcdsymbol **)bsearch(key, GLOBALS->sorted_vcd_c_1, GLOBALS->numsyms_vcd_c_1, 
+	v=(struct vcdsymbol **)bsearch(key, GLOBALS->sorted_vcd_c_1, GLOBALS->numsyms_vcd_c_1,
 		sizeof(struct vcdsymbol *), vcdsymbsearchcompare);
 
 	if(v)
@@ -219,7 +219,7 @@ if(GLOBALS->sorted_vcd_c_1)
 			for(;;)
 				{
 				t=*v;
-		
+
 				if((v==GLOBALS->sorted_vcd_c_1)||(strcmp((*(--v))->id, key)))
 					{
 					return(t);
@@ -269,7 +269,7 @@ struct vcdsymbol *v;
 struct vcdsymbol **pnt;
 unsigned int vcd_distance;
 
-if(GLOBALS->sorted_vcd_c_1) 
+if(GLOBALS->sorted_vcd_c_1)
 	{
 	free_2(GLOBALS->sorted_vcd_c_1);	/* this means we saw a 2nd enddefinition chunk! */
 	GLOBALS->sorted_vcd_c_1=NULL;
@@ -288,7 +288,7 @@ if(GLOBALS->numsyms_vcd_c_1)
         if((vcd_distance <= VCD_INDEXSIZ)||(!GLOBALS->vcd_hash_kill))
                 {
                 GLOBALS->indexed_vcd_c_1 = (struct vcdsymbol **)calloc_2(vcd_distance, sizeof(struct vcdsymbol *));
-         
+
 		/* printf("%d symbols span ID range of %d, using indexing...\n", GLOBALS->numsyms_vcd_c_1, vcd_distance); */
 
                 v=GLOBALS->vcdsymroot_vcd_c_1;
@@ -299,7 +299,7 @@ if(GLOBALS->numsyms_vcd_c_1)
                         }
                 }
                 else
-		{	
+		{
 		pnt=GLOBALS->sorted_vcd_c_1=(struct vcdsymbol **)calloc_2(GLOBALS->numsyms_vcd_c_1, sizeof(struct vcdsymbol *));
 		v=GLOBALS->vcdsymroot_vcd_c_1;
 		while(v)
@@ -307,7 +307,7 @@ if(GLOBALS->numsyms_vcd_c_1)
 			*(pnt++)=v;
 			v=v->next;
 			}
-	
+
 		qsort(GLOBALS->sorted_vcd_c_1, GLOBALS->numsyms_vcd_c_1, sizeof(struct vcdsymbol *), vcdsymcompare);
 		}
 	}
@@ -400,7 +400,7 @@ for(;;)
 	if(ch<=' ') continue;	/* val<=' ' is a quick whitespace check      */
 	break;			/* (take advantage of fact that vcd is text) */
 	}
-if(ch=='$') 
+if(ch=='$')
 	{
 	GLOBALS->yytext_vcd_c_1[len++]=ch;
 	for(;;)
@@ -427,7 +427,7 @@ for(GLOBALS->yytext_vcd_c_1[len++]=ch;;GLOBALS->yytext_vcd_c_1[len++]=ch)
 	}
 GLOBALS->yytext_vcd_c_1[len]=0;	/* terminator */
 
-if(is_string) 
+if(is_string)
 	{
 	GLOBALS->yylen_vcd_c_1=len;
 	return(T_STRING);
@@ -471,7 +471,7 @@ if(!GLOBALS->var_prevch_vcd_c_1)
 	ch=GLOBALS->var_prevch_vcd_c_1;
 	GLOBALS->var_prevch_vcd_c_1=0;
 	}
-	
+
 if(ch=='[') return(V_LB);
 if(ch==':') return(V_COLON);
 if(ch==']') return(V_RB);
@@ -534,7 +534,7 @@ if(!GLOBALS->var_prevch_vcd_c_1)
 	ch=GLOBALS->var_prevch_vcd_c_1;
 	GLOBALS->var_prevch_vcd_c_1=0;
 	}
-	
+
 if(ch=='[') return(V_LB);
 if(ch==':') return(V_COLON);
 if(ch==']') return(V_RB);
@@ -626,7 +626,7 @@ if(!GLOBALS->var_prevch_vcd_c_1)
       ch=GLOBALS->var_prevch_vcd_c_1;
       GLOBALS->var_prevch_vcd_c_1=0;
       }
-      
+
 for(GLOBALS->yytext_vcd_c_1[len++]=ch;;GLOBALS->yytext_vcd_c_1[len++]=ch)
       {
 	if(len==GLOBALS->T_MAX_STR_vcd_c_1)
@@ -762,7 +762,7 @@ switch(GLOBALS->yytext_vcd_c_1[0])
 	case '-':
 		if(GLOBALS->yylen_vcd_c_1>1)
 			{
-			v=bsearch_vcd(GLOBALS->yytext_vcd_c_1+1, GLOBALS->yylen_vcd_c_1-1);	
+			v=bsearch_vcd(GLOBALS->yytext_vcd_c_1+1, GLOBALS->yylen_vcd_c_1-1);
 			if(!v)
 				{
 				fprintf(stderr,"Near byte %d, Unknown VCD identifier: '%s'\n",(int)(GLOBALS->vcdbyteno_vcd_c_1+(GLOBALS->vst_vcd_c_1-GLOBALS->vcdbuf_vcd_c_1)),GLOBALS->yytext_vcd_c_1+1);
@@ -786,12 +786,12 @@ switch(GLOBALS->yytext_vcd_c_1[0])
 	case 'B':
 		{
 		/* extract binary number then.. */
-		vector=malloc_2(GLOBALS->yylen_cache_vcd_c_1=GLOBALS->yylen_vcd_c_1); 
+		vector=malloc_2(GLOBALS->yylen_cache_vcd_c_1=GLOBALS->yylen_vcd_c_1);
 		strcpy(vector,GLOBALS->yytext_vcd_c_1+1);
 		vlen=GLOBALS->yylen_vcd_c_1-1;
 
 		get_strtoken();
-		v=bsearch_vcd(GLOBALS->yytext_vcd_c_1, GLOBALS->yylen_vcd_c_1);	
+		v=bsearch_vcd(GLOBALS->yytext_vcd_c_1, GLOBALS->yylen_vcd_c_1);
 		if(!v)
 			{
 			fprintf(stderr,"Near byte %d, Unknown identifier: '%s'\n",(int)(GLOBALS->vcdbyteno_vcd_c_1+(GLOBALS->vst_vcd_c_1-GLOBALS->vcdbuf_vcd_c_1)), GLOBALS->yytext_vcd_c_1);
@@ -806,14 +806,14 @@ switch(GLOBALS->yytext_vcd_c_1[0])
 				char *pnt;
 				char ch;
 				TimeType k=0;
-		
+
 				pnt=vector;
 				while((ch=*(pnt++))) { k=(k<<1)|((ch=='1')?1:0); }
 				free_2(vector);
-			
+
 				d=malloc_2(sizeof(double));
 				*d=(double)k;
-			
+
 				if(!v)
 					{
 					fprintf(stderr,"Near byte %d, Unknown identifier: '%s'\n",(int)(GLOBALS->vcdbyteno_vcd_c_1+(GLOBALS->vst_vcd_c_1-GLOBALS->vcdbuf_vcd_c_1)), GLOBALS->yytext_vcd_c_1);
@@ -834,7 +834,7 @@ switch(GLOBALS->yytext_vcd_c_1[0])
 
 				extend=(vector[0]=='1')?'0':vector[0];
 
-				fill=v->size-vlen;				
+				fill=v->size-vlen;
 				for(i=0;i<fill;i++)
 					{
 					v->value[i]=extend;
@@ -880,14 +880,14 @@ switch(GLOBALS->yytext_vcd_c_1[0])
 
 	case 'p':
 		/* extract port dump value.. */
-		vector=malloc_2(GLOBALS->yylen_cache_vcd_c_1=GLOBALS->yylen_vcd_c_1); 
+		vector=malloc_2(GLOBALS->yylen_cache_vcd_c_1=GLOBALS->yylen_vcd_c_1);
 		strcpy(vector,GLOBALS->yytext_vcd_c_1+1);
 		vlen=GLOBALS->yylen_vcd_c_1-1;
 
 		get_strtoken();	/* throw away 0_strength_component */
 		get_strtoken(); /* throw away 0_strength_component */
 		get_strtoken(); /* this is the id                  */
-		v=bsearch_vcd(GLOBALS->yytext_vcd_c_1, GLOBALS->yylen_vcd_c_1);	
+		v=bsearch_vcd(GLOBALS->yytext_vcd_c_1, GLOBALS->yylen_vcd_c_1);
 		if(!v)
 			{
 			fprintf(stderr,"Near byte %d, Unknown identifier: '%s'\n",(int)(GLOBALS->vcdbyteno_vcd_c_1+(GLOBALS->vst_vcd_c_1-GLOBALS->vcdbuf_vcd_c_1)), GLOBALS->yytext_vcd_c_1);
@@ -902,14 +902,14 @@ switch(GLOBALS->yytext_vcd_c_1[0])
 				char *pnt;
 				char ch;
 				TimeType k=0;
-		
+
 				pnt=vector;
 				while((ch=*(pnt++))) { k=(k<<1)|((ch=='1')?1:0); }
 				free_2(vector);
-			
+
 				d=malloc_2(sizeof(double));
 				*d=(double)k;
-			
+
 				if(!v)
 					{
 					fprintf(stderr,"Near byte %d, Unknown identifier: '%s'\n",(int)(GLOBALS->vcdbyteno_vcd_c_1+(GLOBALS->vst_vcd_c_1-GLOBALS->vcdbuf_vcd_c_1)), GLOBALS->yytext_vcd_c_1);
@@ -930,7 +930,7 @@ switch(GLOBALS->yytext_vcd_c_1[0])
 
 				extend='0';
 
-				fill=v->size-vlen;				
+				fill=v->size-vlen;
 				for(i=0;i<fill;i++)
 					{
 					v->value[i]=extend;
@@ -980,9 +980,9 @@ switch(GLOBALS->yytext_vcd_c_1[0])
 
 		d=malloc_2(sizeof(double));
 		sscanf(GLOBALS->yytext_vcd_c_1+1,"%lg",d);
-		
+
 		get_strtoken();
-		v=bsearch_vcd(GLOBALS->yytext_vcd_c_1, GLOBALS->yylen_vcd_c_1);	
+		v=bsearch_vcd(GLOBALS->yytext_vcd_c_1, GLOBALS->yylen_vcd_c_1);
 		if(!v)
 			{
 			fprintf(stderr,"Near byte %d, Unknown identifier: '%s'\n",(int)(GLOBALS->vcdbyteno_vcd_c_1+(GLOBALS->vst_vcd_c_1-GLOBALS->vcdbuf_vcd_c_1)), GLOBALS->yytext_vcd_c_1);
@@ -1011,7 +1011,7 @@ switch(GLOBALS->yytext_vcd_c_1[0])
 			}
 
 		get_strtoken();
-		v=bsearch_vcd(GLOBALS->yytext_vcd_c_1, GLOBALS->yylen_vcd_c_1);	
+		v=bsearch_vcd(GLOBALS->yytext_vcd_c_1, GLOBALS->yylen_vcd_c_1);
 		if(!v)
 			{
 			fprintf(stderr,"Near byte %d, Unknown identifier: '%s'\n",(int)(GLOBALS->vcdbyteno_vcd_c_1+(GLOBALS->vst_vcd_c_1-GLOBALS->vcdbuf_vcd_c_1)), GLOBALS->yytext_vcd_c_1);
@@ -1048,7 +1048,7 @@ while((ch=*src))
 			*dst=vcd[i];
 			break;
 			}
-		}	
+		}
 	if(i==23) *dst='x';
 
 	src++;
@@ -1080,8 +1080,8 @@ for(;;)
 			break;
                 case T_TIMEZERO:
                         {
-                        int vtok=get_token();    
-                        if((vtok==T_END)||(vtok==T_EOF)) break;   
+                        int vtok=get_token();
+                        if((vtok==T_END)||(vtok==T_EOF)) break;
                         GLOBALS->global_time_offset=atoi_64(GLOBALS->yytext_vcd_c_1);
 
                         DEBUG(fprintf(stderr,"TIMEZERO: "TTFormat"\n",GLOBALS->global_time_offset));
@@ -1111,7 +1111,7 @@ for(;;)
 				{
 				vtok=get_token();
 				if((vtok==T_END)||(vtok==T_EOF)) break;
-				prefix=GLOBALS->yytext_vcd_c_1[0];		
+				prefix=GLOBALS->yytext_vcd_c_1[0];
 				}
 			switch(prefix)
 				{
@@ -1141,7 +1141,7 @@ for(;;)
 			T_GET;
                                 {
                                 switch(GLOBALS->yytext_vcd_c_1[0])
-                                        { 
+                                        {
                                         case 'm':       ttype = TREE_VCD_ST_MODULE; break;
                                         case 't':       ttype = TREE_VCD_ST_TASK; break;
                                         case 'f':       ttype = (GLOBALS->yytext_vcd_c_1[1] == 'u') ? TREE_VCD_ST_FUNCTION : TREE_VCD_ST_FORK; break;
@@ -1277,7 +1277,7 @@ for(;;)
 					v->size=atoi_64(GLOBALS->yytext_vcd_c_1);
 					if(!v->size) v->size=1;
 					}
-					else 
+					else
 					if(vtok==V_LB)
 					{
 					vtok=get_vartoken(1);
@@ -1380,7 +1380,7 @@ for(;;)
 					}
 
                                 if(GLOBALS->pv_vcd_c_1)
-                                        { 
+                                        {
                                         if(!strcmp(GLOBALS->pv_vcd_c_1->name,v->name) && !disable_autocoalesce && (!strchr(v->name, '\\')))
                                                 {
                                                 GLOBALS->pv_vcd_c_1->chain=v;
@@ -1422,7 +1422,7 @@ for(;;)
                                         {
                                         GLOBALS->vcd_hash_kill = 1;
                                         }
-                                
+
                                 if(v->nid < GLOBALS->vcd_minid_vcd_c_1) GLOBALS->vcd_minid_vcd_c_1 = v->nid;
                                 if(v->nid > GLOBALS->vcd_maxid_vcd_c_1) GLOBALS->vcd_maxid_vcd_c_1 = v->nid;
 
@@ -1472,7 +1472,7 @@ for(;;)
 					}
 
                                 if(GLOBALS->pv_vcd_c_1)
-                                        { 
+                                        {
                                         if(!strcmp(GLOBALS->pv_vcd_c_1->name,v->name))
                                                 {
                                                 GLOBALS->pv_vcd_c_1->chain=v;
@@ -1489,7 +1489,7 @@ for(;;)
 					GLOBALS->rootv_vcd_c_1=v;
 					}
                                 GLOBALS->pv_vcd_c_1=v;
-				
+
 				vtok=get_vartoken(1);
 				if(vtok==V_END) goto dumpv;
 				if(vtok!=V_LB) goto err;
@@ -1539,14 +1539,14 @@ for(;;)
 			else
 			if((v->size>1)&&(v->msi<=0)&&(v->lsi<=0))
 				{
-				if(v->vartype==V_EVENT) 
+				if(v->vartype==V_EVENT)
 					{
 					v->size=1;
 					}
 					else
 					{
 					/* any criteria for the direction here? */
-					v->msi=v->size-1;	
+					v->msi=v->size-1;
 					v->lsi=0;
 					}
 				}
@@ -1564,7 +1564,7 @@ for(;;)
                                         }
 				}
 			else
-			if((v->lsi>=v->msi)&&((v->lsi-v->msi+1)!=v->size)) 
+			if((v->lsi>=v->msi)&&((v->lsi-v->msi+1)!=v->size))
 				{
                                 if((v->vartype!=V_EVENT)&&(v->vartype!=V_PARAMETER))
                                         {
@@ -1599,7 +1599,7 @@ for(;;)
 					for(i=0;i<v->size;i++)
 						{
 						v->value[i]='x';
-	
+
 						v->narray[i]=(struct Node *)calloc_2(1,sizeof(struct Node));
 						v->narray[i]->head.time=-1;
 						v->narray[i]->head.v.h_val=AN_X;
@@ -1690,7 +1690,7 @@ for(;;)
 			if(v)
 				{
 				GLOBALS->error_count_vcd_c_1++;
-				if(v->name) 
+				if(v->name)
 					{
 					fprintf(stderr, "Near byte %d, $VAR parse error encountered with '%s'\n", (int)(GLOBALS->vcdbyteno_vcd_c_1+(GLOBALS->vst_vcd_c_1-GLOBALS->vcdbuf_vcd_c_1)), v->name);
 					free_2(v->name);
@@ -1736,7 +1736,7 @@ for(;;)
 					{
 					TimeType tim;
 					tim=atoi_64(GLOBALS->yytext_vcd_c_1+1);
-					
+
 					if(GLOBALS->start_time_vcd_c_1<0)
 						{
 						GLOBALS->start_time_vcd_c_1=tim;
@@ -1842,7 +1842,7 @@ if(!n->curr)
         if((ch=='l')||(ch=='L')) heval=AN_L; else
         /* if(ch=='-') */        heval=AN_DASH;		/* default */
 
-	if((n->curr->v.h_val!=heval)||(tim==GLOBALS->start_time_vcd_c_1)||(n->vartype==ND_VCD_EVENT)||(GLOBALS->vcd_preserve_glitches)) /* same region == go skip */ 
+	if((n->curr->v.h_val!=heval)||(tim==GLOBALS->start_time_vcd_c_1)||(n->vartype==ND_VCD_EVENT)||(GLOBALS->vcd_preserve_glitches)) /* same region == go skip */
         	{
 		if(n->curr->time==tim)
 			{
@@ -1882,23 +1882,23 @@ switch(ch)
 		he->flags=(HIST_STRING|HIST_REAL);
 	        he->time=-1;
 	        he->v.h_vector=NULL;
-	
+
 		n->curr=he;
 		n->head.next=he;
-	
+
 		add_histent(tim,n,ch,regadd, vector);
 		}
 		else
 		{
 		if(regadd) { tim*=(GLOBALS->time_scale); }
-	
+
 			if(n->curr->time==tim)
 				{
 				DEBUG(printf("Warning: String Glitch at time ["TTFormat"] Signal [%p].\n",
 					tim, n));
 				if(n->curr->v.h_vector) free_2(n->curr->v.h_vector);
 				n->curr->v.h_vector=vector;		/* we have a glitch! */
-	
+
 				GLOBALS->num_glitches_vcd_c_2++;
 				if(!(n->curr->flags&HIST_GLITCH))
 					{
@@ -1912,7 +1912,7 @@ switch(ch)
 				he->flags=(HIST_STRING|HIST_REAL);
 	                	he->time=tim;
 	                	he->v.h_vector=vector;
-	
+
 	                	n->curr->next=he;
 				n->curr=he;
 	                	GLOBALS->regions+=regadd;
@@ -1932,16 +1932,16 @@ switch(ch)
 #else
 	        he->v.h_vector=NULL;
 #endif
-	
+
 		n->curr=he;
 		n->head.next=he;
-	
+
 		add_histent(tim,n,ch,regadd, vector);
 		}
 		else
 		{
 		if(regadd) { tim*=(GLOBALS->time_scale); }
-	
+
 		if(
 #ifdef WAVE_HAS_H_DOUBLE
 		  (vector&&(n->curr->v.h_double!=*(double *)vector))
@@ -1953,7 +1953,7 @@ switch(ch)
 			||(!n->curr->v.h_vector)
 #endif
 			||(GLOBALS->vcd_preserve_glitches)||(GLOBALS->vcd_preserve_glitches_real)
-			) /* same region == go skip */ 
+			) /* same region == go skip */
 	        	{
 			if(n->curr->time==tim)
 				{
@@ -1981,7 +1981,7 @@ switch(ch)
 				he->v.h_double = *((double *)vector);
 #else
 	                	he->v.h_vector=vector;
-#endif	
+#endif
 	                	n->curr->next=he;
 				n->curr=he;
 	                	GLOBALS->regions+=regadd;
@@ -2006,22 +2006,22 @@ switch(ch)
 		he=histent_calloc();
 	        he->time=-1;
 	        he->v.h_vector=NULL;
-	
+
 		n->curr=he;
 		n->head.next=he;
-	
+
 		add_histent(tim,n,ch,regadd, vector);
 		}
 		else
 		{
 		if(regadd) { tim*=(GLOBALS->time_scale); }
-	
+
 		if(
 		  (n->curr->v.h_vector&&vector&&(strcmp(n->curr->v.h_vector,vector)))
 			||(tim==GLOBALS->start_time_vcd_c_1)
 			||(!n->curr->v.h_vector)
 			||(GLOBALS->vcd_preserve_glitches)
-			) /* same region == go skip */ 
+			) /* same region == go skip */
 	        	{
 			if(n->curr->time==tim)
 				{
@@ -2029,7 +2029,7 @@ switch(ch)
 					tim, n, AN_STR[n->curr->v.h_val], ch));
 				if(n->curr->v.h_vector) free_2(n->curr->v.h_vector);
 				n->curr->v.h_vector=vector;		/* we have a glitch! */
-	
+
 				GLOBALS->num_glitches_vcd_c_2++;
 				if(!(n->curr->flags&HIST_GLITCH))
 					{
@@ -2042,7 +2042,7 @@ switch(ch)
 	                	he=histent_calloc();
 	                	he->time=tim;
 	                	he->v.h_vector=vector;
-	
+
 	                	n->curr->next=he;
 				n->curr=he;
 	                	GLOBALS->regions+=regadd;
@@ -2213,10 +2213,10 @@ while(v)
 		if(((v->size==1)||(!GLOBALS->atomic_vectors))&&(v->vartype!=V_REAL)&&(v->vartype!=V_STRINGTYPE))
 			{
 			struct symbol *s = NULL;
-	
+
 			for(j=0;j<v->size;j++)
 				{
-				if(v->msi>=0) 
+				if(v->msi>=0)
 					{
 					if(!GLOBALS->vcd_explicit_zero_subscripts)
 						sprintf(str+slen,"%d",msi);
@@ -2250,7 +2250,7 @@ while(v)
 					if(substnode)
 						{
 						struct Node *n, *n2;
-	
+
 						n=s->n;
 						n2=vprime->narray[j];
 						/* nname stays same */
@@ -2259,7 +2259,7 @@ while(v)
 						/* harray calculated later */
 						n->numhist=n2->numhist;
 						}
-	
+
 #ifndef _WAVE_HAVE_JUDY
 					s->n->nname=s->name;
 #endif
@@ -2267,14 +2267,14 @@ while(v)
 					        {
 					        GLOBALS->firstnode=
 					        GLOBALS->curnode=calloc_2(1, sizeof(struct symchain));
-					        }   
-					        else                                     
+					        }
+					        else
 					        {
 					        GLOBALS->curnode->next=calloc_2(1, sizeof(struct symchain));
 					        GLOBALS->curnode=GLOBALS->curnode->next;
 					        }
 					GLOBALS->curnode->symbol=s;
-                                                               	
+
 					GLOBALS->numfacs++;
 					DEBUG(fprintf(stderr,"Added: %s\n",str));
 					}
@@ -2367,8 +2367,8 @@ while(v)
 				        {
 				        GLOBALS->firstnode=
 				        GLOBALS->curnode=calloc_2(1, sizeof(struct symchain));
-				        }   
-				        else                                     
+				        }
+				        else
 				        {
 				        GLOBALS->curnode->next=calloc_2(1, sizeof(struct symchain));
 				        GLOBALS->curnode=GLOBALS->curnode->next;
@@ -2386,10 +2386,10 @@ while(v)
 
 #ifdef _WAVE_HAVE_JUDY
 {
-Pvoid_t  PJArray = GLOBALS->sym_judy;   
+Pvoid_t  PJArray = GLOBALS->sym_judy;
 PPvoid_t PPValue;
 char *Index = calloc_2(1, longest);
-                                
+
 for (PPValue  = JudySLFirst (PJArray, (uint8_t *)Index, PJE0);
          PPValue != (PPvoid_t) NULL;
          PPValue  = JudySLNext  (PJArray, (uint8_t *)Index, PJE0))
@@ -2405,7 +2405,7 @@ free_2(Index);
 
 if(sym_chain)
 	{
-	sym_curr=sym_chain;	
+	sym_curr=sym_chain;
 	while(sym_curr)
 		{
 		sym_curr->val->vec_root= ((struct vcdsymbol *)sym_curr->val->vec_root)->sym_chain;
@@ -2438,7 +2438,7 @@ for(i=0;i<GLOBALS->numfacs;i++)
 #endif
         int len;
 	struct symchain *sc;
-                 
+
         GLOBALS->facs[i]=GLOBALS->curnode->symbol;
 	subst=GLOBALS->facs[i]->name;
         if((len=strlen(subst))>GLOBALS->longestname) GLOBALS->longestname=len;
@@ -2462,14 +2462,14 @@ wave_heapsort(GLOBALS->facs,GLOBALS->numfacs);
 for(i=0;i<GLOBALS->numfacs;i++)
         {
         char *subst, ch;
-         
+
         subst=GLOBALS->facs[i]->name;
         while((ch=(*subst)))
                 {
                 if(ch==VCDNAM_HIERSORT) { *subst=GLOBALS->hier_delimeter; } /* restore back to normal */
                 subst++;
                 }
-        
+
 #ifdef DEBUG_FACILITIES
         printf("%-4d %s\n",i,facs[i]->name);
 #endif
@@ -2480,7 +2480,7 @@ GLOBALS->facs_are_sorted=1;
 
 init_tree();
 for(i=0;i<GLOBALS->numfacs;i++)
-{                       
+{
 char *n = GLOBALS->facs[i]->name;
 build_tree_from_name(n, i);
 
@@ -2494,11 +2494,11 @@ if(GLOBALS->escaped_names_found_vcd_c_1)
                 subst++;
                 }
 	}
-}                       
+}
 treegraft(&GLOBALS->treeroot);
 treesort(GLOBALS->treeroot, NULL);
 
-if(GLOBALS->escaped_names_found_vcd_c_1) 
+if(GLOBALS->escaped_names_found_vcd_c_1)
 	{
 	treenamefix(GLOBALS->treeroot);
 	}
@@ -2513,12 +2513,12 @@ struct vcdsymbol *v, *vt;
 
 if(GLOBALS->indexed_vcd_c_1)
 	{
-	free_2(GLOBALS->indexed_vcd_c_1); GLOBALS->indexed_vcd_c_1=NULL; 
+	free_2(GLOBALS->indexed_vcd_c_1); GLOBALS->indexed_vcd_c_1=NULL;
 	}
 
 if(GLOBALS->sorted_vcd_c_1)
 	{
-	free_2(GLOBALS->sorted_vcd_c_1); GLOBALS->sorted_vcd_c_1=NULL; 
+	free_2(GLOBALS->sorted_vcd_c_1); GLOBALS->sorted_vcd_c_1=NULL;
 	}
 
 v=GLOBALS->vcdsymroot_vcd_c_1;
@@ -2633,7 +2633,7 @@ if(!GLOBALS->vcd_handle_vcd_c_1)
 	vcd_exit(255);
 	}
 
-/* SPLASH */				splash_create(); 
+/* SPLASH */				splash_create();
 
 sym_hash_initialize(GLOBALS);
 getch_alloc();		/* alloc membuff for vcd getch buffer */
@@ -2657,7 +2657,7 @@ add_tail_histents();
 if(GLOBALS->vcd_save_handle) { fclose(GLOBALS->vcd_save_handle); GLOBALS->vcd_save_handle = NULL; }
 
 fprintf(stderr, "["TTFormat"] start time.\n["TTFormat"] end time.\n", GLOBALS->start_time_vcd_c_1*GLOBALS->time_scale, GLOBALS->end_time_vcd_c_1*GLOBALS->time_scale);
-if(GLOBALS->num_glitches_vcd_c_2) fprintf(stderr, "Warning: encountered %d glitch%s across %d glitch region%s.\n", 
+if(GLOBALS->num_glitches_vcd_c_2) fprintf(stderr, "Warning: encountered %d glitch%s across %d glitch region%s.\n",
 		GLOBALS->num_glitches_vcd_c_2, (GLOBALS->num_glitches_vcd_c_2!=1)?"es":"",
 		GLOBALS->num_glitch_regions_vcd_c_2, (GLOBALS->num_glitch_regions_vcd_c_2!=1)?"s":"");
 
@@ -2693,10 +2693,10 @@ if(GLOBALS->blackout_regions)
         {
         struct blackout_region_t *bt = GLOBALS->blackout_regions;
         while(bt)
-                {               
+                {
                 bt->bstart *= GLOBALS->time_scale;
                 bt->bend *= GLOBALS->time_scale;
-                bt = bt->next;   
+                bt = bt->next;
                 }
         }
 
diff --git a/src/vcd.h b/src/vcd.h
index 4c7b7ea..1913b30 100644
--- a/src/vcd.h
+++ b/src/vcd.h
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2010.
  *
  * This program is free software; you can redistribute it and/or
@@ -12,7 +12,7 @@
 #ifndef VCD_H
 #define VCD_H
 
-#include <stdio.h> 
+#include <stdio.h>
 #include <stdlib.h>
 
 #ifndef _MSC_VER
@@ -51,9 +51,9 @@
 		exit(x); \
 		}
 
-enum VCDName_ByteSubstitutions { VCDNAM_NULL=0, 
+enum VCDName_ByteSubstitutions { VCDNAM_NULL=0,
 #ifdef WAVE_HIERFIX
-VCDNAM_HIERSORT, 
+VCDNAM_HIERSORT,
 #endif
 VCDNAM_ESCAPE };
 
@@ -62,7 +62,7 @@ VCDNAM_ESCAPE };
 enum VarTypes { V_EVENT, V_PARAMETER,
                 V_INTEGER, V_REAL, V_REAL_PARAMETER=V_REAL, V_REALTIME=V_REAL, V_SHORTREAL=V_REAL, V_REG, V_SUPPLY0,
                 V_SUPPLY1, V_TIME, V_TRI, V_TRIAND, V_TRIOR,
-                V_TRIREG, V_TRI0, V_TRI1, V_WAND, V_WIRE, V_WOR, V_PORT, V_IN=V_PORT, V_OUT=V_PORT, V_INOUT=V_PORT, 
+                V_TRIREG, V_TRI0, V_TRI1, V_WAND, V_WIRE, V_WOR, V_PORT, V_IN=V_PORT, V_OUT=V_PORT, V_INOUT=V_PORT,
 		V_BIT, V_LOGIC, V_INT, V_SHORTINT, V_LONGINT, V_BYTE, V_ENUM,
 		V_STRINGTYPE,
                 V_END, V_LB, V_COLON, V_RB, V_STRING
@@ -87,7 +87,7 @@ struct symbol *val;
 };
 
 struct slist
-{  
+{
 struct slist *next;
 char *str;
 struct tree *mod_tree_parent;
diff --git a/src/vcd_partial.c b/src/vcd_partial.c
index bad416a..1255f75 100644
--- a/src/vcd_partial.c
+++ b/src/vcd_partial.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2011.
  *
  * This program is free software; you can redistribute it and/or
@@ -122,7 +122,7 @@ return(len);
 
 enum Tokens   { T_VAR, T_END, T_SCOPE, T_UPSCOPE,
 		T_COMMENT, T_DATE, T_DUMPALL, T_DUMPOFF, T_DUMPON,
-		T_DUMPVARS, T_ENDDEFINITIONS, 
+		T_DUMPVARS, T_ENDDEFINITIONS,
 		T_DUMPPORTS, T_DUMPPORTSOFF, T_DUMPPORTSON, T_DUMPPORTSALL,
 		T_TIMESCALE, T_VERSION, T_VCDCLOSE, T_TIMEZERO,
 		T_EOF, T_STRING, T_UNKNOWN_KEY };
@@ -142,18 +142,18 @@ static char *tokens[]={ "var", "end", "scope", "upscope",
 
 /******************************************************************/
 
-#define NUM_VTOKENS 23  
+#define NUM_VTOKENS 23
 
 /******************************************************************/
- 
+
 
 static unsigned int vcdid_hash(char *s, int len)
-{  
+{
 unsigned int val=0;
 int i;
 
 s+=(len-1);
-                 
+
 for(i=0;i<len;i++)
         {
         val *= 94;
@@ -202,7 +202,7 @@ if(GLOBALS->indexed_vcd_partial_c_2)
 
 if(GLOBALS->sorted_vcd_partial_c_2)
 	{
-	v=(struct vcdsymbol **)bsearch(key, GLOBALS->sorted_vcd_partial_c_2, GLOBALS->numsyms_vcd_partial_c_2, 
+	v=(struct vcdsymbol **)bsearch(key, GLOBALS->sorted_vcd_partial_c_2, GLOBALS->numsyms_vcd_partial_c_2,
 		sizeof(struct vcdsymbol *), vcdsymbsearchcompare);
 
 	if(v)
@@ -211,7 +211,7 @@ if(GLOBALS->sorted_vcd_partial_c_2)
 			for(;;)
 				{
 				t=*v;
-		
+
 				if((v==GLOBALS->sorted_vcd_partial_c_2)||(strcmp((*(--v))->id, key)))
 					{
 					return(t);
@@ -261,7 +261,7 @@ struct vcdsymbol *v;
 struct vcdsymbol **pnt;
 unsigned int vcd_distance;
 
-if(GLOBALS->sorted_vcd_partial_c_2) 
+if(GLOBALS->sorted_vcd_partial_c_2)
 	{
 	free_2(GLOBALS->sorted_vcd_partial_c_2);	/* this means we saw a 2nd enddefinition chunk! */
 	GLOBALS->sorted_vcd_partial_c_2=NULL;
@@ -280,7 +280,7 @@ if(GLOBALS->numsyms_vcd_partial_c_2)
         if((vcd_distance <= VCD_INDEXSIZ)||(!GLOBALS->vcd_hash_kill))
                 {
                 GLOBALS->indexed_vcd_partial_c_2 = (struct vcdsymbol **)calloc_2(vcd_distance, sizeof(struct vcdsymbol *));
-         
+
 		/* printf("%d symbols span ID range of %d, using indexing...\n", numsyms, vcd_distance); */
 
                 v=GLOBALS->vcdsymroot_vcd_partial_c_2;
@@ -291,7 +291,7 @@ if(GLOBALS->numsyms_vcd_partial_c_2)
                         }
                 }
                 else
-		{	
+		{
 		pnt=GLOBALS->sorted_vcd_partial_c_2=(struct vcdsymbol **)calloc_2(GLOBALS->numsyms_vcd_partial_c_2, sizeof(struct vcdsymbol *));
 		v=GLOBALS->vcdsymroot_vcd_partial_c_2;
 		while(v)
@@ -299,7 +299,7 @@ if(GLOBALS->numsyms_vcd_partial_c_2)
 			*(pnt++)=v;
 			v=v->next;
 			}
-	
+
 		qsort(GLOBALS->sorted_vcd_partial_c_2, GLOBALS->numsyms_vcd_partial_c_2, sizeof(struct vcdsymbol *), vcdsymcompare);
 		}
 	}
@@ -377,7 +377,7 @@ for(;;)
 	if(ch<=' ') continue;	/* val<=' ' is a quick whitespace check      */
 	break;			/* (take advantage of fact that vcd is text) */
 	}
-if(ch=='$') 
+if(ch=='$')
 	{
 	GLOBALS->yytext_vcd_partial_c_2[len++]=ch;
 	for(;;)
@@ -404,7 +404,7 @@ for(GLOBALS->yytext_vcd_partial_c_2[len++]=ch;;GLOBALS->yytext_vcd_partial_c_2[l
 	}
 GLOBALS->yytext_vcd_partial_c_2[len]=0;	/* terminator */
 
-if(is_string) 
+if(is_string)
 	{
 	GLOBALS->yylen_vcd_partial_c_2=len;
 	return(T_STRING);
@@ -448,7 +448,7 @@ if(!GLOBALS->var_prevch_vcd_partial_c_2)
 	ch=GLOBALS->var_prevch_vcd_partial_c_2;
 	GLOBALS->var_prevch_vcd_partial_c_2=0;
 	}
-	
+
 if(ch=='[') return(V_LB);
 if(ch==':') return(V_COLON);
 if(ch==']') return(V_RB);
@@ -511,7 +511,7 @@ if(!GLOBALS->var_prevch_vcd_partial_c_2)
 	ch=GLOBALS->var_prevch_vcd_partial_c_2;
 	GLOBALS->var_prevch_vcd_partial_c_2=0;
 	}
-	
+
 if(ch=='[') return(V_LB);
 if(ch==':') return(V_COLON);
 if(ch==']') return(V_RB);
@@ -603,7 +603,7 @@ if(!GLOBALS->var_prevch_vcd_partial_c_2)
       ch=GLOBALS->var_prevch_vcd_partial_c_2;
       GLOBALS->var_prevch_vcd_partial_c_2=0;
       }
-      
+
 for(GLOBALS->yytext_vcd_partial_c_2[len++]=ch;;GLOBALS->yytext_vcd_partial_c_2[len++]=ch)
       {
 	if(len==GLOBALS->T_MAX_STR_vcd_partial_c_2)
@@ -675,7 +675,7 @@ switch(GLOBALS->yytext_vcd_partial_c_2[0])
 	case '-':
 		if(GLOBALS->yylen_vcd_partial_c_2>1)
 			{
-			v=bsearch_vcd(GLOBALS->yytext_vcd_partial_c_2+1, GLOBALS->yylen_vcd_partial_c_2-1);	
+			v=bsearch_vcd(GLOBALS->yytext_vcd_partial_c_2+1, GLOBALS->yylen_vcd_partial_c_2-1);
 			if(!v)
 				{
 				fprintf(stderr,"Near byte %d, Unknown VCD identifier: '%s'\n",(int)(GLOBALS->vcdbyteno_vcd_partial_c_2+(GLOBALS->vst_vcd_partial_c_2-GLOBALS->vcdbuf_vcd_partial_c_2)),GLOBALS->yytext_vcd_partial_c_2+1);
@@ -702,12 +702,12 @@ switch(GLOBALS->yytext_vcd_partial_c_2[0])
 	case 'B':
 		{
 		/* extract binary number then.. */
-		vector=malloc_2(GLOBALS->yylen_cache_vcd_partial_c_2=GLOBALS->yylen_vcd_partial_c_2); 
+		vector=malloc_2(GLOBALS->yylen_cache_vcd_partial_c_2=GLOBALS->yylen_vcd_partial_c_2);
 		strcpy(vector,GLOBALS->yytext_vcd_partial_c_2+1);
 		vlen=GLOBALS->yylen_vcd_partial_c_2-1;
 
 		get_strtoken();
-		v=bsearch_vcd(GLOBALS->yytext_vcd_partial_c_2, GLOBALS->yylen_vcd_partial_c_2);	
+		v=bsearch_vcd(GLOBALS->yytext_vcd_partial_c_2, GLOBALS->yylen_vcd_partial_c_2);
 		if(!v)
 			{
 			fprintf(stderr,"Near byte %d, Unknown identifier: '%s'\n",(int)(GLOBALS->vcdbyteno_vcd_partial_c_2+(GLOBALS->vst_vcd_partial_c_2-GLOBALS->vcdbuf_vcd_partial_c_2)), GLOBALS->yytext_vcd_partial_c_2);
@@ -721,14 +721,14 @@ switch(GLOBALS->yytext_vcd_partial_c_2[0])
 				char *pnt;
 				char ch;
 				TimeType k=0;
-		
+
 				pnt=vector;
 				while((ch=*(pnt++))) { k=(k<<1)|((ch=='1')?1:0); }
 				free_2(vector);
-			
+
 				d=malloc_2(sizeof(double));
 				*d=(double)k;
-			
+
 				if(!v)
 					{
 					fprintf(stderr,"Near byte %d, Unknown identifier: '%s'\n",(int)(GLOBALS->vcdbyteno_vcd_partial_c_2+(GLOBALS->vst_vcd_partial_c_2-GLOBALS->vcdbuf_vcd_partial_c_2)), GLOBALS->yytext_vcd_partial_c_2);
@@ -736,11 +736,11 @@ switch(GLOBALS->yytext_vcd_partial_c_2[0])
 					}
 					else
 					{
-					v->narray[0]->curr = v->app_array[0];					
+					v->narray[0]->curr = v->app_array[0];
 					add_histent_p(GLOBALS->current_time_vcd_partial_c_2, v->narray[0],'g',1,(char *)d);
 					v->app_array[0] = v->narray[0]->curr;
 					v->narray[0]->curr->next = v->tr_array[0];
-					if(v->narray[0]->harray) 
+					if(v->narray[0]->harray)
 					        { free_2(v->narray[0]->harray); v->narray[0]->harray = NULL; }
 					}
 				break;
@@ -753,7 +753,7 @@ switch(GLOBALS->yytext_vcd_partial_c_2[0])
 
 				extend=(vector[0]=='1')?'0':vector[0];
 
-				fill=v->size-vlen;				
+				fill=v->size-vlen;
 				for(i=0;i<fill;i++)
 					{
 					v->value[i]=extend;
@@ -782,7 +782,7 @@ switch(GLOBALS->yytext_vcd_partial_c_2[0])
 					add_histent_p(GLOBALS->current_time_vcd_partial_c_2, v->narray[i],v->value[i],1, NULL);
 					v->app_array[i] = v->narray[i]->curr;
 					v->narray[i]->curr->next = v->tr_array[i];
-					if(v->narray[i]->harray) 
+					if(v->narray[i]->harray)
 					        { free_2(v->narray[i]->harray); v->narray[i]->harray = NULL; }
 					}
 				free_2(vector);
@@ -799,7 +799,7 @@ switch(GLOBALS->yytext_vcd_partial_c_2[0])
 				add_histent_p(GLOBALS->current_time_vcd_partial_c_2, v->narray[0],0,1,vector);
 				v->app_array[0] = v->narray[0]->curr;
 				v->narray[0]->curr->next = v->tr_array[0];
-				if(v->narray[0]->harray) 
+				if(v->narray[0]->harray)
 				        { free_2(v->narray[0]->harray); v->narray[0]->harray = NULL; }
 				}
 
@@ -809,14 +809,14 @@ switch(GLOBALS->yytext_vcd_partial_c_2[0])
 
 	case 'p':
 		/* extract port dump value.. */
-		vector=malloc_2(GLOBALS->yylen_cache_vcd_partial_c_2=GLOBALS->yylen_vcd_partial_c_2); 
+		vector=malloc_2(GLOBALS->yylen_cache_vcd_partial_c_2=GLOBALS->yylen_vcd_partial_c_2);
 		strcpy(vector,GLOBALS->yytext_vcd_partial_c_2+1);
 		vlen=GLOBALS->yylen_vcd_partial_c_2-1;
 
 		get_strtoken();	/* throw away 0_strength_component */
 		get_strtoken(); /* throw away 0_strength_component */
 		get_strtoken(); /* this is the id                  */
-		v=bsearch_vcd(GLOBALS->yytext_vcd_partial_c_2, GLOBALS->yylen_vcd_partial_c_2);	
+		v=bsearch_vcd(GLOBALS->yytext_vcd_partial_c_2, GLOBALS->yylen_vcd_partial_c_2);
 		if(!v)
 			{
 			fprintf(stderr,"Near byte %d, Unknown identifier: '%s'\n",(int)(GLOBALS->vcdbyteno_vcd_partial_c_2+(GLOBALS->vst_vcd_partial_c_2-GLOBALS->vcdbuf_vcd_partial_c_2)), GLOBALS->yytext_vcd_partial_c_2);
@@ -830,14 +830,14 @@ switch(GLOBALS->yytext_vcd_partial_c_2[0])
 				char *pnt;
 				char ch;
 				TimeType k=0;
-		
+
 				pnt=vector;
 				while((ch=*(pnt++))) { k=(k<<1)|((ch=='1')?1:0); }
 				free_2(vector);
-			
+
 				d=malloc_2(sizeof(double));
 				*d=(double)k;
-			
+
 				if(!v)
 					{
 					fprintf(stderr,"Near byte %d, Unknown identifier: '%s'\n",(int)(GLOBALS->vcdbyteno_vcd_partial_c_2+(GLOBALS->vst_vcd_partial_c_2-GLOBALS->vcdbuf_vcd_partial_c_2)), GLOBALS->yytext_vcd_partial_c_2);
@@ -849,7 +849,7 @@ switch(GLOBALS->yytext_vcd_partial_c_2[0])
 					add_histent_p(GLOBALS->current_time_vcd_partial_c_2, v->narray[0],'g',1,(char *)d);
 					v->app_array[0] = v->narray[0]->curr;
 					v->narray[0]->curr->next = v->tr_array[0];
-					if(v->narray[0]->harray) 
+					if(v->narray[0]->harray)
 					        { free_2(v->narray[0]->harray); v->narray[0]->harray = NULL; }
 					}
 				break;
@@ -862,7 +862,7 @@ switch(GLOBALS->yytext_vcd_partial_c_2[0])
 
 				extend='0';
 
-				fill=v->size-vlen;				
+				fill=v->size-vlen;
 				for(i=0;i<fill;i++)
 					{
 					v->value[i]=extend;
@@ -891,7 +891,7 @@ switch(GLOBALS->yytext_vcd_partial_c_2[0])
 					add_histent_p(GLOBALS->current_time_vcd_partial_c_2, v->narray[i],v->value[i],1, NULL);
 					v->app_array[i] = v->narray[i]->curr;
 					v->narray[i]->curr->next = v->tr_array[i];
-					if(v->narray[i]->harray) 
+					if(v->narray[i]->harray)
 					        { free_2(v->narray[i]->harray); v->narray[i]->harray = NULL; }
 					}
 				free_2(vector);
@@ -908,7 +908,7 @@ switch(GLOBALS->yytext_vcd_partial_c_2[0])
 				add_histent_p(GLOBALS->current_time_vcd_partial_c_2, v->narray[0],0,1,vector);
 				v->app_array[0] = v->narray[0]->curr;
 				v->narray[0]->curr->next = v->tr_array[0];
-				if(v->narray[0]->harray) 
+				if(v->narray[0]->harray)
 				        { free_2(v->narray[0]->harray); v->narray[0]->harray = NULL; }
 				}
 			}
@@ -922,9 +922,9 @@ switch(GLOBALS->yytext_vcd_partial_c_2[0])
 
 		d=malloc_2(sizeof(double));
 		sscanf(GLOBALS->yytext_vcd_partial_c_2+1,"%lg",d);
-		
+
 		get_strtoken();
-		v=bsearch_vcd(GLOBALS->yytext_vcd_partial_c_2, GLOBALS->yylen_vcd_partial_c_2);	
+		v=bsearch_vcd(GLOBALS->yytext_vcd_partial_c_2, GLOBALS->yylen_vcd_partial_c_2);
 		if(!v)
 			{
 			fprintf(stderr,"Near byte %d, Unknown identifier: '%s'\n",(int)(GLOBALS->vcdbyteno_vcd_partial_c_2+(GLOBALS->vst_vcd_partial_c_2-GLOBALS->vcdbuf_vcd_partial_c_2)), GLOBALS->yytext_vcd_partial_c_2);
@@ -936,7 +936,7 @@ switch(GLOBALS->yytext_vcd_partial_c_2[0])
 			add_histent_p(GLOBALS->current_time_vcd_partial_c_2, v->narray[0],'g',1,(char *)d);
 			v->app_array[0] = v->narray[0]->curr;
 			v->narray[0]->curr->next = v->tr_array[0];
-			if(v->narray[0]->harray) 
+			if(v->narray[0]->harray)
 			        { free_2(v->narray[0]->harray); v->narray[0]->harray = NULL; }
 			}
 
@@ -955,9 +955,9 @@ switch(GLOBALS->yytext_vcd_partial_c_2[0])
                         {
                         d = realloc_2(d, vlen);
                         }
-		
+
 		get_strtoken();
-		v=bsearch_vcd(GLOBALS->yytext_vcd_partial_c_2, GLOBALS->yylen_vcd_partial_c_2);	
+		v=bsearch_vcd(GLOBALS->yytext_vcd_partial_c_2, GLOBALS->yylen_vcd_partial_c_2);
 		if(!v)
 			{
 			fprintf(stderr,"Near byte %d, Unknown identifier: '%s'\n",(int)(GLOBALS->vcdbyteno_vcd_partial_c_2+(GLOBALS->vst_vcd_partial_c_2-GLOBALS->vcdbuf_vcd_partial_c_2)), GLOBALS->yytext_vcd_partial_c_2);
@@ -969,7 +969,7 @@ switch(GLOBALS->yytext_vcd_partial_c_2[0])
 			add_histent_p(GLOBALS->current_time_vcd_partial_c_2, v->narray[0],'s',1,(char *)d);
 			v->app_array[0] = v->narray[0]->curr;
 			v->narray[0]->curr->next = v->tr_array[0];
-			if(v->narray[0]->harray) 
+			if(v->narray[0]->harray)
 			        { free_2(v->narray[0]->harray); v->narray[0]->harray = NULL; }
 			}
 
@@ -998,7 +998,7 @@ while((ch=*src))
 			*dst=vcd[i];
 			break;
 			}
-		}	
+		}
 	if(i==23) *dst='x';
 
 	src++;
@@ -1028,10 +1028,10 @@ for(;;)
 		case T_VERSION:
 			disable_autocoalesce = version_sync_end("VERSION:");
 			break;
-                case T_TIMEZERO:          
-                        {                 
-                        int vtok=get_token();    
-                        if((vtok==T_END)||(vtok==T_EOF)) break;   
+                case T_TIMEZERO:
+                        {
+                        int vtok=get_token();
+                        if((vtok==T_END)||(vtok==T_EOF)) break;
                         GLOBALS->global_time_offset=atoi_64(GLOBALS->yytext_vcd_partial_c_2);
 
                         DEBUG(fprintf(stderr,"TIMEZERO: "TTFormat"\n",GLOBALS->global_time_offset));
@@ -1061,7 +1061,7 @@ for(;;)
 				{
 				vtok=get_token();
 				if((vtok==T_END)||(vtok==T_EOF)) break;
-				prefix=GLOBALS->yytext_vcd_partial_c_2[0];		
+				prefix=GLOBALS->yytext_vcd_partial_c_2[0];
 				}
 			switch(prefix)
 				{
@@ -1089,7 +1089,7 @@ for(;;)
 			break;
 		case T_SCOPE:
 			T_GET;
-                                {   
+                                {
                                 switch(GLOBALS->yytext_vcd_partial_c_2[0])
                                         {
                                         case 'm':       ttype = TREE_VCD_ST_MODULE; break;
@@ -1225,7 +1225,7 @@ for(;;)
 					v->size=atoi_64(GLOBALS->yytext_vcd_partial_c_2);
 					if(!v->size) v->size=1;
 					}
-					else 
+					else
 					if(vtok==V_LB)
 					{
 					vtok=get_vartoken(1);
@@ -1328,7 +1328,7 @@ for(;;)
 					}
 
                                 if(GLOBALS->pv_vcd_partial_c_2)
-                                        { 
+                                        {
                                         if(!strcmp(GLOBALS->pv_vcd_partial_c_2->name,v->name) && !disable_autocoalesce && (!strchr(v->name, '\\')))
                                                 {
                                                 GLOBALS->pv_vcd_partial_c_2->chain=v;
@@ -1370,7 +1370,7 @@ for(;;)
                                         {
                                         GLOBALS->vcd_hash_kill = 1;
                                         }
-                                
+
                                 if(v->nid < GLOBALS->vcd_minid_vcd_partial_c_2) GLOBALS->vcd_minid_vcd_partial_c_2 = v->nid;
                                 if(v->nid > GLOBALS->vcd_maxid_vcd_partial_c_2) GLOBALS->vcd_maxid_vcd_partial_c_2 = v->nid;
 
@@ -1420,7 +1420,7 @@ for(;;)
 					}
 
                                 if(GLOBALS->pv_vcd_partial_c_2)
-                                        { 
+                                        {
                                         if(!strcmp(GLOBALS->pv_vcd_partial_c_2->name,v->name))
                                                 {
                                                 GLOBALS->pv_vcd_partial_c_2->chain=v;
@@ -1437,7 +1437,7 @@ for(;;)
 					GLOBALS->rootv_vcd_partial_c_2=v;
 					}
                                 GLOBALS->pv_vcd_partial_c_2=v;
-				
+
 				vtok=get_vartoken(1);
 				if(vtok==V_END) goto dumpv;
 				if(vtok!=V_LB) goto err;
@@ -1487,14 +1487,14 @@ for(;;)
 			else
 			if((v->size>1)&&(v->msi<=0)&&(v->lsi<=0))
 				{
-				if(v->vartype==V_EVENT) 
+				if(v->vartype==V_EVENT)
 					{
 					v->size=1;
 					}
 					else
 					{
 					/* any criteria for the direction here? */
-					v->msi=v->size-1;	
+					v->msi=v->size-1;
 					v->lsi=0;
 					}
 				}
@@ -1512,7 +1512,7 @@ for(;;)
                                         }
 				}
 			else
-			if((v->lsi>=v->msi)&&((v->lsi-v->msi+1)!=v->size)) 
+			if((v->lsi>=v->msi)&&((v->lsi-v->msi+1)!=v->size))
 				{
                                 if((v->vartype!=V_EVENT)&&(v->vartype!=V_PARAMETER))
                                         {
@@ -1548,7 +1548,7 @@ for(;;)
 					for(i=0;i<v->size;i++)
 						{
 						v->value[i]='x';
-	
+
 						v->narray[i]=(struct Node *)calloc_2(1,sizeof(struct Node));
 						v->narray[i]->head.time=-1;
 						v->narray[i]->head.v.h_val=AN_X;
@@ -1572,7 +1572,7 @@ for(;;)
 			if(v)
 				{
 				GLOBALS->error_count_vcd_partial_c_2++;
-				if(v->name) 
+				if(v->name)
 					{
 					fprintf(stderr, "Near byte %d, $VAR parse error encountered with '%s'\n", (int)(GLOBALS->vcdbyteno_vcd_partial_c_2+(GLOBALS->vst_vcd_partial_c_2-GLOBALS->vcdbuf_vcd_partial_c_2)), v->name);
 					free_2(v->name);
@@ -1619,7 +1619,7 @@ for(;;)
 					{
 					TimeType tim;
 					tim=atoi_64(GLOBALS->yytext_vcd_partial_c_2+1);
-					
+
 					if(GLOBALS->start_time_vcd_partial_c_2<0)
 						{
 						GLOBALS->start_time_vcd_partial_c_2=tim;
@@ -1718,8 +1718,8 @@ if(!(rc=n->curr))
         if((ch=='w')||(ch=='W')) heval=AN_W; else
         if((ch=='l')||(ch=='L')) heval=AN_L; else
         /* if(ch=='-') */        heval=AN_DASH;		/* default */
-	
-	if((n->curr->v.h_val!=heval)||(tim==GLOBALS->start_time_vcd_partial_c_2)||(n->vartype==ND_VCD_EVENT)||(GLOBALS->vcd_preserve_glitches)) /* same region == go skip */ 
+
+	if((n->curr->v.h_val!=heval)||(tim==GLOBALS->start_time_vcd_partial_c_2)||(n->vartype==ND_VCD_EVENT)||(GLOBALS->vcd_preserve_glitches)) /* same region == go skip */
         	{
 		if(n->curr->time==tim)
 			{
@@ -1759,24 +1759,24 @@ switch(ch)
 		he->flags=(HIST_STRING|HIST_REAL);
 	        he->time=-1;
 	        he->v.h_vector=NULL;
-	
+
 		n->curr=he;
 		n->head.next=he;
-	
+
 		add_histent_p(tim,n,ch,regadd, vector);
 		rc = he;
 		}
 		else
 		{
 		if(regadd) { tim*=(GLOBALS->time_scale); }
-	
+
 			if(n->curr->time==tim)
 				{
 				DEBUG(printf("Warning: String Glitch at time ["TTFormat"] Signal [%p].\n",
 					tim, n));
 				if(n->curr->v.h_vector) free_2(n->curr->v.h_vector);
 				n->curr->v.h_vector=vector;		/* we have a glitch! */
-	
+
 				GLOBALS->num_glitches_vcd_partial_c_3++;
 				if(!(n->curr->flags&HIST_GLITCH))
 					{
@@ -1790,7 +1790,7 @@ switch(ch)
 				he->flags=(HIST_STRING|HIST_REAL);
 	                	he->time=tim;
 	                	he->v.h_vector=vector;
-	
+
 	                	n->curr->next=he;
 				n->curr=he;
 	                	GLOBALS->regions+=regadd;
@@ -1809,17 +1809,17 @@ switch(ch)
                 he->v.h_double = strtod("NaN", NULL);
 #else
 	        he->v.h_vector=NULL;
-#endif	
+#endif
 		n->curr=he;
 		n->head.next=he;
-	
+
 		add_histent_p(tim,n,ch,regadd, vector);
 		rc = he;
 		}
 		else
 		{
 		if(regadd) { tim*=(GLOBALS->time_scale); }
-	
+
 		if(
 #ifdef WAVE_HAS_H_DOUBLE
                   (vector&&(n->curr->v.h_double!=*(double *)vector))
@@ -1831,7 +1831,7 @@ switch(ch)
 			||(!n->curr->v.h_vector)
 #endif
 			||(GLOBALS->vcd_preserve_glitches)||(GLOBALS->vcd_preserve_glitches_real)
-			) /* same region == go skip */ 
+			) /* same region == go skip */
 	        	{
 			if(n->curr->time==tim)
 				{
@@ -1842,7 +1842,7 @@ switch(ch)
 #else
 				if(n->curr->v.h_vector) free_2(n->curr->v.h_vector);
 				n->curr->v.h_vector=vector;		/* we have a glitch! */
-#endif	
+#endif
 				GLOBALS->num_glitches_vcd_partial_c_3++;
 				if(!(n->curr->flags&HIST_GLITCH))
 					{
@@ -1859,7 +1859,7 @@ switch(ch)
                                 he->v.h_double = *((double *)vector);
 #else
 	                	he->v.h_vector=vector;
-#endif	
+#endif
 	                	n->curr->next=he;
 				n->curr=he;
 	                	GLOBALS->regions+=regadd;
@@ -1884,23 +1884,23 @@ switch(ch)
 		he=histent_calloc();
 	        he->time=-1;
 	        he->v.h_vector=NULL;
-	
+
 		n->curr=he;
 		n->head.next=he;
-	
+
 		add_histent_p(tim,n,ch,regadd, vector);
 		rc = he;
 		}
 		else
 		{
 		if(regadd) { tim*=(GLOBALS->time_scale); }
-	
+
 		if(
 		  (n->curr->v.h_vector&&vector&&(strcmp(n->curr->v.h_vector,vector)))
 			||(tim==GLOBALS->start_time_vcd_partial_c_2)
 			||(!n->curr->v.h_vector)
 			||(GLOBALS->vcd_preserve_glitches)
-			) /* same region == go skip */ 
+			) /* same region == go skip */
 	        	{
 			if(n->curr->time==tim)
 				{
@@ -1908,7 +1908,7 @@ switch(ch)
 					tim, n, AN_STR[n->curr->v.h_val], ch));
 				if(n->curr->v.h_vector) free_2(n->curr->v.h_vector);
 				n->curr->v.h_vector=vector;		/* we have a glitch! */
-	
+
 				GLOBALS->num_glitches_vcd_partial_c_3++;
 				if(!(n->curr->flags&HIST_GLITCH))
 					{
@@ -1921,7 +1921,7 @@ switch(ch)
 	                	he=histent_calloc();
 	                	he->time=tim;
 	                	he->v.h_vector=vector;
-	
+
 	                	n->curr->next=he;
 				n->curr=he;
 	                	GLOBALS->regions+=regadd;
@@ -2064,10 +2064,10 @@ while(v)
 		if(((v->size==1)||(!GLOBALS->atomic_vectors))&&(v->vartype!=V_REAL)&&(v->vartype!=V_STRINGTYPE))
 			{
 			struct symbol *s = NULL;
-	
+
 			for(j=0;j<v->size;j++)
 				{
-				if(v->msi>=0) 
+				if(v->msi>=0)
 					{
 					if(!GLOBALS->vcd_explicit_zero_subscripts)
 						sprintf(str+slen,"%d",msi);
@@ -2101,7 +2101,7 @@ while(v)
 					if(substnode)
 						{
 						struct Node *n, *n2;
-	
+
 						n=s->n;
 						n2=vprime->narray[j];
 						/* nname stays same */
@@ -2110,7 +2110,7 @@ while(v)
 						/* harray calculated later */
 						n->numhist=n2->numhist;
 						}
-	
+
 #ifndef _WAVE_HAVE_JUDY
 					s->n->nname=s->name;
 #endif
@@ -2118,14 +2118,14 @@ while(v)
 					        {
 					        GLOBALS->firstnode=
 					        GLOBALS->curnode=calloc_2(1, sizeof(struct symchain));
-					        }   
-					        else                                     
+					        }
+					        else
 					        {
 					        GLOBALS->curnode->next=calloc_2(1, sizeof(struct symchain));
 					        GLOBALS->curnode=GLOBALS->curnode->next;
 					        }
 					GLOBALS->curnode->symbol=s;
-	
+
 					GLOBALS->numfacs++;
 					DEBUG(fprintf(stderr,"Added: %s\n",str));
 					}
@@ -2218,8 +2218,8 @@ while(v)
 				        {
 				        GLOBALS->firstnode=
 				        GLOBALS->curnode=calloc_2(1, sizeof(struct symchain));
-				        }   
-				        else                                     
+				        }
+				        else
 				        {
 				        GLOBALS->curnode->next=calloc_2(1, sizeof(struct symchain));
 				        GLOBALS->curnode=GLOBALS->curnode->next;
@@ -2240,14 +2240,14 @@ while(v)
 Pvoid_t  PJArray = GLOBALS->sym_judy;
 PPvoid_t PPValue;
 char *Index = calloc_2(1, longest);
-                                        
+
 for (PPValue  = JudySLFirst (PJArray, (uint8_t *)Index, PJE0);
          PPValue != (PPvoid_t) NULL;
          PPValue  = JudySLNext  (PJArray, (uint8_t *)Index, PJE0))
-    {                   
-        struct symbol *s = *(struct symbol **)PPValue;  
+    {
+        struct symbol *s = *(struct symbol **)PPValue;
         s->name = strdup_2(Index);
-        s->n->nname = s->name;  
+        s->n->nname = s->name;
     }
 
 free_2(Index);
@@ -2256,7 +2256,7 @@ free_2(Index);
 
 if(sym_chain)
 	{
-	sym_curr=sym_chain;	
+	sym_curr=sym_chain;
 	while(sym_curr)
 		{
 		sym_curr->val->vec_root= ((struct vcdsymbol *)sym_curr->val->vec_root)->sym_chain;
@@ -2426,13 +2426,13 @@ if(!nd->harray)         /* make quick array lookup for aet display */
         {
         histpnt=&(nd->head);
         histcount=0;
-   
+
         while(histpnt)
                 {
                 histcount++;
                 histpnt=histpnt->next;
                 }
-         
+
         nd->numhist=histcount;
 
         if(!(nd->harray=harray=(hptr *)malloc_2(histcount*sizeof(hptr))))
@@ -2442,17 +2442,17 @@ if(!nd->harray)         /* make quick array lookup for aet display */
                 free_2(t);
 		return; /* scan-build : really can't do anything here */
                 }
-        
+
         histpnt=&(nd->head);
         for(i=0;i<histcount;i++)
                 {
                 *harray=histpnt;
-                 
-                /* printf("%s, time: %d, val: %d\n", nd->nname,   
+
+                /* printf("%s, time: %d, val: %d\n", nd->nname,
                         (*harray)->time, (*harray)->val); */
-         
+
                 harray++;
-                histpnt=histpnt->next; 
+                histpnt=histpnt->next;
                 }
         }
 }
@@ -2491,7 +2491,7 @@ if(t->vector)
 			{
 			t->interactive_vector_needs_regeneration = 1;
 			return;
-			}		
+			}
 		}
 	}
 	else
@@ -2530,7 +2530,7 @@ else if(t->interactive_vector_needs_regeneration)
 			nptr parent = bts->nodes[i]->expansion->parent;
 			int parentbit = bts->nodes[i]->expansion->parentbit;
 
-			DeleteNode(bts->nodes[i]);		
+			DeleteNode(bts->nodes[i]);
 
 			bts->nodes[i] = ExtractNodeSingleBit(parent, parentbit);
 			}
@@ -2538,7 +2538,7 @@ else if(t->interactive_vector_needs_regeneration)
 		if(!bts->nodes[i]->harray)
 			{
 			regen_harray(t, bts->nodes[i]);
-			}		
+			}
 		}
 
 	if(!bts->name)
@@ -2580,7 +2580,7 @@ if(GLOBALS->partial_vcd)
 #else
 	struct timeval tv;
 
-	tv.tv_sec = 0; 
+	tv.tv_sec = 0;
 	tv.tv_usec = 1000000 / 100;
 	select(0, NULL, NULL, NULL, &tv);
 #endif
@@ -2590,19 +2590,19 @@ if(GLOBALS->partial_vcd)
 		int old_maxtime_marker_conflict = (GLOBALS->tims.marker > GLOBALS->max_time);
 
 		vcd_parse();
-	
+
 		GLOBALS->min_time=GLOBALS->start_time_vcd_partial_c_2*GLOBALS->time_scale;
 		GLOBALS->max_time=GLOBALS->end_time_vcd_partial_c_2*GLOBALS->time_scale;
-	
+
 		GLOBALS->tims.last=GLOBALS->max_time;
 		GLOBALS->tims.end=GLOBALS->tims.last;             /* until the configure_event of wavearea */
-	
+
 		if(!GLOBALS->timeset_vcd_partial_c_1)
 			{
 			GLOBALS->tims.first=GLOBALS->tims.start=GLOBALS->tims.laststart=GLOBALS->min_time;
 			GLOBALS->timeset_vcd_partial_c_1 = 1;
 			}
-	
+
 		update_endcap_times_for_partial_vcd();
 		update_maxmarker_labels();
 
@@ -2610,10 +2610,10 @@ if(GLOBALS->partial_vcd)
 			{
 			old_maxtime_marker_conflict = (GLOBALS->tims.marker<=GLOBALS->max_time); /* data is now past what was invisible marker */
 			}
-	
+
 		vcd_partial_mark_and_sweep(1);
-	
-		if ((GLOBALS->zoom_dyn) && (!GLOBALS->helpbox_is_active)) 
+
+		if ((GLOBALS->zoom_dyn) && (!GLOBALS->helpbox_is_active))
 			{
 			GLOBALS->tims.marker = GLOBALS->tims.last;
 			service_zoom_full(NULL, NULL);
@@ -2622,7 +2622,7 @@ if(GLOBALS->partial_vcd)
 		        MaxSignalLength();
 		        signalarea_configure_event(GLOBALS->signalarea, NULL);
 			}
-		else if ((GLOBALS->zoom_dyne) && (!GLOBALS->helpbox_is_active)) 
+		else if ((GLOBALS->zoom_dyne) && (!GLOBALS->helpbox_is_active))
 			{
 			GLOBALS->tims.marker = GLOBALS->tims.last;
 			service_zoom_right(NULL, NULL);
@@ -2658,7 +2658,7 @@ gtkwave_main_iteration();
 
 static void vcd_partial_regen_node_expansion(Trptr t)
 {
-if(!t->vector) 
+if(!t->vector)
 	{
 	if(t->n.nd && t->n.nd->expansion)
 		{
diff --git a/src/vcd_recoder.c b/src/vcd_recoder.c
index 1b41e82..a8fa2a4 100644
--- a/src/vcd_recoder.c
+++ b/src/vcd_recoder.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2014.
  *
  * This program is free software; you can redistribute it and/or
@@ -55,7 +55,7 @@ if(feof(GLOBALS->vcd_handle_vcd_recoder_c_2))
 static void vlist_packer_emit_uv64(struct vlist_packer_t **vl, guint64 v)
 {
 guint64 nxt;
-         
+
 while((nxt = v>>7))
         {
 	vlist_packer_alloc(*vl, v&0x7f);
@@ -63,13 +63,13 @@ while((nxt = v>>7))
         }
 
 vlist_packer_alloc(*vl, (v&0x7f) | 0x80);
-} 
+}
 
 
 static void vlist_packer_emit_utt(struct vlist_packer_t **vl, UTimeType v)
 {
 UTimeType nxt;
-         
+
 while((nxt = v>>7))
         {
 	vlist_packer_alloc(*vl, v&0x7f);
@@ -77,13 +77,13 @@ while((nxt = v>>7))
         }
 
 vlist_packer_alloc(*vl, (v&0x7f) | 0x80);
-} 
+}
 
 
 static void vlist_packer_emit_uv32(struct vlist_packer_t **vl, unsigned int v)
 {
 unsigned int nxt;
-         
+
 while((nxt = v>>7))
         {
 	vlist_packer_alloc(*vl, v&0x7f);
@@ -91,7 +91,7 @@ while((nxt = v>>7))
         }
 
 vlist_packer_alloc(*vl, (v&0x7f) | 0x80);
-} 
+}
 
 
 static void vlist_packer_emit_string(struct vlist_packer_t **vl, char *s)
@@ -135,7 +135,7 @@ while(*s)
 		accum |= recoded_bit;
 		vlist_packer_alloc(*vl, accum);
 		which = accum = 0;
-		}	
+		}
 	s++;
 	}
 
@@ -160,7 +160,7 @@ unsigned int nxt;
 char *pnt;
 
 if(GLOBALS->vlist_prepack) { vlist_packer_emit_uv32((struct vlist_packer_t **)vl, v); return; }
-         
+
 while((nxt = v>>7))
         {
 	pnt = vlist_alloc(vl, 1);
@@ -170,7 +170,7 @@ while((nxt = v>>7))
 
 pnt = vlist_alloc(vl, 1);
 *pnt = (v&0x7f) | 0x80;
-} 
+}
 
 
 static void vlist_emit_string(struct vlist_t **vl, char *s)
@@ -226,7 +226,7 @@ while(*s)
 		pnt = vlist_alloc(vl, 1);
 		*pnt = accum;
 		which = accum = 0;
-		}	
+		}
 	s++;
 	}
 
@@ -291,7 +291,7 @@ static void write_fastload_header(struct stat *mystat, unsigned int finalize_cnt
 static void write_fastload_header(unsigned int finalize_cnt)
 #endif
 {
-/* 
+/*
 write out the trailer information for vcd fastload...
 
 vcd file size
@@ -387,7 +387,7 @@ v = 0; shamt = 0; do { v |= ((guint64)(*pnt & 0x7f)) << shamt; shamt += 7; } whi
 time_vlist_vcd_recoder_write = v;
 
 vs=GLOBALS->vcdsymroot_vcd_recoder_c_3;
-while(vs) 
+while(vs)
         {
         nptr n = vs->narray[0];
 
@@ -423,7 +423,7 @@ for(i=0;i<num_in_time_table;i++)
 	tt = vlist_alloc(&GLOBALS->time_vlist_vcd_recoder_c_1, 0);
         *tt = tim = (TimeType)v;
 
-	if(!i) 
+	if(!i)
 		{
 		GLOBALS->start_time_vcd_recoder_c_3=tim;
 		}
@@ -450,12 +450,12 @@ if(num_blackout_regions)
 			{
 			bt_curr->next = bt;
 			bt_curr = bt;
-			}			
-	
+			}
+
 		v = 0; shamt = 0; do { v |= ((guint64)(*pnt & 0x7f)) << shamt; shamt += 7; } while(!(*(pnt++) & 0x80));
 		tim = v;
 		bt->bstart = tim;
-	
+
 		v = 0; shamt = 0; do { v |= ((guint64)(*pnt & 0x7f)) << shamt; shamt += 7; } while(!(*(pnt++) & 0x80));
 		tim = v;
 		bt->bend = tim;
@@ -550,7 +550,7 @@ static void evcd_strcpy(char *dst, char *src);
 
 enum Tokens   { T_VAR, T_END, T_SCOPE, T_UPSCOPE,
 		T_COMMENT, T_DATE, T_DUMPALL, T_DUMPOFF, T_DUMPON,
-		T_DUMPVARS, T_ENDDEFINITIONS, 
+		T_DUMPVARS, T_ENDDEFINITIONS,
 		T_DUMPPORTS, T_DUMPPORTSOFF, T_DUMPPORTSON, T_DUMPPORTSALL,
 		T_TIMESCALE, T_VERSION, T_VCDCLOSE, T_TIMEZERO,
 		T_EOF, T_STRING, T_UNKNOWN_KEY };
@@ -570,12 +570,12 @@ static char *tokens[]={ "var", "end", "scope", "upscope",
 /******************************************************************/
 
 static unsigned int vcdid_hash(char *s, int len)
-{  
+{
 unsigned int val=0;
 int i;
 
 s+=(len-1);
-                 
+
 for(i=0;i<len;i++)
         {
         val *= 94;
@@ -624,7 +624,7 @@ if(GLOBALS->indexed_vcd_recoder_c_3)
 
 if(GLOBALS->sorted_vcd_recoder_c_3)
 	{
-	v=(struct vcdsymbol **)bsearch(key, GLOBALS->sorted_vcd_recoder_c_3, GLOBALS->numsyms_vcd_recoder_c_3, 
+	v=(struct vcdsymbol **)bsearch(key, GLOBALS->sorted_vcd_recoder_c_3, GLOBALS->numsyms_vcd_recoder_c_3,
 		sizeof(struct vcdsymbol *), vcdsymbsearchcompare);
 
 	if(v)
@@ -633,7 +633,7 @@ if(GLOBALS->sorted_vcd_recoder_c_3)
 			for(;;)
 				{
 				t=*v;
-		
+
 				if((v==GLOBALS->sorted_vcd_recoder_c_3)||(strcmp((*(--v))->id, key)))
 					{
 					return(t);
@@ -683,7 +683,7 @@ struct vcdsymbol *v;
 struct vcdsymbol **pnt;
 unsigned int vcd_distance;
 
-if(GLOBALS->sorted_vcd_recoder_c_3) 
+if(GLOBALS->sorted_vcd_recoder_c_3)
 	{
 	free_2(GLOBALS->sorted_vcd_recoder_c_3);	/* this means we saw a 2nd enddefinition chunk! */
 	GLOBALS->sorted_vcd_recoder_c_3=NULL;
@@ -702,7 +702,7 @@ if(GLOBALS->numsyms_vcd_recoder_c_3)
         if((vcd_distance <= VCD_INDEXSIZ)||(!GLOBALS->vcd_hash_kill))
                 {
                 GLOBALS->indexed_vcd_recoder_c_3 = (struct vcdsymbol **)calloc_2(vcd_distance, sizeof(struct vcdsymbol *));
-         
+
 		/* printf("%d symbols span ID range of %d, using indexing... hash_kill = %d\n", GLOBALS->numsyms_vcd_recoder_c_3, vcd_distance, GLOBALS->vcd_hash_kill);  */
 
                 v=GLOBALS->vcdsymroot_vcd_recoder_c_3;
@@ -713,7 +713,7 @@ if(GLOBALS->numsyms_vcd_recoder_c_3)
                         }
                 }
                 else
-		{	
+		{
 		pnt=GLOBALS->sorted_vcd_recoder_c_3=(struct vcdsymbol **)calloc_2(GLOBALS->numsyms_vcd_recoder_c_3, sizeof(struct vcdsymbol *));
 		v=GLOBALS->vcdsymroot_vcd_recoder_c_3;
 		while(v)
@@ -721,7 +721,7 @@ if(GLOBALS->numsyms_vcd_recoder_c_3)
 			*(pnt++)=v;
 			v=v->next;
 			}
-	
+
 		qsort(GLOBALS->sorted_vcd_recoder_c_3, GLOBALS->numsyms_vcd_recoder_c_3, sizeof(struct vcdsymbol *), vcdsymcompare);
 		}
 	}
@@ -743,7 +743,7 @@ while(v)
 
 	set_vcd_vartype(v, n);
 
-	if(n->mv.mvlfac_vlist) 
+	if(n->mv.mvlfac_vlist)
 		{
 		if(vlist_prepack)
 			{
@@ -781,7 +781,7 @@ while(v)
 						vlist_emit_uv32(&n->mv.mvlfac_vlist, 0);
 						vlist_emit_string(&n->mv.mvlfac_vlist, "UNDEF");
 						break;
-	
+
 				default:
 					if(v->size==1)
 						{
@@ -859,7 +859,7 @@ if(GLOBALS->vcd_fsiz_vcd_recoder_c_2)
 
 return((int)(*GLOBALS->vst_vcd_recoder_c_3));
 }
-        
+
 static inline signed char getch(void) {
   signed char ch = (GLOBALS->vst_vcd_recoder_c_3!=GLOBALS->vend_vcd_recoder_c_3)?((int)(*GLOBALS->vst_vcd_recoder_c_3)):(getch_fetch());
   GLOBALS->vst_vcd_recoder_c_3++;
@@ -905,7 +905,7 @@ for(;;)
 	if(ch<=' ') continue;	/* val<=' ' is a quick whitespace check      */
 	break;			/* (take advantage of fact that vcd is text) */
 	}
-if(ch=='$') 
+if(ch=='$')
 	{
 	GLOBALS->yytext_vcd_recoder_c_3[len++]=ch;
 	for(;;)
@@ -932,7 +932,7 @@ for(GLOBALS->yytext_vcd_recoder_c_3[len++]=ch;;GLOBALS->yytext_vcd_recoder_c_3[l
 	}
 GLOBALS->yytext_vcd_recoder_c_3[len]=0;	/* terminator */
 
-if(is_string) 
+if(is_string)
 	{
 	GLOBALS->yylen_vcd_recoder_c_3=len;
 	return(T_STRING);
@@ -976,7 +976,7 @@ if(!GLOBALS->var_prevch_vcd_recoder_c_3)
 	ch=GLOBALS->var_prevch_vcd_recoder_c_3;
 	GLOBALS->var_prevch_vcd_recoder_c_3=0;
 	}
-	
+
 if(ch=='[') return(V_LB);
 if(ch==':') return(V_COLON);
 if(ch==']') return(V_RB);
@@ -1132,7 +1132,7 @@ if(!GLOBALS->var_prevch_vcd_recoder_c_3)
       ch=GLOBALS->var_prevch_vcd_recoder_c_3;
       GLOBALS->var_prevch_vcd_recoder_c_3=0;
       }
-      
+
 for(GLOBALS->yytext_vcd_recoder_c_3[len++]=ch;;GLOBALS->yytext_vcd_recoder_c_3[len++]=ch)
       {
 	if(len==GLOBALS->T_MAX_STR_vcd_recoder_c_3)
@@ -1224,11 +1224,11 @@ switch((typ = GLOBALS->yytext_vcd_recoder_c_3[0]))
 					}
 
 				time_delta = GLOBALS->time_vlist_count_vcd_recoder_c_1 - (unsigned int)n->numhist;
-				n->numhist = GLOBALS->time_vlist_count_vcd_recoder_c_1;				
+				n->numhist = GLOBALS->time_vlist_count_vcd_recoder_c_1;
 
 				switch(GLOBALS->yytext_vcd_recoder_c_3[0])
 				        {
-				        case '0':		
+				        case '0':
 				        case '1':		rcv = ((GLOBALS->yytext_vcd_recoder_c_3[0]&1)<<1) | (time_delta<<2);
 								break; /* pack more delta bits in for 0/1 vchs */
 
@@ -1252,24 +1252,24 @@ switch((typ = GLOBALS->yytext_vcd_recoder_c_3[0]))
                 break;
 
 	/* encode everything else literally as a time delta + a string */
-#ifndef STRICT_VCD_ONLY         
+#ifndef STRICT_VCD_ONLY
         case 's':
         case 'S':
                 vector=wave_alloca(GLOBALS->yylen_cache_vcd_recoder_c_3=GLOBALS->yylen_vcd_recoder_c_3);
-		vlen = fstUtilityEscToBin((unsigned char *)vector, (unsigned char *)(GLOBALS->yytext_vcd_recoder_c_3+1), GLOBALS->yylen_vcd_recoder_c_3-1); 
-		vector[vlen] = 0;                                        
+		vlen = fstUtilityEscToBin((unsigned char *)vector, (unsigned char *)(GLOBALS->yytext_vcd_recoder_c_3+1), GLOBALS->yylen_vcd_recoder_c_3-1);
+		vector[vlen] = 0;
 
                 get_strtoken();
 		goto process_binary;
-#endif                          
+#endif
         case 'b':
         case 'B':
         case 'r':
         case 'R':
                 vector=wave_alloca(GLOBALS->yylen_cache_vcd_recoder_c_3=GLOBALS->yylen_vcd_recoder_c_3);
-                strcpy(vector,GLOBALS->yytext_vcd_recoder_c_3+1); 
+                strcpy(vector,GLOBALS->yytext_vcd_recoder_c_3+1);
                 vlen=GLOBALS->yylen_vcd_recoder_c_3-1;
-                                         
+
                 get_strtoken();
 process_binary:
                 v=bsearch_vcd(GLOBALS->yytext_vcd_recoder_c_3, GLOBALS->yylen_vcd_recoder_c_3);
@@ -1307,7 +1307,7 @@ process_binary:
 				}
 
 			time_delta = GLOBALS->time_vlist_count_vcd_recoder_c_1 - (unsigned int)n->numhist;
-			n->numhist = GLOBALS->time_vlist_count_vcd_recoder_c_1;				
+			n->numhist = GLOBALS->time_vlist_count_vcd_recoder_c_1;
 
 			vlist_emit_uv32(&n->mv.mvlfac_vlist, time_delta);
 
@@ -1342,7 +1342,7 @@ process_binary:
 							bits[k++] = ((vector[i] >> (7-j)) & 1) | '0';
 							if(k >= v->size) goto bit_term;
 							}
-						}					
+						}
 
 					bit_term:
 					vlist_emit_mvl9_string(&n->mv.mvlfac_vlist, bits);
@@ -1354,7 +1354,7 @@ process_binary:
 	case 'p':
 	case 'P':
 		/* extract port dump value.. */
-		vector=wave_alloca(GLOBALS->yylen_cache_vcd_recoder_c_3=GLOBALS->yylen_vcd_recoder_c_3); 
+		vector=wave_alloca(GLOBALS->yylen_cache_vcd_recoder_c_3=GLOBALS->yylen_vcd_recoder_c_3);
 		evcd_strcpy(vector,GLOBALS->yytext_vcd_recoder_c_3+1);	/* convert to regular vcd */
 		vlen=GLOBALS->yylen_vcd_recoder_c_3-1;
 
@@ -1388,7 +1388,7 @@ while((ch=*src))
 			*dst=vcd[i];
 			break;
 			}
-		}	
+		}
 	if(i==23) *dst='x';
 
 	src++;
@@ -1451,7 +1451,7 @@ for(;;)
 				{
 				vtok=get_token();
 				if((vtok==T_END)||(vtok==T_EOF)) break;
-				prefix=GLOBALS->yytext_vcd_recoder_c_3[0];		
+				prefix=GLOBALS->yytext_vcd_recoder_c_3[0];
 				}
 			switch(prefix)
 				{
@@ -1615,7 +1615,7 @@ for(;;)
 					v->size=atoi_64(GLOBALS->yytext_vcd_recoder_c_3);
 					if(!v->size) v->size=1;
 					}
-					else 
+					else
 					if(vtok==V_LB)
 					{
 					vtok=get_vartoken(1);
@@ -1718,7 +1718,7 @@ for(;;)
 					}
 
                                 if(GLOBALS->pv_vcd_recoder_c_3)
-                                        { 
+                                        {
                                         if(!strcmp(GLOBALS->prev_hier_uncompressed_name,v->name) && !disable_autocoalesce && (!strchr(v->name, '\\')))
                                                 {
                                                 GLOBALS->pv_vcd_recoder_c_3->chain=v;
@@ -1815,7 +1815,7 @@ for(;;)
 					}
 
                                 if(GLOBALS->pv_vcd_recoder_c_3)
-                                        { 
+                                        {
                                         if(!strcmp(GLOBALS->prev_hier_uncompressed_name,v->name))
                                                 {
                                                 GLOBALS->pv_vcd_recoder_c_3->chain=v;
@@ -1857,19 +1857,19 @@ for(;;)
 				}
 
 			dumpv:
-			if(v->size == 0) 
-				{ 
+			if(v->size == 0)
+				{
 				if(v->vartype != V_EVENT)
 					{
 					if(v->vartype != V_STRINGTYPE)
 						{
-						v->vartype = V_REAL; 
+						v->vartype = V_REAL;
 						}
 					}
 					else
 					{
 					v->size = 1;
-					}					
+					}
 
 				} /* MTI fix */
 
@@ -1882,21 +1882,21 @@ for(;;)
 			else
 			if((v->size>1)&&(v->msi<=0)&&(v->lsi<=0))
 				{
-				if(v->vartype==V_EVENT) 
+				if(v->vartype==V_EVENT)
 					{
 					v->size=1;
 					}
 					else
 					{
 					/* any criteria for the direction here? */
-					v->msi=v->size-1;	
+					v->msi=v->size-1;
 					v->lsi=0;
 					}
 				}
 			else
 			if((v->msi>v->lsi)&&((v->msi-v->lsi+1)!=v->size))
 				{
-				if((v->vartype!=V_EVENT)&&(v->vartype!=V_PARAMETER)) 
+				if((v->vartype!=V_EVENT)&&(v->vartype!=V_PARAMETER))
 					{
 					v->msi = v->size-1; v->lsi = 0;
 					/* all this formerly was goto err; */
@@ -1907,9 +1907,9 @@ for(;;)
 					}
 				}
 			else
-			if((v->lsi>=v->msi)&&((v->lsi-v->msi+1)!=v->size)) 
+			if((v->lsi>=v->msi)&&((v->lsi-v->msi+1)!=v->size))
 				{
-				if((v->vartype!=V_EVENT)&&(v->vartype!=V_PARAMETER)) 
+				if((v->vartype!=V_EVENT)&&(v->vartype!=V_PARAMETER))
 					{
 					v->lsi = v->size-1; v->msi = 0;
 					/* all this formerly was goto err; */
@@ -1971,7 +1971,7 @@ for(;;)
 			if(v)
 				{
 				GLOBALS->error_count_vcd_recoder_c_3++;
-				if(v->name) 
+				if(v->name)
 					{
 					fprintf(stderr, "Near byte %d, $VAR parse error encountered with '%s'\n", (int)(GLOBALS->vcdbyteno_vcd_recoder_c_3+(GLOBALS->vst_vcd_recoder_c_3-GLOBALS->vcdbuf_vcd_recoder_c_3)), v->name);
 					free_2(v->name);
@@ -2026,13 +2026,13 @@ for(;;)
 					TimeType *tt;
 
 					tim=atoi_64(GLOBALS->yytext_vcd_recoder_c_3+1);
-					
+
 					if(GLOBALS->start_time_vcd_recoder_c_3<0)
 						{
 						GLOBALS->start_time_vcd_recoder_c_3=tim;
 
 						if(GLOBALS->time_vlist_vcd_recoder_write)
-							{					
+							{
 							vlist_packer_emit_utt((struct vlist_packer_t **)(void *)&GLOBALS->time_vlist_vcd_recoder_write, tim);
 							}
 						}
@@ -2044,7 +2044,7 @@ for(;;)
 							}
 
 						if(GLOBALS->time_vlist_vcd_recoder_write)
-							{					
+							{
 							vlist_packer_emit_utt((struct vlist_packer_t **)(void *)&GLOBALS->time_vlist_vcd_recoder_write, tim - GLOBALS->current_time_vcd_recoder_c_3);
 							}
 						}
@@ -2071,7 +2071,7 @@ for(;;)
 						GLOBALS->start_time_vcd_recoder_c_3=GLOBALS->current_time_vcd_recoder_c_3=GLOBALS->end_time_vcd_recoder_c_3=tim;
 
 						if(GLOBALS->time_vlist_vcd_recoder_write)
-							{					
+							{
 							vlist_packer_emit_utt((struct vlist_packer_t **)(void *)&GLOBALS->time_vlist_vcd_recoder_write, tim);
 							}
 
@@ -2127,7 +2127,7 @@ for(;;)
 
 			GLOBALS->pv_vcd_recoder_c_3 = NULL;
 			if(GLOBALS->prev_hier_uncompressed_name) { free_2(GLOBALS->prev_hier_uncompressed_name); GLOBALS->prev_hier_uncompressed_name = NULL; }
-			
+
 			return;
 		default:
 			DEBUG(fprintf(stderr,"UNKNOWN TOKEN\n"));
@@ -2169,8 +2169,8 @@ if(!n->curr)
         if((ch=='w')||(ch=='W')) heval=AN_W; else
         if((ch=='l')||(ch=='L')) heval=AN_L; else
         /* if(ch=='-') */        heval=AN_DASH;		/* default */
-	
-	if((n->curr->v.h_val!=heval)||(tim==GLOBALS->start_time_vcd_recoder_c_3)||(n->vartype==ND_VCD_EVENT)||(GLOBALS->vcd_preserve_glitches)) /* same region == go skip */ 
+
+	if((n->curr->v.h_val!=heval)||(tim==GLOBALS->start_time_vcd_recoder_c_3)||(n->vartype==ND_VCD_EVENT)||(GLOBALS->vcd_preserve_glitches)) /* same region == go skip */
         	{
 		if(n->curr->time==tim)
 			{
@@ -2210,23 +2210,23 @@ switch(ch)
 		he->flags=(HIST_STRING|HIST_REAL);
 	        he->time=-1;
 	        he->v.h_vector=NULL;
-	
+
 		n->curr=he;
 		n->head.next=he;
-	
+
 		add_histent(tim,n,ch,regadd, vector);
 		}
 		else
 		{
 		if(regadd) { tim*=(GLOBALS->time_scale); }
-	
+
 			if(n->curr->time==tim)
 				{
 				DEBUG(printf("Warning: String Glitch at time ["TTFormat"] Signal [%p].\n",
 					tim, n));
 				if(n->curr->v.h_vector) free_2(n->curr->v.h_vector);
 				n->curr->v.h_vector=vector;		/* we have a glitch! */
-	
+
 				GLOBALS->num_glitches_vcd_recoder_c_4++;
 				if(!(n->curr->flags&HIST_GLITCH))
 					{
@@ -2240,7 +2240,7 @@ switch(ch)
 				he->flags=(HIST_STRING|HIST_REAL);
 	                	he->time=tim;
 	                	he->v.h_vector=vector;
-	
+
 	                	n->curr->next=he;
 				n->curr=he;
 	                	GLOBALS->regions+=regadd;
@@ -2260,16 +2260,16 @@ switch(ch)
 #else
 	        he->v.h_vector=NULL;
 #endif
-	
+
 		n->curr=he;
 		n->head.next=he;
-	
+
 		add_histent(tim,n,ch,regadd, vector);
 		}
 		else
 		{
 		if(regadd) { tim*=(GLOBALS->time_scale); }
-	
+
 		if(
 #ifdef WAVE_HAS_H_DOUBLE
                   (vector&&(n->curr->v.h_double!=*(double *)vector))
@@ -2281,7 +2281,7 @@ switch(ch)
 			||(!n->curr->v.h_vector)
 #endif
 			||(GLOBALS->vcd_preserve_glitches)||(GLOBALS->vcd_preserve_glitches_real)
-			) /* same region == go skip */ 
+			) /* same region == go skip */
 	        	{
 			if(n->curr->time==tim)
 				{
@@ -2292,7 +2292,7 @@ switch(ch)
 #else
 				if(n->curr->v.h_vector) free_2(n->curr->v.h_vector);
 				n->curr->v.h_vector=vector;		/* we have a glitch! */
-#endif	
+#endif
 				GLOBALS->num_glitches_vcd_recoder_c_4++;
 				if(!(n->curr->flags&HIST_GLITCH))
 					{
@@ -2334,22 +2334,22 @@ switch(ch)
 		he=histent_calloc();
 	        he->time=-1;
 	        he->v.h_vector=NULL;
-	
+
 		n->curr=he;
 		n->head.next=he;
-	
+
 		add_histent(tim,n,ch,regadd, vector);
 		}
 		else
 		{
 		if(regadd) { tim*=(GLOBALS->time_scale); }
-	
+
 		if(
 		  (n->curr->v.h_vector&&vector&&(strcmp(n->curr->v.h_vector,vector)))
 			||(tim==GLOBALS->start_time_vcd_recoder_c_3)
 			||(!n->curr->v.h_vector)
 			||(GLOBALS->vcd_preserve_glitches)
-			) /* same region == go skip */ 
+			) /* same region == go skip */
 	        	{
 			if(n->curr->time==tim)
 				{
@@ -2357,7 +2357,7 @@ switch(ch)
 					tim, n, AN_STR[n->curr->v.h_val], ch));
 				if(n->curr->v.h_vector) free_2(n->curr->v.h_vector);
 				n->curr->v.h_vector=vector;		/* we have a glitch! */
-	
+
 				GLOBALS->num_glitches_vcd_recoder_c_4++;
 				if(!(n->curr->flags&HIST_GLITCH))
 					{
@@ -2370,7 +2370,7 @@ switch(ch)
 	                	he=histent_calloc();
 	                	he->time=tim;
 	                	he->v.h_vector=vector;
-	
+
 	                	n->curr->next=he;
 				n->curr=he;
 	                	GLOBALS->regions+=regadd;
@@ -2442,10 +2442,10 @@ while(v)
 		if((v->size==1)&&(v->vartype!=V_REAL)&&(v->vartype!=V_STRINGTYPE))
 			{
 			struct symbol *s = NULL;
-	
+
 			for(j=0;j<v->size;j++)
 				{
-				if(v->msi>=0) 
+				if(v->msi>=0)
 					{
 					if(!GLOBALS->vcd_explicit_zero_subscripts)
 						sprintf(str+slen,"%d",msi);
@@ -2474,12 +2474,12 @@ while(v)
 					s=symadd(str,hashdirty?hash(str):GLOBALS->hashcache);
 #ifdef _WAVE_HAVE_JUDY
 					ss_len = strlen(str); if(ss_len >= longest) { longest = ss_len + 1; }
-#endif	
+#endif
 					s->n=v->narray[j];
 					if(substnode)
 						{
 						struct Node *n, *n2;
-	
+
 						n=s->n;
 						n2=vprime->narray[j];
 						/* nname stays same */
@@ -2489,7 +2489,7 @@ while(v)
 						/* harray calculated later */
 						n->numhist=n2->numhist;
 						}
-	
+
 #ifndef _WAVE_HAVE_JUDY
 					s->n->nname=s->name;
 #endif
@@ -2497,14 +2497,14 @@ while(v)
 					        {
 					        GLOBALS->firstnode=
 					        GLOBALS->curnode=calloc_2(1, sizeof(struct symchain));
-					        }   
-					        else                                     
+					        }
+					        else
 					        {
 					        GLOBALS->curnode->next=calloc_2(1, sizeof(struct symchain));
 					        GLOBALS->curnode=GLOBALS->curnode->next;
 					        }
 					GLOBALS->curnode->symbol=s;
-	
+
 					GLOBALS->numfacs++;
 					DEBUG(fprintf(stderr,"Added: %s\n",str));
 					}
@@ -2565,7 +2565,7 @@ while(v)
 				s=symadd(str,hashdirty?hash(str):GLOBALS->hashcache);	/* cut down on double lookups.. */
 #ifdef _WAVE_HAVE_JUDY
                                 ss_len = strlen(str); if(ss_len >= longest) { longest = ss_len + 1; }
-#endif        
+#endif
 				s->n=v->narray[0];
 				if(substnode)
 					{
@@ -2598,8 +2598,8 @@ while(v)
 				        {
 				        GLOBALS->firstnode=
 				        GLOBALS->curnode=calloc_2(1, sizeof(struct symchain));
-				        }   
-				        else                                     
+				        }
+				        else
 				        {
 				        GLOBALS->curnode->next=calloc_2(1, sizeof(struct symchain));
 				        GLOBALS->curnode=GLOBALS->curnode->next;
@@ -2624,11 +2624,11 @@ char *Index = calloc_2(1, longest);
 for (PPValue  = JudySLFirst (PJArray, (uint8_t *)Index, PJE0);
          PPValue != (PPvoid_t) NULL;
          PPValue  = JudySLNext  (PJArray, (uint8_t *)Index, PJE0))
-    {        
+    {
 	struct symbol *s = *(struct symbol **)PPValue;
 	s->name = strdup_2(Index);
-	s->n->nname = s->name;	
-    }   
+	s->n->nname = s->name;
+    }
 
 free_2(Index);
 }
@@ -2636,7 +2636,7 @@ free_2(Index);
 
 if(sym_chain)
 	{
-	sym_curr=sym_chain;	
+	sym_curr=sym_chain;
 	while(sym_curr)
 		{
 		sym_curr->val->vec_root= ((struct vcdsymbol *)sym_curr->val->vec_root)->sym_chain;
@@ -2662,12 +2662,12 @@ struct vcdsymbol *v, *vt;
 
 if(GLOBALS->indexed_vcd_recoder_c_3)
 	{
-	free_2(GLOBALS->indexed_vcd_recoder_c_3); GLOBALS->indexed_vcd_recoder_c_3=NULL; 
+	free_2(GLOBALS->indexed_vcd_recoder_c_3); GLOBALS->indexed_vcd_recoder_c_3=NULL;
 	}
 
 if(GLOBALS->sorted_vcd_recoder_c_3)
 	{
-	free_2(GLOBALS->sorted_vcd_recoder_c_3); GLOBALS->sorted_vcd_recoder_c_3=NULL; 
+	free_2(GLOBALS->sorted_vcd_recoder_c_3); GLOBALS->sorted_vcd_recoder_c_3=NULL;
 	}
 
 v=GLOBALS->vcdsymroot_vcd_recoder_c_3;
@@ -2729,7 +2729,7 @@ if(GLOBALS->use_fastload)
 	{
         char *ffname = malloc_2(strlen(fname) + 4 + 1);
         sprintf(ffname, "%s.idx", fname);
-        
+
         GLOBALS->vlist_handle = fopen(ffname, "rb");
 	if(GLOBALS->vlist_handle)
 		{
@@ -2750,7 +2750,7 @@ if(GLOBALS->use_fastload)
 		else
 		{
 		GLOBALS->use_fastload = VCD_FSL_WRITE;
-		} 
+		}
 
         free_2(ffname);
         }
@@ -2827,7 +2827,7 @@ if(!GLOBALS->vcd_handle_vcd_recoder_c_2)
 	vcd_exit(255);
 	}
 
-/* SPLASH */				splash_create(); 
+/* SPLASH */				splash_create();
 
 sym_hash_initialize(GLOBALS);
 getch_alloc();		/* alloc membuff for vcd getch buffer */
@@ -2858,7 +2858,7 @@ if(GLOBALS->vlist_handle)
 	FILE *vh = GLOBALS->vlist_handle;
 	GLOBALS->vlist_handle = NULL;
 	vlist_freeze(&GLOBALS->time_vlist_vcd_recoder_c_1);
-	GLOBALS->vlist_handle = vh;	
+	GLOBALS->vlist_handle = vh;
 	}
 	else
 	{
@@ -3026,14 +3026,14 @@ if(!list_size)
 				/* vartype = (unsigned int)(*chp & 0x7f); */ /* scan-build */
 
 				arr_pos = accum = 0;
-	
+
 		                do      {
 		                	chp = vlist_locate_import(v, vlist_pos++);
 		                        if(!chp) break;
-		                        ch = *chp;  
-					arr[arr_pos++] = ch;				
+		                        ch = *chp;
+					arr[arr_pos++] = ch;
 		                        } while (!(ch & 0x80));
-	
+
 				for(--arr_pos; arr_pos>=0; arr_pos--)
 					{
 					ch = arr[arr_pos];
@@ -3043,14 +3043,14 @@ if(!list_size)
 
 				len = accum;
 
-				break;				
+				break;
 
 			default:
 				fprintf(stderr, "Unsupported vlist type '%c', exiting.", vlist_type);
 				vcd_exit(255);
 				break;
 			}
-		}		
+		}
 		else
 		{
 		len = 1;
@@ -3071,8 +3071,8 @@ if(vlist_type == '0') /* single bit */
                 do      {
                 	chp = vlist_locate_import(v, vlist_pos++);
                         if(!chp) break;
-                        ch = *chp;  
-			arr[arr_pos++] = ch;				
+                        ch = *chp;
+			arr[arr_pos++] = ch;
                         } while (!(ch & 0x80));
 
 		for(--arr_pos; arr_pos>=0; arr_pos--)
@@ -3099,7 +3099,7 @@ if(vlist_type == '0') /* single bit */
 		curtime_pnt = vlist_locate(GLOBALS->time_vlist_vcd_recoder_c_1, time_idx ? time_idx-1 : 0);
 		if(!curtime_pnt)
 			{
-			fprintf(stderr, "GTKWAVE | malformed bitwise signal data for '%s' after time_idx = %d\n", 
+			fprintf(stderr, "GTKWAVE | malformed bitwise signal data for '%s' after time_idx = %d\n",
 				np->nname, time_idx - delta);
 			exit(255);
 			}
@@ -3125,8 +3125,8 @@ else if(vlist_type == 'B') /* bit vector, port type was converted to bit vector
                 do      {
                 	chp = vlist_locate_import(v, vlist_pos++);
                         if(!chp) break;
-                        ch = *chp;  
-			arr[arr_pos++] = ch;				
+                        ch = *chp;
+			arr[arr_pos++] = ch;
                         } while (!(ch & 0x80));
 
 		for(--arr_pos; arr_pos>=0; arr_pos--)
@@ -3142,7 +3142,7 @@ else if(vlist_type == 'B') /* bit vector, port type was converted to bit vector
 		curtime_pnt = vlist_locate(GLOBALS->time_vlist_vcd_recoder_c_1,  time_idx ? time_idx-1 : 0);
 		if(!curtime_pnt)
 			{
-			fprintf(stderr, "GTKWAVE | malformed 'b' signal data for '%s' after time_idx = %d\n", 
+			fprintf(stderr, "GTKWAVE | malformed 'b' signal data for '%s' after time_idx = %d\n",
 				np->nname, time_idx - delta);
 			exit(255);
 			}
@@ -3212,8 +3212,8 @@ else if(vlist_type == 'R') /* real */
                 do      {
                 	chp = vlist_locate_import(v, vlist_pos++);
                         if(!chp) break;
-                        ch = *chp;  
-			arr[arr_pos++] = ch;				
+                        ch = *chp;
+			arr[arr_pos++] = ch;
                         } while (!(ch & 0x80));
 
 		for(--arr_pos; arr_pos>=0; arr_pos--)
@@ -3229,7 +3229,7 @@ else if(vlist_type == 'R') /* real */
 		curtime_pnt = vlist_locate(GLOBALS->time_vlist_vcd_recoder_c_1,  time_idx ? time_idx-1 : 0);
 		if(!curtime_pnt)
 			{
-			fprintf(stderr, "GTKWAVE | malformed 'r' signal data for '%s' after time_idx = %d\n", 
+			fprintf(stderr, "GTKWAVE | malformed 'r' signal data for '%s' after time_idx = %d\n",
 				np->nname, time_idx - delta);
 			exit(255);
 			}
@@ -3273,8 +3273,8 @@ else if(vlist_type == 'S') /* string */
                 do      {
                 	chp = vlist_locate_import(v, vlist_pos++);
                         if(!chp) break;
-                        ch = *chp;  
-			arr[arr_pos++] = ch;				
+                        ch = *chp;
+			arr[arr_pos++] = ch;
                         } while (!(ch & 0x80));
 
 		for(--arr_pos; arr_pos>=0; arr_pos--)
@@ -3290,7 +3290,7 @@ else if(vlist_type == 'S') /* string */
 		curtime_pnt = vlist_locate(GLOBALS->time_vlist_vcd_recoder_c_1,  time_idx ? time_idx-1 : 0);
 		if(!curtime_pnt)
 			{
-			fprintf(stderr, "GTKWAVE | malformed 's' signal data for '%s' after time_idx = %d\n", 
+			fprintf(stderr, "GTKWAVE | malformed 's' signal data for '%s' after time_idx = %d\n",
 				np->nname, time_idx - delta);
 			exit(255);
 			}
@@ -3322,7 +3322,7 @@ else if(vlist_type == 'S') /* string */
 else if(vlist_type == '!') /* error in loading */
 	{
 	nptr n2 = (nptr)np->curr;
-	
+
 	if((n2)&&(n2 != np))	/* keep out any possible infinite recursion from corrupt pointer bugs */
 		{
 		import_vcd_trace(n2);
diff --git a/src/vcd_saver.c b/src/vcd_saver.c
index 77ac1ac..bce30ee 100644
--- a/src/vcd_saver.c
+++ b/src/vcd_saver.c
@@ -86,20 +86,20 @@ if(export_typ != WAVE_EXPORT_TRANS)
 	        if((vmod = (value % 94)))
 	                {
 	                *(pnt++) = (char)(vmod + 32);
-	                }   
+	                }
 	                else
 	                {
 	                *(pnt++) = '~'; value -= 94;
 	                }
-	        value = value / 94;  
+	        value = value / 94;
 	        if(!value) { break; }
 	        }
 
-	*pnt = 0;   
+	*pnt = 0;
 	}
 	else
 	{
-	sprintf(pnt, "%d", value);	
+	sprintf(pnt, "%d", value);
 	}
 
 return(GLOBALS->buf_vcd_saver_c_3);
@@ -216,7 +216,7 @@ static vcdsav_Tree * vcdsav_insert(void *i, vcdsav_Tree * t, int val, unsigned c
 /* Return a pointer to the resulting tree.                 */
     vcdsav_Tree * n;
     int dir;
-    
+
     n = (vcdsav_Tree *) calloc_2(1, sizeof (vcdsav_Tree));
     if (n == NULL) {
 	fprintf(stderr, "vcdsav_insert: ran out of memory, exiting.\n");
@@ -287,7 +287,7 @@ if(vt->right) recurse_build(vt->right, hp);
 }
 
 
-/* 
+/*
  * heapify algorithm...used to grab the next value change
  */
 static void heapify(int i, int heap_size)
@@ -296,16 +296,16 @@ int l, r;
 unsigned int largest;
 vcdsav_Tree *t;
 int maxele=heap_size/2-1;	/* points to where heapswaps don't matter anymore */
-                
+
 for(;;)
         {
         l=2*i+1;
         r=l+1;
-                         
+
         if((l<heap_size)&&(hpcmp(GLOBALS->hp_vcd_saver_c_1[l],GLOBALS->hp_vcd_saver_c_1[i])>0))
                 {
                 largest=l;
-                }   
+                }
                 else
                 {
                 largest=i;
@@ -314,13 +314,13 @@ for(;;)
                 {
                 largest=r;
                 }
-        
+
         if(i!=largest)
                 {
                 t=GLOBALS->hp_vcd_saver_c_1[i];
                 GLOBALS->hp_vcd_saver_c_1[i]=GLOBALS->hp_vcd_saver_c_1[largest];
                 GLOBALS->hp_vcd_saver_c_1[largest]=t;
-                
+
                 if(largest<=maxele)
                         {
                         i=largest;
@@ -328,8 +328,8 @@ for(;;)
                         else
                         {
                         break;
-                        } 
-                }   
+                        }
+                }
                 else
                 {
                 break;
@@ -340,7 +340,7 @@ for(;;)
 
 /*
  * mainline
- */ 
+ */
 int save_nodes_to_export_generic(FILE *trans_file, Trptr trans_head, const char *fname, int export_typ)
 {
 Trptr t = trans_head ? trans_head : GLOBALS->traces.first;
@@ -399,7 +399,7 @@ while(t)
 	{
 	if(!t->vector)
 		{
-		if(t->n.nd) 
+		if(t->n.nd)
 			{
 			n = t->n.nd;
 			if(n->expansion) n = n->expansion->parent;
@@ -417,7 +417,7 @@ while(t)
 				vt = vcdsav_insert(n, vt, ++nodecnt, flags, &n->head);
 				}
 			}
-		}	
+		}
 		else
 		{
 		bvptr b = t->n.vec;
@@ -428,10 +428,10 @@ while(t)
 				{
 				for(i=0;i<bt->nnbits;i++)
 					{
-					if(bt->nodes[i]) 
+					if(bt->nodes[i])
 						{
 						n = bt->nodes[i];
-	
+
 						if(n->expansion) n = n->expansion->parent;
 						vt = vcdsav_splay(n, vt);
 						if(!vt || vt->item != n)
@@ -467,7 +467,7 @@ while(t)
 		{
 		st = st->next;
 		t = st ? st->trace : NULL;
-		if(t) 
+		if(t)
 			{
 			continue;
 			}
@@ -478,13 +478,13 @@ while(t)
 		}
 
 strace_concat:
-	GLOBALS->strace_ctx = &GLOBALS->strace_windows[GLOBALS->strace_current_window = strace_append];	
+	GLOBALS->strace_ctx = &GLOBALS->strace_windows[GLOBALS->strace_current_window = strace_append];
 	strace_append++;
 	if(strace_append == WAVE_NUM_STRACE_WINDOWS) break;
 
 	if(!GLOBALS->strace_ctx->shadow_straces)
 		{
-		goto strace_concat;		
+		goto strace_concat;
 		}
 
 	swap_strace_contexts();
@@ -503,7 +503,7 @@ if(lxt)
 
 	lt_set_chg_compress(lt);
 	lt_set_clock_compress(lt);
-	lt_set_initial_value(lt, 'x');	
+	lt_set_initial_value(lt, 'x');
 	lt_set_time64(lt, 0);
 	lt_symbol_bracket_stripping(lt, 1);
 
@@ -588,7 +588,7 @@ for(i=0;i<nodecnt;i++)
 			msi = GLOBALS->hp_vcd_saver_c_1[i]->item->msi;
 			lsi = GLOBALS->hp_vcd_saver_c_1[i]->item->lsi;
 			}
-		
+
 		if(msi==lsi)
 			{
 			if(lxt)
@@ -639,7 +639,7 @@ if(!lxt)
 
 for(i=(nodecnt/2-1);i>0;i--)        /* build nodes into having heap property */
         {
-        heapify(i,nodecnt);  
+        heapify(i,nodecnt);
         }
 
 for(;;)
@@ -667,7 +667,7 @@ for(;;)
 			}
 		prevtime = GLOBALS->hp_vcd_saver_c_1[0]->hist->time;
 		}
-	
+
 	if(GLOBALS->hp_vcd_saver_c_1[0]->hist->time >= LLDescriptor(0))
 		{
 		if(GLOBALS->hp_vcd_saver_c_1[0]->flags & (HIST_REAL|HIST_STRING))
@@ -722,9 +722,9 @@ for(;;)
 					}
 					else
 					{
-					w32redirect_fprintf(GLOBALS->f_vcd_saver_c_1, "r%.16g %s\n", value, vcdid(GLOBALS->hp_vcd_saver_c_1[0]->val, export_typ));	
+					w32redirect_fprintf(GLOBALS->f_vcd_saver_c_1, "r%.16g %s\n", value, vcdid(GLOBALS->hp_vcd_saver_c_1[0]->val, export_typ));
 					}
-				}	
+				}
 			}
 		else
 		if(GLOBALS->hp_vcd_saver_c_1[0]->len)
@@ -734,17 +734,17 @@ for(;;)
 				for(i=0;i<GLOBALS->hp_vcd_saver_c_1[0]->len;i++)
 					{
 					row_data[i] = analyzer_demang(lxt, GLOBALS->hp_vcd_saver_c_1[0]->hist->v.h_vector[i]);
-					}				
+					}
 				}
 				else
 				{
 				for(i=0;i<GLOBALS->hp_vcd_saver_c_1[0]->len;i++)
 					{
 					row_data[i] = 'x';
-					}				
+					}
 				}
 			row_data[i] = 0;
-			
+
 			if(lxt)
 				{
 				lt_emit_value_bit_string(lt, GLOBALS->hp_vcd_saver_c_1[0]->handle.p, 0, row_data);
@@ -802,7 +802,7 @@ if(lxt)
 	{
 	if(export_typ != WAVE_EXPORT_TRANS)
 		{
-		fclose(GLOBALS->f_vcd_saver_c_1); 
+		fclose(GLOBALS->f_vcd_saver_c_1);
 		}
 		else
 		{
@@ -848,7 +848,7 @@ struct namehier *nhtemp;
 
 while(GLOBALS->nhold_vcd_saver_c_1)
 	{
-	nhtemp=GLOBALS->nhold_vcd_saver_c_1->next;	
+	nhtemp=GLOBALS->nhold_vcd_saver_c_1->next;
 	free_2(GLOBALS->nhold_vcd_saver_c_1->name);
 	free_2(GLOBALS->nhold_vcd_saver_c_1);
 	GLOBALS->nhold_vcd_saver_c_1=nhtemp;
@@ -940,7 +940,7 @@ pnt=pnt2=name;
 
 for(;;)
 {
-if(*pnt2 == '\\') 
+if(*pnt2 == '\\')
 	{
 	while(*pnt2) pnt2++;
 	}
@@ -1062,7 +1062,7 @@ for(i=0;i<numhist;i++)
 	{
 	if(ha[i]->time < tmin)
 		{
-		h_val = invert ? AN_USTR_INV[ha[i]->v.h_val] : AN_USTR[ha[i]->v.h_val];	
+		h_val = invert ? AN_USTR_INV[ha[i]->v.h_val] : AN_USTR[ha[i]->v.h_val];
 		}
 	else
 	if(ha[i]->time > tmax)
@@ -1094,9 +1094,9 @@ for(i=0;i<numhist;i++)
 					t->name,
 					h_val,
 					edges);
-			first = FALSE;			
+			first = FALSE;
 
-			if(skip_this) 
+			if(skip_this)
 				{
 				continue;
 				}
@@ -1105,7 +1105,7 @@ for(i=0;i<numhist;i++)
 		h_val = invert ? AN_USTR_INV[ha[i]->v.h_val] : AN_USTR[ha[i]->v.h_val];
 		w32redirect_fprintf(GLOBALS->f_vcd_saver_c_1, "          Edge:               "TTFormat".0 %c\n", ha[i]->time, h_val);
 		}
-	}		
+	}
 
 if(first)
 	{
@@ -1154,17 +1154,17 @@ if((s)&&(*s))
 		/* if(isspace(*s)) *s='_'; ...not needed */
 		s++;
 		}
-	
+
 	if(is_all_z)
 		{
-		*(s_orig++) = 'Z';		
-		*(s_orig) = 0;		
+		*(s_orig++) = 'Z';
+		*(s_orig) = 0;
 		}
 	else
 	if(is_all_x)
 		{
-		*(s_orig++) = 'X';		
-		*(s_orig) = 0;		
+		*(s_orig++) = 'X';
+		*(s_orig) = 0;
 		}
 	}
 }
@@ -1173,7 +1173,7 @@ static char *get_hptr_vector_val(Trptr t, hptr h)
 {
 char *ascii = NULL;
 
-if(h->time < LLDescriptor(0)) 
+if(h->time < LLDescriptor(0))
 	{
 	ascii=strdup_2("X");
 	}
@@ -1181,7 +1181,7 @@ else
 if(h->flags&HIST_REAL)
 	{
         if(!(h->flags&HIST_STRING))
-        	{               
+        	{
 #ifdef WAVE_HAS_H_DOUBLE
                 ascii=convert_ascii_real(t, &h->v.h_double);
 #else
@@ -1191,7 +1191,7 @@ if(h->flags&HIST_REAL)
                 else
                 {
                 ascii=convert_ascii_string((char *)h->v.h_vector);
-                }        
+                }
 	}
         else
         {
@@ -1281,7 +1281,7 @@ for(i=0;i<numhist;i++)
 	{
 	if(ha[i]->time < tmin)
 		{
-		if(h_val) free_2(h_val); 
+		if(h_val) free_2(h_val);
 		h_val = get_hptr_vector_val(t, ha[i]);
 		}
 	else
@@ -1297,7 +1297,7 @@ for(i=0;i<numhist;i++)
 
 			if(skip_this)
 				{
-				if(h_val) free_2(h_val); 
+				if(h_val) free_2(h_val);
 				h_val = get_hptr_vector_val(t, ha[i]);
 				}
 
@@ -1317,19 +1317,19 @@ for(i=0;i<numhist;i++)
 					h_val,
 					vcdsav_dtypes[curtype],
 					edges);
-			first = FALSE;			
+			first = FALSE;
 
-			if(skip_this) 
+			if(skip_this)
 				{
 				continue;
 				}
 			}
 
-		if(h_val) free_2(h_val); 
+		if(h_val) free_2(h_val);
 		h_val = get_hptr_vector_val(t, ha[i]);
 		w32redirect_fprintf(GLOBALS->f_vcd_saver_c_1, "          Edge:               "TTFormat".0 %s\n", ha[i]->time, h_val);
 		}
-	}		
+	}
 
 if(first)
 	{
@@ -1352,7 +1352,7 @@ if(first)
 			edges);
 	}
 
-if(h_val) free_2(h_val); 
+if(h_val) free_2(h_val);
 (*whichptr)++;
 }
 
@@ -1362,7 +1362,7 @@ static char *get_vptr_vector_val(Trptr t, vptr v)
 {
 char *ascii = NULL;
 
-if(v->time < LLDescriptor(0)) 
+if(v->time < LLDescriptor(0))
 	{
 	ascii=strdup_2("X");
 	}
@@ -1426,7 +1426,7 @@ for(i=0;i<numhist;i++)
 	{
 	if(ha[i]->time < tmin)
 		{
-		if(h_val) free_2(h_val); 
+		if(h_val) free_2(h_val);
 		h_val = get_vptr_vector_val(t, ha[i]);
 		}
 	else
@@ -1442,7 +1442,7 @@ for(i=0;i<numhist;i++)
 
 			if(skip_this)
 				{
-				if(h_val) free_2(h_val); 
+				if(h_val) free_2(h_val);
 				h_val = get_vptr_vector_val(t, ha[i]);
 				}
 
@@ -1462,19 +1462,19 @@ for(i=0;i<numhist;i++)
 					h_val,
 					vcdsav_dtypes[curtype],
 					edges);
-			first = FALSE;			
+			first = FALSE;
 
-			if(skip_this) 
+			if(skip_this)
 				{
 				continue;
 				}
 			}
 
-		if(h_val) free_2(h_val); 
+		if(h_val) free_2(h_val);
 		h_val = get_vptr_vector_val(t, ha[i]);
 		w32redirect_fprintf(GLOBALS->f_vcd_saver_c_1, "          Edge:               "TTFormat".0 %s\n", ha[i]->time, h_val);
 		}
-	}		
+	}
 
 if(first)
 	{
@@ -1497,7 +1497,7 @@ if(first)
 			edges);
 	}
 
-if(h_val) free_2(h_val); 
+if(h_val) free_2(h_val);
 (*whichptr)++;
 }
 
@@ -1530,7 +1530,7 @@ int do_timfile_save(const char *fname)
 {
 const char *time_prefix=WAVE_SI_UNITS;
 const double negpow[] = { 1.0, 1.0e-3, 1.0e-6, 1.0e-9, 1.0e-12, 1.0e-15, 1.0e-18, 1.0e-21 };
-char *pnt;        
+char *pnt;
 int offset;
 Trptr t = GLOBALS->traces.first;
 int i = 1; /* trace index in the .tim file */
diff --git a/src/version.h b/src/version.h
index d487402..b10bb69 100644
--- a/src/version.h
+++ b/src/version.h
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 2010-2014.
  *
  * This program is free software; you can redistribute it and/or
diff --git a/src/vlist.c b/src/vlist.c
index 6cab77e..184f066 100644
--- a/src/vlist.c
+++ b/src/vlist.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 2006-2014.
  *
  * This program is free software; you can redistribute it and/or
@@ -12,7 +12,7 @@
    clean up histents by using vlist_alloc() to create a growable
    array that doesn't require next pointers per-element, however
    that doesn't seem necessary given the space savings that
-   gzipped dormant vlist entries buys you.  
+   gzipped dormant vlist entries buys you.
 
    the vlists have been modified since the original version in
    two ways: (1) only half as many bytes are allocated as needed
@@ -35,7 +35,7 @@ if(GLOBALS->use_fastload)
 	{
 	char *fname = malloc_2(strlen(GLOBALS->loaded_file_name) + 4 + 1);
 	sprintf(fname, "%s.idx", GLOBALS->loaded_file_name);
-		
+
 	GLOBALS->vlist_handle = fopen(fname, "w+b");
 
 	free_2(fname);
@@ -54,7 +54,7 @@ else
 	char *nam = tmpnam_2(NULL, &fd_dummy);
 
 	GLOBALS->vlist_handle = fopen(nam, "w+b");
-	
+
 	unlink(nam);
 	if(fd_dummy >=0) { close(fd_dummy); free_2(nam); }
 
@@ -68,17 +68,17 @@ void vlist_kill_spillfile(void)
 {
 if(GLOBALS->vlist_handle)
 	{
-	fclose(GLOBALS->vlist_handle); 
+	fclose(GLOBALS->vlist_handle);
 	GLOBALS->vlist_handle = NULL;
 	}
 }
 
 
-/* machine-independent header i/o 
+/* machine-independent header i/o
  */
 static int vlist_fread_hdr(struct vlist_t *vl, FILE *f)
 {
-unsigned long val; 
+unsigned long val;
 unsigned int vali;
 int ch, shamt, rc = 0;
 
@@ -86,7 +86,7 @@ val = 0; shamt = 0;
 do
 	{
 	ch = fgetc(f);
-	if(ch == EOF) goto bail;	
+	if(ch == EOF) goto bail;
 
 	val |= ((unsigned long)(ch & 0x7f)) << shamt;
 	shamt += 7;
@@ -97,7 +97,7 @@ vali = 0; shamt = 0;
 do
 	{
 	ch = fgetc(f);
-	if(ch == EOF) goto bail;	
+	if(ch == EOF) goto bail;
 
 	vali |= ((unsigned int)(ch & 0x7f)) << shamt;
 	shamt += 7;
@@ -108,7 +108,7 @@ vali = 0; shamt = 0;
 do
 	{
 	ch = fgetc(f);
-	if(ch == EOF) goto bail;	
+	if(ch == EOF) goto bail;
 
 	vali |= ((unsigned int)(ch & 0x7f)) << shamt;
 	shamt += 7;
@@ -119,7 +119,7 @@ vali = 0; shamt = 0;
 do
 	{
 	ch = fgetc(f);
-	if(ch == EOF) goto bail;	
+	if(ch == EOF) goto bail;
 
 	vali |= ((unsigned int)(ch & 0x7f)) << shamt;
 	shamt += 7;
@@ -128,7 +128,7 @@ vl->elem_siz = (unsigned int)vali;
 
 rc = 1;
 
-bail: 
+bail:
 return(rc);
 }
 
@@ -148,7 +148,7 @@ while((nxt = val>>7))
         {
         *(pnt++) = (val&0x7f);
         val = nxt;
-        }           
+        }
 *(pnt++) = (val&0x7f) | 0x80;
 
 
@@ -157,7 +157,7 @@ while((nxti = vali>>7))
         {
         *(pnt++) = (vali&0x7f);
         vali = nxti;
-        }           
+        }
 *(pnt++) = (vali&0x7f) | 0x80;
 
 offs_as_int = (int)(vl->offs);
@@ -177,7 +177,7 @@ while((nxti = vali>>7))
         {
         *(pnt++) = (vali&0x7f);
         vali = nxti;
-        }           
+        }
 *(pnt++) = (vali&0x7f) | 0x80;
 
 vali = (unsigned int)(vl->elem_siz);
@@ -185,7 +185,7 @@ while((nxti = vali>>7))
         {
         *(pnt++) = (vali&0x7f);
         vali = nxti;
-        }           
+        }
 *(pnt++) = (vali&0x7f) | 0x80;
 
 rc = fwrite(mem, 1, (len = (pnt - mem)), f);
@@ -245,7 +245,7 @@ if(v->siz > 32)
 	char *dmem = malloc_2(compressBound(v->siz));
 	unsigned long destlen = v->siz;
 	int rc;
-	
+
 	rc = compress2((unsigned char *)dmem, &destlen, (unsigned char *)(v+1), v->siz, GLOBALS->vlist_compression_depth);
 	if( (rc == Z_OK) && ((destlen + sizeof(int)) < v->siz) )
 		{
@@ -253,7 +253,7 @@ if(v->siz > 32)
 
 		vz = malloc_2(*rsiz = sizeof(struct vlist_t) + sizeof(int) + destlen);
 		memcpy(vz, v, sizeof(struct vlist_t));
-	
+
 		ipnt = (unsigned int *)(vz + 1);
 		ipnt[0] = destlen;
 		memcpy(&ipnt[1], dmem, destlen);
@@ -313,13 +313,13 @@ if(GLOBALS->vlist_handle)
 			exit(255);
 			}
 
-		if(vprev) 
+		if(vprev)
 			{
 			vprev->next = vrebuild;
 			}
 			else
 			{
-			*v = vrebuild; 
+			*v = vrebuild;
 			}
 
 		vprev = vrebuild;
@@ -346,25 +346,25 @@ while(vl)
 		sourcelen = (unsigned long)ipnt[0];
 		destlen = (unsigned long)vl->siz;
 
-		rc = uncompress((unsigned char *)(vz+1), &destlen, (unsigned char *)&ipnt[1], sourcelen);	
+		rc = uncompress((unsigned char *)(vz+1), &destlen, (unsigned char *)&ipnt[1], sourcelen);
 		if(rc != Z_OK)
 			{
 			fprintf(stderr, "Error in vlist uncompress(), rc=%d/destlen=%d exiting!\n", rc, (int)destlen);
 			exit(255);
 			}
-	
+
 		free_2(vl);
 		vl = vz;
 
-		if(vprev) 
+		if(vprev)
 			{
 			vprev->next = vz;
 			}
 			else
 			{
-			*v = vz; 
+			*v = vz;
 			}
-		}	
+		}
 
 	vprev = vl;
 	vl = vl->next;
@@ -475,7 +475,7 @@ return((void *)px);
 }
 
 
-/* vlist_size() and vlist_locate() do not work properly on 
+/* vlist_size() and vlist_locate() do not work properly on
    compressed lists...you'll have to call vlist_uncompress() first!
  */
 unsigned int vlist_size(struct vlist_t *v)
@@ -521,7 +521,7 @@ if((vl->elem_siz == 1)&&(siz))
 		v2 = calloc_2(1, sizeof(struct vlist_t) + (vl->siz /* * vl->elem_siz */)); /* scan-build */
 		memcpy(v2, vl, sizeof(struct vlist_t) + (vl->siz/2 /* * vl->elem_siz */)); /* scan-build */
 		free_2(vl);
-	
+
 		*v = v2;
 		vl = *v;
 		}
@@ -613,11 +613,11 @@ unsigned int nxt;
 
 while((nxt = v>>7))
         {
-        vlist_packer_emit_out(p, v&0x7f);  
+        vlist_packer_emit_out(p, v&0x7f);
         v = nxt;
         }
 
-vlist_packer_emit_out(p, (v&0x7f) | 0x80); 
+vlist_packer_emit_out(p, (v&0x7f) | 0x80);
 }
 
 
@@ -638,8 +638,8 @@ buf[idx] = (v&0x7f) | 0x80;
 
 for(i = idx; i >= 0; i--)
 	{
-	vlist_packer_emit_out(p, buf[i]); 
-	} 
+	vlist_packer_emit_out(p, buf[i]);
+	}
 }
 
 
@@ -657,7 +657,7 @@ top:
 		if(p->buf[(p->bufpnt-i) & WAVE_ZIVMASK] == byt)
 			{
 			p->repdist = i;
-			p->repcnt = 1;			
+			p->repcnt = 1;
 
 			p->repdist2 = p->repdist3 = p->repdist4 = 0;
 
@@ -702,7 +702,7 @@ top:
 	p->bufpnt++;
 	p->bufpnt &= WAVE_ZIVMASK;
 	p->buf[p->bufpnt] = byt;
-	vlist_packer_emit_out(p, byt);	
+	vlist_packer_emit_out(p, byt);
 	if(byt==WAVE_ZIVFLAG)
 		{
 		vlist_packer_emit_uv32(p, 0);
@@ -788,21 +788,21 @@ attempt2:
 			{
 			if(p->repcnt == 2)
 				{
-				vlist_packer_emit_out(p, p->buf[(p->bufpnt-1) & WAVE_ZIVMASK]);	
+				vlist_packer_emit_out(p, p->buf[(p->bufpnt-1) & WAVE_ZIVMASK]);
 				if(p->buf[(p->bufpnt-1) & WAVE_ZIVMASK]==WAVE_ZIVFLAG)
 					{
 					vlist_packer_emit_uv32(p, 0);
 					}
 				}
-			
-			vlist_packer_emit_out(p, p->buf[p->bufpnt & WAVE_ZIVMASK]);	
+
+			vlist_packer_emit_out(p, p->buf[p->bufpnt & WAVE_ZIVMASK]);
 			p->repcnt = 0;
 			if(p->buf[p->bufpnt & WAVE_ZIVMASK]==WAVE_ZIVFLAG)
 				{
 				vlist_packer_emit_uv32(p, 0);
 				}
 			}
-		goto top;		
+		goto top;
 		}
 	}
 }
@@ -826,14 +826,14 @@ if(p->repcnt)
 		{
 		if(p->repcnt == 2)
 			{
-			vlist_packer_emit_out(p, p->buf[(p->bufpnt-1) & WAVE_ZIVMASK]);	
+			vlist_packer_emit_out(p, p->buf[(p->bufpnt-1) & WAVE_ZIVMASK]);
 			if(p->buf[(p->bufpnt-1) & WAVE_ZIVMASK]==WAVE_ZIVFLAG)
 				{
 				vlist_packer_emit_uv32(p, 0);
 				}
 			}
-			
-		vlist_packer_emit_out(p, p->buf[p->bufpnt & WAVE_ZIVMASK]);	
+
+		vlist_packer_emit_out(p, p->buf[p->bufpnt & WAVE_ZIVMASK]);
 		p->repcnt = 0;
 		if(p->buf[p->bufpnt & WAVE_ZIVMASK]==WAVE_ZIVFLAG)
 			{
@@ -845,8 +845,8 @@ if(p->repcnt)
 vlist_packer_emit_uv32rvs(p, p->unpacked_bytes); /* for malloc later during decompress */
 
 #ifdef WAVE_VLIST_PACKER_STATS
-pp += p->packed_bytes; 
-upp += p->unpacked_bytes; 
+pp += p->packed_bytes;
+upp += p->unpacked_bytes;
 
 printf("pack:%d orig:%d (%lld %lld %f)\n", p->packed_bytes, p->unpacked_bytes, pp, upp, (float)pp / (float)upp);
 #endif
@@ -886,7 +886,7 @@ for(;;)
 
 	shamt+=7;
 	top_of_packed_size--;
-	} 
+	}
 
 mem = calloc_2(1, WAVE_ZIVWRAP + dec_size);
 dpnt = mem + WAVE_ZIVWRAP;
@@ -914,7 +914,7 @@ for(i=0;i<top_of_packed_size;i++)
 		i++;
 
 		shamt+=7;
-		} 
+		}
 	if(repcnt == 0)
 		{
 		*(dpnt++) = WAVE_ZIVFLAG;
@@ -936,7 +936,7 @@ for(i=0;i<top_of_packed_size;i++)
 		i++;
 
 		shamt+=7;
-		} 
+		}
 
 	for(j=0;j<repcnt;j++)
 		{
diff --git a/src/vlist.h b/src/vlist.h
index b4bdb3f..4877804 100644
--- a/src/vlist.h
+++ b/src/vlist.h
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 2006-8.
  *
  * This program is free software; you can redistribute it and/or
@@ -26,9 +26,9 @@ unsigned int elem_siz;
 };
 
 
-/* experimentation shows that 255 is one of the least common 
+/* experimentation shows that 255 is one of the least common
    bytes found in recoded value change streams */
-#define WAVE_ZIVFLAG (0xff) 
+#define WAVE_ZIVFLAG (0xff)
 
 #define WAVE_ZIVWRAP (1<<7) 		  /* must be power of two because of AND mask */
 #define WAVE_ZIVSRCH (WAVE_ZIVWRAP)	  /* search depth in bytes */
diff --git a/src/vzt.c b/src/vzt.c
index ce06b36..54fb845 100644
--- a/src/vzt.c
+++ b/src/vzt.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 2003-2012.
  *
  * This program is free software; you can redistribute it and/or
@@ -99,7 +99,7 @@ if(GLOBALS->numfacs)
 for(i=0;i<GLOBALS->numfacs;i++)
         {
 	char buf[65537];
-	char *str;	
+	char *str;
 	struct fac *f;
 
 	if(i!=(GLOBALS->numfacs-1))
@@ -155,7 +155,7 @@ for(i=0;i<GLOBALS->numfacs;i++)
                 int gatecmp = (f->len==1) && (!(f->flags&(VZT_RD_SYM_F_INTEGER|VZT_RD_SYM_F_DOUBLE|VZT_RD_SYM_F_STRING))) && (node_block[i].msi!=-1) && (node_block[i].lsi!=-1);
                 int revcmp = gatecmp && (i) && (!strcmp(f_name[(i)&F_NAME_MODULUS], f_name[(i-1)&F_NAME_MODULUS]));
 
-		if(gatecmp)		
+		if(gatecmp)
 			{
 			int len = sprintf(buf, "%s[%d]", f_name[(i)&F_NAME_MODULUS],node_block[i].msi);
 			str=malloc_2(len+1);
@@ -204,7 +204,7 @@ for(i=0;i<GLOBALS->numfacs;i++)
 				}
 			}
 		}
-		
+
         n=&node_block[i];
         n->nname=s->name;
         n->mv.mvlfac = GLOBALS->mvlfacs_vzt_c_3+i;
@@ -214,7 +214,7 @@ for(i=0;i<GLOBALS->numfacs;i++)
 		{
 		n->extvals = 1;
 		}
-                 
+
         n->head.time=-1;        /* mark 1st node as negative time */
         n->head.v.h_val=AN_X;
         s->n=n;
@@ -230,7 +230,7 @@ for(i=0;i<=F_NAME_MODULUS;i++)
 	}
 free_2(f_name); f_name = NULL;
 
-/* SPLASH */                            splash_sync(2, 5);  
+/* SPLASH */                            splash_sync(2, 5);
 GLOBALS->facs=(struct symbol **)malloc_2(GLOBALS->numfacs*sizeof(struct symbol *));
 
 if(GLOBALS->fast_tree_sort)
@@ -238,10 +238,10 @@ if(GLOBALS->fast_tree_sort)
         for(i=0;i<GLOBALS->numfacs;i++)
                 {
                 int len;
-                GLOBALS->facs[i]=&sym_block[i]; 
+                GLOBALS->facs[i]=&sym_block[i];
                 if((len=strlen(GLOBALS->facs[i]->name))>GLOBALS->longestname) GLOBALS->longestname=len;
                 }
-                                
+
         if(numalias)
                 {
                 unsigned int idx_lft = 0;
@@ -252,11 +252,11 @@ if(GLOBALS->fast_tree_sort)
 		fprintf(stderr, VZT_RDLOAD"Merging in %d aliases.\n", numalias);
 
                 for(i=0;i<GLOBALS->numfacs;i++)  /* fix possible tail appended aliases by remerging in partial one pass merge sort */
-                        { 
+                        {
                         if(strcmp(GLOBALS->facs[idx_lft]->name, GLOBALS->facs[idx_rgh]->name) <= 0)
                                 {
                                 facs_merge[i] = GLOBALS->facs[idx_lft++];
-                
+
                                 if(idx_lft == idx_lftmax)
                                         {
                                         for(i++;i<GLOBALS->numfacs;i++)
@@ -268,7 +268,7 @@ if(GLOBALS->fast_tree_sort)
                                 else
                                 {
                                 facs_merge[i] = GLOBALS->facs[idx_rgh++];
-        
+
                                 if(idx_rgh == GLOBALS->numfacs)
                                         {
                                         for(i++;i<GLOBALS->numfacs;i++)
@@ -277,14 +277,14 @@ if(GLOBALS->fast_tree_sort)
                                                 }
                                         }
                                 }
-                        } 
-                        
+                        }
+
                 free_2(GLOBALS->facs); GLOBALS->facs = facs_merge;
                 }
-                
-/* SPLASH */                            splash_sync(3, 5);  
+
+/* SPLASH */                            splash_sync(3, 5);
         fprintf(stderr, VZT_RDLOAD"Building facility hierarchy tree.\n");
-                                         
+
         init_tree();
         for(i=0;i<GLOBALS->numfacs;i++)
                 {
@@ -301,7 +301,7 @@ if(GLOBALS->fast_tree_sort)
 
 		build_tree_from_name(GLOBALS->facs[i]->name, i);
                 }
-/* SPLASH */                            splash_sync(4, 5);  
+/* SPLASH */                            splash_sync(4, 5);
         if(GLOBALS->escaped_names_found_vcd_c_1)
                 {
                 for(i=0;i<GLOBALS->numfacs;i++)
@@ -316,16 +316,16 @@ if(GLOBALS->fast_tree_sort)
                         }
                 }
         treegraft(&GLOBALS->treeroot);
-                                
+
         fprintf(stderr, VZT_RDLOAD"Sorting facility hierarchy tree.\n");
         treesort(GLOBALS->treeroot, NULL);
-/* SPLASH */                            splash_sync(5, 5);  
+/* SPLASH */                            splash_sync(5, 5);
         order_facs_from_treesort(GLOBALS->treeroot, &GLOBALS->facs);
         if(GLOBALS->escaped_names_found_vcd_c_1)
                 {
-                treenamefix(GLOBALS->treeroot); 
+                treenamefix(GLOBALS->treeroot);
                 }
-                                
+
         GLOBALS->facs_are_sorted=1;
         }
         else
@@ -350,36 +350,36 @@ if(GLOBALS->fast_tree_sort)
                         }
 		}
 
-/* SPLASH */                            splash_sync(3, 5);  
+/* SPLASH */                            splash_sync(3, 5);
 	fprintf(stderr, VZT_RDLOAD"Sorting facilities at hierarchy boundaries.\n");
 	wave_heapsort(GLOBALS->facs,GLOBALS->numfacs);
 
-#ifdef WAVE_HIERFIX	
+#ifdef WAVE_HIERFIX
 	for(i=0;i<GLOBALS->numfacs;i++)
 		{
 		char *subst, ch;
-	
+
 		subst=GLOBALS->facs[i]->name;
 		while((ch=(*subst)))
-			{	
+			{
 			if(ch==VCDNAM_HIERSORT) { *subst=GLOBALS->hier_delimeter; }	/* restore back to normal */
 			subst++;
 			}
 		}
 #endif
-	
+
 	GLOBALS->facs_are_sorted=1;
 
-/* SPLASH */                            splash_sync(4, 5);  
+/* SPLASH */                            splash_sync(4, 5);
 	fprintf(stderr, VZT_RDLOAD"Building facility hierarchy tree.\n");
 
-	init_tree();		
-	for(i=0;i<GLOBALS->numfacs;i++)	
+	init_tree();
+	for(i=0;i<GLOBALS->numfacs;i++)
 		{
 		char *nf = GLOBALS->facs[i]->name;
 	        build_tree_from_name(nf, i);
 		}
-/* SPLASH */                            splash_sync(5, 5);  
+/* SPLASH */                            splash_sync(5, 5);
         if(GLOBALS->escaped_names_found_vcd_c_1)
                 {
                 for(i=0;i<GLOBALS->numfacs;i++)
@@ -452,7 +452,7 @@ struct lx2_entry *l2e = GLOBALS->vzt_table_vzt_c_1+(*facidx);
 struct fac *f = GLOBALS->mvlfacs_vzt_c_3+(*facidx);
 
 
-GLOBALS->busycnt_vzt_c_2++; 
+GLOBALS->busycnt_vzt_c_2++;
 if(GLOBALS->busycnt_vzt_c_2==WAVE_BUSY_ITER)
 	{
 	busy_window_refresh();
@@ -463,7 +463,7 @@ if(GLOBALS->busycnt_vzt_c_2==WAVE_BUSY_ITER)
 
 if(!(f->flags&(VZT_RD_SYM_F_DOUBLE|VZT_RD_SYM_F_STRING)))
 	{
-	if(f->len>1)        
+	if(f->len>1)
 	        {
 	        htemp->v.h_vector = (char *)malloc_2(f->len);
 		memcpy(htemp->v.h_vector, *value, f->len);
@@ -520,7 +520,7 @@ l2e->numtrans++;
  * this is the black magic that handles aliased signals...
  */
 static void vzt_resolver(nptr np, nptr resolve)
-{ 
+{
 np->extvals = resolve->extvals;
 np->msi = resolve->msi;
 np->lsi = resolve->lsi;
@@ -533,8 +533,8 @@ np->mv.mvlfac=NULL;
 
 
 
-/* 
- * actually import a vzt trace but don't do it if it's already been imported 
+/*
+ * actually import a vzt trace but don't do it if it's already been imported
  */
 void import_vzt_trace(nptr np)
 {
@@ -547,12 +547,12 @@ nptr nold = np;
 if(!(f=np->mv.mvlfac)) return;	/* already imported */
 
 txidx = f - GLOBALS->mvlfacs_vzt_c_3;
-if(np->mv.mvlfac->flags&VZT_RD_SYM_F_ALIAS) 
+if(np->mv.mvlfac->flags&VZT_RD_SYM_F_ALIAS)
 	{
 	txidx = vzt_rd_get_alias_root(GLOBALS->vzt_vzt_c_1, txidx);
 	np = GLOBALS->mvlfacs_vzt_c_3[txidx].working_node;
 
-	if(!(f=np->mv.mvlfac)) 
+	if(!(f=np->mv.mvlfac))
 		{
 		vzt_resolver(nold, np);
 		return;	/* already imported */
@@ -594,7 +594,7 @@ if(len>1)
 	htemp->v.h_val = AN_X;		/* x */
 	}
 htemp->time = MAX_HISTENT_TIME-1;
-htemp->next = histent_tail;			
+htemp->next = histent_tail;
 
 if(GLOBALS->vzt_table_vzt_c_1[txidx].histent_curr)
 	{
@@ -652,7 +652,7 @@ if(nold!=np)
 }
 
 
-/* 
+/*
  * pre-import many traces at once so function above doesn't have to iterate...
  */
 void vzt_set_fac_process_mask(nptr np)
@@ -664,7 +664,7 @@ if(!(f=np->mv.mvlfac)) return;	/* already imported */
 
 txidx = f-GLOBALS->mvlfacs_vzt_c_3;
 
-if(np->mv.mvlfac->flags&VZT_RD_SYM_F_ALIAS) 
+if(np->mv.mvlfac->flags&VZT_RD_SYM_F_ALIAS)
 	{
 	txidx = vzt_rd_get_alias_root(GLOBALS->vzt_vzt_c_1, txidx);
 	np = GLOBALS->mvlfacs_vzt_c_3[txidx].working_node;
@@ -724,7 +724,7 @@ for(txidx=0;txidx<GLOBALS->numfacs;txidx++)
 			htemp->v.h_val = AN_Z;		/* z */
 			}
 		htemp->time = MAX_HISTENT_TIME;
-			
+
 		htemp = histent_calloc();
 		if(len>1)
 			{
@@ -736,7 +736,7 @@ for(txidx=0;txidx<GLOBALS->numfacs;txidx++)
 			htemp->v.h_val = AN_X;		/* x */
 			}
 		htemp->time = MAX_HISTENT_TIME-1;
-		htemp->next = histent_tail;			
+		htemp->next = histent_tail;
 
 		if(GLOBALS->vzt_table_vzt_c_1[txidx].histent_curr)
 			{
diff --git a/src/vzt.h b/src/vzt.h
index fe01d5a..5c76791 100644
--- a/src/vzt.h
+++ b/src/vzt.h
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 2003-2004.
  *
  * This program is free software; you can redistribute it and/or
diff --git a/src/wavealloca.h b/src/wavealloca.h
index ac2416d..4be2e49 100644
--- a/src/wavealloca.h
+++ b/src/wavealloca.h
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999.
  *
  * This program is free software; you can redistribute it and/or
@@ -10,7 +10,7 @@
 #ifndef WAVE_ALLOCA_H
 #define WAVE_ALLOCA_H
 #include <stdlib.h>
-#if HAVE_ALLOCA_H
+#ifdef HAVE_ALLOCA_H
 #include <alloca.h>
 #elif defined(__GNUC__)
 #ifndef __MINGW32__
@@ -25,5 +25,5 @@
 #define alloca _alloca
 #endif
 #define wave_alloca alloca
-#endif 
+#endif
 
diff --git a/src/wavewindow.c b/src/wavewindow.c
index e303fa3..b23b98f 100644
--- a/src/wavewindow.c
+++ b/src/wavewindow.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2012.
  *
  * This program is free software; you can redistribute it and/or
@@ -82,9 +82,9 @@ static void draw_slider         (GtkStyle               *style,
 {
 if((GLOBALS)&&(widget == GLOBALS->hscroll_wavewindow_c_2))
 	{
-	GLOBALS->str_wid_x = x - widget->allocation.x; 
+	GLOBALS->str_wid_x = x - widget->allocation.x;
 	GLOBALS->str_wid_width = width;
-	GLOBALS->str_wid_bigw = widget->allocation.width;	
+	GLOBALS->str_wid_bigw = widget->allocation.width;
 	GLOBALS->str_wid_height = height;
 	}
 
@@ -98,15 +98,15 @@ int xi = event->x;
 int xl = GLOBALS->str_wid_x;
 int xr = GLOBALS->str_wid_x + GLOBALS->str_wid_width;
 
-if((xi > (xr-8)) && (xi < (xr+8))) 
+if((xi > (xr-8)) && (xi < (xr+8)))
 	{
-	GLOBALS->str_wid_state = 1; 
-	return(TRUE); 
+	GLOBALS->str_wid_state = 1;
+	return(TRUE);
 	}
-else if((xi < (xl+8)) && (xi > (xl-8))) 
-	{ 
-	GLOBALS->str_wid_state = -1; 
-	return(TRUE); 
+else if((xi < (xl+8)) && (xi > (xl-8)))
+	{
+	GLOBALS->str_wid_state = -1;
+	return(TRUE);
 	}
 
 return(FALSE);
@@ -166,7 +166,7 @@ if(GLOBALS->str_wid_state == 1)
 		if((r_margin > GLOBALS->tims.start) && (r_margin <= GLOBALS->tims.last))
 			{
 			service_dragzoom(GLOBALS->tims.start, r_margin);
-			}	
+			}
 		return(TRUE);
 		}
 	}
@@ -184,7 +184,7 @@ if(GLOBALS->str_wid_state == -1)
 			{
 			if(r_margin > GLOBALS->tims.last) r_margin = GLOBALS->tims.last;
 			service_dragzoom(l_margin, r_margin);
-			}	
+			}
 		return(TRUE);
 		}
 	}
@@ -205,10 +205,10 @@ return(FALSE);
 
 #define WAVE_SEG_BUF_CNT 1024
 
-static int seg_trans_cnt = 0, seg_low_cnt = 0, seg_high_cnt = 0, seg_mid_cnt = 0, seg_x_cnt = 0, seg_vtrans_cnt 
+static int seg_trans_cnt = 0, seg_low_cnt = 0, seg_high_cnt = 0, seg_mid_cnt = 0, seg_x_cnt = 0, seg_vtrans_cnt
 = 0, seg_0_cnt = 0, seg_1_cnt = 0, seg_vbox_cnt = 0;
 
-static GdkSegment seg_trans[WAVE_SEG_BUF_CNT], seg_low[WAVE_SEG_BUF_CNT], seg_high[WAVE_SEG_BUF_CNT], 
+static GdkSegment seg_trans[WAVE_SEG_BUF_CNT], seg_low[WAVE_SEG_BUF_CNT], seg_high[WAVE_SEG_BUF_CNT],
 seg_mid[WAVE_SEG_BUF_CNT], seg_x[WAVE_SEG_BUF_CNT], seg_vtrans[WAVE_SEG_BUF_CNT], seg_0[WAVE_SEG_BUF_CNT],
 seg_1[WAVE_SEG_BUF_CNT], seg_vbox[WAVE_SEG_BUF_CNT];
 
@@ -318,7 +318,7 @@ if(seg_vbox_cnt)
  */
 TimeType cook_markertime(TimeType marker, gint x, gint y)
 {
-int i, num_traces_displayable;                
+int i, num_traces_displayable;
 Trptr t = NULL;
 TimeType lft, rgh;
 char lftinv, rghinv;
@@ -342,13 +342,13 @@ for(i=0;i<26;i++)
 			{
 			if(marker < GLOBALS->named_markers[i])
 				{
-				dlt = GLOBALS->named_markers[i] - marker;			
+				dlt = GLOBALS->named_markers[i] - marker;
 				}
 				else
-				{		
-				dlt = marker - GLOBALS->named_markers[i];			
+				{
+				dlt = marker - GLOBALS->named_markers[i];
 				}
-			
+
 			if(dlt < closest_named)
 				{
 				closest_named = dlt;
@@ -392,7 +392,7 @@ if(t->flags & (TR_BLANK|TR_ANALOG_BLANK_STRETCH))  /* seek to real xact trace if
                                 {
                                 break; /* found it */
                                 }
-                                else 
+                                else
                                 {
                                 tscan = NULL;
                                 }
@@ -488,7 +488,7 @@ if(xrghd<(gdouble)0.0) xrghd = ((gdouble)0.0) - xrghd;
 
 if(xlftd<=xrghd)
 	{
-	if((!lftinv)&&(xlftd<=GLOBALS->cursor_snap)) 
+	if((!lftinv)&&(xlftd<=GLOBALS->cursor_snap))
 		{
 		if(closest_which >= 0)
 		        {
@@ -505,7 +505,7 @@ if(xlftd<=xrghd)
 	}
 	else
 	{
-	if((!rghinv)&&(xrghd<=GLOBALS->cursor_snap)) 
+	if((!rghinv)&&(xrghd<=GLOBALS->cursor_snap))
 		{
 		if(closest_which >= 0)
 		        {
@@ -568,7 +568,7 @@ if((t=GLOBALS->named_markers[i])!=-1)
 				{
 				font_engine_draw_string(GLOBALS->wavepixmap_wavewindow_c_1, GLOBALS->wavefont_smaller,
 					gc,
-					xl-(font_engine_string_measure(GLOBALS->wavefont_smaller, nbuff)>>1), 
+					xl-(font_engine_string_measure(GLOBALS->wavefont_smaller, nbuff)>>1),
 					GLOBALS->fontheight-2, nbuff);
 				}
 				else
@@ -577,13 +577,13 @@ if((t=GLOBALS->named_markers[i])!=-1)
 				if(blackout) /* blackout background so text is legible if overlaid with other marker labels */
 					{
 					gdk_draw_rectangle(GLOBALS->wavepixmap_wavewindow_c_1, GLOBALS->gc.gc_timeb_wavewindow_c_1, TRUE,
-						xl-(width>>1), GLOBALS->fontheight-2-GLOBALS->wavefont_smaller->ascent, 
+						xl-(width>>1), GLOBALS->fontheight-2-GLOBALS->wavefont_smaller->ascent,
 						width, GLOBALS->wavefont_smaller->ascent + GLOBALS->wavefont_smaller->descent);
 					}
 
 				font_engine_draw_string(GLOBALS->wavepixmap_wavewindow_c_1, GLOBALS->wavefont_smaller,
 					gc,
-					xl-(width>>1), 
+					xl-(width>>1),
 					GLOBALS->fontheight-2, GLOBALS->marker_names[i]);
 				}
 			}
@@ -787,7 +787,7 @@ if(bt)
 			lclip -= lhs;
 			rclip -= lhs;
 			if(rclip>((GLOBALS->wavewidth+1)*GLOBALS->nspx)) rclip = (GLOBALS->wavewidth+1)*(GLOBALS->nspx);
-			
+
 			gdk_draw_rectangle(GLOBALS->wavepixmap_wavewindow_c_1, GLOBALS->gc.gc_xfill_wavewindow_c_1, TRUE, (((gdouble)lclip)*GLOBALS->pxns), GLOBALS->fontheight,(((gdouble)(rclip-lclip))*GLOBALS->pxns), GLOBALS->waveheight-GLOBALS->fontheight);
 			}
 
@@ -796,7 +796,7 @@ if(bt)
 	}
 }
 
-static void     
+static void
 service_hslider(GtkWidget *text, gpointer data)
 {
 DEBUG(printf("Wave HSlider Moved\n"));
@@ -827,7 +827,7 @@ if((GLOBALS->wavepixmap_wavewindow_c_1)&&(GLOBALS->wavewidth>1))
 	}
 }
 
-static void     
+static void
 service_vslider(GtkWidget *text, gpointer data)
 {
 GtkAdjustment *sadj, *hadj;
@@ -843,10 +843,10 @@ if(GLOBALS->signalpixmap)
 	trtarget=(int)(sadj->value);
 	DEBUG(printf("Wave VSlider Moved to %d\n",trtarget));
 
-		gdk_draw_rectangle(GLOBALS->signalpixmap, 
+		gdk_draw_rectangle(GLOBALS->signalpixmap,
 			GLOBALS->gc.gc_ltgray, TRUE, 0, 0,
 	            	GLOBALS->signal_fill_width, GLOBALS->signalarea->allocation.height);
-	
+
 		sync_marker();
 		RenderSigs(trtarget,(GLOBALS->old_wvalue==sadj->value)?0:1);
 
@@ -880,7 +880,7 @@ void button_press_release_common(void)
 {
 MaxSignalLength();
 
-gdk_draw_rectangle(GLOBALS->signalpixmap, 
+gdk_draw_rectangle(GLOBALS->signalpixmap,
 	GLOBALS->gc.gc_ltgray, TRUE, 0, 0,
         GLOBALS->signal_fill_width, GLOBALS->signalarea->allocation.height);
 sync_marker();
@@ -906,7 +906,7 @@ if(GLOBALS->signalarea_has_focus)
 	}
 }
 
-static void button_motion_common(gint xin, gint yin, int pressrel, int is_button_2) 
+static void button_motion_common(gint xin, gint yin, int pressrel, int is_button_2)
 {
 gdouble x,offset,pixstep;
 TimeType newcurr;
@@ -944,7 +944,7 @@ if(!is_button_2)
 
 	draw_marker_partitions();
 
-	if((pressrel)||(GLOBALS->constant_marker_update)) 
+	if((pressrel)||(GLOBALS->constant_marker_update))
 		{
 		button_press_release_common();
 		}
@@ -972,7 +972,7 @@ gint xi, yi;
 int dummy_x, dummy_y;
 get_window_xypos(&dummy_x, &dummy_y);
 
-if(event->is_hint)   
+if(event->is_hint)
         {
 	WAVE_GDK_GET_POINTER(event->window, &x, &y, &xi, &yi, &state);
 	WAVE_GDK_GET_POINTER_COPY;
@@ -990,11 +990,11 @@ do
 	if(state&bmask[GLOBALS->in_button_press_wavewindow_c_1]) /* needed for retargeting in AIX/X11 */
 		{
 		if(x<0)
-			{ 
+			{
 			if(GLOBALS->wave_scrolling)
 			if(GLOBALS->tims.start>GLOBALS->tims.first)
 				{
-				if(GLOBALS->nsperframe<10) 
+				if(GLOBALS->nsperframe<10)
 					{
 					GLOBALS->tims.start-=GLOBALS->nsperframe;
 					}
@@ -1004,24 +1004,24 @@ do
 					}
 				if(GLOBALS->tims.start<GLOBALS->tims.first) GLOBALS->tims.start=GLOBALS->tims.first;
 				GTK_ADJUSTMENT(GLOBALS->wave_hslider)->value=GLOBALS->tims.marker=time_trunc(GLOBALS->tims.timecache=GLOBALS->tims.start);
-	
+
 				gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(GLOBALS->wave_hslider)), "changed");
 				gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(GLOBALS->wave_hslider)), "value_changed");
 				scrolled=1;
-				}	
-			x=0; 
+				}
+			x=0;
 			}
 		else
-		if(x>GLOBALS->wavewidth) 
-			{ 
+		if(x>GLOBALS->wavewidth)
+			{
 			if(GLOBALS->wave_scrolling)
 			if(GLOBALS->tims.start!=GLOBALS->tims.last)
 				{
 				gfloat pageinc;
-		
+
 				pageinc=(gfloat)(((gdouble)GLOBALS->wavewidth)*GLOBALS->nspx);
-	
-				if(GLOBALS->nsperframe<10) 
+
+				if(GLOBALS->nsperframe<10)
 					{
 					GLOBALS->tims.start+=GLOBALS->nsperframe;
 					}
@@ -1029,22 +1029,22 @@ do
 					{
 					GLOBALS->tims.start+=(GLOBALS->nsperframe/10);
 					}
-	
+
 				if(GLOBALS->tims.start>GLOBALS->tims.last-pageinc+1) GLOBALS->tims.start=time_trunc(GLOBALS->tims.last-pageinc+1);
 				if(GLOBALS->tims.start<GLOBALS->tims.first) GLOBALS->tims.start=GLOBALS->tims.first;
-	
+
 				GLOBALS->tims.marker=time_trunc(GLOBALS->tims.start+pageinc);
 				if(GLOBALS->tims.marker>GLOBALS->tims.last) GLOBALS->tims.marker=GLOBALS->tims.last;
-		
+
 				GTK_ADJUSTMENT(GLOBALS->wave_hslider)->value=GLOBALS->tims.timecache=GLOBALS->tims.start;
-	
+
 				gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(GLOBALS->wave_hslider)), "changed");
 				gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(GLOBALS->wave_hslider)), "value_changed");
 				scrolled=1;
 				}
-			x=GLOBALS->wavewidth-1; 
+			x=GLOBALS->wavewidth-1;
 			}
-		}	
+		}
 	else if((state&GDK_BUTTON2_MASK)&&(GLOBALS->tims.baseline>=0))
 		{
 		button_motion_common(x,y,0,-1); /* neg one says don't clear tims.baseline */
@@ -1056,15 +1056,15 @@ do
 	        {
 	        newcurr++;
 	        }
-	
+
 	if(newcurr>GLOBALS->tims.last) newcurr=GLOBALS->tims.last;
-	
+
 	if(newcurr!=GLOBALS->prevtim_wavewindow_c_1)
 		{
 		update_currenttime(time_trunc(newcurr));
 		GLOBALS->prevtim_wavewindow_c_1=newcurr;
 		}
-	
+
 	if(state&bmask[GLOBALS->in_button_press_wavewindow_c_1])
 		{
 		button_motion_common(x,y,0,0);
@@ -1100,7 +1100,7 @@ do
 		                	delta=GLOBALS->tims.first-GLOBALS->tims.last;
 		                	if(gt<delta) gt=delta;
 		                	}
-		       		else 
+		       		else
 				if(gt>0)
 		                	{
 		                	delta=GLOBALS->tims.last-GLOBALS->tims.first;
@@ -1145,16 +1145,16 @@ static void alternate_y_scroll(int delta)
 GtkAdjustment *wadj=GTK_ADJUSTMENT(GLOBALS->wave_vslider);
 int value = (int)wadj->value;
 int target = value + delta;
-                
+
 int num_traces_displayable=(GLOBALS->signalarea->allocation.height)/(GLOBALS->fontheight);
 num_traces_displayable--;   /* for the time trace that is always there */
-                
+
 if(target > GLOBALS->traces.visible - num_traces_displayable) target = GLOBALS->traces.visible - num_traces_displayable;
 
 if(target < 0) target = 0;
-         
+
 wadj->value = target;
-         
+
 gtk_signal_emit_by_name (GTK_OBJECT (wadj), "changed"); /* force bar update */
 gtk_signal_emit_by_name (GTK_OBJECT (wadj), "value_changed"); /* force text update */
 }
@@ -1165,7 +1165,7 @@ gtk_signal_emit_by_name (GTK_OBJECT (wadj), "value_changed"); /* force text upda
  * TomB 05Feb2012
  */
 
-#define SANE_INCREMENT 0.25 
+#define SANE_INCREMENT 0.25
 /* don't want to increment a whole page thereby completely losing where I am... */
 
 void
@@ -1436,7 +1436,7 @@ static gint button_press_event(GtkWidget *widget, GdkEventButton *event)
 if((event->button==1)||((event->button==3)&&(!GLOBALS->in_button_press_wavewindow_c_1)))
 	{
 	GLOBALS->in_button_press_wavewindow_c_1=event->button;
-	
+
 	DEBUG(printf("Button Press Event\n"));
 	GLOBALS->prev_markertime = GLOBALS->tims.marker;
 	button_motion_common(event->x,event->y,1,0);
@@ -1446,7 +1446,7 @@ if((event->button==1)||((event->button==3)&&(!GLOBALS->in_button_press_wavewindo
 		m_bmask[GLOBALS->in_button_press_wavewindow_c_1] | /* key up on motion for button pressed ONLY */
 		GDK_POINTER_MOTION_HINT_MASK |
 	      	GDK_BUTTON_RELEASE_MASK, NULL, NULL, event->time);
-	
+
 #ifdef MAC_INTEGRATION
 	if ((event->state & GDK_MOD2_MASK) && (event->button==1))
 #else
@@ -1457,7 +1457,7 @@ if((event->button==1)||((event->button==3)&&(!GLOBALS->in_button_press_wavewindo
 
 		while(t)
 			{
-			if((t->flags & TR_HIGHLIGHT)&&(!t->shift_drag_valid))			
+			if((t->flags & TR_HIGHLIGHT)&&(!t->shift_drag_valid))
 				{
 				t->shift_drag = t->shift; /* cache old value */
 				t->shift_drag_valid = 1;
@@ -1499,7 +1499,7 @@ if((event->button)&&(event->button==GLOBALS->in_button_press_wavewindow_c_1))
 #else
 		if(event->state & GDK_CONTROL_MASK)
 #endif
-			{	
+			{
 			TimeType gt, delta;
 
 	          	while ( t )
@@ -1508,23 +1508,23 @@ if((event->button)&&(event->button==GLOBALS->in_button_press_wavewindow_c_1))
 	            			{
 		      			warp++;
 	              			gt = (t->shift_drag_valid ? t-> shift_drag : t->shift) + (GLOBALS->tims.marker - GLOBALS->tims.lmbcache);
-	
+
 			        	if(gt<0)
 	        		        	{
 			                	delta=GLOBALS->tims.first-GLOBALS->tims.last;
 			                	if(gt<delta) gt=delta;
 			                	}
-			       		else 
+			       		else
 					if(gt>0)
 			                	{
 			                	delta=GLOBALS->tims.last-GLOBALS->tims.first;
 			                	if(gt>delta) gt=delta;
 			                	}
 					t->shift = gt;
-	
+
 	              			t->flags &= ( ~TR_HIGHLIGHT );
 	            			}
-	
+
 				t->shift_drag_valid = 0;
 	            		t = t->t_next;
 	          		}
@@ -1627,17 +1627,17 @@ if(!GLOBALS->made_gc_contexts_wavewindow_c_1)
 	{
 	int i;
 
-	GLOBALS->gc.gc_back_wavewindow_c_1   = alloc_color(GLOBALS->wavearea, GLOBALS->color_back, GLOBALS->wavearea->style->white_gc);    
-	GLOBALS->gc.gc_baseline_wavewindow_c_1 = alloc_color(GLOBALS->wavearea, GLOBALS->color_baseline, GLOBALS->wavearea->style->bg_gc[GTK_STATE_SELECTED]);    
+	GLOBALS->gc.gc_back_wavewindow_c_1   = alloc_color(GLOBALS->wavearea, GLOBALS->color_back, GLOBALS->wavearea->style->white_gc);
+	GLOBALS->gc.gc_baseline_wavewindow_c_1 = alloc_color(GLOBALS->wavearea, GLOBALS->color_baseline, GLOBALS->wavearea->style->bg_gc[GTK_STATE_SELECTED]);
 	GLOBALS->gc.gc_grid_wavewindow_c_1   = alloc_color(GLOBALS->wavearea, GLOBALS->color_grid, GLOBALS->wavearea->style->bg_gc[GTK_STATE_PRELIGHT]);
 	GLOBALS->gc.gc_grid2_wavewindow_c_1  = alloc_color(GLOBALS->wavearea, GLOBALS->color_grid2, GLOBALS->wavearea->style->bg_gc[GTK_STATE_ACTIVE]);
 	GLOBALS->gc.gc_time_wavewindow_c_1   = alloc_color(GLOBALS->wavearea, GLOBALS->color_time, GLOBALS->wavearea->style->black_gc);
 	GLOBALS->gc.gc_timeb_wavewindow_c_1  = alloc_color(GLOBALS->wavearea, GLOBALS->color_timeb, GLOBALS->wavearea->style->bg_gc[GTK_STATE_ACTIVE]);
 	GLOBALS->gc.gc_value_wavewindow_c_1  = alloc_color(GLOBALS->wavearea, GLOBALS->color_value, GLOBALS->wavearea->style->black_gc);
-	GLOBALS->gc.gc_low_wavewindow_c_1    = alloc_color(GLOBALS->wavearea, GLOBALS->color_low, GLOBALS->wavearea->style->black_gc);    
-	GLOBALS->gc.gc_high_wavewindow_c_1   = alloc_color(GLOBALS->wavearea, GLOBALS->color_high, GLOBALS->wavearea->style->black_gc);    
-	GLOBALS->gc.gc_trans_wavewindow_c_1  = alloc_color(GLOBALS->wavearea, GLOBALS->color_trans, GLOBALS->wavearea->style->black_gc);    
-	GLOBALS->gc.gc_mid_wavewindow_c_1    = alloc_color(GLOBALS->wavearea, GLOBALS->color_mid, GLOBALS->wavearea->style->black_gc);    
+	GLOBALS->gc.gc_low_wavewindow_c_1    = alloc_color(GLOBALS->wavearea, GLOBALS->color_low, GLOBALS->wavearea->style->black_gc);
+	GLOBALS->gc.gc_high_wavewindow_c_1   = alloc_color(GLOBALS->wavearea, GLOBALS->color_high, GLOBALS->wavearea->style->black_gc);
+	GLOBALS->gc.gc_trans_wavewindow_c_1  = alloc_color(GLOBALS->wavearea, GLOBALS->color_trans, GLOBALS->wavearea->style->black_gc);
+	GLOBALS->gc.gc_mid_wavewindow_c_1    = alloc_color(GLOBALS->wavearea, GLOBALS->color_mid, GLOBALS->wavearea->style->black_gc);
 	GLOBALS->gc.gc_xfill_wavewindow_c_1  = alloc_color(GLOBALS->wavearea, GLOBALS->color_xfill, GLOBALS->wavearea->style->bg_gc[GTK_STATE_PRELIGHT]);
 	GLOBALS->gc.gc_x_wavewindow_c_1      = alloc_color(GLOBALS->wavearea, GLOBALS->color_x, GLOBALS->wavearea->style->black_gc);
 	GLOBALS->gc.gc_vbox_wavewindow_c_1   = alloc_color(GLOBALS->wavearea, GLOBALS->color_vbox, GLOBALS->wavearea->style->black_gc);
@@ -1683,7 +1683,7 @@ if(!GLOBALS->made_gc_contexts_wavewindow_c_1)
 
 	memcpy(&GLOBALS->gccache, &GLOBALS->gc, sizeof(struct wave_gcmaster_t));
 
-	/* add rainbow colors */	
+	/* add rainbow colors */
 	for(i=0;i<WAVE_NUM_RAINBOW;i++)
 		{
 		int col = wave_rgb_rainbow[i];
@@ -1709,7 +1709,7 @@ if(GLOBALS->timestart_from_savefile_valid)
 		GtkAdjustment *hadj = GTK_ADJUSTMENT(GLOBALS->wave_hslider);
 		hadj->value = GLOBALS->timestart_from_savefile;
 		fix_wavehadj();
-		gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(GLOBALS->wave_hslider)), "value_changed"); /* force zoom update */ 
+		gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(GLOBALS->wave_hslider)), "value_changed"); /* force zoom update */
 		gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(GLOBALS->wave_hslider)), "changed"); /* force zoom update */
 		}
 	GLOBALS->timestart_from_savefile_valid = 0;
@@ -1721,14 +1721,14 @@ if(GLOBALS->wavewidth>1)
 		{
 		calczoom(GLOBALS->tims.zoom);
 		fix_wavehadj();
-		gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(GLOBALS->wave_hslider)), "value_changed"); /* force zoom update */ 
+		gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(GLOBALS->wave_hslider)), "value_changed"); /* force zoom update */
 		gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(GLOBALS->wave_hslider)), "changed"); /* force zoom update */
 		}
 		else
 		{
 		GLOBALS->do_initial_zoom_fit_used=1;
 		service_zoom_fit(NULL,NULL);
-		}	
+		}
 	}
 
 /* tims.timecache=tims.laststart; */
@@ -1737,7 +1737,7 @@ return(TRUE);
 
 /*
  * screengrab vs normal rendering gcs...
- */ 
+ */
 void force_screengrab_gcs(void)
 {
 GLOBALS->black_and_white = 1;
@@ -1841,7 +1841,7 @@ gtk_widget_set_events(GLOBALS->wavearea,
 #ifdef WAVE_USE_GTK2
 		GDK_SCROLL_MASK |
 #endif
-                GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | 
+                GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK |
                 GDK_BUTTON_RELEASE_MASK |
                 GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK
                 );
@@ -1885,15 +1885,15 @@ if(GLOBALS->enable_slider_zoom)
 
 	if(!draw_slider_p)
 		{
-		GtkStyle *gs = gtk_widget_get_style(GLOBALS->hscroll_wavewindow_c_2); 
+		GtkStyle *gs = gtk_widget_get_style(GLOBALS->hscroll_wavewindow_c_2);
 		draw_slider_p = GTK_STYLE_GET_CLASS(gs)->draw_slider;
 		GTK_STYLE_GET_CLASS(gs)->draw_slider = draw_slider;
 		}
-	
+
 	memset(&gvalue, 0, sizeof(GValue));
 	g_value_init(&gvalue, G_TYPE_INT);
 	gtk_widget_style_get_property(GLOBALS->hscroll_wavewindow_c_2, "min-slider-length", &gvalue);
-	
+
 	gtkwave_signal_connect(GTK_OBJECT(GLOBALS->hscroll_wavewindow_c_2), "button_press_event",GTK_SIGNAL_FUNC(slider_bpr), NULL);
 	gtkwave_signal_connect(GTK_OBJECT(GLOBALS->hscroll_wavewindow_c_2), "button_release_event",GTK_SIGNAL_FUNC(slider_brr), NULL);
 	gtkwave_signal_connect(GTK_OBJECT(GLOBALS->hscroll_wavewindow_c_2), "motion_notify_event",GTK_SIGNAL_FUNC(slider_mnr), NULL);
@@ -1912,7 +1912,7 @@ gtk_container_border_width(GTK_CONTAINER(frame),2);
 gtk_container_add(GTK_CONTAINER(frame),table);
 return(frame);
 }
-   
+
 
 /**********************************************/
 
@@ -1930,9 +1930,9 @@ xsrc=(gint)hadj->value;
 num_traces_displayable=GLOBALS->signalarea->allocation.height/(GLOBALS->fontheight);
 num_traces_displayable--;   /* for the time trace that is always there */
 
-gdk_draw_rectangle(GLOBALS->signalpixmap, GLOBALS->gc.gc_mdgray, TRUE, 0, -1, GLOBALS->signal_fill_width, GLOBALS->fontheight); 
+gdk_draw_rectangle(GLOBALS->signalpixmap, GLOBALS->gc.gc_mdgray, TRUE, 0, -1, GLOBALS->signal_fill_width, GLOBALS->fontheight);
 gdk_draw_line(GLOBALS->signalpixmap, GLOBALS->gc_white, 0, GLOBALS->fontheight-1, GLOBALS->signal_fill_width-1, GLOBALS->fontheight-1);
-font_engine_draw_string(GLOBALS->signalpixmap, GLOBALS->signalfont, GLOBALS->gc_black, 
+font_engine_draw_string(GLOBALS->signalpixmap, GLOBALS->signalfont, GLOBALS->gc_black,
 	3+xsrc, GLOBALS->fontheight-4, "Time");
 
 t=GLOBALS->traces.first;
@@ -1962,7 +1962,7 @@ if(t)
 
 if(GLOBALS->signalarea_has_focus)
 	{
-	gdk_draw_rectangle(GLOBALS->signalpixmap, GLOBALS->gc_black, FALSE, 0, 0, GLOBALS->signal_fill_width-1, GLOBALS->signalarea->allocation.height-1); 
+	gdk_draw_rectangle(GLOBALS->signalpixmap, GLOBALS->gc_black, FALSE, 0, 0, GLOBALS->signal_fill_width-1, GLOBALS->signalarea->allocation.height-1);
 	}
 
 if((GLOBALS->wavepixmap_wavewindow_c_1)&&(update_waves))
@@ -1983,7 +1983,7 @@ void populateBuffer (Trptr t, char *altname, char* buf)
 
   if (HasWave(t))
     {
-      if (tname) 
+      if (tname)
 	{
 	  strcpy(ptr, tname);
 	  ptr = ptr + strlen(ptr);
@@ -2023,7 +2023,7 @@ void populateBuffer (Trptr t, char *altname, char* buf)
     }
   else
     {
-      if (tname) 
+      if (tname)
 	{
 
 	  if (IsGroupEnd(t))
@@ -2062,10 +2062,10 @@ int RenderSig(Trptr t, int i, int dobackground)
   GdkGC *clr_group;
   GdkGC *clr_shadowed;
   GdkGC *clr_signal;
-  GdkGC* bg_color;  
+  GdkGC* bg_color;
   GdkGC* text_color;
   unsigned left_justify;
-  char *subname = NULL; 
+  char *subname = NULL;
   bvptr bv = NULL;
 
   buf[0] = 0;
@@ -2144,13 +2144,13 @@ int RenderSig(Trptr t, int i, int dobackground)
   if (dobackground || IsSelected(t))
     {
 
-      gdk_draw_rectangle(GLOBALS->signalpixmap, bg_color, TRUE, 
+      gdk_draw_rectangle(GLOBALS->signalpixmap, bg_color, TRUE,
 			 0, retval,
 			 GLOBALS->signal_fill_width, GLOBALS->fontheight-1);
 
     }
 
-  gdk_draw_line(GLOBALS->signalpixmap, 
+  gdk_draw_line(GLOBALS->signalpixmap,
 		GLOBALS->gc_white,
 		0, liney,
 		GLOBALS->signal_fill_width-1, liney);
@@ -2161,11 +2161,11 @@ int RenderSig(Trptr t, int i, int dobackground)
 			      GLOBALS->signalfont,
 			      text_color,
 			      left_justify?3:3+GLOBALS->max_signal_name_pixel_width-
-			      font_engine_string_measure(GLOBALS->signalfont, buf), 
+			      font_engine_string_measure(GLOBALS->signalfont, buf),
 			      texty,
 			      buf);
 
-      
+
     }
 
   if (HasWave(t) || bv)
@@ -2233,7 +2233,7 @@ while(t)
                         bcnt++; /* bcnt is number of blank traces */
                         }
                 }
-  
+
         if((tscan)&&(tscan->vector))
                 {
                 bv = tscan->n.vec;
@@ -2374,7 +2374,7 @@ while(t)
 						*str2='=';
 						strcpy(str2+1,str);
 
-						free_2(str); 
+						free_2(str);
 
 						vlen=font_engine_string_measure(GLOBALS->signalfont,str2);
 						t->asciivalue=str2;
@@ -2471,7 +2471,7 @@ if(!GLOBALS->in_button_press_wavewindow_c_1)
 				int os;
 				os=rs;
 				os=(os<48)?48:os;
-				gtk_widget_set_usize(GTK_WIDGET(GLOBALS->signalwindow), 
+				gtk_widget_set_usize(GTK_WIDGET(GLOBALS->signalwindow),
 						os+30, -1);
 				}
 				else
@@ -2483,7 +2483,7 @@ if(!GLOBALS->in_button_press_wavewindow_c_1)
 		                        os = GLOBALS->initial_signal_window_width;
 		                        }
 
-				gtk_widget_set_usize(GTK_WIDGET(GLOBALS->signalwindow), 
+				gtk_widget_set_usize(GTK_WIDGET(GLOBALS->signalwindow),
 						os+30, -1);
 				}
 			}
@@ -2503,7 +2503,7 @@ if((t->asciivalue)&&(t->asciitime==GLOBALS->tims.marker))return;
 if(t->flags & (TR_BLANK|TR_ANALOG_BLANK_STRETCH))  /* seek to real xact trace if present... */
         {
         int bcnt = 0;
-        tscan = t;   
+        tscan = t;
         while((tscan) && (tscan = GivePrevTrace(tscan)))
                 {
                 if(!(tscan->flags & (TR_BLANK|TR_ANALOG_BLANK_STRETCH)))
@@ -2511,12 +2511,12 @@ if(t->flags & (TR_BLANK|TR_ANALOG_BLANK_STRETCH))  /* seek to real xact trace if
                         if(tscan->flags & TR_TTRANSLATED)
                                 {
                                 break; /* found it */
-                                }   
+                                }
                                 else
                                 {
                                 tscan = NULL;
                                 }
-                        }   
+                        }
                         else
                         {
                         bcnt++; /* bcnt is number of blank traces */
@@ -2530,7 +2530,7 @@ if(t->flags & (TR_BLANK|TR_ANALOG_BLANK_STRETCH))  /* seek to real xact trace if
                         {
                         bv = bv->transaction_chain; /* correlate to blank trace */
                         } while(bv && (bcnt--));
-                if(bv)   
+                if(bv)
                         {
 			/* nothing, we just want to set bv */
                         }
@@ -2554,7 +2554,7 @@ if((t->name || bv)&&(bv || !(t->flags&(TR_BLANK|TR_ANALOG_BLANK_STRETCH))))
 			vptr v;
                         Trptr ts;
                         TraceEnt t_temp;
-         
+
                         if(bv)
                                 {
                                 ts = &t_temp;
@@ -2595,7 +2595,7 @@ if((t->name || bv)&&(bv || !(t->flags&(TR_BLANK|TR_ANALOG_BLANK_STRETCH))))
 					unsigned char h_val = h_ptr->v.h_val;
 					if(t->n.nd->vartype == ND_VCD_EVENT)
 						{
-						h_val = (h_ptr->time >= GLOBALS->tims.first) && ((GLOBALS->tims.marker-GLOBALS->shift_timebase) == h_ptr->time) ? AN_1 : AN_0; /* generate impulse */ 
+						h_val = (h_ptr->time >= GLOBALS->tims.first) && ((GLOBALS->tims.marker-GLOBALS->shift_timebase) == h_ptr->time) ? AN_1 : AN_0; /* generate impulse */
 						}
 
 					str=(char *)calloc_2(1,3*sizeof(char));
@@ -2731,7 +2731,7 @@ WAVE_STRACE_ITERATOR(s_ctx_iter)
 		}
 	}
 
-gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, GLOBALS->gc.gc_grid_wavewindow_c_1,x, 0,x, 
+gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, GLOBALS->gc.gc_grid_wavewindow_c_1,x, 0,x,
 	((!timearray_encountered)&&(GLOBALS->display_grid)&&(GLOBALS->enable_vert_grid))?GLOBALS->waveheight:fhminus2);
 
 if(tim==GLOBALS->tims.last) return;
@@ -2754,7 +2754,7 @@ while((hashoffset<GLOBALS->pixelsperframe)&&(x<=rhs)&&(iter<9))
 	dx=dx+GLOBALS->hashstep;
 	if((GLOBALS->pixelsperframe!=200)||(GLOBALS->hashstep!=10.0)) iter++; /* fix any roundoff errors */
 	x = dx;
-	} 
+	}
 
 }
 
@@ -2782,7 +2782,7 @@ WAVE_STRACE_ITERATOR_FWD(s_ctx_iter)
 	GdkGC * gc;
 
 	if(!s_ctx_iter)
-		{ 
+		{
 		gc = GLOBALS->gc.gc_grid_wavewindow_c_1;
 		}
 		else
@@ -2815,7 +2815,7 @@ WAVE_STRACE_ITERATOR_FWD(s_ctx_iter)
 					if(tm<=GLOBALS->tims.end)
 						{
 						x=(tm-GLOBALS->tims.start)*GLOBALS->pxns;
-						if(oldx==x) 
+						if(oldx==x)
 							{
 							pos2=bsearch_timechain(GLOBALS->tims.start+(((gdouble)(x+1))*GLOBALS->nspx));
 							if(pos2>pos) { pos=pos2; goto top; } else continue;
@@ -2832,7 +2832,7 @@ WAVE_STRACE_ITERATOR_FWD(s_ctx_iter)
 			}
 		}
 
-	
+
 	wave_gdk_draw_line_flush(GLOBALS->wavepixmap_wavewindow_c_1); /* clear out state */
 
 	if(s_ctx_iter)
@@ -2856,7 +2856,7 @@ if(GLOBALS->ruler_step && !timearray_encountered)
 	for(iter_x = low_x; iter_x <= high_x; iter_x++)
 		{
 		tm = GLOBALS->ruler_step * iter_x +  GLOBALS->ruler_origin;
-		x=(tm-GLOBALS->tims.start)*GLOBALS->pxns;		
+		x=(tm-GLOBALS->tims.start)*GLOBALS->pxns;
 		if(oldx==x)
 			{
 			gdouble xd,offset,pixstep;
@@ -3005,13 +3005,13 @@ if(GLOBALS->topmost_trace)
 		{
 		if(tback->flags&(TR_BLANK|TR_ANALOG_BLANK_STRETCH))
 			{
-			tback = GivePrevTrace(tback);			
+			tback = GivePrevTrace(tback);
 			iback--;
 			}
 		else if(tback->flags & TR_TTRANSLATED)
 			{
-			if(tback != t) 
-				{ 
+			if(tback != t)
+				{
 				t = tback;
 				i = iback;
 				}
@@ -3035,7 +3035,7 @@ if(GLOBALS->topmost_trace)
 
 				if(!t->n.nd->extvals)
 					{
-					if(i>=0) 
+					if(i>=0)
 						{
 						gc_save(t, &gc_sav);
 						draw_hptr_trace(t,h,i,1,0);
@@ -3044,7 +3044,7 @@ if(GLOBALS->topmost_trace)
 					}
 					else
 					{
-					if(i>=0) 
+					if(i>=0)
 						{
 						gc_save(t, &gc_sav);
 						draw_hptr_trace_vector(t,h,i);
@@ -3060,7 +3060,7 @@ if(GLOBALS->topmost_trace)
 				v=bsearch_vector(bv, GLOBALS->tims.start - t->shift);
 				DEBUG(printf("Vector Trace: %s, %s\n", t->name, bv->bvname));
 				DEBUG(printf("Start time: "TTFormat", Vectorent time: "TTFormat"\n", GLOBALS->tims.start,(v->time+GLOBALS->shift_timebase)));
-				if(i>=0) 
+				if(i>=0)
 					{
 					gc_save(t, &gc_sav);
 					draw_vptr_trace(t,v,i);
@@ -3081,7 +3081,7 @@ if(GLOBALS->topmost_trace)
 							if(i<num_traces_displayable)
 								{
 								v=bsearch_vector(bv, GLOBALS->tims.start - t->shift);
-								if(i>=0) 
+								if(i>=0)
 									{
 									gc_save(t, &gc_sav);
 									draw_vptr_trace(t_orig,v,i);
@@ -3103,7 +3103,7 @@ if(GLOBALS->topmost_trace)
 			if(kill_dodraw_grid)
 				{
 				Trptr tn = GiveNextTrace(t);
-				if(!tn) 
+				if(!tn)
 					{
 					kill_dodraw_grid = 0;
 					}
@@ -3113,8 +3113,8 @@ if(GLOBALS->topmost_trace)
 					kill_dodraw_grid = 0;
 					}
 				}
-			
-			if(i>=0) 
+
+			if(i>=0)
 				{
 				gc_save(t, &gc_sav);
 				draw_hptr_trace(NULL,NULL,i,0,kill_dodraw_grid);
@@ -3162,13 +3162,13 @@ GLOBALS->tims.end-=GLOBALS->shift_timebase;
 liney=((which+2)*GLOBALS->fontheight)-2;
 if(((t)&&(t->flags&TR_INVERT))&&(!is_event))
 	{
-	_y0=((which+1)*GLOBALS->fontheight)+2;	
+	_y0=((which+1)*GLOBALS->fontheight)+2;
 	_y1=liney-2;
 	invert=1;
 	}
 	else
 	{
-	_y1=((which+1)*GLOBALS->fontheight)+2;	
+	_y1=((which+1)*GLOBALS->fontheight)+2;
 	_y0=liney-2;
 	invert=0;
 	}
@@ -3179,8 +3179,8 @@ if((GLOBALS->display_grid)&&(GLOBALS->enable_horiz_grid)&&(!kill_grid))
 	{
 	if((GLOBALS->highlight_wavewindow) && (t) && (t->flags & TR_HIGHLIGHT) && (!GLOBALS->black_and_white))
 		{
-		gdk_draw_rectangle(GLOBALS->wavepixmap_wavewindow_c_1, GLOBALS->gc.gc_grid_wavewindow_c_1, 
-			TRUE,0, liney - GLOBALS->fontheight, 
+		gdk_draw_rectangle(GLOBALS->wavepixmap_wavewindow_c_1, GLOBALS->gc.gc_grid_wavewindow_c_1,
+			TRUE,0, liney - GLOBALS->fontheight,
 			GLOBALS->wavewidth, GLOBALS->fontheight);
 		}
 		else
@@ -3213,9 +3213,9 @@ tim=(h->time);
 if((tim>GLOBALS->tims.end)||(tim>GLOBALS->tims.last)) break;
 
 _x0=(tim - GLOBALS->tims.start) * GLOBALS->pxns;
-if(_x0<-1) 
-	{ 
-	_x0=-1; 
+if(_x0<-1)
+	{
+	_x0=-1;
 	}
 	else
 if(_x0>GLOBALS->wavewidth)
@@ -3229,9 +3229,9 @@ h2tim=tim=(h2->time);
 if(tim>GLOBALS->tims.last) tim=GLOBALS->tims.last;
 	else if(tim>GLOBALS->tims.end+1) tim=GLOBALS->tims.end+1;
 _x1=(tim - GLOBALS->tims.start) * GLOBALS->pxns;
-if(_x1<-1) 
-	{ 
-	_x1=-1; 
+if(_x1<-1)
+	{
+	_x1=-1;
 	}
 	else
 if(_x1>GLOBALS->wavewidth)
@@ -3245,9 +3245,9 @@ if(_x0!=_x1)
 		{
 		if(h->time >= GLOBALS->tims.first)
 			{
-			wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, GLOBALS->gc.gc_w_wavewindow_c_1, _x0, _y0, _x0, _y1); 
-			wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, GLOBALS->gc.gc_w_wavewindow_c_1, _x0, _y1, _x0+2, _y1+2); 
-			wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, GLOBALS->gc.gc_w_wavewindow_c_1, _x0, _y1, _x0-2, _y1+2); 
+			wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, GLOBALS->gc.gc_w_wavewindow_c_1, _x0, _y0, _x0, _y1);
+			wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, GLOBALS->gc.gc_w_wavewindow_c_1, _x0, _y1, _x0+2, _y1+2);
+			wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, GLOBALS->gc.gc_w_wavewindow_c_1, _x0, _y1, _x0-2, _y1+2);
 			}
 		h=h->next;
 		continue;
@@ -3281,7 +3281,7 @@ if(_x0!=_x1)
 			default:	wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, c, _x1, _y0, _x1, _y1); break;
 			}
 		break;
-	
+
 		case AN_X: /* X */
 		case AN_W: /* W */
 		case AN_U: /* U */
@@ -3298,11 +3298,11 @@ if(_x0!=_x1)
 
 		if(invert)
 			{
-			gdk_draw_rectangle(GLOBALS->wavepixmap_wavewindow_c_1, gcx, TRUE,_x0+1, _y0, _x1-_x0, _y1-_y0+1); 
+			gdk_draw_rectangle(GLOBALS->wavepixmap_wavewindow_c_1, gcx, TRUE,_x0+1, _y0, _x1-_x0, _y1-_y0+1);
 			}
 			else
 			{
-			gdk_draw_rectangle(GLOBALS->wavepixmap_wavewindow_c_1, gcxf, TRUE,_x0+1, _y1, _x1-_x0, _y0-_y1+1); 
+			gdk_draw_rectangle(GLOBALS->wavepixmap_wavewindow_c_1, gcxf, TRUE,_x0+1, _y1, _x1-_x0, _y0-_y1+1);
 			}
 
 		if(identifier_str[0])
@@ -3323,14 +3323,14 @@ if(_x0!=_x1)
 		wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, gcx,_x0, _y1,_x1, _y1);
 		if(h2tim<=GLOBALS->tims.end) wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, c, _x1, _y0, _x1, _y1);
 		break;
-		
+
 		case AN_Z: /* Z */
 		wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, GLOBALS->gc.gc_mid_wavewindow_c_1,_x0, yu,_x1, yu);
 		if(h2tim<=GLOBALS->tims.end)
 		switch(h2val)
 			{
 			case AN_0:
-			case AN_L: 	
+			case AN_L:
 					wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, c, _x1, yu, _x1, _y0); break;
 			case AN_1:
 			case AN_H:
@@ -3338,7 +3338,7 @@ if(_x0!=_x1)
 			default:	wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, c, _x1, _y0, _x1, _y1); break;
 			}
 		break;
-		
+
 		case AN_1: /* 1 */
 		case AN_H: /* 1 */
 		wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, (hval==AN_1) ? GLOBALS->gc.gc_1_wavewindow_c_1 : GLOBALS->gc.gc_high_wavewindow_c_1,_x0, _y1,_x1, _y1);
@@ -3348,7 +3348,7 @@ if(_x0!=_x1)
 			case AN_1:
 			case AN_H:	break;
 
-			case AN_0: 	
+			case AN_0:
 			case AN_L:
 					wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, c, _x1, _y1, _x1, _y0); break;
 			case AN_Z:	wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, c, _x1, _y1, _x1, yu); break;
@@ -3364,13 +3364,13 @@ if(_x0!=_x1)
 	{
 	if(!is_event)
 		{
-		wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, GLOBALS->gc.gc_trans_wavewindow_c_1, _x1, _y0, _x1, _y1);		
+		wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, GLOBALS->gc.gc_trans_wavewindow_c_1, _x1, _y0, _x1, _y1);
 		}
 		else
 		{
-		wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, GLOBALS->gc.gc_w_wavewindow_c_1, _x1, _y0, _x1, _y1);		
-		wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, GLOBALS->gc.gc_w_wavewindow_c_1, _x0, _y1, _x0+2, _y1+2); 
-		wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, GLOBALS->gc.gc_w_wavewindow_c_1, _x0, _y1, _x0-2, _y1+2); 
+		wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, GLOBALS->gc.gc_w_wavewindow_c_1, _x1, _y0, _x1, _y1);
+		wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, GLOBALS->gc.gc_w_wavewindow_c_1, _x0, _y1, _x0+2, _y1+2);
+		wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, GLOBALS->gc.gc_w_wavewindow_c_1, _x0, _y1, _x0-2, _y1+2);
 		}
 	newtime=(((gdouble)(_x1+WAVE_OPT_SKIP))*GLOBALS->nspx)+GLOBALS->tims.start/*+GLOBALS->shift_timebase*/;	/* skip to next pixel */
 	h3=bsearch_node(t->n.nd,newtime);
@@ -3415,7 +3415,7 @@ int skipcnt = 0;
 ci = GLOBALS->gc.gc_baseline_wavewindow_c_1;
 
 liney=((which+2+num_extension)*GLOBALS->fontheight)-2;
-_y1=((which+1)*GLOBALS->fontheight)+2;	
+_y1=((which+1)*GLOBALS->fontheight)+2;
 _y0=liney-2;
 yu=(_y0+_y1)/2;
 
@@ -3427,7 +3427,7 @@ if(t->flags & TR_ANALOG_FULLSCALE) /* otherwise use dynamic */
 		for(;;)
 			{
 			if(!h3) break;
-	
+
 			if((h3->time >= GLOBALS->tims.first) && (h3->time <= GLOBALS->tims.last))
 				{
 				tv = mynan;
@@ -3470,7 +3470,7 @@ if(t->flags & TR_ANALOG_FULLSCALE) /* otherwise use dynamic */
 				}
 			h3 = h3->next;
 			}
-	
+
 		if (isnan(tmin) || isnan(tmax))
 			{
 			tmin = tmax = 0;
@@ -3507,7 +3507,7 @@ if(t->flags & TR_ANALOG_FULLSCALE) /* otherwise use dynamic */
 	}
 	else
 	{
-	h3 = h;	
+	h3 = h;
 	for(;;)
 	{
 	if(!h3) break;
@@ -3602,9 +3602,9 @@ if((tim>GLOBALS->tims.end)||(tim>GLOBALS->tims.last)) break;
 _x0=(tim - GLOBALS->tims.start) * GLOBALS->pxns;
 
 /*
-if(_x0<-1) 
-	{ 
-	_x0=-1; 
+if(_x0<-1)
+	{
+	_x0=-1;
 	}
 	else
 if(_x0>GLOBALS->wavewidth)
@@ -3621,9 +3621,9 @@ if(tim>GLOBALS->tims.last) tim=GLOBALS->tims.last;
 _x1=(tim - GLOBALS->tims.start) * GLOBALS->pxns;
 
 /*
-if(_x1<-1) 
-	{ 
-	_x1=-1; 
+if(_x1<-1)
+	{
+	_x1=-1;
 	}
 	else
 if(_x1>GLOBALS->wavewidth)
@@ -3708,7 +3708,7 @@ if((is_nan2 = isnan(tv2)))
 
 if((_x0!=_x1)||(skipcnt < GLOBALS->analog_redraw_skip_count)) /* lower number = better performance */
 	{
-	if(_x0==_x1) 
+	if(_x0==_x1)
 		{
 		skipcnt++;
 		}
@@ -3717,11 +3717,11 @@ if((_x0!=_x1)||(skipcnt < GLOBALS->analog_redraw_skip_count)) /* lower number =
 		skipcnt = 0;
 		}
 
-	if(type == AN_0) 
+	if(type == AN_0)
 		{
-		c = GLOBALS->gc.gc_vbox_wavewindow_c_1; 
-		} 
-		else 
+		c = GLOBALS->gc.gc_vbox_wavewindow_c_1;
+		}
+		else
 		{
 		c = GLOBALS->gc.gc_x_wavewindow_c_1;
 		}
@@ -3785,7 +3785,7 @@ if((t->flags & (TR_ANALOG_INTERPOLATED|TR_ANALOG_STEP)) != TR_ANALOG_STEP)
 	if(coords[1] > rect[3]) coords[1] = rect[3];
 	if(coords[3] > rect[3]) coords[3] = rect[3];
 	}
-	
+
 _x0 = coords[0];
 yt0 = coords[1];
 _x1 = coords[2];
@@ -3904,7 +3904,7 @@ GLOBALS->tims.start-=GLOBALS->shift_timebase;
 GLOBALS->tims.end-=GLOBALS->shift_timebase;
 
 liney=((which+2)*GLOBALS->fontheight)-2;
-_y1=((which+1)*GLOBALS->fontheight)+2;	
+_y1=((which+1)*GLOBALS->fontheight)+2;
 _y0=liney-2;
 yu=(_y0+_y1)/2;
 ytext=yu-(GLOBALS->wavefont->ascent/2)+GLOBALS->wavefont->ascent;
@@ -3953,7 +3953,7 @@ if((t->flags & TR_ANALOGMASK) && (!(h->flags&HIST_STRING) || !(h->flags&HIST_REA
 			{
 			break;
 			}
-		}	
+		}
 
  	if((ext) && (GLOBALS->highlight_wavewindow) && (t) && (t->flags & TR_HIGHLIGHT) && (!GLOBALS->black_and_white))
                 {
@@ -3977,9 +3977,9 @@ tim=(h->time);
 if((tim>GLOBALS->tims.end)||(tim>GLOBALS->tims.last)) break;
 
 _x0=(tim - GLOBALS->tims.start) * GLOBALS->pxns;
-if(_x0<-1) 
-	{ 
-	_x0=-1; 
+if(_x0<-1)
+	{
+	_x0=-1;
 	}
 	else
 if(_x0>GLOBALS->wavewidth)
@@ -3993,9 +3993,9 @@ if(!h2) break;
 if(tim>GLOBALS->tims.last) tim=GLOBALS->tims.last;
 	else if(tim>GLOBALS->tims.end+1) tim=GLOBALS->tims.end+1;
 _x1=(tim - GLOBALS->tims.start) * GLOBALS->pxns;
-if(_x1<-1) 
-	{ 
-	_x1=-1; 
+if(_x1<-1)
+	{
+	_x1=-1;
 	}
 	else
 if(_x1>GLOBALS->wavewidth)
@@ -4033,8 +4033,8 @@ if(!(h->flags&(HIST_REAL|HIST_STRING)))
 			{
 			type = AN_X;
 			}
-                }   
-        }       
+                }
+        }
 /* type = (!(h->flags&(HIST_REAL|HIST_STRING))) ? vtype(t,h->v.h_vector) : AN_0; */
 if(_x0>-1) {
 GdkGC *gltype, *gtype;
@@ -4081,31 +4081,31 @@ if(GLOBALS->use_roundcaps)
 	wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, gtype,_x0, _y0,_x0, _y1);
 	}
 }
-		
+
 if(_x0!=_x1)
 	{
-	if (type == AN_Z) 
+	if (type == AN_Z)
 		{
 		if(GLOBALS->use_roundcaps)
 			{
 			wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, GLOBALS->gc.gc_mid_wavewindow_c_1,_x0+1, yu,_x1-1, yu);
-			} 
-			else 
+			}
+			else
 			{
 			wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, GLOBALS->gc.gc_mid_wavewindow_c_1,_x0, yu,_x1, yu);
 			}
-		} 
-		else 
+		}
+		else
 		{
-		if(type == AN_0) 
+		if(type == AN_0)
 			{
-			c = GLOBALS->gc.gc_vbox_wavewindow_c_1; 
-			} 
-			else 
+			c = GLOBALS->gc.gc_vbox_wavewindow_c_1;
+			}
+			else
 			{
 			c = GLOBALS->gc.gc_x_wavewindow_c_1;
 			}
-	
+
 	if(GLOBALS->use_roundcaps)
 		{
 		wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, c,_x0+2, _y0,_x1-2, _y0);
@@ -4153,7 +4153,7 @@ if(_x0<0) _x0=0;	/* fixup left margin */
 				*srch_for_color = 0;
 				cb = get_gc_from_name(ascii+1);
 				if(cb)
-					{	
+					{
 					ascii2 =  srch_for_color + 1;
 					if(GLOBALS->gc.gc_back_wavewindow_c_1 != GLOBALS->gc_white)
 						{
@@ -4220,7 +4220,7 @@ if(_x0<0) _x0=0;	/* fixup left margin */
 				*srch_for_color = 0;
 				cb = get_gc_from_name(ascii+1);
 				if(cb)
-					{	
+					{
 					/* ascii2 =  srch_for_color + 1; */ /* scan-build */
 					if(GLOBALS->gc.gc_back_wavewindow_c_1 != GLOBALS->gc_white)
 						{
@@ -4288,14 +4288,14 @@ ci = GLOBALS->gc.gc_baseline_wavewindow_c_1;
 
 h=v;
 liney=((which+2+num_extension)*GLOBALS->fontheight)-2;
-_y1=((which+1)*GLOBALS->fontheight)+2;	
+_y1=((which+1)*GLOBALS->fontheight)+2;
 _y0=liney-2;
 yu=(_y0+_y1)/2;
 
 if(t->flags & TR_ANALOG_FULLSCALE) /* otherwise use dynamic */
         {
 	if((!t->minmax_valid)||(t->d_num_ext != num_extension))
-                { 
+                {
                 h3 = t->n.vec->vectors[0];
                 for(;;)
                         {
@@ -4318,7 +4318,7 @@ if(t->flags & TR_ANALOG_FULLSCALE) /* otherwise use dynamic */
                                 if(isinf(tv))
                                         {
                                         any_infs = 1;
-                                 
+
                                         if(tv > 0)
                                                 {
                                                 any_infp = 1;
@@ -4338,7 +4338,7 @@ if(t->flags & TR_ANALOG_FULLSCALE) /* otherwise use dynamic */
                 if(any_infs)
                         {
 			double tdelta = (tmax - tmin) * WAVE_INF_SCALING;
-                                         
+
                         if(any_infp) tmax = tmax + tdelta;
                         if(any_infm) tmin = tmin - tdelta;
                         }
@@ -4352,7 +4352,7 @@ if(t->flags & TR_ANALOG_FULLSCALE) /* otherwise use dynamic */
 			{
 			tmax = (_y1 - _y0) / (tmax - tmin);
 			}
-                               
+
                 t->minmax_valid = 1;
                 t->d_minval = tmin;
                 t->d_maxval = tmax;
@@ -4371,10 +4371,10 @@ if(t->flags & TR_ANALOG_FULLSCALE) /* otherwise use dynamic */
 	{
 	if(!h3) break;
 	tim=(h3->time);
-	
+
 	if(tim>GLOBALS->tims.end) { endcnt++; if(endcnt==2) break; }
 	if(tim>GLOBALS->tims.last) break;
-	
+
 	_x0=(tim - GLOBALS->tims.start) * GLOBALS->pxns;
 	if((_x0>GLOBALS->wavewidth)&&(endcnt==2))
 	        {
@@ -4390,7 +4390,7 @@ if(t->flags & TR_ANALOG_FULLSCALE) /* otherwise use dynamic */
 			tmax = tv;
 		}
         else
-        if(isinf(tv))    
+        if(isinf(tv))
                 {
                 any_infs = 1;
                 if(tv > 0)
@@ -4400,8 +4400,8 @@ if(t->flags & TR_ANALOG_FULLSCALE) /* otherwise use dynamic */
                         else
                         {
                         any_infm = 1;
-                        }                
-                }   
+                        }
+                }
 
 	h3 = h3->next;
 	}
@@ -4411,7 +4411,7 @@ if(t->flags & TR_ANALOG_FULLSCALE) /* otherwise use dynamic */
         if(any_infs)
                 {
 		double tdelta = (tmax - tmin) * WAVE_INF_SCALING;
-                 
+
                 if(any_infp) tmax = tmax + tdelta;
                 if(any_infm) tmin = tmin - tdelta;
                 }
@@ -4426,7 +4426,7 @@ if(t->flags & TR_ANALOG_FULLSCALE) /* otherwise use dynamic */
 		tmax = (_y1 - _y0) / (tmax - tmin);
 		}
 	}
-	
+
 if(GLOBALS->tims.last - GLOBALS->tims.start < GLOBALS->wavewidth)
 	{
 	rmargin=(GLOBALS->tims.last - GLOBALS->tims.start) * GLOBALS->pxns;
@@ -4446,9 +4446,9 @@ if((tim>GLOBALS->tims.end)||(tim>GLOBALS->tims.last)) break;
 _x0=(tim - GLOBALS->tims.start) * GLOBALS->pxns;
 
 /*
-if(_x0<-1) 
-	{ 
-	_x0=-1; 
+if(_x0<-1)
+	{
+	_x0=-1;
 	}
 	else
 if(_x0>GLOBALS->wavewidth)
@@ -4465,9 +4465,9 @@ if(tim>GLOBALS->tims.last) tim=GLOBALS->tims.last;
 _x1=(tim - GLOBALS->tims.start) * GLOBALS->pxns;
 
 /*
-if(_x1<-1) 
-	{ 
-	_x1=-1; 
+if(_x1<-1)
+	{
+	_x1=-1;
 	}
 	else
 if(_x1>GLOBALS->wavewidth)
@@ -4527,17 +4527,17 @@ if((_x0!=_x1)||(skipcnt < GLOBALS->analog_redraw_skip_count)) /* lower number =
         if(_x0==_x1)
                 {
                 skipcnt++;
-                }  
+                }
                 else
                 {
                 skipcnt = 0;
-                }   
+                }
 
-	if(type == AN_0) 
+	if(type == AN_0)
 		{
-		c = GLOBALS->gc.gc_vbox_wavewindow_c_1; 
-		} 
-		else 
+		c = GLOBALS->gc.gc_vbox_wavewindow_c_1;
+		}
+		else
 		{
 		c = GLOBALS->gc.gc_x_wavewindow_c_1;
 		}
@@ -4601,7 +4601,7 @@ if((t->flags & (TR_ANALOG_INTERPOLATED|TR_ANALOG_STEP)) != TR_ANALOG_STEP)
 	if(coords[1] > rect[3]) coords[1] = rect[3];
 	if(coords[3] > rect[3]) coords[3] = rect[3];
 	}
-	
+
 _x0 = coords[0];
 yt0 = coords[1];
 _x1 = coords[2];
@@ -4723,7 +4723,7 @@ GLOBALS->tims.start-=GLOBALS->shift_timebase;
 GLOBALS->tims.end-=GLOBALS->shift_timebase;
 
 liney=((which+2)*GLOBALS->fontheight)-2;
-_y1=((which+1)*GLOBALS->fontheight)+2;	
+_y1=((which+1)*GLOBALS->fontheight)+2;
 _y0=liney-2;
 yu=(_y0+_y1)/2;
 ytext=yu-(GLOBALS->wavefont->ascent/2)+GLOBALS->wavefont->ascent;
@@ -4810,9 +4810,9 @@ tim=(h->time);
 if((tim>GLOBALS->tims.end)||(tim>GLOBALS->tims.last)) break;
 
 _x0=(tim - GLOBALS->tims.start) * GLOBALS->pxns;
-if(_x0<-1) 
-	{ 
-	_x0=-1; 
+if(_x0<-1)
+	{
+	_x0=-1;
 	}
 	else
 if(_x0>GLOBALS->wavewidth)
@@ -4826,9 +4826,9 @@ if(!h2) break;
 if(tim>GLOBALS->tims.last) tim=GLOBALS->tims.last;
 	else if(tim>GLOBALS->tims.end+1) tim=GLOBALS->tims.end+1;
 _x1=(tim - GLOBALS->tims.start) * GLOBALS->pxns;
-if(_x1<-1) 
-	{ 
-	_x1=-1; 
+if(_x1<-1)
+	{
+	_x1=-1;
 	}
 	else
 if(_x1>GLOBALS->wavewidth)
@@ -4857,30 +4857,30 @@ switch(type)
 
 if(GLOBALS->use_roundcaps)
 	{
-	if (type == AN_Z) 
+	if (type == AN_Z)
 		{
-		if (lasttype != -1) 
+		if (lasttype != -1)
 			{
 			wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, gltype,_x0-1, _y0,_x0,   yu);
 			wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, gltype,_x0, yu,_x0-1, _y1);
 			}
-		} 
+		}
 		else
-		if (lasttype==AN_Z) 
+		if (lasttype==AN_Z)
 			{
 			wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, gtype,_x0+1, _y0,_x0,   yu);
 			wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, gtype,_x0, yu,_x0+1, _y1);
-			} 
-			else 
+			}
+			else
 			{
-			if (lasttype != type) 
+			if (lasttype != type)
 				{
 				wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, gltype,_x0-1, _y0,_x0,   yu);
 				wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, gltype,_x0, yu,_x0-1, _y1);
 				wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, gtype,_x0+1, _y0,_x0,   yu);
 				wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, gtype,_x0, yu,_x0+1, _y1);
-				} 
-				else 
+				}
+				else
 				{
 				wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, gtype,_x0-2, _y0,_x0+2, _y1);
 				wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, gtype,_x0+2, _y0,_x0-2, _y1);
@@ -4895,28 +4895,28 @@ if(GLOBALS->use_roundcaps)
 
 if(_x0!=_x1)
 	{
-	if (type == AN_Z) 
+	if (type == AN_Z)
 		{
 		if(GLOBALS->use_roundcaps)
 			{
 			wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, GLOBALS->gc.gc_mid_wavewindow_c_1,_x0+1, yu,_x1-1, yu);
-			} 
-			else 
+			}
+			else
 			{
 			wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, GLOBALS->gc.gc_mid_wavewindow_c_1,_x0, yu,_x1, yu);
 			}
-		} 
-		else 
+		}
+		else
 		{
-		if(type == AN_0) 
+		if(type == AN_0)
 			{
-			c = GLOBALS->gc.gc_vbox_wavewindow_c_1; 
-			} 
-			else 
+			c = GLOBALS->gc.gc_vbox_wavewindow_c_1;
+			}
+			else
 			{
 			c = GLOBALS->gc.gc_x_wavewindow_c_1;
 			}
-	
+
 	if(GLOBALS->use_roundcaps)
 		{
 		wave_gdk_draw_line(GLOBALS->wavepixmap_wavewindow_c_1, c,_x0+2, _y0,_x1-2, _y0);
@@ -4947,7 +4947,7 @@ if(_x0<0) _x0=0;	/* fixup left margin */
 				*srch_for_color = 0;
 				cb = get_gc_from_name(ascii+1);
 				if(cb)
-					{	
+					{
 					ascii2 =  srch_for_color + 1;
 					if(!GLOBALS->black_and_white) gdk_draw_rectangle(GLOBALS->wavepixmap_wavewindow_c_1, cb, TRUE, _x0+1, _y1+1, width-1, (_y0-1) - (_y1+1) + 1);
 					GLOBALS->fill_in_smaller_rgb_areas_wavewindow_c_1 = 1;
@@ -4994,7 +4994,7 @@ if(_x0<0) _x0=0;	/* fixup left margin */
 				*srch_for_color = 0;
 				cb = get_gc_from_name(ascii+1);
 				if(cb)
-					{	
+					{
 					/* ascii2 =  srch_for_color + 1; */
 					if(GLOBALS->gc.gc_back_wavewindow_c_1 != GLOBALS->gc_white)
 						{
diff --git a/src/wavewindow.h b/src/wavewindow.h
index cae1e88..3bd6a11 100644
--- a/src/wavewindow.h
+++ b/src/wavewindow.h
@@ -12,7 +12,7 @@
 
 void button_press_release_common(void);
 void UpdateSigValue(Trptr t);
-void MaxSignalLength(void);  
+void MaxSignalLength(void);
 void RenderSigs(int trtarget, int update_waves);
 int RenderSig(Trptr t, int i, int dobackground);
 void populateBuffer(Trptr t, char *altname, char* buf);
diff --git a/src/zoombuttons.c b/src/zoombuttons.c
index 96c2e81..41d0336 100644
--- a/src/zoombuttons.c
+++ b/src/zoombuttons.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) Tony Bybell 1999-2005.
  *
  * This program is free software; you can redistribute it and/or
@@ -128,7 +128,7 @@ if(GLOBALS->do_zoom_center)
 	else
 	{
 	GLOBALS->tims.timecache=0;
-	}	
+	}
 
 fix_wavehadj();
 
@@ -186,13 +186,13 @@ if(GLOBALS->tims.zoom<0)		/* otherwise it's ridiculous and can cause */
 		else
 		{
 		GLOBALS->tims.timecache=0;
-		}	
+		}
 
 	fix_wavehadj();
-	
+
 	gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(GLOBALS->wave_hslider)), "changed"); /* force zoom update */
 	gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(GLOBALS->wave_hslider)), "value_changed"); /* force zoom update */
-	
+
 	DEBUG(printf("Zoombuttons in\n"));
 	}
 }
@@ -205,7 +205,7 @@ if(GLOBALS->helpbox_is_active)
         {
         help_text_bold("\n\nZoom Undo");
         help_text(
-                " is used to revert to the previous zoom value used.  Undo"  
+                " is used to revert to the previous zoom value used.  Undo"
 		" only works one level deep."
         );
         return;
@@ -253,19 +253,19 @@ if((GLOBALS->tims.baseline>=0)&&(GLOBALS->tims.marker>=0))
 	if(GLOBALS->wavewidth>4) { fixedwidth=GLOBALS->wavewidth-4; } else { fixedwidth=GLOBALS->wavewidth; }
 	estimated=-log(((gdouble)(GLOBALS->tims.last-GLOBALS->tims.first+1))/((gdouble)fixedwidth)*((gdouble)200.0))/log(GLOBALS->zoombase);
 	if(estimated>((gdouble)(0.0))) estimated=((gdouble)(0.0));
-	
+
 	GLOBALS->tims.prevzoom=GLOBALS->tims.zoom;
 	GLOBALS->tims.timecache=0;
-	
+
 	calczoom(estimated);
 	GLOBALS->tims.zoom=estimated;
 
 	fix_wavehadj();
-	
+
 	gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(GLOBALS->wave_hslider)), "changed"); /* force zoom update */
 	gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(GLOBALS->wave_hslider)), "value_changed"); /* force zoom update */
 	}
-	
+
 DEBUG(printf("Zoombuttons Fit\n"));
 }
 
@@ -288,18 +288,18 @@ if(GLOBALS->helpbox_is_active)
 if(GLOBALS->wavewidth>4) { fixedwidth=GLOBALS->wavewidth-4; } else { fixedwidth=GLOBALS->wavewidth; }
 estimated=-log(((gdouble)(GLOBALS->tims.last-GLOBALS->tims.first+1))/((gdouble)fixedwidth)*((gdouble)200.0))/log(GLOBALS->zoombase);
 if(estimated>((gdouble)(0.0))) estimated=((gdouble)(0.0));
-	
+
 GLOBALS->tims.prevzoom=GLOBALS->tims.zoom;
 GLOBALS->tims.timecache=0;
-	
+
 calczoom(estimated);
 GLOBALS->tims.zoom=estimated;
 
 fix_wavehadj();
-	
+
 gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(GLOBALS->wave_hslider)), "changed"); /* force zoom update */
 gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(GLOBALS->wave_hslider)), "value_changed"); /* force zoom update */
-	
+
 DEBUG(printf("Zoombuttons Full\n"));
 }
 

-- 
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